2023-12-29 10:16:08 An oldie but a goodie: 2023-12-29 10:16:11 https://pragprog.com/titles/catimers/essential-555-ic/ 2023-12-29 10:18:00 dave0: I agree; if something can *be* a very short tight primitive, I generally make it one. but zarutian_iPad is gunning for a different goal; he's interested in having the fewest primitives possible (or at least something pretty close to it while still having good performance0. 2023-12-29 10:18:11 I think such systems are super interesting and well worth studying. 2023-12-29 10:19:30 My standard example is 1+. Obviously you can say : 1+ 1 + ;. But it's a ONE MACHINE INSTRUCTION PRIMITIVE - just inc rTOS. So I'm just very unlikely to pass on making it a primitive. 2023-12-29 10:19:44 As a primitive it's smaller and faster. 2023-12-29 10:20:35 As a result I usually wind up with a "primitive heavy" system. 2023-12-29 10:20:57 two reasons why I am gunning for such: I want something that is easily implementable via 7400 series and such chips and something that isnt humongus in gate size for SecureMultiPartyComputation considerations 2023-12-29 10:22:31 plus it is good excercise to know how your big set of primitives can be subsetted so that your Forth VM image can check if they are correctly implemented 2023-12-29 10:23:18 Sure. I think it's a cool goal, and I've learned some from some of your words (particularly the ones that use the return stack). 2023-12-29 10:24:09 My very first programming was on that hp calculator, so I'm pretty strong using a data stack. But the calculator didn't expose the return stack, so I didn't get to "internalize" those tricks there in my early days. 2023-12-29 10:36:20 An example was when I was trying to write COMPILE one night. I had some complicated business going on with an immediate word and so on, and then you posted yours - my reaction was "Well, CRAP." Definitely felt a little lame - it's so EASY when you do it right. 2023-12-29 10:50:49 https://www.theguardian.com/science/2023/dec/29/us-military-x-37b-robot-spaceplane-spacex-falcon-heavy-rocket-secret-mission 2023-12-29 10:52:28 Anyway, re: the words it's just a matter of me forming a new habit. "What's on the return stack at this point, and can I use it?" 2023-12-29 10:53:56 My wife is watching Person of Interest right now, and I'm re-watching select episodes with her. I just re-watched the whole thing a few months ago. I'm having a lot of fun with the little colored boxes that go around people in the "Machine point of view" shots - there's a rather elaborate color and pattern code for those, depending on the nature of the person boxed. 2023-12-29 10:55:07 I already knew that a yellow box indicates the person is aware of the Machine's existence, but I hadn't caught on until a night or two ago that red coloring has meaning too. White box with red accenting means "generic adversary to mission." Solid red box means "threat to national security" or "threat to Machine or Machine asset." 2023-12-29 10:55:35 I saw some episodes of that series, what a load of crap 2023-12-29 10:55:47 On one episode last night a something happened and the person's box switched from solid yellow to solid red in that instant. 2023-12-29 10:55:59 It's actually quite good, though. 2023-12-29 10:56:19 There is some "crap" in it, like there often is in computer-centric fiction. 2023-12-29 10:56:42 Before it was over the computer systems were behaving too much like they were actually conscious. 2023-12-29 10:57:15 its pretty well acted, photography and such but the whole premis is just infected with 'Diploma Inteligensa' non-thinking 2023-12-29 10:57:16 But I don't think we started getting that until somewhere in season 3. 2023-12-29 10:57:40 I'm not totally sure what that means. 2023-12-29 10:58:02 s/Diploma/Diplomata/ 2023-12-29 10:58:10 Still not sure. 2023-12-29 10:58:20 hmm... how to explain 2023-12-29 10:59:01 I'm guessing it will make good sense to me when you do - I just don't know how to parse your terminology. 2023-12-29 10:59:29 Maybe a specific example? 2023-12-29 11:01:04 there is a tendency of diplomats and other lets say Foreign Affair Ministry folks to look at everything through the lens of countries and such blocks 2023-12-29 11:01:31 Ok. I don't disagree - we probably all do that general sort of thing to some degree. 2023-12-29 11:01:42 Our knowledge steers our interpretations. 2023-12-29 11:02:14 "You can't drive a taxi without becoming a taxi driver." <-- just something I saw somewhere once. 2023-12-29 11:03:05 the thing is that, it gets myopic or self diverted attention from other ways at looking at things (stage magicans use this to hide things in plain sight) 2023-12-29 11:03:23 eh? you could totally steal a taxi 2023-12-29 11:03:41 (whether that makes you a taxi driver or not is something to split hairs over) 2023-12-29 11:03:51 thrig: then you are that taxis driver ;รพ 2023-12-29 11:06:35 and when these diplomats or foreign affairs folks come across something that isnt in that view then they feel blindsided whilist most other folks go 'wait? what? you missed that obvious thing staring you in the face? ya fracking idiot' 2023-12-29 11:12:16 thrig: What that remark meant was that if you spend your days driving a taxi you'll more or less unavoidably take on the character traits we associate with typical taxi drivers. 2023-12-29 11:12:40 Not that driving a taxi one time changes you all of a sudden. It would be gradual - you'd begin to think about the world like a taxi driver. 2023-12-29 11:13:14 Zarutian_iPad: I'm still not sure how this relates to the quality of the show. 2023-12-29 11:13:53 But I don't disagree with what you just said. 2023-12-29 11:14:37 "that's a thief, not a taxi driver!" said the Cop 2023-12-29 11:15:25 :-) Sure. It was just saying that if you live a particular way for a long period of time it influences your perspective. 2023-12-29 11:16:31 "drive a taxi" referred to driving a taxi to earn your living over a long period of time, not just the physical act of one drive. 2023-12-29 11:17:20 It seems like a tautology to me - an "of course it does" sort of thing. 2023-12-29 11:17:55 And yeah, in your last remark it's happening to the cop too. :-) 2023-12-29 11:20:37 Zarutian_iPad: I think the early seasons are fairly realistic; the idea that if you shoved ALL of the surveillance data available in the country through a sufficiently powerful AI system it would "detect patterns" no one else could notice seems entirely straightforward to me. 2023-12-29 11:21:06 The basis of the show is that these people have some kind of access to the focal points of those patterns, and go start nosing into what those people are up to. 2023-12-29 11:21:44 such as when AI thought a picture of white noise was a turtle 2023-12-29 11:22:20 I particularly liked the way the system's designer restricted it - it didn't lay out all of the details to its users. Instead, it just said "Go look here." and left it to humans to make the decisions about who was right and who was wrong and what needed to be done. 2023-12-29 11:22:33 It just points them in a direction. 2023-12-29 11:22:54 And the designer did that deliberately so that the human operators couldn't deliberately target specific individuals. 2023-12-29 11:23:36 I don't think it would really be possible to give a system over to the government and have it remain restricted like that, but it was sure a nice idea. 2023-12-29 11:23:55 thrig: Right, exactly. 2023-12-29 11:24:12 On the show of course the machine is never entirely wrong, but in the real world it certainly would be sometimes. 2023-12-29 11:25:01 Also, the idea that such a machine would see things that were "irrelevant" to the government (not national security level type stuff) was a good one. 2023-12-29 11:25:22 Those were the items that got passed to the show's stars. 2023-12-29 11:25:22 The "irrelevant list." 2023-12-29 11:25:48 Meanwhile relevant stuff was being routed to the government people that the system had been handed over to. 2023-12-29 11:26:02 And was mostly not germane to the show in the early years. 2023-12-29 11:26:13 You just never even heard about it. 2023-12-29 11:26:25 Later on they crossed those paths up. 2023-12-29 11:28:42 I think they kind of had to, though, in order to ever bring the show to a conclusion. An unending stream of irrelevant cases would have had no natural end-point. 2023-12-29 11:29:49 You get the first whiff of that at the end of season 1, but it doesn't really start to settle in until end of season 2. Then most of season 3 and all of season 4 are "climactic." 2023-12-29 11:30:38 I read an article / review on it once that described it as "beginning as a typical crime drama, but evolving into one of the best science fiction shows ever made." 2023-12-29 11:31:21 Like I said, I do think they jumped the shark on the computer front before it was all over, but I still enjoyed it. 2023-12-29 11:32:36 I see it as a comparison of how we could use computer tech to make the world a better place, vs. how we could use it to make the world a terrible place. 2023-12-29 11:33:20 A cautionary tale of sorts. 2023-12-29 12:11:21 KipIngram: back. Re the POI series, the 'diplomat inteligensa' stink just ruptures the sense of disbelief for me as it makes it uncredible and nonsense esque 2023-12-29 12:47:46 Ok, that's fair. I had an acquaintance once who couldn't read the Jack Reacher novels because he felt the author had a poor grasp of gun technical details. That was something that mattered to him, and he couldn't look past it. On the other hand I don't know a lot about guns, so it didn't bother me enough to impede my reading. But if something represents that kind of "barrier" for you, then you can't 2023-12-29 12:47:48 always do anything about it. 2023-12-29 12:48:21 I may or may not have noticed some examples of what you're talking about, but if I did it wasn't severe enough to throw me off. 2023-12-29 12:48:37 But different people are sensitive to different things. 2023-12-29 12:50:47 the thing is, this factor is exactly what kindles the deep state meme complex 2023-12-29 12:52:02 bbl 2023-12-29 12:54:31 I guess "deep state meme complex" refers to the idea that everything is run by some semi-continuous cabal lurking out of sight? 2023-12-29 12:55:33 I don't really go in for such ideas - I think what's more likely is that the government is like a giant corporation with each department/division having its own mechanisms for advancement and gathering of power, and the people populating those organizations are all just doing what people do - seeking the advancement of their own career. 2023-12-29 12:55:48 I don't really think there are any hidden sinister motives that operate over the long term beyond that. 2023-12-29 12:56:36 Whenever someone lands in a job - any job - they're faced with the "how do I go about doing this job?" question, and the usual answer is "the way that's best for me personally." 2023-12-29 12:57:01 The rest just rises out of a gerzillion such decisions being made on an ongoing basis. 2023-12-29 12:59:32 back 2023-12-29 14:44:24 I guess my main reaction to all of the above is that I just feel bad that something kept you from really being able to enjoy PoI. But I get it - sometimes when something pushes one of our buttons, it's just spoiled. 2023-12-29 14:45:10 The movie Black Hat did that for me. Its portrayal of computer related stuff was just too ridiculous - I couldn't get past it. Sort of like my old buddy and the gun stuff in Reacher. 2023-12-29 14:45:43 It wasn't really that great of a movie anyway, but I had a particularly adverse reaction to it. 2023-12-29 14:46:04 It almost qualified as an "angry" reaction. 2023-12-29 14:47:32 KipIngram: deep state refers to the unelected bueracracy that persists from administration to administration. it's not the same thing as the global shadow government conspiracy theory. the deep state absolutely and demonstrably exists 2023-12-29 14:47:35 I felt the same way about Johnny Depp's movie Transcendance. Dude uploaded his consciousness to a computer, and as if that wasn't already bad enough once that happened he was basically an unstoppable god. 2023-12-29 14:47:41 Ridiculous. 2023-12-29 14:48:24 Ok, I agree that by that definition it exists. I'd still say that most of those people are still generally pursuing their own personal success, rather than participating in some overt conspiracy. 2023-12-29 14:49:40 Same as in corporations - I don't think corporations PLAN to do tacky things. But as each person looks out for himself, the tacky "emerges" just as a consequence of the rules of how corporations work. 2023-12-29 14:50:28 Kind of like how the U.S. is strongly "two party," while other governments in the world may be less so. I think it's an artifact of the specific machinery defined in the Constitution. 2023-12-29 14:50:40 "Party" WORKS under those rules, so it happens. 2023-12-29 14:51:18 Washington warned us not to go there in his farewell address, but the problem was that it was baked into the rules we'd adopted for ourselves. 2023-12-29 14:51:32 Without ever actually being mentioned in those rules. 2023-12-29 14:51:53 They developed almost immediately. 2023-12-29 14:52:01 most of them are, but there are definitely high profile documented cases of those using their positions to influence national politics or abuse their positions for personal gain. see peter strzok, lisa page, or anthony fauci for examples off the top of my head 2023-12-29 14:52:28 Oh sure, I didn't mean to imply they always behaved PROPERLY. 2023-12-29 14:52:49 You're always going to have some individual sneaks around, and also some small-scale conspriacies. 2023-12-29 14:52:59 I just don't think there's a huge global conspriacy at the highest levels. 2023-12-29 14:53:40 also see the fbi's recent penchant for entrapment 2023-12-29 14:53:56 the fbi have become the praetorian guard 2023-12-29 14:53:59 That doesn't surprise me at all. They look good when they catch people. 2023-12-29 14:54:14 So... temptation to create opportunities to do just that. 2023-12-29 14:54:44 it's not just about catching people, it's about smearing a particular political idealogy 2023-12-29 14:55:15 I believe that too. 2023-12-29 14:55:38 I'm not sure how to define the difference I'm thinking of here. :-( 2023-12-29 14:56:09 I'm trying to get at "Illuminati level" conspiracy as what I think probably doesn't exist. 2023-12-29 14:56:51 But... I guess I could be wrong. 2023-12-29 14:57:09 where do you draw the line? the things i describe approach "illuminati level" conspiracy 2023-12-29 14:59:01 the fbi has raided the homes of influential pro-life demonstrators, dragging them onto their front lawns in handcuffs and at gunpoint in front of their family and neighbors in the middle of the night over flimsy charges that were later dropped or they were quickly acquitted of. meanwhile, politicians on one side of the spectrum or their family members practically flaunt blatant law breaking before the 2023-12-29 14:59:07 entire nation and are seemingly untouchable 2023-12-29 14:59:37 they frog walked steve bannon and others for ignoring a congressional subpeona, and hunter biden goes untouched for the exact same crime 2023-12-29 15:29:59 anyway more importantly: does anyone have any experience implementing a create does> which allocates anonymous closures at runtime rather than named words? 2023-12-29 15:37:31 like using :NONAME instead of : to define a word? 2023-12-29 15:40:48 yes but more than just that 2023-12-29 15:41:55 i get the impression that forthers have this mental wall, either that or i just don't get it. i've seen create does> described as early OO, but it really isn't. OO instantiates objects at runtime, create does> instantiates at compile time. that makes it more like a template or a compiler macro 2023-12-29 15:42:36 i'm trying to figure out a nice way to get something approaching closures so that i don't have to pass a user arg through words that take a callback 2023-12-29 17:01:25 zelgomer: what's your usecase for that? i'm guessing the following pattern doesn't cover your closure-like need? : MAKE-ADDR ( compile-time-arg -- ) CREATE ( runtime-arg ) , DOES> @ + ; ... 47 MAKE-ADDER ADD-47 ... 3 ADD-47 . ... 50 2023-12-29 17:02:18 unjust: do you know what a closure is? 2023-12-29 17:03:06 wrap some outer variable scope at the time of definition into an anonymous function of some sort? 2023-12-29 17:05:57 this is what i mean about how forthers seem to be content with compile-time templates and they call them closures or OO, but it isn't. make-adder can only create named objects in the dictionary at compile time. it can't allocate anonymous and ephemeral objects or closures at runtime 2023-12-29 17:06:57 there is only one instance of add-47. if the does> part were to change the contents, then it's effectively a singleton 2023-12-29 17:11:00 what are you actually trying to achieve? 2023-12-29 17:14:37 and more specifically what's included in the scope you intend to enclose in whatever the final definition might be? 2023-12-29 17:25:34 : for ( stop start x xt ( i x -- x' ) -- x' ) 2>r begin 2dup >= while dup r> r@ execute >r 1+ repeat 2drop r> rdrop ; 2023-12-29 17:25:43 : factorial ( n -- n! ) 2 1 [: * ;] for ; 2023-12-29 17:26:20 a contrived example. if i had a nice method for anonymous closures, i wouldn't have to pass that callback argument x around and do this dance on the return stack 2023-12-29 17:27:09 [: ;] are my words for quotations. it's just an inlined :noname 2023-12-29 17:33:41 this is more or less how i'd do it in c. any function that takes a callback should have the form, e.g., int foo(int (*callback)(int /* or whatever you want to pass */, void *), void *arg) 2023-12-29 17:34:13 then you call it with struct some_context ctx = { ... }; foo(myfunc, &ctx); 2023-12-29 17:35:07 it's just more cumbersome to do this through forth's stack, i was wondering whether anyone has come up with a clever way to do this more cleanly 2023-12-29 17:37:39 besides the return stack juggling, the only other approach i can think of is to use a local for x 2023-12-29 17:38:01 local where? 2023-12-29 17:38:16 in for 2023-12-29 17:38:43 oh, so it's still passed as a parameter and then for uses a local to stash it 2023-12-29 17:38:52 pretty much 2023-12-29 17:40:07 hmm. maybe i should just have a word to encapsulate this "r> r@ execute >r" pattern 2023-12-29 17:42:04 ACTION has actually made an object system on top of forth 2023-12-29 17:43:40 i may be getting too fancy for my own pants, but i struggle with a lot of tripping over myself and stack juggling in forth, and i have a hunch that higher order functions can help me a lot. it's just not clear to me yet how to do them nicely :) 2023-12-29 17:45:25 you could us xt's and such 2023-12-29 17:45:45 i am, the discussion is about passing context with them 2023-12-29 17:45:46 use* 2023-12-29 17:46:12 oh, I see 2023-12-29 17:46:45 how big is the context you want to pass along? 2023-12-29 17:47:47 for what i'm doing right now, a single cell is fine. i'm using the method i described above with my for and factorial words. i was really asking whether anyone else has explored creating quotations as closures in forth 2023-12-29 17:48:24 what are quotations in this context? 2023-12-29 17:49:02 i'm surprised i keep getting asked this question in this channel. is this not a common forth concept? i thought it was 2023-12-29 17:49:39 Zarutian_iPad: :noname ... ; : foo ... [ compile, ( compile the anonymous word ) ] ... ; 2023-12-29 17:49:47 forth ain't much functional, unless you made it that way 2023-12-29 17:50:01 ^ instead of that, a quotation would look like: : foo [: stuff stuff stuff ;] ... ; 2023-12-29 17:50:25 ( [: ;] are my words, i'm not sure what's common but i feel like i've seen that before) 2023-12-29 17:50:58 that is more of an Scheme or lisp concept 2023-12-29 17:51:34 or another example: : foo ." hello" ; : bar \ foo execute ; versus : bar [: ." hello" ;] execute ; 2023-12-29 17:51:35 quotations 2023-12-29 17:52:16 it's a very common thing in factor. i thought i had seen it commonly used in forth, too, but maybe i'm misremembering 2023-12-29 17:52:40 more of an factor thing then 2023-12-29 17:53:25 what do the defintions for [: and ;] look like? 2023-12-29 17:57:57 quotations aren't common in traditional forth, though the new standards effort for forth20xx does add them 2023-12-29 17:58:21 crc: do you know what words they use? 2023-12-29 17:58:36 like what they call them? i might change mine to match 2023-12-29 17:59:31 [: and ;] 2023-12-29 17:59:36 http://www.forth200x.org/quotations-v3.txt 2023-12-29 17:59:43 lol ok :) 2023-12-29 18:00:00 (I use [ and ] in my systems, but my systems don't bother trying to follow the standards) 2023-12-29 18:01:02 Zarutian_iPad: i think this is right, but i had to do some translation to avoid using several other unconventional words, and this form is untested 2023-12-29 18:01:08 : ([:) ( -- xt ) r@ dup @ over + r! cell+ >cfa ; 2023-12-29 18:01:11 : [: postpone ([:) >mark here 0 , latest @ , here cell+ , (:) , latest ! immediate 2023-12-29 18:01:15 : -;] >resolve latest @ >next latest ! ; immediate 2023-12-29 18:01:18 : ;] postpone exit postpone -;] ; immediate 2023-12-29 18:02:03 (:) is my docolon. the mess in [: is just building an xt header 2023-12-29 19:58:49 KipIngram did you think about threads, sharing memory and alike? 2023-12-29 19:59:13 i doubt your way would be applicable for my lang, but who knows 2023-12-29 20:00:12 for now i only have a word named 'async' that will expect code and will run that code in a new thread 2023-12-29 20:00:49 i have to add shared data, which could be easy as my host lang already has this feature 2023-12-29 20:01:15 still I keep thinking there are better approaches 2023-12-29 23:00:16 Yes, I've thought about those.