Hacker News new | past | comments | ask | show | jobs | submit | jimmytucson's comments login

Wait, can we just use HTTP and DNS? I’ll register a domain name and put my HTML or CGI application on a “box” and we’ll all party like it’s 1999. What am I missing?

While I also believe the world would work just fine if we all just followed each other's RSS feeds, people want something more collective, where a thousand or a million people can interact with each other's content.

Centralized bulletin boards are one way, but no one wants to host and moderate a public website anymore, takes work. Web 2.0 was all about platforms taking the hosting and account management off your back so anyone can create a discussion group or simply post into the void without any technical know how


Here’s an out-there take, but one I’ve held loosely for a long time and haven’t shed yet: dicts are not appropriate for what people mostly use them for, which is named access to member attributes.

dict is an implementation of a hash table. Hash table are designed for o(1) lookup of items. As such, they are arrays which are much bigger than the number of items they store, to allow hashing items into integers and sidestep collisions. They’re meant to act like an index that contains many records, not a single record.

A single record is more like a tuple, except you want named access instead of, title = movie[0], release_year = movie[1], etc. And Python had that, in NamedTuple, but it was kinda magical and no one used it (shoutout Raymond Hettinger).

Granted, this rant is pretty much the meme with the guy explaining something to a brick wall, in that dicts are so firmly entrenched as the "record" type of choice in Python (but not so in other languages: struct, case class, etc. and JSON doesn’t just deserialize to a weak type but I digress).


NamedTuples are great, but they let you do too much with the objects. You probably don't want users of your GitHubRepo class to be able to do things like `repo[1]` or `for foo in repo`. Dataclasses have more constrained semantics, so I reach for them by default. In my ideal world they would default to frozen=True, kw_only=True, slots=True, but even without those they're a big improvement.


Dicts in python are for when you have a thing and you aren't sure what the keys are. Dataclasses are for when you have a thing and you're sure what the keys (attributes are). The trouble is when you have a thing and you're sort of sure, but not entirely sure, and some things are definitely there but not everything you might be thinking of.


I think most modern Python codebases are using dataclasses/ something like Pydantic. I think dicts are mostly seen, like the author suggests, because something which you hacked up to work quickly ends up turning into actual software and it's too much work refactor the types


dicts are used internally in the language to look up class and module attributes. They are optimized for this use case. How can it be wrong to use them that way when the very fabric of the language depends on it?

namedtuple is widely used in Python code, especially before the introduction of dataclasses.


A hash function will always be more expensive than a pointer lookup, specially concidering a pointer lookuo is still needed after the hash function.

No matter what you do, a lookup into an array will always be quicker than a hash lookup if you don't need to do a linear search, even in a lot of cases the linear search will be quicker.

Structs in other languages is a lookup of pointer + and offset. Which to my knowledge is also true in python classes using __slots__. There's no reason to use a dict if you know the contents of the data, use a dataclass with slots=True purely because there's no hash function run on every lookup into the datastructure.


It’s not wrong to use dicts, it’s just bad practice when you could use something like a dataclass or pydantic model instead.

Dicts are useful for looking things up, like if you have a list bunch of objects that you need to access and modify, you should use a dict.

If you are using the dict as a container like car={“make”:”honda”,”color”:”red”}, you should use a proper object like a class, dataclass, or pydantic model based on whether you need validation, type safety, etc. This drastically reduces bugs and code complexity, helps others reason about your code, gives you access to better tooling etc.


Right? I thought pretty much all the higher level “objecty” stuff in python are dicts under the hood.


I think I once heard a Clojure talk where they were referred to as big and small maps. Small ones are what you’re comparing to arrays.

A place where dicts for hard coded keys makes sense is notebooks. The convenience is worth it and it’s unlikely to get out of hand.


Subclassing NamedTuple is very ergonomic, and given they're immutable unlike data classes I often reach for them by default. I still use Pydantic when I want custom validation or when it ties into another lib like FastAPI.


You know about frozenset, right? Dataclasses can be immutable.

It's python, so take that with a grain of salt.


The article title perhaps mischaracterizes the significance of these findings.

The paper finds that Hooded crows—who are not specialized tool users—demonstrate some of the same abilities that have already been observed experimentally in New Caledonian crows—who are specialized tool makers, including:

    the ability to manufacture tools from novel materials, select or manufacture a tool depending on the specifics of the task, 
…etc.

The authors cite a dozen papers published over the last 20 years that have documented these findings in NC crows, as well as Goffin’s cockatoo (who, like the Hooded crow, are not specialized tool users).

The significance of this paper must be that the abilities are more widespread in crows than previously thought, which is stated in the article, but blotted out by the juicier headline.

