code logs -> 2015 -> Fri, 20 Mar 2015< code.20150319.log - code.20150321.log >
--- Log opened Fri Mar 20 00:00:26 2015
00:32 abudhabi [abudhabi@Nightstar-7nkq9k.de] has quit [Ping timeout: 121 seconds]
00:32 abudhabi [abudhabi@Nightstar-7nkq9k.de] has joined #code
01:40 Orthia [orthianz@Nightstar-cme.t1g.224.119.IP] has quit [Ping timeout: 121 seconds]
01:41 Orthia [orthianz@Nightstar-l2c.913.224.119.IP] has joined #code
01:41 mode/#code [+o Orthia] by ChanServ
02:11 AverageJoe [evil1@Nightstar-pqipp9.sd.cox.net] has joined #code
--- Log closed Fri Mar 20 02:20:26 2015
--- Log opened Fri Mar 20 02:20:32 2015
02:20 TheWatcher [chris@Nightstar-ksqup0.co.uk] has joined #code
02:20 Irssi: #code: Total of 44 nicks [26 ops, 0 halfops, 0 voices, 18 normal]
02:20 mode/#code [+o TheWatcher] by ChanServ
02:21 Irssi: Join to #code was synced in 34 secs
02:37 Thalass|afk [thalass@Nightstar-h1qmno.eastlink.ca] has quit [[NS] Quit: Leaving]
02:58 Reiver is now known as Orth
03:18 Turaiel[Offline] is now known as Turaiel
03:52 AverageJoe [evil1@Nightstar-pqipp9.sd.cox.net] has quit [[NS] Quit: Leaving]
04:07 Derakon is now known as Derakon[AFK]
04:41 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
05:03 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has quit [[NS] Quit: Quit]
05:04 Kindamoody[zZz] is now known as Kindamoody
05:10 himi [fow035@Nightstar-dm0.2ni.203.150.IP] has quit [Ping timeout: 121 seconds]
05:11 celticminstrel [celticminst@Nightstar-gmujup.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
05:25 AverageJoe [evil1@Nightstar-pqipp9.sd.cox.net] has joined #code
05:49 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
05:57 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
05:57 mode/#code [+o Syloq] by ChanServ
05:58 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Connection closed]
06:02 Turaiel is now known as Turaiel[Offline]
06:05 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
06:05 mode/#code [+o Syloq] by ChanServ
06:40 kourbou|zzz is now known as kourbou
06:53 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
07:04 kourbou [holoirc@Nightstar-deqg8j.fbx.proxad.net] has quit [Connection closed]
07:29 Kindamoody is now known as Kindamoody|afk
07:55 AverageJoe [evil1@Nightstar-pqipp9.sd.cox.net] has quit [[NS] Quit: Leaving]
09:19 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
09:19 mode/#code [+o himi] by ChanServ
10:41
<@Tarinaky>
http://goo.gl/USJTSP
10:41
<@Tarinaky>
This makes me giggle.
10:43
< abudhabi>
This makes me goggle.
11:27
<@Tarinaky>
Sadly the partial eclipse today was a damp squib.
11:27
<@Tarinaky>
Too much cloud cover.
11:32
< abudhabi>
It slightly darker!
11:35
<@TheWatcher>
I'm pretty certain that there's actually a secret organisation in the UK, and whenever there is likely to be an interesting atronomical event they turn on a machine that generates cloud cover.
11:36
<@TheWatcher>
Eclipse due? CLOUD COVER! Meteor showers incoming? CLOUDS! Aurora lifely to be visible? Guess what? It's cloud time!
11:37
<@TheWatcher>
*likely
11:37
<@TheWatcher>
Fuckers, with their fucking cloud fucking machine *grumbles*
11:44
< abudhabi>
Perfidious Albion!
11:44
<@Tarinaky>
TheWatcher: Yes, but they determined the cheapest way to achieve this goal was to have a lot of cloud cover the rest of the year as well.
11:45
<@Tarinaky>
Anyway, apparently it was visible in Wales.
11:45
<@gnolam>
Bah. You're the Tropical South.
11:45
<@Tarinaky>
And I remember seeing the eclipse in the 90s and it being a good day.
11:45
<@gnolam>
I almost got sunburned last weekend in London.
11:46
<@Tarinaky>
Just because you got sunburned doesn't mean it wasn't cold.
11:46
<@TheWatcher>
Or that it was actually sun~
11:46
<@Tarinaky>
You can get sunburn at the arctic.
11:49
<@gnolam>
I once got second-degree sunburn on an overcast day in Gloucestershire. You're the Tropical South.
11:51
<@Tarinaky>
Have you considered the possibility that perhaps you just burn easily due to a lack of pigmentation in the skin?
11:51 * TheWatcher looks at the channel name
11:51
<@TheWatcher>
I think that probably goes for all of us~
11:52
<@gnolam>
Ah, but I don't at proper Frozen Northian latitudes.
11:52
<@Tarinaky>
gnolam: Yes. Because you're at home.
11:52
<@Tarinaky>
i.e. inside your home.
11:52
<@Tarinaky>
i.e. not wandering around like a tourist in the midday sun.
11:53
<@Tarinaky>
I haven't been sunburned since I was a kid.
11:55
<@Tarinaky>
In othernews: why is a mail order/online clothing cataloge I order clothes from sometimes because I'm fat, trying to sell me 'Pools' over the phone :/
11:55
<@Tarinaky>
I think something to do with football which just perplexes me even further.
12:07
<@TheWatcher>
It's betting on the outcome of games, basically.
12:08
<@TheWatcher>
(so called because the entry fees are pooled, and then distributed out amongs the players based on the number of correct game predictions they make)
12:26
<@Tarinaky>
Why is a clothing company trying to sell me gambling :/
12:27
< [R]>
Gotta be able to afford their 999999% marked up clothing line somehow.
12:29
<@Tarinaky>
They're not actually that bad compared to other retailers. Particularly for large shoes... Normally shoes in odd sizes are some combination of ridiculously expensive, disgustingly ugly or fall apart after 2 wears.
12:33
<@TheWatcher>
Tarinaky: Littlewoods?
12:34
<@Tarinaky>
SimplyBe.
12:35
<@Tarinaky>
Scumbag company is scumbag :/
12:35
<@TheWatcher>
ah, I don't know that one. No idea why they'd be doing football pools
12:59
<@Tarinaky>
This could be interesting once it's finished https://gumroad.com/l/write-yourself-a-roguelike
13:00
<@Tarinaky>
Price is too high and content too low atm though.
13:01 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
13:01 mode/#code [+o Checkmate] by ChanServ
13:03
< abudhabi>
Dang, Nethack still hasn't updated from 3.4.3.
13:05
< EvilDarkLord>
Isn't that game the classic example of ivory tower devs thinking they have perfection on their hands?
13:06
< EvilDarkLord>
Considering it still has a playerbase, maybe they're actually right.
13:06
<@Tarinaky>
Well, Nethack is certainly the premier Nethack solution.
13:07
<@Tarinaky>
If you're going to play a Nethack, Nethack is the Nethack you play.
13:10
< abudhabi>
EvilDarkLord: The current version has outstanding bugs, and not exactly trivial ones, like the Helm of Brilliance exploit.
13:11
< abudhabi>
TL;DR: By careful wearing, doffing and enchantment of a Helm of Brilliance, it's possible to easily max out mental attributes.
13:11
< abudhabi>
I've never quite understood how that works.
13:14
<@TheWatcher>
A wizard did it.
13:14 * TheWatcher nods sagely
13:14
<@Tarinaky>
An alchemist broke it.
13:15
<@TheWatcher>
Always do, blasted firework merchants.
13:15
< abudhabi>
Then there's the one that allows unlimited multiplication of hit points by controlling self-polymorphing at low levels.
13:15
< abudhabi>
(And mana points.)
13:15
<@Wizard>
TheWatcher: I believe the burden of proof is on you
13:16
< abudhabi>
This is how many of the toplisters have ridiculous amounts of HP.
13:18
<@Wizard>
New on the learning menu: Spring and SIP
13:18 * Wizard hnngs
13:19
< abudhabi>
http://nethack.org/v343/bugs.html#S343-8
13:19
< EvilDarkLord>
abudhabi: This exploit seems to fit well with the game's philosophy of winning being contingent on knowing a lot of minutiae about the game.
13:19
< EvilDarkLord>
So maybe it's not a bug at all!
13:19
< abudhabi>
Having many HP is hardly required to win the game. Indeed, if you need many HP, you're doing something wrong.
13:20
<@Wizard>
$40 for learning how to write a roguelike seems absurd
13:21
<@Tarinaky>
Wizard: Agreed. But I want to keep an eye on it in case the price comes down.
13:21
<@Tarinaky>
Also: the $40 doesn't include the chapters on the interesting stuff.
13:21
<@Wizard>
I figure you might as well use the same time to learn how to do it yourself
13:22
<@Wizard>
The concepts are not very complex, and you will have a chance to practice your analytic design
13:22
<@Tarinaky>
I think the book might be aiming itself as a learn to program book though
13:22
<@Wizard>
Absolutely
13:24
< EvilDarkLord>
Just going through the open bugs on that page, they seem mostly minor. The one about teleporting to an unescapeable room in Minetown seems like the biggest issue, and rust monsters eating non-ferrous items is just more minutiae for the player to know about.
13:25
< abudhabi>
EvilDarkLord: ALL of these are unreleased.
13:25
<&ToxicFrog>
abudhabi: as far as anyone can tell, the original devteam has basically abandoned nethack.
13:25
<&ToxicFrog>
There's a whole bunch of forks now, though.
13:25
< EvilDarkLord>
Oh. Well. That's an issue.
13:25
< abudhabi>
There was a leak in 2014, and the dev team denounced it.
13:33
<@Tarinaky>
http://people.cs.umass.edu/~kalo/papers/ShapeSynthesis/ShapeSynthesis.pdf
13:34
<@Tarinaky>
Err, wrong link
13:34
<@Tarinaky>
http://people.cs.umass.edu/~kalo/papers/ShapeSynthesis/index.html
13:34
< EvilDarkLord>
That 404s.
13:35
<@Tarinaky>
The second one?
13:35
<@Tarinaky>
It... doens't 404 for me :/
13:35
< EvilDarkLord>
Yes.
13:35
< EvilDarkLord>
Oh, whoops. My client is drunk.
13:41 gnolam_ [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has joined #code
13:43
<@Tarinaky>
EvilDarkLord: That's very unprofessional of them.
13:44 gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has quit [Ping timeout: 121 seconds]
13:45 Orthia [orthianz@Nightstar-l2c.913.224.119.IP] has quit [Ping timeout: 121 seconds]
13:46
< abudhabi>
Argh, Google. Just let me send these damned files by email!
13:46
< abudhabi>
What do you care that they're >25 MB?
13:46
< EvilDarkLord>
Isn't there a thingie for that that lets you upload them to Google Drive or something?
13:47
< abudhabi>
Apparently, but the most convenient would be to send them via email.
13:47
<@TheWatcher>
Yeeah, that 'shove them somewhere and send a link' time - even if you could persuade it to send them, there's no guarantee the destination would accept an email that size
13:48
<@TheWatcher>
5, 10, and 20MB limits are really common IME.
13:48
< abudhabi>
TheWatcher: Fine, but I've tried to split the archive into smaller parts and mail them in separate emails. Google blocked this.
13:59 gnolam_ is now known as gnolam
13:59 mode/#code [+o gnolam] by ChanServ
14:07 celticminstrel [celticminst@Nightstar-gmujup.dsl.bell.ca] has joined #code
14:07 mode/#code [+o celticminstrel] by ChanServ
14:37 * TheWatcher bleghs, wishes jsfiddle would let you hide the sidebar
15:09
<&ToxicFrog>
abudhabi: sending large binaries by email is almost never a good idea; they have to be base64-encoded (so they bloat) and the protocol can't really deal with connection interruptions and suchlike while sending them.
15:15
<@Tarinaky>
And a lot of users are still using POP3 which doesn't provide any mechanism for downloading mail without the attachment
15:15
<@Tarinaky>
So a couple of large binaries in the queue can make syncing mail turn into a massive download.
15:26
< abudhabi>
But I'm sending these to myself, on another Google account.
15:27 kourbou|ingame [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
15:29
< kourbou|ingame>
Hey peeps, what's coding?
15:31
<@Tarinaky>
Is that like a... please define what coding is...
15:32
<@Tarinaky>
Or a "What's cooking?"/"WHat're you coding"?
15:35
<&ToxicFrog>
kourbou|ingame: what game?
15:35
<&ToxicFrog>
And to answer your question...header whack-a-mole at work today.
15:35
< kourbou|ingame>
LoL
15:36
< kourbou|ingame>
Tarinaky was meant to be a pun lol
15:36
< kourbou|ingame>
I'm playing LoL ToxicFrog
15:36
<@Tarinaky>
I didn't get the pun.
15:37
< kourbou|ingame>
Whats cookin
15:37
<@Tarinaky>
I want to get back into DOTA but literally nobody I know plays it. Everyone plays LoL :/
15:37
< kourbou|ingame>
Whats codin
15:37 * Tarinaky stares at kourbou vacantly.
15:37
< kourbou|ingame>
Dont play LoL
15:37
<@Tarinaky>
I know, I won't. It looks pants.
15:38
< kourbou|ingame>
Nah its fun
15:38
< kourbou|ingame>
The community is a pain.
15:38
< kourbou|ingame>
Bunch of 12 yr olds.
15:40
<@Tarinaky>
The average DOTA player could be replaced by a perl script that shouted 'CYKA BLYAT', pinged the map randomly and wandered around the map randomly. Although you'd need to special case never, ever, buying Wards.
15:41
<@Tarinaky>
Oh yeah, and when they died they'd ping the map in a really passive aggressive way.
15:41
<@Tarinaky>
This is why I want people to play DOTA /with/
15:42
<@TheWatcher>
"< kourbou|ingame> Bunch of 12 yr olds." - IME that describes pretty much every multiplayer game there is~
15:42
<@Tarinaky>
What's the age of the average Quake player?
15:42
<@Tarinaky>
30?
15:49
< kourbou|ingame>
LoL
15:49
< kourbou|ingame>
lol
15:50
<@Tarinaky>
http://thedailywtf.com/articles/Im-Sure-You-Can-Deal
15:51
<@Tarinaky>
"I just saved $4 dollars' worth of electricity and it only cost us about 200 grand in equipment! "
15:53
< kourbou|ingame>
lol
15:54
< kourbou|ingame>
What's CYKA BLYAT?
15:55
<@Tarinaky>
Russian swearing
15:55
<@Tarinaky>
Cyka is something like 'bitch' iirc.
16:03
< kourbou|ingame>
ok
16:03
< kourbou|ingame>
xD
16:03
< kourbou|ingame>
Learn something everyday rite? :P
16:48 AverageJoe [evil1@Nightstar-8fj10j.dsl.impulse.net] has joined #code
17:08 AverageJoe [evil1@Nightstar-8fj10j.dsl.impulse.net] has quit [[NS] Quit: Leaving]
17:25 Derakon [chriswei@Nightstar-5fqf0m.ca.comcast.net] has joined #code
17:25 mode/#code [+ao Derakon Derakon] by ChanServ
17:26 * Derakon mutters at Clojure.
17:27
<&Derakon>
My biggest problem with functional languages is how oftentimes a ton of functionality is crammed into a single line of code.
17:27
<&Derakon>
Which makes it bloody hard to read especially when there's no fucking comments, Arthur.
17:27
<&Derakon>
(Arthur is not the new Sebastian, note)
17:28
<&Derakon>
(He's just prone to making poor decisions)
17:32
<&Derakon>
A secondary peeve is the inability to add debugging print statements without e.g. abusing the "let" block.
17:49
<&Derakon>
Bah. Can't figure this one out.
17:49
<&Derakon>
(map #(. ChannelSettings getColorForChannel % channel-group (. Color WHITE)) sorted-super-names)
17:50
<@Tarinaky>
C is my favourite Functional language :P
17:50 * Tarinaky ducks.
17:50
<&Derakon>
Assuming that sorted-super-names is a sorted list of strings, and getColorForChannel returns consistent results given consistent inputs, can anyone tell why this line doesn't return the same results across two different invocations?
17:50
<&Derakon>
They're the same list contents, but their order is screwed up.
17:51
<&Derakon>
Complete method here: http://pastebin.com/VmUniAYn
17:56 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
17:58 kourbou|ingame [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [Ping timeout: 121 seconds]
18:00
<&McMartin>
Does channel-group change?
18:05
<&Derakon>
Good question, and no, it does not.
18:07
<&Derakon>
Here's my logging output: http://pastebin.com/ZSd157ce
18:07
<&Derakon>
The "Asked for color" logging comes from getColorForChannel.
18:07
<&Derakon>
It notes the channel name, channel group ("Channel"), default color (always white), and then the result value.
18:07
<&Derakon>
(Which is represented as an RGB-encoded int here)
18:08
<&Derakon>
I'm going to go to lunch; I'll leave this login idling. Will be back in probably half an hour or less.
18:10 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has joined #code
18:10 mode/#code [+o Vash] by ChanServ
18:32
<&Derakon>
Guess I'll just wait for ToxicFrog to notice this, then...
18:40 kourbou is now known as kourbou|foodz
18:42 Turaiel[Offline] is now known as Turaiel
18:45 * ToxicFrog pokes at Derakon's conundrum
18:47
<&ToxicFrog>
I have a bunch of style comments on the full method~
18:50
<&Derakon>
You aren't the only one. -_-
18:50
<&Derakon>
Albeit your style comments would probably teach me a thing or two about Clojure.
18:51
<&ToxicFrog>
Derakon: I note that in the output, they aren't the same list elements, even once you correct for order
18:51
<&ToxicFrog>
[0 204 0] [204 0 0] [0 0 255] [255 255 255]
18:51
<&ToxicFrog>
[0 0 204] [0 204 0] [255 0 0] [255 255 255]
18:51
<&Derakon>
...interesting. And the logging bears that out. Hm.
18:52
<&Derakon>
There's no -65536 entry in teh first block of logs.
18:52
<&Derakon>
But there is in the second (for DAPI-Camera).
18:53
<&Derakon>
Sooo...guessing the logic that updates the data that getColorForChannel pulls from is wrong.
18:53
<&ToxicFrog>
Yeah.
18:53
<&ToxicFrog>
The clojure code is stylistically questionable, but correct.
18:53
<&ToxicFrog>
So it's getColorForChannel you need to look at.
18:54
<&ToxicFrog>
Also, things that stood out to me immediately:
18:54
<&ToxicFrog>
- keywords can be used as functions, so #(:foo %) can be replaced with :foo
18:54
<&ToxicFrog>
- the foo/bar/s1 bindings in the let can be done away with; push the (prn)s into the body of the let
18:56
<&Derakon>
Got it, thanks.
18:56
<&Derakon>
I have approximately -1 formal training in Clojure, and those were both my fault.
18:56
<&Derakon>
(Arthur had a similar level of training when he started this project, I am lead to understand, though presumably he did manage to improve with practice)
18:57
<&ToxicFrog>
Also, "." is a low-level form; I'd rewrite that as #(ChannelSettings/getColorForChannel % channel-group Color/WHITE)
18:57 kourbou|foodz is now known as kourbou
18:57
<&ToxicFrog>
Assuming that getColorForChannel and WHITE are static members of the ChannelSettings and Color classes.
18:57
<&Derakon>
They are.
18:57
<&Derakon>
What do you mean by "low-level form"?
18:58
<&ToxicFrog>
"." is a special form that things like (.toString x) and (System/getProperty "foo") macroexpand into.
18:58
<&ToxicFrog>
It can get pretty ugly, and while there are reasons to use it directly, 90% of the time you want either (.method Obj) or Class/staticMember
18:59
<&ToxicFrog>
Details: http://clojure.org/java_interop
18:59
<&Derakon>
Gotcha.
19:00
<&ToxicFrog>
Oh yeah, and if you do need throwaway things in the bindings of a let, just use _ as the name for all of them. It's not special like in Scala.
19:01
<&Derakon>
I've never written Scala~
19:01
<&Derakon>
But noted.
19:01
<@gnolam>
Ah, so /that's/ what that function is supposed to do.
19:01 * gnolam whittles a spectrum rejiggering function down from 20+ hard-to-read lines to 3 easy-to-read ones.
19:02
<@gnolam>
And as a bonus, I can now rename it from black_magic().~
19:02
<&ToxicFrog>
Derakon: Scala actually has some seriously cool features built around _; in particular (_/2) and foo(1, 2, _, 4) are partial application of operators and functions respectively, and unlike Haskell you can "skip" args while partially applying without manually creating a wrapper function.
19:03
<&Derakon>
Ahh. So foo(1,2,_,4) is a method of one argument and that argument gets slotted into the third slot of foo()?
19:04
<&ToxicFrog>
Yes.
19:05
<&ToxicFrog>
The drawback of this, of course, is that Scala is very much a "gives you enough rope to blow off the legs of all future maintainers" language when it comes to implicits and new operators and whatnot.
19:06
<&Derakon>
Ahh, implicit arguments.
19:07
<&Derakon>
A key tool in making your code an unmodifiable, tightly-webbed glob of unreadable lines.
19:09
<&ToxicFrog>
Implicit type conversions, actually.
19:10
<&ToxicFrog>
Which in Scala are, at least, scoped.
19:10
<&Derakon>
Ahh. Implicit type conversion bothers me less.
19:10
< kourbou>
Scala is scary.
19:10
<&Derakon>
Maybe just because I'm used to mentally tracking the types of the variables I'm working with anyway, thanks to long experience in Python.
19:11
< kourbou>
It's like a mix between Java and Mindf**k
19:11
<&Derakon>
Brainfuck, you mean?
19:11
< kourbou>
Yes
19:11
< kourbou>
:P
19:16
<&ToxicFrog>
Derakon: yeah, Scala actually has the sanest implementation of implicit type conversion I've seen, and the type checker is top notch
19:16
<&ToxicFrog>
But it combines with all the other features to make it very easy to write a Scala program where every file is its own bespoke, hand-crafted DSL.
19:18
<&ToxicFrog>
I wonder if I should poke at Scala again. I did enjoy the language, just the tooling and library ecosystem disappointed me.
19:46
<@froztbyte>
those seem like pretty big "just"s
19:48
<&ToxicFrog>
froztbyte: yes. But they're also more likely to have been fixed in the last few years than issues with the core library design.
19:51
<@froztbyte>
ah
19:51
<@froztbyte>
a couple of years might be enough of a window, I suppose
19:51
<@froztbyte>
holy crap, when did twitter switch to their Scala runtimes?
19:52
<&McMartin>
Years and years ago
19:52
<@froztbyte>
yeah
19:52
<@froztbyte>
uhm, sorry, I posed that incorrectly
19:52
<@froztbyte>
I'm aware they switched, I'm just trying to adjust the timeframe in my mind
19:52
<@froztbyte>
because it still feels like "read that post a couple of months ago" and it's probably like 5 years
19:53
<@froztbyte>
http://readwrite.com/2011/07/06/twitter-java-scala
19:55
<@froztbyte>
still doesn't really help the mental timeline :s
19:56
<&McMartin>
Heh
19:59
<&McMartin>
http://arstechnica.com/security/2015/03/mris-show-our-brains-shutting-down-when- we-see-security-prompts/
20:00 kourbou|phone [holoirc@Nightstar-deqg8j.fbx.proxad.net] has joined #code
20:00
<@froztbyte>
McMartin: that's pretty impressive
20:01
<@froztbyte>
also I would love to see that extended to things like gpg, openssl, etc
20:01
<@froztbyte>
(all those things which feel so incredibly tedious to use)
20:01 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [NickServ (RECOVER command used by kourbou|phone)]
20:01 kourbou|phone is now known as kourbou
20:23
<&Derakon>
Right, found my bug.
20:23
<&Derakon>
And it's a dumb one.
20:23
<&Derakon>
Did you know that java.awt.Color() supports conversion to/from 32-bit integers? The me of a couple months ago didn't.
20:23
<&Derakon>
So I wrote my own manual rgbToColor() and colorToRgb() methods.
20:23
<&Derakon>
And they're buggy.
20:24
<&McMartin>
I actually did know that because it's why all my old 8-bit sprite/bitmap programs were in Java
20:24
<&Derakon>
So our data acquisition engine (in Clojure) reads the user's saved preferences to get the colors to use. These get propagated to our display layer by way of a JSON dictionary, at which point our DisplaySettings object decodes them and gets the colors to use for each channel.
20:24
<&McMartin>
(java.awt.Color() and java.awt.image.BufferedImage() are both very nice classes)
20:24
<&Derakon>
Except it does it wrong, and rotates the components of each color in the process.
20:24
<&Derakon>
These new colors then get saved into the user's preferences.
20:25
<&Derakon>
And the next time the acquisition engine runs, it gets those new colors, stores them in a JSON dictionary, and...
20:25
<&McMartin>
As much fun as a barrel shifter full of monkeys
20:25
<&Derakon>
So in practice every time you ran an acquisition, your colors would cycle: RGB -> GBR -> BRG -> RGB.
20:26
<&Derakon>
I thought that it was an indexing problem (i.e. channels grabbing a different channel's color) because it just so happened that my test colors were red, green, and blue...
20:26
<&Derakon>
Though not pure, 0xff0000 etc. colors.
20:26
<&Derakon>
Which is what TF noticed.
20:26
<&Derakon>
"Oh hey, the red in this run isn't exactly the same as the red in the second run."
20:50 Kindamoody|afk is now known as Kindamoody
20:58 Turaiel is now known as Turaiel[Offline]
21:06
<@Tarinaky>
Better turn live tile off on the photo app before awkwardness happens.
21:06
<@Tarinaky>
>.>
21:11 * Derakon finds a bug in the branch of the Clojure code that hadn't been running before.
21:11
<&Derakon>
I have a list of Strings. I also have a list of hashmaps.
21:12
<&Derakon>
For each entry in the Strings, I want to find the hashmap at the corresponding index, and return the "color" key from that map.
21:12 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
21:12
<&Derakon>
E.g. if the strings were ["apples", "bananas", "oranges"] then I want to feed in "bananas", get the second hashmap, and return its color entry.
21:12
<&Derakon>
(map #((:color (super-channels (.indexOf channel-names %))) channel-names))
21:12
<&Derakon>
^ That is my non-working attempt.
21:12
<&Derakon>
Error is "Wrong number of args (1) passed to: core$map".
21:13
<&Derakon>
...wait.
21:13
<&Derakon>
Fucking parentheses.
21:13
<&Derakon>
Fixed to:
21:13
<&Derakon>
(map #((:color (super-channels (.indexOf channel-names %)))) channel-names)
21:14
<&Derakon>
And now it's "clojure.lang.LazySeq cannot be cast to clojure.lang.IFn"
21:15
<&McMartin>
You put a close paren in the wrong place, are invoking the result of map somehow.
21:16
<&Derakon>
This is why whitespace is the ideal code delimeter :colbert:
21:16
<&McMartin>
Clojure has no restrictions on whitespace, you can totally do that thing~
21:16
<&McMartin>
It should autotab for you~
21:16
<&Derakon>
But then I'd be breaking style with the other 1000 lines in this method.
21:17
<&Derakon>
I'm still retabbing this one function just for debugging.
21:17
<&Derakon>
But I'm gonna have to munge it when I'm done.
21:18
<&Derakon>
Okay, I think this time it's because I didn't use the Clojure indexing method to index into super-channels.
21:18
< [R]>
Derakon: The style beforehand used codegolf, so fuck the prior style.
21:18
<&Derakon>
Tempting, but I might get an STD~
21:18
<&Derakon>
And yeah, replacing that inner bit with "(nth super-channels (.indexOf channel-names %))" allows it to run.
21:22
<&McMartin>
Something that isn't obvious except from teh error message, mind:
21:22
<&McMartin>
map and filter and similar such functions return "seqs", not lists or vectors.
21:22
<&McMartin>
"seqs" are basically what Python would call "generators"
21:22
<&McMartin>
(as a Lisp descendant, Clojure calls map/etc "lazy")
21:25
<&Derakon>
Not really surprising in hindsight, but could easily be the cause of bugs, yeah.
21:30
<&McMartin>
This is actually a feature unique to Clojure in its language class
21:31
<&McMartin>
(I got burned by this a bunch going to it from Scheme, where the only difference between map and for-each is that one throws the value away)
21:31
<&McMartin>
(Whereas in Clojure it's the difference between lazy and eager evaluation of the the function on the arguments, which is Kind Of A Big Deal if that function was, like, println)
21:33
<&Derakon>
But println has Side Effects and is therefore Bad and Wrong~
21:37
<&McMartin>
Clojure is not strictly functional; it doesn't even have tail call elimination
22:15 kourbou [holoirc@Nightstar-deqg8j.fbx.proxad.net] has quit [Connection closed]
22:17 kourbou [holoirc@Nightstar-deqg8j.fbx.proxad.net] has joined #code
22:18 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
22:18 mode/#code [+qo Vornicus Vornicus] by ChanServ
22:22 Derakon [chriswei@Nightstar-5fqf0m.ca.comcast.net] has quit [[NS] Quit: leaving]
22:23 * McMartin finds http://en.wikipedia.org/wiki/G%C3%B6del_metric again
22:23
<&McMartin>
Which still includes the immortal sentence "This spacetime admits a remarkable five-dimensional Lie algebra of Killing vectors"
22:28 Checkmate [Z@Nightstar-g2q2tu.customer.tdc.net] has joined #code
22:28 mode/#code [+o Checkmate] by ChanServ
22:47 kourbou is now known as kourbou|actuallyzzz
23:17 Orthia [orthianz@Nightstar-osp.c65.224.119.IP] has joined #code
23:18 mode/#code [+o Orthia] by ChanServ
23:20 Kindamoody is now known as Kindamoody[zZz]
23:28 Derakon[AFK] is now known as Derakon
23:36 Red_Queen [Z@Nightstar-101.mee.63.87.IP] has joined #code
23:36 mode/#code [+o Red_Queen] by ChanServ
23:36 Checkmate [Z@Nightstar-g2q2tu.customer.tdc.net] has quit [Connection closed]
--- Log closed Sat Mar 21 00:00:42 2015
code logs -> 2015 -> Fri, 20 Mar 2015< code.20150319.log - code.20150321.log >

[ Latest log file ]