code logs -> 2007 -> Thu, 22 Nov 2007< code.20071121.log - code.20071123.log >
--- Log opened Thu Nov 22 00:00:30 2007
00:10 You're now known as TheWatcher[T-2]
00:14 You're now known as TheWatcher[zZzZ]
01:12 GeekSoldier|drinkin is now known as GeekSoldier|bed
02:18 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Quit: Z]
02:27 Thaqui [~Thaqui@Nightstar-12324.jetstream.xtra.co.nz] has quit [Ping Timeout]
02:34 Thaqui [~Thaqui@Nightstar-13064.jetstream.xtra.co.nz] has joined #code
02:34 mode/#code [+o Thaqui] by ChanServ
04:32 * McMartin ponders translating code from Python to OCaml.
05:02
<@ToxicFrog>
This day, science has been done.
05:03
<@ToxicFrog>
Although it took eight continuous hours in the EE lab and we still don't have conditional jumps working.
05:51 ReivZzz is now known as Reiver
06:20 GeekSoldier|bed is now known as GeekSoldier
06:23 * Reiver has a go at Python.
07:17 You're now known as TheWatcher
07:43 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code
07:43 mode/#code [+o gnolam] by ChanServ
08:17 You're now known as TheWatcher[afk]
08:22 Mahal [~Mahal@IRCop.Nightstar.Net] has joined #Code
08:22 mode/#code [+o Mahal] by ChanServ
08:42
<@Mahal>
I just wish to announce that I really, really, really hate PHP sometimes.
08:47
<@McMartin>
Only sometimes?
08:47
<@Mahal>
Yes.
08:47 * McMartin gets VICE running properly on Zinglon.
08:47
<@Mahal>
The times I"m trying to do anything more complicated than "hello, world!" with it, mostly.
08:48
<@McMartin>
That strikes me as "all the time"~
08:48 * Mahal grins
08:48
<@Mahal>
Not really, as in Real Work Life I'm a glorified monkey.
08:48
<@McMartin>
Hmm. I seem to have failed to install Ophis.
08:48 * McMartin fixes that.
08:53 Chalcedon [~Chalcedon@Nightstar-10789.ue.woosh.co.nz] has quit [Quit: Gone]
09:14 Mahal is now known as MahalBed
09:18 Thaqui [~Thaqui@Nightstar-13064.jetstream.xtra.co.nz] has left #code [Leaving]
09:21 Vornicus is now known as Vornicus-Latens
09:50 You're now known as TheWatcher
10:24 You're now known as TheWatcher[d00m]
10:54 You're now known as TheWatcher
14:33 GeekSoldier [~Rob@Nightstar-3993.pools.arcor-ip.net] has quit [Ping Timeout]
14:59 You're now known as TheWatcher[d00m]
15:09 * ToxicFrog writes an assembler for his little RISC CPU
15:10 * Kyrre dances with ToxicFrog.
15:22 * ToxicFrog dances with Serah
15:30 JPL [~JeffL@Nightstar-294.dsl.sndg02.pacbell.net] has quit [Connection reset by peer]
15:52
<@ToxicFrog>
CAN HAS CONDITIONAL JUP
15:53
<@ToxicFrog>
...or not.
15:59 You're now known as TheWatcher[afk]
16:12 Attilla [~The.Attil@194.72.70.ns-11849] has joined #code
16:18
<@AnnoDomini>
Can not has cjp?
16:23
< MyCatVerbs>
Can has not cjp? Can has cjnp instead?
16:26
<@AnnoDomini>
You can has. Is gift.
16:30
<@gnolam>
I can has proper grammar?
16:30
< MyCatVerbs>
gnolam: lolcode is LR(1), so yes, you can. :)
16:31
< MyCatVerbs>
(I don't actually know that, but I'm pretty certain it fits inside LR(k) for some arbitrary k, which is good enough.)
16:31
<@AnnoDomini>
LR?
16:32
< MyCatVerbs>
Left-to-Right parser, with k symbols of lookahead.
16:32
< MyCatVerbs>
I might have that wrong, *googles*
16:33
< MyCatVerbs>
Google says: Left to right parser, producing Rightmost derivation, with a k symbol lookahead.
16:34
< MyCatVerbs>
C is in LR(1), for example, which is why C compilers aren't mind-bendingly slow.
16:34 * AnnoDomini listens attentively.
16:37 * gnolam shakes his fist at AVR studio. Or possibly just GCC.
16:39
<@AnnoDomini>
Why have lookahead, then, if it slows things down?
16:53 GeekSoldier [~Rob@Nightstar-4806.pools.arcor-ip.net] has joined #code
17:20 gnolam is now known as Tumbleweed
17:20 Tumbleweed is now known as gnolam
17:37 Chalcedon [~Chalcedon@Nightstar-10789.ue.woosh.co.nz] has joined #code
17:37 mode/#code [+o Chalcedon] by ChanServ
17:38 MahalBed is now known as Mahal
17:52 Chalcedon [~Chalcedon@Nightstar-10789.ue.woosh.co.nz] has quit [Quit: Gone]
17:57 Mahal is now known as MahalGone[work]
17:59
< MyCatVerbs>
AnnoDomini: hrmn? Because you need a certain amount of lookahead to parse a given grammar.
17:59
<@AnnoDomini>
What defines how much you need, then?
18:00
< MyCatVerbs>
AnnoDomini: the less a particular grammar needs, the faster you can make the compiler. Badly designed languages need long lookaheads, making their compilers slow.
18:00
< MyCatVerbs>
The grammar itself.
18:01
< MyCatVerbs>
For example, the grammar of balanced brackets, defined loosely as "every ( has exactly one matching ) to the right of it and every ) has exactly one matching ( to the left of it" is in both LR(1) and LL(1), because it's fucking simple. ^^
18:02
< MyCatVerbs>
I'm only passingly familiar with the theory but I think that particular one doesn't need any lookahead at all.
18:04
< MyCatVerbs>
Pascal and Python were both carefully designed so that their grammars fit into LL(1), which, ISTR, is an even smaller set than LR(1) which can be parsed even faster again.
18:06
<@AnnoDomini>
I see.
19:00 Reiver [~reaverta@Admin.Nightstar.Net] has quit [Ping Timeout]
19:02 You're now known as TheWatcher
19:07 ReivZzz [~reaverta@Admin.Nightstar.Net] has joined #Code
19:11 ReivZzz [~reaverta@Admin.Nightstar.Net] has quit [Ping Timeout]
19:20 ReivZzz [~reaverta@Nightstar-21446.xdsl.xnet.co.nz] has joined #Code
19:30 ReivZzz [~reaverta@Nightstar-21446.xdsl.xnet.co.nz] has quit [Ping Timeout]
19:37
<@ToxicFrog>
Ahahahahahahahahahahaha!
19:37
<@ToxicFrog>
Our CPU has calculated the first 32 terms of f(n) = ?[i=1..3](f(n-i))
19:40 ReivZzz [~reaverta@Nightstar-21446.xdsl.xnet.co.nz] has joined #Code
19:40
< Vornicus-Latens>
Fly.
19:41
< Vornicus-Latens>
Also, what are your starting inputs?
19:41
<@jerith>
Shiny
19:42
<@ToxicFrog>
After reset, all registers are 0 except for IR, which is NOP.
19:43
<@ToxicFrog>
It's connected to a simulated memory bank which is initialized with the program code.
19:43
< Vornicus-Latens>
Then all the outputs should be 0.
19:43
< Vornicus-Latens>
What is f(0), f(1), and f(2)?
19:43
<@ToxicFrog>
1,1,3
19:43
< Vornicus-Latens>
ok then.
19:43
<@ToxicFrog>
And those are set up by the program, not in memory
19:44
<@ToxicFrog>
It spends the first 24 clocks or so setting up registers and initializing the first three sequence elements.
19:44
< Vornicus-Latens>
(there are as many different sequences as there are starting points)
19:44
<@ToxicFrog>
I also tossed together an assembler in Lua, which was a great help.
19:44
<@ToxicFrog>
Although it still has some issues.
19:45
<@ToxicFrog>
(in particular, it can't handle forward jumps - it's single-pass - and telling it to assemble NOP results in a crash)
19:45
<@ToxicFrog>
(on the plus side, it supports arbitrarily complex macros~)
20:35 ReivZzz [~reaverta@Nightstar-21446.xdsl.xnet.co.nz] has quit [Ping Timeout]
20:44 ReivZzz [~reaverta@Nightstar-21446.xdsl.xnet.co.nz] has joined #Code
20:47 ReivZzz [~reaverta@Nightstar-21446.xdsl.xnet.co.nz] has quit [Ping Timeout]
20:54 ReivZzz [~reaverta@Nightstar-21446.xdsl.xnet.co.nz] has joined #Code
21:08 AnnoDomini [AnnoDomini@Nightstar-29238.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
21:12 AbuDhabi [AnnoDomini@Nightstar-29414.neoplus.adsl.tpnet.pl] has joined #Code
21:12 mode/#code [+o AbuDhabi] by ChanServ
21:57 ReivZzz [~reaverta@Nightstar-21446.xdsl.xnet.co.nz] has quit [Ping Timeout]
22:05 ReivZzz [~reaverta@Nightstar-21446.xdsl.xnet.co.nz] has joined #Code
23:12 * McMartin reads backscroll
23:13
<@McMartin>
The size of K in LL(k) and LR(k) is determined by how far ahead you need to look to know whether or not you are at the beginning (for LL) or end (for LR) of some expression.
23:13
<@McMartin>
It is, in general much easier to tell when you've finished something than that you're about to begin it, so LR typically needs less lookahead and fewer productions.
23:14
<@McMartin>
For example, 2*3+4 is really an AdditionExpression, so an LL grammar for parsing such things needs to do cunning tricks to make sure precedence works.
23:15
<@McMartin>
(But you can still do arithmetic with LL(1).)
23:15
<@McMartin>
LL(k) is nice because humans can implement the parsers by hand directly; each expression type corresponds one-to-one to a function that parses that expression.
23:16
<@McMartin>
It's not really all that important for k to be small for LL, since you're predicting based on a linear amount of extra data.
23:16
<@McMartin>
LR(k) has its space requirements dramatically grow as k increases.
23:16
<@McMartin>
It isn't until you get to languages like C++ or Inform 7, where you have to actually do a backtracking search to parse statements, that parsers get really slow.
23:17 ReivZzz [~reaverta@Nightstar-21446.xdsl.xnet.co.nz] has quit [Quit: Changing servers]
23:17 ReivZzz [~reaverta@Admin.Nightstar.Net] has joined #Code
23:34 GeekSoldier is now known as GeekSoldier|bed
--- Log closed Fri Nov 23 00:00:36 2007
code logs -> 2007 -> Thu, 22 Nov 2007< code.20071121.log - code.20071123.log >