00:00:00 --- log: started forth/18.02.05 00:15:36 --- join: mtsd (4d6e3d64@gateway/web/freenode/ip.77.110.61.100) joined #forth 01:27:13 --- join: tomlukeywood (~quassel@host-92-19-232-58.static.as13285.net) joined #forth 01:28:58 --- join: dys (~dys@2003:5b:203b:100:6af7:28ff:fe06:801) joined #forth 01:34:04 --- join: ncv__ (~neceve@2a02:c7d:c5c9:a900:1ec6:932f:1b02:d27e) joined #forth 01:34:04 --- quit: ncv__ (Changing host) 01:34:04 --- join: ncv__ (~neceve@unaffiliated/neceve) joined #forth 02:04:35 --- quit: tomlukeywood (Remote host closed the connection) 02:06:17 --- quit: mtsd (Ping timeout: 260 seconds) 02:07:32 --- join: mtsd (4d6e3d64@gateway/web/freenode/ip.77.110.61.100) joined #forth 03:15:18 --- quit: nighty- (Quit: Disappears in a puff of smoke) 03:19:47 --- quit: mtsd (Ping timeout: 260 seconds) 04:25:20 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 04:32:29 --- join: nighty- (~nighty@s229123.ppp.asahi-net.or.jp) joined #forth 05:09:19 --- join: lijero (~lijero@unaffiliated/lijero) joined #forth 05:58:09 --- join: mstevens (~mstevens@2001:ba8:1f1:f1ef::4) joined #forth 06:05:34 --- join: tomlukeywood (~quassel@host-92-19-232-58.static.as13285.net) joined #forth 06:10:27 wiggy2394772347: try http://sprunge.us/aLMM 06:11:01 This does a fork() and then uses `system` in the child (so the parent continues running) 06:11:20 I haven't been able to get execvp() to work yet 06:11:44 @crc thank you very much for your help. This is a great head start. 06:23:43 What's the best forth to go with Starting Forth? is gforth good? 06:37:35 --- quit: beretta (Ping timeout: 256 seconds) 06:41:54 --- quit: tomlukeywood (Remote host closed the connection) 06:57:55 gforth is good 06:58:39 but as long as the version of forth you use conforms to the current standard you should be fine. 06:59:30 mstevens: eForth is good for learning, too. Many ports available and easy to make your own. 07:05:12 cool, I'll keep on with gforth for the moment 07:11:06 With the commercial forths you are paying for support and stuff like graphics libraries. 07:12:49 right now I'm just interested in the basics, although i wouldn't say no to a fancy editor 07:13:49 backer: did you get to read any of Dr Tings books? I heard of eforth but what put me off was it would be on the slow side. 07:15:21 mstevens: use sublime editor if you want a fancy IDE :) have the gforth manual pdf open on a screen and your be fine. If you want a pretty forth then color forth is very nice but its pretty far removed from the standard forth. 07:16:31 wiggy2394772347: why would eForth be on the slow side? You can translate quite a few words into code word to gain speed. 07:17:03 emacs will do me for now 07:18:19 Zarutian_PI: because you don't have so much assembler support as in other forth. A lot more of the work will be on you to make it fast. Not saying its a bad forth its just everything has its applications if I wanted something that was easy to port its a great choice. 07:19:04 mstevens: you have the operating system, you just need a text editor. 07:24:09 --- quit: smokeink (Ping timeout: 256 seconds) 07:42:11 --- join: tomlukeywood (~quassel@host-92-19-232-58.static.as13285.net) joined #forth 07:45:26 --- quit: Zarutian_PI (Read error: Connection reset by peer) 07:45:30 --- join: Zarutian_PI2 (~3.1415@173-133-17-89.fiber.hringdu.is) joined #forth 07:48:05 wiggy2394772347: You will have to do more work in eForth. I had to write an assembler myself. In the beginning, I was assembling with gas and would just add low-level asm functions in the .S. Of course that's no good for developing on the target. 07:49:51 wiggy2394772347: The speed is more of a function of the threading model. The subroutine-threaded forths can be fast, especially if literals, conditionals, etc., are converted to inline asm. In other words, subroutine threading readily allows inlining. 07:51:56 wiggy2394772347: To be fair I never really looked under gforth's hood. I wanted to use eForth because I had an application on a small mcu with little memory. 07:53:39 :backer Honestly I would like to use eforth for a project, seems its a good way to learn how to customise a forth. How much work do you think it would take to get a eforth in a position to work on multiple platforms? like a z80 & 64 bit linux box? 07:56:25 backer: its like 30 machine code routinesthat would be required in each of the targets native code and a switching word I guess. 07:56:31 wiggy2394772347: Quite probably there are already ports for those. Not sure about 64 bit vs 32 under Linux. But it would not be a huge investment of time to make your own port...could just be days. But of course you get no tools and no frills, so unless you like rolling your own and don't have a very sophisticated application (or are just dicking around), you may want to weigh other options. 07:56:54 wiggy2394772347: more or less! 07:57:32 backer: Im writing my own block editor lol.. I like making my own tools. 07:59:50 backer: nah just somthing to run my block editor on a vdu, other than that its just a toy project really. 08:00:48 wiggy2394772347: I think it would be cool to have a kind of Unix-lite shell environment implemented in forth, with "lite" clones of vi and emacs... Not trying to be posix or compliant, just familiar. 08:01:09 --- quit: tomlukeywood (Remote host closed the connection) 08:02:02 wiggy2394772347: For that purpose, eForth would be ideal. 08:02:06 backer: that would be a very nice project, a good way to learn also as you can build up in stages... 08:03:02 backer: would I need to write the graphics card driver? hmm I will take a look at the docs. 08:03:33 wiggy2394772347: wiggy2394772347: I don't know what target you're using. Is this an embedded thing? 08:04:19 I wanted a forth that could be used on stuff like a zx-spectrum, or a regular linux box. 08:05:38 backer: The idea was have a forth that could fit on a sd card, and be used between the new spectrum they are bringing out, and regular linux boxes. 08:07:25 backer: with the spectrum there are rom routines already there for the display I can use but the modern machine I got no idea how to get that to run on the bare metal with a modern 64 bit system. 08:08:56 wiggy2394772347: FWIW, you can make calls into a C library as inline asm. I used a vendor-supplied USB library bundled as a .o in a project. 08:09:57 backer: ahh that takes a lot of the pain out of it. That would work just the same as the rom calls on the spectrum then. Just a matter of reading the docs. 08:10:51 wiggy2394772347: You want to run bare metal x86? Unless you're really hard-core with hardware bring up, you might have more fun running it in userspace on Linux or similar. 08:12:42 If I were you, I'd just stick to the spectrum and get that running first. You will then get more ideas about how to make it portable, and by then you'll just want to re-write it any way. Trust me. :) 08:13:52 * mstevens waguely wants to do something on linux 08:14:04 I would also use as much of the supplied ROM code as I can, then replacing it piecemeal into either forth code or my own asm. Or just use what works and focus on other stuff. 08:15:39 backer: the nice thing with the spectrum is the rom is fully commented and understood. First would just get it actually working on the target then work backwards. With the z80 its a bit on the slow side but looking at the other targets eforth was used on its going to be a speed demon lol. 08:17:10 backer: according to the waybackwhen machine Bill Muench ported eforth to pretty much every 8bit micro cpu I can think off.. its just a matter of finding the code. 08:17:47 It sounds like an ideal platform for a little fun with forth. There must be an eForth z80 port, though I haven't checked. 08:18:01 Are you a student? 08:19:54 backer: nope sadly not I just study this for my own amusement. oh I found the z80 eforth. I will take a look at it but I would prefer to implement it myself... https://github.com/lispnik/eforth/blob/master/z80efort/READ.ME 08:22:10 We're all students, I suppose. :) 08:24:53 backer: In fairness that documentation for the eforth is good. I should be able to get something running on the emulator in a few weeks I guess. :) thanks for the info. 08:27:38 wiggy2394772347: My pleasure. The real experts in the channel can help you with the actual forth. I'm just chiming in to relay my experience using eForth. Have fun! 09:01:17 what's wrong with "800,000 MYVARIABLE 2!" ? 09:01:49 gforth doesn't seem to like the 800,000 09:02:21 most forths I've seen don't support , in numbers 09:02:56 it's an example from Starting Forth 09:03:19 https://www.forth.com/starting-forth/8-variables-constants-arrays/ 09:04:04 but maybe the book is not a perfect match for gforth 09:06:40 I think in gforth to get a double you'd use a . instead of a , 09:10:00 IIRC, the online text examples were tested with SwiftForth and maybe iforth 09:10:46 I did download a swiftforth trial, experimenting now 09:11:30 yeah swiftforth seems happier 09:18:42 --- quit: wiggy2394772347 (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) 09:24:34 --- join: wiggy2394772347 (8269cfbe@gateway/web/cgi-irc/kiwiirc.com/ip.130.105.207.190) joined #forth 09:47:00 --- join: tomlukeywood (~quassel@host-92-19-232-58.static.as13285.net) joined #forth 10:00:39 --- join: Labu (~mik@mvice.pck.nerim.net) joined #forth 10:02:50 --- quit: wiggy2394772347 (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) 10:08:40 --- join: wiggy2394772347 (8269cfbe@gateway/web/cgi-irc/kiwiirc.com/ip.130.105.207.190) joined #forth 10:16:23 --- quit: wiggy2394772347 (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) 10:18:04 --- join: wiggy2394772347 (8269cfbe@gateway/web/cgi-irc/kiwiirc.com/ip.130.105.207.190) joined #forth 10:19:22 --- quit: wiggy2394772347 (Client Quit) 10:24:43 --- join: wiggy2394772347 (8269cfbe@gateway/web/cgi-irc/kiwiirc.com/ip.130.105.207.190) joined #forth 10:30:01 --- quit: wiggy2394772347 (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) 10:31:51 --- quit: mstevens (Quit: leaving) 11:15:43 --- join: gravicappa (~gravicapp@ppp83-237-171-59.pppoe.mtu-net.ru) joined #forth 11:47:08 --- quit: dys (Ping timeout: 265 seconds) 12:09:45 --- join: Roben (~root@154.121.251.149) joined #forth 12:33:20 --- quit: Roben (Quit: Leaving) 12:50:40 --- quit: gravicappa (Ping timeout: 240 seconds) 12:58:07 --- quit: ncv__ (Ping timeout: 256 seconds) 13:35:16 --- quit: tomlukeywood (Remote host closed the connection) 14:02:41 --- quit: Labu (Quit: Leaving.) 14:31:24 --- quit: djinni (Quit: Leaving) 14:35:10 --- join: djinni (~djinni@68.ip-149-56-14.net) joined #forth 15:12:40 --- quit: groovy2shoes (Quit: moritura te saluto) 15:52:23 --- quit: nighty- (Quit: Disappears in a puff of smoke) 17:02:08 --- join: nighty- (~nighty@kyotolabs.asahinet.com) joined #forth 17:21:19 --- nick: Zarutian_PI2 -> Zarutian_PI 17:44:59 --- join: WilhelmVonWeiner (~dch@cpc88628-newt36-2-0-cust289.19-3.cable.virginm.net) joined #forth 17:46:28 How would one implement a mathematical log(n) in Forth? 17:50:51 How would one implement it in any other language? 17:53:23 #include 17:55:01 oh god not log, I meant ln 17:56:07 Because I thought Forth lacks floating point, so I can't use 2.718 17:59:19 well, if my numerical analysis prof's mantra is anything to go by, the answer is always a taylor series 18:18:32 --- join: beretta (~beretta@99-47-251-23.lightspeed.clmboh.sbcglobal.net) joined #forth 18:19:04 WilhelmVonWeiner: you could use fractions for some of it 18:21:28 i guess some language will commit machine code 18:24:47 --- join: Gromboli (~Gromboli@static-72-88-80-103.bflony.fios.verizon.net) joined #forth 18:33:14 * Zarutian_PI rather likes the Icelandic translation of "floating point unit" which is "slumpreikniverk" 18:54:22 WilhelmVonWeiner: FWIW, ANS Forth has optional floating point words. See forthworks.com/forth/standards/DPANS/DPANS.txt section 12.6. For ln, the word should be `FLN` (12.6.2.1553) 19:02:21 I was completely unaware, thanks 19:22:44 --- quit: dddddd (Remote host closed the connection) 20:32:19 --- quit: Gromboli (Quit: Leaving) 21:31:34 --- quit: cheater (Ping timeout: 248 seconds) 21:32:57 --- join: cheater (~cheater@unaffiliated/cheater) joined #forth 21:50:17 --- quit: lijero (Remote host closed the connection) 21:52:00 --- join: Labu (~mik@mvice.pck.nerim.net) joined #forth 22:04:50 --- quit: beretta (Ping timeout: 240 seconds) 22:36:07 --- quit: WilhelmVonWeiner (Ping timeout: 260 seconds) 22:37:57 --- join: WilhelmVonWeiner (~dch@cpc88628-newt36-2-0-cust289.19-3.cable.virginm.net) joined #forth 23:00:45 --- quit: Labu (Ping timeout: 256 seconds) 23:30:34 --- join: Labu (~mik@mvice.pck.nerim.net) joined #forth 23:59:59 --- log: ended forth/18.02.05