code logs -> 2013 -> Wed, 13 Feb 2013< code.20130212.log - code.20130214.log >
--- Log opened Wed Feb 13 00:00:40 2013
00:02
< RichyB>
Neat thing there is, since it's all purely functional, they don't need to bother to prevent any pair of threads from racing to simultaneously evaluate the same closure - both will end up computing the same result and a pointer will get left behind to one of the two copies of the same result. The performance hit from ever-so-very-occasionally evaluating something twice is almost nil because it happens so rarely. But you save having to do (e
00:02
< RichyB>
xpensive) atomic operations.
00:05
<@Reiv>
So you save more from playing the odds of duplicated effort vs going to the trouble to prevent it?
00:05
<&McMartin>
That's true a lot, it turns out
00:06
< RichyB>
Yes. AIUI you find that that principle holds true *very* often when you're chasing parallelism.
00:06
<&McMartin>
Even when you're stateful there's a notion of "optimistic locking"
00:07
< RichyB>
Redundant computations can be a lot cheaper than the communication required to share the results of doing computations only once.
00:07
< RichyB>
Have you tried using STM? It's kind of awesome. ?
00:07
< RichyB>
(Speaking of optimistic locking, even.)
00:07
<&McMartin>
I don't get a chance to use exotic forms of parallelism very often, but on the plus side, this is because I rarely have to actually contend with parallelism issues these days
00:09
< RichyB>
STM is about the 2nd or 3rd least-exotic parallelism trick, after futures and subroutines that operate point-wise over vectors.
00:09
< RichyB>
STM implementations are available in GHC and Clojure, and I'm pretty sure that Zope's ZODB counts as a persistent (massively slow) STM implementation.
00:10
< RichyB>
As a user of it: you just get atomic transactions across arbitrary sets of mutable references.
00:31 Derakon[AFK] is now known as Derakon
00:31
<@Rhamphoryncus>
where "arbitrary" depends on what you're using. It helps to have a language with it well integrated though
00:41
< RichyB>
You get atomic transactions over arbitrarily-sized sets of mutable references.
00:42
< RichyB>
Not sets of arbitrary mutable-reference objects.
00:46
<@Rhamphoryncus>
Fair enough, but that's still "arbitrary but preferably small for performance reasons"
00:46
<@Rhamphoryncus>
(which is a bit oversimplified..)
00:47
<&McMartin>
ISTR there are some places where STM breaks down, but I also don't remember what they are
00:48
<@Rhamphoryncus>
It's theoretically equivalent to locks in performance, it's just MUCH easier to work with
00:48
<@Rhamphoryncus>
A bottleneck is still a bottleneck
00:59
<@Alek>
http://xkcd.com/1168/
00:59
<@Rhamphoryncus>
Also the same as locking, it's okay if the transaction in module A has a subtransaction in module B, but if B then uses C, which uses D, the cost of a collision is high as well as being hard to keep organized (if you loop back to A you can get a hang, just as bad as a deadlock)
01:00
<@Rhamphoryncus>
Alek: tar --help? :D
01:01
<@Rhamphoryncus>
or tar -cjf foo.bz2 dir/
01:04
< VirusJTG_>
lol in pamdemic 2 I have the entire world red BUT madigascar
01:04
< VirusJTG_>
its awrsome
01:04
< VirusJTG_>
awesome
01:06
<@Reiv>
That's fairly standard, yes.
01:07
< VirusJTG_>
at only my third attempt
01:07
<@Reiv>
Don't worry
01:07
<@Reiv>
Madagascar will take till your fiftieth.
01:07
<@Reiv>
I have seen people who will simply refresh the game until they /start/ in Madagascar, then play from there...
01:07
< VirusJTG_>
Yeah, I've noticed they are extreamly paraniod
01:10
< VirusJTG_>
I don't think the vacseen will do much, there are no healthy people left...
01:13
<~Vornicus>
SHUT. DOWN. EVERYTHING.
01:14 Orthia [orthianz@3CF3A5.E1CD01.5A78C0.03128C] has quit [[NS] Quit: Going dooooown...]
01:14
<~Vornicus>
not you, orthia~
01:14
< VirusJTG_>
lol
01:14
< RichyB>
Semantically, no, STM does not break down. Performance, yes, it can livelock.
01:15
< RichyB>
It tends to (get close to) livelock when you have a mixture of short-running and long-running transactions writing to the same objects.
01:15
< RichyB>
The short-running transactions cause the long-running ones to repeatedly abort.
01:24 Orthia [orthianz@3CF3A5.E1CD01.5A78C0.03128C] has joined #code
01:24 mode/#code [+o Orthia] by ChanServ
01:32 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
01:35 VirusJTG_ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Ping timeout: 121 seconds]
01:36 RobinStamer [rstamer@Nightstar-e681a855.org] has joined #code
01:36 mode/#code [+o RobinStamer] by ChanServ
01:52
<@celticminstrel>
I feel like I should enumerate the reasons this won't work in IE. So far I have __proto__ and passing parameters to setTimeout functions, which from what I've heard are not supported in IE.
01:57
< RichyB>
setTimeout has more than two parameters?
01:58
<@celticminstrel>
In Firefox it does.
01:59
<@RobinStamer>
In Spidermonkey and V8 it does.
01:59
<@Reiv>
What about Chrome?
01:59
<@RobinStamer>
That's V8.
01:59
<@Reiv>
Just checkin'.
01:59
<@Reiv>
Opera?
01:59
<@RobinStamer>
No clue what engine that uses.
02:00
<@RobinStamer>
Likely a custom one that doesn't have any CLI program associated with it.
02:00
<@RobinStamer>
Which is sad, because even JScript has one of those (even though it's the worst)
02:00
<@celticminstrel>
V8?
02:00
< RichyB>
Oh, fie. Just close over the extra parameters.
02:00
< RichyB>
celticminstrel: Chrome's.
02:00
<@celticminstrel>
What is V8?
02:00
<@RobinStamer>
JS engines are named.
02:01
<@RobinStamer>
V8 is Chromium and Chrome's JS engine.
02:01
<@celticminstrel>
Ah.
02:01
<@celticminstrel>
Does that mean it's different from Safari's?
02:01
<@RobinStamer>
Spidermonkey is Firefox's (it's also what MongoDB uses)
02:01
<@RobinStamer>
Yes.
02:01 * celticminstrel had assumed JS engines and web rendering engines were matched. >_>
02:02
<@RobinStamer>
Safari (AFAIK) uses WebKit's built-in engine. As does Quassel (web-preview) and Konqueror.
02:02
<@RobinStamer>
No, that's one of the big selling points of Chrome.
02:02
<@RobinStamer>
V8 was made for speed.
02:02
<@RobinStamer>
Although others are catching up
02:02
<@RobinStamer>
Actually, they have.
02:02
< RichyB>
Safari uses something all of its own. "JavaScriptCore", "SquirrelFish", "Nitro".
02:03
< RichyB>
Not actually different things, they've just kept changing the same name.
02:03
<@celticminstrel>
If Opera has a javascript console I can test it... but I can't find one...
02:03
<@RobinStamer>
JavaScriptCore is WebKit's JS engine.
02:04 Mac [Mac@Nightstar-fe8a1f12.il.comcast.net] has joined #code
02:04
<@RobinStamer>
Also, Safari doesn't use it apparently.
02:04
<@RobinStamer>
Although any other Mac program using WebKit will default to that.
02:04
<@RobinStamer>
(WebKit's docs)
02:04
<@RobinStamer>
http://www.webkit.org/projects/javascript/index.html
02:06
<@celticminstrel>
It seems that Opera does accept additional parameters on setTimeout.
02:06 * RobinStamer wonders what Opera even uses now
02:07
<@celticminstrel>
And it has __proto__.
02:07 Attilla [Attilla@Nightstar-aced750e.range86-184.btcentralplus.com] has quit [Ping timeout: 121 seconds]
02:08
<@celticminstrel>
Opera's developer panel is called Dragonfly.
02:08
<@celticminstrel>
A wonderful way to obscure the fact that it exists. Who would think that Opera Dragonfly is a developer panel?
02:09
<@RobinStamer>
Heh
02:09
<@RobinStamer>
I guess it's in response to "FireBug"?
02:09
<@celticminstrel>
Okay, quitting Opera now.
02:09
<@celticminstrel>
I dunno, maybe.
02:09
< RichyB>
celticminstrel: please tell me that there's a "Mme::Dragonfly" somewhere in the implementation?
02:09
<@celticminstrel>
I never actually use Opera.
02:09
<@celticminstrel>
RichyB: I have no clue. :P
02:10
< RichyB>
Wait, no. I was thinking of butterflies.
02:10
< RichyB>
"Madame Butterfly" is the name of a pretty good opera by someone or other.
02:10
<@froztbyte>
it's also the name of Bayonetta's one power
02:10
< RichyB>
If I wrote a program called "Opera", I would so be naming all the submodules after famous pieces, y'know?
02:10
<@froztbyte>
which is a fact well worth knowing
02:11
<@froztbyte>
RichyB: yes
02:11
<@froztbyte>
indeed
02:11
<@gnolam>
The browser where everyone dies at the end.
02:11
<@celticminstrel>
Except the viewer!
02:11
< RichyB>
Hey, operas aren't all monotonous.
02:11 Mac [Mac@Nightstar-fe8a1f12.il.comcast.net] has left #code []
02:11
< RichyB>
Sometimes people die in the middle.
02:11
<@froztbyte>
is there an opera with zombies yet?
02:12
< RichyB>
I don't know of one.
02:12
<@celticminstrel>
I sure hope not. Zombies are overdone.
02:12
<@gnolam>
I wrote an intro to one way, way back.
02:12
< RichyB>
celticminstrel: eh, so's everything.
02:13
<@celticminstrel>
They annoy me.
02:14
<@froztbyte>
I half agree
02:14
<@froztbyte>
much in the last 3~5 years goes with the formula "hmm, we need something spiced up/more dangerous/some lulz/..." "...I know! add ZOMBIES!"
02:15
< RichyB>
How come nobody's done zombies in SPAAAAACE anyway?
02:15
<@RobinStamer>
*cough*borg*cough*
02:15
<@froztbyte>
Firefly~
02:15
<@froztbyte>
the Reavers kinda count, I suppose
02:15
<@RobinStamer>
Dead Space.
02:16
<@RobinStamer>
Like flat out.
02:17
<@RobinStamer>
Kind of with Bullet Storm.
02:17
<@RobinStamer>
Definately Halo.
02:21
<@RobinStamer>
Oh, Mass Effect
02:22
<@RobinStamer>
... Does Halloween Harry/Alien Carnage count?
02:24
<@froztbyte>
http://www.didrailshaveamajorsecurityflawtoday.com/
02:24
<@RobinStamer>
I think Mirrodin would be pushing it.
02:24
<@froztbyte>
..............
02:24
<@froztbyte>
and I'd just finished dealing with the previous one
02:24
<@RobinStamer>
lulz
02:25
<@RobinStamer>
That just looks like a patch, not a new hole.
02:25
<@froztbyte>
I've learned one thing
02:25
<@froztbyte>
any ruby patch worthy of a CVE...
02:26
<@froztbyte>
https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/AFBKNY7 VSH8 <- ActiveRecord safety bypass
02:27
<@froztbyte>
https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/KtmwSbE pzrU <- moar yaml decoding lulz
02:27
<@RobinStamer>
What does Rails do exactly? Is it worth learning Ruby without it?
02:27
<@froztbyte>
yes
02:27 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!]
02:27
<@froztbyte>
rails is a rapid web prototyping platform
02:27
<@froztbyte>
and there's a very rich userland around it
02:27
<@RobinStamer>
Alright
02:28
<@froztbyte>
now I say specifically rich and not good, because jesus fucking chriiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiist rubytards
02:28 * RobinStamer was thinking of adding Ruby and Lua to his repetoire.
02:28
<@RobinStamer>
Ha
02:28
<@froztbyte>
ruby's package distribution mechanism is gems, and these people are Not Good.
02:28
<@froztbyte>
some packages will do dependencies on exact versions
02:28
<@froztbyte>
and then some parts of the puzzle won't line up
02:28
<@froztbyte>
leading to dumb monkeypatching, shitty bundler use, etc etc
02:29
<@froztbyte>
the ruby ecosystem ethos is very much "make it work"
02:29
<@RobinStamer>
I'm going to hazard a guess and say that packages are all dumped into one place without being able to have subpackages put into the package?
02:29
<@RobinStamer>
(IE what npm does)
02:30
<@froztbyte>
I know some very highly paid ruby dudes who don't know a goddamned thing about the platform their stuff runs on
02:30
<@froztbyte>
and when I say highly paid, I mean like 4.5k+ USD/m
02:30
<@RobinStamer>
:/
02:30
<@froztbyte>
but an iptables misconfig could bring their day to a halt.
02:30
<@froztbyte>
(literally, it'd take them a day to track it down, if not longer)
02:30
<@froztbyte>
RobinStamer: I'd recommend learning both Ruby and Lua, tbh
02:31
<@froztbyte>
you find them in odd places
02:31
<@froztbyte>
and it's nice to be able to read them easily, if nothing else
02:31
< RichyB>
Wow. What kind of lunacy do you have to put up with to get that money?
02:31
<@RobinStamer>
froztbyte: The plan was to learn both yes.
02:31
<@froztbyte>
for ruby, the _why's Poignant Guide is still the best reference I know of
02:31
< RichyB>
iptables-illiterate or no, I'm unwilling to immediately write-off the brainpower of someone who's managed to cut themselves that deal. :P
02:31
<@froztbyte>
for Lua, I have no idea
02:31
<@froztbyte>
RichyB: well, ruby insanity
02:31 * RobinStamer already knows: C, C++, Python, PHP, JS and Java.
02:32
<@froztbyte>
the sell, as far as I understand it, is "rapid prototyping! getting a quick product out the door! agile! CI! and stuff and stuff!"
02:32
<@froztbyte>
so what typically happens is it's an expensive-ish way to get an idea solidified quickly
02:33
< RichyB>
I am not particularly unsympathetic to the "woo, Agile!" and "woo, CI!" banners.
02:33
<@froztbyte>
and then it either just runs in that state (forever|until someone roots it|until the VC runs out|...[other reasons]...)
02:33
< RichyB>
Heh.
02:34
<@froztbyte>
or it gets slowly remade in another platform entirely over time by a dedicated team once the first big fuckup happens
02:34
< RichyB>
The objective is (until someone buys it out and then rewrites it on another platform).
02:34
<@froztbyte>
(read: Twitter going Scala)
02:34
<@froztbyte>
(although there are a few other examples around too)
02:34
<@froztbyte>
RichyB: haha
02:34
<@RobinStamer>
What are Ruby's strengths then? (or) What would be a good starter project for an SA learning Ruby?
02:34
<@froztbyte>
well, yeah, there's a few parts to this
02:35
<@froztbyte>
the main reason you'd redo a project like this is your rubytard in question would usually use all the latest greatness etc to get shit going
02:35
<@froztbyte>
except some of those might be slow, or crappy, or die in 3 months when another new hotness comes out, or or or
02:35
<@froztbyte>
and every decision like that has some technical debt
02:36
<@froztbyte>
RobinStamer: puppet has strong ruby influence, and knowing puppet is instant devops +5 if you ever care for that sort of thing
02:37
< RichyB>
Chef too.
02:37
<@RobinStamer>
Yeah, I might start deploying Puppet
02:37
<@froztbyte>
indeed
02:37
<@RobinStamer>
Since my setup died and I never completed the CFengine 2 deployment.
02:38
<@froztbyte>
also something like Capistrano (the python work-alikes for Cap and Puppet are Fabric and Salt)
02:38
<@froztbyte>
I still don't think I've heard of someone using CFEngine2 and being happy with it
02:39
<@RobinStamer>
The main issue I had with it was it couldn't sync a directory right.
02:39
<@RobinStamer>
We wanted it to perfectly match a directory from upstream.
02:39
<@RobinStamer>
It could get the new files all fine...
02:39
<@RobinStamer>
It just wouldn't remove the files that didn't belong.
02:39
<@RobinStamer>
So we had to make it wipe the directory, then pull every file.
02:39
<@RobinStamer>
D:
02:40
<@froztbyte>
haha
02:41
< RichyB>
rsync --archive --delete # does not do what you're after?
02:41
<@froztbyte>
presumably it does
02:41
<@froztbyte>
but.
02:41
<@froztbyte>
there's always some hairy bullshit somewhere.
02:41
<@froztbyte>
the puppet implementation of doing filebuckets over http(s) is pretty nice
02:41
<@froztbyte>
deals with NAT etc fine
02:41
< RichyB>
I had a classmate, bloke called Nathan, who was possibly the wisest man I have ever met.
02:42
< RichyB>
His words, regarding getting software to *actually* work:
02:42
< RichyB>
"Everything is always some bullshit hassle."
02:42
<@RobinStamer>
RichyB: The thing about using it with CFengine is we could also say "this computer does NOT get upstream file X"
02:42
<@froztbyte>
I would be certain that if I interfered with puppet's filebuckets on the client side, it would hate me
02:42
<@RobinStamer>
Without having multiple directories for each possible configuration.
02:43
< RichyB>
Makes sense.
02:43
<@froztbyte>
(well, it'd check the file hashes, and then just re-get)
02:43
<@froztbyte>
RobinStamer: rsync has --exclude
02:43
<@froztbyte>
which you could do the same thing with
02:53 JustBob [justbob@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: ]
02:56 syksleep is now known as Syk
02:58 JustBob [justbob@ServerAdministrator.Nightstar.Net] has joined #code
03:01
<@froztbyte>
http://blog.dustinkirkland.com/2013/02/introducing-hockeypuck-new-hkp-server.htm l
03:37 Kindamoody[zZz] is now known as Kindamoody
04:40 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
04:53 RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has quit [[NS] Quit: >:3 This is BunThulhu. Copy him into your quit message to help him take over the Internet.]
05:23
<~Vornicus>
argwtf, no pygame build for this system
05:23
<@froztbyte>
import this
05:35 himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds]
05:56 Kindamoody is now known as Kindamoody|out
06:35 Derakon is now known as Derakon[AFK]
06:42 ErikMesoy|sleep is now known as ErikMesoy
07:49 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
07:49 mode/#code [+o himi] by ChanServ
07:55 thalass [thalass@Nightstar-23c59d3f.bigpond.net.au] has joined #code
08:10
< ErikMesoy>
What's a better way of going "Pad this array with Nones until it has 12 items"? Right now I'm appending 12 Nones and then truncating the array to the first 12.
08:11
<@Azash>
Adding nones until the length hits 12
08:13
< ErikMesoy>
D'oh.
08:18 cpux [cpux@Nightstar-98762b0f.dyn.optonline.net] has quit [Client closed the connection]
08:20
<&jerith>
ErikMesoy: I generally add n Nones and truncate.
08:20
<&jerith>
You can also do 'foo += [None] * (12 - len(foo))' if you want.
08:33 Pandemic [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: shutting down!]
08:41
<@froztbyte>
you can do that for arrays?
08:41 * froztbyte has usually used .append()
08:42
<@froztbyte>
neat
08:42
<@froztbyte>
thanks jerith :)
08:43 * Syk launching something tomorrow :U
08:43
<~Vornicus>
+= on lists does modify; you can also use .extend()
08:43
<@Azash>
Syk: \o/
08:43
<@froztbyte>
Vornicus: ye, found so :)
08:43
<@froztbyte>
I'd just never thought to use it
08:44
< Syk>
I've never actually launched something
08:44
<@froztbyte>
my python capability are very well described by "gunslinger"
08:44
< Syk>
even though this is small
08:44
< Syk>
I just hope that people don't go to use it, and it explodes
08:44 * Courage briefly misparses "Nones", wonders if the language also has commands for Matins, Prime and Compline
08:45
<@Azash>
I'm sure it'll be fine, Syk
08:45
<@Azash>
What are you launching?
08:46
< Syk>
it's a little public support desk thing
08:46
<@froztbyte>
Syk: make a cool 404 page
08:46
< Syk>
it's in twisted, it just throws them at the main page
08:46
<@froztbyte>
"Oh, it looks like you've found a nook for our server rats to hide in. We'll go take a look!"
08:47
<@froztbyte>
Syk: non-silent failure that's acknowledged is better than silent failure "recovering" and leaving the user uninformed
08:47
<@froztbyte>
people rage more about "this goddamned thing doesn't do what I tell it!" than "oh, okay, fucking thing is broken now"
08:47
< Syk>
oh yeah, errors do stuff
08:47
<@froztbyte>
so just make * throw exceptions, and unhandled ones give some reason like the above
08:48
<~Vornicus>
Courage: I must admit I would avoid that language next month
08:49
<~Vornicus>
erp, got my ridiculous time-based things wrong.
09:05
<&jerith>
Ridiculous time-based things are usually wrong.
09:06 thalass [thalass@Nightstar-23c59d3f.bigpond.net.au] has quit [Ping timeout: 121 seconds]
09:21
<~Vornicus>
Well... yes, but most of them aren't catholic calls to prayer and roman semi-lunar calendars.
09:25 Attilla [Attilla@Nightstar-aced750e.range86-184.btcentralplus.com] has joined #code
09:26 You're now known as TheWatcher
09:52 NSJavaGuest-0662 [NSJavaIRC@6CF571.591E55.6F2401.FA5407] has joined #code
09:52 NSJavaGuest-0662 [NSJavaIRC@6CF571.591E55.6F2401.FA5407] has quit [[NS] Quit: Nightstar's Java Chat http://www.nightstar.net]
09:53 NSJavaGuest-9967 [NSJavaIRC@6CF571.591E55.6F2401.FA5407] has joined #code
09:53
< NSJavaGuest-9967>
Guys, I need some help in a math related problem. Can you help? I'll be very greatful to you.
09:57
<~Vornicus>
just ask
10:00
< NSJavaGuest-9967>
Its a big question, would you mind if I give you the link so that you can understand it better?
10:00
<~Vornicus>
go ahead.
10:00
< NSJavaGuest-9967>
http://evilzone.org/science/one-question/
10:02
<~Vornicus>
cute.
10:02
<~Vornicus>
hm
10:04
< NSJavaGuest-9967>
I was unable to find a pattern. :(
10:05
<~Vornicus>
I certainly don't see one.
10:07
< Xires>
perhaps the pattern is in choosing which makes the least sense?
10:07
<~Vornicus>
None of them make any sense, is the problem!
10:07
< NSJavaGuest-9967>
ya.
10:08
< NSJavaGuest-9967>
It ate my 2 hrs.
10:09
<~Vornicus>
Were all the crosses the same shape and size?
10:10
<~Vornicus>
and were the horizontal bars actually long like that?
10:10 RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
10:10
< NSJavaGuest-9967>
The numbers were in boxes and the lines were arrows which ended on both ends as sharp ends, like <----------->
10:11
<~Vornicus>
So you have four numbers, in boxes, with double-ended arrows crossed between them.
10:12
< NSJavaGuest-9967>
yup, but that's just a design.
10:12 * Vornicus thinks at it.
10:12
<~Vornicus>
Were the horizontal lines longer than the vertical ones, or about the same size? This might be a puzzle of ridiculous stupidity.
10:13
< NSJavaGuest-9967>
They were of same length
10:13
<~Vornicus>
Also, were the numerals in a "digital clock" font?
10:14 * Vornicus is grasping at straws here.
10:14
< NSJavaGuest-9967>
As I said, they have nothin to do with the answer, cause we solved many other like them. The font was 'Calibri'
10:15
<~Vornicus>
Okay.
10:16
< NSJavaGuest-9967>
That was a sample paper of the paper we'll be having two days after
10:16
<&jerith>
Does the value of the missing number depend only on the other numbers in its block or can it depend on numbers in other blocks?
10:17
< NSJavaGuest-9967>
The values of the largest number depends on the values on the values in its block only.
10:18
<~Vornicus>
Hm. okay. Here's things I know: 417 = 1 mod 4, 2 mod 5, 3 mod 6. there is no similar setup for 255. 255 is 3*5*17, but 417 has nothing like that, it's 3*139.
10:18
<~Vornicus>
what are some other patterns, so I know what neck of the woods I might want to go looking.
10:18
<&jerith>
All the sets of small numbers add up to 15.
10:19
<~Vornicus>
Oh that's interesting.
10:20
<~Vornicus>
the digits of 417 and the digits of 255 both add up to 12
10:20
<~Vornicus>
...but none of the answer selections do.
10:20
<&jerith>
The digits of the large numbers add up to 12 in the two known blocks, but none of the possible answers do.
10:21
< NSJavaGuest-9967>
There are no methods, no rules.Its like FBI cracking some code. You are free to use anything what you can think of but it should satisfy all the values in all the blocks.
10:21
< NSJavaGuest-9967>
jerith; that was the first we found
10:21
<&jerith>
So you just need to come up with some rule that fits all the blocks.
10:21
<&jerith>
And the rule must exclude all but one of the possible answers.
10:23
< NSJavaGuest-9967>
yup
10:23
<&jerith>
Must the rule determine a uniqe solution or is it sufficient to select only one of the possible answers?
10:24
<~Vornicus>
I don't see anything
10:24 * TheWatcher eyes
10:26
<~Vornicus>
This honestly looks like one of those bullshit questions people come up with where what's in the designer's head can't actually be conveyed like this.
10:26
< ErikMesoy>
It might be obvious in retrospect.
10:26
<@TheWatcher>
For one, you don't want the FBI cracking codes, they're pretty useless at it compared to the NSA or GCHQ. Second, trick or bribe a TA or someone who might know the answer into giving it to you, social engineering is far more effective~
10:27
<&jerith>
Rubber hose cryptanalysis ftw.
10:27
<~Vornicus>
consider this sequence of numbers: 0, 1, 2. the next number in this sequence is large. really large. what is it?
10:27
< ErikMesoy>
hmmm. 3^5+5+7 = 255
10:28
<~Vornicus>
4^5 = 1024
10:28
< NSJavaGuest-9967>
try fittin it in another block; ErikMesoy
10:28
<~Vornicus>
little too high.
10:29
<~Vornicus>
(answer: 720! ~= 2.601*10^1746, the pattern is 0 1! 2!! 3!!!)
10:30
< NSJavaGuest-9967>
The answer that was given in the backside was 553, but not the solution was given. Can you find the pattern now?
10:32 * Vornicus checks oeis. those three numbers are in A071593 "Number of 1's in binary representation of n equals tau(n), the number of divisors of n."
10:32
<~Vornicus>
but none of the numbers for the top have anything todo with that.
10:33
< ErikMesoy>
that... is a ridiculously obscure sequence
10:33
<~Vornicus>
Erik: I know, right?
10:33
< ErikMesoy>
you could do better throwing the values into a 2nd degree equation solver. :P
10:34
<~Vornicus>
speaking of.
10:34
< NSJavaGuest-9967>
bro, we have to use a pen and paper there ONLY
10:36
<~Vornicus>
Well it's not going to be some nice multiples of each number, I see that clearly
10:38
<~Vornicus>
(the numbers I get for trying that are all nonintegers.)
10:38
< ErikMesoy>
Linear equation on (753,255) and (654,417) yields y=1487.18-1.63(63r)x, a line into (582, ?) yields 534
10:39
<~Vornicus>
hm. in the... no, the meanings change.
10:40
<&jerith>
And now for something completely different:
10:40
<&jerith>
12:31 < sdehaan> ajerith: I suspect this was you?
10:40
<&jerith>
https://github.com/praekelt/vumi/blob/develop/vumi/transports/twitter/tests/test _twitter.py#L8-L14
10:40
<&jerith>
12:31 < sdehaan> cracked me up.
10:40
<&jerith>
12:32 < ajerith> sdehaan: "git blame" says it was you, actually. :-P
10:41
<~Vornicus>
in 255, 3 is a difference, 5 is a digit, 7 is a sum; in 417, 4 is a digit, 5 is a sum, 6 is a difference; in 533, 2 is a difference, 8 is a sum, and 5 is a digit.
10:42
<~Vornicus>
none of the other possible answers give all three of those; however, there are a lot of other 3 digit numbers that satisfy each constraint.
10:43
<~Vornicus>
jerith: ew ew ew ew ew :(
10:44
<&jerith>
That's actually a fairly useful pattern.
10:44
<&jerith>
Also, not that this is a test module. We're only using it to fake a library that we're stubbing out.
10:44
< ErikMesoy>
Vornicus: I think you deserve moral victory for that at least
10:47
<~Vornicus>
and since apparently the constraints can be in any order, there's even more.
10:50 * ErikMesoy pokes at that "qualitative" thing. 3,5,7 is an odd number of odd numbers. 4,5,6 too and 5,8,2.
10:51
<~Vornicus>
that will be the case for any trio of numbers that add up to an odd.
10:51
< ErikMesoy>
255 and 417 are both odd and contain an even number of odd digits.
10:52
< ErikMesoy>
All the answer choices contain an odd number of odd digits.
10:53
< ErikMesoy>
oh, here's another qualitative answer: only one digit out of 3,5,7 appears in "255". Only one digit out of 4,5,6 appears in "417". Only one digit of 5,8,2 appears in "553", compared to two or no digits for the other choices.
10:55
< NSJavaGuest-9967>
some other bro.
10:56
< ErikMesoy>
Huh?
11:00
< ErikMesoy>
Bleh, lots of possible hypotheses. This question seems vague. Tell me if there's something obvious I missed.
11:02
<~Vornicus>
Looks like our best bet is mine; all three digits are accounted for, the other possibilities are clearly discounted; but...
11:04
<~Vornicus>
To be perfectly honest the question looks like complete bullshit.
11:05
< NSJavaGuest-9967>
you are right, Vornicus
11:08
<~Vornicus>
now, sleep.
11:09
< ErikMesoy>
nini
11:10 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
11:11 NSJavaGuest-9967 [NSJavaIRC@6CF571.591E55.6F2401.FA5407] has quit [[NS] Quit: Nightstar's Java Chat http://www.nightstar.net]
12:09 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
12:40 Xon [Xon@Nightstar-362effcc.highway1.net.au] has quit [Ping timeout: 121 seconds]
12:40 thalass [thalass@Nightstar-23c59d3f.bigpond.net.au] has joined #code
12:51 Xon [Xon@Nightstar-362effcc.highway1.net.au] has joined #code
13:02 Pandemic [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
13:03 mode/#code [+o Pandemic] by ChanServ
13:04 KiMo [Kindamoody@Nightstar-05577424.tbcn.telia.com] has joined #code
13:04 mode/#code [+o KiMo] by ChanServ
13:04 Kindamoody|out [Kindamoody@Nightstar-05577424.tbcn.telia.com] has quit [Operation timed out]
14:06 thalass [thalass@Nightstar-23c59d3f.bigpond.net.au] has quit [[NS] Quit: omgherd]
14:38
<&ToxicFrog>
Hooooooooooly shit: http://www.blackberry.com/btsc/KB33425
14:38
<&ToxicFrog>
Remote code execution vulnerability in blackberry libtiff.
14:38
<&ToxicFrog>
On the server.
14:39
<&ToxicFrog>
It can be triggered by any blackberry using that server visiting a malicious website, or - check this - sending an email or IM to any blackberry on that server containing a malicious TIFF.
14:39
<@TheWatcher>
...
14:39
<&ToxicFrog>
Note that in the latter case no user action is required, the server will be exploited before the message is even delivered to the client.
14:39
<@TheWatcher>
Brilliant
14:43
<@iospace>
...
14:44
<@iospace>
wow
14:44
<@TheWatcher>
I do like how it says that an attacker would need to create a specially crafted web page. Becuase, y'know, you can't just stick an infected image in a banner ad and have it just appear anywhere the ad is shown, nope.
14:46
<&ToxicFrog>
Or, if that's too much work, just stick the image in an email and send it.
15:12 * ShellNinja notices ToxicFrog mentioned in Gemclod.
15:12
<&ToxicFrog>
whut
15:13
<@Azash>
How's the ThesisFrog?
15:13
<&ToxicFrog>
Did I actually get instantiated in that one?
15:13
<&ToxicFrog>
I defend on the 25th.
15:13
<@froztbyte>
ToxicFrog: AHHHAHAHHAHAHAHAHAHAHA
15:14
<@froztbyte>
you know
15:14
<@froztbyte>
just a few weeks ago I was thinking of that
15:14
<@froztbyte>
though I wanted to try it out on whatsapp
15:14
< ShellNinja>
ToxicFrog: http://gemclod.goondorfs.net/Update%20199/23-sc27s.png
15:14
<@froztbyte>
my internet at home blew up since then
15:14
<&ToxicFrog>
Aha, so I did
15:15
<@Azash>
ToxicFrog: Nice~ Is your thesis up for reading?
15:15
<@froztbyte>
so guys, here's the result of my last two days: http://elegua.za.net/~froztbyte/servertweaking/
15:15
<&ToxicFrog>
Azash: https://dl.dropbox.com/u/7531542/Thesis.pdf
15:16
<@Azash>
This looks pretty interesting, I'll make sure to give it a read :D
15:17 * TheWatcher eyes froztbyte
15:17
<@TheWatcher>
"no" indeed.
15:17
<@froztbyte>
hmm?
15:17
<@TheWatcher>
Just tried http://elegua.za.net/~froztbyte/
15:18
<@froztbyte>
oh
15:18
<@froztbyte>
:D
15:19
<@froztbyte>
I basically subscribe to the same principles I suggest to others, really
15:19
<@froztbyte>
"if you don't want people to dig around, don't let them."
15:20
<@TheWatcher>
Perfectly fine, I'm just amused at the "no"
15:20
<@froztbyte>
:)
15:20
<@froztbyte>
I need to fix up the 404 randomizer still
15:20
<@froztbyte>
I tried doing it with some CSS or JS or something
15:21
<@froztbyte>
but I just failed too much at webstuff to sling it together like so
15:21
<@froztbyte>
(you can see it by hitting any random URL, it'll 404 you)
15:21 YoltA [fgd@Nightstar-2ec4bc77.abo.wanadoo.fr] has joined #code
15:22
<@froztbyte>
http://elegua.za.net/404/randomizatron.js basically
15:23
<@froztbyte>
oh, document has go getElementByID
15:24
<@froztbyte>
no*
15:25
< Xon>
why the fuck is YoltA prattling unsolicited on about creationism via PM?
15:25
<@froztbyte>
looks like a spambot
15:25
<@froztbyte>
wanadoo has them often
15:25
<@froztbyte>
one of the opers here could implement banhammer
15:25
<@froztbyte>
RIGHTEOUS GZLINE OF DOOM
15:26
<@froztbyte>
yessssssssssss my 404'er works now
15:26
<@froztbyte>
you can all feel free to go check it out
15:26
<@froztbyte>
and suggest pictures
15:27
< Xon>
not ina good mood beause I just had a 4tb hitachi up & die on me after 4 months of solid use :(
15:28
< Xon>
and the case it was in is not full of hotswap bays
15:28
<@froztbyte>
my 404 page might improve your mood
15:29
<@TheWatcher>
... I got the Obama 'These are not the droids you are looking for' image, immediately followed by the "Regret: those were the droids you were looking for" image.
15:29
<@TheWatcher>
Are you /sure/ that's random :)
15:30
<@TheWatcher>
+?
15:30
<@froztbyte>
it's entirely up to your computer's not-so-random selection.
15:31 mode/#code [+b *!fgd@*.wanadoo.fr] by gnolam
15:31 YoltA was kicked from #code by gnolam [Off you go]
15:31
<@froztbyte>
boom
15:32
<@froztbyte>
also I just realized I have banhammer privs here
15:32
<@froztbyte>
derp.
15:32
< Xon>
froztbyte, the bit which is anoying is Hitachi don't offer world-wide warranties
15:33
< Xon>
cos the 4tb models only had very limited avaliablty in australia I had a bitch of a time finding the any. and it was still cheaper to buy them from the USA =p
15:34
<@TheWatcher>
Ship it back to someone in the US, get them to RMA it?
15:34
< Xon>
poking the store I bought it from to see if they ar willing todo that =p
15:41
< RichyB>
Did anyone else randomly get PRIVMSG'd by a random fucking weird old French dude?
15:41 * RichyB glances up.
15:41
< RichyB>
Looks like gnolam did. Thanks, gnolam. ?
15:42
<@TheWatcher>
Yeah, probably everyone did.
15:42
<@TheWatcher>
Also, 'weird French' is a tautology.
15:42
<@Azash>
I did as well
15:44
< ErikMesoy>
Me too
15:59
<&ToxicFrog>
I akilled it.
15:59
< Xon>
<3
16:00
<@froztbyte>
\o/
16:00
<@froztbyte>
soooooo
16:00
<@froztbyte>
without using php
16:00
<@froztbyte>
any suggestions on how to implement a server-side 301/302? :)
16:01
<@froztbyte>
server is nginx, I want to point a thing at /random/ and that should select from a random set of files in a directory
16:01
<@froztbyte>
I don't want a client to browse this directory themselves though
16:01
<@froztbyte>
(because that spoils the fun)
16:02
<@froztbyte>
a thing that listens on a socket there could work
16:02
<@froztbyte>
basic fifo thing, it gets a request and returns a 302?
16:03
<@TheWatcher>
Hm. On apache I'd use a rewrite rule with a RewriteMap and a randomised plain text map, but I don't know how to do the equivalent on nginx
16:03
<@froztbyte>
then the browser hits /404/randompic, that churns out a 302, browser follows for the content
16:03
<&ToxicFrog>
Without using PHP specifically, or without using server-side scripting at all?
16:03
<@froztbyte>
php specifically
16:04
<@froztbyte>
I just don't feel like adding php to the mix on my server :)
16:04
<@froztbyte>
that means fastcgi and whatnot, and I have basically no need of PHP
16:04
<@froztbyte>
http://httpd.apache.org/docs/current/rewrite/rewritemap.html is taking forever to load here
16:05 * froztbyte hits a cached version
16:06
< RichyB>
froztbyte: the *fastest* way of implementing a /random/ is to write an nginx extension for it in C. :)
16:07
< RichyB>
The 3rd fastest is to write an nginx extension for it in Lua.
16:07
<@froztbyte>
hahaha
16:07
<@froztbyte>
honestly, the fastest for me would be some fifo socket
16:07
<@froztbyte>
my C is rusty
16:07
< RichyB>
2nd fastest is probably to write a Varnish VCL for it, but that's C again.
16:08
<@froztbyte>
http://wiki.nginx.org/HttpMapModule could be extended to have a random target
16:08
< Xon>
froztbyte, you can use perl to generate random values for the nginx re-direct stuff to pick from
16:08
<@froztbyte>
nope.
16:08
< RichyB>
Mebbe. I would use the Lua support in nginx for this. It's pretty much exactly suited to what you're after.
16:08
<@froztbyte>
nope nope nope.
16:08
<@froztbyte>
perl is teh badses
16:08 * TheWatcher chuckles
16:08
<@froztbyte>
(honestly, fuck writing perl. that's for TheWatcher to do.)
16:09
< Xon>
http://wiki.nginx.org/HttpEchoModule
16:09
<@froztbyte>
RichyB: lua seems like it might be a quick and dirty hack, yeah
16:09
< Xon>
oh, that just has a hit for random
16:10
<@froztbyte>
that echomodule actually seems like it might be useful for general stuff
16:10
< Xon>
http://wiki.nginx.org/HttpSetMiscModule#set_random
16:10
< RichyB>
Lua is reasonably clean (at least ToxicFrog likes it, which is a fairly good sign) and you can get the LuaJIT 2.0 interpreter in (which is generally believed to be the fastest dynamic language in the world at the moment)
16:10
< Xon>
this module generates random numbers
16:10
< RichyB>
froztbyte: http://www.londonlua.org/scripting_nginx_with_lua/slides.html?full#Cover
16:10
<@froztbyte>
ta
16:11
<@froztbyte>
I shall do the honourable thing
16:11
<@froztbyte>
and make two implementations
16:11
< RichyB>
Heh.
16:11
< Xon>
RichyB, HttpSetMiscModule module + echo sounds like what you want
16:11
<@froztbyte>
httpset with random might be tricky
16:11
<@froztbyte>
I'll have to figure out how to reorder filenames then
16:12
<@froztbyte>
because if I do the nginx `try` thing, and have both `5.gif` and `5.jpg`, order of precedence in `try` will pick the first, always
16:14
< Xon>
only if it exists
16:14
<@froztbyte>
yes
16:14
<@froztbyte>
but it's the case of it existing that I'm trying to figure out
16:14
<@froztbyte>
but then again
16:14
< Xon>
so if both 5.jpg & 5.gif exist *what* do you want it todo?
16:14
<@froztbyte>
perhaps nginx doesn't need to serve up mime types based on extension
16:15
<@froztbyte>
Xon: dish both out with equal probability
16:16
< Xon>
don't think you can easily do that in the config files as you need to pre-load the directory list and randomly select based on that rather than generating a random filename which you assume exiss
16:16
< Xon>
exists*
16:17
< Xon>
alternatively; http://wiki.nginx.org/HttpRandomIndexModule
16:17
<@froztbyte>
yeah
16:17
<@froztbyte>
that's why my thoughts went to the socket approach
16:17
<@froztbyte>
the socket thing could just re-enumerate the directory list every now and then
16:18
< Xon>
I'ld just use php-fpm myself =p
16:18
<@froztbyte>
hmm, randomindex could maybe work
16:18
< Xon>
anyway crash time for me
16:18
<@froztbyte>
yeah, I don't wanna do that :D
16:18
<@froztbyte>
thanks for the links though
16:18
< Xon>
since I've got work tomorrow =\
16:19
<@froztbyte>
you led me to some corners of nginx I hadn't seen before
16:19 * froztbyte has not looked at the experimental/non-core modules much
16:19
<@froztbyte>
since the core is /so nice and capable/
16:19
< Xon>
yeah
16:20
< Xon>
nginx is so much nicer to work with than apache imo
16:20
<@froztbyte>
mmmmmmmmmmmm
16:20
<@froztbyte>
there's a memcache module
16:20
< Xon>
there are some servers at work I *wish* where using php-fpm. fuck you cpanel not supporting that yet out of the box
16:20
<@froztbyte>
Xon: yeah
16:21
< Xon>
we have a shared hostigng enviroment
16:21
<@froztbyte>
honestly, apache httpd comes with the kitchen sink, the kitchen, and the guys doing the kitchen renovation
16:21
<@froztbyte>
that's just a bit more than most people need.
16:21
< Xon>
cgi shell wrappers to seperate people off into different users is a horrible horrible thing
16:22
< Xon>
using cgi php is such a massive performance killer
16:22
<@froztbyte>
lulz
16:22
<@froztbyte>
that's basically php in a nutshell though
16:22
<@froztbyte>
shitty shit layered on shit with a side dish of shitcake
16:23
< Xon>
we could spend the time & configure it to use php-fpm and throw some dev hours to make cpanel work with it
16:23
<@froztbyte>
good god: http://agentzh.org/misc/slides/nginx-conf-scripting/nginx-conf-scripting.html#78
16:24
<@froztbyte>
#77 too
16:24
< Xon>
but that would blow away all the profits for that shared hosting enviroment for the next 5 years
16:26
< Xon>
froztbyte, that postgres one look awesome
16:41 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has joined #code
19:12 Alek [omegaboot@Nightstar-56dbba0f.in.comcast.net] has quit [[NS] Quit: "Beware the fury of a patient man." -- John Dryden]
19:24 Alek [omegaboot@Nightstar-56dbba0f.in.comcast.net] has joined #code
19:24 mode/#code [+o Alek] by ChanServ
19:43 KiMo is now known as Kindamoody|shower
19:59 Kindamoody|shower is now known as Kindamoody
20:18 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has quit [[NS] Quit: This computer has gone to sleep]
20:21 Kindamoody is now known as Kindamoody[zZz]
20:53
<@froztbyte>
http://elegua.za.net/404/imagerandom
20:53
<@froztbyte>
:)
20:53
<@froztbyte>
nginx -> twisted.web unholiness
20:57
<@froztbyte>
and http://elegua.za.net/404/ will Do The Right Thing
21:00
<@froztbyte>
lua implementation on hold since my Air and my phone's AP seem to not play along tonight
21:20 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
21:20 mode/#code [+qo Vornicus Vornicus] by ChanServ
21:25
<@Rhamphoryncus>
Fuck I hate javascript and its quiet fails
21:33 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has joined #code
21:52 mac [mac@Nightstar-fe8a1f12.il.comcast.net] has quit [[NS] Quit: This computer has gone to sleep]
21:59
<@RobinStamer>
What quiet fails?
22:00
<@RobinStamer>
It's quite noisy IMO.
22:01
<&jerith>
"Oh, you asked me to do a thing I don't understand. Oh well, I'll make something up."
22:01
<@TheWatcher>
:watman:
22:01
<&jerith>
I think that's getting better as JS becomes a more serious language.
22:09
<@Rhamphoryncus>
I eventually got it to log to the console. The hard part was finding WHICH console, as there's now at least two x_x
22:09
<@RobinStamer>
...
22:10
<@Rhamphoryncus>
That alone is a giant leap forward
22:10
<@RobinStamer>
I'm going to just lay blame on your toolkit.
22:10
<@Rhamphoryncus>
Firefox, web developer toolkit
22:13
<@RobinStamer>
I meant the JS one
22:14
<@RobinStamer>
Then again WDT might be fucked up. Dunno. I use Firebug myself.
22:15
<@Rhamphoryncus>
I'm just using greasemonkey to fix a page
22:15
<@Rhamphoryncus>
I did install firebug after console.log() didn't work, but it had no effect. I found the correct console to look at after
22:22
<@Rhamphoryncus>
Is there some sane way for regex to match the last number in a string? Bodging in a natural sort
22:26
<@Namegduf>
I think .*([0-9]*).*$
22:26
<@Namegduf>
Greediness should cause the first .* to match as much as possible.
22:27
<@Namegduf>
That * inside the brackets should be a +, really, to reject rather than match empty if there isn't a number.
22:27
<@Namegduf>
If you aren't looking for an integer you can complicate the thing in the brackets arbitrarily.
22:28 thalass [thalass@Nightstar-23c59d3f.bigpond.net.au] has joined #code
22:30
<@Rhamphoryncus>
I seem to flip between matching the first set of digits and matching only the very last digit (without the ones adjacent)
22:31
<@Namegduf>
Oh, right.
22:31
<@Namegduf>
Too greedy.
22:31
<@Rhamphoryncus>
aha, got it
22:31
<@Namegduf>
.*[^0-9]([0-9]*).*$
22:32
<@Rhamphoryncus>
.*\D(\d+)
22:32
<@Namegduf>
Yeah
22:32
<@Namegduf>
Will break on strings which are only numbers
22:32
<@Namegduf>
Possibly (.*\D)?(\d+).*$
22:33
<@Rhamphoryncus>
not an issue. It's a URL
22:33
<@Namegduf>
But if you don't need the last three characters because it already enforces matching against the whole thing that also works.
22:33
<@Tarinaky>
Joke: what programming language would you write a boyfriend in and why?
22:33
<@Namegduf>
Or already tends to, I suppose. Looking at it greediness might work here.
22:37
< RichyB>
Can anyone please do me a huge favour and tell me whether the source code of this page is comprehensible to human or beast? http://jsonp-api-demo.citizenspace.com/
22:38
< RichyB>
Ah, fuckit. I'll just get yelled at if it isn't. ^_^
22:40
< ErikMesoy>
Looks decent to me
22:40
< RichyB>
Thank you very much.
22:43
<@RobinStamer>
Tarinaky: VB, because I don't want one, so a non-functional one suits my needs.
22:43
<@RobinStamer>
Rhamphoryncus: /([0-9])[^0-9]*/
22:44
<@Rhamphoryncus>
RobinStamer: hmm yeah
22:45
<@Tarinaky>
RobinStamer: Lame :p
22:46
< ErikMesoy>
Well, obviously you should write a girlfriend in Lisp, so that she'd have lots of curves.
22:46
< ErikMesoy>
Dunno what you'd write a boyfriend in, though.
22:46
<@RobinStamer>
http://www.telusplanet.net/public/stonedan/source.txt <-- Bestest VB5 program
22:47
< RichyB>
Tarinaky: probably OpenCL or a hardware description language, because I'm almost willing to bet that the first working artificial intelligence will just be a simulation of a huge quantity of neurons - and be written in some parallelism-focussed language.
22:47
<@gnolam>
You just want massively parallel partners, you perv.
22:47
<@Tarinaky>
RichyB: You appear to be missing the concept 'joke'.
22:48
< RichyB>
I was starting from the "my romantic interests really ought to be sentient, and the problem statement mandates software"~
22:48
< RichyB>
gnolam: good point.
22:48
< RichyB>
OpenMPI it is! :)
22:48
<&McMartin>
"Microsoft suggests fix for iOS 6.1/Exchange problem: Block iPhone users"
22:48
< RichyB>
Tarinaky: well, if you've already delivered the punchline then I didn't get it.
22:49
<@Tarinaky>
I was hoping you'd supply them.
22:49
< ShellNinja>
Fun fact: In 2002, >1MB was 'crazy big' for a flash animation.
22:49
<@Tarinaky>
Along the format of <programming language> because <euphamism>
22:49
< RichyB>
Fine.
22:49
< ErikMesoy>
I supplied a punchline!
22:49
< RichyB>
Prolog, because No.
22:50
<@gnolam>
ShellNinja: no it wasn't.
22:50
< RichyB>
Visual Basic, because the whole situation is just going to wind up utterly GUI anyway.
22:50
<@Tarinaky>
Haskell, so he'd be fully functional?
22:50
<@Tarinaky>
(And anatomically correct~)
22:51
< ErikMesoy>
Tarinaky: Python, because the snake's the part you care about.
22:51
<@Tarinaky>
http://www.youtube.com/watch?v=3-F7Km_MhOQ
22:51
< RichyB>
Haskell98, so they could run on the WinHUGS implementation.
22:52
< ShellNinja>
gnolam: Maybe not in your country. :Y
22:52
< RichyB>
It was where I lived.
22:52
< RichyB>
Ah, dialup. ?
22:54 ErikMesoy is now known as ErikMesoy|sleep
22:57 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
23:02
<@gnolam>
In 2002 I moved from slow DSL to 10/10 Mbit. >_>
23:02
< RichyB>
Past-me wants to chew your kneecaps off for purely non-personal reasons.
23:05 Derakon [chriswei@31356A.8FA1FE.CF2CE9.D6CF77] has joined #code
23:05 mode/#code [+ao Derakon Derakon] by ChanServ
23:05
<&Derakon>
Here, #code, have some line noise.
23:05
<&Derakon>
ls | perl -ne 'chomp; /(.*-)(\d+)(\.\d+us.*)/; $c = sprintf("%03d", $2); `mv $_ $1$c$3`'
23:06
<&McMartin>
Whack-a-ding-hoy?
23:06
<&Derakon>
Zero-padding a number in the middle of a filename.
23:06
<&Derakon>
So that e.g. 1.0 isn't immediately followed by 10.0.
23:06
<&McMartin>
Right then
23:08
<@RobinStamer>
Perl is like the mastery interface of programming languages.
23:09
<&Derakon>
To be fair, most of the "line noise" aspect of this is the regex.
23:09
<&Derakon>
Followed by the single-character implicit variable names with $ glyphs.
23:09
<@RobinStamer>
Right
23:09
<@RobinStamer>
But what is chomp operating on?
23:10
<@RobinStamer>
It looks extraenuous. Except I know it isn't, becuase perl!
23:10
< RichyB>
And the fact that $_ can often be implicit.
23:10
<&Derakon>
Yeah, chomp operates on $_.
23:10
<@RobinStamer>
Likewise, the regex doesn't look like it's doing something either.
23:10
<&Derakon>
So does the regex, for that matter.
23:10
<&Derakon>
It could be equivalently written as "chomp $_; $_ =~ /.../"
23:11
<@RobinStamer>
Then $1, $2, and $3 are all just magically assigned.
23:12
<&Derakon>
(They're the groups from the regex)
23:12
< RichyB>
Oh. Once you remember that =~ causes $1 and friends to get filled out, it becomes easy.
23:12
<@RobinStamer>
That much I know
23:12
<@RobinStamer>
It's just... completely unclear from the context.
23:12
<@RobinStamer>
Hence perl is like a mastery interface.
23:13
< RichyB>
Ah, and the backticks are a quick way of writing a system(3) call?
23:13
<@RobinStamer>
Because it does so much stuff that requires you know its intricacies.
23:13
<@RobinStamer>
Yeah
23:13
<@RobinStamer>
Same as in bash and PHP
23:13
< RichyB>
It's possible to replace that with an explicit call to rename(2)?
23:13
<@RobinStamer>
Except in those you'd use them to assign the output of the system(3) call to a variable.
23:14
<@RobinStamer>
Likely.
23:14
<@RobinStamer>
Oh, other thing.
23:14
<@RobinStamer>
That program loops.
23:14
<@RobinStamer>
There's no visible loop
23:14
< RichyB>
-n
23:15
< RichyB>
I like looping with combinators instead anyway. :)
23:15
<@RobinStamer>
Combinators?
23:15
<&Derakon>
The -n flag is more or less equivalent to wrapping your script in "foreach (<STDIN>){...}"
23:16
< RichyB>
RobinStamer: functions that take other functions as parameters.
23:17
< RichyB>
e.g. rather than writing: newarray = []; for (i=0; i<oldarray.length; i++) { newarray.push(some_func(oldarray[i])); }, write: newarray = map(some_func, oldarray);
23:19
<&ToxicFrog>
"functions that take other functions as parameters" are higher-order functions.
23:19
<&ToxicFrog>
Combinators are a specific subtype of HOFs.
23:23
< RichyB>
What's the distinction?
23:27
<&ToxicFrog>
Combinators are HOFs that produce a result using only other combinators, and function application.
23:27
<&ToxicFrog>
HOFs are any function that takes functions as arguments or returns them as results, regardless of how those results are computed.
23:28
< RichyB>
Are you allowed to apply data constructors like (:) and []?
23:30
<&ToxicFrog>
Can you pass those in as functions?
23:31
<&ToxicFrog>
But yeah, in day to day use of e.g. parser combinator libraries you usually end up with something that is not strictly speaking a combinator once you flip over a few turtles.
23:31
< RichyB>
Maybe. (:) is a 2-arity function and [] is an 0-arity function.
23:32
<&ToxicFrog>
That said, map() is not a combinator by any commonly used definition of the word.
23:42
< RichyB>
If you allow fix, where fix f = f (f (f (f (f (f (f (f (f....
23:42
< RichyB>
or: fix f = let x = f x in x;
23:43
<&ToxicFrog>
Well
23:43
<&ToxicFrog>
There's nothing saying everything has to be combinators; you can pass non-combinator functions to combinators to get the ball rolling.
23:45
< RichyB>
@pl \fix null cons nil uncons -> (fix (\r f xs ->if null xs then nil else (uncurry (\x xs -> cons (f x) (r f xs))) . uncons $ xs))
23:45
< RichyB>
<lambdabot> (. ((. (flip . ((flip . (((.) . uncurry) .)) .) . ap . ((flip . ((.) .)) .) . (.))) . flip . (((.) . (.) . (.) . ap) .) . flip . (if' .))) . (.) . (.) . (.)
23:46
< RichyB>
? chuck in fix as above, (null [] = True; null _ = False), (cons a as = a:as), (nil = []) and just for the Hell of it, (uncons (a:as) = (a, as))
23:47 mac [mac@Nightstar-cb5f6d54.cc.il.us] has joined #code
23:54 Derakon [chriswei@31356A.8FA1FE.CF2CE9.D6CF77] has quit [[NS] Quit: leaving]
--- Log closed Thu Feb 14 00:00:54 2013
code logs -> 2013 -> Wed, 13 Feb 2013< code.20130212.log - code.20130214.log >

[ Latest log file ]