00:00:00 --- log: started forth/16.11.09 00:05:16 --- join: dys (~dys@2003:5b:203b:100:6af7:28ff:fe06:801) joined #forth 00:06:36 --- quit: segher (Ping timeout: 265 seconds) 00:06:44 --- join: segher (segher@bombadil.infradead.org) joined #forth 00:06:51 --- quit: DocPlatypus (Ping timeout: 248 seconds) 00:21:52 --- join: DocPlatypus (~skquinn@c-73-6-60-72.hsd1.tx.comcast.net) joined #forth 00:49:54 --- quit: proteus-guy (Ping timeout: 260 seconds) 01:14:30 --- quit: Uniju_ (Quit: Feeling down? You may already be a charge target.) 01:24:11 --- quit: mnemnion (Remote host closed the connection) 01:24:25 --- quit: nighty (Quit: Disappears in a puff of smoke) 01:42:50 he he he trump 02:26:06 --- join: mnemnion (~mnemnion@2601:643:8102:7c95:44ff:52a8:5f97:4052) joined #forth 02:30:46 --- quit: mnemnion (Ping timeout: 260 seconds) 02:37:37 --- join: nighty (~nighty@s229123.ppp.asahi-net.or.jp) joined #forth 02:40:29 --- part: DocPlatypus left #forth 03:18:44 not really forth question, but related, I want to learn some asm (for understanding jonesforth better and myabe implementing my own one) 03:19:30 and I understand that I have no time and skill for learn something modern like amd64, that can you recommend? 6502? z80? 03:30:45 nerfur: Why not ARM Cortex M for a start, or MIPS (PIC32)? 03:40:17 Idk, is it simple enough for "kazy noob" ? 03:40:23 *lazy 03:40:46 I think I have some TI's AM board somewhere 03:40:52 *M 04:00:18 tbh jonesforth uses such a small subset of the x86 instruction set that you might want to consider giving it a shot 04:00:22 nerfur: Take a quick look at [[http://jeelabs.org/2016/02/dive-into-forth/][Dive into Forth]]. 04:05:15 thanks will look at it 05:03:41 I am thinking of targeting webassembly 05:12:09 i liked a lot hforth that was so compact and uses masm macro <3 05:19:09 Part of me thinks what we need is like two forth standards 05:19:29 one being ans and the other being something closer to the original forth standards which were alot more minimal 05:19:46 and the idea would be you'd implement ans in this micro standard 05:20:13 the benefit of that would be more rapid deployment of ans as well as the ability to strip off ans and get closer to the metal 05:28:03 * eldre was talking about learning assembly through hforth sources 05:29:37 oh for a second I thought you said micro 05:29:46 or no you used the word compact 05:29:51 masm macro ;) 05:30:06 I was simply elaborating as to the desire for many forthers to have things be compact even though it is high ceiling 05:30:12 I myself find myself wanting this the same way 05:30:40 I am really starting to understand some of Moore's arguments about writing simple code 05:32:58 in case there would be 2 standards, that will likely be the end of the most advanced standard, that then would lead to a variety of forth that will all call themself ans, and will have strong differences, leading to forth death (imho, quick think..) 05:55:57 I dunno 05:56:22 I just feel like it is hard to reconcile the high ceiling idea with current forths except maybe factor which people don't call a forth 06:18:06 like "level up things", which in most situation is preferable 06:33:29 eldre: I am not following You :) . 06:34:02 In other words what do You mean? 06:41:00 DKordic: maybe i misunderstood John[Lisbeth] "hard to reconcile the high ceiling idea" which i understand to "level up the skills better than stick to bottom" (isn't that seen that english is not my mother tongue?:]) 06:41:53 not understanding it to, but on the same concept~ 06:46:44 --- join: proteusguy (~proteusgu@node-44o.pool-182-52.dynamic.totbb.net) joined #forth 06:46:44 --- mode: ChanServ set +v proteusguy 06:54:32 Oh, sorry I have him `/ignore'd :) . 06:58:16 oh 07:31:40 --- join: ricky_ricardo_ (~rickyrica@2601:240:4203:ecb0:ddea:ffe9:eaf:434e) joined #forth 07:32:55 --- quit: ricky_ricardo (Ping timeout: 245 seconds) 07:36:34 --- join: ASau (~user@netbsd/developers/asau) joined #forth 08:08:26 --- join: mnemnion (~mnemnion@2601:643:8102:7c95:44ff:52a8:5f97:4052) joined #forth 08:54:40 --- join: neceve (~ncv@79.113.73.105) joined #forth 08:54:40 --- quit: neceve (Changing host) 08:54:40 --- join: neceve (~ncv@unaffiliated/neceve) joined #forth 08:57:45 --- quit: DGASAU (Ping timeout: 256 seconds) 09:03:25 --- join: DGASAU (~user@lmpc.drb.insel.de) joined #forth 09:15:09 --- quit: mnemnion (Remote host closed the connection) 09:20:01 --- join: [X-Scale] (HydraIRC@92.250.22.21) joined #forth 09:22:29 --- quit: X-Scale (Ping timeout: 252 seconds) 09:22:30 --- nick: [X-Scale] -> X-Scale 09:30:37 --- join: mnemnion (~mnemnion@152.179.131.166) joined #forth 09:33:13 --- join: mnemnia (~mnemnion@152.179.131.166) joined #forth 09:34:58 --- quit: mnemnion (Ping timeout: 260 seconds) 09:37:01 nerfur: the 6809 is ridiculously suitable for implementing Forth on 09:37:15 nerfur: and it's got a nice simple assembly language 09:37:42 --- quit: mnemnia (Ping timeout: 260 seconds) 09:42:06 --- join: mnemnion (~mnemnion@152.179.131.166) joined #forth 09:42:34 --- join: hellcode (~hellcode@189.180.50.26) joined #forth 09:50:34 hi 09:52:15 --- join: true-grue (~true-grue@176.14.222.10) joined #forth 09:52:39 I'm wondering, is gnu forth a good implementation? 09:53:07 I'm asking because i realized some words like >R don't work as expected, or maybe I'm getting my information wrong 09:53:17 I'm starting to learn 09:53:38 --- quit: dys (Ping timeout: 260 seconds) 09:54:41 what do you think it should do, and what does it do? 09:56:07 well, it says it moves a value from the top of the stack into the return stack 09:56:32 it gives an error saying "invalid memory address" 09:57:05 if I do R@ >R it just hangs 09:59:14 bummer 09:59:34 maybe I'm just doing it all wrong, am I supposed to watch for strange side effects when using the return stack? 10:00:23 as far as I know the only thing you need to be careful of is returning from a word after forgetting to restore the return stack to what it was when you entered the word 10:01:06 hellcode: well, the return stack does kind of do funny and unexpected things if you're not careful 10:01:18 hellcode: what programming languages are you used to? 10:03:08 some of the Algols and some of the Lisps 10:03:13 C mostly 10:05:23 okay 10:05:41 so you know in C when you call a function, internally there's a return address pushed on the stack 10:05:58 yep 10:06:04 imagine what would happen if you moved the stack pointer 10:06:20 yeah... it has happened 10:06:20 either by pushing something else to the stack in your subroutine, or popping something off it 10:06:26 well, same thing 10:06:59 r> and >r aren't massively useful outside of fairly specific words, and outside a definition they might do stuff you regret 10:07:13 okay 10:07:41 I'll forget about them ... for now 10:10:19 thanks 10:18:23 --- join: dys (~dys@ip-109-44-3-11.web.vodafone.de) joined #forth 10:40:18 --- quit: mnemnion (Remote host closed the connection) 10:42:02 --- join: mnemnion (~mnemnion@152.179.131.166) joined #forth 10:46:19 --- quit: mnemnion (Ping timeout: 248 seconds) 10:52:51 --- join: mnemnion (~mnemnion@152.179.131.166) joined #forth 10:55:49 --- quit: hellcode (Quit: leaving) 10:56:59 --- quit: mnemnion (Ping timeout: 248 seconds) 11:01:53 --- join: mnemnion (~mnemnion@152.179.131.166) joined #forth 11:03:40 --- quit: mnemnion (Remote host closed the connection) 11:28:50 --- join: mnemnion (~mnemnion@152.179.131.166) joined #forth 11:32:31 --- quit: mnemnion (Remote host closed the connection) 11:51:18 --- join: mnemnion (~mnemnion@152.179.131.166) joined #forth 11:53:08 --- quit: mnemnion (Remote host closed the connection) 11:54:48 --- join: mnemnion (~mnemnion@152.179.131.166) joined #forth 11:55:16 --- quit: mnemnion (Remote host closed the connection) 12:03:28 --- join: mnemnion (~mnemnion@152.179.131.166) joined #forth 12:09:26 --- quit: mnemnion (Remote host closed the connection) 12:29:58 --- quit: ASau (Ping timeout: 260 seconds) 12:33:12 --- join: nal (~nal@adsl-64-237-233-55.prtc.net) joined #forth 12:54:38 --- quit: neceve (Quit: Konversation terminated!) 12:58:53 --- quit: nighty (Quit: Disappears in a puff of smoke) 13:11:14 --- join: mnemnion (~mnemnion@152.179.131.166) joined #forth 13:15:27 --- quit: mnemnion (Ping timeout: 258 seconds) 13:16:35 --- join: mnemnion (~mnemnion@152.179.131.166) joined #forth 13:20:50 --- quit: mnemnion (Ping timeout: 260 seconds) 14:08:40 --- join: mark4_ (~mark4@99-164-75-34.lightspeed.rcsntx.sbcglobal.net) joined #forth 14:45:13 --- quit: John[Lisbeth] (Remote host closed the connection) 14:50:05 --- join: ASau (~user@netbsd/developers/asau) joined #forth 14:51:33 --- join: hellcode (~hellcode@189.180.50.26) joined #forth 14:54:24 yay, n-queens finally works 14:54:50 the bug was a bit appalling, but debugging a jit-compiled jit-compiler boggles my mind 14:54:55 https://github.com/anse1/firmforth/commit/32c17ccc6c4841d8664f972485d94439f8a405d6 14:55:08 speedup is only 1.7 versus gforth-fasth though 14:55:18 (it was 4 for the recursive fibonacci) 14:58:11 nice 15:07:40 : fib 0 1 rot 1+ 1 do tuck + loop nip ; 15:07:47 WHY the fsck would anyone use recursive ANYTHING 15:08:25 mark4_: Benchmarking 15:09:11 also, I think I hand't implemented loops yet while writing that one :-) 15:09:24 hellcode: suppose that you had some definition that just duplicated what was on the return stack - : rdup r@ >r ; and you had some definition that used it - for example, : indirectsquare >r rdup r> r> * ; 15:09:42 that wouldn't work as you expect it to, because rdup doesn't do what you expect it to 15:10:18 reepca: I'm guessing that exiting a function pops an entry from the return stack 15:10:25 yep 15:10:31 but also entering a function pushes one on 15:10:46 oh yeah 15:11:07 so after the rdup the return stack would look like num1 num2 ret-address 15:12:04 well I tried >r on pforth and it segfaulted 15:12:08 so I got an answer there 15:12:13 but suppose that we didn't really do anything with the values on it, and just called rdup. : use-rdup rdup ; 15:12:21 just use isforth :P 15:12:24 I am thinking it makes sense to use >r compiled rather than interpreted 15:12:49 yes, yes it does, but can you see why what was happening was happening? 15:13:04 mmmm.... 15:13:06 use-rdup would return to itself 15:13:20 oh 15:13:49 because rdup dups [address-of-rdup]? 15:14:04 then... man I haven't been in the business of thinking lately 15:14:29 rdup as it was defined earlier dups the address it should return to, then consumes the duplicated one to go back 15:14:44 effectively it's putting the current instruction pointer on the return stack 15:15:21 oh ues 15:15:25 I see it now 15:15:39 it's pretty rough to get your head around at first, but it opens up a terrifying and fascinating world of unstructured programming 15:17:13 reepca I can glimpse the potential 15:17:17 cool stuff 15:17:42 I can also foresee dragons and other spooks in my future using it 15:17:52 if you wanted to have a version of rdup that just duplicated the thing that was on top of the return stack *before rdup was called*, then you could do : rdup r> r> dup >r >r >r ; 15:18:40 ... 15:19:33 my brain hurts 15:19:35 or perhaps more legibly, : rdup r> r@ >r >r ; 15:20:51 okay I think I get it, it swaps the stuff at the return stack? 15:21:25 well what you really want to do with rdup there is to duplicate the second thing, right (since we want to ignore the return address)? 15:21:38 oh yes I see it now 15:22:34 if you wanted to see return-address manipulation in action, check out the one-screen (16 lines, 64 chars max per line) Backus Naur Form parser by Brad Rodriguez (http://www.bradrodriguez.com/papers/bnfparse.htm) 15:23:14 they use it for short-circuiting matching (like the way && works in C, only evaluating expressions while the result hasn't been determined) 15:25:28 that's impressive 15:27:48 thanks, I think I understand better the ret stack 15:28:07 could it be used to implement such a thing as,say, continuations? 15:28:33 or something similar? there's some crazy black magic done with continuations 15:28:44 I don't think I fully understand continuations, but is it basically "a first-class data representation of a stage in a program's execution"? 15:28:49 hellcode: Yeas it is also colled Partial(?) Continuation Stack. 15:28:55 Yes* 15:29:31 called* 15:30:11 reepca: yes 15:30:19 from wikipedia's description, it looks like our flawed rdup could be called "current-continuation" 15:30:25 I don't understand them very well either 15:30:45 but I understand that they let you do some non-local jumps 15:30:57 One interesting thing about that BNF paper is the year of the publication. 1988. And PEGs were introduced in 2004. So forthers were really ahead of time :) 15:31:29 as often happens with sekrit languages 15:31:39 :P 15:34:00 PEGs? 15:37:46 hellcode, https://en.wikipedia.org/wiki/Parsing_expression_grammar 15:38:47 oh 15:40:04 I'm not much into the theoretical stuff 15:41:33 It not very theoretical. It's a modern way to build DSLs in many languages. 15:44:32 I feel dumb 15:44:43 : current-continuation r@ ; \ would that work? 15:46:53 if my memory serves me well 15:47:06 when you call-cc you call a function which takes an argument 15:47:51 the argument passed is the continuation itself, which you'd usually call and it takes you to the state when you first used call-cc 15:49:09 so in scheme (call/cc (lambda (x) ... )) x can be called anywhere in the lambda function to return to that point in execution 15:49:37 or the lambda function could terminate and return the continuation itself, so that if it is called further in the program 15:49:47 it returns to this point of execution... 15:49:53 whew 15:50:32 I'm too young for this stuff 15:51:55 : call/cc r@ swap execute ; \ calls function passed to it with the place it came from as the first argument 15:53:59 : test-continuations ['] . call/cc ; \ prints "where we are when call/cc is invoked" 15:55:03 (prints 139740654869120 on my system) 15:59:19 what's ['] for? 16:00:07 it's an immediate version of '. If you compile ' into a definition, it will just be run when the word is executed - for example, : my' ' ; will do the exact same thing as ' does. 16:00:47 ['], on the other hand, will act as soon as it gets seen and compile in the execution token (think function pointer) of the word next to it 16:01:16 : foo1 ['] + ; \ gives execution token of + at runtime 16:01:47 : foo2 ' + ; \ tries to find execution token of whatever name is next to it at runtime, then tries to add it to something...? Fail 16:02:54 ... I need to study more 16:03:12 I'm just starting to learn forth, I understand little of what you're saying :P 16:03:27 do feel free to tell me what isn't clear 16:03:32 --- quit: true-grue (Read error: Connection reset by peer) 16:06:03 the immediate/not-immediate distinction also takes a bit of time to wrap your head around, but that's okay. 16:06:36 I don't quite get the ' word 16:06:57 are you familiar with the concept of a function pointer? 16:07:11 (first-class function also works) 16:07:42 yes 16:07:59 I just don't understand how to use ' 16:08:10 ' + .s 16:08:21 see a big number there? 16:08:23 43 16:08:42 wait no 16:08:50 big number, is that the address of the function? 16:09:21 it doesn't have to be the address of the function, but it usually is (the standard doesn't mandate it) 16:10:04 definitions are typically just lists of those things, so the compiler is *really* simple 16:10:29 now try 3 8 ' + execute .s 16:11:01 I see 16:11:01 (by the way, I don't mean lists as in linked lists, so I guess it's more like an array of those things) 16:11:20 yeah I understand, sequences thereof 16:11:28 although I suppose they could be implemented as linked lists, but it'd wreck the cache 16:11:52 anyway, the thing that ' gives you is called an execution token 16:12:03 I see 16:12:05 which is usually a glorified way of saying function pointer, but not always 16:12:07 it's "the function" right? 16:12:28 it's kind of complicated when we start talking about execution vs compilation semantics, but basically yes 16:12:50 have you checked out gforth's manual? 16:13:46 no 16:14:33 I think their git version is a bit more up-to-date on some of the more recent developments, but their online version is here http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/index.html#Top 16:15:15 : apply-to-one 1 swap execute ; 2 ' + apply-to-one 16:15:18 yay! 16:16:05 1 ' + apply-to-one . / prints 2 ofc :) 16:16:25 s%/%\\% 16:17:39 I'm like a child learning to write 16:17:57 brb, I'm taking a break 16:31:58 k 16:51:47 also, "execution token" is a lot to type in a comment, so people often abbreviate it as xt 17:00:33 --- quit: ricky_ricardo_ (Ping timeout: 256 seconds) 17:17:33 night, thanks for the help n stuff :) 17:17:34 --- quit: hellcode (Quit: leaving) 17:34:19 --- quit: ASau (Ping timeout: 240 seconds) 17:56:56 --- join: nighty (~nighty@p001.gate.atson.jp) joined #forth 18:18:57 --- quit: proteusguy (Remote host closed the connection) 18:32:02 --- join: mnemnion (~mnemnion@2607:fb90:270a:b94e:2864:c71c:e584:a77d) joined #forth 18:43:56 --- join: John[Lisbeth] (~user@52.165.40.155) joined #forth 18:44:03 this is some really good vaporwave https://www.yourepeat.com/watch?v=g9YnEGwL8yA 18:57:46 --- join: neceve (~ncv@unaffiliated/neceve) joined #forth 19:00:32 --- join: rgrinberg (~rgrinberg@24-246-56-85.cable.teksavvy.com) joined #forth 19:02:37 --- join: ricky_ricardo (~rickyrica@2601:240:4203:ecb0:ddea:ffe9:eaf:434e) joined #forth 19:18:38 --- quit: rgrinberg (Remote host closed the connection) 19:22:33 --- join: ASau (~user@netbsd/developers/asau) joined #forth 20:01:30 --- join: Kumool (~nal@adsl-64-237-236-63.prtc.net) joined #forth 20:05:17 --- quit: nal (Ping timeout: 256 seconds) 20:20:31 --- join: the_count (~weston@172-1-66-81.lightspeed.frokca.sbcglobal.net) joined #forth 20:21:15 --- quit: groovy2shoes (Quit: Leaving) 20:31:57 --- join: mnemnia (~mnemnion@2601:643:8102:7c95:e13e:3f68:1b47:6302) joined #forth 20:35:18 --- quit: mnemnion (Ping timeout: 260 seconds) 20:53:17 --- quit: neceve (Quit: Konversation terminated!) 20:58:33 --- quit: ASau (Remote host closed the connection) 20:58:47 --- join: ASau (~user@netbsd/developers/asau) joined #forth 21:19:27 --- quit: ASau (Ping timeout: 260 seconds) 21:22:46 --- quit: the_count (Quit: leaving) 21:30:25 --- quit: John[Lisbeth] (Remote host closed the connection) 21:31:36 --- join: John[Lisbeth] (~user@52.165.40.155) joined #forth 21:34:06 he hehe 21:44:19 --- quit: Kumool (Quit: WeeChat 1.4) 22:29:04 gordonjcp: you mean motorola? that was before 68k ? 22:31:36 --- quit: John[Lisbeth] (Remote host closed the connection) 22:42:37 woah, 16-bit "emulation", I see why you recommend it for forth ) 23:03:44 --- quit: dys (Ping timeout: 250 seconds) 23:45:16 --- join: dys (~dys@ip-109-44-3-148.web.vodafone.de) joined #forth 23:55:24 nerfur: yes 23:55:43 nerfur: well, two stacks, and you can implement NEXT in two fastish instructions 23:55:47 now, I want SuperPet 9000 ) 23:56:05 nerfur: it's as 16-bit as the 8086 ever was :-) 23:56:49 yeah, or a Dragon 32 or Tandy Color, or an Epson HX20, or a whole bunch of 1980s home computers 23:57:20 nerfur: http://gordonjcp.github.io/miragetools/ 23:57:27 ^ Forth on a 1980s sampler 23:58:34 --- quit: ricky_ricardo (Quit: No Ping reply in 180 seconds.) 23:59:48 --- join: ricky_ricardo (~rickyrica@2601:240:4203:ecb0:ddea:ffe9:eaf:434e) joined #forth 23:59:59 --- log: ended forth/16.11.09