pugscode.org/ | nopaste: sial.org/pbot/perl6 | ?eval [~] <m oo se> | We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/
Set by diakopter on 11 July 2007.
00:00 justatheory joined 00:03 eosp joined 00:06 theorb joined
eosp hey...i came up with a new control structure that seems amusing. pastebin.ca/702665 00:06
buubot eosp: The paste 702665 has been copied to erxz.com/pb/4412
eosp seems a bit Tcl-inspired, even though i haven't actually done much tcl. 00:08
00:09 eosp left 00:13 r0bby is now known as r0bbyarrr 00:14 r0bbyarrr is now known as r0bby 00:15 r0bby is now known as r0bbyarrr 00:17 theorbtwo left 00:22 r0bbyarrr left 00:23 bsb left 00:24 bsb joined, Caelum joined 00:27 devogon_ left 00:34 Psyche^ joined 00:37 kanru left, kanru joined 00:42 platypus joined 00:50 weinig left 00:51 nipotaway is now known as nipotan, Patterner left, Psyche^ is now known as Patterner 00:55 Schwern joined 00:59 thoughtp1lice left 01:01 lyokato joined 01:02 polettix joined 01:03 polettix is now known as poletti 01:04 poletti left 01:06 dduncan left 01:09 mncharity joined 01:24 weinig joined 01:37 theorb left 01:39 jhorwitz left 01:40 Caelum left 01:43 Caelum joined 01:44 Schwern left 01:52 kanru left 02:01 vel joined 02:02 ashleyb left 02:08 justatheory left 02:20 Partizx joined 02:30 weinig left 02:39 Caelum is now known as Caelum_beard 02:44 araujo joined 02:46 weinig joined 02:47 weinig left, weinig joined 02:49 kanru joined 03:04 elmex joined 03:08 Caelum_beard is now known as Caelum 03:14 nipotan is now known as nipotaway 03:20 elmex_ left 03:38 amnesiac joined
PerlJam just sent off a perl6 micro-grant proposal. 04:06
We'll see how it goes.
04:21 justatheory joined 04:37 auro_ joined
platypus PerlJam: What is if for? 04:46
PerlJam an article on perl6 regex
platypus nods and looks forward to its approval and my reading it. 04:47
PerlJam as part of my proposal I said that I'd vet the article on #perl6, so people here will be the first to read it :) 04:48
platypus nods 04:50
04:52 c9s joined 05:04 REPLeffect joined 05:20 devogon joined 05:24 Ashizawa joined
pugs_svnbot r17915 | azawawi++ | [runpugs] added support for iceweasel/debian to TESTING 05:28
r17915 | azawawi++ | [runpugs] port mod_perl2/apache2/mod_deflate task to TODO
diff: dev.pugscode.org/changeset/17915
lambdabot Title: Changeset 17915 - Pugs - Trac
05:38 cognominal_ left 05:55 REPLeffect_ joined 05:56 REPLeffect left, c9s left, REPLeffect_ is now known as REPLeffect 06:04 kanru left 06:06 amnesiac left 06:09 REPLeffect_ joined 06:16 auro_ left 06:17 nipotaway is now known as nipotan 06:18 moritz__ is now known as moritz_ 06:23 REPLeffect_ left, REPLeffect left 06:34 justatheory left 06:43 marmic left 06:46 kane_ joined 06:47 marmic joined 06:49 dduncan joined 06:54 iblechbot joined 06:58 rfordinal left 07:02 BinGOs joined, rfordinal joined 07:11 penk joined 07:13 Grrrr left 07:14 Grrrr joined, DarkWolf84 left 07:18 pdcawley joined 07:29 jisom joined 07:34 pdcawley left 07:53 cognominal_ joined, cognominal_ left, cognominal_ joined 08:07 ting joined, ting__ left 08:09 Aankhen`` joined 08:11 franck___ joined 08:14 hkb_zz is now known as hakobe 08:15 hakobe is now known as hkb_lab 08:18 cognominal_ left 08:28 autin joined 08:37 mj41 joined 08:39 theorbtwo joined 08:47 Blwood joined 08:48 IllvilJa left, elmex_ joined, elmex left 09:05 jisom left 09:12 nekokak joined 09:30 nekokak_ left 09:42 kanru joined 09:46 dduncan left 09:55 Southen joined 10:10 drrho joined 10:12 autin left 10:17 ruoso joined 10:26 cognominal_ joined 10:30 ft left 10:34 ft joined 10:35 rindolf joined
ruoso fglock_, where is the gather/take specs? 10:39
fglock_ hmm - not sure, there is Perl6::Take and Perl6::Gather in cpan 10:42
10:42 rindolf left
ruoso fglock_, found it... S04 10:43
fglock_, why are we going through coroutines to implement gather/take? 10:48
isn't it doable just with a "local @*GATHER_LIST_OF_TAKES" and "@*GATHER_LIST_OF_TAKES.push"? 10:49
I mean
I understand that it may be lazy
fglock_ because it looks a bit like coro/yield
ruoso but do we need it to be lazy right now?
fglock_ yes, because it is used in STD 10:50
ruoso the lazyness is used?
fglock_ i think it is used in the desugared version 10:51
ruoso hmmm
ruoso . o O (does that mean that side-effects are syncronized by the lazyness of gather/take?) 10:52
ruoso fears...
TimToady, ping 10:53
10:56 Blwood left
allbery_b @localtime TimToady 10:57
lambdabot Local time for TimToady is Wed Sep 19 05:57:05 2007
ruoso oops
allbery_b thought it might be a bit early :)
ruoso fglock_, I've just looked at the STD related files 11:01
and it doesn't seems to depend on the lazyness
11:02 drrho left 11:04 hkb_lab_ joined, hkb_lab_ left
fglock_ i think it works the other way, desugared STD doesn't use lazy gather because it's not properly implemented 11:04
11:05 hkb_lab_ joined 11:07 ferreira joined, iblechbot left, IllvilJa joined 11:11 hkb_lab left 11:13 lyokato left 11:20 lidden joined 11:21 lidden left 11:23 pmurias joined, ruoso left 11:24 penk left 11:25 nipotan is now known as nipotaway, ruoso joined
moritz_ PerlJam++ 11:28
moritz_ is going to have a talk on P6 regexes at the 10th German Perl Workshop (if they want it) 11:29
pmurias whats does _PLUSf mean in src/perl6/Cursor.pm 11:43
_PLUSg is greedy, _PLUSr is ratchet, am i right?
11:48 iblechbot joined 11:49 flokuehn joined
pmurias fglock_: where should i put a function which print the call stack from perl6 perspective 11:50
something like carp
moritz_ pmurias: something like caller?
11:50 Blwood joined
pmurias is GLOBAL::print_backtrace ok? 11:50
11:50 sunnavy left
pmurias moritz_: it could be implemented in terms of caller 11:51
moritz_ pmurias: is caller implemented in kp6?
ruoso moritz_, nope
pmurias not yet ;) 11:52
ruoso the problem is that kp6 today depends too much in p5 contexts
so it would be actually hard to implement it
11:53 vel left
ruoso and also, the ast is not keeping source code information 11:53
but this should be simpler to solve 11:55
pmurias ruoso: one could implement caller in terms of perl5 caller 11:58
ruoso what would that be usefull for? 12:01
almost everything would be in MOP.pm line 35
which is the DISPATCHER
fglock_ pmurias: GLOBAL::carp ? 12:02
pmurias fglock_: k 12:03
carp is not speced 12:04
fglock_ i'm reading through library.readscheme.org/page8.html
lambdabot Title: Compiler Technology/Implementation Techniques and Optimization
pmurias it's a lot of stuff 12:05
ruoso hmmm
kp6-mp6 is failing compilation
when I try a forcerecompile 12:06
pmurias re carp: the amount of diagnostics die prints is probably implementation specific 12:08
we probably need a namespace for internal subroutines like match_p5rx 12:10
12:14 flokuehn left 12:15 Blwood left 12:16 Blwood joined
pugs_svnbot r17916 | pmurias++ | [kp6] primitive longmess 12:18
diff: dev.pugscode.org/changeset/17916
lambdabot Title: Changeset 17916 - Pugs - Trac
12:20 cmarcelo joined
ruoso fglock_, I had to add $::Array and $::Hash prototypes in MOP.pm 12:21
to do a forcerecompile
just as there were for $::Signature and $::Signature::Item
fglock_ ruoso: makes sense, it is starting to be more circular 12:22
12:22 Ashizawa left
ruoso this is an important bootstrap aspet 12:22
s/aspet/aspect/
we need to define which classes needs a runtime backend prototype to bootstrap 12:23
or maybe just splitting this classes as Class_Prelude and Class_Complete 12:26
to be loaded in sequence
fglock_ we can just declare all protos
the circularity fixes itself if we allow method redefinition
ruoso we don't need to, if we break the class definitions in two steps 12:27
fglock_ but each backend will provide different predefined features 12:28
pugs_svnbot r17917 | ruoso++ | [kp6] fixed typo in Runtime/Perl6/Grammar and forcerecompiled...
diff: dev.pugscode.org/changeset/17917
lambdabot Title: Changeset 17917 - Pugs - Trac
ruoso hmmm... after the force recompile some other tests start to fail 12:29
the junction tests
fglock_ ruoso: lunch?
ruoso yep... 12:30
and we have yet another deep recursion in kp6-kp6
ruoso *sigh*
avar yes, forcerecompile breaks everything as I pointed out $earlier
ruoso avar, fixed that already
with prototypes declaration
lunch & 12:31
12:40 ahmadz joined, mj41 left 12:45 Blwood left
fglock_ b 13:09
13:17 jhorwitz joined 13:18 drupek1253 left 13:28 TJCRI joined
fglock_ is anyone here familiar with Scheme? 13:31
moritz_ not really 13:33
[particle1 don't tell me you want to implement scheme on kp6? 13:34
13:34 [particle1 is now known as [particle]
moritz_ I learned it in school, but not in depth 13:34
[particle]: perhaps use its VM as a backend ;)
just a guess, though ;)
13:35 Partizx left
fglock_ moritz_: yes 13:35
avar fglock_: common lisp would be more practical as a backend, you could use cl-ppcre and stuff like that 13:45
and there are a lot more VMs for CL
[particle] sure, there's one on parrot :) kea-cl 13:46
fglock_ re familiar: i mean, do we have lisp hackers around?
13:47 ahmadz_ joined
fglock_ [particle]: nice 13:47
avar: hmm - can we reuse the object system? 13:48
avar [particle]: sure there is:)
fglock_: I'd be interested in hacking on a CL emitter, started doing one for kp6 the other day but didn't get anywhere with it:) 13:49
fglock_: I'm not familiar enough with clos and the perl6 object system, but a lot of it could be reused probably 13:50
fglock_: CLOS is very flexible, and it's written in CL itself so you can replace it
13:51 TJCRI left
fglock_ avar: i'd like to try it out, do you have some code already? 13:51
avar not really:)
fglock_ which compiler do you use? (i'm on osx)
13:51 TJCRI joined
avar (no) 13:51
I recommend clisp or sbcl, clisp is easier for testing since it's more script-like, sbcl is a CL->machine code compiler 13:52
Aankhen`` SBCL is a much better choice, except that its Windows support leaves something to be desiredā€¦ 13:53
And CLISP has weird licensing issues.
Both CLISP and SBCL can create native executables.
fglock_ aren't they source-code compatible?
avar they both implement common lisp, but that's like saying "I implement C" :)
Aankhen`` :-) 13:54
avar implementations differ in subtle ways
Aankhen`` Especially since things like sockets aren't in the spec.
avar and some things aren't std, like threads, so sbcl has its own thread mechanism
Aankhen`` Aye.
CLISP just doesn't support threading.
CLISP has better Unicode support and better Windows support, AFAIK.
avar www.cliki.net/Common%20Lisp%20implementation
lambdabot Title: CLiki : Common Lisp implementation
Aankhen`` SBCL has threads and a very advanced type-inferencing compiler. 13:55
avar Yes the compiler is better, but I find clisp more comfortable for some stuff, like running random .lisp files 13:56
it fits better into a perl(1) like workflow as opposed to a gcc(1) or ghc(1) like workflow IMHO
Aankhen`` How so?
fglock_ looking 13:57
pugs_svnbot r17918 | ruoso++ | [kp6] removed print from GLOBAL.pm
diff: dev.pugscode.org/changeset/17918
lambdabot Title: Changeset 17918 - Pugs - Trac
avar Quicker compile times and some stuff you run on it is snappier, stumpwm is faster on clisp for some reason
and clisp has a much lower resource hit, sbcl takes ~30MB of memory usually 13:58
fglock_: One thing that helps alternate emitter backends a lot is writing more stuff in p6, like Perl6/Match.pm
ferreira God, I am going to hate MovableText after my experiences at ONLamp. 13:59
fglock_ avar: we are working on that :)
avar fglock_: I know:)
ferreira Sometimes I change something and then accessing the previous URL gives me a MySQL database error :/ It fixes after some nonsense/useless changes 14:00
moritz_ ferreira: sorry for the off-list mail, that wasn't intentional
is that some fancy ajax stuff? 14:01
avar dreams of developing perl 6 in slime:)
fglock_ slime? 14:02
avar common lisp IDE for emacs, it's awesome:)
ferreira moritz_: I haven't noticed it was off-list. Because I am used to add the p6l list because Gmail don't help me.
14:02 cognominal_ left
moritz_ ferreira: ok ;) 14:02
I'd expect gmail to have 'reply to list' button :/ 14:03
[particle] moritz_: upper right on the message body
fglock_ hmm - we need a more efficient way to support multiple backends; recompiling all of kp6 is not fun
Aankhen`` avar: That'd have to be SPIME, wouldn't it? :-P 14:04
And we'd need a PIME first.
fglock_ avar: i'll try to compile a hello-World and see how it goes 14:05
ruoso fglock_, we need to split what's core and what's other features
probably taking things from lib/ to lib-modules/
avar cheers fglock_ on 14:06
14:06 ahmadz left
avar ruoso: You mean moving ::Runtime:: stuff? 14:06
ruoso probably creating a lib-backend
too
or something like that
avar copying the backend files around is not taking up time, it's just a copy operation 14:10
not that segregating stuff wouldn't be a good idea ... 14:11
pugs_svnbot r17919 | fglock++ | [kp6] cp EmitPerl5 EmitLisp
diff: dev.pugscode.org/changeset/17919
lambdabot Title: Changeset 17919 - Pugs - Trac
fglock_ looking for how to create a Str in CLOS 14:13
google thinks 'CLOS' is 'close' 14:14
avar mockup of blib/ plans: sial.org/pbot/27575 sial.org/pbot/27576
lambdabot Title: Paste #27575 from Someone at 208.78.101.240 14:15
avar (defpackage Str) ?
hrm, or defclass?
avar rusty
Aankhen`` (defclass perl6-string () ()) 14:17
That'll create a new, pretty useless class.
pugs_svnbot r17920 | ruoso++ | [kp6] %*ENV{"KP6_TOKEN_DEBUGGER"} turns on printing of the tokens it enters... new test recursing 14:20
diff: dev.pugscode.org/changeset/17920
lambdabot Title: Changeset 17920 - Pugs - Trac
14:22 vel joined
pugs_svnbot r17921 | ruoso++ | [kp6] more specific on the failing test 14:22
r17922 | ruoso++ | [kp6] more specific on the failing test
diff: dev.pugscode.org/changeset/17922
lambdabot Title: Changeset 17922 - Pugs - Trac
14:22 sunnavy joined 14:23 sunnavy left 14:24 sunnavy joined 14:27 ahmadz_ left
pugs_svnbot r17923 | ruoso++ | [kp6] p5 token not working as expected 14:27
diff: dev.pugscode.org/changeset/17923
lambdabot Title: Changeset 17923 - Pugs - Trac
ruoso pmurias, please take a look at the grammar/14 test 14:28
pugs_svnbot r17924 | ruoso++ | [kp6] added more tests to grammar/14
diff: dev.pugscode.org/changeset/17924
lambdabot Title: Changeset 17924 - Pugs - Trac
14:36 rindolf joined
pugs_svnbot r17925 | ruoso++ | [kp6] p5 tokens offer debug too... 14:36
diff: dev.pugscode.org/changeset/17925 14:37
lambdabot Title: Changeset 17925 - Pugs - Trac
14:39 sunnavy_ joined 14:41 sunnavy left, sunnavy_ left
fglock_ i'm probably missing a couple (hundred) things - this doesn't work ( DEFCLASS Str (STRING) () ) 14:41
14:41 sunnavy joined, sunnavy left 14:42 jhorwitz left 14:43 jhorwitz joined 14:44 sunnavy joined
bloonix ll 14:48
avar fglock_: sial.org/pbot/27577 14:50
lambdabot Title: Paste #27577 from Someone at 208.78.101.240
avar so (defclass Str () (string)) (setf instance (make-instance 'Str)) ... 14:51
14:51 Blwood joined
avar fglock_: cl-cookbook.sourceforge.net/clos-tu...index.html 14:51
lambdabot Title: Fundamentals of CLOS
14:52 vel left 14:53 kanru left 15:00 amnesiac joined
pugs_svnbot r17926 | ruoso++ | [kp6] fixed bug in p5 token 15:00
diff: dev.pugscode.org/changeset/17926
lambdabot Title: Changeset 17926 - Pugs - Trac
moritz_ ruoso++
ruoso kp6-kp6 no longer recurses when parsing a 'say "Hello!"', but the match simply fails 15:01
pugs_svnbot r17927 | ruoso++ | [kp6] fixed test count order
diff: dev.pugscode.org/changeset/17927
lambdabot Title: Changeset 17927 - Pugs - Trac
15:02 ahmadz joined
ruoso echo 'say "Hello!"' | KP6_TOKEN_DEBUGGER=1 perl -Ilib-kp6-kp6-p5 kp6-kp6.pl 15:02
:)
moritz_ this rocks ;) 15:03
ruoso adding more details in the debugger 15:04
fglock_ is now in #lisp...
15:06 vel joined 15:11 ashleyb joined 15:20 hkb_lab_ is now known as hkb_aw 15:21 Blwood_ joined 15:22 Blwood_ left
pmurias ruoso: back 15:22
15:22 Blwood_ joined
ruoso pmurias, take a look at the p5 token failing tests 15:22
:)
15:23 vel left
pugs_svnbot r17928 | ruoso++ | [kp6] token debugging is now really usefull 15:23
diff: dev.pugscode.org/changeset/17928
lambdabot Title: Changeset 17928 - Pugs - Trac
ruoso echo -n 'say "Hello!"' | KP6_TOKEN_DEBUGGER=1 perl -Ilib-kp6-kp6-p5 kp6-kp6.pl
15:24 vel joined
pmurias ruoso: ok 15:24
why did you create test 14?
there is 06 15:25
?
s/?//
ruoso pmurias, because 06 was not failing when I created it... but after some recompilations, 06 started failing too 15:27
so they're probably dup
15:28 vel left 15:29 vel joined
moritz_ pugs: %*ENV.keys.join('|').say 15:29
exp_evalbot OUTPUT[*** Can't modify constant item: VUndefā¤ at /tmp/auDwL4kKMv line 1, column 1 - line 2, column 1ā¤ /tmp/auDwL4kKMv line 1, column 1 - line 2, column 1ā¤]
avar kp6: %*ENV.keys 15:31
exp_evalbot r17928: OUTPUT[[ 'HOME', 'LOGNAME', 'SHLVL', '_', 'PATH', 'LS_COLORS', 'SHELL', 'MAIL', 'PWD', 'TERM', 'USER', 'HISTCONTROL', ]ā¤]
avar kp6: %*ENV.keys.join("|").say
exp_evalbot r17928: OUTPUT[syntax error at position 10, line 1 column 10:ā¤%*ENV.keys.join("|").saā¤ ^ HEREā¤]
avar kp6: my @keys := %*ENV.keys; @keys 15:32
exp_evalbot r17928: OUTPUT[[ 'HOME', 'LOGNAME', 'SHLVL', '_', 'PATH', 'LS_COLORS', 'SHELL', 'MAIL', 'PWD', 'TERM', 'USER', 'HISTCONTROL', ]ā¤]
avar kp6: my @keys := %*ENV.keys; @keys.join("|")
exp_evalbot r17928: OUTPUT['HOME|LOGNAME|SHLVL|_|PATH|LS_COLORS|SHELL|MAIL|PWD|TERM|USER|HISTCONTROL'ā¤]
avar kp6: my @keys := %*ENV.keys; @keys.join("|").say
exp_evalbot r17928: OUTPUT[syntax error at position 39, line 1 column 39:ā¤my @keys := %*ENV.keys; @keys.join("|").saā¤ ^ HEREā¤]
fglock_ avar: needs parenthesis
avar kp6: (%*ENV.keys).join(", ")
exp_evalbot r17928: OUTPUT['HOME, LOGNAME, SHLVL, _, PATH, LS_COLORS, SHELL, MAIL, PWD, TERM, USER, HISTCONTROL'ā¤] 15:33
avar ah
will be fixed with STD I guess
fglock_ yes, it's a grammar bug
pmurias ruoso: did the Match specific change? 15:34
lately
avar fglock_: cl-cookbook being helpful? 15:35
pmurias ruoso: returned true is being printed but the match returned is treated as false 15:36
15:36 Blwood left
ruoso pmurias, $MATCH.to(val) doesn't work... must use $MATCH.to = val 15:36
fglock_ avar: looking 15:37
avar fglock_: It's the best clos reference I've found for people who understand the concepts involved
slot = class variable 15:38
pmurias ruoso: are you changing GLOBAL.pm 15:41
pugs_svnbot r17929 | ruoso++ | [kp6] added a little script kp6-token-debug to allow: echo -n 'say "Hello!"' | ./kp6-token-debug
diff: dev.pugscode.org/changeset/17929
pmurias ?
lambdabot Title: Changeset 17929 - Pugs - Trac
ruoso pmurias, not right now
pmurias to fix it
ruoso but I did
avar fglock_: but please bug me if you have any CL questions, I'll pretend to know something:)
ruoso and I didn't fixed... ;)
fglock_ avar: is a "string" already an object, or is it a low level thing?
15:42 Blwood_ left
avar string is a seperate object, not Everything Is An Object(TM) in CL, but it has a different sense of what objects are than most 15:42
You can't call methods on strings for example
pmurias ruoso: should i fix it? 15:43
avar strings are sequences in CL, similar to array-of-bytes in C but more high level
ruoso pmurias, please
pmurias ok
avar CL-USER> (subseq "foobar" 3) 15:45
"bar"
CL-USER> (subseq '(f o o b a r) 3)
(B A R)
pmurias avar: aren't methods multis in CLOS? 15:47
avar CL-USER> (let ((string "foobar"))
(setf (subseq string 0 3) "bewbs")
string)
"bewbar"
pmurias: yeah, they are
so substr() in lvalue context in CL would just be a slice-like thingy 15:48
ruoso pmurias, btw... this seems to be where kp6-kp6.pl is breaking too... 15:49
pugs_svnbot r17930 | fglock++ | [kp6] kp6-token-debug - 4-space tab
diff: dev.pugscode.org/changeset/17930
lambdabot Title: Changeset 17930 - Pugs - Trac
fglock_ avar: so i'd better create a Str class, right? 15:50
ruoso I think I'll start to write tests that uses the kp6 grammar itself
avar fglock_: Yeah 15:51
fglock_: where's the current string class?
pmurias MOP
fglock_ it's defined in MOP.pm
ruoso double_quoted is now recursing... 15:53
ruoso *sigh*
avar (defclass Str (Value) (value))
the first list after the name is a list of parent classes
fglock_ avar: how do i call make-instance on it? 15:55
pugs_svnbot r17931 | pmurias++ | [kp6] fixed match creation for p5 tokens
r17931 | pmurias++ | EmitLisp is precompiled
diff: dev.pugscode.org/changeset/17931
lambdabot Title: Changeset 17931 - Pugs - Trac
15:56 hkb_aw is now known as hakobe
avar (defmethod chars (self) (length (slot-value self 'value))) 15:56
fglock_: did you see my paste earlier?
pmurias i think our rule engine tests are to simple/incomplete now
ruoso pmurias, your fix broke the same thing again...
ident_digit keeps recursing 15:57
fglock_ avar: yes, i'm reading
ruoso pmurias, you just undid my change 15:58
pmurias ruoso: it shouldn't have broken anything
ruoso: sorry
?
ruoso the "to" is not going forware
forward*
it always keep in "0"
fglock_ avar: should this work? (make-instance 'Str :value "x" )
avar fglock_: You have to do something more to make :value work there, you'll have to set up a constructor-thingy 16:00
pmurias ruoso: the changes to lib look clean 16:01
ruoso probably one of the tests is now making a deep recursion
pmurias i could have screwed up -p5
ruoso pmurias, take a look at test 13 16:02
is not your changes that make it recurse
it was recursing before
my change made it stop, but it was simply failing
avar (defclass Str () 16:03
((value :initarg :value)))
(defmethod chars (self)
(length (slot-value self 'value)))
then:
CL-USER> (defparameter *my-str* (make-instance 'Str :value "foobar"))
*MY-STR*
CL-USER> (slot-value *my-str* 'value)
"foobar"
You can also specify more stuff, like (value :initarg :value :initform "This is the default string) 16:04
fglock_ trying it here
avar there's also stuff to set up singletons and stuff like that 16:05
fglock_: what editor do you use?
fglock_ xcode
avar ok:) 16:06
fglock_ why?
avar Because this stuff is really exponentially easier in emacs with slime:)
slime++
But you don't need to enter the church of emacs right at this moment:) 16:07
fglock_ i wonder which Perl 6 things don't map cleanly to Lisp 16:10
moritz_ rules?
avar no rules map to cl 16:11
fglock_ that's not a problem, we have rules-to-method
avar BEGIN {} END {} maybe?
pmurias ruoso: found the bug
you removed /g from the regex so it didn't update the pos 16:12
fglock_ that's ok too, BEGIN is compile-time
END may be a problem
ruoso pmurias++ nice 16:13
pmurias i've got to do homework now as i go to the mountains for the weekend 16:14
pugs_svnbot r17932 | pmurias++ | [kp6] fixed :P5 tokens
diff: dev.pugscode.org/changeset/17932
lambdabot Title: Changeset 17932 - Pugs - Trac
pmurias you can add $_ support to p5 tokens
[particle] mountains++
ruoso ok... seeya
pmurias seeya 16:15
16:15 pmurias left
moritz_ bye 16:15
avar CL-USER> (defun infix-<~> (one two) (string-concat one two)) 16:16
INFIX-<~>
CL-USER> (infix-<~> "a" "b")
"ab"
C
yay odd characters in functions:) 16:17
fglock_ does it support unicode?
avar CL-USER> (defun infix\:<~> (one two) (string-concat one two))
|INFIX:<~>|
CL-USER> (infix\:<~> "a" "b")
"ab"
fglock_: Implementation defined, most do
CL-USER> (code-char 198) 16:18
#\LATIN_CAPITAL_LETTER_AE
clisp and sbcl use unicode for everything
fglock_: Just assume that unicode works for everything, it can be fixed later 16:20
fglock_ ok 16:22
ruoso fglock_, in Grammar::Quote::double_quoted 16:23
ahmm
forget it
I just saw the "."
pugs_svnbot r17933 | fglock++ | [kp6] EmitLisp - very basic Value objects 16:29
diff: dev.pugscode.org/changeset/17933
lambdabot Title: Changeset 17933 - Pugs - Trac
pugs_svnbot r17934 | fglock++ | [kp6-lisp] more values 16:38
diff: dev.pugscode.org/changeset/17934
lambdabot Title: Changeset 17934 - Pugs - Trac
16:41 DarkWolf84 joined 16:44 cognominal_ joined 16:45 nipra is now known as ni-pra 16:46 justatheory joined, franck___ left
pugs_svnbot r17935 | fglock++ | [kp6] kp6-mp6-perl5.pl --lisp 16:47
diff: dev.pugscode.org/changeset/17935
lambdabot Title: Changeset 17935 - Pugs - Trac
pugs_svnbot r17936 | fglock++ | [kp6] updated image 16:50
diff: dev.pugscode.org/changeset/17936
lambdabot Title: Changeset 17936 - Pugs - Trac
avar w 2 16:55
fglock_ avar: can you help me with hash table initialization? 17:01
pugs_svnbot r17937 | ruoso++ | [kp6] new failing test... ExtratRuleCodeBlock should pass $MATCH somehow...
diff: dev.pugscode.org/changeset/17937
lambdabot Title: Changeset 17937 - Pugs - Trac
avar fglock_: sure, what do you need?
you could use a plist, alist or a hash. the former two are just a list of key-value pairs 17:02
fglock_ i've got a list of key/values, i need to build an anon hash
a perlish hash 17:03
avar { @values } basically?
fglock_ yes, but i have separate key and value if necessary 17:04
EmitLisp:106
avar looks 17:06
17:08 REPLeffect joined
avar CL-USER> (let ((hash (make-hash-table))) 17:11
(setf (gethash 'key-one hash) "value-one")
(setf (gethash 'key-two hash) "value-two")
hash)
#S(HASH-TABLE :TEST FASTHASH-EQL (KEY-TWO . "value-two") (KEY-ONE . "value-one"))
there's probably a better way to do this
fglock_ thanks 17:12
avar but you could make the current for-loop add those setf statements and have hash returned at the end..
fglock_ sure, it works
avar but to construct this you'll need to loop over a list as pairs which I've forgotten how to do too:)
[particle] /join #lisp ?? 17:13
pugs_svnbot r17938 | fglock++ | [kp6-lisp] s/perl5/lisp/g
diff: dev.pugscode.org/changeset/17938
lambdabot Title: Changeset 17938 - Pugs - Trac
avar (make-instance 'Pair :value '(key . value)) is probably the best way to do a pair 17:14
[particle]: This is relevant right now:)
17:14 kaether left
[particle] i mean, to construct a list of pairs, join #lisp and ask 17:14
i know it's very relevant 17:15
fglock wants to implement a new kp6 back end in <3 hours :)
MADMAN!
fglock_ in a language i don't know 17:16
[particle] GENIUS!
avar #lisp frowns upon questions on lisp that couldn't be answered by reading PCL, ACL, The Common Lisp Standard and playing with slime for a month
fglock_ :P
avar :)
fglock_ avar is implementing it, i'm just typing 17:19
17:19 drupek12 joined
fglock_ avar: { a => 2 } compiles to (let ((hash (make-hash-table))) (setf (gethash '(make-instance 'Str :value "a")) "(make-instance 'Int :value 2)") hash) 17:21
should it use ' ?
17:22 rindolf left
fglock_ i'm removing the "" 17:23
avar I don't think it needs a quote, could be.. 17:24
nah, the object can be evaluated without screwing stuff up
oh for the first argument of gethash? probably 17:25
or, no
:)
keys can be any symbols IIRC and (make-instance) returns a symbol 17:26
pugs_svnbot r17939 | fglock++ | [kp6-lisp] hash composer
diff: dev.pugscode.org/changeset/17939
lambdabot Title: Changeset 17939 - Pugs - Trac
fglock_ echo '{ a => 2, }' | perl kp6-mp6-perl5.pl --lisp
17:26 weinig left
fglock_ still emits the perl5 initialization 17:26
avar looks good... 17:28
avar updates it a bit 17:33
why my $_MODIFIED; BEGIN { $_MODIFIED = {} } ? 17:34
pugs_svnbot r17940 | avar++ | r63535@t: avar | 2007-09-19 17:33:54 +0000 17:35
r17940 | avar++ | Make the EmitLisp initialization a bit lispier
diff: dev.pugscode.org/changeset/17940
lambdabot Title: Changeset 17940 - Pugs - Trac
17:36 kjwcode joined
fglock_ it is meant to log the side-effects of BEGIN blocks 17:36
hmm - can lisp dump the program and restart later? 17:38
avar implementation defined but yes, they usually allow you to dump the current image 17:39
or do you mean like precompiling?
fglock_ like precompiling, keeping the lexical side effects 17:40
that is, keeping the changes made by BEGIN blocks 17:42
pugs_svnbot r17941 | fglock++ | [kp6-lisp] hash -> Hash
diff: dev.pugscode.org/changeset/17941
lambdabot Title: Changeset 17941 - Pugs - Trac
avar lexical side effects?
fglock_ {Ā my $x; BEGIN {Ā $x = 1 }Ā ... }
avar what will that stuff turn into in the p5 emitter? 17:44
fglock_ something like {Ā my $x; INIT {Ā $x = 1 }Ā ... }
but there are more complex cases 17:45
ruoso that's one of the reasons I'm thinking that generating plain code may not be completely viable
avar Yes I like the current kp6 architechture but some of the stuff it emits at least seems to piggy-back too much on p5 17:47
e.g. this
17:48 weinig joined
fglock_ a lisp backend should force fixing that 17:49
avar indeed 17:50
pugs_svnbot r17942 | fglock++ | [kp6-lisp] Pair 17:51
diff: dev.pugscode.org/changeset/17942
lambdabot Title: Changeset 17942 - Pugs - Trac
ruoso kp6++
it's complaining about $$<x>
fglock_ what is the proper way to load a library in lisp?
ruoso because prefix:<$> is not defined
avar fglock_: like this I guess 17:52
17:52 penk joined
pugs_svnbot r17943 | avar++ | r63537@t: avar | 2007-09-19 17:51:16 +0000 17:52
r17943 | avar++ | the hello world case now looks a whole lot better, but the BEGIN stuff needs implementing
diff: dev.pugscode.org/changeset/17943
avar (load (compile-file "lib/KindaPerl6/Runtime/Lisp/Runtime.lisp"))
lambdabot Title: Changeset 17943 - Pugs - Trac
17:53 cognominal__ joined
fglock_ avar++ 17:53
ruoso fglock_, which would be the correct way of implementing $$<x> in kp6?
pugs_svnbot r17944 | ruoso++ | [kp6] ExtractRuleCodeBlock now passes $MATCH to the block
diff: dev.pugscode.org/changeset/17944
lambdabot Title: Changeset 17944 - Pugs - Trac
fglock_ did you create Runtime.lisp?
ruoso fglock_, at this moment it resolves to GLOBAL::prefix:<$> call 17:54
fglock_ ruoso: you can implement prefix:<$>
which calls, hmm ITEM i think
pugs_svnbot r17945 | avar++ | r63542@t: avar | 2007-09-19 17:54:27 +0000
r17945 | avar++ | stub runtime file
diff: dev.pugscode.org/changeset/17945
lambdabot Title: Changeset 17945 - Pugs - Trac
avar fglock_: nothing it it at the moment..
fglock_ ruoso: or .scalar 17:55
ruoso will try
17:57 Psyche^ joined
ruoso hmmm it is already a scalar 17:57
alway
s
hmm 17:58
actually
a container
kp6 still don'
don't implement context
so there's no "scalar context" to be enforced
avar fglock_: poking it some more..
ruoso fglock_, I left it just returning the first argument for now
fglock_ ruoso: it must call the method, because that's how Match works 18:00
pugs_svnbot r17946 | ruoso++ | [kp6] prefix:<$>, but for now it does nothing...
diff: dev.pugscode.org/changeset/17946
lambdabot Title: Changeset 17946 - Pugs - Trac
ruoso Match doesn't have a "scalar" method
woooooohoooooooooooo 18:01
fglock_ yes, it needs one (see the p5 impl)
pugs_svnbot r17947 | fglock++ | [kp6-lisp] named argument
diff: dev.pugscode.org/changeset/17947
lambdabot Title: Changeset 17947 - Pugs - Trac
fglock_ ruoso: wo+ho+ ?
ruoso no method 'declaration' in Class 'Pad' 18:02
this means the matching part works
because it's failing because Pad is not yet implemented in kp6-kp6
18:03 cognominal_ left
pugs_svnbot r17948 | avar++ | r63545@t: avar | 2007-09-19 18:02:28 +0000 18:03
r17948 | avar++ | { a => 1 } world now compiles with clisp, but doesn't do anything
r17949 | ruoso++ | [kp6] WoooHooo... matching of say "Hello" stops on Pad non implementation...
diff: dev.pugscode.org/changeset/17949
lambdabot Title: Changeset 17949 - Pugs - Trac
avar urgh, actually it doesn't
avar fix
ruoso ahmm... 18:06
pugs_svnbot r17950 | avar++ | r63552@t: avar | 2007-09-19 18:05:26 +0000
r17950 | avar++ | (gethash) needed a second param
diff: dev.pugscode.org/changeset/17950
lambdabot Title: Changeset 17950 - Pugs - Trac
ruoso not exactly
18:06 jisom joined
avar fglock_: sial.org/pbot/27581 18:06
lambdabot Title: Paste #27581 from Someone at 208.78.101.240
fglock_ yay! avar++ 18:07
pugs_svnbot r17951 | ruoso++ | [kp6] actually, the match is stopping because of the known new-in-rule-block problem...
diff: dev.pugscode.org/changeset/17951
lambdabot Title: Changeset 17951 - Pugs - Trac
avar echo 'say "foo"' | perl kp6-mp6-perl5.pl --lisp
fglock_ works here too :) 18:08
avar I guess this needs subroutine dispatch and stringify
stringify can just be (slot-value (make-instance 'Str "foo") 'value) for now
fglock_ stringify should return the object 18:09
say() does the unboxing
but now home... & 18:10
ruoso fglock_, any clue on how to fix tests grammar/08 and 09?
fglock_ ruoso: i'll take a look later
ruoso nice... 18:11
that's the known stopper for kp6-kp6 at the moment
18:12 ruoso left
avar Aankhen``: Want to play?:) 18:13
18:15 Patterner left, Psyche^ is now known as Patterner 18:23 hakobe is now known as hkb_zz 18:26 blindfish joined 18:31 pmurias joined 18:32 riffraff joined
pmurias instead of emitting side effects of BEGIN as BEGIN blocks one could store the default value in the Pad 18:33
18:34 Blwood joined
[particle] does pugs allow sub-second sleep? 18:36
18:45 c9s joined 18:48 c9s left, vel left, c9s joined, [particle1 joined, c9s left 18:49 c9s joined 18:51 dduncan joined 19:03 [particle] left 19:04 weinig_ joined, weinig_ left 19:05 weinig_ joined 19:06 calin joined 19:13 weinig left 19:15 theorbtwo left 19:16 theorbtwo joined 19:34 nekokak_ joined 19:38 jisom left, weinig_ left 19:52 nekokak left
Aankhen`` avar: Sorry, wha? 19:54
20:01 fglock joined 20:05 franck___ joined 20:06 franck___ left 20:19 polettix joined 20:23 ferreira left 20:24 c9s left, c9s joined, blindfish left 20:27 weinig joined 20:28 pmurias left
fglock Aankhen``: re play - v6/v6-KindaPerl6$ echo ' [ 1, 2, 3 ] ' | perl kp6-mp6-perl5.pl --lisp 20:29
20:29 c9s_ joined, IllvilJa left 20:31 iblechbot left
Aankhen`` Ah, kewl. 20:32
avar @tell pmurias I guess, I really don't know how this stuff all works:) 20:38
lambdabot Consider it noted.
avar Aankhen``: Want to help hack the CL backend?:) 20:39
Aankhen`` avar: Not tonight, but perhaps tomorrow. :-) 20:41
20:41 TJCRI left
avar :) 20:41
20:43 calin left 20:44 IllvilJa joined 20:45 c9s left
fglock avar: how to use namespaces in Lisp? (a link is ok) 20:46
pugs_svnbot r17952 | fglock++ | [kp6-lisp] added Array
diff: dev.pugscode.org/changeset/17952
lambdabot Title: Changeset 17952 - Pugs - Trac
avar fglock: You use packages 20:47
(defpackage and (in-package
avar ponders what needs doing for C<say "hello, world"> to work 20:49
20:50 Casan joined
pugs_svnbot r17953 | fglock++ | [kp6-lisp] added GLOBAL 20:52
diff: dev.pugscode.org/changeset/17953
fglock say() is a code object, which accepts .APPLY
lambdabot Title: Changeset 17953 - Pugs - Trac
fglock &GLOBAL::say = Code.new(...) 20:53
pugs_svnbot r17954 | fglock++ | [kp6-lisp] added Code 20:55
diff: dev.pugscode.org/changeset/17954
lambdabot Title: Changeset 17954 - Pugs - Trac
fglock we can use &GLOBAL::say := Code.new(...) - so we don't need containers 20:56
avar w 13
20:59 [particle1 is now known as [particle]
pugs_svnbot r17955 | fglock++ | [kp6-lisp] added the GLOBAL visitor to lisp 21:01
diff: dev.pugscode.org/changeset/17955
lambdabot Title: Changeset 17955 - Pugs - Trac
avar kicks pugs_svnbot 21:04
pugs_svnbot r17956 | avar++ | r63561@t: avar | 2007-09-19 21:02:33 +0000
r17956 | avar++ | lame say() implementation
diff: dev.pugscode.org/changeset/17956
lambdabot Title: Changeset 17956 - Pugs - Trac
fglock avar: you need to read :value from str, i think 21:12
avar CL-USER> (say "foo" "bar" "zar")
foobarzar
T
is this right or should there be spaces?
fglock i think it is right 21:13
avar but ah, they'll be Str objects..
fglock spaces are inserted by the list/array stringifier
avar I'm stringifying it manually for now 21:18
pugs_svnbot r17957 | avar++ | r63563@t: avar | 2007-09-19 21:17:03 +0000
r17957 | avar++ | variadic say() and have it stringify Str objects
diff: dev.pugscode.org/changeset/17957
lambdabot Title: Changeset 17957 - Pugs - Trac
fglock avar: can you create a Code object that accepts .APPLY ? 21:23
sorry, not enough lisp-fu yet
avar I'm supposed to know this stuff?:) 21:24
avar looks at Code.pm
fglock Code.value is a lisp fun
avar doesn't get what the interface should be or what this stuff actually does 21:27
The code class needs an apply method which does... 21:28
fglock .APPLY calls the native function (which is the Code.value) 21:29
instead of (defun say ... ) 21:30
you use: 21:31
&GLOBAL::say := Code.new( value => (defun say ... ) )
(mixing Perl 6 and Lisp here)
[particle] implementation via delegation 21:32
fglock and use it:
&GLOBAL::say.APPLY( Str.new( value => "hello W." ) )
google isn't helping much with my learning lisp 21:33
avar CL-USER> (defun say (str) 21:35
(format t "~a~%" str))
SAY
CL-USER> (funcall 'say "a")
a
NIL
So I guess apply would funcall the :value member with the args given to it 21:36
fglock yup
is it called with ( "APPLY" GLOBAL::say (make-instance 'Str :value "hello") ) ? 21:40
avar (defparamater *MYCODE* (make-instance 'Code :value 'GLOBAL::say)) 21:42
then (apply *MYCODE* (make-instance 'Str :value "hello")) 21:43
avar fails 21:50
fglock avar: i'm working on it 21:51
(defparamater say (make-instance 'Code :value (defun ... ) ) ) 21:52
this defines the &GLOBAL::say variable, right?
21:53 Blwood left
avar You'd have to use '(lambda instead of (defun 21:53
I think..
bug #lisp ?:) 21:54
Aankhen``: halp?!:)
apply is a built-in b.t.w. so you'll have to call it something else 21:59
pugs_svnbot r17958 | fglock++ | [kp6-lisp] fixed method call syntax
diff: dev.pugscode.org/changeset/17958
lambdabot Title: Changeset 17958 - Pugs - Trac
avar .. I think.. 22:00
22:00 justatheory left
fglock i think i'll need to encode the names, lisp seems to be case-insensitive 22:00
avar it is 22:01
Aankhen`` avar: Wha? 22:06
22:07 REPLeffect_ joined 22:08 REPLeffect left
Aankhen`` (defparameter say (make-instance 'code :value #'(lambda (...) ...))) 22:08
22:08 REPLeffect_ is now known as REPLeffect
Aankhen`` (funcall say arg1 arg2 arg3) 22:08
Or (apply say (list arg1 arg2 arg3))
22:09 ashleyb_ joined 22:10 ashleyb_ left 22:11 amnesiac left 22:13 DarkWolf84 left, DarkWolf84 joined, r0bby joined
pugs_svnbot r17959 | fglock++ | [kp6-lisp] (non-working) Code, say 22:15
diff: dev.pugscode.org/changeset/17959
lambdabot Title: Changeset 17959 - Pugs - Trac
22:15 riffraff left
pugs_svnbot r17960 | fglock++ | [kp6-lisp] say() returns True 22:18
diff: dev.pugscode.org/changeset/17960
lambdabot Title: Changeset 17960 - Pugs - Trac
22:19 ashleyb left
pugs_svnbot r17961 | fglock++ | [kp6-lisp] method parameters are (list ...) 22:24
diff: dev.pugscode.org/changeset/17961
lambdabot Title: Changeset 17961 - Pugs - Trac
pugs_svnbot r17962 | azawawi++ | [runpugs] added mod_perl/apache -> mod_perl2/apache2 migration instructions 22:27
diff: dev.pugscode.org/changeset/17962
lambdabot Title: Changeset 17962 - Pugs - Trac
pugs_svnbot r17963 | fglock++ | [kp6-lisp] Str.str, &say -> Code_say 22:30
diff: dev.pugscode.org/changeset/17963
lambdabot Title: Changeset 17963 - Pugs - Trac
pugs_svnbot r17964 | fglock++ | [kp6-lisp] Bit class 22:33
diff: dev.pugscode.org/changeset/17964
lambdabot Title: Changeset 17964 - Pugs - Trac
avar (funcall (slot-value say 'value) (make-instance 'Str :value "foo")) 22:35
foo
T
9(SETF FIND-CLASS)(BIT): #1=#<PACKAGE COMMON-LISP> is locked 22:36
[Condition of type SYSTEM::SIMPLE-PACKAGE-ERROR]
bit is a built-in
fglock can we use ::Bit ?
avar or :Bit
no, ::Bit 22:38
allbery_b if you're translating Perl6 types into new Lisp types, maybe you should use a prefix, e.g. P6Bit
Aankhen`` Yes, why does the type name have to be identical?
Give it a Lispy name, e.g. perl6-bit. :-)
fglock it will need to be mangled anyway 22:39
avar we're just screwing around atm
Aankhen`` OK.
avar fglock: I commited something that seems to work.. 22:44
pugs_svnbot r17965 | avar++ | r63574@t: avar | 2007-09-19 22:44:31 +0000
r17965 | avar++ | uhm, this thing seems to work, sucks a lot though
diff: dev.pugscode.org/changeset/17965
lambdabot Title: Changeset 17965 - Pugs - Trac
avar for some insane definition of works 22:45
CL-USER> (my-apply say "bewbs")
bewbs
#<:BIT #x000333F417F0>
my-apply because apply is a built-in
(load (compile-file "lib/KindaPerl6/Runtime/Lisp/Runtime.lisp")) 22:47
( APPLY $GLOBAL::Code_say (list (make-instance 'Str :value "foo")
) )
fglock sleep & 22:49
more tomorrow
23:05 cmarcelo left 23:06 fglock left 23:07 elmex_ left, araujo left 23:08 Schwern joined
avar oh crap nothing works 23:11
23:24 Aankhen`` left
avar @tell fglock www.flownet.com/gat/packages.pdf 23:27
lambdabot Consider it noted.
23:30 Schwern left 23:32 ahmadz left 23:44 weinig left 23:51 weinig joined