News for hackers. Stuff that matters.
Re:Two years of Rust by photojosh on Monday May 15, 2017 @08:15PM (#14346368)
> then you'll really wish that you had a REPL

Yes. I write roughly equal amounts of C (microcontroller firmware) and Python (overall system control, running on embedded Linux).

I absolutely wish I had a REPL for C. When implementing with a new library in Python, I'll usually use iPython to explore it, and if I need to run a decent amount of data through, I'll use a Jupyter notebook. I'd put the difficulty of grokking a C library somewhere between 10x and 100x harder.

Re:Two years of Rust by yorwba on Monday May 15, 2017 @11:33PM (#14347180)
I use gdb as a C REPL. You attach it to a binary that has the functions you need, then you can use them with the `p` (or `print`) command. Loops and new function definitions are not possible, but sometimes it's still good enough.
Re:Two years of Rust by RhysU on Tuesday May 16, 2017 @07:54AM (#14348858)
Gdb as REPL is a nice trick. Beaker Notebook might give the notebook parent wants for C work.
Re:Two years of Rust by photojosh on Wednesday May 17, 2017 @09:09PM (#14364155)
Thanks. It won't since all my C work is embedded and mainly systems programming rather than algorithms. But I'll keep it in mind for the next time I have to translate my Python explorations over to C for production.
Re:Two years of Rust by photojosh on Wednesday May 17, 2017 @09:04PM (#14364131)
Good point. I've only been working with AVRs for a few years since I've been at this job, but looks like it might be doable. Thanks for the tip.
Re:Two years of Rust by pjmlp on Tuesday May 16, 2017 @02:49AM (#14347829)
That is how I once developed a B+ Tree library for low level disk blocks back in 1996, it was quite helpful tracking down how the nodes were being used.
Re:Two years of Rust by pjmlp on Tuesday May 16, 2017 @02:47AM (#14347821)
C has had REPLs since the 90's, one just needs to search for them, and eventually buy them.

They were quite common advertising in The C User's Journal and Dr. Dobbs.