HN user

marcianx

222 karma
Posts1
Comments52
View on HN

It's right there under "Stats":

11 days (May 3 → merged May 14) · 6,778 commits

Pre-merge, this took 5.9 billion uncached input tokens, 690 million output tokens, and 72 billion cached input token reads — around $165,000 at API pricing. By hand, I think this would've taken 3 engineers with full context on the codebase about a year, during which time we wouldn't be able to improve Node.js compatibility, fix bugs, fix security issues or implement new features. We never would've done that. The realistic alternative was to do nothing and keep fixing the bugs at the top of this post forever.

Building it out and maintaining it isn't free. And per a friend who's been selling consumer solar installations for years in the North East and gotten disillusioned: the equipment maintenance, repairability, and replacement story isn't great at the company they last worked at and results in a lot of environmental waste. One of the reasons they left. Of course, this is just second-hand information - I don't personally have much intuition for how widespread the issue is.

I do type Z with little finger, etc, because that's how the typing software I used long, long time ago taught it. But I don't accommodate by messing up my wrists, which are still in a natural position. My fingers just adapted to the needed flexibility. My left pinky hitting the Z is trivial and less effort, IMO, than my right index finger hitting Y. And yes, I use a conventional straight keyboard, not an ergonomic one.

I was confused by this at first since `&T` clearly allows aliasing (which is what C's `restrict` is about). But I realize that Steve meant just the optimization opportunity: you can be guaranteed that (in the absence of UB), the data behind the `&T` can be known to not change in the absence of a contained `UnsafeCell<T>`, so you don't have to reload it after mutations through other pointers.

So, I'm not pretending that certain kinds of jobs aren't going to be obsoleted. Lots of responsibilities went by the wayside as a lot of things were automated with technology and algorithms - I mean, this is not just an AI thing. But I also see it as many people not even executing certain creative visions that would be out of reach due to the mechanical (not creative) cost of doing things. That's where Jevons Paradox really shines and I do think that's where the explosion will happen. Of the (very few) people I know who do editing and have to rotoscope, rotoscoping is one of the things they really don't enjoy, but they do it anyway.

I think it makes some sense to allow leeway for intelligent "signal processing" using AI (separating out individual tracks, clean-up, etc) vs generating new content with AI.

Similarly, say, for video editors, using AI to more intelligently rotoscope (especially with alpha blending in the presence of motion blur - practically impossible to do it manually), would be a great use of AI, removing the non-creative tedium of the process.

It's not clear where the line is though. I was quite impressed with Corridor Crew's (albeit NVidia+Puget-sponsored) video [1] where they photographed dolls, motion-captured human actors moving like the dolls, and transferred the skeletal animation and facial expressions to those dolls using GenAI. Some of it required nontrivial transformative code to accommodate a skeleton to a toy's body type. There's a massive amount of tedium being removed from the creative process by GenAI without sacrificing the core human creative contribution. This feels like it should be allowed -- I think we should attempt to draw clearer lines where there are clearly efficiency gains to be had to have less "creative" uses be more socially acceptable.

[1] https://youtu.be/DSRrSO7QhXY

Steam Machine 8 months ago

Agreed about POP Shop being slow. I recently learned that they were working on its replacement: "COSMIC store" (written in Rust + Iced), and it's super-fast. You can try it with `sudo apt install cosmic-store`.

Reference counted pointers can deference an object (via a strong pointer) without checking the reference count. The reference count is accessed only on operations like clone, destruction, and such. That being said, access via a weak pointer does require a reference count check.

And also the issue with checked exceptions is that one can't be generic over the checked exception, at least in Java. So it's impossible to write out a universally useful function type that's strictly typed on the error. This definition of `ThrowingFunction` for Java [1] needs just have `throws Exception`, allowing just about anything to be thrown.

Most functional-inspired languages would just have a single `f: T -> Result<U, E>` interface, which supports both (1) a specific error type `E`, which can also be an uninhabited type (e.g. never type) for an infallible operation, and (2) where `U` can be the unit type if the function doesn't return anything on success. That's about as generic as one can get with a single "interface" type.

[1] https://docs.spring.io/spring-framework/docs/current/javadoc...

The Core of Rust 11 months ago

There are further bugs:

`for path in paths`

should be

`for (const path of paths)`

JS will immediately error on the lack of parens, but the `in` vs `of` iterates over indexes, not values, and those indexes are unfortunately converted to strings (since `for-in` is object field-name iteration). So even TypeScript would not have caught it when the (stringified) index is used as the first argument of `fs.watch()`.

I've found this to be a common Americanism, but it's still incorrect, I believe. When I moved to the US in my teens, I was surprised at the sheer disregard of English grammar rules in common vernacular here, to the point that some folks (though not my English teachers) think their incorrect use is correct. :) The most marked case I saw was in a Dodo video where the person correctly said "lying", but The Dodo's captions "corrected" it to "laying".