Here’s the actual paper, which as usual, is more substantive than the article: https://link.springer.com/article/10.1007/s10071-024-01874-6


What's the difference between CriticGPT and ChatGPT with a prompt that says "You are a software engineer, your job is to review this code and point out bugs, here is what the code is supposed to do: {the original prompt}, here is the code {original response}, review the code," etc.


$20 a month


My takeaway was the exact opposite: in the 1930s, things really were as bad as they seemed, and the U.S. was justified in taking extreme measures to avoid it happening again.


>and the U.S. was justified in taking extreme measures to avoid it happening again

What part of the chart shows this?


All the country had to do was to stop doing the things that caused the Depression:

1. pegging the dollar to gold

2. inflating the dollar

3. having the Fed set the money supply by fiat rather than the pre-1914 way of letting the market forces do it


4. Spending the tax money like crazy, to give the poor some money to buy things.

Hoover Dam, Golden Gate Bridge etc are nice takeaway of that generosity frenzy. Too bad during COVID gov just gave cash, not getting any infrastructure in return.


For better or worse the policy was stay home and isolate rather than come together and build stuff.


COVID wasn't a lack of employment problem, everyone had jobs, the government decided to pay people to stay home. It was a handout specifically aimed at not building anything at all.


The government persisted with the failed policies, lengthening and deepening the Depression. Central economic planning simply never is able to do better than free market forces.


That's not really true. Just because central planning be done stupidly doesn't mean it never works. Check out the number of countries that don't have something like a central bank stabilizing their currency which is approx zero out of 200 or so countries.


The US was stable for over 100 years without a central bank.

The reason countries have a central bank is so they can inflate the currency.


For all the folks who don't believe me, the term "sound as a dollar" was a common compliment in the US before 1914.

You never hear it anymore.


…and:

Original Pirate Material - https://news.ycombinator.com/item?id=39881324 - Apr 2024 (26 comments)


This is so cool! Does anyone know how the data is encoded in the signal? Is it just data for the game that's transmitted (and the logic resides on the ZX Spectrum) or is logic also transmitted?


The format is very simple, basically a square wave with different pulse widths for 1s and 0s [1]. Spectrum software was typically sold on audio cassettes and the radio broadcasts are the exact same format, typically people would record the broadcasts to cassette. The loader program in ROM just copies all the data from tape (or radio) into RAM so yes any game logic would be included in that.

[1] https://en.m.wikipedia.org/wiki/ZX_Spectrum_software


Jury is still out on an astronomical explanation for the apparent 26M year periodicity[0] of mass extinction events. Lisa Randall has an entertaining theory[1] that it’s due to the sun passing through dark matter in its orbit around the galaxy.

[0] https://www.ncbi.nlm.nih.gov/pmc/articles/PMC344925/

[1] https://en.m.wikipedia.org/wiki/Dark_Matter_and_the_Dinosaur...


It doesn’t even have to be dark matter, most of the (non-dark) galactic mass is in the galactic plane and the sun oscillates up and down passing through the plane as it orbits the centre.


Except that the orbital period around the galaxy is ~230M years.


You could oscillate up and down across the orbital plane many times during one orbit. Not saying that's what's happening here, but it's a possibility.


That’s the argument I think. Per that Wikipedia link:

> Randall hypothesizes a plane of dark matter exists roughly on the plane of the Milky Way galaxy. As the Sun oscillates in its orbit around the center of the galaxy, it passes through the dark matter.


What would cause the oscillation?


If you're not smack bang in the middle of the galactic plane, you're going to be accelerated towards it by gravity, so you'll tend to bob up and down, like a pendulum.


I'm not sure I buy that the oscillation around the plane can have a period other than the orbital period.


The oscillations are not "around" the plane, they are through the plane.

That is; the plane itself has a local gravitational attraction which is orthogonal to the galaxy core gravitational attraction. If a mass is above or below the plane, the "local" gravity will pull towards the plane. since nothing stops it at the mid line of the plane it passes through to the opposite side; rinse and repeat.

This bouncing above and below center line of the disk is more or less independent of our solar system completing galactic orbits.


Fair; the descriptions I've seen seem to focus on the galactic orbit more than the local neighbourhood as the cause of the oscillation; this makes more sense.


This is the best explanation IMO.


The up down oscillation is completely decoupled from the orbit itself, assuming the orbital potential is uniform. It's like the galaxy wasn't rotating at all. You put something above the disk, and it gets accelerated downwards, but doesn't stop at the disk, it keeps going, until it gets dragged back up. Think of it like a pendulum.


Would we expect the oscillation to get smaller over time, like a pendulum, or is that stretching the analogy too far?


