There are no strings on me
scattered-thoughts.net
scattered-thoughts.net
Some of my early Lisp programs used a Makefile.
Lisp is great even without the scatter-brained approaches that some Lisp programmers advocate in order to roll people's eyes and turn them away from Lisp.
I've skimmed through a summary of Pharo but I don't want a whole GUI system, I want to write scripts or maybe web apps. Do I actually want the whole GUI and all but just don't know it yet?
You can write scripts in Pharo as pharo does take a script on the command line see https://stackoverflow.com/q/17256534/151019
A long time ago I was using a JavaScript framework where the memory usage went up steadily as you navigated the single page app. One cause was captured variables (referencing large object trees) in event handlers. The only viable way to fix the issue was to write my own custom framework taking extreme care with closures and sometimes nulling variables (the code for the existing framework was just too complex to fix - and memory references are hard to debug in browsers). I saw the same issue with memory usage growth in a different framework. Some of the issue was that Internet Explorer had problems with circular references between JavaScript and the DOM, but the captured variables in closures were their own problem.
And ideally we should also be able to clone the function-with-closure. And modify the bindings.
This wouldn't have eliminated many foot guns, but it would have been cool & would have let us dive deeper into the machine.
This doesn't seem like a hardfast cant. We keep getting arguments against doing stuff because it might not be performant. I don't disregard those concerns entirely. But I think we also over-actively forbid, we prematurely optimize by pruning possibility, all too often.
Second-class functions can still be passed around. They just can't be constructed at runtime, you would have to declare them.
Maybe some "first-and-a-half order" approach to functions could work. You could still declare lambdas in place, but they won't have direct access to anything local to your function; instead of a closure, everything needed would have to be passed as a parameter. It could even allow partial application using local variables; values wound just be copied, not closed over.
Yes. It's very common to have a function that returns another function. It's a pretty critical feature.
> In Julia, types are first-class and every value has a type
This is what I do from the start in https://tablam.org and only later found that is not common! Is so intuitive this way and simpler to check, by a lot. In fact, I waste so much time adapting type inference algorithms that are hard to translate because for some reason graphs are imposed on trees, types are second-class and live at a distance (and erased) and all is a mess this way.
The relational model already makes this so simple: `project / rename / extend` relational operators cover you.
From this other facilities become possible. Note how in `SQL` you don't have functions as first-class per se, but now try to imagine that a function is a table and suddenly, is much better!
In Java the same applies. But Java is a weird beast. While every value has a type, not all types are equal - there are primitive types like int and double, that are value types, and Integer and Double, that are class types. This all is even more muddied with class generics that are forced into the existing system by type erasure at compile time - so while you can't put a String into an array of Double, you definitely can put a String into a hash map of Double when you really want to, as the hash map is implemented as a class and type parameters of a class are just an illusion that is enforced during the compile time. No sane person will do this and uses all the available tricks to eliminate this possibility, but it is definitely possible.
I tried at first to be fully columnar, then cave and try hybrid then now I doing mostly rows with 2d NDArrays.
The major reason is that going columnar flip everything and then I need to recreate tons of API, in special costly with FFI or APIs. I was looking into mimicking kdb+, and yes, that is what they end up doing. This lead to a more insular community (that I don't have but well, that is a worry!)
I'm not sure that it results in a good reusable code though. Any examples?
But I bet is far more reusable than normal code in most cases.
The reason is that the relational/array model has more values: https://www.infoq.com/presentations/Value-Values/, and combined with structural types and the power of relational operators you can eliminate a lot of cases where macros or generics come.
One major feature of a "values" language is that is naturally introspectable. Not just values, but types, and metadata. So this is NOT crazy:
mod People:
data Person:
name: Str
age: Int
data Customer: Person //not subtyping but `SELECT * Person INTO Customer`
active: Bool
end
mod Auth:
data User: People.Person //not subtyping but `SELECT * People.Person INTO Customer`
password: Password
active: Bool
data UserSafe: User ? deselect password // SELECT People.Person.*, active INTO UserSafe
end
fn print(p: Person ... ) // Accept anything that is `SELECT name, age FROM ?`, but critically, not remove the other fields, are just invisible here. This means you don't make type conversions in unnecessary cases
fn print_type_no_person(mod:Mod): String
let types = mod ?select as_data(this) != Some(Person...) // Anything is a relation, anything query
types ? union | into(String) //SELECT t1 UNION t2... + reduce()On a previous project I embedded a SQL-like sub-language into a model language so that ETL pipelines and OLAP/OLTP processing could be generated to query aggregates and value lookups during inference. It is nontrivial to embed a relational language into another language without making some compromises but there are certainly contexts where it is quite useful. I think C#'s LINQ is a reasonable effort at this but I'm not much a fan of the rest of that language.
That turns out to be the solution that nature has come up with, so while it might be possible to do an end-run around this constraint somehow and keep a dynamic system running forever, I'll give long odds against.
Explain?
And this happens at all levels of abstraction. At higher levels it's not called "death" but "extinction" but it amounts to the same thing -- the wholesale destruction of previously accumulated state.
Binge then Purge also.
I sweat out a lot of junk in sleep. I wake up needing 40-60 oz of water. Then I can do whatever. After a shower though…ugh…
The craziest scene from the 1980s movie _The Thing_, recast in bird claymation. What kind of wild mind comes up with something like that...
My experience is that the more orthogonal the data, logic, and presentation in the system, the more methodical the naming, the less important the system is and the more the creativity can be focused on the task, not dealing with the "personality" of the system.
I don't know that the evidence is overwhelming that it is better.
But when you have chosen a shape, more rigid structures provide static guarantees that are the more welcome the larger your project grows.
Can you unpack this comment some for us John? I don't remember enough details of the Moties to get what you are alluding to.
>John Nagle's comment, "Late binding is programming for moties," suggests that he is drawing a parallel between the adaptable but complex nature of the moties' starship construction and the approach to programming that relies on late binding. He is likely implying that late-bound programming, like the construction of motie ships, can lead to systems that are highly flexible and capable of responding to a wide range of inputs, but at the same time, these systems can be more complex and harder to predict, maintain, or debug.
--Yi-34B-Chat
(Also, I've never seen a dataset cited before but I kind of love it, wow. But also, I absolutely detest that there is zero ability to go back & see what trained these weights, what source material these ideas & words came from.)
In Elixir most of us use the REPL to sketch out an idea; to shorten the development cycle a bit and have something that looks to be working. Once that's happened then we write the code properly, with tests and all.
REPL and tinkering are just one tool to make your work more deterministic. It's not a personality that wins over all other personalities.
And stop looking for ghosts in the machine, it ain't happening. I like me a good sci-fi as well but general AI is quite far away still.
https://github.com/w3c/webextensions/issues/139
This post definitely was quite a technical explanation. The opening framing, to me, means the world.
You avoid them and chunk the work into pieces.
That's what every framework for long-running tasks do; that's what people that write them by hand ends-up doing after the first or second time they fat-finger a CTRL-C.
That's the only way to make those tasks viable.