00:00:00 --- log: started forth/18.06.03 00:26:32 --- quit: mnemnia (Remote host closed the connection) 00:27:12 --- join: mnemnion (~mnemnion@2601:643:8102:7c95:81ce:6056:3841:efac) joined #forth 00:55:13 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 01:23:42 --- join: dys (~dys@tmo-104-244.customers.d1-online.com) joined #forth 02:03:33 --- quit: mnemnion (Remote host closed the connection) 02:18:51 --- quit: proteus-guy (Read error: Connection reset by peer) 02:19:52 --- join: proteus-guy (~proteusgu@14.207.11.222) joined #forth 02:20:25 --- quit: dys (Ping timeout: 265 seconds) 02:39:40 --- quit: pierpal (Read error: Connection reset by peer) 03:00:05 --- join: pierpal (~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it) joined #forth 03:13:02 --- quit: pierpal (Quit: Poof) 03:13:22 --- join: pierpal (~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it) joined #forth 03:29:42 --- join: mnemnion (~mnemnion@2601:643:8102:7c95:81ce:6056:3841:efac) joined #forth 03:34:22 --- quit: mnemnion (Ping timeout: 265 seconds) 03:41:49 --- quit: pierpal (Ping timeout: 240 seconds) 03:46:56 --- join: dys (~dys@80.187.96.76) joined #forth 03:48:11 --- join: pierpal (~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it) joined #forth 03:50:19 --- quit: pierpal (Client Quit) 03:50:39 --- join: pierpal (~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it) joined #forth 03:57:39 --- quit: pierpal (Ping timeout: 256 seconds) 04:12:09 --- join: TCZ (~Johnny@ip-91.189.219.200.skyware.pl) joined #forth 04:42:47 --- quit: TCZ (Quit: Leaving) 04:42:55 --- join: pierpal (~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it) joined #forth 04:43:11 --- join: TCZ (~Johnny@ip-91.189.219.200.skyware.pl) joined #forth 04:52:56 --- quit: pierpal (Ping timeout: 276 seconds) 05:22:50 --- join: pierpal (~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it) joined #forth 05:23:09 --- quit: jedb (Read error: Connection reset by peer) 05:24:51 --- join: jedb_ (~jedb@199.66.90.209) joined #forth 05:31:40 --- nick: jedb_ -> jedb 06:06:47 --- quit: pierpal (Read error: Connection reset by peer) 06:07:12 --- join: pierpal (~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it) joined #forth 06:26:03 --- quit: pierpal (Read error: Connection reset by peer) 06:31:45 --- join: pierpal (~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it) joined #forth 06:34:56 --- quit: TCZ (Quit: Leaving) 06:48:13 --- quit: pierpal (Read error: Connection reset by peer) 06:49:47 --- quit: dddddd (Remote host closed the connection) 06:51:20 --- join: pierpal (~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it) joined #forth 06:55:51 --- quit: pierpal (Client Quit) 06:56:10 --- join: pierpal (~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it) joined #forth 07:00:22 --- quit: smokeink (Ping timeout: 248 seconds) 07:00:57 --- join: smokeink (~smokeink@59-125-28-152.HINET-IP.hinet.net) joined #forth 07:03:18 --- quit: smokeink (Remote host closed the connection) 07:07:40 --- quit: pierpal (Read error: Connection reset by peer) 07:38:25 --- join: TCZ (~Johnny@ip-91.189.219.200.skyware.pl) joined #forth 07:50:02 --- quit: jedb (Remote host closed the connection) 07:55:30 --- join: jedb (~jedb@199.66.90.209) joined #forth 07:56:53 forth desktop computer when? 07:57:00 working browser 07:57:05 1000x less code 07:57:12 maybe something like usb4? 07:57:15 yeahehaeha! 07:57:26 modern ram is huge! said charles moore 07:57:33 so just have os n apps in ram!! 07:57:37 and more data means less code 07:58:55 when you start working on it 08:07:44 --- quit: TCZ (Quit: Leaving) 08:09:57 --- join: pierpal (~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it) joined #forth 08:12:05 --- quit: pierpal (Read error: Connection reset by peer) 08:33:06 --- quit: Hvacmechanic (Quit: Leaving) 08:37:32 Enough of this. I'm not going to let you use this as a new trolling ground. 08:37:55 --- mode: crc set +b *!~g@209.6.150.53 08:38:12 --- kick: hastuur_ was kicked by crc (no trolling) 08:40:37 --- join: pierpal (~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it) joined #forth 08:43:32 --- join: TCZ (~Johnny@ip-91.189.219.200.skyware.pl) joined #forth 08:51:08 --- quit: TCZ (Quit: Leaving) 09:04:56 is that john lisbeth or is he a different person 09:14:55 different person 09:15:48 hastuur_ is gavino on the comp.lang.forth newsgroup 09:17:25 I won't let him troll here; he's harrassed the newsgroup for over a decade 09:19:46 --- quit: pierpal (Ping timeout: 256 seconds) 09:22:36 I've never understood how people get pleasure from that sort of behavior. 09:22:44 Seems like such a waste of time. 09:38:38 It is a waste of time. 09:51:28 --- join: mnemnion (~mnemnion@2601:643:8102:7c95:81ce:6056:3841:efac) joined #forth 10:04:27 sometimes you just gotta kill some time 10:06:01 but not by trolling the same stuff for a decade 10:06:23 * Zarutian prefers extremely bad puns 10:48:35 --- join: pierpal (~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it) joined #forth 10:49:22 hi 10:59:41 --- quit: pierpal (Read error: Connection reset by peer) 11:16:05 --- join: pierpal (~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it) joined #forth 11:22:11 --- quit: pierpal (Read error: Connection reset by peer) 11:26:57 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 11:34:49 --- join: proteusguy (~proteus-g@182.253.63.32) joined #forth 11:34:49 --- mode: ChanServ set +v proteusguy 11:36:19 the "NEXT" macro for direct threading is very close to the x86 instruction "ret" 11:36:58 depends on how you implement your vm 11:41:14 --- quit: groovy2shoes (Quit: moritura te salutat) 11:46:59 --- join: pierpal (~pierpal@host23-9-dynamic.16-87-r.retail.telecomitalia.it) joined #forth 11:59:02 if you used %sp as the interpreter pointer, NEXT would become "ret" 12:23:53 --- quit: johnmark (Quit: Leaving) 12:44:41 --- join: tadni (tadnimatri@gateway/shell/matrix.org/x-oacfeltabwjftdzw) joined #forth 13:15:19 Better make sure you don't get any hardware interrupts. 13:41:36 hi 14:29:49 --- quit: dys (Ping timeout: 240 seconds) 14:55:42 --- join: pierpa (57100917@gateway/web/freenode/ip.87.16.9.23) joined #forth 15:27:41 --- quit: a3f_ (Quit: ZNC 1.7.x-git-775-96c92ef - https://znc.in) 15:31:25 --- join: a3f (~a3f@irc.a3f.at) joined #forth 15:31:25 --- quit: a3f (Changing host) 15:31:25 --- join: a3f (~a3f@unaffiliated/a3f) joined #forth 16:39:33 --- quit: mnemnion (Remote host closed the connection) 16:40:16 --- quit: nighty- (Quit: Disappears in a puff of smoke) 16:52:31 --- join: TCZ (~Johnny@ip-91.189.219.200.skyware.pl) joined #forth 17:36:32 --- join: mnemnion (~mnemnion@2601:643:8102:7c95:81ce:6056:3841:efac) joined #forth 17:39:03 --- join: nighty- (~nighty@kyotolabs.asahinet.com) joined #forth 17:49:14 --- quit: TCZ (Quit: Leaving) 17:50:47 I've spent way too long on this 17:50:52 what is a good way to do this: 17:52:14 to do nothing? just do nothing. 17:52:25 given the stack a1 a2, where each is the address of a two-cell linked list node - the first cell being a next pointer, and the second cell being a previous pointer - I want to insert a1 before a2 17:53:43 so, for example, the c version would look like: struct node *p = a2->prev; a1->next = a2; a1->prev = p; a2->prev = a1; *p = a1; 17:54:30 that's hard to do with out 50 words of stack juggling 18:01:17 this is the best I've come up with: 18:01:27 over 2dup ! >r cell+ r@ over @ dup r> cell+ ! ! ! 18:01:42 look at how readable and immediately clear it is 18:02:23 it's like extremely excited gibberish, with the three exclamation points at the end 18:06:36 So a2 is already in the list? 18:07:45 right 18:11:37 I haven't checked your solution, but my knee jerk reaction is that it's length isn't bad - you have a good bit of work to do in this task. 18:16:27 Something slightly longer might be a lot more readable. If you had helper words prev, next, after, and before defined you could say 2dup before prev after 18:17:22 So before would make a1 be before a2 - it would update a1's next and a2's prev pointers. Then prev would replace a2 with its existing predecessor, and after would update te other sets of pointers. 18:17:36 That's easy to understand, but by the time you're done with the helpers it's probably fairly longer. 18:18:21 hmmm. that's not bad though. I might opt for readability here 18:18:25 I'll try it. thanks 18:18:32 My pleasure. :-) 18:19:06 Hopefully each of those required helpers is sufficiently simpler to have readable code themselves. 18:19:24 Feels like they ought to be - they feel like each no more than half of the original problem. 18:20:48 --- quit: FatalNIX (Changing host) 18:20:48 --- join: FatalNIX (~FatalNIX@unaffiliated/fatalnix) joined #forth 18:21:13 it's so hard to get away from thinking like I do in C - where you work with a finite set of primitives and you try to avoid too much overhead in something simple like this 18:22:13 Yeah, Forth really does just have a whole different "mentality." 18:22:51 --- join: smokeink (~smokeink@59-125-75-78.HINET-IP.hinet.net) joined #forth 18:24:22 So am I right in thinking that before is just "2dup cell + ! swap !" 18:25:03 yep 18:25:05 And is after just "swap before"? I didn't think that through, but it seems like it ought to be. 18:25:26 and prev is just "cell + @" I think. 18:25:32 If I'm remember your pointer order right. 18:25:41 If that's all right then this worked out pretty well, I think. 18:26:51 I may have muffed something, but the right answer ought to be pretty close to that. 18:31:33 haha that's nuts 18:31:42 it works: 2dup prev swap link link 18:32:14 maybe still not immediately clear, but a hell of a lot better than mine 18:32:17 :-) 18:32:19 Nice. 18:32:30 looks less intemidating, at least 18:32:36 I think it's clear enough. 18:32:43 and link will be useful for removal, anyway 18:32:51 You do have to *think* about it for a minute, but not too much. 18:33:07 Nice job. :-) 18:33:58 I would rather it be "2dup link prev swap link" but unfortunately that first link will overwrite the a2->prev field so you lose that value for the second link 18:34:17 I see some doubly linked list in my future - I'll have to keep this in the back of my mind. 18:43:27 still could use some cleanup (particular the first part of >list), but I'm happy enough with it for tonight - https://gist.github.com/cmtptr/7113b92a36be9e72aa23bb9ab037f34e 18:47:25 oh, I should fix the comments on before and link - they read the same 18:55:46 okay, revised to be a little more better. factored out a word "prev" which takes a frame of two nodes and translates it to a frame of two nodes shifted back by one. so in other words, given the linked list a->b->c and the stack picture b c, prev gives you a b 18:55:56 now I'm going to bed. goodnight and thanks! 18:56:11 Rest well. 18:56:29 --- quit: dddddd (Remote host closed the connection) 18:56:58 I do like that about forth, by the way - when you find repeated patterns, and you decipher what they're actually doing, and then actually find english names for them and factor them into words 18:57:02 --- quit: pierpa (Quit: Page closed) 18:57:10 I'm not sure whether it's actually a useful thing, but it feels satisfying 18:59:13 Idioms. 18:59:49 And yeah - there's a sense of "rightness" you get about it sometimes. 20:23:11 --- quit: mnemnion (Remote host closed the connection) 20:25:24 --- join: mnemnion (~mnemnion@2601:643:8102:7c95:81ce:6056:3841:efac) joined #forth 20:43:39 --- quit: mnemnion (Remote host closed the connection) 20:47:49 --- join: mnemnion (~mnemnion@2601:643:8102:7c95:81ce:6056:3841:efac) joined #forth 21:22:03 --- quit: proteusguy (Ping timeout: 265 seconds) 22:22:19 --- quit: jedb (Ping timeout: 240 seconds) 22:24:28 --- join: jedb (~jedb@199.66.90.209) joined #forth 22:26:20 --- quit: jedb (Read error: Connection reset by peer) 22:46:17 --- quit: mnemnion (Remote host closed the connection) 22:47:58 --- join: mnemnion (~mnemnion@2601:643:8102:7c95:81ce:6056:3841:efac) joined #forth 23:13:16 --- quit: Labu (Quit: WeeChat 2.0.1) 23:40:12 --- join: jedb_ (~jedb@199.66.90.113) joined #forth 23:59:59 --- log: ended forth/18.06.03