News for hackers. Stuff that matters.

jonnytran

Re:What Color is Your Function? (2015) on Tuesday May 26, 2026 @05:24PM (#48286166)
Some Rust libraries have started to implement unioning multiple error types and handling a subset of them while propagating the rest. But as far as I know, the idea hasn't caught on. Here are the crates I know of.

https://github.com/komora-io/terrors

https://github.com/mcmah309/eros

Re:- -dangerously-skip-reading-code – olano.dev on Sunday May 24, 2026 @10:44AM (#48257662)
Is it time for the literate programming renaissance?
Re:Dotcl: Common Lisp Implementation on .NET on Saturday May 02, 2026 @02:48PM (#47989224)
Have you tried Clojure?
Re:Typepad is shutting down on Wednesday August 27, 2025 @10:24PM (#45047636)
Somebody save Kathy Sierra’s blog! https://headrush.typepad.com/ I’ll try to archive it. I love her work. But even if I save it, it should live on somewhere else.
Re:Bill Atkinson has died on Sunday June 08, 2025 @11:49AM (#44217690)
Have you seen Scrappy? It’s still early, but it’s the most interesting thing I’ve seen in a while.

https://pontus.granstrom.me/scrappy/

Re:The Reddits on Friday March 22, 2024 @12:27AM (#39787475)
Pinboard was a clone with a different business model: users actually paid for it.

Fast forward, and delicious died, only to be acquired by — you guessed it — Pinboard [1]. Because Pinboard was actually serving its paying customers, it just kept trucking along.

[1]: https://blog.pinboard.in/2017/06/pinboard_acquires_delicious...

Re:Microsoft seeks Rust developers to rewrite core C# code on Saturday February 03, 2024 @01:45PM (#39243386)
Yes, I did this at my startup. Fast forward a few years, and now the company has more Rust code than Python, and the majority of the company's IP is in Rust.

I suggest beginning with small, one-off things that don't have much impact. People, even developers, tend to shy away from things that aren't familiar. By introducing Rust in a small, low-risk way, it helps people get familiar with it. They get to build familiarity with building Rust projects, navigating the project structure, and reading docs. I submit pull requests that get people to read Rust code, even if it's just to say "looks good". Their familiarity builds slowly over time, meaning they'll be less triggered by seeing Rust in a larger, more impactful project down the road.

How do you boil a software developer? Slowly.

If they give Rust a chance and your team has a champion to guide them, they'll see its merits. I think a lot of people come to Rust for the performance, but that's not why they stay.

Re:Microsoft seeks Rust developers to rewrite core C# code on Saturday February 03, 2024 @01:27PM (#39243213)
Yeah, this is just baffling. A team can be so averse to learning new tools, good ones too, that they would rather dump their time into rewriting. Instead of getting paid to level up their skills, they'd rather block forward movement of the company's goals to maintain the status quo.
Re:Apple Vision Pro available for pre-order on Friday January 19, 2024 @09:35AM (#39055918)
How long ago was that?
Re:The Book of Shaders (2015) on Tuesday January 09, 2024 @05:30PM (#38933196)
Better resources, like what? Please share links.
Re:The NSA advises move to memory-safe languages on Tuesday December 12, 2023 @10:36AM (#38613526)
The same author has a post from 2022 [1].

> Is it possible to achieve arbitrary code execution on any Go version, even with PIE, and with no package import at all, just builtins? Yes!

Whether it's capture the flag is irrelevant, IMO, because anything that's allowed by the compiler will emerge given enough complexity.

1: https://blog.stalkr.net/2022/01/universal-go-exploit-using-d...

Re:The NSA advises move to memory-safe languages on Tuesday December 12, 2023 @09:45AM (#38612772)
It's unfortunate that there's no mention that not all these languages are equally safe.

Go isn't memory safe when using goroutines. See: Golang data races to break memory safety: https://blog.stalkr.net/2015/04/golang-data-races-to-break-m...

Hollow Knight
Re:Ruby 3.2.0 Is from Another Dimension on Wednesday January 04, 2023 @02:29PM (#34250205)
Don't forget all the variations on how to use the format() method.

    # In order
    'Hello, {}!'.format(who)
    
    # Numbered
    'Hello, {0}!'.format(who)

    # Named
    'Hello, {name}!'.format(name = who)
Re:Ruby 3.2.0 Is from Another Dimension on Wednesday January 04, 2023 @02:28PM (#34250194)
> Ruby not having first-class functions

This is simply false. Ruby has first-class functions.

Not only that, it has blocks, which few other languages have. Ruby optimizes for the common use-case of a method that takes a single callback/piece of code, and I miss it in most other languages, including Python.

In Python, the "with" statement is super special. But in Ruby, it's just a method that takes a block. And any method can take a block, not just one per class.

https://yehudakatz.com/2010/02/07/the-building-blocks-of-rub...

Re:Open source sustainment and the future of Gitea on Wednesday October 26, 2022 @03:27PM (#33348193)
I currently work for a company where one of my co-workers is a maintainer of the official Gitea repo.

There was no mention of this anywhere prior to the blog post, including in private Discord channels. It has _not_ been public knowledge for a while.

What you said is false. I suspect that is why you're getting downvoted.

Re:Git In Two Minutes (updated after 8 years) on Saturday August 06, 2022 @05:19PM (#32371670)
Git isn't designed for "noobs trying to pick up coding just to experiment". It also isn't really designed for solo developers as the OP is about.

Git is designed for collaboration. Git's UI is absolutely unintuitive, especially coming from other version control software. But that's irrelevant. Everyone wants to use it because of the network effect.

In terms of _why_ the UI is unintuitive, I believe it's because it intentionally exposes its internal representation. Unlike its predecessors like subversion, Git has infinite flexibility in terms of the workflow that teams of people can adopt. But the flexibility comes at the cost of learning how to use a distributed graph of commits.

Personally, I never learned git by reading recipes of commands, like the OP. I only really grokked it by understanding how it works internally. This article helped me:

Git for Computer Scientists https://eagain.net/articles/git-for-computer-scientists/

I know you're asking about Computerphile, but this video explains how one of the Numberphile videos is wrong: https://www.youtube.com/watch?v=YuIIjLr6vUA
Re:To Ruby from Python on Saturday July 23, 2022 @07:21PM (#32208561)
When I was new to Ruby and hadn't learned the available tools yet, I had similar problems because I brought practices from other languages that didn't work.

Typically, what you're describing is solved, in different ways depending on your setup. I literally never think about the issue you're describing when using Ruby.

- With Rails/ActiveSupport in development mode: Module B is autoloaded lazily when C refers to it.

- With Rails/ActiveSupport in production mode: All modules are eagerly loaded at startup.

- Plain Ruby: There's a few ways, but most gems simply have a file at the top level that eagerly requires all files when the gem is required. Same with an app.

If startup time becomes an issue, you can configure the autoloading at the top level, and the appropriate file will be required lazily when it's referred to. But at that point, just use ActiveSupport.

Re:To Ruby from Python on Saturday July 16, 2022 @08:12PM (#32123133)
This is simply false. Ruby modules are first class. They're objects that you can pass around like any other object. You can put them in a local variable. You can define methods on them. You can do metaprogramming using them. You can build classes by mixing modules together. You can create modules (and classes) at runtime. Many things that need to be built-in in other languages are just a library in Ruby.

Files and modules in Ruby are two distinct things. While Python makes files one-to-one with modules, Ruby allows you to define as many modules as you like in a file, zero or more.

It's true that if you define a constant at the top-level of a file, it uses the global namespace.

By convention, if you have a file named `foo.rb`, you'd write:

    module Foo
      # Code here
    end
and it's equivalent to what's done in Python. But it also has all the other features.
Re:To Ruby from Python on Saturday July 16, 2022 @12:18PM (#32119471)
The only thing I disliked more than moving from Ruby to Python was moving to Go. All the things I love about Ruby are the antithesis of Go.
Re:To Ruby from Python on Saturday July 16, 2022 @11:37AM (#32119133)
IMO, Ruby optimizes for reading. You simply cannot write concise code in Python as in Ruby. One reason (of many) is because of all the import statements required in Python. In Ruby, there is often only a single require statement, or maybe none at all, at the top of a file.

The difference is convention over configuration. In Ruby, if you know the convention, then you know exactly where everything is defined without needing to read it. In Python, you must read all those import statements to know where something is coming from, not to mention write them in the first place.

And if you really need to know where something is defined, you simply ask it.

    puts obj.method(:foo).source_location
So IMO, Ruby optimizes for both reading and writing.
Re:Friday.app is shutting down on Wednesday April 06, 2022 @01:31PM (#30935122)
Did you try asking users to pay? I.e. tell your users, you're shutting down unless everyone starts paying. It could be Kickstarter style in that X number of users have to put in their payment information by some date, or you still shut down. That way, there's no chance that some people start paying, but you still shut down.
Re:Pyret Programming Language on Sunday August 22, 2021 @02:07PM (#28267896)
And before someone criticizes Ruby for being inconsistent in how the method is called, Ruby isn't a callable oriented language [1]. The common case is calling methods, so the fact that you need to say `.call(5)` both makes it more consistent and makes real code more concise, especially when making DSLs where chaining is really useful.

1: https://yehudakatz.com/2010/02/21/ruby-is-not-a-callable-ori...

I second both of these. Even though they write a lot about tech, you can replace the specific technologies with the modern day equivalent and it's still relevant. For a lot of the topics, I haven't come across anything else that better articulates it.

The next level is getting into the mind of Kathy Sierra. The idea that helping people become passionate -- or badass, as she later rewords -- is an end in itself. This isn't just about tech.

Re:Firefox 91 introduces enhanced cookie clearing on Tuesday August 10, 2021 @05:31PM (#28134890)
I started using the DuckDuckGo app on iOS to do exactly this. You can choose to "fireproof" any site you're on, adding it to a list of sites that's immune to clearing all data.

I don't think it has a history feature at all though.

This tells me that you've never used a well-managed language or framework. Those aren't the only two options.

Ruby 1.9 was released around the same time as Python 3, with a similar amount of large breaking changes, and no one was holding on to Ruby 1.8 the way the Python community held on to Python 2.7. You could keep using it if you wanted to, but no one did. Ember.js is another example that I've used that was refreshingly well-managed, with a clear (oftentimes automated) upgrade path between minor releases. Using semver and LTS versions, it didn't just break backward compatibility without a significant deprecation period. Those are just a few examples off the top of my head, but I'm sure other good examples exist.

When things are well-managed, you as a developer have the freedom to upgrade when it's a good time for you. When you have production software with real users or a business that depends on it, you can't always just drop whatever you're doing to upgrade, which is why backward compatibility is needed.

If it's done right, there's a self-imposed drive to want to move to the latest with all its improvements. On the other hand, with Python 3, they took away things that people cared about, leaving developers not only with no drive to upgrade, but an irrational impetus to hold on to what they had, even when the situation was fixed at a technical level.

Is there a 2021 update to this topic? How has the state of WASM changed? How have JS engines changed? Is it still a good idea to make these changes to your JS code?
Re:First steps with Rust on Sunday April 18, 2021 @03:02PM (#26855300)
Can you elaborate on why you think they “botched” the standardization? I don’t know much about the topic, and I’m genuinely curious about what went right and wrong.
Re:Uppestcase and Lowestcase Letters on Friday April 02, 2021 @12:49PM (#26673173)
Yes. It contributes to RSI. It's best to use thumbs for frequently used key modifiers.

Older »