HackerLangs
TopNewTrendsCommentsPastAskShowJobs

ux266478

780 karmajoined 11 miesięcy temu

Submissions

Swish – Jupyter-like computational notebook for SWI-Prolog

swish.swi-prolog.org
10 points·by ux266478·25 dni temu·0 comments

λProlog: Logic programming in higher-order logic

lix.polytechnique.fr
167 points·by ux266478·5 miesięcy temu·39 comments

comments

ux266478
·2 godziny temu·discuss
No, I didn't mean to imply otherwise. I'm contextualizing for why that framing of the book is eyebrow raising.
ux266478
·9 godzin temu·discuss
Taken as an intentional insult though, it could be very historically literate. The south of Canaan seems to have peaked in prestige in the Neolithic and early bronze age. Afterwards, other than a handful of Canaanite sentinel cities, it was kind of an irrelevant rural backwater, and those cities fell off drastically in the iron age. The kingdom of Israel was a regional player with a lot of manpower, but compared to its neighbors of Aram-Damascus and the Sidonians, it didn't really amount to much in the grand scheme of things. Judah may as well have not even existed. When Israel was turned into Samaria, it was right back to being a footnote.

Painting the kingdoms as LARPing pastoralists who belonged to an older time is basically exactly what it would have looked like to the Tzorim, who had apparently bad relations with Israel from the mid-iron age onwards. Reinvoking that imagery is basically stoking a 2500 year old brotherly inferiority complex, if a highly esoteric one.
ux266478
·12 godzin temu·discuss
The inflection of the copula "can be" is exactly the problem, as is the 'anything computable'. There's a reason Isabelle is used as a proof assistant, and Prolog isn't. The former guarantees sound, mathematical rigor that can't be trivially violated. The latter doesn't. Prolog is much more powerful and flexible than Isabelle. Power and flexibility are disastrous for safety. As someone else said elsewhere in this thread, safety is about restrictions.

In this case, it actually runs deeper than this, there are structural issues which prevent them from being sound right from the beginning. It's the mere fact that the whole behavior of your DSL can be silently changed without touching the module it's defined in, or the file it's being imported into. A well-meaning junior, in a completely different department, can completely destroy your invariants in a completely unrelated part of the codebase. Whether by shadowing runtime functions, or a package-level collision that exists upstream. Even Scheme's hygienic macros don't actually solve this, they just make it less likely. At the point in which you have no behavioral guarantees of semantics, you do not have a safety mechanism at all.

> There is no 'evaluative indirection' because a macro is a _compiler_ and the underlying code can be extremely alien to the DSL semantics.

This is a trivial contradiction. That is precisely evaluative indirection. Yes, stacking multiple compilers on top of each other, especially when their semantics are non-isomorphic, is a massive burden of mental overhead. Given you already have this problem with the mapping between Lisp and binaries, adding even more complicated layers on top of it is a recipe for disaster. Particularly because: you are going to make mistakes in your logic. Macros provide no means to stop you from blowing your own leg off when writing them. That is not what they are designed for.

Finally, you cannot escape the awkwardness of the underlying metaprogramming system, you will always have to wrestle with quotation and quasiquotation. You have to define a DSL before you can use it.

Only at the point in which you treat and use Lisp like an unserious toy, rather than the powerful tool that it is, can the fantasy of "macros are a safety mechanism" begin to make sense.
ux266478
·13 godzin temu·discuss
> where an abundance of complicated mathematical formulae are necessary

I think what you mean to say is, a lot of linear algebra is involved. So multi-dimensional structures like matrices and vectors are expected to have linear arithmetic operators defined over them, because they're used quite a lot.

You don't need operator overloading for that. Your language should be providing them as primitive structures and extending operators over them. Think like how C has a polymorphic addition, where '+' doesn't discriminate between integers, pointers and floats.

There are a lot of problems with user-facing operator overloading, but I think Haskell is actually a really great example of how to do it sanely. At the point in which you have type-families, you can properly restrict the semantic domain of a polymorphic function but still keep it an open set. The addition operator being restricted over types belonging to the Num type-family as an example trivially allows you to use '+' for matrix addition.

https://hackage-content.haskell.org/package/matrix-0.3.6.4/d...

Now you've avoided the worst part of user-facing operator overloading (juniors creating incoherent DSLs by abusing the mechanism) while still providing the mechanism where it's useful.
ux266478
·wczoraj·discuss
Generally speaking, the pain of handling hot patching depends highly on the structure of your codebase and the reason for hot patching to begin with. For a structure-of-arrays architecture, or for fixing logic errors at run-time, it's really no big deal at all.

It is limited utility, but if you start out from the mindset it's something you'll use a lot, those limitations start disappearing rather quickly.
ux266478
·wczoraj·discuss
In an awkward, error-prone, non-mathematically rigorous and easily subverted manner. That whole "make invalid states unrepresentable" thing relies upon the fact the semantic structures you're doing it with can't be shadowed silently by other parts of the code, and the safety constraint itself is guaranteed to be completely pure and deterministic. Lisp macros and reader macros fail at that criteria. They aren't any different from any other collection of procedures and their collective interface. Actually, they're a fair bit worse since the natural cognitive overhead from juggling multiple layers of evaluative indirection lends itself to blindspots of edge cases and unsoundness.

