HNHacker News
TopNewBestAskShowJobs

kuon

2,353 karma · joined July 26, 2014

Developer and engineer. <http://kuon.ch>
submissionscomments
kuon··on Itch.io Taken Down by Funko
I use infomaniak from switzerland. Mainly because I can physically go to their office and discuss in person if there is a problem.
kuon··on Prometheus 3.0
I think when I looked it was still half closed source or something, or maybe I was mislead by something I read. To be honest I didn't take the time to properly investigate it.
kuon··on Prometheus 3.0
Migration to victoria metrics has been on my list for nearly a year, but the licensing of it always scared me a bit. My main issue is CPU and memory usage of prometheus, so maybe this upgrade will fix that.
kuon··on Bypassing regulatory locks, hacking AirPods and Faraday cages
How can the GET request be modified if it uses HTTPS? You can spoof certificates on iOS devices with dev tools?
kuon··on OpenID Connect specifications published as ISO standards
RFC 3339 should be preferred to iso, but it does not solve the wall clock issue. In a calendar application I worked on, we use city name and lat/lng + "naive" timestamp (yyyy-mm-dd hh:mm or moon based date or other specialties like Japanese year depending on the locale). And we "resolve" to UTC + offset when the date is close.

https://news.ycombinator.com/item?id=37339535

https://www.mooncratertycho.com/the-12-lunar-calendars-still...

kuon··on OpenID Connect specifications published as ISO standards
ISO is non free garbage which is not helping the software ecosystem. Take ISO 8601, it is overly complicated, not implemented correctly most of the time as maintainers used a free draft and it does not actually solve anything properly. (For example you cannot represent wall clock which is a problem for dates in the future as time zone changes).

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.

kuon··on XMPP: The Gem of Instant Messaging
I love XMMP and I use it in different contexts, but there is one thing I miss is GIF integration like discord. I guess I could try to write a gajim plugin to integrate tenor or giphy.

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.

kuon··on Why Companies Are Ditching the Cloud: The Rise of Cloud Repatriation
I have 10Gbit/s guaranteed with 100Gbit/s burst.
kuon··on Why Companies Are Ditching the Cloud: The Rise of Cloud Repatriation
No, dedicated business fiber from sunrise.
kuon··on Why Companies Are Ditching the Cloud: The Rise of Cloud Repatriation
I am in Switzerland where you have 25Gbit/s for about 70$/month so I understand that this might be an exception. But even if it is 10 000$/month, it is still widely cheaper than cloud bandwidth.

https://www.init7.net/en/

kuon··on Why Companies Are Ditching the Cloud: The Rise of Cloud Repatriation
Yes, but for example a 10Gbit/s pipe is about 3PB of transfer capacity per month which is about 150 000$/month in S3 traffic. A 40kW UPS which can handle about 2 racks (2x42U) of high density servers, with a generator cost about 50k$. A redundant link with your own AS so you can BGP should cost about 5k$ per month (at least here in switzerland).

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.

kuon··on Why Companies Are Ditching the Cloud: The Rise of Cloud Repatriation
I'm in Switzerland, so maybe I am biased, I have 10Gbit/s dedicated on a 100Gbit/s link for about 600$/month. In practice I have 25Gbit/s with most datacenters in europe, 100Gbit/s with some that are close (OVH, Hetzner), and 10Gbit/s with the rest of the world.
kuon··on Why Companies Are Ditching the Cloud: The Rise of Cloud Repatriation
You can have a 100Gb uplink on a dedicated fibre for less than 1000$/month now. Which is insanely less than cloud bandwidth. Of course there are tons of other costs, but that alone can suffice to justify moving out of the cloud for bandwidth intensive app.
kuon··on Zigler: Zig NIFs in Elixir
I don't have open source code base to share but here it how it looks like:

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

kuon··on Zigler: Zig NIFs in Elixir
I use zig a lot in elixir nif, for things like audio and video processing, it works great. But I do not use zigler as I prefer the code to live in their own codebases. But zigler is really nice and it provides an easy way to do computational heavy tasks in elixir.
kuon··on Ask HN: How do you organize your electronic components?
BH -> by
kuon··on Ask HN: How do you organize your electronic components?
I keep eveverything in the digikey/supplier bag and I put a label on it with a box number and an item number. Then I put about 50 bags in the transparent IKEA boxes. And I label the box. Bags in boxes are sorted BH item number.
kuon··on Zod: TypeScript-first schema validation with static type inference
I'm a rust,zig and elixir developer and I had to work on a large typescript project that use zod.

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.

kuon··on Rust needs a web framework
Just use Phoenix and live view.

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.

kuon··on Microsoft's new Outlook client moves your email to the cloud (2023)
Yeah, that's why I always tell people to buy a domain for email, so they can move it where they want at any time. Hopefully, it becomes more and more standard with email providers. But when you have a long history, the best you can do is setup a redirection and change email address at the few places where it is really important (bank, google/microsoft/apple account, ...).
kuon··on Support for IPv6
This and you can allocate prefix for services. Also you can do layer 3 access control because there is no NAT. Also NAT can get messy when chained. One very practical example is that if I am connected with SSH to a server, and connection is interrupted with a network gear config change for example, when it is back up, SSH will be still connected and might not even notice. With NAT, states can be dropped.
kuon··on Support for IPv6
An OpenBSD box.
kuon··on We have lift-off Element X, Call and Server Suite are ready
Yes but it is XMMP now. It has been working well for us.
kuon··on We have lift-off Element X, Call and Server Suite are ready
We tried matrix and element a little while back and it had too many sharp corners. Now we use jabber. It also have some problems but we were able to workaround them.

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.

kuon··on Support for IPv6
About two years ago, when we deployed our datacenter, I insisted for IPv6 first.

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.

kuon··on Why is language documentation still so terrible?
I work with elixir and the docs are really nice, I encourage other languages to take inspiration.
kuon··on The Internet Archive has lost its appeal in Hachette vs. Internet Archive
I agree. Maybe they should split into separate judiciary entities?
kuon··on The Internet Archive has lost its appeal in Hachette vs. Internet Archive
Is there torrent of those books we can distribute?
kuon··on Nearly half of Nvidia's revenue comes from four mystery whales each buying $3B+
Yeah, I build custom solutions. For one customer I built a few custom server using supermicro chassis.
kuon··on Nearly half of Nvidia's revenue comes from four mystery whales each buying $3B+
I have a few of my customers using AI and they are asking me to build self owned AI server running open source models. With about $20k you can have your own little AI beast and do a lot with it.

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.

← PreviousPage 4 of 26Next →