r/learnprogramming • • Feb 09 '19
Learn C and its lower levels interactively, in your browser.
I made a simple virtual machine that runs C in the browser.This project is made as an experiment to see if C can be learned easier if the lower level is covered in paralel.
Sandbox: https://vasyop.github.io/miniC-hosting
Tutorial part 1: https://vasyop.github.io/miniC-hosting/?0
More info: https://github.com/vasyop/miniC-hosting/blob/master/README.md
Should I continue making the rest of the tutorial?
Edit (TLDR):
Get notified when new tutorials are released.
I have establised my goals for this project.
For updates on the project, I have opened a subreddit.
Also, it's clear that a lot of people would be interested to see this project completed, so spread the word (if you the "reach" to do so, as I am not a social media person).
Edit:
First of all thank you, and thank you to all the folks at /r/javascript(I also posted there).
I highly appreciate your feedback and I have noted everything down.
I felt I got something right this time (some previous iterations here and here), but I didn't expect this exactly. This was meant to be a portfolio pet project.
It's clear to me now that this type of learning/programming tutorials are very much needed and I suspect not just for low level stuff, but also for more general programming topics as well.
That being said, ("yup, here we go") I am working full time and I also have my masters degree classes on weekends.
I very much enjoyed working on this project up until now, and it will get done for sure, seeing how well it was received.
I haven't figured details so there's a lot of missing stuff over there.
143
u/dangerbird2 Feb 09 '19
Is that a c-subset compiler, that targets a stack-based vm, that is written in C#, that runs on a mono dotnet virtual machine, that's compiled to webassembly, that runs on the browser?
That's pretty cool, and has great presentation
21
u/Wilfred-kun Feb 09 '19
I was so looking forward to seeing the division and multiplication... And then this happened.
I think this is fantastic, keep it up!
10
u/Pandazaar Feb 09 '19
Hello, I just want to say I love the idea, will definitely go through the whole tutorial and hope you continue making the rest. The only problem I had so far was first finding how to make the tutorial work, at first I thought the web site was just bugged because I just don't look intuitively at my lower right corner. Also, I found a minor mistake at the part where it returns the first negative number, after that there's a word missing: "It's this way because IT must also work with longer calculations..", but that's nothing important really. Otherwise, thanks a lot for taking a bunch of your time to show people like me what it looks like under the hood, I appreciate it :)
Edit: just realized that's the end of the tutorial.. please continue! :D
6
u/danysdragons Feb 09 '19 edited Feb 09 '19
Very neat concept, I would definitely continue! I'm an experienced developer myself, so I jumped straight to the sandbox - I'm probably not the best person to assess how well the tutorial teaches beginners.
Think about posting this on /r/blazor. Speaking of which, are there any resources for learning Blazor you would recommend?
Edit: I just discovered that a book about Blazor was published just a few days ago: https://learning.oreilly.com/library/view/blazor-revealed-building/9781484243435/
5
u/thesquarerootof1 Feb 09 '19
Very cool. This is actually very helpful. Stupid question: When you compile the C code what kind of assembly language is it on the right side ? Is 1000, 10001 the memory addresses ? What is FSTART ? This is a great program by the way.
https://imgur.com/a/hKgmfSa
EDIT: I've just noticed the tutorial right now, lol.
3
u/seemeesaw Feb 09 '19
Whats the stuff that comes up in the second column? Is that assembly language?
5
u/drgonzo90 Feb 09 '19
This is really cool, especially for someone who only knows a little bit of python. The lower-level stuff always interested me but I don't know anything about it. I'll be following this for sure.
One correction: the tutorial has a line that says "Hopefully the machine can do it faster and/or chapter than yourself."
I'm assuming you meant "cheaper?"
Keep working on the tutorial please, it's great!
3
u/whatwasmyoldhandle Feb 09 '19
Great work.
One nitpick, not a fan of hijacking Ctrl+L
3
u/LeStankeboog Feb 09 '19
This is the way of the future. Massive props to you my friend. Dont ever stop pushing this project.
3
u/Agent_545 Feb 09 '19
The interactive aspect is so much cooler than just reading paragraphs on a page or something. Definitely continue!
2
u/C_Adephagos Feb 09 '19
Nice, thanks for sharing!
2
u/smellslikekeenspirit Feb 09 '19
I always thought I needed this. Please continue with the great stuff!
2
u/polychoroid Feb 09 '19
This is really good work, please keep it up. I'm looking forward to your future tutorials.
2
u/AccordingMiddle Feb 10 '19
Honestly the best low level C representation I’ve ever seen. Please keep going!!
2
u/[deleted] Feb 10 '19
It isn't loading for me. I just get a blank page.
1
u/[deleted] Feb 10 '19
I've been looking for something like this for a long time... PLEASE keep going! :)
1
u/Nobody_1707 Feb 10 '19
I can't seem to get it to work in Mac Safari 12.0.3 (13606.4.5.3.1), but it works in Chrome.
1
u/desi_ninja Feb 10 '19
It is awesome. Post with a good title to hackernews. You will get a lot of traffic from there.