Live data from Hacker News

Show HN: C++ Editor for Teaching How to Code

emun.ro

11–20 of 31 posts

Re: Show HN: C++ Editor for Teaching How to Code

#11

Hello, I was thinking at a solution to teach code easier for the beginners. C++ is the only available language for computer science classes in my country. The project is aimed to teach coding for students as the next step after Scratch. The language implementation is just a subset of C++, it relies on JSCPP interpreter. I am looking for feedback and suggestions. Thanks!

It is completely broken (interface) on mobile.

At this point, sadly yes. I'm just experimenting to see if the live visualization is useful.

Re: Show HN: C++ Editor for Teaching How to Code

#13
Good work, pleasing UI (when it works). Please also compare with the excellent pythontutor.com website (it works with C++ too: http://pythontutor.com/cpp.html ).

Examples of differences I can see:

* pythontutor requires a backend and does not run entirely in the browser.

* pythontutor supports much more of C++ (i.e., has fewer limitations)

* shows pointers, heap and stack better.

But there are probably many more differences; would like to see a comparison among similar resources. Anyway, I think this sort of live visualization is indeed very useful; great work and please continue.

Re: Show HN: C++ Editor for Teaching How to Code

#14

Kinda neat but it looks extremely limited in ways that I think would frustrate a beginner: E.g. the following doesn't do anything #include using namespace std; int get7() { return 7; } int main() { return get7(); } but if you manually inline the get7() it displays 7, so returning the value from another function doesn't work which seems quite odd and I think would preclude playing with recursion. (You can assign the g…

In this case there are no variables updated so the editor is not very useful indeed. The parsing erros for this interpreter are very limited, however there is internal access to the location of the failure (line, column) so there could be added a red underline to suggest the errors. Thanks for the feedback!

Re: Show HN: C++ Editor for Teaching How to Code

#15
post #13

Good work, pleasing UI (when it works). Please also compare with the excellent pythontutor.com website (it works with C++ too: http://pythontutor.com/cpp.html ). Examples of differences I can see: * pythontutor requires a backend and does not run entirely in the browser. * pythontutor supports much more of C++ (i.e., has fewer limitations) * shows pointers, heap and stack better. But there are probably many more diff…

Python Tututor is the first project in this category that I totally loved it. The dream would be to have all the options Python Tutor has and also speed and user experience, but technically there is not very easy to achieve. Thanks for the feedback!

Re: Show HN: C++ Editor for Teaching How to Code

#20

It fails to compile the program #include int main() { int x = 23; std::cout It seems like it can't handle namespaces. When I write #include it complains, "cannot find library: vector". I think this isn't going to be very useful for people unless you get a C++ evaluator that works correctly. There is a demo of Clang running in the browser using webassembly here: >> https://tbfleming.github.io/cib/ << but it doesn't ac…

The repo of the original interpreter: https://github.com/felixhao28/JSCPP Which notable features are not implemented yet? Goto statements Object-oriented features Namespaces Multiple files support The target audience would consists in students trying simple algorithms. By the end of the high school, students are only using very basic C-syntax: variables, arrays, functions, and a couple of functions from the standard…

As far as I can tell, this interpreter doesn't even have std::string, and you can't define your own datatypes or allocate. The interpreter also doesn't handle pointers into arrays properly.

I'm not familiar with other countries' curricula, but we had vectors and strings very early on when I learned C++. I like the general idea of the debugging interface, that could help a lot of people. But I think you should upgrade the interpreter. I don't know if that's possible while retaining the debugging interface, unfortunately.

Post reply on HN