Live data from Hacker News

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

emun.ro

1–10 of 31 posts

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

#2
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!

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

#3
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 actually work for me on Firefox. Maybe I need to use Chrome. That is probably a better option for getting C++ running in the browser.

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

#4

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.

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

#5

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!

I’m curious as to which country it is that only teaches C++ for all programming?

And why that is, sounds very particular. I started programming in C and C++. Back then it was the knly languages I could find books for in the library and I had managed to get my hands on a Borland compiler via an older cousin, but I wouldn’t have picked it as a newcomer language today.

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

#6

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 library.

Some partial implementations: iostream (only cin and cout and endl) cmath cctype cstring cstdio (partial) cstdlib (partial)

Other includes could be added too.

What I am trying to highlight is if there is any possibility to increase the visual feedback for students heading first to programming.

Something more like an interpretor would be more suitable in this case, but the wasm compilation doesn't seem too slow though. Thanks for this demo!

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

#7
post #5

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!

I’m curious as to which country it is that only teaches C++ for all programming? And why that is, sounds very particular. I started programming in C and C++. Back then it was the knly languages I could find books for in the library and I had managed to get my hands on a Borland compiler via an older cousin, but I wouldn’t have picked it as a newcomer language today.

In Romania. There are computer science classes starting 11 years old students in every school but Pascal and C/C++ are the only options.

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

#8

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!

What about jupyter and root instead? https://root.cern.ch/notebooks/HowTos/HowTo_ROOT-Notebooks.h...

AFAIK it uses clang for parsing, which is as good a C++ parser as any.

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

#9
post #8

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!

What about jupyter and root instead? https://root.cern.ch/notebooks/HowTos/HowTo_ROOT-Notebooks.h... AFAIK it uses clang for parsing, which is as good a C++ parser as any.

This Jupyter integration seems really cool. Since I'm targeting educational environments it would open even more options for automated evaluation. Thanks!

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

#10
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 get7() return value to a local var and return that and it works so there is a workaround but it's awkward.)

Similarly, if there are compiler errors it gives no indication as to what the error might be. C++ compiler errors are always pretty terrible but not showing anything about where even a parse went wrong could really get in the way of fixing typos etc that can really get in the way of learning the concepts.

Post reply on HN