|
Malcolm XML posted:this is actually legit and serves everyone right for not using a language with precise standards can you even talk about race conditions without undefined behavior
|
# ? Jul 19, 2014 04:36 |
|
|
# ? Jun 11, 2024 18:55 |
|
Malcolm XML posted:someones making different assumptions about numeric precision Is this some matrix multiplying poo poo? Numerical stability matters.
|
# ? Jul 19, 2014 06:40 |
|
tef posted:moral: languages should expose ints and rationals, and not floats. you should have to ask to be hosed over by floating point Don't almost all languages worth half a gently caress come with some kind of Decimal of BigNum in the standard library if not something put together nicely from a third party?
|
# ? Jul 19, 2014 06:58 |
|
gently caress them posted:Don't almost all languages worth half a gently caress come with some kind of Decimal of BigNum in the standard library if not something put together nicely from a third party? no. as far as i can recall java was the first major language to have Decimal and BigNum in the stdlib. (and even then it still includes really dodgy painful platform-specific float behavior. a 'float' on x86 is different from 'float' on sparc) i'm sure you can dig up some forgotten research language that beat it to the punch, but the dominant choices at the time had fuckall. (c, c++, pascal, scripting languages) Notorious b.s.d. fucked around with this message at 07:05 on Jul 19, 2014 |
# ? Jul 19, 2014 07:03 |
|
Notorious b.s.d. posted:as far as i can recall java was the first major language to have Decimal and BigNum in the stdlib. (and even then it still includes really dodgy painful platform-specific float behavior. a 'float' on x86 is different from 'float' on sparc) and even that is slightly unfair since java started out doing that better than pretty much anything coming before it, as strictfp was the only mode up until 1.2, when it was complained about enough to just become an option
|
# ? Jul 19, 2014 11:24 |
|
JewKiller 3000 posted:here's john regehr on when he thinks undefined behavior is ok: http://blog.regehr.org/archives/748. anyone who wants a good overview of undefined behavior in C/C++ should follow the link in his first paragraph see I think you need to explicitly opt into undefined behavior like I'm totally fine with people turning on -ffast-math and dealing with non associative go math c is a stuck because neck beards won't let it evolve even when it's zero cost
|
# ? Jul 19, 2014 12:52 |
|
Everything hyped up to replace C is worse. If your C replacement requires any sort of runtime beyond "Set the stack pointer and call main then invoke the exit process syscall with the return value" or can't run on bare metal then it is a fail. Which is a shame because C could really do with multi-pass compilation, a module system, and the ability to directly control the layout of structures and unions. Also correct precedence rules for the bitwise operators would be nice. Obviously I'm not saying C is perfect, I'm saying for the sorts of things that C does C is still the best tool for the job. Please don't write your OS kernel in C++.
|
# ? Jul 19, 2014 14:15 |
|
Mr Dog posted:Everything hyped up to replace C is worse. why not just cause u need a tiny shim of assemby lang or C doesn't mean the entire loving thing needs to be written in C
|
# ? Jul 19, 2014 14:31 |
|
Mr Dog posted:Everything hyped up to replace C is worse. its possible to have a minimal runtime (i.e. literally 0 if u want https://github.com/charliesome/rustboot) in rust this comes at 0 cost, u still get the compile time memeory safety and lifetime checking C is still built on the assumption that the lovely microcontroller u r using is running the compiler
|
# ? Jul 19, 2014 14:40 |
|
why hasn't d taken off it seems like its good
|
# ? Jul 19, 2014 14:48 |
|
because its bad
|
# ? Jul 19, 2014 15:15 |
|
Dicky B posted:because its bad yeah it has gc which is a no-no
|
# ? Jul 19, 2014 15:19 |
|
i dont think gc is inherently bad even though i prefer smart pointers and stuff for automatic memory management. the problem with D is its not a big enough improvement over C++ to endure the garbage tools, small community and lack of momentum. it's just the same old poo poo with a cacophony of bells and whistles super glued to the sides. c++ is already heading in that direction now anyway so D is irrelevant
|
# ? Jul 19, 2014 15:49 |
|
ya but those forums tho
|
# ? Jul 19, 2014 16:33 |
|
did they ever decide which of the two competing standard libraries you should use?
|
# ? Jul 19, 2014 18:24 |
|
Dicky B posted:i dont think gc is inherently bad even though i prefer smart pointers and stuff for automatic memory management. the problem with D is its not a big enough improvement over C++ to endure the garbage tools, small community and lack of momentum. it's just the same old poo poo with a cacophony of bells and whistles super glued to the sides. c++ is already heading in that direction now anyway so D is irrelevant again i rly like rust for this role small, consistent, solves a lot of the issues that plague c++ has nice poo poo like real macros for webdev im big on cljs
|
# ? Jul 19, 2014 18:30 |
|
does rust have compilers targeting various embedded architectures
|
# ? Jul 19, 2014 18:47 |
|
can't even implement a doubly-linked list from scratch without unsafe code has a module/linking system that's actually harder to understand than C's lack of one
|
# ? Jul 19, 2014 18:49 |
|
rust has a compiler targetting llvm and sorta works with some arm or other, idk
|
# ? Jul 19, 2014 18:50 |
|
Vanadium posted:can't even implement a doubly-linked list from scratch without unsafe code c and c++ can't implement anything ever without unsafe code. is that really a disadvantage of rust?
|
# ? Jul 19, 2014 19:06 |
|
compared to Java and C# and lots of other languages, yes
|
# ? Jul 19, 2014 19:10 |
|
Kevin Mitnick P.E. posted:c and c++ can't implement anything ever without unsafe code. is that really a disadvantage of rust? just saying that the compile time lifetime checking comes with some pretty harsh restrictions, bare-metal rust isn't just C but safe somehow
|
# ? Jul 19, 2014 19:28 |
|
Vanadium posted:can't even implement a doubly-linked list from scratch without unsafe code lol whoosh implement a dll once then use it safely everywhere else the idea is to limit the amount of unsafe code to tiny ghettoes rather than littering pointer fuckery everywhere modern c++ rarely deals with raw pointers also the zinc project has some arm micros but it's limited to back ends llvm supports
|
# ? Jul 19, 2014 20:25 |
|
tbh if u want it on a tiny micro then I doubt it gonna go places but c on a tiny micro is barely better than asm anyway
|
# ? Jul 19, 2014 20:26 |
|
Malcolm XML posted:implement a dll once then use it safely everywhere else notably rust has a doubly linked list in the std lib already
|
# ? Jul 19, 2014 21:04 |
|
Malcolm XML posted:tbh if u want it on a tiny micro then I doubt it gonna go places but c on a tiny micro is barely better than asm anyway that's not remotely true. c on a uC is much better than writing asm (you'll have to read asm occasionally of course, if only to tell whether the bespoke gcc port with five end users or keil or whatever compiler you're using is generating something sane when questions come up, or whether memory mapped writes are actually taking place, etc). i take it you've never done either, forums user Malcolm XML
|
# ? Jul 19, 2014 21:05 |
|
Otto Skorzeny posted:that's not remotely true. c on a uC is much better than writing asm (you'll have to read asm occasionally of course, if only to tell whether the bespoke gcc port with five end users or keil or whatever compiler you're using is generating something sane when questions come up, or whether memory mapped writes are actually taking place, etc). i take it you've never done either, forums user Malcolm XML not in anger but the tiny stuff i made a tinyavr or whatever do wasn't much nicer than writing them in assembly maybe for the tiny but not that tiny microcontrollers it's better but they can afford better tools than c
|
# ? Jul 19, 2014 21:16 |
|
what tool better than c should i be using for my msp430, forums user malcolm xml
|
# ? Jul 19, 2014 21:57 |
|
Otto Skorzeny posted:that's not remotely true. c on a uC is much better than writing asm (you'll have to read asm occasionally of course, if only to tell whether the bespoke gcc port with five end users or keil or whatever compiler you're using is generating something sane when questions come up, or whether memory mapped writes are actually taking place, etc). i take it you've never done either, forums user Malcolm XML
|
# ? Jul 19, 2014 21:57 |
|
Otto Skorzeny posted:that's not remotely true. c on a uC is much better than writing asm (you'll have to read asm occasionally of course, if only to tell whether the bespoke gcc port with five end users or keil or whatever compiler you're using is generating something sane when questions come up, or whether memory mapped writes are actually taking place, etc). i take it you've never done either, forums user Malcolm XML
|
# ? Jul 19, 2014 22:18 |
|
i am starting to work with uCs and after looking at the options available for langs i already know (c++, c#, comedy option objc) i ended up deciding to just go with c if there is a better lang for me to use that doesn't have severe drawbacks (c++ has code size problems, c# is just lol) I'm all ears, I'm down to learn a new modern lang for this
|
# ? Jul 19, 2014 22:19 |
|
what sort of uCs
|
# ? Jul 19, 2014 22:20 |
|
arduino-compatible, basically just looking to make some clothes that sparkle and respond to midi/sound I'm using adafruit's flora
|
# ? Jul 19, 2014 22:24 |
|
have you considered using ruby motion
|
# ? Jul 19, 2014 22:29 |
|
USSMICHELLEBACHMAN posted:have you considered using ruby motion
|
# ? Jul 19, 2014 22:29 |
|
just use c, it is a good language and suitable for the task
|
# ? Jul 19, 2014 22:31 |
|
Bloody posted:what tool better than c should i be using for my msp430, forums user malcolm xml i once tried writing a backend for llvm msp430 base don the gcc backend but i ran away screaming use c or something that compiles down to c
|
# ? Jul 19, 2014 22:59 |
|
tractor fanatic posted:can you even talk about race conditions without undefined behavior it's possible to analyze these formally issuing eg tla+ or lvars I kinda think race conditions are usually chaotic as opposed to non deterministic but thatmdoesnt help much
|
# ? Jul 20, 2014 00:56 |
|
is there a thing like cweb for newer languages? i like the idea of being able to put latex in comments but i can't bear to use any language that doesn't have trivially easy string manipulation when i am off the clock
|
# ? Jul 20, 2014 01:00 |
|
|
# ? Jun 11, 2024 18:55 |
|
how is clang+llvm in the embedded ARM world now? i did some looking into it and it looks like a real pain to get a full toolchain together. i'm currently using gcc arm embedded and they bundle binutils, newlib, etc. into one package and it's alright. anyone doing something similar with llvm?
|
# ? Jul 20, 2014 02:49 |