code logs -> 2014 -> Fri, 03 Oct 2014< code.20141002.log - code.20141004.log >
--- Log opened Fri Oct 03 00:00:41 2014
00:12 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
00:12 mode/#code [+qo Vornicus Vornicus] by ChanServ
00:12 himi [fow035@Nightstar-dm0.2ni.203.150.IP] has joined #code
00:12 mode/#code [+o himi] by ChanServ
--- Log closed Fri Oct 03 00:21:06 2014
--- Log opened Fri Oct 03 00:21:30 2014
00:21 TheWatcher [chris@Nightstar-ksqup0.co.uk] has joined #code
00:21 Irssi: #code: Total of 38 nicks [19 ops, 0 halfops, 0 voices, 19 normal]
00:21 mode/#code [+o TheWatcher] by ChanServ
00:22 Irssi: Join to #code was synced in 38 secs
00:22 Reiver [quassel@Nightstar-ksqup0.co.uk] has joined #code
00:22 mode/#code [+ao Reiver Reiver] by ChanServ
--- Log closed Fri Oct 03 00:22:29 2014
--- Log opened Fri Oct 03 00:22:43 2014
00:22 TheWatcher [chris@Nightstar-ksqup0.co.uk] has joined #code
00:22 Irssi: #code: Total of 39 nicks [19 ops, 0 halfops, 0 voices, 20 normal]
00:22 mode/#code [+o TheWatcher] by ChanServ
00:23 Irssi: Join to #code was synced in 38 secs
00:23 Reiver is now known as Orth_
00:56 Derakon[AFK] is now known as Derakon
00:59 Harlow [harlow@Nightstar-pq0497.il.comcast.net] has joined #code
00:59 Harlow [harlow@Nightstar-pq0497.il.comcast.net] has quit [Connection closed]
00:59 Harlow [harlow@Nightstar-pq0497.il.comcast.net] has joined #code
00:59 Harlow [harlow@Nightstar-pq0497.il.comcast.net] has left #code ["Leaving"]
01:00 Harlow [harlow@Nightstar-pq0497.il.comcast.net] has joined #code
01:22 iospace is now known as io\PACKERS
03:04 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
04:53
< Turaiel>
Anyone happen to have racket experience?
05:05 Derakon is now known as Derakon[AFK]
05:08
<@Azash>
I can bang some pots and pans together if that helps
05:12
< Turaiel>
Heh, not quite
05:14
<&McMartin>
Only the tiniest bit, but I can forward questions to people with more experience if it comes to that.
05:14
<&McMartin>
(I assume you mean the successor to PLT Scheme here?)
05:19 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
05:24 io\PACKERS is now known as iospace
05:26 Kindamoody[zZz] is now known as Kindamoody
05:26
< Turaiel>
Correct. I guess I'll just be giving up for the night though
05:26
< Turaiel>
I'm writing a parser for class, and delaying execution is difficult
05:27 celticminstrel [celticminst@Nightstar-ak6p6n.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
06:03 macdjord|slep is now known as macdjord
06:22
<&McMartin>
Turaiel: Are you using racket-specific stuff here or the stock delay-force from r5rs?
06:22
< Turaiel>
I'm using the racket/promise package
06:22
<&McMartin>
OK
06:22
<&McMartin>
I know the theory behind promises from Clojure; I'll take a quick look and see which paradigm they match and if it's one I recognize.
06:23
<&McMartin>
I'm guessing this is one of the kinds where futures are involved
06:25
<&McMartin>
Mmm
06:25
<&McMartin>
OK, this is beyond my ken. I get the theory, but this looks like it's intended to be used in very specific ways and they aren't the ones I'm used to.
06:26
< Turaiel>
My major problem is that I have each of my expressions wrapped in (delay), but when I go to (force), I can only force one level of nesting
06:28
<&McMartin>
Hrm. A quick look at the docs implies that you may want "lazy" instead of "force".
06:28
<&McMartin>
lazy seems to auto-force the last expression in its body if that result is a promise.
06:29
< Turaiel>
lazy replaces delay, not force
06:29
<&McMartin>
Yes.
06:29
<&McMartin>
Sorry. "lazy" instead of "delay"
06:29
< Turaiel>
Right, but then the force only works on everything in the top level of the lazy call
06:30
< Turaiel>
Which means that anything lazy nested within it will remain a promise
06:30
<&McMartin>
You shouldn't be turning literally everything into a promise, as I understand promises.
06:30
< Turaiel>
Oh?
06:30
< Turaiel>
At the moment all of my expressions result in promises
06:30
<&McMartin>
A promise is roughly the equivalent of a thread, not any given operation in some other thread.
06:31
<&McMartin>
(Note that "promise" is heavily, heavily overloaded as a term; JavaScript has a notion of "promises" that meet the academic definition of promises and are nothing at all like this)
06:31
< Turaiel>
I'm currently trying to implement if
06:31
< Turaiel>
The problem is that the true and false results of if are evaluated before if is.
06:31
<&McMartin>
Right, which is why if is traditionally a special form.
06:32
<&McMartin>
If you're doing it with promises, you pass in a single promise whose forcing computes the *entire* value, for true and for false
06:32
<&McMartin>
And then force the appropriate one as needed.
06:32
<&McMartin>
So any given evaluation of this is two delays, one force, one drops off.
06:33
<&McMartin>
(delay and force, alone, are actually part of R5RS and are not unique to racket. All the variations in racket/promise however are unique to it.)
06:35
< Turaiel>
Here's what I have currently:
06:35
< Turaiel>
((force (let ([a (thunk $4)] [b (thunk $5)]) (if $3 (delay a) (delay b)))))
06:35
< Turaiel>
Where $4 is the result if true, and $5 is the result if false
06:35
< Turaiel>
However, calling (if (= 1 2) (write -1) (write -2)) results in -1-2
06:36
<&McMartin>
What does (thunk x), and what distinguishes it from delay?
06:37 Checkmate [Z@Nightstar-g2q2tu.customer.tdc.net] has quit [Ping timeout: 121 seconds]
06:37
<&McMartin>
Like, I would normally think of it as (let ((a (delay $true)) (b (delay $false))) (if $cond (force a) (force b))), to make up some syntax.
06:38
< Turaiel>
thunk is a lambda with no arguments
06:38
<&McMartin>
But of course whatever fills that in has to not evaluate *its* arguments
06:38
<&McMartin>
if *has* to be a macro, or the delay has to happen during the call.
06:38
< Turaiel>
This is my problem
06:38
< Turaiel>
This is why I was delaying all expressions
06:39
<&McMartin>
Yeah, you only have to delay the top.
06:39
<&McMartin>
By which I mean, the direct arguments to if, at the time you expand if.
06:39
<&McMartin>
And then if forces the appropriate argument right there.
06:39
<&McMartin>
If the if is part of some delayed expression, the forcing is also delayed.
06:40
< Turaiel>
Then I don't know where I need to delay here
06:40
<&McMartin>
I would do the delaying inside the let.
06:40
< Turaiel>
Right, like (let ([a (delay $4)] [b (delay $5)]) (if $3 (force a) (force b)))
06:40
<&McMartin>
a and b should not be thunks; they should be promises.
06:41
< Turaiel>
But that still results in -1-2
06:41
< Turaiel>
Because $4 and $5 are evaluated before they're in the delay
06:41
<&McMartin>
"$4" is syntax that is new to me.
06:41
< Turaiel>
That's just the grammar syntax
06:41
< Turaiel>
[(OP IF boole exp exp CP) (let ([a (delay $4)] [b (delay $5)]) (if $3 (force a) (force b)))]
06:41
<&McMartin>
Erm
06:41
<&McMartin>
If (delay (write 2)) is writing 2, your copy of "delay" is broken.
06:42
<&McMartin>
My guess is that some part of your macro is not macroing hard enough.
06:42
< Turaiel>
The parser that we're writing evaluates everything as soon as it's read I believe
06:43
< Turaiel>
So as soon as it sees (write 2) it evaluates it and then hands it off to the if
06:43
< Turaiel>
Where it then gets "delayed"
06:43
<&McMartin>
... is "delay" part of your parser?
06:43
< Turaiel>
no
06:43
<&McMartin>
Your parser is too eager. "delay" must *also* be a special form.
06:43
<&McMartin>
Anything whose evaluation rules are not exactly like functions *must* be some kind of macro or special form.
06:44
<&McMartin>
This is why they are "special" forms.
06:44
< Turaiel>
I can't implement delay, as it is not part of the specified grammar
06:44
< Turaiel>
I can only use the built in one
06:44
< Turaiel>
It works well if ALL expressions are delayed
06:44
< Turaiel>
But then I cannot nest expressions
06:45
<&McMartin>
You either need a custom evaluator or a less eager parser.
06:45
<&McMartin>
"Keep forcing until it's not a promise anymore", basically.
06:45
< Turaiel>
I cannot change the parser, only the grammar
06:46
<&McMartin>
It sounds like they're putting you under extremely specific constraints here and I'm not going to do your homework for you =P
06:46
< Turaiel>
Of course not
06:47
<&McMartin>
But I will say that the general solution here is in fact "change the parser"
06:47
<&McMartin>
"if", when parsed, generally will not evaluate its second and third arguments.
07:04
< Turaiel>
Thanks for the help you could offer
07:04
< Turaiel>
Perhaps I can code reasonable after sleeping
07:26
< Turaiel>
McMartin, as an update, it looks like I was on the right track at one point, but I missed a spot when forcing
07:26
< Turaiel>
Everything appears to be working now
07:27
<&McMartin>
Hooray then
07:46 Harlow [harlow@Nightstar-pq0497.il.comcast.net] has quit [[NS] Quit: BED]
07:46 Orthia [orthianz@Nightstar-mr6fdg.callplus.net.nz] has quit [Ping timeout: 121 seconds]
07:50 himi [fow035@Nightstar-dm0.2ni.203.150.IP] has quit [Connection closed]
07:51 Orthia [orthianz@Nightstar-mdntdr.callplus.net.nz] has joined #code
07:51 mode/#code [+o Orthia] by ChanServ
09:44 Kindamoody is now known as Kindamoody|afk
09:53 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
09:53 mode/#code [+o himi] by ChanServ
10:24 Orthia [orthianz@Nightstar-mdntdr.callplus.net.nz] has quit [Ping timeout: 121 seconds]
10:29 Orthia [orthianz@Nightstar-5hs.6fq.224.119.IP] has joined #code
10:29 mode/#code [+o Orthia] by ChanServ
11:54 macdjord [macdjord@Nightstar-7rac1r.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
12:14 Orthia [orthianz@Nightstar-5hs.6fq.224.119.IP] has quit [Ping timeout: 121 seconds]
12:18 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
12:19 Orthia [orthianz@Nightstar-nd1.8p7.160.203.IP] has joined #code
12:19 mode/#code [+o Orthia] by ChanServ
12:33 Orthia [orthianz@Nightstar-nd1.8p7.160.203.IP] has quit [Ping timeout: 121 seconds]
12:37 Orthia [orthianz@Nightstar-5hs.6fq.224.119.IP] has joined #code
12:37 mode/#code [+o Orthia] by ChanServ
13:57 celticminstrel [celticminst@Nightstar-ak6p6n.dsl.bell.ca] has joined #code
13:57 mode/#code [+o celticminstrel] by ChanServ
14:47 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
14:47 mode/#code [+o Checkmate] by ChanServ
14:47 macdjord [macdjord@Nightstar-7rac1r.mc.videotron.ca] has joined #code
14:47 mode/#code [+o macdjord] by ChanServ
15:24
<&jerith>
Well, my conference talk seemed to go well.
15:25
<&jerith>
I should probably put my slides up at some point.
15:41
<@Tarinaky>
So as nice as it is that Ruby provides such an easy interface for writing bindings around dll extensions
15:41
<@Tarinaky>
JESUS CHRIST Ruby is slow.
15:42
<@iospace>
lolruby
15:51
<@Tarinaky>
Preeeety much.
15:51
<@Tarinaky>
Beats working for a living though.
16:43
<@iospace>
heh
17:27
<@Tarinaky>
Also: someone at work was saying how people should have to start programming by learning C
17:27
<@Tarinaky>
And 'working their way up'
17:27
<@Tarinaky>
Like wtf
17:28
< Julius>
Psh. Obviously should start with machine code.
17:29
<@macdjord>
Julius: Hand-built logic gates.
17:29
<&ToxicFrog>
Tarinaky: this is a sadly common perspective.
17:30
< Julius>
macdjord: Made with silicon hand-extracted from the earth.
17:30
<@macdjord>
Julius: After creating their own universe, of course.
17:31
<@froztbyte>
M-x butterly with the magnification modifier?
17:31
<@Tarinaky>
Trying to explain that even in prestigious British universities, when it comes time to teach a /second year/ module on C
17:31
<@Tarinaky>
And you /still/ get floods of crap on Facebook along the lines of: "My 300 line C program segfaults. Fix it for me."
17:31
<@Tarinaky>
"What's a gdb?"
17:32
<@macdjord>
ToxicFrog: To be fair - C experiance /is/ useful. I often draw on my understanding of C to deduce what a proper, high-level language is actually doing 'under the hood', which in turn informs me on what is or is not fundamentally possible.
17:33
<@Tarinaky>
If you already know how to program!
17:33
<@macdjord>
Tarinaky: Yes. It is not a good language for teaching the fundamentals of programming.
18:11
<@TheWatcher>
When I was an undergrad our first year languages where MIPS assembler, Edinburgh SML, LISP, and C.
18:11
<@TheWatcher>
I was glad I already knew how to program back then >.>
18:13
<@Tarinaky>
Insert joke about how long ago that was.
18:13
<@Tarinaky>
Ahah, found one.
18:13
<@Tarinaky>
When you were an undergrad, Nelson Mandeela was an internationally renowned terrorist.
18:14
<@TheWatcher>
Close!
18:15
<@TheWatcher>
(I started university in 1995)
18:16
<@Tarinaky>
When you started Uni, Star Trek was still good.
18:16
<@Tarinaky>
Mir was still in orbit.
18:16
<@Tarinaky>
America was still operating the Space Shuttle program.
18:17
<@Tarinaky>
Concorde provided commercial transatlantic supercruise services.
18:18
<@TheWatcher>
Are you trying to make me feel old?
18:18
<@Tarinaky>
And American had never gone into space from Baikonur
18:18
<@Tarinaky>
*And an American citizen
18:18
<@Tarinaky>
I'm just working my way through Wikipedia's 1995 page
18:22
<@Tarinaky>
And the Right Hon. Harold Wilson was still alive.
18:23
<&ToxicFrog>
macdjord: C experience is absolutely useful and I recommend learning it at some point, yes. What I object to is teaching it as an intro to programming language.
18:23
<&ToxicFrog>
And I'm sick to death of having to add that qualification every goddamn time.
18:24
<@Tarinaky>
It's because you keep opining about how useful C knowledge is during conversations that're specifically about an intro to programming languages.
18:24
<&ToxicFrog>
Tarinaky: what?
18:24
<&ToxicFrog>
Tarinaky: did you mean to direct that at macdjord?
18:24
<@Tarinaky>
"Also: someone at work was saying how people should have to start programming by learning C"
18:24
<@Tarinaky>
'start programming' >.>
18:24
<&ToxicFrog>
Yes....
18:25
<&ToxicFrog>
I have no idea what you are getting at.
18:25
<@Tarinaky>
Myeh.
18:25
<&ToxicFrog>
You said that someone at work said C should be used as a teaching language. I said that that's sadly common.
18:25
<@Tarinaky>
I dunno I'm tired.
18:25
<&ToxicFrog>
macdjord then went on about how C experience is useful, prompting me to add the qualifier.
18:25
<@Tarinaky>
I'm going for a shower.
18:25
<@Tarinaky>
Oh.
18:25
<@Tarinaky>
Then I am confused.
18:26
<@Tarinaky>
Ignore me.
18:26
<&ToxicFrog>
Which I am sick of having to add every time I say "C should not be used as an introductory programming language"
18:31 macdjord is now known as macdjord|out
18:35
<@Tarinaky>
Okay.
18:35
<@Tarinaky>
I am sorry.
18:35
<@Tarinaky>
I'm tired.
18:50
< RchrdB>
I suspect that everything that C does which is good pedagogically is done better by learning any form of assembly.
18:50
< RchrdB>
By all means teach it later as a prereq for your systems programming classes or whatever
19:02
<@Tarinaky>
Programming fictitious microcontrollers in Machine Code was a lot of fun in A-level electronics.
19:02
<@Tarinaky>
Was my first real taste of programming in anger as well.
19:03
<@Tarinaky>
By which I mean, at the time I was a full-time student. So my schoolwork was what I 'did for a living'... kinda.
19:03
<@Tarinaky>
As opposed to doing it in my bedroom because I wanted to make some shitty RPG that never got past hello world.
20:48 macdjord|out is now known as macdjord
21:03 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Connection closed]
21:19 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has quit [Ping timeout: 121 seconds]
21:20 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has joined #code
21:20 mode/#code [+o Alek] by ChanServ
21:38 Kindamoody|afk is now known as Kindamoody
21:41
<&jerith>
Tarinaky: Most people's shitty RPGs don't even get *to* hello world.
22:01 Kindamoody is now known as Kindamoody[zZz]
22:06 Checkmate [Z@Nightstar-g2q2tu.customer.tdc.net] has joined #code
22:06 mode/#code [+o Checkmate] by ChanServ
22:09
<@Alek>
truth
22:10 Checkmate [Z@Nightstar-g2q2tu.customer.tdc.net] has quit [Ping timeout: 121 seconds]
22:15 Checkmate [Z@Nightstar-g2q2tu.customer.tdc.net] has joined #code
22:15 mode/#code [+o Checkmate] by ChanServ
22:57
<@Tarinaky>
jerith: Not the point.
22:57
<@Tarinaky>
jerith: And my shitty RPGs still totally don't get past hello world even today.
22:58
<&jeroud>
Tarinaky: I know what you meant. But personal projects that get started, even if they go nowhere, are valuable in a different kind of way.
23:01
<&jeroud>
Also, I've always seen "in anger" as "for a specific purpose that has importance beyond merely being a vehicle for doing a thing" rather than "get paid to do a thing".
23:01
<@Tarinaky>
Well, the specific purpose is getting qualifications.
23:02
<@Tarinaky>
But maybe you're right that I'm using the wrong word.
23:04
<&jeroud>
Tarinaky: No, I'm saying that your use is reasonable and qualification about it being kind of "what you did for a living" was unnecessary.
23:05
<&jeroud>
The original "in anger" was regarding weapon use.
23:06
<@Tarinaky>
I'm bad with metaphores.
23:06
<&jeroud>
It differentiates "on the rifle range" from "on the battlefield".
23:06
<@Tarinaky>
And I know.
23:07
<&jeroud>
Or, more pointedly, "at an inanimate target" from "at a sentient being".
23:07
<&jeroud>
"For real" from "just playing".
23:08
<&jeroud>
I've written OCaml in anger, even though it's a personal project that nobody uses for anything.
23:18 * Tarinaky blinks
23:18
<@Tarinaky>
I'm cloning this repo
23:18
<@Tarinaky>
But nothing's appearing
23:18
<@Tarinaky>
WTF?
23:19
<@Tarinaky>
$ git clone --recurse-submodules https://github.com/Tarinaky/.vim.git --verbose --progress
23:19
<@Tarinaky>
Cloning into '.vim'...
23:19
<@Tarinaky>
And then it just returns
23:19
<@Tarinaky>
o.O
23:33 * Tarinaky arghs at bim
23:33
<@Tarinaky>
*vim
23:33
<@Tarinaky>
"Undefined vatiable: c:"
23:33
<@Tarinaky>
Yes.
23:33
<@Tarinaky>
Because you're running on Windows dear.
23:33
<@Tarinaky>
That's what a Windows path looks like.
23:34
<@Tarinaky>
Take your fucking alzheimer's meds.
23:34
<@gnolam>
Well... if you're dealing with vatiables, you're answering directly to the Pope, so...
23:34
<@Tarinaky>
I'm not using a fucking variable.
23:35
<@Tarinaky>
I just want to tell it the location of the ctags binary it should be invoking.
23:35
<@Tarinaky>
:let g:tagbar_ctags_bin=c:\ctags.exe
23:35
<&McMartin>
If you're in "git bash" it believe that C:\foo\bar\baz is in fact /c/foo/bar/baz
23:35
<@Tarinaky>
E121: Undefined variable c:
23:35
<@gnolam>
Who said anything about variables? :)
23:35
<@Tarinaky>
McMartin: I gave up on git and just found a local copy :/
23:35
<@Tarinaky>
My keyboard is broken and I'm tired.
23:40 gnolam [lenin@Nightstar-utbkuh.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds]
23:40 gnolam [lenin@Nightstar-utbkuh.cust.bredbandsbolaget.se] has joined #code
23:40 mode/#code [+o gnolam] by ChanServ
23:56
<&ToxicFrog>
Also, use forward slashes everywhere, windows understands them just fine and then you don't run into escaping issues
--- Log closed Sat Oct 04 00:00:51 2014
code logs -> 2014 -> Fri, 03 Oct 2014< code.20141002.log - code.20141004.log >

[ Latest log file ]