code logs -> 2007 -> Mon, 20 Aug 2007< code.20070819.log - code.20070821.log >
--- Log opened Mon Aug 20 00:00:58 2007
00:07 Reiver is now known as ReivOut
00:35 * Derakon eyes his code, which is managing to get all the way up to global ID# 283300 before finishing initializing this stub. "Right, that number's garbage."
00:37
<@Derakon>
Okay, in gdb, how do I tell it to break on a given line in a given file?
00:37
<@Derakon>
Once I've broken in that file already, I can just say "break 343", for example, but I can't figure out how to do it without the context already there.
00:39
<@ToxicFrog>
break filename:123
00:39
<@Derakon>
Ah.
00:39
<@Derakon>
Danke.
00:39
<@ToxicFrog>
Same format gcc uses for error messages.
00:44 * Derakon finds...not a bug, but a failure to check an assumption which results in confusing behaviour when the user (i.e. himself) is stupid.
00:44
<@Derakon>
Namely: you have to provide images for the game objects, stupid!
00:49 gnolam [lenin@Nightstar-13557.8.5.253.se.wasadata.net] has quit [Quit: Z?]
00:50
<@Derakon>
Man, my code is just brittle all over the place.
00:50
<@Derakon>
I wish I'd written this after I'd learned not to make dumbassed assumptions all the time. ¬.¬
01:39 ReivOut is now known as Reiver
01:54
<@Reiver>
Okay, so
01:54
<@Reiver>
Python.
01:54
<@Derakon>
Snakes on a Text File.
01:54 * Reiver has 2.5 installed, with IDE up.
01:55 * Reiver attempts to work out how one gets to the coding-bit.
01:55
<@Derakon>
It really depends on your IDE. Since I do my coding in a text file, I wouldn't know how to help you.
01:58
<@ToxicFrog>
I don't use Python, but if it's like most IDEs, you just write your program as though in a text editor, and there'll be quick-run, debugging features, etc once it's ready to actually go.
01:59
<@ToxicFrog>
Or did you mean the programming bit itself? Generally (at least when making programs, not libraries) I start with the entry point and branch outwards from there.
01:59
< Vornicus>
Reiver: the "new window" thing gives you an editor window, in IDLE.
02:00
<@Derakon>
Try typing "print "Hello, world!"" (without the outer quotation marks) and then looking for a "Run" button.
02:00
<@Derakon>
Assuming you have a code window open, anyway.
02:00
< Vornicus>
IDLE starts you with an interactive interpreter though
02:00
<@Reiver>
OK, so
02:00
<@Reiver>
Now I just need to work out how to code Python.
02:00
<@Derakon>
...I've never gotten much mileage out of interactive interpreters.
02:00
< Vornicus>
heh
02:01 * Reiver ponders.
02:01
< Vornicus>
Der: I use them a lot for small things and calculators and trying stuff.
02:01
<@Reiver>
Step one: "Hello world" sounds good~
02:02
<@Reiver>
... print "Hello world"
02:03
<@Reiver>
O-kay then.
02:03 * Derakon snerks.
02:03 * Reiver is torn between "Sweet" and "But but but where's the boilerplate? ;_;"
02:03
< Vornicus>
Doesn't Python rock?
02:03 * Reiver comes to the conclusion he's been using too much java as of late~
02:03
< Vornicus>
Boilerplate is for sissies.
02:03
<@Derakon>
I should really learn Python sometime~
02:03
<@Reiver>
Vorn: Right up until you have to deal with refactoring and their thrice-bedamned tab/space conventions.
02:04
< Vornicus>
heh
02:04
<@Reiver>
Which is the main reason I've not risked typing major projects in it.
02:04
<@Reiver>
Braces may be boilerplate, but at least they let you refactor things /then/ worry about prettyness~
02:05
<@Reiver>
(Without going 'shit how many tabs in does this need to be in this section?')
02:05
< Vornicus>
Python you use your editor's "indent" and "unindent" functions.
02:05
<@Derakon>
Also, uh, if you're worrying about how many levels your code is indented, then it's indented too far.
02:05
< Vornicus>
indeed.
02:06 * Derakon remembers some code an intern wrote...it was indented to 13 levels! ;.;
02:06
<@Reiver>
Mostly cascading if statements that do it, Der
02:06
<@Reiver>
(This was in java where I couldn't specify the rules required in other formats, alas)
02:07
<@Derakon>
Java supports the "continue" keyword, which allows you to dodge most cascading if statements.
02:07
<@Derakon>
"if (something that means I don't care about the rest) {continue;}"
02:07
< Vornicus>
Cascading ifs are smelly though
02:07
<@Derakon>
Lets you avoid having an else block at all.
02:08
<@ToxicFrog>
"continue" is just another word for "I should have written this using lambdas"~
02:09 * Reiver pauses.
02:09
<@Reiver>
Not if, my bad
02:09
<@Reiver>
They were nested while loops.
02:10
< Vornicus>
Even worse.
02:10
<@Reiver>
Searching through every square on a chessboard, then comparing said square to every other square on said board to check for a valid move if the square had the appropriate peice on it~
02:10
< Vornicus>
I don't think I've /ever/ written code that legitimately needed more than three nested loops.
02:11
<@Reiver>
(Yeah, yeah, brute forcing was clumsy, but saved having to re-write my legal-move rules.)
02:11
<@Reiver>
This was ... four nested loops (StartY, StartX, DestinationY, DestinationX) and two if statements, IIRC.
02:12
< Vornicus>
Looks like you needed an iterator on your board. But.
02:12
<@Reiver>
I did need an iterator.
02:13
<@Reiver>
However I had more clock cycles and wpm than I did brainpower or time to look things up. ¬¬
02:13
< Vornicus>
heh
02:13
<@ToxicFrog>
...now I have the urge to code upon me, but no idea what to code
02:13
<@Reiver>
TF: Help me code my project thingy~
02:14 * Reiver is trying to reformat text.
02:14 * Reiver is mostly poking around trying to find file-loading and string parsing/maniulation functions. >.>
02:14
<@ToxicFrog>
I don't do python, remember?
02:15
< Vornicus>
TF: put together an SDL/OpenGL environment for Lua, check it in~
02:15
<@ToxicFrog>
Heh. OpenGL gives me the jibblies.
02:15
<@ToxicFrog>
Work on struct some more, maybe.
02:15
<@Derakon>
I could toss you Niobium, but its Lua side is in a bit of flux right now.
02:16
<@Reiver>
...That would actually be a very powerful tool for lua to have, actually...
02:16
<@Derakon>
What, OpenGL?
02:16
<@Derakon>
Or structs?
02:17
<@ToxicFrog>
Or SDL?
02:17
<@ToxicFrog>
Hmm. Maybe I should work on luaSDL some more.
02:17
<@ToxicFrog>
That event code is looking mighty nonexistent.
02:18
<@Reiver>
The OpenGL thing.
02:18
<@Reiver>
There are not very many implementations that provide a sane frontend.
02:18
<@Derakon>
I believe Python can hook into OpenGL.
02:18
< Vornicus>
OpenGL is /fucking scary/
02:18
<@Derakon>
The problem really is that OpenGL is...yeah.
02:18
<@ToxicFrog>
OpenGL is goddamn scary.
02:19
< Vornicus>
There /is/ no sane frontend, because the backend was /born of Nyarlathotep/
02:19
<@ToxicFrog>
Which is why I'm just binding the non-openGL parts of SDL.
02:22
<@ToxicFrog>
Reasons Why Linux Is Awesome, #n: # yum install tolua++ tolua++-devel
02:22
<@Derakon>
I remember mucking about with tolua and not getting very far...
02:22
<@Derakon>
Then again, that was three years ago.
02:23 Vornicus [~vorn@64.252.104.ns-20550] has quit [Quit: Leaving]
02:25 NSGuest-130 [~vorn@Admin.Nightstar.Net] has joined #code
02:26 NSGuest-130 is now known as Vornicus
02:30
<@ToxicFrog>
Hmm.
02:30
<@ToxicFrog>
So, as it is now: SDL.WM_* for window manager functions.
02:30
<@ToxicFrog>
And so forth for other subsystems like CD.
02:30
<@ToxicFrog>
I have this urge to put them into subtables; so that SDL.WM_GetInfo() would become SDL.WM.GetInfo()
02:30
<@ToxicFrog>
Is this sane?
02:31
<@Derakon>
Is there any particular value to doing so short of being able to say "I want to see the window manager functions"?
02:32
<@ToxicFrog>
No, not really.
02:32
<@Derakon>
Then I wouldn't bother.
02:34
<@ToxicFrog>
Mostly it's just that using underscores to implement namespaces gives me the jibblies these days.
02:34
<@Derakon>
Heh.
02:34
<@Derakon>
You have to contrast that with breaking the naming convention. *shrug*
02:35
<@ToxicFrog>
True, although I've already broken the naming convention by putting stuff in an SDL table rather than barfing all over _G
02:36
<@Derakon>
I still think you should try to avoid changing things as much as possible. There's no point in making people re-learn SDL just because it's in a new language.
02:36
<@Derakon>
It's not like it's egregiously broken as it is.
02:37
<@ToxicFrog>
True.
02:37
<@ToxicFrog>
Although no re-learning would be necessary.
02:37
<@ToxicFrog>
But you're right, I'll keep it in a single table.
03:27
<@ToxicFrog>
Ok, stocktaking complete.
03:27
<@ToxicFrog>
Stuff that still needs to be done:
03:27
<@ToxicFrog>
- all YUV overlay stuff
03:27
<@ToxicFrog>
- all audio stuff
03:27
<@ToxicFrog>
- all event queue stuff
03:27
<@ToxicFrog>
- keymap
03:27
<@ToxicFrog>
- getmodstate & setmodstate need table interface rather than bitmask
03:27
<@ToxicFrog>
- getmousestate needs table interface rather than bitmask
03:27
<@ToxicFrog>
- timer functions, and timer ctor function
03:27
<@ToxicFrog>
- lots of typedefs (4 video, 1 overlay, 2 audio, 9274 events)
03:27
<@ToxicFrog>
- ListModes
03:27
<@ToxicFrog>
- color/gamma
03:27
<@ToxicFrog>
- GetClipRect
03:27
<@ToxicFrog>
- all eighteen billion ImageFilter functions in SDL_gfx
03:28
<@ToxicFrog>
Some of those will need custom glue, some of them are just tedious.
03:28
<@Derakon>
You'll pardon me for saying so, I hope, but that sounds tremendously dull.
03:30
<@ToxicFrog>
It is.
03:30
<@ToxicFrog>
Not as dull as it might seem at first glance, since I'm using tolua++; a lot of this stuff is just a matter of writing the function signatures and letting it generate the code.
03:31
<@Derakon>
Fair enough.
03:31
<@ToxicFrog>
Some of it, however, isn't.
03:32
<@ToxicFrog>
For example, tolua++ can't automatically map between bitmasks and tables.
03:32
<@ToxicFrog>
And it has trouble with functions that take pointers and fill them in.
03:32
<@ToxicFrog>
Or that return complicated arrays of structs or the like.
03:32
<@ToxicFrog>
So for some things I need to write custom glue code.
04:06 * Reiver pokes at Python curiously.
04:06
<@Reiver>
How do I define variables?
04:07
<@Derakon>
foo = value, according to http://www.developer.com/lang/other/article.php/626321
04:08
<@Reiver>
hrm
04:08 * Reiver attempts to work out how one makes a file reader then.
04:09
<@Derakon>
Presumably, you open a file handle, iteratively call its get-next-line function (whatever it's called), and when you're done, close the handle.
04:09
< Vornicus>
f = file(filename, flags)
04:09
<@Reiver>
Ah!
04:09 * Reiver had screwed that bit up, thankses the Vorn.
04:09
< Vornicus>
for line in <file-like object>: iterate over lines in the file.
04:10
<@Reiver>
Man.
04:10 * Reiver scratches his head
04:12 * Reiver starts jotting psuedocode to help him have a clue what is meant to be going on here.
04:22
<@Reiver>
okay then.
04:22 * Reiver swears he'll figure out how to load a file then output its contents, honest!
04:23
< Vornicus>
print file(filename,'r').read()
04:39
<@Reiver>
f = open('G:\Code\Python\SpellListConverter\Orig.txt','r')
04:39
<@Reiver>
print f.read()
04:39
<@Reiver>
^ I've done a stupid somewhere.
04:39 * Reiver scratches his head.
04:39
< Vornicus>
yes.
04:39
< Vornicus>
escape backslashes, because they're the escape character.
04:39
< Vornicus>
G:\\...
04:40
<@Reiver>
...oh, whoops~
04:40
<@Derakon>
I wish Microsoft didn't use a nonstandard delimeter. ¬.¬
04:40
< Vornicus>
(same in... nearly all languages I can think of.)
04:41 * Reiver was just being Stupid, don't mind him.
04:55
<@Derakon>
12 - StrongBad's ideal universe song.
04:55
<@Derakon>
Er, wrong channel. ¬.¬
04:57 Netsplit DeepThought.NY.US.Nightstar.Net <-> Blargh.CA.US.Nightstar.Net quits: Vornicus, +DiceBot, @EvilDarkLord, @AnnoDomini, @Reiver
04:58 Derakon [~Derakon@Nightstar-12550.sea2.cablespeed.com] has quit [Operation timed out]
06:12 Forj [~Forj@Nightstar-10147.ue.woosh.co.nz] has joined #code
06:13 mode/#code [+o Forj] by ChanServ
06:35 EvilDarkLord [~jjlehto3@Nightstar-2194.vipunen.hut.fi] has joined #Code
06:35 AnnoDomini [~farkoff@Nightstar-29242.neoplus.adsl.tpnet.pl] has joined #Code
06:35 Derakon [~Derakon@Nightstar-12550.sea2.cablespeed.com] has joined #Code
06:35 Thaqui [~Thaqui@Nightstar-26823.jetstream.xtra.co.nz] has joined #Code
06:35 DiceBot [~Reiver@Nightstar-4846.ubs-dsl.xnet.co.nz] has joined #Code
06:35 mode/#code [+o AnnoDomini] by ChanServ
06:36 Reiver [~reaverta@Admin.Nightstar.Net] has joined #Code
06:36 mode/#code [+o Reiver] by ChanServ
06:36 Thaqui is now known as NSGuest-139
06:45 Netsplit DeepThought.NY.US.Nightstar.Net <-> Blargh.CA.US.Nightstar.Net quits: NSGuest-139, DiceBot, Derakon, EvilDarkLord, @AnnoDomini, @Reiver
06:46 Netsplit over, joins: EvilDarkLord
06:46 Netsplit over, joins: AnnoDomini
06:46 Netsplit over, joins: Derakon, NSGuest-139
06:46 Netsplit over, joins: DiceBot
06:46 mode/#code [+o AnnoDomini] by ChanServ
06:46 Netsplit over, joins: Reiver
06:46 mode/#code [+o Derakon] by ChanServ
06:46 mode/#code [+o Reiver] by ChanServ
06:48 Derakon is now known as Derakon[AFK]
06:48 NSGuest-139 is now known as Thaqui
07:09 ErikMesoy [~ejm@Nightstar-2585.bb.online.no] has joined #code
07:20 AnnoDomini [~farkoff@Nightstar-29242.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
07:33 AnnoDomini [~farkoff@Nightstar-29744.neoplus.adsl.tpnet.pl] has joined #Code
07:33 mode/#code [+o AnnoDomini] by ChanServ
07:54 ErikMesoy [~ejm@Nightstar-2585.bb.online.no] has quit [Quit: OMBG First day of university education! Whee!]
08:41 You're now known as TheWatcher
11:14 Reiver is now known as ReivZzz
11:14 Chalcedon [~Chalcedon@Nightstar-10147.ue.woosh.co.nz] has quit [Quit: Gone]
11:16 MyCatVerbs [~rb6822@Nightstar-23944.cs.bris.ac.uk] has joined #code
11:35 Forj [~Forj@Nightstar-10147.ue.woosh.co.nz] has quit [Quit: Gone]
12:30 gnolam [lenin@Nightstar-13557.8.5.253.se.wasadata.net] has joined #Code
12:30 mode/#code [+o gnolam] by ChanServ
13:19 * ToxicFrog upreads
13:19
<@ToxicFrog>
ReivZzz: another solution there is to use /, which winNT will accept
13:19
<@ToxicFrog>
win32 will not, but it can die in a fire
14:52 MyCatVerbs [~rb6822@Nightstar-23944.cs.bris.ac.uk] has quit [Quit: Swim, swim, hungry!]
15:38
<@ToxicFrog>
...I am fairly certain that gcc should not be using 2GB of memory
15:39
<@AnnoDomini>
In Sovien Russia, wandering monsters encounter YOU.
15:39
<@AnnoDomini>
*Soviet
15:39 * AnnoDomini imagines a jRPG with the party travelling through Soviet Russia at some point, and encountering random monsters only if they stand still for a while.
15:48
<@ToxicFrog>
cc1plus is up to 2083MB allocated, 1.8G in physical memory, and 27 minutes of CPU time.
15:48
<@ToxicFrog>
;.;
17:02
<@gnolam>
I think you passed -bogdownsystem when you initiated the compile.
17:15 You're now known as TheWatcher[afk]
17:52 gnolam is now known as gnolam|Gig
18:14 You're now known as TheWatcher
18:34 Syloqs-AFH [Syloq@NetAdmin.Nightstar.Net] has quit [Ping Timeout]
18:45 Netsplit DeepThought.NY.US.Nightstar.Net <-> Blargh.CA.US.Nightstar.Net quits: DiceBot, EvilDarkLord, @ReivZzz, Thaqui, @Derakon[AFK], @gnolam|Gig
18:45 Netsplit over, joins: EvilDarkLord
18:45 Netsplit over, joins: Derakon[AFK], Thaqui, DiceBot
18:45 Netsplit over, joins: ReivZzz, gnolam|Gig
18:45 mode/#code [+o Thaqui] by ChanServ
18:54 Vornicus [~vorn@Admin.Nightstar.Net] has joined #code
18:54 mode/#code [+o Vornicus] by ChanServ
19:26 Forj [~Forj@Nightstar-10147.ue.woosh.co.nz] has joined #code
19:26 mode/#code [+o Forj] by ChanServ
19:48 Forj [~Forj@Nightstar-10147.ue.woosh.co.nz] has quit [Quit: Gone]
19:52 Netsplit DeepThought.NY.US.Nightstar.Net <-> Blargh.CA.US.Nightstar.Net quits: DiceBot, @Vornicus, EvilDarkLord, ReivZzz, @Thaqui, Derakon[AFK], gnolam|Gig
19:52 Netsplit over, joins: EvilDarkLord
19:52 Netsplit over, joins: Vornicus, Derakon[AFK], Thaqui, DiceBot
19:52 mode/#code [+o Vornicus] by ChanServ
19:52 Netsplit over, joins: ReivZzz, gnolam|Gig
19:52 mode/#code [+o Thaqui] by ChanServ
20:01 gnolam|Gig is now known as gnolam
20:48 * ToxicFrog fiddles with a generic I7 Makefile
20:55
<@ToxicFrog>
$(OUT): Source/story.ni
20:55
<@ToxicFrog>
i7 -szcode=$(ZCODE) -c . >/dev/null 2>&1
20:55
<@ToxicFrog>
Source/story.ni: $(SRCS)
20:55
<@ToxicFrog>
cd Source && awk '/^!include/ { $$1=""; system("cat " $$0); next; } { print $$0; }' < story.i7 > story.ni
20:55
<@ToxicFrog>
Hah!
20:56
<@ToxicFrog>
I can now make a new I7 project with ( mkdir $1 && cd $1 && ln ~/src/Makefile.i7 ./Makefile && make setup )
20:56
<@ToxicFrog>
And "make (settings|z5|z6|z8|glulx|clean|run)" all work as expected.
21:06 You're now known as TheWatcher[afk]
21:17
<@ToxicFrog>
Make gurus!
21:18
<@ToxicFrog>
What is the variable that expands to the containing makefile?
21:57 You're now known as TheWatcher
22:04 * ToxicFrog upgrades the preprocessor to insert comments detailing what, exactly, it's including
23:23 Chalcedon [~Chalcedon@Nightstar-10147.ue.woosh.co.nz] has joined #code
23:23 mode/#code [+o Chalcedon] by ChanServ
--- Log closed Tue Aug 21 00:00:04 2007
code logs -> 2007 -> Mon, 20 Aug 2007< code.20070819.log - code.20070821.log >