2023-09-16 02:02:52 So, I ran across this math package called Geogebra. Managed to get a version installed on my notebook. 2023-09-16 02:03:25 It's pretty cool - you can do "geometric constructions" with it, among other things - it's really good at understanding what you're trying to get it to do. 2023-09-16 02:04:30 Here's a screen shot of one I did: 2023-09-16 02:04:33 https://imgur.com/a/0hqP1uC 2023-09-16 02:04:49 The idea is that you pick the first pair of lines, then draw all the rest based on those. 2023-09-16 02:05:37 One of those lines stays in the same place as you move earlier cnstruction points around - that was the gist of the particular thing being studied. 2023-09-16 02:06:59 The idea is that the first thing you pick is "a point outside that circle." Then you do a bunch of other stuff, until you wind up with that final line, which is called the "polar" of the initial point. Changing all the decisions you made in the middle doesn't change it. 2023-09-16 02:15:57 Geogebra is cool 2023-09-16 02:16:05 we used it in highschool a lot 2023-09-16 02:26:33 It looks pretty handy to have on tap for occsional "tinkering." I also used it to look at level curves of a surface (x^3+y^3+3*x*y = 0). Did a real nice job of that. Again, it seems to "know what you're wanting from it" - someone thought the interface through really well. 2023-09-16 02:27:56 yeah 2023-09-16 03:28:58 I love affine transformations and all that stuff 2023-09-16 11:05:53 I think it's really neat how there are levels of all this stuff - affine, projective, etc. Each one requiring that you have more "capability." Wildberger describes projective work as the stuff you can do with only a straight edge (not ruled, no compass, no square, etc.) I like the way he tries to teach these things working at the "minimal" level, so that you wind up with the most general results. 2023-09-16 11:09:00 In a projective situation you can subdivide a line, and thereby "create yourself a ruler," and you can then transfer that ruling to another parallel line. But, you can't tranfer a ruling to a line with a different direction. 2023-09-16 11:09:34 So, you can measure along any given directions, but you can't relate the lengths fo things with different orientations. 2023-09-16 11:10:53 In the more general, less capable settings it's harder to prove things, but if you can prove something it's better than proving it in a "higher tier." 2023-09-16 11:11:55 All of math is structured this way, starting with set theory and building up more involved things layer by layer. 2023-09-16 11:13:56 I think topological spaces is the next layer after set theory. 2023-09-16 11:14:20 Only new ideas you add there are "adjacency" and "connectivity." 2023-09-16 11:14:28 "nearness." 2023-09-16 11:16:09 That's where you get the idea that a donut and a coffee mug are the same thing: 2023-09-16 11:16:11 https://cems.riken.jp/wp-content/uploads/2013/03/A080_FurusakiT-Fig.jpg 2023-09-16 12:55:17 You know, I do have to give Wildberger credit for one thing. I'm watching his course on hyperbolic geometry. The usual approach has sinh() and so on flying around almost immediately - as soon as you start talking about the distance between points. Wildberger takes a more fundamental approach - it's pure arithmetic, ratios, etc. all the way. 2023-09-16 12:55:40 And things like sinh() involve a LOT of details that he completely dodges having to assume. 2023-09-16 12:56:22 sinh(x) is basically an infinite series if you try to get at it arithmetically. 2023-09-16 12:57:19 I've seen this pattern in his work a lot - he often has to work harder to prove various things, but in the end his development is just a lot more "satisfying." 2023-09-16 12:57:46 Precisely because he DOESN'T import any "high caliber machinery" from outside his development. 2023-09-16 12:59:24 Also, as far as I can tell the standard development of hyperbolic geometry restricts the discussion to points inside the circle, but according to him everything he builds will be equally valid for points outside the circle too. 2023-09-16 13:00:53 Hyperbolic geometry is essentially the geometry of special relativity. 2023-09-16 14:48:23 This is fairly interesting: 2023-09-16 14:48:26 https://antidelusionmechanism.org/files/CircularWave2.pdf 2023-09-16 14:51:24 That has Wildberger's parametrization of the unit cicle in it. 2023-09-16 14:52:09 If you asked a hundred scientists or engineers to parametrize the unit circle, you'd get back at least 99 answers "x = cos(t), y = sin(t)" and more likely a hundred. 2023-09-16 14:52:33 But if you pick some random t and calculate that it will turn out it's not REALLY on the unit circle - it's only "close to it." 2023-09-16 14:53:13 Wildberger's expression lets you pick any integer t - positive or negative, and it cranks out a point exactly on the circle. And all such points correspond to SOME value of t. 2023-09-16 16:11:33 KipIngram: any non-zero integer t 2023-09-16 16:11:37 surely? 2023-09-16 16:12:35 oh, maybe not 2023-09-16 16:13:42 yeah it can, because you can pick a combination of r and t that blows up without special care 2023-09-16 16:48:18 What is it with Forth200x and hiding everything they do 2023-09-16 16:48:45 They write all these documents and I have to spend hours trawling the web looking for up to date documents 2023-09-16 16:52:30 They've got a website but the latest document is from 2019 2023-09-16 16:52:47 Well now I've found this https://github.com/Forth-Standard/forth200x/blob/master/basis/forth.pdf 2023-09-16 16:52:55 From 2022 2023-09-16 16:57:01 And still no recognizers 2023-09-16 16:59:50 And yet committee members like to act as if it's a well founded thing. 2023-09-16 17:00:08 Just because there's a committee and they have regular meetings doesn't mean it exists, it doesn't exist if they don't do releases or even provide draft copies 2023-09-16 17:00:41 It's just a kind of weird sprititual experience for the people on the committee at this point 2023-09-16 17:01:00 fascinating in a sense 2023-09-16 17:17:14 Also I just dislike the whole recognizer thing, it's not very Forthy 2023-09-16 17:17:42 The only thing like that which works in a Forthy way is retro's prefix system 2023-09-16 17:38:55 i wonder why they do own the forth standard when the language was invented by chuck 2023-09-16 17:39:10 which even dislikes this standard xd 2023-09-16 17:39:42 it's like stealing something is not yours 2023-09-16 17:40:01 and even making it look ugly to the guy you stole it from 2023-09-16 17:40:12 They don't own it I don't think 2023-09-16 17:40:50 They just make a standard, they're not even ISO or ANSI 2023-09-16 17:40:51 they kind of do at the end 2023-09-16 17:40:59 they decide what goes and what not 2023-09-16 17:41:20 even knowing chuck dislikes what they do 2023-09-16 17:41:35 this might be like those French or Spanish language police that everyone ignores 2023-09-16 17:42:03 Some Forths go by it, but not most 2023-09-16 17:42:09 still i kind of understand 2023-09-16 17:42:20 And it's hard to track something that only insiders seem to be able to keep up with 2023-09-16 17:42:34 the desire of forthwrights to have a common forth so they can share code and alike 2023-09-16 17:43:28 I don't think that's the intention of the committee 2023-09-16 17:43:54 I think that was the intention originally but standards always diverge from that path eventually 2023-09-16 17:44:31 so now the motivation is just to irritate chuck 2023-09-16 17:44:59 I don't think Chuck follows what they do at all so probably doesn't care 2023-09-16 17:45:15 Chuck probably moaned about ANS, that was released in 1994 2023-09-16 17:45:33 Honestly I would be surprised if he knows about Forth 2012 or 200x at all 2023-09-16 17:45:59 There were earlier standard attempts he might have moaned about 2023-09-16 17:48:04 then you mean it's like the comitee lost its original goals and is now like walking in random directions? 2023-09-16 17:49:19 about being forthy... as far as i know the standard wasn't forthy from the start 2023-09-16 17:50:23 this ans vs not ans stuff reminds me a bit about lisp vs scheme 2023-09-16 17:50:38 but in a reverse way 2023-09-16 17:53:19 It's gotten less and less forthy over time 2023-09-16 18:08:55 It's very Vogon 2023-09-16 19:25:20 gordonjcp: t=0 is the point x=1, y=0. It's on the circle too. 2023-09-16 19:25:36 So as far as I can tell it's ANY integer. 2023-09-16 19:26:13 The parametrization is x=(1-t^2)/(1+t^2), y = 2*t/(1+t^2). 2023-09-16 19:30:06 You get this: 2023-09-16 19:30:13 x = (1-t^2)?(1+t^2) y = 2*t/(1+t^2) 2023-09-16 19:30:14 x^2 = (1-2*t^2+t^4)/(1+2*t^2+t^4) 2023-09-16 19:30:15 y^2 = 4*t^2 /(1+2*t^2+t^4) 2023-09-16 19:30:16 x^2+y^2 = (1+2*t^2+t^4) / (1+28t^2+t^4) 2023-09-16 19:30:18 x^2+y^2 = 1 2023-09-16 19:30:46 So, x^2 + y^2 is IDENTICALLY 1. The denominators 1+t^2 can never be zero, for any integer, so it works for any value. 2023-09-16 19:31:34 Ooops - got a ? where I should have had a / up there. 2023-09-16 19:33:22 You know, this projective stuff is really neat, because points and lines are represented by triples (x,y,z). The meaning is (x/z,y/z,1), but since only the proportions matter you can use the flexibility of z to clear fractions. So it holds the prospect of purely integer arithmetic. Really nice for calculations on a computer. 2023-09-16 19:33:51 and given its applicability to graphics, that seems like something of good value. 2023-09-16 19:35:48 veltas: Who knows - I may wind up writing something like recognizers for my system before they ever get around to it. 2023-09-16 19:36:56 Standards groups are like any other group - their own existence and influence becomes their primary goal. 2023-09-16 19:37:25 I have so little interest in the standard that it's really a little shameful. :-( 2023-09-16 21:45:30 i'm going to make " to not be a word, but a special syntax so it does not need a space 2023-09-16 21:45:49 same for ( as it will create lists 2023-09-16 21:46:26 i dislike a lot to have to ( do that ) instead of (do that) 2023-09-16 21:47:00 not for one list, but nesting is ugly ( oh ( my ( cat ) is ) very ) 2023-09-16 21:47:48 when it could be (oh (my (cat) is) very) 2023-09-16 21:48:12 and a "string" instead of " string" 2023-09-16 21:49:55 i realized that since i use a fake debian i can use common lisp, but for some reason i ended liking my own abomination because it's a mix of what i like from lisp and forth 2023-09-16 21:50:35 it has lexical scope, closures, code as lists, quote, etc 2023-09-16 21:50:51 but also rpn, stack based, colon words and concatenative 2023-09-16 21:51:44 having to wrap every paren with spaces makes me a bit sad, so i'll try to fix it 2023-09-16 21:51:59 and do the same with " 2023-09-16 21:53:18 vms14: That's exactly the struggle I've had internally. The space requirement becomes annoying sometimes. 2023-09-16 21:53:37 KipIngram: i know ( in forth is for comments 2023-09-16 21:53:40 And consider - what if you WANTED a space as the first character of your line? 2023-09-16 21:53:49 but always triggers me to see ( this) 2023-09-16 21:54:29 what? i ignore initial spaces 2023-09-16 21:54:38 and newlines and tabs 2023-09-16 21:55:08 I'm just noting that there are reasons to want to be able to treat every single char between the delimiters as legit data. 2023-09-16 21:55:38 well every word can implement a new syntax 2023-09-16 21:55:56 but it has to be a word 2023-09-16 21:56:52 about that, i'm somehow interested in having words with spaces 2023-09-16 21:57:01 but looks troublesome 2023-09-16 21:57:20 i mean compound words 2023-09-16 21:57:40 I've thought about that too. 2023-09-16 21:57:43 i can always make a special syntax with delimiters for evaluating them, but meh 2023-09-16 21:58:01 KipIngram: and what are your thoughts? 2023-09-16 21:58:09 I keep thinking regular expressions play into this somehow. 2023-09-16 21:58:25 Like, you'd have a list of regexes, empty initially. 2023-09-16 21:58:28 You could add to it. 2023-09-16 21:59:02 The next part of the input stream would be checked against those, and if it "fits" one of them then that would yield the interpretation of that input. 2023-09-16 22:00:03 But a string wouldn't be handled by seeing " and running a " word that gobbled the rest of string. 2023-09-16 22:00:26 Rather, the system would see " followed by chars follwed by " and would say Aha, that's a string; gimme it. 2023-09-16 22:00:37 It's a "wholistic" thing. 2023-09-16 22:01:30 so the regex are matched against the whole input line? 2023-09-16 22:02:12 Yeah. 2023-09-16 22:02:37 So you could say "this is what strings look like, this is what arrays look like, etc." 2023-09-16 22:02:52 regex can give a lot of funny troubles 2023-09-16 22:02:59 I know. 2023-09-16 22:03:16 When I say regex I'm referring to the original, "early days" regex before they added a lot of feature bloat to them. 2023-09-16 22:03:26 the ones that are really efficient to process. 2023-09-16 22:03:31 i sometimes think about an interpreter with states 2023-09-16 22:03:43 Well, we have that now. 2023-09-16 22:03:51 compile state vs. interpret state. 2023-09-16 22:03:55 yeah, the compiling flag 2023-09-16 22:04:11 but with the ability to add new states 2023-09-16 22:04:19 and switch from one to the other 2023-09-16 22:04:56 there are a lot of ideas to try 2023-09-16 22:09:52 See, think of it like this. 2023-09-16 22:10:14 Existing Forth approach. What the system does is take the next bit of input and runs a bunch of tests on it. 2023-09-16 22:10:24 Most of those tests are match tests against specific strings. 2023-09-16 22:10:30 The last one is a number check. 2023-09-16 22:10:37 But they're really just "a list of tests." 2023-09-16 22:10:44 Why can't those tests be more flexible? 2023-09-16 22:10:55 Involve wild cards, specific combinations of items, etc.? 2023-09-16 22:11:17 And not necessarily just one word at a time, but whatever format of chars the test needed to check for? 2023-09-16 22:11:33 If "upcoming input" matches a pattern, take that input and run the instructions associated with that pattern. 2023-09-16 22:12:42 Same "general strategy" - just "more flexible." 2023-09-16 22:13:31 The standard Forth input processing approach is really quite primitive (though of course that's by design - simplicity). As simple as possible. 2023-09-16 22:14:09 A "string test" would see if the upcoming input was a quote mark followed by n non-quotes followed by a quote mark. 2023-09-16 22:14:15 i also want some day to improve errors 2023-09-16 22:14:23 Wouldn't matter whether there were spaces in that in-between part. 2023-09-16 22:14:39 and make them some sort of object or event 2023-09-16 22:14:58 actually they seem to be best represented as events 2023-09-16 22:15:11 Maybe these tests could yield a score. If they all failed, you could use the one that produced the highest score to guide you in error messaging. 2023-09-16 22:15:30 "Looks like you were trying to enter a numeric array, but you got it wrong here: ..." 2023-09-16 22:15:45 and i had a basic way of event handling already, which is just a hash table 2023-09-16 22:15:54 You like hash tables. 2023-09-16 22:16:04 i use perl 2023-09-16 22:16:25 Hash tables do seem pretty important these days. 2023-09-16 22:16:41 But good ones are O(1), so, hard to beat. 2023-09-16 22:16:44 when perl devs prepare to battle, they prepare their hashes and regex 2023-09-16 22:17:08 Forth uses the simplest possible way there too. 2023-09-16 22:17:14 imagine a hash of regex 2023-09-16 22:17:17 Doesn't get much simpler than an O(N) linked list. 2023-09-16 22:17:53 But a hash is a *calculation* on the DATA of the input. 2023-09-16 22:18:02 I don't really see how you put that together with regex. 2023-09-16 22:18:03 v8 has a very efficient hash table 2023-09-16 22:18:16 Everyone does, mostly, these days. 2023-09-16 22:18:20 It's "the modern way." 2023-09-16 22:18:30 Dictionaries like in Python rather than Forth. 2023-09-16 22:18:42 they are remarkably fast compared to other lang implementations 2023-09-16 22:18:58 Yes, but I think they work for looking up SPECIFIC STRINGs. 2023-09-16 22:19:09 Not really going to help me recognize a literal array in my input. 2023-09-16 22:19:24 js hash tables are actually object properties 2023-09-16 22:19:59 object.key = value 2023-09-16 22:20:20 Yes, but you have to actually have the key before you can look something up in there. 2023-09-16 22:20:22 they are much faster than perl's 2023-09-16 22:20:41 Like I said, they can be O(1). 2023-09-16 22:20:47 Ammortized. 2023-09-16 22:21:01 well v8's js is just much faster than perl overall 2023-09-16 22:21:43 well you can iterate the keys 2023-09-16 22:22:01 but idk if a linked list serves you better 2023-09-16 22:22:22 hmm... I been meaning to write something like a Lua table implementation in that object system I have described 2023-09-16 22:22:43 I'm sure a hash table would serve Forth's particular needs better than a linked list. 2023-09-16 22:22:55 There's just more to them and they're not as simple. 2023-09-16 22:23:00 in my case i'll keep not worrying about performance 2023-09-16 22:23:00 for interning string based symbols I recommend tries 2023-09-16 22:23:28 it does not make sense, except for learning 2023-09-16 22:23:56 an trie is rather neat datastructure 2023-09-16 22:24:56 made up of nodes in a tree like fashion where each node has say 256 branches 2023-09-16 22:25:29 I've been thinking about numeric type management too. Int vsl float vs. complex. I kind of think structures should promote up that chain as calculatoins require it, and then it should be possible for the code to deliberately demote them if it chooses to. 2023-09-16 22:25:47 and if you have a parent pointer in each node then you can extract a string out of it again but it will be reversed 2023-09-16 22:25:47 KipIngram: but you mean a hash table for the dictionary? 2023-09-16 22:25:54 I.e., if you have an array of ints, but do math on it that produces a floating point result, the array gets promoted to float. 2023-09-16 22:26:17 Take the square root of a negative number, the array gets promoted to complex. 2023-09-16 22:26:52 i assume then you want to do like gforth does 2023-09-16 22:27:01 Yeah, I think in a desktop Forth targeting high performance I'd use hash tables for the dictionary these days. 2023-09-16 22:27:07 so homogenious arrays only or hetregenious ones too? 2023-09-16 22:27:09 mantain both the libked list and the hash table 2023-09-16 22:27:23 I'm leaning toward requiring all array elements to be the same. 2023-09-16 22:27:40 So if one item got changed, you'd change the whole array. 2023-09-16 22:27:45 if you loose the linked list you loose forget and a lot of stuff i suppose 2023-09-16 22:27:47 Just so you can still index it like an array. 2023-09-16 22:28:06 Sure - if you lose your data you've lost your data. 2023-09-16 22:28:17 Start over. 2023-09-16 22:28:38 i mean, you're forced to mantain both versions 2023-09-16 22:28:58 it's not nice, i wonder if the performance you get is worth 2023-09-16 22:29:03 If you have both, I guess. There's no reason you couldn't do it full hashing. 2023-09-16 22:29:23 But yeah, I've also thought about having the linked list built in, and building a hash table on the fly in unused RAM. 2023-09-16 22:29:24 I see, I prefer to use that objsys as I can invoke an general getter method on it and not be fussed about how it got the value 2023-09-16 22:30:21 I doubt I'll want to have ALL of the decisions made at run-time. 2023-09-16 22:30:43 And certainly not on an array element by array element basis. 2023-09-16 22:30:52 I came up with that objsys because I wanted an easy way to do graphics composition easily 2023-09-16 22:30:52 Look at the type of the array, know what to do - do it to everything. 2023-09-16 22:30:54 ACTION has no compile time 2023-09-16 22:31:43 ^ That's part of why your performance is low. 2023-09-16 22:31:55 That's what compile time IS - getting work done once so you won't have to later. 2023-09-16 22:32:31 i made a fake compile by taking decisions in compile time and it helped a lot with the performance 2023-09-16 22:32:43 I'm moving some decisions to run time - I don't see any way to get the use model I want without doing that. 2023-09-16 22:32:48 but it sucks so much 2023-09-16 22:32:52 But I'll still be trying for "reasonable" performance. 2023-09-16 22:33:21 for instance I have in my notes a sort of blitter thing that acts like an pixmap but actually references two pixmaps and a bitmap or apple quickdraw like mask 2023-09-16 22:34:37 KipIngram you looked into partial evaluation and the three transforms by Proffessor Futamura? 2023-09-16 22:36:27 the latter is basically a way to transform an interpreter into a compiler that tries to do as much as possible at compile time and emitt code to do the rest at runtime 2023-09-16 22:36:49 Zarutian_iPad: someone recommended me about using partial evaluation when asking about transpilers 2023-09-16 22:39:10 it's mainly what my fake compile did 2023-09-16 22:40:04 it avoided the switch case at runtime, the switch case was executed at compile time and it returned a function that would perform the action of that case 2023-09-16 22:41:04 so a colon word for example was converted to a list of functions that had some decisions at compile time 2023-09-16 22:41:52 actually the compile function was a copy of the interpret function returning closures instead of executing code 2023-09-16 22:48:03 vms14: What I really wish I could do is have the compiler make all of the "type" decisions and just compile the right code for the right situation. Then when it ran it would just run - no decisions then. 2023-09-16 22:48:16 more recently though I've been thinking about more run-time decisions. 2023-09-16 22:48:35 I'm not sure it has to be THAT bad. 2023-09-16 22:49:22 Doesn't really hurt that much to add one "type-driven" table lookup to a word's execution. 2023-09-16 22:50:32 KipIngram: then you want type inference 2023-09-16 22:50:57 That sounds like something that has a specific meaning and I'm not sure what it is. 2023-09-16 22:51:48 I just figure the stack item will give me easy access to the item's type - a type-flexible word would check that and table jump to code to do 'that" to "that type." 2023-09-16 22:52:07 Type inference is the ability to automatically deduce, either partially or fully, the type of an expression at compile time 2023-09-16 22:52:29 So, if it's a pointer to a complex array, the + word will see that and jump to a routine to add complex arrays. 2023-09-16 22:52:42 a guy recently told me he wanted to make some sort of scope for the types 2023-09-16 22:52:52 Well, maybe compile time maybe run-time. 2023-09-16 22:53:03 My most recent thoughts have been toward doing it at run time. 2023-09-16 22:53:13 in the sense that a type can change over the course depending on the scope 2023-09-16 22:53:14 But more type inference would be better, yeah. 2023-09-16 22:53:29 but this being at compile time 2023-09-16 22:53:39 I'm kind of talking about both. 2023-09-16 22:54:11 hah so you also want a half interpreter and half compiler 2023-09-16 22:54:17 I may be trying to be too general. What I actually KNOW I want is numeric arrays. 2023-09-16 22:54:18 well, forth was always that 2023-09-16 22:54:24 that I can do scientific modeling with. 2023-09-16 22:54:48 in my case the compiler part does not exist 2023-09-16 22:55:07 but i keep wanting to have half transpiler at the end 2023-09-16 22:55:09 The way I see it, numeric array entries can be either integers, floating point, or complex (two floating point). 2023-09-16 22:55:19 And arrays can have any dimensionality. 2023-09-16 22:56:09 The APL interest of late has been for getting a handle on the array stuff. They seem to have a lasso around that. 2023-09-16 22:56:20 haha 2023-09-16 22:56:28 you went to apl to steal arrays 2023-09-16 22:56:49 Well, and I like the "math rigor" they have. 2023-09-16 22:57:31 i have to learn prolog 2023-09-16 22:57:56 i already have a perl module that implements prolog entirely in perl, so i can use it to provide prolog 2023-09-16 22:58:23 i think it can be very useful in a lot of tasks, but i have to learn it first 2023-09-16 22:59:01 i don't even see the power of prolog 2023-09-16 22:59:08 but i know it has 2023-09-16 22:59:49 and it feels like it is something i always wanted to have 2023-09-16 23:00:27 i have to do so many things 2023-09-16 23:02:24 for the error i think it's cool to just use what i have for events 2023-09-16 23:03:03 event is a word that takes a string from the stack and looks a hash table for that string 2023-09-16 23:03:51 if there's something it's a list of handlers, which will be executed one by one 2023-09-16 23:04:20 there's an alternative event word that can also give arguments to them 2023-09-16 23:05:07 then there's a word named watcher which just takes an event name and code and pushes it to that list 2023-09-16 23:05:20 it registers the handler 2023-09-16 23:05:33 i think error should follow the same approach 2023-09-16 23:05:46 for now my error function just prints text xd 2023-09-16 23:06:13 but i could have error handlers just by doing the same 2023-09-16 23:08:03 althought i should check also the java exception/error system and specially the common lisp condition system 2023-09-16 23:08:17 but i need to implement oop before that