00:00:00 --- log: started forth/17.04.19 00:05:35 --- quit: qzo (Ping timeout: 245 seconds) 00:18:35 --- quit: wa5qjh (Remote host closed the connection) 00:18:40 --- join: snowrichard2 (~richard@24.244.105.237) joined #forth 00:33:19 --- quit: snowrichard2 (Quit: Leaving) 00:39:54 --- join: qzo (~qzo@c-73-153-11-93.hsd1.co.comcast.net) joined #forth 00:43:22 --- quit: proteusguy (Ping timeout: 260 seconds) 01:14:41 --- quit: qzo (Ping timeout: 255 seconds) 01:20:54 --- join: qzo (~qzo@c-73-153-11-93.hsd1.co.comcast.net) joined #forth 01:29:00 --- join: proteusguy (~proteus-g@180.183.96.76) joined #forth 01:29:00 --- mode: ChanServ set +v proteusguy 01:43:07 --- join: gravicappa (~gravicapp@ppp83-237-166-6.pppoe.mtu-net.ru) joined #forth 02:06:55 --- join: wa5qjh (~Thunderbi@121.54.90.152) joined #forth 02:26:39 --- quit: wa5qjh (Ping timeout: 252 seconds) 03:11:40 Well, I didn't exactly have "experience the true horror of a bug involving code overwriting other code at run-time" on the bucket list, but I guess it's good to know about anyway... 03:19:23 there is the boring version of that, and the version where you are using a source debugger that doesn't notice that has happened 03:25:43 hm. Well this is the version where I write a word that does something, then run a high-level word that uses it, then get an error saying "invalid address" (perhaps the most vague error ever to exist), then SEE and the definition has changed 03:27:06 from "15 tuck compare" to "<0> <0> tuck compare". 03:28:47 and of course now that it's crunch time, the heap-printing words I developed specifically to help debug heap manipulations have, with no changes made that I can remember, failed and now just print a single line in an infinite loop. 03:28:58 right 03:29:21 (by the way, printing trees is really hard) 03:29:22 bad pointer arithmetic to alloted memory or so? 03:30:01 (and so clobbering dictionary contents) 03:30:44 yeah, the heap structures are in alloted memory. I just can't figure out why it's happening because the first sign of trouble occurs somewhere seemingly random unrelated to the actual source of trouble 03:36:47 do you recognize the data from somewhere if you dump the clobbered memory? 03:36:58 --- join: smokeink (~smokeink@175.20.93.41) joined #forth 03:38:21 --- quit: nighty-- (Quit: Disappears in a puff of smoke) 03:40:22 Unfortunately I'm not really familiar with gforth's threading model (I know I *should* know how it works, just hasn't stuck in my head), so I don't really know where the clobbered memory is, just "something to do with this one definition" 04:01:02 --- quit: proteusguy (Remote host closed the connection) 04:12:15 reepca: i'm not deeply familiar with it either. looking at dumps of colon definitions, it seems calls to code words are an offset into .. something, and calls to non-primitives have reference in the same range as for code words, followed by data ponter that is just a plain pointer 04:12:24 (not sure i'm being articulate tonight) 04:13:50 but if you do e.g.: 04:13:59 hex : foo + ; ' foo dup . dup >code-address . 80 dump 04:14:45 : bar foo + - foo foo ; ' bar dup . dup >code-address . 80 dump 04:14:58 it seems clear roughly what is going on 04:16:27 --- join: nighty-- (~nighty@s229123.ppp.asahi-net.or.jp) joined #forth 04:19:42 gforth uses a sort of hybrid threading model mixing direct and indirect reading 04:20:02 http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Direct-or-Indirect-Threaded_003f.html#Direct-or-Indirect-Threaded_003f 04:27:30 --- join: GeDaMo (~GeDaMo@212.225.127.213) joined #forth 04:27:58 crc: *nod* thanks. do you know right off how to get the base address for the offsets returned by >code-address? 04:29:53 oh wait. i think these might be actual pointers after all 04:33:26 AGH. I think I found the main problem... my word for placing a node into the correct place top-down into a heap was designed for internal use in heapify. Meaning instead of the ( heap-addr size node-to-position -- ) I expected, it actually wanted ( heap-addr last-parent node-to-position -- )... sunk a couple of hours of debugging into what could have been fixed by reading one of the few stack comments I remembered to make 04:33:58 koisoke: no 04:34:34 I don't delve too deeply into gforth's internals as that would start involving the source, which I try to avoid (due to licensing) 04:36:07 confirmed. they are actually pointers. process address space just wasn't what i thought it was 04:42:53 --- join: John[Lisbeth] (~user@2601:601:8f01:a6a0:842:a0e6:ca35:5a3b) joined #forth 04:42:57 so uh how do I make a keybind 04:45:47 https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Single_002dkey-input.html 04:46:05 wow I have already expended like 9 steps on that 04:46:47 no wait 27 steps first go 04:47:01 6.1.1750, 10.6.2.1307, 10.6.1.1755 04:49:49 * crc again notes that you'd not have needed to waste time if you looked in the ANS spec and gForth docs first. 04:49:52 so it's just a finite state machine that waits for a key to be pressed and looks up the correct behavior 04:51:27 those documents do not explain things well 04:53:23 unless i'm overlooking something big, calling gforth's threading model hybrid seems a bit of a stretch. it is direct threaded except for handling of XTs that is really orthogonal to the threading model 04:53:51 --- join: proteusguy (~proteus-g@2405:9800:b408:bc31:f203:8cff:fe8d:7f9f) joined #forth 04:53:51 --- mode: ChanServ set +v proteusguy 04:53:55 I think that it's mostly direct threaded. The developers refer to it as hybrid though. 04:56:54 what does the word throw do 04:57:06 ;LKJA;LSKDJF;LAKNBOIADSJF;LAKSDJF 04:57:32 http://forth.sourceforge.net/std/dpans/dpans9.htm 04:58:46 this is getting silly 04:59:20 "Alphabetic list of words (informative annex)" http://forth.sourceforge.net/std/dpans/dpansf.htm 05:00:08 A.9, 9.6.1.0875, 9.6.1.2275 05:00:34 also gforth manual 3.30 05:00:49 and 5.8.6 05:00:54 (TW: words on a page) 05:01:12 --- quit: MrBusiness3 (Ping timeout: 252 seconds) 05:04:36 meh throw is not useful to me 05:04:41 I need something alot like throw or emit 05:04:44 but not either of those at all 05:04:57 John[Lisbeth]: if you are trying to add key bindings to the forth repl, that takes delving into the specific implementation 05:05:18 nah I would have to bootstrap my own repl on top to keep ans pristine 05:05:23 too much work for now 05:06:12 throw and emit are completely different things 05:06:42 nah they are very similar in purpose 05:07:23 they have a set of predefined integers they work on 05:08:05 WTF? 05:08:11 throw is part of exception handling 05:08:18 emit displays a character 05:08:44 if you say so 05:10:06 is the word immediate all you need to make macros? 05:10:39 Also postpone 05:11:05 postpone is the opposite 05:13:23 If you want to include immediate words in your macros, you need postpone 05:13:34 Or you could use evaluate 05:19:33 how do you still not know what immediate is after it's been explained to you several times in this channel? 05:21:35 actually, I retract that question and would address everyone else instead: why do you still try to answer his insane questions when he's made it abundantly clear that he has no intention of reading your answers? 05:22:20 Boredom, mainly :P 05:29:45 boredom/reflex response to newbie questions/finding it vaguely humorous at times? 05:30:18 my dang datatypes broke again 05:31:59 my definition of cons cell used to be beautiful and small. lambda anonymous-pointer cell allot alias cons-cell 05:32:02 look at it now 05:32:05 a pile of sphagetti 05:34:59 if that is the non-spaghetti version, i will take your word for it that the spaghetti version is bad 05:39:16 acceptible responses 05:39:54 ' :noname alias lambda 'comp ; drop alias fin immediate 05:40:33 lambd here cell allot fin alias pointer 05:40:48 lambda here cell allot fin alias pointer 05:41:16 lambda pointer cell allot fin alias cons-cell 05:41:49 what is 'comp 05:42:06 it is ' but for compiling words 05:42:43 like comp' but you renamed it with the ' on the other side? 05:55:07 writing these in plain forth would be shorter and more readable 05:55:16 : pointer here cell allot ; 05:55:26 : cons-cell pointer cell allot ; 05:59:24 : cons ( car cdr -- cons-addr ) align here >r , , r> ; : car ( cons-addr -- car ) cell+ @ ; : cdr ( cons-addr -- cdr ) @ ; : set-car! ( x cons-addr -- ) cell+ ! ; : set-cdr! ( x cons-addr -- ) ! ; 06:00:08 changing cons to use a free list and writing uncons left as exercise for the rea^W^W^W 06:00:25 https://github.com/ForthHub/ForthFreak/blob/master/FunForth 06:06:16 would need some time to understand everything going on here 06:06:55 Do you know any Haskell? You can define a type like data Tree a = Nil | Cons a (Tree a) 06:07:12 That code is my implementation of something similar in Forth 06:07:48 i don't know haskell, but the recursive definition part was clear enough 06:07:52 It can be used for lists or trees or number types and all sorts 06:09:51 It's not efficient though, it allocates and frees /a lot/ 06:12:15 he he he 06:12:24 I just rewrote my whole thing and now I gotta do it again slightly 06:12:56 now everything is defined with the lambda definition fin alias name syntax 06:13:55 so even less readable than before. I suppose you still haven't bothered with stack comments either. 06:14:19 no I dont plan on commenting this until I release it 06:14:46 stack comments are just a hint as to what the words expect and return 06:15:06 they're very helpful if you want anyone else to make sense of your code 06:15:25 those are two true staements 06:16:17 GeDaMo: i kind of like this. would not have thought to syntactically sweeten conditonals that way in a forth 06:18:28 :) 06:21:34 There's an example of its use at https://github.com/ForthHub/ForthFreak/blob/master/FunForthLists 06:22:02 the development of this lambda word really changed things for me 06:22:02 also, i was just thinking about henry baker's paper the other day 06:23:04 The Linear Lisp one? 06:23:06 yes 06:23:47 John[Lisbeth]: renaming :noname has been a game changer for you? 06:24:01 Henry Baker wrote a few good papers http://home.pipeline.com/~hbaker1/ 06:32:07 yeah it really makes things alot easier 06:32:13 I cant get postpone to work 06:33:31 --- join: rain1 (~rain1@unaffiliated/rain1) joined #forth 06:35:30 writing "lambda ... fin alias " is easier than ": ... ;" or just ":noname ... ; alias " if you really hate : for some reason? 06:36:38 well now its 06:36:47 lambda ... fin define name 06:37:00 and yeah I like that alot better 06:37:06 especially once I figure out how to nest lambdas 06:38:15 look at how the gforth implementation of quotations works if you really want to do that. i think that is unlikely to get far unless you take a step back and actually learn something about how forth works 06:38:35 I thought you said gforth does not do quoting 06:39:33 no, i said you couldn't freely nest colon defs like you were doing, and someone else (crc?) said quotations couldn't be implemented in straight ans 06:40:00 eh I forgot the word to execute a lambda 06:40:45 you can do it relying on implementation-specific things and there are implementations (i think one canonical one even) for gforth 06:42:07 lambda execute fin define run-lambda 06:43:07 koisoke: that's correct. quotations can't be implemented in straight ans as they require implementation-specific knowledge 06:43:31 crc: i know 06:44:01 I dunno 06:44:13 I am temtped to just figure out a way to quote these 06:44:20 or nest them 06:46:13 the problem is that you cant take something from teh stack and put it in noname 06:46:55 6.1.1780 06:47:26 you can't go like lambda { previous-lambda - ? } previous-lambda run-lambda fin 06:47:58 John[Lisbeth]: do you speak in pig latin when asking for directions? 06:48:15 no 06:48:35 because that is basically what you are doing here 06:49:05 he he he its just gforth 06:49:10 nothing special 06:49:17 you are using your own private vocabulary that one can decode with effort, for no good reason 06:49:28 that is what you guys have been doing to me this whole time 06:50:00 no, we've been trying to help you learn a little of forth 06:50:14 Just as I am trying to help you learn a little forth 06:50:32 ' ' alias function-pointer 06:50:41 function-pointer alias alias define 06:51:07 function-pointer comp' define immediate-function-pointer 06:51:14 immediate-function-pointer ; drop define fin immediate 06:51:25 No. I *know* Forth. I have been programming in Forth for over 15 years. I maintain a Forth system. I use programs written in Forth. 06:51:32 lambda execute fin define run-lambda 06:51:44 read those five lines 06:52:09 oh an dI forgot 06:52:14 you are just renaming things 06:52:33 yes indeed 06:52:43 a lambda is a :noname 06:52:48 a fin is a ; 06:52:49 I want to do something like xkcd sometimes about this channel :-D 06:53:09 so keep in mind a lambda is a noname and a fin is a ; 06:53:16 and also that a define is an alias 06:53:34 lambda 2 fin define two two . 2 ok 06:53:49 all you have here is a non-standard lexicon which obscures things. You aren't providing any new functionality via these words. 06:53:50 ya feel me? 06:54:14 eh I like my lexicon like I like my steak, easy 06:54:37 I am a high level programer fuck yo electrical engineer bullshit 06:54:39 if you want nestable anonymous functions, get the development version of gforth: https://www.complang.tuwien.ac.at/forth/gforth/cvs-public/ and look at quotations.fs 06:54:48 high level rulz low level droolz 06:55:23 as if I would ever learn bitshift 06:55:42 lambda 0= fin define not 06:56:35 --- mode: crc set +q John[Lisbeth]!*@* 06:57:12 * crc has put a temporary quiet on John[Lisbeth] 07:04:49 finally, we can talk about low-level bit shifting and other electrical engineer topics in peace 07:15:47 --- join: neceve (~ncv@86.125.247.109) joined #forth 07:15:47 --- quit: neceve (Changing host) 07:15:47 --- join: neceve (~ncv@unaffiliated/neceve) joined #forth 07:36:46 :) 07:41:49 --- join: true-grue (~true-grue@176.14.222.10) joined #forth 07:47:35 John[Lisbeth]: when you're ready to behave and actually try to participate & learn, send me a privmsg 07:50:48 I think I've made a terrible mistake with my metaforth 07:52:05 I wanted anything executed at compile time to see addresses that would be analogous to runtime addresses, so I wrote the host version of all of the base words to do an address translation 07:53:06 and now I'm realizing this is way more trouble than it's worth. there are some instances where there's no way to tell whether a value is an address that requires translation, or just a numeric value (which obviously shouldn't be translated) 07:54:50 should have just given the user a host-only word that does that translation so that he can make constants or literals out of an address, and put the responsibility there 07:59:22 seems like an easy enough change unless thre is a huge body of code that relies on the automagical translation 07:59:29 --- join: smokeink_ (~smoke@175.20.93.48) joined #forth 08:00:47 --- part: rain1 left #forth 08:05:00 --- quit: smokeink_ (Ping timeout: 268 seconds) 08:13:58 --- quit: neceve (Quit: Konversation terminated!) 08:18:43 --- quit: dys (Read error: Connection reset by peer) 08:27:03 * crc is working on migrating his collection of forth docs to his gopher server 08:27:39 wow, nice 08:28:25 I'm going to have to increase the buffer size for files, several of the pdf files are bigger than the 256k buffer I had used initially 08:34:42 koisoke, I don't think it'll be too bad. I just hate that now I have to go revisit everything I've already written; there's going to be a lot of wrappers that aren't needed anymore, and it drives me crazy to have useless artifacts like that left in there 08:56:09 --- join: MrBusiness (~ArcMrBism@2602:306:8325:a300:c801:d7f:77e1:92be) joined #forth 09:41:59 --- join: dys (~dys@ip-109-40-1-221.web.vodafone.de) joined #forth 10:06:36 --- join: ACE_Recliner (~ACE_Recli@c-50-165-178-74.hsd1.in.comcast.net) joined #forth 10:28:11 --- join: MrBismuth (~ArcMrBism@2602:306:8325:a300:c801:d7f:77e1:92be) joined #forth 10:31:12 --- quit: MrBusiness (Ping timeout: 252 seconds) 11:00:47 --- quit: smokeink (Read error: Connection reset by peer) 11:36:40 --- join: impomatic (~impomatic@host86-170-205-97.range86-170.btcentralplus.com) joined #forth 12:28:00 --- join: DocPlatypus (~skquinn@2601:2c2:c300:ff70:7880:8bcc:5b74:b77c) joined #forth 12:44:39 --- join: impomatic_ (~impomatic@host86-170-205-97.range86-170.btcentralplus.com) joined #forth 12:45:26 --- quit: impomatic (Ping timeout: 240 seconds) 12:45:37 --- nick: impomatic_ -> impomatic 13:08:52 --- join: iioeezy (5744025b@gateway/web/freenode/ip.87.68.2.91) joined #forth 13:11:56 --- topic: set to 'Forth Programming | logged by clog at http://bit.ly/91toWN | Forth Standards at http://forthworks.com/forth | www.greenarraychips.com | https://github.com/mark4th' by crc 13:28:43 --- quit: GeDaMo (Remote host closed the connection) 13:32:26 getting the server to handle pdfs required me to add some facilities for detecting and reporting mime types. it worked without this on Internet Explorer and Safari, but not Chrome. 14:09:58 if a file is not served with the proper MIME type of a PDF, anything the browser does to show it as a PDF is error recovery at best 14:10:22 so Chrome is actually the browser that got it right, and IE and Safari got it wrong 14:10:40 application/pdf I think (or is it still x-pdf?) 14:36:45 --- quit: gravicappa (Ping timeout: 260 seconds) 14:37:28 --- join: vsg1990 (~vsg1990@static-72-88-80-103.bflony.fios.verizon.net) joined #forth 14:50:21 I'm using application/pdf 14:51:16 I know. It was something I had put off until I needed it. 14:51:37 At least I'm a step closer to HTTP/1.0 compliance now. 14:55:52 I'm not sure chrome was quite right on this though. For HTTP/1.0, it should have assumed application/octet-stream, but it wouldn't download the files until I added the Content-type reporting. 14:58:32 --- quit: ACE_Recliner (Ping timeout: 240 seconds) 15:14:04 --- join: ACE_Recliner (~ACE_Recli@c-50-165-178-74.hsd1.in.comcast.net) joined #forth 15:16:36 --- join: Zarutian (~zarutian@168-110-22-46.fiber.hringdu.is) joined #forth 15:21:32 --- quit: ACE_Recliner (Ping timeout: 240 seconds) 15:24:15 --- join: ACE_Recliner (~ACE_Recli@c-50-165-178-74.hsd1.in.comcast.net) joined #forth 15:29:09 --- quit: dys (Read error: Connection reset by peer) 15:30:17 --- quit: true-grue (Read error: Connection reset by peer) 16:06:44 --- quit: nighty-- (Quit: Disappears in a puff of smoke) 16:44:02 --- quit: ACE_Recliner (Read error: Connection reset by peer) 17:02:12 --- join: DKordic` (~user@178-221-95-82.dynamic.isp.telekom.rs) joined #forth 17:03:32 --- quit: DKordic (Ping timeout: 240 seconds) 17:45:14 --- join: neceve (~ncv@unaffiliated/neceve) joined #forth 18:00:41 --- join: nighty-- (~nighty@d246113.ppp.asahi-net.or.jp) joined #forth 18:08:54 crc: trying retro 12. is the listener supposed to dispatch each word upon hitting space and not give ? errors for integers, or am i doing something wrong? 18:09:57 s/not give/give/ 18:10:03 retro is decidedly non-traditional 18:10:41 It parses and executes on a token by token basis, and single character prefixes are used to indicate how to treat a token 18:10:54 (In some ways, like a non-colored colorforth) 18:10:59 k 18:11:00 ok 18:11:08 Use # for numbers: #12 #-91 18:12:02 https://github.com/crcx/rx-nga/blob/master/documentation/RetroBook.md has some (older) documentation 18:12:07 *looks at retro book* 18:12:08 thanks 18:14:56 http://forthworks.com/retro/s would be the latest source tree (updated nighty). Standalone documentation is sadly lacking, though I am working on this. 18:16:26 i used git clone https://github.com/crcx/rx-nga.git 18:17:29 needed to manually mkdir bin and run the listener from the top level directory btw 18:18:35 the rx-nga repo is mostly current on the language itself, but a bit behind on some of the interface stuff 18:18:53 * crc will have it fully in sync with his working tree in the next couple of days 18:56:12 ok. guess i'll hold off 18:57:20 --- quit: Zarutian (Quit: Zarutian) 19:34:47 I've updated the rx-nga repo with the contents of my working tree 20:14:46 --- quit: iioeezy (Quit: Page closed) 20:31:54 --- join: ACE_Recliner (~ACE_Recli@c-50-165-178-74.hsd1.in.comcast.net) joined #forth 20:36:33 --- quit: neceve (Quit: Konversation terminated!) 21:11:25 --- quit: DocPlatypus (Ping timeout: 245 seconds) 21:17:19 --- join: DocPlatypus (~skquinn@2601:2c2:c300:ff70:7880:8bcc:5b74:b77c) joined #forth 21:54:31 --- join: dys (~dys@ip-109-40-1-221.web.vodafone.de) joined #forth 22:37:24 --- quit: vsg1990 (Quit: Leaving) 22:48:57 --- join: MrBusiness3 (~ArcMrBism@104-50-90-48.lightspeed.brhmal.sbcglobal.net) joined #forth 22:50:19 --- quit: MrBismuth (Ping timeout: 240 seconds) 22:50:36 --- quit: groovy2shoes (Ping timeout: 255 seconds) 22:50:55 --- join: groovy2shoes (~groovy2sh@unaffiliated/groovebot) joined #forth 23:59:59 --- log: ended forth/17.04.19