code logs -> 2012 -> Sat, 26 May 2012< code.20120525.log - code.20120527.log >
--- Log opened Sat May 26 00:00:04 2012
00:05 Vash [Vash@Nightstar-241cb5d4.wlfrct.sbcglobal.net] has joined #code
00:05 mode/#code [+o Vash] by ChanServ
00:19 You're now known as TheWatcher[T-2]
00:21 You're now known as TheWatcher[zZzZ]
00:30 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
00:30 mode/#code [+ao Derakon Derakon] by ChanServ
01:15 iospace|afk is now known as iospace
01:21 * ToxicFrog pokes 4clojure with a stick
01:21
<~Vornicus>
that seems an unfortunate name for a tool.
01:22
<@ToxicFrog>
It's a website, actually
01:22
<@ToxicFrog>
A set of learning exercises in Clojure
01:23
<@ToxicFrog>
I can't figure out this one without looking up stuff it hasn't shown me yet
01:27
<@ToxicFrog>
The problem, specifically, is
01:27
<@ToxicFrog>
'write a function that returns the last element in a list, without using (last)'
01:28
<@ToxicFrog>
And I mean, yes, (reduce (fn [x y] y) xs), but it hasn't shown me reduce yet.
01:38 * ToxicFrog does 'get the nth item from a list', snrks
01:39
<@ToxicFrog>
So, problem: write a function that returns the nth item from a list. Restriction: no use of (nth).
01:39
<@ToxicFrog>
My solution: (fn [xs n] (if (= 0 n) (first xs) (recur (rest xs) (- n 1))))
01:40
<@ToxicFrog>
Most of the other solutions look like that
01:40
<@ToxicFrog>
Someone, however, knows that Clojure sequences are also Java sequences and submitted this:
01:40
<@ToxicFrog>
.get
01:42 * Derakon snerks.
02:00 Derakon is now known as Derakon[AFK]
02:09 Kindamoody[zZz] is now known as Kindamoody
02:53 cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code
03:32 Attilla [Obsolete@Nightstar-39ef0425.as43234.net] has quit [Ping timeout: 121 seconds]
04:25 Kindamoody is now known as Kindamoody|breakfast
04:43 Kindamoody|breakfast is now known as Kindamoody
05:03 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
05:17 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
05:17 mode/#code [+o himi] by ChanServ
06:08 * Vornicus fiddles with project euler stuff.
06:09 * Vornicus fiddles with 67, sees that he can actually reduce the things he needs to check by a factor of 10 if he uses something smoother than a straight permutation generator.
06:13
<~Vornicus>
and then actually i can probably cut it down even further than that, if I do them in the right order. Factor of about 120 there.
06:14 Kindamoody is now known as Kindamoody|nap
06:42
< Noah>
NO PROJECT EULER LOL
06:46 * Vornicus beats Noah with three cheeses and a tilde.
06:46 * Noah dies, he thinks.
07:02 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
07:04 Derakon[AFK] is now known as Derakon
07:06 * Noah gets told not to mutate in a listcomp in #python
07:11
<~Vornicus>
Damn right
07:11 * Vornicus totally crushes this problem.
07:11
<~Vornicus>
oh, it's 68, not 67.
07:12
<~Vornicus>
But still: three order of magnitude improvement.
07:12
< Noah>
Someone was trying to do a = [1,2,3] = b = [0,*a]
07:12
< Noah>
a = [1,2,3] ; b = [0,*a]
07:12
< Noah>
Rather
07:13
<~Vornicus>
cute
07:13
< Noah>
I came up with a = [1,2,3] ; b = [0] ; [b.append(i) for i in a]
07:14
< Noah>
It returns [None, None, None] strangely
07:14
< Noah>
But b will be [0,1,2,3] at that point
07:15
<~Vornicus>
that's because it's getting the return values for b.append(i)
07:15
<~Vornicus>
As opposed to actually telling you what b is
07:15 Netsplit *.net <-> *.split quits: @PinkFreud, Noah, @himi
07:15 Netsplit over, joins: Noah
07:16
<~Vornicus>
I usually just do b = [0] + a
07:16
< Noah>
Yea, that works
07:16 Noah is now known as 629AAA7C8
07:16 Netsplit over, joins: PinkFreud
07:16 Noah [nbarr@Nightstar-971b3891.pools.spcsdns.net] has joined #code
07:16 Netsplit over, joins: @himi
07:16 ServerMode/#code [+oo PinkFreud himi] by *.Nightstar.Net
07:16
< 629AAA7C8>
Woah
07:17
<~Vornicus>
yay, collisions
07:18 Noah [nbarr@Nightstar-971b3891.pools.spcsdns.net] has quit [Ping timeout: 121 seconds]
07:19 629AAA7C8 is now known as Noah
07:20
<~Vornicus>
(improvements I made: 1. I don't examine the entire permutation space; instead, the outer and inner ring values are chosen combinatorically, with the 10 restriction on it, then permute outer and inner separately. 2. if the outer ring's value can't possibly beat what we've already got, don't bother doing the permutes.)
07:21
< Noah>
So, I'm looking into using a catalog from bricklink to make an easy way to find a part number by name via my bot, if I want to compare a string against a bunch of other strings to find what would be most 'relevant', what should I be looking into for that?
07:21
<~Vornicus>
(this takes it down from 13 seconds to 15 milliseconds.)
07:21
< Noah>
that's a pretty good optimization
07:21
< Noah>
13 sec is just long enough to wonder wtf is taking so long
07:22
<~Vornicus>
Well, no, it's taking so long because it was doing 3 million checks.
07:22
< Noah>
3 million 13 second checks?
07:22
<~Vornicus>
Now it's doing 2,880.
07:22 Derakon is now known as Derakon[AFK]
07:22
<~Vornicus>
No, 3 million checks, in 13 seconds total.
07:23
< Noah>
Oh, right
07:24
< Noah>
Fixing to say, because at ~452 days, that would be some code I'd be looking into
07:24
<~Vornicus>
just slightly~
07:26
< Noah>
Bug Fix: Made code not take longer than gestation of a human being
07:26
<~Vornicus>
well, it's not Ramsey theory, so it's not exactly an amazing feat~
07:28
<~Vornicus>
"Erd?s asks us to imagine an alien force, vastly more powerful than us, landing on Earth and demanding the value of R(5, 5) or they will destroy our planet. In that case, he claims, we should marshal all our computers and all our mathematicians and attempt to find the value. But suppose, instead, that they ask for R(6, 6). In that case, he believes, we should attempt to destroy the aliens."
07:31
<@Alek>
wut
07:35
<~Vornicus>
So, R(3, 3) is 6: if you have 6 people in the room and each pair either knows each other or doesn't, then you're guaranteed to have at least one trio of people who all know each other, or one trio of people who all don't.
07:35
<~Vornicus>
This is not, however, true of 5 people.
07:37 Kindamoody|nap is now known as Kindamoody
07:37
<~Vornicus>
R(5, 5) asks how many people you need to guarantee a group of 5 people who all know each other, or a group of 5 people who all don't knoe each other.
07:38
<~Vornicus>
it's somewhere between 43 and 49. R(6, 6) is somewhere between 102 and 165.
07:40
<~Vornicus>
In order to confirm that a particular number is at or above the R value, you need to try something on the order of 2^(x^2/2) things.
07:53
< Reiver>
Haha, so for 5,5 you work like hell to solve it...
07:53
< Reiver>
... for 6,6 you tell them to piss off?~
07:54
<~Vornicus>
yep.
07:54 * Vornicus is pretty sure there are far fewer possibilities than he's describing, actually.
07:55
<~Vornicus>
Or rather, there's far fewer things that one would need to examine.
07:57 * Vash bonks vorn on the head with a cheese. Drags to bed.
07:57
<~Vornicus>
for instance, in a graph of 6 nodes, there's technically 32,768 different ways the graph could look, but if only one edge is colored then there's only really 1 way that could happen instead of 15; two edges colored has only 2 ways it could happen instead of 105.
07:57 Vash [Vash@Nightstar-241cb5d4.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!]
08:51
<~Vornicus>
and now that problem is keeping me awake
08:58
< cpux>
You ask me, sleep is hard.
09:26 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has quit [Client exited]
09:47 You're now known as TheWatcher
10:47 Kindamoody is now known as Kindamoody|afk
11:02 Attilla [Obsolete@Nightstar-39ef0425.as43234.net] has joined #code
11:04 You're now known as TheWatcher[afk]
11:25 ErikMesoy [Erik_Mesoy@Nightstar-bd2f5f93.80-203-16.nextgentel.com] has joined #code
12:26 Noah [nbarr@Nightstar-971b3891.pools.spcsdns.net] has quit [[NS] Quit: Leaving]
13:05 AnnoDomini [annodomini@A08927.B4421D.B81A91.464BAB] has joined #code
13:05 mode/#code [+o AnnoDomini] by ChanServ
13:09 Kindamoody|afk is now known as Kindamoody
14:56 iospace is now known as io|mad-town
15:50 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code
16:43 Kindamoody is now known as Kindamoody|afk
16:46 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Client closed the connection]
16:48
< Tarinaky>
http://i.imgur.com/eahzE.jpg
16:49
< gnolam>
Tarinaky: ... you've never seen that one before? o_O
16:50
< ErikMesoy>
My physics teacher even had a Norwegian one. :D
16:52
<@Tamber>
hehe
16:53
< ErikMesoy>
I preferred his vaguely grander sweep of "In this room, theory and practice are united..."
16:56
< Tarinaky>
gnolam: I have.
16:56
< Tarinaky>
Or rather, I've heard it before.
16:56
< Tarinaky>
I've never seen it as a jpeg before.
16:57
< gnolam>
(And yes, http://www.xkcd.com/1053/ and all, but... there are limits. That one's possibly older than "You don't have to be mad to work here, but it helps".)
16:59
< Tarinaky>
Like I said.
16:59
< Tarinaky>
I've heard it before. I've never seen it as a handy linkable jpeg.
16:59
< Tarinaky>
Besides. Old jokes are worth repeating.
16:59
< Tarinaky>
Or they wouldn't be old.
17:22 Attilla [Obsolete@Nightstar-39ef0425.as43234.net] has quit [[NS] Quit: ]
17:25 Noah [NSwebIRC@D82662.C541A8.D65203.7C054A] has joined #code
17:26
< Noah>
HOKAY SO
17:26
< Noah>
I'm looking into fuzzy string matching for python, and I'm seeing FuzzyWuzzy, which looks pretty neat
17:26
< Noah>
And also Jellyfish
17:28
< Noah>
I'm leaning towards FuzzyWuzzy because it has a neat method for extracting the most relevant matches, and limiting those matches, and that eliminates a lot of code I'd have to do myself
17:30 Attilla [Obsolete@Nightstar-39ef0425.as43234.net] has joined #code
17:37
<@Tamber>
Also, because it's fuzzy?
17:54
< Noah>
Indeed
17:56
<~Vornicus>
Ah, found it. http://oeis.org/A000088
17:56 * Vornicus feels better now.
17:57
<~Vornicus>
Still gets big fast, but not nearly as fast as 2^((n)(n-1)/2)
17:59 Vash [Vash@Nightstar-241cb5d4.wlfrct.sbcglobal.net] has joined #code
17:59 mode/#code [+o Vash] by ChanServ
18:03 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code
18:25 Noah [NSwebIRC@D82662.C541A8.D65203.7C054A] has quit [[NS] Quit: Page closed]
18:40 rms is now known as Anna
18:52 ErikMesoy is now known as Prince
19:01 AnnoDomini is now known as Jasever
19:16 EvilDarkLord is now known as Aeron
19:29 Kindamoody|afk is now known as Kindamoody
20:00 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
20:00 mode/#code [+o ToxicFrog] by ChanServ
20:10 Kindamoody is now known as Kindamoody[zZz]
20:53 * Vornicus pokes at his code for #72, which he actually doesn't know how it works.
21:20
< celticminstrel>
Speaking of code, I finally figured out a dangling reference issue. X_X
21:40
<~Vornicus>
oh that's what it's doing. got it.
21:40
<~Vornicus>
(it's seiving, and clearing out reducible fractions, in one move)
22:05 Derakon[AFK] is now known as Derakon
22:43 Prince is now known as ErikMesoy|sleep
22:52 Derakon is now known as Derakon[AFK]
23:19 You're now known as TheWatcher
23:30 Derakon[AFK] is now known as Derakno
23:30 Derakno is now known as Derakon
23:40 Aeron is now known as EvilDarkLord
23:41 Jasever is now known as AnnoDomini
23:42 AnnoDomini [annodomini@A08927.B4421D.B81A91.464BAB] has quit [[NS] Quit: Away!]
23:42 Anna is now known as rms
--- Log closed Sun May 27 00:00:20 2012
code logs -> 2012 -> Sat, 26 May 2012< code.20120525.log - code.20120527.log >

[ Latest log file ]