Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


our "development transformation team" are really big on pushing deployment automation because they think we're spending a lot of time doing it and were genuinely surprised when I said "not really. I just click publish in visual studio and it's done in like 2 minutes", maybe they're just getting gaslit by other teams idk

and ofc when it comes to production, deployment is handed off to some other team doing it all manually because "automated production deployment is not allowed for applications with this specific classification", and it takes a bunch of paperwork to even get that far

Adbot
ADBOT LOVES YOU

my homie dhall
Dec 9, 2010

honey, oh please, it's just a machine

TwoDice posted:

call me when your OS is happy with 100k runnable threads

your OS will not be happy, but OS threads are a lower level of abstraction than you should be considering. there's no reason why you can't have N >>>> number-of-OS-threads concurrent tasks all scheduled.

to take your example, BEAM handles 100k processes without an issue. Coroutines on a threadpool in python are way worse, but are also fine to use for large numbers of concurrently executing (io-bound) tasks. hopefully loom can do something similar for Java.

OS threads are for your runtime to deal with, not you

TwoDice
Feb 11, 2005
Not one, two.
Grimey Drawer

my homie dhall posted:

your OS will not be happy, but OS threads are a lower level of abstraction than you should be considering. there's no reason why you can't have N >>>> number-of-OS-threads concurrent tasks all scheduled.

to take your example, BEAM handles 100k processes without an issue. Coroutines on a threadpool in python are way worse, but are also fine to use for large numbers of concurrently executing (io-bound) tasks. hopefully loom can do something similar for Java.

OS threads are for your runtime to deal with, not you

yeah coroutines and green threads whip rear end

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
its funny how they completely agreed with you while missing the point

FlapYoJacks
Feb 12, 2009
Today I interviewed someone who got through an initial interview with management for an embedded Linux development position.

He doesn’t know what Buildroot or Yocto is.
Didn’t know basic shell commands such as cat/cut/sed
Didn’t use tab completion

How did he get to round two of interviews? :psyduck:

hobbesmaster
Jan 28, 2008

so uh is that job remote by chance

my homie dhall
Dec 9, 2010

honey, oh please, it's just a machine

TwoDice posted:

yeah coroutines and green threads whip rear end

ah, my b, I thought this was in defense of "why you shouldn't kick off a handler per request"

Sapozhnik
Jan 2, 2005

Nap Ghost

hobbesmaster posted:

so uh is that job remote by chance

darkforce898
Sep 11, 2007

TwoDice posted:

yeah coroutines and green threads whip rear end

Ok, showing my ignorance here.

Is there a good primer on coroutines and green threads for C or maybe C++?

12 rats tied together
Sep 7, 2006

greenlets are primarily used by python event loops but since python is just a fancy c macro language they have a C API https://greenlet.readthedocs.io/en/latest/c_api.html. the other documentation on this website has good words about them

TwoDice
Feb 11, 2005
Not one, two.
Grimey Drawer

darkforce898 posted:

Ok, showing my ignorance here.

Is there a good primer on coroutines and green threads for C or maybe C++?

https://cr.openjdk.java.net/~rpressler/loom/Loom-Proposal.html this is for java but the motivation section is basically the same for any language

Share Bear
Apr 27, 2004

12 rats tied together posted:

greenlets are primarily used by python event loops but since python is just a fancy c macro language they have a C API https://greenlet.readthedocs.io/en/latest/c_api.html. the other documentation on this website has good words about them

i have a presentation about this to do this week and just threw that in there as it is news to me, but will likely make other more experienced devs happy

TheFluff
Dec 13, 2006

FRIENDS, LISTEN TO ME
I AM A SEAGULL
OF WEALTH AND TASTE
i am so loving sick of golang. want a set? no, you can't have that, that's too complex. just use a dictionary with all the values set to boolean true. what, intersection? what is that???

even loving javascript has had a set type for many years at this point, jfc

jesus WEP
Oct 17, 2004


