HNHacker News
TopNewBestAskShowJobs

vmchale

902 karma · joined June 14, 2017

submissionscomments
vmchale··on C is not suited to SIMD (2019)
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).

vmchale··on Alain Delon has died
Un flic was great.
vmchale··on Research into trans medicine has been manipulated?
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.

vmchale··on Ask HN: What's Prolog like in 2024?
backtracking is perilous in general; logic programming languages have really nice abilities for such but I don't know how to avoid pathological inefficiency.
vmchale··on Ask HN: What's Prolog like in 2024?
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.

vmchale··on US drug control agency will move to reclassify marijuana
SE Asia/East Asia at least have much harsher attitudes on drugs. US is pretty forgiving to drug users &c.
vmchale··on Why SQLite Uses Bytecode
APL interpreters are tree-walking, but they're backed by C procedures. Then GCC optimizes quite well and you get excellent performance! With stuff like vector instructions.

Getting on par with GCC/Clang with your own JIT is pretty hefty.

vmchale··on Ask HN: Which books/resources to understand modern Assembler?
I wrote a blog post on writing a JIT that can handle FFI calls: http://blog.vmchale.com/article/jit

If you want the full monty, I think you'll have to read the LLVM documentation on JIT linking: https://llvm.org/docs/JITLink.html

I haven't found any academic papers or tutorials on JIT linking, unfortunately.

vmchale··on Friends don't let friends export to CSV
its parser is buggy! https://github.com/BurntSushi/xsv/issues/337

(I ran into this issue myself)

vmchale··on What is remarkable about Germany is productivity: wealthiness vs. worktime
Things have diverged for the US and Europe pretty significantly post-pandemic. I'd be curious to see updated data.
vmchale··on How the media industry keeps losing the future
Newspapers were funded by classifieds at their peak.

It's always been about advertising!

vmchale··on Extending Rust's Effect System
> We've added major features such as the try operator (?), const generics, generic associated types (GATs), and of course: async/.await. Out of those four features, three are what can be considered to be "effects".

I wouldn't call the try operator an effect, Result is a monad but it's quite different from the I/O monad in Haskell

vmchale··on Germany's days as an industrial superpower are coming to an end
Shutting down nuclear plants surely couldn't have helped.
vmchale··on Calling System Functions in a JIT
See also LLVM's data structures for more experienced handling of JITs: https://llvm.org/docs/JITLink.html#introduction
vmchale··on 15-150: Principles of Functional Programming
It is statically typed, there's a lot of depth to that side of things (Curry-Howard isomorphism)
vmchale··on Mojo is now available on Mac
> People use numpy because python is stupidly slow.

People use Python because numpy isn't slow! It works quite well for its domain.

vmchale··on Ask HN: Why did Python win?
Python manages to have decent performance because NumPy uses an APL-like model and it happens to skirt the design flaws (dynamic typing, interpreted). J for instance has a tree-walking interpreter written in C that performs well!

Ruby's poor performance hobbles it even in places it's supposed to be good (twitter was rewritten to Scala over rails).

vmchale··on Patterns: Exhaustiveness, Unconditionality, and Remainder
Sum types are much more useful with pattern match exhaustiveness checking for sure.
vmchale··on Why I Use Elm in 2023
The core team refuses to fix straightforward bugs: https://github.com/elm/compiler/issues/1773
vmchale··on Why I Use Elm in 2023
> It is clear that Elm is understaffed, to say the least.

The core team treat bug reports as insults: https://github.com/elm/compiler/issues/1773

vmchale··on Why I Use Elm in 2023
It's not rock-solid nor complete.

The authors refused to fix a parser error related to negative literals: https://github.com/elm/compiler/issues/1773

vmchale··on Astmaker – A DSL in Rust for programming language designers
Having a garbage collector is good in a compiler.
vmchale··on Astmaker – A DSL in Rust for programming language designers
You can define a tree-walking interpreter in an ML just by recursion and pattern matching.
vmchale··on Astmaker – A DSL in Rust for programming language designers
I prefer having a GC, makes things easier. Also a copying GC can be better for some of the stuff you do in a compiler (immutable data structures).
vmchale··on Why and how we retired Elm
https://github.com/elm/compiler/issues/1773
vmchale··on Why and how we retired Elm
If you read more about the Elm community you'll see similar things. Been happening for years! https://dev.to/kspeakman/elm-019-broke-us--khn
vmchale··on Why and how we retired Elm
> I tell myself that it would be rude and ungrateful to the Elm community for me to publicly declare Culture Amp’s departure from the fold

> What We Owe to Elm

Everyone who talks about Elm sounds like they have Stockholm syndrome. Don't think I've seen a single good experience lately.

vmchale··on Extending Python with Rust
Thank you to the author, this is a fun post!
vmchale··on WebAssembly back end merged into GHC
Yes it's quite an unfortunate situation.

Edward Z Yang has a canonical post on this: http://blog.ezyang.com/2016/07/what-template-haskell-gets-wr...

vmchale··on Go 1.19 Released
>This seems like a good case study in rolling your own compiler toolchain from scratch.

They've flouted good sense before too - they only recently started passing function arguments in registers.

Using jump tables to compile pattern matches has been done since the 90s at least.

← PreviousPage 2 of 25Next →