2022-05-31 08:09:56 Well, just upgraded from Fedora 34 to Fedora 36. Always a little nerve-wracking, but it went ok. 2022-05-31 08:10:12 I think GPU / OpenCL support is better in this version. 2022-05-31 08:10:27 I tried to get that all to fly a couple months ago, with 34, and just wasn't able to do it. 2022-05-31 08:10:32 Maybe it'll go better this time. 2022-05-31 08:10:59 I also want to haul out my little software radio dongle today and get some support for it going - I haven't done anything with it on this computer. 2022-05-31 08:11:14 Took a while for my "radio urge" to come around again. 2022-05-31 08:16:33 I use CubicSDR and fldigi mostly. 2022-05-31 08:16:42 On BSD, but they're supported on Linux as well. 2022-05-31 08:17:13 I prefer CubicSDR to gwrx, personally. 2022-05-31 08:17:40 cubic uses soapy, so you just need to install the appropriate soapy module for it and you're done 2022-05-31 08:36:20 Cool - thanks. I'll look into it later today. 2022-05-31 08:36:54 I'm licensed and have been toying with the idea of setting up a station in the garage, but I figured it might be sensible to do some "listening" before dumping $$$ into a transceiver rig. 2022-05-31 08:37:06 WV5F here. 2022-05-31 08:38:14 I got my Tech license decades ago, and never did much with it. Then they dropped all the code requirements, so it just seemed silly not to go out and take the top tier test - I'm an EE by trade, so the material wasn't very hard to get familiar with. 2022-05-31 08:38:22 Yeah, scanning around on RX is fun with those little dongles. You could get a BladeRF with some up/down converters and an amp when you want to go TRX. 2022-05-31 08:38:55 I'm particulary interested in experimenting with antennas. 2022-05-31 08:38:56 Decent antennae are expensive these days, but it depends on the space you've got to play with. 2022-05-31 08:39:13 Plenty of fun to be had there. Some are easy to make, others more challenging. 2022-05-31 08:39:23 Yeah - my HOA won't let me do anything major there, so I'll need to look into innovative things, like mag loops and so on. 2022-05-31 08:39:33 You can knock together a NOAA receiver or an L or V HF antenna easily though 2022-05-31 08:39:47 Mag loops are spendy, but they're popular in urban areas 2022-05-31 08:39:53 Yeah, snagging weather satellite pics is something I want to try as well. 2022-05-31 08:40:19 It's a piece of cake to make an antenna for that. It just needs to be high enought to clear obstructions for sky coverage. 2022-05-31 08:40:26 Decoding them is easy, though. 2022-05-31 08:40:32 You can do that with fldigi in fact 2022-05-31 08:41:03 If you want to practice it, you can even just create a "virtual" audio cable from your browser to fldigi's input and decode other people's RX. 2022-05-31 08:41:20 I use sndio on BSD, but it's possible with pulseaudio on Linux as well, I believe. 2022-05-31 08:41:49 It's worth getting a list of the local repeaters as well. Your local ham club should be able to provide you with all of that documentation. 2022-05-31 08:42:12 Decoding AIS and ADS-B, depending on where you live, is pretty easy as well. 2022-05-31 08:42:59 Unfortunately, a lot of stuff here has gone digital now, so it takes practice to scan around by ear and getting to recognise signals on waterfalls etc. 2022-05-31 08:44:05 If you want to go directional for satellites and stuff, you're looking at something like a yagi on a rotator or computerised telescope (astronomy) mount. 2022-05-31 08:44:20 Poking at satellites is fun. 2022-05-31 08:44:46 Radar backscatter during meteor showers is also quite cool. 2022-05-31 08:44:59 Oh man - I'm glad you're here. 2022-05-31 08:45:03 That's neat info. 2022-05-31 08:45:32 I'm no expert. It's just a side hobby for me when it's cloudy and I can't take my telescopes out. 2022-05-31 08:45:48 Theres a ham channel on this net though, as well. 2022-05-31 09:05:46 Hmmm. The new OS seems to not like my fingerprint reader. That's a little disappointing. 2022-05-31 09:10:05 Ah, no, it seems to be working. The fingerprint enrollment interface just isn't showing a interface as "intuitive" as the old one. 2022-05-31 09:10:18 But I was able to lock the screen and then fingerprint my way in. 2022-05-31 13:10:16 Weird. So, my software radio dongle is an RTL-SDR v3; that version offers a "direct sampling" option that lets it tune the low frequencies - sub-AM on up through the HF ham bands. 2022-05-31 13:10:51 I was just using it in that mode, and was checking out the CB channels. The little antenna that came with it isn't really right for that, but I could hear a little. 2022-05-31 13:11:07 The weird thing was that I was hearing what sounded like broadcast MUSIC on the CB channels. 2022-05-31 13:11:22 That's not at all what I expected. 2022-05-31 13:12:04 given software, I'd expect bugs 2022-05-31 13:22:54 KipIngram: yeah, was it multi instrumental or just one instrument? because I know of some hams that like to play a few tunes for other hams 2022-05-31 13:23:47 but sometimes it is just some truckers CB radio accidentially left on voice gate instead of push to talk 2022-05-31 13:24:36 and they turned on some music without realizing the voice gate being on 2022-05-31 13:24:55 or there's a bug and you're in FM range 2022-05-31 13:25:25 might be a software bug indeed 2022-05-31 13:25:55 Yeah, could be. The software frequency readout was definitely in the CB band, but that's not saying a lot. 2022-05-31 13:26:18 get another radio and listen at ... 2022-05-31 13:26:28 and it might be that the virtual beat frequency generator or bandpass filter usedfor tuning is buggered 2022-05-31 13:27:29 or the radio is too close to something that is generating music. pretty sure someone made a PDP-something play Bach that way 2022-05-31 13:28:15 I have not looked into Software Defined Radios but I suspect the frequency tuning is done via first converting the signal via Fast Faurier Transform 2022-05-31 13:28:29 ah yes www.youtube.com/watch?v=UYCfPuOXXrQ 2022-05-31 13:30:00 KipIngram: if you are into this kind of stuff look into aprs, adb, and freedv 2022-05-31 13:30:45 at least GNU radio no longer rm -rfs the lib directory before installing there (hope you didn't have anything important...) 2022-05-31 13:31:12 the first two are the automatic packet radio system, and i have forgotten what adb stands for 2022-05-31 13:32:07 aprs is used by ships, weather stations, repeater status and such 2022-05-31 13:32:48 while adb is airtraffic location signals most airplanes transmit 2022-05-31 13:35:39 and some drone flying hobbyists also transmit, from the drone, its location and such, iff the flyer is unsure about airspace 2022-05-31 13:37:24 mostly it is about the ones flying near the bottom most flight level 2022-05-31 14:04:22 In direct sampling mode that's pretty much what's done - you get a whole waterfall display, and could record the entire band if you wanted to. Software does all the "selecting" of what you want to listen to. 2022-05-31 14:04:56 This thing will also do FM/2m band type stuff, and for that it uses a mixer to bring that down to its direct sampling reach. 2022-05-31 14:05:50 It could easily be that even in direct sampling mode it was still getting some of the converted stuff mixed in, except I was in AM demodulation mode, and stray FM signals shouldn't have demodulated well enough to grok. 2022-05-31 14:07:03 I've had a degree of interest in ham radio my whole life, and it's just staggering how much that field has changed. 2022-05-31 14:07:19 Processor power has just revolutionized the whole business. 2022-05-31 14:07:56 In that direct sampling mode it's basically just digitizing the whole RF signal. 2022-05-31 14:08:19 Then using DSP to pluck out a bit of it to play for you. 2022-05-31 14:16:25 https://twitter.com/tangentstorm/status/1531700707497238528 <- screenshot of a little forthlike vm/assembler/repl thing i'm working on 2022-05-31 14:22:54 The colors are pretty. :-) 2022-05-31 14:26:21 :D 2022-05-31 14:40:04 I've got a simple color scheme written into mine - my typing is white, error messages are red, "all is well" output (mainly the "ok" prompt) is green, and output of words I execute is blue. I find it pretty pleasing. 2022-05-31 15:30:07 tangentstorm: for those of us who block twitter javascript, are you able to provide the link directly to the image file? 2022-05-31 15:32:22 lispmacs[work]: https://nitter.mzhang.io/pic/media%2FFUGwMYQWQAAYmCq.png%3Fname%3Dorig 2022-05-31 15:35:11 thanks 2022-05-31 15:35:14 can somebody explain to me # <# #> 2022-05-31 15:35:22 «you don’t need them» is a valid answer 2022-05-31 15:35:30 is there a project repository? 2022-05-31 15:36:05 for tangentstorm's interesting looking vm/assembler/repl thing? 2022-05-31 16:02:12 f-a: I don't 100% grok them, but my understanding is that they're for formatting reports; I haven't needed them, at least? 2022-05-31 16:02:23 thanks 2022-05-31 16:32:21 they are part of the 'formatted numeric output' iirc 2022-05-31 16:33:37 there is a string buffer, that either HOLD or PAD 2 cell variable points to 2022-05-31 16:34:12 never recalled which it was but lets say it is HOLD 2022-05-31 16:35:45 what <# # #s #> do is to use that to build up a string 2022-05-31 16:36:55 <# starts the process by clearing out that buffer 2022-05-31 16:38:16 usually by putting spaces in all locations in it 2022-05-31 16:39:43 this buffer grows towards lower addresses 2022-05-31 16:41:36 each # takes a number on the stack /% into it by BASE, prepends the reminder to the buffer, and leaves the quotent on the stack 2022-05-31 16:42:26 #s does the same until the qoutent is zero 2022-05-31 16:43:03 This question, from Thomas Moss on Quora, just landed in my inbox: 2022-05-31 16:43:08 "Could you build a spacecraft with a cylinder through the centre and pass your propulsion through it, but instead of it exiting the cylinder, could you catch and reuse the energy used as propulsion?" 2022-05-31 16:44:01 #> finishes the proccess of and leaves a pointer and length on the stack of the resulting string 2022-05-31 16:44:44 f-a: Each # emits a character of the number. <# "sets things up" and #> closes things out. The idea is to be able to format your numbers the way you want them to look, number of decimal places, etc. 2022-05-31 16:45:03 KipIngram: a variant of impulse drive? 2022-05-31 16:45:27 Looked to me like a variant of grabbing your own shirt collar and lifting yourself off the ground. :-) 2022-05-31 16:46:27 sorry HOLD doesnt hold the buffer ptr and count but enables you to insert characters into it 2022-05-31 16:46:32 But yeah - among other problems he seemed to be conflating the chemical energy of the fuel (of which there's not much left when it leaves the rocket) and the whole momentum story. 2022-05-31 16:47:25 yebb, seems like he has not read up on propulsion 2022-05-31 16:48:02 KipIngram: is it correct what I said about HOLD ? 2022-05-31 16:48:53 I'm wanting to think it's PAD, but I might be wrong. 2022-05-31 16:49:06 I did it differently, so I didn't actually do an implementation of those. 2022-05-31 16:49:27 I did a facility that used format strings more like C. 2022-05-31 16:49:48 been years since I transcoded that section of eForth for the dcpu-16 port I was doing 2022-05-31 16:49:50 And there was a variant of TYPE that could contain such strings - each format field would eat a number from the stack. 2022-05-31 16:50:55 KipIngram: and that will be compiled, right? 2022-05-31 16:51:25 Well, that variant of TYPE was a compiled word, yes. 2022-05-31 16:51:38 There was a little byte code interpreter that "executed" characters of the format string. 2022-05-31 16:52:34 So, I guess that means the format string itself didn't get compiled - it was "interpreted" at run time. But that interpretation didn't involve any dictionary search or anything, so it was pretty fast. 2022-05-31 16:52:49 I had a jump table and indexed it with format field chars. 2022-05-31 16:52:50 regarding space propulsion: you either need to throw reaction mass in the opposite direction of travel or do other things 2022-05-31 16:53:04 Right - that's exactly what he didn't grasp. 2022-05-31 16:53:08 I tried to explain it. 2022-05-31 16:53:30 I answer quite a few Quora questions. I was bored one day and answered a bunch, and that seems to cause them to show up in your email. 2022-05-31 16:53:36 I probably do several dozen a day. 2022-05-31 16:53:53 And I've actually gotten two pittance-sized payouts from Quora for it so far this year. 2022-05-31 16:54:03 I won't be retiring on it or anything. 2022-05-31 16:54:03 Then there is light sails that uses momentum transfer of photons 2022-05-31 16:54:24 Yes - the sails reverse the direction of the photons, or at least reverse a component of the direction. 2022-05-31 16:54:33 So the sail has to go the other way to pay back that momentum change. 2022-05-31 16:54:58 Black sail would work too, but you'd only get half the momentum. 2022-05-31 16:55:12 or what will be affectionally known as the Casmir Wedge 'thrusters' but those are pain in the butt 2022-05-31 16:55:25 right 2022-05-31 16:55:50 Ever heard of Operation Starshot? 2022-05-31 16:56:14 Tiny little probe with a sail - high intensity orbital lasers would be used to "boost it." They think they could get like a quarter the speed of light. 2022-05-31 16:56:41 laser propelled stamp sized propes sent to Centauri Proxima? 2022-05-31 16:56:42 The proposal is to send such a thing to Proxima Centauri and have photos back before our lives are over. 2022-05-31 16:56:47 yeah, exactly. 2022-05-31 16:56:53 It'd be cool. 2022-05-31 16:57:00 But I'm not holding my breath. 2022-05-31 16:57:19 yeah heard it mentioned in SFIA episode few moons back 2022-05-31 16:59:07 personally I would use a stelllaser instead of earth orbiting lasers 2022-05-31 17:00:53 basically using part of a stars corona as the lasing medium 2022-05-31 17:01:40 what I hope to see built is an megastructure called an orbital ring 2022-05-31 17:03:49 hello fellow forthers 2022-05-31 17:03:52 ok. 2022-05-31 17:04:34 basically a ring around the planet, say right about the Kalman line of 100 km you have an globe enveloping geostationary ring and inside it another maglev'ed ring going a bit faster than orbital speed of that altitude 2022-05-31 17:05:02 question : given an array alloted ... How one can easily increment a cell at array index ? 2022-05-31 17:05:31 then one can basically take train or cable car to it from the surface 2022-05-31 17:06:24 say your array is called ARR 2022-05-31 17:07:02 ye? I forgot to say the index is itself in a variable 2022-05-31 17:07:17 if you call ARR it will leave the address of the first cell on the stack 2022-05-31 17:08:00 usually in that cell you have the length of the array 2022-05-31 17:08:08 so ... index @ arr @ + 1+ index @ arr @ ! (it seems pretty long !!) 2022-05-31 17:08:23 so the actual array elements start one cell over 2022-05-31 17:10:14 4 variable index CREATE ARR 4 ALLOT how can I increment the cell at pos index ? 2022-05-31 17:10:33 most folks define an array constructor, a thing that takes the next word of the input and defines three words, the name of the array, that appened with @, that again appened with ! 2022-05-31 17:10:58 tried ... index @ arr @ + 1+ index @ arr @ ! (but its lot of @) 2022-05-31 17:11:42 plus there isn't cell word...Erf 2022-05-31 17:12:04 the words with @ and ! the end expects the index ontop of the stack 2022-05-31 17:13:22 lopata: I think the "obvious way" is the only way to do it. Something like 2022-05-31 17:13:30 Oh -. 2022-05-31 17:13:37 other variant just defines an array word per array. That word expects index at the top of the stack and leave behind that cells address 2022-05-31 17:13:45 You need to shift your index. Or multiply by cell size. 2022-05-31 17:13:55 index @ cells arr + 1+! 2022-05-31 17:14:00 If you've got 1+! 2022-05-31 17:14:01 CELLS 2022-05-31 17:15:02 So, in a 64 bit system you might have 2022-05-31 17:15:09 : cells 3 << ; 2022-05-31 17:16:21 i dont have 1+! its complicated : 2022-05-31 17:16:49 index @ cells arr @ + 1+ index @ cells arr @ + ! 2022-05-31 17:16:59 other variants is to just do : array@ ( idx arrayPtr -- item ) 2dup @ > if abort" index out of bounds" then 1+ + @ ; 2022-05-31 17:17:23 assuming cell addressed system 2022-05-31 17:17:57 otherwise you need to multiply bit the 1 and index by cell size 2022-05-31 17:18:04 I m on 16 bit MSP430 btw 2022-05-31 17:18:21 byte addressed? 2022-05-31 17:18:29 mecrisp? 2022-05-31 17:18:38 yes 2022-05-31 17:19:11 Ok, then 1 index @ cells arr + +! 2022-05-31 17:19:16 so probably 2 bytes per cell then 2022-05-31 17:19:28 y 2022-05-31 17:19:39 Do you have +! 2022-05-31 17:19:41 ? 2022-05-31 17:19:50 It's much better for this than @ + ! 2022-05-31 17:20:15 : +! ( increment addr -- ) dup @ swap + swap ! ; 2022-05-31 17:20:51 sorry 2022-05-31 17:21:48 : +! ( increment addr -- ) swap over @ + swap ! ; it should be 2022-05-31 17:23:32 lopata: and you are interfacing with it over serial? (probably serial over usb nowdays) 2022-05-31 17:24:08 using minicom or other such terminal program? 2022-05-31 17:24:08 mmmmmmmmmmmm, why are you keeping +! stuff on the stack? 2022-05-31 17:25:19 interfacing with uart to PxSEl directly 2022-05-31 17:25:21 oh wait, thats +! 2022-05-31 17:25:23 not !+ 2022-05-31 17:25:56 i mean rx tx gnd 2022-05-31 17:26:52 what's difference btn +! and !+ 2022-05-31 17:27:01 lopata: not familiar with that term, is it an In Circuit Programmer/Interface or an dev board with the MSP430 on it? 2022-05-31 17:27:44 probably the latter 2022-05-31 17:28:32 dev board y! 2022-05-31 17:28:57 any neat peripherals on it? 2022-05-31 17:29:13 nup, I use e4thcom btw its cool 2022-05-31 17:30:44 so this is how I make an array: VARIABLE arrA 64 CELLS ALOT 2022-05-31 17:32:05 ok 2022-05-31 17:32:31 what the 64 CELLS ALOT does is to advance HERE 64 cells onward so the next defined word doesnt get put in the place where the array is 2022-05-31 17:32:48 what if the index has to be a variable as well 2022-05-31 17:33:12 variable sized array? 2022-05-31 17:33:24 to fetch value youd write index @ cells arr + @ . 2022-05-31 17:33:45 right, have not gotten so far in the explanation yet 2022-05-31 17:33:49 no I mean arr[index] << index is globar forth variable 2022-05-31 17:34:25 index @ cells arr + @ . 2022-05-31 17:35:03 you got it 2022-05-31 17:35:09 now is there any shortcut to increment an array by 1 2022-05-31 17:35:29 arr[index]++ 2022-05-31 17:35:50 : 1+! 1 swap +! ; 2022-05-31 17:36:48 I will let you figgure out where to use that one in the above 2022-05-31 17:37:30 Hi, I don't know if you guys can give me some hints 2022-05-31 17:37:50 I have some kind of forth-like interpreter written in javascript 2022-05-31 17:37:52 nice works like a charm 2022-05-31 17:38:02 ACTION hands vms14 a generic UHS file 2022-05-31 17:38:17 it's able to use the dom and the canvas, etc 2022-05-31 17:38:52 the thing is, I want to make some kind of game generation tool and I want to write it in this language 2022-05-31 17:39:10 ACTION expands UHS to Universal Hinting System, generally used for many puzzle story ganes 2022-05-31 17:39:12 I have a script that kind of bundles all the language + your code in a html fil 2022-05-31 17:39:16 games* 2022-05-31 17:40:08 vms14: ya looking for a bundler or rollup tool? 2022-05-31 17:40:20 https://tmpfiles.org/dl/304199/oh.html 2022-05-31 17:40:24 this is the result 2022-05-31 17:40:35 it's a half part of a game 2022-05-31 17:40:53 lopata: ya get how one can build up this kind of vocabulary of usefull forth words? 2022-05-31 17:41:21 you can move the player and die 2022-05-31 17:41:33 go on 2022-05-31 17:41:57 but the thing is, it's an interpreter and won't be efficient 2022-05-31 17:42:12 I think in making a transpiler instead but I have no idea 2022-05-31 17:42:30 you could write an wasm assembler for it 2022-05-31 17:42:59 I mean should I have a "forth interpreter" in read time and have in this interpreter words that generate code and also words that get executed at "read time" 2022-05-31 17:43:20 or compile time 2022-05-31 17:43:45 my initial idea is make words translate to literal code 2022-05-31 17:44:02 I could have a stack in compile time or at runtime 2022-05-31 17:44:14 ACTION barely hefts a big tome on compiler theory into vms14 direction 2022-05-31 17:44:28 yes, actually is compiler stuff 2022-05-31 17:44:40 I have the dragon book, idk if would help me 2022-05-31 17:44:51 but being a "forth" i wonder if you have some hints 2022-05-31 17:44:54 well you could just build up js function per word definition 2022-05-31 17:45:20 but should I also have stuff like immediate words that execute at compile time? 2022-05-31 17:45:46 have them all close over the same array to use as the datastack 2022-05-31 17:46:15 and the stack, should be at runtime or at compile time? I have to think a lot about this 2022-05-31 17:46:48 please do because this can get into fractal weeds quite quickly 2022-05-31 17:49:48 I suppose I'll just try and see what shape ends taking 2022-05-31 17:50:52 I like the fact the transpiler can be as slow as I want so I won't be bothered about efficiency since the runtime efficiency won't be affected 2022-05-31 17:51:29 impinges on the speed of the dev cycle though 2022-05-31 17:51:37 and it makes the cost of a word equal to 0 2022-05-31 17:52:22 I recommend you look into the three transforms of Futamura 2022-05-31 17:52:23 yes a repl is nice to have, but there's always a dirty eval, after all I'm transpiling to js 2022-05-31 17:53:43 http://blog.sigfpe.com/2009/05/three-projections-of-doctor-futamura.html?m=1 2022-05-31 17:55:50 I was looking at that link xd 2022-05-31 17:56:44 it seems it can help, thanks Zarutian_HTC 2022-05-31 18:00:40 http://www.itu.dk/people/sestoft/pebook/jonesgomardsestoft-letter.pdf 2022-05-31 18:08:25 vms14: What do mean exactly by whether the stack should be at run time or compile time? 2022-05-31 18:08:46 The stack is always there - compile time words sometimes use it, and that's fine so long as they clean up after themselves properly. 2022-05-31 18:09:06 The stack is used for communication among IF, ELSE, and THEN, for example. 2022-05-31 18:10:26 KipIngram: I mean a word could be a code word having arguments from a stack and writing code using those arguments 2022-05-31 18:11:01 or it could be just literal code and the stack be present in the transpiled language 2022-05-31 18:11:10 Yes - I was just about to say, don't get to fixated on "run time" and "compile time." It's always run time - you are running words all the time. 2022-05-31 18:11:23 It just happens that some of them has as their task building other words that you will run later. 2022-05-31 18:11:25 but I could use words to generate code 2022-05-31 18:11:34 Absolutely. 2022-05-31 18:11:46 Most all "assembler words" will emit code into some place. 2022-05-31 18:12:22 I suppose I just need to start and try stuff 2022-05-31 18:12:37 There is STATE, which tells you what to do to "most words." 2022-05-31 18:12:42 start by something simple like having variables and see how I manage them 2022-05-31 18:12:44 Words like + SWAP and so on. 2022-05-31 18:12:48 Do execute them now? 2022-05-31 18:12:59 Or do you emit their address into a definition you're building? 2022-05-31 18:13:06 STATE tells you which of those things to do. 2022-05-31 18:13:19 It's the same + regardless - there's only one. 2022-05-31 18:13:38 But the code that parses that character and looks it up in the dictionary checks state to decide whether to "run it" or "compile it." 2022-05-31 18:14:02 STATE that is; I should capitalize it to make it clear I'm talking about that variable. 2022-05-31 18:14:28 So if + appears inside : ... ; it doesn't actually get executed. 2022-05-31 18:14:34 Its address gets stored. 2022-05-31 18:14:54 But those assembler words I mentioned - they're different; it's their executin task to emit code. 2022-05-31 18:15:26 in fact you talk about the compiling mode and the immediate words 2022-05-31 18:15:35 it seems nothing changes at the end 2022-05-31 18:16:04 I could have immediate words and the normal execution words would just emit literal code 2022-05-31 18:16:38 Immediate words exist because SOMETIMES you want a word to execute now even if you're inside : ... ; 2022-05-31 18:16:41 Like IF 2022-05-31 18:16:53 or like ; 2022-05-31 18:16:56 xD 2022-05-31 18:17:03 Yes - that's actually the best example. 2022-05-31 18:17:13 But say you do this: 2022-05-31 18:17:13 I always forget to make it immediate and then I wonder why does not work 2022-05-31 18:17:22 : foo ... IF ... THEN ... ; 2022-05-31 18:17:31 Now you've got a definition for foo. 2022-05-31 18:17:38 And there is no IF or THEN in it. 2022-05-31 18:17:55 No pointer to the word IF or the word THEN, because they didn't get compiled - they got executed. 2022-05-31 18:18:04 IF compiled a conditional JUMP, so you'll find that JUMP in there. 2022-05-31 18:18:28 And THEN doesn't compile anything - it just goes and plugs the target address into that JUMP, since it knows where you want to jump to. 2022-05-31 18:19:01 The language didn't have to have those words - you could have worked just with conditional JUMP. 2022-05-31 18:19:16 But programmers like if then conditionals. They're "structured." 2022-05-31 18:19:30 So immediacy allows the introduction of that kind of intelligence into the language. 2022-05-31 18:20:13 See, when IF compiles that conditional jump, it doesn't yet know where it needs to jump to. 2022-05-31 18:20:23 You're jumping AHEAD, if you jump, and IF has no idea where. 2022-05-31 18:20:43 So it compiles the jump, and it allocates a spot where the jump target will eventually go. 2022-05-31 18:20:57 And it puts the address of that spot on the stack (this is that communication I mentioned). 2022-05-31 18:20:58 my idea of an if implementation is to just use the if of the transpiled language 2022-05-31 18:21:09 Then uses that address and places the correct jump target in that sl ot. 2022-05-31 18:21:47 I'll start trying basic stuff 2022-05-31 18:21:58 thanks a lot for the hints KipIngram and Zarutian_HTC 2022-05-31 18:22:05 I said this a day or two ago - I'll say it again. I think Forth's way of doing this is likely the simplest possible way, and the stack is the perfect data structure for managing it. 2022-05-31 18:22:37 But it is true that the "boundary" between "running" and "compiling" is very fuzzy in Forth. 2022-05-31 18:22:50 btw did you see my dirty forth in js? xD 2022-05-31 18:22:51 That's actually one of its strengths - one of the reaosns it can be so interactive. 2022-05-31 18:22:59 https://tmpfiles.org/dl/304199/oh.html 2022-05-31 18:23:02 No - I'm missed a good bit today. 2022-05-31 18:23:05 it's kind of a game 2022-05-31 18:23:07 Oh, good - I will take a look. 2022-05-31 18:23:11 it's written in that forth 2022-05-31 18:23:36 if you look at the source of this html you'll see the whole language + the code of that game 2022-05-31 18:24:37 but then I was going to write a parser instead of that dirty trick and wondered if I should really make a transpiler instead 2022-05-31 18:24:38 That's kind of how Forth apps should look - at the top you just have Forth - by the time you get to the bottom you have an application-specific language. 2022-05-31 18:24:55 You "invent a lexicon" for talking about the problem you're trying to solve. 2022-05-31 18:25:01 that's why I like forth 2022-05-31 18:25:09 your program is a dsl 2022-05-31 18:25:24 Yes. It's rather beautiful. 2022-05-31 18:25:40 your program understands the problem you want to solve 2022-05-31 18:25:43 that's why 2022-05-31 18:25:57 the bad part is it makes it hard to follow 2022-05-31 18:26:14 but it provides a lot of isolation and really helps a lot 2022-05-31 18:26:51 add this to the fact is a language you designed and implemented yourself 2022-05-31 18:27:03 I don't think something can beat that 2022-05-31 18:29:15 I don't think it has to be hard to follow - that really just depends on how good the programmer is. 2022-05-31 18:29:33 It CAN be hard to follow - there's some truly nasty Forth out there. 2022-05-31 18:29:45 No doubt I've written some of it. :-) 2022-05-31 18:29:56 But I think I'm better than I used to be. 2022-05-31 18:30:16 I mean, there are a lot of levels of abstraction as any word is a new layer 2022-05-31 18:31:05 Yes, but they're "small steps." 2022-05-31 18:31:15 No one layer should "baffle." 2022-05-31 18:32:52 Zarutian_HTC is in the middle of putting together a graphics lexicon now. 2022-05-31 18:33:18 And is using a sort of OO approach. 2022-05-31 18:33:28 But it's still Forth. :-) 2022-05-31 18:34:57 what about error handling? 2022-05-31 18:35:40 my language has 0 error handling, if something breaks maybe it says word? 2022-05-31 18:36:36 I always think it's an implementation error and it's I'm not using my language properly xD 2022-05-31 18:37:22 I want some error handling, at least if something breaks I'd like to have some pointers 2022-05-31 18:37:54 that makes me wonder about having types, so at least I could catch this kind of errors 2022-05-31 18:38:13 but then it implies I have to implement type inference and meh 2022-05-31 18:40:53 in this "game" when it runs I look at the stack and has a lot of stuff I have no idea when it was pushed and it's hard to track where I'm adding weird stuff 2022-05-31 18:41:16 did you implement some debuggers, error handling, etc? 2022-05-31 19:18:18 Error handling. Forth has decent compile time error handling. 2022-05-31 19:18:39 The most obvious thing that can go wrong is it gets a word that it doesn't understand. That is, it's not in the dictionary and it's not a number. 2022-05-31 19:18:45 It throws an error on those. 2022-05-31 19:18:58 that's the only error my languages does handle 2022-05-31 19:19:05 Also, the *interpreter* will check at appropriate times for stack overflow or underflow. 2022-05-31 19:19:07 and it's not enough 2022-05-31 19:19:27 usually errors do ocurr in words that actually exist 2022-05-31 19:19:30 But if the stack overflows or underflows during the execution of a compiled word, most Forths don't catch that. 2022-05-31 19:20:01 mine just says "stack overflow" but does nothing more 2022-05-31 19:20:01 And traditional Forth doesn't catch addressing errors, divide by zero, and things like that - those will often crash the system. 2022-05-31 19:20:17 I did add signal handling to mine, though, so now those types of errors go through my error handler too. 2022-05-31 19:20:59 Typically errors will just reset the interpreter loop so you can continue working. 2022-05-31 19:21:07 but for example if something crashes and I don't see "word?" or "stack underflow" I have no idea of what's happening 2022-05-31 19:21:17 Mine actually restores the system to the state it was in before it started interpreting the line that contains the error. 2022-05-31 19:21:26 But that's a rather expensive feature. 2022-05-31 19:21:38 Expensive in terms of RAM. 2022-05-31 19:21:59 I made mine immortal because I didn't want it to crash for every error xD 2022-05-31 19:22:03 Also, the compiler will detect mal-formed control structures. 2022-05-31 19:22:12 Like IF with no THEN, or something like that. 2022-05-31 19:23:12 Yes, it can be tedious chasing down some bugs. 2022-05-31 19:23:34 this language seems to be a project for life 2022-05-31 19:23:56 If I get a crash situation I usually resort to putting a word in that just prints a character or something, and move it forward until I don't get the character anymore. 2022-05-31 19:24:04 That lets me chase down exactly where the bug is happening. 2022-05-31 19:24:34 And for stack balance errors I have a word that will print the current stack pointer, on one of two lines up in the top right corner of the screen. 2022-05-31 19:24:49 By moving two instances of that word around I can corral that kind of error. 2022-05-31 19:25:28 my bugs are usually caused because I don't fully understand my own language and I'm not using properly xD 2022-05-31 19:25:44 it has so many flaws I forget them 2022-05-31 19:25:49 :D 2022-05-31 19:27:07 At this point my system's pretty solid. Bugs show up in new stuff I'm working on - I chase them down. 2022-05-31 19:28:30 And the signal handling - that made me very happy. So nice to just get kicked back to the start of line rather than seg faulting. :-) 2022-05-31 19:28:31 but for example, in my case the stack is able to handle any kind of type, so do words 2022-05-31 19:28:52 having types would let me catch a lot of bugs related with the type 2022-05-31 19:29:46 but then it forces me to make words state the types they want to use, or inference them 2022-05-31 19:30:08 inference would be what I'd choose, but doesn't look funny 2022-05-31 19:30:18 Yeah, that's getting kind of out of Forth land. Forth is generally typeless. 2022-05-31 19:31:32 I wonder how would it end 2022-05-31 19:31:44 Forth gives you cells. You can usually work with cells, half cells, quarter cells, etc. - down to bytes. You can use cells for anything you want - integers, addresses, bytes, chars. 2022-05-31 19:31:49 The rest is up to you to build. 2022-05-31 19:32:07 atm I think I'll make a "normal forth" in the sense I'll just make an interpreted and then just create words that generate code 2022-05-31 19:32:54 If there's a value sitting on the stack, and you say +, you are treating that value as an integer. If you say ! or @, you are treating it as an address. 2022-05-31 19:33:18 I have ! but no @ as there is no really memory allocation 2022-05-31 19:33:23 If you say EMIT, you are treating the least significant byte of that value as a character, and throwing the rest away. 2022-05-31 19:33:38 the word is actually @ instead of a memory address 2022-05-31 19:34:07 Although mine's a bit different now - EMIT can emit a whole UTF8 char, so it might use more than just the least significant byte. 2022-05-31 19:35:21 should I fake memory allocation? 2022-05-31 19:35:38 does not seem productive at first 2022-05-31 19:35:51 Well, you know what I think you should do. 2022-05-31 19:36:01 I think you should pull out nasm and write a full-on Forth. 2022-05-31 19:36:23 hmm 2022-05-31 19:36:28 I can give you macros that build the dictionary structures if you like. 2022-05-31 19:36:39 And trust me - that will save you a shit ton of work. 2022-05-31 19:36:55 but would be code I don't understand and not's mine 2022-05-31 19:36:56 Well, I mean you could write them yourself, but I mean vs. building the dictionary manually. 2022-05-31 19:37:11 and the problem is I want to target js 2022-05-31 19:37:12 The macros aren't that hard to understand. 2022-05-31 19:37:41 Ok. Well, then I likely don't understand your goals well enough to appreciate them. But you should go for your goals. 2022-05-31 19:37:43 the reason I want js is because there is nothing more deployable than a html file 2022-05-31 19:38:16 I'm... "somewhat" interested in portability. To the extent that I want to build stuff in the future and I want to run my language on those things. 2022-05-31 19:38:19 if I make a program in a language that ends in js, I just need to give a url to share it to you 2022-05-31 19:38:35 But in the sense of "the cloud" I'm not to into portability. 2022-05-31 19:38:40 too 2022-05-31 19:38:46 if you want to update you just need to refresh it, if you want to download it you download the page 2022-05-31 19:38:56 Yes. 2022-05-31 19:39:10 does not matter what system or platform you use, you just open the link and the program runs 2022-05-31 19:39:22 Probably my biggest interest in the browser is in the facility it offers for giving you a pre-canned GUI type interface. 2022-05-31 19:39:59 Like, if I build, say, a radio one of these days, running it from a browser on my PC would be an easy way to get a GUI, if I wanted one. 2022-05-31 19:40:01 the only reason I target js is because of this portability and ease to deploy 2022-05-31 19:40:10 But I might just run it from a console session on my computer. :-) 2022-05-31 19:40:45 I was making that "game" in the forth I have in perl, but it's hard to make you install sdl + the module I need 2022-05-31 19:41:03 with the js one I just need to upload the html file 2022-05-31 19:41:30 plus it lets you make any kind of web applications 2022-05-31 19:41:48 you have total access to dom or js stuff 2022-05-31 19:42:09 and have a video api, sound api, image... 2022-05-31 19:42:20 the canvas and even opengl xD 2022-05-31 19:44:00 in my case the only reason I went to programming is because I want to make a game 2022-05-31 19:44:16 and the language I making will be the language used to create that game 2022-05-31 19:45:28 I like the language to run from a terminal, but at the end of the day the real concern is how many users can I afford 2022-05-31 19:45:44 can I get* 2022-05-31 19:46:11 and nothing beats js in this case, even if it's a language I have 0 interest in 2022-05-31 19:46:50 I mean there is no sense in making a game if it only works in my machine 2022-05-31 19:50:47 I'll go off. Thanks again for all your hints and time :D 2022-05-31 19:51:40 I'll remember you when I'll be rich selling cheap and dirty not-so-forths to unwary people 2022-05-31 20:17:23 Heh. 2022-05-31 21:58:24 Anybody got experience with expanding a Linux filesystem? I believe it's ext4. 2022-05-31 21:58:37 When I bought this computer, I ordered it with a 512 GB SSD. 2022-05-31 21:58:42 It came with a 512 GB SSD. 2022-05-31 21:59:04 That had a 256 GB partition on it housing the system, with the other 256 GB unallocated. 2022-05-31 21:59:36 I'm only using about 60 GB of it. But I would like to get it right. 2022-05-31 22:00:12 I see mixed opinions online as to whether this is something that can be done "live" or requires booting from a DVD. 2022-05-31 22:00:41 I think all there is to it is use gparted or something to bump the partition size up and then do something else to grow the file system. 2022-05-31 22:01:10 And if you think about it, there's no reason it *shouldn't* be able to do that "in place live," if someone had cared enough to make it possible. 2022-05-31 23:00:11 I have a support program for it through Lenovo, so I figured I'd see if I could get them to walk me through it first. But it wasn't too encouraging when I opened an issue, clearly stating that I bought the computer vendor-loaded with Fedora, only to have them reply and ask me if I was using BitLocker. :-| 2022-05-31 23:00:22 BitLockers is a Windows thing, isn't it? 2022-05-31 23:01:11 I'm sure I'll wind up having to do it myself. I ordered a fresh external drive this evening to make a backup to, just in case I foul something up.