code logs -> 2009 -> Tue, 21 Apr 2009< code.20090420.log - code.20090422.log >
--- Log opened Tue Apr 21 00:00:03 2009
00:00 KBot is now known as KarmaBot
00:02
<@Derakon>
I wish the threads on Project Euler had more examples that were a) fast, and b) explained.
00:03
<@Derakon>
It seems like people either explain their slow approach, or demonstrate their fast approach, but I've yet to see an explained, fast approach. Fast code is also usually playing golf for some reason.
00:06
<@Derakon>
(Or written in assembly)
00:10
< simontwo>
the mathematical solutions are usually explanative.
00:10
<@Derakon>
Mm, true.
00:14
<@McMartin>
"playing golf"?
00:14
<@McMartin>
Oh. Going for fewest possible characters.
00:14
<@Derakon>
More or less, yeah.
00:14
<@Derakon>
Single-character variable names are a favorite.
00:14
<@McMartin>
Maybe they picked up bad habits from 8-bit BASIC, where that actually did speed up your code.
00:27 * Derakon hits up the Internet to check if a large number (2418524863) is prime, finds a site that says "Enter a number and the Prime Number Calculator will instantly tell you if it is a prime number or not." So, yeah, turns out it uses Javascript. I was hoping for a lookup table or something. ¬.¬
00:27
<@MyCatVerbs>
Derakon: bsdgames has a little C utility called "factor" :)
00:27
<@MyCatVerbs>
Oh look, it's prime.
00:28
<@Derakon>
Okay, good, so that bit isn't failing.
00:28
<@Derakon>
I guess my approach is flawed, then. Script's been running for quite some time now.
00:28
<@Derakon>
(PE #58)
00:28
< simontwo>
Derakon, did you solve the 57 problems before?
00:29
<@Derakon>
I've solved 47 problems thus far, 46 of which are before #58.
00:29
<@Derakon>
(#67 is the same as an earlier problem, so I solved it as soon as I solved said earlier problem)
00:29
< simontwo>
right
00:29
< simontwo>
I've only solved twenty-something.
00:30
<@MyCatVerbs>
simontwo: whatever happened to simons zero, one and (possibly) three?
00:30
< simontwo>
MyCatVerbs, two is my default nickname nowadays because usually the nickname 'simon' is taken on popular IRC networks.
00:31
< simontwo>
MyCatVerbs, and usually if you start competing with people about nicknames, they turn out to be romanian script kiddies who insistingly put down your server.
00:32
< simontwo>
so it was the quicker alternative to being creative with my nickname ;-)
00:34
<@MyCatVerbs>
So why use a finite cardinal?
00:34
<@Derakon>
Yeah, after running for ten and a half minutes, I've reached a ratio of .13355 while the desired ratio is .1. And my ratio's barely moving at all.
00:34
<@Derakon>
MCV: my question is, why not simply go by "two"?
00:39
<@MyCatVerbs>
Derakon: cuz someone else might have guessed that. :)
00:46 Vornicus [Vornicus@Admin.Nightstar.Net] has joined #code
00:46 mode/#code [+o Vornicus] by ChanServ
00:46 Vornicus [Vornicus@Admin.Nightstar.Net] has quit [Client exited]
00:46 Vornicus [Vornicus@Admin.Nightstar.Net] has joined #code
00:46 mode/#code [+o Vornicus] by ChanServ
01:30 GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has quit [Ping Timeout]
01:46
<@Derakon>
Bah. You can't change characters in Python strings by doing str[i] = 'c'.
01:46
<@Derakon>
I guess because they don't want to check the length of the string you're trying to shove in there.
01:49
<@MyCatVerbs>
IIRC, Python strings are immutable.
01:49
<@McMartin>
No, it's to ensure strings are immutable and thus suitable for hash keys.
02:29 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: Z?]
02:50 SmithKurosaki [~jess@Nightstar-24858.acanac.net] has quit [Client exited]
03:06 * ToxicFrog strangles linux md
03:06
<@ToxicFrog>
Create array with internal write-intent bitmap.
03:07
<@ToxicFrog>
Yank one drive.
03:07
<@ToxicFrog>
PLug drive back in and mdadm --re-add
03:07
<@ToxicFrog>
And it does a full rebuild >.<
03:18
<@McMartin>
md?
03:35
<@Derakon>
I just realized that I've been writing "reduce(add, list, 0)" instead of "sum(list)". ¬.¬
03:45 Bob_Work [c6b3e33b@Nightstar-14595.mibbit.com] has joined #Code
03:46
< Bob_Work>
Need help with a C++ problem. Pasted to pastebin, but can't put that link here without voice.
03:46
< Bob_Work>
Basically, I'm program is crashing AFTER it completes.
03:46
< Bob_Work>
I'm = my.
03:46
<@Derakon>
What does the program do?
03:47
<@Derakon>
It sounds like you aren't cleaning up shop after a library or something along those lines.
03:47
< Bob_Work>
Creates 5 arrays for a bank account class, lets you fill them in, and then outputs the account info.
03:48
< Bob_Work>
So I should probably run the deconstructor on the classes and THEN exit?
03:48
<@Derakon>
Give it a shot, yeah.
03:48
< Bob_Work>
Damn. Was hoping to get away with not including them.
03:48
<@Derakon>
Heh.
03:51
<@McMartin>
Hold it
03:51
<@McMartin>
C++ destructs automatically.
03:51 mode/#code [+v Bob_Work] by McMartin
03:51
<@McMartin>
Post tha tlink
03:52
<@McMartin>
I have a suspicion even without
03:52
<+Bob_Work>
http://paste.ubuntu.com/155095/
03:52
<@Derakon>
McM: my only knowledge of stuff crashing on conclusion is from failing to unload e.g. SDL classes. *shrug*
03:52
<@McMartin>
Those are structs.
03:52
<+Bob_Work>
Actually, including a destructor in the class removed the error.
03:53 * Bob_Work shrugs.
03:53 * Bob_Work gives Derakon 2 internets.
03:53
<@Derakon>
Man, inflation is rampant. :p
03:53
<@McMartin>
Oh. Adding to
03:54
<@McMartin>
There are very rare occasions where explicitly calling the destructor is a good idea
03:54
<@McMartin>
THis is not one of them
03:54
<@McMartin>
The "=0" in the local variable declaration is kind of unnerving as well; what's the intent of that?
03:55
<+Bob_Work>
Which part? The constructors?
03:55
<@McMartin>
C++ is supposed to generate a default destructor for you behind your back, and the only way that would go wrong is if there were inheritance involved. =/
03:55
<@McMartin>
...
03:55
<@McMartin>
"Accounts Bank[4]=0"
03:55
<@McMartin>
"for (int x = 0; x < 5; ++x)
03:55
<@McMartin>
That's bad
03:55
<@Derakon>
...yeah,
03:56
<@McMartin>
You're corrupting your stack.
03:56
<@McMartin>
Thus, crash on return from main
03:56
<@Derakon>
"Accounts Bank[4]" creates enough memory for 4 Accounts instances, and returns a pointer to that memory.
03:56
<@Derakon>
You think replace that pointer with 0.
03:56
<+Bob_Work>
Ah. The Bank[4]=0 was the only way I knew how to zero out the initial values of the arrays.
03:56
<@McMartin>
You don't want them zeroed out
03:56
<@Derakon>
You want them nullified.
03:56
<+Bob_Work>
the For loops I've always been taught were fine the way I wrote them.
03:56
<@McMartin>
You want the default constructor to be called for its elements.
03:56
<@Derakon>
Or that.
03:56
<+Bob_Work>
Ok.
03:56
<@McMartin>
The for loop is fine. It goes from 0 to 4, inclusive.
03:57
<@McMartin>
However, Bank is only well-defined from 0 to 3.
03:57
<+Bob_Work>
Ah.
03:57
<+Bob_Work>
Ok, so I should replace Accounts Bank[4]=0 with "Accounts Bank[4]" then?
03:58
<@McMartin>
Derakon: There's no allocation occuring in "Accounts Bank[4]". It's part of the stack frame.
03:58
<@McMartin>
No, you should replace it with "Accounts Bank[5]".
03:58
<+Bob_Work>
Ok, I thought c++ was zero based in it's arrays.
03:58
<@McMartin>
It is.
03:58
<@Derakon>
McM: really? It's been a while since I worked in C++. Clearly I need a refresher on doing my own damn memory management.
03:58
<+Bob_Work>
Then what, if anything, is Bank[0]?
03:58
<@McMartin>
The first element.
03:58
<@Derakon>
The first entry in the array Bank.
03:59
<+Bob_Work>
Riiiiiiggggght.
03:59
<@McMartin>
When declaring an array, the argument between the brackets is the size.
03:59
<@McMartin>
Not the last valid index.
03:59
<@McMartin>
0, 1, 2, 3, 4. Five elements.
03:59
<@McMartin>
x = 0; x < 5; x++.
03:59
<+Bob_Work>
Yeah, five elements is all I need.
03:59
<@McMartin>
With Bank[4], that's four elements, which is 0, 1, 2, 3.
03:59
<+Bob_Work>
So I don't understand why you say I'd need to put in Bank[5] and get a 6th element.
03:59
<@McMartin>
You don't.
03:59
<+Bob_Work>
Oh.
03:59
<@McMartin>
That's what gives you the fifth.
04:00
<+Bob_Work>
*forhead smack*
04:00
<@Derakon>
Heh.
04:00
<@McMartin>
As written, you write the first four, then scribble over random memory on the fifth.
04:00
<+Bob_Work>
That explains it.
04:00
<@McMartin>
Probably the return address from main(), which would be why it crashes on program exit.
04:00
<+Bob_Work>
Dammit. Newb mistake. Sorry.
04:00
<@McMartin>
Also, beware of this kind of array when doing more C++-y things later
04:01
<@McMartin>
This area is Full Of Spiders (tm) and the sooner you can shift over to std::vector<>, the better off you're likely to be.
04:01
<@Derakon>
Agreed.
04:01
<+Bob_Work>
heh
04:02
<@McMartin>
(Or at least boost::shared_array<>, but that's kind of the worst of all worlds)
04:03
<+Bob_Work>
I'm still trying to wrap my mind around the arithmatic operators.
04:03
<+Bob_Work>
I mean, they're basically functions, no?
04:03
<@Derakon>
Yep.
04:03
<@Derakon>
They're functions with an unusual argument-passing syntax.
04:04
<+Bob_Work>
Ah.
04:05
<+Bob_Work>
But I don't see a difference between operator+ and operator-, if I code the same logic in each.
04:05
<@McMartin>
There won't be.
04:05
<@McMartin>
Generally speaking, it's impolite to do this.
04:05
<@Derakon>
Yeah.
04:05 * Bob_Work nods
04:05 * McMartin is not a fan of operator overloading in general, with a tiny, tiny number of exceptions.
04:05
<@Derakon>
C++ gives you a lot of power to make your code make no goddamn sense.
04:06
<+Bob_Work>
hehe
04:06
<+Bob_Work>
Ok, so I'm not nuts. They're basically just extra powerful functions with odd names to confuse the hell out of us beginners. Gotcha.
04:06
<@Derakon>
Operator overloading can be handy for things like making your own vector classes (that is, n-dimensional points, not std::vector).
04:06
<@Derakon>
They are functions, nothing more, nothing less.
04:07
<@Derakon>
You could make Account::operator+ spit out the first 100 lines of Pascal's triangle.
04:07
<+Bob_Work>
heh
04:07
<@Derakon>
(And completely ignore the arguments)
04:07
<@McMartin>
More seriously, you could write Account::operator>>(ostream&) and have something that will write a representation out to any file-like object.
04:08
<@Derakon>
And that's quite handy!
04:08
<@McMartin>
Er, wait, that's backwards.
04:08
<+Bob_Work>
McMartin: That's the next assignment.
04:08
<+Bob_Work>
Writing account info to files, then accessing it to the files.
04:08
<+Bob_Work>
err...FROM the files.
04:08
<@McMartin>
You actually write it the other way around, so that it's a global-scope operator<<(ostream&, Account)
04:10
<@McMartin>
That's what's going on with the std::cout << "Hello world!" << std::endl stuff.
04:10
<+Bob_Work>
Gotcha.
04:11
<@McMartin>
ISTR there being some compiler-specific voodoo necessary to make those link properly but that may have gotten dealt with in a standard manner at some point.
04:19
<@Derakon>
I don't think I did anything particularly special for Niobium when I added operator<< support.
04:19
<@Derakon>
Just declared a global function with the signature "ostream& operator<<(ostream& stream, const Coord& src);"
04:47
<@Derakon>
Guten taiga, Ros.
04:47
<@Derakon>
Mischan.
04:53
<@McMartin>
Hm. Yes, that's not templated, so that should be fine, now that I looka t it.
05:22
<@Reiver>
So, McM
05:23
<@Reiver>
I have a simple Haskell question that is tripping my brainmeats.
05:23
<@Reiver>
This is rathre frustrating.
05:23
<@Reiver>
Take a list [a], split it into two sublists half as long. So [1,2,3,4,5,6] ends up [1,2,3] [4,5,6]
05:23
<@Reiver>
Every time I think of it it ends up just being a for loop that runs length/2 times. This doesn't feel right.
05:28 Doctor_Nick [~nick@Nightstar-12867.tampfl.fios.verizon.net] has quit [Ping Timeout]
05:28 Doctor_Nick [~nick@Nightstar-12867.tampfl.fios.verizon.net] has joined #code
05:28 mode/#code [+o Doctor_Nick] by ChanServ
05:29 * Bob_Work eyes that.
05:30
<+Bob_Work>
nm, I'll butt out.
05:31
<@Reiver>
Bob: This is functional programming; I'm pretty sure a loop is Naughty.
05:31
<+Bob_Work>
Gotcha.
05:32
<+Bob_Work>
I'm not versed in Haskell, and I wanted to ask you questions about it, but felt it would lead you astray from your pondering.
05:33
<@Reiver>
You could ask, but I'm not the one to be asking
05:33
<@Reiver>
My head is all asplodey from it as is.
05:33
<+Bob_Work>
heh.
05:33
<@McMartin>
Hum.
05:33
<@McMartin>
I don't see any way of doing that that doesn't traverse the list twice, because you don't know how long the list is until you traverse every element.
05:34
<@Reiver>
Okay.
05:34
<@Reiver>
That's okay, I think.
05:34
<@Reiver>
My other bit that worried me a little was how to get the length of the list without it recursively halving the bits.
05:34
<@Vornicus>
Can you start at the front and the end at the same time?
05:34
<@Reiver>
Which doesn't entirely make sense, I suspect, but
05:35
<@Reiver>
Vorn: Very doubtful.
05:35
<@Reiver>
I'm... probably overthinking this.
05:35
<+Bob_Work>
Not unless you know where the end is, which leads you right back to square one, right?
05:35
<@McMartin>
Reiver: Use a different function.
05:35
<@McMartin>
Or, you know, length. In the Prelude.
05:36
<@McMartin>
Just do it once though, since it's O(n)
05:36
<@Reiver>
So... hum
05:36
<@McMartin>
So, I know how *I'd* solve this
05:37
<@Vornicus>
I can name this tune in one pass, given lst.append() and lst.pop(0)
05:37
<@Reiver>
split (x:xs) = [ newlist ++ x | 1..(length (xs) / 2) ] ?
05:38
<@Reiver>
(With type and [] lines as well, but those are hopefully obvious)
05:38
<@McMartin>
Augh
05:38
<@Reiver>
... well, no. Gah.
05:38
<@McMartin>
++ is to be avoided as much as plausible
05:38
<@Reiver>
Better to x:newlist and then reverse(newlist) afterwards?
05:38
<@Reiver>
>.>
05:38
<@McMartin>
Yeah, but you don't even need that because you can use take
05:39
<@McMartin>
Which does it for you
05:39
<@Reiver>
whut
05:39
<@McMartin>
Try "take 3 [1..10]"
05:39 * Reiver stares.
05:39 * Reiver tries.
05:39
<@McMartin>
This is even more awesome with infinite lists.
05:40
<@McMartin>
me had an infinite list of Fibonnacci numbers and could get lists of any length of fibonacci numbers with "take n fibs"
05:42 * Reiver stares.
05:43
<@Reiver>
... okay, huh.
05:44
<@Reiver>
I wonder. It doesn't say I can't use take...~
05:44
<@Reiver>
(I'm working through the book trying to Learn Stuff.)
05:44
<@Reiver>
(Because a lot of this isn't gelling in my head, so I'm being a good boy~)
05:45 You're now known as TheWatcher
05:46
<@Reiver>
So, um
05:47
<@Reiver>
if take grants you the first half of the list, how do I get the /second/ half of the list?
05:49
<@Reiver>
... and that's just funky in itself. WTF?
05:49
<@Reiver>
halve :: [a] -> ([a],[a])
05:49
<@Reiver>
halve [] = ([],[])
05:49
<@Reiver>
*** Expected type : [a] -> ([a],[a])
05:49
<@Reiver>
*** Inferred type : [[a]] -> ([[a]],[[a]])
06:03 Doctor_Nick [~nick@Nightstar-12867.tampfl.fios.verizon.net] has quit [Operation timed out]
06:05
<@Reiver>
Instance of RealFrac Int required for definition of halve
06:05
<@Reiver>
Man, this simple code does not like me~
06:05 Syloqs-AFH [Syloq@ServicesAdmin.Nightstar.Net] has quit [Connection reset by peer]
06:12
<@Reiver>
hm. I see.
06:12
<@Reiver>
So Haskell integers do not simply truncate.
06:13
<@Reiver>
They throw an error. Le sigh.
06:13 * Reiver goes hunting for a term for "3 fits into 10 3 times" - the value before the modulus.
06:15
<+Bob_Work>
Closest thing I've got (and it ain't much) is "integer division"
06:16
<@Reiver>
Yeah. *hunts for Haskell to see if it's got a function for that*
06:16
<+Bob_Work>
<---probably wrong and way off course.
06:16
<@Derakon>
There's no floor function?
06:16
<@Derakon>
Or truncate, or int(), or some equivalent?
06:16
<@Reiver>
Derakon: I'm trying to floor, but it's throwing a type error before it gets there.
06:16
<@Derakon>
Not truncating by default is the Right Thing to do unless you're a conservative programmer used to the Old Ways.
06:17
<@Derakon>
What's the type it's complaining about?
06:17
<@Reiver>
Because I have a function that explicitly returns an Integer. I'm then trying to divide it by 2.
06:17
<@Reiver>
So it comes up with the above error - 'Instance of RealFrac Int required for definition of halve'
06:17
<@Reiver>
Which I am assuming is it complaining that it needs to handle fractions to allow the math to continue.
06:17
<@Derakon>
Okay, my brain's not in the required shape to start deciphering that.
06:18
<@Reiver>
Neither, but I want it to work anyway >.<
06:28 Doctor_Nick [~nick@Nightstar-12867.tampfl.fios.verizon.net] has joined #code
06:28 mode/#code [+o Doctor_Nick] by ChanServ
06:31 Derakon is now known as Derakon[AFK]
06:32 Netsplit DeepThought.NY.US.Nightstar.Net <-> Blargh.CA.US.Nightstar.Net quits: Namegduf, @Vornicus, KarmaBot, EvilDarkLord, C_tiger, Alek, @Reiver, PinkFreud
06:33 Netsplit over, joins: Namegduf
06:33 mode/#code [+o Vornicus] by ChanServ
06:33 Netsplit over, joins: Vornicus
06:36 C_tiger [~cheng@Nightstar-5625.hsd1.ca.comcast.net] has joined #code
06:36 Reiver [~reaverta@Admin.Nightstar.Net] has joined #code
06:36 NSGuest-3153 [~karma.bot@Nightstar-29122.neoplus.adsl.tpnet.pl] has joined #code
06:36 Alek [~omegaboot@Nightstar-5734.dsl.emhril.sbcglobal.net] has joined #code
06:36 PinkFreud [~WhyNot@ServicesAdmin.Nightstar.Net] has joined #code
06:37 C_tiger is now known as NSGuest-598
06:38 NSGuest-3153 is now known as KarmaBot
06:39 Netsplit DeepThought.NY.US.Nightstar.Net <-> Blargh.CA.US.Nightstar.Net quits: KarmaBot, NSGuest-598, Alek, PinkFreud, Reiver
06:40 KBot [AnnoDomini@Nightstar-29122.neoplus.adsl.tpnet.pl] has joined #Code
06:40 Netsplit over, joins: Alek, Reiver
06:40 mode/#code [+o Reiver] by ChanServ
06:41 Netsplit over, joins: PinkFreud
06:43 KBot is now known as KarmaBot
06:46 EvilDarkLord [~jjlehto3@Nightstar-9591.cs.hut.fi] has joined #code
06:47
<@McMartin>
Reiver: div 10 3 = 3
06:48 EvilDarkLord is now known as NSGuest-604
06:48
<@McMartin>
Also, take's counterpart is "drop"
06:48
<@McMartin>
length, dive, take, and drop should let you write that function you wanted outright.
06:48 C_tiger [~cheng@Nightstar-5625.hsd1.ca.comcast.net] has joined #code
06:48 mode/#code [+o C_tiger] by ChanServ
06:48
<@McMartin>
Er, div, not dive
06:53
<@TheWatcher>
... the submarine operator is born ¬¬
06:54
< Namegduf>
...more languages need a submarine operator.
06:56
<@Reiver>
aha, danke kindly.
06:56
<@Reiver>
Turtles all the way down?
06:57 Vornicus [Vornicus@Admin.Nightstar.Net] has quit [Quit: ]
06:57 Vornicus [Vornicus@Admin.Nightstar.Net] has joined #code
06:57 mode/#code [+o Vornicus] by ChanServ
06:58
<@Reiver>
What was the format for that, uh, lambda calculus again?
06:58
<@Reiver>
I want to turn length(xs) `div` 2 into something smaller.
06:59 AnnoDomini [~farkoff@Nightstar-29122.neoplus.adsl.tpnet.pl] has joined #Code
06:59 mode/#code [+o AnnoDomini] by ChanServ
07:00
<@Reiver>
eh, "where hl = length xs `div` 2" works better anyway~
07:00
<@Reiver>
...oh god, trees.
07:00
<@Reiver>
I have to write a sorting algorathm, I just know it involves trees ;_;
07:01
<@AnnoDomini>
That's not how you spell algorithm.
07:01
<@Reiver>
You're entirely right.
07:17 Vornicus [Vornicus@Admin.Nightstar.Net] has quit [Quit: ]
07:21 * Bob_Work kicks his brain with coffee
07:22
<+Bob_Work>
A comparison between two completely different account numbers is returning a True value when it should be false.
07:29
<@ToxicFrog>
...what language?
07:32 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code
07:32 mode/#code [+o gnolam] by ChanServ
07:37
<+Bob_Work>
c++.
07:37
<+Bob_Work>
It's a logic problem, I know....just having a bitch of a time walking through it.
08:09 You're now known as TheWatcher[afk]
08:24 Namegduf [namegduf@86.25.56.ns-4159] has quit [Quit: Be back in the evening.]
09:57 You're now known as TheWatcher
10:15 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has quit [Quit: Rhamphoryncus]
11:02 Bob_Work [c6b3e33b@Nightstar-14595.mibbit.com] has quit [Quit: http://www.mibbit.com ajax IRC Client]
13:29 NSGuest-604 is now known as EvilDarkLord
14:55 You're now known as TheWatcher[afk]
16:04 Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code
16:05 Syloqs_AFH is now known as Syloqs-AFH
16:53 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Quit: Rebooting Orias to check SATA BIOS configuration]
17:13 Namegduf [namegduf@86.25.56.ns-4159] has joined #code
--- Log closed Tue Apr 21 17:14:40 2009
--- Log opened Tue Apr 21 17:15:14 2009
17:15 TheWatcher[afk] [~chris@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #code
17:15 Irssi: #code: Total of 14 nicks [3 ops, 0 halfops, 0 voices, 11 normal]
17:15 Tarinaky [~Tarinaky@88.83.110.ns-10776] has joined #code
17:16 Irssi: Join to #code was synced in 49 secs
17:17 Syloq [Syloq@Admin.Nightstar.Net] has joined #Code
17:17 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code
17:17 mode/#code [-o AnnoDomini] by ChanServ
17:17 mode/#code [-o C_tiger] by ChanServ
17:17 mode/#code [-o Reiver] by ChanServ
17:17 mode/#code [+o gnolam] by ChanServ
17:17 Syloq is now known as Syloqs-AFH
17:18 C_tiger is now known as NSGuest-10
17:18 EvilDarkLord is now known as NSGuest-11
17:18 Tarinaky is now known as NSGuest-32
17:18 Consul is now known as NSGuest-35
17:18 MyCatVerbs is now known as NSGuest-36
17:19 Doctor_Nick [~nick@Nightstar-12867.tampfl.fios.verizon.net] has joined #code
17:19 mode/#code [+o Doctor_Nick] by ChanServ
17:20 McMartin [~mcmartin@Nightstar-19418.dsl.pltn13.sbcglobal.net] has joined #code
17:21 mode/#code [+o McMartin] by ChanServ
17:37 NSGuest-10 [~cheng@Nightstar-5625.hsd1.ca.comcast.net] has quit [Operation timed out]
17:42 C_tiger [~cheng@Nightstar-5625.hsd1.ca.comcast.net] has joined #code
17:42 mode/#code [+o C_tiger] by ChanServ
17:54 Namegduf [namegduf@86.25.56.ns-4159] has quit [Quit: leaving]
17:56 Namegduf [namegduf@86.25.56.ns-4159] has joined #code
18:55 You're now known as TheWatcher
18:57 somnolence [~somnolenc@Nightstar-3790.hsd1.ca.comcast.net] has quit [Ping Timeout]
19:00 BadlyDisguisedAttilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
19:02
< BadlyDisguisedAttilla>
Man, I could go for some help about now (and about coding to boot!) namely i'm trying to imagine what sort of process would be necessary to (as far as I know it involves triple nested for loops?) basically project a group of vectors in all three cartesian co-ordinates, without it necessarily being simultaneous.
19:06
< BadlyDisguisedAttilla>
You know what I mean, right?
19:08
< BadlyDisguisedAttilla>
(More confusing they are in fact four-dimensional vectors, the additional dimension is Charge, but that doesn't change just it has to remain constant with the individually projected (or whatever the word is) points
19:11
< BadlyDisguisedAttilla>
waaaait
19:30
<@gnolam>
Err... explain.
19:31
<@gnolam>
I don't get what you're trying to do.
19:31 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has joined #code
19:33
< BadlyDisguisedAttilla>
Basically I have a lattice of co-ordinates, I am trying to copy them at discrete distances away from the original but in all directions and all combinations thereof.
19:33
< BadlyDisguisedAttilla>
Basically expanding the lattice outwards.
19:37 Derakon [~Derakon@Nightstar-4912.hsd1.ca.comcast.net] has joined #code
19:37 mode/#code [+o Derakon] by ChanServ
19:37
<@gnolam>
So basically you just want to multiply all coordinates by a constant lambda? :)
19:39
<@gnolam>
Or what?
19:39 BadlyDisguisedAttilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer]
19:40 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
19:40 mode/#code [+o Attilla] by ChanServ
19:42
<@Attilla>
Not quite, but maybe. Basically the combinations are not simply all one Distance away, but multiple Distances away.
19:42
<@Attilla>
I'm not sure what you mean, really.
19:48
<@gnolam>
It sounded like you had some set of points in space, and you wanted the entire structure to expand outwards. Which can be done by simply multiplying each vector by a constant.
19:48
<@Attilla>
Ah, but I want all combinations of this expansion.
19:48
<@gnolam>
But I have the feeling I'm still not getting what you want to do.
19:48
<@gnolam>
All combinations?
19:49
<@Attilla>
As in each combination of each point along the way from the starting position and the end point, of each dimension
19:53
<@gnolam>
Each point separately and each dimension separately?
19:53
<@gnolam>
Brb, food run.
19:54
<@Attilla>
Just the dimensions, the points have to stay in their lattice
19:54
<@Attilla>
(Because this is the model of a crystalline structure, you see)
20:06 * TheWatcher haaaates on php
20:06
< TheWatcher>
The writers of this language should be taken out and hung by their funes, damnit.
20:07
<@McMartin>
Figgin roasting's too good for them.
20:08
<@McMartin>
What's the proximate cause of this this time?
20:08
< TheWatcher>
I'm disentangling the session code used by phpbb3 so I can piggyback on it for something
20:10
<@Derakon>
So is that PHPBB3's fault or PHP's fault?
20:10
< TheWatcher>
As far as actual code quality is concerned, it's better than most of phpbb3 (in that it actually has /comments/, written in english, by someone who appears to have it as a first or second language, that actually make sense and agree with the code)
20:10
<@Derakon>
Heh.
20:10
< TheWatcher>
but the stuff the code is doing is rampant php wankery in places
20:15 NSGuest-32 is now known as Tarinaky
20:21
<@gnolam>
Attilla: Explain what you're trying to do and why instead. :)
20:38
<@Attilla>
Well I basically have this co-ordinate model of an NaCl crystal (albeit only the unique parts, so about a quarter of it), and am trying to create a larger lattice from that up to a cutoff of my choice outways from the centre, so it's made of combinations of that unique component, largely at discrete distances away, this is being computed and all so I need to know all their co-ordinates whilst pres
20:38
<@Attilla>
erving each of the ions relative charges
20:39 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
20:39 mode/#code [+o ToxicFrog] by ChanServ
20:40
<@Attilla>
I know the base which i'm trying to expand this from, my previous misguided attempts basically lead to me making a chain, and although the results from calculating all the distances and stuff (the latter part doesn't matter to this) worked, I need it done in all dimensions and in all combinations to make it so that there is a sphere of these ions about, or roughly so, they are held within their re
20:40
<@Attilla>
lative lattice positions obviously.
20:41
<@Attilla>
I think I have most of it but my problem I think is that i'm not grabbing the output data right, I just seem to grab the data as if they all move through each dimension simultaneously, which is annoying, so I think I need to rethink how I handle the arrays involved.
20:50
<@ToxicFrog>
ben@orias:/etc$ cat /proc/mdstat
20:50
<@ToxicFrog>
Personalities : [raid6] [raid5] [raid4] [raid0] [linear] [raid1]
20:50
<@ToxicFrog>
md0 : active raid5 sda2[3] sdb2[0] sdc2[2] sdd2[1]
20:50
<@ToxicFrog>
1463135744 blocks super 0.91 level 5, 64k chunk, algorithm 2 [4/4] [UUUU]
20:50
<@ToxicFrog>
[>....................] reshape = 1.3% (9694848/731567872) finish=985.6min speed=12203K/sec
20:50
<@ToxicFrog>
Yay!
20:54
<@ToxicFrog>
Of course, it won't finish until sometime tomorrow morning, but once it does I'm just a resize2fs away from having another 750GB.
21:02
<@Derakon>
And here I am with a single 250GB drive.
21:07 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout]
21:09
<@ToxicFrog>
Derakon: ben@orias:~$ df -h
21:09
<@ToxicFrog>
Filesystem Size Used Avail Use% Mounted on
21:09
<@ToxicFrog>
/dev/md0 1.4T 1.2T 173G 87% /
21:09
<@ToxicFrog>
I've actually run out of space on that array a few times.
21:10
<@McMartin>
What are you storing on it?
21:10
<@ToxicFrog>
Everything.
21:10
< TheWatcher>
good compression you have there, then
21:11
<@McMartin>
90% of the internet compresses to four characters~
21:11
<@ToxicFrog>
Which is to say: all of my development stuff, homework, documents, photos, etc; disc images of most of my games; all of my music; all of my videos; all of my local site mirrors; all of my ebooks; and probably some stuff I'm forgetting.
21:11
<@ToxicFrog>
Oh, and disk images of Durandal's C: for use when windows starts getting musty.
21:12
<@ToxicFrog>
...and install media images for three flavours of windows and something like ten flavours of linux.
21:12
<@ToxicFrog>
You get the idea.
21:14
<@ToxicFrog>
Anyways, it's a 3x750GB RAID5 and I'm adding another drive to it.
21:15
<@ToxicFrog>
Annoyingly, this turned out to require a reboot because it wouldn't hot-detect the drive for some reason >.<
21:18
<@McMartin>
Heh
21:18
<@McMartin>
Incidentally, ISTR you using VirtualBox. What's the host OS if/when you do, and have you gotten 2.2 to work?
21:19
<@McMartin>
The dev list is full of AUGH DFW but I haven't seen any trouble. But then, I'm running it on Windows, so.
21:24 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
21:24 mode/#code [+o Attilla] by ChanServ
21:27
<@ToxicFrog>
Host OS: OpenSUSE 11.0 on Leela, WinXP SP2 on Durandal
21:28
<@ToxicFrog>
Version: 2.1.0 on Leela, and it looks like Durandal is still using 1.6.0
21:28
<@ToxicFrog>
I haven't tried 2.2 on anything yet.
21:28
<@McMartin>
Fair enough.
21:29
<@McMartin>
(2.2 apparently has OpenGL forwarding on Linux guests for delicious Compiz, but I haven't tested this properly yet)
21:29
<@ToxicFrog>
I still need to figure out how to get USB forwarding working in the linux version for people who aren't root :(
21:30
<@McMartin>
>_< there's no equivalent to the VBoxSVC.exe/authd?
21:32
<@ToxicFrog>
I have no idea
21:32
<@Attilla>
Hmm, I have rolled... 7pm on a Thursday.
21:32
<@ToxicFrog>
I get "Could not load the Host USB Proxy Service (VERR_FILE_NOT_FOUND). The service might be not installed on the host computer."
21:38
<@McMartin>
Hm. I wonder if it's like the Mac version, where there' VBoxDrv.kext and also an independent VBoxUSB.kext
21:38
<@ToxicFrog>
Could be
21:39
<@McMartin>
But if it *does* work for root, that implies it's there, so =/
21:48 Netsplit Blargh.CA.US.Nightstar.Net <-> DeepThought.NY.US.Nightstar.Net quits: Namegduf, @Derakon, Syloqs-AFH, @C_tiger, @gnolam, @Attilla, @McMartin, @ToxicFrog
21:59 NSGuest-36 is now known as MyCatVerbs
22:13 Netsplit over, joins: Syloqs-AFH, gnolam
22:13 Netsplit over, joins: Derakon, McMartin, C_tiger, Namegduf, ToxicFrog, Attilla
22:13 mode/#code [+o Reiver] by ChanServ
22:13 mode/#code [+o AnnoDomini] by ChanServ
22:13 mode/#code [+o Doctor_Nick] by ChanServ
22:14 MyCatVerbs is now known as NSGuest-53
22:27 NSGuest-35 [~consul@Nightstar-1864.dsl.sfldmi.ameritech.net] has quit [Quit: Leaving]
22:35 Consul [~consul@Nightstar-1864.dsl.sfldmi.ameritech.net] has joined #code
22:35 mode/#code [+o Consul] by ChanServ
22:39 NSGuest-53 is now known as MyCatVerbs
23:34 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Quit: <Insert Humorous and/or serious exit message here>]
23:51 Reiv [~82d94c4d@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #Code
23:57 KBot [~karma.bot@Nightstar-29187.neoplus.adsl.tpnet.pl] has joined #Code
23:58 KarmaBot [AnnoDomini@Nightstar-29122.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
23:58 AnnoDomini [~farkoff@Nightstar-29122.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
--- Log closed Wed Apr 22 00:00:09 2009
code logs -> 2009 -> Tue, 21 Apr 2009< code.20090420.log - code.20090422.log >