code logs -> 2014 -> Wed, 16 Jul 2014< code.20140715.log - code.20140717.log >
--- Log opened Wed Jul 16 00:00:03 2014
00:28 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
00:29 mode/#code [+qo Vornicus Vornicus] by ChanServ
00:29 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
00:38 Turaiel is now known as Turaiel[Offline]
01:15 Orth_ [orthianz@Nightstar-s5d.ntf.224.119.IP] has joined #code
01:15 Orthia [orthianz@Nightstar-mvf.9c1.224.119.IP] has quit [Ping timeout: 121 seconds]
01:19 Orth_ is now known as Orthia
01:19 mode/#code [+o Orthia] by ChanServ
02:00 JackKnife [Z@Nightstar-ajg.slu.72.87.IP] has joined #code
02:00 mode/#code [+o JackKnife] by ChanServ
02:02 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
02:22
<&McMartin>
http://arstechnica.com/security/2014/07/only-a-few-days-old-openssl-fork-libress l-is-declared-unsafe-for-linux/
02:34 Turaiel[Offline] is now known as Turaiel
02:52 Orth_ [orthianz@Nightstar-s5d.ntf.224.119.IP] has joined #code
02:53 Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has quit [Ping timeout: 121 seconds]
03:17 Turaiel is now known as Turaiel[Offline]
03:17 Orth_ is now known as Orthia
03:17 mode/#code [+o Orthia] by ChanServ
03:44 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
03:54 Attilla [uid13723@Nightstar-a0t.9ff.184.192.IP] has quit [[NS] Quit: Connection closed for inactivity]
04:15 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
04:22 Turaiel[Offline] is now known as Turaiel
04:32 JackKnife [Z@Nightstar-ajg.slu.72.87.IP] has quit [Ping timeout: 121 seconds]
05:04 Derakon is now known as Derakon[AFK]
05:16 Turaiel is now known as Turaiel[Offline]
05:33 Harlow [harlow@Nightstar-9hnfdm.il.comcast.net] has joined #code
05:39 Kindamoody[zZz] is now known as Kindamoody
06:10 RchrdB [RichardB@Nightstar-c6u.vd5.170.83.IP] has quit [[NS] Quit: Gone.]
06:13 RchrdB [RichardB@Nightstar-c6u.vd5.170.83.IP] has joined #code
06:20 celticminstrel [celticminst@Nightstar-6pf18d.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
07:07 Orth_ [orthianz@Nightstar-mvf.9c1.224.119.IP] has joined #code
07:09 Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has quit [Ping timeout: 121 seconds]
07:27 Orth_ [orthianz@Nightstar-mvf.9c1.224.119.IP] has quit [Ping timeout: 121 seconds]
07:33 Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has joined #code
07:33 mode/#code [+o Orthia] by ChanServ
07:40 AverageJoe [evil1@Nightstar-fb1kt4.ph.cox.net] has joined #code
08:00 Kindamoody is now known as Kindamoody|afk
08:28 Kindamoody|afk is now known as Kindamoody
08:50 AverageJoe [evil1@Nightstar-fb1kt4.ph.cox.net] has quit [[NS] Quit: Leaving]
08:54 Kindamoody is now known as Kindamoody|out
08:54 Harlow [harlow@Nightstar-9hnfdm.il.comcast.net] has quit [[NS] Quit: BED]
09:39 RchrdB [RichardB@Nightstar-c6u.vd5.170.83.IP] has quit [Ping timeout: 121 seconds]
09:58 Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has quit [Ping timeout: 121 seconds]
10:00 Attilla [uid13723@Nightstar-a0t.9ff.184.192.IP] has joined #code
10:02 Orthia [orthianz@Nightstar-mvf.9c1.224.119.IP] has joined #code
10:03 mode/#code [+o Orthia] by ChanServ
11:01 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
11:01 mode/#code [+o Checkmate] by ChanServ
11:13 gnolam [lenin@Nightstar-rhnl04.cust.bredbandsbolaget.se] has quit [Connection reset by peer]
11:13 gnolam [lenin@Nightstar-rhnl04.cust.bredbandsbolaget.se] has joined #code
11:13 mode/#code [+o gnolam] by ChanServ
11:32 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
12:42 Orthia [orthianz@Nightstar-mvf.9c1.224.119.IP] has quit [Ping timeout: 121 seconds]
12:47 Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has joined #code
12:47 mode/#code [+o Orthia] by ChanServ
13:09 Orthia [orthianz@Nightstar-s5d.ntf.224.119.IP] has quit [Ping timeout: 121 seconds]
13:10
<@Azash>
http://www.madebymarket.com/blog/dev/ruby-web-benchmark-report.html
13:10
<@Azash>
I feel bad for anyone who reads this and decides to use JRuby and Rack
13:13 Orthia [orthianz@Nightstar-mvf.9c1.224.119.IP] has joined #code
13:13 mode/#code [+o Orthia] by ChanServ
13:23 Turaiel[Offline] is now known as Turaiel
13:36 Turaiel is now known as Turaiel[Offline]
14:00 Orth_ [orthianz@Nightstar-s5d.ntf.224.119.IP] has joined #code
14:02 Orthia [orthianz@Nightstar-mvf.9c1.224.119.IP] has quit [Ping timeout: 121 seconds]
14:05 Orth_ is now known as Orthia
14:05 mode/#code [+o Orthia] by ChanServ
15:35
<@ErikMesoy>
Not sure if I'm even asking the right thing: if I want several Python objects that are instances of the same class to have a shared "default" variable, I just declare it as a class variable by saying "default=5" in the class definition, right? And then would objects refer to, and change, that default with "Classname.default"?
15:35
<@ErikMesoy>
Trying to write a fallback procedure going to last known good object
15:36
<@Azash>
Doesn't python have constructor methods?
15:36
<@Azash>
Or do you want it to be easily accessible whenever?
15:36
<@Azash>
Just have the constructor set the default value and if you need it accessible whenever, do it with a static variable
15:37
<@ErikMesoy>
Python has constructor methods, but I want it shared among objects and I thought putting it in the constructor would result in each object having its own
15:37
<@Azash>
static_variable = 5
15:37
<@ErikMesoy>
I may be misunderstanding something about when to use constructor and not using self, etc
15:37
<@Azash>
(in constructor) instance_variable = static_variable
15:39
<@ErikMesoy>
I want all objects referring to the same one. Sometimes the fallback will change, and should then change for each class.
15:41
<@ErikMesoy>
*for each object
15:51
<@ErikMesoy>
Elsewhere: I am trying to make a defaultdict which has a default value of "False" for any key not in its list of keys. This is failing, because "False" isn't callable. Is the right thing to do something like defaultdict(lambda foo:False), or another kind of collection that doesn't come to mind just now?
15:57
<@Azash>
Oh if you want them all to access the same value then it's just a static variable
15:58 celticminstrel [celticminst@Nightstar-6pf18d.dsl.bell.ca] has joined #code
15:58 mode/#code [+o celticminstrel] by ChanServ
16:15 * ErikMesoy drives the abstractor tractor.
16:50 * ErikMesoy crackles with flour! It works! The abstractor tractor refactor was successful!
16:50
<@ErikMesoy>
(But it only works in a basic way. So I don't qualify to crackle with power yet.)
16:55
<&jeroud>
ErikMesoy: I find dict.setdefault() much more useful than defaultdict.
16:57
<&jeroud>
Your earlier question seems to indicate the desire for something like a singleton.
16:58 Kindamoody|out is now known as Kindamoody
16:58
<&jeroud>
There are very occasionally good reasons to do that, but usually there's a better way to solve the higher level problem.
17:04
<@ErikMesoy>
jeroud: I thought a singleton was when a class is only allowed to have one object. I'm looking to have several objects, call them "boxes", which keep track of a FallbackBox to use if the current box can't store more doodads. When a box is emptied out, it becomes the FallbackBox.
17:04
<@ErikMesoy>
FallbackBox seems like it should be something like a class variable of the Box class.
17:05
<&jerith>
ErikMesoy: That's why I said "something like".
17:05
<&jerith>
What does a box do?
17:06
<@ErikMesoy>
Picks up objects matching some pattern; if an object is wrongly picked up that doesn't match the pattern or which won't fit in the box, the object should be diverted to the fallback box.
17:08
<&jerith>
I'd probably handle that by passing the fallback to the new box object's constructor.
17:09
<&jerith>
Maybe have a box factory of some kind that passes the same falback to all boxes it creates.
17:09
<&jerith>
+l
17:09
<@ErikMesoy>
How would a box go about becoming the fallback box and communicating this to other boxes when it empties out?
17:10
<&jerith>
Oh, wait. I think I misunderstood.
17:11
<@ErikMesoy>
The set of available boxes is not arbitrarily extendable in my case.
17:11
<@ErikMesoy>
So "construct new box" can't be a default solution.
17:11
<&jerith>
You have multiple boxes. Each box has a fallback that it puts things into when it's full and things are added?
17:12
<&jerith>
But when a box is emptied, it becomes the fallback for all the other boxes?
17:12
<@ErikMesoy>
When a box is emptied, it *can* become the fallback for the others. Boxes are things like Toybox, ClothesHamper, etc. Some kinds of small boxes should not become the fallback even when they are emptied.
17:13
<&jerith>
Hrm.
17:13
<&jerith>
What's putting things in boxes?
17:14
<&jerith>
I'm not sure it should be the box's responsibility to know about fallbacks.
17:14
<@ErikMesoy>
User action sending command to box.
17:15
<&jerith>
I think I'll need to know a little more about the system to offer useful advice.
17:15
<@ErikMesoy>
I agree that it might be something else which should know about the fallback: item being picked up, or user profile.
17:17
<&jerith>
Depending on the complexity and generality, a rules-and-tags decision engine might be appropriate.
17:18
<&jerith>
Or it might be way too much.
17:18
<@ErikMesoy>
Also: setdefault won't work in my case, but thanks.
17:18
<&jerith>
What decides which box to put a thing into in the first place?
17:18
<&jerith>
(Before any fallback stuff, that is.)
17:19
<&jerith>
Because the fallback decision probably belongs there.
17:19
<@ErikMesoy>
One box is "active" at any given moment; only items that match that box's constraints are supposed to be pick-up-able.
17:19
<@ErikMesoy>
Picked-up items do a sanity check to see if they actually go into that box, else fallback.
17:21
<&jerith>
Maybe you need to look for other boxes that are legal targets for an item and use one of those as a fallback.
17:21
<&jerith>
Perhaps picking the emptiest or something.
17:23
<&jerith>
Does that make sense?
17:25
<@ErikMesoy>
No, that might pick something which fouls up the system in ways that start to distort the "box" metaphor, and I think I had better modularize this a bit more because it's insufficiently self-contained and too long to non-impractically explain how it really works.
17:25
<@ErikMesoy>
Thanks for the advice.
17:25
<&jerith>
Cool.
17:30 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
17:44 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
17:44 mode/#code [+o himi] by ChanServ
18:01
<@ErikMesoy>
"int x; x=3" compresses to "int x=3" and in duck typing or similar contexts, just "x=3". In Python, does "def Method(); foo=Method" compress to anything like "foo = def Method()"?
18:10
<&ToxicFrog>
ErikMesoy: "compress" is poorly defined the way you're using it.
18:11
<&ToxicFrog>
If you're asking "are python anonymous function definitions as expressive as def", the answer is "ha ha ha ha ha ha ha ha not even slightly"
18:11
<@ErikMesoy>
So I can't set a variable to a nontrivial method without a separate method declaration first.
18:11
<&ToxicFrog>
I.e. 'def foo(): ...' is not isomorphic to 'foo = lambda ...', because def is strictly more expressive than lambda, despite functions being ostensibly first-class.
18:12
<&ToxicFrog>
Correct.
18:13
<&jerith>
ErikMesoy: If your functions all have a similar form, you can write a factory that returns closures or something.
18:14
<@ErikMesoy>
Oooh,this might be my first non-toy use of a factory.
18:14
<&jerith>
I like factories.
18:15
<&jerith>
They're very useful things.
18:15
<&jerith>
They have a bad reputation because of convoluted frameworks that require lots of boilerplate.
18:16
<&jerith>
I should probably say that I'm using "factory" in the general sense of "thing that constructs and returns a value".
18:52 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
18:53
<@ErikMesoy>
My derp of the day: "if var in (0,n)" instead of "if var in range(0,n)". Spent quite a bit of effort trying to figure why certain elements were failing. (^_^)
19:05 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
19:05 mode/#code [+o himi] by ChanServ
20:02 Reiver [quassel@Nightstar-ksqup0.co.uk] has quit [Connection closed]
20:04 Reiver [quassel@Nightstar-ksqup0.co.uk] has joined #code
20:04 mode/#code [+ao Reiver Reiver] by ChanServ
20:34
<@ErikMesoy>
Is it a code smell if I declare an object of class Object? And if so, is there some obvious thing I should usually be doing instead?
20:35
<&jerith>
What are you using it for?
20:35
<&jerith>
Instances of object() are often useful as placeholders, for example.
20:36
<@ErikMesoy>
Holding variables in an intuitive-sounding quasi-namespace. The Object objects have no functions, just attributes. They have names like "PointlessTrivia" so that I can access the variable PointlessTrivia.AmountOfMilkSpilled.
20:37
<&jerith>
Is this Python code?
20:37
<@ErikMesoy>
Yes.
20:37
<&jerith>
You can't put arbitrary attributes on instances of object().
20:39
<@ErikMesoy>
No, but I can put them on a generic subclass of object().
20:39
<&jerith>
You might want collections.namedtuple().
20:39
<@ErikMesoy>
The subclass is just Foo(object):pass
20:40
<&jerith>
I'd usually use a dict for stuff like that, but sometimes an object makes more sense.
20:41
<&jerith>
I also have an AttrDict implementation that I use in places.
20:42
<@ErikMesoy>
AttrDict? That sounds like an idiot-resistant way of holding data which returns the same things for AttrDict[key] and AttrDict.key
20:42
<&jerith>
(The actual implementation varies, but it's usually a subclass of dict() with __getattr__ and sometimes __setattr__ on it.)
20:43
<&jerith>
It has the advantage that you can get at the things stored in it easily.
20:45
<&jerith>
It has the disadvantage that dict() has a bunch of methods on it that get in the way of using those as keys.
20:51 * abudhabi buys some RAM, box stops working upon insertion, does not work upon removal.
20:51
< abudhabi>
All I get is beeps on startup: Long, long, short, short, long, short.
20:52
<&jerith>
Does the manual say anything?
20:53
< abudhabi>
Trying to find one.
20:53
<@froztbyte>
It says you need to live on the dole
20:53
<@froztbyte>
Amongst other things
20:53 Kindamoody is now known as Kindamoody[zZz]
20:54
<&ToxicFrog>
abudhabi: look up [<name of your bios> beep codes] on google.
20:54
<&ToxicFrog>
Or download the manual for your motherboard and check that.
20:54
<@froztbyte>
(really though: http://en.wikipedia.org/wiki/The_manual)
20:55
<@froztbyte>
Ugh, stupid spacing thanks to SwiftKey
20:56
< abudhabi>
I forget what my BIOS is. I'd normally check by booting the box, but that's off the table.
20:56
< abudhabi>
Checking for manufacturer of motherboard, I get "1-3-2 64KB RAM failure- The test of the first 64KB RAM has failed to start".
21:00
< abudhabi>
I get the same error when the RAM is removed entirely.
21:11
<&jerith>
https://twitter.com/saltstackinc/status/489502034635132928
21:13
<@TheWatcher>
abudhabi: CMOS reset, then try again
21:18
< abudhabi>
Ugh, I wish there were a well-labeled "Reset CMOS" button.
21:19
<@Tamber>
It's probably a header with a jumper on it, buried somewhere near some other headers.
21:20
<@Tamber>
(I was pleasantly surprised to find mine actually has a button; and it's pretty well-labelled.)
21:20
<@TheWatcher>
Egads, what madness is this?!
21:21
<@Tamber>
I know! It's almost like they expect people might need it at some point; and won't have the time or inclination to dismantle the whole machine to find it!
21:22
<@froztbyte>
jerith: hah
21:27
< abudhabi>
OK, found two jumpers. PSWD_JMP and RTCRST.
21:30
< abudhabi>
TheWatcher: Thanks, that worked.
21:31
< abudhabi>
The box works again, with the regular RAM loadout. Now to figure out what I did wrong.
21:35 Harlow [harlow@Nightstar-9hnfdm.il.comcast.net] has joined #code
21:39
< Harlow>
i've never tried this before, would a statement like this work as a logical operation? language is javascript.
21:40
< Harlow>
return (singleItemCheck(a) == true && singleItemCheck(b) == true);
21:43
<@TheWatcher>
why not just do return (singleItemCheck(a) && singleItemCheck(b)), but otherwise, yes.
21:45
< Harlow>
does that return a single value and evaluate them there? i mean if (true && false) what is returned? false i hope?
21:45
< abudhabi>
Hmm. I can't seem to ge the new RAM to be recognized.
21:45
< abudhabi>
Or, well, counted.
21:46
<@TheWatcher>
yes, false will be returned.
21:46
< Harlow>
abudhabi is your ram over-clocked?
21:46
< Harlow>
cool, ill give that a whirl then.
21:46
< abudhabi>
Harlow: What do you mean?
21:47
< Harlow>
a few things can cause ram not to show up.
21:47
< abudhabi>
I have four old 512 bricks and two new 1024 bricks. In a O/O/N/N/O/O config, I get counted as 1 GB RAM total, and BIOS properly identifies what's slotted in.
21:47
< abudhabi>
But doesn't actually use for some reason.
21:47
< Harlow>
do you know if the slots are 1/1/2/2/3/3?
21:48
< abudhabi>
They're black black white white black black. And numbered 1 2 3 4 5 6.
21:48
< Harlow>
hm, what mb?
21:48
< Harlow>
and what i was asking is if all the ram was the same clock speed
21:49
< abudhabi>
Dell 0XC837.
21:51
< abudhabi>
How do I tell what clock speed they are?
21:52
< Harlow>
it should be on the chips
21:52
< abudhabi>
Also, what does ECC mean?
21:53
< Harlow>
Error correcting code
21:53
< Harlow>
if you're using ECC ram all of it has to be ECC buffered.
21:54
< abudhabi>
Right. The new RAM is detected as ECC "no" whereas the old is ECC "yes".
21:55
< Harlow>
you can probably turn ECC off and get the extra 2 GB working.
21:55
< Harlow>
there is probably a setting for that
21:55
< abudhabi>
Old: 512MB 1Rx8 PC2-3200R-333-12
21:56
< abudhabi>
New: 1GB 1Rx4 PC2-5300P-555-12-H0
21:58
< abudhabi>
What is memory rank?
22:00
< Harlow>
ok so your old ram runs at 400Mhz
22:00
< Harlow>
and the New ram runs at 667MHZ
22:00
< Harlow>
so I'm thinking the problem is the speed difference, I'm not 100% though.
22:01
< abudhabi>
Is that fixable short of buying the correct speed RAM this time?
22:02
<@Tamber>
Shouldn't they both run at the slower speed, in that case?
22:03
< abudhabi>
That's what I would assume.
22:03
< Harlow>
they should.
22:04
< Harlow>
if not you might try modifying the clock speed of the ram yourself in bios, that might do it.
22:12
< abudhabi>
UGH.
22:13
< abudhabi>
I'm finding that this box does not support non-ECC memory at all.
22:13
< abudhabi>
Crap.
22:16
< abudhabi>
Ugh. With the original configuration, the box refuses to start. I'll deal with this another day.
22:36
<@ErikMesoy>
Argh. A thing is not being initialized, and I have too many nested methods and callable objects to easily determine where it should get initialized.
22:58
< Harlow>
:/
23:21
< Harlow>
will a break in a function called in a switch statement break the switch when returned?
23:22
<&McMartin>
No.
23:25
< Harlow>
yeah i guess that wouldn't make too much sense.
--- Log closed Thu Jul 17 00:00:19 2014
code logs -> 2014 -> Wed, 16 Jul 2014< code.20140715.log - code.20140717.log >

[ Latest log file ]