00:00:00 --- log: started forth/21.04.27 01:03:37 --- quit: rixard () 01:58:41 --- join: jess joined #forth 03:01:09 For AVR I would think you'd code that thing in asm wouldn't you? About as clean an asm as you can ask for. 03:18:53 --- join: jn__ joined #forth 03:20:31 --- join: neuro_sys joined #forth 03:24:43 --- quit: jedb (Quit: Leaving) 03:25:03 --- join: jedb joined #forth 03:26:23 --- join: gravicappa joined #forth 03:39:38 --- quit: andrei-n (Ping timeout: 268 seconds) 03:41:10 --- join: andrei-n joined #forth 04:33:36 --- quit: andrei-n (Quit: Leaving) 04:52:16 --- join: tech_exorcist joined #forth 05:09:23 lispmacs, isnt there one called eforth too? 05:21:54 --- join: andrei-n joined #forth 05:32:01 --- quit: neuro_sys (Ping timeout: 245 seconds) 05:54:13 --- join: xek_ joined #forth 05:56:59 --- quit: xek (Ping timeout: 265 seconds) 05:59:01 --- quit: tech_exorcist (Quit: tech_exorcist) 05:59:30 --- join: tech_exorcist joined #forth 06:01:30 MrMobius: I hadn't heard of it, but looking now, it apears to be dependent also on AVR Studio 4 06:06:26 proteusguy: I'm opened minded; I think it will be a question of whether or not I can find decent tutorials on how to write AVR ASM using avr-as or another libre-software assembler/toolchain. The tutorials I'm finding so far are all for Atmel Studio but maybe I can figure out how to map things over (...?) 06:09:34 --- join: rixard joined #forth 06:17:41 If you've used as/gas before, you shouldn't need anything other than a programming manual for the microcontroller. I wouldn't waste my with "tutorials". 06:17:49 My time, rather. 06:18:43 For the AVR-specific parts of as(1), see `info as` -> Machine Dependencies -> AVR-Dependent 06:19:39 Naturally, you'll probably want to write your own linker script for the target, as well, whether you're using an emulator, a simulator or the real thing. 06:20:13 There is absolutely nothing tying you to atmel's awful toolchain. 06:21:15 It's a pretty bodgy ISA, so I wouldn't agree that it's "as clean an asm as you can ask for". 06:22:12 I haven't used as/gas before, not counting once for about twenty minutes trying to learn x86 assembly 06:22:59 I was just able to find the avr-libc-user-manual, which does have some limited information an direct assembly programming with avr-as 06:23:36 avr-as is just gas from binutils configured to be a cross assembler for avr. 06:23:42 So the documentation is the same. 06:24:40 like I just said, there is an actual avr-libc users manual that gives actual code examples 06:25:09 Okay. 06:25:48 it is all nice to say "just use the generic manual and tweak it for avr" unless I'm coming at this with zero gas experience 06:26:11 and pretty much zero assembly experience 06:26:51 not counting a few brief forays into trying to learn x86 assembly 06:26:57 Okay, it sounds like you know best yourself. 06:27:15 I doubt that 06:27:39 i guess I know what I don't know 06:30:15 I can learn just about anything if I've got good enough reference documentation. not sure in this case 06:30:41 this avr-libc users manual looks pretty detailed at a glance 06:31:48 http://savannah.nongnu.org/download/avr-libc/avr-libc-user-manual-2.0.0.pdf.bz2 06:49:20 --- join: neuro_sys joined #forth 06:49:35 --- quit: neuro_sys (Changing host) 06:49:35 --- join: neuro_sys joined #forth 07:40:00 --- quit: Zarutian_HTC (Remote host closed the connection) 08:09:25 --- quit: neuro_sys (Ping timeout: 250 seconds) 08:46:29 --- join: f-a joined #forth 08:46:29 --- join: Zarutian_HTC joined #forth 09:29:45 --- join: alexshendi joined #forth 09:32:17 Which Forth should I use for learning Forth on amd64 or aarch64 machines? I don't like gforth. ANS non conformance isn't an issue. 09:33:38 Thanks in advance. 09:36:08 --- quit: f-a (Read error: Connection reset by peer) 09:36:17 mark4th/x64? 09:36:22 --- join: f-a joined #forth 09:38:30 alexshendi: do you have certain criteria in mind? What are you trying to avoid from gforth? 09:39:46 1. dependence on GCC extensions 09:40:32 2. IIRC gcc is needed for compilation 09:41:09 mark's x64 wouldn't be a bad target if you are using linux 09:41:43 3. too complicated 09:42:49 @crc What would prevent it from running on *BSD? Direct syscalls? 09:43:23 there is jonesforth, if you don't need any features like an FFI and just want to learn 09:43:25 different system calls, memory layout 09:43:28 programmed in NASM I believe 09:44:46 Ok, at least io.s uses SYSCALL. 09:45:38 What's the opinion about pforth? 09:46:48 jonesforth is 32bit IIRC? 09:48:22 https://github.com/narenratan/jonesforth_arm64_apl aarch64 jonesforth 09:48:23 alexshendi: correct 09:49:02 I've used jonesforth a little and some of the most obvious words are not implemented 09:49:26 jonesforth is designed for tutorial use rather than writing stuff in 09:50:32 @crc: Thanks, but it's extended with APL characters... 😇 09:50:50 APL is useful... 09:52:00 useful for what 09:52:04 not snarky, curious 09:53:19 golfing 09:53:20 lol 09:53:22 idk what else 09:53:38 and there is ascii.f 09:53:59 --- quit: f-a (Read error: Connection reset by peer) 09:57:49 f-a: working on arrays of data 10:05:06 --- quit: Zarutian_HTC (Ping timeout: 252 seconds) 10:13:33 I haven't used pforth in years. It was somewhat buggy when I last used it, but seems to be receiving updates in recent years. 10:14:19 I use pforth on plan9 10:14:28 works OK for what I use it for although I haven't used it for anything at all large 10:23:22 --- join: f-a joined #forth 10:23:23 wasn't there somebody around here working on a vm-style Forth? 10:23:40 ah sorry I got dcs 10:23:45 *dc’d 10:24:10 lispmacs[work]: what do you mean by vm-style? 10:24:26 f-a: apl is useful when working with arrays of data 10:24:37 it's hard to explain though :( 10:27:20 --- join: Zarutian_HTC joined #forth 10:28:42 crc: somebody was designing a system sort of like the Java VM but for Forth 10:29:43 the able vm? 10:30:58 i don't think so, but that looks interesting 10:31:59 there are a lot of stack-based vm systems 10:32:07 --- part: f-a left #forth 10:33:50 crc: any with decent gfx support? 10:36:44 i had understood that javavm was not very congruous with the Forth paradigm 10:38:07 HolonJForth had to use Java datatypes instead of the usual Forth memory constructs 10:45:10 nothing substantial. uxn has a framebuffer, but no forth on it that I'm aware of. nga (my vm) only has some limited prototypes w/graphics support, r4vm (from r3da iirc) might have had graphics; some of his stuff did 10:46:20 uxn is not a forth, but it is a fun stack thingy 10:46:29 would recommend messing around with it if you want fun rather than practicality 10:53:47 I intend to explore graphics at some point, but haven't actually needed this so far 10:57:15 uxn also changes every like...few days 10:57:35 I feel like every day I check #uxn and the audio engine has been redesigned or some similar large change 11:21:48 --- join: ecraven- joined #forth 11:28:48 --- quit: ecraven (Ping timeout: 276 seconds) 11:28:48 --- nick: ecraven- -> ecraven 11:29:53 --- quit: alexshendi (Ping timeout: 260 seconds) 11:31:03 --- quit: rpcope (Ping timeout: 240 seconds) 11:33:44 --- join: rpcope joined #forth 11:57:34 :-) That would be frustrating to me, nihilazo. 11:57:41 I find it fun 11:57:49 I just don't like...build anything at all big with ux 11:57:50 I just don't like...build anything at all big with uxn 11:57:50 Well, that's good. 11:58:00 my biggest uxn program is...700 bytes compiled? lol 11:58:00 Fun is what life's all about. 11:58:15 I just mess around with it and don't get too attached to anything in case it totally changes 11:58:37 A buddy of mine asks me sometimes why I do all this work on Forth that I do. As in what's the purpose of it. 11:58:48 I've gotten so I just say "Hobby" and leave it at that. 11:58:54 I may use it for something someday. I hope so. 11:58:59 But that's really not the point. 11:59:41 It's mostly just the joy of creating something. 11:59:42 yeah same here 11:59:53 I don't create things at work anymore like I did back in the day. 11:59:58 This is my creation outlet. 12:02:34 --- join: theseb joined #forth 12:02:52 so my text user interface example code now constructs its entire interface via JSON and it is working perfectly :) 12:03:25 Say I'm intrigued by Forth...I wondered what are its main use cases today? Reason I ask is it appears to shine when resources are minimal but in today's world you typically have plenty of memory and other resources yes? 12:03:39 still not tested any of the menu description code yet so thats next on the todo list and when i get it all working i plan to give width/height/x/y coordinates for windows as percentages of screen width/height 12:03:42 I want to like it but I wonder if it is used much in a world of abundance 12:03:52 maybe place windows relative to other widnows etc 12:04:05 theseb: I use it for fun, I think it's used in some specialised applications 12:04:17 but for like, desktop PC programming, it doesn't get used much. Aside from by folks who like it. Like us 12:05:10 nihilazo: i know it is used for spacecraft....I can imagine cases you want to formally verify your system for safety reasons...perhaps in those cases Forth would be useful since it is so minimal? 12:05:14 theseb, its not used much in industry if thats what you mean 12:05:35 MrMobius: I'm wondering if need for formal verification will make Forth have a renaissance 12:06:14 theseb, highly doubtful 12:06:26 I think formal verification is easier in a language that has things like types 12:06:35 forth has nothing to try and be safe 12:07:23 but I don't really know, I just build hobby things 12:07:24 nihilazo: A genneral goal I've had from time to time is to be able to do stuff in Forth like I do in Octave. Handle vectors and matrices and so on. 12:07:43 I'm still just writing a crappy terminal game in it 12:07:56 My way of contemplatinng that is to add another stack. Consulted only by the interpreter, it will maintain a "type value" for each item on the data stack. 12:08:14 but learning forth has been cool and working with forth is fun (if frustrating at times. Had a bug I was stuck for two days on, turns out I was just using "bl" instead of "space" and it was causing all the problems) 12:08:24 What would let me do is include type information in word searches, and find only words that worked properly with the items on the stack. 12:08:44 So I could overload operators - for example, + with two ints on the stack would be different from + with two vectors. 12:08:50 hmm 12:08:53 idk honestly 12:09:08 But it would be determined at compile time - at run time it would just be the one right + that was compiled. 12:09:22 To do this, the dictionary has to provide info on how to update the type stack when a word executes. 12:09:47 wrt formal verification, if you can define types as "a predicate on the value and the machine state that determines whether everything is 'ok'," you can get pretty far with just symbolic execution 12:09:50 So, you'd find a word that took the right types based on what's on the stack now, execute it, and then modify the type stack as per the stack effect comment in the word you just executed. 12:09:55 and your types are really just shorthand there 12:10:02 That opens the possibility of a good bit of error protection. 12:10:11 Suddenly you can watch out for overflow and underflow, and so on. 12:10:23 this gets much less easy if you define vector as e.g. "something that was once returned from ALLOCATE-VECTOR" 12:10:34 remexre: Yeah, I'm sure my thinking on this is all full of "real CS holes." 12:10:44 This is the sort of thing my approach to would likely be kind of hacky. 12:11:17 Anyway, the payoff would be that I could intersperse numbers and vectors and matrices and so on, and the system would always know what it needed to do. 12:11:31 That makes sense. 12:12:00 Words like ?dup present an immediate problem. 12:12:15 Prior to executing it, you don't know what it's going to do. 12:12:21 in the symbolic execution approach, not really 12:12:24 KipIngram, no, ?dup is a COMPILE problem not an IMMEDIATE problem 12:12:31 well, in most approaches, not really 12:12:48 you just have two subproofs now, one for if the TOS was zero, one for if it was nonzero 12:12:57 I imagined dealing with it manually - where necessary the programmer (me) would inject a stack effect comment to define the current state of the stack. 12:13:10 yeah, that's approximately the frama-c approach 12:13:11 Anywhere the compiler got confused. 12:13:33 Anyway, I've never built it, so I have no idea if it would really hold together. 12:13:34 which because C allows similar sorts of nonsense with pointers, has similar "hard problems" 12:14:12 I never imagined making a base system work that way. I always thought of it as a "replacement interpreter loop" that would be tantamount to my Octave ap. 12:14:14 app 12:14:29 Run it when I needed it, and then exit. 12:15:05 nihilazo: But you're right - the absence of any sort of info like that in a typical Forth system leaves one with precious little error checking to do. 12:15:49 Forth more or less says "if you tell me I can run that word at that time, I trust you." 12:16:02 And it will then charge right off of a cliff for you if you gave it one to charge off of. 12:16:18 With great power comes great responsibility... 12:20:26 I've got a pretty good layer of system protection whenever I can actually *recognize* an error has occurred. 12:21:05 One thing I've wished I could do is catch the exceptions that occur when I access a bad memory location or something like that, and just pass that back through my error recovery. Instead of just segfaulting. 12:21:11 I've never bothered to learn how yet, though. 12:21:15 If it's even possible. 12:21:31 are you on Unix? 12:21:50 MacOS. It's BSD, mostly I think. 12:22:47 hm, if it passes a ucontext to a signal handler, you can twiddle that 12:22:50 The error recovery isn't PERFECT - it involves restoring a copy of the system I made prior to beginning interpretation of the line. It's always possible that my error corrupted the image. 12:22:56 Just unlikely. 12:23:12 e..g on SIGSEGV, you can push the instruction pointer to the data stack, then jump to a non-signal-based handler for it 12:23:13 Cool. I may go hunting for it at some point. 12:23:45 Gotta go pick my kid up from school - back in a bit. 12:25:24 oh wait you probably don't even need a ucontext for that, you might be able to do it in pure posix 12:32:51 --- quit: gravicappa (Ping timeout: 245 seconds) 12:49:53 --- quit: theseb (Quit: Leaving) 12:58:46 Catching that type of exception would remove the most common reason the system ever crashes. 13:03:42 --- quit: andrei-n (Quit: Leaving) 13:20:56 --- quit: mtsd (Ping timeout: 252 seconds) 14:03:50 --- quit: tech_exorcist (Ping timeout: 252 seconds) 14:52:29 --- join: dave0 joined #forth 14:53:03 maw 14:54:42 maw 14:54:48 wam 14:55:24 hi KipIngram 14:57:41 --- join: Zarutian_HTC1 joined #forth 14:57:42 --- quit: Zarutian_HTC (Read error: Connection reset by peer) 15:06:08 --- quit: dave0 (Ping timeout: 245 seconds) 15:07:52 --- join: dave0 joined #forth 15:15:39 --- nick: Zarutian_HTC1 -> Zarutian_HTC 16:30:34 so, what does maw mean? 16:34:04 --- quit: dave0 (Quit: dave's not here) 16:48:10 it's wam rotated by 180 degrees 16:48:20 and by rotated i mean flipped upside down 17:04:48 * KipIngram snickers. 17:04:50 I like it. 17:19:12 --- join: Zarutian_HTC1 joined #forth 17:19:12 --- quit: Zarutian_HTC (Read error: Connection reset by peer) 17:21:15 actually it's wem flipped upside down 17:21:28 no, that's not right either. what a colossal failure on my part 17:30:19 It was still fun. 17:31:20 Like Back To The Future: Holes you could sail a battleship through, but still collosally fun. 18:12:01 --- quit: jedb (Ping timeout: 245 seconds) 18:14:27 --- join: jedb joined #forth 18:57:55 --- join: boru` joined #forth 18:57:58 --- quit: boru (Disconnected by services) 18:58:00 --- nick: boru` -> boru 18:58:49 do you guys know if there's a forth that you can insert into your C project for debugging that can access the C variables? 19:42:12 --- quit: sts-q (Ping timeout: 246 seconds) 19:45:06 --- join: dave0 joined #forth 19:51:59 --- quit: jedb (Quit: Leaving) 19:52:34 --- join: jedb joined #forth 19:53:45 i think that would be almost impossible 19:56:13 --- join: sts-q joined #forth 20:19:58 remexre: ok, the Hoare2 chapter is pretty awesome, I went through it recently 20:20:47 by annotating the fiboancci program with Hoare triples (and the appropriate loop invariant), Coq was able to automatically verify correctness, since Hoare logic is compositional and all you have to do is check local logical consistency 20:22:09 I wonder if there's a topological interpretation of that, being consistent is a local property, so maybe it makes sense to impose a lattice structure where the meet of two program fragments exists iff they agree logically 20:23:03 Then you just take the topology induced by the principal filters of elements of the poset 20:23:16 Just purely speculating, would need to understand more about logics in general to say for sure 20:24:05 mark4, i think youd have to insert the forth into the assembly the compiler generates unless you were gonna try to parse the C yourself 20:24:19 like maybe you could see the addresses in the map file 20:45:01 proteusguy: how long did it take to go through Software Design for Flexibility? 20:50:48 SICP can take ages to go through for instances (in detail and also doing the exercises), I wonder if the new book would be written in a different style 21:00:49 --- quit: Zarutian_HTC1 (Read error: No route to host) 21:00:52 siraben, I perused it in a day (I was aware of most of the concepts - just really interested how he put them together and what he did with them). Now I've gone back and am reading it in more detail. Yes - only on chapter 2 now as I pay close attention to the code. 21:01:41 Yeah makes sense to skim it quickly initially to get the big picture 21:01:59 --- join: Zarutian_HTC joined #forth 21:06:03 --- join: mtsd joined #forth 21:08:10 --- join: gravicappa joined #forth 21:27:03 I'm still in the middle of my SICP skim. I slowed down a good bit when I started watching the lectures. 21:36:00 KipIngram: there's neat exercises in the book about solving basic differential equations with streams, which you might like from an EE standpoint 21:46:26 i think you COULD do it if the executable still had debug info on it and you were prepared to parse all that gobbldegook from the forth :) 21:46:54 Cool. I just got past the stream lectures, and found all of the discussion over functional vs. imperative in that general bit of stuff to be really interesting. 21:47:52 The whole back and forth on the various ways of implementing Cesaro's algorithm with the different perspectives - very nice. 21:53:42 --- join: DKordic joined #forth 23:59:59 --- log: ended forth/21.04.27