pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/
Set by Tene on 29 July 2008.
00:05 sri_work left 00:08 wayland76 joined 00:09 justatheory left
wayland76 I know in Perl 6 you're supposed to be able to modify the default grammar, but I can't find any place in the docs where is says how that will work 00:10
Does anyone have any info on it?
meppl good night 00:14
00:17 eternaleye joined 00:18 meppl left
wayland76 Ok, forget the question that I just asked; I have a different one I'd like to ask instead: In S02 (Synopsis 2: Bits & Pieces) it says various things about using adverbs (eg. :regex) with quoting constructs. The :regex one specifies that some text is to be parsed as a regex. Is there a way to define your own adverbs that make certain sections be parsed differently? 00:26
Is the only way to do it to inherit from the P6 grammar, and go from there, or is there some other way to do it? 00:28
00:37 justatheory joined 00:40 eternaleye left 00:54 eternaleye joined, justatheory left 01:08 justatheory joined 01:13 kcwu joined 01:17 [particle]1 joined 01:25 [particle]2 joined, alester_ joined 01:26 justatheory left, justatheory joined 01:27 justatheory left 01:33 BinGOs left 01:37 [particle] joined 01:41 [particle]1 left
TimToady wayland76: grammars are derived exactly like classes, and rules are just methods; as with classes you may either start fresh or derive. 01:48
if you wish to see how :regex works, look for [Rr]egex in src/perl6/STD.pm in pugs repo 01:49
in particular, the :regex adverb is defined at line 2417 01:50
01:51 BinGOs joined
TimToady the "tweak" methods are in charge of returning a different language based on the current language, where the current language may or may not served as the base class of a mixin, but certainly serves to define which tweak methods are available. 01:53
01:53 [particle]2 left
TimToady groceries & 01:53
02:08 eternaleye left, eternaleye joined 02:12 BinGOs left, BinGOs joined 02:31 eternaleye left 02:34 eternaleye joined 02:47 BinGOs left
wayland76 TimToady: thanks. I'm not sure I understand, but that means I need to read up on tweak (and check if mixins are what I think they are) 03:01
03:06 [particle] left 03:08 sail0r joined 03:09 sail0r left 03:12 [particle] joined 03:26 sri_work_ left 03:32 hercynium joined
s1n moritz_: ping 03:34
perl6: ({$foo4 = "blah"},) 03:40
p6eval rakudo 30915: OUTPUT[Scope not found for PAST::Var '$foo4'ā¤current instr.: 'parrot;PCT::HLLCompiler;panic' pc 156 (src/PCT/HLLCompiler.pir:103)ā¤]
..elf 22192: OUTPUT[Global symbol "$foo4" requires explicit package name at (eval 115) line 3.ā¤ at ./elf_f line 3861ā¤]
..pugs: OUTPUT[*** ā¤ Unexpected " ="ā¤ expecting "::"ā¤ Variable "$foo4" requires predeclaration or explicit package nameā¤ at /tmp/ERBN24cVhD line 1, column 8ā¤]
s1n perl6: my $foo4; ({$foo4 = "blah"},) 03:41
p6eval elf 22192: RESULT["blah"ā¤]
..rakudo 30915: RESULT[[{ ... }]]
..pugs: RESULT[(:() "$_" := "Scalar" #<Scalar:0xb7a6c2e5>ā¤ "&?BLOCK" := "Sub" #<Sub:0xb7184961> {, "$foo4" := "Scalar" #<Scalar:0xb7a64be1>, "$_" := "Scalar" #<Scalar:0xb71b1c19>ā¤ "@_" := "Array" #<Array:0xb...
03:44 wknight8111 left 04:13 hercynium left 04:27 wknight8111 joined 04:43 wknight8111 left 04:56 alester_ left 04:59 alester_ joined 05:07 zamolxes left 05:13 Jedai left 05:22 Psyche^ joined 05:38 Psyche^ is now known as Patterner 05:39 alester_ left 06:24 penk joined 06:36 wayland76 left
moritz_ s1n: pong 06:43
07:11 dduncan left 07:18 barney joined 07:25 XiaoA joined, XiaoA is now known as xiaoyafeng 07:45 elmex joined 07:51 iblechbot joined 07:58 clintongormley joined 08:00 clintongormley left 08:11 meppl joined
pugs_svn r22193 | moritz++ | [t] moved check.t to spec/, simplified a bit 08:13
r22194 | moritz++ | [t] moved some closure_traits/* tests to spec/, some small simplifications 08:17
r22195 | moritz++ | [t] one more closure_traits move, a bit more TODO (also added to TASKS) 08:19
08:57 masak joined 09:00 riffraff joined
xiaoyafeng help 09:03
[1 of 1] Compiling Main ( Setup.lhs, Setup.o )
Linking Setup.exe ...
[Pugs Dependencies]
'C:\Documents' is not recognized as an internal or external command,
operable program or batch file.
Impossible: C:\Documents and Settings\xiaoa\Application Data\cabal\config not fo
und? at makefile.pl line 64.
masak seems to me there was insufficient quoting around that path 09:04
mind you, I'm no DOS expert
moritz_ xiaoyafeng: try to move to a directory with no spaces in the file name as a workaround for now
09:05 Myoma left 09:07 Alucard joined, meppl left 09:11 Alias_ joined 09:19 cosimo joined 09:26 Myoma joined 09:33 jan_ left 09:53 pmurias joined
pmurias Juerd: could i request a www.p3rl.org/smop pointing to www.perlfoundation.org/perl6/index.cgi?smop ? 09:54
09:57 zamolxes joined 10:31 barney left
Juerd 10:31
pmurias: Certainly. Please email me about it; my email is my todolist currently
I'll let you know when I got a round tuit. 10:32
pmurias Juerd: ok 10:35
10:39 jan_ joined 10:49 riffraff left, Myoma left 10:53 a-jing joined, a-jing left
pmurias audreyt: should i report strange stuff/issues with PIL1 or is it supposed to be replaced soon? 10:59
moritz_ xiaoyafeng: have you had any success?
xiaoyafeng No! 11:05
I add $cable = cabal in makefile.PL 11:06
11:06 jferrero joined
moritz_ xiaoyafeng: did you try it with a directory that doesn't contain whitespaces? 11:06
xiaoyafeng so makefile.PL can continue.
I can't use mingw32-make after that 11:07
mingw32-make: *** No rule to make target `C:\Perl\libConfig.pm', needed by `make
file'. Stop. 11:08
pmurias try cygwin ;) 11:09
audreyt pmurias: it will be replaced soon with something based on quasiquotes.
xiaoyafeng I'm downloading visual C++ 9.0 11:10
hope It would help.
audreyt xiaoyafeng: strawberry-perl may be a better bet... though I havn't tested it recently
xiaoyafeng Thanks.
pmurias PIL1 could use quasiquotes ;)
xiaoyafeng I will try 11:11
audreyt the entire Pugs should be replaced with quasiquotes+views ;)
10 days until RC...
(ghc 6.10)
xiaoyafeng quasiquotes? 11:12
what
's that?
audreyt xiaoyafeng: www.eecs.harvard.edu/~mainland/ghc-quasiquoting/ 11:13
lambdabot Title: Quasiquoting Support for GHC
pmurias view's don't seem very usefull
audreyt pmurias: it makes changing constructors possible. 11:14
the idea is to ~never directly pattern match
but always match on some abstract view so the underlying data type can change its constructors later
11:15 dmq joined
audreyt (bbiab) 11:15
11:18 iblechbot left
pmurias cycling& 11:18
11:18 pmurias left 11:22 ludan joined 11:40 alanhaggai joined 11:41 riffraff joined 11:43 Alucard left 11:52 iblechbot joined 11:59 Myoma joined 12:30 jferrero left, iblechbot left 12:37 Alias_ left 12:42 kanru joined 13:06 rff joined 13:13 riffraff left 13:19 c9s joined 13:22 masak left 13:28 smg left 13:33 sri_work joined 13:37 alanhaggai left 13:43 rdice joined 13:46 xinming_ joined 13:56 TJCRI joined 13:57 clintongormley joined 13:58 clintongormley left 13:59 xinming left 14:24 hercynium joined 14:37 Limbic_Region joined, a-jing joined, a-jing left 14:54 meppl joined 14:58 Auzon left 14:59 smg joined 15:01 rff left
pmichaud pugs: my @a = 1,2,3; my @b = 4,5,6; for @a,@b { .say; @b = () } 15:01
p6eval pugs: OUTPUT[1 2 3ā¤ā¤]
pmichaud pugs: my @a = 1,2,3; my @b = 4,5,6; for list(@a,@b) { .say; @b = () } 15:02
p6eval pugs: OUTPUT[1 2 3ā¤ā¤]
moritz_ my @a = 1,2,3; my @b = 4,5,6; for eager @a,@b { .say; @b = () }
pugs: my @a = 1,2,3; my @b = 4,5,6; for eager @a,@b { .say; @b = () } 15:03
p6eval pugs: OUTPUT[1ā¤2ā¤3ā¤4ā¤5ā¤6ā¤]
15:04 penk left
pmichaud my @a = 1,2,3,4,5; for @a { .say; @a = () } 15:05
pugs: my @a = 1,2,3,4,5; for @a { .say; @a = () }
p6eval pugs: OUTPUT[1ā¤2ā¤3ā¤4ā¤5ā¤]
pmichaud pugs: my @a = 1,2,3,4,5; my @b = 6,7,8; for list(@a,@b) { .say; @a = () } 15:06
p6eval pugs: OUTPUT[1 2 3 4 5ā¤6 7 8ā¤]
15:10 BinGOs joined
rakudo_svn r30927 | pmichaud++ | [rakudo]: spectest-progress.csv update: 158 files, 3288 passing tests 15:11
15:12 pmurias joined
moritz_ rakudo: 3287 - 2798 15:14
p6eval rakudo 30926: RESULT[489]
15:21 Exodist joined 15:25 rdice_ joined, rdice left 15:51 zamolxes left
TimToady pmichaud: I note that pugs is performing eager @x interpolation, which is allowed but not required by p6 spec 15:54
(alternately, pugs may be thinking of it as immutable tuple interpolation) 15:55
moritz_ TimToady: it doesn't always, it seems
pugs: my @a = 1,2,3; my @b = 4,5,6; for eager @a,@b { .say; @b = () }
p6eval pugs: OUTPUT[1ā¤2ā¤3ā¤4ā¤5ā¤6ā¤]
moritz_ pugs: my @a = 1,2,3; my @b = 4,5,6; for @a,@b { .say; @b = () }
p6eval pugs: OUTPUT[1 2 3ā¤ā¤]
moritz_ that's not very eager ;) 15:56
TimToady I said the interpolation is eager, not the list doing the interpoaltion
15:56 iblechbot joined
TimToady it's doing eager(@a), eager(@b) 15:56
moritz_ ok
TimToady not eager(@a,@b)
but as I say, it might just be thinking that it's dealing with immutable list values 15:57
so it doesn't see subsequent mods to the array container
might even depend on which backend implementation of array pugs uses 15:58
anyway, as I say in my p6l reply to pmichaud, p6 does not currently try to define how feedback works in lazy lists 16:00
lazy lists really kind of force you into side-effect free thinking, or at least non-interacting side effects in source and sink 16:01
it's not clear how much we should try to cater to the desire to have interacting side effects
obviously strict laziness can make some interesting feedback loops (see Haskell), but that doesn't seem right for p6 16:02
p6 is not trying to prohibit erroneous programming via type theory 16:04
moritz_ and it's not pure either
TimToady it's possible that we can make stronger laziness guarantees about certain constructs, but haven't thought about it much 16:05
it's possible, that a take that is single-threaded with respect to its gather is strictly lazy, but not if the take is multithreaded 16:07
pmurias moritz_: Haskell is not fully pure either (it has IO,State and other monads)
moritz_ pmurias: yes, a 100% pure language wouldn't execute any code at all. But all impurity is encapsualted in monads in haskell, so the compiler knows exactly what's pure and what not 16:08
pmurias by convention only
TimToady all type theory is convention :) 16:09
moritz_ pmurias: by convention? so how do you define an impure action without using a monad?
pmurias unsafePerformeIO
* unsafePerormIO
* unsafePerformIO 16:10
TimToady claps
moritz_ ;)
ok, point taken
how very comforting to have that unsafe in the name ;) 16:11
pmurias the compiler is allowed to break your code if you use unsafePerformIO 16:12
TimToady it's always the programmer's fault in any language :) 16:17
pmichaud TimToady: pugs currently treats for @a,@b { .say; } as performing two iterations... is that correct? 16:18
TimToady see above 16:19
moritz_ or p6l
pmichaud so, @a,@b isn't interpreted in list context?
TimToady it is
the question is, how is array interpolation defined?
or in this case, undefined?
pmichaud would map { .say }, @a, @b give me the same results? 16:21
TimToady map and for are isomorphic 16:24
so it darn well better
pmichaud pugs: map { .say }, @a, @b
p6eval pugs: OUTPUT[*** ā¤ Unexpected ","ā¤ expecting "::"ā¤ Variable "@a" requires predeclaration or explicit package nameā¤ at /tmp/BizrGDc8G2 line 1, column 17ā¤]
pmichaud pugs: my @a = 1,2,3; my @b = 1,2,3; map { .say }, @a, @b
p6eval pugs: OUTPUT[1ā¤2ā¤3ā¤1ā¤2ā¤3ā¤]
TimToady 'course, pugs was written before we made them isomorphic, so who knows? 16:25
pmichaud pugs: my @a = 1,2,3; my @b = 1,2,3; for @a, @b { .say }
p6eval pugs: OUTPUT[1 2 3ā¤1 2 3ā¤]
pmichaud thus my question above :-)
TimToady pugs: my @a = 1,2,3; my @b = 1,2,3; for @a, @b { .say; @b = () } 16:26
p6eval pugs: OUTPUT[1 2 3ā¤ā¤]
TimToady pugs: my @a = 1,2,3; my @b = 1,2,3; map { .say; @b = () }, @a, @b
p6eval pugs: OUTPUT[1ā¤2ā¤3ā¤1ā¤2ā¤3ā¤]
TimToady looks like pugs doesn't follow current spec here 16:27
pmichaud I'm not sure what "current spec" is, thus my question to p6l
it wasn't a question about laziness as much as "what exactly are we iterating"? 16:28
TimToady on the other hand, any program relying on side effects in lazy lists is erroneous
pmichaud in fact, I chose the 1,2,3 notation instead of 1..3 because laziness wasn't what I was trying to get at (although it may be highly relevant and I'm not seeing it) 16:30
TimToady according to the current definition of laziness, an implementation is allowed to work ahead or be strictly lazy, so at the point of array interpolation is can snapshot all the current values as a batch, or it can return an iterator that reads out values lazily from the array 16:33
relying on either behavior is currently erroneous 16:34
pmichaud interesting
so, to go with a very simple example
my @a = 1,2,3; my @b = 4,5,6; my @c = (@a, @b); @b[1] = 'five'; say @c
we can't be certain of this output? 16:35
16:35 dalecooper joined
TimToady I suspect list assignment tries to be as eager as it can in the absence of indeterminate inputs 16:37
but that's assignment, not lists
one uses binding to make the array as lazy as the list
pmichaud does that mean that my @foo = map { ... }, @bar; would be eager? 16:41
since it's an assignment
?
TimToady no, I think a map would be considered of indeterminate length 16:42
either that, or there has to be an api that passes such info through
or the compiler has to try to figure it out 16:43
I'm sure all solutions are unsuitable in some way :)
pmichaud I guess I'm curious as to what unsuitable solution we're going with :-)
TimToady well, there's something to be said for array interpolation taking a snapshot of its current state 16:44
pmichaud that's what rakudo is currently attempting to do
TimToady which is to say, determined elements interpolate immediately
and "spec" iterators interpolate an iterator that reads more values from the array 16:45
pmichaud oops, I'm late for an errand -- bbl 16:46
16:53 c9s left
TimToady pugs: my @a = 1,2,3; my @b = 4,5,6; my @c = (@a, @b); @b[1] = 'five'; say @c 16:53
p6eval pugs: OUTPUT[123456ā¤]
TimToady pugs: my @a = 1,2,3; my @b = 4..*; my @c = (@a, @b); @b[1] = 'five'; say @c
oops 16:54
16:54 kanru left
p6eval pugs: No output (you need to produce output to STDOUT) 16:54
moritz_ sh: line 1: 16133 CPU time limit exceeded
TimToady funny it runs out of time before space 16:55
16:55 eternaleye left
moritz_ that's because kp6 needed loads of ram, thus the memory limit is quite generous 16:55
17:00 jferrero joined 17:14 thestarslookdown joined 17:27 ruoso joined
pmurias ruoso: hi 17:27
ruoso hi pmurias
17:29 dalecooper left, dalecooper joined 17:31 riffraff joined
pmurias ruoso: do you think i should start working on a GC for smop? 17:32
ruoso a trace gc? 17:37
17:37 iblechbot_ joined
ruoso maybe... 17:37
I don't really know how much effort that would mean
pmurias ruoso: yes, a tracing one 17:38
ruoso pmurias, the problem was really because we had SMOP_LOWLEVEL_MEM_TRACE disabled... and we let too many leaks in...
and now it's a huge job to hunt'em down
pmurias we should have a make test-memcheck make target so that none-SMOP__Object leaks don't creep in 17:41
17:42 dalecooper left
ruoso pmurias, you mean running it through valgrind instead of using SMOP_LOWLEVEL_MEM_TRACE? 17:44
I think that should be fine, actually
pmurias yes 17:45
valgrind catches more leaks
ruoso it does indeed...
17:48 barney joined 17:50 iblechbot left 17:54 thestarslookdown left 17:58 abra joined 18:04 jhorwitz joined 18:07 jhorwitz left 18:08 jhorwitz joined
pmurias ruoso: re trace gc, a naive one should be quite simple, the hard part would be getting the gc fast 18:10
18:12 jhorwitz left 18:13 jhorwitz joined 18:14 jhorwitz left 18:18 ludan left 18:20 jhorwitz joined
ruoso pmurias, if that means painfully slow... I'd rather keep the refcounting gc 18:23
18:23 rff joined
moritz_ do you have a proof of concept for another storage mechanism than p6opaque? 18:23
18:24 kst joined
ruoso moritz_, it depends on how many features you want to support 18:24
moritz_ ruoso: I don't want any features, just a proof-of-concept ;)
ruoso then you can easily implement a blessed-hash .... 18:25
which is a SMOP__Object* that holds a pointer to a prototype and a hash for storage
and that's all
moritz_ ok, let me ask the other way round - do you actually test that everything works if you do just that? 18:26
ruoso moritz_, not yet... because I still don't have Object.pm compiled down 18:29
moritz_, but I will have this kind of test as soon as I have the s1p compiler in place
moritz_ ruoso: ok, thanks for the info
ruoso moritz_, in SMOP that is achieved by the REPR API 18:30
moritz_ ruoso: I know that it's one of the design goals. Which is why I asked if it's already tested ;) 18:31
18:31 aindilis joined
ruoso moritz_, well... in some sense, it is... 18:31
SMOP do have a lot of different representations in place
18:32 riffraff left
ruoso they just don't share the same metaclass... which is the other side of the coin 18:32
one thing is allowing objects that have different low-level representation...
the other is allowing different objects to be used as the storage of the same type...
SMOP does the first already... but the second will only happen after effective bootstrap...
(which is the compilation of smop/src-s1p/P6Meta.pm and smop/src-s1p/Object.pm to C+m0ld) 18:33
pmurias to m0ld first than to C ;) 18:35
ruoso :P
Limbic_Region w 18:42
ruoso y 18:44
18:48 jan_ left 18:53 jan_ joined
Limbic_Region xyzpdq 18:53
19:01 araujo joined 19:14 abra left 19:22 simcop2387 left
pmurias ruoso: re painfully slow, it's hard to tell for me a naive gc would live in a seperate thread marking all gc-using objects and freeing the unused ones 19:23
19:27 Auzon joined 19:33 rdice_ left 19:37 eternaleye joined 19:38 simcop2387 joined 19:41 simcop2387-vnc joined 19:42 simcop2387-vnc left 19:45 simcop2387 is now known as frinkbot 19:46 frinkbot is now known as simcop2387
pmurias * separate 19:51
meppl good night
19:52 meppl left 19:54 PZt left 19:57 PZt joined 20:02 dduncan joined
pugs_svn r22196 | pmurias++ | [pugs-m0ld] method calls 20:03
20:10 rff left
pmurias S02:01 #forgot the smarlinks url 20:19
20:22 explorer__ joined 20:27 barney left 20:29 alester joined 20:34 jferrero left 20:40 wknight8111 joined 20:41 Jedai joined
Khisanth moritz_: what kind of monitor are you using? :) 20:45
moritz_ Khisanth: my laptop has a TFT, nothing fancy... why? 20:46
Khisanth perlgeek.de/blog-en/perl-5-to-6/ is yours isn't it? it's a bit blinding 20:47
lambdabot Title: blog | Perlgeek.de Blog :: Category Perl-5-to-6
moritz_ Khisanth: the background?
Khisanth yes
moritz_ I'll try to make it a bit darker 20:48
pmurias ruoso: why do you set fields to NULL in DESTROYALL? 20:49
ruoso pmurias, to force segfaults if someone try to use that value... 20:50
moritz_ Khisanth: only the bright part at the bottom, or is the top part too bright as well? 20:51
Khisanth approx the lower 60% 20:52
moritz_ Khisanth: better now?
Khisanth heh 20:53
I'll just get rid of it with firebug 20:54
moritz_ I just made it quite a bit darker
Khisanth ? I still see 00FF00 20:56
moritz_ that's weird, maybe browser cache? 20:57
pmurias ruoso: still fighting leaks? 20:58
Khisanth moritz_: it's coming from perlgeek.de/css/screen/basemod.css 21:00
moritz_ thought it came from the background image 21:01
that's all I see
Khisanth I know why my browser window is taller than yours :) 21:02
moritz_ Khisanth: try again please 21:03
yes, probably
I suck as a web designer
Khisanth better :)
well at least it didn't have scanlines! 21:04
moritz_ that's why do the test suite instead of making a fortune with websites ;)
ruoso pmurias, yeah... and these leaks are getting me nervous... 21:07
ruoso home & 21:08
21:08 ruoso left, pmurias left 21:12 LimbicRegion joined 21:17 sirhc joined 21:19 fullermd joined 21:20 smg left 21:24 jhorwitz left 21:27 Limbic_Region left, LimbicRegion is now known as Limbic_Region 21:37 TJCRI left 21:39 pmurias joined, Exodist left, Exodist joined
pmurias @tell ruoso if the leaks are too annoying, we can ignore them, and i'll code a GC soonish 21:43
lambdabot Consider it noted.
21:43 pmurias left 22:00 [particle]1 joined 22:06 zamolxes joined 22:12 [particle] left 22:46 iblechbot_ left 22:50 explorer__ is now known as jferrero, smg joined 23:04 hercynium left 23:24 cognominal left 23:25 Exodist left 23:32 cognominal joined 23:36 Ehtyar left 23:37 zamolxes left, cognominal left 23:44 cognominal joined 23:53 wknight8111_ joined 23:59 jferrero left