|
|
# ? Sep 22, 2023 04:29 |
|
|
# ? May 24, 2024 21:26 |
|
all good lol spose I misunderstood this thread
|
# ? Sep 22, 2023 04:31 |
|
echinopsis posted:doesn’t pl just mean programming language not plang? yeah but the thread is mostly programming language enthusiasts/nerds discussing the intricacies and implications of specific concepts and their implementations. Like it’s often about languages themselves rather than using them.
|
# ? Sep 22, 2023 04:43 |
|
echinopsis posted:I really wish I can learn to use something like a dictionary. dictionaries are absolutely a thing in all sorts of languages and if the language doesn’t have the concept natively there are always simple implementations available JavaScript has them baked in and they’re the same as JavaScript’s objects JavaScript code:
|
# ? Sep 22, 2023 05:29 |
|
we don’t really need new programming languages since the best language, Lisp, has existed for 63 years now the only remaining question is whether one should use a Lisp-2 or a Lisp-1
|
# ? Sep 22, 2023 05:37 |
|
the main footgun to be aware of with using js objects as maps is that keys are always coerced to strings this ends up being just fine in many situations, though. for example, the default string cast of an array like [2,3] in js is "2,3"; distinct arrays of ints still have distinct string representations, so if you consistently used 2-element arrays of ints as keys into an object it would "just work" so long as you never tried to iterate over the keys of the object, or whatever
|
# ? Sep 22, 2023 05:41 |
|
js also has Map, which works exactly like you'd expect a dictionary to work in every other lang
|
# ? Sep 22, 2023 05:42 |
|
Internet Janitor posted:the main footgun to be aware of with using js objects as maps is that keys are always coerced to strings oh yeah this one's great because it turns up juuuust infrequently enough that i forget it, then am surprised
|
# ? Sep 22, 2023 05:43 |
|
if you use anything except a string or a symbol (in a good plang) as a key you deserve to fail
|
# ? Sep 22, 2023 05:45 |
|
neosloth posted:if you use anything except a string or a symbol (in a good plang) as a key you deserve to fail
|
# ? Sep 22, 2023 05:48 |
|
neosloth posted:if you use anything except a string or a symbol (in a good plang) as a key you deserve to fail and yet you index your arrays with integers hmmm?
|
# ? Sep 22, 2023 05:50 |
|
Cybernetic Vermin posted:and yet you index your arrays with integers hmmm? whats an array
|
# ? Sep 22, 2023 05:53 |
|
either way the "lets just have everything act as a string" is certainly a popular classic, used by absolute idiot clowns (e.g. shell scripting and javascript maps) and in one single instance consistently enough that it has some value, i.e. tcl, so i will be polite enough to assume you're just a tcl'er.
|
# ? Sep 22, 2023 05:57 |
|
neosloth posted:if you use anything except a string or a symbol (in a good plang) as a key you deserve to fail shart[💨] = 💩 FlapYoJacks fucked around with this message at 06:55 on Sep 22, 2023 |
# ? Sep 22, 2023 06:02 |
|
echinopsis posted:button index was like the primary reference, as in, button index refers to the id of the button but also the crime associated with the button. its the primary variable passed around everywhere that lets the program know what button/crime I am dealing with I don't know anything about javascript or your code, I just liked that there's a 'commitcrime' function. Good function name.
|
# ? Sep 22, 2023 06:36 |
|
eschaton posted:we don’t really need new programming languages since the best language, Lisp, has existed for 63 years now I'll just use C, which has been determined as better than lisp by working programmers for over 50 years.
|
# ? Sep 22, 2023 09:24 |
|
c in 2023 is about trying to find the best combo of vendor extensions to make what you really want to do easy to write source: have written several thousand lines of c that only work if you pass -fms-extensions to gcc because implementing pseudo-inheritance for device drivers would require tens of thousands more lines of code without -fms-extensions
|
# ? Sep 22, 2023 09:33 |
|
Kazinsal posted:c in 2023 is about trying to find the best combo of vendor extensions to make what you really want to do easy to write I mostly work with compilers from the 90s-early2000s
|
# ? Sep 22, 2023 09:40 |
|
If you're not writing portable code are you even living?
|
# ? Sep 22, 2023 09:42 |
|
leper khan posted:I mostly work with compilers from the 90s-early2000s I would simply fake my death and move to belize
|
# ? Sep 22, 2023 10:44 |
|
neosloth posted:whats an array just a long string
|
# ? Sep 22, 2023 10:51 |
|
Kazinsal posted:I would simply fake my death and move to belize
|
# ? Sep 22, 2023 10:51 |
|
nm
echinopsis fucked around with this message at 14:11 on Sep 22, 2023 |
# ? Sep 22, 2023 10:52 |
|
RokosCockatrice posted:I don't know anything about javascript or your code, I just liked that there's a 'commitcrime' function. Good function name. I will never regret living life to the full
|
# ? Sep 22, 2023 10:53 |
|
echinopsis posted:just a long string
|
# ? Sep 22, 2023 11:19 |
|
MononcQc posted:yeah but the thread is mostly programming language enthusiasts/nerds discussing the intricacies and implications of specific concepts and their implementations. Like it’s often about languages themselves rather than using them. this thread slapfights about checked exceptions, and the other thread is where we complain about programming
|
# ? Sep 22, 2023 14:19 |
|
leper khan posted:I mostly work with compilers from the 90s-early2000s I work with gcc-13 in a big bed with my wife
|
# ? Sep 22, 2023 14:23 |
|
If anyone knows why the toshiba T900 compiler is hard crashing in windows xp on me, or why it can't run in anything newer than that I'd appreciate knowing tia.
|
# ? Sep 22, 2023 14:29 |
|
leper khan posted:If anyone knows why the toshiba T900 compiler is hard crashing in windows xp on me, or why it can't run in anything newer than that I'd appreciate knowing tia. i dont know about that
|
# ? Sep 22, 2023 14:30 |
|
leper khan posted:If anyone knows why the toshiba T900 compiler is hard crashing in windows xp on me, or why it can't run in anything newer than that I'd appreciate knowing tia. I hope your company has a 30 hour work week or pays extremely well.
|
# ? Sep 22, 2023 15:32 |
|
Athas posted:I hope your company has a 30 hour work week or pays extremely well. why? that’s a transferable skill
|
# ? Sep 22, 2023 15:33 |
|
Athas posted:I hope your company has a 30 hour work week or pays extremely well. Neither, but that project is what I do for fun on the weekends.
|
# ? Sep 22, 2023 15:41 |
|
rjmccall posted:i am happy that echi wants to learn to program but there really is an entire subforum for this is that not yospos???
|
# ? Sep 22, 2023 16:34 |
|
Cybernetic Vermin posted:either way the "lets just have everything act as a string" is certainly a popular classic, used by absolute idiot clowns (e.g. shell scripting and javascript maps) and in one single instance consistently enough that it has some value, i.e. tcl, so i will be polite enough to assume you're just a tcl'er. powers hell uses objects
|
# ? Sep 22, 2023 16:37 |
|
tef posted:this thread slapfights about checked exceptions, and the other thread is where we complain about programming yep this is where i come to read yall effort post about esoterica like that, exceptions, threads, types etc the terrible programming thread is where i come to post about the fuckin javascript & php i have to maintain being pieces of poo poo
|
# ? Sep 22, 2023 17:02 |
|
Bloody posted:powers hell uses objects most of the time i like this
|
# ? Sep 22, 2023 17:07 |
|
yeah, in principle i think it is vastly better. though really a shell needs native table datatypes. lilsh when internet janitor?!
|
# ? Sep 22, 2023 17:09 |
|
i mean, lilt does have the ability to shell out to subprocesses i don't think anyone would want to use it to completely replace their usual shell but i use it to write shebang scripts all the time
|
# ? Sep 22, 2023 17:14 |
|
and honestly the value would be in rewriting a million utilities that logically output tables to actually output tables. though possibly one could be parasitic on some powershell stuff for that
|
# ? Sep 22, 2023 17:18 |
|
|
# ? May 24, 2024 21:26 |
|
lil's basic toolkit includes both proper csv parsing/formatting and a pretty flexible facility for cracking apart fixed-width or other delimited-column formats, so it can interact easily with cli tools that speak in text-as-tables but lil strings do not support unicode, which limits some practical applications, and of course lil is orders of magnitude slower than grep/awk/sed/sqlite for their intended purposes
|
# ? Sep 22, 2023 17:22 |