|
how do people actually learn c++ in tyool 2017, and how on earth can they have any confidence that the code they wrote is correct? it seems like such a minefield of weird minutiae that also has odd edge cases that can shoot your leg offNihilCredo posted:the f#/fable stack is pretty well positioned b/c of code reuse between frontend and backend [screaming internally]
|
# ? Nov 28, 2017 02:32 |
|
|
# ? Jun 4, 2024 19:59 |
|
nobody learns all of c++, there is just too much of it to know everything. each new feature you start using in your code provides more cost than benefit, because it will have unforeseen bad interactions with other features, due to reasons that could only ever apply to c++. therefore, the strategy is to select a minimal subset of c++ which suits your problem space, and stick to it rigidly, with a coding style guide that has been very carefully thought out by senior developers. this will make it manageable to work in. of course, when you leave that company and join another, they will have chosen a different subset, and you get to learn the language you supposedly knew all over again! sounds great huh
|
# ? Nov 28, 2017 02:37 |
|
also i'd like to add a double gently caress-you for linking me to that thread, i tried to talk to that dude just to let him know what was up and it was a huge, frustrating waste of time
|
# ? Nov 28, 2017 02:58 |
|
redleader posted:[screaming internally] why, do you enjoy writing every input validation rule twice?
|
# ? Nov 28, 2017 03:11 |
rjmccall posted:decltype is dumb, lambda captures are dumb, go gently caress yourself Wow, all this behavior is completely surprising to me. I would have guessed that decltype(x) and decltype((x)) were exactly the same, and that decltype(x) would only work if x was in scope (and thus wouldn't work at all if x was not captured). Although I suppose if there are two things I've learned in C++, it's (1) expect the unexpected, and (2) rjmccall posted:msvc is lol
|
|
# ? Nov 28, 2017 03:16 |
|
rjmccall posted:also i'd like to add a double gently caress-you for linking me to that thread, i tried to talk to that dude just to let him know what was up and it was a huge, frustrating waste of time you're very welcome
|
# ? Nov 28, 2017 03:26 |
|
gonadic io posted:the good parts of scala are just a more modern java. it suffers from the yoke of jvm compatibility, but java 8's attempt to takc some crapt onto an ancient language are horrible and (the good parts of scala) solve that problem by reducing boilerplate, having immutable-by-default functions, better support for map/filter/fold, laziness, etc etc. this is what i'm hoping for from kotlin, i've not actually ever used it. i agree with all your points but i really find scala super pleasurable to program in. really really enjoying it lately. programming with typeclasses is very nice although I wish it were more of a first class concept (I suppose you could argue that context bounds make them a first class feature but the implementation by way of implicits is awkward and took me a while to understand). i just loving love type systems. whenever I go back to a dynamic language I get really frustrated. DONT THREAD ON ME fucked around with this message at 03:44 on Nov 28, 2017 |
# ? Nov 28, 2017 03:41 |
|
MALE SHOEGAZE posted:i just loving love type systems. whenever I go back to a dynamic language I get really frustrated. As is right and proper.
|
# ? Nov 28, 2017 04:36 |
gonadic io posted:tl;dr cheers
|
|
# ? Nov 28, 2017 05:33 |
|
DELETE CASCADE posted:the problem with non-poo poo-language-to-js compilers is not technical but social. such compilers have existed for years, but there's still a critical mass of javascript developers in webshit land. new developers could learn the goodlang instead, but they don't, they learn javascript, because it's the lingua franca of webdev, and they can get a job doing it, and sure they'll hate their miserable lives, but if they didn't want to feel that way 24/7 they wouldn't be doing frontend. that's why people like typescript, because you can gradually start to write js with the occasional var:type and suddenly half your bugs are gone and you didn't have to hire a new team or waste time retraining a lot of dumb javascript poo poo is just not amenable to typescript's or flow's type system. the compile-time guarantees just aren't there. and after compile time static type system is a distant memory, kind of by definition really. i mean it's still better than nothing but it drives me up the wall when i occasionally try to do something obviously nonsensical and the type checker just smiles and nods because hey guess what the inferred type of half your poo poo ended up being "any"
|
# ? Nov 28, 2017 05:55 |
|
MALE SHOEGAZE posted:
Absolutely same. I work in Scala, and don't hate doing so. Have you done much in f# or rust or haskell or ocaml? It's always nice to get some context/comparisons
|
# ? Nov 28, 2017 07:15 |
i like the idea of static-esque type systems, but i dont think ive worked in anything with them. i dont remember what type system pascal had, and i barely remember anything from delphi or that after-hours c++ class i took in 8th grade
|
|
# ? Nov 28, 2017 07:32 |
|
they are good and easy and often intuitive
|
# ? Nov 28, 2017 07:47 |
redleader posted:they are good and easy and often intuitive i just really like the idea of computer yelling "bad mushroom" when i try to change encoding of a floating point number to utf-8 or something
|
|
# ? Nov 28, 2017 07:49 |
not that python doesn't do that being *sweating* strongly typed, for instance, but input validation and poo poo is a chore that should be just circumvented with whatever f# does where you make a 5 line custom class that is a natural number or whatever
|
|
# ? Nov 28, 2017 07:51 |
forcing ints to be such is also cool
|
|
# ? Nov 28, 2017 07:52 |
|
Objective-C really does hit a sweet spot when it comes to explicit types and dynamic dispatch:
sure Swift has all sorts of things like “real” generics, algebraic data types, a choice between static and dynamic dispatch, and much, much stricter typing, but almost all of the above was supported in ObjC 10 years ago and most of it was supported 20+ years ago
|
# ? Nov 28, 2017 08:58 |
|
cinci zoo sniper posted:not that python doesn't do that being *sweating* strongly typed, for instance it’s nicer when the computer yells at you the moment you type the wrong code, instead of waiting till it’s three hours into a complicated computation, probably in prod because you wrote the wrong tests pycharm does pretty well these days with what it’s got but static analysis of dynamically typed code is always going to have limitations
|
# ? Nov 28, 2017 10:03 |
Soricidus posted:it’s nicer when the computer yells at you the moment you type the wrong code, instead of waiting till it’s three hours into a complicated computation, probably in prod because you wrote the wrong tests yeah i use pycharm. thankfully so far my things break early into tests, and i dont maintain or develop any prod solutions (yet)
|
|
# ? Nov 28, 2017 11:14 |
|
even more important as codebases grow and code ages the lack of type information tends to make interfaces and abstractions, the code in general really, inscrutable it can be hard enough to make sufficient sense of an old java codebase to be able to fix it or add some functionality to it, and java tends to be a best-case (the type system is not the strongest, but the conventions are so well established that you seldom run into something truly weird). in e.g. python it can quickly turn impossible
|
# ? Nov 28, 2017 11:16 |
|
eschaton posted:Pepperidge Farms remembers Green threads are cooperative threads effectively, I'm not sure what using MacOS's version of those instead would have brought to the table. Early Java on Solaris used green threads, too. If you want to have lots and lots of threads, they're a lot more lightweight than native threads, especially Solaris' back then, and if you don't have multiple CPUs/cores native threads aren't actually buying you that much. Also, can be easier to implement (on the one hand you gotta use async I/o everywhere, on the other your JVM/runtime/native code doesn't have to be native-threadsafe)
|
# ? Nov 28, 2017 11:27 |
|
feedmegin posted:Green threads are cooperative threads effectively, I'm not sure what using MacOS's version of those instead would have brought to the table. “green threads” means a user space rather than OS threads implementation it doesn’t necessarily mean cooperative, though most implementations are because LOL at implementing context switching with signal and setjmp/longjmp
|
# ? Nov 28, 2017 11:48 |
|
what makes them green anyways?
|
# ? Nov 28, 2017 13:09 |
|
Shinku ABOOKEN posted:what makes them green anyways? a bit surprised to find that it apparently originated with the jvm, the original java team being known as the "green team". i thought for sure the term was older than that, user-space thread implementations after all are, but the java library name stuck
|
# ? Nov 28, 2017 13:54 |
|
eschaton posted:it doesn’t necessarily mean cooperative, though most implementations are because LOL at implementing context switching with signal and setjmp/longjmp LOL indeed
|
# ? Nov 28, 2017 17:51 |
|
one thing that bothers me about swift is that when you install it on ubuntu you need to install python-dev for it to run but the docs doesn't say it https://swift.org/download/#linux yes I'm pedantic yospos birch
|
# ? Nov 28, 2017 18:20 |
|
cinci zoo sniper posted:i just really like the idea of computer yelling "bad mushroom" when i try to change encoding of a floating point number to utf-8 or something except maybe not mushroom
|
# ? Nov 28, 2017 20:00 |
|
Sapozhnik posted:a lot of dumb javascript poo poo is just not amenable to typescript's or flow's type system. the compile-time guarantees just aren't there. and after compile time static type system is a distant memory, kind of by definition really. you are correct, and the best solution is to let really smart people like anders keep making the type system even more powerful, so it can represent those patterns
|
# ? Nov 29, 2017 00:30 |
|
Symbolic Butt posted:one thing that bothers me about swift is that when you install it on ubuntu you need to install python-dev for it to run but the docs doesn't say it https://swift.org/download/#linux file a
|
# ? Nov 29, 2017 00:45 |
|
DELETE CASCADE posted:you are correct, and the best solution is to let really smart people like anders keep making the type system even more powerful, so it can represent those patterns eh maybe. i know nothing about plt something that comes up a lot is a table of handlers for various kinds of event, where events are things that have a string field called "type". in plain vanilla hurf durf javascript you just write something like eventHandlers[eventType] = handlerFn; and then you dispatch to a handler by writing something like eventHandlers[event.type](event); you cannot statically type that second expression; there is no way to express the necessary invariants using any js type checker's type system. alternatively, consider something like redux-saga. you do your background io in a generator. which is a coroutine that gets periodically resumed by the redux-saga runtime, and said coroutine yields various io effect objects back to the runtime telling it to do various asynchronous io things, then resume the coroutine with their results when they are complete. this is pretty cute because you can test it easily: instead of faking all the stuff that your async io code wants to talk to you just run the coroutine and check that it generates a stream of the correct actions, feeding it sensible consequences of those actions in your test fixture. but you can't type that either: for a given effect type E the run time is going to yield back some result type R. how do you assert that correspondence to the type system and make it enforce that upon the implementation of the runtime? this sort of thing already makes my head hurt but this is probably the point where haskell people come out and go "you are like a little baby, watch this"
|
# ? Nov 29, 2017 05:34 |
|
a witch posted:Vectors and StringBuffers still haunt a lot of codebases The code base I currently work in uses Vectors in it's Struts 1.3 view layer. This is the view for an Stateless EJB 3.0 layer so Luckily that view is getting binned in favour of a REST driven front end.
|
# ? Nov 29, 2017 17:16 |
|
i feel like i'm programming with my toes when i'm forced to use a lang that doesn't have pattern matching. it's so good
|
# ? Nov 30, 2017 02:22 |
|
the talent deficit posted:i feel like i'm programming with my toes when i'm forced to use a lang that doesn't have pattern matching. it's so good i like that expression and ya.
|
# ? Nov 30, 2017 03:05 |
|
perrible toegrammer thread
|
# ? Nov 30, 2017 03:10 |
|
eschaton posted:perrible toegrammer thread yes please the current name blows
|
# ? Nov 30, 2017 03:20 |
YOSPOS > terrible programmers: toegrammer parables
|
|
# ? Nov 30, 2017 03:52 |
|
YOSPOS: Which thread is the terrible programmer thread? You decide! They're all the terrible programmer thread
|
# ? Nov 30, 2017 03:58 |
|
toejam and perl
|
# ? Nov 30, 2017 04:02 |
|
MALE SHOEGAZE posted:toejam and perl
|
# ? Nov 30, 2017 08:03 |
|
|
# ? Jun 4, 2024 19:59 |
|
Sapozhnik posted:eh maybe. i know nothing about plt maybe not currently, but it sounds like a basic sum type (tagged union), where instead of a string field you enumerate the event types Sapozhnik posted:alternatively, consider something like redux-saga. i will not
|
# ? Nov 30, 2017 08:07 |