by D4ckard on 11/11/23, 1:59 PM with 129 comments
I want to showcase Spray, a small C debugger I've been working on for a few months now. Spray has a very simple and approachable interface. Its feature set is limited at this point, but it's already enough to tackle some basic problems. I stared to work on Spray because I was curious about how debuggers work. I am also trying to design Spray in such a way that it's easy to grasp and has a small mental overhead.
I'd love to get your feedback on Spray.
Email: d4kd (at) proton (dot) me
PS: I'm generally interested compilers and language tool chains, and I'm looking for similar-minded people to work and collaborate with. I have a few similar projects on my GitHub: https://github.com/d4ckard?tab=repositories. If you find Spray interesting, you might enjoy playing around with them too.
by bluetomcat on 11/11/23, 3:50 PM
Out of curiosity, how does a 17-year-old attain that level of knowledge? Books, peers, programming clubs, parents who are programmers probably?
by trmpakufnfee on 11/11/23, 3:38 PM
I recommend you to participate in programs like Google Summer of Code, KDE Season of Code, Linux Foundation LFX, and X.org EVoC. There are some very interesting problems to solve. I wish I had known about them when I was student. Now I am working in Full time job, therefore have no time to contribute to open source.
Keep up the good work.
by koolba on 11/11/23, 3:37 PM
How long have you been programming and what languages did you start off with? I know quite a few developers decades older than you that still don't know how to write a Makefile [1].
What's the deal with the inline emojis in the source? Is that what all the cool kids are doing these days or does it just force you to be mindful of non-ASCII input?
[1]: And even more that cannot write or understand dynamically generated targets...
by pjmlp on 11/11/23, 3:40 PM
Compilers was one of the first rabbit holes that drove my interest into computing.
One of the books that I endless read multiple times, is nowadays available for free, and eventually interesting for your reading collection, even though it is about the compiler part not debugging.
"Compiler Design in C"
It is a bit oldie, but maybe interesting.
by smithza on 11/11/23, 2:51 PM
by HybridCurve on 11/12/23, 2:10 AM
by gdcbe on 11/11/23, 7:07 PM
by spiralx on 11/11/23, 4:47 PM
Putting things out there for the world to see can be a scary thing, but remember that what people say is often as much about them than it is about your work, especially so when what they say is about you.
PS I'm actually more interested in Motes than this myself, going to experiment with it now :)
by IamDaedalus on 11/11/23, 2:40 PM
by gumby on 11/11/23, 2:33 PM
by zerr on 11/11/23, 6:27 PM
by eliben on 11/11/23, 9:55 PM
I'm happy you found my articles useful :)
by cyberpunk on 11/11/23, 9:13 PM
I find it quite jarring, as someone who's spent a good 18 years reading C code :}
return lookup_breakpoint (dbg->breakpoints, get_pc (dbg->pid));
vs return lookup_breakpoint(dbg->breakpoints, get_pc(dbg->pid));
Edit: I tend to lean towards the 'bsd' style, if you have an open or freebsd system, try 'man style' and try their rules on for size.by WalterBright on 11/12/23, 4:16 AM
Awesome. That's the way it's done!
by forgotpwd16 on 11/11/23, 8:22 PM
>Parts of the Spray frontend are written in Scheme
Why you decided it do it that way rather fully in C or fully in Scheme?
by demyinn on 11/12/23, 12:50 AM
by jacknews on 11/11/23, 2:51 PM
by sneed_chucker on 11/11/23, 3:35 PM
Be careful about leaning on your age/precociousness to get approval. It's not a long term solution.
by MuffinFlavored on 11/11/23, 8:20 PM
Why couldn't the title be
> Show HN: I spent 6 months building a C debugger
Why is your age relevant other than "wow factor"?
by SillyUsername on 11/11/23, 10:25 PM
Achieving this at 17 is a rare feat even most supposed senior developers don't achieve and it ranks up there with writing an emulator.
It was only in my late 20s I understood low level architecture enough to be able to do similar work, like you through passion, which I never had in my teens (I did start programming Pong like games at 8 years old and Tetris clones around 12/13 but that's hardly the same ;) ).
Keep up the great work, it restores my faith that their are less code monkeys out their like me!
by w4yai on 11/12/23, 3:14 AM
It's actually an impressive piece of software and you can be proud about it. I love your coding style and I wish everybody could code with the same amount of dedication than you do, I can see your efforts through each line of your source code.
If you like low level stuff, I encourage you to follow the path I did at your age, that is learning computer security. Specially reverse engineering. There are computer security challenges called "CTF" or "hacking skills challenges" [1].
If you weren't aware about them, they're filled with brilliant and very curious young people as you are. You could meet some and start wonderful projects you'd be proud of all your life. Generally speaking, I'd encourage you to find peers and start doing bigger things together, even though that being said, this is only an advice from a 32 years old dude that recognize himself through you, and what is the most important thing is to do what you prefer the most. Trust yourself you'll go far !
PS : if that is relevant, don't be worried about school. Focus on yourself and learn about your mental health. Many people developing an uncommon skill at young age may feel isolated, misunderstood, secluded, etc. Please make sure to be conscious about it and if that is relevant to you and if you need it, please seek help from a therapist, there's no shame about it at all. I'm purely speaking from experience without knowing anything about you, I'm just telling you what I wish someone could told me earlier.
by lopkeny12ko on 11/11/23, 6:12 PM
Cool project, but as other commenters have pointed out, the self-promotion of off-putting. Don't hold on to using your age as a qualifier to make you stand out in job applications or otherwise.
by white_beach on 11/11/23, 2:56 PM
by bregma on 11/11/23, 6:03 PM
Now make it work for other common CPUs (aarch64, RISC-V).
Make it work for other OSes (FreeBSD has ptrace, for example).
Make sure it handles signal and thread trampolines, calls through the VDSO, and handwritten assembler that does not have function prologues. Handle C++ constructors and destructors of objects in static storage running before/after main().
Have it intercept signals. Have it follow the child or the parent after forking. Have it handle multiple threads.
Make it work with coredumps.
Make it work on core dumps from a foreign CPU architecture (big-endian PowerPC, for example).
Make it work with debug symbols in separate files from the executable.
Make it work with binaries compiled from languages other than C.
You're going to be busy for the next 20 years or so.