News for hackers. Stuff that matters.
Re:Show HN: Edabit – Like Duolingo for Learning to Code by rjplatte on Wednesday November 14, 2018 @02:04PM (#18452778)
He needs to be running a client-side service, not running whatever someone enters on his machine
Re:Show HN: Edabit – Like Duolingo for Learning to Code by hathawsh on Wednesday November 14, 2018 @02:34PM (#18453076)
I wonder if WebAssembly could help accomplish that.

Still, even Rust has a compile-and-execute web service call accessible from the rust-lang home page. If Rust people (who tend to emphasize security) feel it is possible to secure that web service, then I'm inclined to believe them. It may be difficult though.

Re:Show HN: Edabit – Like Duolingo for Learning to Code by rjplatte on Wednesday November 14, 2018 @04:01PM (#18453911)
Thanks for my next project!
Re:Show HN: Edabit – Like Duolingo for Learning to Code by hathawsh on Wednesday November 14, 2018 @04:21PM (#18454074)
Actually I think the Rust folks would appreciate any feedback on the security of the service, as long as you don't DoS it or use it to do anything bad. :-)
Re:Show HN: Edabit – Like Duolingo for Learning to Code by xtrapolate on Wednesday November 14, 2018 @02:25PM (#18453005)
> "He needs to be running a client-side service, not running whatever someone enters on his machine"

I would say that for the most part, websites such as this don't actually need a real, full-blown %s-lang compiler/VM that actually executes real code on a backend server. It would be enough to tokenize and parse things on the client's side and validate ABNF via JS. This would reduce the costs involved with running such a website, and the attack surface. If you want to get fancy, you could host an in-browser Python VM - but that's an overkill for a website such as this. Also, they're trying to support a fair bit of languages here, not all of which have browser-targeted tooling that could compile and run the code.

Re:Show HN: Edabit – Like Duolingo for Learning to Code by wild_preference on Wednesday November 14, 2018 @04:01PM (#18453904)
Then you end up with a system where someone can arrive at the right answer via AST that you didn't expect, which was a frustration when I helped students with a service like (IIRC) CodeCademy.
Re:Show HN: Edabit – Like Duolingo for Learning to Code by cellularmitosis on Wednesday November 14, 2018 @04:56PM (#18454426)
Parsing the AST is something I would love to apply to a site like 4clojure.com, to get a histogram of the "shape" of all of the submitted solutions.