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 1y ago · link · parent

I took your case, I got way better perf just generating a list of numbers and then reshaping it into a dataframe.

But! Even though it doesn't even get that much slower at a certain number of rows it just starts hanging! Like at 49 rows everything is still fine and at 50 it no longer wants to work. It's very bizarre and I'll see if I can debug it. But I think your test case isn't indicative of some fundamental issue with Hypothesis rather than some sort of bug.

comment 1y ago · link · parent

I understand your pain in some sense, but on another I feel like people with a decent amount of hypothesis experience "know" how the generator works and would understand that you basically _never_ want to use `filter` if you can avoid it, instead relying on unfalsifiable generation.

Silly idea for your generator would to generate an array, and if it's zero... draw a random index and a random non-zero number and add it into the array. Leads to some weird non-convexity properties but is a workable hack.

In your own example you turned off the "data too slow" issue, probably because building up a dataframe (all to just do a column sum!) is actually kind of costly at large numbers! Your complaint is probably actually meant for the pandas extras (or pandas itself) rather than the concept of hypothesis.

comment 1y ago · link · parent

I would say that like... saying "OK so `a.b` looks like this, what does `a.b.c` look like?" is a very nice flow with deep and messy objects (especially when working in languages with absolutely garbage default serialization logic like Javascript)

But even with a debugger, there's still loads of value of sitting up, moving from writing a bunch of single line statements all over, and to writing a real test harness ASAP to not have to rely on the debugger.

For any non-trivial problem, you'll often very quickly appreciate a properly formatted output stack, and that output will be shaped to the problem you are looking at. Very hard for an in-process debugger to have the answer for you there immediately.

Being serious about debugging can even get into things like writing actual new entrypoints (scripts with arguments and whatnot) and things like adding branches togglable through environment variables.

I think a lot of people's mindset in debugging is "if I walk the tightrope and put in _one more hack_ I'll find my answer" and it gets more and more precarious. Debugging is always a bit of an exercise of mental gymnastics, but if you practice being really good at printf debugging _and_ configuring program flow easily, you can be a lot less stressed out.

Like if you think your problem is going to take more than 20 minutes to debug, you probably should start writing a couple helper functions to get you on the right foot.

comment 1y ago · link · parent

My two bit understanding is that militias are mostly LARPing (in a very open sense)? And it’s not like they have a giant candidate pool

Probably important to consider that everything you know about SEALs etc are filtered through a massive PR system anyways. So you might not be comparing the same level of quality of video either. Good editing can do wonders.

comment 1y ago · link · parent

Perhaps the UK no longer controlling vast swaths of land would directly link to its decline, rather than its monetary policy.

comment 1y ago · link · parent

If the US is an outlier.... then it's fine for the US to continue down this path?

Like in this supposed age of a US government spending crisis the dollar is extremely strong compared to other currencies. Where is the hyperinflation? How many decades will we need to wait?

comment 1y ago · link · parent

If you believe that there are "good" mindsets and "bad" mindsets (relative to what you want in life), and that it's possible to change one's mindset, it follows that having guidance can help there.

Maybe you don't believe that a professional therapist can offer that guidance, of course.

comment 1y ago · link · parent

But perhaps people supposedly becoming in charge of material results should in fact at least have a sketch of an actual nuanced understanding of things.

People who watched Europe through the Great Recession and walk away thinking "I guess austerity works" are not people seriously consuming information, they are ideologues.

comment 1y ago · link · parent

I’m not a market fundamentalist, I just don’t like players dumping huge piles of cash in ways to get around market dynamics (especially for AI summaries, which is the computer equivalent of speed reading lessons)

At least open source can outlive the entities that create the thing, and in theory is more about sharing process rather than trying to stomp out smaller players.

comment 1y ago · link · parent

> Maybe we shouldn't be too critical of Mozilla for providing a privacy-first LLM service - for free. The other big privacy-first LLM provider is Apple, which requires users to have their devices/subscriptions to use, and definitely uses advanced telemetry by default.

There is a very fundamental critique here: a service being offered for free like this is being subsidized, messing with the general market dynamics that really should be making all of these tools cost way more money to begin with.

Of course Apple is also doing similar things, but for Mozilla to be doing it is quite frustrating.

comment 1y ago · link · parent

Yeah I don’t think we’re in disagreement here. The community can do a lot with the flexibility granted to it!

comment 1y ago · link · parent

I mean Lisp "never dies", but there have been plenty of Lisp flavors that have come and gone. We don't write Lisp, we write some flavor (each with vastly different properties and values).

There's nothing wrong with looking at the ecosystem and saying "huh, this is a pretty good idea". Emacs (the community as a whole) didn't ignore the LSP, and thanks to that it gets first-class support for tools that otherwise would have required someone to show up and "do the work" to get it to happen.

I do think we're in agreement about "strategically, not tactically". Like Emacs _is_ doing its own thing. It's just that sometimes you can see good ideas from other places.

comment 1y ago · link · parent

I think it's interesting to think about why people choose things. You can then decide "we want these qualities as well", or "we don't want those", or "we want them but haven't figured out how to get there without paying too high of a cost we want in other things".

Not a goal in itself to capture everyone, of course. But it's a data point!

comment 1y ago · link · parent

I don't see why Madison doesn't work. I've taken buses to Madison, you can get downtown. You can usually find some transport. Or you can just call a ride share or something!

I've done Chicago -> Madison by bus, and honestly prefer it to the plane at least (even from the airport). More comfortable seats and I get out just at a station. High frequency bus lines feel like good indicators of where some trains could work, and it's not like bus services are dead.

