HackerTrans
TopNewTrendsCommentsPastAskShowJobs

slooonz

no profile record

Submissions

Show HN: Uback 0.7 – A universal bridge between backup sources and destinations

github.com
1 points·by slooonz·5 месяцев назад·0 comments

comments

slooonz
·3 месяца назад·discuss
One of the hardest problem in programming is naming your variables correctly.

I love chaining because it reduce the number of occurrences of that problem.
slooonz
·3 месяца назад·discuss
"What Elon Musk think or at least pretend to think" is indeed an useful/interesting piece of information, and I don’t see why a commentary on it is necessary or particularly useful ?

I mean, I can do the "critical reading of CEO claim" part myself, thank you very much.

And it’s not just CEOs. Politicians, spokepersons of foreign nations, academics, journalists also do that "X said a thing" thing. It’s perfectly fine. I don’t need or desire the personal take of the journalist on that declaration. They have opinion pieces for that.
slooonz
·5 месяцев назад·discuss
versitygw is the simplest "just expose some S3-compatible API on top of some local folder"
slooonz
·6 месяцев назад·discuss
Why would I pick this over established players : Maddy, Mox, Stalwart ?
slooonz
·7 месяцев назад·discuss
You’re just doing brute force, but with extra steps. It turns out that partial collisions are more common than you think, and it’s not particularly hard to find some.

Here, a 186-bits partial collision, found in less than two minutes on my CPU, by brute force :

sha256(cbfad45814d54d1d56d30de387d957ed3b50e06270ad6e4b897f4a0000000000) = 692207e28eb8dd3eb4f8fab938ea5103faa1060c3bbed204f564e10c65d06b33 sha256(cbfad45814d54d1d56d30de387d957ed3b50e06270ad6e4be8c33e0000000000) = 006347a21f7c9b3eb4fa52b75d0e5a03dbe556b579d6d2867d44c38c06546f6f

(in Python :

>>> hashlib.sha256(bytes.fromhex("cbfad45814d54d1d56d30de387d957ed3b50e06270ad6e4b897f4a0000000000")).hexdigest()

'692207e28eb8dd3eb4f8fab938ea5103faa1060c3bbed204f564e10c65d06b33'

>>> hashlib.sha256(bytes.fromhex("cbfad45814d54d1d56d30de387d957ed3b50e06270ad6e4be8c33e0000000000")).hexdigest()

'006347a21f7c9b3eb4fa52b75d0e5a03dbe556b579d6d2867d44c38c06546f6f'

>>> a = hashlib.sha256(bytes.fromhex("cbfad45814d54d1d56d30de387d957ed3b50e06270ad6e4b897f4a0000000000")).digest()

>>> b = hashlib.sha256(bytes.fromhex("cbfad45814d54d1d56d30de387d957ed3b50e06270ad6e4be8c33e0000000000")).digest()

>>> sum((x^y^0xff).bit_count() for (x, y) in zip(a, b))

186

)

Intuition pump : the expected number of equal bits for two random inputs is 128.
slooonz
·8 месяцев назад·discuss
Yes it should, because hopefully errors are logged and reported and can be acted upon. Missing name doesn’t.
slooonz
·8 месяцев назад·discuss
It was goofy and fun-looking when the first blog did it.

Now that everyone and its dog does those "goofy" illustrations, I find them insufferable.
slooonz
·8 месяцев назад·discuss
I think you should clearly spell out how the key is derived.

From the description, I believe it's random string hard-coded in the executable + user-provided password => AES key ?

Also… "full offline", but "my API is on a digital ocean droplet" ? What ?

(I guess the API to generate a .exe with its own random string ? But again, very unclear of what it is, what’s it’s doing, and how)
slooonz
·в прошлом году·discuss
Operational concerns trumps raw performances most of the time. Stored procedures live in a different CI/CD environment, with a different testing framework (if there’s even one), on a different deployment lifecycle, using a different language than my main code. It is also essentially an un-pinnable dependency. Too much pain for the gain.

Now, give me ephemeral, per-connection procedures (call them unstored procedures for fun) that I can write in the language I want but that run on provider side, sure I’ll happily use them.
slooonz
·в прошлом году·discuss
That was my first thought, an aimless dialogue is going to go toward content-free idle chat. Like humans talking about weather.
slooonz
·в прошлом году·discuss
They failed hard with Claude 4 IMO. I just can't have any feedback other than "What a fascinating insight" followed by a reformulation (and, to be generous, an exploration) of what I said, even when Opus 3 has no trouble finding limitations.

