Piezoid's comments

Piezoid | 4 years ago | on: CadQuery –- A Python parametric CAD scripting framework based on OCCT

> - good for modeling mechanical parts / lousy for modeling anything organic-looking

SDF modeling is great for organic shapes.

On the surface, it feels similar to OpenSCAD since CSG operations are natural primitives (min/max/...). Fillets / chamfers are easier to produce, compared to OpenSCAD: http://mercury.sexy/hg_sdf/#snippet

Libfive is one implementation geared towards CAD work. One issue with SDFs for CAD is that it can be difficult to work on complex models. The representation is not minimal: two SDFs can represent the same volume, but act differently when you combine them with other bodies.

Libfive's "stdlib" is quite minimal. For anything fancy, you have to build your own "DOM" on top of it, in order to organize your parametric models. I have not enough experience for that, but I think that it should be possible to build a DSL that render to an SDF expression, while supporting introspection, constraint solving, AD for gradients, etc, with goals similar to CadQuery (I don't like the stack API either). This might also help with the normalization issue above.

Piezoid | 4 years ago | on: Show HN: I'm building a non-profit search engine

YaCy is decentralized, but without the credit system. Some tokens, like QBUX, have tried to develop decentralized hosting infrastructure.

I also have been wondering how this would play out with some kind of decentralized indexes. The nodes could automatically cluster with other nodes of users sharing the same interests, using some notion of distances between query distributions. The caching and crawling tasks could then be distributed between neighbors.

Piezoid | 5 years ago | on: Powerpaste, a hydrogen technology for small vehicles

In fact, only half of the hydrogen originates from the POWERPASTE; the rest comes from the added water.

Indeed, it seems it's an hybrid of your fellow's tech, using magnesium both as a substrate for H2 and as a reducing agent for water: Mg + 2H2O -> Mg(OH)2(aq) + H2(g)

Less explosive than Na, hopefully :)

Piezoid | 6 years ago | on: U.S. wants the EU to accept chemical-washed chicken as part of trade deal

The food process relies on the fact that peracetic acid decomposes rather quickly. However, handling the active solution requires great care. It's highly corrosive and toxic.

I would mostly be concerned about the sub-products of peracids reacting with foods. I don't know if there is any studies on this subject.

Piezoid | 6 years ago | on: C++ 20: The Core Language

I have seen a library with a copy of boost in the include folder. Client code is forced to use this outdated version and must avoid transitive dependencies to boost. Please don't do that.

Piezoid | 6 years ago | on: The type of char + char

(u)int8_t have the same problems, including aliasing because they are just alias of (unsigned) char. Sometimes it's nice to have modular arithmetic mod 256, or compact memory layout for eg. count sketches.

Piezoid | 6 years ago | on: Bitcoin mining on an Apollo Guidance Computer

> For instance, the AGC (like many 1960s computers) didn't have a stack, so you had to keep track of the return address for each subroutine call.

> I managed to get everything to fit in one bank by reusing these 16 words for multiple purposes, but I spent a lot of time debugging problems when a variable clobbered a location still in use.

It could be fun to make a slightly higher level ad-hoc assembly language for solving these problems. For example SSA with basic blocks.

Piezoid | 6 years ago | on: Battle testing data integrity verification with ZFS and Btrfs

Honestly not bad. About 7 years of use on personal machine, single volume. It simpler than ZFS and allows cheap incremental backups with send/receive.

One year ago I built a RAID56 with 5 used 2TB drives from eBay. Risky move, but it went smoothly so far. It's only for home storage and important stuff is backuped off site anyway. One Seagate drive died with lots a bad sectors. The replace command took really long even with the "-r" flag (don't read from replaced drive, in theory), so I ended up unplugging the drive and rebalancing from there.

I have high hopes for bcachefs. We have a real need for a modern FS with tiered caches. I backed the project but I don't have the skills or time to help.

Piezoid | 6 years ago | on: The charm of buying old workstation hardware on the cheap

I upgraded a free T410 with two X5675, 32GB ECC RAM, PCIe to NVMe adapter, a RAID array of 2TB drives and an USB3 controller.

I's a quite capable machine. I needed it to learning about NUMA archs and test my software.

However there is no sleep mode. The boot time is not that bad for a server so I start it with IPMI bounced from a SBC.

I made it quiet the hard way, mainly for fun and learning about embedded control loops: water cooling with a passive motorbike radiator and a Arduino to control pumps and monitor temperatures while feeding fake hall sensor data to the original BMC so it doesn't freak out.

Piezoid | 6 years ago | on: Air conditioner ‘in a patch’ provides portable cooling

Having a very large distributed surface area could be key to drive the peltier cells at low current and get back some efficiency. The thermal contact with the body also helps by reducing the temperature gradient against the charges flow.

Piezoid | 6 years ago | on: Linux distros without systemd

> They pushed for Gnome to have a hard dependency on it so that everyone would be _forced_ to use it instead of just letting it be accepted by merits.

We should standardize on the interfaces, avoiding hard dependencies. There is dbus for that.

Piezoid | 6 years ago | on: Bloom Filters by Example (2013)

In my field (bioinformatics), there is a trend of using a single hash function, an over-sized bloom filter which is then compressed with something like entropy optimal RRR[1] or RoaringBitmap bit vectors. The resulting bloom filter ends up taking the same space than a properly sized bloom filter. There is two advantages: knowing the size of the set in advance is not necessary, and a single hash computation and memory access per query. However updates are not well supported.

[1] Raman, R., Raman, V., & Rao, S. S. (2002, January). Succinct indexable dictionaries with applications to encoding k-ary trees and multisets. A blog post: https://alexbowe.com/rrr/

Piezoid | 7 years ago | on: Fast Perfect Hashing

A good blog post about xor-shift-multiply reversible hash functions: https://nullprogram.com/blog/2018/07/31/ The inverse functions are easily found by computing the modular inverses of the odd multiplicative factors.

Real perfect hashing is more about hashing a non contiguous set of elements with no collisions, unlike the set of all integers that fit in n bits.

A different problem is Minimal Perfect Hashing. In addition to being injective, the function should have a minimal image of the input set: the set of keys is mapped to consecutive integers without vacant slots.

The implementations in optimal space are non-practical but some libraries construct such functions with a bit more memory (2-3bits/key), like emphf or BBhash (both on github). The latter use a series of 1-hash bloom filters where keys having collision on one layer are removed to be handled by deeper layers. The overall rank() of the bit where a key ultimately lands gives its hash.

page 2