For the best experience on desktop, install the Chrome extension to track your reading on news.ycombinator.com
Hacker Newsnew | past | comments | ask | show | jobs | submit | history | more vmchale's commentsregister

Aaron Hsu has an APL compiler targeting GPU that gets tantalizing performance in machine learning: https://dl.acm.org/doi/10.1145/3589246.3595371


>it's unfortunately pretty obscure

NumPy is partly inspired by APL and descendants. One of the few places that programmers commonly get performance afforded by hardware!


I've been impressed but what I've seen of the Phoenix web framework. https://youtu.be/MZvmYaFkNJI

On the F# side:

"Where are the F# jobs? I've checked the various FP-centric job-sites - they're as barren as everywhere else. It almost seems as if Haskell jobs are more plentiful! Haskell!"

https://www.reddit.com/r/fsharp/comments/24layv/where_are_th...


One of my blog posts was posted and got some comments. This is a more refined take in the vein of "C is Not Suited to SIMD"


> perhaps a C compiler only needs to represent that function as an intrinsic instead, to give itself a chance to later replace it either with the function call or some SIMD instruction

I gesture to this in the blog post:

> In C, one writes a function, and it is exported in an object file. To appreciate why this is special, consider sum :: Num a => [a] -> a in Haskell. This function exists only in the context of GHC. > ... > perhaps there are more fluent methods for compilation (and better data structures for export à la object files).


I now realize that I somewhat rephrased what was said in the blog. How strange!


From highway:

> Does what you expect: Highway is a C++ library with carefully-chosen functions that map well to CPU instructions without extensive compiler transformations. The resulting code is more predictable and robust to code changes/compiler updates than autovectorization.

So C compilers are not a good place to start if one wants to write a compiler for an array language (which naturally expresses SIMD calculations). Which is what I point out in the last paragraph of the blog post:

> To some extent this percolates compilers textbooks. Array languages naturally express SIMD calculations; perhaps there are more fluent methods for compilation (and better data structures for export à la object files).


Un flic was great.


It’s objecting to the Cass report, which doesn’t include any new original data or experimental results.

It’s fine to object to bad faith medical publications about an extreme minority, which is being granted authority by the NHS while more benevolent (and rigorous) researchers are being swept under the rug.


It is incredible that people with zero medical expertise continue to attack a 4-year, expert, impartial review - based on 7 peer-reviewed systematic reviews - of the treatment of gender dysphoria in minors. Because they want distressed teens to be given drugs instead of therapy.


backtracking is perilous in general; logic programming languages have really nice abilities for such but I don't know how to avoid pathological inefficiency.


With memoization as in tabling (a.k.a. SLG-Resolution):

https://www.swi-prolog.org/pldoc/man?section=tabling

Re-evaluation of a tabled predicate is avoided by memoizing the answers. This can realise huge performance enhancements as illustrated in section 7.1. It also comes with two downsides: the memoized answers are not automatically updated or invalidated if the world (set of predicates on which the answers depend) changes and the answer tables must be stored (in memory).

Known to the Prolog community since about the 1980's if I got my references right.


Girard has some commentary scattered about his writing.

The search algorithms for logic programming are simply slow, it's a very interesting idea in programming languages, but there's a reason it's not widely used.

> PROLOG, its misery. Logic programming was bound to failure, not be- cause of a want of quality, but because of its exaggerations. Indeed, the slogan was something like « pose the question, PROLOG will do the rest ». This paradigm of declarative programming, based on a « generic » algorithmics, is a sort of all-terrain vehicle, capable of doing everything and therefore doing everything badly. It would have been more reasonable to confine PROLOG to tasks for which it is well-adapted, e.g., the maintenance of data bases.

> On the contrary, attempts were made to improve its efficiency. Thus, as systematic search was too costly, « control » primitives, of the style « don’t try this possibility if... » were introduced. And this slogan « logic + control13 », which forgets that the starting point was the logical soundness of the deduction. What can be said of this control which plays against logic14? One recognises the sectarian attitude that we exposed several times: the logic of the idea kills the idea.

> The result is the most inefficient language ever designed; thus, PROLOG is very sensitive to the order in which the clauses (axioms) have been written.


This is a great quote and sadly true. What text is this from?


For me this kind of criticism is very familiar. It comes from theoretical computer scientists who have these purist ideological convictions about how a declarative language should look and behave, that are as unrealistic, because impossible to implement on a real-world computer, as they are uninteresting for practicing programmers because strictly a matter of aesthetics. Such critics have never made anything useable themselves and are simply angry that someone else made something that works in the real world while they were busy intellectually masturbating over their pure and untouchable vision.

Although I concede that my comment might be a bit unfair to Girard who did, after all, invent the mustard watch.


This comment is idiotic.


No, what's idiotic is the trite bullshit in the quote in the GP's comment- and from a logician from Aix-Marseille, no less!

Prolog is "well adapted" to the "maintenance of databases". The only reason this nonsense keeps being repeated is because Prolog programs are stored as rows in a database. It's like people look at a list of keywords, pick out "database" and go "ah, so Prolog is a language for databases". Zero understanding of what the database is in there for: because your program and your data are one.

Or take the "attempts" that "were made to improve its efficiency". What the illustrious academic is kvetching about here is the cut (!/0) an extra-logical construct used in Prolog to cut choice points (like markers in program state where execution backtracks to) and so lets the programmer control the program. Again, what we seem to have here is a bingo-card understanding of Prolog: someone wrote down the keyword "control", the academic looked at the cut and thought "ah, that's what 'control' means!". No, it means that an algorithm can be thought of as logic, that is always the same, and control, that depends on the executing machine. That's what "algorithm = logic + control" means, not that you get to cut choice points with a "control" structure.

That's what's idiotic, and btw that's the common misunderstandings that clueless Prolog "critics" have been making since forever. It's trite, tired, boring bullshit that makes it clear the "critic" has no idea what they're talking about and are just looking for something to say to show they're knowledgeable and smart.


"The Blind Spot: Lectures on Logic" by Jean-Yves Girard


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search:

HN For You