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
tef
May 30, 2004

-> some l-system crap ->
it is a common misconception that async means 'fire and forget'

Adbot
ADBOT LOVES YOU

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
y'all got shaggered for an entire page because he doesnt like a word

tef
May 30, 2004

-> some l-system crap ->
true but i think we're all bored and posting

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

tef posted:

true but i think we're all bored and posting

we sure are tef. we sure are.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
like i hate the term 'dependency injection' but you dont hear me whining about it for pages on end

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
or do you?

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
naw i dont care about programming that much lol

CPColin
Sep 9, 2003

Big ol' smile.
I got a dependency you can inject

Athas
Aug 6, 2007

fuck that joker
shaggar was wrong ? ?

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
Shaggar was Shaggar

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slćgt skal fřlge slćgters gang



Athas posted:

shaggar was wrong ? ?

litterally

Vanadium
Jan 8, 2005

yes hello io runtime? id like to report a bug, somehow the async discussion blocked the entire thread

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
please flush any pending posts on the topic

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum
so how about that GIL? can’t believe they are going to try and remove it, no way this succeeds…

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."

tef posted:

it is a common misconception that async means 'fire and forget'

'fire and anxiously hope'

Bloody
Mar 3, 2013

tef posted:

it is a common misconception that async means 'fire and forget'

I wish fire and forget was easier

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Dijkstracula posted:

do you mean “what should i do if it’s time for pthread_exit() but I still have outstanding operations to complete”? you’re still free to block on pending events’s state changes, epoll-style, in a case like that I suppose

_exit() and let Ritchie clean it up

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

Subjunctive posted:

_exit() and let Ritchie clean it up

I mean those iops probably weren't worth completing anyway

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Dijkstracula posted:

I mean those iops probably weren't worth completing anyway

if they were important they would have finished already

tef
May 30, 2004

-> some l-system crap ->

Subjunctive posted:

_exit() and let Ritchie clean it up

how to find a loop in a linked list: free each item in turn, and if there's a segfault, there's a loop

VikingofRock
Aug 24, 2008




Vanadium posted:

yes hello io runtime? id like to report a bug, somehow the async discussion blocked the entire thread

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

tef posted:

how to find a loop in a linked list: free each item in turn, and if there's a segfault, there's a loop

this reminds me of an old job where they were touting a formally-verified memory allocator, but in order to make the automated proof go through free() had to be a no-op

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Dijkstracula posted:

this reminds me of an old job where they were touting a formally-verified memory allocator, but in order to make the automated proof go through free() had to be a no-op

it’s a memory allocator, not a memory deallocator

CLOSED WONTFIX

2Fast2Nutricious
Oct 4, 2020

Vanadium posted:

yes hello io runtime? id like to report a bug, somehow the async discussion blocked the entire thread

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.
time to clunk the fids

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

prisoner of waffles posted:

time to clunk the fids

I'm here to chew bubblegum and clunk fids ... and I'm all outta bubblegum

Dukes Mayo Clinic
Aug 31, 2009
born to queue
async is a gently caress
差不多 clunk all fids 2038
i am trash code
2,147,483,647 blocked threads

echinopsis
Apr 13, 2004

by Fluffdaddy
so last time I was trying to make crime committer, I’ve been using nothing but standard js (except for a library that helps me deal with times/dates etc), and I’ve been running up against a wall, because I have a lot of buttons that exist dynamically, and keeping track of what buttons i’ve made and their dom references etc is a bit unwieldy, especially because i’m just i’m figuring out poo poo as I go


would it be worthwhile investigating some kind of ui framework like react or vue or something else? will it make it easier for me to manage and keep track of ui elements?

or is my problem that I just don’t know what the gently caress I am doing regardless and no frame work will compensate for not knowing poo poo

mystes
May 31, 2006

If the problem is having to manually create and delete a lot of elements, a framework like react may make that entirely unnecessary so you don't have to "keep track" of them at all which can be simpler (at the cost of potentially making other things more complicated)

