00:00:00 --- log: started forth/18.12.07 01:00:33 --- quit: dave0 (Quit: dave's not here) 01:13:50 --- quit: gravicappa (Ping timeout: 244 seconds) 01:14:36 --- join: mtsd (~mtsd@94-137-100-130.customers.ownit.se) joined #forth 01:33:40 --- join: ncv (~neceve@unaffiliated/neceve) joined #forth 02:04:28 --- quit: ashirase (Ping timeout: 244 seconds) 02:18:03 --- join: ashirase (~ashirase@modemcable098.166-22-96.mc.videotron.ca) joined #forth 02:19:50 --- join: gravicappa (~gravicapp@109.233.168.8) joined #forth 02:35:13 --- join: dave0 (~dave0@47.44-27-211.dynamic.dsl.syd.iprimus.net.au) joined #forth 02:37:03 re 03:00:04 --- quit: mtsd (Quit: WeeChat 1.6) 03:41:56 --- join: john_cephalopoda (~john@unaffiliated/john-cephalopoda/x-6407167) joined #forth 04:20:46 --- quit: gravicappa (Ping timeout: 250 seconds) 04:28:00 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 04:35:29 --- join: rdrop-exit (~markwilli@112.201.164.82) joined #forth 04:35:42 Good evening Forthwrights! 04:37:20 Hey rdrop! 04:37:57 Hi John :) 04:57:16 --- quit: Guest72799 (Quit: leaving) 04:57:37 --- join: WilhelmVonWeiner (dch@ny1.hashbang.sh) joined #forth 05:07:22 Hmm, drawing stuff in Forth isn't as simple as I expected. 05:07:54 In what way? 05:08:57 I got a framebuffer and I want to put a line into it. Turns out that Bresenham is more difficult to implement than I expected. 05:10:00 Why is that? 05:13:08 Well, it's just a little complex. But I guess I'll get it done somehow. 05:14:20 I see 05:15:30 --- quit: pierpal (Read error: Connection reset by peer) 05:15:45 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 05:18:00 The last time I did any graphics programming was in the 80s 05:29:00 --- quit: pierpal (Quit: Poof) 05:29:15 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 05:32:02 Hehe 05:33:56 I still have a few boxes of books gathering dust if I ever need to revisit the topic. 05:37:13 I'm sure the graphics accelerators have completely changed that world since then. 05:38:45 I was still working with VGA IIRC 05:39:31 and SVGA 05:51:05 https://thecutecuttlefish.org/tmp/forth.png 05:51:20 Drawing sixels on the screen. 05:52:22 Code: https://bpaste.net/show/4ffcc0f064e0 05:54:45 --- join: mark4 (~mark4@148.80.255.161) joined #forth 05:56:54 --- join: gravicappa (~gravicapp@h109-187-251-29.dyn.bashtel.ru) joined #forth 05:57:30 You could define a pen location for drawing such things, as in Postscript or turtle graphics. 05:58:54 up down right left turn lift etc... 06:01:57 Hmm, that sounds like a nice idea. 06:02:56 You also might want to have your redraw only send commands to redraw only the changes from what was on the screen before. 06:05:10 Using a pen metaphor for graphics is nice, pen color, pen thickness, etc... 06:05:15 That redraw is there for sixels. 06:06:08 Sixels basically work like a printer: You can print one and end up at the next sixel position, you can go to the start of the next printing line or you can go back to the start of your current line (useful for multi-color drawing). 06:06:19 Do the sixel control sequences require that you resend the whole screen each time? 06:06:30 Basically yes. 06:06:44 But there's run-length-encoding, so a basic form of compression is supported. 06:07:31 if you are drawing with a pen you only need start/end? 06:08:50 I am drawing to a framebuffer and printing that out with the redraw command, so that's nice. 06:09:00 bbiab 06:09:00 --- quit: john_cephalopoda (Quit: Trees can see into your soul. They lurk everywhere.) 06:09:16 i invented a very simple compression method that compressed 32k down to 90 bytes 06:09:22 but it was very specialized 06:09:33 not lossy 06:09:57 There must have been much redundancy in that 32k. 06:10:20 it worked on large areas of adjacent pixles being the same color both horizontally and vertically 06:10:43 and compression round 1 gave me large amounts of consecutive 0 bytes :) 06:10:50 2 dimensional run length compression 06:10:50 so rle was very effective after that 06:10:54 basically 06:10:57 sort of 06:11:19 i compressed each scan line either horizontally or vertically. the first scan line is compressed horizontally 06:11:50 the first N bits are the first pixle color. the next bit is a 0 if the next pixle is the same color else its a 1 followed by the new color 06:11:55 repeat till end of line 06:12:19 each succesive scan line is compressed either horizontally or vertically as follows, which ever is better 06:12:46 i have a copy of the previous scan line in a buffer in uncompressed format 06:12:50 There's som much you can do with compression if you know the typical patterns and redundancy in the source data. 06:13:02 *so much 06:13:24 What they do with video compression is impressive 06:13:32 the current scan line is compared with that. if the pixle at offset N on the line we are compressing is the same color as the one above it we output a 0 bit. else we output a 1 bit followed by the new color 06:13:45 when we are done with this for every scan line we RLE the result 06:14:36 Cool 06:14:51 i sent that algorithm to the people developing VNC but they never used it 06:14:55 many many MANY years ago 06:15:09 i developed that in the 90's 06:15:13 early 90's 06:15:28 guess ill call it public domain :) 06:15:35 no! i mean its $72465823658236554 a license! 06:15:37 im rich! 06:20:46 --- quit: Zarutian (Ping timeout: 246 seconds) 06:21:50 The most fun I had with compression was like stuff was implementing the Burroughs-Wheeler transform as part of a larger program for sequence matching, it felt like coding up a magic trick. 06:23:31 im currently working on dynamic huffman encoding, static huffman i already did 06:23:42 i think burrows wheeler would help me with this 06:24:33 It's so simple, but so hard to wrap one's head around. Magic. 06:25:35 only glanced at the wikipedia page on it and that was not very readable or understandable lol 06:25:51 --- join: john_cephalopoda (~john@unaffiliated/john-cephalopoda/x-6407167) joined #forth 06:25:52 for BW i mean 06:26:07 dynamic huffman is easy, i even have tree scaling implemented :) 06:26:26 I have a book on it, articles from different authors on different applications for it. 06:26:29 i.e. rebuilding the tree when something goes beyond some waterline. like widthy of tree, depth of tree, max root weight... etc 06:26:57 The title is simply "The Burroughs-Wheeler Transform" 06:28:51 i have a book called "Termcap and Terminfo" that helped me do my terminfo parsing. i actually had EVERYTHING already figured out except the alt charset stuff and i got it all from man 5 terminfo. 8 hours of it lol 06:29:27 8 hours of man 5 terminfo followed by an hour or so of coding and i had a fully working terminfo parser 06:29:37 coded in forth of course :P 06:29:44 Cool 06:30:38 your name is one of the reasons i will never use an ans forth. you cant know at any given time with ans what is at the top of the return stack unless YOU put it there yourself so you can do r>drop exit to return 2 levels up because you do not know your return address is there 06:31:05 I just stick to the most basic lowest denominator ECMA-48 control codes for my terminal programs. 06:31:24 : foo ." foo" cr ; : bar ." bar" r>drop ; : fud ." fud" bar ; 06:33:20 blargh my example never called foo - but the point is in ans forth you cant use return stack manipulations to control execution flow 06:33:40 I actually use the "bail;" for "rdrop exit", I also have "?bail;" and "0bail;" 06:34:00 ANS Forth abstracts too much away 06:36:10 very forthy :) 06:36:27 I even have 2bail; ?2bail; 02bail; and 3bail; ?3bail; and 03bail; 06:36:44 i have a ?: definittion i invented so if foo else bar then becomes ?: foo bar 06:36:55 Those are used mainly internally in control flow words 06:37:25 I almost never use "else" 06:37:29 i also invented "either" and "neither" return true if a is equal to either b or c. return true if a is equal to neither b or c 06:38:58 so : either ( a b c --- f1 ) .... ; and : neither ( a b c --- f1 ) .... ; 06:40:44 brb 06:43:37 Do you use that much? 06:44:16 not much but some 06:44:40 usually to check if a key press is one of 2 chars or NOT one of 2 chars 06:44:57 if key is either A or a for example 06:46:25 I see, I use keymaps for that type of thing 06:47:03 well my forth has dynamic keymaps that you can define where certain keys have an associated operation 06:47:32 but for trivial tests i use either/neither 06:47:37 rarely but i do use it 06:48:12 Cool 06:48:46 I use the 2-1 mux instruction a lot 06:48:55 ? 06:49:19 mux ( x1 x2 mask -- x ) 06:50:22 It's a primitive, equivalent to (~mask&x1)|(mask&x2) 06:52:13 The bits of x come from x1 for the mask bits that are 0. 06:52:32 For the mask bits that are ones they come from x2. 06:53:22 x1 and x2 are then or'd? 06:54:29 x1 is anded with the inverted mask, x2 is anded with the mask, then the two are or'ed together 06:54:44 right 06:54:48 and what is that used for? 06:54:57 Are you familiar with multiplexers? 06:55:03 not really lol 06:55:15 It's a 2-1 multiplexer 06:55:22 brb 06:57:50 Here's an example: 06:58:06 0 shadow Address Space Partitioning - 1 K 06:58:06 1 06:58:06 2 >offset Replace low 10 bits of with low 10 bits of 06:58:06 3 . 06:58:15 0 source Address Space Partitioning - 1 K 06:58:17 1 06:58:17 2 : >offset ( u offset -- u' ) 1023 mux ;inline 07:00:37 See my example in a reply to a recent r/forth post: 07:01:23 https://www.reddit.com/r/Forth/comments/9wo1g2/an_elvis_operator_for_8th/ 07:02:58 : foo ( x|0 default -- x|default ) over 0= mux ; 07:03:37 The foo above is what I was proposing as a solution to his needs 07:05:42 If x is 0, it is replaced by default 07:08:28 Make sense? 07:10:56 Gotta give the dogs a walk before they sleep, chat again soon. 07:11:40 --- quit: rdrop-exit (Quit: Lost terminal) 07:48:11 --- join: zch (~zch@gateway/tor-sasl/zch) joined #forth 07:52:12 --- quit: pierpal (Quit: Poof) 07:52:30 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 08:04:47 --- quit: zch (Ping timeout: 256 seconds) 08:06:03 --- join: verisimilitude (~user@2604:180:2:725::698a) joined #forth 09:36:10 --- quit: ncv (Remote host closed the connection) 10:48:14 --- join: Zarutian (~zarutian@173-133-17-89.fiber.hringdu.is) joined #forth 11:42:55 --- quit: gravicappa (Ping timeout: 245 seconds) 11:54:06 --- quit: dave0 (Quit: dave's not here) 12:15:38 pointfree: Do you want to work together on a sixel drawing library for Forth? 13:24:07 --- quit: jn__ (Ping timeout: 252 seconds) 13:24:34 --- join: jn__ (~nope@aftr-109-90-232-81.unity-media.net) joined #forth 13:27:28 --- quit: zy]x[yz (Read error: Connection reset by peer) 13:28:21 --- join: zy]x[yz (~corey@unaffiliated/cmtptr) joined #forth 13:55:48 --- quit: mark4 (Ping timeout: 250 seconds) 14:11:52 --- quit: jn__ (Ping timeout: 246 seconds) 14:48:11 --- join: mark4 (~mark4@12.41.103.244) joined #forth 14:58:12 --- quit: mark4 (Ping timeout: 250 seconds) 14:58:29 --- join: mark4 (~mark4@12.41.103.244) joined #forth 15:12:02 --- join: dys (~dys@tmo-123-49.customers.d1-online.com) joined #forth 16:16:29 --- join: phadthai_ (~mmondor@206.248.143.74) joined #forth 16:16:44 --- join: kipingram1 (~kipingram@185.149.90.58) joined #forth 16:17:02 --- join: FatalNIX_ (~FatalNIX@caligula.lobsternetworks.com) joined #forth 16:18:51 --- quit: FatalNIX (Ping timeout: 240 seconds) 18:19:07 --- log: started forth/18.12.07 18:19:07 --- join: clog (~nef@bespin.org) joined #forth 18:19:07 --- topic: 'Forth Programming | logged by clog at http://bit.ly/91toWN | If you have two (or more) stacks and speak RPN then you're welcome here! | https://github.com/mark4th' 18:19:07 --- topic: set by proteusguy!~proteus-g@cm-134-196-84-89.revip18.asianet.co.th on [Sun Mar 18 08:48:16 2018] 18:19:07 --- names: list (clog dave0 catern Zarutian nighty-- FatalNIX_ kipingram1 phadthai dys mark4 zy]x[yz verisimilitude pierpal WilhelmVonWeiner dddddd ashirase MrMobius tabemann +proteusguy groovy2shoes DKordic pointfree sigjuice jedb cheater siraben Keshl irsol @crc X-Scale dave9 carc rann libertas jackdaniel Guest13462 jimt[m] pointfree[m] bb010g Lord_Nightmare amuck lonjil nerfur reepca moony rpcope koisoke dzho newcup C-Keen rprimus yunfan vxe +bluekelp ecraven APic mstevens) 18:19:07 --- names: list (izabera djinni lchvdlch Labu malyn diginet2 ovf jhei dne cratuki ttmrichter) 18:49:45 --- quit: dddddd (Remote host closed the connection) 19:41:36 Ive used that assembler too and it is pretty good 19:42:45 I asked if he could have it resolve all symbols and do all calculations before assembling and he got back saying it would be too complicated 19:43:00 nice of him to answer 20:07:06 --- quit: nighty-- (Ping timeout: 268 seconds) 20:20:09 --- join: nighty-- (~nighty@b157153.ppp.asahi-net.or.jp) joined #forth 20:33:02 MrMobius: i like that all the cpu's are available all the time, rather than re-compiling for each different cpu (like the gnu assembler) 20:33:51 *for each different target cpu 20:39:10 --- join: PoppaVic (~PoppaVic@unaffiliated/poppavic) joined #forth 20:55:42 --- quit: pierpal (Quit: Poof) 20:56:01 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 21:34:10 --- quit: verisimilitude (Remote host closed the connection) 21:44:57 --- join: [1]MrMobius (~default@c-73-134-82-217.hsd1.va.comcast.net) joined #forth 21:48:08 --- quit: MrMobius (Ping timeout: 250 seconds) 21:48:08 --- nick: [1]MrMobius -> MrMobius 22:01:29 --- join: jn__ (~nope@aftr-109-90-232-48.unity-media.net) joined #forth 22:31:18 --- quit: pierpal (Read error: Connection reset by peer) 22:33:11 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 22:37:32 --- quit: pierpal (Ping timeout: 250 seconds) 22:40:54 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 22:44:58 --- quit: pierpal (Ping timeout: 246 seconds) 22:51:08 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 22:51:50 --- quit: jn__ (Ping timeout: 250 seconds) 22:53:10 --- join: verisimilitude (~user@2604:180:2:725::698a) joined #forth 22:53:48 --- quit: pierpal (Read error: Connection reset by peer) 22:58:43 --- join: jn__ (~nope@aftr-109-90-232-48.unity-media.net) joined #forth 23:11:32 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 23:15:29 --- quit: pierpal (Ping timeout: 240 seconds) 23:46:44 --- quit: PoppaVic (Remote host closed the connection) 23:50:26 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 23:59:04 --- quit: pierpal (Read error: Connection reset by peer) 23:59:18 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 23:59:59 --- log: ended forth/18.12.07