00:00:00 --- log: started forth/18.11.17 00:19:08 --- join: dys (~dys@tmo-110-15.customers.d1-online.com) joined #forth 00:42:48 --- quit: pierpal (Ping timeout: 244 seconds) 00:45:05 --- join: wa5qjh (~quassel@175.158.225.223) joined #forth 00:45:05 --- quit: wa5qjh (Changing host) 00:45:05 --- join: wa5qjh (~quassel@freebsd/user/wa5qjh) joined #forth 01:11:17 --- join: pierpal (~pierpal@host91-236-dynamic.22-79-r.retail.telecomitalia.it) joined #forth 01:19:26 --- quit: warriors (Quit: Connection closed for inactivity) 01:27:30 --- quit: dys (Ping timeout: 245 seconds) 01:52:09 --- join: groovy2shoes (~groovy2sh@unaffiliated/groovebot) joined #forth 02:05:04 --- quit: ashirase (Ping timeout: 264 seconds) 02:08:38 --- join: ashirase (~ashirase@modemcable098.166-22-96.mc.videotron.ca) joined #forth 02:24:11 --- quit: pierpal (Quit: Poof) 02:24:31 --- join: pierpal (~pierpal@host91-236-dynamic.22-79-r.retail.telecomitalia.it) joined #forth 02:58:45 --- quit: pierpal (Read error: Connection reset by peer) 03:02:01 --- quit: wa5qjh (Ping timeout: 268 seconds) 03:44:13 --- join: john_cephalopoda (~john@unaffiliated/john-cephalopoda/x-6407167) joined #forth 03:49:55 --- join: dys (~dys@tmo-102-19.customers.d1-online.com) joined #forth 04:58:26 --- join: pierpal (~pierpal@host91-236-dynamic.22-79-r.retail.telecomitalia.it) joined #forth 05:00:48 http://www.complang.tuwien.ac.at/anton/lvas/stack-abgaben/07w/glforth/downloads/glforth_r30.tar.gz is pretty awesome 05:00:55 [ http://www.complang.tuwien.ac.at/anton/lvas/stack-abgaben/07w/glforth/ ] 05:05:18 --- join: cratuki (~Craig@leaf.vm.bytemark.co.uk) joined #forth 07:00:29 --- quit: dave0 (Quit: dave's not here) 07:02:25 I did it! 07:02:29 https://thecutecuttlefish.org/tmp/sixel.png 07:02:41 I successfully converted my program to sixel rendering! 07:03:37 https://thecutecuttlefish.org/tmp/sixel2.png 07:03:46 gg, very cool 07:06:46 https://gist.github.com/jmf/b76f7faaa69ecb0a6ee8722e77844095 07:07:29 Simply draw whatever you want to FB and draw it to the screen with REDRAW 07:07:35 ANS style drives me nuts, That could be like, 10 lines of code 07:07:36 Super-simple API. 07:07:44 AND more readable. 07:08:29 WilhelmVonWeiner: I feel like ANS style is often more readable for simple code. Having a few dozen functions can be really confusing. 07:09:08 You know what's confusing? long functions you have to scroll through. Forth should read like english. 07:11:37 I commented the functions a bit better. 07:13:50 Don't get me wrong, cool code 07:14:06 Thanks, I understand it. Different people, different coding styles. 07:15:20 It's distributed under a WTFPL license ( Basically public domain ), so if you feel like it you can change it in order to make it clearer. It would help me to see how you would structure that code. You are way deeper in the Forth paradigm than I am :) 07:17:28 "Forth should read like english." I've adopted the position that this is an unrealistic and counter-productive goal 07:18:09 WHAT >R MAKES OVER DUP YOU SWAP 2R> SAY RDROP IF THAT THEN 07:18:44 as with all of my forth criticisms i have to add the disclaimer that maybe i've just never seen good forth code, but in my (admittedly limited) experience, software concepts generally don't map very well to spoken english 07:19:57 I just mean like the classic WASHER example. WASH SPIN RINSE SPIN. 07:20:02 usually what happens when people strive for that is that they choose their words so that when they're arranged in a particular order it reads like english (as you demonstrated above), but they don't actually provide any insight into their function 07:20:11 WilhelmVonWeiner: Sounds like one of those scam e-mails :þ 07:20:39 yeah, i think that's a terrible, overly-simplified example 07:20:46 Chuck's always insisted the design of Forth as "100-200 words that let you build a one-line sentence to run your program." 07:21:06 paraphrased but equivalent 07:21:31 WilhelmVonWeiner: C is just like that. You only need the function int main(void); ;þ 07:22:32 but to what end? again, he builds them to achieve some artificial goal of producing "wash spin rinse spin", but they only work that way in that one context and if you ever need to make changes then everything is so tightly coupled that it's not easy 07:23:45 "The basic principle has a corollary: Do Not Speculate!" 07:23:51 in other words, i'm saying that your language should describe the problem. striving for "wash spin rinse spin" seems backwards, like you're trying to map the problem to english 07:24:44 that *is* the problem of a washer. It's all it does, wash, spin, rinse, spin again, problem domain encapsulated 07:25:00 i get the "do not speculate" commandment; i was already a believer in that before i ever found forth, but loose coupling is another matter 07:25:19 WilhelmVonWeiner: What if I want to give parameters into that simple cycle? 07:25:51 and what if you actually saw the definition of those words? as an engineer, what the fuck does "wash" do? 07:25:52 E.g. "Wash at 60 degrees, spin for 10 minutes, rinse for 10 minutes, spin for 5 minutes" 07:26:14 john_cephalopoda: that's what variables are for 07:26:30 zy]x[yz: an engineer would grep for "wash" in the source code 07:27:51 WilhelmVonWeiner: Why not stack? || 60 DEG 10 MIN WASH || 10 MIN SPIN || 10 MIN RINSE || 5 MIN SPIN || 07:27:54 right, you have to go read its implementation to have any clue about what it does or how it works or what side effects there will be. it's not clear from the context where it's used 07:28:32 does it run a whole wash cycle? does it just start a wash cycle? maybe it doesn't actually do anything but arranges for the tub to be filled before spin is called 07:28:42 zy]x[yz: I don't see the problem with that. Do you know what the function prototype `spin(int, int, bool)` does? 07:29:26 Where : MIN 60 * ; - so you can also use it with seconds. 07:29:33 in c-like languages there is generally a convention that your verbs do something and it completes before it returns 07:29:41 john_cephalopoda: I mean you could hardcode em, don't see why not 07:29:44 and the arguments are clear 07:30:15 zy]x[yz: I don't see what "it completes before it returns" means. Do you mean RDROP inteference? 07:30:33 but I still wouldn't strive for a main() that looks like "wash(); spin(); rinse(); spin();" 07:30:35 WilhelmVonWeiner: I don't want to wash all my stuff at 60 degrees. Some things are better washed at lower temperatures. Also when I ship it to the USA, I want to use Fahrenheit. 07:31:10 zy]x[yz: then you're effectively inlining the contents of the functions wash() etc into main() 07:31:23 no 07:31:26 john_cephalopoda: that's what variables are for 07:31:40 again, i think it's just a terrible example on general 07:32:24 i would never expect a washing machine's firmware to be reduced to such basic primitives 07:32:51 I agree, of course 07:33:01 but it gives you gist of it 07:34:40 so when you're dealing with registers and sensors and pumps and variable-speed motors, etc. your language should reflect that. what are you doing trying to build some final "wash" word just so that you can produce a one-word main with a completely unhelpful name? 07:36:01 I don't see the name as unhelpful, and I don't see main being one word as reasonable. I just see it as a result of solving your problem top-down. 07:36:26 "What do I need to implement? The wash cycle. So I'll encpsulate all that in the word WASH..." 07:37:07 etc etc until your words are using primitives and that. 07:37:19 well, generally when i use that approach i rarely come away with something that reads like english 07:37:47 That's a testament to the versatility of Forth I suppose 07:38:02 You don't have to write it to suit someone else's programming style. Like Go 07:42:46 --- join: rdrop-exit (~markwilli@112.201.164.82) joined #forth 07:43:56 https://www.evanmiller.org/four-days-of-go.html 07:44:03 Good evening Forthwrights :) 07:45:07 afternoon rdrop-exit, what's up 07:45:44 Winding down for the day, almost midnight, thought I'd check in on the Forth luminaries 07:49:22 i was being contrarian about forth style, per usual 07:49:56 De gustibus non est disputandum 07:50:16 I'm apalled at much of the Forth style I see 07:50:48 give us a peeky peek at your code then 07:51:01 brb 07:51:34 : outer ( -- n/a ) 07:51:34 token try dispatch intercept refresh recur ; compile-only 07:51:48 I like Leo Brodie's guidelines http://forth.org/forth_style.html 07:51:57 rdrop-exit: I like that 07:51:59 The formatting gets screwed with when I paste it into irssi 07:52:14 Thanks 07:52:53 I'll try pasting in a line at a time 07:53:03 : interpreter ( -- ? ) 07:53:14 interpretation lookup if 07:53:22 >code execute 07:53:30 then; number ; compile-only 07:54:22 brb 07:54:26 I usually put the last ; on a new line, like I do with the finishing } of a C function. 07:55:04 Just seems like a wasted line. We can see the end of definition, it's where the code stops/the next definition starts 07:55:16 WilhelmVonWeiner, i don't think you were being contrarian, i think that was me. i totally acknowledge that your position is in line with traditional forth wisdom 07:56:38 I feel like traditional Forth wisdom is lost and widely butchered. Jeff Fox writes horror stories about ANS programmers, in my nightmares I'm forced to debug a 20K line definition 07:56:50 LOL 07:56:57 true 07:58:21 I agree Wilhelm 07:58:39 * Zarutian just tries to have the definitions short enough to fit inside 80 chars each. 07:59:06 lol. I try, picked the habit up from Sam Falvo II 07:59:30 Zarutian: you ever redefine words to make them a little shorter to type 08:00:22 one time I defined `: C' POSTPONE [CHAR] ; IMMEDIATE` to save the 3 chars and felt ashamed. At least C' makes sense 08:00:56 no, to me typing is not the ardurus 08:01:06 s/the/so/ 08:01:35 * Zarutian is watching Adam Savage making a guitar case and just heard the word the 08:02:07 I usually re-read any code a week after writing it, without looking at the documentation. If it's not fairly obvious to me, I rewrite/refactor. 08:03:30 * documentation and comments 08:05:43 actually a very good idea 08:13:41 Although low level code is often non-obvious no matter what your style is. It just demands attentive reading, which is another reason to keep definitions short. 08:17:03 depends on how the device is designed and how to interface with stuff inside it 08:19:17 contrasting Convert a color code to its diagonal opposite on the 08:19:18 RGB color cube. 08:19:29 : contrasting ( color -- color' ) white xor ;inline 08:19:50 is ;inline your IMMEDIATE 08:20:31 No, it means the compiler will inline the word's code instead of compiling a call to it 08:21:09 oh right. ofc 08:21:41 why is that required? slow controlflow switching? 08:23:07 It's useful for words that are short and for words that affect the return stack 08:23:36 Assuming either a SRT or TTC Forth 08:25:25 how do you implement ;inline ? 08:26:48 There's an inlining length field in the header. 08:27:14 If it is non-zero the compiler lays down the code 08:27:33 if it is zero, the compiler lays down a call to the code address 08:27:54 I see 08:28:04 There was a recent discussion on r/Forth that was related to this, just a sec 08:29:07 In this thread I explained the concept in a reply: 08:29:24 https://www.reddit.com/r/Forth/comments/9u0h7u/idea_for_making_forth_compiler_more_pluggable/ 08:30:35 See my answer to "Maybe you can help me understand a more normal way to do it?" 08:31:31 I would have something like «inline» that is an immediate word and is at the start of the code of the definition. Makes the definition also an immediate word. The non-immediate behaviour of «inline» would then copy the x number words/cells after it. 08:32:25 copy it into wherever the definition that «inline» is in is being used. 08:32:34 I wish Ron's 8th was Free Software. I really want to use it. 08:33:12 I think my way is simpler and more general (IMHO) 08:35:00 Immediate and inline are different concepts so to speak 08:36:25 just using the former to implement the latter 08:36:52 Wilhelm: Ron's post on the "Elvis" operator gave me the impression that it's too high level a Forth for my tastes 08:38:04 Yes, but it's mega portable and comes with a massive stdlib as far as I can tell 08:38:15 would be great to mash out actual software software 08:39:33 I haven't looked into it 08:41:57 Zarutian: I think in a SRT or TTC Forth the "machinery" for implementing inlining is really just a line of code in the compiler. 08:42:37 Actually, in compile, 08:43:05 : compile, ( ca -- ) 08:43:13 dup >link #inline ?dup if bmove, then; 08:43:22 & call 32, ; compile-only 08:43:46 Sorry, the alignment is off again, I'll retry pasting... 08:43:53 : compile, ( ca -- ) 08:44:01 dup >link #inline ?dup if bmove, then; 08:44:10 & call 32, ; compile-only 08:44:31 hmm.. but what if you want to extend inlining further by having 'holes'/parameters like in many Scheme hygenic macros? 08:44:36 The first line is the one that handles inlining 08:48:17 I don't anticipate such a need, but I don't think it would affect the core inlining machinery, it would be taken care of in a defining word that generates the code to be inlined I suppose 08:49:59 I try to keep simple things simple 08:52:22 Here's the description: 08:53:31 compile, Compile a call to a code address, if the word has a 08:53:40 non-zero inline length simply inline the code instead. 08:55:37 Sixel code is online now: https://thecutecuttlefish.org/mandelbrot1.html 08:55:47 Press 3 to toggle to it. 08:55:52 Sorry about the formatting 09:02:36 Cool 09:04:29 It's 1am, time for beddy-bye, chat again soon. Keep on Forthin' 09:04:50 --- quit: rdrop-exit (Quit: Lost terminal) 09:40:39 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 09:42:27 Just ate some big ol tacos 09:43:09 : TACO (--) HARD SHELL BEEF MEAT CHEDDAR CHEESE HOT SALSA ; TACO EAT 09:44:20 Mmm, tacos sound good... 09:44:58 Tacos and beer, setting up my Acme plumber 09:47:33 I'm working on documentation 09:49:06 for Retro? 09:49:15 Yes 09:49:53 It's already really well documented 09:50:03 impressively so 09:52:04 I still want more. Specifically a short handbook that explains the syntax and overall operations better, and detailed docs on the various interfaces. 10:36:30 crc: have you considered looking how DCPU-16 does 'hardware' interfacing? it helps with program images to find out and enumerate what is available and I think it is quite extensible too. 10:40:46 crc: Nice. That would be really useful. 10:41:25 --- quit: tabemann (Ping timeout: 252 seconds) 11:22:48 --- join: warriors (uid309652@gateway/web/irccloud.com/x-mfdqsfidwhdrmnmr) joined #forth 11:33:30 Zarutian: yes. I have a copy of the dcpu16 spec and have looked at the HWN and HWQ instructions. 11:33:52 I may do something similar in the future to make it possible to detect the I/O functionality each interface provides. 11:35:38 I've not needed this yet though. 11:53:55 --- quit: pierpal (Remote host closed the connection) 12:06:05 retro on the DCPU16? :D 12:06:46 Not anytime soon :) 12:07:03 Retro/386 when 12:07:31 I once worked on Project Trillek, the attempt at making an open-source game inspired by 0x10c. 12:15:22 WilhelmVonWeiner: the Nga-based os version for x86? 12:16:25 yeah, when can I boot Nga on my 32 cores 12:16:34 The basic repo 12:16:41 Making an OS isn't hard. 12:16:59 it's already a thing? sweet 12:17:10 The basic repl should be bootable already. I am hoping to get more drivers in place next year and make it installable 12:18:09 what happens if you crash the repl? 12:18:27 reboot? 12:19:00 Usually 12:20:18 I'll need to update the .iso sometime (forthworks.com/retro/download/retro.iso.zip) 12:21:44 I really have to learn me some retro. 12:22:15 aside from the lacking byte manipulation it's my favourite Forth 12:22:19 It has a giant word set and the syntax is a quite different from ANS. 12:27:22 I don't think the word set is that big 12:28:33 But I prefer the syntax. Everything postfix, quotations, literate source? 12:28:34 nice 12:31:37 Wow. ~360 words sans ASCII constants defined as words 12:31:52 --- join: pierpal (~pierpal@host91-236-dynamic.22-79-r.retail.telecomitalia.it) joined #forth 12:31:57 & prefixes. 12:33:45 gforth lists over 2000 :þ 12:34:02 260 in the base system, w/o the ASCII words 12:35:59 The platform-specific additions add quite a bit to the base system. 12:37:06 The iOS version has 378 presently 12:38:32 I always work with the gloassary open in a window 12:38:38 guess I never noticed 12:45:49 I don't really find into retro as well as I found into ANS Forth. 12:48:52 --- join: wa5qjh (~quassel@freebsd/user/wa5qjh) joined #forth 13:02:00 --- quit: wa5qjh (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) 13:02:37 How do I get retro's repl to recognize .1 as a float number? 13:05:29 Use rre, the basic repl lacks floating point 13:05:45 bin/rre -i 13:06:10 Or bin/retro -i. (If using the dev snapshots) 13:06:24 Ok, thanks. 13:07:10 I'll be making this much clearer in the next release. 13:08:47 I use rre and the iOS version for actually getting things done, the minimal repl is intended more as an example/starting point for new interfaces 13:10:15 bin/ri (the curses based interactive ui) will be getting most of the additional words from rre (sans a few related to scripting support) in the next release 13:10:46 Hmm, now repl complains with ".0.0 'xoff f:!" that it doesn't know what f:! is... 13:11:24 There's not an f:! word presently 13:11:51 So what do I do when I want to store a float value in a variable? 13:12:50 Do I have to convert it to a string and then turn it back? 13:13:00 There's not a good way to do this currently. You could do something like converting to/from a string representation 13:13:22 Okay, thanks for that info. 13:13:50 * crc has some plans for improving things on this, but probably won't be able to finish it until next weekend 13:14:06 I guess I'll work on porting my Mandelbrot set viewer to retro some other time then. I'm not quite in the mood for fiddling around with that too much rn :þ 13:15:12 Maybe I could store float as "n exp" in two fields... 13:17:55 http://forthworks.com/retro/s/example/FloatingPointEncoding.forth has words for encoding/decoding floating point into the standard integer cells (based on the technique in http://forthworks.com/retro/s/doc/SqrtEncoding.pdf) 13:19:15 WilhelmVonWeiner: what byte level manipulation do you need? I can look at expanding the wordset in http://forthworks.com/retro/s/example/Byte_Addressing.forth 13:31:38 --- quit: dys (Ping timeout: 246 seconds) 13:56:53 john_cephalopoda: you might be able to factor the float variables out, or define a word using n:to-float to put them on the FP stack on the fly 14:03:00 crc: nothing at the moment. But CMOVE and I'll work on that 14:25:06 No rush, I just used it for drawing buffers to screen 14:46:26 THE JOURNAL OF 14:46:26 FORTH 14:46:28 A PPLICATION AND RESEARCH 14:46:37 Sorry bad paste 14:47:07 but the JFAR website is now a redirect to a site with spam ads for various escorts 14:55:03 --- join: [1]MrMobius (~default@c-73-134-82-217.hsd1.va.comcast.net) joined #forth 14:57:58 --- quit: MrMobius (Ping timeout: 268 seconds) 14:57:58 --- nick: [1]MrMobius -> MrMobius 15:57:40 --- quit: Zarutian (Ping timeout: 252 seconds) 16:03:26 --- join: Zarutian (~zarutian@173-133-17-89.fiber.hringdu.is) joined #forth 16:39:54 --- join: TheCephalopod (~john@unaffiliated/john-cephalopoda/x-6407167) joined #forth 16:40:20 --- quit: MrMobius (Ping timeout: 268 seconds) 16:43:34 --- quit: john_cephalopoda (Ping timeout: 252 seconds) 16:47:52 --- quit: TheCephalopod (Quit: Trees can see into your soul.) 16:57:44 --- join: tabemann (~tabemann@rrcs-162-155-170-75.central.biz.rr.com) joined #forth 17:29:30 * tabemann is so happpy that he found a power series for log() that converges quickly 17:54:49 --- quit: tabemann (Ping timeout: 240 seconds) 18:01:57 --- join: MrMobius (~default@c-73-134-82-217.hsd1.va.comcast.net) joined #forth 18:11:19 --- quit: MrMobius (Read error: Connection reset by peer) 18:36:31 --- join: MrMobius (~default@c-73-134-82-217.hsd1.va.comcast.net) joined #forth 19:15:32 --- quit: dddddd (Remote host closed the connection) 19:15:50 --- join: rdrop-exit (~markwilli@112.201.164.82) joined #forth 19:31:16 WilhelmVonWeiner: https://forthworks.com/share/9db44327d9067ace185d9ba4c4ad0aab for a quick CMOVE and CMOVE> implementation 19:32:26 --- quit: dave9 (Quit: dave's not here) 19:32:42 --- join: dave9 (~dave@47.44-27-211.dynamic.dsl.syd.iprimus.net.au) joined #forth 20:29:47 --- quit: Keshl (Quit: Konversation terminated!) 20:33:06 --- join: Keshl (~Purple@24.115.185.149.res-cmts.gld.ptd.net) joined #forth 20:35:52 --- join: smokeink (~smokeink@118.131.144.142) joined #forth 20:52:09 --- join: tabemann (~tabemann@2602:30a:c0d3:1890:2db1:4ef6:126b:d5ee) joined #forth 20:57:54 --- quit: dave9 (Quit: dave's not here) 21:00:39 --- join: dave9 (~dave@47.44-27-211.dynamic.dsl.syd.iprimus.net.au) joined #forth 21:24:15 --- quit: warriors (Quit: Connection closed for inactivity) 21:56:49 --- quit: proteusguy (Remote host closed the connection) 22:09:25 I'm disappointed that my mathematical functions are not accurate in the last couple to few decimal places... this is probably because what I'm checking against (Python) probably uses math functions in hardware, which are using 80 bit extended precision numbers internally, whereas I am limited to 64 bit double precision numbers and am running into unavoidable error 23:25:24 --- join: dys (~dys@tmo-098-150.customers.d1-online.com) joined #forth 23:52:29 --- quit: sigjuice (Ping timeout: 240 seconds) 23:52:46 --- join: sigjuice (~sigjuice@2604:a880:1:20::83:6001) joined #forth 23:59:59 --- log: ended forth/18.11.17