00:00:00 --- log: started forth/19.01.26 00:05:33 --- join: tabemann (~tabemann@2600:1700:7990:24e0:8d7a:3d82:9669:8573) joined #forth 01:59:56 jo 01:59:57 hi* 02:02:55 --- quit: ashirase (Ping timeout: 245 seconds) 02:07:04 --- join: ashirase (~ashirase@modemcable098.166-22-96.mc.videotron.ca) joined #forth 02:26:58 --- quit: smokeink (Quit: Leaving) 02:35:01 i just realized that for forth, calls to words can only go backwards 02:36:43 --- join: proteusguy (~proteusgu@cm-58-10-155-25.revip7.asianet.co.th) joined #forth 02:36:43 --- mode: ChanServ set +v proteusguy 02:57:10 corecode: indirect calls can go to newer words though 03:03:27 yes, but those are not calls 03:03:45 they're something else i don't know yet 03:03:58 i guess i need an indirect call op 03:07:06 i've seen them implemented as: 03:07:19 CREATE foo ' bla foo ! 03:07:26 foo @ EXECUTE 03:07:54 (or with DEFER/IS in ANS'12) 03:11:54 well yea, but now you need to implement EXECUTE, which is exactly the indirect call :) 03:34:25 I mean you can just call the address on the stack 03:34:34 and the return from that address 03:35:43 "just" 03:35:56 yeah 03:36:03 i'm building the cpu 03:36:07 nothing is "just" :) 03:36:15 oh physically? 03:36:20 well, in an fpga 03:36:25 less "just" 03:37:06 you're building a forth CPU, so a call just pushes the current address to the return stack right? 03:37:07 so yea, i guess i need a path to set IP from TOS 03:37:16 yes 03:37:23 well, it needs to do more 03:37:36 it also needs to update IP 03:37:50 it needs to put IP_next on the rstack 03:37:55 no 03:37:57 IP_inc 03:38:32 and make IP_next take the immediate argument 03:39:04 I have no idea what you're talking about now, sorry 03:39:22 well, there is a IP register 03:39:24 you just have a `call` inst that pushes ip+1 to the return stack 03:39:32 and sets ip to TOS 03:39:42 and ret sets ip to TORS 03:39:43 no, that's EXECUTE 03:40:01 call takes an immediate from the instruction 03:40:28 there are different paths, one is where the next IP comes from 03:40:56 the other is where TORS comes from 03:41:08 so it's not a zero operand stack processor 03:41:22 say what? 03:41:40 no, calls and literals have immediate operands 03:42:24 you need immediate operands, or you cannot produce literals 03:43:03 nah 03:43:08 nah? 03:45:13 i guess you could start with a 1 in TOS, and create other numbers just by executing dup and add 03:45:24 but that's super tedious 03:45:44 that feels like brainfuck 03:46:35 what? 03:47:04 i'm confused by you stating that you don't need immediate arguments 03:47:26 because i don't understand how (LITERAL) would work 03:48:17 you can take the next instruction as a literal 03:48:38 that means you have arguments 03:48:58 not really 03:49:21 a processor state maybe of "processing as a literal instead of instructions" 03:51:32 yes, that's an immediate 03:52:26 then why can't you implement call using lit 03:52:51 i can do call, but not execute that way 03:55:03 What's the difference between your call and execute 03:55:23 call takes an immediate, execute takes from TOS 03:56:54 then just use execute 03:57:03 simpler 03:59:11 call is just like "rpush(ip + 1); ip = TOS" 03:59:30 i agree that it can be done that way 03:59:58 but given that word calls are one of the most frequent things, it makes sense to have them execute in one cycle and take one instruction only 04:00:15 call is very similar to branch 04:01:48 Oh I see 04:10:33 corecode: is your forth subroutine-threaded? 04:11:21 oh you're designing your own cpu 04:11:25 nevermnd 04:26:39 --- join: rdrop-exit (~markwilli@112.201.166.158) joined #forth 04:41:05 --- join: xek (~xek@apn-31-0-23-82.dynamic.gprs.plus.pl) joined #forth 04:59:12 --- quit: rdrop-exit (Quit: Lost terminal) 05:41:29 corecode: literal ls easy 05:42:05 when forth executes it fetches the next execution token and jumps to it. so foo bar 10 fud.... 05:42:15 fetch foo, execute foo, fetch bar, execute bar 05:42:20 cant execute 10 05:42:27 10 is not an xt its a number 05:42:34 so you compile that as (lit) 10 05:42:53 fetch (lit) execute (lit) and THAT fetches the 10 and puts it on the stack 05:43:00 the word literal compiles (lit) AND the 10 05:46:09 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 05:54:49 --- quit: xek (Ping timeout: 240 seconds) 05:58:16 mark4: are you talking about a cpu design? 06:00:47 how you do it in a cpu is not going to be that different 06:01:03 have you experience in designing CPUs? 06:01:08 i'd love to get some feedback 06:01:15 it woluld be like an immediate load "lda #$01" encoded as A9 01 on 6502 06:01:37 nono, i'm not *using* a CPU, i'm designing one 06:01:48 i know 06:03:14 * Zarutian points corecode to Stack Machines The New Wave By Philip Koopman 06:03:40 you might also want to take a look at J1 which is originally for Gameduino 1 06:15:52 well i'm trying not to copy something but arrive at the conclusions myself 06:22:07 --- join: saml_ (~saml@cpe-74-66-242-225.nyc.res.rr.com) joined #forth 06:22:14 --- quit: saml_ (Remote host closed the connection) 06:35:21 shoulders of giants 06:40:13 corecode: oh, I see. But there are quite a few design decisions ya need to make 06:40:26 yea i know :) 06:55:57 corecode: I'd make an array of small Forth processors. Say ... 144 of them? With half the memory slots in each processor filled with fixed, processor-specific core routines and the other half open to end-user words? And with specialized processors with task-specific fixed routines on the "outside" of the array? 06:56:03 Sounds like a nifty architecture to me. 06:56:12 Perhaps make it ... 36-bit words? 06:56:45 I still don't get the 36 bit word size , honestly 06:57:05 I suspect that was just the word size that fit best in the cells he had. 06:57:39 Well, the S40 has 18-bit words 06:58:43 but I remember reading a comment by Albert van der Horst about how 18 bits was decision made based exclusively on some weird 18-bit memory chips that were popular 06:59:51 haha 07:00:11 i think ttmrichter is trying to reference some mad design decisions from ages past 07:00:39 I'm making gentle fun of GreenArrays, corecode. ;) 07:00:58 What I just described is the high-level overview of the GA144. 07:01:15 I have two GA144s that I haven't used, had them for about a year 07:01:34 like most devboards :) 07:01:35 I was interested in the GA144 until I actually tried to deal with the company. 07:01:38 I can't find a circuit diagram to set up the Schmartboard dev board 07:02:07 and currently can't be bothered to solve it myself 07:02:08 After they blew off not one, not two, but THREE attempts to get some questions answered, I gave up. 07:02:19 what questions? 07:02:58 Some technical questions about designing a board based on them, and some typical questions also that an interested purchaser would be making: pricing, availability, etc. 07:03:31 They scheduled three Q&A sessions with a "sales engineer" and three times blew them off. 07:03:59 Rumour has it they're working on a new chip and dev board. Could be why. 07:04:07 This was YEARS ago. 07:04:21 Like when the GA144 was still newish. 07:04:23 Was going to say, doesn't justify such bad practices anyway 07:05:16 I got the distinct impression from them that they were one of those companies that if you weren't committing to a million units out the gate without any work on their end, you were ultra-low priority. 07:09:39 maybe it's just you 07:09:42 ...so, practically everyone? 07:09:57 who's ordering GA144s? 07:11:47 They apparently sell to the US government. Likely military. 07:11:57 Who'll gladly shell out millions for things sight unseen. 07:14:16 I know they got a massive Bitcoin donation 07:14:22 paid off all their debt 07:16:50 sounds like a front 07:17:06 is chuck actually a mob boss? 07:19:32 that's how mafia works 07:35:28 --- quit: X-Scale (Read error: Connection reset by peer) 07:38:41 ttmrichter: re Green Arrays the company: yeah this is the difference between South Semiconductior Corp and Texas Instruments. The latter is still around because they sold newly designed chips at cost to anyone interested to see if there were any applications for them. The other one? went bankrupt because it kept trying to chase the 'big purchasers' exclusively. 07:42:18 which is why I filter "Call for quote" out of all Digi Key and Mouser listings because who has the time or bother to deal with that? 07:48:22 heh.. I just saw what I was same printer my sinclair t/s1000 had - 30+ years ago - with BT added, for nearly $80.. 07:56:11 --- join: darithorn (~darithorn@75.174.234.76) joined #forth 07:56:56 Zarutian: amen 08:44:49 what some of those companies do not realize that some of the hobbyists buyers are R&D guys at big corps or lucrative corps trying out some ideas. 08:48:16 well or hobbyist stuff percolating through 08:48:26 like atmega chips 08:49:46 I like the recentish option of using the WatchDogTimer as an interrupt source instead of just a resetting device 08:55:13 WilhelmVonWeiner, ttmrichter: There are new ga144 devboards on the way and they won't require soldering pin headers and decoupling caps https://twitter.com/mike_schuldt 08:55:46 I should make a Twitter account. 08:58:38 why? 09:02:42 * PoppaVic sighs 09:03:02 I hate stupidly deleting a core file.. gdmfml 09:03:03 Because my existing twitter account is exclusively used to get an endless stream of high-intensity pornography 09:04:10 a high-intensity stream of endless pornography 09:04:25 sounds good enough? 09:06:45 --- quit: dave0 (Quit: dave's not here) 09:49:26 hmm.. what is it called when a pointer is also used like an enum value? 09:50:01 ident? 09:50:39 an example to explain what I mean: lets say I have an array of 64 bytes. I am using the last 52 to represent playing cards 09:51:25 for an 'stack' of cards, each card in it points to the next one or zero 09:52:40 (by using the array index of the card not a full blown memory pointer) 09:54:50 ah, linked list using offsets? 09:55:30 yebb, but where the offsets themself have 'meaning' 09:57:38 yea, they form the linked list 10:00:32 lets say index 0x1 means the draw deck. That 'seat' of the array has the value 0x21 which is 'the jack of diamonds' 10:01:08 but at index 0x21 there is the value 0x10 which is another card and so on 10:02:10 but yeah I found this rather compact and neat way of representing deck of cards in an old 21 program 10:02:25 yes, that's a linked list 10:03:44 I know it is a linked list but it builds on that a bit because there are no other 'fields' for each element of the list other than the next 'pointer' 10:10:23 ah 10:10:35 yea, well 10:10:46 you can make up your own name 10:12:47 --- quit: pierpal (Ping timeout: 268 seconds) 10:41:46 --- quit: gravicappa (Ping timeout: 268 seconds) 11:01:12 --- join: pierpal (~pierpal@host53-189-dynamic.17-79-r.retail.telecomitalia.it) joined #forth 11:05:34 --- quit: pierpal (Ping timeout: 250 seconds) 11:05:49 --- join: pierpal (~pierpal@host53-189-dynamic.17-79-r.retail.telecomitalia.it) joined #forth 11:10:07 --- quit: pierpal (Ping timeout: 246 seconds) 11:11:33 --- join: pierpal (~pierpal@host53-189-dynamic.17-79-r.retail.telecomitalia.it) joined #forth 11:12:42 --- quit: pierpal (Read error: Connection reset by peer) 11:12:59 --- join: pierpal (~pierpal@host53-189-dynamic.17-79-r.retail.telecomitalia.it) joined #forth 11:15:27 --- quit: pierpal (Read error: Connection reset by peer) 11:15:43 --- join: pierpal (~pierpal@host53-189-dynamic.17-79-r.retail.telecomitalia.it) joined #forth 11:19:55 --- quit: pierpal (Ping timeout: 246 seconds) 11:20:17 --- join: pierpal (~pierpal@host53-189-dynamic.17-79-r.retail.telecomitalia.it) joined #forth 11:24:38 --- quit: pierpal (Ping timeout: 250 seconds) 11:27:11 --- join: pierpal (~pierpal@host53-189-dynamic.17-79-r.retail.telecomitalia.it) joined #forth 11:29:54 --- quit: pierpal (Read error: Connection reset by peer) 11:31:57 --- join: pierpal (~pierpal@host53-189-dynamic.17-79-r.retail.telecomitalia.it) joined #forth 11:36:11 --- quit: mark4 (Remote host closed the connection) 11:36:20 --- quit: pierpal (Ping timeout: 250 seconds) 11:37:31 --- join: pierpal (~pierpal@host53-189-dynamic.17-79-r.retail.telecomitalia.it) joined #forth 11:41:40 --- quit: pierpal (Ping timeout: 245 seconds) 11:45:12 --- join: mtsd (~mtsd@94-137-100-130.customers.ownit.se) joined #forth 11:53:59 --- join: pierpal (~pierpal@host53-189-dynamic.17-79-r.retail.telecomitalia.it) joined #forth 12:00:14 --- quit: pierpal (Read error: Connection reset by peer) 12:03:17 --- join: pierpal (~pierpal@host53-189-dynamic.17-79-r.retail.telecomitalia.it) joined #forth 12:07:19 --- quit: dddddd (Remote host closed the connection) 12:10:08 --- quit: pierpal (Ping timeout: 250 seconds) 12:33:10 --- join: pierpal (~pierpal@host53-189-dynamic.17-79-r.retail.telecomitalia.it) joined #forth 12:34:15 --- quit: djinni (Quit: Leaving) 12:43:56 --- quit: pierpal (Ping timeout: 250 seconds) 12:50:24 --- join: pierpal (~pierpal@host53-189-dynamic.17-79-r.retail.telecomitalia.it) joined #forth 12:59:48 --- quit: pierpal (Ping timeout: 240 seconds) 13:21:41 --- join: djinni (~djinni@149.56.14.68) joined #forth 13:32:48 --- quit: tabemann (Ping timeout: 240 seconds) 13:42:56 --- quit: mtsd (Quit: WeeChat 1.6) 14:13:05 --- quit: Zarutian (Read error: Connection reset by peer) 14:13:49 --- join: Zarutian (~zarutian@173-133-17-89.fiber.hringdu.is) joined #forth 14:22:33 --- join: tabemann (~tabemann@24.196.100.126) joined #forth 15:47:22 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 16:04:17 --- quit: tabemann (Ping timeout: 268 seconds) 16:31:11 --- join: tabemann (~tabemann@rrcs-98-100-171-35.central.biz.rr.com) joined #forth 16:45:35 --- quit: proteusguy (Remote host closed the connection) 16:51:49 --- quit: lonjil (Quit: No Ping reply in 180 seconds.) 16:51:59 --- join: lonjil2 (~quassel@2a02:418:6050:ed15:ed15:ed15:e741:32d6) joined #forth 17:08:36 Well, it looks like I recreated the core file... I coulda' screamed this mornin'. 17:21:15 --- join: smokeink (~smokeink@118.131.144.142) joined #forth 17:21:54 --- join: rdrop-exit (~markwilli@112.201.166.158) joined #forth 17:48:54 Bonjour Forthwrights 17:49:59 Well, I think I am about ready to start to VM parallel to assembler. 17:50:21 to VM/the VM ;-) 17:50:56 Could you elaborate, not sure what you're saying. 17:51:22 rdrop-exit: it's a variation on "Hello, I am coding, wtf is wrong with me?" 17:52:09 aha 17:52:24 I stupidly deleted the core file before work, recovered some 50% before I left.. Got home, polished it a little - with space for my goodies.. Kicked the makefile a few times. 17:52:43 did you destroy your flu yet 17:53:20 Vodka kills flu - I promise. 17:53:37 It's still lingering on, told the kids not to visit today so they don't catch it. 17:54:11 i heard the more children you spread it to, the sooner you get over it 17:54:25 My kids are adults 17:54:33 children, adults - pick folks you don't like, by preference ;-) 17:54:40 oh. i meant to say adults 17:54:59 :) 17:55:03 Children are better for all infections... Culling/curing. 17:55:25 heh.. I remember "pox parties".. Damned sneaky adults. 17:55:52 --- join: proteusguy (~proteusgu@mx-ll-14.207.171-27.dynamic.3bb.co.th) joined #forth 17:55:52 --- mode: ChanServ set +v proteusguy 17:56:10 otoh, I remember "breast feeding" - and not in malls for attention. 17:56:21 No family brunch today, just a lonely croissant. 17:56:39 (it's Sunday here) 17:57:02 Yes, thank god.. It's Sunday soon enough - I need a weekend. 17:57:46 For a "slow week", I feel damned tired. 18:04:46 --- join: pierpal (~pierpal@host53-189-dynamic.17-79-r.retail.telecomitalia.it) joined #forth 18:12:30 --- quit: tabemann (Ping timeout: 245 seconds) 18:37:41 --- join: tabemann (~tabemann@2600:1700:7990:24e0:8d7a:3d82:9669:8573) joined #forth 18:52:19 --- join: dave0 (~dave0@193.060.dsl.syd.iprimus.net.au) joined #forth 18:52:26 hi 18:53:49 hi 18:54:12 hi smokeink 18:54:19 Hello dave0 & smokeink 18:54:57 hi rdrop-exit 19:38:33 What's new in our small corner of the Forth world? 19:45:16 I have a question: how can a word be defined that defines two words? : W CREATE DOES> DROP 1 . CREATE DOES> DROP 2 . ; <- how to make this work 19:47:08 Make two defining words, then a word that calls them both 19:49:47 That's one way 19:51:24 It sounds like a really bad idea 19:51:54 CREATE only looks once into the future. 19:52:54 is there a way to create a word without using create directly, but by using BL WORD ? 19:53:02 BL WORD ... ... DOES> 19:53:22 same issue: looking into the future twice cuts yer balls off to feed the cat. 19:53:31 haha 19:54:38 --- join: gravicappa (~gravicapp@h109-187-28-67.dyn.bashtel.ru) joined #forth 19:54:53 I have some code that uses hardcoded data and I want to automatize it a bit, I will paste it in a few seconds 19:55:05 that said, what I do in C is create an .inc file predicated on a macro (or more); define the macros and include the file (which also #undef's the macros) - and I can do this as often as I like. 19:55:10 Some Forths include a variant of CREATE that takes the name from the stack 19:57:34 well, that is "slower", but is nice for NOT rereading the future. 19:57:50 PoppaVic can you paste an example ? I'm curious to see your C include 20:00:55 smokeink: https://pastebin.com/aQtWLcB8 20:00:56 http://pastecode.ru/8977cd/ <- here is what I need to achieve 20:02:06 I wouldn't do that 20:02:21 tour example doesn't look properly decomposed. 20:02:26 your 20:03:31 If I change the constant 3, then I have to change it in the code that initializez the Toolbar as well , and I've ran into crashes a few times because I forgot that I have to change the number in 2 different places 20:04:04 get rid of it and use a constant - a name like an enum 20:05:06 so you think the upper snippet on my link is the way to go? 20:05:08 if you want a table, use a table 20:06:19 smokeink: I'd use a table. Or something like Thinking Forth DOER/MAKE 20:06:41 Can you describe what you're trying to achieve (independent of the implementation details)? 20:06:43 I don't want to need to remember N - I want a name, and want to form a "senence" 20:06:50 sentence 20:09:09 rdop-exit: I want to just define those TB-BUTTON , and it should count automatically how many I've defined 20:09:38 PoppaVic: what's a table? Do you have any link to a tut or book that describes such tables ? 20:09:44 A button is "a button", so the base concept is funky 20:10:06 smokeink: Why are you counting them? 20:10:13 a table is an array that something knows to lookup and I can forget about. 20:10:25 (or even a LL or tree or..) 20:11:16 rdrop-exit: the win32 api CreateToolbarEx expects the number of buttons as a parameter 20:14:46 What is a button, an address? 20:15:47 create buttons fee , fi , fo , fum 20:17:15 here buttons - u/cell constant #buttons 20:17:28 oops forgot a , after fum 20:17:54 create buttons fee , fi , fo , fum , 20:18:19 here buttons - u/cell constant #buttons 20:19:04 https://github.com/rufig/spf/blob/master/devel/~af/lib/toolbar.f 20:22:58 what do lines 9-18 do? 20:24:42 they add those numbers together 20:24:51 the numbers represent the sizes for each struct's member 20:25:52 and also create those words (iBitmap, idCommand, fsState, ...) that can be used to access the struct's fields 20:26:59 there must be something wrong with the display, I'm seeing this: 20:27:03 0 20:27:03 4 -- iBitmap 20:27:03 4 -- idCommand 20:27:03 1 -- fsState 20:27:03 1 -- fsStyle 20:27:06 1 -- bReserved1 20:27:08 1 -- bReserved2 20:27:11 4 -- dwData 20:27:13 4 -- iString 20:27:16 CONSTANT /TBBUTTON 20:27:26 yes 20:27:45 this allocates 4+4+1+1+1+1+4+4 bytes for /TBUTTON 20:28:20 so executing the constant /TBBUTTON just puts the sum 20 on the stack 20:30:10 the word iBitmap executes 4 + 20:30:22 the word idCommand executes 8 + 20:30:23 I see 20:30:27 fsState does 9 + 20:31:33 something like that, 1 sec I got some numbers wrong 20:31:55 That's ok, I get the gist 20:32:30 0 iBitmap 0 idCommand 0 fsState 0 fsStyle \ ( 0 4 8 9 ) 20:33:00 * smokeink brb 20:33:55 --- quit: darithorn (Quit: Leaving) 20:36:41 --- join: darithorn_ (~darithorn@75.174.234.76) joined #forth 20:36:57 --- quit: darithorn_ (Remote host closed the connection) 20:37:46 * smokeink back 20:41:29 --- join: darithorn_ (~darithorn@75.174.234.76) joined #forth 20:41:36 --- quit: darithorn_ (Remote host closed the connection) 20:53:24 problem solved? 20:55:56 still thinking 20:57:36 If these buttons are layed down at compile time, then a variant on the idiom I showed you earlier should work. 20:58:29 this one, right ? "Make two defining words, then a word that calls them both" 20:59:03 No, the fee-fi-fo-fum one 20:59:29 here buttons - u/cell constant #buttons <- here I'd have to type by hand the number for the constant? 21:00:20 create buttons 21:00:31 ... button, 21:00:38 ... button, 21:01:04 here buttons - button# u/ constant #buttons 21:01:32 got it 21:01:50 rdrop-exit & PoppaVic thank you 21:02:07 My pleasure 21:09:00 np 21:14:28 --- quit: gravicappa (Ping timeout: 268 seconds) 21:14:47 or if you prefer you can use the name b/button for "bytes per button" instead of button# 21:17:01 good idea 21:17:07 I think I noticed a bug https://github.com/rufig/spf/blob/master/samples/win/spfwc/spf4wc.h.f#L236 here they've defined 19 buttons, https://github.com/rufig/spf/blob/master/samples/win/spfwc/spf4wc.f#L852 but here they've only specified 18 of them 21:17:57 ah. no, they've skipped number 9 21:18:10 bbiab 21:20:56 so it's okay, they don't have a bug 21:40:40 --- quit: dddddd (Remote host closed the connection) 21:43:55 --- quit: PoppaVic (Ping timeout: 250 seconds) 21:55:47 --- join: PoppaVic (~PoppaVic@unaffiliated/poppavic) joined #forth 21:55:57 stupid freenode 23:59:59 --- log: ended forth/19.01.26