00:00:00 --- log: started forth/19.04.30 00:12:47 --- quit: jedb (Ping timeout: 246 seconds) 00:19:39 --- join: jedb (~jedb@185.128.24.51) joined #forth 00:47:56 --- join: mtsd (~mtsd@94-137-100-130.customers.ownit.se) joined #forth 00:54:27 --- quit: PoppaVic (Ping timeout: 276 seconds) 01:40:16 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 01:49:35 --- quit: mtsd (Quit: leaving) 02:03:38 --- quit: ashirase (Ping timeout: 258 seconds) 02:07:03 --- join: ashirase (~ashirase@modemcable098.166-22-96.mc.videotron.ca) joined #forth 02:57:33 --- join: dave0 (~dave0@108.060.dsl.syd.iprimus.net.au) joined #forth 03:01:42 hi 03:02:47 howdy dave0 03:11:16 hi proteusguy 03:23:21 I have a question about strings in memory I've nevver really thought about. 03:24:49 When you're interpreting a string instead of compiling, does it go into some kind of scratch buffer or just live in memory forever? 03:55:02 depends. 11.6.1.2165 calls for the string to go into a temporary buffer (s") when interpreting (6.1.2165 doesn't specify interpret behavior), 6.2.0945 (c") does not specify interpret behavior. 03:55:19 specifically, for s", 11.6.1.2165 says: 03:55:21 Parse ccc delimited by " (double quote). Store the resulting string c-addr u at a temporary location. The maximum length of the temporary buffer is implementation-dependent but shall be no less than 80 characters. Subsequent uses of S" may overwrite the temporary buffer. At least one such buffer shall be provided. 03:56:40 (I use a circular pool of temporary strings in my forth) 03:57:56 crc: A single buffer would also do though. Since only one buffer is specified, any standard-compliant program must assume that there isn't more than one. 04:02:58 john_cephalopoda: I don't follow the standard :) 04:04:01 string handling in standard forth has always been annoying to me 04:07:39 Yeah. 04:11:50 http://forth.works/ea3688e8fc6fddaa32ed10079db16370 04:11:50 describes my string words 04:24:25 That's a lot of words :D 04:29:24 I currently have 487 words in a standard build of my forth on a unix host, (319 in the base image + 168 host-specific) 05:11:36 --- quit: X-Scale (Ping timeout: 244 seconds) 05:45:00 --- join: X-Scale (HydraIRC@a94-133-38-140.cpe.netcabo.pt) joined #forth 06:53:58 I wrote a fun little morse program 06:54:00 http://thecutecuttlefish.org/tmp/morse.fth 06:54:21 If you got OSS emulation enabled in Linux, you can output morse on your speaker. 06:54:38 Usage: S" MORSE TEST TEXT" MORSE 06:59:24 WilhelmVonWeiner: Do you see any way to improve the program? 07:24:19 delete it all and throw your computer out the window, free yourself from these digital chains and escape into the realm of the living, escape the virtual dead 07:24:27 no lemme have a look 07:25:46 I would turn it into a jump table 07:26:01 so that instead of at runtime you're doing all these IF..THENs 07:26:13 you just execute the word you want 07:26:56 john_cephalopoda: I did a quick port to retro, can't test the audio, but otherwise works ok: http://forth.works/46ebe0de7fe07ca5acd413f125fce5a3.html 07:27:27 I'd second the suggestion to use a jump table here 07:28:02 The - . P syntax is really cool 07:28:59 Wow, looks cool. 07:29:10 crc: ^ 07:34:15 I would do something like: `: ;TARGET POSTPONE ; LATESTXT ; IMMEDIATE` 07:34:43 `: ;target postpone latestxt , ; immediate` even 07:35:01 then `create sounds` and do all your definitions 07:35:05 --- quit: tabemann_ (Ping timeout: 250 seconds) 07:36:57 so MORSE can go something like `COUNT SOUNDS + @ EXECUTE` in a loop 08:05:07 --- join: PoppaVic (~PoppaVic@unaffiliated/poppavic) joined #forth 08:08:57 --- quit: dave0 (Quit: dave's not here) 08:24:11 --- quit: reepca (Ping timeout: 246 seconds) 08:29:59 --- quit: nonlinear (Ping timeout: 245 seconds) 09:25:56 okay, so you got a Morse output. What about input? And it should be independent on the 'fist' of the operator. 09:26:28 heh.. translators 09:27:59 input appears to be a char array 09:49:49 What's the difference between COUNT and @ ? 09:50:40 ( a - a' c) and ( a - c) 09:50:44 Zarutian: Morse input is doable but not as trivial. 09:51:02 sorry, ( a - a' c) and ( a - w) 09:51:45 I'd have to check the amplitude and then decide if the pulse is long or short - which is not too much work. But then I would have to dynamically adapt to the 'fist' of the operator. 09:52:59 it's two translators - text2morse; morse2text. 09:53:46 john_cephalopoda: one could use two leaky integrators with hysterisis self-tuning 09:54:10 A Forth neural network ;þ 09:54:19 You just train it on signals and it will learn :D 09:58:36 http://forth.works/83d56beb6ff6ddf0a331afb6bb23093e.html (removing the if's to use a lookup table, making it more idiomatic for retro) 09:59:37 --- quit: Zarutian (Read error: Connection reset by peer) 10:00:10 --- join: Zarutian (~zarutian@173-133-17-89.fiber.hringdu.is) joined #forth 10:02:04 crc: I saw retro forth being advertised in the German "4th Dimension" forth magazine. 10:02:47 john_cephalopoda: an old issue? 10:05:17 hmm, it's in the latest one :) 10:08:36 * crc wasn't aware it was still being listed there. Nice to see it :) 10:12:48 Apparently somebody is still paying for it 10:15:29 I should really check out retro for real some time. 10:18:52 it's been running in the magazine since 2005, so since the retro7/8 days. 10:24:46 retro is very much non-standard, but it has proven very useful to me over the roughly 18 years I've been working with it. 10:30:56 Well, Forth isn't really a standard but more a way of thinking. 10:35:44 The standard has some really inconvenient things that make working with forth a bit of a hassle. 11:03:23 crc made a really great Forth 11:03:27 my favourite personally 11:04:03 I haven't really done anything with retro yet, its paradigm is a bit more complex than standard forth. 11:04:15 personally it's far simpler 11:04:37 there's no parser you're potentially controlling, no input stream, no reading ahead 11:05:35 No reading ahead? 11:05:41 no reading ahead 11:06:16 Ah, it does :A? for definitions etc. 11:06:19 like ' and ['] and postpone 11:06:41 prefix-based inspired by colorForth 11:11:29 john_cephalopoda: http://forth.works/book.html#syntax describes the prefixes and interpreter design 11:45:40 --- quit: Zarutian (Read error: Connection reset by peer) 11:45:55 --- join: Zarutian (~zarutian@173-133-17-89.fiber.hringdu.is) joined #forth 11:52:40 crc: Hmm, "make -f Makefile.linux" fails to compile on my system because the linker can't find strlcat and some others. Looks like those are BSD functions. 11:53:11 crc: You probably have to link against lbsd. 11:53:40 I have copies of those functions in a file that should be linked when using Makefile.linux... 11:55:26 interfaces/io/strl.c and interfaces/io/strl.h 11:56:04 cd interfaces && cc -O2 -march=x86-64 -pipe -o ../bin/retro -lm rre.c image-functions.o io/filesystem.o io/floatingpoint.o io/gopher.o io/unix.o 11:56:07 io/gopher.o: In function `gopher_fetch': 11:56:09 gopher.c:(.text+0x14f): undefined reference to `strlcat' 11:56:48 I got a library libbsd.so.0.9.1 on my system. 11:57:27 But the math library libm seems to be the only thing that gets linked in. 11:59:24 it looks like your 'make' isn't using the Makefile.linux (the `-lm` comes at the end of the line on linux: "cd interfaces && cc -o ../bin/retro rre.c image-functions.o io/filesystem.o io/floatingpoint.o io/gopher.o io/unix.o io/strl.o -lm") 12:00:36 * crc rather increasing dislikes dealing with the gnu toolchain... 12:02:24 what version of make? 12:05:24 GNU Make 4.2.1 12:05:56 "man make" says that -f works. 12:06:56 But when I do "mv Makefile.linux Makefile" and run make, it appears to do it right. 12:07:10 Only problem is that it doesn't seem to accept my PREFIX... *sigh* 12:07:24 seems to be a problem with your machine 12:07:57 http://forth.works/56e043ebd8267d88876ec879a9cd02ae 12:07:57 is a shell script to build it on linux, run via `sh filename` 12:09:12 --- quit: gravicappa (Ping timeout: 255 seconds) 12:09:20 Ok, got it to work now, with qhttps://bpaste.net/raw/54813aedd587 12:09:24 -q 12:15:05 * crc wonders if it would work if I used GNUmakefile instead of Makefile.linux 12:28:35 --- join: mtsd (~mtsd@94-137-100-130.customers.ownit.se) joined #forth 12:28:40 * PoppaVic chuckles 13:00:12 I've renamed Makefile.linux and added a troubleshooting subsection to the Linux build instructions 13:00:52 (in the dev branch, I'll add a bit to the main page relating to this soon) 13:41:13 --- quit: mtsd (Quit: leaving) 13:58:29 crc: I find it a bit hard to get into retro. It would be nice if basic syntax examples would be given (like "'Hello,_world! s:put" or "#3 #4 + n:put"), also "Source files must be written in Unu format." is mentioned several time with no explanation what Unu format is. 13:58:58 When I look it up, the first result is "Apply for a Fellowship - biolac.unu.edu" 13:59:08 * PoppaVic chortles 14:00:04 And for "unu format" (with the quotes), I get tons of romanian sites. Which are probably about a lot of things but not that specific format. 14:01:28 Looks like there's some handbook appendix that talks about it. Maybe linking it from the top might make sense. 14:01:59 http://forth.works/book.html#unu-simple-literate-source-files 14:02:23 (thank you for the feedback on these; I'll address them!) 14:03:41 Thanks for listening to my feedback :D 14:03:45 most of the documentation was added in this release, previously there were a handful of text files with some notes and a small-ish set of examples. I'm trying to improve this. 14:04:41 does the word Unu have a deeper or alternative meaning? 14:05:50 unu is a maori word: 14:05:51 1. (verb) (-hia) pull out, withdraw, draw out, extract. 14:07:05 perhaps that's worth putting into the manual as a side note 14:07:31 will do! 14:13:56 --- join: dys (~dys@tmo-085-104.customers.d1-online.com) joined #forth 14:15:10 Aww, history support in retro (-i) would be nice. 14:15:51 I don't think that kind of triviality should be a focus at the moment 14:15:54 I use rlwrap to achieve that 14:15:55 Also going back and forth in the text with arrow keys. 14:15:56 https://github.com/hanslub42/rlwrap 14:16:08 iirc crc you were working on rewriting the kernel right? 14:16:45 WilhelmVonWeiner: mostly the standard library, not the kernel 14:17:07 do you consider the kernel solved 14:17:11 WilhelmVonWeiner: the next release will separate the words better, making it easier to leave things out 14:17:47 WilhelmVonWeiner: the kernel may see small changes, but I don't expect to make any big changes to it in the next few releases 14:17:52 WilhelmVonWeiner: User interface design is not a triviality. It can make the difference between struggling and being productive. 14:19:20 WilhelmVonWeiner: the one wildcard is strings. I *might* change strings to be arrays instead of continuing with zero terminated. This would have impacts on the kernel. 14:19:52 * john_cephalopoda . o O ( Thinking Retro ) 14:20:01 * john_cephalopoda . o O ( Starting Retro ) 14:20:22 WilhelmVonWeiner: but that's not in the near future. That change would have impacts across the entire source tree, and if I do it, it won't be until I can be sure it'll be better and done right. 14:20:46 john_cephalopoda: -i isn't much of a user interface though imo, it's for running a couple lines of code while writing a program in another file 14:21:44 --- join: nonlinear (~nonlinear@unaffiliated/discrttm) joined #forth 14:21:48 I don't use retro interactively very often. Generally I'm running programs written in it, or using an application (e.g., text or block editor) written in it. 15:25:13 --- join: reepca (~user@208.89.170.37) joined #forth 15:46:05 --- quit: dave9 (Quit: dave's not here) 15:46:44 --- join: dave9 (~dave@108.060.dsl.syd.iprimus.net.au) joined #forth 15:57:28 crc: Hmm, I ran into something confusing. *** 'Just_like_this! s:put ASCII:CR c:put *** (without the ***) is a totally valid retro program and runs in interactive mode. When I put it into a file though (with squiggles ~~~), I get no output. 15:58:17 It works in a file when I leave out the ASCII:CR c:put part. 15:59:17 When I replace the c:put with n:put, it outputs the text and 13, just as it should. 15:59:35 I got no clue what the problem with c:put in the file is. 16:01:53 there is #retro by the way john_cephalopoda 16:01:59 --- quit: X-Scale (Ping timeout: 246 seconds) 16:03:48 well CR isn't NL 16:04:01 CR is \r which is to the start of the line 16:04:23 your shell prompt is probaby overwriting the text 16:04:28 --- join: dave0 (~dave0@108.060.dsl.syd.iprimus.net.au) joined #forth 16:04:35 try `nl` instead of `ASCII:CR c:put` 16:04:54 bedtime, peace 16:05:34 nl works. 16:08:17 hi 16:27:16 WilhelmVonWeiner: that is correct. `nl` does a line feed, not a carriage return (hence nl for new line instead of calling it cr) 16:29:11 (at the interpreter, the ok prompt calls nl to go to the next line; there is no prompt when evaluating from a file) 16:32:25 --- quit: dave0 (Quit: dave's not here) 16:59:03 --- quit: john_cephalopoda (Ping timeout: 276 seconds) 17:01:28 --- join: X-Scale (~ARM@83.223.225.104) joined #forth 17:12:53 --- join: john_cephalopoda (~john@unaffiliated/john-cephalopoda/x-6407167) joined #forth 17:37:56 --- join: rdrop-exit (~markwilli@112.201.166.63) joined #forth 18:26:02 Good morning Forthwrights :) 18:28:16 hi rdrop-exit 18:29:12 Hi crc 19:17:54 --- join: gravicappa (~gravicapp@h109-187-32-71.dyn.bashtel.ru) joined #forth 19:36:54 --- quit: pierpal (Quit: Poof) 19:37:12 --- join: pierpal (~pierpal@host197-221-static.34-79-b.business.telecomitalia.it) joined #forth 20:02:27 --- quit: chunkypuffs (Read error: Connection reset by peer) 20:04:03 --- join: chunkypuffs (~chunkypuf@2a01:4f9:2b:16d5::1) joined #forth 22:23:01 --- quit: dys (Ping timeout: 258 seconds) 23:05:52 --- quit: rdrop-exit (Quit: Lost terminal) 23:59:59 --- log: ended forth/19.04.30