Better HN
topnewbestaskshowjobs
Log inSign up

jose_zap

603 karma · joined Apr 15, 2014 (12y ago) · 157 submissions

Submissions

comment 1d ago · link · parent

it served as the foundational idea for clash https://clash-lang.org

comment 1w ago · link · parent

It is definitely possible for incremental compilation, but requires more work in that area. It is possible today in interpreter mode.

comment 1w ago · link · parent

Embedded toolchain and/or HAL/register map:

- Copilot (by NASA)

- MicroHs — for running Haskell on an MCU

GUI library and/or basic keyboard/mouse I/O:

- Monomer

- sdl2

- gi-gtk4

GPU interaction library

- OpenGL bindings

- vulkan bindnigs

- Accelerate — numerical GPU computation with an NVIDIA backend.

Web framework with database access, auth, users, routing, and templates:

- IHP

- Yesod

comment 1w ago · link · parent

Yet, "short feedback loops with highly localized errors" is exactly what Haskell is. You can start Haskell in interpreter mode (ghci) and you get instant feedback. Errors are always localized. Although my experience with claude in the last few months shows that it rarely hits a compilation error at all.

comment 1mo ago · link · parent

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.

comment 2mo ago · link · parent

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.

comment 2mo ago · link · parent

That’s how perception works. We only see what we want to see, and discard or explain away the rest.

comment 3mo ago · link · parent

Si by by

comment 6mo ago · link · parent

> 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.

comment 7mo ago · link · parent

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

comment 8mo ago · link · parent

No, it can be any pure function or IO. Both will get interrupted.

12.

Using Haskell in Production(agentultra.com ↗)

22 points · by jose_zap · 1y ago · discuss

comment 1y ago · link · parent

Haskell would be one of them. It features transactional memory, which frees the programmer from having to think about explicitly locking.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

> 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.

comment 1y ago · link · parent

Interestingly, the naive solution presented in this article is O(n) thanks to laziness.

comment 1y ago · link · parent

That’s floating point, though. Not Double. Floating point has the same gotchas in all languages because it is a defined standard.

comment 1y ago · link · parent

Haskell has & which goes the other way:

    users
      & map validate
      & catMaybes
      & mapM persist

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

We do that at our company, it's been great

comment 2y ago · link · parent

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

comment 2y ago · link · parent

> 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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

123456