(Similarly, I did Portland -> Eugene on Amtrak and it was nice and chill! I roadshared to my final destination but I had to get from A to B somehow)

comment 1y ago · link · parent

I do agree with the idea of building out strong localised networks (and roll my eyes at the "US rail network" dream maps people post out). But my impression from France and Germany at least is that you have two sort of failure modes:

- For France, rural areas don't really have that good of a rail network. Instead there are several trunk lines that are reliable. But it means that east-west stuff is nearly non-existent. Lots of "drive me to the station and drop me off please". Good enough to put France at number 2 in numbers of km ridden per passenger!

- For Germany, the network is much more evenly spread out. But ever German I've met complaints constantly about the unreliability of the trains, combined with the low rate of service. So you end up with stations everywhere, but if a train gets cancelled you could be stranded for hours.

Anyways I do think the French model makes a hell of a lot of sense (prioritizing train frequency over coverage), but it might not be what people are expecting if they just look at a map of trains.

comment 1y ago · link · parent

what is the flow for working through this kind of proof? Is there an interactive proof mode like you find in a lot of dependent type provers? Or is there some other guiding mechanism for telling you that you haven't provided enough guidance with asserts?

comment 1y ago · link · parent

Is this based off the tapioca balls? I haven’t considered the health of the balls, but I could see it as being the same as swallowing a bunch of gum.

comment 1y ago · link · parent

I like the texture of the tapioca balls and like milk tea. I’d only get the milk tea plus tapioca (and choose the lowest sweetness possible, “no sugar” if offered)

I mean I get not liking it. I like it. I’d have it maybe once every three months as a little treat

comment 1y ago · link · parent

The boba tea result alone makes me want to never drink that again. Was a fun little treat while it lasted…

comment 1y ago · link · parent

Why do you think libraries get any releases at all?

Software A and B depend on C (version V). A has a bug that gets fixed by shipping with C version V+1. B unfortunately has a latent bug that appears when shipping with C (version V+1).

You’re now going to have to do a bunch of work, outright not ship stuff, or even introduce bugs because of this policy!

Nobody wants buggy libraries, and in this example it’s not the library’s fault (B might just be misusing C, or in fact compensating for a bug).

Reading through these threads I’m much more empathetic to the software bill of materials argument than before as a justification for this policy. I do not think there’s an intrinsic quality argument to the global single version policy.

Bug fix releases are proof that sometimes you do really just need to put out new things to fix a bug.

comment 1y ago · link · parent

A rust program depends on various libraries. It releases a specific version. Not pinning to specific dependencies for that specific version is weird for everyone who gets that program outside of their OS distribution package manager!

I release foo 1.2.3 as a package, when doing it depending on bar 4.5.6. Perhaps foo still compiles with bar 4.5.2 or 4.6.8... but that's _not_ foo 1.2.3 right? And if there are bug fixes in some of those but not others, if I had my deps set up to just package with "bar 4.x" , suddenly I'm getting bug reports for "1.2.3" without a real association to "the" 1.2.3.

I'm saying this, perhaps this is as easy as having two sets of deps (like deps for repackagers, deps for people wanting to reproduce what I built)... but if a binary is being shipped _not_ being explicit about the exact dependencies used is upstream of a whole lot of problems! Is there a great answer from OS distro package managers for this?

Is the thing that should happen here be that there's a configure step in rust builds that would mess around with deps based on what you have?

comment 1y ago · link · parent

For people who are interested in this stuff, I really recommend just getting a copy of Advanced Programming in the UNIX Environment and flipping through all (or most) of it. Pretty de-mystifying (and a good argument for caring about what OS you use!).

Then you can pick up some book on shells (Effective Linux at the Command Line is one I'm going through right now), and you can piece a lot of it together.

There's no magic, just a combo of decent ideas working together. But no single idea is hard to implement. Maybe just hard to come up with from scratch.

comment 1y ago · link · parent

Right, unlike code (which does what it does, even if that isn't what the writer meant) there's no real feedback loop for comments. Still worth internalizing the info based on that IMO.

"This does X" as a comment when it in fact does Y in condition Z means that the probability you are looking at a bug goes up a bit! Without the comment you might not be able to identify that Y is not intentional.

Maybe Y is intentional! In which case the comment that "this is intentional" is helpful. Perhaps the intentionality is also incorrect, and that's yet another data point!

Fairly rare for there to be negative value in comments.

comment 1y ago · link · parent

An outdated comment is still a datapoint! Including if the comment was wrong when it was first written!

We live in a world with version history, repositories with change requests, communications… code comments are a part of that ecosystem.

A comment that is outright incorrect at inception is still valuable even if it is at least an attempt by the writer to describe their internal understanding of things.

comment 1y ago · link · parent

I mean really nobody wants an app that is slow, hard to refactor, with confusing business logic etc. Everyone wants good proporties.

So then you get into what you’re good at. Maybe you’re good at modeling business logic (even confusing ones!). Maybe you’re good at writing code that is easy to refactor.

Maybe you’re good at getting stuff right the first time. Maybe you’re good at quickly fixing issues.

You can lean into what you’re good at to get the most bang for your buck. But you probably still have some sort of minimum standards for the whole thing. Just gotta decide what that looks like.

comment 1y ago · link · parent

A practical thing about costs is likely shipping. There aren't many consumer products that would be more costly to move around, so you're looking at something as messy as a fridge to sell at the high end.

I imagine one could target smaller CRTs as an idea though.

1
303132
225