|
NihilCredo posted:i vote for 'use elm'. echinopsis, you're making a clicker game for fun and learning. fun and learning is exactly what elm is suitable for and does very well yep
|
# ? Sep 21, 2023 13:37 |
|
|
# ? May 24, 2024 12:29 |
|
what I don't find compelling about elm is that I don't know anything about it
|
# ? Sep 21, 2023 13:43 |
|
that code is a crime!!! lol
|
# ? Sep 21, 2023 13:45 |
|
I really wish I can learn to use something like a dictionary. there are functions in that code that exist to act like a dictionary, they take a string and then I loop through every item in the array searching for a match for the string, and return some bullshit. it feels like a tragic solution to what feels like it should have a much simpler solution
|
# ? Sep 21, 2023 13:48 |
|
what you really need is a finite state machine and algebraic data types mate
|
# ? Sep 21, 2023 13:52 |
|
my homie dhall posted:what you really need is a finite state machine and algebraic data types mate been saying this
|
# ? Sep 21, 2023 13:54 |
|
You could just use typescript but maybe elm isn't actually a bad idea because it will force you to do some stuff correctly
|
# ? Sep 21, 2023 13:57 |
|
or use purescript ftw
|
# ? Sep 21, 2023 13:57 |
|
Don't encourage self harm
|
# ? Sep 21, 2023 13:58 |
|
my homie dhall posted:what you really need is a finite state machine and algebraic data types mate wtf ok imma boot up wikipedia and read some mf words
|
# ? Sep 21, 2023 14:09 |
|
mystes posted:You could just use typescript but maybe elm isn't actually a bad idea because it will force you to do some stuff correctly “doing stuff correctly” here means “having fun writing it” I think someone else is making a game in JS too: https://youtu.be/m8SmXOTM8Ec?si=doqLt-ikHrXF2jUR
|
# ? Sep 21, 2023 14:21 |
|
echinopsis posted:every time I dive back into this I have to half rel-earn js tbf having programmed professionally for 20 years this more or less remains standard operating procedure when i switch back into something after a break. you'll learn it 10x faster this, and eventually fast enough that it isn't *that* distinguishable from knowing.
|
# ? Sep 21, 2023 14:22 |
|
turns out knowing the right way to build an app doesn't give you any more motivation to write the code if anything, knowing the chore ahead is a good deterrent
|
# ? Sep 21, 2023 14:57 |
|
tef posted:turns out knowing the right way to build an app doesn't give you any more motivation to write the code back when i was contributing to elm, i had a good working thing w/ a computer science nerd where i (self taught hobbyist who had a lot of ideas) would write a bunch of bad code that basically worked, and then that guy (computer science nerd who had no ideas) would simply rewrite all my stuff the Correct Way
|
# ? Sep 21, 2023 15:02 |
|
Sagacity posted:hdym oh, my mistake. I just assumed I would have noticed, but it seems its been in preview since java 19 a year ago and I hadn't noticed
|
# ? Sep 21, 2023 15:49 |
|
lol i posted this in the bwm thread i wouldn’t say that java is just doing the hip new thing. if anything, i think that would be async/await. instead, they’re taking a strong stance of committing to their older, arguably simpler programming model by trying to make threads more scalable the “some weird thing blocked an os thread and our perf cratered / we deadlocked” problem is inevitable. os threads are a precious resource, and it sucks to block them. any technology that tries to create scalable concurrency will involve m-n scheduling and will be susceptible to the problem. and if you deliberately don’t build that into the language, people will build libraries to pool your non-scalable concurrency primitives, and those pools will be susceptible to the problem. java’s opt-in approach for their scalable threads seems like a reasonable, conservative way to introduce the tech into the system without forcing problems on people i’m still not sure it’s the best thing overall, but I understand it
|
# ? Sep 21, 2023 17:25 |
|
echinopsis posted:every time I dive back into this I have to half rel-earn js echi try this poo poo out, you might like it: https://www.executeprogram.com/courses/modern-javascript it teaches some of the nicer stuff that has become available in all browsers (and been available for quite a while at this point) and it does spaced recall testing so that you can learn a thing and have it reinforced. it's also a nice way to give some money to the guy who made the "javascript wat" presentation, if you want the premium account
|
# ? Sep 21, 2023 17:57 |
|
(what's the bwm thread?) yeah, I'm not disputing they probably chose right for java, but their proposal for it was basically "babby's first criticism of async/await" followed by "there are no problems the first one irked me, the second has me really suspicious. "pretend the problems don't exist" isn't usually a good engineering strategy. That could have been irrational exuberance with the initial proposal, but the final JEP still has threads getting pinned and blocked with no real options presented for dealing with it. (Despite there being a solution for IO blocking seemingly hidden away inside the runtime.)
|
# ? Sep 21, 2023 18:01 |
|
bwm = bad with money: https://forums.somethingawful.com/showthread.php?threadid=3878671
|
# ? Sep 21, 2023 18:08 |
|
crazypenguin posted:(what's the bwm thread?) the bad with money thread in bfc, which you can find by searching the entire forums for a thread with a million posts that doesn’t have “bad with money” in the title (it actually is in bfc atm, currently called “bulbs worth millions”)
|
# ? Sep 21, 2023 18:10 |
|
my assumption is that java's new green threads are being pushed exclusively by low-latency hedge funds with deep pockets to drive JEPs, which is not inherently a bad thing but does mean that it might not be a general solution for everyoneprisoner of waffles posted:echi try this poo poo out, you might like it:
|
# ? Sep 21, 2023 18:19 |
|
the project loom stuff was built because java did not want to adopt async/await since it requires a completely different ecosystem next to your regular ecosystem, like in other languages in some ways this has already happened in java too, with the god awful reactive programming libraries that have popped up what loom enables users to do is to simply take an application like netty, which serves network requests using an ordinary thread pool, and have it use a green thread pool instead, where it suddenly handles (tens of) thousands of requests per second
|
# ? Sep 21, 2023 19:04 |
|
itym jetty netty is the one where it's all non-blocking and you write network applications as if you were performing interrupt-driven i2c transactions on a bare-metal microcontroller, pounding nails into your dick in black-and-white infomercial hellworld while screaming at the heavens that there has got to be a better way!!
|
# ? Sep 21, 2023 19:11 |
|
also i'm a filthy pervert who loves writing bare-metal interrupt-driven i2c drivers in c, it gets me really hot and bothered please pay me six figgies to do it. rust is for cowards and c++ is revolting. only c.
|
# ? Sep 21, 2023 19:14 |
|
Sapozhnik posted:also i'm a filthy pervert who loves writing bare-metal interrupt-driven i2c drivers in c, it gets me really hot and bothered don't get addicted to SIGs, kids
|
# ? Sep 21, 2023 19:15 |
|
prisoner of waffles posted:echi try this poo poo out, you might like it: thankyou very much this looks good and is something achievable
|
# ? Sep 21, 2023 20:30 |
|
echinopsis posted:
i'm just going to use this as an example, but you don't need to use "new" here, instead you can just use an object literal: JavaScript code:
JavaScript code:
|
# ? Sep 21, 2023 20:57 |
|
gentle request to take specific stuff like "help me with my game" to its own thread plz & thank
|
# ? Sep 21, 2023 21:04 |
|
noted
|
# ? Sep 21, 2023 21:14 |
|
Wheany posted:i'm just going to use this as an example, but you don't need to use "new" here, instead you can just use an object literal: i’ll have a look at these later and get my head around them. something satisfying I get when coding is discovering a new and significantly better approach to making something work. here’s a question : in unreal engine blueprints there’s this thing called select let’s say I needed to plug a float into a function, select means I plug the select into the float input and then put multiple float options into the select, and then something like a boolean or integer index or even an enumeration, and then at run time the float is chosen from the options depending on the indexing input I use it all the time because it feels clean. and I’ve just thought about it and think I know how you could do it in js but would feel ugly and spose pointers would also be helpful achieving this .. just thinking out loud coz of the nodes, the select node doesn’t really messy up the code, in fact it makes it clearer than the top example using branch I spose in-line it might make for some gnarly to pull apart code and more challenging to work out what’s going on later sitch
|
# ? Sep 21, 2023 21:30 |
|
I am realising now looking at those examples that there is a performance price to pay, at least in those blueprints. but I can imagine how pointers wouldn’t introduce that issue anyway lol what am I talking about I’ve never used a pointer in my life
|
# ? Sep 21, 2023 21:32 |
|
you mean you want to map it? can use an array or object for that depending on what keys you want. for zero-based integers:code:
|
# ? Sep 21, 2023 21:46 |
|
echinopsis posted:
sounds to me like a switch statement https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch
|
# ? Sep 21, 2023 21:48 |
|
Subjunctive posted:you mean you want to map it? can use an array or object for that depending on what keys you want. for zero-based integers: amazing
|
# ? Sep 21, 2023 23:20 |
|
"i want to make my game better" "learn and rewrite it in some fly-by-night hipste plang"
|
# ? Sep 22, 2023 03:19 |
|
redleader posted:"i want to make my game better" this is the PL thread, the advice is gonna be PL related. like you’re going to some blockchain shop and act surprised they try to sell you blockchains
|
# ? Sep 22, 2023 03:35 |
|
doesn’t pl just mean programming language not plang?
|
# ? Sep 22, 2023 03:48 |
|
rotor posted:gentle request to take specific stuff like "help me with my game" to its own thread plz & thank
|
# ? Sep 22, 2023 03:52 |
|
i am happy that echi wants to learn to program but there really is an entire subforum for this
|
# ? Sep 22, 2023 03:57 |
|
|
# ? May 24, 2024 12:29 |
|
rjmccall posted:i am happy that echi wants to learn to program but there really is an entire subforum for this
|
# ? Sep 22, 2023 04:01 |