code logs -> 2013 -> Tue, 09 Jul 2013< code.20130708.log - code.20130710.log >
--- Log opened Tue Jul 09 00:00:38 2013
--- Day changed Tue Jul 09 2013
00:00 You're now known as TheWatcher[zZzZ]
00:09
<&ToxicFrog>
The more I think about backreferences, the more I think they're actually going to be really hard to get right.
00:10
<&ToxicFrog>
For starters you just have general syntax stuff. Ok, so $1 is a backref to the first anonymous field and $name is a backref to the field 'name'.
00:10
<&ToxicFrog>
But then you have stuff like this: "size:u4 toc:{ size:u4 name:s$size }"
00:10
<&ToxicFrog>
Which size does $size refer to? And what's the syntax for referring to the other one?
00:11
<&ToxicFrog>
Then you start talking about nesting. Say you want to use the offset field from the first entry in toc - $toc[1].offset. So now you need subscripting, which vstruct has not historically supported
00:12
<&ToxicFrog>
And then subscripting with backreferences - $foo.$bar.baz is ambiguous, so you write it $foo[$bar.baz] or $foo[$bar].baz
00:12
<&ToxicFrog>
Then, internally, you get into the fact that backreferences completely break static size calculation.
00:14
< RichyB>
Do you have backreferences now or are you proposing adding them?
00:15
< RichyB>
What if they're paths? "size:u4 toc:{ size:u4 name:s$(./size) }" and "size:u4 toc:{ size:u4 name:s$(../size) }" or something like that?
00:15
<&ToxicFrog>
And a lot of existing field types are written on the assumption that static sizing will always work for them - if the compiler doesn't provide size information for their operations they break.
00:17
<&ToxicFrog>
So either all of those need to be rewritten to support dynamic sizing, or there needs to be some kind of future setup where the size of stuff that isn't known at compile time, but can be known once fields backreferred to are read, is handled appropriately.
00:17
<&ToxicFrog>
The latter has better performance implications (write coalescing) but is harder.
00:17
<&ToxicFrog>
It may involve ditching the code generator entirely and just executing the AST directly.
00:17
<&ToxicFrog>
RichyB: maybe. My initial thought was $foo for local and $$foo for global.
00:20
< RichyB>
Prepend more '$' characters to move up through the nesting? Fine by me.
00:20
< RichyB>
You might not need to ditch code generation entirely.
00:20
< RichyB>
If you briefly glance at Synthesis OS, you might find some interesting ideas there.
00:21
< RichyB>
The author bases the whole thing on the idea of (usually run-time) partial application.
00:21
< RichyB>
She also (I think usually at compile-time) partially-applies the partial-application machinery in order to avoid spending too long running it. ;)
00:29
<@Reiv>
Derakon: Is this a pretty generic set of guides and no-one can be bothered, or you trying to enforce a style on people used to a different pattern?
00:29
<@Reiv>
Not that the latter is excusable - and if I could be bothered I would seek out the relevant Codeless Code excerpt accordingly - but it would at least be comprehensible.
00:38
<&Derakon>
Reiv: I'm trying to enforce a style and people cannot be bothered.
00:39
<@Reiv>
Is the style a reasonably standard one?
00:39
<&Derakon>
https://bitbucket.org/derakon/pyrel/wiki/StyleGuide
00:39
<&Derakon>
It's pretty close to PEP8.
00:39
<&Derakon>
With an emphasis on verbose variable names.
00:44
<&Derakon>
(Common issues: insufficient comments, bad variable names, incorrect use of whitespace)
00:45
<&Derakon>
(And using "from foo import bar")
00:46 himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code
00:46 mode/#code [+o himi] by ChanServ
00:46
<&Derakon>
I suspect I've now read my style guide more times than every other contributor put together~
00:52
<@Reiv>
1) That's not entirely unreasonable. There's a couple places I'd have to think carefully to avoid tripping up, but 90% of it is my standard coding practice anyway.
00:53
<@Reiv>
2) That really is a rather excellently written bit of documentation. Hats off to you sir!
00:53
<&Derakon>
Thanks.
00:53
<&Derakon>
Knowing the Angband dev community as I do, the style guide absolutely needs to have motivation as well as rules in it or they won't understand why they should bother.
00:53
<&Derakon>
(Most of the devs are not trained software engineers; at best they're scientists who know how to program)
00:54
<@Reiv>
(First off, my heavy dealings with Oracle and SQL Server, in which one is not case sensitive and the other /is/, has led me to run with all variables as either upper or lower case, with underscores rather than mixedcase, so that code doesn't mysteriously shatter during transcription.)
00:55 * Derakon nods.
00:55
<&Derakon>
Several of these rules are "There is no one right way, but there are lots of wrong ways, viz. using conflicting styles, so this is the style we will use and we will be consistent, damn it.
00:56
<@Reiv>
Hence, I personally prefer lowercase variables, so that the major keywords can be emphasised via case, eg SELECT foo, bar, baz FROM goo, dar, daz WHERE foo in (1,2,6)
00:56
<&Derakon>
Yeah, that's a fairly common SQL style.
00:57
<@Reiv>
Bearing in mind that the 'in' there would be bolded and colour coded regardless of case, it helps spot query flow more easily, especially when getting into nests of subqueries and analytic functions.
00:57
<@Reiv>
Oracle defaults to EVERYTHING UPPERCASE ALL THE TIME BECAUSE CASE DOESNT MATTER SO WHY USE IT EVER RIGHT
00:57
<@Reiv>
But augh, that's just making it harder to read, darnit~
00:57
<&Derakon>
Shades of programming on my dad's old C64 >.<
00:58
<&Derakon>
Having case in your text just means your character encoding needs an extra bit~
00:58
<@Reiv>
Apparently my most distinctive telltale in the buisness is how I alias tables; I follow a convention so that, eg, installs, customers, and registers are t_inst, t_cust, t_reg
00:58
<@Reiv>
Everyone else would just use, if we're lucky, inst, cust, reg etc
00:59
<&Derakon>
Heh.
00:59
<@Reiv>
... the prefix suddenly makes sense when you start wrestling nested subqueries. I can darn well use something other than t, and thus differentiate scope~
01:00
<&Derakon>
I've never really understood the fetish with not spelling out the entire word.
01:01 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
01:01
<&Derakon>
t_installs, t_customers, t_registers -- negligible extra time to type and about fifteen times more legible IMO.
01:01
<@Reiv>
WHERE t_inst.install = s_inst.install AND (s_inst.install = q_inst.install OR s_inst.install = q_cust.install), in a query three layers deep, is... helpful.
01:02
<@Reiv>
Derakon: It's mostly helpful when dealing with the SELECT statements, I find; the full names can be drastically different lengths which makes it relatively hard to track column names. Keeping everything 5-7 characters long in the title means the names line up, and thus the column-with-a-long-name is easier to spot.
01:03
<&Derakon>
Bah.
01:04
<@Reiv>
This could be, I admit, partly my dyslexia. I look for wordshapes as much as actual words.
01:05
<@Reiv>
Keeping things t_foo.descriptionhere means I can glance and tell the first bit is TABLE.COLUMN and read the relevant bit after a quick bit of shapesearching; wildly variant table shapes force me to actually read the table just to see where the column name begins.
01:06
<&Derakon>
Well hey, just because I'd do things differently doesn't mean I'm right. The most important rule of code style is that it should suit the application.
01:07
<@Reiv>
And that forces me to escape out of parsing.exe and run word_comprehension.bat instead, and that's a pig of a code that has to be re-run from scratch every time you need it~
01:07
<&Derakon>
Heh.
01:07
<&Derakon>
Anyway, I'ma drop out of here for a bit.
01:07 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Client exited]
01:07
<@Reiv>
I'll also note, it compares slightly favourably to WHERE T1.column = T3.column >_<
01:09 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
01:09 mode/#code [+ao Derakon Derakon] by ChanServ
01:10
<&ToxicFrog>
Derakon: at least you have enough contributors for style guide violations to be a thing~
01:10
<&Derakon>
This is true, I suppose
01:10
<&Derakon>
I just hope I can keep them after continually sending pullreqs back for revision to fix style problems.
01:12
<&ToxicFrog>
Reiv: I would worry slightly that your brainware appears to be running windows~
01:14
<@Reiv>
ToxicFrog: Oh, how I /wish/ it was running something where you can edit the kernel...~
01:25
< ktemkin[work]>
"I've never really understood the fetish with not spelling out the entire word." <-- We used to be able to fit only a very limited amount of characters on a terminal display.
01:25
< ktemkin[work]>
Some habits take a long time to die.
01:26
<@Reiv>
ktemkin[work]: In our case, there's equal temptation because we're running Oracle.
01:26
<@Reiv>
Hooray for 32 character names!
01:27
<@Reiv>
Better yet, the standard pattern is ODW_GTV_namehere
01:27
<@Reiv>
So we use 8 of the damn things before we even start. >_>
01:27
<&Derakon>
ktemkin: the problem I have with that explanation is that the last two-three generations of programmers haven't had to deal with such limits.
01:27
< ktemkin[work]>
I remember when filenames used to be eight characters long, plus extension.
01:28
< ktemkin[work]>
Derakon: But the last two-three generations of programmers have grown up with a codebase where that's already a habit. Their teachers and books use those abbreviated variable names.
01:29
<&Derakon>
They should be more willing to do away with old stupid traditions~
01:29
<@Reiv>
Also, to be perfectly honest, it helps the brainspace stuff. Especially while we insist on cludging spaces 'cuz tabs are broken. :p
01:29 * Reiv <insert elastic tab rant here>
01:29
< ktemkin[work]>
That requires them to first realize that what they're doing is stupid.
01:29
< ktemkin[work]>
A lot of programmers have been trained to Just Accept Convention.
01:30
< ktemkin[work]>
Just be glad we don't still use 8:3 filenames.
01:31
<@Reiv>
I honestly find long names for really common names in code mildly distracting.
01:32
<@Reiv>
Part of why I run t_name for columns is because the column bit is boilerplate anyhow; it's just there so you don't get confused which column is from which table. Beyond that, you really don't much care as to the table, yet it's specified every time, all over the place.
01:32
<&Derakon>
I don't; they're easy to mentally skip over.
01:33
< ktemkin[work]>
I find things like "text_editor" much clearer than "txtEdtr", even if you can figure out what both mean.
01:34
< ktemkin[work]>
The first is much more fluent for me; it doesn't require me to take that second to figure out what words correspond to "edtr".
01:34
<@Reiv>
ktemkin[work]: By that logic, though, why are we bothering with aliases in SQL to begin with?
01:35
<@Reiv>
I mean, I could just type ODW_GTV_EMS_INSTALL every single time; yet I am tempted to use t_inst in its place. :p
01:35
< ktemkin[work]>
In that case, there's no real loss in going from one to the other.
01:35
< ktemkin[work]>
Garbage in, garbage out.
01:37
< ktemkin[work]>
Among other things, aliases are a tool that allows you to not repeat things that are obvious from context.
01:37
< ktemkin[work]>
*allow you to avoid repeating things
01:38
<@Reiv>
Right.
01:38
< ktemkin[work]>
I'm not suggesting that all variables names should always be fully specified, or full english descriptions of the variables contents.
01:38
<@Reiv>
I guess my logic, in SQL at least, is there's an awful lot of boilerplate explicitness demanded; I'd prefer to minimise it so that the 'real' bits of code are more easily spotted among the chaff.
01:39
< ktemkin[work]>
SQL is a bit of a different ballpark, anyway, as it tends to force you to think in unnatural constructs.
01:39
<@Reiv>
And a visually recognisable pattern (eg, t_name) is something you can practically skip over like whitespace, whilst being more immediately identifiable than the /other/ pattern, which is T1, T2, T3 etc
01:39
<@Reiv>
Which is commendably short, to be sure, but a hell of a time to mentally parse back to the tables in question when you're bughunting later~
01:39
<@Reiv>
Aye.
01:41
< ktemkin[work]>
A fair amount of SQL constructs also tend to act like single /long/ statements, whereas most programming code is broken down into smaller constructs.
01:43
< ktemkin[work]>
A good program will be broken down into understandable chunks; I haven't seen many complex SQL statements for which you could say the same.
01:46
< ktemkin[work]>
I could see the appeal of badly-abbreviated variable names if screen real-estate was an issue; for example, if you were forced to write code on a netbook.
01:46
< ktemkin[work]>
(I can't stand feeling constrained by screen real estate, so I have a five monitor setup.)
01:48
<@Reiv>
... yeah, that is a /little/ nonstandard~
01:48 * Reiv is mostly Priveledged by his 24" monitor. Tres niiiice.
01:51
<@gnolam>
<ktemkin[work]> Just be glad we don't still use 8:3 filenames.
01:51
<@gnolam>
I see you haven't had to develop for legacy software.~
01:51
<@Reiv>
Oracle: No Plans To Update Past 32 Character Column Names.
01:55
<@gnolam>
In the frog project, I thought the obscure filenames of my sample input/output files were just the usual "physicists can't code" issues.
01:55
<@gnolam>
Nope.
01:56
<@gnolam>
The even older version of possibly-the-most-legacy-software-of-all that they had on their little cluster had a 7-character filename limit.
01:59
< ktemkin[work]>
That's the kind of thing we scare our undergraduates with.
02:00
<@gnolam>
As for getting some structure in the input files themselves: 72 character/line hard limit and no tabs (and a bunch of other limitations I can't even remember).
02:01
<@gnolam>
But then again, that's a software suite that refers to individual lines of its input files as "cards". Because they used to correspond to actual punch cards.
02:02
< ktemkin[work]>
At one point, several of our older industry curriculum advisors suggested we make FORTRAN and COBOL required subjects for CS undergrads, reasoning that we'd need someone alive to fix the 2038 problems in all the legacy code.
02:12 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has quit [[NS] Quit: Gone.]
02:15 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has joined #code
02:15
< [R]>
Reiv: hopefully you did mean 32-character names, and not 32-byte names...
02:16
< [R]>
Though 32-character names would be an odd limitation.
02:16
< [R]>
Unless storing them as UTF-16.
02:28
<@Reiv>
R: IDK, go ask Oracle~
02:28
<@Reiv>
It's a hard and fast and ancient limitation.
02:29
<@Reiv>
And at this point they're terrified of changing it, because of the immense mountains of legacy software sitting atop it, and probably making dangerous assumptions accordingly.
02:30 Vorntastic [Vorn@Nightstar-442a9b56.sub-70-211-5.myvzw.com] has joined #code
02:39
< [R]>
Well the difference is when you start shoving non-ASCII UTF-8 into it, does it still stop at 32 characters or well before then?
02:41 Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has joined #code
02:53
<@Reiv>
I don't think you want to feed it UTF at all.
02:54
< Vorntastic>
If your program's code uses unicode characters at all there might be a problem.
02:55
< [R]>
Bleh
02:56
< [R]>
Unless you expect every program written by every programmer world-wide to limit themselves to Latin characters.
02:59
< Vorntastic>
The frequency of tgranslation errors in common text communication systems makes it unwise to do otherwise.
03:16
<@Reiv>
Oh my, what an embarrasing faux pas
03:16
<@Reiv>
Terribly sorry. The limit is /30/.
03:16
<@Reiv>
You may now stop chasing down rabbit holes of assumed *technological* limitations. :p
03:16
< Vorntastic>
Well, not really.
03:17
< Vorntastic>
30 means you get a byte of length information, and a null terminator for the silly people.
03:17
<@Reiv>
Granted, but 32 is a Magic Number; 30 is rather not.
03:17
<@Reiv>
Aw. You may be right.
03:34 ErikMesoy|sleep is now known as ErikMesoy
03:44 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
03:44 mode/#code [+qo Vornicus Vornicus] by ChanServ
03:51 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
03:52 Vorntastic [Vorn@Nightstar-442a9b56.sub-70-211-5.myvzw.com] has quit [[NS] Quit: Bye]
03:57 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [[NS] Quit: Leaving]
04:01 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
04:01 mode/#code [+ao Derakon Derakon] by ChanServ
04:46 Kindamoody[zZz] is now known as Kindamoody
05:28 Derakon is now known as Derakon[AFK]
05:59 Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has quit [Client closed the connection]
07:15 Karono [Karono@Nightstar-0e4527e4.optusnet.com.au] has joined #code
07:42 ktemkin[work] is now known as ktemkin[awol]
07:45 himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds]
07:45 Pandemic [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Ping timeout: 121 seconds]
07:50 Pandemic [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
07:50 mode/#code [+o Pandemic] by ChanServ
08:37 You're now known as TheWatcher
08:41 Kindamoody is now known as Kindamoody|out
09:00 celticminstrel [celticminst@Nightstar-8403057e.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
09:01 Karono is now known as Karono[afk]
09:05 Karono[afk] is now known as Karono
09:39 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has joined #code
09:41 Karono [Karono@Nightstar-0e4527e4.optusnet.com.au] has quit [Ping timeout: 121 seconds]
10:05 Karono [Karono@Nightstar-0e4527e4.optusnet.com.au] has joined #code
10:37 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has quit [[NS] Quit: Leaving]
10:57 * McMartin eyes the Steam changelog.
10:57
<&McMartin>
"Updated to SDL 2.0 release candidate"
11:01 * McMartin also designs an INFINITE SINGLETON ITERATOR
11:01
<&McMartin>
Design Patterns are more fun if you pretend they're like calling your moves and use them only descriptively after the fact.
11:02
<&McMartin>
(What I have is a function that you can call repeatedly to procedurally generate a sequence of values until those values run out, and it isn't guaranteed to.)
11:03 * TheWatcher vaguely wonders if SDL_imagesave works with SDL2, has never actually checked
11:05
<@TheWatcher>
.... great
11:05
<@TheWatcher>
Now I have the mental image of a geometry cleanup routine
11:05
<@TheWatcher>
DEADLY TRIANGLE OPTIMISER
11:11
<&McMartin>
HARD-TO-AVOID ARENA ALLOCATOR
11:11
<&McMartin>
Re: SDL2; it would need a bit of reworking, I suspect, but possibly not much.
11:12
<&McMartin>
SDL_Surface has bifurcated into separate types for CPU and GPU-based surfaces, and SDL_imagesave would presumably operate exclusively upon the former.
11:12
<&McMartin>
I *think* that's the one that kept the "SDL_surface" name, but I don't actually recall if the structure has stayed name compatible.
11:13
<@TheWatcher>
Guess I should actually get SDL 2 installed somewhere and check
11:14
<&McMartin>
I never actually found published versions that weren't hg dailies, so I've been studiously ignoring it until they start releasing things.
11:15
<&McMartin>
I'm just about 100% certain that it won't be link-compatible, at any rate.
11:16
<&McMartin>
Also, regarding INFINITE SINGLETON ITERATOR, for a moment there I was terrified that I might be implementing Python generators in C
11:16
<&McMartin>
But this is ultimately less offensive to the notion of call stacks, and is fine.
11:20 * TheWatcher , while digging for information about how in the name of Yog-Sothoth they determine when academic years actually start (has a vague memory this involves someone in Central sitting there with a wall calendar and a marker pen), runs into this message from 2009, fallsover laughing again: http://pastebin.starforge.co.uk/574
11:20
<&McMartin>
Also, it occurs to me that in C or Python, "singleton" actually means "don't actually export one of your module's variables"
11:22
<&McMartin>
"Your session has expired. You have died of dysentery."
11:22
<&McMartin>
I actually knew some people at PeopleSoft~
11:23
<@TheWatcher>
http://pastebin.starforge.co.uk/577 is the rest, it apparently dislikes
11:23
<@TheWatcher>
(I really need to replace that pastebin code with something non-shit)
11:24
<&McMartin>
Speaking of Americanisms mined from R'lyeh
11:24
<&McMartin>
I'm vaguely aware "scarper" means "flee". What is "bodge"?
11:25
<@TheWatcher>
To do something clumsily, or ineptly
11:28
<@TheWatcher>
('quick, dirty job, thrown together by morons' is probably the best expansion, and applies amazingly well >.>)
11:30
< Syka>
bodge is like dodgy
11:30
< Syka>
or rather
11:30
< Syka>
'bodgy' is related to 'botch'
11:30
< Syka>
i think
11:38 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
11:38 mode/#code [+o himi] by ChanServ
12:06 * TheWatcher sets about reverse-engineering these semester dates
12:08 * Vornicus pokes vaguely at his C++ code, which has somewhat stymied him because he isn't exactly sure how the templating system would work here
12:09 * Karono tries to unravel three nested ternary operators in one return statement
12:09
<~Vornicus>
Someone was a bad boy, writing that one.
12:10 * TheWatcher eyes excel
12:10
< Karono>
And yeah, the templating system in C++ often gives me headaches.
12:10
<@TheWatcher>
why are you formatting just this one date column as ###########
12:11
<~Vornicus>
double click the right edge of its column heading, find out
12:11
<@TheWatcher>
...
12:11
<@TheWatcher>
Thank you, good sir
12:11
<~Vornicus>
<--- paid to teach people that
12:12
<@TheWatcher>
Should we ever meet, I will buy you a beer (or preferred equivalent) for that one.
12:13
<~Vornicus>
(excel fills things with #### when the box is too small to fit everything)
12:57
<~Vornicus>
you can also resize - including autosize - multiple columns by selection the entirety of the columns you wish to resize, and then manipulating one of the right edges involved.
13:13 Kindamoody|out is now known as Kindamoody
13:17 * TheWatcher has, through Sleuthing, managed to track down semester dates going back to 1998, but would prefer another 10 years worth for sanity checking, bleghs
13:18
<@TheWatcher>
Vornicus: I don't suppose Excel has something that can tell me which day Easter is on in any given year, does it?
13:18
<@TheWatcher>
And when I ask that, I find a formula for it
13:21
<~Vornicus>
Easter is absolutely terrible to calculate.
13:23
<@iospace>
actually it's not...
13:23
<@iospace>
just get the day of the solstice, the day of the first full moon after, and then the sunday after that
13:23
<@iospace>
*equinox, not solstice
13:23
<@TheWatcher>
=FLOOR(DAY(MINUTE(A1/38)/2+56)&"/5/"&A1,7)-34 is what I have found. I'm just Voodooing it, though.
13:23
<&ToxicFrog>
Which is easy to say, but annoying to do.
13:23
<@TheWatcher>
(where A1 is the year)
13:24
<&ToxicFrog>
Vornicus: oh yeah, vstruct 1.1.3 is out, so if you want to poke at it now is the time
13:27 * TheWatcher eyes this data
13:29
<~Vornicus>
TF: woot
13:43
<&ToxicFrog>
Vornicus: feel free to ask me stuff about it, although since our schedules appear to be completely disjoint these days this may be tricky~
13:48
< ErikMesoy>
There are many formulae for Easter. https://en.wikipedia.org/wiki/Computus#Algorithms
14:10 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
14:16 celticminstrel [celticminst@Nightstar-8403057e.dsl.bell.ca] has joined #code
14:16 mode/#code [+o celticminstrel] by ChanServ
14:18 celticminstrel [celticminst@Nightstar-8403057e.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
14:18 celticminstrel [celticminst@Nightstar-8403057e.dsl.bell.ca] has joined #code
14:19 mode/#code [+o celticminstrel] by ChanServ
14:24 Netsplit *.net <-> *.split quits: @Pandemic, @Derakon[AFK], ktemkin[awol], @Reiv, @PinkFreud, @himi, ErikMesoy, sshine, Azash, @McMartin, (+6 more, use /NETSPLIT to show all of them)
14:24 Netsplit over, joins: @PinkFreud, jeroud, &jerith, @Pandemic, @himi, sshine, &Derakon[AFK], @Reiv, &McMartin, Turaiel[Offline] (+6 more)
14:30 Kindamoody is now known as Kindamoody|out
15:08 * TheWatcher hairpulls at this
15:08
< ErikMesoy>
Still on the Computus?
15:09
<@TheWatcher>
Oh, no, I had that sorted even before your answer
15:10
<@TheWatcher>
I'm trying to work out semester dates, and breaks in them
15:10
<@TheWatcher>
I have 13 weeks before christmas, 4 weeks break at christmas, 2 weeks after, and then 16 weeks with a 3 week break for easter
15:12
<@TheWatcher>
However, so far I'm not seeing a reliable rule for determining where in that 4 weeks christmas day needs to fall, or where in the three weeks easter does
15:14
<@TheWatcher>
Now I'm trying to work out whether the actual key to it is those two weeks after christmas, which seem to occupy the last week over 5 days in january and the week before it
15:16
<@TheWatcher>
And I think that may well be it
15:28
<@TheWatcher>
.... until this year, where that pattern breaks
15:28
<@TheWatcher>
Godsdamnit
15:31
<@iospace>
heh
15:31 * iospace pats TheWatcher
15:34
<@TheWatcher>
I'm either missing something /really/ obvious, or this is actually done arbitrarily
15:35
<@TheWatcher>
Given that it's actually done manually by someone in central, I'm suspecting the latter
15:35 * iospace is curious as to when TheWatcher started using "gods" instead of "god" :P
15:41
<@TheWatcher>
If I had to hazard a guess, probably late 1990s, around about when I read a bunch of Lovecraft I think.
15:51
<@iospace>
heh
15:52
<@Tamber>
"Why settle for the lesser evil?"
15:56
<@iospace>
and how!
15:59 * TheWatcher sighs, gives up
16:03 _ [Karono@Nightstar-0e4527e4.optusnet.com.au] has joined #code
16:03 Karono [Karono@Nightstar-0e4527e4.optusnet.com.au] has quit [NickServ (GHOST command used by _)]
16:03 _ is now known as Karono
16:20
<@iospace>
11:19:10 < NameRemoved> linked list = reading in from a text file, right?
16:20
<@iospace>
T___________________________T
16:21
< Syka>
nono
16:21
<&ToxicFrog>
;.;
16:21
< Syka>
its reading in from a csv
16:21
< Syka>
duh
16:21
<@iospace>
...
16:22 * Syka writes a CSV backend for Strix, for pure lulz
16:22
<@iospace>
either way, the guy was wondering how to store an arbitrary amount of strings without going String[1000]
16:22
<@iospace>
so i'm like "growable arrays, queues, stacks, linked lists..."
16:22
< ErikMesoy>
hashes
16:23
<@iospace>
many different ways
16:23
<@iospace>
it's C#, so I'm pretty sure there's a defined method in .net somewhere
16:24
< Syka>
array
16:24 * iospace whaps Syka
16:24
< Syka>
wat
16:24
<@iospace>
^_^
16:25
< Syka>
thats literally what it is
16:25
< Syka>
Array
16:25
< Syka>
that's the type
16:25 * Syka :<
16:54 Chutzpah [Moltare@583787.FF2A18.190FE2.4D81A1] has quit [Connection reset by peer]
16:59 Chutzpah [Moltare@583787.FF2A18.190FE2.4D81A1] has joined #code
16:59 ErikMesoy is now known as Harrower
17:03 Bob is now known as AnnoDomini
17:12
<@TheWatcher>
Comment from $coworker on the academic year dates issue: "Did you check whether venus was in capricorn during a full moon on the third day before the week after Christmas?"
17:12
<@TheWatcher>
I'd laugh, but that sounds too plausible >.<
17:26
< RichyB>
iospace: one really long string. ;)
17:27 * iospace facepalms
17:30
<@froztbyte>
varchar(1000**1000)
17:31 * froztbyte hides
17:32
< RichyB>
iospace: Well, it's a valid answer if you think of your memory as a single huge mutable byte array extending from 0 on upwards. ;)
17:33
< RichyB>
Though "mutable byte array" and "string" have over time become far more strongly differentiated concepts thanks to the prevalence of immutable strings.
17:50
<&ToxicFrog>
And multibyte character sets.
17:53
< RichyB>
What's the maximum length of a valid unicode combining-character sequence corresponding to a single glyph? :)
17:56
< Syka>
at least seventy quadtrillion
18:15
< Azash>
iospace: You neglected to mention tries and trees :<
18:16 Karono [Karono@Nightstar-0e4527e4.optusnet.com.au] has quit [Ping timeout: 121 seconds]
18:41 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
18:42 mode/#code [+ao Derakon Derakon] by ChanServ
18:44 Derakon[AFK] [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds]
19:18 ktemkin[awol] is now known as ktemkin
19:30 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Operation timed out]
19:31 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
19:31 mode/#code [+ao Derakon Derakon] by ChanServ
19:53 Syka_ [the@Nightstar-6e6cf865.iinet.net.au] has joined #code
19:53 Syka [the@Nightstar-fcd32cba.iinet.net.au] has quit [Ping timeout: 121 seconds]
20:10 Harrower [Erik@A08927.B4421D.FE7332.704AA5] has quit [Client closed the connection]
20:10 ErikMesoy [Erik@Nightstar-16aba739.80-203-17.nextgentel.com] has joined #code
20:20 ErikMesoy is now known as Harrower
20:40 Kindamoody|out is now known as Kindamoody
21:07 Kindamoody is now known as Kindamoody[zZz]
22:03 Harrower is now known as ErikMesoy
22:20 ErikMesoy is now known as ErikMesoy|sleep
22:39 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
22:39 mode/#code [+qo Vornicus Vornicus] by ChanServ
22:39
<@iospace>
http://theprofoundprogrammer.com/post/55025985936/text-have-you-ever-heard-of-na ming-conventions
22:40
<&ToxicFrog>
Warning
22:40
<&ToxicFrog>
Vornicus has occurred.
22:40
<&McMartin>
?
22:42
<@Alek>
o_o
22:43 * Vornicus occurs
22:43 Psyched^Tgi^Boy [ect@9C034E.5CB3BE.8A9371.DD9E40] has joined #code
22:44
<&ToxicFrog>
See?
22:44
<~Vornicus>
your warning panel needs some, uh
22:44
<~Vornicus>
temporal tuning
22:45 Psyched^Tgi^Boy [ect@9C034E.5CB3BE.8A9371.DD9E40] has quit [[NS] Quit: ]
22:45 Psyched^Tgi^Boy [ect@9C034E.5CB3BE.8A9371.9B0177] has joined #code
22:45 Psyched^Tgi^Boy [ect@9C034E.5CB3BE.8A9371.9B0177] has quit [Connection closed]
22:45
<&ToxicFrog>
Who uses linear time these days anyways~
22:46
<@Tamber>
Time is not linear. That is why clocks are round.
23:02 Derakon_ [chriswei@Nightstar-a3b183ae.ca.comcast.net] has joined #code
23:02 * Derakon_ finally manages to get the save() function in Pyrel to not error out.
23:02
< Derakon_>
The resulting savefile is 7.8MB, or about 600kB when compressed with gzip. O_o
23:04
< Derakon_>
I can save 1.9MB by turning off pretty-printing. That's an awful lot of whitespace.
23:05
<@Tamber>
...ouch.
23:05
< Derakon_>
And this is just the debug town! It's mostly empty space!
23:05
<~Vornicus>
How big is the compressed file when you turn off prettyprinting
23:06
< Derakon_>
625kB...compared with 620kB when pretty-printing is on. How bizarre.
23:07
<~Vornicus>
Wird
23:09
< Derakon_>
Honestly I dunno how much it's worth optimizing this stuff...
23:09
< Derakon_>
It's wasteful, sure, but if it works, it works.
23:10
<~Vornicus>
How long does it take to load?
23:10
< Derakon_>
I haven't tried yet~
23:10 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
23:10
< Derakon_>
Takes a couple seconds to save.
23:10
< Derakon_>
(Pretty-printed it's 340k lines of text)
23:10
< Derakon_>
(Without the pretty-printer it's 6)
23:10
< Derakon_>
(Two of which are blank)
23:10
<~Vornicus>
That might be a little long.
23:11
< Derakon_>
Pyrel is a roguelike; if you are saving/loading at all often then you are Doing It Wrong.
23:11
< Derakon_>
...well, okay, saving frequently is fine.
23:11
<~Vornicus>
Even so.
23:12
<~Vornicus>
This means that at 20 floors, you'll be taking a /minute/ to save this stuff.
23:12
< Derakon_>
Not so!
23:12
< Derakon_>
Non-persistent levels.
23:12
< Derakon_>
(But if someone wanted to implement persistent levels, they'd be hosed, yeah)
23:12
<&McMartin>
Yeah, I was going to say
23:13
<&McMartin>
Nethack saves on every level transition and has persistent levels
23:14
< Derakon_>
Looks like it takes .36s to process data, and 2.3s to write the file.
23:14
< Derakon_>
Which latter action can be done in a different thread.
23:14
< Derakon_>
But yeah, I don't claim to be done here.
23:14
< Derakon_>
I just claim to have gotten the save() function to not error out. :)
23:15
< Derakon_>
...heh, saved 1MB by replacing the magic string "__pyrelSerializer" with "__pyrel".
23:16
<~Vornicus>
Uh.
23:16
< Derakon_>
__pyrelSerializerTuple, __pyrelSerializerObjectReference, etc. are used to indicate when type conversions are done.
23:17
< Derakon_>
E.g. object reference -> object ID, function reference -> object ID + function name, tuple -> tuple ID + serialize the tuple contents elsewhere...
23:20
< Derakon_>
The tricky thing will be analyzing what all is sucking up space in the savefile.
23:21
< Derakon_>
I mean, there's 1.6k Terrain instances that could probably be aliased down to maybe a dozen objects since most Terrain is identical, but that doesn't seem likely to be all of it.
23:24
< Derakon_>
Hm...though each wall does contain about 850 bytes of data (for display, name, what to do when it's tunneled through, its stats, etc.
23:33
< Derakon_>
Correction, over 1kB per Terrain instance. I forgot that the tunneling interaction is a Proc with its own record.
23:35
< Derakon_>
So that's 1.8MB that could theoretically be compressed down to a couple of kilobytes with a decent aliasing system.
23:45
<&ToxicFrog>
Derakon: I have played games from several years ago with saves that are 100+MB before compression
23:50
< Derakon_>
Yeah, but there's not all that much going on here.
23:53 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
23:53
< Derakon_>
Hm, looks like about half of my time is spent on cleaning up all of the entries so they can be handed to json.dumps().
23:54
< Derakon_>
(And, in the process, recursively adding more objects to the save)
23:59 * Derakon_ deletes this clone.
23:59 Derakon_ [chriswei@Nightstar-a3b183ae.ca.comcast.net] has quit [[NS] Quit: leaving]
--- Log closed Wed Jul 10 00:00:01 2013
code logs -> 2013 -> Tue, 09 Jul 2013< code.20130708.log - code.20130710.log >

[ Latest log file ]