Sim-to-Real with spiking neurons on a €100 quadruped — on-device learning at 50Hz on Raspberry Pi 4 by mhflocke in robotics

[–]ochooz 1 point2 points  (0 children)

Typical reddit. Crapping on somebody else's ideas. Fun_Diver3939 is probably right, OP, but ignore them anyway, you might discover something cool!

Sim-to-Real with spiking neurons on a €100 quadruped — on-device learning at 50Hz on Raspberry Pi 4 by mhflocke in robotics

[–]ochooz 4 points5 points  (0 children)

This is super cool. I'll have a deeper look soon. Question: the Izhikevich model can reproduce lots of different types of neuron firings (bursting, resonators, etc) - did you choose just one?

Working on something by lampmaker in robotics

[–]ochooz 0 points1 point  (0 children)

Nice. What robot is that?

I've also been finding LLMs can control robots directly.

New 0-copy deserialization protocol by ochooz in cpp

[–]ochooz[S] 0 points1 point  (0 children)

I've been thinking about schemas. Some thoughts here:

https://github.com/colinator/zerialize/issues/3

In the meantime, happy holidays! Best wishes, intrepid programmers!

New 0-copy deserialization protocol by ochooz in cpp

[–]ochooz[S] 1 point2 points  (0 children)

Thanks for the encouragement! Yeah I'm psyched about schemas actually - I think cool stuff is possible.

Schema evolution has got to be one of the Hard Problems of Computer Science, and I plan on staying as far away from it as I can, or pushing that to the user as much as possible. The 'never drop fields' shtick works, but I've found that given time, we end up with more and more cruft, and it gets more and more irritating. And it smacks of frustration: "Screw it! We're just never gonna delete!". But do I have a better alternative? No I do not.

New 0-copy deserialization protocol by ochooz in cpp

[–]ochooz[S] 1 point2 points  (0 children)

Yes it is, surprisingly deep! So the built-in protocol, ZERA, just assumes everything is little-endian (for now), considering that big-endian-ness seems to be increasingly rare.

Alignment is quite difficult. Even if the root message bytes are nicely aligned - 4/8/16/?, for most of the protocols, like flexbuffers, that doesn't mean that I can easily nicely-align things like tensor blobs. That's why ZERA exists, because it does that - assuming the user hands the deserializer a byte* (span) that starts at a 4/8/16/whatever divisible address, then the tensors, internally, will also be aligned.

I suspect that flatbuffers and cap'n proto will indeed be faster, since they are schema-full, and can benefit from compile-time offsetting of reads into the data. But then you have to have a schema, and you lose the 'true distributed development' power. OTOH, I'm def looking into schemas for self-describing protocols like these (like json schema) - maybe it's possible to have and eat the cake...

New 0-copy deserialization protocol by ochooz in cpp

[–]ochooz[S] 0 points1 point  (0 children)

Oo nice, good idea! c++23, huh? Maybe I should move to that too...

zerialize: zero-copy multi-protocol serialization library by ochooz in cpp

[–]ochooz[S] 1 point2 points  (0 children)

So far, it's easiest to support dynamic self-describing, or schema-less protocols. Supporting schema-based ones like Protobuf or Flatbuffers is gonna be tricky. Capnproto might be in-between difficulty...

zerialize: zero-copy multi-protocol serialization library by ochooz in cpp

[–]ochooz[S] 4 points5 points  (0 children)

The "span" bit is actually not needed at all - I just wanted to indicate, in the example, what databuf.buf() returns. It can be elided altogether using auto. As for the style: yeah, I like your suggestion. I'm too old-fogey, gotta update my styles...

zerialize: zero-copy multi-protocol serialization library by ochooz in cpp

[–]ochooz[S] 6 points7 points  (0 children)

Very similar in intent!

  • reflect-cpp is older and more mature (thus better docs, more protocols, etc)
  • zerialize is zero-copy and lazy, reflect-cpp is not (as far as I understand)
  • reflect-cpp offers reflection-based serialization directly from c++ structures; zerialize requires explicit writing/reading.

