HNHacker News
TopNewBestAskShowJobs

jose_zap

592 karma · joined April 15, 2014

submissionscomments
jose_zap··on Types of types: Haskell's Kind system
We use Haskell for work. It is very obvious for us now that Haskell outshines other languages precisely for the task of reaching out to the messy world. You get it right once and you never have to look at it again.

This is due to how it easily lends itself to transforming unstructured inputs into structured outputs, and also because of its amazing asynchronous programming model.

jose_zap··on I spent $220 on Google app ads and 60% of the installs were robots
That’s funny. I reported that same ad last week to Google and got an email this morning saying that they were not violating any terms.
jose_zap··on Bug Blindness
That’s how perception works. We only see what we want to see, and discard or explain away the rest.
jose_zap··on Progressive Web Components
Si by by
jose_zap··on Haskell Foundation 2026 Update
> the tooling is decades behind, say, Rust or Go

That's definitely not true, even if that was true maybe 6 years ago. As someone who's uses Haskell daily and also many other languages, I can see Haskell's tooling as more advanced than many others.

jose_zap··on Statecharts: hierarchical state machines
We have been using statecharts at our company for all business processes after I wrote an interpreter for them inside Postgres.

It has been a great experience so darn it makes processes very resilient against change and very easy to come back to after years.

The library is open source too:

https://github.com/kronor-io/statecharts

jose_zap··on What canceled my Go context?
No, it can be any pure function or IO. Both will get interrupted.
jose_zap··on Go is still not good
Haskell would be one of them. It features transactional memory, which frees the programmer from having to think about explicitly locking.
jose_zap··on Solving `Passport Application` with Haskell
That was definitely true many years ago. Nowadays Haskell has some really good tooling.

It has a feature-rich LSP, code formatter, package manager, dead-code checker, configurable linter, thread debugger, memory debugger, vulnerabilities checker, and much more.

That’s just what is provided by external tooling. Then, it also has everything the compiler has to offer, which is bit more than what most languages do. For example, you can now compile to JavaScript or WASM.

jose_zap··on OpenAI: Scaling PostgreSQL to the Next Level
> Postgres offers strictly serializable isolation indeed, but IIUC it's basically a form of read locking so will tank performance.

It will not. We use it at work for all transactions and its is very performant.

jose_zap··on Silly job interview questions in Haskell
Interestingly, the naive solution presented in this article is O(n) thanks to laziness.
jose_zap··on Ask HN: Is there any programming language that doesn't have WTFs?
That’s floating point, though. Not Double. Floating point has the same gotchas in all languages because it is a defined standard.
jose_zap··on Pipelining might be my favorite programming language feature
Haskell has & which goes the other way:

    users
      & map validate
      & catMaybes
      & mapM persist
jose_zap··on Goodbye API. Hello RSQL
The screenshot looks like a copy of the hasura web console. The same looks also similar to Hasura’s internal RQL. I wonder if this is just a coincidence.
jose_zap··on Why Haskell?
Yes, it is possible to linearize it. You can, for example use do notation:

    result <- do
        a <- someEitherValue
        b <- anotherEitherValue
        return (doStuff a b)
In the above example the do notation will unwrap the values as an and b, but if one of the results is Left, the computation is aborted, returning the Left value.

This is one just of the many techniques available to make error checking linear.

jose_zap··on Why Haskell?
We do that at our company, it's been great
jose_zap··on Venezuela's Supreme Court certifies Maduro's claims he won presidential election
The UN Human Rights Council issued a warning that its independent fact finding mission found that the Supreme Court lacks independence, and therefore cannot be trusted in this matter.

https://x.com/UN_HRC/status/1826624015097888919

jose_zap··on Go is my hammer, and everything is a nail
> imagine being able to insert `print(a)` into your program to see what's in the `a` variable at a specific time. Hey, I know that's not pure, but it's still damn useful.

In Haskell that’s Debug.Trace.traceShow. You can use it in pure code too.

jose_zap··on Suspicious data pattern in recent Venezuelan election
Here’s a FAQ about the security features of the voting machines https://www.smartmatic.com/wp-content/uploads/2022/11/FAQ_Cy...

I also agree the parties should disclose the public key and the parameters to calculate the hash.

The code and the keys are stored in a database that is audited by political parties before the election. What I’m not certain about is whether they have access to it at this time.

Proving the validity of the acts should be trivial, especially for any party who had access to the audited database. There is little point in forging fake ones.

jose_zap··on Suspicious data pattern in recent Venezuelan election
Witnesses representing political parties are entitled by law to a copy of the tally before the machine sends its results to a central server.

Each copy must be signed by all witnesses and also contains a digitally-signed hash of the tally at the bottom of the receipt.

jose_zap··on Suspicious data pattern in recent Venezuelan election
There is no need to do any difficult OCR, the QR code contains the tally in machine-readable format. You just need a phone and copy the result to a csv file
jose_zap··on Suspicious data pattern in recent Venezuelan election
The images can be corroborated by the random string that is printed at the bottom. It’s a digitally signed hash of the tally for that machine.

Political parties have access to the signing key and can verify that the signature matches.

jose_zap··on Suspicious data pattern in recent Venezuelan election
The electoral system in Venezuela mandates electronic voting. By law, each machine must print its results before sending the tally to a central server.

Multiple copies are printed. One goes to the CNE, another goes to the military, and several others are given to witnesses representing different political parties.

Each copy must be signed by all the witnesses, including the representative from the CNE.

The opposition candidate gathered as much as 80% of the total printouts and made them available for everyone to see and analyze.

Printouts can be validated because the result is digitally signed with a key that is known to the political parties and other organizations. The signature is at the end of each printout.

jose_zap··on Ask HN: What tool(s) do you use to code review and deploy SQL scripts?
We use https://sqitch.org/ and we’re fairly happy with it. Sqitch manages the files to deploy which are applied fits to a local database.

We use GitHub actions for deployment and database migrations are just one step of the pipeline. The step invokes sqitch deploy which runs all the pending migration files.

Then, all the approval process is standard for the environment. We require approvals in pull requests before merging to the main branch.

jose_zap··on Harvard concluded that a dishonesty expert committed misconduct
Researchers should tick a checkbox “I swear I did not hack the data” before submitting a paper to a peer-reviewed journal to prevent this kind of misconduct.
jose_zap··on The day I canceled my Spotify subscription
Yes, it has happened to me on Spotify multiple times. More often, they change a song with a different version (e.g. same song from a different album or recorded live performance)
jose_zap··on Why Haskell?
The service looks very interesting
jose_zap··on Should I Haskell or OCaml?
Haskell. It has a bigger ecosystem, although nowhere close to python’s
jose_zap··on Maybe Rust isn’t a good tool for massively concurrent, userspace software
That’s how Haskell async works. You mark the call as async, not the function itself.
jose_zap··on The Meaning of Monad in MonadTrans
I work at one of those fintech companies using Haskell in production.

Hiring was actually Haskell’s strong side. I managed to hire 6 engineers in only one month. There were more than 50 applicants to the position. Just the idea of using Haskell in production is attractive to many.

It’s been a great experience overall. I worked at a python company before this one and it’s been refreshing not having unexpected runtime errors. Moving money around requires more robustness than your typical app.

Page 1 of 4Next →