|
Mr Dog posted:The best thing I can say about visual studio is that it isn't terrible I guess. https://www.youtube.com/watch?v=eSMeUPFjQHc
|
# ? Mar 10, 2014 15:33 |
|
|
# ? Jun 11, 2024 10:40 |
|
also casting enums to ints and vice versa in c# is probably based on the int values of the enum values which as you mentioned are secret ints. idr how default values get assigned (by order?) but you can specify them manually. either way c# enums suck
|
# ? Mar 10, 2014 15:41 |
|
so maybe don't cast ints to enums tada no more problem
|
# ? Mar 10, 2014 15:43 |
lol i forgot this song/video existed
|
|
# ? Mar 10, 2014 15:44 |
|
in Haskell enums are implemented in terms of ints and functions to convert back and forth between the enum and the intcode:
gonadic io fucked around with this message at 15:52 on Mar 10, 2014 |
# ? Mar 10, 2014 15:50 |
|
that's really gross
|
# ? Mar 10, 2014 15:53 |
|
Haskell, I mean.
|
# ? Mar 10, 2014 15:53 |
|
I find C# enums to be pretty sweet, it really just being an int helpful for working together with SQL. Also it allows for bit wise operations for having multiple active values. [FlagsAttribute] owns pretty hard. Also lol at complaining about enums being syntactic sugar, if you want to be a sperg just use State Pattern.
|
# ? Mar 10, 2014 15:56 |
|
java enums do all of that plus you can do more stuff w/ them. their better all around.
|
# ? Mar 10, 2014 16:03 |
|
AlsoD posted:in Haskell enums are implemented in terms of ints and functions to convert back and forth between the enum and the int I would consider that bad
|
# ? Mar 10, 2014 16:04 |
|
the p. thoroughly amazing part about the sql connection is how sql databases actually use integers for symbolic enumeration fields, with that amazingly pointless extra table naming each value, and probably a key constraint ensuring that the poo poo query optimizer has an extra way to make things ridiculously slow
|
# ? Mar 10, 2014 16:10 |
|
enums and checked exceptions are 2 places where java is undeniably better than c#.
|
# ? Mar 10, 2014 16:11 |
|
too bad about the everything else
|
# ? Mar 10, 2014 16:14 |
|
MeramJert posted:Aimed squarely in the gap between the Arduino at the low end, and the Raspberry Pi at the high end, both these boards use Javascript as their programming language, and both use it as close to the metal as possible. http://www.espruino.com/Performance just javascript would be bad. espruino's custom javascript implementation is a lot worse than bad
|
# ? Mar 10, 2014 16:22 |
|
Bloody posted:too bad about the everything else everything else in java is pretty good too
|
# ? Mar 10, 2014 16:24 |
|
seiken posted:http://www.espruino.com/Performance jesus christ kill all web developers twenty bytes for a boolean ive done entire meaningful projects with 20 bytes of ram what the gently caress.
|
# ? Mar 10, 2014 16:26 |
|
i'm just gonna quote the whole thing, it's a cavalcade of comedyquote:Performance Notes
|
# ? Mar 10, 2014 16:28 |
|
On the Olimexino (a mid-range, 72Mhz device) a simple loop will toggle a pin at around 3kHz using code like this: while (1) { D14.set();D14.reset(); } im the twenty-four thousand cycles to do a two-statement while loop all to avoid writing: while(1) { PORTC_OUTTGL = PIN3_bm; }
|
# ? Mar 10, 2014 16:30 |
|
things they don't understand: - how an in circuit debugger actually works - what a map file is - how even very simple implementations of malloc for embedded environments work - that being able to toggle a pin at 3 khz in a tight loop on a 72 mhz device is not an accomplishment(!) - what "the metal" is - why every single decision they made here was a bad one, even if you accept their flawed premise of programming a microcontroller w/ javascript
|
# ? Mar 10, 2014 16:32 |
|
Bloody posted:im the twenty-four thousand cycles to do a two-statement while loop all to avoid writing:
|
# ? Mar 10, 2014 16:32 |
|
Mr Dog posted:gotta love c# enums. "Hey let's have a strongly-typed enum facility in our language that actually isn't strongly typed at all fart fart fart fart"
|
# ? Mar 10, 2014 16:36 |
|
Otto Skorzeny posted:i'm just gonna quote the whole thing, it's a cavalcade of comedy yeah, i was gonna quote some choice bits but then just gave up
|
# ? Mar 10, 2014 16:43 |
|
i was confused when i noticed that that article was hosted on their own website and not the website of somebody making GBS threads on them for having such hilariously bad ideas
|
# ? Mar 10, 2014 16:50 |
|
Otto Skorzeny posted:i'm just gonna quote the whole thing, it's a cavalcade of comedy jesus christ that is awful.
|
# ? Mar 10, 2014 16:53 |
|
tbf tiny tcl-like languages are p. neat in just doing sort of flexible command language pieces of embedded software, since the core of tcl (i.e. the literal "every single operation is a string replacement thing" part) takes a tiny amount of space and is p. decently high-level to work with asm+tcl is a legit combo, no reason to go to a tcl-style js though forth is p. still better though
|
# ? Mar 10, 2014 16:53 |
|
Otto Skorzeny posted:things they don't understand: if you have time it would be cool if you could trash their poo poo in detail cause idk gently caress about embedded but i think its rad
|
# ? Mar 10, 2014 16:58 |
|
Gazpacho posted:do you also complain that your toothbrush doesn't have a huge plug on the end of hte handle to keep you from jamming it down your throat Seems pretty obvious that enums should be int, how else would you use bitwise operators on them?
|
# ? Mar 10, 2014 17:03 |
|
Kevin Mitnick P.E. posted:if you have time it would be cool if you could trash their poo poo in detail cause idk gently caress about embedded but i think its rad Bloody posted:On the Olimexino (a mid-range, 72Mhz device) a simple loop will toggle a pin at around 3kHz using code like this:
|
# ? Mar 10, 2014 17:09 |
|
tbf OpenFirmware is basically this idea except done properly, with Forth instead of JS. Firmware programming in JavaScript is like anything programming in INTERCAL or BrainFuck. It's an entertaining little time-waster but lol @ using it for anything serious (these people are actually doing it unironically though which is just ) Also I think Intel's Galileo board thing isn't much better at GPIO. It has PCIe and XIP SPI and all that fun poo poo but all the GPIOs are broken out on an external I2C mux, I2C being the slowest serial protocol around other than RS232. They're really sweating bullets about x86 not being a growth sector any more huh.
|
# ? Mar 10, 2014 17:20 |
|
why would anyone capable of writing an embedded javascript vm want to seriously write embedded javascript
|
# ? Mar 10, 2014 17:53 |
|
quote:Espruino executes code directly from source
|
# ? Mar 10, 2014 18:09 |
|
HORATIO HORNBLOWER posted:that's very much "in production" even if the audience is internal rather than external. if your external product deserves to be written in a real language and with a maintainable process then your internal product does too. there's no excuse for using this poo poo anywhere except for utter laziness and a complete lack of care. if you're moving on to the next thing in a year and you feel nothing but spite for your fellow man who will have to deal with this garbage after you're gone go right ahead. but don't pretend it's ok because it's "just" part of your build process, as if that were something minor and inconsequential. lol u mad. you know there are people who make more than you do writing javascript also
|
# ? Mar 10, 2014 18:10 |
|
Otto Skorzeny posted:i'm just gonna quote the whole thing, it's a cavalcade of comedy does that include whitespace?
|
# ? Mar 10, 2014 18:14 |
|
prefect posted:does that include whitespace? quote:On the Olimexino (a mid-range, 72Mhz device) a simple loop will toggle a pin at around 3kHz using code like this:
|
# ? Mar 10, 2014 18:17 |
|
what does it mean to "toggle a pin", anyway? (yes i am dumb)
|
# ? Mar 10, 2014 18:22 |
|
actual pin on the chip going high/low
|
# ? Mar 10, 2014 18:24 |
|
prefect posted:what does it mean to "toggle a pin", anyway? (yes i am dumb) set it high then set it low repeatedly such that the output looks like a square wave
|
# ? Mar 10, 2014 18:25 |
|
it means change the pin from its current state to its other possible state
|
# ? Mar 10, 2014 18:28 |
|
holy poo poo that espruino thing makes me literally irl mad at the world
|
# ? Mar 10, 2014 18:28 |
|
|
# ? Jun 11, 2024 10:40 |
|
our runtime performance is lovely. on the plus side, it's consistently lovely!
|
# ? Mar 10, 2014 18:41 |