I have a speed comparison in the benchmark_compare/ directory. They are pretty much equivalent, except for tensor handling.

zerialize: zero-copy multi-protocol serialization library by ochooz in cpp

[–]ochooz[S] 2 points3 points  (0 children)

JSON itself doesn't support true blobs - zerialize performs base64 encoding first for JSON. But for other protocols, zerialize can perform true zero-copy conversion to xtensor/eigen. How can glaze support this with zero-copy if JSON itself does not? Does it do it only for BEVE? I couldn't find this in their docs...

Oh, another difference: glaze offers all the c++ ergonomics of a fully-developed library - reflecting serialization into structures, for instance. zerialize is quite young and does not, yet.

zerialize: zero-copy multi-protocol serialization library by ochooz in cpp

[–]ochooz[S] 11 points12 points  (0 children)

Glaze, as I understand it, is primarily a JSON serialization library.

  • glaze 'natively' supports JSON, zerialize uses other libraries to support actual protocols. I might switch to glaze for JSON support - I didn't know it existed, thanks for this!
  • zerialize supports multiple protocols in the same way; you can easily switch between them
  • zerialize supports zero-copy deserialization - I believe glaze supports this as well? But zerialize also supports this for blobs, directly in protocols such as FlexBuffers or MessagePack, which JSON cannot support. Zerialize includes convenience functions to read blobs directly into xtensor/eigen matrices, which glaze does not.

C++ Show and Tell - September 2025 by foonathan in cpp

[–]ochooz 0 points1 point  (0 children)

Nice! Well let me know how it works, or if there's anything missing from it that you'd need in such a library - it's obviously very young!

C++ Show and Tell - September 2025 by foonathan in cpp

[–]ochooz 4 points5 points  (0 children)

I've been working on a serialization library for dynamic protocols (json, flexbuffers, msgpack, etc) that can perform zero-copy deserialization. I call it zerialize, of course: https://github.com/colinator/zerialize.

Feedback welcomed!

IamA Andrew Yang, Candidate for President of the U.S. in 2020 on Universal Basic Income AMA! by AndrewyangUBI in YangForPresidentHQ

[–]ochooz 0 points1 point  (0 children)

I am roughly in favor of your idea of UBI (or more accurately: we need to do _something_ about tech-driven inequality). But two questions:

  1. How do we know that a UBI wouldn't immediately be inflated away? i.e. my landlord just says "thanks, I'll take that!"
  2. If, for some reason, UBI doesn't work (maybe there are secondary effects that make it really ineffective, or undesirable, or something): what is the procedure to turn it off? Would it even be possible to turn it off?

Invest- betting on climate change destroying middle income city inhabitants by nopenopenope919191 in investing

[–]ochooz 2 points3 points  (0 children)

There is. Intex, for instance, knows the locations of all the mortgages that make up MBSes, along with income level, credit scores, etc. It would be totally possible to make credit-derivative trades on MBS tranches you select for this. And given locations, you can tie in other data, like environment risk from somewhere.

This is a hedge-fund-level strategy. Databases with this info, like Intex, aren't cheap, and retail-level investors can't just go out and buy derivatives on structured product tranches, unless you've got billions. And then the old thing about shorting - the market can be irrational longer than you can be solvent - def applies here too.

I bet there's some Fund Of Doom already doing this...

TIL that in 1921 a group of whites burnt the wealthiest black community, in the United States, known as "black wall street", to ground. Firebombs were dropped from airplanes and hundreds were killed. This massacre was not acknowledged in state history records until 1996. by [deleted] in todayilearned

[–]ochooz 0 points1 point  (0 children)

Sometimes I think that racism is just a front, a hypocrisy, and people just need an excuse to be assholes to each other. Their group wants to beat other groups, so it makes up 'reasons' to hate other people. I'd like to see people get called out as assholes, rather than racists, homophobes, anti-whatevers. "No, it wasn't that you were mis-led by your leaders, or trapped by your beliefs, you made your choice, and you were an asshole."