Recommended code reads?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
undef
Party member
Posts: 438
Joined: Mon Jun 10, 2013 3:09 pm
Location: Berlin
Contact:

Recommended code reads?

Post by undef »

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. :)
twitter | steam | indieDB

Check out quadrant on Steam!
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Recommended code reads?

Post by bartbes »

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.
User avatar
undef
Party member
Posts: 438
Joined: Mon Jun 10, 2013 3:09 pm
Location: Berlin
Contact:

Re: Recommended code reads?

Post by undef »

That was a nice read, thank you!
Even though it's C it's quite readable and pretty concise.
twitter | steam | indieDB

Check out quadrant on Steam!
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Recommended code reads?

Post by kikito »

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 .
When I write def I mean function.
User avatar
undef
Party member
Posts: 438
Joined: Mon Jun 10, 2013 3:09 pm
Location: Berlin
Contact:

Re: Recommended code reads?

Post by undef »

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.
twitter | steam | indieDB

Check out quadrant on Steam!
User avatar
Reef
Prole
Posts: 33
Joined: Sun Mar 04, 2012 10:19 pm

Re: Recommended code reads?

Post by Reef »

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.
User avatar
artofwork
Citizen
Posts: 91
Joined: Mon Sep 15, 2014 1:17 am
Location: East Coast USA

Re: Recommended code reads?

Post by artofwork »

This site helped me a bit, it has an on-page editor so you can practice without downloading or installing anything.

Code: Select all

http://www.tutorialspoint.com/lua/index.htm
You also can learn pretty much anything else on that website, android, Java, html, php, css etc
User avatar
Sapper
Prole
Posts: 15
Joined: Sun Oct 05, 2014 12:01 am

Re: Recommended code reads?

Post by Sapper »

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
User avatar
bdjnk
Citizen
Posts: 81
Joined: Wed Jul 03, 2013 11:44 pm

Re: Recommended code reads?

Post by bdjnk »

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.
User avatar
Sapper
Prole
Posts: 15
Joined: Sun Oct 05, 2014 12:01 am

Re: Recommended code reads?

Post by Sapper »

Just realized this thread was about actual code, not books :P
The lua source code is pretty nice if you're into C
Post Reply

Who is online

Users browsing this forum: No registered users and 82 guests