Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-09-09

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

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

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo