Better HN
topnewbestaskshowjobs
Log inSign up

rtpg

21,278 karma · joined Nov 23, 2012 (14y ago) · 6,746 submissions

real name: Raphael

blog: https://rtpg.co

email: raphael at above domain

Submissions

comment 2y ago · link · parent

Do all float operations need to reconfirm those bits afterwards though? I suppose if you have some sort of JIT you can end up with a bunch of unboxed floats and would only pay the cost on boundaries though

comment 2y ago · link · parent

I am partly sympathetic to that (and am a person who does this) but I think too many devs are very nihilistic and use this as an excuse to stop thinking. Everyone in a company is busy doing stuff!

There's a lot of nuance here. I think ops teams are comfortable with what I consider "config spaghetti". Some companies are incentivised to ship stuff that's hard to configure manually. And a lot of other dynamics are involved.

But at the end of the day if a dev copy-pastes some config into a file, taking a quick look over and asking yourself "how much of this can I actually remove?" is a valuable skill.

Really you want the ops team to be absorbing this as well, but this is where constant atomization of teams makes things worse! Extra coordination costs + a loss of a holistic view of the system means that the iteration cycles become too high.

But there are plenty of things where (especially if you are the one integrating something!) you should be able to look over a thing and see, like, an if statement that will always be false for your case and just remove it. So many modern ops tools are garbage and don't accept the idea of running something on your machine, but an if statement is an if statement is an if statement.

comment 2y ago · link · parent

Even as a K8s hater, this is a pretty salient point.

If you are serious about minimizing ops work, you can make sure people are deploying things in very simple ways, and in that world you are looking at _very easy_ deployment strategies relative to having to wire up VMs over and over again.

Just feels like lots of devs will take whatever random configs they find online and throw them over the fence, so now you just have a big tangled mess for your CRUD app.

comment 2y ago · link · parent

Perhaps the fact that large companies can subsidize their browser operations through their huge war chest and large presence on the web or in the operating system space is indicative of them using market power to crowd out competition and make paid offerings less sustainable!

Perhaps some antitrust action would help with this.

comment 2y ago · link · parent

The second one points to taxpayers and workers as well. This is especially important when it comes to antitrust action regarding workers rights. Actions which could lead to worse consumer experiences (at least if you consider price to be the end all)

“Taxpayers” is an extremely broad category as well, though you need an appetite for it to argue through that clause.

Though I think you can easily make a consumer argument for Chrome being unbundled (competition for Chromes default search engine pick)

comment 2y ago · link · parent

consumer benefit is not the end all of antitrust.

comment 2y ago · link · parent

There are documents that your former employer often needs to provide you for stuff like health insurance. And now suddenly it's some direct confrontation to get a document, while your future employer (Who could still just let you go!) is asking you for a document to move forward. So you're facing a bunch of time pressure in gnarly cases, without many people around to help you out.

There are procedures to get around this stuff but since it's not the common case, when it does happen suddenly you get to learn about labor law.

I think anywhere in the world, when there is active antagonism causing bureaucracy to not be able to move forward, most people freeze up like a deer caught in headlights. Turns out that being a sociopath can be quite helpful for exploiting workers!

comment 2y ago · link · parent

I'm kinda sad that there doesn't seem to be a thing that is basically Wikipedia-like but with Google Docs-like shared editing as a "canonical" open source offering in this space. Notion is too much stuff!

Basically want Confluence but faster.

comment 2y ago · link · parent

My understanding of the narrative was that Apple showed up with a lot of stuff regarding USB-C at the outset, even if they weren't the first person with it on their device.

This was just stuff I heard though. Vaguely, many years ago.

comment 2y ago · link · parent

> Testability is correlated with good design. Something not being easily testable hints that the design needs to be changed. Sometimes that design is your test design.

I have struggled a bit with this at times. There are certain things that can go from "this implementation fits on a postcard" to "this implementation fits on 3-4 pages" if you want to provide the introspection required to provide useful tests (less true in languages like Haskell that provide nice monadic tricks, granted). I like having tests just to prove the point, but I will feel quite bad ripping up _tiny_ implementations to get tests working.

But test code is also code that should be introspected in a certain way (though the objectives are different). Maybe I'm just doing some things the wrong way.

comment 2y ago · link · parent

I don't know, this is just stuff I heard, but I think some of it is Valve just being _annoyed_. Like Apple made this choice despite reaching a point where the highest end graphics card they ship is equivalent to a high-end... laptop graphics card! You shouldn't be in charge of a thing if you're not going to cover a wide spectrum.

At least with USB-C Apple "donated" their designs.

comment 2y ago · link · parent

The scuttlebutt is that Steam is not going to get ported, and Valve has given up on Apple since the 32 bit drop in general and the Metal/Vulkan mess.

I have seen a huge downtick in games with Mac releases too… even for stuff where it seems like it would be possible with an extra platform export.

Apple seems to care about gaming for about 15 minutes every year, and one day they will figure out it can work on their stuff if they’re willing to accept that their platform will be nobody’s priority.

comment 2y ago · link · parent

I think one core thing that you have to do with ASTs in Rust is to absolutely not store strings of the like in your AST. Instead you want to use something like static string libraries (so you get cheap clones and interning) and for things like positions in text you want to use just indices. Absolutely avoid storing references if you can avoid it!

The more your stuff is held in things that are cheap/free to clone, the less you have to fight the borrow checker… since you can get away with clones!

And for actual interpretation there’s these libraries that can help a lot for memory management with arenas and the like. It’s super specialized stuff but helps to give you perf + usability. Projects like Ruffle use this heavily and it’s nice when you figure out the patterns

Having said that OCaml and Haskell are both languages that will do all of this “for free” with their built in reference counting and GC… I just like the idea of going very fast in Rust

comment 2y ago · link · parent

RE "small problems": I would be very curious to know what the top 3 principles are for this team. What are the three things that _never_ fall into small problems? Security was mentioned, but what else is their non negotiable?

To be honest I have a hard time squaring "security is important" with "we write idiot mode code all the time" and "we don't write design docs". I do believe some people can just naturally, from the ether, pull out things that are designed "correctly" from the outset. But my impression is that if you're caring about security, then you need to have some established patterns for how to deal with stuff.

Not talking about SOLID so much as just, on an API design level, having things that are hard to mis-use and the like. And seems hard to land on that without some levels of discussion. But maybe the small team is actually micro-iterating at such a level that this does not matter!

comment 2y ago · link · parent

Oh, with the class declaration version? I never considered that, but feels obvious now.

comment 2y ago · link · parent

I feel like "consider dataclasses as a useful default" is decent advice.

You get the stuff you get from `NamedTuple`, but you can also easily add helper methods to the class as needed. And there are other dataclass goodies (though some things I find to be a bit anti-feature-y).

comment 2y ago · link · parent

I understand calling people stupid is not a strategy to convince someone.

But it’s not like that is why someone votes for Trump, right? It’s maybe more of a way to disincentivize conversions back.

I… really wish there had been a primary though. Biden deserves to be hated for the rest of his life for this (along with all of his other decision making)

comment 2y ago · link · parent

I trialed for a job where the CTO was convinced of dev environments in kube as "the way to work". Everyone else was at least ambivalent. I joined, tried to make some changes that would let me run things locally. Every time I got pushback about using the dev environments instead.

It took me a couple of days to get a supervisor-based setup working locally. I was the only person on the team who would run the backend and frontend when trying things out, because nobody was actually using the dev environments fully anyways. There was no buy-in for the dev environment!

I really feel like if you are in a position to determine tooling, it's so much more helpful to lean into whatever people on the ground want to use. Obviously there are times when the people on the ground don't care, but if you're spending your sweat and tears to put the square peg into the square hole suddenly you're the person with superpowers, and not the person pushing their pet project.

And sometimes that's just "wrap my thing with your thing".

comment 2y ago · link · parent

Nix on MacOS makes a bunch of build users and has a bad habit of touching files that then get touched by MacOS updates, leading to a system that works... then doesn't work.

comment 2y ago · link · parent

This is how you get to "I wrote to the spec, it's your problem that clicking the button doesn't do the thing". Huge feedback loops. When you run it "locally" enough you can do your integration stuff before you even ask for review.

comment 2y ago · link · parent

I think the idea is that if a manager is just like... in the meetings with team members or also just ambiently participating in the work then they'll know what is happening.

I don't need a metrics dashboard to know what's going on with my spouse. Feels pretty normal for a manager to have a decent idea of what's going on with their reports.

comment 2y ago · link · parent

I think people don’t care about Herokus costs, because for a long time Heroku was basically the best setup for a certain kind of simple app, and had lots of wonderful goodies around it.

Every alternative seems to be pitching some different thing (the oddest to me is Fly with its edge computing stuff… I legit wonder how many projects at Fly go beyond like 2 machines let alone do all the fancy stuff), meanwhile “charge a bunch of people 100 bucks a month for 20 bucks of compute” seems to be where Heroku really thrived.

comment 2y ago · link · parent

Just fyi since UV generates a virtual environment in .venv you can just point to the .venv folder in VSCode and stuff should work

(I highly recommend using direnv and sourcing the virtual environment in a .envrc file though… when your editor has support for that it works so well compared to bespoke shell tools)

comment 2y ago · link · parent

I thought AP was push-based though? Might be wrong of course, and I think stuff like media is its own thing

comment 2y ago · link · parent

I wonder how much of that is endemic to ActivityPub or how much is about the software stack itself

I don’t mean to be glib, just wondering if things can be “done better”

comment 2y ago · link · parent

I mean if you think SQLAlchemy does the job for you that's great! My general contention is more "there are good ORMs". I believe Django is the good one, but if you think SQLAlchemy works well for you, go for it!

comment 2y ago · link · parent

I mean first of all you could "just" use an array field for your list of items. Single model.

But then you have actual properties on your todo list. So even in your object model you already have two classes, and your todo list has a name and a list of items.

So there's not one class, there's two classes already.

As to "having a list", Django gives you reverse relations so you can do `my_list.items.all()`. Beyond the fact that your persistence layer being a database meaning that you need to do _something_, you're really not far off.

One could complain that `my_list.save()` doesn't magically know to save all of your items in your one-to-many. But I think your complaint is less about the relational model and much more about the "data persistence" question. And Django gives you plenty of tools to choose how to resolve the data persistence question very easily (including overriding `save` to save some list of objects you have on your main object! It's just a for loop!)

1
323334
225