00:00:00 --- log: started forth/18.09.13 00:40:33 --- join: nighty- (~nighty@kyotolabs.asahinet.com) joined #forth 00:41:42 --- quit: MrMobius (Read error: Connection reset by peer) 00:51:44 --- join: mtsd (~mtsd@77.110.61.100) joined #forth 00:55:04 --- quit: dys (Ping timeout: 252 seconds) 00:55:53 --- join: ncv (~neceve@2a02:c7d:c5c9:a900:6eaf:6ef7:3b81:d5f6) joined #forth 00:55:53 --- quit: ncv (Changing host) 00:55:53 --- join: ncv (~neceve@unaffiliated/neceve) joined #forth 01:55:59 --- join: dave9 (~dave@90.20.215.218.dyn.iprimus.net.au) joined #forth 01:56:16 hi 02:02:35 --- quit: ashirase (Ping timeout: 244 seconds) 02:07:27 --- join: ashirase (~ashirase@modemcable098.166-22-96.mc.videotron.ca) joined #forth 02:10:42 --- quit: mtsd (Read error: Connection reset by peer) 02:11:17 --- join: mtsd (~mtsd@77.110.61.100) joined #forth 02:12:17 --- part: mtsd left #forth 02:12:32 --- join: mtsd (~mtsd@77.110.61.100) joined #forth 02:41:29 --- quit: nighty- (Quit: Disappears in a puff of smoke) 02:43:24 --- quit: X-Scale (Ping timeout: 244 seconds) 02:43:48 --- join: [X-Scale] (~ARM@55.198.28.37.rev.vodafone.pt) joined #forth 02:44:01 --- nick: [X-Scale] -> X-Scale 03:06:14 The word `0;` from Retro Forth is so useful I implement it every time I'm using regular Forth, now. 03:07:33 what does it do? 03:07:51 `: 0; DUP 0= IF R> 2DROP THEN ; 03:08:07 If the top of the stack is 0; it leaves the current word early 03:08:17 *is 0 03:08:44 if it's not 0, execution continues as normal 03:09:25 ah so if there was an error and it returned error code 50, it would return from the current word? 03:09:55 damn it's compact 03:09:57 if it retrned error code 50 execution would continue as normal lol 03:10:06 oh haha 03:11:07 I think crc said it was from herkforth 03:11:12 as zr, zero return 03:19:33 --- quit: Keshl (Read error: Connection reset by peer) 03:20:12 --- join: Keshl (~Purple@24.115.185.149.res-cmts.gld.ptd.net) joined #forth 03:21:23 --- join: nighty- (~nighty@s229123.ppp.asahi-net.or.jp) joined #forth 03:27:59 Ah, it's a conditional return. 03:28:11 I have a whole family of them, implemented as primitives. 03:28:19 They're EXTRAORDINARILY useful. 03:28:49 I have versions that consume the stack argument and versions that don't. 03:29:58 I name mine along the lines of 0=; 0<>; 0>; and so on for the ones that consume. and put a . at the start for the ones that don't - .0=; etc. 03:30:04 I LOVE them. 03:30:41 I find I rarely use IF THEN now - I factor and conditional return to the same purpose. 03:31:14 I also have several that do a two level conditional return; those get an extra ; at the end. 03:33:37 It may turn out that only a subset of them really wind up paying off, but I figure I'll learn that over time by having them available and either using them or not. 03:34:13 Ultimately this system is going to have usage-counts, source-wide, so I'll have that data. 04:02:13 --- quit: mtsd (Quit: Leaving) 04:03:02 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 04:06:56 --- join: pierpal (~pierpal@host144-32-dynamic.1-87-r.retail.telecomitalia.it) joined #forth 05:28:20 --- quit: pierpal (Quit: Poof) 05:28:39 --- join: pierpal (~pierpal@host144-32-dynamic.1-87-r.retail.telecomitalia.it) joined #forth 07:35:19 --- join: MrMobius (~default@c-73-134-82-217.hsd1.va.comcast.net) joined #forth 08:04:52 --- quit: dave9 (Quit: one love) 08:10:17 --- quit: groovy2shoes (Quit: moritura te salutat) 08:32:32 WilhelmVonWeiner: correct, 0; is from herkforth. Jason had a number of similar control flow words. This one just happened to be the one I found most useful in my work. 08:38:09 --- join: rixard (~rixard@h-112-233.A444.priv.bahnhof.se) joined #forth 08:38:16 http://sametwice.com/herkforth_words 08:48:10 --- quit: rixard (Quit: rixard) 09:08:08 I think those are fantastic words. 09:44:34 --- join: groovy2shoes (~groovy2sh@unaffiliated/groovebot) joined #forth 10:34:05 --- quit: pierpal (Quit: Poof) 10:34:23 --- join: pierpal (~pierpal@host144-32-dynamic.1-87-r.retail.telecomitalia.it) joined #forth 10:36:56 --- join: dys (~dys@tmo-103-134.customers.d1-online.com) joined #forth 10:38:36 --- join: john_metcalf (~digital_w@host81-136-81-240.range81-136.btcentralplus.com) joined #forth 11:01:21 http://forthworks.com/retro/s/example/LightWeightFlowControl.forth is a retro implementation of most of these (sans the conditional+'if' variants) 11:15:16 --- quit: epony (Ping timeout: 252 seconds) 11:41:21 nice, implemented them in assembler 11:42:27 herkforth doesn't have `rot`... wonder why 11:43:52 --- quit: ncv (Ping timeout: 252 seconds) 12:29:32 --- quit: pierpal (Ping timeout: 272 seconds) 12:41:28 It's not often needed. IIRC, it's only used in one word in retro's base system, and maybe one pf the examples 12:52:44 --- join: pierpa (57012090@gateway/web/freenode/ip.87.1.32.144) joined #forth 16:36:21 --- join: epony (~epony@unaffiliated/epony) joined #forth 16:46:53 --- join: dave9 (~dave@90.20.215.218.dyn.iprimus.net.au) joined #forth 16:48:27 hi 16:57:51 --- quit: nighty- (Quit: Disappears in a puff of smoke) 17:25:13 do you guys use VALUE 17:25:24 and TO 17:25:59 I must not - I don't know what they are. :-) 17:27:22 it's like a variable you don't have to fetch 17:28:29 12 VALUE foo foo ( 12 is on the stack ) 5 - TO foo ( now nothing is on the stack and foo has the value of 7 ) 17:30:01 I didn't implement it in my forth, just wondering how commonly used it was. it's not as flexible as @/! but you can see it cleans up some operator noise 17:42:16 Oh. CONSTANT. 17:42:19 I have that. 17:43:41 zy]x[yz: VALUE is heavier than @ and ! because it's more or less creating a deferred word http://amforth.sourceforge.net/TG/recipes/Values.html 17:44:15 looks a lot cleaner though 17:46:22 KipIngram, no, it's not constant 17:46:57 it creates a word which might look like a constant but you can reassign it 17:47:03 Well, looks like it behaves like one in some ways. 17:47:23 Can you still change it? 17:47:45 I actually do have a couple of system variables that self-fetch. 17:47:55 Things that the init code needs to be able to set, but which I never change myself. 17:48:39 I forget what I called them - I think I may have named the CFA routine "donav," playing off of "navigation." Probably not a very good name. 17:49:05 yeah I guess instead of using VALUE and TO I find myself doing tbis a lot: VARIABLE (foo) : foo (foo) @ ; 17:49:16 Right. 17:49:23 Hey, I bought one of these the other day: 17:49:25 https://learn.adafruit.com/introducing-adafruit-itsybitsy-m4/overview 17:49:33 It came today, and seems to work really well. 17:49:43 192k RAM, 520k flash, 120 MHz processor. 17:50:00 You can use screen to serial connect to it, and it drops you into a Python interpreter. 17:50:08 It has a bootloader, though, so you can replace that code. 17:50:15 Obviously I want to port my Forth. :-) 17:50:43 Nice suite of resources. 17:51:07 Uses the UF2 format for flash images. 17:51:53 man I need to get off my ass and play with fun stuff like that 17:52:15 15 bucks. 17:52:28 And it has the ram and mass storage to match the first IBM PC I ever bought, and runs 20x faster. 17:52:34 We've really come a long way. 17:52:36 Two square inches. 17:52:39 yes 17:53:08 That stuff feels like stone knives and bearskins now. 17:53:22 I still have a bunch of avrs I ordered like four years ago. got the spi programming working, made a servo turn with it, haven't touched it since 17:53:43 Yeah, I've got boxes of components from the past sitting around. 17:53:52 Like a whole pile of 22V10s, etc. 17:53:59 Some Spartan 6 FPGAs. 17:54:35 And you know, if Xilinx would document their bitstream and make it so I could just drag a file onto a disk on my desktop to program those things, I might use them. 17:54:50 That's how you program this thing. You double tap the button and it activates the bootloader. 17:54:56 A disk drive appears on your desktop. 17:55:02 You just drop a UF2 file on that, and it programs. 17:55:07 Now, it just doesn't get any easier than that. 17:56:05 I can easily see using one of these little boards in hobby projects, because I can treat it like a through-hole component. 17:56:15 It sort of captures all the nasty surface mount stuff for me. 17:57:02 If I ever make something "serious" (potentially commercial), then I'd buy the parts, but this is a handy assembly. 17:58:44 I like how on the ga144 when you create a variable you're creating a new fetch and a new store word. https://blogs.msdn.microsoft.com/ashleyf/2014/07/04/f18-variables/ 17:58:44 You might want only @ for a sensor and only ! for an actuator. 17:58:44 So memory isn't the only thing you might want to @ to and ! from, 17:58:44 ...furthermore you might want @ and ! to do more than just literal @ from and ! to a memory address, you might want them to find a mapping for you such as with Mill's Methods https://en.wikipedia.org/wiki/Mill%27s_Methods for reverse engineering fpga bitstream. 18:00:30 --- quit: phadthai (*.net *.split) 18:00:31 --- quit: akkartik (*.net *.split) 18:00:40 --- join: akkartik (~akkartik@akkartik.name) joined #forth 18:01:01 --- join: phadthai (mmondor@206.248.143.74) joined #forth 18:01:02 That's the idea behind CREATE ... DOES> ... ; , right? 18:12:33 --- part: lf94 left #forth 18:39:01 --- join: nighty- (~nighty@kyotolabs.asahinet.com) joined #forth 18:39:49 --- quit: dddddd (Remote host closed the connection) 19:31:20 --- quit: pierpa (Quit: Page closed) 19:35:23 --- join: pierpal (~pierpal@host144-32-dynamic.1-87-r.retail.telecomitalia.it) joined #forth 19:45:40 --- quit: pierpal (Quit: Poof) 19:45:58 --- join: pierpal (~pierpal@host144-32-dynamic.1-87-r.retail.telecomitalia.it) joined #forth 19:50:57 --- quit: dave9 (Quit: one love) 20:02:31 --- quit: z0d (*.net *.split) 20:02:32 --- quit: KipIngram (*.net *.split) 20:02:47 --- join: KipIngram (~kipingram@185.149.90.58) joined #forth 20:04:24 --- nick: KipIngram -> Guest16591 20:05:18 --- nick: Guest16591 -> KipIngram 20:05:53 --- mode: ChanServ set +v KipIngram 20:07:55 --- join: z0d (~z0d@unaffiliated/z0d) joined #forth 21:13:07 --- quit: pierpal (Remote host closed the connection) 21:30:26 --- quit: APic (Ping timeout: 240 seconds) 21:34:41 --- join: APic (apic@chiptune.apic.name) joined #forth 23:57:13 --- quit: dys (Ping timeout: 252 seconds) 23:59:59 --- log: ended forth/18.09.13