|
yeah, jsc had a very nicely-tuned hashtable, and then v8 came out and just destroyed them with the structure optimization. object structures and structure-derivation trees (i don’t remember what they actually call this) were responsible for almost all of the v8 win iirc
|
# ? Feb 23, 2024 01:57 |
|
|
# ? May 15, 2024 01:51 |
|
we had shapes long before we had a JIT, because Spring or whatever had them and they worked well there, so why not? patched the bytecode and let us go straight to the right slots vector up the prototype tree without having to do the symbol lookups: more saved cache traffic! I think Brendan might have patented his variant? it’s a blur (but I do remember all the work to rein in pathological growth in the shape tree caused by hosed up JS on the web) in v8 I think they’re called “hidden classes”? Ruby just got them last year
|
# ? Feb 23, 2024 02:01 |
|
2007 is when apple showed the world the future of computers, and told us to simply make web apps instead of writing platform-specific native code, and the world reacted with such horror that stebe himself was forced to back down.
|
# ? Feb 23, 2024 02:08 |
|
huh, i would’ve thought the shape optimization would’ve dominated. do you remember what jsc did better with object representations? was it like heap/gc stuff, or just the basic value representation?
|
# ? Feb 23, 2024 02:09 |
|
rjmccall posted:huh, i would’ve thought that would’ve dominated. do you remember what jsc did better with object representations? was it like heap/gc stuff, or just the basic value representation? a lot of it was just that their tree walker was a tiny amount of code and pipelined really well and our interpreter was a giant thing full of code optimized for 1990s compiler and processor behaviour. their strings were better in some way too—I think they couldn’t represent all the illegal-Unicode things that the standard specified, but it turned out that nobody really cared. we optimized our way to a bloated mess that never met an i$ it couldn’t thrash. I really had no idea about how significant those elements were 15-20 years ago, so it was quite the eye-opener we were very jealous of v8 getting to design their representations knowing about how the modern web worked (and having a pet copy of that web to analyze and test against). they had done a bunch of things we hadn’t thought of, but a most of it was in our wishlist. we just couldn’t afford to redo the whole JSVM and how those representations were embedded all over the browser engine or twisted by old features that didn’t matter (E4X and LiveConnect and some poo poo that the Bloomberg terminal used, I’m looking at you) we also cared a lot more about memory usage than the v8 team did, and they turned out to be on the right side of history there as well, since people notice fast all the time and only notice big when they open Activity Monitor
|
# ? Feb 23, 2024 02:18 |
|
somewhat related is this excerpt from a friend’s short book about system optimization: the punchline is that they were thrashing caches in ways that were slowing the rest of the system down, and with some detailed instrumentation of cache behaviour they were able to improve the whole system dramatically
|
# ? Feb 23, 2024 02:22 |
|
macos updates stopped breaking valgrind a few years ago (because they gave up on supporting macos)
|
# ? Feb 23, 2024 04:15 |
|
Subjunctive posted:somewhat related is this excerpt from a friend’s short book about system optimization: what’s the book?
|
# ? Feb 23, 2024 10:29 |
|
I'm not going to yell about Valgrind on macOS, but I will stand outside Apple's house and yell about OpenMP forever. Regarding dynamic linking, at this point I'm radicalized enough to say that recompiling the world should not be a problem. Make the code open. Use Nix. Whatever. These are solved problem except for proprietary and legacy code and eat the rich etc.
|
# ? Feb 23, 2024 10:39 |
|
Soricidus posted:what’s the book? oops, meant to link it https://carlos.bueno.org/optimization/
|
# ? Feb 23, 2024 15:21 |
|
Subjunctive posted:oops, meant to link it nice, so far, this is worth it alone for distilling Jeff Dean's twelve or so Numbers Every Programmer Should Know down into four
|
# ? Feb 23, 2024 15:49 |
|
Subjunctive posted:oops, meant to link it thank you, that was an excellent Friday afternoon read
|
# ? Feb 23, 2024 23:39 |
|
new thread title:Subjunctive posted:never met an I$ I couldn’t thrash. elsewhere, earlier: Internet Janitor posted:awk as an introductory programming language: Visions of Valerie posted:I love awk (I think the only bullet point IJ forgot (which, to be fair, isn't strictly necessary from a purely pedgogical standpoint, I suppose) is that awk is also pragmatically useful, and in more places than one might first expect or suspect.) minidracula fucked around with this message at 00:21 on Mar 7, 2024 |
# ? Mar 7, 2024 00:10 |
|
just don’t let me catch you piping grep into ask
|
# ? Mar 7, 2024 00:29 |
|
Subjunctive posted:just don’t let me catch you piping grep into ask
|
# ? Mar 7, 2024 00:36 |
|
timb has forsaken me
|
# ? Mar 7, 2024 00:38 |
|
minidracula posted:new thread title: unfortunately awk is a gateway drug to perl, wherein lies true madness i use both constantly
|
# ? Mar 7, 2024 04:58 |
|
realtalk though if awk didn't do wacky stuff like this it really would be almost a perfect introductory language though
|
# ? Mar 7, 2024 05:02 |
|
Voodoo Cafe posted:realtalk though if awk didn't do wacky stuff like this it really would be almost a perfect introductory language though (Coincidentally, now that I think about it, I do use an AWK impl. called TAWK...)
|
# ? Mar 7, 2024 05:06 |
|
yeah, awk's approach to scope and its extremely limited ability to work with records/collections are serious shortcomings for general purpose programming significantly less hosed than bash, but not as much better as one might hope still, it's the tool that is already in hand, and that counts for quite a bit
|
# ? Mar 7, 2024 05:07 |
|
The thing I saw most recently re: awk that gave me any kind of pause was not really awk-specific as it was gawk-specific; right after installing WSL2 on a newly installed Windows laptop last night, of course one of the first things I do is check out what awk I have in the install/image:code:
|
# ? Mar 7, 2024 05:17 |
|
minidracula posted:The thing I saw most recently re: awk that gave me any kind of pause was not really awk-specific as it was gawk-specific; right after installing WSL2 on a newly installed Windows laptop last night, of course one of the first things I do is check out what awk I have in the install/image: i mean. isn't that to be expected? default wsl linux is ubuntu i think? it's not like you installed Windows Subsystem for FreeBSD
|
# ? Mar 7, 2024 05:43 |
|
why does it need four versions. i mean i can sortof understand some pedant thinking it’s useful to have separate release and api versions even if it’s really pointless because there’s no good reason for the apis to not just roll forward in step with releases. but why have four versions
|
# ? Mar 7, 2024 06:01 |
|
Four versions? Get with the times, gramps. GNU Awk 5.2.2, API 3.2, PMA Avon 8-g1, (GNU MPFR 4.2.0-p12, GNU MP 6.2.1)
|
# ? Mar 7, 2024 06:06 |
|
minidracula posted:the GNU Project Must Be Stopped.
|
# ? Mar 7, 2024 06:08 |
|
pseudorandom name posted:GNU Awk 5.2.2, API 3.2, PMA Avon 8-g1, (GNU MPFR 4.2.0-p12, GNU MP 6.2.1) Mozilla/5.0 (iPhone14,3; U; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Mobile/19A346 Safari/602.1
|
# ? Mar 7, 2024 06:20 |
|
Voodoo Cafe posted:i mean. isn't that to be expected? default wsl linux is ubuntu i think? it's not like you installed Windows Subsystem for FreeBSD
|
# ? Mar 7, 2024 06:21 |
|
okay so i looked it up and i really do not understand why i would want to know what version of arbitrary-precision math library awk is using. also i wasn’t aware awk had that kind of math processing at all
|
# ? Mar 7, 2024 06:24 |
|
rjmccall posted:okay so i looked it up and i really do not understand why i would want to know what version of arbitrary-precision math library awk is using. also i wasn’t aware awk had that kind of math processing at all That said, I get that some gawk extensions are nice and/or useful, though I tend to avoid them myself, or just specifically distinguish between generic "awk" programs versus specifically gawk-only programs. And those usually also depend on a specific gawk version, since the extensions vary a lot by version (or can anyway). But then again: I really only write the latter both 1) rarely and 2) almost exclusively to futz with some specific gawk extension for its own sake, so again, maybe gawk has taken this a bit too far... Like honestly, I didn't even know until last night when I saw this version banner that gawk now had arbitrary precision math support, and my first reaction was something like "whuh?" followed quickly by "but why?" minidracula fucked around with this message at 06:29 on Mar 7, 2024 |
# ? Mar 7, 2024 06:27 |
|
minidracula posted:Like honestly, I didn't even know until last night when I saw this version banner that gawk now had arbitrary precision math support, and my first reaction was something like "whuh?" followed quickly by "but why?" obviously they couldn’t agree on a precision to use, so…
|
# ? Mar 7, 2024 06:33 |
|
rjmccall posted:okay so i looked it up and i really do not understand why i would want to know what version of arbitrary-precision math library awk is using. also i wasn’t aware awk had that kind of math processing at all its so you can include the version string in bug reports op
|
# ? Mar 7, 2024 07:20 |
|
I don’t really understand the need to learn advanced awk stuff when perl is right there out of the box too on most unices (and way more portable), but I respect people who do it anyway nightmare fuel: imagine if there was a gnu perl
|
# ? Mar 7, 2024 09:19 |
|
Soricidus posted:nightmare fuel: imagine if there was a gnu perl shudder. iirc one of the many perl5 issues is that it's a plang with no formal specification, just the lone reference implementation. i can only imagine how many hilarious incompatibilities would occur in a different try, regardless of whether it was a gnu project
|
# ? Mar 7, 2024 09:57 |
|
rjmccall posted:okay so i looked it up and i really do not understand why i would want to know what version of arbitrary-precision math library awk is using. also i wasn’t aware awk had that kind of math processing at all there used to be a lot of rather buggy versions of gmp floating around. and of course the option of awk 4.3.1 being built (and ideally shipped) with the specific version of gmp that the devs used and qa'd against would interfere with the random-dynamic-linking-linux-packaging carousel of madness.
|
# ? Mar 7, 2024 10:30 |
|
BobHoward posted:shudder. iirc one of the many perl5 issues is that it's a plang with no formal specification, just the lone reference implementation. i can only imagine how many hilarious incompatibilities would occur in a different try, regardless of whether it was a gnu project yeah, when we were adding regular expressions to JS we wanted to match Perl’s semantics but we kept running into weird cases that didn’t make sense when tested in Perl itself. perl5-porters@ or whatever the mailing list was would just respond “oh well, that’s how it works so it’s by definition correct” and shrug. made the standardization process a lot of fun!
|
# ? Mar 7, 2024 12:06 |
|
Soricidus posted:I don’t really understand the need to learn advanced awk stuff when perl is right there out of the box too on most unices (and way more portable), but I respect people who do it anyway some of us built those brain-patterns before perl was available everywhere out of the box, have a little compassion
|
# ? Mar 7, 2024 12:11 |
|
perl is not a serious language
|
# ? Mar 7, 2024 12:20 |
|
Xarn posted:perl is not a serious language i'd say it's serious in the same way that a rash or foot fungus can be
|
# ? Mar 7, 2024 12:55 |
|
Soricidus posted:nightmare fuel: imagine if there was a gnu perl MS Visual Perl for Applications
|
# ? Mar 7, 2024 13:17 |
|
|
# ? May 15, 2024 01:51 |
|
Awk's variables are hosed up, but the workaround for them is hilarious: if you declare a variable as a function parameter, it won't share a scope with the parent callers; also if you declare a variable as a function parameter and it is not put in by the caller, it's gonna be uninitialized. Therefore, declare your local-scoped variables as function parameters. Here's a snippet from some code I wrote when doing the 2021 advent of code with Awk (up until day 14):code:
also I will always mention my tutorial to learn awk in 20 minutes: https://ferd.ca/awk-in-20-minutes.html
|
# ? Mar 7, 2024 14:45 |