code logs -> 2012 -> Mon, 09 Jul 2012< code.20120708.log - code.20120710.log >
--- Log opened Mon Jul 09 00:00:49 2012
00:43 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code
00:50 Alek [omegaboot@Nightstar-56dbba0f.in.comcast.net] has quit [Ping timeout: 121 seconds]
00:56 Ariii [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has joined #code
01:14 Ariii [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has quit [Ping timeout: 121 seconds]
01:14 Ariii [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has joined #code
02:15 Attilla [Obsolete@Nightstar-d2497510.as43234.net] has quit [Ping timeout: 121 seconds]
02:17 himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Connection closed]
02:18 himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code
02:18 mode/#code [+o himi] by ChanServ
03:01 SmithKurosaki [smith@Nightstar-1748d158.home1.cgocable.net] has joined #code
03:03 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
03:03 mode/#code [+o PinkFreud] by ChanServ
03:03 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Z-Lined: Your IP range has been attempting to connect too many times in too short a duration. Wait a while, and you will be able to connect.]
03:18 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
03:18 mode/#code [+o PinkFreud] by ChanServ
03:24 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Z-Lined: Your IP range has been attempting to connect too many times in too short a duration. Wait a while, and you will be able to connect.]
03:41 Noah [nbarr@Nightstar-e4b6966f.tn.comcast.net] has quit [Ping timeout: 121 seconds]
03:42 Noah [nbarr@Nightstar-e4b6966f.tn.comcast.net] has joined #code
03:43 Kindamoody[zZz] is now known as Kindamoody
04:07 Ariii [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has quit [Connection closed]
04:29 Ariii [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has joined #code
04:57 SmithKurosaki [smith@Nightstar-1748d158.home1.cgocable.net] has quit [Ping timeout: 121 seconds]
05:59 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
05:59 mode/#code [+o PinkFreud] by ChanServ
06:05 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Z-Lined: Your IP range has been attempting to connect too many times in too short a duration. Wait a while, and you will be able to connect.]
06:08
< ToxicFrog>
McMartin: clojure.string/split-lines is really surprising and not in a good way :/
06:08
<&McMartin>
Boo =(
06:08
< ToxicFrog>
<ToxicFrog> ,(clojure.string/split-lines "\n")
06:08
< ToxicFrog>
<clojurebot> []
06:09
< ToxicFrog>
<ToxicFrog> ,(clojure.string/split-lines "asdf\n\nfdsa")
06:09
< ToxicFrog>
<clojurebot> ["asdf" "" "fdsa"]
06:09
< ToxicFrog>
<ToxicFrog> ,(clojure.string/split-lines "asdf\n\n")
06:09
< ToxicFrog>
<clojurebot> ["asdf"]
06:09
<&McMartin>
That's... not surprising.
06:09
<&McMartin>
OK, that is.
06:09
< ToxicFrog>
Yeah, any number of trailing newlines are just ignored
06:09
< ToxicFrog>
Leading ones, however, are not!
06:09
< ToxicFrog>
<ToxicFrog> ,(clojure.string/split-lines "\n\nasdf")
06:09
< ToxicFrog>
<clojurebot> ["" "" "asdf"]
06:10
<&Derakon>
Hooray!
06:10
<&McMartin>
>>> "\n".split()
06:10
<&McMartin>
[]
06:10
<&McMartin>
>>> "asdf\n\nfdsa".split()
06:10
<&McMartin>
['asdf', 'fdsa']
06:10
<&McMartin>
>>> "asdf\n\n".split()
06:10
<&McMartin>
['asdf']
06:10
< ToxicFrog>
This does however explain why the line counter in my lexer was sometimes counting backwards
06:10
<&McMartin>
>>> "\n\nasdf".split()
06:10
<&McMartin>
['asdf']
06:10
<&Derakon>
Is that Python, McM?
06:10
<&McMartin>
>>> It is.
06:10
< ToxicFrog>
Yeah, I want all the lines, including ones that are the empty string
06:11
<&McMartin>
Python ignores fenceposts and split unmodified is "any amount of whitespace of any kind"
06:12
<~Vornicus>
try with .split('\n')
06:12
<&McMartin>
>>> "\n".split('\n')
06:12
<&McMartin>
['', '']
06:13
<&McMartin>
Perhaps not *quite* ideal, though it does meet the contract
06:13
< ToxicFrog>
Oh hey split is broken too
06:13
< ToxicFrog>
<ToxicFrog> ,(clojure.string/split "\nasdf\n" #"\n")
06:13
< ToxicFrog>
<clojurebot> ["" "asdf"]
06:14
< ToxicFrog>
McMartin: see, split "\n" => ["", ""] is exactly the behaviour I want
06:14
<&Derakon>
>>>"\nfoo\nbar\n".strip().split('\n')
06:14
< ToxicFrog>
I do not want, but would accept, [""]
06:14
<&Derakon>
['foo', 'bar']
06:15
< ToxicFrog>
But it's utter madness for "asdf\nasdf" to split into ["asdf" "asdf"], "\nasdf" to split into ["" "asdf"], and "asdf\n" to split into ["adsf"]
06:16
<&Derakon>
So apply clojure's strip() equivalent?
06:16
<&McMartin>
Well, no
06:16
<&McMartin>
What he *wants* is line numbering on the input here.
06:16
<&McMartin>
IIRC.
06:19
< ToxicFrog>
Yes.
06:19
< ToxicFrog>
Oh, I see what's happening
06:19
< ToxicFrog>
(split) invokes Java's regex.split
06:20
< ToxicFrog>
re.split(s) -> re.split(s, 0)
06:20
< ToxicFrog>
"If n is non-positive then the pattern will be applied as many times as possible and the array can have any length. If n is zero then the pattern will be applied as many times as possible, the array can have any length, and trailing empty strings will be discarded."
06:20
<&Derakon>
So you can pass -1 then.
06:20
< ToxicFrog>
<ToxicFrog> ,(clojure.string/split "\nasdf\n" #"\n" -1)
06:20
< ToxicFrog>
<clojurebot> ["" "asdf" ""]
06:20
<&Derakon>
\o/
06:21
< ToxicFrog>
Why in god's name would you make this the default
06:23
<&McMartin>
I wonder if it's forwarding to Java's libraries here or if this is another case of "LISP people don't believe in non-shitty libraries because everyone just assumes it's easy enough to reinvent the wheel"
06:23
<&McMartin>
(See also: http://www.lambdassociates.org/blog/bipolar.htm )
06:24
< ToxicFrog>
It is in fact forwarding to Java's libaries
06:24
< ToxicFrog>
That text I quoted is from the Sun JRE documentation
06:25
<&McMartin>
Java Standard Lolbraries
06:25
< ToxicFrog>
I would have appreciated it if Clojure's binding did some cleanup on it, but this is 100% a Java bug
06:25 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
06:25 mode/#code [+o PinkFreud] by ChanServ
06:26 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Z-Lined: Your IP range has been attempting to connect too many times in too short a duration. Wait a while, and you will be able to connect.]
06:34 Derakon is now known as Derakon[AFK]
06:34
< ToxicFrog>
O
06:34
< ToxicFrog>
k
06:34
< ToxicFrog>
Lexer working
06:34
< ToxicFrog>
slep now
06:40 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
06:40 mode/#code [+o PinkFreud] by ChanServ
06:41
< Namegduf>
Slep well.
06:46 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Z-Lined: Your IP range has been attempting to connect too many times in too short a duration. Wait a while, and you will be able to connect.]
06:48 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!]
06:52 Ariii [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has quit [Connection closed]
07:10 Ariii [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has joined #code
07:10 You're now known as TheWatcher
07:16 Ariii [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has quit [Connection closed]
07:17 Ariii [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has joined #code
07:19 Ariii_ [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has joined #code
07:22 Ariii [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has quit [Ping timeout: 121 seconds]
07:29 Ariii_ [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has quit [Connection closed]
07:35 himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds]
07:47 Kindamoody is now known as Kindamoody|afk
08:02 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
08:02 mode/#code [+o PinkFreud] by ChanServ
08:10 You're now known as TheWatcher[afk]
09:17 Attilla [Obsolete@Nightstar-d2497510.as43234.net] has joined #code
09:58 You're now known as TheWatcher
10:04 Reiv [reiverta@5B433A.F67240.4EA165.FF352C] has joined #code
10:22 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
10:22 mode/#code [+o himi] by ChanServ
10:48 * TheWatcher eyes MooTools
10:48
<@TheWatcher>
WTF
10:48
<@TheWatcher>
Why am I suddenly getting Mysterious Errors?!
11:00
<@Tamber>
Someone used your cow as a sacrifice to the mysterious horrors of Perl?
11:01 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
11:01
<@TheWatcher>
Hah
11:03
< gnolam>
Mad cow disease.
11:06
<@TheWatcher>
Well, it's certainly making me mad
11:06
<@TheWatcher>
This make /no sense/
11:10
<@TheWatcher>
(which probably means it's something bloody obvious I'm missing)
11:15
<@TheWatcher>
...
11:15 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
11:15 mode/#code [+o himi] by ChanServ
11:15
<@TheWatcher>
I download a new copy of mootools-more and it works, wtf
11:15
<@TheWatcher>
gah
11:18 You're now known as TheWatcher[d00m]
11:42 Nemu [NeophoxProd@Nightstar-d8ef8074.asahi-net.or.jp] has joined #code
11:44 Reiv [reiverta@5B433A.F67240.4EA165.FF352C] has quit [Ping timeout: 121 seconds]
11:45 Reiv [reiverta@5B433A.F67240.4EA165.FF352C] has joined #code
11:52 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
12:01 Alek [omegaboot@Nightstar-56dbba0f.in.comcast.net] has joined #code
12:01 mode/#code [+o Alek] by ChanServ
12:05 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
12:05 mode/#code [+o himi] by ChanServ
12:29 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
12:42 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
12:42 mode/#code [+o himi] by ChanServ
12:44 You're now known as TheWatcher
13:25 iospace is now known as io|gone
14:17 Reiv [reiverta@5B433A.F67240.4EA165.FF352C] has quit [Client closed the connection]
14:21 * TheWatcher eyes his boss
14:22
< ToxicFrog>
McMartin: so, here's the lexer library: https://gist.github.com/3076537
14:22
<@TheWatcher>
... is she just doing it wrong, or is the Apple iOS developer kit really that hard to get hold of?
14:22
< ToxicFrog>
And here's what using it looks like: https://gist.github.com/3076539
14:22
< ToxicFrog>
TheWatcher: I wasn't aware you could get it without signing up as a developer and probably paying $5000
14:23
<@TheWatcher>
She apparently managed to get it for 60 quid (so the $99/year) option.
14:23
<@TheWatcher>
Which just makes me O.o massively
14:24
< Namegduf>
It didn't look very hard when I last looked into it.
14:24
< Namegduf>
$99/yr signup option on their website.
14:25
<@TheWatcher>
Craziness.
14:26
< Namegduf>
Well, that's excluding that you MUST use OS X.
14:26
< Namegduf>
So if you're not currently doing so you have a good $1000 up front to buy Apple hardware to develop iOS apps.
14:27
< Namegduf>
If you are then that doesn't apply, though.
14:28
<@TheWatcher>
Well, she and the people likely to be using it are, I just boggle really...
14:29
< Namegduf>
Apple are not shy about using their users as product to sell to developers.
14:34 Ariii [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has joined #code
14:37
< Ariii>
Hi!
14:39 You're now known as TheWatcher[afk]
14:42
< ToxicFrog>
Ariii: 'morning
14:42
< ToxicFrog>
Namegduf: apple can get fucked; all I want is a decent cross compiler/packager for it :/
15:01 io|gone is now known as iospace
15:35
< ShellNinja>
http://i.imgur.com/v0eU3.png
16:06 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Client closed the connection]
16:34 Ariii [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has quit [Connection closed]
16:49 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
17:07
< iospace>
TWO MORE APPROVALS D:
17:07
< iospace>
then my test plan is approved :<
17:11 * jerith approves.
17:11 * Tamber also approves.
17:12
<&jerith>
iospace: There you go. Sorted.
17:12
< iospace>
unless your real names are Matt and Phill
17:12
< iospace>
:P
17:12
<&jerith>
I can find a Matt. He's one of our project partners and does formhub.org.
17:13
< iospace>
haha
17:25 Attilla [Obsolete@Nightstar-d2497510.as43234.net] has quit [[NS] Quit: ]
17:41 cpux|2 [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code
17:43 cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
17:43 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has joined #code
17:44 mode/#code [+o Vash] by ChanServ
18:35 Attilla [Obsolete@Nightstar-d2497510.as43234.net] has joined #code
18:49 jeroid [jerith@687AAB.1BBF0C.22ABFD.4FEF20] has joined #code
19:48 Kindamoody|afk is now known as Kindamoody[zZz]
20:48 maoranma [nbarr@Nightstar-e4b6966f.tn.comcast.net] has joined #code
20:51 Noah [nbarr@Nightstar-e4b6966f.tn.comcast.net] has quit [Ping timeout: 121 seconds]
20:53 jeroid [jerith@687AAB.1BBF0C.22ABFD.4FEF20] has quit [[NS] Quit: Bye]
21:17 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
21:26
<&McMartin>
"Installing for upgrades: trousers"
21:26
<&McMartin>
TUX NEEDS PANTS
21:30 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
21:30 mode/#code [+o himi] by ChanServ
22:06 You're now known as TheWatcher
22:20
< ToxicFrog>
McMartin: https://github.com/ToxicFrog/kessler/tree/kessler-clj/src/ca/ancilla/kessler
22:21
< ToxicFrog>
Also, stuff I never thought I would be typing: apt-cache search trousers
22:21
<&McMartin>
The lexer looks really good
22:21
<&McMartin>
Hee
22:21
<&McMartin>
Dear Linux: WHERE ARE MY PANTS
22:21
< ToxicFrog>
I though it looked kind of messy, myself
22:22
<&McMartin>
I refer mainly to the presented API~
22:22
< ToxicFrog>
Aah.
22:22
< ToxicFrog>
Yeah, that I am quite happy with.
22:22
<&McMartin>
More seriously, most of my lexers have been character-by-character and don't give a nice API like that.
22:24
< ToxicFrog>
I could have (and, in fact, did in a pre-git version) done it that way, but I wanted something pretty.
22:24
< ToxicFrog>
And reusable.
22:25
< ToxicFrog>
lex-seq is lazy, too
22:25
<&McMartin>
\o/
22:27
<&McMartin>
About the only thing I'd have done differently I don't think even really matters, which is that I'd kick the internal functions of "lexer" out to module level with defn- since they don't use any of the closure's state.
22:28
<&McMartin>
I suppose there's also "you're doing a kind of nasty variable shadowing thing there with 'lexicon'"
22:29
< ToxicFrog>
I'm already using defn- for everything except lexer and lex-seq
22:30
<&McMartin>
Yeah, it's the let clause in the function 'lexer' I'm complaining about here~
22:31
< ToxicFrog>
Oh, you're saying that I should kick all of those letfns into module scope fns.
22:31
< ToxicFrog>
Yeah, probably.
22:31
< ToxicFrog>
They started out smaller.
22:32
<&McMartin>
You should also name either the parameter or the internal value something other than 'lexicon'
22:32
<&McMartin>
I mean, yeah, that's *legal*, but that's like (let [x (inc x)] ...)
22:32
<&McMartin>
Which is kind of ew
22:32
<&McMartin>
Since you have to count parens to see which x that x is.
22:35 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has quit [Client exited]
22:35 * ToxicFrog nods
22:37 * McMartin is pretty lax about variable shadowing, as a recent fight on ifMUD has just demonstrated, but this also seems to be an FP thing.
22:37
<&McMartin>
Mostly because lambdas should give no fucks about what their definer's parameters are
22:37
< ToxicFrog>
Unless they need to access them as upvalues, which has actually happened to me once~
22:38
<&McMartin>
Well, yes, those are special
22:38
<&McMartin>
What I mean is, there are some pretty strong conventions for parameter names and they're likely to produce conflicts if you're being casual about it.
22:38
<&McMartin>
In particular, x, y, z are "I don't care what the type of this object is" and xs, ys, zs are collections of things you don't care about
22:38
<&McMartin>
f, g, h are functions
22:39
<&McMartin>
So when you're throwing some lambda at map there's no real reason to care if the definer has xs in it too
22:39
<&McMartin>
Any parameter important enough to be used as an upvalue should probably have a real name though~
22:39
<&McMartin>
... though really, "f" is a real name
22:40
< ToxicFrog>
Also, did you really get into a fight over variable shadowing on ifmud?
22:42
<&McMartin>
Yes, @recap #macdev all
22:42
<&McMartin>
Note that marc is the "real" FP person in that conversation, I just dabble
22:49
< ToxicFrog>
I really need to get a proper MUD client
22:49 * ToxicFrog accidentally SIGINT'd telnet
22:49
< iospace>
...
22:49 * iospace golf claps
22:50
<&McMartin>
I rather like the UTF-8-patched tf.
22:51
< ToxicFrog>
lexer updated
22:52
<&McMartin>
Woo
22:54
< ToxicFrog>
"It turns everyone into Fonzie, or if you like swearing in your variable names, Clay Davis."
22:56 iospace is now known as io|DRIVING
23:01 Ariii [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has joined #code
23:19
<~Vornicus>
what
23:22
<&McMartin>
Your a because aaaaaaaaaaaaaaayyyyyyyyy.
23:22
<&McMartin>
s/because/becomes/
23:23
<~Vornicus>
Dare I ask.
23:25
<&McMartin>
This is what happens when you combine errors on variable-shadowing with lambdas.
23:31
< ToxicFrog>
Vornicus: from a discussion on IFMUD concerning variable shadowing that McM participated in.
23:45
<~Vornicus>
I, um. See. I guess.
23:50
<&McMartin>
I should probably get back into my OCaml project.
--- Log closed Tue Jul 10 00:00:04 2012
code logs -> 2012 -> Mon, 09 Jul 2012< code.20120708.log - code.20120710.log >

[ Latest log file ]