HNHacker News
TopNewBestAskShowJobs

tuetuopay

1,764 karma · joined December 23, 2021

submissionscomments
tuetuopay··on I don't want to fill out your contact form
In my experience LLM chatbots are a net improvement because they understand "put me in relation with a human" as opposed to the scripted ones that only spit out the FAQ.
tuetuopay··on Borgo is a statically typed language that compiles to Go
You always have the option of using a match block if you don't like those chained calls. But I do agree, it's a bit bolted on and kinda ugly.

> More terse is not the same as more readable (in fact, I find the reverse).

I generally agree, but I also find that "all explicit" also hinders readability because it tends to drown the nitty-gritty details. As always it's a matter of balance :) And I think that neither go nor rust are great in this matter as one is verbose and the other falls in the "keyword soup" with the chain call, the closure, and the format macro. I'm pretty sure something in between could be found.

tuetuopay··on Borgo is a statically typed language that compiles to Go
For the first point, there are two common patterns in rust:

1. Most often found in library code, the error types have the metadata embedded in them so they can nicely be bubbled up the stack. That's where you'll find `do_a_thing().map_err(|e| Error::FileOpenError { file, user, e })?`, or perhaps a whole `match` block.

2. In application code, where matching the actual error is not paramount, but getting good messages to an user is; solutions like anyhow are widely used, and allow to trivially add context to a result: `do_a_thing().context("opening file")?`. Or for formatted contexts (sadly too verbose for my taste): `do_a_thing().with_context(|| format!("opening file {file} as user {user}"))?`. This will automatically carry the whole context stack and print it when the error is stringified.

Overall, what I like about this approach is the common case is terse and short and does not hinder readability, and easily gives the option for more details.

As for the second point, what I like about _not_ easily seeing all return paths (which are a /\? away in vim anyways), is that special handling stands out way more when reading the file. When all of the sudden you have a match block on a result, you know it's important.

tuetuopay··on Hotel WiFi JavaScript Injection (2012)
I can't fathom this addiction for VPN for "security". Nowadays almost every website uses HTTPS and browsers block HTTP downgrades most of the times. Yes VPNs are still useful for the occasional HTTP website, however most people will use some form of free VPN that could totally do the same.

But yes, VPNs did solve this issue at the time of writing, and I even used one for quite long as my mobile carrier used to proxy all images through their own servers, as well as intercepting port 21. They stopped doing the former with the advent of HTTPS. To my knowledge they did not use this for nefarious purposes (they served downscaled images for lighter browsing at a time where 3G was frugal and websites not optimized yet for mobile).

tuetuopay··on China Tells Telecom Carriers to Phase Out Foreign Chips in Blow to Intel, AMD
I think you’re underestimating the CPUs in such telco devices. Even datacenter grade equipment (much easier on the control plane than telco or backbone) come with Xeon chips. Not the best ones, but still full blown server CPUs with heaps of RAM.

This is not Arm or risc-v territory (yet), perhaps Ampere devices. However this is approachable by Loongsoon an I’d bet it’s the path they’ll take.

tuetuopay··on Why choose async/await over threads?
Strong disagree.

> Rust can run multiple threads just fine--it's not Javascript. As such, it didn't have to use async/await. It could have tried any of a bunch of different solutions. Rust is a systems language, after all.

it allows you to have semantic concurrency where there are no threads available. like, you known, on microncontrollers without an (RT)OS where such a systems programming language is a godsend.

seriously, using async/await on embedded makes so much sense.

tuetuopay··on Why choose async/await over threads?
well that's the great thing with async rust: you write with poll and select without writing poll and select. let the computer and the compiler get this detail out of my way (seriously I don't want to do the fd interest list myself).

and I can still write conceptually similar select code using the, well, select! macro provided by most async runtimes to do the same on a select list of futures. better separation, easier to read, and overall it boils down to the same thing.

tuetuopay··on Dissent – A GTK4 Discord client written in Go
This looks like a very slick project and might just use it. GG!

Any chance something similar exists for slack? The discord client is not that much of a pain, but slack you have to pick between a client that OOMs the machine, and a browser tab that OOMs the browser.

