HackerTrans
TopNewTrendsCommentsPastAskShowJobs

boustrophedon

no profile record

Submissions

"Containerize" individual functions in Rust with extrasafe

harrystern.net
3 points·by boustrophedon·2 tahun yang lalu·0 comments

Pgtemp: The easiest way to write tests with Postgres, no Docker necessary

github.com
2 points·by boustrophedon·2 tahun yang lalu·1 comments

comments

boustrophedon
·2 bulan yang lalu·discuss
Yes, if anything the issue is that the House was capped in seats in 1929 and the population has tripled. Smaller states have an outsized representation in Congress currently.
boustrophedon
·6 bulan yang lalu·discuss
The contradiction he's pointing out is that they often speak out against so-called "illegals", but as you've documented they enjoy it when business reap the benefits of undocumented labor (i.e. wage suppression).
boustrophedon
·10 bulan yang lalu·discuss
The excessive amount of emdashes does seem to imply it's LLM slop ragebait. The prompt probably included "make intentional mistakes in your arguments to drive engagement" or something like that.
boustrophedon
·2 tahun yang lalu·discuss
I haven't downloaded your model but https://www.i-solids.com/ (US-based, FDM and MJF) and https://www.weerg.com/ (Italy, mostly MJF ) will both do instant quotes and you might get reasonable prices from them at scale. PCBWay and JLCPCB in China will also do 3d printing at reasonable volume, if you want to get an idea of a baseline price.
boustrophedon
·2 tahun yang lalu·discuss
Thanks! Feel free to file an issue if there's something missing from the library or the daemon.
boustrophedon
·2 tahun yang lalu·discuss
Related self-promotion: I built pgtemp (https://github.com/boustrophedon/pgtemp) to automate doing exactly these mkdir/initdb/load/destroy steps.
boustrophedon
·2 tahun yang lalu·discuss
I made https://github.com/boustrophedon/pgtemp to solve this for myself
boustrophedon
·2 tahun yang lalu·discuss
Thanks for writing the blogpost! I think it's perfectly valid as a fun demonstration of the utility of the wayback machine.
boustrophedon
·2 tahun yang lalu·discuss
The `parse_program` function is public inside the `bc_util::parser` module, and the parser module is marked public inside `bc_util`, but in the `calc/src/bc.rs` file the `bc_util` mod isn't public, and can't be accessed from a test inside the `tests/` folder, which only has access to the public API exported by the library.
boustrophedon
·2 tahun yang lalu·discuss
There are several sites with instant quotes that are cheaper than Shapeways.

PCBWay and JLCPCB both offer similarly-priced very cheap 3d printing and CNC services out of China. Weerg in Italy also offers 3d printing and CNC services and I'm probably going to try them out for the next thing I need printed. The only non-marketplace service I've seen in the US that offers instant quotes is i-solids in Texas, but they have quite high startup costs and seem to be more geared towards small-medium production runs.
boustrophedon
·2 tahun yang lalu·discuss
I'm not sure if it's related, but I have the git branch in my PS1 and I've noticed that it's much slower to show a new prompt when inside very large repositories now, and I don't think that was the case previously.
boustrophedon
·2 tahun yang lalu·discuss
I built this weather forecast / todo list with the weather.gov and todoist APIs https://harrystern.net/halldisplay.html
boustrophedon
·2 tahun yang lalu·discuss
Linux has seccomp and landlock, which are basically harder-to-use versions of pledge/unveil.
boustrophedon
·2 tahun yang lalu·discuss
Since the author mentioned rewriting it in Rust, I recently added support to my library extrasafe that allows you to sandbox your own code: https://harrystern.net/extrasafe-user-namespaces.html

So if you wanted to call ffmpeg or some other C library with complicated user-provided data, you can use extrasafe's Isolates (along with its seccomp and Landlock features) to sandbox the call. I'm not really sure how suited it is for rewriting something like bubblewrap or firejail, but it might be interesting to try.
boustrophedon
·2 tahun yang lalu·discuss
I made a Rust library and cli tool that starts a clean postgres instance for each test. The daemon version transparently proxies your connection to a new postgres server every time you connect to it.
boustrophedon
·2 tahun yang lalu·discuss
I think the biggest underlying difference is that Rust does not have a language runtime, whereas the other three you've listed do. Since the language runtime can preempt your code at any time, it becomes a lot easier to make async work - at the expense that now data races are easier to create.

I'm not going to pretend I'm an expert but would be happy if someone could expand further.
boustrophedon
·3 tahun yang lalu·discuss
Without specifying a particular representation[0] on the struct you want to put in "permanent memory", this seems liable to break any time you recompile the code with different optimization flags, or with a newer or older compiler that may optimize differently, or even if you just change seemingly unrelated code that then triggers or de-triggers some optimization.

[0] https://doc.rust-lang.org/reference/type-layout.html#represe...
boustrophedon
·3 tahun yang lalu·discuss
There are a lot of companies that make electronics enclosures. Some of them are waterproof. Usually they have a couple pre-drilled mounting flanges to screw in the board as well, and then you'd drill your own external holes for input/output as necessary. Here's a couple manufacturers, and you can usually find stuff on e.g. adafruit and digikey as well to save on shipping if you're buying dev boards or other parts from them already.

https://www.hammfg.com/ https://www.budind.com/ http://takachi-enclosure.com/ https://www.adafruit.com/product/903