167 karma · joined December 11, 2017
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.
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!
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-...
> - 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?
Likely right up your street!
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.
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!
Using `midiex` for Elixir I’ve written a fully fledged driver for Ableton Push, letting me use it as essentially a 4-deck version of Pioneer’s DDJ-XP2 sub controller with Rekordbox.
It implements basic statefulness so that the rotary encoders can be used, as well as a paging system so the 64 performance pads can be mapped to different functions. It also supports track browsing and loading, which is helpful if you want to use say DVS with an external mixer and don’t want to be hunched over a laptop dragging tracks around.
It’s also got some additional capabilities which I’ve not seen on other hardware like dedicated faders for stem separation levels.
It’s been a great exercise in combing two hobbies, learning about MIDI as well as being able to personalise my setup for my own use. I haven’t open sourced any of it just yet whilst I’m still tweaking things but I’d be interested in collaborating with anyone who also has one of these devices and has programmed it. I’m looking to use the display on it next, whose protocol Ableton have some (albeit scant) documentation for.
https://youtu.be/aXfTgCCsRSg (T=4:30)
The emulating different lenses part is that with this setup you can parametrically collect specific rays bouncing off the object (presumably the angle of the mirror with respect to radius), and the resulting image will be the same as you’d get from a lens with those parameters.
Generally I’d say Elixir’s lack of “hard” static typing is more than made up for what you get from the BEAM VM, OTP, its concurrency model, supervisors etc.
That said if you’re interested in leveraging the platform whilst also programming with types I’d recommend checking out Gleam (https://gleam.run), which I believe uses an HM type system.
x-apple-health://HearingAppPlugin.healthplugin/HearingTest
I wonder if there’s a similar deep link to be found to enable Hearing Aid mode?1: https://www.reddit.com/r/AirpodsPro/comments/1gftyqo/is_the_...
One of the draws to Prolog is its immensely simple syntax: A.R:B = true in your case would be represented as simply r(A, B).
It looks like you've elevated some set theory properties to syntax, and have added some neat sugar over chained relations. Have you found areas where this really shines as compared to writing more standard Prolog/Datalog queries? I'm afraid I couldn't see many examples on first look at your Github.
Just some additional commentary too - I think this post quite misrepresents it with some of the comparisons.
Prolog at its core is SLD Resolution [1] (a form of search) over Horn Clauses [2] (first order logic). Queries posted to the runtime are attempts to find a set of values which will satisfy (cause to be true) the query – whilst SQL is founded on relational algebra which more closely aligned with set theory.
Whilst there's probably some isomorphism between satisfying/refuting a logical predicate, and performing various set operations, I'd say it's a bit of a confusion of ideas to say that SQL is based on 'a subset of Prolog'. The author might be thinking about Datalog [3], which is indeed a syntactic subset of Prolog.
[1]: https://en.wikipedia.org/wiki/SLD_resolution [2]: https://en.wikipedia.org/wiki/Horn_clause [3]: https://en.wikipedia.org/wiki/Datalog
git config core.commentchar <char>
This is helpful where you want to use use say, markdown to have tidily formatted commit messages make up your pull request body too.https://www.metalevel.at/prolog
The Power of Prolog is an extremely in depth, comprehensive introduction that starts right from fundamentals, and goes into some pretty advanced topics. It’s a really great resource, with well-produced accompanying videos, and leans into properly grokking the language and the “Prolog way” of problem solving.
I’d make a meta point that learning Prolog and forcing yourself to solve problems the “prolog way” serves as a great exercise in understanding the importance of using the right tool for the job, and working with, rather than in spite of , your tools.
As the weightlessness begins, his pen floats away - if you look really really carefully you can spot that it’s actually embedded in a thin plastic film which is rotating about an axis, given away by minute scratches on its surface.
Rather than and Old Library, it's a huge red prefab building in New Square. Might not be quite as impressive as the original tour.
> can I own my piece of the new internet today?
Which screams 'digital assets'. Why do I need to 'own a piece of the new internet', why can I not just own... a set of notes on my machine?
The section which espouses the goals of the project smells similarly Web3
> We have a chance to end the nation state's monopoly on trust the same way as the printing press ended the church’s monopoly on truth.
Again like, I don't know how 'privacy-first Notion alternative' also somehow involves dismantling nation states.
Don't get me wrong, I'd love a free implementation of Notion (and by the UX of this landing page I don't doubt the developers have the resources and skills to do so), but I'd prefer that if this somehow involves digital assets and blockchains that it be front-and-center?
For example meeting a particularly friendly dog on the metro, a peculiar piece of graffiti, or just something a friend said that I found particularly funny.
It’s these small little moments that when stitched together over time that make up a “life well lived” in my opinion, much more so than setting large lofty goals or striving for doing “memorable” things.
It’s been a while since I watched the talk but I believe his intention was to do just that, to push the bounds of what could be done in a header file purely for the fun of it. The second half of the talk specifically addresses the “why are you doing this?” in quite a charming way.
The spirit of the law is really quite simple; my personal data is an extension of me, and if you want to store or process it, you need a legal basis for doing so, and need to be able to demonstrate this legal basis to me. If your startup is at odds with this, well then perhaps you're not the kind of company the EU wants to be doing business with.
I took a formal verification course in college that involved writing several verified sorting, search etc. algorithms in Dafny [2]. I remember it being somewhat cumbersome to write your assertions in a way that the checker can check them, but it's looks very much like what you're suggesting.
(At the time I didn't realise that not only does the checker check the program, but compiles it into a CLR-compatible binary, hence you'll see equivalent C code for comparison)
[1] https://github.com/Microsoft/dafny [2] https://github.com/shawa/formal-verification-project