2024-12-14 12:50:53 xentrac: I agree - basically nothing will keep operating through all that. To do anything requires that there be an energy gradient somewhere to exploit, and exactly what heat death is is the vanishing of such a gradient. Though I think Penrose's idea is kind of an out - once it's all photons it's like a "mode switch" can occur. I don't claim to understand his theory in any real way - I just 2024-12-14 12:50:53 have a lot of respect for his chops, so I figure there's at least some merit to the idea. 2024-12-14 12:53:56 I don't think space is "fundamental" in the first place (I don't think it's some preexisting "container" that stuff got put in somehow). So the notion of regarding space as big and then suddenly small again doesn't bother me that much. 2024-12-14 12:54:34 You can model the dynamics of nature, and even derive most of the laws of physics, without presuming the existence of space initially at all - it still kind of "shows up" on its own in the patterns of the behavior that emerge. 2024-12-14 12:55:19 We've just evolved to PERCEIVE things as happening in 3D space. 2024-12-14 12:56:13 Math is here if you're interested: https://arxiv.org/abs/1810.06981 2024-12-14 12:57:12 I think that's a very under-appreciated paper; there's something important there. 2024-12-14 14:12:40 How do you usually implement comma equivalents of different sizes, e.g. 2 byte or 4 byte long? 2024-12-14 14:16:32 The one I just implemented now looks like this: : le-4b! ( u addr -- ) 4 0 do swap dup 8 rshift swap $ff and rot tuck c! 1+ loop 2drop ; : le-4b, ( u -- ) here 4 allot le-4b! ; 2024-12-14 14:17:35 What are some better ways to do it, for different ways of betterment? 2024-12-14 14:24:36 I usually just have , and h, and w, and c, 2024-12-14 14:24:48 w, is likely the least used of those and might not even be present. 2024-12-14 14:26:04 h, has been particularly heavily used in my past systems because I generally build definitions from 32-bit items. 2024-12-14 14:27:48 It also gets complicated a bit if you store bodies and headers separately, because which region you're wanting to extend depends on the situation. 2024-12-14 20:03:49 veltas: you've mentioned before that you've written a b or c compiler. do you have any channels you can recommend related to that subject? 2024-12-14 20:04:02 or anyone else 2024-12-14 20:28:10 zelgomer: No I was writing one, not written one. I recommend reading the original C compiler in the UNIX archive 2024-12-14 20:28:22 Or one of the old B compilers, and manual 2024-12-14 20:28:52 The B manual's inspirational, a hidden gem 2024-12-14 20:29:16 nowadays you might want to use PEGs rather than yacc 2024-12-14 20:29:35 In my opinion you should not use a parser generator, and none of those old compilers did either 2024-12-14 20:29:48 And clang and GCC don't either I think(?) 2024-12-14 20:30:57 Just write braindead recursive descent 2024-12-14 20:31:12 i was just looking for a community to watch discussions that aren't forth centric, but thanks anyway. i've always hated yacc. just got an lalr generator working. 2024-12-14 20:31:43 yacc was pretty popular for Unix compilers in the 70s, and in particular Steve Johnson's C compiler (the first one to be written after yacc) used yacc 2024-12-14 20:31:45 "C in four functions" https://github.com/rswier/c4/blob/master/c4.c 2024-12-14 20:31:49 i know everybody says just use recursive descent these days but i still want to do it to scratch the itch 2024-12-14 20:31:50 Sorry honestly ##forth is the only place I talk about B 2024-12-14 20:31:55 I don't know anyone else who cares 2024-12-14 20:32:05 zelgomer: why would you write an LALR generator if you hate yacc? :) 2024-12-14 20:32:07 #C is mostly people who don't like C now 2024-12-14 20:32:11 There's #proglangdesign 2024-12-14 20:32:28 "Obfuscated Tiny C Compiler" https://bellard.org/otcc/ 2024-12-14 20:32:38 Are they 'functional' programmers or cool programmers? 2024-12-14 20:32:43 veltas: my friend John Cowan designed a new version of B, and my friend Darius Bacon implemented it, though I forget if he finished 2024-12-14 20:32:52 xentrac: Any info? 2024-12-14 20:32:58 xentrac: because i don't hate yacc in concept, what i hate about it is more of a ui gripe 2024-12-14 20:33:15 https://github.com/darius/parson/tree/master/eg_B_compiler 2024-12-14 20:34:14 the new version of B is https://github.com/johnwcowan/pdp8x/blob/master/b202x.md 2024-12-14 20:34:48 Yeah looks similar to my early "new B" design 2024-12-14 20:34:53 PEG parsing has most of the advantages of "braindead recursive descent" with less disadvantages 2024-12-14 20:35:03 zelgomer: what is the UI gripe? 2024-12-14 20:35:05 Which was basically to support untyped C 2024-12-14 20:35:44 How is it with syntax errors? 2024-12-14 20:35:54 Because that was my issue with PEG last time 2024-12-14 20:36:00 Also that it's another pointless layer 2024-12-14 20:36:40 I think PEGs handle syntax errors in almost exactly the same way as braindead recursive descent 2024-12-14 20:36:57 I don't think so 2024-12-14 20:37:16 If you write the parser manually you can do a lot of smart things to generate nicer errors 2024-12-14 20:37:28 PEG stopped me from doing this nicely, not without making it an unreadable mess 2024-12-14 20:37:53 And this is broadly the issue with parser generators, and I think one of the main reasons why most C compilers don't use them 2024-12-14 20:38:54 that is a big part of why GCC stopped using them 2024-12-14 20:39:31 Does PEG rely on packrat or are there other algorithms? 2024-12-14 20:41:28 Because when I researched PEG it was using packrat, which in my opinion is extremely bloated 2024-12-14 20:41:45 Which is the tradeoff for not being recursive descent, which IMO is a non-issue 2024-12-14 20:41:53 xentrac: on the input side, i want to try to do something simpler/cleaner. the generator will do less, and there will be a little more burden on the user's c to arrange things the way you promised to the generator. on the output side, i hate the puke that comes out of lex/yacc. everything has weird yy prefixes and it's a plethora of externed symbols and shit, and if you ever want two grammars in your 2024-12-14 20:42:00 program you have duplicate symbols unless you use bison extensions, and everything gnu produces is ugly 2024-12-14 20:42:22 "PEG" is a kind of grammar; "Packrat" is an algorithm which can parse PEG langauges in linear time (at the cost of using enormous amounts of memory) 2024-12-14 20:42:32 Yeah 2024-12-14 20:42:41 if you remove memoization from Packrat you have straightforward recursive descent 2024-12-14 20:42:46 Yep 2024-12-14 20:42:48 I mean braindead 2024-12-14 20:43:00 When I say braindead I mean writing the parser manually 2024-12-14 20:43:10 aha 2024-12-14 20:43:12 Rather than using a parser generator 2024-12-14 20:43:19 anyway, i didn't go through a CS curriculum so i never had formal exposure to this stuff. this is just self education, i guess. 2024-12-14 20:43:33 the thread on why GCC stopped using them was very interesting but I haven't been able to find it 2024-12-14 20:43:54 zelgomer: I learned about packrat because the Lua devs wrote a lot about it, and implemented a nice PEG library for it 2024-12-14 20:44:18 That is the main way to do parsing in Lua 2024-12-14 20:44:30 i don't want to use someone else's tools though, that defeats the point imo 2024-12-14 20:44:37 Apart from the builtin pattern matching which is basically a dumb greedy regex 2024-12-14 20:44:55 There's a Lua PEG parser which uses a virtual machine 2024-12-14 20:45:10 Well I'm just saying that I didn't learn about this for a CS degree 2024-12-14 20:45:49 In my opinion zelgomer, a lot of obession over languages and grammars is based on some weird ideological stuff 2024-12-14 20:46:14 oh, i see. chat started moving too fast, made it hard for my tiny brain to follow trains of thought 2024-12-14 20:46:15 "A Parsing Machine for PEGs" https://www.cs.tufts.edu/~nr/cs257/archive/roberto-ierusalimschy/lpegcompiler.pdf 2024-12-14 20:46:56 One of my language theory textbooks was co-authored by Noam Chomsky, I don't know if this is related to the cult-like obsession 2024-12-14 20:47:28 Or maybe it's because engineers believe that grammars are systematic so parsers should be just as systematic 2024-12-14 20:48:12 yes, Chomsky extended Panini's on formalizing the grammar of Sanskrit to other languages basically in order to show that behaviorist psychology was bullshit 2024-12-14 20:48:25 *Panini's work 2024-12-14 20:48:27 I used to think Picasso was only famous because he was a communist, not a good artist 2024-12-14 20:48:57 which he was motivated to do because behaviorist psychology was profoundly inhumane in theory (and sometimes in practice) 2024-12-14 20:49:06 Now I'm less sure, I think Picasso was actually a good artist, but maybe there was political stuff there too 2024-12-14 20:49:35 yeah, Picasso was actually a good artist, but the stuff he's most famous for is famous in large part for political reasons 2024-12-14 20:50:52 It was a big 'aha' moment when I found out about is politics, because growing up I always had him shoved in my face and didn't think his art looked good 2024-12-14 20:51:02 Now I'm older I appreciate the art a bit more, but that does also explain things 2024-12-14 20:51:19 yeah. he could also do good-looking art, he just chose not to ;) 2024-12-14 20:52:06 Babies cry when they see Picasso 2024-12-14 20:52:08 A different set of weird ideological stuff was the political struggle of Dijkstra et al. to make computer science respectable and keep it from being turned into a branch of business administration or IBM marketing 2024-12-14 20:52:52 or, like, automotive repair or something 2024-12-14 20:53:10 so their alternative was to make it mathematical 2024-12-14 20:53:17 So I think that makes me his enemy 2024-12-14 20:54:31 kwell, it's more complicated than that. You probably wouldn't want computer science to be a branch of IBM ammarketing either 2024-12-14 20:55:09 I don't know, I'm not a Dijkstra fanboy 2024-12-14 20:55:46 Would software or the world be better off if it wasn't copyrightable? 2024-12-14 20:56:22 probably, yeah 2024-12-14 20:57:12 IBM at the time was working pretty hard to convince the world that programming was a routine menial skill similar to electronics assembly work 2024-12-14 20:57:42 my friend Ann got hired as a programmer because IBM was trying to hire specifically women as programmers so that their customers would think programming was easy 2024-12-14 20:58:57 I can't accept that as stated 2024-12-14 20:59:39 there's a kind of programming where 90% of what you're doing is dealing with a particular API or instruction set rather than figuring out what problem to solve or figuring out a good factorization of it 2024-12-14 21:00:00 which means that none of your code is reusable or has any lasting value 2024-12-14 21:00:46 Well Bill Gates certainly felt differently 2024-12-14 21:00:47 mathematization is one escape from that, and from a certain point of view, all of programming is either dealing with hardware failure or mathematics with a different value system. so I think Dijkstra's approach was a necessary reaction 2024-12-14 21:01:11 I'm very turned off by mathematization and Dijkstra 2024-12-14 21:01:44 anyway, the faction exemplified by Dijkstra was looking for theory 2024-12-14 21:02:05 and thanks to Chomsky we had a lot of theory that was applicable to syntax 2024-12-14 21:02:11 The real reaction to that mindset was Bill Gates and Apple who made software binaries a property of the author/company of the program 2024-12-14 21:02:14 but no formalization of semantics 2024-12-14 21:03:02 if it was up to Bill Gates we'd still be programming with line numbers and GOSUB 2024-12-14 21:03:40 Bill Gates was actually obsessed with APL 2024-12-14 21:03:44 Believe it or not 2024-12-14 21:03:47 oh? 2024-12-14 21:04:02 APL is looking livelier now than in years 2024-12-14 21:04:38 He provided BASIC because that's what people knew and expected back then 2024-12-14 21:04:58 And MS spent a lot of time and effort on a UNIX system before realising they couldn't control that market 2024-12-14 21:05:34 I'm not saying Bill Gates was a hero, but I won't say he was the devil either. I don't honestly know what's right 2024-12-14 21:06:15 There's a push and pull throughout history of protecting different interests regarding software and computing, seems like a lot of rent seeking but I don't pretend to have the answers 2024-12-14 21:06:54 I do think FSF and Richard Stallman are wrong, but I love open source, but Linux is the big contradiction to my belief 2024-12-14 21:07:13 :-) 2024-12-14 21:07:16 Linux might not have happened the same way without GPL 2024-12-14 21:07:28 no, it wouldn't have. I mean it didn't 2024-12-14 21:07:39 Minix and 386BSD are Linux without GPL 2024-12-14 21:08:34 Things change though, Linux wouldn't have been popular if it started today with a GPL license 2024-12-14 21:08:44 what leads you to think Bill Gates was interested in APL? 2024-12-14 21:09:17 Yes, it's possible that this is a bad time to start free software projects in general 2024-12-14 21:09:36 It was mentioned in his "open letter to hobbyists", and is documented in many places 2024-12-14 21:10:52 I think he was basically convinced eventually that it wasn't practical because of the symbols and small userbase 2024-12-14 21:10:52 Bill Gates had a maths background 2024-12-14 21:10:55 I guess it's true that BASIC was already reasonaby popular before Microsoft 2024-12-14 21:11:13 Oh yeah MS didn't make BASIC popular, but they did dominate the BASIC market in 80's 2024-12-14 21:11:18 HP and DEC were shipping programmable terminals that could run BASIC 2024-12-14 21:11:32 I think MS *did* make BASIC far more popular