Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-08-06

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:37 hercynium joined #perl6
00:39 mauke joined #perl6
00:40 preflex joined #perl6
00:42 penk joined #perl6
00:50 bacek joined #perl6
01:02 alester_ joined #perl6
01:13 wknight8111 joined #perl6
01:47 pugs_svn r21797 | lwall++ | [STD] much improved error messages on runaway strings and other "worries"
02:40 SCalimlim joined #perl6
02:40 BinGOs joined #perl6
02:41 xinming_ joined #perl6
02:43 kanru joined #perl6
02:51 xinming__ joined #perl6
03:02 elmex_ joined #perl6
03:11 simcop2387 joined #perl6
03:17 simcop2387 joined #perl6
03:21 wknight8111 joined #perl6
03:32 pugs_svn r21798 | rhr++ | [utable.t] syntax check with STD
04:00 fridim_ joined #perl6
04:07 fco joined #perl6
04:12 fco joined #perl6
04:39 robert81 joined #perl6
04:55 pbuetow joined #perl6
05:03 luqui joined #perl6
05:39 Psyche^ joined #perl6
05:59 dduncan left #perl6
06:18 ashizawa joined #perl6
07:00 BinGOs joined #perl6
07:01 fridim__ joined #perl6
07:03 cls_bsd joined #perl6
07:20 pmurias joined #perl6
07:20 pugs_svn r21799 | lwall++ | [STD vs t] now passes 99.22%
07:20 pugs_svn r21799 | lwall++ | For parsing sanity, :: is no longer officially a sigil
07:25 pmurias @tell mncharity STD_red's AST output is broken and horrible, so please don't use it, and you should consider not using strange "syntax extensions" as found in IRx1_FromAST for IRx1_FromAST
07:25 lambdabot Consider it noted.
07:26 fridim_ joined #perl6
07:38 barney joined #perl6
07:42 pmurias_ joined #perl6
07:54 pmurias is there a Perl 5 to haskell guide somewhere, showing what the Perl 5 functions translate to etc.?
08:04 Caelum not that I know of
08:06 pmurias i think it would be really usefull when learning haskell (as i'm doing now ;)
08:07 Southen_ joined #perl6
08:14 zamolxes joined #perl6
08:21 bacek_ joined #perl6
08:22 fridim_ joined #perl6
08:29 cognominal_ joined #perl6
08:56 masak joined #perl6
09:05 ludan joined #perl6
09:06 masak has anyone figured out why most of the files time out during `make smoke`?
09:10 fridim__ joined #perl6
09:14 alanhaggai joined #perl6
09:30 audreyt pmurias: http://book.realworldhaskell.org/beta/
09:30 lambdabot Title: Real World Haskell
09:32 pugs_svn r21800 | audreyt++ | * Add links to the online version of the upcoming O'Reilly Title,
09:32 pugs_svn r21800 | audreyt++ |   Real World Haskell, to READTHEM: http://book.realworldhaskell.org/beta/
09:32 lambdabot Title: Real World Haskell
09:33 audreyt masak: can you give me one file that times out?
09:33 audreyt *the name of
09:36 pugs_svn r21801 | fglock++ | [PCR] new ENV option 'PCR_DUMP_AST'
09:39 masak audreyt: ext/Cipher/t/0-cipher-oo.t, and all files after it
09:39 audreyt looking
09:39 masak and it's just not a question of it freezing up, because it uses lost of CPU
09:41 audreyt multimethod dispatching failure... a bit
09:41 masak s:2nd/st/ts/
09:42 masak how come it spreads to all subsequent files?
09:44 audreyt I honestly have no idea. testing
09:52 audreyt I can't dupliacate it
09:53 audreyt masak: I've changed util/yaml_harness.pl from 300 to 3
09:53 audreyt and "make smoke" works past the Cipher line
09:53 audreyt can you confirm?
09:54 masak audreyt: hold on, trying unsuccessfully to abort the current one
09:54 masak for a process, it certainly clings to life
09:57 pasteling "masak" at 130.238.45.242 pasted "make error" (94 lines, 5.1K) at http://sial.org/pbot/31815
09:58 audreyt weird
09:58 masak indeed.
09:58 audreyt nuke ~/.ghc and ~/.cabal and try again?
09:58 masak lunch &
09:59 masak audreyt: oki
10:00 masak audreyt: works better now
10:01 araujo joined #perl6
10:04 pmurias audreyt: the chapters in grey aren't written yet?
10:07 audreyt right
10:17 whereiskurt joined #perl6
10:20 pmurias audreyt: thanks for the link, Real World Haskell seems more oriented towards a sequential read then a JIT approach but it seems usefull for getting a broader grasp, it hopefully might make me harass the #haskell folks less
10:21 audreyt pmurias: once you're past the first four or so chapters the rest can be read JIT
10:28 pmurias joined #perl6
10:47 masak audreyt: ext/Cipher/t/0-cipher-oo.t still does 300 wallclock secs
10:47 masak do I need to make install before making smoke?
10:49 audreyt no
10:49 audreyt you didn't change 300 to 3?
10:50 masak audreyt: oh, was it I who was supposed to? hold on...
10:52 Alias_ joined #perl6
10:52 pugs_svn r21802 | pmurias++ | [m0ld]
10:52 pugs_svn r21802 | pmurias++ | hello_world.m0ld is correctly compiled and with the supplied boilerplate works
10:52 pugs_svn r21802 | pmurias++ | [smop]
10:52 pugs_svn r21802 | pmurias++ | IO.print handles constant identifiers
10:52 masak audreyt: well, things 'work' past ext/Cipher/t/0-cipher-oo.t, but they all max at 3 just as they maxed at 300 before
10:55 masak audreyt: correction. many of them max out, some finish in 1 or 2 secs
10:56 audreyt wait until you hit t/
10:56 audreyt and see if these do too
10:57 audreyt I think ext/ are timing out individually
10:57 audreyt not some sort of magic propagation from Cipher
10:57 masak good to know
10:58 masak but alas, I've hit t/ and the maxing-out continues
11:02 smtms joined #perl6
11:02 audreyt hmm I'm not seeing it :/
11:02 audreyt but still some only take 1/2 sec?
11:03 pmurias audreyt: re Pugs.Code and generating m0ld is what is on the wiki enough or does wiki page/Mold need extending?
11:04 masak audreyt: well, ext/Test-Builder/t/040_Test_Builder_TestPlan.t took 0 secs
11:05 masak 0.38 cusr  0.04 csys
11:06 Alias__ joined #perl6
11:06 smtms_ joined #perl6
11:06 masak but most .t files seem to take 3 secs, doing nothing but making the fans whir
11:08 audreyt hm
11:08 audreyt let me think a bit
11:13 pugs_svn r21803 | pmurias++ | [smop] reverted accidently overwritten test
11:14 audreyt ah. I got it.
11:14 audreyt fixing
11:16 masak audreyt++
11:20 zamolxes joined #perl6
11:27 audreyt I think it's fixed as of r21804
11:27 audreyt test?
11:27 pugs_svn r21804 | audreyt++ | * Add proper Time::Out (60sec for now) around tests.
11:27 pugs_svn r21804 | audreyt++ |   Thanks to masak++ for pointing out that one hanging test
11:27 pugs_svn r21804 | audreyt++ |   sometimes makes all others hanging because of the reuse of a FH
11:27 pugs_svn r21804 | audreyt++ |   pipe that was never closed.
11:28 pugs_svn r21805 | audreyt++ | * Make Time::Out properly work with 60sec.
11:28 pugs_svn r21805 | audreyt++ |   masak++ for pointing out the chain-hanging bug.
11:28 masak cool! will try immediately
11:31 pugs_svn r21806 | pmurias++ | [m0ld] added first test written in m0ld
11:37 audreyt hm, not quite fixed
11:37 audreyt a sec
11:40 * masak noticed
11:40 masak ext/Cipher/t/0-cipher-oo.t seems to hang indefinitely now
11:55 fridim_ joined #perl6
11:58 Jedai joined #perl6
12:23 audreyt masak: sorry I need to be afk now for ~2hr
12:23 audreyt turns out it's a problem of portably killling open | children
12:24 pugs_svn r21807 | audreyt++ | * Upgrade inc/Test/ to newest version.
12:24 audreyt I've checked in my current state -- if you or someone can look at yaml_harness.pl where it dies during "make smoke" now it'd be cool
12:24 audreyt bbiab
12:24 pugs_svn r21808 | audreyt++ | * Check in the state of where things are, pending a portable way to
12:24 pugs_svn r21808 | audreyt++ |   terminate children spawned by open |.
12:25 masak audreyt: no problem. thank you for looking into it.
12:41 BinGOs joined #perl6
12:41 wknight8111 joined #perl6
13:00 fridim_ joined #perl6
13:04 cmarcelo joined #perl6
13:12 alester_ joined #perl6
13:31 hercynium joined #perl6
13:44 TJCRI joined #perl6
13:52 pugs_svn r21809 | fglock++ | [PCR] added an optional ast optimizer; enable with PCR_OPTIMIZE=1
13:55 pmurias Grrrr: what is the deadline for abstract editing (if i change it today will the changes be reflected in the paper conference schedule?)
13:56 [particle] best to email the conference organizer
14:20 Grrrr pmurias: they will
14:20 Lorn joined #perl6
14:22 kanru joined #perl6
14:22 kanru joined #perl6
14:26 sri_work joined #perl6
14:28 alester_ joined #perl6
14:30 Exodist joined #perl6
14:33 alester__ joined #perl6
14:36 preflex joined #perl6
14:39 sri_work joined #perl6
14:39 ilogger2 joined #perl6
14:39 buubot joined #perl6
14:39 agentz1 joined #perl6
14:39 awwaiid joined #perl6
14:39 zostay joined #perl6
14:39 wolverian joined #perl6
14:39 Helios- joined #perl6
14:41 pugs_svn r21810 | fglock++ | [PCR] adding first tests for single-stepping over rule nodes.
14:41 pugs_svn r21810 | fglock++ | this feature will be used for running the parallel-or operation
14:52 cathyal joined #perl6
14:59 fridim_ joined #perl6
15:02 exodist_ joined #perl6
15:03 exodist_ joined #perl6
15:08 pugs_svn r21811 | fglock++ | [PCR] single-step in alternations
15:23 Exodist joined #perl6
15:24 Exodist joined #perl6
15:29 justatheory joined #perl6
15:34 Exodist joined #perl6
15:51 rindolf joined #perl6
16:01 kanru joined #perl6
16:06 kanru joined #perl6
16:07 hercynium joined #perl6
16:16 hercynium joined #perl6
16:17 iblechbot joined #perl6
16:42 Chillance joined #perl6
16:48 mj41 joined #perl6
16:58 rindolf joined #perl6
17:07 beppu joined #perl6
17:09 pugs_svn r21812 | fglock++ | [PCR] tests for parallel-concat
17:19 eternaleye_ joined #perl6
17:42 nipotan joined #perl6
17:43 ryanc joined #perl6
17:46 armagad joined #perl6
17:48 meppl joined #perl6
17:52 pmurias joined #perl6
18:10 REPLeffect joined #perl6
18:19 cmarcelo_ joined #perl6
18:21 pugs_svn r21813 | lwall++ | [STD] factor out common prefix of all the *ibble routines
18:21 pugs_svn r21813 | lwall++ | cleanup of type names
18:23 ruoso joined #perl6
18:26 pmurias ruoso: hi
18:26 ruoso hi pmurias
18:27 pmurias i think Mold has reached slime's feature set now
18:27 [particle] mold >= slime. what's next, goo?
18:27 [particle] mildew?
18:30 audreyt pmurias: is it checked in, and can I try getting my Pugs.CodeGen going? :)
18:31 pmurias audreyt: that would be great
18:31 pmurias i'm currently implementing goto, but the call are in
18:31 pmurias it's in v6/smop/m0ld
18:32 pmurias s/call are in/method calls are/
18:33 audreyt cool
18:34 pmurias audreyt: should i look into the quasi-quotes for haskell stuff?
18:35 audreyt pmurias: sure, but that involves recompiling ghc 6.8.3 with my patch
18:35 audreyt but the idea is you don't have to write
18:35 audreyt isReg (Decl _ None) = True
18:35 audreyt rather you write
18:36 audreyt isReg [$sm0p| my _ = _ |$] = True
18:36 audreyt er
18:36 audreyt isReg [$sm0p| my _; |$] = True
18:36 audreyt also you wouldn't write
18:36 audreyt return $ Call target identifier (Capture invocant pos named)
18:36 audreyt rather you write
18:37 audreyt return [$sm0p| $target.$identifier($invocant: @pos, %named) $]
18:37 audreyt return [$sm0p| $target.$identifier($invocant: @pos, %named) |$]
18:38 audreyt or some such
18:38 audreyt well it's not entirely more concise in the above examples
18:38 audreyt but the idea is you can write arbitrary dsl in haskell code instead of spelling out ASTs
18:38 audreyt (am I making some sense?)
18:38 audreyt there are already regex and lightttpd.conf and haskell qqs
18:39 kweeg joined #perl6
18:40 pmurias audreyt: yes, but requiring a custom ghc rules it out for the moment, thought that the quasi-quotes could help you with the pugs m0ld backend
18:41 audreyt it can help with everything!
18:42 kweeg left #perl6
18:42 audreyt compile [$p6| $meth($x:) |$] = [$sm0p| $x.$meth() |]
18:43 audreyt but yeah, I'd like to wait till ghc 6.10 to fully deploy it.
18:44 TimToady btw, I hacked the s/q:code/quasi/ change into pugs, but I dunno if it'll parse "quasi :COMPILING {...}" right...
18:45 audreyt hi TimToady!
18:45 TimToady howdy doo
18:45 pmurias audreyt: if you have any questions on Mold i'll expand the documentation, or if you have any feature requests i'll work on those
18:45 audreyt looks it parses correctly, TimToady
18:46 TimToady the new form is much cleaner to parse in STD
18:47 TimToady since with q:code it had already commited to :q semantics by the time it read the :code modifier, and that would have been difficult to back out
18:47 ruoso pmurias, does that mean that we can get rid of slime?
18:48 pmurias ruoso: we can start getting rid of it yes
18:48 ruoso :D
18:49 ruoso nothing like other people replacing the ugly stuff you write ;)
18:50 gaal heya
18:50 pmurias gaal: hi
18:51 ruoso pmurias, remember to add support for the lexical scope in mold
18:51 ruoso you might even save it as one of the "special registers" to save some calls
18:51 ruoso I've been re-reading the specs, and I think the model in the wiki is in the right direction...
18:52 ruoso I still need a way to differentiate "is context" variables from the others...
18:52 ruoso and on how to implement 'temp'
18:53 ruoso probably making %.entries a Hash of LexicalVariable and have other methods declared there...
18:55 ruoso but 'temp' looks confusing, specially because of gather/take
18:55 ruoso and other continuation-aware operators
18:56 ruoso $*foo = 1; gather { temp $*foo = 2; take $*foo }; say $*foo;
18:56 ruoso $*foo = 1; gather { temp $*foo; take $*foo; $*foo = 2; take $*foo }; say $*foo; # that makes the problem more visible
18:57 pmurias ruoso: re special registers it could be added as a constant
18:57 pugs_svn r21814 | audreyt++ | * Solve the timeout problem at another direction by introducing PUGS_TIMEOUT
18:57 pugs_svn r21814 | audreyt++ |   environment variable and have it set to 60 in yaml_harness.pl.
18:57 cmarcelo__ joined #perl6
18:57 ruoso not really... you could have the "outer" scope as a constant... actually, you should... but the "curent" scope is not reuseable
18:58 TimToady assume temp is syntactical sugar for context vars right now
18:58 TimToady (and ignore them)
18:59 ruoso TimToady, but $*foo can't be seen as a context var
19:00 TimToady why do you want to use globals?
19:00 ruoso I don't, but some user might...
19:00 pmurias ruoso: creating a lexpad is one opcode or two if you have to fetch the LexPad prototype from the namespace
19:00 TimToady globals do not interact well with any kind of threading
19:00 ruoso we could restrict temp to creating local aliases
19:00 ruoso which solves that problem
19:01 ruoso actually, creating local aliases which have the "is context" trait
19:01 TimToady I suppose we could say that all globals are implicitly "is context"
19:01 ruoso s/aliases/copy
19:01 TimToady so you just use $+foo any time you want to access the global
19:02 TimToady (or the innermost context override of the global)
19:02 ruoso alright... we could eliminate globals completely... that's true
19:02 gaal audreyt: where to add the netslurping of control-timeout? I don't have one installed locally
19:02 ruoso (ok, not completely... we still have %*ENV and other stuff that is really global)
19:02 TimToady I'm trying to push things that direction just to keep concurrency sane
19:02 gaal audreyt: oh, bootstrap_with?
19:03 TimToady I think we already define $+FOO to default to looking in $*ENV as a last resort; we'd just look for GLOBAL::FOO right before that
19:04 ruoso alright... so... 'temp $foo' is the same as 'my $foo is context<rw> = $+foo'
19:05 TimToady well, there's potentially a PROCESS::FOO in between
19:05 ruoso and 'temp' cannot be used in global variables
19:05 audreyt gaal: no @deps
19:05 TimToady au contraire, globals are context vars :)
19:06 pugs_svn r21815 | audreyt++ | * Add control-timeout to @deps
19:06 * ruoso feels a functional slap
19:07 ruoso so $*ENV is the same as $+ENV?
19:07 TimToady so it's really more like GLOBAL_CONTEXT::FOO PROCESS_CONTEXT::FOO PROCESS_CONTEXT::ENV<FOO>
19:07 TimToady no, $*ENV would only refer to the outer one
19:07 gaal is there already something like ccache for ghc?
19:08 ruoso is $*ENV special, then?
19:08 TimToady only insofar as CONTEXT::FOO will look in it as a last resort
19:08 audreyt gaal: ccache can be used with ghc
19:08 * ruoso might have misunderstood the "globals are context"
19:08 audreyt since ghc ultimately calls gcc
19:09 audreyt (iirc)
19:09 TimToady You could say $+ENV, which would probably get the $*ENV, but could be overridden in its entirety
19:09 gaal really? isnt' that only with -via-c or something? and even if so, that only saves part of the work
19:09 TimToady generally subtrees will only want to override one element of $*ENV though
19:10 audreyt gaal: correct, but I think -O is default and -O implies -fvia-c
19:10 TimToady so it's probably better for $+FOO to special case the final $*ENV fallback
19:10 TimToady rather than relying on $+ENV<FOO>
19:10 TimToady though $+ENV is more like the Unix process model
19:11 * ruoso doesn't really feel $+FOO lookup in $*ENV like a good thing... makes him remember php
19:11 cmarcelo joined #perl6
19:11 TimToady so maybe at each level $+FOO looks for "my $FOO is context" first and then "my %ENV is context"
19:11 pmurias audreyt: isn't -via-c the slower compilation, worse code option?
19:12 TimToady so any context can then override either an individual context var or the whole environment
19:12 * ruoso doesn't feel that as a good thing...
19:13 TimToady the latter being primarily useful for commands that will be spawning off a subprocess with a real sub-env
19:13 TimToady ruoso: you're feelings are wrong :)
19:13 TimToady tje
19:14 TimToady the idea is to make dynamic calls and unix subprocesses more easily refactorable into each other
19:14 TimToady *your
19:15 TimToady why do you feel a dynamic scope should not be allowed to set the environment for its dynamic children?
19:15 ruoso btw... is p5 'local $a{a}' going to be supported using 'temp'?
19:15 ruoso TimToady, the environment yes...
19:15 ruoso TimToady, it just feels weird that every context variable looks both in the context *and* in the environment
19:15 ruoso for every step in the context tree
19:16 TimToady well, it only looks in the env if it's there
19:17 ruoso I just because context variables might have a lot of uses that are completely unrelated to %ENV
19:17 [particle] if it's there ::= if it's defined in that step in the context tree ??
19:17 TimToady it also lets an apache server have both a PROCESS::ENV and individual GLOBAL::ENV
19:17 ruoso s/I just/it's just/
19:17 * ruoso thinks in Catalyst $c
19:18 TimToady maybe ENV lookup should be a second pass...
19:18 ruoso so if it happens that you're using context vars for other things, and eventually needs to spawn a process that uses a env variable that clashes with your context variable, it would break your program
19:18 TimToady nod
19:19 ruoso even the second pass feels wrong...
19:19 ruoso because it might be used for completely %ENV-unrelated stuff...
19:19 ruoso and it could cause completely unexpected results...
19:20 ruoso it just feels to me as PHP declaring the request args as global variables...
19:20 ruoso read... wrong... ;)
19:21 ruoso specially since p6 pushes the user to use closures a lot...
19:21 ruoso and it's much possible that there would be unknown code in the CALLER tree
19:23 TimToady maybe we can provide an explicit way to merge when desired
19:24 ruoso that would create local "is context" aliases for %+ENV...
19:24 gaal ccache -s => "not a C/C++ file: 97"
19:24 ruoso that's cool
19:24 TimToady meanwhile $+ENV probably can work independently as a normal context var
19:24 gaal so, too bad, it doesn't work
19:24 audreyt gaal: Juerd(?) used to have ccache on feather
19:24 gaal the good news is that make takes only 2 minutes on my machine :)
19:24 ruoso TimToady, but that brings us for the 'local $a{a}' question... is that going to be supported somehow?
19:24 audreyt ok :)
19:24 TimToady not if it means breaking concurrency
19:24 audreyt science have progressed
19:25 gaal word is Intel's working on a $bigsmallnum-core CPU
19:25 Juerd audreyt: It's (supposed to be) enabled globally
19:25 ruoso TimToady, as I can think of it, yes... it does break concurrency... but I'm usually not that smart ;)
19:25 TimToady note however "my $foo is context := %a<a>" probably works
19:26 gaal Juerd: hi!
19:26 Juerd Hi
19:26 ruoso TimToady, but that doesn't have the effect of 'local $a{a}'
19:27 ruoso it just makes %a<a> value accessible as a context local var...
19:28 pugs_svn r21816 | pmurias++ | [mold] goto
19:28 ruoso maybe... %a<a> := lazy_lookup_on_the_current_context​_for_a_context_var_of_some_name()
19:28 ruoso that could have the same effect as 'local $a{a}
19:28 TimToady or maybe "my %a is context := shadow(%+a)"
19:29 ruoso but that applies for the entire hash, not only for that key...
19:29 TimToady where inner %a know which keys it knows about, and which it delegates
19:29 ruoso hmm...
19:30 TimToady %a<a> = 42 would override the inner %a<a> but not the outer %<a>
19:30 TimToady and that looks concurrency save
19:30 ruoso so 'local $a{a}' would be translated to 'my %a is context := shadow(%+a, 'a');
19:30 TimToady *safe
19:31 ruoso where 'a' could be replaced by the list of keys to be localized...
19:31 TimToady the translation of local() is problematic in any case, because local in p5 undefs, whereas temp in p6 is defined to make a copy
19:31 TimToady temp merely says "restore this to the current condition at the end of the scope"
19:32 ruoso which is the harder part...
19:32 ruoso setting a new value, or using the outer value is a detail
19:32 gaal something wonky is going out in the test stdout/stderr
19:32 TimToady let merely says "restore it on failure of current scope"
19:32 TimToady ruoso: sure, but it's the sort of detail a language designer is (not) paid to worry about
19:33 ruoso but it's a detail a implementor can relax about ;)
19:34 * ruoso just realises one other thing
19:35 TimToady it's my job to tell implementors what they can relax about :)
19:35 TimToady and I'm tellin' you to relax about temp  :)
19:36 TimToady (insofar as I value concurrency more highly)
19:36 * ruoso too
19:36 pmurias audreyt: re Pugs.CodeGen i think you can start working on it if you wish, mold will be blocking soon on a perl6 compiler
19:37 audreyt 'k
19:37 donaldh joined #perl6
19:37 gaal GHC's on git now, audreyt is that your doing? :p
19:37 ruoso TimToady, about let, can it be implemented by creating a container that checks for $! on destruction?
19:37 ruoso or is there any other magic associated?
19:37 TimToady see KEEP blocks and will keep traits
19:37 audreyt gaal: no, it's david roundy's doing
19:38 audreyt accidental public seppuku and all that
19:39 gaal context?
19:39 ruoso it's a shame google thinks that KEEP is not a valid search word...
19:39 ruoso TimToady, in which synopsis?
19:39 TimToady 4
19:39 gaal ruoso: +KEEP is though
19:42 ruoso bah... one more feature for pmurias to add on mold
19:44 TimToady only one?  :)
19:44 gaal I added a "*** TIMEOUT" message when the in-pugs thing expires. Is that prudent? Or can stderr block and mean we don't actually exit in the timeout?
19:44 ruoso actually several... one for each closure trait
19:45 ruoso TimToady, can we consider 'my $foo will keep { ... }' as syntax sugar to build a sequence of blocks in the KEEP block?
19:46 TimToady you can have multiple KEEP blocks, so there's keeplist stored somewhere
19:47 ruoso so it can be considered as a syntax sugar for KEEP { { ... }.($foo) };
19:47 TimToady something like that
19:47 ruoso can it be done at compile time?
19:48 TimToady can what be done at compile time?  certainly the desugaring can
19:48 pmurias ruoso: you can note todo stuff on the mold wiki page
19:48 ruoso meaning... making the runtime completely unaware of what "will keep" is...
19:48 TimToady the determination of success if of course run time
19:48 _Chillance_ joined #perl6
19:49 ruoso the runtime would only have a KEEP block list for each blcok
19:49 ruoso block
19:49 TimToady in fact, you could go as far as to desugar into LEAVE blocks, I think
19:49 ruoso pmurias, actually I think that's something for Code, not Mold...
19:49 TimToady but probably better to keep separate keep/undo lists and just put the leave blocks on both  :)
19:50 ruoso or just keep lists for each of these traits
19:50 ruoso and call them at runtime in that specific order
19:50 TimToady have to keep the relative ordering of them sane though
19:51 TimToady I think the spec has something to say about that, and it might even be correct :)
19:51 ruoso you mean KEEP, LEAVE, KEEP?
19:51 ruoso alirght...there's a specific note about that..
19:52 TimToady yes, KEEP/UNDO are considered LEAVE variants for ordering purposes
19:52 ruoso so it's better to duplicate the unqualified LEAVEs in both the KEEP and UNDO lists
19:52 TimToady or have one LEAVE list with conditionals, depending on whether you're optimizing for space or time  :)
19:53 * ruoso votes for time...
19:53 TimToady but one pointer is probably not a lot of space for a static block
19:53 ruoso and it's a list of pointers anyway
19:54 TimToady and doubt cloning has much influence either way
19:54 TimToady though you can easily avoid not cloning the KEEPs or the UNDOs you are bypassing with 2 ptrs
19:54 TimToady s/not//
19:55 ruoso clonning didn't cross my mind until you mention actually... I thought about making lowlevel references for the same value at start...
19:56 pugs_svn r21817 | lwall++ | [STD] s/Uint/UInt/
19:56 ruoso this part of smop is still only C
19:57 ruoso (and some "use v6" blocks...
19:57 TimToady the main reason all these blocks are inside is so that they can be closures without violating my scoping
19:58 TimToady but you'll note we can guarantee what is passed to will keep {...}
19:58 TimToady in fact, you already noted it  :)
19:58 TimToady so we don't have to worry about cloning a mere $_ ref
19:58 TimToady well, not for "is keep"
19:58 TimToady KEEP {} is another matter
19:59 pmurias ruoso: i changed the Perl 6 is a SMOP abstract
19:59 ruoso can we consider "let" as syntax sugar too?
19:59 ruoso pmurias, that's cool
19:59 ruoso something lile..
20:00 TimToady probably
20:00 pmurias ruoso: lile?
20:01 ruoso pmurias, sorry... I was continuing the line before the one I answered to you
20:01 ruoso and I meant something like...
20:01 ruoso ;)
20:02 * ruoso needs some code examples that uses let and temp
20:02 pmurias ruoso: should i mention some of the smop cool features or is the abstract ok like that?
20:02 * ruoso trying to remember the url of where he can see that...
20:03 TimToady t/var/temp.t maybe
20:04 ruoso alright... there's one thing that confused me now...
20:04 ruoso we're thinking on temp as "is context"...
20:05 TimToady "as context = $+"
20:05 ruoso { my $a; { temp $a = 2; { say $a }; say $a}
20:05 TimToady *is
20:05 ruoso pugs: { my $a; { temp $a = 2; { say $a }; say $a}
20:05 p6eval pugs: OUTPUT[*** ␤    Unexpected end of input␤    expecting ";" or "}"␤    at /tmp/trofzbNdmK line 2, column 1␤]
20:05 ruoso pugs: { my $a; { temp $a = 2; { say $a }; say $a}}
20:05 p6eval pugs: OUTPUT[*** No such subroutine: "&temp"␤    at /tmp/4vyCB2ay17 line 1, column 12-23␤]
20:06 TimToady pugs never implemented temp, afaik
20:06 TimToady which shows how useful it isn't  :)
20:07 ruoso in fact... temp is only usefull to handle global variables.. and that's something we'd like to avoid...
20:08 TimToady well, we originally defined it to apply to lexicals too
20:08 ruoso but temp applied to lexicals is just a new my
20:08 TimToady now we're just requiring "is context" in addition, perhaps
20:08 ruoso temp applied to context is just a new 'my $foo is context"
20:09 TimToady but maybe temp retroactively marks a "my" in scope as "is context"
20:09 ruoso and different "my"s in different scopes doesn't generate a warnings
20:09 pmurias ruoso: http://www.yapceurope2008.org/ye2008/talk/1090
20:09 lambdabot Title: Perl 6 is just a SMOP
20:09 ruoso pmurias, that looks ok...
20:10 ruoso TimToady, that sounds weird...
20:10 gaal 16880 test cases: 11604 ok, 5276 failed, 1006 todo, 125 skipped and 34 unexpectedly succeeded  # Do these numbers look sane?
20:10 ruoso TimToady, "temp" changing the variable visibility
20:10 ruoso better have a different name then
20:10 ruoso like "local"... if that's what we want...
20:11 TimToady well, or just require "is context" on the my
20:11 TimToady since it's presumably the same file
20:11 ruoso not really...
20:11 ruoso if it requires "is context"
20:12 ruoso the variable might have been declared in a different file
20:12 ruoso which in fact means...
20:13 ruoso temp is useless
20:13 ruoso except for global variables...
20:13 TimToady I don't see how that follows
20:13 * ruoso thinks faster than he types ;)
20:13 TimToady you're reasoning from the specific to the general
20:14 ruoso if "temp" requires the outer variable to have the "is context" trait
20:14 TimToady import an alias to an context var
20:14 TimToady s/to/from/
20:14 ruoso it's not an alias, it's a new container that have the same value
20:15 ruoso just like if you had "my $foo is context = $+foo";
20:15 TimToady :=
20:15 ruoso o.O
20:15 ruoso if I bind, the changes won't be localized to that scope
20:15 TimToady my $foo is context := $THAT::var
20:16 TimToady that's a good thing :)
20:16 ruoso then it isn't temp at all
20:16 ruoso it's simply an alias...
20:16 TimToady esp if that scope is running in a different thread...
20:17 * ruoso missing something...
20:17 ruoso if my $foo := $+foo, it is actually the same as if I was using $+foo all the time
20:18 ruoso $+foo and $foo will have the same value
20:18 ruoso and the changes to the value of $foo won't be restricted to the current scope
20:18 ruoso but it would be visible by the outer scope
20:19 ruoso which I think is not the meaning of "temp"
20:19 ruoso otoh... if 'temp $foo;' means 'my $foo is context<rw> = $+foo;'
20:19 meppl good night
20:20 ruoso then $foo is a new container, and the changes to its value will not be visible by the outer scope
20:20 ruoso which I thikn is the meaning of 'temp'
20:21 ruoso that would mean that the following block is invalid...
20:22 ruoso { my $a = 1; { temp $a = 2; } };
20:22 ruoso because the first $a doesn't have the 'is context' trait
20:22 TimToady right
20:22 ruoso which is not that bad, since that the above block could be written with two 'my's anyway
20:22 TimToady but I would argue that if a module intends a variable to temporizable, it should declare it "is context"
20:23 TimToady and then you just say "temp $THAT::var" directly
20:23 ruoso but "is context" changes the visibility... not the "temporal" aspect of the variable...
20:23 TimToady it's part of the public interface, in that case
20:24 * TimToady waves his hands and sez "jest make it work"
20:24 ruoso so I can consider "temp $foo;" as a syntax sugar for "my $foo is context<rw> = $+foo;"
20:24 ruoso which will break if there's no previously declared $+foo;
20:25 TimToady good enough for now
20:25 ruoso and no support for globals in "temp"
20:26 ruoso except if we consider all globals as context...
20:26 pmurias ruoso: what should the conditionals branch op check?
20:27 pmurias * conditional
20:27 ruoso it needs to force bool context... which in SMOP means .bool()
20:27 ruoso but remember that .bool() might recurse
20:29 luqui joined #perl6
20:29 ruoso I think we can assume that .bool() should return a native boolean
20:29 ruoso (is native bool part of the spec?)
20:30 ruoso (yes, it is...)
20:30 ruoso and for now you can abort() if .bool() returns something that is not a native bool...
20:30 ruoso at least until we have the exception handling in place
20:34 pmurias maybe i should put the SMOP_DIE placeholder in place so that we can upgrade all the errors once we have exceptions?
20:35 ruoso maybe...
20:37 lumi joined #perl6
20:37 pmurias although you have to leave things in a defined state to throw an exception
20:38 TimToady are you guys bearing in mind that exception handlers run *before* the stack is unwound in p6?
20:38 ruoso that's why I'm not sure SMOP_DIE is a valid placeholder for the exception model
20:50 pmurias ruoso: just checking for a native bool true seems a better idea after some thought
20:50 alester_ joined #perl6
20:51 wknight8111 joined #perl6
20:53 ruoso TimToady, as I thought so far... exeption throwing will be a regular method call
20:54 ruoso on an object that knows how to manipulate the stack
20:56 ruoso there won't be a lowlevel exception model... only a high-level
20:58 pmurias not coding stuff in C is good ;)
21:02 * ruoso home &
21:05 pmurias what would be good p6 style syntax for br cond,iffalse,iftrue?
21:06 pmurias br cond,iftrue,iffalse actually
21:07 pmurias $cond ? goto iftrue : goto iffalse; ?
21:07 pmurias or if $cond {goto iftrue} else {goto iffalse}
21:13 lisppaste3 joined #perl6
21:14 whereiskurt joined #perl6
21:25 pbuetow joined #perl6
21:27 Khisanth joined #perl6
21:28 meppl joined #perl6
22:10 Alias_ joined #perl6
22:10 timbunce joined #perl6
22:13 BinGOs_ joined #perl6
22:48 Limbic_Region joined #perl6
22:55 alanhaggai joined #perl6
22:57 Ara4n joined #perl6
23:20 Lorn_ joined #perl6
23:25 hercynium joined #perl6
23:26 ruoso joined #perl6
23:56 bacek joined #perl6

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

Perl 6 | Reference Documentation | Rakudo