5 ms·
I've been coding some 10-15% of my two-decade coding career in C (and C++), and have been mentoring people over video conferencing and a shared server accessed
by pflanze 5y ago
I've been coding some 10-15% of my two-decade coding career in C (and C++), and have been mentoring people over video conferencing and a shared server accessed via VNC. Usually I do that for pay, but I'm interested in programming language implementations (I'm doing some of that myself)[1], and I've occasionally been working on implementing a Forth-like language myself[2], and so I'm willing to spend some time with you (say, 10 sessions, ~2 hours each) for free. Let's see what we can achieve, and I'll tell you at any point what the best way forward will be. I don't really share the opinion with some others who suggest to re-implement it in another language--for that you really have to understand the original code base first, and if you do, then it shouldn't be hard to fix the issues in C, either. I personally will probably suggest to leave it in C, it will most likely be less work, and it will have lighter dependencies. You can find my contact info from my profile.
PS. some of the first things to do will be to:
- if there's a way to get hold of previous versions, make a fresh Git history that includes them, so that the changes can be correlated with release notes
- use the sanitizers offered by today's compilers, or valgrind if having to compile it with old compilers.
- read the code about how it encodes pointers, and adapt that to 64 bit if needed
- maybe instrument the garbage collector if issues show up there, maybe move to allocating memory via malloc so that the memory sanitizer will catch violations
- write documentation about the workings that we study (that helps getting a clear mind and staying focused, and may help people in the future)
[1] https://github.com/pflanze/lilyvm https://github.com/pflanze/lilyvm
[2] https://github.com/pflanze/copycat https://github.com/pflanze/copycat
- mikewarot 5y agoThanks for the offer, I'll get in touch. Copycat looks interesting. I can see how Stoical and Copycat are mirrors of each other. As for LilyVM, trying to cram anything into a 6502 is an interesting exercise.
- pflanze 5y ago> cram anything into a 6502 I noticed some people working on an LLVM backend for the 6502; I may revisit the C-64 target once that matures (it will generate better code than cc65, and I'm now relying on modern C features that cc65 doesn't support). I currently concentrate on getting LilyVM to do anything useful for me on modern systems. (I've got some more work that I haven't pushed yet; but I mainly need to finally start working on the compiler to bytecode, which is a larger can of worms than the VM. I might first re-implement Copycat on it.)
- spc476 5y agoI'll be up to help. I've been programming in C for 30 years now (and still do). One of my "when I'm bored" projects is updating an early 90s C code base [1]. And I do have an interest in Forth, so this sounds like an interesting project. My email is on my profile. [1] Viola, one of the first graphical web browsers that assumes sizeof(int) == sizeof(long) == sizeof(every pointer).
- pflanze 5y agoI'd be very happy for you to join some of the sessions that I initiated (if they will take place): https://news.ycombinator.com/item?id=30973570 https://news.ycombinator.com/item?id=30973570
- all2 5y agoI would pay just to watch over your shoulder while you did this. It would be hard for me to not ask questions, though. :)
- mikewarot 5y agoI'm not adverse to doing a livestream on YouTube, or a Skype call, etc.
- tangjurine 5y agoI would definitely watch a livestream on YouTube
- pflanze 5y agoIs Jitsi OK, too? see https://news.ycombinator.com/item?id=30973570 https://news.ycombinator.com/item?id=30973570
- ungamed 5y agoLivestream preferred for me, twitch/yt. no skype here.
- pflanze 5y agoIs Jitsi OK, too? see https://news.ycombinator.com/item?id=30973570 https://news.ycombinator.com/item?id=30973570
- c0npr 5y agoI think lots of people will be interested, keep us posted if the live streaming really happens!
- pflanze 5y agoSee https://news.ycombinator.com/item?id=30973570 https://news.ycombinator.com/item?id=30973570 -- just join the Jitsi session, if that's OK with you (say if not, I'd be wondering why).
- HenrikB 5y agoMaybe also: - Write lots of tests with high test coverage before migration. Then you can rely on them on a continuous basis to make sure any updates do not break the existing functionality
- all2 5y agoThis sounds like it could be a fun exercise all by itself (I'm a test engineer, and I enjoy testing :D )
- pflanze 5y agoYes, extending the test suite may definitely be worthwhile. Also, using AFL+ to collect non-crashing test cases can make this quick and somewhat exhaustive (while admittedly not giving as easy hints about what might be broken than manually created tests would). Just in case you're interested in joining the sessions that I initiated, see https://news.ycombinator.com/item?id=30973570 https://news.ycombinator.com/item?id=30973570
- stazz1 5y agoThis is the only way to ensure sanity is maintained through this arduous process.