code logs -> 2013 -> Tue, 30 Apr 2013< code.20130429.log - code.20130501.log >
--- Log opened Tue Apr 30 00:00:41 2013
--- Day changed Tue Apr 30 2013
00:00 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
00:12 gnolam_ is now known as gnolam
00:12 mode/#code [+o gnolam] by ChanServ
01:27 Derakon[AFK] is now known as Derakon
01:50 ToxicFrog|W`rkn is now known as ToxicFrog
03:37 Chutzpah [Moltare@583787.FF2A18.190FE2.4D81A1] has quit [Ping timeout: 121 seconds]
03:40 Chutzpah [Moltare@583787.FF2A18.190FE2.4D81A1] has joined #code
03:56 RichyB [richardb@58734C.5279B7.EA7DF8.107330] has quit [Ping timeout: 121 seconds]
04:00 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
04:00 mode/#code [+qo Vornicus Vornicus] by ChanServ
04:05 Kindamoody|autojoin [Kindamoody@Nightstar-05577424.tbcn.telia.com] has joined #code
04:05 mode/#code [+o Kindamoody|autojoin] by ChanServ
04:09 Kindamoody|autojoin is now known as Kindamoody
04:30 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
04:54 RichyB [richardb@Nightstar-86656b6c.cable.virginmedia.com] has joined #code
04:56 Kindamoody [Kindamoody@Nightstar-05577424.tbcn.telia.com] has quit [Client exited]
04:57 Kindamoody|autojoin [Kindamoody@Nightstar-05577424.tbcn.telia.com] has joined #code
04:57 mode/#code [+o Kindamoody|autojoin] by ChanServ
04:57 Kindamoody|autojoin is now known as Kindamoody
05:39 Kindamoody is now known as Kindamoody|afk
06:00 Kindamoody|afk is now known as Kindamoody
06:08 Reiv [NSwebIRC@A3BDC3.5BE3EC.B8847E.5ADB9D] has quit [Ping timeout: 121 seconds]
06:12 RichyB [richardb@Nightstar-86656b6c.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
06:13 Reiv [NSwebIRC@A3BDC3.5BE3EC.B8847E.5ADB9D] has joined #code
06:14 mode/#code [+o Reiv] by ChanServ
06:19 ErikMesoy|sleep is now known as ErikMesoy
06:25 syksleep is now known as Syk
06:30 Derakon is now known as Derakon[AFK]
06:37 Kindamoody is now known as Kindamoody|out
07:17 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
07:57 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
07:57 mode/#code [+ao Derakon Derakon] by ChanServ
08:00 Derakon[AFK] [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds]
08:21 Vash [Vash@Nightstar-221158c7.sd.cox.net] has joined #code
08:21 mode/#code [+o Vash] by ChanServ
08:39 You're now known as TheWatcher
11:13 RichyB [richardb@Nightstar-86656b6c.cable.virginmedia.com] has joined #code
11:22 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has joined #code
11:23 * TheWatcher sighs at this 'scanf("%s", buffer)' in a student's code, sets forth to give them The Lecture.
11:24 Chutzpah [Moltare@583787.FF2A18.190FE2.4D81A1] has quit [Ping timeout: 121 seconds]
11:25
< AverageJoe>
its supposed to be 'scanf("%s", &buffer)' right?
11:25
< Hermit>
More like, "don't use scanf"?
11:25
<@Azash>
AverageJoe: scanf has no length specifier iirc
11:26
<@Azash>
It's a great way to put overflows into your code
11:26
< AverageJoe>
oh yeah
11:26
< AverageJoe>
derp
11:27 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
11:29
< AverageJoe>
Azash, what if buffer is defined as a *char with no set size? then its ok right? like char *buffer instead of char buffer[32]
11:29
<@Azash>
Yeah but it still has to have some memory allocated to it
11:30
<@Azash>
I'm not entirely sure how arrays work in C actually, I prefer using raw pointers..
11:30
<@Azash>
But like, you allocate a certain amount of memory and assign it to the pointer
11:30
<@Azash>
Without length checking you can still go past the allocated memory
11:34
<@TheWatcher>
AverageJoe: `char *buffer; scanf("%s", buffer);` is even worse, as that's telling it to read from stdin into /a completely random location in your process' address space/. Doing `char *buffer; scanf("%s", &buffer);` will do hilarious things too - any sane compiler will give a warning that you're passing it the wrong argument, because what you're saying there is 'read bytes from stdin, and make buffer point to the address in memory specified by
11:34
<@TheWatcher>
the first sizeof(char *) bytes... oh, and then continue to trash the stack after that, writing the remaining bytes over it'
11:35
< AverageJoe>
i see
11:35
< AverageJoe>
thanks denis ritchie
11:36
<@TheWatcher>
glibc lets you do `char *buffer; scanf("%as", &buffer)` - that'll allocate a buffer large enough to store the input, and then place the pointer to it in buffer, but that's glibc specific.
11:39 Chutzpah [Moltare@583787.FF2A18.190FE2.4D81A1] has joined #code
11:49 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has quit [[NS] Quit: Leaving]
11:59 RichyB [richardb@Nightstar-86656b6c.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
12:27 Netsplit *.net <-> *.split quits: @Vash, himi-cat, @McMartin, @Derakon, [R], @Reiv, @PinkFreud
12:29 Netsplit over, joins: @PinkFreud, &Derakon, himi-cat, &McMartin, @Reiv, @Vash, [R]
12:48 RichyB [richardb@58734C.5279B7.EA7DF8.107330] has joined #code
12:50 Vash [Vash@Nightstar-221158c7.sd.cox.net] has quit [[NS] Quit: I lovecraft Vorn! <3]
12:51 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
13:21 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has joined #code
13:33 Netsplit *.net <-> *.split quits: himi-cat, @McMartin, @Derakon, [R], @Reiv, @PinkFreud
13:34 Netsplit over, joins: @PinkFreud, &Derakon, himi-cat, &McMartin, @Reiv, [R]
13:45 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds]
13:50 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
13:50 mode/#code [+ao Derakon Derakon] by ChanServ
14:57 RichyB [richardb@58734C.5279B7.EA7DF8.107330] has quit [Ping timeout: 121 seconds]
15:00 You're now known as TheWatcher[afk]
15:17 RichyB [richardb@58734C.5279B7.EA7DF8.107330] has joined #code
16:25 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code
16:25 mode/#code [+o celticminstrel] by ChanServ
16:48 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
16:48 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code
16:48 mode/#code [+o celticminstrel] by ChanServ
16:50 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has quit [[NS] Quit: Leaving]
16:51 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [NickServ (GHOST command used by Derakon_)]
16:56 ErikMesoy is now known as Harrower
17:05 himi-cat [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
17:09 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Client closed the connection]
17:09 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
17:13
<&McMartin>
Light Table 0.4 is out, now eats Python
17:13
<&McMartin>
Also apparently does amazing things with JS that I am not good enough with JS to evaluate
17:14
<&McMartin>
http://www.chris-granger.com/2013/04/28/light-table-040/
17:18 himi-cat [fow035@0C0840.B22E58.E3471A.E028A1] has joined #code
17:43 Syk is now known as syksleep
17:46 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
17:46 mode/#code [+ao Derakon Derakon] by ChanServ
17:55 Derakon_ [chriswei@Nightstar-a3b183ae.ca.comcast.net] has joined #code
17:56 * Derakon_ ponders Pyrel, and specifically, creature spellcasting.
17:56 You're now known as TheWatcher
17:56
< Derakon_>
In Angband, the spells a creature has access to are a basic part of the creature record in the data files.
17:57
< Derakon_>
Of course, Angband does everything "in the engine", so this is more or less reasonable.
17:57
< Derakon_>
In Pyrel, spells are only relevant from within the creature's AI code, which is run as a script separate from the rest of the engine.
17:57
< Derakon_>
So I don't think it's so reasonable to have them be explicitly mentioned in the creature record template.
17:58
< Derakon_>
(What's more, I may later want to have other associated scripts with their own metadata that needs to be stored in the record, and I don't want to be extending the template every time this happens)
17:58
< Derakon_>
So what I'm thinking is, attach a "general-purpose data" section to the creature record, and any data that the engine doesn't care about can go here.
17:59
< Derakon_>
The engine will make certain that data is preserved but won't interpret it otherwise; scripts can do what they please with it.
17:59
< Derakon_>
Any better suggestions?
17:59
< Derakon_>
It does bug me a bit to be basically sticking an amorphous glob into the creature record template.
18:00
<@TheWatcher>
How do you currently implement spells, as separate scripts too, I guess?
18:00
< Derakon_>
Currently the only magic is effects attached to consumable items, which are implemented as their own separate scripts, yes.
18:01
< Derakon_>
But I don't really want to go entirely that route with creature spellcasting since the AI needs to guide spells in various ways.
18:01
< Derakon_>
(In terms of selection, targeting, etc.)
18:07
<&ToxicFrog>
McMartin: I should try LT for Clojure at some point, shouldn't I.
18:09
<&ToxicFrog>
Derakon_: I don't think I fully understand the engine vs. non-engine distinction. What are the templates?
18:09 ToxicFrog is now known as ToxicFrog|W`rkn
18:09
<&McMartin>
TF: LT covers Python and JS now, and is apparently really cool at JS~
18:10
< Derakon_>
TF: well, for example, here's one creature record: http://pastebin.com/rqRy0Mch
18:11
< Derakon_>
Every root-level string is specifically recognized by the engine code.
18:11
< Derakon_>
It doesn't necessarily use all the values pointed to by those strings (e.g. "BASH_DOOR" would be a flag used by the AI script to determine if doors can be broken open by this creature).
18:12
< Hermit>
You pick the lock. The door explodes.
18:12
< Derakon_>
So I could add a new root-level key "spells" that would point to a list of spell definitions.
18:12
< Derakon_>
That's basically mirroring what Angband does.
18:12
< Shiz>
I prefer BACK_DOOR
18:12
<&ToxicFrog|W`rkn>
McMartin: of those three, the only one I actually use on a regular basis is Clojure, so
18:13
<&McMartin>
Ah, so
18:13
< Derakon_>
But then if I want to have additional arbitrary metadata (e.g. what if some creatures come with set equipment?) I'd have to make yet another root-level key.
18:13
< Derakon_>
And every time I do that the code in the engine that parses these records has to be modified and extended.
18:13
<&ToxicFrog|W`rkn>
Derakon_: why? I mean, this looks like it's a basic map, why can't the engine just ignore keys it doesn't recognize?
18:13
< Derakon_>
So it doesn't seem like a very flexible approach.
18:13
<&ToxicFrog|W`rkn>
it what
18:13
<&ToxicFrog|W`rkn>
why
18:13
< Derakon_>
...
18:14
< Derakon_>
Hm, you may be right.
18:14
< Derakon_>
I guess the only place in which all strings are enumerated right now is in the code that declares how we serialize creature records, and that's just so that things look nice in the data files.
18:15
< Derakon_>
So yeah, you could just stick arbitrary data in there and it could all get lumped in at the end when serializing.
18:15
< Derakon_>
Okay, thanks for setting me straight. :)
18:16
<&ToxicFrog|W`rkn>
\o/
18:22 himi-cat [fow035@0C0840.B22E58.E3471A.E028A1] has quit [Ping timeout: 121 seconds]
18:25 Turaiel [Brandon@Nightstar-949d7402.resnet.mtu.edu] has quit [Client closed the connection]
18:33 EvilDarkLord is now known as Maze
18:37 himi-cat [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
18:40 Turaiel[Offline] [Brandon@Nightstar-949d7402.resnet.mtu.edu] has joined #code
19:00 himi-cat [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
19:13 himi-cat [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
19:36 Kindamoody|out is now known as Kindamoody
20:11 Kindamoody is now known as Kindamoody[zZz]
20:41 himi-cat [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
20:54 himi-cat [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
21:23 Maze is now known as EvilDarkLord
21:23 mode/#code [+o EvilDarkLord] by ChanServ
21:32 Turaiel[Offline] is now known as Turaiel
21:41 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
21:41 mode/#code [+qo Vornicus Vornicus] by ChanServ
21:44 gnolam [lenin@Nightstar-b2aa51c5.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds]
21:48 Harrower is now known as ErikMesoy
22:01 RichyB [richardb@58734C.5279B7.EA7DF8.107330] has quit [Operation timed out]
22:37 ErikMesoy is now known as ErikMesoy|sleep
22:42 Derakon_ [chriswei@Nightstar-a3b183ae.ca.comcast.net] has quit [[NS] Quit: leaving]
22:47 himi-cat [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
22:52 Turaiel is now known as Turaiel[Offline]
22:53 You're now known as TheWatcher[T-2]
23:01 You're now known as TheWatcher[zZzZ]
23:39 ToxicFrog|W`rkn is now known as ToxicFrog
23:47
<@Alek>
you know when it's time to stop coding and go to bed?
23:47
<@celticminstrel>
Never!
23:47
<@Alek>
when you're chatting and finish all your lines with ;
23:47
<@celticminstrel>
XD
23:47
<@Alek>
find no errors, and send it off.
--- Log closed Wed May 01 00:00:59 2013
code logs -> 2013 -> Tue, 30 Apr 2013< code.20130429.log - code.20130501.log >

[ Latest log file ]