tuetuopay··on Dissent – A GTK4 Discord client written in Go
I don't get why you would want that but what do i know :DI

Indeed since clients have a websocket connection to stream incoming messages, it should be nigh indistinguishable for them from a regular clients.

Also, the API abuse they are worried about is spam and scams, so just pulling out messages is likely to be the last of their problems.

tuetuopay··on Dissent – A GTK4 Discord client written in Go
they actually provide a pretty complete bot api that's perfect for what you want to do. since it's a bot api, the "user" will appear as a bot in discord clients, and a few restrictions will apply (e.g. bots cannot interact with each other). but for simply reading a channel, it's pretty trivial to do.

I did use it in the past using the Rust library Serenity [0] (unofficial library ofc) to make a geoguesser-like bot [1] for a private server with friends. Pretty simple to use actually! Do note they have some pretty harsh ratelimits when it comes to API calls though, so pay attention to caching when fetching data (not likely to be an issue for your usecase at it'll mostly be server-sent events.

[0]: https://docs.rs/serenity/latest/serenity/

[1]: https://github.com/Tuetuopay/bot-ticelli (don't judge, this was thrown together between amongus games during lockdown)

tuetuopay··on Pi 5 overclocking: Silicon Lottery
The Pi port can deliver 5 or 10W max at 5V IIRC. So I'm not using it :D

The 12V comes from an external power supply through a barrel jack, from which I also derive the 3.3V rail. The Pi provides no power whatsoever. I should publish the design files somewhere.

As for the NIC, it's a Netronome Agilio-CX which is fully programmable using eBPF and such.

tuetuopay··on Pi 5 overclocking: Silicon Lottery
No, I literally made my own hand-soldered Pi Port -> PCIe adapter. That's to plug a 2x25Gbps programmable NIC, so no bandwidth needed because the NIC does all the work. All I needed was something to power up the nic :D

As for bandwidth, well, it's one lane of PCIe gen 2. This won't win any races but can be useful to access exotic hardware not available in usb or if you don't care about bandwidth. (e.g. HBA with many drives for mass storage without speed requirement).

tuetuopay··on Pi 5 overclocking: Silicon Lottery
I recently went on the lookout for this board and it is still unavailable. All I could find were M.2 adapters. I guess the market for full-size PCIe is tiny compared to the M.2 one.

Anyways, I ended up making my own and it works great. No fuss, no wait, no complications.

tuetuopay··on JIT WireGuard
huh yeah, too focused on my infra side of things; mobile vpn is another can of worms.

though I don't know what would prevent any bgp daemon from running in e.g. the wireguard iOS app? there are bgp daemons like gobgp that can be easily integrated in other software.

but this was more meant to be a joke than anything. wireguard is batteries definitely not included, and is why tailscale and the like do exist.

tuetuopay··on JIT WireGuard
nothing prevents you from running bgp over wireguard for route exchange. and there are many quality bgp daemons available*

(* for linux and bsd)

tuetuopay··on RISC-V bare metal servers now available at Scaleway
From what I can gather, the 24h minimum is only in the Apple Silicon offering due to Apple policies that require it.
tuetuopay··on Nintendo is suing the creators of Switch emulator Yuzu
By "online" do you mean a random ROM website, or any Yuzu provided/hosted/whatever page? I.E. are they linked to such firmware and key redistribution? I was under the impression there was no affiliation, but I may be wrong there.

By affiliation I mean something like hosted on the same server but officially unlinked, not obvious affiliations. If a core maintainer redistributing them on their personal website.

tuetuopay··on Nintendo is suing the creators of Switch emulator Yuzu
AFAIK yuzu requires you provide your own firmware dump, so no redistribution happening
tuetuopay··on Cve-rs: Fast memory vulnerabilities, written in safe Rust
This is one I surprisingly very few complaints about the symbols used. My personal pet peeve are languages that use the walrus operator (:=) for variable assignment/declaration. Those two are on the same side of the keyboard, in the same finger column, so really slow and painful to type. If they were two keys for two different fingers, or better yet, for two different hands, that would be awesome (I have the same issue at work for the warsaw region abbreviated to waw). I write Rust daily and have yet to find such an inconvenience.
tuetuopay··on Apple confirms it's breaking iPhone web apps in the EU on purpose
isn't this because so many researchers invested their time in apple zero-days there was a flood of vulnerabilities, reducing their value? I always had the impression ios devices were the prime target.
tuetuopay··on Guix on the Framework 13 AMD
discord is electron and runs perfectly under wayland. a few flags to turn it on and you're good.
tuetuopay··on It was almost impossible to make the blue LED [video]
Don’t forget the sun. The sun gets to a warmer color at sunset, hence why warm white conveys a "go to bed" meaning.
tuetuopay··on My favourite Git commit (2019)
I'm french and I actually really like the auto-translation. This way software that does not care about which quote those are (mail, web, etc) can swap them, and where it matters then it does not translates it (vim, etc).

Sadly the new official french azerty keyboard has dedicated keys for both opening and closing quotes, and the good ol' simple quote tucked away behind modifier keys. As a dev I hate it. (arguably I should not even use azerty for development but that's another issue)

tuetuopay··on My favourite Git commit (2019)
I despise squashs. It encourages people to tread git commit as a glorified ^S of their work.

You want to know why a change was made, or who so that they can explain it. You land on a blob of a diff, with no meaningful commit message (any commit message was squashed to /dev/null to be replaced with the MR title and description). And then off you go to the corresponding github/gitlab/whatever MR only to find a wall of "hmmmm" "why no work?" "try something" etc commits.

tuetuopay··on Tell HN: Hacker News now supports IPv6
thankfully I replied to a comment speaking about a tangent (/64s) and not to its parent. /s

Snark aside, very much agreed, and I don't like that they got away with it. It's precisely with the mindset of "we'll have enough" that companies like ford have a /8 or the DoD has more /8s that we can count. And with this mindset we'll run out of IPv6 the same we ran out of IPv4.

tuetuopay··on Tell HN: Hacker News now supports IPv6
Some do give you one but in the most incorrect way possible. When I had fibre through Orange France, they properly allocated a /56 to my connection, but the ISP provided router only routed the first /64 from the block. The UI even proudly displayed the full /56 in all of its glory followed by a "xx/64 usable".

Oh and I ended up disabling IPv6 altogether as their router would crap itself with a modest amount of IPv6 traffic. Pulling ~10Mbps of IPv6 would completely DoS the router, as it would not even go as far as answering to ARP. Some quality hardware for sure.

tuetuopay··on Tell HN: Hacker News now supports IPv6
There is a really practical reason behind this, and it is called "routers". Due to longest prefix match, you'll end up wasting resources on the networking hardware. And you waste both precious and expensive TCAM and LPM latency for matching the prefixes. So routers do optimize for anything shorter than /64, and have special lookup memory for /64 and /128. But nothing in-between.
tuetuopay··on Rust-Written Linux Scheduler Showing Promising Results for Gaming Performance
given the video literally showcases how to change the scheduler at runtime while the game is running, it's actually great. imagine Steam loading a new scheduler when a game starts? this way we could all the time run the best scheduler for the workload without issue.
tuetuopay··on Rust-Written Linux Scheduler Showing Promising Results for Gaming Performance
this blew my mind. all people are arguing whether rust is a good fit, a strike force, or if a game is a good benchmark. the whole point of this is that one guy can write a scheduler during winter break and friggin hot swap it at runtime while a compile and a game can run. this is the newsworthy part.

dang it, I want to try it now. and make an article stating I did it in Zig for the clicks!

tuetuopay··on Rust-Written Linux Scheduler Showing Promising Results for Gaming Performance
I think it's more because a game is very sensitive to jitter in CPU performance, and can reflect pretty well the responsiveness of the machine with a heavy load in the background. You can replace the game with scrolling a webpage, using slack during compile times, etc. With a game, you get a hard number (FPS) and a very visual indication of how well the load is doing (e.g. stuttering is very noticeable and is a pretty good indicator). So the game is not the point, it's IMHO a visualization of the effectiveness of the scheduler.
← PreviousPage 13 of 20Next →