Hacker Newsnew | past | comments | ask | show | jobs | submit | milliams's commentslogin

I just compiled the code provided in the article and the compiled WASM module is 22kb. Not saying that it makes it the right solution, but a 45× difference is not insignificant.

But the example code doesn't do much validation. If you did want to use a regex, you would have to compile and bundle the regex crate...

With `regex-lite` I got under 100,000 bytes on the email regex in the sibling comment.

Not great, not terrible.


And what kind of form validation are you going to do with a regular expression? E-mail addresses like every other fool? (This is a the best to reject perfectly valid addresses because you baked unjustified assumptions in you regex)

Me? None. I'm not the one proposing the use of Rust and WASM for form validation.

What kind of validation are you going to do without a regular expression?


For what it's worth, the inbuilt HTML5 validation that implementw input type=email does have a regex in the spec.

https://html.spec.whatwg.org/#email-state-(type=email)

  /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/

But it is true that you can implement it with a FSM(which is what firefox does). Webkit uses a regex as well I think.

Yeah, for all intents and purposes that's the spec for emails now

TIL thanks.

The bigger and more complex the application, the less is the effect of this.

Well there's been skim (https://github.com/skim-rs/skim) for a while as a fzf equivalent in Rust.

The admonition at the top:

  Currently, the default build backend for uv init is hatchling. This will change to uv in a future version.
makes it seem like it's not yet stable, or at least feels like they're still not encouraging it.


Ah, great. Thanks for the reference.

My pleasure!

We consider it a breaking change to switch the default, so that's coming a bit later.

I'm looking forward to seeing this succeed.

A question: given that common pattern of forks of this codebase over time which seem to have a common theme of confused/transferred/disputed ownership, are there plans for an actual neutral foundation (or joining an existing one) or some governance which will guarantee that this avoids those problems?

From the outside it's getting embarrassing constantly telling my friends and family "actually you need to install this new fork instead" for the fourth time. I've seen norming in the wild with maps.me or MapsWithMe installed on their phones in the past, and I can't believe that they're following along the journey and we really can't go though this again.


Creating an org or joining a fiscal host are two things the community is currently exploring to avoid exactly those issues, you can find the Governance discussions and decisions on their Codeberg repo here: https://codeberg.org/comaps/Governance/

Perfect. It looks like it's moving in a very good direction.

It would need to be put in the context of what a normal annual die-off is. I expect it's not 0%, and perhaps it's normal for keepers to need to re-establish some fraction of their hives each year.

Of course, 50-60% sounds alarmingly high, but I don't know enough to be sure.

Actually, I just followed the link in the article (good job detailing their sources!) and it looks like 40% is pretty typical, but with large error bars. 62% is definitely high, but not as earth shattering as it first appears.


Does SQLite have GIS capabilities (like PostGIS provides for Postgres), or is this storing the data as traditional database primitives?


SQLite can be built with the R*tree module, which supports efficiently looking up all bounding boxes that contain a point: https://www.sqlite.org/rtree.html

PostGIS similarly provides an R*Tree index mode, as well as a heap of functions for doing GIS calculations directly. To do that in SQLite, you'd implement and inject custom functions as appropriate.


From the schema it looks like this is storing nodes and lines: https://github.com/osmzoso/pbf2sqlite/blob/main/doc/pbf2sqli...

There's an option to enable RTree indexes to speed up queries like this one:

  SELECT way_id
  FROM rtree_way
  WHERE max_lon>= 7.851 AND min_lon<= 7.854
   AND  max_lat>=47.995 AND min_lat<=47.996;

DuckDB has put some effort into GIS, so if SQLite does not immediately fit the bill, I would go there.

https://motherduck.com/blog/getting-started-gis-duckdb/


SQLite + spatial (and specific metadata tables) is essentially the Geopackage format, which can be considered the modern equivalent of a shapefile.

Which is to say, yes, SQLite has geospatial operations and they’re well supported by the open source gis stack.



I think they've forgotten to tell us what the product is.


“It is a well-known established fact throughout the many-dimensional worlds of the multiverse that most really great discoveries are owed to one brief moment of inspiration. There's a lot of spadework first, of course, but what clinches the whole thing is the sight of, say, a falling apple or a boiling kettle or the water slipping over the edge of the bath. Something goes click inside the observer's head and then everything falls into place. The shape of DNA, it is popularly said, owes its discovery to the chance sight of a spiral staircase when the scientist‘s mind was just at the right receptive temperature. Had he used the elevator, the whole science of genetics might have been a good deal different.

This is thought of as somehow wonderful. It isn't. It is tragic. Little particles of inspiration sleet through the universe all the time traveling through the densest matter in the same way that a neutrino passes through a candyfloss haystack, and most of them miss.

Even worse, most of the ones that hit the exact cerebral target, hit the wrong one.

For example, the weird dream about a lead doughnut on a mile-high gantry, which in the right mind would have been the catalyst for the invention of repressed-gravitational electricity generation (a cheap and inexhaustible and totally non-polluting form of power which the world in question had been seeking for centuries, and for the lack of which it was plunged into a terrible and pointless war) was in fact had by a small and bewildered duck.

By another stroke of bad luck, the sight of a herd of wild horses galloping through a field of wild hyacinths would have led a struggling composer to write the famous Flying God Suite, bringing succor and balm to the souls of millions, had he not been at home in bed with shingles. The inspiration thereby fell to a nearby frog, who was not in much of a position to make a startling contributing to the field of tone poetry.

Many civilizations have recognized this shocking waste and tried various methods to prevent it, most of them involving enjoyable but illegal attempts to tune the mind into the right wavelength by the use of exotic herbage or yeast products. It never works properly.”

― Terry Pratchett, Sourcery



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: