Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-09-24

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:11 eternaleye joined #perl6
00:45 mncharity joined #perl6
01:04 AzureStone_ joined #perl6
01:06 silug joined #perl6
01:10 kanru joined #perl6
01:25 hercynium joined #perl6
01:26 smg joined #perl6
01:28 pugs_svn r22331 | putter++ | [elf] elf_h forked from elf_g.
01:28 pugs_svn r22331 | putter++ | elf_g remains the recommended stable version of elf.  2 months old today.
01:28 pugs_svn r22331 | putter++ | elf_h is the unstable development head.
01:28 pugs_svn r22331 | putter++ | Dusted TODO.  elf_g now uses its own copy of STD_red.
01:36 Ontolog joined #perl6
01:54 Ehtyar joined #perl6
01:55 pugs_svn r22332 | putter++ | [STD_red] First rough draft of a dump format for Common Lisp.
02:06 Alias_ joined #perl6
02:11 Alias_ joined #perl6
02:14 s1n moritz_: ping
02:18 redicaps joined #perl6
02:32 Ontolog_ joined #perl6
02:46 hercynium_ joined #perl6
02:50 kanru joined #perl6
03:03 elmex_ joined #perl6
03:23 lion_ joined #perl6
03:50 justatheory joined #perl6
03:53 Ontolog moritz_: what was that bug number affecting returning a list of Match objects?
03:59 sri_work joined #perl6
04:20 xuser left #perl6
04:25 charsbar joined #perl6
04:37 eternaleye_ joined #perl6
04:39 s1n moritz_++ good work on the test suite lately
04:42 Tene moritz++ I agree
04:43 s1n we're over 5000 passing with over 8000 planned in t/spec!
04:50 yves joined #perl6
05:45 Psyche^ joined #perl6
06:35 ashizawa joined #perl6
06:45 Ontolog I'm going through the PCT tutorial. I have an error: PAST::Compiler can't compile node of type Monkey::Grammar
06:45 Ontolog Is there any way to tell parrot to be more verbose? I would like to know *why* can't it compile the node
06:46 Ontolog and no, options w and v don't help
06:47 Ontolog oops i'm on the wrong channel :p
07:12 jferrero joined #perl6
07:22 iblechbot joined #perl6
07:24 pmurias joined #perl6
07:33 moritz_ re
07:33 moritz_ s1n: pong
07:35 pmurias moritz_: hi
07:35 moritz_ pmurias: good morning ;)
07:36 pmurias good morning
07:37 Ontolog i don't understand why I am getting <integer_constant> => PMC 'Monkey::Grammar' => "Hash[0x83a4298]" @ 2
07:37 Ontolog when I should be getting <integer_constant> => PMC 'Monkey::Grammar' => 1 @ 2
07:38 moritz_ you have a capture more than you think?
07:39 Ontolog can't be
07:39 Ontolog input is a=1
07:40 moritz_ what does your rule integer_constant look like
07:41 pugs_svn r22333 | pmurias++ | [smop] changed smop back to a static library so pugs linked with it doesn't need LD_LIBRARY_PATH
07:42 Ontolog rule integer_constant { \d+ {*} }
07:43 pmurias does making pugs accept both perl6 and m0ld seem sane?
07:51 dduncan joined #perl6
07:52 moritz_ pmurias: if the m0ld is somhow delimited... why not?
07:59 Tene joined #perl6
08:08 barney joined #perl6
08:11 pmurias moritz_: i could make m0ld delimited or use a -F option, what i' worried about if it's not making pugs too smopish
08:13 moritz_ that's not a worry I can address
08:15 pmurias nobody else is (visibly) working on pugs so that's propably not a big worry
08:17 dduncan left #perl6
08:23 masak joined #perl6
08:27 masak moritz_: aye. I generally backlog. :)
08:27 masak too much interesting going on here.
08:29 moritz_ masak: so did you backlog parrotsketch? ;-)
08:29 pugs_svn r22334 | pmurias++ | [pugs] Pugs.Embed.M0ld imports a modulized M0ld.hs which now lives in src/
08:29 masak moritz_: no, doing that now
08:29 moritz_ masak: in short, green light for your commit bit
08:29 masak \o/
08:30 moritz_ either pmichaud or I will be mentoring you
08:30 masak I look forward to that
08:30 masak wow, this feels much better than I thought it would :)
08:31 moritz_ hehe ;)
08:33 smtms_ joined #perl6
08:36 Tene joined #perl6
08:40 masak perl6: 1 ?? 2 : 3 # this makes Rakudo's parser freak out
08:40 p6eval rakudo 31377: OUTPUT[ResizablePMCArray: Can't pop from an empty array!␤current instr.: 'parrot;PGE::OPTable;parse' pc 1754 (compilers/pge/PGE/OPTable.pir:495)␤]
08:40 p6eval ..pugs: OUTPUT[*** ␤    Unexpected ": 3"␤    expecting operator or "!!"␤    at /tmp/4OqfHgrmYE line 1, column 8␤]
08:40 p6eval ..elf 22334: OUTPUT[Parse error in: /tmp/4kmbr4ZrzD␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: 1 ?? 2 : 3 # this makes Rakudo␤WHERE:/\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:76:in `scan_unitstopper'␤  STD_red/std.rb:224:in `comp_unit'␤
08:40 p6eval ..STD_r...
08:40 masak did we create an RT ticket for that? I don't remember
08:42 moritz_ masak: yes, you did
08:42 moritz_ perl6: 1 ?? 2 !! 3
08:42 p6eval pugs, rakudo 31377: RESULT[2]
08:42 p6eval ..elf 22334: OUTPUT[Unknown rule: infix:conditional␤It needs to be added to ast_handlers.␤ at ./elf_f line 1918␤]
08:43 masak elf++ # awareness of its own limits
08:59 penk joined #perl6
09:02 masak rakudo: say +("1" ~ "0" x $_) for 308, 309
09:02 p6eval rakudo 31378: OUTPUT["load_bytecode" couldn't find file 'PGE.pbc'␤current instr.: 'parrot;PCT::Grammar;onload' pc 0 (src/PCT/Grammar.pir:41)␤]
09:03 masak recompiling again? :)
09:06 masak rakudo: say +("1" ~ "0" x $_) for 308, 309
09:06 p6eval rakudo 31378: OUTPUT[1e+308␤inf␤]
09:10 wknight8111 joined #perl6
09:24 cosimo joined #perl6
09:29 zamolxes joined #perl6
09:45 pmurias moritz_: pugs -Bm0ld will work soon how should it be added to the evalbot? or do you have time to add it yourself?
10:06 pmurias_ joined #perl6
10:34 clintongormley joined #perl6
10:55 clintongormley1 joined #perl6
10:57 wknight8111 joined #perl6
11:09 iblechbot joined #perl6
11:12 ilogger2_ joined #perl6
11:37 penk left #perl6
11:47 clintongormley joined #perl6
11:50 pjcj joined #perl6
11:50 pugs_svn r22335 | pmurias++ | [pugs] pugs -Bm0ld creates a simple mold frame
11:52 pmurias @tell ruoso it turned out rootnamespace was an undead objects (it got DESTROYALLED) just after creation and "lived" on with a counter near 999
11:52 lambdabot Consider it noted.
12:24 abra joined #perl6
12:26 pmurias_ joined #perl6
12:39 pugs_svn r22336 | pmurias++ | [pugs] [smop] the haskell gc does the refcounting for the SMOP__Objects passed around in haskell code
13:05 zamolxes joined #perl6
13:10 abra joined #perl6
13:16 ahmadz joined #perl6
13:16 masak joined #perl6
13:17 rakudo_svn r31379 | pmichaud++ | [rakudo]: spectest-progress.csv update: 177 files, 3779 passing tests
13:22 ilogger2_ joined #perl6
13:22 AzureStone_ joined #perl6
13:22 |jedai| joined #perl6
13:22 dalek joined #perl6
13:22 yahooooo joined #perl6
13:22 Helios- joined #perl6
13:22 c9s joined #perl6
13:22 lumi joined #perl6
13:22 awwaiid joined #perl6
13:22 wolverian joined #perl6
13:22 qwr joined #perl6
13:26 Lorn joined #perl6
13:48 masak progress++
13:51 ahmadz hi
13:52 masak ahmadz: hello.
13:52 pmurias_ ahmadz: hi
13:52 ahmadz masak: raduko is part of parrot svn right?
13:52 ahmadz pmurias_: hello
13:52 masak ahmadz: yes, it is.
13:53 masak but the rakudo part of svn commits is reported here too
13:53 ahmadz i noticed
13:55 ahmadz so raduko passes t/spec in pugs or parrot svn?
13:55 masak t/spec resides in Pugs svn
13:55 masak when you run 'make spectest', it's imported/updated locally
13:56 * qwr wonders whether you consistent mispelling or is raduko some weird thing I don't know...
13:56 qwr s/you/you are/
13:57 ahmadz qwr: sorry for that
13:57 masak qwr: I didn't see it until now. :)
13:57 qwr heh, ok ;)
13:58 masak we could name a Perl 6 project raduko and see what happens. and perhaps rukado, rokadu, rodaku and radoku, too.
13:59 masak we clearly haven't filled the space of names yet.
14:03 pmurias_ naming a Python project raduko and seeing what happens would be even more fun
14:03 masak yes, that's even better
14:04 ahmadz interesting
14:04 masak the name 'Radoku' sounds like it could involve numbers in a 9x9 grid somehow
14:06 ahmadz radoku ~ sudoku
14:06 pmurias_ sudoku--
14:09 masak pmurias_: I think I've gotten over my distaste for Sudoku. it doesn't mean I'm any more interested, I just don't care much either way any more. the masses will always need some kind of opium, even if it consists of filling in numbers in predefined ways.
14:10 masak who knows, such activities might even stave off dementia for some folks
14:12 moritz_ pmurias_: is the interface simply 'pugs -Bm0ld filename'?
14:13 masak moritz_: I'd make 'mold' and 'm0ld' synonyms if I were you, to avoid awkward questions :)
14:13 jhorwitz joined #perl6
14:13 moritz_ masak: not my choice, tell pmurias_ ;)
14:13 masak pmurias_: I'd make 'mold' and 'm0ld' synonyms if I were you, to avoid awkward questions :)
14:14 pmurias_ moritz_: yes
14:15 pmurias_ moritz_: pugs needs compiling with ./Setup configure --user --flags=SMOP;./Setup build and smop needs to be build with make
14:16 * pmurias hates the _ suffix ;)
14:17 pmurias masak: maybe a smop synonym?
14:18 moritz_ pmurias: I'll probably get to it later
14:19 pmurias moritz_: i'm still fighting strange bugs
14:19 masak pmurias: aye
14:26 pmurias maybe symbolic references in C with dlopen(NULL,RTLD_LAZY) are a bit too magical...
14:30 funktio joined #perl6
14:33 jan_ joined #perl6
14:51 moritz_ if you ask yourself where yesterday night's leap in rakudo's passed test count came from...
14:51 moritz_ I wrote a new tool that helps to better identify which tests mostly pass
14:52 Tene How many passing tests are there now?
14:52 moritz_ 3779
14:52 Tene Nice.
14:52 Tene moritz++
14:52 moritz_ as opposed to 3434 the day before
14:57 PerlJam for some reason I am reminded of The Princess Bride and the hero being "mostly" dead.
14:57 cjfields joined #perl6
14:58 moritz_ anyway, I'll test that thing a bit more, and then commit as a replacement for tools/update_passing_test_data.pl
14:59 kane_ joined #perl6
15:15 hudnix_ joined #perl6
15:16 pasteling "spinclad" at 209.6.140.232 pasted "masak: proper credit for 'every day christmas'" (25 lines, 2.2K) at http://sial.org/pbot/32323
15:18 moritz_ spinclad++ # "(i asked purl if i could quote her, she had no objection)"
15:19 rindolf joined #perl6
15:19 mncharity joined #perl6
15:20 elmex joined #perl6
15:24 hercynium joined #perl6
15:54 justatheory joined #perl6
15:55 pmichaud I think that the "every day christmas" quote actually comes from audreyt
15:56 [particle] yes, may need to search logs for "xmas"
15:57 pmichaud I think I first heard about it at yapc 2005
15:57 pmichaud might've been yapc 2006
15:57 [particle] toronto? sounds familiar
16:06 Exodist joined #perl6
16:15 clintongormley1 joined #perl6
16:16 pmurias joined #perl6
16:19 pmurias mncharity: hi
16:23 moritz_ pmurias: smop/m0ld seems to depend on autobox, but not probing for it
16:24 moritz_ or autobox::Core
16:24 pmurias sm0p more likely m0ld is in haskell
16:24 moritz_ ok, smop then ;)
16:25 moritz_ what a colourful build process ;)
16:26 pasteling "moritz_" at 89.13.226.127 pasted "smop build failure (for pmurias/ruoso)" (13 lines, 781B) at http://sial.org/pbot/32324
16:29 pmurias moritz_: doesn't happen here everything is svn up'd and unmodified?
16:30 moritz_ pmurias: "yes" to both
16:31 moritz_ when I started the build pugs wasn't built with m0ld support
16:31 moritz_ is that a problem?
16:31 pmurias shouldn't be
16:32 pmurias could you nopaste the build/test/33_pugs_simple.m0ld
16:32 pasteling "moritz_" at 89.13.226.127 pasted "build/test/33_pugs_simple.m0ld (for pmurias)" (1 line, 2.6K) at http://sial.org/pbot/32325
16:33 pmurias moritz_: looks like you have an old pugs
16:34 moritz_ pmurias: I did an 'svn up', and then the ./Setup incantation you gave me earlier
16:34 moritz_ should I try a 'make clean' first?
16:35 pmurias cp dist/build/pugs/pugs pugs
16:35 pmurias sorry, my fault
16:36 moritz_ ok, arrived at 100%
16:39 pugs_svn r22337 | moritz++ | [evalbot] add m0ld support, remove yap6
16:39 moritz_ evalbot control restart
16:39 p6eval joined #perl6
16:39 moritz_ pugs: say "sanity check"
16:39 p6eval pugs: OUTPUT[sanity check␤]
16:39 moritz_ m0ld: say "hi"
16:39 p6eval m0ld: OUTPUT[pugs: user error (Cannot evaluate in M0ld)␤␤]
16:41 moritz_ pmurias: should that work right now?
16:41 pmurias in a minute or too
16:42 [particle] m0ld: 1.say
16:42 p6eval m0ld: OUTPUT[pugs: user error (Cannot evaluate in M0ld)␤␤]
16:43 [particle] m0ld: 1
16:43 p6eval m0ld: OUTPUT[pugs: user error (Cannot evaluate in M0ld)␤␤]
16:43 * [particle] explores the limits of m0ld :(
16:50 pugs_svn r22338 | pmurias++ | [pugs] evaling code in the embedded smop works
16:50 pmurias moritz_: could you rebuild pugs with ./Setup configure --user --flags=SMOP;./Setup build;cp dist/build/pugs/pugs pugs
16:52 moritz_ pmurias: that's pretty much what my build script does... testing it now, and if it works, I'll make a cron job out of it
16:52 moritz_ m0ld: say "hi"
16:52 p6eval m0ld: OUTPUT[pugs: user error (Cannot evaluate in M0ld)␤␤]
16:52 pmurias that error indicates smop support is not build in
16:53 * moritz_ tries a 'make clean'
16:56 pmurias and m0ld: should be propably be called smop: as rakudo: is not called pir:
16:57 moritz_ now that's easy to do ;)
16:57 pugs_svn r22339 | moritz++ | [evalbot] s/m0ld/smop/
16:57 moritz_ evalbot control restart
16:57 p6eval joined #perl6
16:58 pugs_svn r22340 | pmurias++ | [pugs] a better error message if smop embedding is not configured
16:58 pmurias smop: $*OUT.print("Hello\n")
16:58 p6eval smop: OUTPUT[pugs: user error (Cannot evaluate in M0ld)␤␤]
16:58 pmurias evalbot control restart
16:58 moritz_ pmurias: rebuild is not yet completed
16:58 p6eval joined #perl6
16:58 pmurias smop: $*OUT.print("Hello\n")
16:58 p6eval smop: OUTPUT[pugs: user error (Cannot evaluate in M0ld)␤␤]
16:59 moritz_ and evalbot doesn't need to be restarted when the implementations change
16:59 pmurias good
17:00 moritz_ smop:  $*OUT.print("Hello\n")
17:00 p6eval smop: OUTPUT[pugs: user error (Cannot evaluate in M0ld)␤␤]
17:01 pmurias you don't run perl Makefile.pl;make right?
17:01 TJCRI joined #perl6
17:01 pmurias smop: $*OUT.print("Hello\n")
17:01 p6eval smop: OUTPUT[pugs: user error (Cannot evaluate in M0ld)␤␤]
17:01 moritz_ no, I run ./Setup --user --flags=SMOP
17:01 moritz_ and then ./Setup build
17:01 pmurias it's ./Setup configure --user --flags=SMOP
17:02 moritz_ erm, yes
17:02 moritz_ sorry, didn't copy and paste
17:02 eternaleye joined #perl6
17:02 pasteling "moritz_" at 89.13.226.127 pasted "pugs build script" (12 lines, 188B) at http://sial.org/pbot/32326
17:04 pmurias you should make smop first
17:04 pmurias smop: $*OUT.print("Hello\n")
17:04 p6eval smop: OUTPUT[pugs: user error (Cannot evaluate in M0ld)␤␤]
17:05 moritz_ ok, trying again
17:05 pmurias it shouldn't matter, the pugs in the evalbot isn't HEAD btw
17:06 moritz_ pugs: say $?PUGS_VERSION
17:06 p6eval pugs: OUTPUT[Perl6 User's Golfing System, version 6.2.13.11, July 31, 2008 (r20996)␤]
17:06 moritz_ uhm.
17:06 moritz_ that explaiins a lot
17:06 moritz_ it executes the wrong pugs
17:06 moritz_ sorry for the mess
17:07 kanru joined #perl6
17:08 moritz_ but why?
17:09 moritz_ dist/build/pugs/pugs -e 'say $?PUGS_VERSION' also says r20996
17:09 * moritz_ doesn't understand what's going on
17:11 pmurias &
17:12 masak joined #perl6
17:12 moritz_ computers--
17:13 [particle] humans++
17:13 moritz_ don't DWIM
17:13 moritz_ humans-- # don't teach the computers how to DWIM, at least not good enough
17:13 [particle] computers++ # do exactly what you tell them to
17:14 moritz_ ..except when they don't ;-)
17:15 masak I don't believe that more DWIM is always better. and IRC bots have convinced me that narrow AI rocks.
17:15 masak except for purl, a very obnoxious bot
17:15 moritz_ ;)
17:17 [particle] <purl>i know you are, but what am i?</purl>
17:20 ilogger2 joined #perl6
17:20 mncharity howdy pmurias, how goes?
17:21 pmurias fine, i'm putting the pugs smop backend into the evalbot
17:22 moritz_ I just tried on a different machine
17:23 pugs_svn r22341 | putter++ | [elf] Finished elf_h fork.  Tweaked IR.  Updated test results.
17:23 moritz_ the revision number didn't get updated on rebuild
17:23 mncharity pmurias: neat.
17:23 zamolxes joined #perl6
17:24 pmurias smop: $*OUT.print("hello\n")
17:24 p6eval smop: OUTPUT[smop embedding is disabled use ./Setup configure --user --flags=SMOP␤]
17:25 moritz_ that's what I get on a different machine as well
17:25 moritz_ does smop need to be in $PATH?
17:25 pmurias no, smop is staticly linked in
17:26 mncharity re neat, pity it isn't elf.  ;)  any feedback?  went with the more working parser?
17:26 ruoso joined #perl6
17:26 pmurias mncharity: went with the more working ast
17:27 mncharity more working in what way?  the infix:<,> you mentioned?  anything else?
17:27 pmurias ruoso: hi
17:27 ruoso hi pmurias
17:27 lambdabot ruoso: You have 2 new messages. '/msg lambdabot @messages' to read them.
17:27 pmurias mncharity: looking...
17:27 mncharity no hurry.  but would definitely like to know at some point.
17:29 mncharity just to make absolutely sure you know, you realize you are not going to be getting oo declarations out of the old pugs parse, right?
17:30 pmurias pugs: class Foo {has $.foo;};my $foo = Foo.new(foo=>1);say $foo.foo;
17:30 p6eval pugs: OUTPUT[1␤]
17:31 pmurias mncharity: pugs seems to parse oo declarations
17:32 mncharity yes, but that's not what you are using pugs for (unless I've badly misunderstood).  take a look at your pil output.
17:33 ruoso smop: $*OUT.print("Hello World!\n")
17:33 p6eval smop: OUTPUT[smop embedding is disabled use ./Setup configure --user --flags=SMOP␤]
17:33 mncharity there's a reason we've been stuck on exactly this for a couple of years.  not just "no one got around to doing a backend". :)
17:33 ruoso ahhh
17:34 pmurias mncharity: pil didn't have my declarations which is much more serious, but i hacked them in
17:34 * ruoso . o O ( if pmurias has a declaration I want one on my own ;) ;) ;) )
17:35 mncharity lol
17:35 pmurias ruoso: you can have our declarations
17:35 ruoso heh...
17:35 mncharity hacked them in?!?  do please elaborate.
17:36 mncharity oh, "my" decarations.  ok.  nm.  but have you seen the pil for class declarations?
17:37 pmurias the typical pugs run is "source code" -> AST
17:37 pmurias when you add a custom backend it's "source code" -> AST -> PIL1 -> "something else"
17:37 pmurias everything pugs can run it has in the AST
17:38 mncharity (I have to go.  sorry.  back laterish)
17:39 pmurias and there's nothing special about PIL1
17:40 pmurias mncharity: i'll propably switch to elf if audreyt doesn't go back to hacking on pugs
17:41 ruoso pmurias++ # pugs -BM0ld works here :)
17:42 ruoso moritz_, for some reason it only started working after I rebuild SMOP after building pugs for the first time... (or something like that)
17:42 masak will we steal qualified imports from Haskell into Perl 6? :)
17:42 ruoso but it does work now :)
17:42 moritz_ masak: I think we did already
17:42 masak moritz_: oh, good.
17:43 moritz_ S11 or S10, I alway forget which one covers what
17:43 masak oki
17:43 moritz_ ruoso: it feels like rebuilt both pugs and smop 10 times already :(
17:44 ruoso did you saw " Compiling M0ld.AST " at any of those times?
17:44 moritz_ dunno
17:46 ruoso moritz_, change the build script to build SMOP before pugs
17:46 moritz_ there seemss to be no 'make clean' for smop - what do you use iinstead?
17:46 ruoso rm -rf build
17:51 * ruoso :) it's nice because it's already sanely looking for variables in the lexical scope, just as expected... Pugs+SMOP seems to be a very interesting pair...
17:52 * moritz_ tries to remove ~/.cabal and ~/.ghc and then tries a last time
17:52 ruoso moritz_, are you building smop before trying to build pugs?
17:53 moritz_ ruoso: yes
17:56 ruoso pmurias, the reason for using static linking is just to avoid LD_LIBRARY_PATH needing to be set?
18:02 moritz_ no luck again
18:02 moritz_ ./pugs -V |grep -i smop
18:02 moritz_ no output
18:04 ruoso smop: hell0o
18:04 p6eval smop: OUTPUT[smop embedding is disabled use ./Setup configure --user --flags=SMOP␤]
18:04 ruoso :(
18:05 ruoso moritz_, do you have the buildlog?
18:06 moritz_ ruoso: no, but I can try again...
18:06 moritz_ ruoso: do you need pugs build log, or both?
18:06 pmurias_ joined #perl6
18:06 ruoso are you using that script you pasted above?
18:07 moritz_ yes
18:07 jferrero joined #perl6
18:07 moritz_ but I changed it to build smop first
18:07 ruoso right... so the log is for that script...
18:07 ruoso which involves both pugs build and smop build
18:07 ruoso right?
18:07 moritz_ right
18:07 pmurias_ ruoso: re static linking yes, it's a one word change
18:08 ruoso pmurias_, right... I think it'll probably be easier later to have it as dynamic... to avoid having to rebuild pugs every time
18:09 moritz_ ruoso: http://moritz.faui2k3.org/tmp/pugs-build-log
18:10 pmurias_ moritz_: cp Pugs.cabal.in Pugs.cabal
18:10 moritz_ pmurias_: and then?
18:11 pmurias_ ./Setup configure --user --flags=SMOP and then ./Setup build
18:11 moritz_ [14 of 93] Compiling M0ld.AST
18:12 moritz_ pmurias_: do I have to do that copy step on each build?
18:13 justatheory joined #perl6
18:13 moritz_ smop: $*OUT.print: "foo"
18:13 p6eval smop: OUTPUT[foo]
18:13 ruoso :) :) :): ): ): ):)
18:13 moritz_ indeed
18:13 moritz_ smop: say "foo"
18:13 p6eval smop: OUTPUT[no variable &say in the current scope␤]
18:14 pmurias_ :(
18:14 pmurias_ moritz_: you don't have to but you propably should
18:15 ruoso "no variable &say" is the expected error :)
18:15 pmurias_ as we don't use perl Makefile.PL;make we have to do what they do
18:16 moritz_ or tweak Makefile.PL to enable smop embedding ;)
18:16 pugs_svn r22342 | pmurias++ | [pugs] -Bm0ld supports integers
18:17 pmurias_ moritz_: yes
18:18 ruoso that's probably better... since I can't make it work on my machine anymore... :)
18:18 pmurias_ ruoso: what's the error?
18:19 ruoso pmurias_, it simply doesn't get smop
18:19 ruoso it throws me the "no embedded smop" error
18:19 ruoso but when I change Makefile.PL it works..
18:19 pugs_svn r22343 | azawawi++ | [pugs] Added a solution to "Cannot install zlib: 256" after 'perl Makefile.PL'
18:19 pugs_svn r22343 | azawawi++ | [pugs] Separated problems with line separators
18:20 ruoso pmurias_, we probably need to take the tests out of the default compile target
18:20 ruoso since pugs depends on smop, and the smop tests depend on pugs
18:22 ruoso and the cool thing is that pugs and smop are getting together really nice...
18:22 ruoso producing the expected errors where expected...
18:22 ruoso like...
18:23 ruoso smop: $*OUT("no postcircumfix:( ) at this variable")
18:23 p6eval smop: OUTPUT[unknown method "postcircumfix:( )" at message line 55 file /home/evalenv/pugs/v6/smop​/build/src/smop_s1p_io.c␤]
18:24 ruoso smop: $*FOO = 1; $*OUT.print($*FOO);
18:24 p6eval smop: OUTPUT[no variable $*FOO in the current scope␤]
18:24 ruoso hmm... that was not expected...
18:24 pmurias_ that's actually wrong
18:24 moritz_ why?
18:24 ruoso because $*FOO is global, not a lexical
18:24 moritz_ are global variables not subject to strict?
18:24 pmurias_ no
18:24 ruoso that's what makes them global ;)
18:24 ruoso and undesirable ;)
18:25 ruoso it shouldn't even be looking in the lexical scope...
18:25 pmurias_ globals are a low priority
18:26 pmurias_ could you commit your change to Makefile.PL (propably conditional with $ENV{PUGS_EMBED} =~ /\bsmop\b/)
18:27 pmurias smop: $*OUT.print(1,"\n")
18:27 p6eval smop: OUTPUT[1␤]
18:30 pugs_svn r22344 | pmurias++ | [pugs/smop] changed $*OUT to $OUT as $*OUT is a global not a lexical
18:39 pugs_svn r22345 | pmurias++ | [smop] removed test 33 from the default test target
18:42 TimToady joined #perl6
18:46 pugs_svn r22346 | ruoso++ | [pugs] add --flags=SMOP if $ENV{PUGS_EMBED} =~ /\bsmop\b/i
18:52 japhb joined #perl6
18:52 ruoso pmurias, for some reason, pugs is trying to lookup itself for global variables
18:53 ruoso smop: $FOO
18:53 p6eval smop: OUTPUT[*** ␤    Unexpected end of input␤    expecting "::"␤    Variable "$FOO" requires predeclaration or explicit package name␤    at /tmp/wBNnIL4j9u line 1, column 5␤]
18:53 ruoso smop: $*OUT.print("Hello")
18:53 p6eval smop: OUTPUT[no variable $*OUT in the current scope␤]
18:53 ruoso smop: $OUT.print("Hello")
18:53 p6eval smop: OUTPUT[no variable $*OUT in the current scope␤]
18:54 justatheory joined #perl6
18:55 ruoso it seems that pugs is trying to be too smart
18:56 pmurias smtms: $OUT.print("hello")
18:56 pmurias sorry
18:57 pmurias smop: $OUT.print("Hello here\n")
18:57 p6eval smop: OUTPUT[no variable $*OUT in the current scope␤]
18:57 pmurias ruoso: pugs is running no strict
18:58 ruoso pmurias, but it shouldn't be doing that anyway...
18:58 ruoso should it?
18:59 pmurias no strict is the default for one liners
18:59 ruoso sure... but does "no strict" means translating $OUT to $*OUT?
19:00 pmurias why not?
19:00 ruoso I'd expect $OUT to create a new variable...
19:00 ruoso specially because you don't start in package *
19:00 ruoso you start in package Main
19:00 ruoso so at most it would create Main::$Out
19:01 ruoso but I don't see how it would get to $*OUT
19:01 pmurias maybe no strict falls back to globals not to package variables
19:01 apeiron_ joined #perl6
19:02 ruoso hmm... that would be strange...
19:02 pmurias no strict doesn't make much sense
19:03 ruoso the specs only talk about when strict *is* in effect...
19:03 ruoso I can't find a reference to 'no strict'
19:04 pmurias falling back to a global is the least strict option
19:05 ruoso pmurias, being global and being in the package * are two different things
19:05 pmurias don't think so
19:05 ruoso global is about visibility, not about where it is
19:06 pmurias S10:58
19:07 ruoso but packages are, by default, our
19:07 ruoso which means that they're global
19:07 ruoso even if they are not *
19:07 pmurias no they aren't you can have versioned packages
19:08 ruoso pmurias, when the parser starts, it's in the package *, so package Foo at the beggining of a file, means *Foo
19:08 ruoso the same way, if there's no package declaration, the runtime puts you into *Main
19:09 ruoso the most logical thing would be for $FOO to be *Main::$FOO
19:09 ruoso not $*FOO
19:09 pugs_svn r22347 | masak++ | [ord_and_chr.t] added tests for multi-arg variants of ord and chr
19:11 pmurias ruoso: imagine having version 0.1 and 0.2 of a versioned *global* package at once
19:11 abra joined #perl6
19:11 ruoso pmurias, being loaded at the same time?
19:12 ruoso you have two alternatives...
19:12 ruoso the first would be that this is not possible...
19:12 ruoso the second would imply that each versioned package registers itself globally with fully-versioned-name *Foo::0.1 and *Foo::0.2
19:13 ruoso and Foo is bound to each place that "use Foo"
19:13 ruoso but that means $*Foo::bar is undetermined
19:14 ruoso although $Foo::bar in a place that use'd Foo will point to the correct version...
19:14 pmurias the third option is that the spec is inconsitent
19:14 pmurias * inconsistent
19:15 ruoso pmurias, the spec tries very hard to make globals unpleasant :)
19:16 ruoso but the fact is...
19:17 ruoso package Foo; at the start of a file means creating a global package that is stored as *Foo
19:18 ruoso and unless you 'use Foo' or 'require Foo', you can only access it as *Foo...
19:18 ruoso 'use Foo' or 'require Foo' will create a local bind of that package as "Foo" in the current lexical scope
19:18 ruoso which will allow you to use Foo.new()
19:19 ruoso perl -MFoo will probably add Foo to the prelude scope...
19:19 ruoso so that it becomes omnipresent...
19:19 pmurias ruoso: i don't think it's the intention to make the globals more unpleasant then they already are by they very nature
19:19 cjfields joined #perl6
19:20 cjfields_ joined #perl6
19:20 pmurias TimToady: does package Foo at the top create a global *Foo package? if so why? wouldn't that screw up versioning?
19:21 ruoso pmurias, I'm not sure current versioning schema provides loading two different versions of a library at the same time...
19:22 pmurias ruoso: if they are purly lexical you can have as many as you want provided they are used from seperate lexical scopes
19:22 sri_work_ joined #perl6
19:23 pmurias and i think that's more important then builting support for monkey patching
19:23 ruoso "A bare package declarator declares an our package within the current package"
19:24 ruoso All files start out being parsed in the * package, but switch to some other package scope depending on the first declaration
19:24 pmurias ruoso: i am aware what the spec says i just thinks it's a bug
19:25 ruoso pmurias, if you take a look at S11, you'll see that package Foo; is an incomplete name
19:25 ruoso the actual name of the package should include the version
19:26 pmurias it's not just that
19:26 ruoso so it looks like *Foo:ver<0.1>:auth<DRUOSO>
19:26 ruoso and 'use Foo' creates a local bind of "Foo" pointing to that package
19:26 pmurias it's wrong to be able to access Foo::bar just because something somewhere loaded the Foo package
19:27 ruoso not Foo::bar...
19:27 ruoso but *Foo:ver<0.1>:auth<DRUOSO>::bar
19:28 ruoso and if two pieces of code "use Foo", they will point to the same package
19:28 ruoso and Foo::bar in both codes will point to the same var
19:29 pmurias still wrong
19:29 ruoso well.. the package needs to be shared in the interpreter...
19:29 ruoso it's just a matter of having a explicit way or a hackish way of accessing the shared package
19:30 ruoso a package is "our" by default...
19:30 pmurias if we want to design premature optimalisation in we can have a native ptr type
19:30 ruoso hm? what does it have to do with that?
19:31 pmurias what's the point of a use Foo in 2 places using the same Foo?
19:32 ruoso perhaps Foo points to a package variable that should be shared?
19:32 ruoso like... subroutines?
19:32 pmurias so it would be an explicit *Foo
19:32 pmurias subroutines shouldn't be shared
19:32 pmurias we are not the monkey patching people
19:32 ruoso well... 'use Foo' creates a local bind to "*Foo" as "Foo"
19:33 ruoso actually... "use Foo" creates a local bind to "wherever_the_package_is_stored" as "Foo"
19:34 pmurias according to the spec which i belive to be severily wrong here
19:34 pmurias * severly
19:35 masak pmurias: 'severely', but who cares? :)
19:36 ruoso pmurias, for "class Foo is also {...}" to work at a distance (as expected) it needs to be that way
19:37 pmurias ruoso: it add stuff to the lexical Foo
19:37 ruoso pmurias, as well as adding a subroutine to an existing package...
19:37 ruoso pmurias, and the lexical Foo points to the shared Foo
19:37 pmurias that's monkey patching
19:37 pmurias use should use use Monkey::Patching to do that
19:38 ruoso pmurias, that's something Perl has always supported, and Perl 6 doesn't mention not supporting it anymore...
19:39 * pmurias searches for chromatics "why monkey patching is stupid: post
19:39 PerlJam just because something is stupid doesn't mean that perl 6 is going to prohibit it.
19:40 ruoso mostly because monkey patching is the most effective way of patching modules you don't maintain...
19:40 PerlJam "goto considered harmful", but we still have it anyway
19:40 moritz_ not prohibiting is not the same as using it as an essential language feature
19:40 ruoso it's not an essential language features...
19:41 ruoso if you use it without doing monkey patching... it won't be monkey patching...
19:41 ruoso but the Packages do need to be shared...
19:42 pmurias PerlJam: my point it that the monkey patching package sharing shouldn't be the default
19:42 PerlJam pmurias: you mean the ability to do so?
19:42 ruoso pmurias, you mean cloning the Package at every 'use'?
19:42 pmurias ruoso: yes
19:42 ruoso ouch...
19:42 ruoso that hurts...
19:43 moritz_ doesn't sound too efficient
19:43 pmurias we are not C++
19:43 ruoso pmurias, you know that makes package variables to behave in a very unexpected way, don't you?
19:44 ruoso like...
19:44 ruoso consider a file with: module Foo { our $bar = 0; sub baz { return $bar++ } };
19:45 ruoso now consider that you have a script... that use Bla; and use Ble;
19:45 ruoso both Bla and Ble use Foo
19:45 ruoso and they will then point to different packages...
19:46 ruoso and point to different values of $bar...
19:46 ruoso that's very unexpected...
19:47 PerlJam ruoso: Hmm.  I think pmurias' way could work if on clone the original package were the "proto-package" for all of the clones and it held the singleton instances of the package variables, but subroutines were all their own.  (if you get my meaning)
19:48 moritz_ how is that different from aliasing then?
19:48 PerlJam It's more like the anoymous class you get when you compose traits into an object at runtime
19:48 pmurias ruoso: imagine what happends when Bla uses Foo >= 0.1 and Ble uses Foo 0.1
19:48 PerlJam s/anoy/anony/
19:48 pmurias * happens
19:49 ruoso PerlJam, that's also unexpected... since subroutines are just variables...
19:49 pmurias ruoso: you can always use module Foo { sub baz { return $*Foo::bar++ } }
19:50 moritz_ pmurias: that's not very DWIMmy
19:50 ruoso pmurias, not DWIMmy at all...
19:51 pmurias things should be correct not DWIMy
19:51 moritz_ things should be both corret and DWIMy
19:51 ruoso I mean... we could abolish globals entirely...
19:51 ruoso but I don't think that's the idea
19:52 pmurias globals should only be used when you explicitly use them
19:55 pmurias and if take efficiency in mind the way i'm proposing is faster
19:55 pmurias s/if/you/
20:05 ruoso well... it's up to TimToady now
20:11 justatheory joined #perl6
20:11 ruoso pmurias, btw... "our $bar" is kinda explicit use of globals...
20:15 TimToady but the current package is lexically scoped
20:16 TimToady and I suspect a Foo::bar without an explicit "use Foo" would pick the same Foo that a bare "use Foo" would do
20:17 ruoso TimToady, but the package is our by default...
20:17 ruoso which ends up being the same...
20:17 TimToady the meaning of package names is lexically scoped
20:17 ruoso right... we agreed to this point...
20:18 ruoso the question is whether they point to the same thing on different places..
20:18 ruoso i.e. the Bla and Ble example I gave above
20:19 TimToady they point to different places.  if two packages want to share a global variable, they need a third package that doesn't change version so often
20:19 TimToady same for an exclusive resource
20:19 TimToady such as a database handle
20:20 pmurias TimToady: what i'm proposing is that packages aren't global unless prefixed with a *
20:20 TimToady "Foo" is ever only a local alias to the long name
20:22 pmurias TimToady: so does package Foo {...} create a GLOBAL::Foo?
20:22 ruoso right... but what does get shared?
20:22 TimToady on phone...
20:23 * ruoso . o O ( GLOBAL::Foo on phone... hmmm... ;) )
20:23 pmurias ;
20:23 pmurias )
20:25 ruoso more importantly... package Foo {...} as the first declaration on a file creates GLOBAL::Foo?
20:26 TimToady package Foo is short for "our package Foo" which creates it in the current package
20:26 ruoso which, as the first declaration, is *
20:26 TimToady which might actually be Main at the start of the file
20:26 TimToady so it's possible we only have *Main
20:27 TimToady and that contains the others
20:27 ruoso er...
20:27 ruoso the spec tells about both * and *Main
20:27 pmurias er...
20:27 TimToady well, the spec could always be wrong :)
20:27 * pmurias hopes it is
20:27 ruoso pmurias, that only change where it's stored...
20:28 ruoso pmurias, not the fact that they are stored as global and shared...
20:28 pmurias TimToady: why doesn't the file start in a lexical package?
20:28 * ruoso have run :(
20:28 TimToady there are no lexical packages
20:28 pmurias ?
20:29 * ruoso have *to* run, actually...
20:29 TimToady or they all are, in another sense
20:29 TimToady anyway, I have to go too...
20:29 * ruoso later &
20:29 pmurias S10:05
20:30 pmurias TimToady: S10:55
20:36 donaldh joined #perl6
20:39 pugs_svn r22348 | azawawi++ | [pugs] Fixed Use of uninitialized value $ENV{"PUGS_EMBED"} in pattern match (m//)
20:44 timbunce joined #perl6
20:50 pmurias moritz_: do you think "module *Foo { our $bar = 0; sub baz { return $bar++ } };" is not DWIMmy enough
20:54 ispy_ joined #perl6
20:54 ahmadz_ joined #perl6
20:55 donaldh joined #perl6
20:55 moritz_ pmurias: can you explain in two sentences to the average perl programmer why you need that * before the Foo?
20:59 lisppaste3 joined #perl6
20:59 donaldh joined #perl6
21:00 pmurias so all of you package variables are shared by everything that uses your module
21:01 pmurias i don't consider the average programmer to understand less than i do
21:01 moritz_ he does
21:06 pmurias he shouldn't be changing the variables in the modules i'm using then ;)
21:10 zamolxes joined #perl6
21:23 pugs_svn r22349 | azawawi++ | [pugs] Removed warning: defaultUserHooks in Setup script is deprecated.
21:56 Jedai joined #perl6
22:01 rakudo_svn r31390 | moritz++ | [rakudo] complete rewrite of tools/update_passing_test_data.pl, now the
22:01 rakudo_svn r31390 | moritz++ | output is much more informative (but less copy&paste frindly)
22:08 moritz_ std: {:a<1>, :b(2)} <a b c>
22:08 p6eval std 22349: OUTPUT[parse failure␤]
22:09 moritz_ std: (1 | 3)<3
22:09 p6eval std 22349: OUTPUT[parse failure␤]
22:11 moritz_ std: print < 3
22:11 p6eval std 22349: OUTPUT[parsed␤]
22:12 moritz_ std: reverse<1 2 3>
22:12 p6eval std 22349: OUTPUT[parsed␤]
22:13 justatheory joined #perl6
22:16 pugs_svn r22350 | moritz++ | [t] moved listquote.t to spec/, deleted bogus tests, and rewrote many others
22:16 pugs_svn r22350 | moritz++ | to use eval_dies_ok.
22:16 pugs_svn r22350 | moritz++ | Also updated TASKS.
22:17 pugs_svn r22351 | azawawi++ | [pugs] Reverted Setup.lhs from previous fix to clear warning
22:18 ahmadz_ moritz: Cabal really complicates things
22:26 apeiron_ joined #perl6
22:30 pugs_svn r22352 | azawawi++ | [pugs] svn ignore on *.hi, Setup, config for third-party
22:30 moritz_ azawawi++ # pugs build system
22:34 pugs_svn r22353 | azawawi++ | set svn ignore on remaining ext/* temp files
22:39 pugs_svn r22354 | azawawi++ | [pugs] Last of the svn ignores
22:42 pugs_svn r22355 | moritz++ | [t/spec] fixed syntax errors in listquote.t, moritz--
22:45 pugs_svn r22356 | moritz++ | [t/spec] fudged listquote.t for rakudo, and remark on testing
22:52 rakudo_svn r31391 | moritz++ | [rakudo] added listquote.t to spectest_regression, and brought back into
22:52 rakudo_svn r31391 | moritz++ | alphabetical order
22:54 Guest70230 joined #perl6
23:07 pugs_svn r22357 | moritz++ | [t/spec] fudged undef.t for rakudo
23:08 pugs_svn r22358 | moritz++ | [t/TASKS] undef.t is now fudged, remove from the list
23:13 rakudo_svn r31392 | moritz++ | [rakudo] added undef.t to spectest_regression.data
23:13 rakudo_svn r31392 | moritz++ | (funnily it has less undef warnings than int.t)
23:30 justatheory joined #perl6
23:46 felipe joined #perl6
23:48 cjfields joined #perl6
23:49 ruoso joined #perl6
23:52 ruoso @tell pmurias, 'package *Foo' doesn't seem to make much sense, since 'package Foo' is already 'our package Foo' which means that it creates a lexical alias "Foo" for the package with the same name which is stored as a member of the package we're at. Considering the file starts to parse in package *, the package is seen as just 'Foo' inside this lexical scope and by anyone who "use" or "require" Foo...
23:52 lambdabot Consider it noted.
23:54 ruoso @tell pmurias, but is globally registered as *Foo. What you seem to be talking about is another type of scope visibility... something like... "my package Foo is export {...}"
23:54 lambdabot Consider it noted.
23:56 ruoso @tell pmurias, but still, this only refers on which names are bound to the package, the package instance is still the same in all cases, the only difference is the way to access it.
23:56 lambdabot Consider it noted.
23:59 meppl joined #perl6

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

Perl 6 | Reference Documentation | Rakudo