Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-02-19

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:10 xinming joined #perl6
00:13 thoughtpolice joined #perl6
00:32 Auzon joined #perl6
00:52 TimToady cognominal__: I think that's from before we made Any the opposite of Junction
00:53 cognominal__ ok, thx
00:53 TimToady if you want to match both Any|Junction is now just Object
01:01 cnhackTNT joined #perl6
01:19 lyokato_ joined #perl6
01:22 alc joined #perl6
01:35 peepsalot joined #perl6
01:44 meppl good night
01:45 peepsalot joined #perl6
01:45 thoughtp1lice joined #perl6
01:49 peepsalot joined #perl6
01:50 Schwern joined #perl6
01:58 cognominal__ Thinking of it, Item makes to me more sense than Any that should match any type. And Any could become a shorter Object. But I suppose we can't change things everyday
02:00 wknight8111 left #perl6
02:08 cognominal__ on the other hand, Any is not Many
02:13 Squern joined #perl6
02:23 Squern joined #perl6
02:24 stevan__ joined #perl6
02:26 cognominal__ speaking of plurality, have you thought of are :    sub swap (*@_ , *%_ are rw)
02:28 cognominal__ the trait would apply to the parameters, or declared variables in a list declaration, who comes before that don't have a trait that says otherwise
02:28 demq joined #perl6
02:29 zakame joined #perl6
02:40 pugs_svnbot r19945 | lwall++ | [gimme5] now translates STD to 100% parsable p5 (doesn't run yet)
02:40 pugs_svnbot diff: http://dev.pugscode.org/changeset/19945
02:40 lambdabot Title: Changeset 19945 - Pugs - Trac
02:41 TimToady cognominal__: Any just reads better in signatures that do pattern matching, plus it's shorter :)
02:42 TimToady we've though a bit about is/are, but I worry a bit that it will be hard for people whose native language doesn't distinguish sing/plu
02:42 TimToady so for now * just distributes the "is rw" automatically
02:45 TimToady now I just need to translate Cursor.pm to Perl 5
02:46 TimToady hmm, gimme5 will already do most of it...hmm...
02:58 Andy_ joined #perl6
03:29 lisppaste3 joined #perl6
03:38 zakame_ joined #perl6
03:52 stevan_ joined #perl6
03:52 avar joined #perl6
04:09 gbacon joined #perl6
04:09 avar joined #perl6
04:09 alc joined #perl6
04:09 DarkWolf84 joined #perl6
04:09 hcchien joined #perl6
04:09 Gothmog_ joined #perl6
04:09 ruz joined #perl6
04:09 sunnavy joined #perl6
04:09 SCalimlim joined #perl6
04:09 pravus joined #perl6
04:09 drbean joined #perl6
04:09 thepler joined #perl6
04:09 obra joined #perl6
04:09 clkao joined #perl6
04:09 felipe joined #perl6
04:09 perlbot joined #perl6
04:09 ingy joined #perl6
04:09 gugod joined #perl6
04:09 Yappo_ joined #perl6
04:09 SubStack joined #perl6
04:09 Grrrr joined #perl6
04:09 tewk joined #perl6
04:09 whiteg joined #perl6
04:09 ilogger2 joined #perl6
04:09 mofino joined #perl6
04:09 exp_evalbot joined #perl6
04:20 RayMagini joined #perl6
04:21 tewk joined #perl6
04:36 pcbuetow joined #perl6
04:39 mncharity joined #perl6
04:40 mncharity I forgot buses were on a holiday schedule today.  So I am very cold, and very tired.
04:40 lambdabot mncharity: You have 1 new message. '/msg lambdabot @messages' to read it.
04:41 mncharity But it did provide an opportunity to reflect.  So I will now warm my fingers with a bit of typing.
04:43 mncharity I considered starting a new project over the weekend.  A numeracy+science educational program, the coming together of various ideas I've been puzzling over for years, which I think could perhaps have a profound impact on how math and science are taught and learned.
04:45 mncharity So I hit the usual implementation planning conundrum.  What language and framework to use.  For this exercise, the language candidate list was something like javascript, python, ruby, smalltalk, common lisp, lua.
04:45 mncharity I am so very very tired of the first implementation choice on any non-trivial project being deciding what flavor of crippled one wants to be.
04:47 mncharity You know the computer game concept of having some gold, and equipping your character to start out?
04:48 spinclad I will buy a +5 horn of expressiveness.
04:48 mncharity Here it's different.  Welcome software engineer!  Press "Begin project" when done.
04:48 spinclad I will wind it every morn as I set Forth.
04:49 Auzon Heh. I know that feeling. Except my shop rarely has many choices.
04:50 mncharity Press button.  I'm sorry, you have far too few damage points.  An unimpaired software engineer waring shoemaker's shoes requires perl 9 2012 to begin development.  Please inflict damage on yourself before continuing.
04:51 mncharity Remove shoes.  Remove feet.  Cripple hands.  Invoke curse of "must repeat everything thrice".  Invoke curse of "you can't get there from here".  Press button.
04:51 mncharity You want to be able to both see _and_ hear?  Please inflict damage on yourself before continuing.
04:52 Auzon The developer perishes...
04:52 mncharity ...  Welcome software engineer!   You may now proceed with 2008 software project development.
04:53 spinclad I wish my language to understand both itself and others.  --  Please inflict damage on self then.
04:53 mncharity Christmas 2008... I'm sorry.  Can't we please do Xmas in July instead?
04:54 mncharity There is this illusion that calendar time is cheap.  At least in open-source primary school software, you hit the following.
04:55 spinclad in May.  in May.  i wish to dance the way of the camel on beltane.
04:56 mncharity 130 Million kids are born each year.  Almost all will at least start primary school.  So say you project has some window.  Some time when it will potentially impact them all.  A 1 week delay means you've missed 2 M kids.
04:56 mncharity 300k per day.
04:56 mncharity Christmass... :(
04:57 mncharity I suggest "Christmas in July" is now both perfectly feasible, given existing resources, and should be our collective objective.
04:57 mncharity At least, here's a strawman argument to that effect.
04:58 mncharity Ok, maybe the critical pass is this...
04:58 mncharity *path
05:02 mncharity (1) We have two efforts to do a full p6 parse, and make the result available.  Using STD.pm.  TimToady metholate-ng'ing STD.pm to p5.  And me hand translating it to ruby.  Complementary risk sets.  TT can shape STD to make it work.  At least one of these is going to win, with fairly low risk.
05:02 mncharity I suggest the next step is
05:04 mncharity (2) Simple transliteration-like compiler and backend, on p5 (and ruby).  Basically writing p5 with a p6 syntax.  Like kp6, but a slightly larger subset of p6.  And fast.  Both frontends seem likely to be fast (well, I know at least the ruby one can be).  The emitted code is just normal perl/ruby.  And the compilation shouldn't be too slow -  pugs-like.   Perhaps even a bit better.
05:06 mncharity Which means (3) we can finally start writing p6 code.  Not real wizzy p6 code, with junctions and so much else.  But... p5-flavored p6 code.  Something one could picture writing a compiler and runtime in without too much dread or pain.
05:08 mncharity There may be some short cuts.  I'm kind of wondering how difficult it would be to teach redsix to emit p5, so folks could start working on the backend without having to wait for STD to get debugged.
05:09 mncharity Or one could work in kp6 backend land, but with a slightly different vision of where you are aiming with the code.
05:10 mncharity "make the blackboard as blank as the vast and arid desert of you mind"
05:10 mncharity very blank mind.  blackloggin...
05:10 Auzon Is gimme5 the same as metholate?
05:11 spinclad similar, i think
05:11 spinclad cheat, then metholate;  cheat, then gimme 5...
05:11 mncharity TimToady: re rearranging parameters, very np.  I'm already using a different ordering than STD.
05:12 mncharity re "wind it every morn as I set Forth", oy, *groan*  <shaking head>  lol  sigh
05:13 spinclad sorry
05:14 spinclad couldn't help it; word was demanded, context demanded capital.
05:15 mncharity re "shop rarely has many choices", yeah, that does make things simpler.  masks that the field itself is broken, rather than it just being a local phenomena.  also provides a framework for "attempting software that does X is not plausible given available resources".  The free-time FOSS gig makes resource limits show up as tool inadequacy.
05:15 pugs_svnbot r19946 | lwall++ | [Cursor5.pm] now compiles under p5
05:15 pugs_svnbot diff: http://dev.pugscode.org/changeset/19946
05:15 lambdabot Title: Changeset 19946 - Pugs - Trac
05:16 mncharity re "The developer perishes...", no, just their projects.
05:17 mncharity /me googles beltane.  May.  I'd labor with people towards May.  It would make for a much nicer Spring.
05:19 mncharity re gimme5, looking... yes.  well, not the same.  copy, repurposed to do p5 on a... tagged DFA something or other.
05:20 mncharity re word...  ok, I didn't expect to find myself laughing at the end of this missive.  thank you :)
05:20 araujo joined #perl6
05:21 TimToady okay, I can now translate "perl STD_5.pm" without a compilation error.  now I just need to make it work...
05:21 mncharity oh, wow.
05:22 mncharity a question,
05:22 spinclad (1) is in process as we speak.
05:22 mncharity there are basically two ways to approach getting an ast from the parse
05:23 mncharity redsix did a  parse->match-tree(with Match's tagged with which rules generated them)->ast.
05:23 mncharity pugs, kp6, did  parse->ast directly.
05:24 TimToady unlike pugs, perl5 will not autogenerate a ->new for me...
05:24 pugs_svnbot r19947 | lwall++ | [gimme5] uncomment "use Cursor5"
05:24 pugs_svnbot diff: http://dev.pugscode.org/changeset/19947
05:24 lambdabot Title: Changeset 19947 - Pugs - Trac
05:24 mncharity I was happy paying for the decoupling, and have been thinking of taking the redsix approach again.
05:24 spinclad nqp and rakudo too, i think, parse->ast
05:25 spinclad depending on what the actions make.
05:25 mncharity if red_STD becomes the parser for a... red_elf?
05:26 zakame joined #perl6
05:26 mncharity my experience is that parsing is hard, and getting ast's right is hard, and that trying to do both at once is a world of pain.  having a layer in between
05:27 mncharity lets you contain the messiness.  eg, if some non-local groveling, down or up, the tree needs to be done to pull together the information an ast node needs, that cruft neither clutters the parser itself, nor compromises the ast.
05:28 mncharity clean parser -> layer of cruft tightly tied to parser code -> clean ast
05:29 mncharity anyway, so I was wondering what thoughts there were on how a gimme5-based thing might be pursued.
05:29 TimToady heh, Undefined subroutine &Pugs::Internals::caller called at Cursor5.pm line 252.
05:29 mncharity green_elf? :)
05:29 mncharity lol
05:29 spinclad groveling: eg: types, sigs, captures, application, ...
05:30 TimToady well, certainly STD5 is only going to produce something like an AST, and I plan to just dump it out to yaml or some such for downstream use
05:30 spinclad multis
05:32 spinclad lexicality
05:34 mncharity another design choice/issue is what flavor(s) of ast
05:35 TimToady they come in flavors? neat!
05:36 mncharity for a hypothetical redelf, I was thinking of parse -> Match-tree -> krufty-ast -> whatever-ast(s).  Basically,
05:36 spinclad a clean parser can do some of the work of building an ast, by make'ing in its actions, tagged Matches being just the default
05:37 spinclad but passing around type info is good to defer, eg
05:38 mncharity not going directly to the/a "real" ast means the focust on ... krast, can be to _just work_.  No other compromising agenda.  And given a working ast, it then becomes relatively trivial to spit out alternate asts.  kp6, "spec", whatever.
05:38 mncharity re flavors, :)  don't know if there are more of fewer than 31 or not.  then there are all the mixins...
05:41 mncharity re make'ing actions, hmm... given that STD seems likely to mixin such actions keyed by the #= foo comments and {*}'s, vs Match's tagged with rules and then runtime tag-dispatching to similar actions... brain to fried to take the next step of figuring out what the core key issues are.
05:43 mncharity though I suppose STD could include such actions directly in some of its lots of code.  which would mean...
05:43 mncharity brain toast
05:43 mncharity in several flavors
05:46 spinclad fingers warmer?
05:47 TimToady the Cursor variants just end up calling $¢._REDUCE($tag) where $tag is the rule name plus the comment
05:47 TimToady so that method can do whatever it likes
05:47 TimToady since the match data comes in via $¢
05:47 mncharity if it looks like STD_p5 is converging nicely, that should be the focus.  makes red_STD uninteresting.  or rather, just a backup.  then the ast -> translit-p5 can be written in p5.  and we have a green_elf.  from which a red_elf can be easily derived.
05:49 TimToady well, I really have no idea how close it is to running, or how fast it will be, but it's gotta be more stable than pugs
05:50 mncharity but ruby's main role is then to provide backup to the second p5 backend, the one attempting correctness rather than 'simplicity, usability, speed'.  that second p5 effort will hit p5 core bug issues, so having an similar effort on ruby, with a hopefully complimentary set of challenges, will help avoid things getting bogged down/stuck.
05:51 mncharity fingers warmer.  nose a bit nipped, but oh well.
05:52 mncharity re _REDUCE... sounds good.
05:52 TimToady well, what we really need is an engine that runs full p6 semantics fast and without flakiness, and it remains to be seen which VM will get there first
05:52 TimToady but if we can run some subset about the size of p5 as stable and fast as p5, we'll start getting a lot more traction
05:53 mncharity indeed.  I think that's the key.
05:54 TimToady does ruby have a TRE module?
05:54 spinclad tagged regex?
05:55 TimToady *nod*
05:55 TimToady that's what I'll be using in STD5
05:55 TimToady I almost got it working under pugs, but the p5/p6 linkage was just to flakey to pass long strings back and forth
05:55 TimToady *too
05:56 TimToady but it was working in principle, and successfully finding the longest token, and determining the fate of subrules
05:56 mncharity "tagged regex"?  meaning parts of one can be named and reused?
05:56 TimToady so none of this thrashing around with lots of subrules that can't match
05:56 TimToady yes, does () captures in a DFA
05:57 TimToady still can't backref match inside DFA though
05:57 TimToady but most lexers don't need that
05:57 TimToady if STD sees a backref it treats it as end of longest, so DFA never sees it
05:59 TimToady as I was mentioning earlier, the trickiest thing in autogenerating a lexer is not recursing
06:01 TimToady because it's really hard to feed an infinite set of alternatives to a DFA  :)
06:01 jql yes, that seems tricky
06:02 TimToady on the other hand, you do want to explore the subrule space as much as possible within that constraint so that you don't get conflicts between matches caused by one of the tokens quitting too early
06:02 mncharity ahhhh, so "tagged regex" just means "does TRE optimization"?
06:02 TimToady the longest token stuff is really essential to grammar extensibility
06:02 mncharity I'm not sure if ruby's http://www.geocities.jp/kosako3/oniguruma/ does TRE or not.
06:02 lambdabot Title: Oniguruma
06:03 TimToady it uses re::engine::TRE to implement the DFA specced in S05
06:03 mncharity There are alternate engines like http://laurikari.net/tre/ which do, but I'm unsure they are ready for primetime.
06:03 lambdabot Title: 169 TRE home page
06:03 mncharity s/unsure/doubt/
06:03 Auzon Regarding "dollar cent", is there a way to write it like $\u{CENT}
06:04 Auzon ?
06:04 TimToady you have to have the tags not so much for capturing the substrings but to determine which of the many, many branches of the tree you ended up on
06:04 TimToady Auzon: nope
06:04 TimToady P6 is written in Unicode.
06:05 TimToady but it's not a variable that users have to deal with much
06:05 Auzon I figured that :)
06:05 TimToady which is why it has an unusual name
06:06 TimToady MY::{"\$\c[CENT SIGN]"} might work some day
06:07 TimToady or even MY::«\$\xA2»    ... oh wait...
06:07 mncharity re "longest token stuff is really essential to grammar extensibility", curious.  I've had the same thought about using backtracking rather than longest token. :)  but that's an issue for a different month.  happy to see gimme5+::TRE pursuing the topic.
06:09 TimToady in general, backtracking is a bad plan in a parser.  they've known that since the '60s...
06:10 TimToady much, much better to guess right the first time  :)
06:12 TimToady the think about longest token is that it's immune to rule ordering issues
06:12 TimToady if the user adds infix:<====> it takes precedence over the builtin infix:<===> automatically
06:13 BinGOs_ joined #perl6
06:13 TimToady on the other hand, if they add infix:<!> then all the builtin infixes that start with ! take precedence
06:13 TimToady has to work both ways
06:13 TimToady neither the old rules nor the new have privilege over the other
06:14 Auzon smop: say("hi")
06:14 irclogbot_backup joined #perl6
06:14 Auzon Eh.
06:15 pugs_svnbot r19948 | putter++ | misc/pX/Common/redsix/redsix: a bit of bug fixing (rather than porting to 1.9.0). Sub and method names no longer collide.  A workaround for parsing "for @a {}".  And a "this can't every have run" missing argument.  That last I don't understand, which worries me.
06:15 pugs_svnbot diff: http://dev.pugscode.org/changeset/19948
06:15 lambdabot Title: Changeset 19948 - Pugs - Trac
06:16 TimToady and with a backtracking engine you can't *tell* whether you have the longest token without trying them all
06:16 mncharity sigh.  started running  make test-ruby  this morning... but forgot to ulimit it, so got stuck.  checked in anyway.
06:17 TimToady darn it, that's not fair--you're working while I'm talking  :)
06:17 spinclad turnabout is prime fair
06:18 mncharity re backtracking, 60's, never mind.  another time.  my increasingly fuzzy impression is there are other, for critical-pathish fish to fry (than that conversation)
06:20 mncharity no work, just the check in. ;)  well, and killing the hung test, so  make test-ruby  will plod on (hopefully).
06:21 mncharity /me tries to picture a prime fair.  It would almost certainly be odd.
06:22 mncharity 1+am here.  there was something...
06:23 mncharity TimToady, any thoughts (/ something to think about) on what people might be able to do to help you with gimme5 et al?
06:24 penk joined #perl6
06:25 mncharity todo item: see if redsix can run the kp6 p6 files.
06:27 spinclad :)
06:28 TimToady I dunno, STD5 is pretty much a black box till it starts spitting out ast
06:29 mncharity I believe it would not be hard to make redsix emit p5, and create a p5 version of the runtime bits which aren't already written in p6.  a risk/question is whether/how-close redsix can handle a large enough set of p6 to be interesting as a way to write/compile p5-flavored-p6.
06:29 mncharity "p5-like-p6"?
06:31 mncharity assuming you could basically write p5 code in p6 syntax, would anyone here actually use it?  that's a "not just this evening" question, which determines whether the exercise is worthwhile.
06:32 jql mooseiphiles would
06:32 mncharity would allow writing the STD_5.pm compiler and emitter in said p6-syntax-p5.
06:33 * mncharity tries to parse mooseiphiles as greek name, philosopher.  then as philosophic school.  way past end of day
06:33 spinclad might allow writing cheat- and gimme5-like filters in more readable forms?
06:34 spinclad myophiles  (except that's mousiphiles)
06:35 mncharity re more readable, hmm, i suspect not.  they are the kind of "kludgy text massage with regex's" at which p5 excels.
06:35 mncharity err, wait
06:36 spinclad at least some of them might become 'kludgy tree massage' i fancy
06:36 TimToady well, I think a cheat/gimme5 based on STD5 rather than random s/foo/bar/ would be a step in the right direction
06:36 jql textual massage is the most ergodic
06:37 TimToady the current STD5 should prove whether it's possible to write a p6 compiler based on STD in p5
06:38 TimToady and doing it the right way to end up with the same basic executable would ensure some kind of convergence
06:38 TimToady at least on the standard grammar, and perhaps even on the extensible one
06:39 TimToady how "use FooLanguage" in user code turns into real activity is still largely unspecced
06:39 TimToady there's some handwaving comments at the start of STD about that though...
06:39 mncharity yeah.  I was thinking we would like p6-syntax-p5 to write the compiler and emitter to place behind STD_5, but as STD_5 matures, at some point gimme5 et al will need to be replaced by something p6-ish.  I'm just not sure that's something to working on quite yet.
06:40 TimToady we need to see what STD spits out first and whether that's usable at all
06:40 TimToady the fact that rakudo's compiler has been converging on it seems like a good sign though
06:41 mncharity setp 1 - p6-syntax-p5 which compiles and runs fast, and thus can be used to write stuff in p6.  step 2 - write better p6 in p6.
06:41 TimToady well, I'll take any bootstrap I can get at this point  :)
06:42 TimToady and better too many than too few
06:45 mncharity re "usable at all", one nice thing about red_STD is it has a complimentary risk set.  it's less maintainable than green_STD.  but since it's all hand written, as long as bugginess is contained, it _is_ going to converge and run.  though not doing TRE may end up requiring liberties.
06:46 mncharity and I suppose I may have deeply misunderstood the backtracking/TRE needed, in which case... well, even there, it just manifests as increase mess.
06:47 mncharity so I'm at least fairly confident at least one of STD_5 or red_STD will work.
06:47 spinclad re cheat/gimme5 based on STD5: ones based on pge/nqp would be a step thither, and runnable now...
06:47 mncharity oky. end of day+2 hr.   any last issues?
06:48 spinclad but maybe STD5 is about ready too
06:49 TimToady well, nothing says we can't do STD5/nqp hybrid or some such too
06:50 spinclad if they both accept the same source...
06:51 TimToady well, anything based on STD should accept the same source, more or less.  it's the backends that will mangle the semantics mostly  :)
06:51 mncharity re pge/nqp, if there is something parroty which could  do a pugs-like  -C yaml, on real code, that could be interesting.  to compliment kp6+redsix+STD_5+red_STD.
06:56 mncharity if anyone knows ruby, one of the next tasks in red_STD is to write a ruby version QLang et al.  and heredoc (simpler).  on the QLang, it might be easier, and sufficient, to write it in normal ruby, rather than the "translate what's there" which is used in the rest of std.rb.  I'd not object at all if someone(s) knocked these off before I have to get to it. ;)
06:58 mncharity "P6 by Beltane".  for some value of p6.  that would be very nice.
06:58 mncharity good night all.  thanks for the enjoyable conversation.  &
06:59 Auzon see you
06:59 TimToady night &
07:00 spinclad rakudo have --target=past, i think nqp does too
07:00 spinclad sleep well
07:00 spinclad *has
07:23 devogon joined #perl6
07:32 jjore joined #perl6
07:43 Aankhen`` joined #perl6
08:10 iblechbot joined #perl6
08:19 pugs_svnbot r19949 | lwall++ | [Cursor5] now correctly produces transitive lexer pattern
08:19 pugs_svnbot diff: http://dev.pugscode.org/changeset/19949
08:19 lambdabot Title: Changeset 19949 - Pugs - Trac
08:58 Psyche^ joined #perl6
09:05 hanekomu joined #perl6
09:16 xinming joined #perl6
09:17 Psyche^ joined #perl6
09:20 araujo joined #perl6
09:41 meteorjay joined #perl6
09:54 IllvilJa joined #perl6
09:54 hcchien joined #perl6
09:56 masak joined #perl6
10:02 mattz joined #perl6
10:39 cognominal_ joined #perl6
11:01 smtms joined #perl6
11:06 ebassi joined #perl6
11:16 IllvilJa joined #perl6
11:25 cmarcelo joined #perl6
11:39 ruoso joined #perl6
11:42 marmic joined #perl6
12:07 smtms joined #perl6
12:08 pdy joined #perl6
12:12 * pdy greets bloonix and moritz_
12:13 pdy buu: do you plan to implement buubot in Perl6?
12:24 diakopter joined #perl6
12:33 alc joined #perl6
12:42 diakopter joined #perl6
12:48 pbuetow joined #perl6
13:07 r0bby joined #perl6
13:11 kanru joined #perl6
13:15 mj41 joined #perl6
13:21 pugs_svnbot r19950 | putter++ | [misc/red_STD] renamed to misc/STD_red, to go with "STD_5".
13:21 pugs_svnbot diff: http://dev.pugscode.org/changeset/19950
13:21 lambdabot Title: Changeset 19950 - Pugs - Trac
13:35 mncharity joined #perl6
13:35 pugs_svnbot r19951 | putter++ | misc/STD_red/std.rb: fixed typo - runs again.  lack of unit testing --.
13:35 pugs_svnbot diff: http://dev.pugscode.org/changeset/19951
13:35 lambdabot Title: Changeset 19951 - Pugs - Trac
13:57 monomorph joined #perl6
14:37 polettix joined #perl6
14:42 chris2 joined #perl6
14:46 rindolf joined #perl6
14:46 riffraff joined #perl6
14:54 Psyche^ joined #perl6
15:03 TJCRI joined #perl6
15:15 rdice joined #perl6
15:15 jhorwitz joined #perl6
15:29 hanekomu joined #perl6
15:40 sri_work joined #perl6
15:46 peeps[work] joined #perl6
15:47 penk joined #perl6
16:08 ruoso pugs: say Signature.^methods()
16:08 exp_evalbot OUTPUT[*** No such method in class Class: "&methods"␤    at /tmp/qj31BkoA61 line 1, column 5 - line 2, column 1␤]
16:09 ruoso TimToady, is there any idea on how the Signature API should look like?
16:10 TimToady I expect fglock has thought the most about that
16:11 TimToady or maybe the MO folks
16:12 TimToady but to the first approximation it's just an ordered container of containers
16:13 ruoso hmmm
16:13 TimToady and binding happens left to right across it, so that defaults can refer to previous bindings in the sig
16:13 * ruoso trying to think how Capture ~~ Signature would be
16:14 TimToady the containers in a Signature are not necessarily bound to a lexical scope
16:14 TimToady they're bound into a lexical scope by "my" or "sub" or some declarator
16:15 TimToady but a bare signature still has containers that don't go anywhere
16:15 TimToady so I guess if you bind to an anonymous signature you get a bunch of anonymous variables
16:17 ruoso i wasn't talking about binding yet... but matching
16:17 TimToady match attempts binding, but it has no effect outside
16:18 TimToady that's what I'm saying
16:18 ruoso but binding may have side effects
16:18 ruoso i.e. autovivification
16:21 TimToady well, there's probably some sort of "could you bind this if I really wanted to?" query
16:23 TimToady maybe it even creates some kind of a list of action items that could be executed later without rebinding
16:23 TimToady that might be overdesign tho
16:24 ruoso remember that signature may have any repr... so the API must be spec
16:24 TimToady the vivification is an interesting question too
16:25 TimToady we don't allow subscripts in my or function sigs
16:25 TimToady but in a literal lvalue that refers to previous vars, we do
16:25 TimToady so maybe that's a different kind of animal
16:25 ruoso foo() := bar()
16:26 TimToady presuming foo is declared rw, it seems to follow
16:27 ruoso what I mean is that the return of foo may have any repr
16:28 TimToady an lvalue may just be a protoobject that knows what else it has to do if you vivify it
16:28 rindolf joined #perl6
16:28 ruoso I know... I'm just saying that we need a std api to that...
16:28 ruoso it's not overdesign
16:29 TimToady I meant the $cap ~~ $sig might actually produce a list of potential side effects in the abstract; not your api
16:30 TimToady what you're doing is just design :)
16:30 TimToady but sometimes I overdesign things in my head...
16:30 ruoso ah ok
16:30 TimToady but if we put too much mechanism into signatures, they won't be fast
16:32 TimToady but then again, if we want to capture control between the can-you-bind and the actually-bind (maybe for mmd decisions?) then it might not be overdesign to have a .can equivalent
16:33 Lorn joined #perl6
16:33 TimToady hmm, default setting couldn't be delayed though, since the binding of a subsequent parameter might depend on the run-time type of an earlier
16:34 TimToady and that might actually run code during binding
16:36 TimToady when \(1) ~~ :($a, $b = die "oops") {...}
16:37 TimToady that can determine that it can bind without actually running the default, but...
16:37 Daveman joined #perl6
16:38 TimToady when \(1) ~~ :($a, $b = die "oops", :$c = $b + 1) or some such may have problems
16:38 TimToady not thinking quite clearly yet; doesn't help to have the flu...
16:41 spinclad i'm thinking you may not need to run any of the defaults at trial time, so no problem that $b is not really there yet at $c trial time
16:41 TimToady maybe :($a, ^SomeType $b = die "oops", SomeType $c) where SomeType must match the 'en passant' type of $b
16:42 spinclad yes, that i fancy needs trial-time binding
16:42 blindfish joined #perl6
16:42 TimToady well, that's an illegal sig anyway, since you can't have mandatory after optional
16:43 TimToady but I'm sure there's some way to fake it into dying at ~~ time  :)
16:43 spinclad easy to fix: :($a, ^SomeType $b = die "oops", SomeType $c = $b + 1)
16:43 spinclad but still no death
16:44 TimToady but maybe we can just say that defaults are evaluated lazily as needed, and if a signature forces evaluation somehow, that's the user's fault, not ours. :)
16:44 spinclad :($a, ^(SomeType = die "Any") $b = die "oops", SomeType $c = $b + 1)
16:44 spinclad oop
16:45 kyrbe joined #perl6
16:45 spinclad :($a, (^SomeType = die "Any") $b = die "oops", SomeType $c = $b + 1)  maybe
16:45 spinclad but what would be an optional type?
16:46 kyrbe left #perl6
16:49 Southen_ joined #perl6
16:49 TimToady :($a, ::($a.WHAT) $b), presuming we allow symbolic ref to a type
16:49 TimToady that could contain any amount of code in ::(...)
16:50 TimToady so i guess signatures are turing complete.  :)
16:50 spinclad and if $a defaults, its default must run to get its type
16:50 TimToady correct
16:51 TimToady it's almost like a "make" in Unix terms
16:51 TimToady and when is it possible to run "make -n" without side effects?
16:52 TimToady makes you want some way to tell STM "don't allow any side effects in the following code"
16:52 spinclad STM? for parallelism?
16:53 TimToady well, to enforce the "I claim this is pure code" declaration when it isn't in fact pure
16:53 TimToady it should at least warn you about such situations
16:53 TimToady speaking in general here, not just for ~~ sig
16:53 [particle] use warnings 'impure';
16:54 spinclad ah, right.  'provably pure'.
16:54 TimToady but thinking of it in a dynamic scope like STM uses for contend {...}
16:54 spinclad 'trust but verify'.
16:55 TimToady contend :pure {...}
16:55 ruoso TimToady, isn't better to have a specific "match" code in the signature?
16:55 kst joined #perl6
16:55 TimToady don't follow
16:56 ruoso all this controls about defaults and the side effects
16:56 TimToady certainly any object that supports ~~ is supposed to provide .ACCEPTS for that purpose
16:56 TimToady and that could inside enforce something like contendpure {...}
16:57 * ruoso will look deeper later...
16:57 * ruoso a little confused
16:57 TimToady I'm saying that STM already keeps track of interfering side effects, and that it would be natural to let that mechanism check for *any* side effects
16:58 TimToady though it might need to be taught which memory changes are benign and which ones aren't
16:58 TimToady since even "pure" code has to fiddle the stack and such to run
17:00 TimToady interestingly, we might have a version of atomic that allows other pure code to run, just nothing else impure
17:01 spinclad .oO { just nothing else interfering }
17:01 TimToady sort of like N read locks but 1 write lock
17:01 spinclad gotcha
17:02 TimToady I suspect this idea would be more useful in Haskell than in Perl though...
17:02 spinclad .oO { 'gotcha': who hit whom? i got you but your word got to me. }
17:03 TimToady ruoso: you might need to think about some of the implications of STM in your design before you get too much further, unless you have already
17:03 PerlJam TimToady: Tomorrow's perl may act more like Haskell than you intend today :)
17:03 [particle1 joined #perl6
17:03 PerlJam s/perl/Perl/
17:03 [particle1 some argue perl itself is an impure thought
17:04 TimToady I intend that Perl be able to mutate in whatever direction the community desires
17:04 TimToady even if that is N different directions
17:05 spinclad .oO { think only pure thoughts.  change nothing, make a new world. }
17:05 TimToady all I can tell you is that some subset of the community is *not* going to want to think about monads  :)
17:07 spinclad monads will be undercover agents, preventing change from ever becoming real.  like pixies.
17:07 PerlJam at least until monads lose the stigma or change their name or something
17:08 TimToady monads are too hard to lift
17:08 PerlJam so is recursion for some people
17:08 PerlJam :-)
17:08 TimToady I got better...
17:09 spinclad so are continuations
17:09 TimToady I'm getting better
17:09 spinclad also well kept under cover
17:10 TimToady well, we don't even tell people they're using real closures till they need to know...
17:10 spinclad also TimToadies should stay warm and get well
17:10 PerlJam once Perl 6 brings these weighty concepts to the forefront of the programming mainstream (I can dream can't I? ;) everybody will be using continuations and monads and stuff.
17:11 spinclad what, lisp and haskell aren't already forefront?  don't their jobs dominate the want ads?
17:11 TimToady we continually "use" the universe without understanding it
17:11 pcbuetow joined #perl6
17:12 TimToady all I know is, I'm pretty smart, but I'm not smart enough to win an argument with ghc :(
17:12 TimToady well, maybe I know a few more things than that...
17:13 spinclad just let it tell you where it gets stuck, and apply mutation around that point until it sneaks through.
17:14 spinclad i find this method leaves for later the harder job of understanding how my code works
17:15 TimToady what do you do when none of the mutations you think of actually work?
17:15 TimToady everything's obvious after Sherlock Holmes explains it, but that doesn't mean we
17:15 TimToady are all SH
17:16 spinclad then you go extinct.  that's the beauty of darwinian programming: if it's still here, it works.
17:16 spinclad the ugliness of it is having any idea what you're doing
17:16 TimToady yeah, well, darwinian evolution seems to have limited the human race to an average IQ of 100
17:17 Psyche^ joined #perl6
17:18 [particle1 hey, i resemble that remark.
17:18 spinclad nonono, i meant me.  anyother resemblance is purely imaginary.
17:18 * TreyHarris chuckles at the syllogy implied at some level: "statistical laws imply statiscal distribution in a statistically large enough universe over a statiscally large time."
17:19 TreyHarris "syllogy"?  that *should* be a word.  But I guess I meant syllogism.
17:19 spinclad i like that word.  let me check if the greeks had it.
17:20 TimToady tautalogies "я " us
17:20 rindolf joined #perl6
17:20 TimToady tautologies even
17:21 TreyHarris TimToady: yes, good point.  it's a tautology when it only has one prior, a syllogism when it has two or more.  thank you. :)
17:21 PerlJam tauntology? :)
17:21 TreyHarris PerlJam: Tontonogy.  It's what the equestrian arts are known as on Hoth.
17:22 TimToady "What mean we, white man?"  -- Taunto
17:23 [particle1 "nyah nyah nyah nyah nyah nyah" -- Taunto
17:24 spinclad 'syllogy': apparently not greek.  'syllogé' (eta acute) was a gathering, a meeting, and 'syllogos' an assembly.
17:24 PerlJam You can only run with a riff for so long before it eventually peters out.  I wonder how long Perl 6 will last?
17:25 PerlJam (much much much longer than "taunto" I hope)
17:25 TimToady till Perl 7, probably...
17:25 spinclad the Dead riffed long and hard
17:25 PerlJam TimToady: that's the one your great-great-grandchildren will be designing?
17:25 TimToady the only question is whether the name of Perl 7 will be "Perl 7"  :0
17:25 PerlJam (they have the proper provenance after all)
17:26 [particle] i doubt the great-great-grandchildren have been certified yet. i'm sure they'll be certifiable.
17:28 spinclad *(not greek: not classically attested)
17:29 TimToady can't find my Liddell and Scott, sigh...
17:30 ruz joined #perl6
17:30 TimToady later &
17:30 spinclad the town of Taunton is about 50, 60 miles south of here
17:30 TreyHarris i'm thinking of the disraeli quote "lies, damned lies, and statistics."  I read once somewhere that a "damned lie" specifically referred to when you lie by claiming or implying that a truthteller is lying.  I don't know if that's canonical though, or just something the writer made up.
17:33 pugs_svnbot r19952 | putter++ | [misc/STD_red] renamed <ws> from dot_ws to wsp.  assorted cleanup.
17:33 pugs_svnbot diff: http://dev.pugscode.org/changeset/19952
17:33 lambdabot Title: Changeset 19952 - Pugs - Trac
17:39 meppl joined #perl6
17:42 mncharity (boo monads!  yay arrows!  peanuts fly)
17:42 DarkWolf84 joined #perl6
18:23 meppel-san joined #perl6
18:28 pmurias joined #perl6
18:39 pmurias mncharity: red_STD generates a true/no answer for most rules instead of a match, right?
18:56 Lorn_ joined #perl6
18:56 ruoso TimToady, I'm not sure STM management can keep track of everything... Considering different representations for objects... that objects may be enterely out of the program's control
18:57 ruoso they might be using an external C library
18:57 ruoso is the VM supposed to make COW for the entire process while the transaction isn't committed?
18:58 ruoso and then merge back the memory>
18:58 ruoso because other way there's no way to make sure that there are no side effects...
18:59 pmurias &
19:00 ruoso or if some given repr doesn't support STM at all
19:00 ruoso like Glib
19:06 ruoso When I was thinking in STM was about a controlled set of data that you which to keep transactions for...
19:07 ruoso I wasn't thinking about the entire process being rolled back...
19:07 ruoso which would mean that...
19:08 ruoso in a content... all accessed variables are marked as temp, and their outer value would be set when the transaction was committed
19:09 TJCRI joined #perl6
19:11 ruoso but I wasn't expecting all memory access to be intermediated...
19:14 riffraff joined #perl6
19:15 ruoso or specific data types that were STM-aware
19:15 ruoso that would be sane also
19:16 ruoso s/or/but/
19:18 nothingmuch ruoso: in haskell due to type safety STM can be constrained to a very select fewvariables
19:18 nothingmuch it has the luxury of pessimizing everything else
19:18 nothingmuch in perl 6 i think it'll probably have to auto-upgrade variables to STM variants in order to be practical
19:19 ruoso but how can it do it on unknown representations?
19:19 nothingmuch can't
19:19 nothingmuch they'll ahve to provide an api
19:19 nothingmuch i suppose
19:19 nothingmuch but it's difficult
19:20 nothingmuch i'd guess it's a runtime error ("unsupported data type in transactional operation" or sth)
19:20 nothingmuch in some cases it really doesn't make sense, too
19:20 ruoso and other question would be, how deep would that control go?
19:20 nothingmuch for example if the container is tied to a file on disk
19:20 nothingmuch hmm... good question
19:21 ruoso the container?
19:21 ruoso the value of the container? the conteiner inside the value inside the container?
19:21 nothingmuch s/the/a/;
19:21 nothingmuch any
19:21 ruoso brb
19:23 nothingmuch an example of things that might want to be transaction aware, even if in practice it's not really STM: berkeley db backed hashes, slots of an object that came from an ORM (the ORM's meta-something could implicitly clone the database handle and create a new transaction for each atomic { }), etc
19:23 * nothingmuch is mostly throwing this in the air as food for thought
19:24 [particle] pigeons descend.
19:26 spinclad hawks too
19:29 mncharity pmurias: re "red_STD generates a true/no answer for most rules instead of a match, right?", yes and no.  currently operators have matches, and a couple of other rules.  plan is to finish transliterating, do a edit-for-correctness pass, and then start adding additional matches, but only as needed by the parser itself, or by a hypothetical ast generator.
19:29 mncharity vision is a match tree result which is "not complete, but good enough".
19:32 mncharity running  ruby1.9 std.rb  currently gives you an interactive repl, for trying code against rules.  but only EXPR ("(2+3)*4") and a few other rules ("use x") have been exercised/debugged.
19:35 pasteling "mncharity" at 76.24.29.201 pasted "example of current STD_red use" (69 lines, 2.1K) at http://sial.org/pbot/30297
19:41 peepsalot joined #perl6
19:43 mncharity red_STD, STD_red, whatever
19:50 * ruoso still have no clue on how that translates from abstract concepts to low-level implementation... how deep to go, when to care...
19:50 * ruoso home &
20:27 meteorjay joined #perl6
20:31 thoughtpolice joined #perl6
20:44 pmurias mncharity: thanks
20:51 njbartlett joined #perl6
20:57 simcop2387 joined #perl6
21:09 smtms joined #perl6
21:44 cmarcelo joined #perl6
21:58 simcop2387 joined #perl6
22:22 Auzon joined #perl6
22:22 Limbic_Region joined #perl6
22:43 peepsalot joined #perl6
22:55 wknight8111 joined #perl6
22:57 silug joined #perl6
23:06 cj ingy!
23:06 cj I wonder what he was getting...
23:06 cj has mp6 magically gotten file IO or sprintf() yet?
23:18 Auzon joined #perl6
23:24 Zygo joined #perl6

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

Perl 6 | Reference Documentation | Rakudo