Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
chjj
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
61.
▲
by
chjj
5y ago
> No it isn't the only option, plenty of languages are available My point exactly. > to write secure software as a sales pitch for Rust. You guys already do a good job of writing the sales pitches. I'll leave that to you.
62.
▲
by
chjj
5y ago
> Why is this an argument? Who said it was an argument? It's merely an observation of what I've witnessed here on HN: endless sentiment about rust and how everything should have been written in it. The linux kernel was initiall
63.
▲
by
chjj
5y ago
Right. So in your opinion, is it irresponsible to write a project intended for production in C or C++?
64.
▲
by
chjj
5y ago
Memory safety is certainly a topic worth talking about, but on HN it always ends with the same conclusion: use rust. Is that really the only solution? I've never seen anything quite like the rust community. They're hell-bent on re
65.
▲
by
chjj
5y ago
I imagine they do. If they didn't, they wouldn't be using it. They would instead be using some equivalent piece of software written in a trendy language.
66.
▲
by
chjj
5y ago
I never said new languages are a bad thing. I only made the point that people mindlessly bandwagoning and repeating the same talking points endlessly is an annoying thing.
67.
▲
by
chjj
5y ago
There's no reason not to. We'll just have to suffer through thousands more HN posts saying "new thing better, they should have used the new thing" whenever somebody finds a new kernel vulnerability. It does nothing to he
68.
▲
by
chjj
5y ago
Yes. I understand the argument. It's only been reiterated on HN hundreds of times now. > it removes the last excuse of C/C++ Odd way of looking at it. I never ask myself "what _excuse_ can I give myself for using this tool
69.
▲
by
chjj
5y ago
I'm starting to get sick of the neverending "rust good, c bad" sentiment on HN. Bugs occur in rust code too. It's not a silver bullet to fix all problems associated with software development. Each language will have its
70.
▲
by
chjj
5y ago
This is more-or-less a line-for-line port at the moment (though, a number of C++ primitives had to be implemented in C in order to do that). It took a few weeks of coding to get this in a state where I'm comfortable open sourcing it, b
71.
▲
Show HN: lcdb – LevelDB Implemented in C
(github.com)
8 points
by
chjj
5y ago
|
1 comments
72.
▲
by
chjj
5y ago
Most terminals (even non-unicode-capable ones) offer a feature to switch into "alt charset mode" which provides glyphs for drawing lines.
73.
▲
by
chjj
5y ago
Unicode isn't necessary if the terminal supports ACS.
74.
▲
by
chjj
5y ago
Now I'm wondering why ldd doesn't offer this feature in the first place.
75.
▲
by
chjj
5y ago
My first bitcoin reimplementation was written in node.js and called bcoin[1]. So this is my second time reimplementing the bitcoin protocol, albeit in a very different language. Bcoin was frequently used as a reference along with bitcoin co
76.
▲
by
chjj
5y ago
You make a good point. I will consider changing the names for the import/export functions (but maybe not the MPI code). That or explain the inputs/outputs in detail in docs.
77.
▲
by
chjj
5y ago
> Likewise, size_t tells you that this is a size, no need for the "n". How do you differentiate the two input lengths? If I were to rename `xp` to `x` and `xn` to `n`, what should `yn` be renamed to? At the very least, there&#x
78.
▲
by
chjj
5y ago
I disagree. The function name gives context as to what they're meant to represent if you understand the convention. One of the conventions in mako is something like: int btc_tx_import(btc_tx_t *z, const uint8_t *xp, size_t xn);
79.
▲
by
chjj
5y ago
Hmm, not sure. I'd have to read up on the lore more, or maybe pay more attention to the game. The thing that catches my eye there is that they say lifestream can condense into mako through natural processes as well as artificial ones.
80.
▲
by
chjj
5y ago
Some of the terse variable names are the result of my adherence to a GMP-like naming convention, which I find easy to read and aesthetically pleasing. The GMP naming convention is something like: - Pointer/Data - single letter followed
81.
▲
by
chjj
5y ago
Not to get in a pedantic FF7 debate, but I don't believe Mako was destroying the planet: Shinra's Mako reactors were destroying the planet. Mako energy was a tool, and it could be used for good or evil, just like cryptocurrency. I
82.
▲
by
chjj
5y ago
Not sure. I suppose I could add a style or coding convention guide somewhere in the repo to code that may seem confusing initially. Basic rules are: return values on the left side of params, and functions generally return a boolean for succ
83.
▲
by
chjj
5y ago
> It looks super clean to me, the only exception being for the love of all that's good and holy always brace your one-line if statements and loops. > You don't want your own "goto fail" do you? ;) [1] Ah, that was
84.
▲
by
chjj
5y ago
I considered using leveldb initially, but that would require a C++ compiler and it also requires linking to libstdc++. So at that point, you might as well just write the project in C++, which defeats the point of this project. Mako uses LMD
85.
▲
by
chjj
5y ago
No deadline. I just have a tendency towards obsession when I'm working on a project I'm very interested in. I tend to get into a kind of manic phase where I can't sleep even if I wanted to. There's no real telling when t
86.
▲
by
chjj
5y ago
Its placeholder name was originally "libsatoshi", but I was worried that would cause confusion between this project and bitcoin core. I spent the past few days thinking of names. Mako came to mind because I had recently been playi
87.
▲
by
chjj
5y ago
Right. Perhaps I should explain this in the readme. To be clear: Libbtc is a small bitcoin library meant for everyday things: signing transactions, maintaining an SPV wallet, etc. It's good at what it does, but you wouldn't be abl
88.
▲
by
chjj
5y ago
Still experimental and documentation is lacking, but right now the CLI behavior is almost identical to `bitcoind` and `bitcoin-cli`. So, for example, `$ makod -datadir=foobar -chain=testnet` will create a data directory in `./foobar` a
89.
▲
by
chjj
5y ago
Thanks. This was definitely the hardest project I've worked on in my life. I fear I may have shaved a few years off my life with all of the all-nighters I pulled with this, so it's good to hear recognition for the work. :)
90.
▲
by
chjj
5y ago
Most of the crypto is from my more general crypto library libtorsion: https://github.com/bcoin-org/libtorsion I originally wanted to vendor my libtorsion code and link to it, but it felt clunky since libtorsion pulls i
More ›