There might be some gas in the way that would slow it down slightly, but I expect that to be a very long time scale compared to other things like interactions with other systems and even the upcoming collision with Andromeda.


The Radcliffe wave is oscillating through the plane of the galaxy. https://en.wikipedia.org/wiki/Radcliffe_wave

And a recent paper on its oscillation - https://www.sci.news/astronomy/oscillating-radcliffe-wave-12...


I haven't done the math but I would think it's possible due to interactions from other solar systems. Similar to how satellites oscillate around Lagrange points


do you think motion in X is always dependent on motion in Y?


Ah that's probably where I learnt it from then!


Maybe dark matter bodies orbit faster.


Orbital speed is a fixed function of central mass and distance from that mass.


In theory. On the other hand, dark matter is pretty much just a name we give to a discrepancy in current theory.


No, that is dark energy.

From the pov. of gravity dark matter is simply regular matter that we can't see.


I don't think that's really an accurate description. There's a discrepancy between observations relating to gravitation and general relativity's predictions. The discrepancy could be accounted for by significant extra mass, but no non-gravitational observations seem to confirm the presence of that extra mass. So "dark matter" is the supposition that there's a significant amount of extra mass that interacts only with gravity but not, for example, light, making it categorically different from ordinary matter. And I don't think there's any evidence that this dark matter follows the same gravitational constant as ordinary matter.


It does not matter whether it "follows the same gravitational constant as ordinary matter" or not.

For any kind of matter, normal or "dark", which is observed only through gravitational effects, you cannot determine separately its mass and the gravitational constant that applies to it. You can determine only the product between mass and gravitational constant (which is the cause of measurable forces).

Therefore for many astronomical objects the product between their mass and the gravitational constant is known with a much greater precision than their mass (because the gravitational constant is known with very poor precision even for ordinary matter).

The same applies for "dark matter". You cannot compute the distribution in space of the mass of the dark matter, but only the distribution in space of the product between its mass and whatever gravitational constant is applicable to it.

So even if a different gravitational constant were applicable to "dark matter" that fact would be irrelevant for any mathematical model that is fitted to the observations.


Nevertheless, mass is a separate quantity, which means that the original claim that orbital speed is determined solely by mass and orbital radius is not supportible in the context of dark matter.


Not quite. Dark matter is the hypothesis that the discrepancy between theory and observation is due to a form of matter that interacts gravitationally but not electromagnetically. So we can't see it, and thus "dark".

There are other competing ideas including a family of modified Newtonian dynamics models, but nothing comes as close as explaining the observations as dark matter does.

There was a paper recently that showed that the discrepancy may be the higher order terms from general relativity that is often neglected because they are believed to be small - but that idea still needs to be proven to work for a large variety of cases.

The observations in question for this Dark matter hypothesis include the rotation velocity of stars in galaxies and a few other things like gravitational lensing.

Dark energy is a different discrepancy with theory. It's a term that we have to add to Einstein's field equations to account for the observation that the universal expansion is accelerating instead of slowing down. Again there are competing hypotheses, like non uniform density on the largest scales, but nothing quite explains everything as dark energy.


That’s just how often the local dark forest reaper aliens fire a relativistic velocity impactor at every biosphere they can detect within range. Keep resetting to make sure nothing too complex evolves.

How much longer do we have to bug out before the next one?


Apparently the last one was about 14 million years ago.

https://en.m.wikipedia.org/wiki/Middle_Miocene_disruption


Just hide behind a large planet and hope they can't distort 3D into 2D.


How do you reach a commercial audience without being anchored to a big tower?


$29 plus $24 shipping, so $53 for one flower.


Not quite, you can get 3 for $107 because it applies some automatic discount and shipping is not a linear cost.


I had free petunia plants last year in the pots the previous years petunias grew. No, these were not the same plants as they are annuals that got pulled in the fall. Never thought about them seeding themselves like that. Maybe that $53 plant can do the same thing so you get a second year out of it essentially halving the cost???

We love us some volunteers


I very much doubt that these will breed true from seed


You could just root some cutting and put under a grow light and plant in the spring.


Isn't that the very definition of propagating the line which is protected via patent? I too doubt these would grow from a seed, but at least growing a plant from a seed is not patentable regardless of what Monsanto thinks.


I doubt propagation is enforceable either. They mentioned 'breeding' too, so they seem to have the same understanding as Monsanto.


It's really only enforceable if you attempt to make money from it or even just distribute it as your own to the point they find out about you. If you do anything to share the new plants that prevents them from making money, you'll be "guilty". If you do it just to fill in your backyard, they'll never find out about you.


Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: