Hacker Newsnew | past | comments | ask | show | jobs | submit | conroy's commentslogin

https://gleam.run/ - Gleam is a friendly language for building type-safe systems that scale!


What is the benefit over Elixir?


Static type checking and Gleam can compile to JavaScript. Gleam and Elixir can be mixed in the same project too, so it’s easy to start adding Gleam to an elixir code base or use Elixir libraries in Gleam.


As an elixir dev I'm jealous that gleam can transpile to JS as a target. Must make so interesting things possible.


For elixir, check out https://hologram.page/


Yea, I have seen that and its an interesting library but doesnt feel as integrated as in Gleam


Could you elaborate on what you mean by "not as integrated as in Gleam"? Are you referring to Hologram being a framework/library rather than a language-level feature? Or is it more about the developer experience - like tooling, compilation workflow, or how seamlessly it fits into the Elixir ecosystem compared to Gleam's native JS transpilation? I'd love to understand your perspective better so we can potentially improve that integration feel!


Indeed! Please check out this project I made to basically make the server an extension of the front end by having it reply to client side ui messages:

https://github.com/weedonandscott/omnimessage


Strong typing built in from the start. More approachable syntax (unless you are used to Ruby).


Static typing. Elixir already has strong typing (no implicit conversions).


Maintainer of sqlc here. Thanks for the kind words! I'm considering switching to the sqlx model of talking to a running database simply because trying to re-implement PostgreSQL internals has been a huge challenge. It works for most queries, but for the long tail of features, it's a losing battle.

Can you tell me why it's a non-starter for you?


I think it's only a non-starter for me in SQLx if not using query caching. Caching makes the situation workable.

For sqlc, it isn't really a big problem because you only need to run the code generation when you're actually modifying database things. Still, with that having been said, I think just passing a database URI and having analysis work based on that is unideal. Using an actual database isn't a huge problem, but having to manage the database instance out of band is the part that I think isn't great, because it allows for the schema in the code to trivially desync with the schema used in analysis. If I used SQLx I'd probably be compelled to try to wire up a solution that spawns the database and migrates it up hermetically for the caching part. Likewise if I used this mode of sqlc.

I guess it might be possible for sqlc to add first class support for that sort of concept, but I can see holes in it. For one thing, you have to figure out where to grab binaries from and what version. An approach using Docker/Podman works, and at least partly solves this problem because you could allow specifying any OCI image, but that has caveats too, like requiring Docker or Podman to be installed. The most heroic effort would be to use some kind of solution using WASM builds of database engines: pulling down and running something like PGlite in process seems like it would be an almost ideal solution, but it sticks you to whatever things can actually be made to work in WASM in terms of features, extensions and versions, at least unless/until database servers and extension vendors miraculously decide that supporting WASM as a target is a good idea. Still, if you want some crazy ideas for how to make the UX better, I think either the Docker approach or the WASM approach could be made to work to some degree.

Barring that, though, I'd be most likely to have some kind of Docker setup for running sqlc with an ephemeral database instance. It's not pretty, but it works...

I don't think it would be a non-starter, though. I only really think that connecting to the database from within rustc invocations is a non-starter.


We're in us-west-1 and seeing issues across Cloud Run, Cloud SQL, Cloud Storage and Compute Engine.


you'd be surprised, but there's actually a bunch of problems you can solve with something like this, as long as you have a safe place to run the generated code


I was super interested in genetic programming for a long time. It is similarly non-deterministically generated.

The utility lies in having the proper framework for a fitness function (how to choose if the generated code is healthy or needs iterations). I used whether it threw any interpretation-time errors, run-time errors, and whether it passed all of the unit tests as a fitness function.

That said, I think programming will largely evolve into the senior programmer defining a strategy and LLM agents or an intern/junior dev implementing the tactics.


> That said, I think programming will largely evolve into the senior programmer defining a strategy and LLM agents or an intern/junior dev implementing the tactics.

That's basically what goog wants alphaevolve to be. Basically have domain experts give out tasks that "search a space of ideas" and come up with either novel things, improved algorithms or limits / constraints on the problem space. They say that they imagine a world where you "give it some tasks", come back later, and check on what it has produced.

As long as you can have a definition of a broad idea and some quantifiable way to sort results, this might work.


> The utility lies in having the proper framework for a fitness function

Exactly. As always the challenge is (1) deciding what the computer should do, (2) telling the computer to do it, and (3) verifying the computer did what you meant. A perfect fitness function is a perfect specification is a perfect program.


Could you elaborate what problems can be solved with this?


Riza | San Francisco | Full-Time | System, Backend, and Full-Stack Engineers | https://riza.io

