Powerful Two-Hander posted:babby two hander coming on the scene. Congratulations! I hope they either learn to make equally entertaining posts, or a better job selection strategy (Seriously thanks for your stories, they've brought me and the off-site friends I send them to a lot of joy)
|
|
|
|
|
|
| # ? Dec 6, 2025 00:56 |
|
DrPossum posted:just go read the code pls dont advocate self harm
|
|
|
|
Osmosisch posted:Congratulations! I hope they either learn to make equally entertaining posts, or a better job selection strategy oh no I didn't realise people were actually reading my posts, how embarrassing there's poop everywhere, nothing approaching coherent language and the screaming doesn't stop so basically parenting is just like using javascript
|
|
|
|
Powerful Two-Hander posted:oh no I didn't realise people were actually reading my posts, how embarrassing +
|
|
|
|
DrPossum posted:
spring is certainly bloated and fairly complex, but so is any other framework once you start adding features you actually need regarding java though, i really hope they get project loom out the door sooner rather than later because the true garbage is reactive programming. async/await in general is loving garbage but on the JVM Rx is garbage. Webflux is garbage. Kotlin coroutines are garbage.
|
|
|
|
Plorkyeran posted:i graduated over a decade ago and almost all of my classes which involved writing code for homework required using svn. whatever was committed to your repo at the homework deadline was the thing that got graded. one class did literally have "did you run the auto-formatter?" as part of the homework grade. there were a few which automatically ran the test suite which you had to pass each time you committed something to svn. This but git & gitlab when I was teaching.
|
|
|
|
I'm kidding of course, children grow up and mature, js does not. this library (setCola) is actually really neat though, it applies ontop of the equally cool cola js plugin for d3 and lets you express constraints on a graph without having to hand janitor positions which is essential if you're generating a directed graph dynamically and don't know the size or layout in advance (and can't easily compute it because the graph build zig zags up and down the tree) this is actually really just a stubborn side project to generate visual models of our reference data which is way harder than it seems because of the graph size being so variable (e.g. for two entities you might get 100 nodes within 3 hops or 500), also nodes can have multiple incoming/outgoing links to each other so a top down tree just doesn't cut it.
|
|
|
|
speaking of jobs, lmao
|
|
|
|
code:
|
|
|
|
Powerful Two-Hander posted:speaking of jobs, lmao does it just return status 451
|
|
|
|
async/await should only be used in user interfaces, or perhaps in the implementation of an http or websocket deframer. If you are going to turn a call stack into a heap allocated call tree then maybe think carefully about whether or not this is a good idea.
|
|
|
|
hobbesmaster posted:does it just return status 451 idk about you but it's giving me a 413 ![]() e: or maybe actually
|
|
|
|
Powerful Two-Hander posted:idk about you but it's giving me a
|
|
|
|
quote:idk about you but it's giving me a 411
|
|
|
|
PokeJoe posted:Java...is good It's pretty okay OP. I like being paid money for coding in it.
|
|
|
|
DrPossum posted:also spring is loving garbage spring services were a beacon of sanity in Amazon Fulfillment, which was otherwise built on a morass of C++97 whims
|
|
|
|
and they weren't even using the REST parts of spring, just the dependency injection and hibernate
|
|
|
|
Sapozhnik posted:async/await should only be used in user interfaces, or perhaps in the implementation of an http or websocket deframer. Async and await are the worst. I don't understand what's so hard about either making two functions, one that blocks and then one with a callback. You could even just make it a single function that takes a nullable function as the callback. I end up just writing await x = await y = await blahgarbage I fail to see how this is better. But I fail to see a lot so it may just be me.
|
|
|
|
darkforce898 posted:Async and await are the worst. I don't understand what's so hard about either making two functions, one that blocks and then one with a callback. You could even just make it a single function that takes a nullable function as the callback.
|
|
|
|
Because then you end up with an incomprehensible mess of endlessly nested callbacks, async/await was a direct response to what you are proposing. Instead of writing code:code:The problem is that a bunch of languages have an "async/await" syntax, and the syntax is usually more or less the same but the actual underlying concurrency model in each language is completely different. JavaScript uses promises, Python I think uses generators, Rust uhh... I think uses promises but different in that they don't actually start executing until you tug on the result of the outermost asynchronous function. Sapozhnik fucked around with this message at 23:34 on Oct 17, 2021 |
|
|
|
swift is adding async/await and I don't really care syntactically, but the task stuff that came with it looks a+ also clang can now warn when your objc method doesn't call a completion block on all code paths and that is an excellent feature
|
|
|
|
swift async/await is great for ui/mainactor stuff but every example of using it that i've seen which doesn't involve that has just made me go "that could have just been a normal synchronous function call"
|
|
|
|
Why do I have to explicitly mark it synchronous. All of programming ever has been synchronous. If you have a bunch of lines in a row that are synchronous then why not reverse it. I would much rather explicitly mark my ui stuff as non blocking instead of having to make every single backend call blocking
|
|
|
|
what do you mean by "explicitly mark it synchronous"? that's not at all what await does, and i'm not sure what else you could be referring to
|
|
|
|
darkforce898 posted:Why do I have to explicitly mark it synchronous. All of programming ever has been synchronous. If you have a bunch of lines in a row that are synchronous then why not reverse it.
|
|
|
|
Django > Spring. If you aren’t inheriting a Spring project there is no reason to choose it over Django unless you like pain.
|
|
|
|
sure, i'm just gonna choose to use python when not absolutely required
|
|
|
|
redleader posted:sure, i'm just gonna choose to use python when not absolutely required As you should. It’s far better than Java.
|
|
|
|
no its not. its also a pointless comparison cause c# and asp.net are better than both by miles
|
|
|
|
DoomTrainPhD posted:Django > Spring. If you aren’t inheriting a Spring project there is no reason to choose it over Django unless you like pain. django is a nice project but still suffers from way too many runtime errors like all python programs
|
|
|
|
Shaggar posted:no its not. its also a pointless comparison cause c# and asp.net are better than both by miles but sure if at some point my application is running the risk of becoming too performant or too multi-core saturating I'll try python then Sagacity fucked around with this message at 07:22 on Oct 18, 2021 |
|
|
|
Sagacity posted:I wouldn't go that far, but it's definitely miles better than python and django. C# and asp.net have been doing a few too many reboots of their stack over the years though, perhaps i will revisit once things settle down a bit. the strong backwards compatibility is something I enjoy in java. lol Microsoft is just loving reboots all the way down forever
|
|
|
|
Sapozhnik posted:Because then you end up with an incomprehensible mess of endlessly nested callbacks, async/await was a direct response to what you are proposing. code:
|
|
|
|
Async await is code:Wow many processes fast code best devs
|
|
|
|
i never dug into exactly why, but among all the other crap asp.net core ‘borrowed’ from node/express is the inability to just write synchronous request handlers. direct translation from asp.net into netcore runs like poo poo under load unless you also change all your db calls from xyz() to await xyzAsync()
|
|
|
|
yeah backend async/await is bad in most situations, don't use it in user interfaces it's nice tho
|
|
|
|
Plorkyeran posted:swift async/await is great for ui/mainactor stuff but every example of using it that i've seen which doesn't involve that has just made me go "that could have just been a normal synchronous function call" Sapozhnik posted:yeah backend async/await is bad in most situations, don't use it you're the second guy that says that async should stay in ui land and backend code should be synchronous and it baffles me like, don't you ever send emails from your backend (with or without an email service)? you don't upload files? you don't run complex queries that take a second or more from your dedicated database server? do you just buy the biggest 512-core server your employer's money can buy and let half of those threads spin while waiting for the external service to complete the request?
|
|
|
|
NihilCredo posted:do you just buy the biggest 512-core server your employer's money can buy and let half of those threads spin while waiting for the external service to complete the request? so just have a big thread pool per core, no muss no fuss it may not be 100% optimal but I would argue that most async (async/await or, worse, "reactive") code that is currently being deployed is broken in edge cases and generally non-trivial to develop and debug and whenever loom is available for the JVM your normal threaded code suddenly will run just like when it was async/await code, with none of the terrible developer experience Sagacity fucked around with this message at 13:52 on Oct 18, 2021 |
|
|
|
if your front end action should block then it should be async on the front end to wait for the appropriate event and your backend doesn't need to be async because the front end has to wait anyway, if your frontend action doesn't block then applying async on the backend doesn't achieve anything anyway because you don't care when the task returns if you've then somehow run out of cores/threads then you probably need a task queuing system instead
|
|
|
|
|
| # ? Dec 6, 2025 00:56 |
|
You gotta do it in node because there's only one usable thread
|
|
|










+



















