2021-11-30 02:34:44 has anyone thought about a "superscalar forth"? 2021-11-30 02:35:34 by which I mean, one that makes the superscalar nature of modern CPUs explicit, so it's ergonomic to write code that keeps all the ports (idr the non-Intel term) busy? 2021-11-30 02:44:25 you'd be thinking of something like a transport triggered architecture lang. 2021-11-30 02:45:33 how do those handle superscalarness? just by making the ports explicit? 2021-11-30 02:57:43 yeah, and the timing. 2021-11-30 04:31:41 logand``: The standard draft doesn't have anything about string literals 2021-11-30 04:32:22 But string literals make some sense, I'm not sure exactly how they work. They don't really need 'recognizers' to build it into a FORTH itself, but to add it to a FORTH something like that would help 2021-11-30 04:33:24 I would tend to advise against using stuff like that when the standard syntax is so simple/easy 2021-11-30 04:33:59 parse-name and parse are more portable for getting strings at interpreter, and s" is portable for compiling 2021-11-30 05:32:12 remexre: I might be totally misintepreting but polyFORTH and similar multi-task FORTHs are certainly able to keep 'ports' busy on one thread 2021-11-30 06:31:39 if I wanted to try this year's advent-of-code in forth, what's a good implementation on linux (ideally with some sort of Emacs REPL) to do that? gforth? 2021-11-30 06:31:58 people here kind of dislike gforth 2021-11-30 06:32:03 but it offers a lot of convenience 2021-11-30 06:32:08 ecraven: Yes, gforth is probably what you want 2021-11-30 06:32:24 you won’t program for your embedded thingos, but gforth is solid. Don’t know about emacs integration 2021-11-30 06:32:26 I'd love to use colorforth, but I'm not sure that's a good "introductory" system ;) 2021-11-30 06:32:29 just live in forth repl :P 2021-11-30 06:32:50 I dislike gforth but I think it's a good FORTH to start with, and a good FORTH for many things 2021-11-30 06:33:16 You can't dislike something you don't use, well I don't tend to anyway 2021-11-30 06:33:19 yea, this is mainly to get *started* and to get better at solving actual problems ;) 2021-11-30 06:33:25 It is well documented, shows some practical tricks (OO in 12 lines of forth) etc. 2021-11-30 06:33:36 but yeah fails on the «ethos» checkbox 2021-11-30 06:33:40 ecraven: gforth is a good starting choice, they have an emacs forth-mode too although I don't know how good it is 2021-11-30 06:34:04 nice, so I'll just play around with that. is it ok to ask questions about advent-of-code in here a day later than the problem appears? 2021-11-30 06:34:23 It's okay to ask any time 2021-11-30 06:34:38 We don't really care about AoC that much, or spoilers. For us the hard part is FORTH, not the problem itself 2021-11-30 06:35:01 great, thanks! 2021-11-30 06:35:02 ecraven: Important! Get the latest version of gforth, a late snapshot, don't use your distro's version of gforth 2021-11-30 06:35:10 It's extremely out of date 2021-11-30 06:35:17 veltas: thanks, I'm on arch linux, that might be up to date 2021-11-30 06:35:21 Nope 2021-11-30 06:35:28 They don't have gforth, if it's in AUR then not sure 2021-11-30 06:35:39 yea, I have 0.7.3 from AUR 2021-11-30 06:35:45 That's the out of date one 2021-11-30 06:35:55 The best thing to do is keep that installed, and build a new snapshot 2021-11-30 06:36:07 wow, gforth is developed at tuwien? never knew that 2021-11-30 06:36:10 (because you need gforth installed to build new gforth, I think) 2021-11-30 06:36:25 just build this? http://www.complang.tuwien.ac.at/forth/gforth/Snapshots/current/ 2021-11-30 06:36:29 Yes 2021-11-30 06:36:55 to be honest I am not 100% sure forth is suited to AoC problems 2021-11-30 06:37:03 *but* you will learn plenty 2021-11-30 06:37:09 I've been doing AoC problems in FORTH and I think it's a good exercise 2021-11-30 06:37:17 and dream of DUP SWAP2 ROT in your dreams 2021-11-30 06:37:17 Good luck keeping up with the daily releases though 2021-11-30 06:37:35 Yeah I did learn a lot doing it 2021-11-30 06:37:44 I've not finished last year's yet lol 2021-11-30 06:37:56 yea, the point is mostly to get better acquainted with forth, and the first few days are usually simple enough in any language 2021-11-30 06:38:09 Please go ahead and ask anything you want about it 2021-11-30 06:38:11 I've done APL a few years ago (and forgot almost everything since ;) 2021-11-30 06:38:43 Well they seem to assume easy I/O so you will end up writing some kind of file parsing library for FORTH 2021-11-30 06:39:15 yea, they usually want you to read space-separated numbers or something like that 2021-11-30 06:39:28 Because FORTH has read-file and you sort of have to build it up from that, unless you shove the file input into the forth program itself which is an option 2021-11-30 06:40:27 You can modify / re-use the words you make for that as you go, so it should hopefully become less of a barrier as time goes on 2021-11-30 06:40:43 Also consider doing the big boy data sets 2021-11-30 06:40:54 what are those? 2021-11-30 06:41:21 They're larger input data files that require you to actually employ proper algorithms / data structures 2021-11-30 06:41:48 hehe, where's the fun in doing things properly :P :D 2021-11-30 06:42:01 It's a challenge if you get bored 2021-11-30 06:43:16 I ended up writing merge sort and binary search in FORTH for one of them, and it's definitely a stress-test of FORTH 2021-11-30 07:06:07 sorry to ask about gforth specifically, but does anyone know of a way to disable the ansi color output? running it inside a REPL in emacs shows all the escapes that I don't want ;) 2021-11-30 07:12:30 No worries asking about gforth or any forth in here 2021-11-30 07:13:04 Does -status help? 2021-11-30 07:15:13 I mean running the word '-status', not passing as a command-line argument or anything 2021-11-30 07:19:38 ecraven: Run '-status' and 'default-mode' 2021-11-30 07:20:27 default-mode I believe disables the colors, -status removes status bar (which uses terminal escape sequences, of course) 2021-11-30 07:32:10 Looks like Rather's now interacting with the Forth2020 Facebook group 2021-11-30 08:05:12 thanks! 2021-11-30 08:05:30 now to find out how to pass these two on the command line... ;) 2021-11-30 08:05:49 -e it seems ;) 2021-11-30 08:19:10 Yeah my gforth is alias to 'gforth -e -status' (colors don't seem to be default for me, so I don't need to run default-theme either) 2021-11-30 08:20:04 Here is the AOC big boy solution I did with sort https://github.com/Veltas/aoc20/blob/master/1-2-big.fs 2021-11-30 08:20:39 I'm sure I could improve it somehow now, been nearly a year since and I'm always learning more about how to refactor FORTH 2021-11-30 15:41:15 veltas: i found the string literals in some gforth code, i'll stick to s" 2021-11-30 17:07:31 s" is supported by most forths no? 2021-11-30 17:08:42 and compiles the string into the current word being defined with (str) or dostr prepended 2021-11-30 17:09:47 whose runtime effect is to push straddr and strlen onto the stack and skip execution over it 2021-11-30 18:01:29 Zarutian_HTC: Yes