HN user

zdimension

402 karma

zdimension.at.hn

I make things with computers.

* my blog with text on it: [zdimension.fr](https://zdimension.fr) * my code: [github](https://github.com/zdimension)

[ my public key: https://keybase.io/zdimension_; my proof: https://keybase.io/zdimension_/sigs/YsDs65xqRbedgqtKAxAoazoy9U-04Kju7RV7PwibWyA ]

Posts9
Comments106
View on HN

Eli5:

Haskell type classes are not classes (like Java or PHP classes); they are comparable to Rust traits -- which are different from PHP traits which are comparable to Java/C# interfaces (with default impls; if you just want contracts you have... PHP interfaces).

A fundamental difference is that you can instantiate/implement a type class (or Rust trait) for any* type, compared to interfaces where each class declares the interfaces it implements. You can therefore create generic (forall) instances, higher kinded type classes, etc.

Microsoft started as a programming language company (MS-BASIC) and they never stopped delivering serious quality software there. VB (classic), for all its flaws, was an amazing RAD dev product. .NET, especially since the move to open-source, is a great platform to work with. C# and TS are very well-designed languages.

Though they still haven't managed to produce a UI toolkit that is both reliable, fast, and easy to use.

57 is 3 times 19.

The standard divisibility rule for 3, 6 and 9 in base 10 is to sum the digits until you only have one left and check if it's one of those. Here, 5+7=12, 1+2=3, so 57 is divisible by 3.

For anyone wondering, NonNull (along with other "constrained" types like NonZero integers) uses internal compiler attributes (https://doc.rust-lang.org/src/core/ptr/non_null.rs.html#72):

  #[rustc_layout_scalar_valid_range_start(1)]
This gives rustc enough information to perform niche optimizations such as collapsing Option<NonNull<T>>.

You can technically use those for your own types, but it requires nightly, obviously.

About 90 millions rods vs 6 millions cones. Sometimes I'm surprised we can even see detail at all. Though it certainly helps that they're not uniformly distributed; most cones are in the macula, around the middle of the back of the eye. Still, it's not a lot.

There is a very real risk of political candidates committing political fraud, getting elected thanks to it, and putting pressure on the judiciary branch to lower their chances of getting arrested. We're seeing this exact process happen in real time in the US. Every modern country pretends that nobody is above the law and that bad people will get convicted and get sentences but in real life the government has power over this stuff.

Making ineligibility sentences immediate is a way to make sure this sort of thing doesn't happen.

But the animation actually shows that after step 2, Q = [a1, a3, b1, b3]. In other words, a3 didn't join the back of the queue but jumped in front of b1. This is what leads to the buggy behavior that is shown.

This is my fault. The animation doesn't really point that out, but these are two separate queues: the forwards BFS and the backwards BFS each have their own queue. What the diagram shows is the order in which the nodes will be visited, according to the queues. So it's interleaved, in a way, since each step alternates the BFS that is executed.

However, suppose that Q actually be a "normal" queue. We'd then need to track, in the queue, which "way" the node should be visited (forwards or backwards). We'd be visiting more nodes at once per side but we'd still not visit levels at once before moving on to the other side, so it could still give the bad path sometimes. Also, since we'd only have one queue, we would be unable to efficiently detect a missing path: right now we check at each step if either of the queues is empty (and stop if that's the case). With a single queue, it would be slow to check if one side doesn't have any queued nodes, and without that check, for cases where no path exists, we'd waste time expanding a search on one side when it could never reach the destination anyway.

As I understand it, the moment you're processing someone's personally identifiable information, you're in the red zone, GDPR-wise. The users consented to publish their info on BlueSky, but not on OP's website.

I get the idea behind the GDPR and it's nice to protect consumers but I'm scared for hobby projects like this.

Yeah, but that doesn't solve the data privacy problem. Not that I care, I'd love to be able to do all sorts of stuff with scraped datasets.

Very nice. Modern GPUs really are fast as drawing points.

It's pretty similar to a project I've been working on for the past year, scraping Facebook instead of BlueSky (which is a bit harder since FB doesn't expose an API for that). I currently have about 140 million nodes on my scraped graph and a GUI with pathfinding and stuff like that.

It's a shame though because as nice as the thing is, I'm not sure I can publish it online, given it contains names of people. I don't think the GDPR would be very happy.

Which is why I'm a bit surprised you published this, aren't you afraid of people, uh, disliking the fact that they're present in your dataset?

The Civil Rights movement succeeded because it was guided by leaders who had clear, specific, and realistic goals, and were able to negotiate to achieve them. Since neotoddlers “organize” mostly on social media [...]

The author somehow skips the part where Civil Rights activists were criticized for the exact same reason in their time (i.e. disrupting the daily life of people).

There are many points to make about methods of protest, but this is just not a good analysis piece.

I had this question a few years back while working on a social network graph project and trying to render a multi-million node graph. Tried Ogma and it worked quite well but it became too slow when approaching the million. Ended up writing my own renderer in C++ and then Rust. Code here: https://github.com/zdimension/graphrust

Tested it up to 5M nodes, renders above 60fps on my laptop's iGPU and on my Pixel 7 Pro. Turns out, drawing lots of points using shaders is fast.

Though like everybody else here said you probably don't want to draw that many nodes. Create a lower LoD version of the graph and render it instead

Yep, that's unfortunately the case for a lot of public entities. Open Banking is similar: at first you may think it means your banking data is open, so you can access it, as a consumer, through an open API... But Open Banking only makes banking data open for licensed data processors under very strict conditions and with quite stringent limitations.

Aside from that I am curious about the discontinuity at 22h.

My water heater turns on during off-peak hours (so, at 22h). I have no other equipment that responds to the off-peak signal, so the discontinuity is entirely attributable to the water heater.

The color scale on the hour/day grid initially seemed backwards to me.

I think it was one of the default color scales in Plotly. Maybe I got used to it, it doesn't strike me as reversed, but I think I see how it would feel that way for you.

The daily total takes up so much space

That is true, though it didn't disturb me enough to bother changing its size.

If I had to guess, I'd say they meant they'd prefer a solution where all the location data is stored exclusively on-device, with means to export it to another machine so you can analyze it. I understand the rationale.

I actually tried it on a VM a few months back, it was broken in a multitude of fun ways. I think it would be interesting to try and make it work.

There is a very nice blog post about someone explaining how they modified their website's CSS to work with some old browser, maybe Netscape, maybe something else, it was well written and fun to follow, but I cannot for the life of me remember where it was from. Maybe someone will read this comment and know what blog post I'm talking about.

I mean, the choice would be nice. Allow people to turn on online sync, keep the data offline, or disable the location recording altogether.