Live data from Hacker News

Show HN: Online C/C++ to assembly visualizer [Weekend Project]

assembly.ynh.io

11–20 of 47 posts

Re: Show HN: Online C/C++ to assembly visualizer [Weekend Project]

#11
post #6
post #3

Earlier quoted context omitted.

Ok added to the todo list

You don't filter out CPP macro's. I would skip that and only allow C code. Or run this thing in a proper jail because at the moment: - doing an include #include "/dev/random" will block the thread. - including "/etc/passwd" is also possible although I don't see a direct way to turn this into password disclosure. Seriously; even if it's a weekend project, letting people run all kinds of potentially bad code on your ma…

I have now added some basic macro detection

Re: Show HN: Online C/C++ to assembly visualizer [Weekend Project]

#12
post #11
post #6

Earlier quoted context omitted.

You don't filter out CPP macro's. I would skip that and only allow C code. Or run this thing in a proper jail because at the moment: - doing an include #include "/dev/random" will block the thread. - including "/etc/passwd" is also possible although I don't see a direct way to turn this into password disclosure. Seriously; even if it's a weekend project, letting people run all kinds of potentially bad code on your ma…

I have now added some basic macro detection

#define x "/etc/passwd" #include x

Re: Show HN: Online C/C++ to assembly visualizer [Weekend Project]

#14
post #9
post #4

Try this on iPad. Generated assembly looks very bad in terms of layout.

Apple safari browser? Is it also the case with opera or Chrome on the iPad?

I would guess it will be the same, Chrome on iPad is basically just an iOS webkit wrapper

Re: Show HN: Online C/C++ to assembly visualizer [Weekend Project]

#15
This could be a great educational tool! It could be used to teach Introductory Computer Organization at the college level.

I have a suggestion:

- Would you be able to separate the web interface, so that it could used to display Java -> JVM assembly, or any other language. Basically, so that it would be re-usable.

- Putting this up on GitHub would be great.

Finally, great work for just a weekend!

Re: Show HN: Online C/C++ to assembly visualizer [Weekend Project]

#17

This could be a great educational tool! It could be used to teach Introductory Computer Organization at the college level. I have a suggestion: - Would you be able to separate the web interface, so that it could used to display Java -> JVM assembly, or any other language. Basically, so that it would be re-usable. - Putting this up on GitHub would be great. Finally, great work for just a weekend!

The code is available on github https://github.com/ynh/cpp-to-assembly

Re: Show HN: Online C/C++ to assembly visualizer [Weekend Project]

#19
Very neat! Suggestion: add a 'flags' field where you can specify stuff like -std=c99 and any other flags you might need for your code to compile, and a horizontal rule or something like that after every line of input code.

If you do the 'flags' thing make sure you filter it to avoid escapes to the underlying shell.

Post reply on HN