It's also possible that you're somehow making things unnecessarily complicated or something though

mystes fucked around with this message at 09:30 on Sep 20, 2023

echinopsis
Apr 13, 2004

by Fluffdaddy

mystes posted:


It's also possible that you're somehow making things unnecessarily complicated or something though

this is entirely possible and also extremely likely


it feels like the game logic is intimately mixed with the UI functionality, and I am not sure how to avoid this lol



when I’ve made things in unreal engine, the game logic is easy because it’s trivial to make unique objects that by themselves and can communicate with each other

but in js I don’t know if you can avoid managing everything from the main loop. which of course the only way I know how to do this is run the main loop and check for changes everywhere on every single frame update, update every ui element every frame. I suspect there has to be a better way

mystes
May 31, 2006

Oh if it's a game and there's a main loop I'm not sure a framework like react would work

mystes fucked around with this message at 14:10 on Sep 20, 2023

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum
jdk21 is out there, includes "Virtual Threads" if we want to block the thread some more

https://openjdk.org/projects/jdk/21/
https://openjdk.org/jeps/444

echinopsis
Apr 13, 2004

by Fluffdaddy

mystes posted:

Oh if it's a game and there's a main loop I'm not sure a framework like react would work

it’s not an action game, it’s an idle/clicker so theoretically it doesn’t need many resources or to perform stuff every loop, I just update every UI element every frame because I have the coding skills of sundried dogshit

Soricidus
Oct 21, 2010
freedom-hating statist shill

Sweeper posted:

jdk21 is out there, includes "Virtual Threads" if we want to block the thread some more

https://openjdk.org/projects/jdk/21/
https://openjdk.org/jeps/444

it’s good, op

as usual java gets things later than other languages and takes the time to learn from their mistakes, instead of just rushing to implement the latest fad

mystes
May 31, 2006

echinopsis posted:

it’s not an action game, it’s an idle/clicker so theoretically it doesn’t need many resources or to perform stuff every loop, I just update every UI element every frame because I have the coding skills of sundried dogshit
As long as there is needs to be a game loop constantly rendering frames, I don't think react would be a good fit regardless of whether you actually need to update the UI elements every frame, because react effectively has its own event loop and if you're using it you basically want to do all the UI rendering within it, and it's not really suited for stuff like games where you are constantly rerendering stuff regardless of whether any events have happened

If you're making a really trivial game like minesweeper where mostly stuff doesn't change until you click somewhere, except maybe for a number counting up once per second, then react might be ok.

The more you're trying to do stuff that doesn't fit entirely within the react model (except maybe within individual parts that internally do stuff outside of the react model but can be turned into a component that works within the react model), the less useful react is.

echinopsis
Apr 13, 2004

by Fluffdaddy
well, what I mean, is that there are values in the UI elements that need to be updated.


https://crimecommitter.com

in some ways I actually like the aesthetic, but I am definitely not competent lol

echinopsis
Apr 13, 2004

by Fluffdaddy
I mean, maybe you’re right, maybe I need to work out a better method to implement it in pure js rather than add frameworks

mystes
May 31, 2006

echinopsis posted:

well, what I mean, is that there are values in the UI elements that need to be updated.


https://crimecommitter.com

in some ways I actually like the aesthetic, but I am definitely not competent lol
oh ok I wasn't familiar with it but React would probably actually be a good fit for that

mystes fucked around with this message at 22:41 on Sep 20, 2023

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

Soricidus posted:

as usual java gets things later than other languages and takes the time to learn from their mistakes, instead of just rushing to implement the latest fad
a bit like go did with generics then

i kid, java is awesome and java 21 brings a LOT of really cool features

Adbot
ADBOT LOVES YOU

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

echinopsis posted:

I mean, maybe you’re right, maybe I need to work out a better method to implement it in pure js rather than add frameworks

svelte’s reactive properties might be what you want. tracks all the dependencies and makes things update for you

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