colonial

@colonial@lemmy.world
3 Post – 169 Comments
Joined 1 years ago

Your friendly local programmer, uni student and *nix addict.

Firefox and its derivatives. They're the last free bastion preventing a Chromium monopoly on the browser market, which is hugely important - especially these days with Google's push for Mv3.

6 more...

I understand the sentiment, but... HTML and some light CSS is just as fast and much more accessible. It just strikes me as something that defines itself in opposition to "thing everyone uses" for no good reason.

Cringe. Not everything needs to be offloaded to someone else's computer.

And frankly, why would I pay some sort of fee (which they will eventually charge, even if they don't right now) for the "privilege" of having rustc fight for execution time on a vCPU somewhere in California?

Every day that passes I lean further towards pursuing a career in embedded.

Most of the more exotic colors (such as green) are caused by various optical tricks.

Physically speaking, all true stars are roughly one of these colors:

  • Red
  • Orange
  • Yellow
  • White
  • Blue

The exact color of a star depends on its size/temperature. Red stars are the coolest, while blue stars are the hottest.

11 more...

In before one of them starts stripping or firewalling the phone-home code. What's Unity gonna do? Valve hasn't signed any contracts with them!

1 more...

Oof. Looks like this affected some other languages as well - somebody at Microsoft needs to up their documentation game, methinks.

7 more...

I'm a big fan of Rust.

  • Excellent tooling. The package/build manager (cargo) just works, the compiler's error messaging is simply unmatched and the IDE story is excellent thanks to rust-analyzer.
  • Rich ecosystem. There's a crate for almost anything you could need, and endless piles of learning resources.
  • You get the speed and low-level control (if necessary) of C/C++ without all the pain and legacy baggage.
  • The community tends to care a lot about correctness and API design, which is reflected in both the core language and the ecosystem. Rust doesn't try to hide complexity and pretend things are simple (like Go) - instead, it gives you the tools to manage it head-on.
    • Example: if a function can fail, then it returns a Result and you have to explicitly handle the possibility that something went wrong. There's no forgetting a null check and slamming face-first into a NullReferenceException or segfault in some other part of your code.
  • It's expressive. Iterators, generics/traits and other language features make it easy to communicate what's going on to both the machine and other humans. Even the syntax is designed to support this - you can tell a lot just by looking at a function signature.

Obviously it's not all perfect, however.

  • Compile times can drag you down. (rustc is always getting faster, of course, but it'll probably never be as fast as Go or JVM/NET.)
  • It can be difficult to read at times, especially when code starts leaning heavily into generics and lifetime annotations.
  • Speed and control comes at a cost. No garbage collector means that anyone coming from a managed language (which, hello, that was me) is going to have to rewire their brain to deal with lifetimes, ownership and mutability XOR aliasing. You eventually develop an intuition for how to structure your code to play nice with the compiler, but that takes time.
  • New language features can take a long time to be stabilized and released. The advantage is they tend to be baked all the way through from day one, but the slow pace can be infuriating, especially when big ecosystem advancements are hung up on key additions.
1 more...

For the sake of your sanity, I hope there's a resolution to this that doesn't involve a rewrite.

> online gambling

Cry harder

After seeing the various forms of black magic Nintendo devs have pulled off with what is essentially decade-old tablet hardware... yeah, fine by me.

After all, the discipline has always been about more than just learning the ropes of Python and C++. Identifying patterns and piecing them together is its essence.

Ironic, considering LLMs can't fucking do that. All they do is hallucinate the statistically likely answer to your prompt, with some noise thrown in. That works... okay at small scales (but even then, I've seen it produce some hideously unsound C functions) and completely falls apart once you increase the scope.

Short of true AGI, automatically generating huge chunks of your code will never end well. (See this video for a non-AI example. I give it two years tops before we see it happen with GPT.)

Also... not hating on English majors, but the author has no idea what they're talking about and is just regurgitating AI boosterism claims.

3 more...

If you actually read the page, it's intended as a tongue-in-cheek box-checker.

This document was originally called a "Code of Conduct" and was created for the purpose of filling in a box on "supplier registration" forms submitted to the SQLite developers by some clients.

This document continues to be used for its original purpose - providing a reference to fill in the "code of conduct" box on supplier registration forms.

4 more...

I mean... you're surrounded by trillions of perfect nanotech devices. They're called MOSFETs, and they make literally the entire modern world go round.

This is unhelpful, but... I just don't look at the news. If something actually important happens, I'll hear about it indirectly and go look it up if I care, but I've found that not being tapped into the news (and especially political news) all day every day does wonders for my mental health.

Mostly just Visual Studio Code, alongside the usual constellation of Git + assorted language toolchains.

It's plug and play at every level - no need to waste hours fucking around with an Emacs or (Neo)Vim configuration just to get a decent development environment set up.

(And yes, I would use Codium, but the remote containers extension is simply too good.)

4 more...

At some point, npm supply chain attacks are going to stop being news and start being "Tuesday."

... JS on the backend was a mistake.

3 more...

I'm sure that any flagged snippets will be submitted to a human for final review. They definitely won't just auto-ban-hammer innocent people because the AI misinterpreted something they said!

Sigh.

2 more...

Too many people conflate the evils of corporatism and corruption with the general concept of "capitalism"/a market economy.

Now, I'm hardly an advocate of laissez-faire economics. But I'm not a full-on socialist either. I think the majority of problems people attribute to modern market economies can be corrected with aggressive anti-trust and pro-consumer regulation.

(The keyword here is majority. I'm sure it makes sense to socialize some things, but those details are best left to people smarter than me.)

3 more...

My guy, see a doctor. Temporary blindness/blacking out is not a normal reaction to nicotine, even in excess. "Nic sick" should just mean nausea/vomiting, dizziness and headaches.

2 more...

set timers

This broke for me a few months ago. It just randomly... won't start, despite saying otherwise.

15 more...

Why in God's name would you use a 6-bit signed integer for anything on a spacecraft? I know space-certified chips are pretty barebones, but surely not that bare bones...

1 more...

This is why I can never get into microblogging/Twitter-type platforms. Character limits and one-click reposting mean that what little discourse you get is shallow, and ragebait is consistently pushed to the top.

I'm not going to say that Lemmy or (especially) Reddit completely avoid this, but you generally get much more insightful conversation and can opt-in to political communities.

There was a thread on !asklemmy@lemmy.ml recently asking people for their unpopular political opinions, and it actually wasn't a total shitshow!

1 more...

I was only ever really into Reddit, which Lemmy has handily replaced.

  • I technically have an Instagram, but I scrubbed it and removed the app to stop me from doomscrolling and giving Meta ad revenue.
  • Microblogging like Twitter or Tumblr never really appealed to me.
  • I was born after 2000, so Facebook doesn't exist in my world.

I do use Discord, but mainly because all my friends and family are on there. I would love if a federated alternative like Matrix became the standard. Hopefully the EU's Digital Markets Act will help - if I understand it correctly, Discord and other platforms will be forced to allow seamless bridges (which currently will get you banned) under interoperability requirements.

I can't decide if they'll get away with this or if they're committing corporate suicide.

Oh boy, do I have some C++ codebases I wish I could show you.

1 more...

It's a shame that sum type support is still so lacking in C++. Proper Result types (ala Haskell or Rust) are generally much nicer to deal with, especially in embedded contexts.

As is, there's only std::expected (which can and will blow up in your face if you forget to check has_value) and std::variant, which I have heard nothing but complaints about.

13 more...

I don't think a hobbyist-hosted instance would count as a social media company.

Also, what's Louisiana gonna do if the instance is outside their state? Send them strongly-worded emails?

3 more...

Depending on how they generate a hardware fingerprint, fabricating random ones every check is a single LD_PRELOAD (or equivalent) away.

1 more...

Fucking hell. We really need to shatter all these cancerous megacorps.

Can't beat Iosevka in my opinion. I use the Term variant for my shell as well.

It's blockchain garbage. Avoid.

Also, the only good creator on there is Mental Outlaw. And he's also on YouTube for the foreseeable future, so...

Personally, I prefer static linking. There's just something appealing about an all-in-one binary.

It's also important to note that applications are rarely 100% one or the other. Full static linking is really only possible in the Linux (and BSD?) worlds thanks to syscall stability - on macOS and Windows, dynamically linking the local libc is the only good way to talk to the kernel.

(There have been some attempts made to avoid this. Most famously, Go attempted to bypass linking libc on macOS in favor of raw syscalls... only to discover that when the kernel devs say "unstable," they mean it.)

LLMs are little more than overclocked autocompletes. There's no actual thinking going on, and they will happily hallucinate outright wrong or dangerous responses to innocuous questions.

I've had friends find this out the hard way when they asked ChatGPT to write them C for a class, only to get their faces eaten by UB.

3 more...

A large language model has no concept of good or bad, and it has no logic.

Tragically, this seems to be the minority viewpoint - at least among CS students. A lot of my peers seem to have convinced themselves that the hallucination machines are intelligent... even when it vomits unsound garbage into their lap.

This is made worse by the fact that most of our work is simple and/or derivative enough for $MODEL to usually give the right answer, which reinforces the majority "thinking machine" viewpoint - while in reality, generating an implementation of & using only ~ and | is hardly an Earth-shattering accomplishment.

And yes, it screws them academically. It doesn't take a genius to connect the dots when the professor who encourages Copilot use has a sub-50% test average.

But an extra fee will be charged if a user installs a game on a second device, say a Steam Deck after installing a game on a PC.

Actually asinine.

Chevy Suburban. I volunteered to drive for a university course field trip and it's what I got stuck with.

  • Unresponsive fatass brick of a vehicle. I mean, come on, a minivan has more cargo space and the same passenger capacity without three light aircraft worth of inertia.
  • Dashboard sucked. It took me a solid three minutes to find the button shifts. (I know these can be done well - Honda does them right - but the PRNDL was fucking laid out in a thin row at the side of the dashboard. Huh?)
  • Overtaking damn near anything would redline the (very new, less than 10k miles) engine.
1 more...

No matter how many unit tests or comments you write, it's impossible to "prove" type correctness in a dynamically typed language - and it will eventually blow up in your face when you have to refactor. There's a reason for the adage "testing can't prove the absence of bugs."

People like static typing because it offers strong guarantees and eliminates entire classes of bullshit bugs, not because they're "weak minded."

3 more...

If it's anything like the USB protocol (which I've been working with recently) the names are probably baked into the binary. You're likely out of luck unless you can somehow flash modified firmware.

Perhaps there's a way to give devices an alias on your machine?

3 more...

It wouldn't be as relevant, since passing a function or method instead of a closure is much easier in Rust - you can just name it, while Ruby requires you to use the method method.

So instead of .map(|res| res.unwrap()) you can do .map(Result::unwrap) and it'll Just Work™.

2 more...

Rust would be an excellent fit for the type of work you describe. Assuming I understand the specifics correctly, the regex and serde crates would make the parsing + converting pretty effortless and fast.

The language itself also works really well for "data pipeline" type programs, thanks to its FP features/iterators and type system.

With familiarity, can Rust's intuitiveness match Python's "from idea to deployment" speed?

Yes and no. For experienced developers, the total time from "start" to "finished product" is probably going to be about the same in both. It's how that time is allocated that really distinguishes them.

Rust is going to make you put in more work up front compared to Python: negotiating with the compiler, getting your types in order, that sort of thing. The benefit is that what comes out the other end tends to be baked all the way through - "if it compiles, it works."

Python, being a dynamic scripting language, is going to make it easier to get a vertical slice or minimum viable product up and running. But when/if you scale up, you have to pay that time back fixing problems that Rust's static analysis could have caught at build time.

TL;DR - Python is good for "throwing something together" or writing load-bearing scripts that do one simple thing really well. Rust is a slower start that shines as complexity and scale increase.