I think "macros are a safety mechanism" might qualify for the top 3 "new lisper mania" things I've ever read.
ux266478
·4 dni temu·discuss
> Can sliding windows be properly insulated?

Yes. Beyond that, if they didn't work they wouldn't be used. Continental climates get much colder than pretty much anywhere in Europe, outside of a select few areas.

> In general cold is a bigger deal in Europe than warmth, and will continue to be so.

Masonry is a bad match for cold. The structure acts as a high velocity heat conduit and the earth eats all the heat you produce. Europe's winters (in general) are extremely mild, arguably even more so than its summers.
ux266478
·4 dni temu·discuss
It's coming from all over. It always has. It was understandably never so visible for people who don't hang out in casual international spaces, but it's not new and it's not owned by anyone. The reason it's so compelling isn't actually the lack of AC, it's because it's an easy button to push that gets people living in certain countries very defensive over something rather trivial.

I mean the lack of AC is definitely weird for a developed country, and the deflections about mild climate certainly aren't a posteriori, but it's the defensiveness and cope that makes it a button worth pushing in the first place.
ux266478
·4 dni temu·discuss
> is just a stupid republican talking point

> As everything that comes out of republicans

It's an old bit of banter that the world over has thrown at certain European countries (including other European countries). Giving American republicans custody of it because of an explosive penetration into the mainstream in the last few weeks is ridiculous.

I would highly recommend not legitimizing the American political system so readily.
ux266478
·4 dni temu·discuss
It's more than just a grammar. But specifically on that note, I'm assuming you know a POSIX Shell language. Spend some time with Forth and ask yourself if these are experientially the same thing.

Equifinality is extremely misleading.
ux266478
·4 dni temu·discuss
Wow, three pieces of software I don't use for other reasons, just gained a new reason to evangelize against them!
ux266478
·5 dni temu·discuss
> Same deal with games, there's more experimentation and interesting concepts in gaming than ever before, but not from the AAA studios.

I just wanted to add on to this, I wouldn't really classify modern games as "lower quality" than those of the 80s. I'm really not a fan of AAA games, I think the last one I played was Elden Ring, but I would never suggest that they're actively low quality. Uncompelling? Absolutely. But I also have spent a lot of time playing games from the 80s. Silver and golden age CRPGs, random simulators, DOS games that catch my eye. "Quality" isn't the first thing that jumps to my mind. Often they're ugly, terribly balanced, buggy, rife with all sorts of issues in any category you can think of. Games have come a very, very long way. 2400 AD (1988) and Champions of Krynn (1990) are relatively speaking highly polished masterpieces. They're still kusoge, honestly. I have very little experience with the consoles of that era, because pretty much nothing I see even remotely catches my eye.
ux266478
·5 dni temu·discuss
LLMs might be the least interesting of the statistical models for creative purposes, they're kind of nasty to work with. Creating low rank adaptations is slow and expensive because the models are so fat, and meddling with the inference flow is a much more explosive game of cat and mouse. You can tell Flux where colors, shapes, textures, etc. should live on a canvas. Trying to wrangle an LLM into "spatially/temporally" arranging text in accordance with a writing style is a nightmare and a half. It's complicated, I can't really explain it well. Probably because I still haven't been able to put in the time to figure out the "grain" of pure text transformers. I can tell you that they're very hard to work with, though.

The simple fact of the matter is that these things are best viewed as a computer implementing a continuous form of computation. If you can understand the following words: "the function between function 1 and function 2 is function 1.5" and can imagine that this is a process with "infinite" descent, where you can continue to pull functions halfway between other functions trivially, that's a pretty great mental model to have. To that end, using them is like operating a big, complicated radio setup. Or a huge collection of synthesizers and filters. You're essentially tuning in to a structure. It can't help you figure out what structure you should reach for, or what you should do with that structure.

The creativity doesn't come from the tool itself. If you were only capable of having a mediocre body of work before, they aren't going to help you after. There is no removing human brilliance from the equation. AI is immensely exciting for what it promises, there is something genuinely new and interesting here, but it's not a crutch for the untalented. That's how it's getting sold, and it's having a massive disservice done to it. What we have is a genuinely new space to pioneer in. The interesting stuff and compelling art isn't going to be found at the end of a however-many-word positive prompt, but a symphony of total control over the model itself. Drawing 50 original works for the purpose of fine-tuning a diffusion model for a single project, and only as one particular component of the fully customized inference workflow, which will be scrapped when the project is completed. That's what artistic usage of statistical models looks like. The construction of a specific program for a specific purpose. Anything else is fantasy. The model can't give you that purpose.
ux266478
·5 dni temu·discuss
> But ask it anything and it returns the most probable continuation — the center of mass of everything already written. Trained on the past, it answers in the past tense of thought. Not what is true. What is typical.

The problem is that this is a contradiction, and a pretty common misunderstanding. When we talk about something being probable, we're talking about what we don't know. When you extrapolate, you're saying something about the unknown, you're creating something new. While you can extrapolate into the past or the future, in the way this line is talking, it's answering in a future tense. I think even worse is that beneath this it says

