code logs -> 2013 -> Sun, 03 Feb 2013< code.20130202.log - code.20130204.log >
--- Log opened Sun Feb 03 00:00:09 2013
00:27 Rhamphoryncus [rhamph@Nightstar-cc6253d6.abhsia.telus.net] has quit [Operation timed out]
00:28 syksleep is now known as Syk
00:39
< Syk>
celticminstrel: iOS restores fail because iOS restores are fragile
00:39
< Syk>
celticminstrel: anything interrupting it can derp the whole thing
00:39
< Syk>
celticminstrel: take it in to an Apple store
00:40
< JustBob>
They're marginally better than wonky interrupted windows updates, though.
00:41
<@celticminstrel>
But I'm restoring from my Mac Pro.
00:42
<@celticminstrel>
To be clear, the phone is useable; it just lacks my data.
00:42 OrthiaLap [orthia@Nightstar-687cbd6a.ihug.co.nz] has quit [Ping timeout: 121 seconds]
00:42 Rhamphoryncus [rhamph@Nightstar-cc6253d6.abhsia.telus.net] has joined #code
00:42 mode/#code [+o Rhamphoryncus] by ChanServ
00:42
<@celticminstrel>
There are two steps to the restore; I got past the first one (restoring firmware) and am stuck on the second (restoring data).
00:44
< Syk>
i wasn't aware that data restores ever worked
00:44
< Syk>
I got it to work once - between the same OS version on a different phone
00:44
< Syk>
but every other time between upgrading it would crap out
00:45
<@celticminstrel>
What would be the point in them existing if they never worked?
00:45
< Syk>
you're describing half of iTunes there
00:45
<@celticminstrel>
I did manage to get it to work when I got a new phone because the first one smashed.
00:45
< Syk>
it's hit and miss
00:45
<@celticminstrel>
What, so are you saying I should just keep trying and trying and trying?
00:46
< Syk>
well try it three times
00:46
< Syk>
if you have some sort of iphone shell then that might help
00:46
< Syk>
sort of like android's adb logcat
00:46
<@celticminstrel>
I don't have an iPhone shell and I don't see how that would help...
00:46
< Syk>
dunno if that exists
00:46
< Syk>
android's adb logcat prints out what the device is doing
00:46
< Syk>
so if it's failing on one part it'll tell you
00:47
< Syk>
so, logically, if the iphone has something like that, then maybe it might tell you what's falling over
00:47
<@celticminstrel>
Currently it just says "Restore in Progress", and iTunes says "Restoring iPhone from backup" with an ETA of two hours.
00:47
< Syk>
does opening itunes from a terminal make it print stuff on stdout?
00:47
<@celticminstrel>
But the progress bar has not moved for quite awhile.
00:47
<@celticminstrel>
I will check Console.app.
00:47
< Syk>
wait for two hours
00:47
< Syk>
if it hasn't worked, then
00:48
< Syk>
IIRC it's not very good at that
00:48
<@celticminstrel>
Initially it had an ETA of one minute.
00:48
< Syk>
it'll do stuff but it wont move the bar
00:48
< Syk>
for something
00:48
< Syk>
might be configs
00:48
<@celticminstrel>
Configs?
00:48
< Syk>
like... device configs
00:48
< Syk>
your settings
00:49
< Syk>
it would just move when it's done all of the settings
00:49
< Syk>
but that shouldnt take 2 hours
00:49
<@celticminstrel>
Well, I see a bunch of "receive secure message timeout!" in the console.
00:50
<@celticminstrel>
"iTunes: _select_socket (thread 0x...): receive secure message timeout!", followed by what looks like line numbers and stuff.
00:52
< Syk>
huh
00:52
< Syk>
is the cable good/
00:52
< Syk>
?*
00:53
<@celticminstrel>
Maybe not.
00:53
<@celticminstrel>
It's a little damaged.
00:53
< Syk>
try with a known good cable, then
00:53
< Syk>
look under a couch, those fucking 30 pin connectors breed i swear
00:53
<@celticminstrel>
But borrowing my sister's didn't seem to help. I suppose I could try that again though.
00:54
<@celticminstrel>
Incidentally, if I unplug it, iTunes won't notice, as I recall; the phone will say "Restore Complete" and reboot, but it will be at factory defaults or something.
00:55
< Syk>
well it seems like its not starting at all
00:55
<@celticminstrel>
The progress bar in iTunes is around 50%, though...
00:55
< Syk>
since that secure message timeout might be it attempting to make a secure link with the iphone
00:55
<@celticminstrel>
Maybe.
00:55
< Syk>
can you try an older backup?
00:55
< Syk>
or does itunes just wipe them all
00:56
<@celticminstrel>
It seems to only keep one backup. The only old backup I have is from the previous phone.
00:56
<@celticminstrel>
There are a bunch of other backups, but they're mostly newer, apparently created as part of the restore process.
00:56
< Syk>
well
00:57 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
00:57
< Syk>
maybe try a different backup? if it works, then you know it's the individual backup maybe being corrupt or so
00:57
<@celticminstrel>
Maybe. I guess I'll try the really old backup...
01:04
<@celticminstrel>
Seems to do the same thing, though this time it didn't even get to 50%...
01:05 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
01:05 mode/#code [+qo Vornicus Vornicus] by ChanServ
01:07
<@celticminstrel>
Now I have a "Could not connect to lockdown port on device".
01:09
<@celticminstrel>
Oh, apparently it disconnected.
01:12
< Syk>
owO
01:16
<@celticminstrel>
?
01:18
< Syk>
wut
01:18
< Syk>
so its still not cooperating?
01:18
<@Tarinaky>
Is it weird that when I see this: http://www.redbull.no/cs/Satellite/no_NO/Lofoten-360-video/001243307162053 the first thing to come to mind is: "Wow, it's like Myst"
01:18
<@celticminstrel>
Yeah.
01:19
< Syk>
hmm
01:19
< Syk>
dunno, then
01:19
< Syk>
the whole iOS update and restore is black, undocumented magic
01:20
<@celticminstrel>
Heh.
01:20
< Syk>
especially the update
01:24
<@celticminstrel>
I just tried it on my laptop and it worked. Unfortunately this is a backup from after I updated, which is to say it doesn't have anything important in it.
01:24
<@celticminstrel>
But it makes me wonder whether I could get this to work if only I could get my backup onto the laptop.
01:26
<@celticminstrel>
Well, clarification... I already copied the backup over (at least I'm pretty sure that's what I copied), but a) iTunes doesn't acknowledge that it exists and b) the backups that iTunes does acknowledge don't seem to exist in the location where I've been led to expect they should exist.
01:39
< Syk>
hm
01:41 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Client exited]
01:45
<@celticminstrel>
Ooh.
01:45
<@celticminstrel>
I may have been blindly putting them in entirely the wrong place.
01:50
<@celticminstrel>
Bingo! It worked! I can't believe I put them in ~/Library/MobileSync/Backup instead of ~/Library/Application Support/MobileSync/Backup 9_9
01:51
<@celticminstrel>
Now theoretically it should sync my apps and stuff...
01:51
<@celticminstrel>
Seems to be working.
01:56 Rhamphoryncus [rhamph@Nightstar-cc6253d6.abhsia.telus.net] has quit [Ping timeout: 121 seconds]
02:10
<@celticminstrel>
So! setTimout!
02:10 Rhamphoryncus [rhamph@Nightstar-cc6253d6.abhsia.telus.net] has joined #code
02:10 mode/#code [+o Rhamphoryncus] by ChanServ
02:11
<@celticminstrel>
My setTimeout functions rely on closure from the enclosing function, which makes it difficult to reuse them.
02:11
<@celticminstrel>
In particular, the fireball exploding function, which exists identically in two different places.
02:12 Kindamoody[zZz] is now known as Kindamoody
02:12 * Syk bonks her twitter owo
02:13
<@celticminstrel>
Apparently I can setTimeout(func, time, param) but it doesn't work in IE.
02:13
<@celticminstrel>
Well fine. Who cares about IE.
02:13
<@celticminstrel>
<_<
02:19
< Syk>
rofl
02:22 Reivles [orthianz@3CF3A5.E1CD01.5A78C0.03128C] has quit [Ping timeout: 121 seconds]
02:23 thalass [thalass@Nightstar-b95c25b4.bigpond.net.au] has joined #code
03:03 Typherix [Typherix@Nightstar-7dc8031d.mi.comcast.net] has quit [Ping timeout: 121 seconds]
03:04 Typherix [Typherix@Nightstar-7dc8031d.mi.comcast.net] has joined #code
03:12 Nemu_ [NeophoxProd@Nightstar-a0c8ea4a.asahi-net.or.jp] has quit [Ping timeout: 121 seconds]
03:22 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Connection closed]
03:31 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
03:31 mode/#code [+o himi] by ChanServ
03:58 Attilla [Attilla@Nightstar-9e7fa2b2.range86-162.btcentralplus.com] has quit [Ping timeout: 121 seconds]
04:04 Orthia [orthianz@3CF3A5.E1CD01.5A78C0.03128C] has joined #code
04:04 mode/#code [+o Orthia] by ChanServ
04:11 thalass is now known as Thalass|away
04:11 Thalass|away [thalass@Nightstar-b95c25b4.bigpond.net.au] has quit [[NS] Quit: Leaving]
05:33 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has quit [Client exited]
05:35 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code
05:35 mode/#code [+o celticminstrel] by ChanServ
05:44 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
05:44 mode/#code [+ao Derakon Derakon] by ChanServ
06:34 Derakon is now known as Derakon[AFK]
07:01 Kindamoody is now known as Kindamoody|afk
07:29 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!]
09:07 Orthia [orthianz@3CF3A5.E1CD01.5A78C0.03128C] has quit [Ping timeout: 121 seconds]
09:13 Orthia [orthianz@3CF3A5.E1CD01.5A78C0.03128C] has joined #code
09:13 mode/#code [+o Orthia] by ChanServ
10:51 VirusJTG_ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
11:55 Kindamoody|afk is now known as Kindamoody
12:29 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
12:51 Attilla [Attilla@Nightstar-9e7fa2b2.range86-162.btcentralplus.com] has joined #code
12:56 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
13:39 ErikMesoy|sleep is now known as ErikMesoy
13:51 Kindamoody is now known as Kindamoody|out
14:38 Nemu [NeophoxProd@Nightstar-c6bcf145.asahi-net.or.jp] has joined #code
14:39 Syk is now known as syksleep
15:33 You're now known as TheWatcher
15:42
<@sshine>
are abstract algebra questions appropriate here?
15:43
<@sshine>
I'd ask on ##math@freenode, but it seems like people don't appreciate my questions although I imagine they're not particularly hard to answer.
15:43
<@sshine>
ah, there's a #math!
15:50
<@iospace>
:P
16:47 Derakon[AFK] is now known as Derakon
17:28 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code
17:28 mode/#code [+o celticminstrel] by ChanServ
17:52 RobinStamer is now known as Vasi
17:52
<@Vasi>
https://gist.github.com/4702786 <-- I hope I never meet someone with more seniority than I with this attitude :/
17:58
<@froztbyte>
well
17:58
<@froztbyte>
kinda
17:58
<@froztbyte>
that's the old experienced grouch there
18:08
<@Rhamphoryncus>
which one?
18:09
<@Rhamphoryncus>
To me the grouchy one is advocating testing your backups.. and they're right
18:09
<@froztbyte>
indeed
18:10
<@froztbyte>
the initial statement was a bit unfounded
18:10
<@froztbyte>
but beyond that, pretty much in the right
18:11
<@Vasi>
<-- RobinStamer
18:11
<@Vasi>
IE: I hope I never meet anyone who so stubournly refuses to test backups
18:11
<@froztbyte>
ah
18:11
<@Vasi>
Esp if they override my ability to do so
18:11
<@froztbyte>
yes well
18:12
<@froztbyte>
allow morons to suffer the pain they choose to
18:12
<@froztbyte>
Tao Of Backup, etc
18:12
<@Tamber>
Get the refusal in writing, put in a safe place, and wait for the inevitable.
18:12
<@Vasi>
Pretty much
18:12
<@Tamber>
After all, you were only following orders(!) ;)
18:13
<@Tamber>
(Doesn't work so well if you actually give a shit about your work, I suspect~)
18:13
<@froztbyte>
if you do that, just maintain your own side backups
18:13
<@Tamber>
Of course
18:14
<@froztbyte>
a few years ago I was at an employer that had very little understanding of how important data was
18:14
<@froztbyte>
so after a long while of pushing to to get a bigger server, I managed to build up a new VM host, and consolidate the previous *3* storage servers into one box with some nasty multi-smb-daemon hacks
18:15
<@froztbyte>
(the 3 daemons were still necessary because the morons who wrote the in-house software made it all name-sensitive)
18:15
<@froztbyte>
the upside of this, though, was that I'd given server planning estimates through as 3*(server(current)*upgrade requirements)
18:16
<@froztbyte>
so I had a nice little 2TB store hidden away from everyone, and could use it to perform miracles at random times :)
18:16
<@froztbyte>
had to keep it hidden though, otherwise it'd have instantly been overprovisioned
18:18
<@Vasi>
3*(server(current)*upgrade requirements) <-- what do you mean by this
18:37
<@sshine>
don't you mean 3*(current + upgrade)?
18:40 * Alek blinks.
18:41
<@Alek>
one. letter. difference.
18:55
<@celticminstrel>
Repeatedly copying a function and tweaking just a few parameters (and the name) should definitely raise a red flag. I think there's a better way!
19:00
<@Alek>
celtic: not what I meant. but yup. :P
19:00
<@celticminstrel>
It was unrelated.
19:00
<@celticminstrel>
I was doing that and then realized that there must be a better way.
19:02
<@celticminstrel>
This code is ending up with a plethora of function.call(this) things...
19:02
<@celticminstrel>
I have a vague feeling that this might not be a good thing.
19:03
<@Vasi>
Try .bind()?
19:04
<@celticminstrel>
What does that do?
19:05 * celticminstrel googles it.
19:06 Kindamoody|out is now known as Kindamoody
19:06
<@Vasi>
> a = 42; x = {a: 1}; f1 = function() { return this.a }; f2 = f1.bind(x); [f1(), f2()]
19:06
<@Vasi>
[ 42, 1 ]
19:07
<@celticminstrel>
Oh, well... hm, actually, now that I have only two functions called several times with different parameters instead of ten or so slightly different ones, that could actually be reasonable to do.
19:07
<@Vasi>
It returns a new function who has `this` bound to the first param.
19:08
<@celticminstrel>
The functions will still need to use .call, but they wouldn't need to be called with .call.
19:08
<@celticminstrel>
(One of their arguments is a predicate function.)
19:08
<@celticminstrel>
(Which is an anonymous function returned by another function.)
19:09
<@celticminstrel>
...I have one function, not two. So that's only one bind call, which if nothing else makes my code look cleaner.
19:09
<@Vasi>
Is the callback the same all the time?
19:09
<@Vasi>
Because you can give that to bind() too
19:10
<@celticminstrel>
No, it's different for each call.
19:12
<@celticminstrel>
Though... it's reconstructed every time with a parameter... but the parameter is a constant... so, for a given object, it will be the same every time.
19:12
<@celticminstrel>
Hm...
19:13
<@celticminstrel>
(Well, unless I decide to implement a Fear spell.)
19:49
<@celticminstrel>
Um... why is /xyz/.match undefined?
19:50
<@Vasi>
Because it isn't a funcion
19:50
<@Vasi>
Try .test() or .exec()
19:50
<@celticminstrel>
...Mozilla's docs say it is. :/
19:51
<@Vasi>
.match is a function of String IIRC
19:51
<@Vasi>
Yes
19:51
<@celticminstrel>
Aha, so Mozilla's docs are a little misleading.
19:51
<@celticminstrel>
Unless you read properly. Duh.
19:52
<@celticminstrel>
Never mind.
19:52 Kindamoody is now known as Kindamoody[zZz]
19:53
<@Azash>
20:51 <@celticminstrel> Aha, so Mozilla's docs are a little misleading.
19:53
<@Azash>
That's an improvement; usually they're just nonexistent
19:53
<@celticminstrel>
No, I just wasn't reading them.
19:53
<@celticminstrel>
I saw a list of methods and assumed they were all RegExp methods.
19:54
<@celticminstrel>
But the other column of the table explained that they weren't.
20:01
<@Alek>
"In modern table etiquette, you hold your fork in your left hand and your mouse in your right."
20:12
<@Namegduf>
Alek: Love it.
20:29
<@celticminstrel>
...how can I get the position of an element with respect to the viewport?
20:31
<@celticminstrel>
If it makes a difference, the element has a fixed parent.
20:34
<@celticminstrel>
It seems like I need to somehow mix $(elem).offset() and $(window).scrollTop(), but not sure how...
20:38
<@celticminstrel>
Oh, I think I got it to work...
20:51
<@celticminstrel>
Whee, I have a resizable div that shows the appropriate resize cursors at the edge from which it can be resized! :D
20:52
<@celticminstrel>
Only minor issue is that the cursor flickers when dragging up, because the cursor ends up outside the actual div, but I think I can live with that.
20:56
<@celticminstrel>
...wait wait. Why on earth did I write "this.blah.call(this)". o.O
20:57
<@Vasi>
gj
20:57 Vasi is now known as RobinStamer
21:10 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Client closed the connection]
21:10 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
21:22
<@celticminstrel>
There's another place where I do it, but I can't change that; it's like "(this.x || y).call(this)".
21:23
<@celticminstrel>
Well, I could split it into two statements to eliminate .call(), I guess, but I don't feel like doing that.
21:23
<@celticminstrel>
...incidentally, I have a lot of "who.x = (who.x || 0) + blah" in my code. >_>
21:24
<@celticminstrel>
Well, not with x though. Everyone is guaranteed to have x defined. :P
21:34
<@RobinStamer>
1) if you're doing x.call(this) frequently, you might consider adding x as a property of this.
21:35
<@RobinStamer>
2) Having a bunch of `this.x = this.x || default` is a sign that you're not using the constructor properly.
21:35
<@celticminstrel>
Yeah, I was vaguely thinking about that.
21:36 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
21:36 mode/#code [+qo Vornicus Vornicus] by ChanServ
21:39
<@celticminstrel>
You know, in vague terms the concept of JS's with block is not a bad one; it's just that the way it actually works is silly and pointless and horrible.
21:40
<@celticminstrel>
If you could do with(blah) {function b() {stuff} z = 5} and end up with blah = {b: function {stuff}, z: 5}, it would actually be useful.
21:41
<@RobinStamer>
with is deprecated.
21:41
<@celticminstrel>
I know.
21:41
<@RobinStamer>
Just making sure.
21:41 * celticminstrel is not using it; just got distracted for a bit.
21:43
<@celticminstrel>
I wonder why my text editor highlights "use" as a keyword...
21:43
<@celticminstrel>
(Though it also highlights types such as Array or String as a keyword.)
21:48
<@RobinStamer>
Not sure
21:49
<@RobinStamer>
I know vim incorrectly marks `undefined` like a keyword
21:49
<@celticminstrel>
Mine does too.
21:49
<~Vornicus>
celmin: my editor puts "int" and "long" and "short" as js keywords
21:50
<@celticminstrel>
So does mine, but Firefox console shows otherwise...
21:51
<@celticminstrel>
(Meaning that I get ReferenceError instead of SyntaxError when typing in just the word.)
21:52
<@celticminstrel>
It highlights double and float as well... maybe it's basing the JS highlighter on the C highlighter or something...
21:52
<~Vornicus>
perhaps.
21:52
<@celticminstrel>
But that doesn't explain why use is highlighted.
21:53
<@RobinStamer>
A C++ one probably
21:53
<@celticminstrel>
Maybe.
21:54
<@celticminstrel>
use is not a keyword in C, C++, Obj-C, or Java.
21:56
<@Namegduf>
"basing"
21:58
<@TheWatcher>
it is a keyword in perl, though
21:58
<@TheWatcher>
*shrug*
21:59
<@celticminstrel>
unless is not highlighted, for what that's worth. >_>
21:59
<@TheWatcher>
Maybe it just likes the word, then.
22:00
<@celticminstrel>
Heh.
22:40 ErikMesoy is now known as ErikMesoy|sleep
22:45 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
23:07 OrthiaLap [orthia@3CF3A5.E1CD01.5A78C0.03128C] has joined #code
23:14
<&McMartin>
"using" is a keyword in C++.
23:23
<@celticminstrel>
But "use" isn't.
23:37 OrthiaLap [orthia@3CF3A5.E1CD01.5A78C0.03128C] has quit [Ping timeout: 121 seconds]
23:38 OrthiaLap [orthia@3CF3A5.E1CD01.5A78C0.03128C] has joined #code
23:40
<@celticminstrel>
I've spent rather more time on this than I originally intended to. >_>
--- Log closed Mon Feb 04 00:00:23 2013
code logs -> 2013 -> Sun, 03 Feb 2013< code.20130202.log - code.20130204.log >

[ Latest log file ]