HNHacker News
TopNewBestAskShowJobs

fiedzia

592 karma · joined January 21, 2013

submissionscomments
fiedzia··on Most RESTful APIs aren't really RESTful
I've found recently that CORS doesn't work with it, which kills it for a lot of usecases.
fiedzia··on Rust’s dependencies are starting to worry me
> but neither Go or C# have issues with dependency hell like Rust or even more JavaScript, because they have exceptional std libs

They also have a lot narrower scope of use, which means it is easier to create stdlib usable for most people. You can't do it with more generic language.

fiedzia··on Do any languages specify package requirements in import / include statements?
Some do (Go), but it is really not the best idea. You do want to have one central place where you specify:

- version constraints - source of packages (you may want to host them yourself one day) - any additional metadata (some packages have options or features)

fiedzia··on AWS S3 Tables?
Unique comparing to what?

There are other products that provide something similar, but are not as popular, as easy (part of easy here is integration with aws) to use and require extra tooling. This will be goto tool for many people working with data, and I'd expect "load_from_s3" to be added to many tools fairly quickly. That's unique.

fiedzia··on Rust-Based, Memory-Safe PNG Decoders "Vastly Outperform" C-Based PNG Libraries
... and it uses SIMD encoding because the tooling made it available and convenient (and someone was willing to work on that, which is also a benefit of Rust). Tools matter.
fiedzia··on Show HN: SeekStorm – open-source sub-millisecond search in Rust
Same as any other full-text search solution - it's your job to integrate it.
fiedzia··on Gene behind orange fur in cats found at last
Most reasonable explanation I've heard is that black cats typically don't look good on pictures. Or maybe they are just overlooked by people visiting animal shelters?
fiedzia··on Gene behind orange fur in cats found at last
Internet legend. All cats do the same things. Some individuals are smarter, but I doubt it has anything to do with fur color. And I don't recall hearing anything special about orange cats from people who have many cats.
fiedzia··on What Is Memory Safe?
First, any technical discussion here is irrelevant. Those organizations do not ask for it because they understand it, but because someone else told them, and that's where the definition of safety is located. In other words, if you are applying for a contract, what you think doesn't matter. Having said that:

> People consider Rust memory safe, but there are a few cases where it is not

The chance that you will encounter memory safety issues in Rust is very, very low (comparing to other popular languages). We are talking about bugs in stdlib (very unlikely) and usage of unsafe in your code and dependencies. If you happen to use unsafe directly in your app, I'd say it is a spectrum and you can be in a danger zone. Otherwise, it is a small enough issue to focus on other problems. For 99.9% of people, "using Rust" is enough of a guarantee to be safe.

> Are languages without GC memory safe?

In theory, not having a GC in itself tells nothing about safety. Commonly used languages without GC are mostly C/C++, so in practical terms, they are unsafe.

> Is idiomatic Zig memory safe?

Zig itself is not memory safe. Even if idiomatic Zig was, how do you verify that some code is idiomatic? In practical terms, I don't think there is enough examples of Zig code to make determination, so I count it as no.

> Is idiomatic modern C++ memory safe?

"Idiomatic modern C++" very likely will have non-idiomatic or non-modern dependencies. There are many examples of safety issues in modern C++ codebases, so definitely not.

In my opinion, any definition of safety that relies on developer skills or usage of extra tooling means it is unsafe.

fiedzia··on Speeding up the Rust edit-build-run cycle
Debugging in Rust is substantially less common for me (and probably not only for me) because it is less often needed and more difficult - many things that are accessible in interpreted world don't exist in native binary.

I do care about usable tracebacks in error reports though.

fiedzia··on Toasty, an async ORM for Rust
I've added some sql functions, and support for decimal type for mysql (It didn't have it at some point). Wasn't complicated.
fiedzia··on Toasty, an async ORM for Rust
>The second that you would benefit from using a DBMS specific feature, the ORM begins getting in the way.

You can extend diesel (and probably many other orms, Diesel is just particularly easy here) to support any db feature you want.

> It is highly unlikely that an ORM provides support, much less a good abstraction, over features that only 1/N supported DBMS have.

That depends on orm flexibility and popularity. It may not provide support OOTB, but can make it easy to add it.

> Your code ends up using the driver raw in these cases, so why not just use the driver for everything? Your codebase would be consistent at that point

Main point of using orm for me is that I have type verification, raw (as in text) breaks too easily.

fiedzia··on Ask HN: Stick to Electron (JS/TS), Swift and Kotlin or learn Rust and use Tauri
> I'm not the best with pointers and memory allocation/deallocation

You don't think about those at all when using Rust. That's why it was created. However because the conventions are different, some pattern will be different and you will need to learn do some things differently. I don't think Rust is particularly difficult to learn when it comes to using a framework, but a non-trivial amount of learning will be required.

As for features, I've found this video comparing them: https://www.youtube.com/watch?v=jWgLOtm9le8&ab_channel=DashC...

fiedzia··on Advancing Memory Safety
>It's $CURRENTYEAR and Java still doesn't support structs

they call it records, added recently. Depending on where you work, you may see them in a decade

fiedzia··on Advancing Memory Safety
> Let's also admit every language before Rust hasn't succeeded at out right replacing the vast majority of C/C++,

Many languages expelled C/C++ from the domains they were once kings of entirely. It used to be "the language" for many, many things.

fiedzia··on Advancing Memory Safety
I recall early Java having appetite for memory that hardware often could not satisfy (on a x86 desktop, it is of course still true for many microcontrollers).

Also I read a story of a developer resisting move from hand-written assemby to C, to which company owner replied "you can write your assembly, but not for my money". So nothing new, though some languages get a lot more resistance than others.

fiedzia··on Nixiesearch: Running Lucene over S3, and why we're building a new search engine
> Tantivy, it’s just superior in every way now

It lacks tons of features ES and Solr have, most notably geo search, but what it does it does a lot faster.

fiedzia··on Ask HN: Developer laptop that doesn't suck in 2024 and it's not Apple silicone
I like my hp spectre. Not sure if they still make them, but I had no issues with it. Use lenovo carbon for work and can recommend them too.

Framework is most configurable, but I have no personal experience.

fiedzia··on My negative views on Rust (2023)
> this is practically impossible to hunt down in a big codebase

use linters, they keep getting smarter

fiedzia··on My negative views on Rust (2023)
No. Nobody is going read those (because most people won't even know that some unsafe is buried 5 layers of dependencies below what they work with). The author should make reasonable effort to prove the code is working correctly (and cannot be abused) by other means if possible. It might be a domain issue, so far all my apps are 100% safe (not counting libraries).
fiedzia··on Ask HN: Should I learn Awk or Perl? Or is that a bad question?
use Python, so that other people can read it
fiedzia··on More Memory Safety for Let's Encrypt: Deploying ntpd-rs
> If the pieces of state are all well known at build time - and trusted in terms of their content

.. than use library, because you should not rely on the assumption that next developer adding one more piece to this code will magically remember to validate it with json spec.

fiedzia··on Zelle Introduces Paze, a Groundbreaking Step for American E-Commerce
> entering an email and passcode is materially different from entering a username and password

The only difference is that passcode is one-time use, so it's not stored and even if someone would stole it, it cannot be reused.

fiedzia··on The Pumpkin Eclipse
For "wifi to work" you will need updates. Though updating all devices at once is a really dumb policy.
fiedzia··on User IDs probably shouldn't be passed around as ints
ints as user ids are fine, a language with tons of footguns isn't
fiedzia··on Ask HN: What April Fools jokes have you noticed this year?
U.S. Navy Submarine First In World Fitted With Silent Caterpillar Drive https://www.navalnews.com/naval-news/2024/04/u-s-navy-submar...
fiedzia··on Ask HN: What April Fools jokes have you noticed this year?
Landmines used to curb deer population in Scotland https://www.ukclimbing.com/news/2024/04/landmines_approved_f...
fiedzia··on When did dogs become our best friends?
> Look at any wild animal, do they want to be owned, do they want to be put on a leash?

Numerous wild animals can be held as pets, without going through domestication, so apparently they do. If you feed them, they may have no reason to mind the leash, life is hard in the wild.

fiedzia··on Training for one trillion parameter model backed by Intel and US govt has begun
Really early days of flying where like "let's add a few feathers and then add some more". Though architectural changes were added too.
fiedzia··on The Great Sphinx of Giza may have have started out as a natural formation
> the fact that it was abandoned shows that their society wasn't able to maintain it in the long term

A flood, drought, climate change, war or better jobs elsewhere were common reasons for abandoning locations. We have many abandoned projects today, that doesn't have to say anything about social structures.

← PreviousPage 2 of 16Next →