HNHacker News
TopNewBestAskShowJobs

dicytea

427 karma · joined September 28, 2019

submissionscomments
dicytea··on One Year of Rust in Production
> sqlx+sea-query (or sqlx+sea-orm)

I tried sea-orm, but I find its ORM API way too limited (it can't even do multiple joins). For anything beyond simple queries, you end up needing to use its query builder (sea-query) which is blind to your db schema so you need to manually hand-validate all your queries. It's basically no better than pushing string queries + manually validating the output with serde.

> I found their query building catastrophically bad the moment the query isn't build all in one place

If you're talking about its crazy return types, there's the auto_type macro that lets you generate return types for functions automatically.

> There was also pretty bad security issue

That sounds concerning, can you link it here?

dicytea··on One Year of Rust in Production
> sqlx — a compile time, type safe SQL wrapper that runs your queries against a real DB

SQLx seems like end game stuff at first glance, but after trying it out for a while I eventually decided that it wasn't for me. Writing dynamic/conditional queries just sucks and there isn't any good solution. On the DX side, completion, formatting/linting, highlighting is also non-existent (at least on VS Code).

I eventually settled on [Diesel][0] (a query builder-ish ORM) and I'm loving it so far. Its [performance][1] crushes every other SQL libraries, including SQLx (very counter-intuitive, huh?). It's technically an ORM, but the query builder is very flexible and you can also extend it with your own traits. It got its warts, but it's the most tolerable SQL rust library I've found so far.

[0]: https://diesel.rs

[1]: https://github.com/diesel-rs/metrics

dicytea··on Linux: We need tiling desktop environments
By DE, I'm mostly talking about having a cohesive graphical shell, not the random apps that comes pre-installed (who cares about those?).

The login manager, lock screen, taskbar, notification daemon, launcher, OSD, workspace overview, etc. In WMs (or WM-like compositors), you either have to cobble all of this together yourself or just give up and convince yourself that you're a minimalist.

Doing this kind of stuff was fun for a while, but these days I'm starting to crave for something actually good and polished.

dicytea··on Linux: We need tiling desktop environments
No one's saying that they should include a DE into Sway. Your precious WM will still be with you even if someone decides to make a new tiling DE.

I'm a Hyprland user and honestly, cobbling together a poor man's DE using half-baked amateur-ish GTK apps and copy-pasting Nerd Font icons no longer spark any joy for me. I'm basically ready to jump at the first sight of a viable alternative. I'm very optimistic about Cosmic DE in this regards.

dicytea··on Bevy's Game Engine Fourth Birthday
Here's a few Bevy games I've been personally following:

- Tunnet (https://store.steampowered.com/app/2286390/Tunnet)

- Tiny Glade (https://store.steampowered.com/app/2198150/Tiny_Glade)

- DEATH TRIP (https://store.steampowered.com/app/2909010/DEATHTRIP)

- Times of Progress (https://store.steampowered.com/app/2628450/Times_of_Progress)

- Sentinels Inc. (https://store.steampowered.com/app/2302620/Sentinels_Inc)

- Astortion (https://store.steampowered.com/app/1993980/Astortion)

- Jarl (https://www.jarl-game.com)

A lot of them is still under development, but if you want to see an already released one, see Tunnet above. Tiny Glade is also coming out in a few months.

Also, I'm also pretty sure I've missed a few games here and there, but these are the ones that personally caught my interest.

It's kind of funny how many Bevy games are floating out there, but people keep asking if one even exists. It strongly reminds me of the state of the Godot community just a few years ago, where outsiders constantly question the existence of Godot games every few threads (even though many already exists at that time). Now Godot has become one of the many relatively mainstream engines out there that indie game devs simply use without much question. I do hope that Bevy will share the same future.

dicytea··on The API database architecture – Stop writing HTTP-GET endpoints
https://www.postgrest.org links me to a weird and broken WordPress news site.

https://postgrest.org on the other hand links me to the correct documentation site for PostgREST.

Anyone else having the same problem?

dicytea··on Scientists discovered perfectly preserved dinosaur embryo inside fossilized egg
Does anyone have a clearer picture of the actual fossil? I don't understand why they chose such a terrible angle for what is the centerpiece of the article.
dicytea··on Subtitle is now open-source
Yeah, you can just do whisper --output_format vtt, so I have no idea what this wrapper even adds.

I wonder if the whole thing is just an AI-generated project. The "About Me" section is pretty illuminating (unabridged):

> I'm a Developer i will feel the code then write.

dicytea··on How “blue” and “green” appeared in a language that didn’t have words for them
It's not a Japanese word.
dicytea··on Confusing Git Terminology
> HEAD~3, by contrast, refers to following the parent's parent's parent,

More specifically, following the first parent only. man git-rev-parse (surprisingly) has a nice explanation:

> A suffix ~<n> to a revision parameter means the commit object that is the <n>th generation ancestor of the named commit object, following only the first parents. I.e. <rev>~3 is equivalent to <rev>^^^ which is equivalent to <rev>^1^1^1.

dicytea··on NixOS Reproducible Builds: minimal ISO successfully independently rebuilt
> Guix, Archlinux, Debian do the binary reproducibility better than Nix / NixOS / Nixpkgs.

Huh, didn't know that Arch Linux tests reproducibility. It's apparently 85.6% reproducible: https://reproducible.archlinux.org

I wonder how much work would be needed for NixOS, considering it has more than 80k packages in the official repository.

dicytea··on Google ending Basic HTML support for Gmail in 2024
> even 0.01 percent is going to be millions of users.

This would mean that Gmail have >10 billion users, so obviously not.

dicytea··on Application-specific terminals
> Accessibility. Screen readers are guaranteed to work

I wonder how useful screen readers are in curses-style applications (I don't have any experience with screen readers)? Sure, it can probably read it, but applications like this is essentially just a screenful soup of character blocks. It sounds like it'd make for a very tedious screen reading experience.

dicytea··on Terraria developer bashes Unity, donates $200k to open source alternatives
I really hope that Bevy will get a piece of the Unity pie too.
dicytea··on Hyprland Is a Toxic Community
The Wayland community in general do feel like that it's comprised of a lot of young, immature and cliquey members, which is quite unfortunate since it's an interesting technology.

These attitudes can be seen not only in political topics (such as the one described in the article), but also other stuff in general.

For example, sway once forced users who are using Nvidia gpus to type --my-next-gpu-wont-be-nvidia so that the compositor works properly. It's nothing explicitly offensive, but you can see how their attitudes against "unapproved" outgroups oozes out here.

dicytea··on LÖVE: a framework to make 2D games in Lua
There's also these:

- https://github.com/kitao/pyxel (Python)

- https://github.com/minigdx/tiny (Lua)

dicytea··on The curl-wget Venn diagram
Or for something more flexible: ^ *--foo. But unfortunately this kind of pattern will be defeated by -f, --foo indexes.
dicytea··on The curl-wget Venn diagram
Another pet peeve of mine is that curl's URL parser is a lot more strict compared to wget.

For example:

  $ curl -sSLOJ 'example.com/file name.txt'
  curl: (3) URL using bad/illegal format or missing URL

  $ curl -sSLOJ 'example.com/file%20name.txt'
  $ ls
  file%20name.txt
On the other hand, wget (without any additional flags) will produce a file called "file name.txt" for both URLs. Well, technically you also need to add a --content-on-error flag to wget because this example URL 404s.
dicytea··on WinRAR zero-day exploited since April to hack trading accounts
> The decompression algo is free

Is the algorithm itself actually available somewhere? IIRC 7zip had compatibility issues with some RAR files out there that opens up just fine with WinRAR, so I assumed they had to figure out the algo themselves.

dicytea··on Microsoft is bringing Python to Excel
It's interesting how aggresively enthusiastic HN are about Excel when it comes to discussions about Excel vs. open-source alternatives. Any mention of alternatives are quickly and aggresively shot down, ocassionally to the point of personal attacks (if you're satisfied with LibreOffice you don't have real job, etc.).

On the meanwhile, just a few threads ago there was a (quite fair) browser benchmark where Chrome comes up on top on almost every test. People in the comments instantly rushes in proclaiming how proud they are for using Firefox even if it is technically inferior, solely because it is not owned by Google.

What's up with this divide? Firefox user, btw.

dicytea··on Don’t Use VPN Services (2015)
Arguably the most common use-case out there. Most regular people are certainly not subscribing to VPN services for the sake of privacy or anonymity.
dicytea··on Bypassing YouTube video download throttling
> some code that triggers only when you open the tools

I've seen this technique too, but I feel that this is a major flaw on the browser's side. It should be impossible to tell if the dev tools is open or not. Surely this can be done right?

dicytea··on MS Teams channels cannot contain MS-DOS device names
By the time it's mature, you'll wish for another one. That is, if you're even alive by the time that happens.
dicytea··on Fear of AI just killed a useful tool
> Say I make a tool where you can enter the title of a book, and get the full text of the book without paying for it.

Let me introduce you to the Library of Babel[1].

But you need to know the hex! you complain. But that's basically how all of the "AI outputs copyrighted works!!!" gimmicks work. They're impractical unless you know exactly what you want it to reproduce. You can't just casually pick up a copy of Harry Potter like you would in a real library.

So is the Library of Babel illegal? What's the difference?

[1]: https://libraryofbabel.info/browse.cgi

dicytea··on Qalculate – A multi-purpose cross-platform desktop calculator
An application's performance is orthogonal to its binary size.
dicytea··on Linux surpasses the Mac among Steam gamers
30% actually.

Just a few weeks ago, I tried playing a Japanese game that I was interested in, but it didn't even get past the start menu. Not a big deal for me as I'm not an avid gamer, I just moved on.

But imagine telling a hardcore gamer that no, you can't play that new game released an hour ago. Maybe it'll become compatible a few months later, maybe not.

Or tell a professional artist that no, they can't use that art software anymore, they have to retrain their entire skillset with an entirely different software.

Now that's a show-stopper. For most people, it's 100% compatibility or bust.

dicytea··on Why ISO was retired (2021)
While this article claims that it works with Ventoy, recent posts (by the same author himself) suggests that things aren't so clear and sunny: https://bkhome.org/news/202303/easyos-455-does-not-work-with...

A good final half of the article is spent on blaming Ventoy's developers and users for holding it "wrong". And here I am left still wondering what is so bad about ISOs.

dicytea··on Jujutsu: A Git-compatible DVCS that is both simple and powerful
That's funny, I thought the name means 呪術, but the person in that audio clip is (probably) pronouncing 柔術. I prefer my interpretation though (git with magic).

Ambiguous romanization is weird, I wish romanization rules would just follow IME rules (except in the case of consecutive n's, that'd look weird).

dicytea··on JetBrains Mono Typeface
If you use Kitty or Wezterm, you don't need patched fonts.

For Kitty, just install the Symbols Nerd Font (it's a fontset that contains only nerd symbols).

For Wezterm, you don't need to do anything, the glyphs are already built in.

dicytea··on LazyVim
I'm still using this, but now I'm contemplating on switching to my system's package manager instead. It was pretty useful when I was on Windows, but now I'm just feeling less and less of its benefits. The scope is also intentionally limited, so you need to eventually install some tools manually anyways (e.g. ccls). But I can see the benefits if you work on both Windows and Linux.
← PreviousPage 2 of 4Next →