HNHacker News
TopNewBestAskShowJobs

keyvank

169 karma · joined April 6, 2017

A passionate programmer! https://github.com/keyvank

Read my book: https://github.com/keyvank/tsp

submissionscomments
keyvank··on Show HN: I made a full Ethereum account-proof circuit in Circom
Almost correct! Though the system consists of 2 tokens. BETH which is 1:1 ERC-20 receipt of burnt ETH, and WORM which has a limited cap & limited emission of 50 WORM per 30 minutes which can be mined by consuming BETH :)
keyvank··on Show HN: I Built a Groth16 ZK-Proof Verifier from Scratch Using Rust
nice job! now it's time for the prover part :)
keyvank··on Show HN: Book on writing many kind of cool software from scratch
So glad you liked it!
keyvank··on Show HN: Banan-OS, an Unix-like operating system written from scratch
wow, i envy you! :) i have been working on a really simple self-compiling C compiler for some time, was wondering if you are interested in adding it to your OS haha. but if GCC works fine, then i don't see a reason :d
keyvank··on Show HN: Banan-OS, an Unix-like operating system written from scratch
can you compile and run smth like gcc in your OS?
keyvank··on Ask HN: Looking for a new hobby programming project to start
have done that already :(
keyvank··on Show HN: My C compiler compiled itself
that’s why i love HN. tnx for the links!
keyvank··on Show HN: My C compiler compiled itself
the asms should be identical, so the binaries should be identical too, unless the linker is undeterministic
keyvank··on Show HN: My C compiler compiled itself
perfect explanation, tnx!
keyvank··on Show HN: My C compiler compiled itself
i think it just supports smth like 70% of C. I didn't bother supporting floating-point operators, or arrays (I mean, malloc and pointers are fine) or etc. I just wanted smth small and self-hosting!
keyvank··on Show HN: My C compiler compiled itself
i learnt that building a c compiler isn't that hard, just takes time :)
keyvank··on Show HN: My C compiler compiled itself
thanks man!

yes that makes sense. unfortunately 30cc is not able to compile that syntax, and will probably give type-checker errors when passing a void* to pointer of another type. but will implement it sometime soon!

keyvank··on Show HN: My C compiler compiled itself
Thanks! The third step proves that the assembly code generated by the second-step compiler is valid even when compiling a big C project.
keyvank··on Show HN: My C compiler compiled itself
tnx!
keyvank··on Show HN: My C compiler compiled itself
tnx!
keyvank··on Ask HN: How can I learn about manufacturing?
Makes sense, have to get my hands dirty.
keyvank··on Ask HN: How can I learn about manufacturing?
This looks neat, thanks!
keyvank··on Ask HN: How can I learn about manufacturing?
Makerspaces seem fun! Unfortunately, there isn't something like that where I live (Iran). Wish you the best in building your factory!
keyvank··on Ask HN: How to get started with local language models?
If you want to get deep in LLMs: https://github.com/keyvank/femtoGPT
keyvank··on Ask HN: What are some lesser-known computer programming publishers?
I think publishers do a much better job marketing the book for you, plus I don't have enough money for self-publishing ;(
keyvank··on Ask HN: What are some lesser-known computer programming publishers?
Didn't know I can do both! May give it a shot
keyvank··on Ask HN: What are some lesser-known computer programming publishers?
It discusses from-scratch implementation of many kind of software. This is the book: https://keyvan.me/tsp

I like nostarch a lot! Discussed the book with them as well, but no luck.

Revenues are small I know, I'm just challenging myself to become a published author for now.

keyvank··on Ask HN: What are some lesser-known computer programming publishers?
This is it: https://keyvan.me/tsp Let's talk! keyvankambakhsh@gmail.com
keyvank··on Show HN: The Super Programmer – A colorful introduction to engineering
Ah yeah working on it. Hope you’ll like it!
keyvank··on Show HN: The Super Programmer – A colorful introduction to engineering
Oops, missed that! It should be there now.
keyvank··on Show HN: The Super Programmer – A colorful introduction to engineering
Have you tried the epub target of the Makefile in the repo? https://github.com/keyvank/tsp
keyvank··on Show HN: The Super Programmer – A colorful introduction to engineering
try "make epub" :)
keyvank··on Show HN: FemtoGPT – Pure Rust implementation of a GPT language model
Ah, that's slow. I have been able to reach 1.3s per step on my machine. Did you run with --release flag?
keyvank··on Show HN: FemtoGPT – Pure Rust implementation of a GPT language model
Hey! Yes please dive in :) It can be a starting point for learning Rust ;) MatMul is fine, the bottleneck is LayerNorm + Softmax gradients right now. Haven't been able to optimize them well yet.
keyvank··on Pure Rust implementation of a minimal GPT language model
femtoGPT is a pure Rust implementation of a minimal Generative Pretrained Transformer.

Everything is implemented from scratch, including the tensor processing logic along with training/inference code of a minimal GPT architecture.