By comparison o3 is brutally honest (I regularly flatly get answers starting with "No, that’s wrong") and it’s awesome.
slooonz
·в прошлом году·discuss
Mostly males. I’m French and "Claude can be female" is a almost a TIL thing (wikipedia says ~5% of Claudes are women in 2022 — and apparently this 5% is counting Claudia).
slooonz
·в прошлом году·discuss
> A priority was to make setup and trial easy for non-technical users

That’s a very strange priority. Why would non-technical users would be interested in a file format and a Python library ?
slooonz
·в прошлом году·discuss
Yes. This is partly why this article is crap. k*G is never defined, and is the core operation in ECC (also: the article insist on using an elliptic curve in R, but you need to do it on a finite field, because on a smooth curve you can just use a smooth interpolation to solve the logarithm — and obviously once you go on a finite field the curve no longer looks nice, it’s just a seemingly random cloud of points).

Very roughly speaking, putting the complication of "point at infinity" problem under the rug, a characteristic feature of a EC is that a straight line passing through two points on the curve will pass through a third point on the curve (yes, unless you take a vertical line, point at infinity). So you can define an "addition of points on the curve" : take two points A and B, draw a straight line passing through them, name the third intersection point between the line and the curve C, declare A + B = C (actually there’s a symmetry around the x axis involved for the usual properties of addition to hold, another complication, let's sweep it under the rug too).

(for A = B, take the tangent of the curve at A ; in R you can see that it works because you can take the limit as B goes arbitrarily close to A : that gives you the tangent ; in a finite field that’s less obvious but the algebraic proof is the same)

So k*G is just G + G + ... + G, k times.

If you want more details, your favorite reasoning LLM can do a better job explaining what I’ve swept under the rug.
slooonz
·в прошлом году·discuss
Remember that input tokens are quadratic with the length of the conversation, since you re-upload the n previous messages to get the (n+1)-nth message. When Claude completes a task in 3-4 shots, that’s cents. When he goes down in a rabbit hole, however…
slooonz
·в прошлом году·discuss
2200 lines. Half of them unit tests I would probably have been too lazy to write myself even for a "more real" project. Yes, I consider $20 cheap for that, considering:

1. It’s a learning experience 2. Looking at the chat transcripts, many of those dollars are burned for stupid reasons (Claude often fails with the insertLines/replaceLines functions and break files due to miss-by-1 offset) that are probably fixable 3. Remember that Claude started from a really rudimentary base with few tools — the bootstrapping was especially inefficient

Next experiment will be on an existing codebase, but that’s probably for next weekend.
slooonz
·в прошлом году·discuss
I decided to try seriously the Sonnet 3.7. I started with a simple prompt on claude.ai ("Do you know claude code ? Can you do a simple implementation for me ?"). After minimal tweaking from me, it gave me this : https://gist.github.com/sloonz/3eb7d7582c33e95f2b000a0920016...

After interacting with this tool, I decided it would be nice if the tool could edit itself, so I asked (him ? it ?) to create its next version. It came up with a non-working version of this https://gist.github.com/sloonz/3eb7d7582c33e95f2b000a0920016.... I fixed the bug manually, but it started an interactive loop : I could now describe what I wanted, describe the bugs, and the tool will add the features/fix the bugs itself.

I decided to rewrite it in Typescript (by that I mean: can you rewrite yourself in typescript). And then add other tools (by that: create tools and unit tests for the tools). https://gist.github.com/sloonz/3eb7d7582c33e95f2b000a0920016... and https://gist.github.com/sloonz/3eb7d7582c33e95f2b000a0920016... have been created by the tool itself, without any manual fix from me. Setting up the testing/mock framework ? Done by the tool itself too.

In one day (and $20), I essentially had recreated claude-code. That I could improve just by asking "Please add feature XXX". $2 a feature, with unit tests, on average.
slooonz
·3 года назад·discuss
Important (IMO) reminder that StackAid exists and has been made just to solve this kind of problems.

(I’m not affiliated with them)
slooonz
·5 лет назад·discuss
How does branching work ? Is it provided by Vitess, or did you build it on top of it ?