code logs -> 2009 -> Mon, 01 Jun 2009< code.20090531.log - code.20090602.log >
--- Log opened Mon Jun 01 00:00:48 2009
00:02
<@gnolam>
Ok, done with the cognitive artefacts. Now for the cognitive modelling.
00:10 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout]
00:18 You're now known as TheWatcher[T-2]
00:21 You're now known as TheWatcher[zZzZ]
01:36 Derakon[AFK] is now known as Derakon
01:46
<@ToxicFrog>
Huh. This is a cool feature I didn't know curl had.
01:47
<@ToxicFrog>
curl <options> --libcurl foo.c - writes to foo.c source for a program that, when compiled and linked against libcurl, has the same semantics as that curl invokation without the --libcurl.
01:47
<@Vornicus>
?
01:47
<@Derakon>
Whee metaprogramming.
01:48
<@Vornicus>
Sweet.
01:52 * ToxicFrog stabs Bash
01:52
<@ToxicFrog>
LEXICAL SCOPING, MOTHERFUCKER
01:52
<@ToxicFrog>
DO YOU SPEAK IT
01:53
<@ToxicFrog>
(hint: no)
01:55
<@ToxicFrog>
(I'm rewriting omdl)
02:00
<@Derakon>
What's OMDL?
02:00
<@ToxicFrog>
The onemanga downloader script.
02:00
<@Derakon>
Ahh.
02:00
<@ToxicFrog>
Hmm. I should really rationalize this thing so that it uses either wget or curl, but not both.
02:00
<@Derakon>
Similar concept as GHDL?
02:03
<@ToxicFrog>
Yep.
02:03
<@ToxicFrog>
You give it a title and optionally a list of chapters
02:03
<@ToxicFrog>
It downloads the page images and packs them into one-chapter-per-HTML-page HTML with forward/backward links, and CBZs.
02:11
<@ToxicFrog>
The new version is already looking much nicer than the old.
02:11
<@Derakon>
Refactoring will do that.
02:11
<@ToxicFrog>
In particular, no ugly wget -r hackery (it does n+2 requests, where n is the number of pages)
02:11 * gnolam stabs the Interactive Activation Model with a rusty _HIV.
02:13
<@McMartin>
IAM?
02:14
<@gnolam>
Yes you are.
02:14
<@gnolam>
*BA-DUM-TISH!*
02:15 * gnolam coughs.
02:15
<@gnolam>
Sorry. Sleep deprivation.
02:15
<@gnolam>
Yes. IAM.
02:15
<@McMartin>
What is it? I've never heard of it.
02:16
<@gnolam>
Classic connectionistic model for letter and word identification.
02:22
<@McMartin>
... oh.
02:22
<@McMartin>
I now vaguely remember a hated lecture from AI class many years ago~
02:30 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: I'm not going to sleep yet, I just need to turn this high wattage hunk of silicon off before I die of heat stroke]
02:56
<@ToxicFrog>
I just realized that with the new design I can dispense with make_chapter_list entirely!
02:56
<@ToxicFrog>
win
04:10 Consul [~dmlandrum@Nightstar-833.dsl.sfldmi.ameritech.net] has joined #code
04:10 mode/#code [+o Consul] by ChanServ
04:39
<@Consul>
Is there anything for Windows besides Realplayer than can play a .ra file? (it's probably an old file.)
04:40
<@Consul>
Oh, never mind. VLC was able to open it.
04:42
<@Consul>
Not that the file helped me much.
04:42
<@Consul>
But I did get one good piece of info from it.
04:54
<@ToxicFrog>
...oh man, good thing I caught this
04:55
<@ToxicFrog>
pack calls getinfo
04:55
<@ToxicFrog>
As: title=$(getinfo $chapter title)
04:55
<@ToxicFrog>
getinfo is expected to read .info and return the corresponding value.
04:55
<@ToxicFrog>
s/return/echo/
04:55
<@ToxicFrog>
All well and good...
04:55
<@ToxicFrog>
...except that getinfo may invoke download to get info that isn't cached on disk.
04:55
<@ToxicFrog>
And download produces a lot of informational messages.
04:56
<@Vornicus>
whups
04:56
< SmithKurosaki>
good thing you caught it
04:56
< SmithKurosaki>
how close is it to being done?
04:57
<@ToxicFrog>
Very close.
04:57
< SmithKurosaki>
awesome
05:06
<@ToxicFrog>
...this is weird
05:07
<@ToxicFrog>
The CBT of issue 1 of Claymore is significantly smaller than the CBZ
05:07
<@Vornicus>
vstrange
05:08
< SmithKurosaki>
which one is cbt? (z = zip)
05:09
<@ToxicFrog>
tar
05:09
<@ToxicFrog>
Oh, I see what's happened
05:09
<@ToxicFrog>
Since the last version they've uploaded higher-res versions and split versions of some pages
05:09
< SmithKurosaki>
right >.<
05:10
<@Vornicus>
Heh
05:10
<@ToxicFrog>
Ok - the download, cbt, and cbz commands are working
05:10
<@ToxicFrog>
That just leaves html and the auto-download of the chapter list if you specify no chapters
05:11
<@ToxicFrog>
My goal here is to be able to say, frex, "omdl Claymore cbz" and have it automatically download any chapters I don't already have and generate CBZs for everything.
05:14
<@ToxicFrog>
...oh, goddamnit
05:14
<@ToxicFrog>
I'm going to have to rewrite a whole bunch of code, which is a sign that this should have been pulled into seperate functions anyways
05:15
<@ToxicFrog>
Because chapters are not guaranteed to be integers >.<
05:15
< SmithKurosaki>
what happened?
05:15
<@ToxicFrog>
Like I said, chapters aren't guaranteed to be ints.
05:15
<@ToxicFrog>
Indeed I'm no longer sure they're guaranteed to be numbers.
05:16
<@ToxicFrog>
This means a bunch of printfs need changing, along with the internal directory structure of the cache.
05:16
< SmithKurosaki>
gnat
05:20
<@ToxicFrog>
...knowing this early would have been pretty handy, too:
05:20
<@ToxicFrog>
from bash_builtins(1)::printf
05:20
<@ToxicFrog>
The -v option causes the output to be assigned to the variable var rather than being printed to
05:20
<@ToxicFrog>
the standard output.
05:21
< SmithKurosaki>
which means that there is less output to the user, right?
05:21
<@ToxicFrog>
Nah, the output was already being used for variable assignment
05:22
<@ToxicFrog>
It just means I can do printf -v foo ... rather than foo=$(printf ...)
05:22
<@ToxicFrog>
I have to say, for all the bash is a scuttling lobstrosity of a language, it's a joy to work with
05:22
<@ToxicFrog>
It's so easy to connect things
05:22
< SmithKurosaki>
hi5 o/
05:23
<@ToxicFrog>
lex error
05:25
< SmithKurosaki>
you do this -> \o
05:25 * SmithKurosaki blames #letsplay
05:27
<@Vornicus>
...scuttling lobstrosity.
05:28
< SmithKurosaki>
im kinda looking at it funny too vorn
05:33
<@Vornicus>
What is this, TFTD?
05:34 * SmithKurosaki is now really confused
05:36
<@Vornicus>
X-COM: Terror From The Deep
05:36
< SmithKurosaki>
nice, i think so. we demand a response tf
05:38
<@ToxicFrog>
I got the mental image from TFTD and the term "lobstrosity" from John Dies At The End
05:38
<@ToxicFrog>
Or possibly from John and Dave and the Temple of Xal'na'a'a'thuthuthu
05:43
< SmithKurosaki>
you will have to tell me how to say that one of these daus
05:43
< SmithKurosaki>
that word is too cthuluian
05:43
<@Derakon>
Nah, that's not all that Cthulhuloid.
05:44
<@Derakon>
I mean, aside from the blatant apostrophes, everything's clearly pronounceable. Just long and a bit repetitive.
05:44
<@ToxicFrog>
Pfft. If you can pronounce tsshp or ariloulaleelay, xal'na'a'a'thuthuthu should be a case of pike.
05:44
<@ToxicFrog>
...piece of cake, even.
05:44
< SmithKurosaki>
niiiice
05:44 * Derakon eyes TF.
05:45 * SmithKurosaki applauds
05:45
<@Derakon>
Stockpiling biological warfare munitions for DF Doomsday?
05:45
<@ToxicFrog>
??
05:45
< SmithKurosaki>
i also now need to know how to say those ;.;
05:47 Consul [~dmlandrum@Nightstar-833.dsl.sfldmi.ameritech.net] has quit [Quit: Leaving]
05:47
<@ToxicFrog>
Ok
05:47
<@ToxicFrog>
I think all chapters are guaranteed to be real numbers
05:47
<@Derakon>
What's Tsshp from, anyway?
05:47
<@Derakon>
(Ariloulaleelay is from Star Control II, which you can play for free: http://sc2.sourceforge.net/ )
05:50
<@ToxicFrog>
(and should, because it's awesome)
05:50
<@ToxicFrog>
tsshp is the name of the regrettably defunct System Shock engine remake.
05:51
<@ToxicFrog>
It came to mind because of this sentence on the homepage: "Fans of Larry Niven should have no problems with that acronym ... after all, if you can pronounce Phssthpok"
05:51
<@ToxicFrog>
Sigh. Now printf has to die,
05:53
<@Derakon>
Pssthpok sounds, in my mind, roughly like releasing a valve containing compressed air, followed by the popping of a bit of bubble wrap.
05:54
< SmithKurosaki>
is this another game to put on my never ending list tf?
05:54
<@ToxicFrog>
Pretty close, yeah~
05:54
<@ToxicFrog>
SK: actually, you'd probably hate it, as it involves a lot of open-ended exploration
05:55
< SmithKurosaki>
maybe ill just have to watch you play it
05:55
<@ToxicFrog>
But you should try it anyways on the off chance you like it, because missing out on UQM would be a shame~
05:55
< SmithKurosaki>
uqm?
05:55
<@ToxicFrog>
Eh, it'll probably be a few years before I play it again
05:55
<@ToxicFrog>
The Ur-Quan Masters
05:55 * SmithKurosaki looks around
05:55
<@Derakon>
Star Control II.
05:55
<@ToxicFrog>
The full title of the game is Star Control II: The Ur-Quan Masters
05:55
<@Derakon>
Its subtitle is "The Ur-Quan Mastres"
05:55
<@Derakon>
Er, Masters.
05:56
< SmithKurosaki>
ahhh\
05:56
< SmithKurosaki>
this makes more sense
05:57 * ToxicFrog grabs printf by the lapels and shakes it back and forth until its header falls off
05:57
<@ToxicFrog>
I want something that means 3 -> 003 and 3.4 -> 003.4
05:57
<@ToxicFrog>
This appears to be not possible without a bunch of extra code.
05:57
<@Derakon>
"%3f" doesn't do it?
05:57
<@Derakon>
Or maybe "%03f"?
05:58
<@ToxicFrog>
%03f results in 3.400000
05:58
<@Derakon>
Ah.
05:58
<@ToxicFrog>
Or 3.000000, for integers.
05:59
<@Derakon>
"%4.1f", maybe?
06:00 * SmithKurosaki has completely forgotten all her number/int formatting knowledge ;.;
06:00
<@ToxicFrog>
.x mandates exactly x digits of precision
06:00
<@Derakon>
Yeah.
06:00
<@Derakon>
If you know how precise you want your post-decimal portion to be, then you should be able to use it to force left-padding with zeroes.
06:00
<@ToxicFrog>
And while having everything show up as, say, "001.0 - The Silver-Eyed Devil.cbz" will work, in the sense that it will sort correctly, it'll be ugly.
06:00
<@Derakon>
Some experimentation with Python reveals that "printf("%05.1f", 3.4)" should produce "003.4".
06:01
<@ToxicFrog>
Yeah, but when you pass it 3 it will spit out 003.0 rather than 003.
06:01
<@Derakon>
Oh, right.
06:01
<@Derakon>
I don't think printf supports optional decimal precision.
06:01
<@ToxicFrog>
That's the impression I get from reading the man page, too.
06:01
<@ToxicFrog>
But it should.
06:02
<@Derakon>
It might complexify the formatting syntax more than is worthwhile.
06:02
<@ToxicFrog>
However, I don't care quite enough to submit a patch against libc~
06:02
<@Derakon>
Heh.
06:02
<@ToxicFrog>
Eh, negative precision isn't being used for anything that I recall
06:03
< SmithKurosaki>
but if there are issues that are 1, 1.5 and 2, ive had cases where the files will come out 1.5, 1, 2 in fedora
06:03 Syloqs-AFH [Syloq@ServicesAdmin.Nightstar.Net] has quit [Connection reset by peer]
06:04
<@ToxicFrog>
Ended up doing local prefix=$(echo $chapter | egrep -o '[0-9]*')
06:04
<@ToxicFrog>
local suffix=$(echo $chapter | egrep -o '[^0-9].*')
06:04
<@ToxicFrog>
local file=$(printf 'pack/%03d%s - %s.%s' $prefix $suffix "$title" $ext)
06:05
<@ToxicFrog>
Well that could have gone better
06:05
<@ToxicFrog>
/home/ben/bin/omdl: line 117: printf: cbz: invalid number
06:05
<@ToxicFrog>
Creating pack/0731 - .1.Extra Scene 1#A Warrior's Pridepack/000 - ....rm: cannot remove `/home/ben/Media/Comics/+Manga/Claymore/pack/0731 - .1.Extra Scene 1#A Warrior\'s Pridepack/000 - .': No such file or directory
06:05
<@ToxicFrog>
zip I/O error: No such file or directory
06:06
<@Derakon>
Forgetting to escape your spaces?
06:06
< SmithKurosaki>
i think hes got a point
06:06
<@Derakon>
Or an unescaped '
06:06
<@ToxicFrog>
Oh wow awesome
06:07
< SmithKurosaki>
what terribly fucked itself
06:07
<@ToxicFrog>
echo 73.1 | egrep -o '[0-9]*'
06:07
<@ToxicFrog>
Is somehow returning "73 1"
06:07
<@Derakon>
Returns "73" for me.
06:08
<@Derakon>
Which it should.
06:08
<@ToxicFrog>
...oh, bum, I see what's happening
06:08
<@ToxicFrog>
egrep -o returns all matches from a line, at least on linux
06:08
<@ToxicFrog>
That pattern matches against both '73' and '1'
06:09 * ToxicFrog replaces it with ^[0-9]*
06:09
<@ToxicFrog>
ben@orias:~/Media/Comics/+Manga$ omdl Claymore 73.1 cbz
06:09
<@ToxicFrog>
Creating pack/073.1 - Extra Scene 1#A Warrior's Pride.cbz...done
06:09
<@Derakon>
So, another way that Linux differs from Darwin.
06:09
<@ToxicFrog>
Yeah.
06:09
<@ToxicFrog>
There's already some code in here to handle the differences in how sed works
06:10
< SmithKurosaki>
do you have the html working yet?
06:10
<@Derakon>
HTML output, as a general rule, is easy.
06:10
<@ToxicFrog>
Yeah
06:11
<@ToxicFrog>
The only potentially tricky bit is getting the forward/back links working, but those are a nonpriority
06:11
< SmithKurosaki>
they worked in the old version
06:11
<@ToxicFrog>
Yeah, but the old version also processed the entire thing at once
06:11
<@Derakon>
Whoogh, I'm about to collapse here. T-2, all.
06:12
<@ToxicFrog>
Its only operating mode was "generate HTML for all the chapters that exist"
06:12
<@ToxicFrog>
Which led to some serious ugliness.
06:12
<@ToxicFrog>
Anyways. Time to handle downloading the chapter list.
06:12
<@ToxicFrog>
And that means...awk
06:13
< SmithKurosaki>
it worked for me when i was reading bleach, or did you seriously overhaul the files. also it works for claymore (which i got myself)
06:14
<@ToxicFrog>
I have rewritten most of this script
06:14
<@ToxicFrog>
What it would previously do is download the whole thing, and then pack or HTMLize the whole thing
06:15
< SmithKurosaki>
oooh
06:15
<@ToxicFrog>
It now has the capability to work on individual chapters, but that means it's not guaranteed to know the names of the other chapters when it generates the HTML
06:16 Derakon is now known as Derakon[AFK]
06:17
< SmithKurosaki>
so, what you are saying is that instead of it grabbing everything at once when you tell it to grab everything, it will grab a chapter, pack it and then go to the next?
06:23
<@ToxicFrog>
Yes.
06:23
< SmithKurosaki>
cool
06:29 Rhamphoryncus [~rhamph@Nightstar-7168.ed.shawcable.net] has joined #code
06:30
< SmithKurosaki>
i really need to figure out better short cuts for xchat
06:59 AnnoDomini [AnnoDomini@Nightstar-27975.neoplus.adsl.tpnet.pl] has joined #Code
06:59 mode/#code [+o AnnoDomini] by ChanServ
08:48 You're now known as TheWatcher
09:02 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code
09:02 mode/#code [+o gnolam] by ChanServ
09:12 Vornicus is now known as Vornicus-Latens
09:34 Rhamphoryncus [~rhamph@Nightstar-7168.ed.shawcable.net] has quit [Ping Timeout]
09:39 Rhamphoryncus [~rhamph@Nightstar-7168.ed.shawcable.net] has joined #code
10:32 Rhamphoryncus [~rhamph@Nightstar-7168.ed.shawcable.net] has quit [Quit: Rhamphoryncus]
10:33 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
10:33 mode/#code [+o Attilla] by ChanServ
11:03 AnnoDomini [AnnoDomini@Nightstar-27975.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
11:10 AnnoDomini [AnnoDomini@Nightstar-29255.neoplus.adsl.tpnet.pl] has joined #Code
11:10 mode/#code [+o AnnoDomini] by ChanServ
13:38 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout]
14:41 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
14:41 mode/#code [+o Attilla] by ChanServ
15:27
<@ToxicFrog>
It works!
15:28
<@Attilla>
:O
15:29
<@gnolam>
I can't believe it!
15:29
<@gnolam>
And they said imitation diamond wasn't good enough...
16:05 Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code
16:06 Syloqs_AFH is now known as Syloqs-AFH
16:23 SmithKurosaki [~jess@Nightstar-14421.dsl.teksavvy.com] has quit [Client exited]
16:25
<@ToxicFrog>
New omdl ljposted.
16:26
<@gnolam>
?
16:27 SmithKurosaki [~Jenn@Nightstar-7213.cpe.net.cable.rogers.com] has joined #code
16:27
<@ToxicFrog>
gnolam: the thing I was working on last night. http://2-4601.livejournal.com/31771.html and scroll down to the <hr>
16:28
<@gnolam>
Ahh
17:45 Derakon[AFK] is now known as Derakon
17:48 * TheWatcher notes that he is vaguely shocked - whoever the phpBB3 people have writing their upgrader code actually Has A Clue.
17:56 Consul [~dmlandrum@Nightstar-833.dsl.sfldmi.ameritech.net] has joined #code
17:56 mode/#code [+o Consul] by ChanServ
18:05 * ToxicFrog fixes a whole mess of bugs
18:06 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout]
18:25 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
18:25 mode/#code [+o Attilla] by ChanServ
18:38 Rhamphoryncus [~rhamph@Nightstar-7168.ed.shawcable.net] has joined #code
18:41 Vornicus-Latens is now known as VOrnicus
18:41 VOrnicus is now known as Vornicus
18:53 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout]
18:53 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
18:53 mode/#code [+o Attilla] by ChanServ
19:06 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer]
19:06 Attilla_ [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
19:18 Attilla_ [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer]
19:19 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
19:19 mode/#code [+o Attilla] by ChanServ
19:23 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer]
19:29 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
19:29 mode/#code [+o Attilla] by ChanServ
20:00 You're now known as TheWatcher[afk]
21:36 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer]
21:37 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
21:37 mode/#code [+o Attilla] by ChanServ
21:59 You're now known as TheWatcher
22:20 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout]
22:22 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
22:22 mode/#code [+o Attilla] by ChanServ
22:32 crem_ [~moo@Nightstar-28703.adsl.mgts.by] has joined #code
22:32 crem [~moo@Nightstar-28703.adsl.mgts.by] has quit [Ping Timeout]
22:40 * Derakon ponders how to handle water in his mapgen.
22:41 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout]
22:41
<@Derakon>
It's a part of terrain; it occupies a distinct volume and you can interact with it; however, it's not solid and needs to be drawn behind other terrain.
22:45
<@Derakon>
I suppose they work best as props...
22:46
<@Derakon>
Except of course that the player can't interact with props as it stands. But I may want to have e.g. vines wave as the player runs by in the future...
22:52 You're now known as TheWatcher[T-2]
22:56 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
22:56 mode/#code [+o Attilla] by ChanServ
22:58 You're now known as TheWatcher[zZzZ]
23:26
<@Derakon>
Hm. Instantiating water blocks 1 square at a time is...slow.
23:27
<@Derakon>
Actually, my mistake. I have an infinite loop somewhere in there.
23:27
<@Derakon>
Still takes a couple seconds to instantiate 930 blocks, mind you.
23:49
<@Derakon>
First pass at adding water: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen33a.png
23:49
<@Derakon>
My fill mechanism is clearly flawed, as noted by the uneven water levels.
23:49
<@Derakon>
But the overall concept seems sound.
23:53 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: Z?]
--- Log closed Tue Jun 02 00:00:02 2009
code logs -> 2009 -> Mon, 01 Jun 2009< code.20090531.log - code.20090602.log >