2023-05-02 03:03:51 KipIngram: Lots of languages ignore #!... on first line 2023-05-02 03:03:54 Like Lua for instance 2023-05-02 03:04:10 Even though comments in Lua don't start with #, that special case is there 2023-05-02 06:06:44 crc: Are you aware that the current definitions of sl and sr in ilo.c are to cause undefined behavior when the shift amount is negative or >= 32 2023-05-02 06:08:24 I ask because I was looking at implementing those, and was trying to decide if I should handle numbers larger than 255 nicely (because on x86 only low byte of operand is the argument) 2023-05-02 06:08:39 And I hadn't even considered negative arguments 2023-05-02 06:09:01 I'm assuming you don't support negative, but not sure what you'd say about larger shifts 2023-05-02 06:11:37 I am aware of this. The spec document does note that negative shifts are implementation specific. 2023-05-02 06:13:15 What about large shifts? 2023-05-02 06:17:09 i.e. on x86-64 I see code generated that would do nothing with a shift of 32, and shift by 1 for 33 etc (masks bottom 5 bits for shift argument) 2023-05-02 06:23:52 I've not really done anything using large shifts; I can mark those as implementation-specific as well. 2023-05-02 06:24:14 Probably for the best 2023-05-02 06:24:15 I really only use the shifts to pack/unpack bytes in a memory cell. 2023-05-02 06:24:40 I can imagine someone using it for exponentiation and getting caught out 2023-05-02 06:31:24 This makes sense. I've added a brief note on large shifts being implementation-specific to the spec document, and will work to document this better. 2023-05-02 06:47:27 How do you get bytes then? Shift by 0/8/16/24 and AND with FF? 2023-05-02 06:48:44 Also are you working mostly in konilo? 2023-05-02 07:05:49 C and C++ links are 404'ing http://ilo.retroforth.org/ 2023-05-02 07:13:56 the links should be working now 2023-05-02 07:15:20 yes, shifting & anding (I have some words for this in blocks 16-18) 2023-05-02 07:16:35 konilo is my primary environment for note taking, programs that don't need much external interaction, and interactive work 2023-05-02 07:19:20 Nice 2023-05-02 08:05:47 Okay I've never really 'got' MDI layouts of programs before 2023-05-02 08:05:53 But now I think I understand the purpose 2023-05-02 08:06:19 Because I'm trying to edit two word documents next to each other on a small screen, and really it would make it much easier if the two could share one toolbar 2023-05-02 08:06:26 But instead it's all squished and unusable 2023-05-02 08:06:47 And there's not much point having two separate status bars either 2023-05-02 08:07:00 But alas Word has removed its MDI mode since 2013 2023-05-02 08:08:42 If you're wondering what MDI means, this is what an MDI layout looks like: https://documentation.help/Win32/img5.jpg 2023-05-02 08:08:52 MDI stands for "multiple document interface" 2023-05-02 08:18:25 Pretty much the precursor to tabbed applications 2023-05-02 08:18:53 And more flexible but more fiddly 2023-05-02 08:27:57 that looks like it could be a nice feature to have in a stackable window manager, at least if you could group arbitrary windows into some sort of bounded box (like a "window frame") with the usual window controls (iconify, minimize/maximize, exit) 2023-05-02 08:31:02 like a mobile equivalent of what some window managers call "workspace", but without being forced to fill your entire display 2023-05-02 08:52:28 Yeah unfortunately I think this is beyond what a 'window manager' in the normal X sense means can do 2023-05-02 08:52:57 As far as I know window managers have no concept of MDI or toolbars etc 2023-05-02 08:53:29 You could do this, you would just be starting without support for any apps 2023-05-02 08:53:57 But I agree that there is a relation between this problem and the window manager that could probably be squared somehow 2023-05-02 10:20:00 Besides gforth, what other Forths should every Linux distro have? The only other Forth on my radar is pforth. 2023-05-02 10:26:42 channel logger is going to be down for a bit while I upgrade the server 2023-05-02 10:42:32 mark4th's stuff is all platform specific 2023-05-02 10:42:44 Surely gentoo allows architecture-specific packages? 2023-05-02 10:43:46 It does 2023-05-02 10:43:53 I'll include them. 2023-05-02 10:44:13 err *I'll add the arch specific Forths to my list. 2023-05-02 10:44:38 Honestly many good forths will be arch specific, because a Forth tends to go down to machine code level 2023-05-02 10:45:05 veltas, you're right... that's why I reconsidered my point of view. 2023-05-02 10:45:18 I can't seem to find a link for konilo 2023-05-02 10:45:21 I'm not sure how to package konilo; this is something I'll be working before the next release 2023-05-02 10:45:27 jgaz: ilo.retroforth.org 2023-05-02 10:45:43 Is that Esperanto? Ilo is tool... not sure about the kon- prefix. 2023-05-02 10:48:02 my son named it. In toki pona, ilo is also tool or machine. kon can be interpreted as spirit or soul, so kon ilo is roughly machine spirit, or the soul of a machine. Given 2023-05-02 10:49:06 Also, to answer you're question about Gentoo veltas: I like it because it's flexible down to compile time options. If I want a debug build of VICE (c64 emulator) it's flag. Also, that ability has nice security implications: I can compile out anything I think has an outsized security risk. Lastly, I can shape it into whatever I want. 2023-05-02 10:49:38 Thanks 2023-05-02 10:49:48 veltas, Oh, and I can run it on every common (and some now uncommon) arches unchanged. That's handy when I have a lab with 2 different CPU arches and a 3d on the way. 2023-05-02 10:50:11 crc so, I wasn't far wrong. 2023-05-02 10:50:39 I suspect Toki five-finger discounted "ilo" from Esperanto. That's okay, we inspire many conlangs. :) 2023-05-02 10:53:09 An Esperanto Forth would be interesting 2023-05-02 10:54:11 What would "spirit-tool" be in Esperanto? 2023-05-02 10:55:32 veltas, okay so 'sevka' for NEXT and '2duoblaĵa' for 2DUP and soforth? 2023-05-02 10:55:43 veltas... hmm... 2023-05-02 10:56:06 I'm drawing a blank on the word for spirit, soul... one sec. 2023-05-02 10:56:08 Did you know that dup is short for duplicate? :P 2023-05-02 10:56:38 Duh, it's spirito 2023-05-02 10:56:53 So spiritilo? 2023-05-02 10:57:11 veltas as a noun, yes 2023-05-02 10:57:27 funny way to say ruxtci 2023-05-02 10:57:29 Well "spirit-tool" is a noun I think 2023-05-02 10:58:06 thrig is the x a literal or a stand-in for a vowel accent? 2023-05-02 10:59:05 x is the ch from Bach or loch 2023-05-02 10:59:15 gotcha 2023-05-02 10:59:30 I will say they did kind of shoot themselves in the foot designing a 'universal' language with all these special marks 2023-05-02 10:59:48 turns out language design is pretty hard 2023-05-02 10:59:52 In Eo we use x as a suffix for a vowel if it's accented. It's easy to read and easy to regex. 2023-05-02 11:00:37 Well, yes, but you have to consider that was fairly normal at the time given the Eastern European context in which it arose. 2023-05-02 11:00:50 I mean the linguistic context. 2023-05-02 11:02:44 Yeah I suppose if you're English and want a universal language you've already got English 2023-05-02 11:03:05 And in those days if you wanted a universal language in the west you would've used Latin maybe 2023-05-02 11:03:14 Latin or French, yeah 2023-05-02 11:03:25 Also Greek was handy in the middle east 2023-05-02 11:03:32 almost as much as Arabic 2023-05-02 11:04:00 Yeah I know a lot of Arabic is derived from Greek 2023-05-02 11:04:48 Dumas was pining for the Greeks, and about a century before that Confucius was pining for the same thing Dumas was 2023-05-02 11:05:06 20% of spanish is on loan from Arabic, thanks to Islamic Spain. 2023-05-02 11:05:09 That is rather my point, the east/west divide. You've got your Latin parts and your Greek parts 2023-05-02 11:05:31 Esperanto steals from both Latin and Greek fairly liberaly. 2023-05-02 11:06:00 To me it seems much more Latin than anything else, but it was designed in a place with a lot of both influences 2023-05-02 11:06:59 How would you translate 'Forth' into Esperanto? 2023-05-02 11:09:27 Kvara That's 4th 2023-05-02 11:09:54 Or 4a as ordinal's are written in Eo. 2023-05-02 11:10:44 Forth is an English word, like "going forth". It's also fourth without a U. 2023-05-02 11:10:56 What would 'forth' as in the English word be translated as? 2023-05-02 11:11:05 Is there some way to combine the two intelligently? 2023-05-02 11:11:08 probably because the computer had a limit of 5 character names 2023-05-02 11:11:10 áfram or fram 2023-05-02 11:12:37 I think I prefer 'fram' as a translation 2023-05-02 11:14:27 The origin is well known to be a lack of characters, but I think the word 'forth' is fitting for the language, and 'fourth' is a bit boring. 2023-05-02 11:15:43 4>> is rather pictographic 2023-05-02 11:16:30 What about 'rekte'? 2023-05-02 11:16:44 Or 'rekta' rather 2023-05-02 11:17:20 antaŭen is probably the closest to 'forth' 2023-05-02 11:19:55 veltas, yeah as in go-forth 2023-05-02 11:20:22 tvístakur is one I heard as a suggestion locally but I aint sure about it captiveness of what Forth is about. 2023-05-02 11:21:14 (tví-stakkur is bi- or di-stack basically) 2023-05-02 11:22:02 What about 'for'? 2023-05-02 11:22:11 -tran 2023-05-02 11:22:11 The esperanto word for 2023-05-02 11:32:02 por 2023-05-02 11:33:04 one thing I really like about Forth is how bootstrapable it is in many regards 2023-05-02 11:34:19 and how little in logic circuits one actually need to implement a hardware version that is the inner interpreter 2023-05-02 11:35:15 see for example excamera j1 or my fcpu-16 and all the ones in Philp Koopmans book Stackmachines The New Wave 2023-05-02 11:36:08 but I do not think Forth is the end all of programming languages or environments 2023-05-02 11:37:11 What!? 2023-05-02 11:37:12 Is it still very common for people to write their own Forths as a rite of passage of sorts? 2023-05-02 11:37:22 Yes no of course Zarutian_iPad you're right :P 2023-05-02 11:37:54 jgaz: Yes common, but not necessary 2023-05-02 11:38:00 for stuff that needs many diffrent kind of machines to run I do recommend FlowBasedProgramming paradigm weaved with Object Capabilities security. 2023-05-02 11:38:06 I do think you learn a bit about Forth if you implement one in assembly 2023-05-02 11:38:46 yebb even just translating eForth into assembly for a fantasy computer 2023-05-02 11:38:51 But really what I keep saying to people is just write stuff in Forth and we'll happily review it and help 2023-05-02 11:39:07 We're actually quite a helpful community in here, if you can believe it, and won't just shit all over your code 2023-05-02 11:39:27 You will get useful suggestions/improvements 2023-05-02 11:40:11 Okay, not Perl in the 90's. 2023-05-02 11:40:27 yeah, I have RTFM'd and I still don't understand. :) 2023-05-02 11:40:30 This is seriously one of the least toxic and most helpful IRC channels I've ever been in 2023-05-02 11:40:41 Yes, now 2023-05-02 11:40:44 I have noticed a lack of the annoying behaviour of “you are trying solve x but here is a solution for y you should use instead” 2023-05-02 11:43:59 for instance, one sys admin wanted to run ssh over a serial port. Why? Because the server in question did not have a working NIC at that juncture but he needed folks that had an running experiment that had equipment connected to retain access 2023-05-02 11:45:20 (lab server connected to various computer controlable equipment if you must know) 2023-05-02 11:45:48 I'm going to try to write a Forth for the 6502 just to learn from it. But, I'm a ways from there. I'm just in the first chapter of Starting Forth. 2023-05-02 11:47:00 That's a good place to start IMO 2023-05-02 11:47:05 that sysadmin had to wade through lot of “you should not do that” non answers on stackoverflow 2023-05-02 11:47:15 Of course I also recommend using an existing forth to practice with in meantime 2023-05-02 11:47:21 Zarutian_iPad: did he end up using something like SLIP or PPP to encapsulate IP over the serial line? 2023-05-02 11:47:51 or maybe something netcat/socat to shove data between tcp socket and tty? 2023-05-02 11:48:18 I'm interested to know what they did, if it actually involved ssh 2023-05-02 11:48:25 veltas, yeah gforth 2023-05-02 11:48:36 that's what I'm working with. 2023-05-02 11:48:37 nope, just used the proxy config commands of ssh and sshd plus socat plus a simple bytestream muxer 2023-05-02 11:48:51 jgaz: And maybe this is worth a skim http://www.forth.org/fig-forth/fig-forth_6502.pdf 2023-05-02 11:49:55 Thanks! I absolutely could not follow DurexForth's source code when I tried to wrap my head around it. It's a fantastic project, I'm not knocking it... I just could not follow. 2023-05-02 11:50:49 jgaz: What was it written in? 2023-05-02 11:51:07 6502 ASM, Acme assembler I think. 2023-05-02 11:51:11 turns out you can use ssh with any bidirectional bytestream thing so long as you provide it with a proxy program plus how to tell the proxy on the cmdline which host and port. Then just uses popen or such on the proxy program 2023-05-02 11:51:39 Zarutian_iPad: That's roughly what I expected, and I'm glad someone went into detail on that eventually (I assume?) 2023-05-02 11:52:51 yebb, the sysadmin just needed a pointer to how you could use the ?? —proxycmd ?? option/config 2023-05-02 11:53:07 https://github.com/jkotlinski/durexforth 2023-05-02 11:54:28 What don't you understand about it? 2023-05-02 11:57:04 It's just general inexperience with 6502 asm. Most of my asm projects are short and linear. They probably have one file. Some of Acme's syntax is different from what I'm used to which didn't help. 2023-05-02 11:57:17 I'm also working my way through Zak's 6502 assembly book right about now. 2023-05-02 11:57:26 Fair enough 2023-05-02 11:57:26 6 months from now I'll probably get it. 2023-05-02 11:57:51 I'm sure you'll get it sooner than that if you practice with it a bit, 6502 is quite small 2023-05-02 11:58:08 And ask here or on ##asm if you want help with understanding something or how to write something 2023-05-02 11:58:35 Yeah, I wouldn't expect a Forth assembly source to be terribly convoluted. But some folks can scramble up almost anything, I guess. 2023-05-02 11:59:12 I went to a fair bit of trouble crafting macros for nasm that made my Forth source itself very readable. 2023-05-02 11:59:30 The macros handle the whole business of constructing the dictionary linked list "under the hood." 2023-05-02 12:00:19 re “But some folks can scramble up almost anything”: yeah I often wondered at that. 2023-05-02 12:00:35 I've looked at durexforth super quickly and it looked quite normal but I've not looked in much detail 2023-05-02 12:00:59 And it's not going to be obvious what does or doesn't make sense to someone totally new to writing Forths 2023-05-02 12:01:19 So more specific info would probably help 2023-05-02 12:04:02 fig forth looks better to me because on an 8-bit machine I'd rather have two bytes per compiled word (or less), definitely not three bytes. 2023-05-02 12:04:57 It being the 'fastest forth' is kind of a nonsense brag in my head because you don't write forth to get the 'fastest' code, you write assembly for that 2023-05-02 12:05:36 veltas: or in my case, design a logic circuit for that case. 2023-05-02 12:05:47 Yes 2023-05-02 12:05:55 I mean if we're talking 'fastest on CPU' 2023-05-02 12:06:07 It's like saying "this is the fastest javascript" but it takes up like 10GB of RAM and isn't even that much faster 2023-05-02 12:06:34 been mulling over adding a BitGrid 16x16 to my fcpu-16 to experiment with 2023-05-02 12:06:42 node used to leak memory in a while loop printing to the console 2023-05-02 12:06:49 it was pretty fast until the OS killed it 2023-05-02 12:07:09 It being 50 times faster than the BASIC is not a huge brag either, 8-bit ROM BASIC's tend to be quite slow 2023-05-02 12:10:27 jgaz: ALso read https://www.bradrodriguez.com/papers/moving1.htm 2023-05-02 12:10:45 After reading Starting Forth 2023-05-02 12:15:47 Yeah, compiled Forth code is going to be pretty fast every time, unless it's just been written in some overly complex way. 2023-05-02 12:16:01 There's just not a lot to do to get from one bit of machine code to the next. 2023-05-02 12:16:31 xelxebar: here's a slightly cleaned up version of that assembler, https://github.com/jhswartz/xfasm 2023-05-02 12:21:05 veltas: Thanks 2023-05-02 12:25:23 If you want to skim starting forth that's fine, if you actually try stuff out, and give special attention to the section on double numbers and internals 2023-05-02 12:25:36 And you can skip the line editor but that's interesting if you fancy it 2023-05-02 12:27:54 And you can also take your time with it and really enjoy it, it's a good book 2023-05-02 12:46:14 just now catching up on logs. jgaz: we can help with 6502 here and there is also #6502 which is still alive 2023-05-02 12:47:10 sad I missed the Excel talk. It's one of my main programming tools. It has excellent string handling so you can copy ASM or C into it then extract constants or whatever else you need to make forth code you paste directly in 2023-05-02 12:47:45 Do you use the macro stuff or just the formulae? 2023-05-02 12:48:28 Also great for Python where you can keep state tables and have Excel write the Python code out for you that you paste directly in. Saved me a huge amount of time when I worked on an assembler with syntax highlitghing and for an emulator for example 2023-05-02 12:48:43 Just the formula is sufficient. Extremely powerful 2023-05-02 12:49:28 The formula side is the more interesting side, the macro stuff is just embedded visual basic 6 2023-05-02 12:49:47 Also for disassembling MIPS machine code back to assembly. Very easy to list patterns out on Excel then paste into Python so disassembler Python code is relatively short 2023-05-02 12:50:22 MrMobius: You've really done some cool sounding tool work. 2023-05-02 12:51:47 I've done only a fairly limited amount - I did write a Python program to generate nasm source for my quite orthogonal conditional return words. 2023-05-02 12:52:15 Those primitives are all the same - they just use different conditional jumps from the whole flock of those x86 has. 2023-05-02 12:52:36 It just spits out a file I can "include" in my main nasm source. 2023-05-02 12:53:28 how do I mix the names lisp and forth? 2023-05-02 12:53:37 KipIngram: that's pretty handy 2023-05-02 12:53:58 listh? forsp? 2023-05-02 12:54:02 KipIngram: here's one thing. It shows a screenshot of the state table in excel halfway down. https://joldosh.blogspot.com/2022/07/6502-interactive-assembler.html?m=1 2023-05-02 12:54:37 re x86 plethora of conditional jumps: why do some ISA designer insist on making so many? 2023-05-02 12:55:41 What's the problem? 2023-05-02 12:55:49 That's a good thing as far as I'm concerned 2023-05-02 12:57:04 makes decoding so complicated and ties together tightly the control flow and data flow causing more opertunities of cpu pipeline stalls 2023-05-02 12:58:18 for instance, I do not recall any compare ops that is purely dataflow from x86 instruction set 2023-05-02 12:59:52 iirc seeing rather shortrange branch heavy code generated from not that complex combined conditionals 2023-05-02 13:00:26 Zarutian_iPad: I assume it's just so you can do any case you want with a minimal instruction sequence. 2023-05-02 13:00:34 you know stuff like (10 < x) && (y <= 100) 2023-05-02 13:00:44 Why do I choose to implement that whole orthogonal family of conditional return primitives? 2023-05-02 13:01:57 Yeah it allows smaller code and easier programming but I've not considered it from the hardware's perspective 2023-05-02 13:03:10 On powerPC you can reduce that to one branch and hint the branch likeliness without extra code 2023-05-02 13:03:17 I get it when x86 and 8088 was designed code size was at premium 2023-05-02 13:03:50 Actually, code size is still at a premium 2023-05-02 13:04:08 Often these days performance is impacted by what you can fit in L1 cache 2023-05-02 13:05:17 Which if I remember rightly is often in range of 64K, so we're still trying to fit stuff into 64K lol 2023-05-02 13:05:28 maybe I been too much diving into digital signal processing and such where one wants to minimize amount of branch points as much as possible 2023-05-02 13:05:57 at least in highly pipelined hw impl of x86 and co 2023-05-02 13:06:32 Well there are the vector instructions which are much more hardware-friendly 2023-05-02 13:07:23 There's the conditional move instruction which is good for that 2023-05-02 13:07:51 yebb, one idea I have is to write an fcpu16 emulator that runs say 8 or 16 of them all at once via a loop of SIMD instructions 2023-05-02 13:08:34 conditional moves, gather and scatter and such 2023-05-02 13:09:03 Really awesome stuff, very interesting, but not my area of choice in my limited time 2023-05-02 13:09:15 I totally understand though 2023-05-02 13:10:21 which means that running lots of these small VMs makes using them as components in FlowBasedProgramming quite viable 2023-05-02 13:10:30 I've done a very tiny amount of vector programming with intrinsics and managed to do some simple calculations close to the theoretical limit 2023-05-02 13:14:12 I'll probably end up playing with it again eventually 2023-05-02 13:21:42 I interested in those high performance calculation methods, particularly in GPU programming. 2023-05-02 13:22:10 I've always had an interest in scientific modeling, and usually an looking at some sort of a field distribution. That kind of number crunching goes well on GPUs. 2023-05-02 13:26:01 And that vulkan bytecode thing as well 2023-05-02 13:36:17 Yeah, I need to study that some. 2023-05-02 15:32:31 Does gforth have a word that restarts the interpreter, flushing all user defined words without exiting? 2023-05-02 15:41:39 also, is there a way to view a word and see how it's defined? 2023-05-02 15:44:45 jgaz: one way to clear at least some of the dictionary is to use MARKER before the word definitions you want to get rid of. MARKER will create a word (that you have to name) which will remove itself and everything defined after it. 2023-05-02 15:44:58 you can use SEE to inspect words 2023-05-02 15:45:07 thanks, man 2023-05-02 15:45:25 SEE QUIT 2023-05-02 15:46:51 https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Forgetting-words.html 2023-05-02 15:47:09 hmm... `see` works for user defined words in gforth but not system defined words. 2023-05-02 15:47:17 oh, interesting... thanks 2023-05-02 15:47:57 depending on how gforth is configured and installed, it will disassemble code words (as opposed to forth words) if that's what you mean by system defined? 2023-05-02 15:49:20 unjust see 'dup' throws a backtrace. That's what I mean by system defined: core forth words. 2023-05-02 15:49:41 I just wanted to see how the core words worked under the hood. 2023-05-02 15:49:51 did you try SEE DUP or SEE 'DUP' ? 2023-05-02 15:50:17 SEE DUP 2023-05-02 15:50:47 if i remember correctly, gforth relies on gdb to disassemble code words on some architectures/platforms 2023-05-02 15:51:07 what are you using? 2023-05-02 15:51:38 I happen to be on an x86_64 box. 2023-05-02 15:53:18 what do you get for SEE DISCODE ? 2023-05-02 15:55:28 disam-dgb ... 2023-05-02 15:56:01 is gdb installed? 2023-05-02 15:56:16 hmm... 2023-05-02 15:56:53 hmmm... it looks like not. Let me tripple check 2023-05-02 15:58:58 Installing gdb... 2023-05-02 16:02:25 ok, so now with gdb installed 'see dup' returns 'Code dup' and locks up. 2023-05-02 16:03:22 reasons for printf debugging #42: gdb crashing 2023-05-02 16:04:17 jgaz: what's in /proc/sys/kernel/yama/ptrace_scope? 2023-05-02 16:04:37 well, I just kill -9'd gforth 2023-05-02 16:04:52 should I reproduce the error and then check that path? 2023-05-02 16:05:25 the contents won't change, but you might want to try writing 0 to that file if it's set to anything else 2023-05-02 16:09:44 on this linux/x86-64 box, if i (echo 1 > /proc/sys/kernel/yama/ptrace_scope) then ask gforth to SEE DUP, it locks up after "Code dup" and if i hit ^\ then it snaps out of it and give me a hexdump and waits for more user input 2023-05-02 16:10:46 hmm... 2023-05-02 16:10:50 when i say BYE, i have to reset my terminal because the echo's gone. but if i then (echo 0 > /proc/sys/kernel/yama/ptrace_scope) and try to SEE DUP again, it disassembles the word correctly 2023-05-02 16:10:50 I'll try that 2023-05-02 16:12:56 the reason for having to disable ptrace_scope is because gdb is attaching to the process (so ptrace(2) is called) and that's getting blocked by yama 2023-05-02 16:13:29 or use an older version of linux that lacks security foo 2023-05-02 16:14:15 yeah, it's not zero. Let me try something. 2023-05-02 16:56:45 I wonder if I can live with a weird mix of lisp and forth 2023-05-02 16:57:28 lisp is something like a backwards forth 2023-05-02 16:57:40 (+ 1 2 3) 3 2 1 + 2023-05-02 16:57:57 err, except forth needs more + there to eat the stack 2023-05-02 16:57:59 how about reverse polish lisp? 2023-05-02 16:59:28 my mix is kind of: [ 1 2 3 ] sum 2023-05-02 16:59:44 that would be like: (+ 1 2 3) 2023-05-02 17:00:02 I just abuse lists a lot 2023-05-02 17:00:05 https://termbin.com/spgy 2023-05-02 17:00:33 even colon words are just a list 2023-05-02 17:00:44 well one object with a list 2023-05-02 17:01:02 { oh: { content: [Array], type: 'colon', env: {}, name: 'oh' } } 2023-05-02 17:01:23 they have their own environment 2023-05-02 17:01:49 even builtins do 2023-05-02 17:40:51 jgaz: gforth is a bit broken on most distros, try building the latest snapshot (with gforth 0.7.3 installed from package manager) 2023-05-02 17:41:43 https://www.complang.tuwien.ac.at/forth/gforth/Snapshots/current/gforth.tar.xz 2023-05-02 17:42:03 2023-04-15 2023-05-02 17:42:06 +1 for RPL 2023-05-02 17:44:58 jgaz: Old Forths have a word EMPTY for forgetting everything you defined 2023-05-02 17:45:10 And FORGET for forgetting everything up to a specific word 2023-05-02 17:46:02 MARKER is like FORGET but it also restores things like the wordlist search order, so words defined with MARKER have a little extra state saved 2023-05-02 17:46:05 to do that 2023-05-02 17:46:41 QUIT resets the return stack and brings you to the interpreter 2023-05-02 17:46:55 and ABORT resets the data stack as well before going to interpreter 2023-05-02 17:48:37 what are the forth words you find more useful? 2023-05-02 17:49:22 What do you mean? 2023-05-02 17:49:31 in general 2023-05-02 17:49:33 I'd say DUMP is probably one of the most useful words 2023-05-02 17:49:42 for interactive forths when all else fails 2023-05-02 17:49:46 the words forth has you find more useful/like the most 2023-05-02 17:50:10 To go with that ' 2023-05-02 17:50:33 on an unfamiliar Forth I like to use WORDS and SEE 2023-05-02 17:50:50 hmm 2023-05-02 17:50:51 on its repl that is 2023-05-02 17:51:19 VLIST is a good option too if WORDS is missing 2023-05-02 17:51:49 If WORDS or SEE are missing I can still usually figure it out with DUMP and ' 2023-05-02 17:52:37 EDITOR is awesome, and a word for running shell commands is important on desktop forths 2023-05-02 17:54:26 the best words imho are the small words you've factored out of fat words 2023-05-02 17:54:45 true 2023-05-02 17:58:02 +FIELD is a one-line word that provides support for structures 2023-05-02 18:33:01 Ugh that's enough comp.lang.forth for today 2023-05-02 18:33:35 I don't know how people cope with all the drama on there. I suppose you just have to filter out a few addresses and then it's readable 2023-05-02 18:35:52 I don't tend to read those google groups 2023-05-02 18:36:04 only when google gives me a link 2023-05-02 18:36:17 but I dislike the ui of google groups 2023-05-02 18:45:37 I gave up on following comp.lang.forth; even with trying to filter it proved too troublesome to keep reading 2023-05-02 18:52:30 and isnt the crazy Peter Forth guy on there the host of forth2020? 2023-05-02 19:00:08 I only had a look on a plan9 google group to see how they bullied Theo 2023-05-02 19:00:21 they even made a fortune with him xD 2023-05-02 19:00:42 https://man2.aiju.de/1/fortune 2023-05-02 19:00:59 Theo is more specific than troll; it presents insults from OpenBSD founder Theo de Raadt. 2023-05-02 19:01:05 xd 2023-05-02 19:01:14 poor guy 2023-05-02 19:01:32 kicked from netbsd, bullied by plan9 2023-05-02 19:02:02 actually the plan9 guys destroyed him 2023-05-02 19:03:16 they told him something like "when you make a secure program that does not get compromised with 5 or 6 bytes you can actually get cocky" 2023-05-02 19:07:00 MrMobius: yes 2023-05-02 19:07:23 hard to believe honestly. he seems somewhat saner on video 2023-05-02 19:07:56 maybe google.groups transforms people 2023-05-02 19:08:11 I never understood why they use that 2023-05-02 19:08:21 I assume nostalgia 2023-05-02 19:08:45 comp.lang.forth can be accessed through google groups, but is a separate thing 2023-05-02 19:08:57 I'd assume just a mailing list 2023-05-02 19:09:04 newsgroup 2023-05-02 19:09:07 it's part of usenet, which is quite usable outside google's stuff 2023-05-02 19:15:14 https://comp.lang.forth.narkive.com/mf61wKNi/fpga4th 2023-05-02 19:15:20 is this the drama you mention? 2023-05-02 19:15:40 two guys trying to demonstrate the other is wrong 2023-05-02 19:19:01 I have no fucking idea about the subject, but the "Lorem ipsum" guy at least tries to talk with actual words while the other shows a lot of hate towards him 2023-05-02 19:19:51 he is just trying to tell that forth is not the answer of everything, or that's what I see 2023-05-02 19:20:06 the answer of everything is 42 2023-05-02 19:20:15 so it's not forth :/ 2023-05-02 19:20:32 there are a handful of people there who have been dragging it down for well over a decade now 2023-05-02 19:24:46 Forth might possibly be "the answer for everything" if no pre-packaged functionality was allowed. If you had to write whatever the task at hand is *entirely* without using any libraries or packages etc. - you only got "the language" and nothing else, and you had to do everything. 2023-05-02 19:25:01 I think Forth would be in the running in plenty of cases. 2023-05-02 19:26:41 I remember having some interesting discussions there, back in the 2000-2015 timeframe; much less so in the last 5-8. 2023-05-02 19:28:07 I'd like to have a forth implementation/standard that covers "modern/desktop general purpose" stuff 2023-05-02 19:28:25 mainly db, sockets, gui 2023-05-02 19:29:06 but forth seems to be only used on embedded devices :/ 2023-05-02 19:29:23 so I made my own abomination, but will never be forth 2023-05-02 19:29:42 I just wanted forth to be my main language 2023-05-02 19:29:44 It does excel in embedded work. 2023-05-02 19:30:22 and it's kind of sad to have this abomination, cause I can't experience what a real forth is 2023-05-02 19:30:27 vms14: it's commercial, but https://8th-dev.com is kind of that 2023-05-02 19:30:47 I'm poor and using a system that isn't likely to be able to run it xD 2023-05-02 19:30:54 had seen it 2023-05-02 19:31:10 gforth should be the way with ffi to C 2023-05-02 19:31:25 actually I was amazed on how easy is to add a C binding on gforth 2023-05-02 19:31:33 you just use stack notation for it 2023-05-02 19:32:00 but gforth does not even work in my system, and when it did, the ffi was unable to find libraries 2023-05-02 19:32:17 I think I'd try to stick to gforth if that worked 2023-05-02 19:32:23 make it work 2023-05-02 19:32:33 nah, it's easier to make my own abomination xD 2023-05-02 19:32:58 anyways now I'm targeting javascript, due to how easy is to deploy a web application and how many users can it reach 2023-05-02 19:33:10 I've never had much luck with gforth's ffi 2023-05-02 19:33:22 I have a perl implementation which is my shell, I can also make one with node, but meh 2023-05-02 19:33:34 me neither wrt to gforth's ffi 2023-05-02 19:33:48 I think about making a C version, more close to a real forth the next time 2023-05-02 19:33:53 at least for my shell 2023-05-02 19:34:37 it's sad to realize I'm loosing a lot of features of forth and I'm not learning forth, but just a concat lang 2023-05-02 19:35:15 anyways for now I just need results, something that lets me make applications 2023-05-02 19:36:25 I tried gforth ffi in debian and worked fine 2023-05-02 19:36:28 no issues there 2023-05-02 19:36:36 making syscalls from gforth was a bit easier though. provided you knew which registers gforth itself was making using of (to prevent clobber) and that changes drastically between compiler and its optimization level 2023-05-02 19:37:24 another option is to use pipes with a normal forth in order to add stuff like sockets and db access 2023-05-02 19:37:27 but it just sucks 2023-05-02 19:38:00 also making a forth-like in C interets me as I always miss Xlib 2023-05-02 19:40:41 but it's a pain on the ass 2023-05-02 19:40:47 roll your own runtime linker in your new language? 2023-05-02 19:41:14 I could have some ffi to C even with perl 2023-05-02 19:41:23 and add some stuff similar to gforth's ffi 2023-05-02 19:41:41 even compile a .o and load it dynamically 2023-05-02 19:41:55 and also use libffi which allows for even more langs 2023-05-02 19:42:24 why not open the ELF and parse it yourself? 2023-05-02 19:42:28 xD 2023-05-02 19:42:47 I'm masochist, but I don't reach that level 2023-05-02 19:44:02 i think the masochistic path is expecting all those shiny libraries to solve all of your problems ) 2023-05-02 19:44:40 well in the case of perl it would be XS 2023-05-02 19:44:49 I think it can work fine 2023-05-02 19:45:29 but the real problem is my toy language sucks 2023-05-02 19:45:37 hmm, what's the hinderance to using C? 2023-05-02 19:46:08 it's a pain on the ass, I got used to get everything done for me 2023-05-02 19:46:26 and I start to worry about stuff I would never worry, for some reason 2023-05-02 19:46:58 like the size of the structures, the way data is implemented/represented, etc 2023-05-02 19:47:24 I start overthinking and getting picky for stuff I never worry on other languages 2023-05-02 19:48:49 and then I end abusing macros and want some kind of C preprocessor 2023-05-02 19:48:51 we're always here if you want to give it another try :) 2023-05-02 19:49:38 yeah, the next time I'll try to just have a normal stack 2023-05-02 19:49:52 and put strings and alike on memory, then just give a pointer on the stack 2023-05-02 19:50:18 but thinking about why I would want C, performance is not a reason 2023-05-02 19:50:33 and library usage can be bypassed with ffi in almost any lang 2023-05-02 19:51:08 maybe deploying is nicer, as long as I stick to ansi C for example 2023-05-02 19:51:33 I could even put the language on android studio with their "Native C" 2023-05-02 19:54:03 yeah, why the heck I want C 2023-05-02 19:54:09 xd 2023-05-02 19:55:00 assembly is more interesting 2023-05-02 19:55:32 but then I have no libraries, unless I mix C with asm 2023-05-02 19:56:03 didn't Mencius say something about it's good to not have to reinvent things? 2023-05-02 19:56:31 sometimes is fun 2023-05-02 19:56:55 and if you learn on the process it's worth, even if you end using the existing ones instead 2023-05-02 20:04:36 https://holonforth.com/tclforth.html 2023-05-02 20:04:38 :0 2023-05-02 20:32:21 every time I come here I realize I want a real forth and not the shit I have 2023-05-02 20:32:30 ACTION cries in spanish 2023-05-02 20:33:07 well mainly it's I've not discovered forth enough to steal more concepts 2023-05-02 20:33:21 work through starting forth? 2023-05-02 20:33:33 I was going to download it 2023-05-02 20:34:17 althought the real book I have to read is Thinking Forth 2023-05-02 20:34:27 that's how to program, not how to forth 2023-05-02 20:34:34 yeah, I had read a bit 2023-05-02 20:34:44 but I don't get the "philosophy" 2023-05-02 20:34:51 just some stuff I already knew 2023-05-02 20:35:21 a guy talked me of that book like it was the bible of programming 2023-05-02 20:35:49 it's mainly that guy who made me end trying forth 2023-05-02 20:36:13 he says he does not use forth the language, but the philosophy always 2023-05-02 20:36:36 I didn't get any kind of enlightenment, did you guys? 2023-05-02 20:38:04 I feel like if I dig more I'll end understanding something cool 2023-05-02 20:39:46 http://www.ultratechnology.com/forththoughts.htm 2023-05-02 21:33:18 There's a lot of good stuff in those sites. 2023-05-02 21:34:40 I don't think you can just read a book and "get the philosophy" though - I think it seeps in slowly as you use it. 2023-05-02 21:35:37 reads a shaolin manual... I know kung-fu! 2023-05-02 21:38:50 Everyone knows that doesn't work - you gotta have Tank download direct to your brain. 2023-05-02 21:39:03 ... and even then ... 2023-05-02 22:00:17 http://www.ultratechnology.com/forth.htm 2023-05-02 22:00:33 it talks about how people does not understand chuck 2023-05-02 22:00:47 and how they end being on the opposite direction 2023-05-02 22:02:48 Chunk seems to have kept himself better employed than Confucius did 2023-05-02 22:15:56 There are words like CASE that Chuck refers to as abominations 2023-05-02 22:15:58 :0 2023-05-02 22:16:20 Speaking of abominations, don't PICK at your code. Don't PICK, don't ROLL. Don't delay doing things and never POSTPONE. 2023-05-02 22:16:42 There is a long list of words in the ANS Forth standard that Chuck would say you should avoid if not simply remove from your system. 2023-05-02 22:16:56 this is kind of sad 2023-05-02 22:17:09 Yeah, Chuck grew a very firm mentality about such things over the years. 2023-05-02 22:17:16 the language standard does not meet the criteria of the author 2023-05-02 22:17:36 I expect he'd be opposed to all of the "dynamic this" and "late binding that" stuff that's come along in modern languages. 2023-05-02 22:17:42 it's likely the ans standard makes chuck sad 2023-05-02 22:17:52 He was always in favor of pushing decisions into the earliest part of the process possible. 2023-05-02 22:18:11 Do do at run time what you can do at compile time. Don't do at compile time what you can do at edit time. Etc. 2023-05-02 22:18:27 A general aversion to trying to write "universal" code. 2023-05-02 22:20:44 it says also that there's no forth book that teaches how chuck thinks the code should be 2023-05-02 22:21:00 Yeah - I'd buy that. 2023-05-02 22:21:13 Chuck was always running ahead of the crowd. 2023-05-02 22:21:44 it's sad to see how no one seems to understand his point of view 2023-05-02 22:23:00 stay with stacks, words, blocks as a start and don't be in a hurry to abandon them for things from other languages like locals, objects and files. Think through the problem, spend your time in the design phase figuring out how to balance the program between interpretation and compiled code execution. Don't just jump in writing code and compiling everything. Use the ICE concept. Don't abuse libraries. Compile what you need not every 2023-05-02 22:23:01 library and extension. Use simple control flow and layout of the code to enhance the factoring factoring factoring. Use BEGINs rather than +LOOP 2023-05-02 22:23:35 he tries to make a language which is all about simplicity 2023-05-02 22:23:47 and we add complexity just cause we look at other languages 2023-05-02 22:32:20 Forth, smaller, simpler, easier, more powerful, faster, less buggy, more maneuverable, etc. 2023-05-02 22:32:35 we make it bigger, more complex and slower :/ 2023-05-02 22:32:54 they* (I just make abominations that can't be considered forth) 2023-05-02 22:40:00 Looks like colorforth.com just points to a generic registry page now :/ 2023-05-02 22:40:17 archive.org has copies, but I wonder what happened. 2023-05-02 22:40:56 Would be interested in using his code as a starting point of learning Forth 2023-05-02 23:19:52 Chuck's code? 2023-05-02 23:20:06 I generally found his code to be so rarified that it was hard to follow. 2023-05-02 23:20:21 Though it may be that I've only seen a small amount of it. 2023-05-02 23:59:34 KipIngram: Rarified? Not sure I catch your meaning in this contetx.