We provide isolated runtimes for executing untrusted code, mostly generated by LLMs. Our sandboxing is powered by a combination of WebAssembly, V8, and microVMs. Our customers do things like extract data from log lines at run time by asking claude-3-7-sonnet to generate a parsing function on-the-fly and then sending it to us for execution.

Things we need help with:

- Our API (https://docs.riza.io/) (Postgres / Go)

- Our account dashboard (Postgres / Go / React / TypeScript)

- Our code execution engine (Go / Rust)

- New products including code generation workflows (Anthropic / OpenAI experience a plus)

We’ve raised seed money, but the whole company is currently just me, Andrew and David working out of a converted warehouse on Alabama St. We’re second-time founders, so we know the risk we’re asking you to take and we’re prepared to compensate accordingly.

See open roles and apply here: https://jobs.ashbyhq.com/riza


Remote MCP servers are still in a strange space. Anthropic updated the MCP spec about a month ago with a new Streamable HTTP transport, but it doesn't appear that Claude supports that transport yet.

When I hooked up our remote MCP server, Claude sends a GET request to the endpoint. According to the spec, clients that want to support both transports should first attempt to POST an InitializeRequest to the server URL. If that returns a 4xx, it should then assume the SSE integration.


Claude Desktop doesn't support resources without directly importing them and now they've taken the button away for that and tools so I have to build the status of them into a tool so I could see what was loading and what wasn't.

Here's my tool for Desktop: https://github.com/kordless/EvolveMCP


Riza | San Francisco | Full-Time | System, Backend, and Full-Stack Engineers | https://riza.io

We provide isolated runtimes for executing untrusted code, mostly generated by LLMs. Our sandboxing is powered by a combination of WebAssembly, V8, and microVMs. Our customers do things like extract data from log lines at run time by asking claude-3-7-sonnet to generate a parsing function on-the-fly and then sending it to us for execution.

Things we need help with:

- Our API (https://docs.riza.io/) (Postgres / Go)

- Our account dashboard (Postgres / Go / React / TypeScript)

- Our code execution engine (Go / Rust)

- New products including code generation workflows (Anthropic / OpenAI experience a plus)

We’ve raised seed money, but the whole company is currently just me, Andrew and David working out of a converted warehouse on Alabama St. We’re second-time founders, so we know the risk we’re asking you to take and we’re prepared to compensate accordingly.

See open roles and apply here: https://jobs.ashbyhq.com/riza


Did a crazy thing and adopted Bazel for our two person company. Took a while to get everything working, but the average build takes about 30 seconds to run, across Go / Rust / TypeScript.


wasmtime works as long as you make sure to include the lib directory

    % wasmtime run --dir .::/ python.wasm -c 'print("hello world")'
    hello world 
disclaimer: I run a code execution API service (https://riza.io/playground) that does this and more (HTTP, packages, etc.)


Wow that's almost what I want.

    wget https://github.com/brettcannon/cpython-wasi-build/releases/download/v3.13.0/python-3.13.0-wasi_sdk-24.zip
    unzip python-3.13.0-wasi_sdk-24.zip
    wasmtime run --dir .::/ python.wasm -c 'print("hello world")'
So far so good! But... it looks like that --dir option mounts the current directory as both readable and writable:

    wasmtime run --dir .::/ python.wasm -c 'print(len(open("python.wasm", "rb").read()))'
    # Outputs 28775526
But malicious code can break the system like this:

    wasmtime run --dir .::/ python.wasm -c 'open("python.wasm", "wb").write(b"blah")'
And now it fails with an error if you try to run it because we over-wrote python.wasm. Even if I move python.wasm out of the current directory I'd still be able to break things by breaking those other lib files.

Although... I guess I could use unix filesystem permissions to make those read-only? That could work.


This is just a limitation of the wasmtime CLI. The full Rust API let's you mount filesystems as read-only. Not sure why it's not exposed as an argument.


Thanks - I just found an open issue for exposing that in the Python API: https://github.com/bytecodealliance/wasmtime-py/issues/251


You might need to wrap the wasmtime command in firejail or bubblewrap with appropriate arguments to get the operation restrictions you want.


While that might be a workable stop gap, there is zero reason why this couldn’t be handle in the wasi shim layer. This is exactly what wasi was designed for.


s/disclaimer/shameless plug/ :P Nothing wrong with it, but not really a disclaimer.


> .::/

whats this magic


Wild speculation based on very little understanding of WASI/WASM:

Perhaps "--dir .::/" means treat the host directory "." as the guest directory "/"?


Make sure you're looking at the new schedules (https://www.caltrain.com/media/33909) which go into effect on September 21 of this year. The slowest trips between SF and Sunnyvale are ~65 minutes and the fastest is ~50 minutes.


Thanks, missed that in my efforts.


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

Search: