@kornel@mastodon.social
@kornel@mastodon.social avatar

kornel

@kornel@mastodon.social

This profile is from a federated server and may be incomplete. Browse more on the original instance.

kornel, to random
@kornel@mastodon.social avatar

His policies may be unpopular, but honestly, what other choice do you have?

https://youtu.be/uN10nf5Qo9w

lw64, to rust German

My expectation: will replace most other low level languages for relatively low level use cases. For example platform libraries, kernels, OS components, like services etc.
But I also think that a lot of these projects (especially platform libraries) care about that they won't just be able to be used by other Rust code.
Also my expectation: For a lot of these projects, will replace , because it just supports more features, and makes integration into an existing system easier.

kornel,
@kornel@mastodon.social avatar

@lw64 Rust users don't feel the pain of integrating with Cargo โ€” Cargo integrates with Cargo perfectly :)

Cargo vs Meson is like C vs C++. Cargo is used because it's minimal and takes zero effort for most projects. Meson's need for build scripts and support for snowflake projects looks like adding unnecessary complexity, not a feature.

chriskrycho, to random
@chriskrycho@mastodon.social avatar

#lazyrust Is there a Cargo equivalent to npm why (and its yarn and pnpm equivalents)? I am trying to figure out why a transitive optional dependency is getting pulled in despite having the optional feature which brings it in disabled in the intermediate dependency. ๐Ÿค”

kornel,
@kornel@mastodon.social avatar

@chriskrycho cargo tree -i dep
and cargo tree -e features

thephd, to random
@thephd@pony.social avatar

It's time.

RAII in C, and why nobody's getting it right with the increasingly "simple" juggling that keeps getting tossed to me like table scraps for a dog.

The Pasture | Why Not Just Do Simple C++ RAII in C? | https://thephd.dev/just-put-raii-in-c-bro-please-bro-just-one-more-destructor-bro-cmon-im-good-for-it

kornel,
@kornel@mastodon.social avatar

@thephd "just ban simple automatic storage duration structure copying" (...for objects with destructors) sounds great to me! That would give C move semantics matching Rust, and dodge C++ problems of accidental deep copies and moved-from limbo state.

kornel,
@kornel@mastodon.social avatar

@PeterSommerlad It can be better than that. C++ doesn't have truly non-copyable types โ€“ std::move leaves a husk of the previous instance behind, and still runs a dtor on it. This forces types like unique_ptr to support being null/empty. OTOH a move-only type could run dtor at most once, disallowing access to the moved-from places. This guarantees it's always initialized, and never in an empty/null state.

kornel,
@kornel@mastodon.social avatar

@PeterSommerlad It's already implemented in Rust, and easily linkable with C code.

RVO is fine, but doesn't fix the general case, so moved-from still has to exist. It is a well-known compromise โ€” there's nothing good about it:

  • it generates useless destructor calls, which is a code bloat, and may inhibit optimizations.

  • use of a moved-from value may or may not be intentional, so the compiler can't err when it's done by mistake.

1/2

kornel, (edited )
@kornel@mastodon.social avatar

@PeterSommerlad

  • support for moved-from state may require extra checks in methods, or risks UB when the moved-from obj is used.

It's not something that would be added to a language intentionally. It's just a necessary pain from std::move being a library thing, rather than a built-in semantic.

Conditionally moved objects need a run-time check for a "moved-from" state, but it's a local scope boolean, not stored in the object. Optimizes better.

kornel, to random
@kornel@mastodon.social avatar

Little Big City has all the classics, like the Shiba in a bush.
https://www.littlekittybigcity.com/

ekuber, to rust
@ekuber@hachyderm.io avatar

Sometimes I wish that rustc had a database of small breaking changes that affect only a handful of crates, so that we could on the fly patch them going forward. Things like "we now correctly check for lifetimes in assoc types" can technically be a breaking change that affects a handful of crates, but I want to ensure that building a project from today in 15 years doesn't require a compiler tool chain from today.

I guess this is the windows backwards compatibility approach.

kornel,
@kornel@mastodon.social avatar

@ekuber Can this be in Cargo instead, and force-upgrade known-broken crates?
And yeah, that requires releasing fixed versions of the broken crates.

kornel, to random
@kornel@mastodon.social avatar

Chrome is shipping page transitions that work with regular non-JS-overloaded web pages.

Now I need to figure out how to use this without going full-PowerPoint.

https://developer.chrome.com/docs/web-platform/view-transitions#cross-document_view_transitions

kornel, to passkeys
@kornel@mastodon.social avatar

Authentication with U2F keys (AKA Fido or Yubikey) works well for me. It's phishing-proof and as easy as tapping a button. I'm not in a rush to try #Passkeys.

joelanman, to random
@joelanman@hachyderm.io avatar

A lot of people are finding LLMs more useful than Google search.

I think a huge part of that is that Google and web in general has massively deteriorated in terms of finding clear, concise answers. Even if you can find it, it's covered in ads, cookie popups and so on.

But LLMs will inevitably follow the same path - investors want their returns. And the complete non transparency of LLMs will make it even worse this time around. Is that really the best answer or is it sponsored?

kornel,
@kornel@mastodon.social avatar

@joelanman Ability to ask follow up questions is very valuable, and isn't served well by search.

kornel,
@kornel@mastodon.social avatar

@benjamineskola @joelanman

  1. Pour billions into LLMs
  2. ???
  3. Profit!

The algorithms are mostly public, and the training gets exponentially cheaper, so it's going to be a commodity. I don't expect "AI" companies to get their money back on LLMs.

kornel,
@kornel@mastodon.social avatar

@joelanman @benjamineskola it's genuinely useful that LLMs are good enough to clean up their own training data. Somehow we've solved garbage in - garbage out!

kornel,
@kornel@mastodon.social avatar

@benjamineskola Such cynical view overlooks the hard problems that LLMs have solved.

e.g. W3C dreamt about the Semantic Web for decades, and suddenly we have ability to convert human-facing information into machine-readable form, instead of unsuccessfully trying to implement it from the other direction.

kornel,
@kornel@mastodon.social avatar

@joelanman @benjamineskola The ML solutions are inherently imperfect, but their errors need to be weighed against issues you would have with other approaches.

For example, invisible metadata turned out to be systematically unreliable, because it gets less testing, so is likely to become stale or bitrot. Invisibility helps using it for spam.

So apart of rare cases of honest, correct, complete up-to-date semantic data, there are no less flawed ways of extracting information from the web.

kornel,
@kornel@mastodon.social avatar

@benjamineskola This pattern of hype, and people not being ready, is quite common in technologies, good and bad ones.
The Web has created enormous value, but also brought phishing and dangerous disinformation that many people are unprepared for. Smartphones have connected billions of people, but also let Apple make a fortune on facilitating payments to gambling apps for toddlers.

And don't worry, in "AI" everyone is hemorrhaging money, except NVidia selling them shovels ;)

kornel,
@kornel@mastodon.social avatar

@joelanman Programmatically, I've had success with Ollama+Mixtral. It is easy to run locally given enough VRAM, and worked great for categorization tasks, anti spam, and search indexing โ€“ it understands any language, jargon & slang, and picks up even subtle context-dependent clues that a bayes classifier never would.
Being able to run pretty advanced models locally makes me optimistic that it can be used as merely a tool, rather than being yet another VC-funded surveillance trap.

thisismissem, to random
@thisismissem@hachyderm.io avatar

So apparently MacOS 14 isn't available for devices from 2017 โ€” so I'd need to buy a new mac, even though mine works perfectly fine, to use this app (MacOS 13 is still well supported by Apple)

Apparently Apple considers devices โ€œvintage" when they're between 5 and 7 years old; so hardware that works perfectly well from 2017 becomes un-upgradable in 2023/24

I can't see any information on how long Apple will continue to support MacOS Ventura (13)
https://mastodon.social/@sindresorhus/112432845781407658

kornel,
@kornel@mastodon.social avatar

@artemist @thisismissem I suspect the rushed obsolescence is because Apple wants to drop all x86 CPU support and non-iPad-ified bootloaders ASAP.

joelanman, to random
@joelanman@hachyderm.io avatar

I have a database question - say you have an items table and a messages table, and messages can refer to items. If someone needs to delete an item, you can't because of the foreign reference in messages.

I know you could 'soft delete' - set a status column to deleted, but what if you really need to delete, for example because the content is illegal or the user has a legal right to delete it?

kornel,
@kornel@mastodon.social avatar

@joelanman you can change owner of the messages to a null or dummy user.

mcc, to random
@mcc@mastodon.social avatar

I wish Cargo (Rust) would let you mark a Feature as "internal" and then not expose it directly or mark it different or something when listing enabled Features in the CLI. This program has two Features, "speed-debug-visual" and "speed-debug-serial". They both rely on a third Feature, "speed-debug-internal", but speed-debug-internal does nothing but provide support guts for the other two Features and there's no reason to turn it on by itself, it's just there to be a dependency for the other two

kornel,
@kornel@mastodon.social avatar

@mcc There's informal convention that __-prefixed features are internal. Docs.rs and Lib.rs won't show them.

kornel,
@kornel@mastodon.social avatar

@mcc Single underscore works too, although crates generally use two underscores.

It's not documented.

https://github.com/rust-lang/docs.rs/blob/37fa77264f3b08dff432c082cbd412361d89245c/src/db/types.rs#L17

Not in Cargo yet:

https://github.com/rust-lang/cargo/issues/10794

ekuber, to rust
@ekuber@hachyderm.io avatar

Request for feedback: how would you change this compiler error? Can you tell what's going on? What the problem is? Do you get a sense of how you might be able to solve it?

kornel,
@kornel@mastodon.social avatar

@ekuber Not having this problem would have been even better, so this is more of an issue with Cargo's UI not complaining about duplicates loud enough (that's an ecosystem-wide problem requiring users to complain), and Cargo's resolver not trying hard enough to deduplicate them.

kornel,
@kornel@mastodon.social avatar

@ekuber I'm not saying it should be disallowed. I'm saying it has bad UI. People get into such situation by accident, are unaware when it happens, and a simple cargo update can add dupes to a no-dupes project without informing the user, and without straightforward ability to undo that.

kornel, to random
@kornel@mastodon.social avatar

#iPad Pro has amazing hardware, but I can't get over the OS that feels like working with one-finger gloves on.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • โ€ข
  • JUstTest
  • ngwrru68w68
  • everett
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • cubers
  • Durango
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • DreamBathrooms
  • anitta
  • ethstaker
  • osvaldo12
  • modclub
  • GTA5RPClips
  • tester
  • mdbf
  • tacticalgear
  • cisconetworking
  • normalnudes
  • Leos
  • megavids
  • provamag3
  • lostlight
  • All magazines