|
C++ is absurd and everything I learn about it makes me wonder why people ever spend time bashing any other programming language's design decisions the very, very first thing you learn in C++ is that it implements IO by overloading the binary shift operators I mean, what is this: Mr Dog posted:an rvalue is any expression that isn't an lvalue ???
|
# ? Sep 3, 2015 20:17 |
|
|
# ? Jun 3, 2024 00:20 |
|
something something clopen values
|
# ? Sep 3, 2015 20:21 |
|
keep a clopen mind
|
# ? Sep 3, 2015 20:22 |
|
rjmccall posted:they don't really act like c++ references, java object assignment copies the reference instead of (a slice of) the object. i completely sympathize with wanting a nonnull pointer type in c++, but thinking of c++ references that way is really dangerous, because it almost works as long as you're programming in a basically functional way, but as soon as you do an assignment, or worse an assignment of a struct containing a reference, you get in trouble bad wait... c++ references slice? i thought they were polymorphic like a pointer.
|
# ? Sep 3, 2015 20:23 |
|
qntm posted:the very, very first thing you learn in C++ is that it implements IO by overloading the binary shift operators I'm confused, is that supposed to be intrinsically bad?
|
# ? Sep 3, 2015 20:23 |
|
Bloody posted:i have literally no idea what this means or what it might even mean move semantics are a mess to reason about.
|
# ? Sep 3, 2015 20:25 |
|
qntm posted:C++ is absurd and everything I learn about it makes me wonder why people ever spend time bashing any other programming language's design decisions http://harmful.cat-v.org/software/c++/linus
|
# ? Sep 3, 2015 20:26 |
|
MALE SHOEGAZE posted:JavaScript is actually weirdly satisfying to program in provided you're not doing anything significant i like javascript when it stays in the browser. i've had a chance to do some neat stuff with it over the years. node is a poo poo show because on top of being run by 12 year olds it fundamentally misunderstands javascript's strengths and then builds a platform on top of that misunderstanding. i also think ES6 overcomplicates the language. i like my weird objects and have never needed nor asked for class inheritance.
|
# ? Sep 3, 2015 20:27 |
|
but its just sugar over the existing system right. i like es6 but class syntax is the thing i care the least about
|
# ? Sep 3, 2015 20:48 |
|
Dr Monkeysee posted:wait... c++ references slice? i thought they were polymorphic like a pointer. reference-initialization can bind to objects of subclasses, but assignment is resolved statically basically, if you're going to work with references, you have to understand the difference between initialization and assignment, because they are radically different
|
# ? Sep 3, 2015 21:03 |
|
The "nice" thing about JavaScript is Closure Hell. It's actually kinda neat. But then that's not unique to JavaScript, it's just that you kind of end up relying on it massively and I'm sure plenty of other languages do closure much better (like um, er... uh.... idk help me out here). Node.js does correctly identify JavaScript's strengths in that sense: it's built entirely around Closure Hell. And even so, Closure Hell is merely neat, it really does become hell if you try to build something substantial with it. Everything else sucks.
|
# ? Sep 3, 2015 21:03 |
|
Mr Dog posted:The "nice" thing about JavaScript is Closure Hell. It's actually kinda neat. But then that's not unique to JavaScript, it's just that you kind of end up relying on it massively and I'm sure plenty of other languages do closure much better (like um, er... uh.... idk help me out here). Node.js does correctly identify JavaScript's strengths in that sense: it's built entirely around Closure Hell. And even so, Closure Hell is merely neat, it really does become hell if you try to build something substantial with it. closure hell can be fun if you never need to edit or revisit the code in a meaningful way
|
# ? Sep 3, 2015 21:09 |
|
Do the newer versions of Javascript have call-with-current-continuation? I don't think a dynamic language is complete without it.
|
# ? Sep 3, 2015 21:15 |
|
es6 only has class syntax because in 2010 or whatever when it was being "finalized" every single framework their own classical object model implementation and it was a bad scene of course they then managed to create a class syntax that doesn't fit anyone's use-case due to the lack of annotations and property initializers, both of which now exist in es++/babel-land along with async/await and other exciting, new, arguably confusion-increasing syntax
|
# ? Sep 3, 2015 21:25 |
|
abraham linksys posted:hey, js is getting async/await soon-ish, so there's that this is a major Soon™ afaik. thankfully babel can transform-in a polyfill, but last i heard there isn't anyone actually working on getting it into a browser.
|
# ? Sep 3, 2015 23:17 |
|
sarehu posted:Do the newer versions of Javascript have call-with-current-continuation? I don't think a dynamic language is complete without it. yessum
|
# ? Sep 3, 2015 23:19 |
|
can someone pitch in and explain to me what a web worker is? it's presented as the major fundamental change in angular2's way of handling stuff. in presentations it looks amazing and logical, and it makes me wonder why no other javascript ever used more than one thread. is this some other kind of ~virtual DOM~ magic that isn't actually handled in a second thread in the browser? because the main question on my head after seeing it presented was "why isn't this everywhere already?"
|
# ? Sep 3, 2015 23:22 |
|
pepito sanchez posted:"why isn't this everywhere already?" browser development takes time
|
# ? Sep 3, 2015 23:25 |
|
i was gonna say "it's relatively newly supported" then i remembered most browsers had it in like 2012 and then "oh right IE"
|
# ? Sep 3, 2015 23:28 |
|
ultramiraculous posted:i was gonna say "it's relatively newly supported" then i remembered most browsers had it in like 2012 and then "oh right IE" mobile support is rough too tbh I don't know of a lot of great uses for web workers in the common web app, hadn't heard Angular 2 was adopting them until now. ServiceWorkers are neat, though
|
# ? Sep 3, 2015 23:30 |
|
jfc IE is always the thing dragging browsers behind. assuming most people are smart enough to not use IE, who is obligated to use IE? for work or whatever? even that can't be that high of a percentile edit: oh yeah forgot about native mobile browsers. gently caress them too
|
# ? Sep 3, 2015 23:32 |
|
not to get all shaggar up in here but Mobile Safari is holding the web back far more than IE at this point
|
# ? Sep 3, 2015 23:33 |
|
is is legacy edge is the future
|
# ? Sep 3, 2015 23:33 |
|
edge gonna be the first browser to implement async/await I look forward to their implementation ending up differing from the final spec and causing backwards-incompatible headaches and Microsoft dragging their feet on bringing it up to spec
|
# ? Sep 3, 2015 23:37 |
|
Malcolm XML posted:is is legacy ie has been legacy forever there are people developing web browsers today who weren't even in kindergarten when ie started being legacy
|
# ? Sep 4, 2015 00:19 |
|
Soricidus posted:ie has been legacy forever makes u think
|
# ? Sep 4, 2015 00:23 |
|
closures are only hell in javascript because the values you're closing over are mutable
|
# ? Sep 4, 2015 00:41 |
|
has anyone really profiled any common use cases for web workers in mvc stuff? not like computation-wise, but just like angular in general using it, would you actually see any real performance benefits?
|
# ? Sep 4, 2015 00:49 |
|
piratepilates posted:has anyone really profiled any common use cases for web workers in mvc stuff? supposedly it improves performance a lot in angular2 but i'm just as curious. angular 1.x doesn't use it because that's not angualr 1.x. i don't think anything else at all has implemented a web worker yet except maybe some rare node.js cases where ES6 is enabled? i'd like to see performance benefits too. but the fact that you can have a js presentation layer on a separate thread from everything else is just cool and good.
|
# ? Sep 4, 2015 01:06 |
|
IE is the best tablet browser though.
|
# ? Sep 4, 2015 01:41 |
|
Web Workers seems like a profoundly bad thing to be using for just a dumb UI toolkit JavaScript's good at doing overlapped async stuff thanks to Closure Hell, why throw that all away and put actual concurrency in
|
# ? Sep 4, 2015 03:48 |
|
assuming Angular 2 still has a $digest cycle, they could theoretically do virtual DOM updating (does Angular do DOM diff? don't remember) in a worker then send a batch of DOM updates back to the main thread, but I have no idea if this would actually be any more efficient like if it is the theoretical gain is that if you had a very long re-render cycle you could still accept user interaction during that time and not block the UI thread execution. not actually sure that's A Thing in practice though e: I actually might be completely misremembering how $digest works fwiw, been like two years since I touched Angular abraham linksys fucked around with this message at 03:56 on Sep 4, 2015 |
# ? Sep 4, 2015 03:53 |
|
it might help if the main js engine is jammed up with ad network crap or something?
|
# ? Sep 4, 2015 04:08 |
|
Mr Dog posted:JavaScript's good at doing overlapped async stuff thanks to Closure Hell, why throw that all away and put actual concurrency in because this is pretty much the one thing in theory a js framework could actually help make easy for a good reason? you know, usability where instead you'd have lines upon lines of dynamic functional shitcode in pure ES6 (this is javascript). i don't get your point. so researching, web workers have been out for some time, but all we get are hello-world-like examples from what i've seen (sum/fibonacci stuff). it's not being used. am i really the only one in yospos thinking it's cool angular2 is taking serious advantage of this poo poo as much as possible?
|
# ? Sep 4, 2015 04:22 |
|
ultramiraculous posted:it might help if the main js engine is jammed up with ad network crap or something? DOM changes can only be done on the main thread, ad network crap will always be on the main thread, all of your angular stuff will just be on the other thread waiting to post a message back to your main thread to actually interact with the user in any way so it probably wouldn't be useful at all edit: i'm pretty sure google, apple, and amazon are waging a war against bad ad injection right now, mostly by telling them to go gently caress themselves and swinging around their weight piratepilates fucked around with this message at 04:35 on Sep 4, 2015 |
# ? Sep 4, 2015 04:30 |
|
piratepilates posted:DOM changes can only be done on the main thread, ad network crap will always be on the main thread, all of your angular stuff will just be on the other thread waiting to post a message back to your main thread to actually interact with the user in any way so it probably wouldn't be useful at all but it's worth noting the angular2 team has been working with the react team, not just for the native iOS stuff (react native) but also for the ability to route views from the backend ala reflex. or did i get that wrong?
|
# ? Sep 4, 2015 04:38 |
|
a guy wrote a threaded version of the elm runtime using webworkers as an experiment a while back. i dont know if it was just his implementation or not, but it didnt really seem to be a massive boost in performance.
|
# ? Sep 4, 2015 05:46 |
|
but back then i think you could only send strings or typedarrays to and from webworkers
|
# ? Sep 4, 2015 05:50 |
|
qntm posted:the very, very first thing you learn in C++ is that it implements IO by overloading the binary shift operators right?! I thought I was was the only one bothered by that "and here we bitshift "hello world" into something called "cout" wtf
|
# ? Sep 4, 2015 07:00 |
|
|
# ? Jun 3, 2024 00:20 |
|
piratepilates posted:has anyone really profiled any common use cases for web workers in mvc stuff? how are you guys managing to write webpages with performance issues
|
# ? Sep 4, 2015 07:01 |