code logs -> 2013 -> Fri, 11 Oct 2013< code.20131010.log - code.20131012.log >
--- Log opened Fri Oct 11 00:00:31 2013
00:01
<@Tarinaky>
ToxicFrog: Advice on how to undo my cock up?
00:02
<@celticminstrel>
Rewrite history?
00:02
<@Tarinaky>
Yes. That's what I'm thinking.
00:02
<@Namegduf>
Rewriting history is fun.
00:02
<@celticminstrel>
Indeed!
00:02
<@Tarinaky>
But I'm not pro enough with git to do so confidently.
00:03
<@Namegduf>
Tarinaky: Well, I guess you're going to just have to bite the bullet here.
00:03
<@Namegduf>
Let's kill Hitler.
00:03
<@celticminstrel>
I did a major rewrite of history in my IRC bot because I had passwords and settings hard-coded.
00:03
<@Tarinaky>
I'm... I'm the only one being serious here aren't I?
00:03
<@Namegduf>
Tarinaky: I only had two silly lines. :(
00:03
<@celticminstrel>
So I rewrote history before putting it on github.
00:04
<@Namegduf>
celticminstrel: Haha
00:04
<@Namegduf>
That must have taken some doing.
00:04
<@celticminstrel>
In this case you can probably just do a 'git rebase -i HEAD~3' and change the command in front of the relevant commit to "e".
00:04
<@Namegduf>
Whitewashing history like that.
00:04
<@celticminstrel>
Yeah, it did.
00:04
<@celticminstrel>
Especially since rewriting the first commit is kinda impossible.
00:05
<@Tarinaky>
Why HEAD~3?
00:08
<@Tarinaky>
No. That's not doing what I wanted :/
00:10
<&ToxicFrog>
HEAD~3 is "three commits before the currently checked out one"
00:10
<&ToxicFrog>
Then erase all the file contents, save and exit, and git rebase --abort
00:10
<&ToxicFrog>
(it might abort automatically if given an empty file, actually)
00:11
<&ToxicFrog>
Anyways, what's the situation here? How many branches were affected? How long ago?
00:11 Stalker [Z@Nightstar-b920a19c.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
00:12
<@Tarinaky>
Okay. Got it working. I think.
00:13
<@celticminstrel>
The 3 was mostly arbitrary.
00:13
<&ToxicFrog>
celticminstrel: rewriting the first commit is entirely possible
00:13
<&ToxicFrog>
git rebase -i --root <branch>
00:13
<@celticminstrel>
Well, I didn't manage to figure out how to do it... I think I ended up starting a new, blank history, redoing the first commit, and cherry-picking everything else into it.
00:14
<@celticminstrel>
Something like that.
00:14
<@Tarinaky>
I should go to sleep now. Before I fuck anything else up.
00:36 himi [fow035@Nightstar-36db723c.ffp.csiro.au] has joined #code
00:36 mode/#code [+o himi] by ChanServ
00:41 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
01:01
< RichyB>
ToxicFrog, I have seen at least one person recommend making an empty initial commit immediately after "git init" just so that you'll have a marker in case you happen to want to rebase all the way back up through history. :0
01:03 You're now known as TheWatcher[T-2]
01:07
<&ToxicFrog>
RichyB: yeah, that hasn't been an issue since --root was introduced lo these many versions agao
01:08 You're now known as TheWatcher[zZzZ]
01:09 Derakon[AFK] is now known as Derakon
01:50 Tarinaky [tarinaky@Nightstar-dd7e4a05.net] has quit [Operation timed out]
01:53 Tarinaky [tarinaky@Nightstar-dd7e4a05.net] has joined #code
01:54 mode/#code [+o Tarinaky] by ChanServ
02:08 Derakon is now known as Derakon[AFK]
02:10 * JustBob suspects he has issues: i = i + 1; % Iterates the iteration counter by incrementing the counter by one. This enables tracking of iterations as well as providing an incrementer for breaking the loop if iterations in excess of the previously coded iteration limit are attempted without finding a root.
02:11
<&McMartin>
" Facebook announced in a blog post Thursday that it's removing the ability to opt out of appearing in search results, both for friends and globally, for those whoâve had it enabled."
02:11
< JustBob>
And people wonder why my facebook is sterilized.
02:29 Derakon[AFK] is now known as Derakon
02:38
< [R]>
<Namegduf> What is there which deals with 7z files on a Mac? <-- p7zip? 7z is FOSS.
02:38
< [R]>
Err
02:38
< [R]>
Bit late on that I guess, sorry
02:56 Vorntastic [Vorn@Nightstar-81f462fe.sub-70-211-14.myvzw.com] has joined #code
03:04 Tarinaky [tarinaky@Nightstar-dd7e4a05.net] has quit [Ping timeout: 121 seconds]
03:05 Tarinaky [tarinaky@Nightstar-dd7e4a05.net] has joined #code
03:05 mode/#code [+o Tarinaky] by ChanServ
03:37 Turaiel[Offline] is now known as Turaiel
03:53 Kindamoody[zZz] is now known as Kindamoody
03:57 Vorntastic [Vorn@Nightstar-81f462fe.sub-70-211-14.myvzw.com] has quit [Ping timeout: 121 seconds]
03:57 Vorntastic [Vorn@Nightstar-81f462fe.sub-70-211-14.myvzw.com] has joined #code
04:09 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
04:09 mode/#code [+qo Vornicus Vornicus] by ChanServ
04:16 Vorntastic [Vorn@Nightstar-81f462fe.sub-70-211-14.myvzw.com] has quit [[NS] Quit: Bye]
04:57 Satan [Tomhet@297948.EE7826.7CBD6D.3C0B7F] has joined #code
04:57 Derakon is now known as Derakon[AFK]
05:19 Satan [Tomhet@297948.EE7826.7CBD6D.3C0B7F] has quit [[NS] Quit: ]
05:42 celticminstrel is now known as celmin|sleep
05:51 AnnoDomini [abudhabi@Nightstar-dee370fe.adsl.tpnet.pl] has quit [Operation timed out]
05:53 AnnoDomini [abudhabi@Nightstar-9be5c12c.adsl.tpnet.pl] has joined #code
06:23 Turaiel is now known as Turaiel[Offline]
06:26 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has quit [[NS] Quit: Gone.]
06:30 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has joined #code
06:33 Kindamoody is now known as Kindamoody|out
06:37 AverageJoe [evil1@Nightstar-9da8df73.ph.cox.net] has joined #code
07:50 AverageJoe [evil1@Nightstar-9da8df73.ph.cox.net] has quit [[NS] Quit: Leaving]
07:56 himi [fow035@Nightstar-36db723c.ffp.csiro.au] has quit [Ping timeout: 121 seconds]
08:09 Azash [ap@Nightstar-339920e6.net] has quit [Ping timeout: 121 seconds]
08:23 cpux [cpux@Nightstar-98762b0f.dyn.optonline.net] has quit [Connection reset by peer]
08:23 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
08:25 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
08:28
<@Tarinaky>
Question for the room. Peer-to-peer TCP/IP in Python. Does Python have adequate built-ins or should I look for a framework?
08:28
<~Vornicus>
socket
08:28
<~Vornicus>
Also, um.
08:29
<~Vornicus>
Bittorrent's reference implementation is python, iirc
08:29
<~Vornicus>
If you need an event-drive framework for networking, there is Twisted.
08:34 AnnoDomini [abudhabi@Nightstar-9be5c12c.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
08:34
<&jerith>
If you ever need to do socket.read() or whatever you're almost certainly doing it wrong.
08:35
<&jerith>
If you want to do networking in Python, Twisted is very much your friend.
08:41 AnnoDomini [abudhabi@Nightstar-08e28428.adsl.tpnet.pl] has joined #code
08:54
<@froztbyte>
(and if you don't think you're doing it wrong, try to code up a working/valid socket example over IRC without fucking it up at least in two places. if you can do that perfectly, then you /might/ be okay)
08:54 Pandemic [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: shutting down!]
08:59 AverageJoe [evil1@Nightstar-9da8df73.ph.cox.net] has joined #code
09:02 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Operation timed out]
09:05 Syloq [Syloq@B4EC54.59F324.016BDA.8CB0A3] has joined #code
09:06 Syloq is now known as NSGuest59645
09:18 NSGuest59645 [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
09:21 Syloq [Syloq@B4EC54.59F324.016BDA.8CB0A3] has joined #code
09:22 Syloq is now known as NSGuest45758
09:33 Stalker [Z@Nightstar-b920a19c.cust.comxnet.dk] has joined #code
10:00 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
10:00 mode/#code [+o himi] by ChanServ
10:14 Azash [ap@Nightstar-339920e6.net] has joined #code
10:14 mode/#code [+o Azash] by ChanServ
10:29 NSGuest45758 [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Operation timed out]
10:29 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
10:29 mode/#code [+o Syloq] by ChanServ
10:34 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
10:36 Syloq [Syloq@B4EC54.59F324.016BDA.8CB0A3] has joined #code
10:37 Syloq is now known as NSGuest36780
10:47 NSGuest36780 [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
10:49
< JustBob>
Damnit.
10:49 Syloq [Syloq@B4EC54.59F324.016BDA.8CB0A3] has joined #code
10:50
< JustBob>
How do you get MatLab to go, "Okay, I'm done with this set of calculations; here's a [Y/N] prompt to start the program over." and then /actually start the program over?
10:50
< JustBob>
I can do a really obscene for loop to do it.
10:50
< JustBob>
But there's gotta be a more elegant approach.
10:50 Syloq is now known as NSGuest7233
10:51
<@Azash>
11:37 <@S> H: so you know FFXIV right
10:51
<@Azash>
11:45 <@S> turns out the server will happily accept any JSON command you send to update your char info to it
10:51
<@froztbyte>
haha
10:51
<@froztbyte>
JustBob: goto!
10:51
<@froztbyte>
(maybe?)
10:51
<@froztbyte>
I haven't ever matlab'd
10:52
< AnnoDomini>
Any perl hackers here? I was told that 'alarm' might help me with a 'process' that's hung itself. But I don't understand the alarm documentation online. How do I use it?
10:52
<@froztbyte>
(also my answer wasn't serious)
10:52
< JustBob>
There is no goto in BatLab
10:52
< JustBob>
Err, MatLab.
10:52
< JustBob>
In fact, the last person who proposed it was lynched.
10:52
<@froztbyte>
Bat(shitInsane)Lab
10:52
< JustBob>
Seriously. Looking at the MathWorks board...
10:52
<@froztbyte>
AnnoDomini: TheWatcher[zZzZ] perl's quite heavily
10:52
< JustBob>
Anyone trying to suggest a "goto" command gets figuratively skullfucked.
10:53 * AnnoDomini pokes TheWatcher[zZzZ].
10:53
<@froztbyte>
AnnoDomini: why are you writing perl?
10:53
< AnnoDomini>
Why not?
10:54
< AnnoDomini>
The bot I have is written in perl.
10:56
<@froztbyte>
uh, like
10:56
<@froztbyte>
was it one you got? or wrote yourself?
10:56
<@froztbyte>
wait
10:56
< Stalker>
He wrote Painbot himself.
10:56
<@froztbyte>
it's you that's been writing this bot for attempting to check up on your home connection or whatever?
10:57
< Stalker>
As fa as I'm aware.
10:57
< Stalker>
But why am I even answering?
10:57 * Stalker goes hide somewhere.
10:57
<@froztbyte>
because you're hopeful!
10:57
< AnnoDomini>
froztbyte: Stalker is right - I wrote the bot myself. I am trying to work around a library shortcoming to make it actually reconnect after the connection goes down.
10:58
<@Tarinaky>
JustBob: While loop or tail recursion.
10:58
<@Tarinaky>
I am unsure what MatLab's opinion of tail recursion is.
10:58
<&McMartin>
I would not lay heavy odds.
10:58
<&McMartin>
While loop is the traditional one
10:59
<&McMartin>
If you can do a do-while loop where the test is at the end, that's even better
10:59
<@Tarinaky>
While, tail-recursion and goto are the only programming constructs I am aware of (language agnostic) that do what you want.
11:00
<@Tarinaky>
If semantic variations for do-while and for loops >.>
11:00
<@Tarinaky>
*With
11:00
<&McMartin>
Yeah
11:00
<&McMartin>
Well
11:00
<&McMartin>
Depends on the for loop
11:00
<@Tarinaky>
for(;;) in C/C++ is basically a while(true)
11:00
<&McMartin>
Prior to C devouring all language designer brains everywhere, for was more like foreach, which is *not* equivalent to while.
11:00
<&McMartin>
C for is a syntactic transform on while.
11:01 You're now known as TheWatcher
11:01
<@Tarinaky>
If you have lazy evaluation you can turn for-each into while.
11:01
<@Tarinaky>
For each n in /any numeric sequence/
11:01
<&McMartin>
That begins stretching the definition more than I like~
11:04
<@Tarinaky>
You don't have to like it :p
11:08 NSGuest7233 [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Operation timed out]
11:09 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
11:09 mode/#code [+o Syloq] by ChanServ
11:12
< JustBob>
Tarinaky - Yeah, the while loop is what I'm about to implement.
11:13
< JustBob>
It just irks me.
11:13
< JustBob>
It's inelegant. :#
11:16 * AnnoDomini pokes TheWatcher.
11:16 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Operation timed out]
11:17
<@froztbyte>
AnnoDomini: fwiw, at this point I would've just rewritten it because it seems like you're in Territory Of Many Hacks
11:17 Syloq [Syloq@B4EC54.59F324.016BDA.8CB0A3] has joined #code
11:17
<@froztbyte>
(also because perl is dogshit)
11:18 * TheWatcher sighs
11:18 Syloq is now known as NSGuest65411
11:18
<@TheWatcher>
AnnoDomini: what's up?
11:18
< AnnoDomini>
TheWatcher: How I used alarm to detect that a function call has hung?
11:19
< AnnoDomini>
I mean, I suspect that $irc->do_one_loop; hangs on me.
11:20
<@TheWatcher>
local $SIG{ALRM} = sub { die "Timed out\n" }; alarm $seconds; $irc -> do_one_loop;
11:21
<@TheWatcher>
If you want ot handle it gracefully
11:21
<@TheWatcher>
eval { local $SIG{ALRM} = sub { die "Timed out\n" }; alarm $seconds; $irc -> do_one_loop; alarm 0; }; if($@) { # handle timeout } else { # succeeded }
11:22
<@TheWatcher>
(actually, that first one should ahve had 'alarm 0;' at the end too, or the timeout will always fire
11:22
<@TheWatcher>
)
11:23 AverageJoe [evil1@Nightstar-9da8df73.ph.cox.net] has quit [[NS] Quit: Leaving]
11:24
< AnnoDomini>
TheWatcher: http://pastie.org/8394659 <- Like this?
11:26
<@TheWatcher>
That will work, but note that your code will exit completely if the do_one_loop call times out (I don't know if this is what you wnt to happen)
11:27
< AnnoDomini>
I want that to happen. If it happens, supervisord will resurrect the script.
11:31
<@TheWatcher>
Righto
11:34
< JustBob>
There we go.
11:34
< JustBob>
Stupid loops. And stupid syntax.
11:35 * AnnoDomini has accidentally learned what ^Z does in a Linux shell and finds it useful.
11:35
<@TheWatcher>
Yes, it really is
11:37
< Syka>
i thought ^C and ^Z were the same up until last year
11:37
<@froztbyte>
haha
11:37
< Syka>
but ^Z was harder
11:38
< Syka>
because it always stopped things immediately
11:38
< JustBob>
There's this part of me that looks at this code.
11:38
< JustBob>
And goes, "I could make it a lot shorter."
11:38
< JustBob>
But that means dealing with arrays.
11:39
< Syka>
better than dealing with herpes
11:55 NSGuest65411 [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Operation timed out]
11:55 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
11:55 mode/#code [+o Syloq] by ChanServ
11:56
< ErikMesoy>
I am happy to announce that I have passed the International Software Testing Qualifications Board test, and become an ISTQB certified tester!
11:56
<@froztbyte>
do you feel appropriately sad?
11:57
< ErikMesoy>
No, because my boss given me a small cardboard box marked Samsung Galaxy and containing an expensive doodad for this. What is the technical term for this?
11:57
< ErikMesoy>
Pad-something?
11:57
< ErikMesoy>
It runs Android.
11:57
<@froztbyte>
rofl
11:57
<@froztbyte>
nabbad
11:57
<@froztbyte>
so you wasted a couple of hours on a pointless cert, and got a tablet?
11:57
<@froztbyte>
that's not a bad deal I guess
11:57
<@TheWatcher>
I believe the technical term is "reward"~
11:57
< ErikMesoy>
Wasted a lot of hours (failed the first time)
11:57
< ErikMesoy>
TheWatcher: No, "tablet" is what I wanted here
11:58
< ErikMesoy>
Unsure how to refer to the computer-phone-pad-device
11:58
<@froztbyte>
some people say "phablet", but please for the love of all the gods never use that term
11:58
<@TheWatcher>
....
11:58 * ErikMesoy realizes that the two "this" in his first statement had ambiguous, different references.
11:58
<@TheWatcher>
froztbyte: please tell me you're not serious there.
11:59
<@froztbyte>
TheWatcher: a little search query will answer you in moments
11:59 * TheWatcher eyes his Faithinhumanityometer
12:00
<@TheWatcher>
I think I'll give that a pass, or the urge to make it end in fire may be overwhelming.
12:00
<@froztbyte>
teehee
12:00 * ErikMesoy also eyes the Faithinhumanityometer. I thought that thing froze over long ago. Did it just bottom out?
12:00
<@TheWatcher>
Mine twitches occasionally
12:00
<@froztbyte>
TheWatcher: as much issue as I take with using wikipedia as authoritive source at times
12:00
<@froztbyte>
TheWatcher: have some http://en.wikipedia.org/wiki/Phablet
12:01 * TheWatcher twitch
12:01
<@TheWatcher>
And that was a twitch on my face, not the faithinhumanityometer.
12:01
< ErikMesoy>
So, I have a 200-dollar TABLET. And I also have the receipt if I want to trade it.
12:01
< ErikMesoy>
I figure if I keep it, my main use will be remoting to my real computer.
12:02
< ErikMesoy>
It's not like I check facebook on the commute to work, because 1) I bike to work and 2) I don't have a facebook. :p Anything else I should keep this to use for?
12:03
< JustBob>
The Note2 is, yes, a "phablet," per Samsung. :p
12:04
< JustBob>
Erik - Reading ebooks!
12:04
< Reiver>
Erik: Handy for ebooks.
12:05
< Reiver>
And checking your emails/IRC whilst doing so.
12:06
< Reiver>
I use my Nexus 7 fairly heavily as said.
12:06
<@Tarinaky>
If there's a decent on-screen keyboard you can use it for coding on the go.
12:06
< Reiver>
Sure, a laptop is better, but the formfactor works out well enough.
12:06
< Reiver>
Tarinaky: Ahahahaha ahem.
12:06
<@Tarinaky>
Did I say something funny?
12:07
< Reiver>
You used 'decent' and 'on screen keyboard' together.
12:07
<@Tarinaky>
I know some people who swear by their iPads for that.
12:08
<@Tarinaky>
I have no personal experience because /poor/.
12:08
< Reiver>
Ehhh.
12:08
< Reiver>
You /can/ get reasonably quick on the right keypad.
12:09
< Reiver>
You're still neither as quick nor precise as you would be on even a cheap keyboard.
12:09
< Reiver>
It's fine for jotting meetings, or emergency code
12:09
< Reiver>
I wouldn't reccomend typing essays or serious project work.
12:09
<@Tarinaky>
Or prototyping?
12:09
< Reiver>
Right.
12:10
<@Tarinaky>
Seems reasonable to me.
12:10
<@Tarinaky>
Very few people are paid to write software during their commute~
12:10
< Reiver>
More than a couple dozen lines of programming, or a page or so of human-eyes-forgive-typos freeform text.
12:10
< Reiver>
And you'll start to notice the limitations.
12:15
< JustBob>
This is why I like my Note2, by the way.
12:15
< JustBob>
I can just jot down the notes by pen. :p
12:17
< JustBob>
Okay
12:17
< JustBob>
It's a bit last 4am.
12:17
< JustBob>
Too late to go to bed.
12:17
< JustBob>
Too early to do anything.
12:17
< JustBob>
...aside from hit the all-night mexican place for dinner.
12:19 Reiv_ [NSwebIRC@Nightstar-643275b4.ihug.co.nz] has joined #code
12:19
< JustBob>
Just, you know.
12:20
< JustBob>
Once I figure out why the hell my arms feel like I've done about 300 pushups.
12:20
< JustBob>
Because all I've done tonight is math. That should not make my arms sore.
12:29 Reiv_ [NSwebIRC@Nightstar-643275b4.ihug.co.nz] has quit [[NS] Quit: Page closed]
12:49 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
12:49 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
12:49 mode/#code [+o Syloq] by ChanServ
13:02
<~Vornicus>
http://imgur.com/zOQh2Q4 have a random stupid thing I made.
13:05
< AnnoDomini>
This looks like Derakon's randomly generated platformer.
13:06
<@Tarinaky>
My Gods I suck at OpenGL.
13:06 * Tarinaky headdesks.
13:09
<~Vornicus>
Anno: well, it is randomly generated. Not the same way Der's was though.
13:10
< AnnoDomini>
What's the difference?
13:11 Pandemic [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
13:11 mode/#code [+o Pandemic] by ChanServ
13:12
<~Vornicus>
well, Der used, iirc, voronoi diagrams. I'm doing something rather specific: each purple line is exactly the same length; I choose where to place new nodes based on where I can put it so that it's that length away from one node, and /no less/ than that distance from any other nodes.
13:13
< AnnoDomini>
OK.
13:14
< JustBob>
...man.
13:14
<~Vornicus>
That's what the red bubble is - the places where I can, right now, place a new node.
13:14
< JustBob>
I just fired off a huge email to a total stranger about what we as the American Nuclear Society should be doing at the college level.
13:15
< JustBob>
Well, about "We are asking OPD members to help provide Undergraduate and Graduate level engineering project challenges that would give students an engineering challenge that is relevant for the nuclear power industry."
13:15
<~Vornicus>
At each step I randomly choose a place on the bubble, and rejigger the bubble.
13:15
< AnnoDomini>
Vornicus: That's interesting. I was wondering how you drew the outline.
13:15
<~Vornicus>
Each node has a list of arcs that are still available to be used.
13:15
<~Vornicus>
I remove sections of the arcs as I add new nodes.
13:16
< JustBob>
My suggestion of an engineering project challenge? Coding a portable, dynamic nuclear powerplant simulator with the ability to plug-and-play with different reactor types.
13:17
< JustBob>
I'm talking sufficiently dynamic to have near-real-time xenon transient tracking, display neutron flux throughout the core, the whole nine yards. While simultaneously displaying the powerplant itself.
13:17
< JustBob>
I think I might be insane. :p
13:25
<@Tarinaky>
I think 'plug-and-play' different reactor types is probably a bit excessive as a college project.
13:25
<@Tarinaky>
Maybe if you specialise it to one type of reactor?
13:32 Stalker [Z@Nightstar-b920a19c.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
13:51
< JustBob>
Eh.
13:52
< JustBob>
There are two basic types of code; one for PWRs and one for BWRs.
13:52
< JustBob>
Aside from that, all you're really changing is parameters, not core equations.
13:53
<@Tarinaky>
Then word it as such. Load parameters from a data file.
13:53
<@Tarinaky>
Plugins make it sound like you're loading code at run time.
13:54
< JustBob>
Well, breaking it down... There'd be a BWR plugin, a PWR plugin, and maybe some others for shits and giggles.
13:54
< JustBob>
I mean, in general, PWRs have one type of core modeling equations, and BWRs have another, even if they're fairly similar.
13:54
<@Tarinaky>
To paraphrase cosmology: for large enough classes students are isomorphic and everywhere stupid.
13:55
< JustBob>
You just optimize for different things in the equations.
13:57
< JustBob>
I mean, they have MOOSE, which loads BISON, which can simulate /everything/ in a reactor.
13:57
< JustBob>
I'm talking down to the individual fuel pellets and their specific conditions.
13:57
< JustBob>
The problem is...
13:57
< JustBob>
That program ate a week's worth of PNNL's supercomputer cluster time... For fifteen seconds of operational data. :p
13:57 * Tarinaky shrugs.
13:59
< JustBob>
Anyway, my point is that you can scale it up and down; I mean, I can write a program to simulate a reactor on my calculator. But the equations I'd use would be hideously gross approximations, if I wanted anything resembling realtime data. Just a matter of scale.
14:02
<@Tarinaky>
I don't know enough about the specifics of what're meant by college students or nuclear physics to make reasonable suggestions or contributions.
14:02
<@Tarinaky>
I just see the word 'plugin' and immediately shudder.
14:02
< JustBob>
Oh, I'm not really worried.
14:02
<@Tarinaky>
Because implementing a system for the dynamic loading of code, (from scratch) that works well, is non-trivial.
14:02
< JustBob>
I'm in the manic-hyper stage of 'well, I thought I was going to sleep last night, but NO'
14:03
< JustBob>
Also, I'd consult with actual programmers. :p
14:03
< JustBob>
Though, to be honest, in the casual proposal I fired off, I recommended doing scripted events with "leeway" for operator input.
14:10 Stalker [Z@Nightstar-5aa18eaf.balk.dk] has joined #code
14:27 Turaiel[Offline] is now known as Turaiel
14:29 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Operation timed out]
14:34 AnnoDomini [abudhabi@Nightstar-08e28428.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
14:34 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
14:35 AnnoDomini [abudhabi@Nightstar-fa09c2b5.adsl.tpnet.pl] has joined #code
14:43 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
14:43 mode/#code [+o himi] by ChanServ
14:44
< AnnoDomini>
Grr.
14:45 Syka_ [the@Nightstar-c6850041.iinet.net.au] has joined #code
14:45
< AnnoDomini>
TheWatcher: That didn't seem to work. For some reason, it got stuck again, and didn't quit.
14:47 Syka [the@Nightstar-459e93f7.iinet.net.au] has quit [Ping timeout: 121 seconds]
14:59 celmin|sleep is now known as celticminstrel
15:00
<&ToxicFrog>
Tarinaky: thankfully one doesn't generally need to do that; the runtime handles it for you.
15:01 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
15:14 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
15:14 mode/#code [+o himi] by ChanServ
15:37
<@TheWatcher>
AD: that sounds like something inside do_one_loop is messing with the signal handler, then
15:41
< AnnoDomini>
I'm trying it again with some more eval.
15:41
< AnnoDomini>
Will see how it goes next connection loss.
15:57 Turaiel is now known as Turaiel[Offline]
16:01 celticminstrel [celticminst@Nightstar-1afc984c.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
16:28 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
16:58 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
16:58 mode/#code [+o himi] by ChanServ
17:04 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
17:06 Azash [ap@Nightstar-339920e6.net] has quit [NickServ (GHOST command used by Azash_)]
17:07 Azash [ap@Nightstar-339920e6.net] has joined #code
17:08 mode/#code [+o Azash] by ChanServ
17:17 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
17:17 mode/#code [+o himi] by ChanServ
18:21 Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has joined #code
18:21 mode/#code [+ao Derakon Derakon] by ChanServ
18:21 * Derakon eyes MicroManager.
18:22
<&Derakon>
You're supposed to be a professional piece of software.
18:22
<&Derakon>
So why are you writing "LabelToState!!!!!!!!!!!!!!!!!!!!!!!!: label 488nm-3" to standard output?
18:22
<&Derakon>
That's 24 exclamation points, by my count.
18:22
<&Derakon>
3 is a sure sign of a deranged mind!
18:23
< AnnoDomini>
Clearly this project was worked on by no less than 8 deranged devs.
18:23
< Syka_>
label to state?
18:23
< Syka_>
that sounds like the nazi rise to power
18:23
<&Derakon>
Syka: I'm pretty sure it's noting that I set a value using its string instead of its numeric index.
18:24
<&Derakon>
MicroManager has devices which have an opaque "State" that just has a numeric value, but there's usually corresponding string labels which are much more friendly.
18:26
<@Tarinaky>
" Clearly this project was worked on by no less than 8 deranged devs." << I thought derangement was mandatory to be a dev?
18:31
< Syka_>
am I deranged?
18:32
<@Tarinaky>
Yes.
18:33
< Syka_>
whoo!
18:33 * Syka_ writes some software
19:21
< JustBob>
Snerk.
19:21
< JustBob>
So, that software thing I was talking about? Apparently it was the first response they got, so it's sitting at the top of the list for review and consideration by a committee of my "learned elders."
19:21
< JustBob>
Simulation thing, that is.
19:22
< JustBob>
I kinda hope that it becomes a thing, just because there's almost zero connect between academic theory and actual operational practice here.
19:22
< JustBob>
(I just hope that they don't want me to write it or something.)
19:50 Kindamoody|out is now known as Kindamoody
20:09 Kindamoody is now known as Kindamoody[zZz]
20:42
<&McMartin>
10:18 <&Derakon> You're supposed to be a professional piece of software.
20:42
<&McMartin>
Nobody reads support logs, amirite >_>
20:50
<@Namegduf>
Some intelligent people just write *horribly* and unless someone actively intervenes to stop them (repeatedly) this ends up appearing.
20:54
<&McMartin>
Also, can't-happen errors that happen anyway are always fun
20:54
<&McMartin>
And then there's "people *do* read support logs so let's be shifty about some things"
20:54 * McMartin once dealt with a product that hid diagnostics for a feature that was not ready to be deployed to customers yet behind an "insufficiently fluffy kitten error"
20:55
<@Azash>
Amazing
20:55
<@Azash>
It was actually called that?
20:56
<&McMartin>
It was more if you dug up and read the logs one of the (many, many) initialization lines was "Insufficiently fluffy kitten detected code (hex string)"
20:56
<@Azash>
Lol
20:57
< AnnoDomini>
Not enough cheese, eh?
20:58
<&McMartin>
Does the OUT OF CHEESE ERROR require you to redo universe from start?
20:58
<&McMartin>
*Doesn't
20:58
< ErikMesoy>
I kinda like "insufficiently fluffy kitten error", it's a lot more memorable when the user calls in to report that it went wrong.
20:58
< AnnoDomini>
Ha.
20:58
< ErikMesoy>
Error numbers go in one ear and out the other.
20:59
<&McMartin>
This is one reason Amiga kept their BSOD codes as "GURU MEDITATION #xxxxxxxxx"
20:59
< ErikMesoy>
I've seen a variant where every error is named after a creature from Norse mythology.
20:59
<@Tarinaky>
I suspect this had more to do with time-to-market and some miscreant running Strings over their binary.
20:59
< ErikMesoy>
"Error: Ratatosk the gossip-bearing squirrel has done something wrong!"
21:00
<&McMartin>
(The other was that Amiga's primary OS guy apparently balanced seated on an exercvise ball or something)
21:01
< AnnoDomini>
ErikMesoy: TRIGGER WARNING: Ratatosk reminds me of Terror's Martyr's scenarios.
21:01
< AnnoDomini>
(:P)
21:02
< ErikMesoy>
AnnoDomini: Yeah, but you'll remember the error without having to write it down. :p
21:02
< ErikMesoy>
"Error: Nidhogg the dragon who gnaws at the roots of the world-tree caused an error."
21:03
< ErikMesoy>
Even if this washes out to "the error message said something about dragons" by the time the user calls in, you can identify it!
21:03
<&McMartin>
If you're B2B you can just demand they send you logs and put source lines in.
21:04
< ErikMesoy>
That works too.
21:09 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
21:09 mode/#code [+qo Vornicus Vornicus] by ChanServ
21:13
< AnnoDomini>
Hmmm.
21:14
< AnnoDomini>
What's faster: performing a uniform circular motion calculation to get a cartesian coordinate, or retrieving that value from a MS Access database? I'm assuming a modern multicore machine with an HDD.
21:21 Stalker [Z@Nightstar-5aa18eaf.balk.dk] has quit [Ping timeout: 121 seconds]
21:23
<&ToxicFrog>
I'm not familiar with the calculation; how expensive is it?
21:23
<&ToxicFrog>
Unless the answer is "rather", calculating is almost certainly going to be faster than anything that hits disk.
21:23
<&ToxicFrog>
Disk is slow.
21:24
<&ToxicFrog>
Also, I would favour the calculation even if slower just to avoid Access~
21:24
<&Derakon>
"Uniform circular motion calculation"?
21:24
<&Derakon>
What does that mean?
21:24
< AnnoDomini>
http://www.chem.ox.ac.uk/teaching/Physics%20for%20CHemists/Rotation/Circular.htm l
21:24
<&Derakon>
Converting to/from polar coordinates is dirt-cheap.
21:24
< AnnoDomini>
Specifically: http://www.chem.ox.ac.uk/teaching/Physics%20for%20CHemists/Rotation/Images/e7.gi f
21:25
<&Derakon>
Oh yeah, that's cheap.
21:25
<&Derakon>
Trig stopped being noticeably expensive, like, a decade ago at least.
21:26
<&Derakon>
Even when it was expensive, it would still have been cheaper than hitting the disk every time~
21:26
< AnnoDomini>
Are SSD drives fast enough to tip the balance or not enough?
21:26
<&Derakon>
(Instead, you'd use a pre-constructed lookup table, which loaded once at program start)
21:26
<&Derakon>
...look, this is the kind of thing that the vast majority of game developers do without thinking twice about.
21:26
<&Derakon>
Performance is Not An Issue unless you are severely resource-constrained.
21:28
< AnnoDomini>
Perhaps I should mention context. I'm inquiring on the Aurora 4x forums about why in all the hells the program stores current coordinates in the database (recalculating them at certain intervals and at-need), rather than calculating them on the fly.
21:28 * Derakon throws together a quick script, does 10k sin() operations in .001s, in Python.
21:28
<&Derakon>
I probably paid more for the loop than for the sin() calls.
21:29
< AnnoDomini>
The last poster posited that "simple database lookup" is faster than calculating on the fly.
21:29
<@froztbyte>
<Derakon> Trig stopped being noticeably expensive, like, a decade ago at least.
21:29
<@froztbyte>
more
21:29
<@froztbyte>
about '95, I'd say
21:29
<@froztbyte>
<AnnoDomini> Are SSD drives fast enough to tip the balance or not enough?
21:29
<@froztbyte>
I wouldn't say so
21:30
<@froztbyte>
you have something like 30ms disk access time there
21:30
<@froztbyte>
add on whatever you need for the application logic
21:30
<@froztbyte>
and the relevant FS access bits
21:30
<@froztbyte>
and you might be sitting at 200~300ms already
21:31
<&Derakon>
Of course, a proper DB will have an in-memory cache for commonly-accessed values.
21:31
<@froztbyte>
but it depends
21:31
<@froztbyte>
Derakon: aye
21:31
<@froztbyte>
and FS cache
21:31
<@froztbyte>
and and and
21:31
<@froztbyte>
so the question gets very complicated very quickly
21:31
<&Derakon>
"Too slow? Put a cache on it!"
21:31
<&Derakon>
It's amazing how many times that happened at Amazon.
21:32
<&ToxicFrog>
I did that last week.
21:32
<&ToxicFrog>
It helped a lot.
21:32
<@Tarinaky>
Python 2.7, error is perplexing me.
21:32
<@Tarinaky>
print event.x()
21:32
<@Tarinaky>
TypeError: an integer is required
21:33 * Vornicus wonders how the velocity on the near-circular bezier is.
21:33
<@froztbyte>
caches can often make a good difference, but people don't often have the right clue on the judgement call for when they should put a cache in
21:33
<@froztbyte>
(or how the cache should work)
21:33
<~Vornicus>
Tarinaky: what's event.x() look like
21:33
<@Tarinaky>
Why is an integer required? Where is an integer required?
21:33
<@Tarinaky>
Vornicus: http://srinikom.github.io/pyside-docs/PySide/QtGui/QMouseEvent.html#PySide.QtGui .PySide.QtGui.QMouseEvent.x
21:33
<@Tarinaky>
That's all I know about event.x()
21:33
<&ToxicFrog>
< AnnoDomini> Perhaps I should mention context. I'm inquiring on the Aurora 4x forums about why in all the hells the program stores current coordinates in the database (recalculating them at certain intervals and at-need), rather than calculating them on the fly.
21:33
<&ToxicFrog>
Isn't Aurora basically the Dwarf Fortress of space 4X games?
21:34
<&ToxicFrog>
If so, the answer is "because the developer has no goddamn clue how to program"
21:34
<@froztbyte>
'Return type:PySide.QtCore.int'
21:34
<@froztbyte>
at a very rough guess, that's not a type you can directly print?
21:34
<@froztbyte>
try see what repr() does with it
21:34
<@Tarinaky>
It's also not a type I can assign either.
21:34
<@Tarinaky>
I added the print because (x,y) = (event.x(), event.y() ) failed.
21:34
<&Derakon>
Try casting to a Python int?
21:34
<&Derakon>
Mm.
21:35
<&Derakon>
What if you just do "event.x() without doing anything with the result?
21:35
<~Vornicus>
No, this is an error somewhere in event.x's code
21:35
<&Derakon>
It may be that function doesn't actually work, yeah.
21:35
<@froztbyte>
yeah, there's that too
21:36
<@Tarinaky>
event.x()
21:36
<@Tarinaky>
TypeError: an integer is required
21:36
<&Derakon>
So go looking for Qt discussion online.
21:37
<&Derakon>
If you can't find anything relating to this, then submit a bug report.
21:37
<&Derakon>
Alternately, are you sure that you have an event where .x() and .y() are valid functions?
21:38
<@Tarinaky>
The documentation says they are.
21:38
<&ToxicFrog>
What's python for (take-while p? seq)?
21:38
<&Derakon>
TF: dunno, what does that do?
21:38
<@Tarinaky>
I'd question how you can have a mouse event without a position.
21:38
<&Derakon>
Tarinaky: are you sure you have a mouse event?
21:38
<@Tarinaky>
According to the documentation, yes.
21:38
<&Derakon>
Maybe you subscribed to more event types than you realized. Print the bare event.
21:38
<@froztbyte>
Derakon: iter
21:38
<@froztbyte>
Derakon: more or less
21:39
<@froztbyte>
http://clojuredocs.org/clojure_core/clojure.core/take-while
21:39
<@froztbyte>
(I'm sure you can figure out the rest)
21:39
<@Tarinaky>
http://pastebin.com/TtLXnGvs
21:39
< AnnoDomini>
If anyone's interested: http://aurora2.pentarch.org/index.php/topic,6475.0.html
21:40
<&ToxicFrog>
Derakon: returns all elements from seq up to (but not including) the first one for which (p? x) returns false.
21:40
<&ToxicFrog>
Basically a filter that stops entirely at the first fail.
21:40
<&Derakon>
Ah.
21:40
<&Derakon>
Hm, I can't think of a way to concisely replicate that in Python. Doesn't mean it's not possible.
21:42
<&Derakon>
Oh, wait.
21:42
<&Derakon>
...no, that still iterates over everything.
21:42
< ErikMesoy>
Sounds vaguely like "while"
21:43
<&Derakon>
Yeah, but you can't put while into a loop comprehension.
21:43
<&Derakon>
Er, list comprehension.
21:44
<&Derakon>
The simplest way would be "def filter(seq, p): for item in seq: if p(item): yield item; else: break"
21:44
<&Derakon>
Well, that's a generator function, but you could do similarly with an accumulator if you wanted.
21:44
<&Derakon>
Still not really all that elegant.
21:46 * Derakon ...s at his code.
21:46
<&ToxicFrog>
Derakon: yeah, I actually tried [x for x in seq while p(x)], but that's a syntax error.
21:46
<&Derakon>
if not shouldRefresh:
21:46
<&Derakon>
self.Refresh()
21:46
<&ToxicFrog>
Looks like itertools has a takewhile() function that returns an iterator.
21:47
<~Vornicus>
http://docs.python.org/3/library/itertools.html#itertools.takewhile
21:48
<~Vornicus>
Itertools gets an absolutely unbelievable amount of use from me.
21:49
<@Tarinaky>
Argh. Apparently I have another bug as well that I can't figure out :/
21:49
<@Tarinaky>
Apparently, no matter what button happens to be pushed, it still reports NoButton :/
21:49
<@Tarinaky>
WTF.
21:50
<&Derakon>
Is there a NoButton, or is that a "no button was pushed"?
21:50
<@Tarinaky>
NoButton is the name of the state that button() is in.
21:58 Stalker [Z@Nightstar-b920a19c.cust.comxnet.dk] has joined #code
21:58
<@froztbyte>
<ToxicFrog> Derakon: yeah, I actually tried [x for x in seq while p(x)], but that's a syntax error.
21:58
<@froztbyte>
something like [x if p(x) for x in seq] is probably what you want
21:59
<&Derakon>
No, that doesn't stop after the first failure.
21:59
<@froztbyte>
hmm, true
21:59
<@froztbyte>
sorry, I should read better ;p
22:00
<@froztbyte>
I don't actually know the insides of a listcomp well enough to know how I could cheat that
22:01
<~Vornicus>
listcomp is basically just map & filter.
22:02
<~Vornicus>
takewhile can't be efficiently created with map and filter.
22:20
<@Tarinaky>
Well, I think I figured out what my issue was... maybe.
22:21
<~Vornicus>
?
22:28
<@Tarinaky>
Well, it was getting no-button events because the mouse Event only records what's changed.
22:28
<@Tarinaky>
And since the button had neither been pushed or released (just held) it wasn't reporting it.
22:28
<@Tarinaky>
When I split it into three event handlers, one for pushed, released and move...
22:29
<@Tarinaky>
The x() issues also disappeared.
22:29
<@Tarinaky>
For reasons I don't know.
23:06
<&McMartin>
[tangent] baf says, "The traditional classification is that a microcomputer is one that you can throw across the room, a workstation is one that's too bulky or heavy to throw but which you can lift and put out the window, a minicomputer is one that's too heavy to lift but you can push it down the stairwell, and a mainframe is one that's too heavy to move and probably bolted to the floor."
23:07
<@Tarinaky>
And a Mac is one you can wrap a chain around and use as a boat anchor.
23:08
<&McMartin>
re: doing trig calculations: disks were slower back then too. Our old 80s micros did the calculations themselves
23:10 AnnoDomini [abudhabi@Nightstar-fa09c2b5.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
23:15
<&Derakon>
McM: well, precomputed trig values were a Thing.
23:15
<&Derakon>
I'm pretty sure the fire bars in Super Mario Bros. used precomputed values~
23:18
<@Azash>
Wasn't fast inverse square root developed to avoid lookups?
23:25
<&McMartin>
Derakon: True enough
23:25
<&McMartin>
When you have lots of ROM you can do that too
23:44 AnnoDomini [abudhabi@Nightstar-1107f6af.adsl.tpnet.pl] has joined #code
23:45
<&Derakon>
If you're just dealing with circles and you aren't too fussed about accuracy, you can get away with IIRC 4 values to define a circle with 24 line segments.
23:45 Kindamoody[zZz] [Kindamoody@Nightstar-05577424.tbcn.telia.com] has quit [Operation timed out]
23:46
<&Derakon>
On-axis, 15, 30, and 45 degrees, and then you mirror/invert to get the other octants.
23:46
<~Vornicus>
I was just the other week looking into how the commodore 64 did trig stuff.
23:46
<~Vornicus>
I then got Quite Sidetracked, so
23:47
<&McMartin>
I thought you got your answers?
23:47 * Derakon goes poof.
23:47 Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has quit [[NS] Quit: leaving]
23:48
<~Vornicus>
Well, not really -- I got the coefficients and was starting to work on disassembling the routines, but I was finding it difficult to actually follow the stuff around to disassemble everything I needed.
23:50
<~Vornicus>
Anyway one semicanonical way of doing circles is actually a single cubic bezier; it's good to about 0.03%.
23:51
<~Vornicus>
But it's not great if you're trying to intersect stuff. Cubic solves et al
23:59 You're now known as TheWatcher[T-2]
--- Log closed Sat Oct 12 00:00:46 2013
code logs -> 2013 -> Fri, 11 Oct 2013< code.20131010.log - code.20131012.log >

[ Latest log file ]