Reading code can be a valuable learning rescource.
Is there any particular source code you have read, that taught you a lot of things? (Preferably but not nescessarily Lua)
If so, this is the place to share it!
When you post links to code, please tell us why you think it's good (or bad) and what can be learned from it.
I'd be grateful for any suggestions.
Recommended code reads?
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Recommended code reads?
If you can stand a bit of c, look at this: http://www.cs.princeton.edu/courses/arc ... tiful.html
It's not necessarily the code itself you can learn from, but more the method, and how clean and simple it is.
It's not necessarily the code itself you can learn from, but more the method, and how clean and simple it is.
Re: Recommended code reads?
That was a nice read, thank you!
Even though it's C it's quite readable and pretty concise.
Even though it's C it's quite readable and pretty concise.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Recommended code reads?
They say the source code of the official Lua is quite easy to read.
I have never actually looked at the source code of LuaJIT, so I can't comment on that.
I don't know many pieces of Lua code that I particularly like, and I am not objective enough to recommend any of mine .
I have never actually looked at the source code of LuaJIT, so I can't comment on that.
I don't know many pieces of Lua code that I particularly like, and I am not objective enough to recommend any of mine .
When I write def I mean function.
Re: Recommended code reads?
Reading the Lua code sounds reasonable in many ways.
I think a lot of LuaJIT is written in Assembler, so I'd hold off reading that for now.
I think a lot of LuaJIT is written in Assembler, so I'd hold off reading that for now.
Re: Recommended code reads?
This is a really good idea for a topic! Unfortunately, I'm not sure that I have much to add but I look forward to people hopefully posting some examples. One of the thing I like about Love is being able to pick through peoples' code and see how they did things; I've found it's the best way for me to learn.
Re: Recommended code reads?
This site helped me a bit, it has an on-page editor so you can practice without downloading or installing anything.
You also can learn pretty much anything else on that website, android, Java, html, php, css etc
Code: Select all
http://www.tutorialspoint.com/lua/index.htm
Re: Recommended code reads?
This book is really heavy stuff but its probably the best programming book ive read.
As a warning its pretty abstract, uses scheme and is written for MIT students.
http://mitpress.mit.edu/sicp/full-text/book/book.html
As a warning its pretty abstract, uses scheme and is written for MIT students.
http://mitpress.mit.edu/sicp/full-text/book/book.html
Re: Recommended code reads?
The lua code I learned the most from might have been rxi's flux library. It was totally outside of my normal way of thinking, and you know it's good because it's short, readable, and works flawlessly.
Re: Recommended code reads?
Just realized this thread was about actual code, not books
The lua source code is pretty nice if you're into C
The lua source code is pretty nice if you're into C
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 8 guests