|
Kevin Mitnick P.E. posted:because throws IOException is super useful and i totally know wtf is going on when i see it on a method same but return Either(Ok(value),Error(IOException)) e: hello new page, what's the actual difference between "() -> Either(Ok(T), Error(E))" and "() -> T throws E" isn't the latter sugar for the former?
|
# ? Aug 2, 2014 01:56 |
|
|
# ? Jun 11, 2024 07:46 |
|
the latter probably goes faster because T is smaller than a weird potentially nested algebraic type
|
# ? Aug 2, 2014 02:33 |
|
Kevin Mitnick P.E. posted:because throws IOException is super useful and i totally know wtf is going on when i see it on a method ioexceptions can maybe be retried a reasonable amount of times, but certain ones (ex: FileNotFoundException) are critical to handle so you can alert a hu-mon to fix the problem.
|
# ? Aug 2, 2014 02:55 |
|
Shaggar posted:ioexceptions can maybe be retried a reasonable amount of times, but certain ones (ex: FileNotFoundException) are critical to handle so you can alert a hu-mon to fix the problem. and if the method is declared throws IOException then you need to look at the javadoc or the source to determine whether it throws something you care about, which goes back to my original point. what you need to know isn't just some types that may be thrown, but also under what conditions. if you don't have both pieces you can't make an informed decision on whether to handle an exception or let it propagate. you have to look at the javadoc anyway Shinku ABOOKEN posted:same but return Either(Ok(value),Error(IOException)) the difference is javac is a prick about the latter
|
# ? Aug 2, 2014 03:48 |
|
last time exceptions came up we realized that a common ground should exist and that neither exclusively checked nor unchecked is the true correct approach
|
# ? Aug 2, 2014 04:13 |
|
the more i think about considerations when programming in large teams, the more i think the correct approach is intoxication
|
# ? Aug 2, 2014 04:17 |
|
Kevin Mitnick P.E. posted:the more i think about considerations when programming in large teams, the more i think the correct approach is intoxication same but more so for small teams
|
# ? Aug 2, 2014 04:30 |
|
checked exceptions are like mid-80s copy protection: what's the third word in the description of the third method in the javadoc? oh, ok, simon says you can compile. (btw, the exceptional condition might be something like "read to end of file", which is hardly an exceptional situation when reading a file.) why don't the Java standard collections use the better form and make checked exceptions propagate? that's pretty weak, given how central exception specifications are to Java API design.
|
# ? Aug 2, 2014 04:37 |
|
how does the pos feel about go it seems like it's the first general purpose language in a long goddamn time to have an original thought on how to program, except that the thoughts aren't original, except it's the people who came up with the ideas thirty years ago who are implementing it
|
# ? Aug 2, 2014 04:58 |
|
i like it practically but find its type system lacking
|
# ? Aug 2, 2014 05:23 |
|
Mr. Glass posted:i like it practically but find its type system lacking everyone who says that to the devs gets told that the types are barebones on purpose I've hosed around in it a little and didn't hate the types, just had to be slightly more careful I also think big fancy types systems are lame as h*ck
|
# ? Aug 2, 2014 05:25 |
|
im a big fan of collections that force you to cast to void*
|
# ? Aug 2, 2014 05:30 |
|
I abandoned a project once upon encountering void **** in internal API. I believe that code still runs in critical parts of many Linux distributions (rpm). (it also had delightful matching of specific package names/versions to tweak behavior, often long after rpm would no longer build on the system that used the package in question.)
|
# ? Aug 2, 2014 05:38 |
|
hmm.......perl is good, very good..hmm
|
# ? Aug 2, 2014 06:06 |
|
americong posted:hmm.......perl is good, very good..hmm
|
# ? Aug 2, 2014 07:03 |
|
b0lt posted:im a big fan of collections that force you to cast to void* basically this
|
# ? Aug 2, 2014 07:31 |
|
Soricidus posted:conversely, about three hours ago I helped a colleague track down a nasty bug in some dynamically-typed code that would have been detected immediately by a type checker. if this is python I'm really impressed because the opposite sounds a lot more likely to produce a silent bug (passing a list of strings to a function that expects a string).
|
# ? Aug 2, 2014 07:42 |
|
Subjunctive posted:why don't the Java standard collections use the better form and make checked exceptions propagate? that's pretty weak, given how central exception specifications are to Java API design. the impression I got was that java 8's development was a total clusterfuck and years and years late. like the syntax for lambdas was essentially decided sometime in 2009! I guess they must have always felt that java 8 was always only some 6-9 months from release; never close enough so you could have that final round of polish but also never so far away that you could entertain a completely different approach. to get the thing out the door meant that features just had to be dropped then there's the reasons for the lateness. apparently getting the type system working well with just one generic return value type and all it implies is really hard already. who knows if checked exceptions would fit into this type system at all? (well of course they would, but when...) also, having followed some compiler issues it looks very much like the standard compiler is providing more features and plain convenience than a careful reading of the standard should allow it. so before tackling exceptions you really should get that pesky type system fully worked out first. which is still really hard. or you nerf the compiler. which is really stupid and finally, this is the part I really like. it turns out that with these lazy functional stream processors designed first and foremost for efficient parallel computing where exceptions aren't meant to be handled at all, you strike a lot more gold than you even realize. the new way is better than the old collections way for many tasks it wasn't even designed for, but there's just no way a reworking of collections would fit into the java 8 schedule, so you do what you can and that's how we end up with the cart before the donkey and the jockey before that
|
# ? Aug 2, 2014 12:07 |
|
lambdas were supposed to be in 7 but people couldn't agree on the syntax. and my experience with parallelStream has been that it's about as useful as any other kind of parallelism fairy dust
|
# ? Aug 2, 2014 16:11 |
|
the borland turbo c source code to some old shareware game got posted on the internet, any way to get that to compile on a modern computer
|
# ? Aug 2, 2014 21:41 |
|
dosbox and the turbo c compiler
|
# ? Aug 2, 2014 21:53 |
|
do compilers work in dosbox? i would have thought they wouldn't work in an emulated environment that's not 100% identical to the real hardware for whatever reason
|
# ? Aug 2, 2014 22:02 |
|
Luigi Thirty posted:do compilers work in dosbox? i would have thought they wouldn't work in an emulated environment that's not 100% identical to the real hardware for whatever reason please mspaint your suspected differences relevant to a compiler
|
# ? Aug 2, 2014 22:14 |
|
americong posted:please mspaint your suspected differences relevant to a compiler i don't know i've never written a compiler i just use them mang it says "supports most opcodes and math isn't accurate without libc but good enough for games" maybe they're important opcodes!!!
|
# ? Aug 2, 2014 22:17 |
|
Luigi Thirty posted:i don't know i've never written a compiler i just use them mang it says "supports most opcodes and math isn't accurate without libc but good enough for games" maybe they're important opcodes!!! then write a compiler dipfuck it's worth your time
|
# ? Aug 2, 2014 22:57 |
|
sry on the first pass my compiler reduced your posting to 1
|
# ? Aug 2, 2014 23:12 |
|
Luigi Thirty posted:do compilers work in dosbox? i would have thought they wouldn't work in an emulated environment that's not 100% identical to the real hardware for whatever reason aaaahhhhhhhhhh i just can't with this
|
# ? Aug 2, 2014 23:48 |
|
sorry that i don't know how to write a compiler i guess!!!
|
# ? Aug 3, 2014 00:18 |
|
code:
|
# ? Aug 3, 2014 00:32 |
|
Luigi Thirty posted:sorry that i don't know how to write a compiler i guess!!! may b u should ask some1 how a compiler works and then u can write a compiler
|
# ? Aug 3, 2014 03:38 |
|
Luigi Thirty posted:sorry that i don't know how to write a compiler i guess!!! most compilers are cross compilers (i.e. the compiler is a program that can be compiled to run on architecture X but generate binaries for architecture Y, where sometimes X = Y but not necessarily) these days
|
# ? Aug 3, 2014 03:47 |
|
SAHChandler posted:may b u should ask some1 how a compiler works and then u can write a compiler but... how...did the first compiler... compile itself?
|
# ? Aug 3, 2014 04:04 |
|
Luigi Thirty posted:but... how...did the first compiler... compile itself? kill yourself, then consider that writing a functional compiler in machine code or assembler isn't really that hard, thanks
|
# ? Aug 3, 2014 04:06 |
|
americong posted:kill yourself, then consider that writing a functional compiler in machine code or assembler isn't really that hard, thanks that was sarcasm hence the keep right on being a belligerent rear end
|
# ? Aug 3, 2014 04:12 |
|
Luigi Thirty posted:that was sarcasm hence the keep right on being a belligerent rear end yospos bithc
|
# ? Aug 3, 2014 04:17 |
|
compilers are neat and I feel like a better person for having written one in school
|
# ? Aug 3, 2014 04:28 |
|
uncurable mlady posted:compilers are neat and I feel like a better person for having written one in school same
|
# ? Aug 3, 2014 04:30 |
|
my college was terrible and i wasted $20,000 on a program that didn't have me do that and it doesn't seem like a thing you should really try to teach yourself anyway the last time i was looking up something to do with assembly language i found a forum full of crazy people who are convinced microsoft is paying norton to delete programs compiled by MASM so that's my story Luigi Thirty fucked around with this message at 04:40 on Aug 3, 2014 |
# ? Aug 3, 2014 04:38 |
|
why not? you don't have to rewrite gcc from scratch or something to write "a compiler"
|
# ? Aug 3, 2014 04:45 |
|
|
# ? Jun 11, 2024 07:46 |
|
just read the aho sethi ullman book (or at least that's what mostly everyone does) and learn the baby subset of assembly you need honestly programmers should all have an understanding of assembly and other low level poo poo, or at least the relevant parts like locality
|
# ? Aug 3, 2014 04:55 |