00:00:00 --- log: started forth/18.09.29 01:10:12 --- quit: wa5qjh (Ping timeout: 260 seconds) 01:25:16 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 01:58:23 --- join: wa5qjh (~quassel@freebsd/user/wa5qjh) joined #forth 02:02:29 --- quit: ashirase (Ping timeout: 245 seconds) 02:07:25 --- join: ashirase (~ashirase@modemcable098.166-22-96.mc.videotron.ca) joined #forth 02:50:01 --- quit: wa5qjh (Remote host closed the connection) 02:52:29 --- join: wa5qjh (~quassel@175.158.225.213) joined #forth 02:52:29 --- quit: wa5qjh (Changing host) 02:52:29 --- join: wa5qjh (~quassel@freebsd/user/wa5qjh) joined #forth 03:43:56 --- quit: wa5qjh (Ping timeout: 240 seconds) 03:45:43 --- join: wa5qjh (~quassel@175.158.225.202) joined #forth 03:45:43 --- quit: wa5qjh (Changing host) 03:45:43 --- join: wa5qjh (~quassel@freebsd/user/wa5qjh) joined #forth 03:50:00 --- join: FatalNIX_ (~FatalNIX@caligula.lobsternetworks.com) joined #forth 03:51:30 --- quit: FatalNIX (Disconnected by services) 03:51:30 --- nick: FatalNIX_ -> FatalNIX 03:51:36 --- nick: FatalNIX -> fatalnix 03:51:44 --- quit: fatalnix (Changing host) 03:51:44 --- join: fatalnix (~FatalNIX@unaffiliated/fatalnix) joined #forth 03:53:39 --- join: WilhelmV1nWeiner (dch@ny1.hashbang.sh) joined #forth 03:53:50 --- join: jn___ (~nope@aftr-109-91-37-251.unity-media.net) joined #forth 03:54:49 --- join: nonlinear (~nonlinear@unaffiliated/discrttm) joined #forth 03:56:44 --- quit: NB0X-Matt-CA (Ping timeout: 240 seconds) 03:56:45 --- quit: ashirase (Ping timeout: 240 seconds) 03:56:47 --- quit: jn__ (Ping timeout: 240 seconds) 03:56:47 --- quit: WilhelmVonWeiner (Ping timeout: 240 seconds) 03:59:10 --- join: ashirase (~ashirase@modemcable098.166-22-96.mc.videotron.ca) joined #forth 04:05:39 --- quit: wa5qjh (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) 04:27:21 --- nick: jn___ -> jn__ 04:41:27 --- quit: nighty- (Quit: Disappears in a puff of smoke) 04:58:44 --- join: gravicappa (~gravicapp@ppp83-237-167-161.pppoe.mtu-net.ru) joined #forth 05:44:17 --- join: john_metcalf (~digital_w@host86-144-19-150.range86-144.btcentralplus.com) joined #forth 06:18:59 yunfan: Such things depend critically on the details of a specific CPU. 06:19:16 On some CPUs direct or indirect threading can be faster than STC. 06:21:36 --- join: nighty- (~nighty@s229123.ppp.asahi-net.or.jp) joined #forth 06:47:28 --- quit: gravicappa (Ping timeout: 240 seconds) 08:25:40 --- nick: nonlinear -> NB0X-Matt-CA 08:29:50 --- join: ncv (~neceve@unaffiliated/neceve) joined #forth 08:34:23 --- join: ncv_ (~neceve@unaffiliated/neceve) joined #forth 08:34:29 --- quit: ncv (Read error: Connection reset by peer) 08:37:09 --- quit: ncv_ (Remote host closed the connection) 08:37:30 --- join: ncv_ (~neceve@2a02:c7d:c5c9:a900:1ec6:932f:1b02:d27e) joined #forth 08:37:30 --- quit: ncv_ (Changing host) 08:37:30 --- join: ncv_ (~neceve@unaffiliated/neceve) joined #forth 08:41:05 --- quit: ncv_ (Remote host closed the connection) 08:41:27 --- join: ncv (~neceve@2a02:c7d:c5c9:a900:1ec6:932f:1b02:d27e) joined #forth 08:41:27 --- quit: ncv (Changing host) 08:41:27 --- join: ncv (~neceve@unaffiliated/neceve) joined #forth 09:28:54 --- join: gravicappa (~gravicapp@ppp83-237-167-80.pppoe.mtu-net.ru) joined #forth 09:33:20 --- quit: dys (Ping timeout: 244 seconds) 09:53:28 --- join: kumool (~kumool@adsl-64-237-236-14.prtc.net) joined #forth 09:54:33 --- quit: WilhelmV1nWeiner (Quit: leaving) 09:54:45 --- join: WilhelmVonWeiner (dch@ny1.hashbang.sh) joined #forth 09:59:58 --- quit: ncv (Ping timeout: 252 seconds) 10:55:47 --- join: reepca (~user@208.89.170.250) joined #forth 11:27:09 --- quit: kumool (Ping timeout: 268 seconds) 11:38:07 --- quit: dave9 (Quit: dave's not here) 12:11:24 --- join: kumool (~kumool@adsl-64-237-236-14.prtc.net) joined #forth 12:12:08 --- quit: john_metcalf (Ping timeout: 240 seconds) 14:29:12 --- quit: gravicappa (Ping timeout: 252 seconds) 14:32:31 --- join: wa5qjh (~quassel@175.158.225.206) joined #forth 14:32:31 --- quit: wa5qjh (Changing host) 14:32:31 --- join: wa5qjh (~quassel@freebsd/user/wa5qjh) joined #forth 15:17:17 --- quit: wa5qjh (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) 15:24:43 --- join: mark4 (~mark4@cpe-2606-A000-8096-FE00-5A94-6BFF-FEA6-29D4.dyn6.twc.com) joined #forth 15:37:48 --- join: dys (~dys@tmo-120-104.customers.d1-online.com) joined #forth 15:46:24 --- join: Lpcxo (5adcf502@gateway/web/freenode/ip.90.220.245.2) joined #forth 15:46:27 test 15:46:57 Alright, question, how do I use Forth? Like, I've got the interpreter, what do I do with it? 15:47:10 How do I put it to /practical/ use? 15:48:17 depends on what a practical use is to you. What's some practical stuff you want to do? 15:49:13 Well, I have no idea, really. 15:49:21 Just get some kind of I/O going 15:49:40 ." Hello, world" is something of a classic 15:49:49 Well, yeah, but like 15:50:13 A programming language is kind of pointless if a user has to input things all by themselves, right? 15:50:53 well, not necessarily (something something turing-equivalence), but it is nice 15:51:04 Well, alright. 15:51:22 you can evaluate a file (in the current directory) with "include " 15:51:31 Then... What can I do with it? Cause all this stack stuff sounds really cool, but idk what I can really do 15:51:50 of course, if it isn't in the current directory, you'll need to use an absolute filename (/path/to/) 15:52:09 Yeah 15:52:11 which forth system have you got? gforth? 15:52:19 Yup yup 15:52:29 ah, have you had a glance at the info manual? 15:53:10 it's got a brief sort-of-tutorial and some solid documentation 15:53:35 I haven't actually, one moment 15:55:11 oh wow 15:55:15 it's uh, big 15:56:55 Is it possible to, like, compile though? 15:59:06 like, define new words? Aye: : sayhi ." seen it a million times!" cr ; 15:59:36 Nah, nah, I mean... 16:00:04 Like, with C or whatever you can get an actual program that you can run independent of the interpreter 16:01:59 yeah idgi either 16:02:22 I don't understand how anyone ever uses forth except as an interpreter 16:02:59 yeah 16:03:54 And, again, what for? 16:04:01 with gforth, you can compile a standalone image, but the engine itself will still be needed 16:04:43 Right, gotcha 16:06:16 (the engine being the actual machine-specific primitives implemented in C - the interpreter (the part that reads and executes/compiles words) itself is written in forth, and would be part of the image) 16:06:16 well I suppose the good thing there would be that any expensive parts of compilation could be avoided on startup 16:06:29 it's kind of hard to decouple the application from the interpreter because of the way the language is, for much the same reason as it's hard in lisp 16:07:32 you may have heard of some lisps' save-lisp-and-die functions, but that usually just bundles the entire lisp system with the currently-compiled code 16:08:32 uhhh 16:08:37 I think Forth fairs best when your goal is actually to use the interpreter. Like when you're bringing up an embedded system - you do all the poking and prodding and tinkering with the interpreter. 16:08:54 well yeah but what can you do with it? 16:09:54 some lisps have tree shaking capabilities that will try to only include the parts of the system that actually get used, but stuff like eval makes it really hard to do that. And in forth, it's basically impossible because raw addresses are exposed. 16:10:12 what's tree shaking??? 16:10:57 think of it as throwing away unused code 16:11:03 Well, my basic goal for the one I'm working on now is to roll an operating system (console based) for a little Cortex M4 board I've got. 16:11:15 I used it once to provide a scripting language for a motion control system I did for a client. 16:11:49 The Forth ran on a board that plugged into a pick-and-place machine; its "console interface" was network based. 16:12:05 So you could connect to the right port from a host computer, and run the pick and place. 16:12:24 Scripts could be pushed over so that most of the intelligence for various things was run locally, in the Forth. 16:12:40 The host was a Windows machine that provided a GUI for the system. 16:12:42 i think i get it yeah 16:13:30 i mean, i hear a lot about embedded stuff but is there anything i could run on, you know, something normal? you know, x86, not with any wacky mechanical additions. say, my laptop 16:13:47 most forths provide some sort of capability for compiling standalone executables, but you have to write your code with the awareness that it might be compiled for something different than what you're running. 16:13:47 ah dear my internet connection is being rather unreliable 16:14:34 if you really want a standalone executable, you'll be wanting to look at the part of gforth's manual labeled "Cross Compiler" 16:15:31 i mean, like, anything i could do 16:15:40 projects ig 16:20:51 if you think about it, even in C getting actually standalone code isn't the default - ever deleted libc.so and tried running a C hello world? 16:21:03 um 16:21:06 what's libc.so 16:22:22 it's what you implicitly link to in every C program. Without it, there's no printf, no fopen, etc. It has all the platform-specific implementation of those. 16:22:52 ohhh 16:22:54 so like uh 16:23:03 iostream or whatever 16:24:03 this problem doesn't come up in C because a system without a libc is basically unheard of. If everyone had a gforth interpreter handy, people might call a compiled gforth image a "standalone program" too 16:24:30 gotcha 16:28:27 if you compile a C hello world with the -static flag of gcc, you'll find that it actually ends up at 737KB 16:29:28 what's -static 16:29:50 it includes the libc of the current system in the output program 16:30:03 err, rather, it includes the actual code of all used libraries in the output program 16:31:03 oh okay yeah 16:31:23 (which, might I add, is rather larger than the average forth interpreter) 16:32:49 it'd be disingenuous to say that the gforth engine is smaller than it, since it uses libc itself for ease of implementation 16:34:09 right 16:39:08 Lpcxo: Check out Starting Forth or easyforth for a cool run-through of how to actually use Forth 16:39:53 oh thanks 16:39:59 https://www.youtube.com/watch?v=mvrE2ZGe-rs&t=359s 16:40:09 And this is an hour, but it's really, really worth it. 16:40:53 type it out while he does, pause it if you need to, really try to understand the processes happening and how he's determining what needs to be don 16:42:35 --- quit: Lpcxo (Quit: Page closed) 16:42:42 Starting Forth is great. There's something nostalgic about making a big F (for Forth) out of asterisks. 16:53:14 --- join: siraben (~user@unaffiliated/siraben) joined #forth 17:09:33 --- quit: siraben (Quit: ERC (IRC client for Emacs 26.1)) 17:10:17 --- join: siraben (~user@unaffiliated/siraben) joined #forth 17:39:01 --- quit: dddddd (Remote host closed the connection) 17:41:28 --- quit: fatalnix (Disconnected by services) 17:42:07 --- join: FatalNIX_ (~FatalNIX@caligula.lobsternetworks.com) joined #forth 17:51:31 --- nick: FatalNIX_ -> FatalNIX 18:17:52 --- quit: proteus-guy (Ping timeout: 250 seconds) 18:28:51 --- quit: reepca (Read error: Connection reset by peer) 18:28:52 --- join: reepca` (~user@208.89.170.250) joined #forth 18:29:15 --- join: proteus-guy (~proteusgu@2403:6200:88a6:329f:f42a:4eb4:f99e:8ec2) joined #forth 18:47:01 --- quit: reepca` (Read error: Connection reset by peer) 19:09:26 --- quit: epony (Quit: QUIT) 19:44:27 --- join: dave9 (~dave@90.20.215.218.dyn.iprimus.net.au) joined #forth 19:46:42 hi 19:48:55 hi 19:50:56 hi siraben 19:51:11 Still working on my TI-84 Forth 19:51:25 cool 19:53:03 Found a way to get data out of the calculator; there's a region in memory where if you write to it and do a specific ROM call, it draws the pixels to the screen. 19:53:17 Each pixel is one bit, so by reading the PNG you can get the data back. 19:53:42 https://raw.githubusercontent.com/siraben/ti84-forth/master/data.png translates to https://i.imgur.com/5WxF8LN.png 19:53:52 how many pixels are there? widthxheight? 19:54:43 96 for width and 64 for height 19:55:17 wow 19:55:20 tiny :-) 19:55:23 Although having to type out definitions by hand is getting tedious and error-prone 19:55:47 I'd rather edit on the computer and interpret the string 19:57:03 e.g. trying to implement SEE : https://paste.debian.net/1045228/ 20:02:15 how do you talk to the calculator from the computer? serial line? 20:02:30 USB cable 20:02:36 The computer can take screenshots of the calculator's screen 20:02:50 There is an I/O port but I don't have a cable for it 20:02:57 It would be nice to explore it too with Forth 20:24:15 --- quit: kumool (Read error: Connection reset by peer) 20:24:42 --- join: kumool (~kumool@adsl-64-237-236-14.prtc.net) joined #forth 20:24:49 ah i see how you use cfa> to look up a word from an address 20:41:26 --- quit: mark4 (Read error: Connection reset by peer) 21:11:02 It's almost there 21:11:53 It's almost there 21:11:55 oops 21:43:22 --- quit: kumool (Quit: Leaving) 21:51:59 --- join: epony (~epony@unaffiliated/epony) joined #forth 23:06:27 --- quit: dys (Ping timeout: 252 seconds) 23:59:30 --- join: ncv (~neceve@90.194.40.93) joined #forth 23:59:30 --- quit: ncv (Changing host) 23:59:30 --- join: ncv (~neceve@unaffiliated/neceve) joined #forth 23:59:59 --- log: ended forth/18.09.29