2023-02-08 05:05:02 Thanks for looking at it KipIngram, I'm encouraged at least by the fact you think it's easy to read 2023-02-08 05:05:21 You might be surprised by how easy it is for others to read your code, at least after they're familiar with your dialect 2023-02-08 05:05:43 And I might use 'REPL' somewhere, that's a good name 2023-02-08 05:18:17 I'm sure there's some bugs in there, will get ironed out eventually 2023-02-08 06:42:11 Lovely walk to get a pork pie on my day off, having a small piece for lunch 2023-02-08 06:42:39 People will tell you Britain is about all sorts of principles but really it's about pork pies 2023-02-08 06:43:57 thrig: I read most of that paper about early UNIX the other day 2023-02-08 06:44:16 And what struck me is that one of the big things that got UNIX going was the desire to play videogames 2023-02-08 06:44:50 I think I need to reevaluate my understanding of these old timers a bit, they're really just like us 2023-02-08 06:45:07 Except these were some very bright people being paid to play videogames on $60,000 computers 2023-02-08 06:45:44 Unfortunately I haven't found the exact same niche, but I do feel like corporate life generally is quite similar 2023-02-08 06:45:55 But instead of videogames we are playing with pointless tools and frameworks 2023-02-08 07:51:04 KipIngram: I've called my REPL word 'REP' because it's Read-Evaluate-Print (or Prompt?), without loop 2023-02-08 08:43:17 anyone experimented with a typed forth? 2023-02-08 08:45:12 I've typed lots of things into various forth 2023-02-08 08:51:45 I plan to, joe9, and have thought about it. 2023-02-08 08:52:09 At least plan to build a typed system on top of Forth. 2023-02-08 08:52:42 (haskell yelled at me about type errors for a while and then I uninstalled it) 2023-02-08 08:53:01 Master of your own csatle. 2023-02-08 09:03:27 in common lisp you can add the type stuff, if you want, but it mostly won't bog you down when prototyping 2023-02-08 09:05:18 KipIngram: have another stack called a type stack mirroring the data stack.. 2023-02-08 09:05:23 ? 2023-02-08 09:05:58 boxing things is more common (and can yield hilarious slow-downs) 2023-02-08 09:06:06 joe9: and what would be on that “type stack”? 2023-02-08 09:06:11 I considered that first, but no - my plan is to have a heap that the typed items live on, and the stack will contain pointers into that heap. 2023-02-08 09:06:40 Word searching will consider the "type signature" of the stack when matching words, and will only find words that "work" given the types currently on the stack. 2023-02-08 09:06:58 Which will make it possible to overload words. 2023-02-08 09:07:06 how complex can these ‘types’ be? 2023-02-08 09:07:23 I regard them mostly as lists, 2023-02-08 09:07:40 with each list item having a type as well. So, it could be lists of lists of lists, etc. 2023-02-08 09:07:57 A good type system is recursive, i.e. has aggregates 2023-02-08 09:08:17 Yes. 2023-02-08 09:08:19 So you can't just have a 'type' but you can have a 'type-id' or 'type-addr' on your stack 2023-02-08 09:08:28 Right. 2023-02-08 09:08:36 Something like that is what I'm picturing. 2023-02-08 09:08:50 It's really just a way to identify what code to use to manipulate the data. 2023-02-08 09:09:51 Ideally with a type system you would do this at compile-time, and just give up if you can't tell the type anymore 2023-02-08 09:10:11 so you would do ‘dispatch’ based on these ‘types’ then 2023-02-08 09:10:14 But if you can by the end of the word then you can do type checking with it where it's used 2023-02-08 09:11:22 A good type system would have dispatch IMO, don't know what KipIngram is planning 2023-02-08 09:11:37 The first thing that actually motivates me to have types is shorter member access 2023-02-08 09:11:38 Right again - I'm looking at pushing this stuff to compile time. 2023-02-08 09:11:41 veltas: “…and just give up if you can’t tell the type anymore” is the kind of shitty static type system crap I loath. Emit a runtime check at that point. 2023-02-08 09:11:48 That may bring certain limits, but it's what I want to try. 2023-02-08 09:11:55 Zarutian_iPad: You could do that too yeah 2023-02-08 09:11:58 I think it will let me do "enough" to satisfy me. 2023-02-08 09:12:39 Zarutian_iPad; Maybe. But only if I can't achieve my goals without doing it. 2023-02-08 09:12:59 So I can write ".MEMBER" instead of "TYPE.MEMBER". That's a motivation. 2023-02-08 09:14:01 the ‘multiple dispatch’ stuff to me too often violates ‘Dont ask, tell!’ principle of object based programming 2023-02-08 09:14:08 My "archtypal application' for this is an Octave-style numerical and scientific computing environment. 2023-02-08 09:14:21 Vectors, matrices, tensors, etc. 2023-02-08 09:14:33 Of course I have a workaround in mind for this, something essentially like "using" from C++ you can use to allow ".MEMBER" as synonym for "TYPE.MEMBER" temporarily 2023-02-08 09:14:36 finite fields 2023-02-08 09:14:47 .... to avoid writing a type system 2023-02-08 09:15:09 Because most words using a structure only use one structure 2023-02-08 09:16:02 Zarutian_iPad: I do see what you're wantin too - you want it to REALLY work, in all situations. 2023-02-08 09:16:15 And compile time only does definitely have limitations. 2023-02-08 09:16:38 But insofar as possible I want to be able to believe that my performance cost comes only at compile time. 2023-02-08 09:17:01 Your suggestion isn't bad, though - one could allow for both, with a "strong preference" for compile time handling. 2023-02-08 09:18:32 it is basically doing the tree Futamura transforms of an interpreter into a compiler. Basically some partial evaluation ‘at compile time’ as far as that can go 2023-02-08 09:18:43 joe9: I no longer look at this as writing a "typed Forth." I still plan a simple as possible base design. It's just too good at what it does to give it up. 2023-02-08 09:19:00 I will regard the typed system as an "alternative interpreter" that I can load and unload at will. 2023-02-08 09:19:29 And one of the advantages of compile time only type handing is that I'd only need to load that environment to COMPILE my code, and once compiled it would "just run" on the normal Forth system. 2023-02-08 09:19:47 But Zarutian's strategy wouldn't necessarily rule lthat out. 2023-02-08 09:20:32 ”type erasure” rules the strategy out 2023-02-08 09:21:27 Well, maybe it does rule it out. Back when I was thinking about doing it joe9's way - with a second type stack, I felt that it might not. 2023-02-08 09:21:46 But if "the stack" is going to be so radically different in terms of what it holds, I probably can't have it both ways. 2023-02-08 09:22:28 The thing is, the applications I picture don't really involve types that won't be known until run-time. 2023-02-08 09:22:47 I do think a static type stack is the way to go, and also a separate dynamic type stack if dynamic dispatch/conversions/checking desired 2023-02-08 09:22:49 If I'm doing a calculation, I'm likely to KNOW what I'm doing a calculation ON. 2023-02-08 09:22:56 yeah, I think you would be working with datum types 2023-02-08 09:22:59 If it's a matrix, it will always be a matrix. 2023-02-08 09:24:25 Everything's a matri 2023-02-08 09:24:29 matrix 2023-02-08 09:24:33 that is say 4x4 matrix of floats32 2023-02-08 09:25:22 A matrix is a 2D array, so really I should say everything's an array 2023-02-08 09:25:31 Now we're cooking with APL 2023-02-08 09:25:57 I definitely want to consider APL type functionality for this. I was impressed with it. 2023-02-08 09:25:57 what's your vector, victor 2023-02-08 09:26:24 And yes, "everything is an array," but I'll go further and say that if I'm working with a 4x4 matrix, then that's probably consistent too. 2023-02-08 09:26:41 I could imagine it not being, but... I'll think more about it later. 2023-02-08 09:26:49 Everything's a struct too 2023-02-08 09:27:18 Sure, but you'd like not to lose the efficiency of manipulating 64-bit ints by having to remind yourself constantly that in fact you have a 64-it int. 2023-02-08 09:27:41 Sounds like premature optimisation 2023-02-08 09:27:58 But this is what static typing is for 2023-02-08 09:28:00 People love to throw that phrase around. 2023-02-08 09:28:18 People love to throw that phrase around, but then Python exists 2023-02-08 09:29:30 There definitely is such a thing as premature optimization, but I don't think cogitating on your application before you start writing it and identifying the most important parts of it and planning how to do them well qualifies for the label. 2023-02-08 09:30:20 For example, thinking about how to get this inner interpreter / docol part of things as clean as possible - not premature optimization. 2023-02-08 09:30:25 In my opinion. 2023-02-08 09:30:26 the other week a guy I know asked me about an int only lerp function 2023-02-08 09:30:34 in our first agile meeting we can talk about waterfalls 2023-02-08 09:30:47 :-) 2023-02-08 09:31:06 I also think trying to implement the agile process before doing good architectural planning is a mistake. 2023-02-08 09:31:30 Trying to do agile from day one, and do it purely, leads to you starting to do work before you understand what you're going to be doing. 2023-02-08 09:31:52 why? because his map rendering was taking quite a while and the performance debugger indicated a lot of time spent multiplying in lerp 2023-02-08 09:31:53 On the other hand, you don't need your entire team involved in architectural planning. 2023-02-08 09:32:06 You need your 2-3 or so best architects. 2023-02-08 09:32:23 And if they have questions for other people they can go find them one on one and talk with them. 2023-02-08 09:33:28 I guess a way of saying is that I don't really believe in "sprint zero." 2023-02-08 09:35:12 so I showed him how you could do lerp without using floats iff you restricted your t parameter between 0 ans 255 (inclusive) 2023-02-08 09:35:28 some things probably need a lot of planning (D-Day comes to mind). other things maybe not so much 2023-02-08 09:35:32 But agile "purists" definitely try to avoid that careful planning stage. 2023-02-08 09:35:36 They want to just "start." 2023-02-08 09:35:55 And somehow expect a good architecture to just appear automatically, because they're using such a good process. 2023-02-08 09:37:17 KipIngram: really? 2023-02-08 09:37:26 Yeah, we've got such a guy at the office now. 2023-02-08 09:37:42 He's totally an agile "faithful.' 2023-02-08 09:37:59 Pure manager, though, not a technical guy. 2023-02-08 09:38:08 So I don't think he can really appreciate what he's glossing over. 2023-02-08 09:39:35 so, no preliminary requirements gathering stage? no rough architecture plan stage? 2023-02-08 09:40:29 No no - he does those. But architecture is different from requirements. 2023-02-08 09:40:43 That's exactly what he doesn't appreciate. 2023-02-08 09:40:51 he's a nice guy, by the way; I like him. 2023-02-08 09:41:04 Super full of energy pretty much all the time. 2023-02-08 09:41:19 Kind of a "dynamo" type guy. 2023-02-08 09:43:37 Don't get me wrong - for some projects you might not need a big pile of "architecture thinking." Maybe you're adding features to an existing system or something, so those decisions are all already long made. 2023-02-08 09:44:12 sure, I like to use the house analogy 2023-02-08 09:44:22 I think agile works really well on those type things. 2023-02-08 09:45:11 it depends on if you are building a house from scratch or just adding a backdoor to the kitchen to get out into the graden 2023-02-08 09:45:20 Yes, exactly. 2023-02-08 09:46:07 But the person who decides which type of project you're looking at (needs arch planning or doesn't need it) should be a technically trained person. 2023-02-08 09:46:17 That's a related problem - the whole notion of "pure managers." 2023-02-08 09:46:34 I think in many cases your technical team needs to be led by technical people. 2023-02-08 09:46:42 but some peeps think that you can force software systems to do quite unrelated things and think it as easy as the door example 2023-02-08 09:46:54 That's the same issue that causes cost-cutting to take priority over product quality and integrity. 2023-02-08 09:47:18 Right - precisely what we're talking about. 2023-02-08 09:47:31 They just don't "grasp" the importance of planning insome cases. 2023-02-08 09:47:54 That's why it's hard to "blame" them - they're just not equipped knowledge wise to really get that. 2023-02-08 09:48:16 ”but it is so expensive!!!” -“yeah turning a garage into mini facture usually is” 2023-02-08 09:48:34 Yeah. Cost cutting isn't something that can proceed indefinitely. 2023-02-08 09:48:39 And it's not free. 2023-02-08 09:49:54 and sometimes I think “cost cutting” comes about do to the inflation of the monetary unit used to measure the cost 2023-02-08 09:51:59 or that shareholder value, which must go up 2023-02-08 09:52:06 one logistican I know of started years and years ago to use IAD as his cost unit 2023-02-08 09:53:02 Inflation Adjusted Dollar, and he just assumed the dollar had inflated 10% per annum since it went of the gold standard 2023-02-08 09:53:47 so far he has been roughly right 2023-02-08 09:56:59 some ‘economicists’ say that stock market has out performed savings accounts and such. But if you look at it in IADs stocks have, on the whole, pretty much hovered around break even. 2023-02-08 09:57:37 Yeah. 2023-02-08 09:58:37 When I was learning about such stuff there was a mentality that if you were just disciplined and invested regularly in blue chips, you'd "automatically do well." 2023-02-08 09:58:47 But I don't think that was true, and it's surely not true now. 2023-02-08 09:59:09 If such an "easy path" exists, people will find it and pile onto it until it's no better than anything else anymore. 2023-02-08 09:59:24 It's like the mythical "fast route" driving to work that no one knows about. 2023-02-08 09:59:30 that “easy path” never existed 2023-02-08 09:59:34 People will find it, use it, and slow it down. 2023-02-08 09:59:40 That's my suspicion too. 2023-02-08 09:59:57 Until you wind up with most of the routes taking roughly the same length of time. 2023-02-08 10:00:03 That's economics in action right there. 2023-02-08 10:01:01 the “fast route” to work did exist before Google Waze 2023-02-08 10:01:34 It surely would have been more likely to. 2023-02-08 10:01:42 Such things can exist for periods of time. 2023-02-08 10:01:54 And those periods have gotten shorter as we've leraned to pass information around faster. 2023-02-08 10:03:24 one thing I recall that current idiotcy in city planning here took over was, fast traffic heavy streets with quite a few less trafficed but slow streets in between 2023-02-08 10:03:54 One link does not a chain make. 2023-02-08 10:04:11 but due to “traffic calming” now most of the streets are middle speed and quite dangerous 2023-02-08 10:06:02 KipIngram: What's interesting about UNIX is that it was done in a sort of iterative fasion, but it also came after literally years and probably millions of investment designing multics 2023-02-08 10:06:25 Yeah - those guys had had a lot of time to think about better ways of doing things. 2023-02-08 10:06:37 They did that architectural planning, but just not "overtly." 2023-02-08 10:06:53 I think iterative development is great, but not iterative design. You do actually want to invest in design a bit. 2023-02-08 10:07:19 So you know *how* to do just one bit leaving room for the other stuff 2023-02-08 10:07:26 Without designing yourself into a corner 2023-02-08 10:07:35 I recall a saying my driving instructor said many years back “reckless driving can happen at any speed” in response to discussions on lowering speed limits on roads (not streets!) 2023-02-08 10:08:12 Where I drive to work a road has gotten more dangerous because the speed limit has been lowered and the lanes increased 2023-02-08 10:09:18 So no safe stopping place, and just constant unyielding traffic at rush hour, as opposed to more sparse and faster moving traffic with a hard shoulder (emergency lane on side of traffic) 2023-02-08 10:09:38 I've seen noticably more accidents since this change, and it feels less safe 2023-02-08 10:09:54 We've got some places like that. 2023-02-08 10:10:20 Generally people drive better when you just let them drive and stop giving them constant fine grained input like "drive 10mph slower for a bit" 2023-02-08 10:11:35 naw, weaving wildly on a bicycle makes the car sitters slow down (well, the ones not out to kill you) 2023-02-08 10:11:45 I recall that in Germany there was a stretch of road that turned out to be too spice for the usual speed folks drove there. What did they do? increased th number of lampposts and decreased the distance between them 2023-02-08 10:12:16 thrig: The road I'm thinking of bicycles are banned 2023-02-08 10:13:50 A lot of cyclist advice I read online seems like a weird suicide pact cult trying to wind drivers up until they run them over 2023-02-08 10:14:27 Personally I will drive safely around bikes even if they're trying to get in my way etc, I don't get wound up easily 2023-02-08 10:15:03 car sitters are well known for road rage. heck, I met a guy from Florida who was happy that the car sitters were not trying to kill him in Seattle 2023-02-08 10:15:11 I can't get wound up, I have to drive the circumference of the earth every year on all manner of roads, I simply can't afford to be emotional about how I transit 2023-02-08 10:15:16 here an cyclist on a car road can get fined and the bike seized if there is no alternitive 2023-02-08 10:16:21 I'm of mixed feelings about that. We should have more emphasis on cycling as transport. But at least I understand the motivations of the people who push for such rules. 2023-02-08 10:16:37 and nobody in Pakistan tried to kill me, while several Americans in their cars have tried. might be a cultural thing 2023-02-08 10:16:39 but then again bike paths are often along side the road but not part of it 2023-02-08 10:16:57 And the cyclist (I've done a lot of cycling over the years, so I'm sympathetic) will say "it's my life - I choose what risks to take." 2023-02-08 10:17:05 thrig: How did they try? 2023-02-08 10:17:08 Fair enough, but that person who runs over you also has to live with that forever. 2023-02-08 10:17:48 change lanes into where I was on a two lane street with nobody else visible 2023-02-08 10:17:57 KipIngram: two words “Public endangering” 2023-02-08 10:18:21 thrig: That's not really "trying to kill you" or I've had hundreds of people try to kill me when I was a kid 2023-02-08 10:18:42 Wow people did not take cyclists seriously when I was younger at all, but it was all a lot less emotional 2023-02-08 10:19:21 Internet again. 2023-02-08 10:19:25 it is the ‘hippies on their fixies’ that got annoying 2023-02-08 10:19:37 People now have tools with which to get more people involved in the debate back and forth. 2023-02-08 10:20:16 Headed to the office efor a while; back later. 2023-02-08 10:26:29 I do go out of my way to be safe around cyclists, as everyone should 2023-02-08 10:28:35 But I remember when I was young drivers literally ignored cyclists, or would move a couple inches for them 2023-02-08 10:29:00 And I didn't feel aggressed against or anything 2023-02-08 10:29:37 I blame driving laws saying stuff like "you must be 10 car lengths away" 2023-02-08 10:31:28 There is a sensible middle ground I'm sure 2023-02-08 10:32:31 If you make something illegal it seems more aggressive. Like tail gating only recently became illegal in UK 2023-02-08 10:33:21 But now I feel more anxiety when people do it. Before I didn't care 2023-02-08 10:33:33 So maybe it's like that 2023-02-08 10:34:07 The laws need to treat different types of vehicles less like adversaries 2023-02-08 10:34:50 And also city laws should be different to suburban/country laws 2023-02-08 10:36:00 There are rules which make sense in the city like pedestrian priority at a junction that are outright dangerous in suburbia/countrt 2023-02-08 10:38:03 And yet I give way to pedestrians at junctions to their utter bemusement 2023-02-08 10:38:27 Nobody knows the highway code, least of all pedestrians 2023-02-08 11:55:56 KipIngram: once we add types to forth, the source would look more like lisp rather than word based forth structure. 2023-02-08 11:56:12 For each word, we would have to define the parameter types. 2023-02-08 11:56:29 a parser for the ( - ) 2023-02-08 11:59:35 but, I do not want to go down the Zeta lisp method of packing the type in the high byte. 2023-02-08 12:02:22 KipIngram: have you thought of a notation to add type signatures to words? 2023-02-08 12:08:49 > For each word, we would have to define the parameter types 2023-02-08 12:09:03 Can't you also sometimes infer types from how they're used? 2023-02-08 12:09:36 Can't help thinking main advantage is to dynamic typing where you don't need to second-guess anything 2023-02-08 12:09:38 or, for atleast those words that do fetch or store. 2023-02-08 12:13:23 (THE REAL NUMBER) -> NUMBER REAL THE 2023-02-08 12:15:23 Thinking about it, dynamic types are the way to go. Get advantage of multiple dispatch, no extra type syntax is required except for creating objects, get type checking (only at runtime but Forth development pattern will catch errors up-front anyway) 2023-02-08 12:16:13 Way simpler to implement 2023-02-08 12:16:27 And if performance matters just do it with types turned off on a classic forth or in classic mode 2023-02-08 12:16:48 I am totally convinced by this approach 2023-02-08 12:17:39 veltas, would you mind sharing more details on how you would envisage it working with forth syntax? 2023-02-08 12:18:20 I don't mind I'll quickly write some stuff 2023-02-08 12:18:31 thanks. 2023-02-08 14:03:28 joe9: No, but I haven't thought an awful lot about it either. The most obvious way to do it is using Forth-like stack comments. 2023-02-08 14:03:47 : * ( matrix matrix -- matrix ) ... ; 2023-02-08 14:04:05 Or matrix_float or whatever. 2023-02-08 14:04:47 So you could have the same word name with several different type configs; it would find the right one. 2023-02-08 14:04:58 And if there wasn't one would give a word not found error. 2023-02-08 14:05:16 Everything I've thought of just seems so verbose. 2023-02-08 14:14:36 I am thinking of having a type stack mirroring the data stack. Any fetch or store function can check that the data element on the stack is of the type that it claims to be. 2023-02-08 14:15:02 This check is not mandatory and is upto the word to use if need be. 2023-02-08 14:15:36 any dup or drop call that messes with the data stack will also change the type stack 2023-02-08 14:16:05 so, all stack manipulation functions change the type stack too. 2023-02-08 14:17:10 Yes, I did think about doing it that way once, and an advantage it offers is that the operations you actually DO to the data stack wind up the same whether you're running the type checking or not. 2023-02-08 14:17:32 That's why I'd thought that it might be a compile only thing, and once compiled the words would run properly with no further todo. 2023-02-08 14:18:05 That would be the same even with a pointer stack, but it would be a dramatically different stack just the same. 2023-02-08 14:18:57 I just later decided that using the one stack and having it hold pointers to the resources themselves would work too, and eliminates the risk of getting the stacks out of synch. 2023-02-08 14:20:49 I did think a little about trying to allow integers to remain actually on the stack, rather than having to have them live in the heat too and also have pointers. 2023-02-08 14:21:17 The idea there was that some high bits in the stack cell would indicate the type of the entity pointed to by the lower bits. 2023-02-08 14:21:43 and both 0 and -1 types would be "integer." 2023-02-08 14:22:03 You'd loose access to the extreme ends of the valid integer range, but when do you use those anyway? 2023-02-08 14:22:48 I haven't thought about that enough, though - it might have problems. 2023-02-08 14:23:02 It'd be hard to deal with 64-bit wide bit masks then. 2023-02-08 14:23:33 But I think it would work fine, if I was prepared to take all the quirks that came with it. 2023-02-08 14:24:15 My very latest thinking on it, though, would be that the stack cells would just be pointers into the heap, and both the type and the value of a thing would be described in the heap. 2023-02-08 14:35:29 I like your idea of the pointer stack. 2023-02-08 14:38:57 It just seems like the simplest way to me, and it's kind of "Forth leaning." 2023-02-08 14:39:31 On the other hand, Forth the way it comes out of the box is better for "low level / bring-up" coding, so I don't want to give it up in whole. 2023-02-08 14:39:45 That's why I'll arrange this other thing to be an application program that I run when I want to use it. 2023-02-08 14:39:59 It'll just supply a new interpreter / compiler that does the more sophisticated stuff. 2023-02-08 14:40:08 But then I'd be able to QUIT back to the standard system. 2023-02-08 14:41:22 You know, this chat made me realize just now that I need to make my error recovery system a bit more general - I need to be able to supply a new error handler, so that errors in the typed system send me back to the typed system and no to the base system interpreter. 2023-02-08 14:41:47 Though I can re-vector any of my definitions, any time, so it won't be hard to make that work. 2023-02-08 16:05:59 joe9: Sorry looks like I didn't have time, ended up going doctors instead 2023-02-08 16:06:33 veltas: no hurries. I can wait. 2023-02-08 16:24:09 joe9: Maybe something like this https://pastebin.com/raw/wMeK8QPJ 2023-02-08 16:55:03 veltas, I want the type system to catch to be able to catch errors such as using a number as an address to fetch from 2023-02-08 16:55:06 ,etc. 2023-02-08 16:58:38 But what if you want to do that? 2023-02-08 16:58:47 I mean, some numbers can certainly be addresses. 2023-02-08 16:59:04 I catch the memory fault signal and handle it in my error system. 2023-02-08 17:00:34 And you're saying that executing a variable name will but something of a different type on the stack? 2023-02-08 17:01:08 I'd regard both the result of executing a variable and a typed number of the standard form as "integer." Those would be the same type. 2023-02-08 17:01:28 Though I suppose you could just arbitrarily declare that they aren't. 2023-02-08 17:04:25 Just for example, if I typed 65535 @ on a 6502 Forth, I'd expect to get the interrupt service routine address. 2023-02-08 17:04:58 I'm sorry; 65534. 2023-02-08 17:16:38 joe9: Yeah that is what I would expect as well 2023-02-08 17:17:04 KipIngram: "But what if you want to do that" have a word that does that conversion explicitly then 2023-02-08 17:17:34 Still better than C where in the official standard for the major embedded programming language there is no such thing as an address 2023-02-08 17:18:24 There's no such thing as an address, and you can't use a struct to structure data, only structure data using a struct 2023-02-08 17:18:37 KipIngram: I want to play around with user processes (forth) without a kernel boundary. 2023-02-08 17:18:47 Something like the lispm machines but with forth. 2023-02-08 17:19:05 Good thing nobody uses C, everyone assumes C with GCC assumptions, so GCC is the real embedded C standard and has been for a while 2023-02-08 17:19:14 A forth process can read any address that it wants. 2023-02-08 17:19:21 no kernel protection. 2023-02-08 17:19:29 It's been the real C language for Linux and most other kernels too 2023-02-08 17:20:18 I want to add a little sanity by distinguishing between numbers and addresses. 2023-02-08 17:25:22 joe9: so no page tables nor DynamicAddressTranslation based protection? 2023-02-08 17:26:00 not even segmentation protection? 2023-02-08 17:28:44 :-) Ok. Looks like we define sanity in different ways, but I see your goal. 2023-02-08 17:29:31 Zarutian_iPad: All that stuff is great, but unfortunately not accessible until you take over the whole system, since the existing OS is using those resources. 2023-02-08 17:30:36 What I will say is that distinguishing between numbers and addresses doesn't add the sanity you think it will 2023-02-08 17:31:07 It's just step one of making a language safe, and it's a real rabbit hole which I don't think I've been convinced will ever be mainstream 2023-02-08 17:31:15 i.e. Rust isn't safe, for one thing 2023-02-08 17:31:46 maybe if formal verification gets better? 2023-02-08 17:32:08 I'm not sure I'm looking for provable safety but that's probably sufficient 2023-02-08 17:32:26 Mind you, you can still get that wrong... 2023-02-08 17:33:30 Good tests, safeguards, asserts etc will get you 99% of the way in most languages, even C. Well depends on definition of 'good' 2023-02-08 17:35:47 MC/DC is 'good' sometimes, 100% line coverage is 'good' sometimes. Depends on code and application 2023-02-08 17:38:44 When I'm developing modules and I want to make sure things are as I expect, I write an 'audit' function and spam it everywhere. 2023-02-08 17:39:02 This is a function that just enumerates everything and checks everything is consistent, verifies all my assumptions 2023-02-08 17:39:24 And you can do this on entry/exit from all significant functions, or wherever it makes sense 2023-02-08 17:39:51 This will run terribly but it's a great help to leave an option to enable for debugging 2023-02-08 17:40:51 Better than spamming printf everywhere and rationalising it manually 2023-02-08 17:58:38 I think it sounds sensible. 2023-02-08 17:59:10 I mean, there's always the assumption you didn't realize you made, but... not sure what to do about that. 2023-02-08 17:59:30 And the more experience you have the less likely that is. 2023-02-08 18:00:02 and yet chess grandmasters will walk into mate-in-1s (rarely) 2023-02-08 18:02:05 Yes - I won't try to quantify any probabilities here. 2023-02-08 18:02:18 I've mentioned I answer a lot of math and physics oriented Quora questions. 2023-02-08 18:02:38 Well, a few months ago a new person showed up on Quora; username "IV Nic." 2023-02-08 18:03:10 And practically every question this guy asks one way or another has to do with things that have a non-zero, but ridiculously small probability of happening. 2023-02-08 18:03:45 The most recent one was along the lines of "If quantum tunneling can make any atom unstable," then why don't we assign half-lives to "stable" elements like nitrogen. 2023-02-08 18:04:04 a blackswan afinicado? 2023-02-08 18:04:17 And of course the answer is because that half life would be so large that no one gives a rat's ass about calculating it. 2023-02-08 18:04:29 It may as WELL "never" happen. 2023-02-08 18:04:39 I don't know black swan; but... maybe? 2023-02-08 18:04:57 But this guy will nitpick at such things constantly. 2023-02-08 18:05:11 blackswan is sometimes used as an synonym for very unlikely events 2023-02-08 18:05:36 (Nassim Taleb's Black Swan Theory) 2023-02-08 18:05:41 Ah. 2023-02-08 18:06:10 Ok, I guess I vaguely knew that. I thouht maybe there was a TV show of that name or something, or a game, that I never heard of. 2023-02-08 18:07:39 a swan is unlikely to get a black belt, for example 2023-02-08 18:08:18 one question I have yet to device, even in a thought expriment, is how do we know that progression of time is fluid or not fluid on very short time scales? 2023-02-08 18:08:50 that is, could possible futures at near planck scale actually affect the past? 2023-02-08 18:10:18 and how can we tell it apart from the ‘noisyness’ of quatum mechanics in general 2023-02-08 18:11:03 quantum* 2023-02-08 18:11:36 Oh, yeah - we don't. 2023-02-08 18:12:09 They talk about the Planck time, and the Planck scale in general, and a lot of people misunderstand that and think those things represent "quanta" of space and time. 2023-02-08 18:12:32 so thiotimoline might be a possibility after all 2023-02-08 18:12:35 But we don't have any evidence either way there, beyond the fact that "we've never detected granularity down to the scales we're able to study." 2023-02-08 18:12:58 What the Planck length actually is is the smallest scale that we can, even in theory, observe stuff at. 2023-02-08 18:13:27 it is the ‘diffraction limit’ so to speak 2023-02-08 18:13:36 To get finer resolution than that, you'd have to use a wavelength of light so small (that means high energy photons) that you'd be putting enough energy into that tiny Planck scale volume that it would create a micro black hole. 2023-02-08 18:13:47 "ooops" 2023-02-08 18:13:48 And then the event horizon of the black hole would keep you from etting to see anything. 2023-02-08 18:13:59 tiny tiny kugleblitzes 2023-02-08 18:14:04 So it's an unobservable scale, and nothing can be done about that. 2023-02-08 18:14:31 So even IF something interesting is going on down there, we can't treat it scientifically. 2023-02-08 18:14:40 No way to validate any theories about that scale. 2023-02-08 18:15:00 which means that those blackholes would hawking radiate away quite quickly 2023-02-08 18:15:07 Yes. 2023-02-08 18:15:16 Really really quickly. 2023-02-08 18:16:23 another mind virus to torture astrophysicsist and such with: what if dark matter are just tiny tiny topological defects in spacetime? 2023-02-08 18:17:03 They don't even know for sure that dark matter is a thing. It could also be that gravity just works differently at those scales. 2023-02-08 18:17:17 I kind of figure it probably is a thing, though. 2023-02-08 18:17:41 Nothing says that every kind of particle out there has to interact with the EM field (so we can, like, see it). 2023-02-08 18:18:18 neutrinos are example of such iirc 2023-02-08 18:18:30 We've explored the "energy landscape" up to whereever we've gotten to, and we don't really know what goes on at higher energies. 2023-02-08 18:19:41 LHC does collisions at 13 TeV. 2023-02-08 18:19:48 hence a long term plan to build an particle accelerator around the equator or other such geodesic of the moon might be how it will be cracked 2023-02-08 18:20:25 They found their Higgs boson, of course, but they were also hoping to find particles related to "supersymmetry," and find them in a particularly theoretically favored energy range. 2023-02-08 18:20:28 They weren't there. 2023-02-08 18:20:55 They still might be there at higher energy, and supersymmetry could still work, but not as "ideally" as if they were at the hoped for energy range. 2023-02-08 18:21:19 And I can say those words, but know very little about exactly what that means. 2023-02-08 18:21:46 Oh, almost finished Lord of the Rings yesterday. 2023-02-08 18:22:07 The main struggle is over - there's just the little mop up they have to do when they get back home remaining. 2023-02-08 18:22:34 I am still wondering why some folks insists on there being a ‘gravaton’ or such 2023-02-08 18:23:08 Well, if you bring gravity into the quantum field theory fold, then there will be one. It's how things work in quantum field theory. 2023-02-08 18:23:15 But no one's figured out how to do it yet. 2023-02-08 18:23:42 I think I read somewhere that the issue is that the graviton would be spin 2 - somehow they causes problems with the numerical procedure. 2023-02-08 18:23:57 here is the question though, where would that field _be_? 2023-02-08 18:23:58 Right from the start quantum field theory threw up a bunch of infinities. 2023-02-08 18:24:10 It took 'em 20 years to figure out how to deal with those (that was Feynman). 2023-02-08 18:24:28 But those methods don't work on the infinities that come with trying to rope in gravity. 2023-02-08 18:25:15 Well, "where" are any of the quantum fields? They don't really tell you what a quantum field actually *is*. 2023-02-08 18:25:35 The mostly just posit their existence and posit rules for how they shuffle energy around between them. 2023-02-08 18:25:41 lets say that space time is bent. Like  there might be bias in an graph of vertices and edges 2023-02-08 18:26:09 Ok, but you'll probably get beyond me here pretty fast. 2023-02-08 18:27:16 not so, think of a maze game that links tile nodes together with North, South, East, West links 2023-02-08 18:27:31 Ok. 2023-02-08 18:28:37 one part of a maze we could construct with this is sort of a “tube” 2023-02-08 18:29:03 I knew it, the universe is made of tubes 2023-02-08 18:29:25 you can travel along it by travesing say the North and South links 2023-02-08 18:30:56 lets say that “tube” is five tiles wide but the ‘edge’ tiles are linked East West so you could keep traveling East and always going through the same five tiles 2023-02-08 18:32:31 at that particular “cross section” of the “tube” 2023-02-08 18:33:17 got that? 2023-02-08 18:33:25 Ok. 2023-02-08 18:34:08 The east and west edges are identified. 2023-02-08 18:34:17 With one another, I mean. 2023-02-08 18:34:42 The universe may be like that, btw. 2023-02-08 18:34:58 Might be possible to "go around" it, just like you can on Earth's surface. 2023-02-08 18:35:15 sure, the universe might be torodial and closed or other such 2023-02-08 18:35:52 And they you don't have to imagine that being in a higher dimensional embedding space, but it's awfully hard not to. 2023-02-08 18:36:39 now, we can introduce ‘bends’ in this “tube” by rearranging the links of parts of it 2023-02-08 18:37:41 we could also introduce branches or junctions and make actual wall less maze out of it 2023-02-08 18:40:12 now lets say that maze is rather Braided with (nearly) no dead ends 2023-02-08 18:41:26 now in some places the North South link of one tile actually is linked with the East West of another tile 2023-02-08 18:42:28 going in a ‘straight line’ in one direction might actually mean that you make a turn somewhere without knowing 2023-02-08 18:43:30 and this maze might be Biased in some places to favour going in one direction over others 2023-02-08 18:44:54 might be in such a way that you literally ‘gravitate’ towards particular places in that maze 2023-02-08 18:46:23 now, add Nadir and Zenith directions into the mix to get ‘three dimesions’ 2023-02-08 18:46:41 dimensions* 2023-02-08 18:47:19 still possible to conceptualize? 2023-02-08 18:48:13 Well, I'm just considering it as a math structure, so yeah, ok. 2023-02-08 18:48:27 now add quite a few more directions to eliminate isotropy faviouring 2023-02-08 18:49:11 that is, there is no ‘axisis’ of directions that are more faviourable than others 2023-02-08 18:49:23 So, I'm going in some direction at velocity v. And I hit one of these bends, so I come out going in a different direction. 2023-02-08 18:49:35 Now let's say I retrace that same path, but going at a different v. 2023-02-08 18:49:48 I better follow a different path, if you want this to model the world we see around us. 2023-02-08 18:50:10 How does that work in? 2023-02-08 18:50:46 now shrink this maze down so each tile is planck scale or even smaller 2023-02-08 18:50:55 Sure, ok. 2023-02-08 18:51:12 Does this relate in any way to Wolfram's stuff? 2023-02-08 18:51:28 no, I do not think so 2023-02-08 18:51:54 15:25 < Zarutian_iPad> joe9: so no page tables nor DynamicAddressTranslation based protection? -- yes 2023-02-08 18:51:56 Ok. He's got an elaborate theory that has structures at that scale in it. 2023-02-08 18:52:19 this is sort of a ‘lie to use to try to explain’ this maze explanation 2023-02-08 18:52:30 And he claims that he can get the general relativity field equations to pop out of it. 2023-02-08 18:53:36 and the thing I am trying to explain is how space time has bends and aforesaid Bias in it and how that is observed as gravity 2023-02-08 18:54:15 without having an gravaton 2023-02-08 18:54:42 Sure, I buy that. General relativity works great. 2023-02-08 18:54:59 But you can't integrate gravity with the Standard Model without a graviton. 2023-02-08 18:55:15 It's a "feature of the method" so to speak. 2023-02-08 18:55:26 now, I think you might heard of glueons, no? 2023-02-08 18:55:32 But... it may be that gravity just DOESN'T work like the other forces. 2023-02-08 18:55:40 Yeah, I know gluons. 2023-02-08 18:55:50 Force mediating particles for the strong nuclear force. 2023-02-08 18:56:10 I suspect that Standard Model and General Relativity are part of a more general theory 2023-02-08 18:56:42 Could be - could be trying to quantize the gravity part is just the wrong move. 2023-02-08 18:57:03 well think of them as ‘springs’ whose ends are stuck to quarks 2023-02-08 18:57:21 glueons that is 2023-02-08 18:57:50 :-) I don't think I need to push a mechaical analogy quite that far, but sure - they're responsible for that force. 2023-02-08 18:57:57 like idealized springs they resists the more you pull on them and pull back 2023-02-08 18:58:43 And if you try to just pull harder to get two quarks apart, you are putting energy in as you do so, and before they separate that energy will o to creating a new quark/anti-quark pair and you wind up with two pairs of quarks, bonded, instead of just one. 2023-02-08 18:59:28 now think of a proton as these ball of glueon springs and quarks, embedded in the afore described maze 2023-02-08 19:00:09 Ok. 2023-02-08 19:00:13 vibrating and boijoing like crazy about the place 2023-02-08 19:00:18 Yep. 2023-02-08 19:00:57 think about how the maze Bias might affect this thing 2023-02-08 19:00:57 You said this maze was Planck scale, right? 2023-02-08 19:01:05 yebb 2023-02-08 19:01:13 maybe even smaller 2023-02-08 19:01:18 But the proton can still fit through? 2023-02-08 19:01:25 Or the p ieces of it? 2023-02-08 19:01:33 pieces 2023-02-08 19:01:53 Quarks don't really have any known "size." But protons do. 2023-02-08 19:02:06 like a chinese wyrm crossing many tiles in a maze 2023-02-08 19:04:31 this vibrating yoyoing mess of a proton would ‘fall’ along the more faviourbly Bias, no? precisely because it is vibrating and yoyoing around 2023-02-08 19:10:18 This is all interesting, but I don't see that it's giving anything that general relativity doesn't already give. 2023-02-08 19:10:47 As far as I know, GR has never made an incorrect prediction. It passes test after test. 2023-02-08 19:11:11 Their beef with it is that it's "not quantum," so they can't mate it up with the Standard Model. 2023-02-08 19:11:33 You can use them together, in a kind of "semi-quantum gravity," and that works really well. 2023-02-08 19:11:49 It's just "dissatisfying" to them from a unity perspective. 2023-02-08 19:11:52 think of this maze business as ‘a lie to tekl children’ on how General Relativity might work on the planck scale 2023-02-08 19:12:29 And it runs into trouble in a couple of corner cases, most notably before about 10^-42 seconds after the Big Bang and right up AT the singularity of black holes. 2023-02-08 19:13:14 yeah, I suspect that the universe give an rats arse about ‘unity perspective’ of the Standard Model 2023-02-08 19:13:44 :-) Yeah, it may be overrated. 2023-02-08 19:14:15 And it's not like success on that front is apt to yield any amazing new technologies. 2023-02-08 19:14:40 I have a feeling we've figured out all the stuff that would give us that kind of payoff already. 2023-02-08 19:14:48 Just BECAUSE those corner cases are so remote. 2023-02-08 19:15:30 Any environment we can even come close to creating inside some device is already covered by the theories we've got. 2023-02-08 19:16:16 I figure our remaining big "payoff technology" is likely related to using genetics in clever ways. 2023-02-08 19:16:37 And maybe we'll be lucky enough not to do ourselves in with it. 2023-02-08 19:17:24 If we can make some more progress on quantum computing we may be able to develop some nice new materials, drugs, that sort of thing. 2023-02-08 19:18:19 At the fundamental physics level, though, I have a feeling electromagnetism is going to always be the one that gave us the most benefit. 2023-02-08 19:54:11 So with relatively little code, it looks like I can get this basic Forth vm operational, and in a way that supports multiple threads. I wonder if maybe then it would make sense to have a thread or two that supplies the interface to SDL, bringing that information into a "Forth friendly" for for my main threads to make use of. 2023-02-08 19:54:24 Not sure about that at all - just seems like a possible way to organize things. 2023-02-08 20:07:49 I figure if I do it that way, then a "main" application thread can just sleep waiting for some event. Meanwhile the SDL handling thread will still be running, and it will eventually receive the right kind of event and will wake the main thread back up then. 2023-02-08 20:19:19 KipIngram: if you can use Plan9, the devdraw is a much better interface than X11 stuff. 2023-02-08 20:21:00 Well, my plan is to call directly into the SDL2 library (probably with it front-ending for OpenGL) from my Forth code. Not thinking about any OS level stuff beyond that. 2023-02-08 20:21:27 My understanding is that SDL2's primary purpose is to provide an OS anostic way of getting at the resources. 2023-02-08 20:21:45 So I'd use whatever interface SDL provides.