00:00:00 --- log: started forth/06.03.26 00:09:04 --- join: imaginator (n=George@georgeps.dsl.xmission.com) joined #forth 01:20:01 --- join: Cheery (n=Henri@a81-197-45-47.elisa-laajakaista.fi) joined #forth 04:00:23 --- join: oldman (n=nobody@lsi-01.bit.uni-bonn.de) joined #forth 04:13:22 --- nick: Raystm2_ -> Raystm2 04:19:53 --- join: PoppaVic (n=pete@0-3pool196-200.nas30.chicago4.il.us.da.qwest.net) joined #forth 05:50:50 hmm.. 05:51:05 ANyone awake? 05:51:26 yes 05:51:31 excellent. 05:51:45 ##C was getting tiresome, and I'm mulling some issues.. 05:52:01 do you use structs often in forth? 05:52:48 Or even a lot of order/also vocs? 05:53:14 neither - though I kept issues simple so far (that'll change soon) 05:53:28 I'm beginning to think more about C "contexts" and structs/ptrs.. 05:54:00 I'm beginning to think that voc order & such is sorta' a twisted replacement for "contexts" 05:59:01 I'm seeing some sort of strange pattern, anyway. 06:46:51 --- quit: oldman ("I am going away") 07:24:56 --- quit: PoppaVic ("recycling") 07:26:34 --- join: PoppaVic (n=pete@0-1pool73-50.nas24.chicago4.il.us.da.qwest.net) joined #forth 07:54:55 "Doom, Despair, and Agony on me..." 08:42:42 "Deep, dark depression, exessive missery"... 08:42:42 "If it wern't fer bad luck I'd have no luck at all"... 08:42:42 "Gloom, Dispair, and Agony on me". 08:43:58 o0O0ohhh! 08:45:06 --- quit: PoppaVic ("beerrun") 09:09:44 --- join: PoppaVic (n=pete@0-1pool72-148.nas24.chicago4.il.us.da.qwest.net) joined #forth 09:23:06 * crc is making more headway on the gtk+ bindings for retro 09:23:20 heh 09:23:35 I'm dealing with circular-logic today.. 09:23:56 I had a wonderful brainflash... And, I've been chasing it's ass all day. 09:24:32 (sometimes, it even looks my own ass - but then it pulls ahead...) 10:02:15 --- join: TheBlueWizard (i=TheBlueW@ts001d0605.wdc-dc.xod.concentric.net) joined #forth 10:22:16 --- join: neceve (n=Clau@unaffiliated/neceve) joined #forth 10:25:42 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 10:45:16 oxygene: you still up? 10:47:02 tathi: you awake? 10:48:22 yes 10:49:12 ok... I was thinking about contexts and nesting and unnesting and such.. 10:49:42 Isn't the Rstack supposed to control the return-to points for secondaries? pcode? 10:50:08 I mean, that is it's primary use, is it not? 10:51:07 secondaries/pcode meaning "anything that isn't a primitive" ? 10:51:11 yes 10:51:31 Is there some standard that demands that the Rstack only holds an item of some given size? 10:52:08 it's supposed to be at least as wide as the data stack 10:52:14 so you can use it for >R and such 10:52:16 hmm 10:52:22 I thought so 10:53:08 ok.. I'm trying to rephrase my early AM brainfart.. I keep chasing my ass aroundthe room as I consider it. 10:53:58 OK... hmm... YOu load a forth... it sets up the process, and then it runs QUIT, right? An infinite loop. 10:54:53 ..and, since it is written as a secondary, it's always got an Rstack entry... 10:55:31 yeah, I guess so 10:55:37 hmm 10:56:04 and even r> is going to check before it dumps the entry and cores, right? 10:56:51 depends on the implementation :) 10:57:57 doing r> in the interpreter will crash a fair number of forths 10:58:34 yeah.. I thought I recalled a few mindless versions 10:59:21 and, in most cases there are really at least three stacks, right? Data, Return and (unreachable) Machine? 11:01:27 machine? 11:01:32 Gforth (btw) sees "r>" and pauses, and then sez 'ok' 11:01:41 machine being for the cpu/asm 11:01:48 not all cpu's have a hardware stack 11:01:54 right 11:02:15 If it's written in C, yeah, probably 11:02:22 all I mean is: most forths are riding above the one and only push/pop/call/jmp stack 11:02:26 right. 11:02:53 if it's in asm, the machine stack is often either the data or the return stack 11:02:55 humph.. there could be a light at the end of the tunnel 11:03:06 ahh 11:03:24 I'm not comfortable with thinking of a "machine" stack, in forth. 11:03:31 hadn't though of that, but it makes sense. Usually the Rstack, I suspect 11:03:31 from a conceptual standpoint, it doesn't exist 11:03:47 tathi: and you shouldn't be thinking of it 11:04:03 however, C would 11:04:03 well, x86 calling conventions for C pass the parameters on the stack 11:04:25 so there, it can make more sense to have it be the data stack 11:04:27 hehe - mixed-mode concepts now ;-) 11:05:04 Yeah, I suppose if you're never going to bootstrap your forth 11:05:30 tathi: to be honest, I would also imagine many forths-from-asm also think of "pascal-mode" calls. 11:05:37 But I usually am, so it only makes sense to design so that it would work if there actually ISN'T a third stack. 11:08:21 interesting 11:12:21 I'm thinking that your knowledge of a "number of stacks" is a flaw.. But I'm trying to decide how to best describe it. 11:13:44 I suppose it doesn't matter 11:13:49 what's your point in postulating three stacks? 11:15:39 Well, for starters: I am not using the C stack for much. Just calling funcs with a context and that should be all. 11:16:14 the context-ptr can have two stacks or more. 11:16:50 I'm just not sure.. I'm chasing down an idea. Wanted to double-check, 12:00:12 --- part: TheBlueWizard left #forth 12:26:16 --- quit: PoppaVic ("recycles") 12:28:15 --- join: PoppaVic (n=pete@0-1pool46-181.nas30.chicago4.il.us.da.qwest.net) joined #forth 12:28:43 --- join: segher (n=segher@dslb-084-056-184-010.pools.arcor-ip.net) joined #forth 12:41:25 --- quit: segher_ (Read error: 110 (Connection timed out)) 12:52:57 --- quit: PoppaVic ("Pulls the pin...") 14:01:58 --- quit: Cheery ("Leaving") 14:12:49 --- join: LOOP-HOG (n=chatzill@sub22-119.member.dsl-only.net) joined #forth 14:26:08 --- part: LOOP-HOG left #forth 14:27:00 --- join: Robert (n=robert@unaffiliated/robert) joined #forth 14:31:53 --- join: LOOP-HOG (n=chatzill@sub22-119.member.dsl-only.net) joined #forth 14:32:13 Hi. 14:33:22 hi 14:33:58 most people here have a creative name, but that's ok. I still wonder where uiuiuiu get's his/hers? 14:37:20 Maybe it was overheard from a screaming conversation in a mental hospital? 14:41:51 I don't know 14:42:07 Do any Forthing? 14:42:55 --- quit: virl ("Verlassend") 14:46:27 Yeah. 14:46:33 Writing a small assembler in it. 14:48:15 x86? 14:48:25 No way. :) 14:48:35 http://www.youngprogrammers.net/wiki/2610 -- small hobby project. 14:49:08 hehe 14:49:10 sweet :) 14:49:48 Forth is pretty well-suited for that. 14:49:58 : instruction ( address nextip param opcode -- ) 14:49:59 swap 3 << or 4 << or swap 4* rom + ! ; 14:50:03 That's the core of the assembler. 14:51:31 yeah, I can see that 15:44:15 --- quit: LOOP-HOG ("ChatZilla 0.9.61 [Mozilla rv:1.7.5/20041217]") 15:50:11 --- join: snoopy_1711 (i=snoopy_1@dslb-084-058-133-096.pools.arcor-ip.net) joined #forth 15:58:03 --- quit: Snoopy42 (Read error: 145 (Connection timed out)) 15:58:05 --- nick: snoopy_1711 -> Snoopy42 17:09:10 --- quit: tathi ("bleh") 17:29:27 --- quit: uiuiuiu (Remote closed the connection) 17:29:31 --- join: uiuiuiu (i=ian@dslb-084-056-227-138.pools.arcor-ip.net) joined #forth 17:48:08 I enjoyed writing the assembler for fovium :) 17:48:23 most opcodes have no parameters 17:48:29 and a few have one 17:48:42 (just lit and the various branches iirc) 17:48:44 Hehe, that's nice. 17:53:17 JasonWoof: are the fovium opcodes documented somewhere? 17:53:59 crc: not in much detail, but there's a list with some comments 17:54:09 ok 17:57:07 http://jasonwoof.org/fovium 17:57:51 cool 17:58:01 * crc is looking over the list now 17:58:08 I'll get serious about documenting it some day 17:59:40 I want there to be a specification document that is precice enough that you could implement a compatible VM with it 17:59:53 yeah 18:00:02 I'd like to implement a vm for it in retro sometime 18:00:10 cool :) 18:00:39 should be pretty easy 18:00:50 only tricky bit is supporting other-endian images 18:01:03 is it big or little endian? 18:01:12 it handles both 18:01:17 very nice 18:01:37 fronds is big endian 18:01:43 x86 has a 'bswap' instruction for changing one endian into another, so it shouldn't be a problem 18:02:03 sure 18:02:21 it's just extra bother to make sure you're running the correct version of the primitives 18:03:59 I might hack fronds so that it can reverse it's own endian 18:04:26 is fronds related to mist? 18:04:34 yeah, same thing 18:04:38 ok 18:06:03 I originally wanted to name it Frond. but the frond.org was taken 18:07:06 I've got the bootstrapping stuff in fronds all set up so it never executes anything in the new image until it's done and rebooting 18:09:17 cool 18:09:55 so the new image could be eg in a different endian 18:10:09 just have to hack my assembler some more 18:10:27 shouldn't be too hard 18:10:34 I've already done a couple big hacks 18:10:48 what is the bootstrap code written in? 18:10:49 firstly to get it to compile at a different address (all branches in fovium are absolute) 18:11:02 and again when I changed the format of the branch instructions 18:11:16 by bootstrapping I meant fovium compiling itself 18:11:20 oops 18:11:26 by bootstrapping I meant fronds compiling itself 18:12:08 the initial fronds image is generated by a load of code in herkforth 18:12:30 yeah, i have 32 and 64-bit images of both endians, there's some details to take care of 18:24:39 I want to add a reboot syscall to fovium 18:25:37 it'll clear the stacks and start executing the image at the begining again 18:25:48 and probably check the endian again 18:26:51 crc: that's so cool you want to implement fovium in rf 18:26:58 that will encourage me to write the specification sooner 18:27:14 I'll look forward to reading it when it's written :) 18:27:21 right now I'm definitely puting a higher priority on making it so I can do fronds development in fronds 18:27:27 it's now on my to-do list 18:27:36 cooool :) :) 18:50:08 can someone instruct me on how to change 32bit color values in hex into 16 bit color values in hex, Please? 18:50:23 do I just 2/ them? 18:50:46 --- join: Flash00 (n=root@ip70-162-80-231.ph.ph.cox.net) joined #forth 18:53:29 ooh that nearly worked. 18:55:15 Hello. I'm interested in writing drivers for devices such as DVD burners. I've never done any programming but from my research a language like Forth looks like the best fit for me. Could anyone give me any advice? Thanks. 18:57:01 Flash00: as far as I know, the path to drivers using forth is to find said drivers in the linux libraries and rewrite them to fit your needs in forth. 18:57:24 Raystm2: depends on the formats 18:57:43 Raystm2: usually there's no 32-bit color usually it's 24 18:57:56 Raystm2: sometimes the leftover 8 are used for transparency, or simetimes unused 18:58:10 Yes JasonWoof! thank you for that, I nearly forgot. 18:58:27 there are many formats for 16 bit color 18:59:00 When tathi created the new colorforth image, he allowed for your choice of two modes of video. 18:59:09 one he called 32 and the other 16 18:59:19 you'll have to find the red blue and green values, and shift each down into the correct size, and or them together 18:59:24 and then said using 16 you would have to recode the colors on block 30 18:59:52 you'll have to find out how the color palette is set up for 16-bit 18:59:58 ya. 19:00:16 you could guess that it would be in the order RGB 19:00:19 but it might not be 19:00:28 and which field gets the extra bit? 19:00:30 now in the 32 bit version there is the original format that used to work on chucks old image like : white ffffff color ; 19:00:48 right 19:00:59 it's fairly standard to have a byte for red, then green, then blue 19:01:02 OH okay Chuck has done 565 in the past. 19:01:10 but afaik it's not so standard for 16 bit 19:01:12 ahh, cool 19:01:59 so you take the upper 5 bits of the red channel (the high 8 bits of those 24) and shift them up 11 bits 19:02:00 then you take the high 6 bits of green and shift it up 5 bits 19:02:07 so I should rewrite the word color to take the 32 bits and convert to 565 before feeding to the kernel color word. 19:02:11 then you take the high 5 bits of the blue and "or" them together 19:02:42 whoa, /me re reading what your saying here. 19:03:05 Raystm2: Thanks for the reply. Rather than transcribe someone else's mistakes I prefer to make my own. :) Seriously though, I like the idea of tinkering with the hardware at the most basic level possible. 19:03:28 : extract-red ( color -- red byte ) 16 >> ; 19:03:38 : extract-green ( 32color -- green-byte ) 8 >> 15 and ; 19:05:22 : extract-blue ( 32color -- blue-byte ) 255 and ; 19:05:22 oops, that 15 should be 255 19:05:22 okay in green i see that 19:05:35 don't actually use those... 19:05:35 cuz? 19:05:37 they are silly 19:05:43 okay. 19:05:58 why shift down by 16 to get the red byte when you know you'll have to shift it down another 3 to make it a 5-bit sample? 19:06:10 :16c 2/ color ; 19:06:17 works but is dark in some colors 19:06:29 I just thought pseudo-code might be clearer than english 19:06:43 yes makes sence to me so thank you. 19:07:26 you'd probably want to just shift the fields directly to where you want them in the new color 19:07:59 eg red goes from 8 bits into the word to 16 bits into it 19:08:00 ya 19:08:20 and green from 16 to 21 19:08:35 okay okay 19:09:12 ( 32-color -- 16-red-channel ) 8 >> $f800 and ; 19:10:09 To keep the 32 bit format which is easier to code new colors, I should just do the math on each and seperate each value and combine to 565. 19:10:22 ( 32-color -- 16-green-channel ) 5 >> $7e0 and ; 19:10:23 ( 32-color -- 16-blue-channel ) 3 >> $1f and ; 19:10:41 that looks good. 19:11:50 have to do a bit of juggling though 19:12:37 couple of swaps and * by the bit posision and + in the ending 19:13:21 ( 32-color -- 16-color ) dup 32c->16r >r dup 32c->16g >r 32c->16b r> or r> or ; 19:13:44 shouldn't be * anywhere 19:13:50 :) nice. 19:15:25 or you can save one slot on the return stack by moving "r> or" sooner: 19:15:30 ( 32-color -- 16-color ) dup 32c->16r >r dup 32c->16g r> or >r 32c->16b r> or ; 19:15:30 or you could use swap... 19:15:35 ( 32-color -- 16-color ) dup 32c->16r swap dup 32c->16g swap 32c->16b or or ; 19:15:51 or you could do it in asm :) 19:17:17 in ppc asm you could do one instruction per channel 19:17:19 or you could inline it in the macros in machine colorforth byte code. 19:17:22 32c->16c would be 3 instructions on ppc 19:17:22 waste of macros when what is really needed is to recode the word color in the asm source. 19:17:22 that's cool. 19:17:27 I have no idea what it would take in x86 asm 19:18:14 * Raystm2 figures that out. 19:40:36 OK, now fronds has a nice persistant stack to use to track cursor movements 19:40:48 it has push ?pop and ?fwd 19:40:48 ?fwd is kinda like push, except instead of setting that next value on the stack it returns what was there already. 19:40:55 this stack is also circular 19:41:46 (that is you can push all you want and never run out of space, it'll just start eating up the oldest elements on the stack) 19:42:59 but it's smart enough that if you ?pop a lot, it won't go back past there 19:43:18 ditto with ?fwd 19:45:04 did get a bit ahead of myself there though... need to make it so you can actually jump somewhere in the editor first 19:52:06 --- quit: imaginator (".") 19:54:28 --- part: Flash00 left #forth 20:21:47 --- join: thinkinginbinary (n=tom@phoenix.thomastuttle.mooo.com) joined #forth 20:21:55 Quartus: hello 20:22:01 Quartus: Having a peaceful, PoppaVic-free Sunday? 20:22:11 * Robert giggles. 20:22:15 brb 20:22:16 --- quit: thinkinginbinary (Client Quit) 20:23:10 --- join: thinkinginbinary (n=tom@phoenix.thomastuttle.mooo.com) joined #forth 20:23:25 Alright, that's better. Now who said "/me giggles"? (Wrong color scheme - nicks were invisible.) 20:24:00 That's me. 20:24:30 Robert: Ah. 20:42:15 kickass! 20:42:19 I've got output history! 20:42:30 and emit>mem 20:43:00 still needs a little work... 20:43:06 eg cr manages to get to the screen anyway 20:43:19 and the output history is not labeled as such 20:43:40 has some nice stuff though 20:43:50 emit>mem takes a count and won't write more than that to memory 20:47:12 why circular? 20:47:53 it will mask errors 20:48:39 --- join: Al2O3 (n=Al2O3@pool-70-104-20-219.dllstx.fios.verizon.net) joined #forth 20:54:19 eh? 20:54:19 there should be no limit on how many times you can jump the cursor around 20:54:22 what errors? 20:54:30 i thought you said your data stack is circular 20:54:36 not my data stack 20:54:40 oh 20:54:42 my stack of where the cursor has been 20:54:49 ok 21:01:23 JasonWoof: will you have online help? 21:03:19 slava: right here in this very channel :) 21:03:53 yeah, I plan on having a helpful wiki 21:03:53 with tutorials and so on 21:06:37 I hope to have a lot of information inside fronds 21:06:40 --- quit: thinkinginbinary ("leaving") 21:08:44 what is the difference between fronds and fovium? 21:08:45 I haven't decided how exactly fronds and the wiki will interract 21:08:45 fovium is the virtual machine 21:08:45 fronds is the OS 21:08:45 ok 21:08:45 I changed the name from Mist to Fronds rather recently 21:08:50 if i write a fovium implementation in factor, will fronds run there? :) 21:09:00 if you do it right :) 21:09:02 i could use it for benchmarking 21:09:12 that would be very cool 21:09:26 how does it do graphics output? does fovium have bytecodes modelled after SDL? 21:09:31 or just text output? 21:09:49 currently only text output 21:10:01 and syscalls for term-color and term-move 21:10:19 my implementation is graphical and has a simple terminal emulator built in 21:11:34 neat 21:11:39 the terminal does not have adequate input capabilities 21:12:03 Fronds needs to know when you press and release keys like alt 21:12:22 it uses that weird humane interface stuff? 21:12:25 yes 21:12:47 and I plan to write a dvorak translator 21:13:07 and write games 21:13:10 etc etc 21:13:39 I haven't written the graphics api yet 21:36:52 --- join: reuben (n=ben@leb-cr1-220-16.peak.org) joined #forth 21:36:52 --- part: reuben left #forth 23:44:44 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 23:57:03 --- quit: snowrichard (Remote closed the connection) 23:57:08 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 23:59:16 hi 23:59:59 --- log: ended forth/06.03.26