All done now...

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

All done now...

xedover
Just submitted my final project, and passed with flying colors.

I was dreading doing the programming, since I don't have a lot of experience there with any language. But as I started looking to do the assembly by hand, I quickly decided to automate. At first I considered using a bash shell script, since that's where I usually do most of my "programming", but it doesn't lend itself to well with string processing, so I switched to Perl (the only other language I sorta know).

I had to keep Googling the syntax, since I haven't written a Perl script in quite some time, but it came back to me quickly enough.

Turns out the assignment was much easier than I first imagined, and kinda fun.

The whole Nand2Tetris project has been quite fun, and a bit challenging at times, but I learned tons.

I'll take a little break now before trying to tackle part II (again not feeling too confident with my programming skills)
Reply | Threaded
Open this post in threaded view
|

Re: All done now...

Jack Draak
Congratulations! I'm right on your heels, as I try to work a few remaining kinks out of my assembler.  It's a bit of an unholy mess at the moment, but I keep getting further through the assembler cross-check of Pong.asm... I'm up to around line 4000 before I hit a mismatch now.

I also just got the kindle version of the book so I can get a head-start on part II before I'm under the gun of a deadline, but for now, that's getting a bit ahead of myself.
Reply | Threaded
Open this post in threaded view
|

Re: All done now...

xedover
I did all my debugging on the simpler programs, first Add, then mostly Max. Once those worked, I didn't have any trouble with the others.
Reply | Threaded
Open this post in threaded view
|

Re: All done now...

Jack Draak
For those who get their kicks doing code-archeology, I have no doubt my Git-trail would be a mix of amusing and terrifying, as I stumbled my way from the first lines of code to the nearly 900 I had when I got my first full pass of Pong.asm... I'd have trouble trying to pin-point any specific issue that made/broke my code; I'd make a change, do a compare, and get thousands of lines into Pong.asm.... I'd go make another change, and suddenly only get a dozen or so valid lines out... but the change was needed... It went this way for a couple or few days for me, back and forth.

Apparently, if we do the certificate for part II, our submissions need to be in Java or Python? (Can anyone confirm or deny that?) Since I am most familiar with C++ and C# I had decided to do my Assembler in C# for the Windows console, but knowing some Python can't hurt so I've been re-doing my Assembler in that syntax.*

(*literally just finished tidying it after getting it working a few minutes ago...)

253 lines of Python, comments (spare though they now are) included....
My foundation, as I said was my C# code: 668 lines.....

I guess you could say, "Loose typing means less typing".

I surely wasted a lot of characters in my C-code though, so I don't know how fair the comparison is at the end of the day. I think 250ish is about average for people doing chapter 6 in Python, however. At any rate, I guess it's time to start digging into chapter seven!
Reply | Threaded
Open this post in threaded view
|

Re: All done now...

xedover
I'm working my way through a Python course on Codecadamey now. Its a lot easier than I thought it would be...so far.
Reply | Threaded
Open this post in threaded view
|

Re: All done now...

cadet1620
Administrator
In reply to this post by Jack Draak
There are quite a few languages supported by the part 2 grader now, but I don't currently have access to the list.  I do know that C# is one of them, but be aware that the grader runs on an Ubuntu Linux VM and students have reported problems getting Windows C# to run.  (Students have had similar issues with Microsoft's non-standard C++.)

My demonstration Python version of the assembler, which implements objects with the interfaces suggested in the book, with each class in its own file, come in at 589 lines including [alas, only a few] comments.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: All done now...

Jack Draak
In reply to this post by xedover
I agree, Python is fairly easy to get going places with... Going back to loose-typing after years of doing C is strange, but mostly liberating too. Also, for the record, I found the list of supported languages via Coursera as of March 2018:

Supported Languages
C
C++
C#
Elixir
Erlang
Go
Haskell
Java
Lua
Node.js
Perl
PHP
Python 2.7
Python 3
Ruby
Rust
Scala
Swift

Hmm, Maybe I'll have to try some Go.... I certainly don't have any urge to go back to PHP! :)