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.
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
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
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
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 & 01:53
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
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...
moritz_ s1n: pong 06:43
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
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
pmurias Juerd: could i request a www.p3rl.org/smop pointing to www.perlfoundation.org/perl6/index.cgi?smop ? 09:54
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
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
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
audreyt (bbiab) 11:15
pmurias cycling& 11:18
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␤]
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␤]
rakudo_svn r30927 | pmichaud++ | [rakudo]: spectest-progress.csv update: 158 files, 3288 passing tests 15:11
moritz_ rakudo: 3287 - 2798 15:14
p6eval rakudo 30926: RESULT[489]
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
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
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
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
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
moritz_ that's because kp6 needed loads of ram, thus the memory limit is quite generous 16:55
pmurias ruoso: hi 17:27
ruoso hi pmurias
pmurias ruoso: do you think i should start working on a GC for smop? 17:32
ruoso a trace gc? 17:37
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
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...
pmurias ruoso: re trace gc, a naive one should be quite simple, the hard part would be getting the gc fast 18:10
ruoso pmurias, if that means painfully slow... I'd rather keep the refcounting gc 18:23
moritz_ do you have a proof of concept for another storage mechanism than p6opaque? 18:23
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
ruoso moritz_, well... in some sense, it is... 18:31
SMOP do have a lot of different representations in place
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
Limbic_Region xyzpdq 18:53
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
pmurias * separate 19:51
meppl good night
pugs_svn r22196 | pmurias++ | [pugs-m0ld] method calls 20:03
pmurias S02:01 #forgot the smarlinks url 20:19
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
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.