TheFluff posted:

i am so loving sick of golang. want a set? no, you can't have that, that's too complex. just use a dictionary with all the values set to boolean true. what, intersection? what is that???

even loving javascript has had a set type for many years at this point, jfc
:wtc:

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

TheFluff posted:

i am so loving sick of golang. want a set? no, you can't have that, that's too complex. just use a dictionary with all the values set to boolean true. what, intersection? what is that???

even loving javascript has had a set type for many years at this point, jfc


edit: Golang, the language made because its authors found their juniors had too hard a time grasping the concept of a set

animist
Aug 28, 2018
i would like fututes better if people actually built them into compilers instead of forcing you to manually plumb continuations by hand. I want stack traces more than 2 frames deep. Futures feel like a mediocre compromise usually, at least in JS and Rust which is where I've mostly used them.

animist fucked around with this message at 15:12 on Oct 21, 2021

mystes
May 31, 2006

animist posted:

i would like fututes better if people actually built them into compilers instead of forcing you to manually plumb continuations by hand. I want stack traces more than 2 frames deep. Futures feel like a mediocre compromise usually, at least in JS and Rust which is where I've mostly used them.
Await is already "built into compilers" in most languages that support it that don't start with an h and end with askell, plus one of the advantages of async and coroutines compared to threads is that you can control where you yield so you can avoid a lot of the complexities of having to use locks and stuff in multhreaded code, so having the compiler make it too automatic/magical might defeat the purpose.

animist
Aug 28, 2018

mystes posted:

Await is already "built into compilers" in most languages that support it that don't start with an h and end with askell, plus one of the advantages of async and coroutines compared to threads is that you can control where you yield so you can avoid a lot of the complexities of having to use locks and stuff in multhreaded code, so having the compiler make it too automatic/magical might defeat the purpose.

right but it's a local transformation. it converts 1 stack frame at a time to state machines. (Rust hides this by inlining a bazillion things into 1 state machine and throwing the resulting mound of spaghetti at LLVM.)

recently I was reading about delimited continuations. The idea is that it works a lot like catch/throw, except at a catch point you're allowed to restart the computation from the point it threw with a new value. That means you can make function calls without having to mark them sync or async, the sync or async can be an impl detail depending on what handlers you installed higher up in the stack.

i guess thats basically just green threads though. or setjmp/longjmp

Presto
Nov 22, 2002

Keep calm and Harry on.

Sagacity posted:

there are perfectly decent other languages available
[citation needed]

jesus WEP
Oct 17, 2004


champagne posting posted:

edit: Golang, the language made because its authors found their juniors had too hard a time grasping the concept of a set
did they drink their whole No Generics koolaid so hard that they’ve just decided against a bunch of collection types because they’d be a pain to implement without them?

Achmed Jones
Oct 16, 2004



jesus WEP posted:

did they drink their whole No Generics koolaid so hard that they’ve just decided against a bunch of collection types because they’d be a pain to implement without them?

nah, they get to use generic for stdlib implementation if they want to

annoys me so much that i cant do

code:
butts := make(set[fart])
like yes i know i can do map[fart]bool or map[fart]struct{} but dangit i dont want to!

Corla Plankun
May 8, 2007

improve the lives of everyone
i'm glad go doesn't have sets because when i was learning it that tipped me off that it was not a serious language worthy of my time

Lonely Wolf
Jan 20, 2003

Will hawk false idols for heaps and heaps of dough.
I have horrible news: https://github.com/golang/go/discussions/47331

Achmed Jones
Oct 16, 2004



every cloud butt has a silver lining i suppose

Pie Colony
Dec 8, 2006
I AM SUCH A FUCKUP THAT I CAN'T EVEN POST IN AN E/N THREAD I STARTED

Achmed Jones posted:

map[fart]bool

what the gently caress is that syntax

Xarn
Jun 26, 2015

Pie Colony posted:

what the gently caress is that syntax

zokie
Feb 13, 2006

Out of many, Sweden
a set with o(log n) for add and has, lmao why even bother

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

animist posted:

i would like fututes better if people actually built them into compilers instead of forcing you to manually plumb continuations by hand. I want stack traces more than 2 frames deep. Futures feel like a mediocre compromise usually, at least in JS and Rust which is where I've mostly used them.

kotlin does them this way and it owns.

Zlodo
Nov 25, 2006

jesus WEP posted:

did they drink their whole No Generics koolaid so hard that they’ve just decided against a bunch of collection types because they’d be a pain to implement without them?

"you don't actually need this feature that is hard for us to implement" is kind of go's schtick

"complex features will confuse our users bc they're noobs anyway" always felt like an excuse for their laziness

Kazinsal
Dec 13, 2011

Zlodo posted:

"you don't actually need this feature that is hard for us to implement" is kind of go's schtick

"complex features will confuse our users bc they're noobs anyway" always felt like an excuse for their laziness

considering go was written for googlers who get paid hundreds of thou a year and who are also too dumb to handle c++ I really think that go is both a symptom of and a giant flashing red billboard about what googles major malfunction is

jesus WEP
Oct 17, 2004


Kazinsal posted:

considering go was written for googlers who get paid hundreds of thou a year and who are also too dumb to handle c++
drat this sounds right up my street

Achmed Jones
Oct 16, 2004



the "too dumb for c/c++" thing is so stupid. dunking on golang is good and cool, but dunking on it _that way_ is just foolish

why yes i work in security why do you ask

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

Achmed Jones posted:

the "too dumb for c/c++" thing is so stupid. dunking on golang is good and cool, but dunking on it _that way_ is just foolish

why yes i work in security why do you ask

having worked on patching systemd services all written in c I can safely say I'd much rather work with Go.

I'd prefer neither, but if I had a gun to my head

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


Powerful Two-Hander posted:

love 2 spend hours trying to work out why my implementation of the library example is not applying the correct ordering to the rendered graph only to find that the example contains a setting it doesn't actually need, but if applied to a dataset where it could actually be applied, conflicts with the ordering process and fucks the whole thing up completely

OH MY loving GOD

after "solving" that problem last week and getting the y layer alignment constraints working correctly, the X layout was still wrong and nodes kept overlapping. I spent ages fiddling around trying to apply the X constraints to the layers using the library syntax with no luck, then turned the setting above back on and now it loving works arrrrgggghhhhh

toiletbrush
May 17, 2010

Pie Colony posted:

what the gently caress is that syntax
most modern-ish languages seem to have gone the route of trying to balance being familiar with striking whatever path they think is right but Go is just bafflingly loving terrible, like it's being different for being different's sake

it's not even hard to read because it's terse, its just unfathomably contrary

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


also hello yes it's me the guy who had his dotnet core project set to use iisexpress and only just realised/remembered that running from "service" hosts out of kestrel and gives you console output in an actual readable format

in my defence there is zero "live" core stuff in our current applications so I only use it on "spare time" side projects which is like 1 hour a week if that

Xarn
Jun 26, 2015

Achmed Jones posted:

the "too dumb for c/c++" thing is so stupid. dunking on golang is good and cool, but dunking on it _that way_ is just foolish

why yes i work in security why do you ask

The trick is to realize that everyone is too dumb for C++, and that C++ code should never touch security boundary. :v:

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



also everything is a security boundary

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Achmed Jones posted:

the "too dumb for c/c++" thing is so stupid. dunking on golang is good and cool, but dunking on it _that way_ is just foolish

why yes i work in security why do you ask

I thought go was pitched as "this is for our dumb employees" and not "this prevents our employees from writing many classes of security problem"

in practice you're right, in pitch you are wrong

Adbot
ADBOT LOVES YOU

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
I feel like this blog post shares a certain kinship with this thread https://danluu.com/look-stupid/

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply