Better HN
topnewbestaskshowjobs
Log inSign up

zdimension

412 karma · joined Feb 25, 2022 (4y ago) · 124 submissions

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 ]

Submissions

comment 2d ago · link · parent

Finally a modern contender to "for sale: baby shoes, never worn".

Really, every single interesting project I see these days I'm completely unable to feel awe or curiosity since I just assume it was AI-made.

comment 1w ago · link · parent

When you call a method on something in Rust, the method gets passed that something (as a parameter called self). But the method gets to choose whether it's by move/copy or by reference. Here, toggle gets the bool passed by mutable reference.

In effect, if x is a bool, doing x.toggle() is rewritten by the compiler as bool::toggle(&mut x), which can of course modify x.

comment 1mo ago · link · parent

My memory may fail me, but I'm pretty sure ASP used VBScript, not regular VB. Similar syntax but not the same runtime/environment. ASP could use any Active Scripting language (the other language shipped with Windows being JScript, MS's impl of a subset of JS)

comment 4mo ago · link · parent

Filip Pizło (https://www.filpizlo.com/), according to his website: Director of Programmability and Data Model at Roblox. Previously, I worked at Epic Games (Senior Director of Language Engineering) and Apple (Manager of the JavaScriptCore Team).

He seems to be the main developer of Fil-C: https://github.com/pizlonator/fil-c although there are other contributors.

comment 5mo ago · link · parent

Oh, so that's why JetBrains data thing is called DataLore. TIL

comment 6mo ago · link · parent

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.

comment 6mo ago · link · parent

Works on all my servers. This is terrifying.

comment 8mo ago · link · parent

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.

comment 9mo ago · link · parent

Off-topic, but this ongoing trend of brands getting TLDs is really starting to infuriate me. It's not what TLDs are for! Sony is a Japanese company, so it should use sony.com or sony.jp.

comment 10mo ago · link · parent

Related: https://www.w3.org/Provider/Style/URI

comment 10mo ago · link · parent

Well-written post. Very interesting, especially the interactive widgets.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

I think "blurry" was used here referring to the fact that they don't really pay attention to the differences between fonts, not to an aspect of the rendering.

comment 1y ago · link · parent

Title is imprecise, it's Archiveteam.org, not Archive.org. The Internet Archive is providing free hosting, but the archival work was done by Archiveteam members.

comment 1y ago · link · parent

Did not know that such things could be accomplished by registering a new file coding format. Reminds me of https://pypi.org/project/goto-statement/

comment 1y ago · link · parent

By chance, do you happen to know if the Mindstorms NXT (the old one, before EV3) software was based on the same toolkit? I always wondered what UI framework it used, it had an unusual look.

comment 1y ago · link · parent

> while offering real parsers (not treesitter)

Honest question, what's wrong with treesitters?

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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

comment 1y ago · link · parent

Had a lot of fun making the animations for this one.

23.

Everyone gets bidirectional BFS wrong(zdimension.fr ↗)

8 points · by zdimension · 1y ago · 5 comments

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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?

27.

The case of a program that crashed on its first instruction(devblogs.microsoft.com ↗)

107 points · by zdimension · 2y ago · 19 comments

28.

Infix formula compiler to x86 written in Sed(github.com ↗)

3 points · by zdimension · 2y ago · discuss

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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

12345