But I digress.

Major subsidiaries within a large company can and do have separate CEOs. For example, YouTube also has a separate CEO (previously Susan Wojcicki, and now Neal Mohan) under Sundar Pichai.

To make sure I understand correctly: did you want to read a `String` and have lots of references to slices within the same string without having to deal with lifetimes? If so, would another variant of `Rc<str>` which supports substrings that also update the same reference count have worked for you? Looking through crates.io, I see multiple libraries that seem to offer this functionality:

[1] https://crates.io/crates/arcstr [2]: https://crates.io/crates/imstr

To add to it, I crossed the border into the US via train recently, and for the first time (I've done this trip many, many times) they took my photo on their cell phone after scanning my paperwork, as they did with everyone else. So they are further expanding with more/recent data.

Careless People 1 year ago

A less unflattering interpretation might be that once they saw the level of skill required to contribute to a field, they switched to a field that they could more meaningfully contribute to.

So, fun fact from calculus (though you can easily prove this with basic algebra as I do below):

- You want to compare two products: in this case 6x9 and 7x8.

- And in each product, if you add the two numbers together, you get the same result. In this case, 6+9 = 7+8.

Then the product will be larger for the pair of numbers that are closer together. So 7x8 > 6x9. That might help you remember which is 56 and which is 54.

You typically see this in a word problem where you are given a fixed amount of fence and you have to enclose the largest rectangular area. The answer is to use a square area (two sides being equal). If the problem has constraints that prevent the sides from being equal, then you pick the length and width to be as close to each other as possible.

In case you want to transfer the geometric intuition to an algebraic proof: If the sum of the two side lengths is 2m, then the two side lengths can be written as (m+n) and (m-n) for some positive n. If you multiply the two, you get (m+n)(m-n) = m²-n². To maximize the product, you need n to be as close to 0 as possible - i.e. for both sides to be as close to each other as possible.

I immediately see the logic in this API. When slicing, I look at indexes as being between elements or at the start (0) or end (length). This gives an in-bounds starting index between 0 and length, inclusive. So if the starting index is in bounds, you get a substring. If it's not, you get no result.

And your answer for Python is not quite correct: "" is falsy in Python, and both of the last two when translated to Python give "null".

How would you impose these limits on wealth? Where would the extra money go? To the government? If so, would you be okay with the government saying that _all_ future earnings if yours went straight to them because you have too much money already? Would you give anyone that power?

I don't take it that way, and I'm deeply fortunate to be living the life suggested by GP. If I get to do what I'm passionate about even if it includes the closely-related grungy part to make it successful (not an altogether different job like marketing) and I am paid enough money to not have to worry about my daily needs and retirement savings, then I have a chance to spend a solid part of my productive day on it, engaging deeply, and building a deeper intuition, all the while not having the personal worries of stability at the back of my mind. My passion no longer needs to compete with my work for my mental energy. And I get to work with talented people who complement my skill, doing the part they enjoy and I don't, to make what we collectively build successful.

That being said, I'm a software engineer, and that's a really fortunate occupation to be passionate above due to the breadth of its applicability (e.g. allowing one to work more closely on my topic of interest) and salary potential.

Haha, yes! I'm a software engineer and it took me a decade of smartphone usage before I realized that long-pressing various keys (e.g. vowels, symbols) shows a pop-up allowing you to enter related characters (e.g. á, æ, ¡, ₹, ±, ·, ½, ²)†. Blew my tiny little mind! If I were using a language that required the variants menu in its native keyboard layout, I might have discovered this a decade before by explicitly searching for how to enter certain characters.

† Typed these on mobile, of course. Android, in case you're wondering.