|
Bloody posted:volatile makes it work yeah but i dunno i feel like it shouldn't be necessary in this case Subjunctive posted:this is like the classic example of when to use volatile: there's a mutation that's not visible to the control flow. otherwise it could never hoist any loads, it'd have to rematerialize every time through the loop, you would cry yourself to sleep, etc. yep volatile: "this value lives in memory and must be fetched each time" this is exactly where you're meant to use volatile fun fact: some bits in ruby c ext require volatile as not to let objects get gc'd, and i think php used it to fix floating point errors because intel fp registers have 80 bits
|
# ? Feb 6, 2015 16:18 |
|
|
# ? Jun 12, 2024 01:39 |
|
Blotto Skorzany posted:a stock photo (intended to be artsy by being out of focus and having an anachronistic subject) with some bloom applied and dumb text added but enough about your posting
|
# ? Feb 6, 2015 18:32 |
|
wrong thread but bump i guess
|
# ? Feb 7, 2015 23:52 |
|
your programming language is a piece of poo poo
|
# ? Feb 8, 2015 09:39 |
|
tef posted:yep this is an amazing feature of objective-c gc too, for basically the same reason except not just in ffi code but everywhere, surprise, have fun reasoning like a compiler tef posted:and i think php used it to fix floating point errors because intel fp registers have 80 bits this isn't supposed to be necessary but the language rules about using wider semantics are somewhat vague and compilers are generally pretty crappy about actually implementing them we didn't really care in llvm/clang until we realized how good fma formation is (it's really loving good)
|
# ? Feb 10, 2015 01:18 |
|
is it wrong to like clang because the entire reason it exists is to annoy stallman
|
# ? Feb 10, 2015 01:50 |
|
tef posted:is it wrong to like clang because the entire reason it exists is to annoy stallman that is the best reason it is not actually true but it is still the best reason
|
# ? Feb 10, 2015 02:03 |
|
when is the best reason ever true?
|
# ? Feb 10, 2015 02:13 |
|
what are RMS's thoughts on clang. just how much does it irritate him
|
# ? Feb 10, 2015 02:13 |
|
Deacon of Delicious posted:what are RMS's thoughts on clang. just how much does it irritate him for many years gcc's intermediate representation has been undocumented and deliberately made hard to use. the goal was to avoid letting proprietary frontends use gcc's compiler backend or vice versa clang and llvm exist so that was all completely pointless
|
# ? Feb 10, 2015 02:16 |
|
Deacon of Delicious posted:what are RMS's thoughts on clang. just how much does it irritate him https://gcc.gnu.org/ml/gcc/2014-01/msg00247.html
|
# ? Feb 10, 2015 02:28 |
|
i am both and NSA and an FBI agent, so i stopped reading after the foreword and now i'm off following snowden's example. did i miss anything
|
# ? Feb 10, 2015 02:37 |
|
quote:[[[ To any NSA and FBI agents reading my email: please consider ]]]
|
# ? Feb 10, 2015 03:08 |
|
Bloody posted:mods, all of this please wasnt snowden's example to inform the public about the egregious overstepping of boundaries and invasions of privacies being performed?
|
# ? Feb 10, 2015 03:08 |
|
rjmccall posted:that is the best reason
|
# ? Feb 10, 2015 03:21 |
|
thanks for the background info. i basically have the same question:tef posted:is it wrong to like clang because the entire reason it exists is to annoy stallman except i'm going to go ahead answer it "no, lol"
|
# ? Feb 10, 2015 03:33 |
|
Bloody posted:mods, all of this please cool idea
|
# ? Feb 10, 2015 04:57 |
|
Bloody posted:wasnt snowden's example to inform the public about the egregious overstepping of boundaries and invasions of privacies being performed? i think rms is probably referring to the running-away-to-china-and-then-russia part also the leaking millions of documents you haven't even read because you think there's probably bad stuff in them somewhere, that was a good example that everyone should follow
|
# ? Feb 10, 2015 19:25 |
|
Soricidus posted:also the leaking millions of documents you haven't even read because you think there's probably bad stuff in them somewhere, that was a good example that everyone should follow this but unironically
|
# ? Feb 10, 2015 19:55 |
|
Notorious b.s.d. posted:for many years gcc's intermediate representation has been undocumented and deliberately made hard to use. the goal was to avoid letting proprietary frontends use gcc's compiler backend or vice versa tbh possibly the least bad thing ever done in the name of freedom
|
# ? Feb 10, 2015 20:27 |
|
there was a time when that goal was sensible, and that time is long past
|
# ? Feb 10, 2015 21:43 |
|
well yeah because back in the days of GNU's early victories computers were niche nerd poo poo whereas these days lol if you think the beard and sandals brigade is going to be able to push back against the agenda of private interests w/ 100 billion dollars in the 90s the only real moneyed juggernaut in the technology space was microsoft and guess what, open sores poo poo was completely irrelevant in the desktop pc market during this time
|
# ? Feb 10, 2015 21:56 |
|
GNU's whole vision was based on Doug Engelbart and Ted Nelson being wrong
|
# ? Feb 10, 2015 22:21 |
|
Well chorded keyboards lost, so in your face Engelbart
|
# ? Feb 11, 2015 02:32 |
|
The documentation is the source code idiots
|
# ? Feb 11, 2015 03:31 |
|
https://blog.golang.org/errors-are-values here's an idiom that makes it incredibly easy to just blithely ignore errors. you should use this, even though the language has no support for this idiom, and the compiler will give you zero help in finding the places where you're missing error checks, and the idiom absolutely encourages you to execute arbitrary amounts of code after the failure site also check out this wicked insight: errors are values, checkmate motherfuckers but remember, always check for errors, because this is your problem and we can't do poo poo about it
|
# ? Feb 11, 2015 19:55 |
|
rjmccall posted:https://blog.golang.org/errors-are-values now that rust is semi stable is there any reason to use go at all
|
# ? Feb 11, 2015 20:06 |
|
same reasons you had to use go before rust was semi stable, they don't really compete
|
# ? Feb 11, 2015 20:07 |
|
there's no reason to use either op.
|
# ? Feb 11, 2015 20:32 |
|
Vanadium posted:same reasons you had to use go before rust was semi stable, they don't really compete so there was never a reason to use go, then?
|
# ? Feb 11, 2015 20:40 |
|
rjmccall posted:https://blog.golang.org/errors-are-values lol. nobody has come up with a better way to handle errors than exceptions and this garbage sure isn't it
|
# ? Feb 11, 2015 21:20 |
|
Golang faq posted:Why does Go not have exceptions? failing to open a file is just a boring old regular error, you don't want to use an exception for that. happens all the time
|
# ? Feb 11, 2015 21:22 |
|
To be fair, it doesn't really matter if poo poo programmers forget to handle the exception or not check the error code.
|
# ? Feb 11, 2015 21:31 |
|
it does though, that's the whole point of exceptions yolo an exception: ur application crashes immediately yolo a returned error: ur application stumbles around with half its head missing for a little while and then falls over dead somewhere else unrelated to the root cause of the problem
|
# ? Feb 11, 2015 21:36 |
|
goto fail
|
# ? Feb 11, 2015 21:37 |
|
I'm assuming if you don't handle the error and try to do something with the file it'll also crash? I do agree with you I'd probably enjoy a FileNotFoundException more than a random 'segmentation fault' but then I never understood why people would want to use Go anyway. Who needs a debugger, am I right?
|
# ? Feb 11, 2015 21:40 |
|
Mr Dog posted:it does though, that's the whole point of exceptions Crash early, crash often. Spin up again when something fatal happens.
|
# ? Feb 11, 2015 21:42 |
|
Tiny Bug Child posted:lol. nobody has come up with a better way to handle errors than exceptions and this garbage sure isn't it option types Peanut and the Gang posted:Crash early, crash often. Spin up again when something fatal happens. this is the other good answer but it is only good in certain applications, and is easily compatible with option types
|
# ? Feb 11, 2015 21:48 |
|
Arcsech posted:option types you don't need a fancy "type" system to return null when you run into a problem, and in any case that is in no way cleaner than throwing an exception
|
# ? Feb 11, 2015 21:51 |
|
|
# ? Jun 12, 2024 01:39 |
|
Option types isn't the one true God of exceptions. Copying a rant from an earlier page:MononcQc posted:I know your stance on exceptions in general, but what if you have different classes of exception handling mechanisms available for each of these cases? What about languages that may support exceptions, option types, tagged values, multiple return values, signals, continuations and/or whatever mix of them that exists?
|
# ? Feb 11, 2015 21:54 |