00:00:00 --- log: started forth/20.08.09 03:25:35 --- join: lisbeths joined #forth 03:58:44 --- quit: jsoft (Ping timeout: 246 seconds) 04:33:07 --- quit: lisbeths (Remote host closed the connection) 04:56:11 --- quit: Zarutian_HTC (Remote host closed the connection) 05:48:24 --- quit: _whitelogger (Remote host closed the connection) 05:51:25 --- join: _whitelogger joined #forth 06:50:05 --- join: mark4 joined #forth 09:46:55 --- join: john_cephalopoda joined #forth 09:46:57 Hi 09:47:15 howdy 09:48:18 I've finally got pattern matching working in ActorForth - but now it means I have to be able to differentiate generic types at compile time to keep my word lookup working. 09:48:55 Thinking of syntax with leading underscores for type identification. like swap : _a _b -> _b _a 09:49:46 Before I just had an "Any" type so it was swap : Any Any -> Any Any - which, of course, makes it impossible to understand what the stack picture will be after it executes. 09:54:01 You got types in your forth? 09:54:21 I have forth in my types! ;-) Built the type system first, then a forth on top of it. 09:57:07 I recall some literature a long time ago that described how to determine the optimal stack manipulation operations to convert from one pattern (say a,b,c,d) to another (say d,c,a,b). Wonder if I should just build a solver as a native feature. 09:57:35 What types have you got? 09:58:02 right now just atom, int, and bool. But you'll be able to build any kind of types you like. 09:58:03 And how do you keep track of the stack elements' and variables' types? 09:58:24 Or do you just implement them in operations? 09:58:25 stack objects all have types and values. so it's explicit on the stack. 09:58:52 Oh, so every stack element is practically a tuple? 09:58:56 data types are a crutch for poor programmers --- Chuck Moore --- 09:58:57 :) 09:58:59 lol 09:59:08 Hey mark4! 09:59:11 hi lol 09:59:20 each type has its own dictionary. whatever type is on tos() sets the context of what dictionary will be checked first before the global one. 09:59:27 proteusguy, how do you handle words that return different numbers or different types? 09:59:34 different number of values i mean 09:59:36 mark4, yeah Chuck likely won't be adopting ActorForth. ;-) 09:59:51 mark4, that's presently forbidden. 09:59:53 ( x y --- [ a b c ] | [ d e ] ) 10:00:03 aha 10:00:27 he probably would never use my forth either - during the DOS days he used the same forth i did, FPC by tom zimmer and he HATED it lol 10:01:13 i once talked to Linus T about my forth compiler, he said he knew forth but did not like it because it had no data types 10:01:22 i dont think linus t is a poor programmer lol 10:01:36 maybe he is an exception to that rule :) 10:01:36 just very different contexts. 10:01:41 ya 10:02:08 i told him the advantage of forth was that because it used 2 stacks the parameters were not buried under the return value so you could return any number of items 10:02:21 he said he had a friend who was working on a dual stack c implementation 10:02:26 that was like over 10 years ago 10:03:31 Probably back in the Transmeta or whatever that was days. 10:05:42 --- quit: john_cephalopoda (Read error: Connection reset by peer) 10:09:33 --- join: Zarutian_HTC joined #forth 10:10:55 yea i think it was about that time :) 10:11:20 linus t does not have a job now, he just gets paid to do his hobby :) 10:44:48 --- join: john_cephalopoda joined #forth 10:45:08 Oof, gcc ate my memory 10:52:47 proteusguy: Is there a way to run ActorForth without the excessive output? 11:14:27 heh 11:26:01 I tried compiling webkitgtk and that ate over 12 GB of RAM, which shot down my box. Thrice. 11:26:54 Imagine how much Forth you could store in 12 GB! 11:31:30 john_cephalopoda: 12GB 11:31:40 scnr 11:32:52 *shrug* 11:34:12 compiletoflash unused . compiletoram unused . 67164 17520 ok. 11:34:54 gcc and clang do a lot more than any forth compiler i know 11:35:18 but given how much mecrisp acomplishes in 20kB flash and a few kB ram ... 11:35:38 it feels so wrong to waste 12GB that way 11:38:00 I don't think it's really gcc's fault. Rather a really unoptimized compilation process. 11:42:21 21M of gzipped tarball, ~half a GB when ungzipped. So it's holding 24x the entire source code in memory during compilation. Wow. 11:43:06 226M when gunzipped to be exact. 11:50:06 that's c++ templating for you 12:12:24 --- quit: _whitelogger (Remote host closed the connection) 12:15:24 --- join: _whitelogger joined #forth 12:31:05 john_cephalopoda, haha I'll be taking care of that once I have this core feature done. Sorry about the verboseness. 12:49:14 --- join: mtsd joined #forth 13:07:43 mark4: Didn't you write that x86 compiler that uses traditional-order words (i.e. "MOV EAX, EBX" instead of "EAX EBX MOV")? 13:07:48 *assembler, not compiler 13:20:29 --- quit: gravicappa (Ping timeout: 246 seconds) 13:38:02 --- quit: mtsd (Quit: Leaving) 13:45:43 on am aarch64 system, GCC object code has 2/3 wasted with just reg to reg moves. 13:46:03 going to call a function first do 8 or 9 reg to reg moves, then call the funciton and move them all back again 13:46:14 inside the function the first thing you do is reg to reg mvoes.... 13:46:41 john_cephalopoda, i was working on it - my AVR assembler is that way 13:47:03 Right, it was AVR :) 13:47:34 How did you do the backpatching? I remember you talking about it some time ago but I didn't quite get how it worked. 13:50:13 My assembler used to be two-pass with the first pass calculating addresses. Now it's single-pass and I maintain a linked list for every label in which I store the points where it's referenced. But it has some downsides, so I wonder how other people do it. 13:51:17 well i can post the sources and go over them in detail wtih you - I do some black magic in there lol 13:51:35 erm i have to find them first 13:53:53 https://dpaste.com/2KU7FD9CV 13:53:56 thats the avr assembler 13:54:56 branch resolution is always either to a local label or a global label - my local label arrays allow for up to 10 local labels. when you do a forward reference branch to a local label it is not resolved until end-code 13:55:33 i have arrays for local label definiaion which define the address of the branch opcode and a local label reference array 13:56:04 you can have a max of 10 local labels in one word and a max of 10 forward references but you can forward reference to the same label more than once 13:56:23 backwards references are resolved immediatly because we know the target address 13:56:53 i do not allow forward references to global labels 13:56:55 period 13:58:08 and my asm> word is how I am able to allow mov dst, src instead of dst, src mov. i forget avr asm tho been too long :P 13:58:57 oh. i do allow global locals so you can branch bacwards to a local label in the previos defeinition as long as it has not been overriden with the same local in the current definition 14:02:57 So local labels are word-wide? 14:03:41 How is a "word" defined in assembly? 14:07:16 code foo <-- creates the header and points to HERE for its cfa... here is not yet populated 14:07:41 locals CAN be global but L0: through L9: is all you have' 14:08:35 if i have a few words in a row that all do the same last 3 opcodes for example i could set L0: or some other local on those opcodes and each of the following words can branch to that local even though that local is not local to them 14:09:06 if global locals are off the local label definition table is wiped clean by the code word 14:09:23 code foo <-- at this time all local label definitions are destroyed 14:09:57 Ah, I get it. 14:11:12 can do things like chuck moore famous "dont do this" min max definitions... from memory i think i got this right 14:11:14 : min 2dup < if begin nip ; : max 2dup > until then drop ; 14:12:53 i have an equally small way of defining those : min 2dup < ?: drop nip ; : max 2dup > ?: nip drop ; 14:14:26 yikes, how do those work 14:15:06 ?: is a little invention of mine that repaces if do-true else do-false then with ?: do-true do-false 14:15:15 er, I meant chuck's 14:15:20 yours made sense by analogy to C :) 14:15:25 yes 14:16:05 the < if in min either falls through to NIP and throws away the one or the if branches to the then in the following definition and that drops the other item 14:16:32 in max the until either falls through or it branches back to the begin 14:17:27 hm... okay, yeah, I can see that 14:17:29 ew 14:17:38 yea its VERY tight code and very bad practice :) 14:17:47 CM says "i wrote this, dont do this" lol 14:18:10 his code is very optimum in both space and time 14:18:13 so are mine 14:18:36 in fact compiling both methods in my forth gives exactly the same number of bytes used 14:20:02 dont use my asm> construct on any optmizing compiler that can inline definitons - it will be b0rked :P 14:21:42 oh. to use my avr assembler you need a definitions file for the processor you are building for. i only ever created ONE and that was for the 32u4 14:21:45 https://dpaste.com/4S65YXWFD 14:22:19 create a definition file like that one for ANY avr cpu and my assembler will asssemble code for it and wont allow you to use opcodes that uC does not support 14:23:26 I see a way to make traditional order work without tricks. A bit hacky but would work in a portable way. 14:23:53 i like my return stack black magic there :P 14:24:16 Opcodes put something onto the stack, register followed by comma put something onto the stack, register without comma read the stack and build the assembly. 14:24:48 what if you do something like mov [ xyzzy ], 0x1234 14:24:57 that is perfectly valid in x86 14:25:04 move memory, immediate 14:25:56 Right, it gets a bit difficult with immediates... Maybe force a ; after every line? ;þ 14:26:04 lol 14:26:45 or you could have each nemonic assemble the previous one which is what im doing with my return stack black magic. it could be done without that but i felt this way was ultra trivial to code 14:26:58 and end-code would be how the final opcode was assembled 14:27:44 the way i tell if there was an immediate specified is i take a snapshot of the stack pointer on entry into a nemonic and compare it with sp when im doing the assembly operation 14:28:33 I think the op-op-mnemonic way is the simplest and least magic way to do it. 14:28:55 and it totally screws my brain up into a gordian knot 14:29:00 lol 14:29:20 i worked for vertex-rsi in longview texas who at that time used forth exclusively 14:30:16 their asm code was backwards and to work on it i had to convert the entire file to readable asm, write my code in readable asm or forth then once i had it written in a way i could read i mangled it back the way they had it 14:30:34 i spent months there and NEVER got used to backwards asm 14:31:02 It took me an hour to get used to backwards asm xD 14:31:23 also mov ax, bx is mov bx into ax --- is that ax bx mov or bx ax mov? 14:31:37 i could never figure that out and i doubt very seriously that that has ever been formalized 14:32:12 it might be ziggy in one assembler and zaggy in another 14:32:21 fsck that - give me straight intel syntax 14:33:47 AT&T syntax also has a point though. Practically all unix commands are "command source destination". 14:34:03 cp source.txt destination/ 14:34:06 at&t is an absolute ABOMINATION 14:34:15 While Intel does cp destination/ source.txt 14:34:50 the ONLY reason for at&t is because unix was originally written for processors that had that operand order 14:35:09 its FUCKING horrible and i hate it with an absolute passion 14:35:26 Very strong opinions :D 14:35:42 if im trying to learn someething new and go to some web site that talks about unix asm and its at&t syntax i close the page and wont give it a single instant of my time 14:35:45 yup 14:35:51 at&t pisses me off :P 14:36:03 I don't care either way. I can juggle stuff around in my head. 14:36:15 i mean... it could be the single greatest write up of some technique and... fuck at&t i wont give it one second of my time 14:36:46 at&t exists because people were either incompetent or too damned lazy to do it right 14:36:48 or both 14:38:14 it would be like TOTALLY reinventing the order of operations in C simply because we wrote a new operating system that does thigns differently 14:38:24 Are you just against the operand order or also other aspects of AT&T syntax? 14:38:30 so lets just create at&t c thats utterly CLUSTERFUCK compared to the norm 14:38:45 EVERYTHING about at&t 14:39:03 %rax <-- why do you need the % sign there cluster fucking up the text? 14:40:06 %(j++; j=0; j<6) for <--- lets FUCK over the language as defined by its developers just because we want to be totally different 14:40:08 and DUJMB 14:40:47 or maybe that sould be (%j .. ;%j...; %j....) 14:41:00 yea we need to put a % sign at the start of every variable name so we can tell its a variable 14:41:05 make those $'s and you've got perl :) 14:42:03 having extra text spalttered throughout your code makes the code less readable. thats one of the great ideas behind kotlin which is just a new syntax for java 14:42:07 remexre: https://www.famicol.in/sigbovik/ 14:42:14 expresses the same functionality in less characters.. 14:42:47 john_cephalopoda: seen that one, heh 14:42:53 i dont even like having to do (char *)xyz_ptr to override types in C. it is just adding more visual cluster fuck to the sources 14:43:47 I like explicit casts. 14:47:52 i keep having to fight the whoe if (... ) { 500 lines of code } else { 500 lines of code } or (test) ? xxx : yyy; <-- the latter is infinitly more readable to me for being more concise - in the former you have lost ALL context on the IF statment and that mkes it un readable 14:48:15 the more you can express in LESS text the less visually cluttered your sorces will be 14:48:33 java is famous for having over the top verbage just to do simple tasks 14:49:06 kotlin reduces all that visual clutter significantly and in doing so significantly increases readability 14:49:21 p.s. i am not a huge fan of java or kotlin its just an example of what im talking about 14:50:31 Hm, different topic: How was it to work with Forth as a job? 14:50:43 awesome lol 14:51:06 my first coding job was for joy mining machenery in england and they also used forth :) 14:52:04 vertex-rsi was bought out by general dynamics c4 systems and... prior to that 100% of their products were done in forth... now zero percent are 14:52:14 i dont even know if they are supporting any of their legacy products 14:52:49 they do satellite tracking systems. they build the dishes, they do the tracking, they do the signal mux/demux and when i was there absolutely EVERYTHING on EVERY product was done in forth 14:53:08 direct tv uses their products 14:58:00 That sounds pretty awesome. 14:58:29 ya it was fun working there, i had two different contracts with them but i dont think they use forth at all anywhere now 14:58:58 I wanted to go into space&aerospace when I started my masters degree but ended up in embedded systems. 14:59:26 Now I got my first full-time job in industrial embedded systems. Everything coded in C. 15:02:22 It's fun, nice people at my workplace. 15:09:42 where do you work? 15:09:55 btw i dont have ANY degree in anything at all :) 15:13:22 South Germany, small company that does stuff in industrial communication and industrial hardware&software dev with a focus on functional safety. 15:13:35 I got a masters degree in CS. 15:15:04 i would never have survived trying to geet a degree, i would have fought with everything they tried to teach me. thats bullshit, thats just wrong, i already know how to do this... ... . . lol 15:16:29 My favourite lectures were the ones about computational geometry. Really interesting algorithms that can be represented visually. 15:16:48 :) 15:17:26 thers one guy i could have studied under and he is german lol. he has published his letures on cryptograpnhy on youtube 15:18:00 https://www.youtube.com/watch?v=2aHkqB2-46k 15:18:04 Never did much with cryptography, even though I had a few lectures about it. 15:18:13 Too hard to get crypto right. 15:19:02 his lectures are on how to do AES but he gives a LOT of background and information on legacy stuff like DES 15:19:23 he also talks about the history of DES and AES 15:19:37 very interesting lectures and in english which is good because i dont speak german :) 15:24:20 Hm, getting late here. Good night! 15:24:26 night 15:24:30 --- part: john_cephalopoda left #forth 16:23:48 --- join: dave0 joined #forth 16:38:58 --- quit: reepca (Remote host closed the connection) 17:02:57 --- quit: Lord_Nightmare (Ping timeout: 240 seconds) 18:20:49 --- quit: dave0 (Quit: dave's not here) 18:52:34 --- join: boru` joined #forth 18:52:37 --- quit: boru (Disconnected by services) 18:52:39 --- nick: boru` -> boru 19:28:03 --- join: dave0 joined #forth 20:44:33 --- quit: mark4 (Ping timeout: 240 seconds) 21:10:25 --- join: Lord_Nightmare joined #forth 21:24:34 --- join: jsoft joined #forth 21:40:32 --- join: mark4 joined #forth 21:44:07 --- quit: mark4 (Client Quit) 21:46:40 --- quit: dave0 (Quit: dave's not here) 21:58:14 --- quit: Lord_Nightmare (Quit: ZNC - http://znc.in) 21:59:48 --- join: Lord_Nightmare joined #forth 22:00:03 --- join: gravicappa joined #forth 22:37:13 --- quit: proteusguy (Ping timeout: 256 seconds) 22:53:09 --- join: proteusguy joined #forth 22:53:09 --- mode: ChanServ set +v proteusguy 23:15:07 --- quit: proteusguy (Ping timeout: 240 seconds) 23:16:12 mark4: Looks good, I'll be taking cryptography myself in the fall 23:27:52 --- join: proteusguy joined #forth 23:27:52 --- mode: ChanServ set +v proteusguy 23:38:58 --- join: mtsd joined #forth 23:59:59 --- log: ended forth/20.08.09