2,353 karma · joined July 26, 2014
https://news.ycombinator.com/item?id=37339535
https://www.mooncratertycho.com/the-12-lunar-calendars-still...
I also worked with mp4 in the past only to realize that the ISO was not enough as Apple had some changes in their stack.
This aside, it is much easier to integrate than matrix, things like web hook is just a POST request to /api/send_message...
I think it would take off again with a nice crossplatform client with a discord like interface. But that would be expensive to develop.
Of course it really depends on the application, but if you host something like a streaming video service where bandwidth is the main factor, you can quickly reach a point where self hosting is cheaper.
// the_nif.zig
fn init_imp(
env: ?*erl.ErlNifEnv,
argc: c_int,
argv: [*c]const erl.ERL_NIF_TERM,
) !erl.ERL_NIF_TERM {
if (argc != 0) {
return error.BadArg;
}
return try helpers.make("Hello world");
}
export fn media_tools_init(
env: ?*erl.ErlNifEnv,
argc: c_int,
argv: [*c]const erl.ERL_NIF_TERM,
) erl.ERL_NIF_TERM {
return init_imp(env, argc, argv) catch |err|
return helpers.make_error(env, err);
}
var funcs = [_]erl.ErlNifFunc{ erl.ErlNifFunc{
.name = "init",
.arity = 1,
.fptr = media_tools_init,
.flags = erl.ERL_NIF_DIRTY_JOB_CPU_BOUND,
} };
var entry = erl.ErlNifEntry{
.major = erl.ERL_NIF_MAJOR_VERSION,
.minor = erl.ERL_NIF_MINOR_VERSION,
.name = "Elixir.MediaTools.Stream",
.num_of_funcs = funcs.len,
.funcs = &funcs,
.load = load,
.reload = null,
.upgrade = null,
.unload = null,
.vm_variant = "beam.vanilla",
.options = 0,
.sizeof_ErlNifResourceTypeInit = @sizeOf(erl.ErlNifResourceTypeInit),
.min_erts = "erts-10.4",
};
export fn nif_init() *erl.ErlNifEntry {
return &entry;
}
# the_exlixir_file.ex
assert "Hello world" == MediaTools.Stream.init()
The "helpers" library is used to convert types to and from erlang, I plan on open sourcing it but it is not ready now. In the above example, the code is explicit but "entry" can be created with an helper comptime function. erl is simply the erl_nif.h header converted by zig translate-c.I wrote a piece back in 2022, but things evolved a lot since then: https://www.kuon.ch/post/2022-11-26-zig-nif/
I felt like I was being punished for everything. (Maybe some things were project specific so I am not saying this as an absolute) It's slow, syntax is horrible, error are obscure super long lines, it can compile and explode later (which is what elixir does, except elixir will happily restart and recover)...
Elixir is based on duck typing mostly, but it works very well because you just pattern match your data when you use it. Rust is very strict and can have cryptic errors, but as everything is baked in the language it is way easier to manage.
I am not saying this to be snob about typescript and JS, but I really felt pain when working with that ecosystem, and I wonder if I'm old and stupid or if those tools are really half baked and over complicated.
Prototype is easy and fast. Scales well to very large user base on a single node. Interactive client side without even writing JS.
I love rust, I really do, I use it for all kind of things. But for web app, the Erlang architecture is so well designed and mature you cannot compete.
Also we use rust and zig from Erlang with native modules for video processing and AI, the elixir/Erlang "skin" gives you immense flexibility and productivity with almost no performance hit.
When we did our tests, messages would get dropped, arrive out of order, be impossible to decrypt, joining a room was slow (sometimes days), mobile notifications would be swallowed by the desktop client left running, webhook were hard...
I don't want to speculate too much as it is just a feeling, but it felt that the protocol itself had unfixable flaws.
All out management network is IPv6 only, all kvm, switches, routers...
It was a pain and gives nearly no practical advantage (at the time), but the motivation was to make everyone "intimate" with IPv6. We learned a lot and we even discovered some implementation bugs (for example, Cisco default link local address is not /64 and this is not compliant with more recent RFC and will make them unable to communicate with BSD systems).
Now we have IPv6 everywhere and everybody from dev to sysadmin is aware of IPv6 and we start to see some real advantages. VPN are easier to manage, routing is easier, firewall is easier, clustering, failover... everything is "cleaner".
We still have IPv4 (dual stack) on some servers, but about 80% of them are IPv6 only with DNS64/NAT64.
They do this because proprietary AI models are not flexible enough and are lacking a lot of API.
For example, one app I wrote was to analyze scans of old maps and use generative AI to extrapolate and create animations.
I don't know where the market will go. But my feeling is that large proprietary models are very good at a very limited type of work and that open source will provide diversity.