code logs -> 2008 -> Thu, 03 Apr 2008< code.20080402.log - code.20080404.log >
--- Log opened Thu Apr 03 00:00:00 2008
00:09
< Vornicus>
CPU burn reduction is next; I have a suspicion that the reason it's taking so long is that it has to do inline compiling of lambdas.
00:10
<@MyCatVerbs>
What're you writing this in, anyway? Python?
00:11
< Vornicus>
Yes
00:12
<@MyCatVerbs>
Cool. import pyscho when you're done and benchmark what difference it makes, please? ;)
00:14 * Vornicus gets it working perfectly!
00:16
< Vornicus>
...mother of god, adding profile makes it /slow/
00:18 * McMartin pokes at some of his old Python and OCaml code
00:19 * Vornicus wonders if he can improve his performance by starting the stars farther apart.
00:20
< Vornicus>
Probably.
00:22 * Vornicus wonders if psyco is available for mac.
00:24
< Vornicus>
I believe it will reduce the generation count, and reduce the number of steps per generation.
00:32 * Vornicus examines, discovers 50 seconds being spent just on length; replaces power with multiplication.
00:36 * Chalain gets a requirements change that very nearly violates Tilton's Lemma.
00:37
< Vornicus>
Tilton's Lemma?
00:37
<@Chalain>
"Refinements to requirements cannot vary fundamentally with original."
00:38
<@Chalain>
http://smuglispweeny.blogspot.com/ <-- a generally fun read. Ken Tilton is a raging egotist and confessed social retard. But he's smart and he writes well.
00:40
<@Chalain>
So anyway. There are 2 reasons I haven't rejected this reqs change (and yes, I brought it up because I'm about to ask for design help in a minute): 1. It is a major change to my implementation, but only a minor variance with the customer's requirements, and 2. They're paying me to fix it.
00:41
<@McMartin>
(1) is unfortunate, but doesn't violate the lemma, it sounds like.
00:41
<@Chalain>
Yeah
00:41
<@McMartin>
Though from a "how much do you have to throw out" perspective it might as well
00:41
<@Chalain>
It's an ODF error
00:41
<@Chalain>
(Own Damn Fault)
00:42
<@Chalain>
So anyway. Original requirement: "Stores in Airports get shopped my mystery shoppers, who fille out a ShopperReport of the correct type based on the StoreType. E.g. All kiosks are scored with the Kiosk Survey, while all Fast Food stores are scored against the Fast Food Survey, etc."
00:42
<@McMartin>
Ah, and here I thought we'd be parsing OO.o files~
00:42
<@Chalain>
Heh
00:43
<@Chalain>
So I set up Store belongs to StoreType, StoreType has many Surveys. (Another req was that if they change the Survey, old Surveys have to remain valid, so Fast Food might have 3 versions of teh Fast Food Survey, etc.
00:43
<@Chalain>
Well, they picked up another airport as a client.
00:43
<@Chalain>
And then the phone call: "Dave, great news! We're gonna simplify things for you on the new airport."
00:44
<@Chalain>
* Dave groans silently to himself.
00:44
<@Chalain>
"So, what we're gonna do is score all the News Stands, Kiosks and Retail stores with the Retail report, so you only have to keep track of one type of Survey for those three store types."
00:45
<@McMartin>
Target Language?
00:46
<@Chalain>
Ruby
00:47
<@McMartin>
Hrm. Can you do reflection in it?
00:47
<@Chalain>
But in this case, I'm looking at it from the general abstraction level and/or SQL implementation
00:47
<@Chalain>
Yes
00:47
<@McMartin>
Maybe your Score can say which Survey to use?
00:47
<@McMartin>
Er, Store
00:47
<@McMartin>
Some kind of factory type
00:48
<@McMartin>
factory *method*
00:48
<@Chalain>
the change is that if I ask a Store what Surveys it can take, it currently proxies to its own StoreType.surveys. Now I have to filter based on Store.Airport as well. I'm trying to avoid a full-blown ternary association, but it's being...resistant.
00:49
<@Chalain>
At the sql level, it's stores.store_type_id -> store_types; and store_types_surveys has store_id and survey_id.
00:50
<@McMartin>
Can you make the surveys be flyweights?
00:50
<@McMartin>
(Shared across stores)
00:51
<@Chalain>
The simple extension would be to add airport_id to the store_types_surveys table, but that feels weird. Right now a StoreType implies a set of Surveys, and that's no longer tr--hmmm. That wasn't really EVER true, was it. The Store is always the place where ask what Surveys are available. The fact that it's implementing them via StoreType is hidden.
00:51
<@Chalain>
Yes, there are about 300 stores right now, and there are 6 store types... and currently 6 surveys.
00:53 * Vornicus tries to figure out how to reduce his load of 10,000 lambdas per cycle, too.
00:55 Shoukanjuu [~Shoukanju@71.48.224.ns-3853] has joined #code
00:58 mode/#code [+oooooo AFKSkull Jeff Pi-2 Raif Shoukanjuu TheWatcher[afk]] by Vornicus
00:58 mode/#code [+o Vornicus] by Vornicus
00:58
<@Vornicus>
http://rafb.net/p/XHg52i68.html <--- the profile.
01:00
<@Shoukanjuu>
....Dammit. If this works, I'm going to be pissed
01:01
<@Shoukanjuu>
--; Of course it works
01:01
<@Vornicus>
??
01:01
<@Shoukanjuu>
I had my files for a page, see
01:01
<@Shoukanjuu>
belleviewshops.com
01:01
<@Shoukanjuu>
That's supposed to be a link, but I forgot the www. to make it as such
01:02
<@Shoukanjuu>
Well, I had the files for the Ad Sizes page in a folder 'ad_sizes_files'
01:03
<@Shoukanjuu>
And in the html for it, all the artwork is in the folder 'Ad_Sizes_files'
01:03
<@Shoukanjuu>
I was under the impression that there would be no capitalization problems, because that's what my teachers told me
01:03
<@Shoukanjuu>
But apparently, as evidenced by the fact that the Ad Sizes page is up with no missing ANYTHING
01:04
<@Shoukanjuu>
They were wrong >_>
01:04
<@Shoukanjuu>
At least it didn't take three hours to figure out ,this time
01:06
<@ToxicFrog>
If it's running on a windows system - which is case preserving, but not case sensitive - there is no problem, as "ad_sizes_files" and "Ad_Sizes_files" are the same filename.
01:06
<@Shoukanjuu>
Thaat's what I thought
01:06
<@ToxicFrog>
On any *nix system the case mismatch will be a problem.
01:07
<@Shoukanjuu>
Well okay, then
01:07
<@Shoukanjuu>
Obviously, netfirms are using a *nix system
01:07
<@Shoukanjuu>
that would rxplain credibility issues ans still label it as 'not my fault'
01:08
<@ToxicFrog>
As a general rule you want to assume that everything is case sensitive, because (1) this will work even on case insensitive systems, whereas the converse (case insensitive on a case sensitive system) will not; (2) most servers worth using are running *nix; and (3) CPCI is the tool of the devil in any case.
01:08
<@Shoukanjuu>
Regardless, I'm waiting for new layouts to publish with :3'I didn't notice that anything was wrong
01:08
<@Shoukanjuu>
Until I searched the html :/
01:09
<@Shoukanjuu>
"Capitalization wouldn't matter, would it...? Eh, worth a try"
01:12
<@Shoukanjuu>
Either way, I'll remember that for next time
01:13 * ToxicFrog nods
01:13 Pete [AnnoDomini@83.21.53.ns-25771] has quit [Quit: Quem quer o garfo?]
01:13
<@ToxicFrog>
If you assume that capitalization always matters, you won't have problems even when it doesn't.
01:14
<@ToxicFrog>
And even if you know it doesn't, you should behave as if it does, because sooner or later you'll probably want to port your work to a system where it does matter.
01:14
<@ToxicFrog>
And if you weren't doing it right from day one, you end up writing a bash script to automatically update in excess of 5000 files, and everyone else working in the same repository shows up with torches and pitchforks when you make a commit that affects every other dev using it.
01:16 * Vornicus determines that TF has had to deal with this.
01:16 * Shoukanjuu determined the same thing a long time ago
01:16
<@Shoukanjuu>
I'll remember that when I get competent at...anything >__>
01:16
<@ToxicFrog>
Vornicus: last summer I was tasked with migrating the SGOS build system from cygwin+windows to linux.
01:18
<@Vornicus>
I figured
01:18
<@ToxicFrog>
Oh my god.
01:18
<@ToxicFrog>
My *log* of incoming mail is 8MB.
01:19
<@Shoukanjuu>
...Woah.
01:19
<@Shoukanjuu>
Kill it with fire.
01:19
<@ToxicFrog>
This is over the past eight months.
01:19
<@Vornicus>
mcwtf
01:19
<@ToxicFrog>
It logs time, from:, subject:, and which spool it was delivered to.
01:20
<@ToxicFrog>
ben@orias ~
01:20
<@ToxicFrog>
$ du -sh ~/Mail
01:20
<@ToxicFrog>
708M
01:20
<@Shoukanjuu>
O_o;
01:21
<@ToxicFrog>
How did that happen?
01:22
<@ToxicFrog>
(This isn't even *all* of my mail; most of my mail from before 2003 or so (dating back to the late 80s) is either missing or in one of ancilla's backups.)
01:29
<@McMartin>
How good are your spam filters?
01:29 Reiver [~reaverta@Admin.Nightstar.Net] has joined #Code
01:29 mode/#code [+o Reiver] by ChanServ
01:29
<@McMartin>
I receive about a thousand messages a month from spammers.
01:30
<@McMartin>
You could easily simply not be noticing this.
01:31
<@ToxicFrog>
spam/ accounts for 7000 messages since the new year, but only 50MB.
01:38
<@Shoukanjuu>
I don't actually get that much spam mail
01:39
<@McMartin>
Have you been purging the spam?
01:40
<@Shoukanjuu>
Not really...
01:41
<@Shoukanjuu>
I haven't checked my mail in about six weeks >___>
01:41
<@McMartin>
That was actually at TF
01:42
<@ToxicFrog>
Every few months.
01:42
<@Shoukanjuu>
Oh. Sorry.
01:42
<@ToxicFrog>
I feed some of it to spamassassin and delete the lot.
01:42 * McMartin requires spammerassassin.
01:43
<@Vornicus>
If you invent it, you will become rich and famous
01:43
<@McMartin>
Do you have some ridiculously huge attachments in the email, maybe?
01:43
<@Vornicus>
Because you will then be able to stab people in the face over the internet.
01:43
<@McMartin>
Still not sure where 800MB comes from
01:44
<@ToxicFrog>
(the breakdown appears to be: 50MB spam, 5MB messages from the system, 120MB mailing list archives, 50MB school, 200MB inbox...not sure where the other ~300MB come from. Hmm.)
02:14 Vornicus [~vorn@ServicesOp.Nightstar.Net] has quit [Ping Timeout]
02:14 Vornotron [~vorn@Admin.Nightstar.Net] has joined #code
02:14 Vornotron is now known as Vornicus
02:45 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Quit: Z?]
03:00 Vornicus [~vorn@ServicesOp.Nightstar.Net] has quit [Ping Timeout]
03:08 Vornicus [~vorn@Admin.Nightstar.Net] has joined #code
03:08 mode/#code [+o Vornicus] by ChanServ
04:03
<@Vornicus>
...I wonder if there's a vector class in the numeric stuff pygame needed.
04:18
<@Jeff>
No.
04:18
<@Jeff>
That is, pygame has no vector.
04:18
<@Jeff>
And I think they want one.
04:26
<@Shoukanjuu>
Zeld wrote a memory viewer elf for the Wii > _>
04:26
<@Shoukanjuu>
And I'm the first one he sends it to vV_
04:27
<@Vornicus>
I could use a faster version; I currently spend about half my time in my python version.
04:27 Pi-2 is now known as Pi
04:27
<@Vornicus>
Psyco would be nice, but it doesn't look like it exists for ppc.
04:29
<@Vornicus>
Jeff: I know you were talking about pathfinding and stuff for Python; you should probably look at adding them to numpy instead of pygame.
04:29
<@Jeff>
It got reorg'd.
04:29
<@Vornicus>
Which did?
04:30
<@Jeff>
Now it's just a general "addition of better algorithms to NetworkX module".
04:31
<@Vornicus>
Aha
04:34 * Vornicus examines some of the generic algorithms he needs: minimum spanning tree and voronoi, are the main ones.
05:09
<@Jeff>
What's Voronoi's?
05:12
<@Vornicus>
Voronoi Diagram: given a set of points, partition space into segments such that each segment contains all the points closer to one particular given point than to any other given point
05:15
<@Vornicus>
Usually nowadays you get it via its dual, the Delaunay Triangulation, and you do that by making a convex hull of the points projected onto a paraboloid.
05:21
<@Vornicus>
(and then you take each triangle in delaunay, find its circumcenter, and connect each circumcenter to the ones in the surrounding triangles)
05:29
<@Jeff>
...
05:30
<@Jeff>
THERE'S FOAM IN MY BRAIN
05:30
<@Jeff>
Okay.
05:30
<@Jeff>
Given a set of points.
05:30
<@Jeff>
On n dimensions.
05:30
<@Vornicus>
Right
05:31
<@Jeff>
Create some partitions such that each segment contains all space closest to a specific point.
05:31
<@Vornicus>
Right
05:31
<@Jeff>
.. okay.
05:31
<@Jeff>
Is... is that polynomial?
05:31
<@Vornicus>
Well, the hull method is O(n log(n))
05:32
<@Vornicus>
Even the naive method I think is n^2 or so.
05:32
<@Jeff>
Where n is points or dimensions?
05:32
<@Vornicus>
points.
05:33
<@Vornicus>
It doesn't change much across dimensions; you need more points to generate a corner, but that's it.
05:36
<@Vornicus>
(and using the hull method, it's the same in all dimensions, so)
07:14 Vornicus [~vorn@Admin.Nightstar.Net] has quit [Ping Timeout]
07:15 Vornicus [~vorn@Admin.Nightstar.Net] has joined #code
07:15 mode/#code [+o Vornicus] by ChanServ
07:28 Serah [~Z@87.72.35.ns-26506] has quit [Ping Timeout]
07:40 Jeff [JPL@Nightstar-23748.dsl.sndg02.pacbell.net] has quit [Ping Timeout]
08:03 Vornicus is now known as Vornicus-Latens
08:25 Vornicus-Latens [~vorn@Admin.Nightstar.Net] has quit [Ping Timeout]
08:55 AnnoDomini [AnnoDomini@83.21.53.ns-25771] has joined #Code
08:55 mode/#code [+o AnnoDomini] by ChanServ
08:57 Shoukanjuu [~Shoukanju@71.48.224.ns-3853] has quit [Quit: You're gonna carry that weight.]
10:11 NSGuest-5837 [~Z@87.72.35.ns-26506] has joined #Code
10:29 Bobsentme [Bobsentme@99.149.240.ns-12157] has joined #code
10:29
< Bobsentme>
help
10:30 * Bobsentme has a logic problem
10:30
< Bobsentme>
I've got two lists. One has a Name, then a phone number. The next has a name, and day of the week
10:30
< Bobsentme>
(the names are the same, but aren't in the same order)
10:31
< Bobsentme>
I'm supposed to combine the two lists to get Name Day PhoneNumber into one list.
10:31
< Bobsentme>
Using Bash scripting.
10:31
< Bobsentme>
My question is: Do I use a for loop, then another, nested for loop?
12:37
< Bobsentme>
Ok, screw it.
12:38
< Bobsentme>
All I need help with now is to figure out how to split a file into two variables
12:48 Bobsentme [Bobsentme@99.149.240.ns-12157] has quit [Quit: Now running PassedOut.bat]
13:20 AnnoDomini [AnnoDomini@83.21.53.ns-25771] has quit [Ping Timeout]
13:21 AnnoDomini [AnnoDomini@83.21.59.ns-4888] has joined #Code
13:21 mode/#code [+o AnnoDomini] by ChanServ
13:33 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code
13:33 mode/#code [+o gnolam] by ChanServ
14:20
<@AnnoDomini>
http://pastie.caboo.se/174578 <- ._.
15:49
<@Attilla>
Is that... Brainfuck?
15:51
<@AnnoDomini>
No. It's email address validation using regular expressions.
15:51
<@Attilla>
I see...
15:51
<@Attilla>
Why?
15:53
<@AnnoDomini>
Are you trying to be Zen? :p
16:02 GeekSoldier|bed is now known as GeekSoldier
16:22 NSGuest-5837 is now known as Serah
16:33
<@ToxicFrog>
I thought REs weren't powerful enough for fully compliant email validation?
16:34
<@AnnoDomini>
I got that from a comment on an article on The Daily TWF. I don't know how to test if this is correct, either.
16:40 GeekSoldier [~Rob@91.18.102.ns-4119] has left #code []
16:53 GeekSoldier [~Rob@91.18.102.ns-4119] has joined #code
16:53 mode/#code [+o GeekSoldier] by ChanServ
17:15 Vornotron [~vorn@Admin.Nightstar.Net] has joined #code
17:17 Vornotron is now known as Vornicus
17:31 JeffL [JPL@Nightstar-12038.dsl.sndg02.pacbell.net] has joined #code
17:57 GeekSoldier is now known as Grue-brain|NotHere
17:57 Grue-brain|NotHere is now known as GeekSoldier
18:16 GeekSoldier [~Rob@91.18.102.ns-4119] has quit [Ping Timeout]
19:03 GeekSoldier [~Rob@91.18.80.ns-26841] has joined #code
19:03 mode/#code [+o GeekSoldier] by ChanServ
21:02 JPL [~jeffl@Nightstar-17127.dynamic.ucsd.edu] has joined #code
21:28
<@McMartin>
TF: PCRE is beyond RE.
21:28
<@McMartin>
I think it might even be beyond CFG in some cases.
21:29
<@McMartin>
Though it's not a superset of CFG, if memory serves.
21:30
<@AnnoDomini>
What does the thing I pasted do, then?
21:42
<@McMartin>
... so the new Fedora will have support for ext4.
21:42
<@McMartin>
AnnoDomini: I wouldn't run it.
21:43 JPL [~jeffl@Nightstar-17127.dynamic.ucsd.edu] has quit [Quit: Leaving]
21:44
<@AnnoDomini>
Heh. I don't even know what to run it in, much less how.
21:45
<@McMartin>
if $_ ~= /(that text)/ { /* do something with $1, $2, $3, etc.*/ }
21:45
<@McMartin>
In Perl
21:53 AnnoDomini [AnnoDomini@83.21.59.ns-4888] has quit [Quit: His gods were simple and understandable; Crom was their chief, and he lived on a great mountain, whence he sent forth dooms and death. It was useless to call on Crom, because he was a gloomy, savage god, and he hated weaklings. But he gave a man courage at birth, and the will and might to kill his enemies, which, in the Cimmerian's mind, was all any god should be expected to do.]
22:03
<@MyCatVerbs>
McMartin: it's gotta be beyond CFG. You can match arbitrary CFGs in O(n^3) time and O(n^2) space.
22:03
<@MyCatVerbs>
McMartin: whereas Perl's regexes are NP-hard. No word on whether they're NP-complete.
22:04
<@McMartin>
MCV: There are things that are harder that still can't solve the same problem
22:04
<@McMartin>
I don't think PCRE can do "matched parens"
22:05
<@MyCatVerbs>
You can reduce sodoku to a PCRE in polynomial time, though. :)
22:07
<@MyCatVerbs>
The difference being that CFGs can't match, for example, a string repeated twice. e.g. [^x]+(x\1)+ can't ever be done with a CFG>
22:07
<@MyCatVerbs>
Right? Or is there anything else to it?
22:10 Bobsentme [Bobsentme@99.149.240.ns-12157] has joined #code
22:10 * Bobsentme apologizes if he was rude this morning.
22:11
< Bobsentme>
I was...stressed.
22:12
<@McMartin>
MCV: THere's a bit more to it, but my automata book isn't handy.
22:13
<@McMartin>
You can do it if there's only one character, because then it's parenthesis matching again.
22:33
< JeffL>
A CFG can match a string repeated twice. More than that I don't think is possible.
23:06 GeekSoldier is now known as GeekSoldier|bed
23:07
<@McMartin>
JeffL: It can match a string, something else, and then that string *backwards*
23:07
<@McMartin>
Not forwards.
23:08
<@McMartin>
I think
23:08
<@McMartin>
Unless the strings are constant, of course.
23:08
<@McMartin>
The classic Actual Application of this is "variables used in expressions were declared first"
--- Log closed Fri Apr 04 00:00:10 2008
code logs -> 2008 -> Thu, 03 Apr 2008< code.20080402.log - code.20080404.log >