00:00:00 --- log: started forth/18.12.22 00:39:15 I agree with tabemann , 0branch and branch should be the primitives upon which every other control structure is made 00:40:44 Yay, I can finally get to writing the Forth portion of my operating system https://github.com/siraben/zkeme80/blob/master/forth.scm 00:41:06 I should figure out a way to draw characters to the screen, shouldn't be too hard, except I need a font. 01:29:03 --- join: ncv (~neceve@unaffiliated/neceve) joined #forth 01:29:42 --- quit: ncv (Remote host closed the connection) 01:31:36 siraben: When you can draw sprites to the screen, you should be able tot draw characters. 01:31:51 Yep. I can draw sprites. 01:32:01 It boots up to a smiley face :) 02:03:53 --- quit: ashirase (Ping timeout: 246 seconds) 02:08:34 --- join: ashirase (~ashirase@modemcable098.166-22-96.mc.videotron.ca) joined #forth 02:13:34 --- join: xek (~xek@apn-31-0-23-82.dynamic.gprs.plus.pl) joined #forth 02:32:24 --- join: Zarutian (~zarutian@173-133-17-89.fiber.hringdu.is) joined #forth 02:51:19 : :-) ." smiley!" ; 03:06:36 If anyone is interested in playing around with the system, download the ROM here https://github.com/siraben/zkeme80/raw/master/forth.rom and use the in-browser calculator emulator https://www.cemetech.net/projects/jstified/ 03:07:11 Currently doesn't do much beyond drawing a smiley, waiting for a key to be pressed, and then drawing two squares with XOR. 03:08:36 dave0: hehe, I'll be able to do that soon when I implement : ." and ; 04:11:08 --- quit: Zarutian (Read error: Connection reset by peer) 04:11:14 --- join: Zarutian_2 (~zarutian@173-133-17-89.fiber.hringdu.is) joined #forth 04:11:36 --- nick: Zarutian_2 -> Zarutian 04:12:30 --- quit: dddddd (Ping timeout: 245 seconds) 04:32:50 --- quit: dys (Ping timeout: 250 seconds) 04:43:15 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 06:16:53 --- join: dys (~dys@2a01:598:b105:d712:226:5eff:fee9:68d2) joined #forth 06:31:47 --- quit: dys (Ping timeout: 252 seconds) 06:46:32 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 07:16:41 --- join: dys (~dys@2a01:598:8189:5077:226:5eff:fee9:68d2) joined #forth 07:26:47 --- quit: dys (Ping timeout: 252 seconds) 07:45:58 --- join: dys (~dys@2a01:598:8985:a143:226:5eff:fee9:68d2) joined #forth 07:56:29 --- quit: dys (Ping timeout: 252 seconds) 08:09:37 --- join: dys (~dys@2a01:598:b884:cc78:226:5eff:fee9:68d2) joined #forth 08:18:29 --- quit: dys (Ping timeout: 252 seconds) 08:28:22 --- join: dys (~dys@2a01:598:a088:feb:226:5eff:fee9:68d2) joined #forth 08:41:35 --- quit: dys (Ping timeout: 252 seconds) 09:24:37 --- join: dys (~dys@p200300C9D7300E0002265EFFFEE968D2.dip0.t-ipconnect.de) joined #forth 09:37:37 --- quit: moony (Killed (Sigyn (BANG!))) 09:37:51 --- join: moony (moony@hellomouse/dev/moony) joined #forth 10:27:35 --- quit: dave0 (Quit: dave's not here) 11:02:08 --- quit: dddddd (Remote host closed the connection) 11:38:35 hey guys 13:29:16 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 14:25:49 --- join: learning_ (~learning@47.149.80.42) joined #forth 14:36:28 --- quit: tabemann (Ping timeout: 268 seconds) 14:59:39 Hmm, I wonder how to split http query strings... 15:19:26 --- quit: learning_ (Remote host closed the connection) 15:24:14 --- quit: xek (Ping timeout: 272 seconds) 15:26:06 --- join: tabemann (~tabemann@rrcs-98-100-171-35.central.biz.rr.com) joined #forth 15:37:12 --- join: learning_ (~learning@47.149.80.42) joined #forth 15:37:35 hey 15:42:38 --- quit: pierpal (Ping timeout: 244 seconds) 15:50:09 sup 15:59:50 just working on my documentation for attoforoth 16:00:09 *attoforth 16:06:16 --- quit: dys (Ping timeout: 252 seconds) 16:10:23 anyone have a link to ansi forth pdf 16:10:31 for whatever reason im having a retard moment 16:11:00 not to ansi forth, but if you want info on the latest draft forth standard search for forth 2012 16:11:37 mind you many people around here don't realy like ans forth 16:11:49 *really 16:11:50 honestly just trying to find some decent docs on "read-file" 16:12:02 the forth 2012 docs will have that 16:13:05 (I personally take the parts of forth 2012 that I want, omit the parts I can't be bothered to implement, and implement my own stuff independent of it) 16:13:17 they don't. i dont understand why docs bother to write paragraphs of esoteric information without first providing example uses of the code 16:13:44 it's a standards doc, not a tutorial 16:14:07 i get it but still 16:14:15 it would make understandign what's going on 10 times simpler 16:14:25 its like test first devolopment 16:14:48 it's tests for standards compliance 16:14:52 have an idea of what you're actually trying to do etc. its cool. im sure i can find an example for reading files but for more specific stuff it gets annoying 16:15:23 lisp docs have a lot of examples. though to be fair, the examples a lot of the times are there to point out edge cases and unexpected behavior 16:16:13 https://github.com/tabemann/attoforth/blob/master/examples/file_test.fs 16:16:36 that's for attoforth, but should still work for plain Forth 2012 16:18:07 I used that to test that my file words actually worked to some degree of functionality 16:19:51 ye im think im gonna have to use read-line like you have to do in lisp 16:20:07 i abstracted that shit so long ago lol 16:20:34 god forbid these languages just have a read(file)=> string lol 16:20:40 old ass languages 16:22:32 read-line shouldn't be too hard to use 16:22:48 the only thing to be careful about is when a line is larger than your buffer 16:23:10 it'll only read as much data as can fit in the buffer 16:23:26 roger that 16:25:17 --- quit: john_cephalopoda (Ping timeout: 250 seconds) 16:26:54 really, though, the file-access words shouldn't be that hard to use - they're certainly easier than row POSIX libc calls 16:26:59 *raw 16:27:07 --- join: john_cephalopoda (~john@unaffiliated/john-cephalopoda/x-6407167) joined #forth 16:27:13 hey john_cephalopoda 16:27:26 ye i just hate working with files at a low level 16:27:28 you don't have to worry about interrupted system calls and whatnot 16:27:38 because all i really need is the whole file as a string 16:28:05 that is something you're on your own with, though 16:28:44 you'll need a dynamically resizing buffer and write into that buffer 16:29:16 and forth by default really doesn't have support for dynamically resizing buffers, even though I wrote such for attoforth 16:30:09 if its gonna be a huge pain in the ass to write a file to a string i might just say fuck it 16:30:10 learning_: "mmap"? 16:30:30 https://github.com/tabemann/attoforth/blob/master/examples/file_test.fs 16:31:02 note that this uses what I call "smart" words as a bit of a premature optimization because I needed it for something performance intensive (rendering dithered sixels) 16:31:15 which makes it non-Forth 2012 16:31:21 whoops 16:31:31 https://github.com/tabemann/attoforth/blob/master/src/forth/buffer.fs 16:31:32 that's it 16:32:01 but it can be easily converted to Forth 2012 16:33:22 "read" and "write" Linux syscalls are exactly what You are asking for. 16:33:36 nah 16:33:56 learning_, wants to load the whole file into memory with one word, which sounds more like mmap 16:33:58 I mean what learning_ was asking for. 16:34:36 I've gotta go, so bbl 16:34:44 OK 16:34:45 cya. thanks. 16:36:09 Hey tabemann 16:36:46 tabemann: Will you add a sixel library to Attoforth? 16:37:07 im doing so much magic programming right now 16:37:10 just copy pasting shit 16:37:20 because i really, truly dont give a fuck how this works, just read the fucking file 16:37:33 * PoppaVic sighs 16:37:51 i dont have 3 months to learn how to read a file 16:39:07 --- quit: tabemann (Ping timeout: 250 seconds) 16:43:54 this is why people resort to using python lol 16:46:21 you wanna use a great langauge? great, but you gotta reinvent every fucking wheel 16:48:32 ahhhhh! 16:48:35 thank you rosetta code 16:48:40 this is my reference from now on 16:48:49 s" file" slurp-file 16:48:59 thank fucking god 16:50:50 alright now that that's working i need a break 16:52:19 --- join: dys (~dys@p200300C9D744520002265EFFFEE968D2.dip0.t-ipconnect.de) joined #forth 16:52:34 thanks for putting up with my bitchy ass 16:52:43 cya guys in a bit 16:53:15 --- quit: learning_ (Remote host closed the connection) 17:18:10 --- join: tabemann (~tabemann@2602:30a:c0d3:1890:a433:523c:27b8:b5c8) joined #forth 17:40:21 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 17:44:50 --- quit: pierpal (Ping timeout: 272 seconds) 18:10:22 tabemann: Will you add a sixel library to Attoforth? 18:11:00 I've got one based on dithering to 16 colors (because stock xterm supports that many), but it gets rather poor performance unfortunately 18:11:47 I've made a range of optimizations, and yet I still only get two frames per second for some reason 18:11:55 Also, how do I exit attoforth? 18:12:06 control-D 18:12:21 or BYE 18:12:44 control-C also works, but it doesn't necessarily leave stdin/stdout/stderr in the right state 18:13:03 but it's sometimes necessary if attoforth won't return to the REPL 18:14:04 Oh, one more: Is it possible to pass files to attoforth via commandline args? Or do I have to use hacky pipes? 18:15:46 I've thought of implementing command line options, but haven't gotten around to that 18:16:04 and it's not smart about pipes either; it kinda assumes everything fed in is a terminal 18:16:13 so you should use INCLUDE or REQUIRE for loading code 18:17:16 Well, loading from a file would be convenient for benchmarking. 18:17:32 I could just do "gforth benchmark.fth" and "attoforth benchmark.fth". 18:18:27 I should add that 18:19:16 ./attoforth <<< "12 12 + . BYE" # Crashes 18:20:14 I know why 18:20:41 it's assuming it is a terminal and is eating up part of the input thinking that it is data sent from the terminal in response to control codes 18:21:08 I need to write code so that it doesn't do the special terminal handling when something other than a terminal is attached 18:21:23 Ah, ok. 18:22:22 Hmm, what if you took the char* args[] at program starts and executed "INCLUDE" for all the argument strings? 18:22:49 I don't know your code so I can't say if it's practical, it seems like it would be a good idea though. 18:23:39 what I'd do is write an API that exposes argc/argv to the user, and then in init.fs have it check the second argument (first being "./attoforth"), and if there is one, feed it into INCLUDED 18:24:12 it's something I can do; I just haven't gotten around to it 18:25:13 Nice. 18:25:30 Btw, I got gforth CGI scripts on my server now :D 18:25:44 :D 18:26:33 there's always more stuff I can do with attoforth; my latest additions are function-based control structures 18:27:23 like instead of : foobar IF ." foo" ELSE ." bar" THEN ; you can write : foobar [: ." foo" ;] [: ." bar" ;] CHOOSE ; 18:28:13 so TRUE foobar prints out foo and FALSE foobar prints out bar 18:28:34 and [: ;] forms a nested anonymous function 18:29:58 okay, I do need to go; gotta pick up my daughter from her moms (not logging out, but not going to be on either) - bbl 18:30:10 --- join: rdrop-exit (~markwilli@112.201.164.82) joined #forth 18:38:55 https://thecutecuttlefish.org/testur/test.cgi 18:41:15 You can append a "?123123" to that URL and it will check if it is a number, convert it, and show you that number. 18:42:20 It doesn't handle overflows correctly, but that's not critical for now. 19:30:43 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 19:37:24 --- quit: cheater (Quit: leaving) 19:46:57 Yay, string display is working 19:47:04 On to string input! 20:07:07 --- join: learning_ (~learning@4.35.154.131) joined #forth 20:27:43 --- join: cheater (~cheater@unaffiliated/cheater) joined #forth 20:45:09 --- quit: cheater (Ping timeout: 240 seconds) 20:48:52 --- join: cheater (~cheater@unaffiliated/cheater) joined #forth 21:05:40 --- quit: learning_ (Remote host closed the connection) 21:12:39 --- quit: pierpal (Remote host closed the connection) 21:22:51 --- join: dave0 (~dave0@47.44-27-211.dynamic.dsl.syd.iprimus.net.au) joined #forth 21:23:10 hi 21:33:46 --- part: PoppaVic left #forth 21:57:02 --- quit: moony (Killed (Sigyn (BANG!))) 21:57:21 --- join: moony (moony@hellomouse/dev/moony) joined #forth 23:05:12 --- quit: proteusguy (Ping timeout: 250 seconds) 23:28:45 --- quit: dddddd (Remote host closed the connection) 23:59:59 --- log: ended forth/18.12.22