HackerTrans
TopNewTrendsCommentsPastAskShowJobs

shawa_a_a

no profile record

Submissions

Show HN: Xlerb – A Compiled "Forth" for the Beam

6 points·by shawa_a_a·8 miesięcy temu·0 comments

Tube: A subway route planner in Dyalog APL (2011)

dfns.dyalog.com
23 points·by shawa_a_a·8 miesięcy temu·4 comments

Show HN: Reviving a 20 year old OS X App

andrewshaw.nl
73 points·by shawa_a_a·w zeszłym roku·32 comments

comments

shawa_a_a
·9 miesięcy temu·discuss
It's been a long time since I've programmed Prolog so I'm not sure if these ideas are even relevant (global state might be more than enough!) ; but at first impressions from the readme this really reminds me of ETS

https://www.erlang.org/doc/apps/stdlib/ets.html

Essentially system-global state under named tables.

Have/did you consider having named `env` instances? This would allow for say, feature flags to be kept in a `features` set of relations.

You could also draw from Erlang's 'match specs' and query with a predicate over the keys.
shawa_a_a
·9 miesięcy temu·discuss
I think that's going to be hard to find, depending on your definition of 'regular', tbh.

The BEAM's grown up along with Erlang and so the culture and optimisations are built up all around function application, list processing, recursion, and pattern matching etc.

https://github.com/llaisdy/beam_languages is a decent list of the diverse languages that have been implemented on it, but nothing quite like 'regular for and while loops'.

The BEAM itself is a plain aul register machine though, so it could be done!

https://www.erlang.org/blog/a-brief-beam-primer/
shawa_a_a
·9 miesięcy temu·discuss
They're probably using some features of LiveView; I'm not too familiar with how HTMX works, but with LiveView you can define all of your logic and state handling on the _backend_, with page diffs pushed to the client over a websocket channel (all handled out of the box).

It comes with some tradeoffs compared to fully client-side state, but it's a really comfortable paradigm to program in, especially if you're not from a frontend background, and really clicks with the wider Elixir/Erlang problem solving approach.

https://hexdocs.pm/phoenix_live_view/js-interop.html#handlin...

Hooks let you do things like have your DOM update live, but then layer on some JS in response.

For example you could define a custom `<chart>` component, which is inserted into the DOM with `data-points=[...]`, and have a hook then 'hydrate' it with e.g. a D3 or VegaLite plot.

Since Phoenix/LiveView is handling the state, your JS needs only be concerned about that last-mile JS integration; no need to pair it with another virtual DOM / state management system.

https://hexdocs.pm/phoenix_live_view/js-interop.html#client-...
shawa_a_a
·11 miesięcy temu·discuss
For BEAM MCP you probably want to look at TideWave, which runs _in your application_ to give the LLM context and an execution environment.

https://hexdocs.pm/tidewave/mcp.html
shawa_a_a
·11 miesięcy temu·discuss
I've heard of domain fronting, where you host something on a subdomain of a large provider like Azure or Amazon. Is this what you're talking about when you say

> - Host on a piece of infrastructure that's so big that you can't effectively block it without causing a major internet outage (think: S3, Cloudflare R2, etc).

How can one bounce VPN traffic through S3? Or are you just talking about hosting client software, ingress IP address lists, etc?
shawa_a_a
·11 miesięcy temu·discuss
Surprised to not see Acko.net mentioned in comments already - he uses similar aids in one of his blog posts to break down complex numbers and ultimately fractals.

Likely right up your street!

https://acko.net/blog/how-to-fold-a-julia-fractal/
shawa_a_a
·12 miesięcy temu·discuss
Agreed - updated with colour again
shawa_a_a
·12 miesięcy temu·discuss
It’s not the most accessible colour scheme - I’ll have a look and tweak it so dark mode is more readable.

I’d definitely be really grateful for help with that! I’m not planning to publish to the Mac App Store, but it would be great to have the build step a bit more compliant with current practises.
shawa_a_a
·12 miesięcy temu·discuss
Since going down this rabbit hole, I gave Anki another fair shot and actually RTFM :) the blog post warrants an update

https://docs.ankiweb.net/deck-options.html#learning-steps Details what _actually happens_ when you pick again/hard/good etc. I much prefer understanding this to the vibes-based approach of “did you pause before answering”.

Secondly turns out you can indeed very easily set up type-to-answer in a deck by editing the front template and adding

{type:Field}

where field is the answer part of the card’s data.

So… I’m actually using Anki again. I’m still very happy I did this, it was a fun little journey!