> returned at the speed of certainty

At that point we're no longer talking about probabilities!

The problem isn't that these machines aren't capable of making new things. The whole of their mathematical grounding is in the creation of the unknown from the known. The problem is precisely that they are sold as miracle cures where they can produce great results for little effort. The law of "you get out of it what you put into it" still holds true. Undirected, uninspired usage of these statistical models gets you mediocre at-best results. Without an understanding of the underlying theory and mechanisms of how these models work (it's not just transformers, but any statistical model), driving the whole of the inference chain with maximal control as one might Max/MSP, as well as mastery over the target domain, you will effectively achieve nothing but "slop".

Of course, there's a whole other discussion here, which is that this site seems to be victim to the same grave ignorance that has caused the supposed "crisis of newness" within the arts (which has been talked about for much longer than these models have existed). That's a whole other can of worms, but essentially it's bunk. In modernity we can point to the last century of unending artistic innovation, and panic that this is slowing down, that this is the end of history. In truth, that century is anomalous. It's the most anomalous we've ever recorded, where real material changes were reacted to in real time. The innovations of modernism weren't born because of pretense to being original. It was wholly derived from the changes happening in reality irrespective of the arts, as a result of the industrial revolution, and later the information revolution. The norm in history is centuries of very slow refinement, barely perceptible on the timeline of a generation. Tiny little incremental changes stacked up over a long period of time. Bombastic, revolutionary artistic progress is the anomaly. An unending cacophony of that progress has happened exactly once in the entire history of humanity, as far as we can tell. There is a stupid expectation that the 20th century's breakneck pace was going to last forever. Obviously it wasn't. It was never a sustainable momentum, statistical models or not. People are still in the mindset it's the norm. The languishing over creative bankruptcy is simply the death of this delusional fantasy.
ux266478
·8 dni temu·discuss
> from my limited POV, the LLMs (specifically) and art models are just regurgitating stolen concepts

Formally speaking, it's not the case, though this is commonly misunderstood. Statistical models are definitionally ampliative, otherwise they wouldn't be statistical. One can argue about it until they're blue in the face, but it almost always comes down to a misunderstanding of what the models are, what the mathematics behind them is a description of, and what the underlying logical structures represent.

The thing is that the position and objection to these models isn't actually a substantial, reasoned position where the words have a direct meaning. Though it's dressed up like reason, it's not the point. It's a kind of metaphor. This actually does reflect the nature of intellectual property law. The legal framework is knowingly illogical at an object-level, because the end its seeking is completely divorced from the means. It has to be, because the idea of intellectual property is absolutely unjustifiable in-and-of-itself. It's just a useful legal fiction to make sure people are getting paid by commoditizing ideation. That's not a bad thing, it just means you have to be mindful that bottom-up reason will lead you astray when dealing with it.
ux266478
·10 dni temu·discuss
> Is it humane to leave a patient to die in an ambulance when a single-payer nationalized healthcare system is over capacity?

I think painting the inhumanity of that as a consequence of the structure of the healthcare system is disengenuous at best, especially as the implicit solution you're proposing is to artificially lower utilization rate and access. Deflecting patient deaths into "technically not our fault, they didn't try to get help" by exploiting economics is in no small terms extremely inhumane.

The answer to that is that near universally in the world, our labor pool of medical personnel is too small, and almost all of it has to deal with an arbitrary restriction of labor supply. Stupidly, I have felt this many times in America, so trivially it's a problem no matter the structure of the healthcare system. Optimizing towards maximizing the number of nurses, doctors, pharmacists, the whole spread, in a society is underdiscussed but obviously beneficial (for everybody but those who profit off of the labor scarcity)
ux266478
·10 dni temu·discuss
I think it's more nuanced than that. There surely are plenty of cases where that is the case, but it's also a natural effect of hyperfinancialization, which many really do believe to be a "net positive" for the stability it brings. There's also the natural tendency of consolidation and centralization of power, and the natural counter-balance to that has been suppressed. Then you have legislative incompetence, the general failings of scientific governance aggregating over time, and many other structural flaws that are deeply seated and long-running.

We shouldn't just be pointing at the (very much real) stupid greed, there are many rotten components occurring simultaneously.
ux266478
·10 dni temu·discuss
It's not necessarily limited to the ultra wealthy, but outside of a few key areas (as someone mentions, those profiting off of the inflationary spike, those in the real estate market, etc) it is more or less the case, yes.
ux266478
·11 dni temu·discuss
> are there solutions to automatically discover those rules based on past incidences?

While it's not exactly what he did, the answer to this question is yes. That's called inductive logic programming. Essentially you provide background knowledge, positive examples and negative examples, and it spits out a logic program. It's where the frontier of symbolic AI has sat for a hot second now.
ux266478
·11 dni temu·discuss
I'm curious, what inspired the workflow? The usecase strikes me as similar to a usecase I have with the normal Prolog REPL. Why an SQL database instead of of loading/unloading files? Did you run into scaling issues?