Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-01-21

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:04 s1n so i'm still looking to see what the :by() method is technically classified as
00:04 s1n is it an attribute, a circumfix method?
00:04 s1n does anyone know what this is?
00:05 s1n and does anyone know of another such feature in p6?
00:05 TimToady it's just a named parameter
00:05 lambdabot TimToady: You have 1 new message. '/msg lambdabot @messages' to read it.
00:08 s1n TimToady: named parameter huh? to the "constructor"?
00:08 TimToady well, it's a named argument.  the parameter is the other end
00:08 TimToady to the operator
00:09 TimToady multi infix:<..> ($left, $right, :$by) {...}
00:09 TimToady or some such
00:09 s1n hmm, i'm still not familiar with p6 to get what that says really :(
00:09 TimToady it expects two positional arguments and one named argument
00:10 TimToady which is what is supplied when you say 1 .. 10 :by(2)
00:10 s1n how does a multi-dispatch method differ from a regular method?
00:10 TimToady multi infix:<..> ($left, $right, :$by = 1) {...}  actually
00:11 TimToady a regular method sends the call to the object and lets it decide what it means
00:11 TimToady a multi dispatch is decided by the language, not by the objects
00:11 s1n ah, thanks
00:12 s1n are all named parameters specified as :param?
00:12 TimToady can also use by => 1 notation, but only when in an argument list, not as an operator adverb
00:13 TimToady but generally people use :foo
00:13 TimToady less cumbersome, and defaults to "true"
00:14 [particle]1 joined #perl6
00:14 s1n TimToady: i'm sorry, my language vocab isn't too advanced, what do you mean by an operator adverb?
00:15 TimToady the operator precedence parse works by alternately expecting a term and an infix
00:15 TimToady if the parser sees an adverb where a term is expected
00:15 TimToady it's just a pair, or a named argument, or some such
00:16 TimToady when it sees :foo where an infix is expected however
00:16 TimToady it applies it to whatever the most recent operator was
00:16 TimToady (looking back to the left)
00:17 TimToady so you don't mess up the syntax of an operator like .. when you say 1..10
00:17 TimToady but it's easy to give a different "step" when you want it
00:19 s1n i am humbled by how well other people, namely you, understand this, because i'm lost :)
00:19 TimToady an adverb is just a word that modifies a verb, and we're considering .. to be a verb there
00:19 TimToady in English we might say "Count from 1 to 10 quickly"
00:20 TimToady the quickly is the adverb
00:20 s1n yes, but i don't yet understand what are verbs and what are adjectives in languages, such as p6
00:22 TimToady literals and variables and types are nouns.  pretty much everything else is some action to perform on those nouns, so those are the verbs
00:22 s1n so in this example, :by would be an adverb?
00:23 TimToady in 1..10:by(10) it is
00:24 TimToady but in $x = :by(2) it's just a Pair object.
00:24 s1n what does that statement mean?
00:24 s1n what would the value of $x be?
00:24 TimToady can also be written $x = 'by' => 2;
00:24 s1n like a hash slice?
00:24 TimToady it's a Pair object whose key is 'by' and whose value is 2
00:25 TimToady it's like one element of a hash
00:25 s1n is $x = :by(3), :by(4); valid?
00:25 TimToady no, because assignment to a scalar value would stop at the comma
00:26 TimToady $x = (:by(3), :by(4)) is okay though
00:26 s1n an error or just stop there?
00:26 TimToady it would assign a list of two pairs
00:26 s1n ahh okay, that's neat
00:26 TimToady just stop that term
00:26 nihiliad left #perl6
00:26 TimToady as in C-style for loop:
00:26 TimToady loop ($a = 1, $b = 2; foo($b); $a++, $b++) {...}
00:27 TimToady the assignments may be separated by comma there
00:27 TimToady since they're scalar assignments
00:27 TimToady if you assign to an array, though, it eats the comma and the rest of the list
00:28 TimToady @a = :by(3), :by(4) would put two pairs into the array
00:28 lambdabot Maybe you meant: activity activity-full admin all-dicts arr ask . ? @ v
00:28 s1n okay, that makes sense
00:29 s1n i'm getting curious because i'm studying statistical nlp, and #1 thing to know is grammers
00:30 TimToady well, don't forget to study the nlp part of it as well as the statistics  :)
00:31 s1n TimToady: that statistics is the easy part, i need a grounding in grammars first, and i'm sifting through rakudo to see how things work
00:32 s1n i'll likely use p5 when i do my thesis impl :)
00:32 TimToady My point is that nlp hasn't got a lot to do with either statistics or compilers, but a lot to do with how people think, so don't forget to think about how people think
00:33 s1n nlp is all about statistics now
00:33 legis joined #perl6
00:33 s1n compilers are much simplier grammar interpreters
00:33 TimToady I understand that
00:33 s1n so to get the basics, understand kinda how compilers work a little
00:34 s1n then move on to mixing machine learning (which is mostly stats nowadays) and grammars
00:36 s1n TimToady: i don't want to be the ass who tries to correct the great lwall. i may not know compilers at all, but i do know machine learning :)
00:37 TimToady I'm just saying that part of nlp is nl, and nl is a different beast than most computer people seem to think it is
00:37 s1n i've dabbled with nl before, it's a bloody mess to understand
00:38 TimToady indeed, but people do it that way for various reasons :)
00:38 s1n heh yes, it's a fascinating field
00:39 TimToady the use of statistics is an improvement over old-school parsers, but it's also a trap of its own
00:39 s1n most ml techniques seem to be centered around statistics of some form
00:40 s1n you can wrap most semi-brute force techniques with probability estimators, and nl is a perfect candidate because the problem search space is so large
00:41 s1n nl is a new field to me, so we'll see how it turns out after i'm published heh
00:42 TimToady at some point, the human desires to *mean* something, not just put out some correlated utterances, so it's hard for computers to jump the gap to pragmatics, because that's about causation, not just correlation
00:42 donaldh joined #perl6
00:43 TimToady humans have figured out how to "do things with words"
00:43 TimToady so far, computers have little sense of what their words will do
00:43 s1n yeah, the correlated utterances can be grammatically correct, but nonsense
00:44 s1n the famous example is chomsky's "colorless green ideas sleep furiously"
00:44 s1n snlp aims to understand what is being done
00:44 TimToady well, even that can be made to mean something sensical in context :)
00:45 s1n i'm finding languages are more fun than i originally thought
00:47 TimToady it's gonna be a long time before snlp will tell you what is being done when a minister says "I now pronounce you man and wife"
00:48 TimToady see also Charles Fillmore's paper entitled "May we come in?"
00:50 TimToady (As a linguist, I love pragmatics and phonetics, and put up with everything in between. :)
00:52 s1n well, i'm speaking your language then huh?
00:52 s1n bad pun, i know
00:53 s1n is that paper available anywhere?
00:54 TimToady not sure
00:54 TimToady well, at least, not sure for "anywhere" defined as the Web :)
00:55 TimToady I'm quite sure it's in at least one library somewhere :)
00:55 s1n heh, yeah i'm looking at my uni and i don't see it
00:55 s1n was it in a book?
00:57 araujo joined #perl6
00:58 TimToady looks like http://www.google.com/url?sa=t&amp;source=we​b&amp;ct=res&amp;cd=2&amp;url=http%3A%2F%2Fw​ww.word-power.co.uk%2Fbooks%2Flectures-on-de​ixis-I9781575860077%2F&amp;ei=_HF2Sef5H4-1kA​Xr5c33Cg&amp;usg=AFQjCNEAbHcfRIK1JuD3TsGghcJ​DiOXYYg&amp;sig2=VYBvqwWc8RxMG8V9sMmzMA is about that
00:58 s1n yeah i saw that and immediately thought "i can get that for free from the uni probably"
00:59 TimToady anyway, he was one of my teachers :)
01:00 s1n fillmore?
01:00 s1n did you actually study linguistics?
01:00 s1n (that's not doubt, just curiosity)
01:02 TimToady yes, I've officially had more linguistics training than computer training
01:02 s1n interesting
01:04 TimToady my wife once reduced George Lakoff to a state of mumbling once when we chanced upon him on campus, and she said, "Just look at you"
01:04 TimToady several days later we got a lecture on why it wasn't "Just look at yourself"
01:05 araujo TimToady, ok, that explains why perl is like this
01:05 TimToady I also got to take phonology from Peter Ladefoged when we were visiting UCLA
01:06 TimToady indeed, I optimize for "How to do things with words" rather than orthogonality, because that's what natural languages do
01:07 TimToady now certainly, a computer language cannot take context into account to the extent that a human can
01:07 |jedai| joined #perl6
01:07 TimToady but within those limits, computers can do a lot better than they have historically
01:09 TimToady in particular, the notion of discourse analysis corresponds rather closely to our notions of lexical scoping, and "all is fair if you predeclare"
01:09 TimToady for instance, I can set up a lexical context in which it makes perfect sense for colorless green ideas to sleep furiously.
01:10 TimToady first of all, we define "green" to mean "fresh" rather than plant colored...
01:11 ayrnieu 'colorless' is a kind of economic theory about interest, 'green ideas' can be environmental ideas, a sleeping idea can be politically ineffective -- and furious because of this.
01:11 TimToady and we postulate that ideas that have not been born yet are sleeping in your brain
01:11 TimToady your subconscious knows about them, however, and thinks hard about them, so they're sleeping furiously
01:11 TimToady but until they are actually born, they are colorless
01:12 TimToady ayrnieu: that would be another approach, and probably a better one :)
01:13 TimToady but basically your lexicon (as in lexical scoping) is defined by nearby utterances as well as distant dictionaries
01:13 s1n TimToady: but chomsky did not "predeclare" anything :)
01:14 TimToady I did not attend a school that held chomsky in high regard :)
01:14 s1n TimToady: i can tell
01:14 s1n where did you attend?
01:14 TimToady SPU, UCB, UCLA
01:15 s1n in that order?
01:15 ayrnieu (better: a furiously sleeping idea is one that is presently ineffective but that is gaining currency in a population, so that it'll become very effective in a short time.  Which is a useful way to speak about conditions at the end of the USSR.)
01:15 TimToady and the Summer Institute of Linguistics
01:15 TimToady now SIL International
01:15 s1n that is, do you hold a phd from ucla?
01:15 TimToady nope, dropped out :)
01:16 TimToady had to pay for a family
01:16 s1n heh
01:16 TimToady but the training was much more valuable than the sheepskin
01:20 s1n TimToady: well, if i have any stupidly simple questions about perl6, it's a good thing you're here to throw my head in a tailspin :)
01:20 TimToady I was never cut out to be an academic in any case; we were planning to be field linguists and analyze unwritten languages before health issues came up
01:21 TimToady what, can't I just stick to vague generalities?  :)
01:24 TimToady heh
01:24 TimToady http://en.wikipedia.org/wiki/Perlocutionary_act
01:26 riffraff joined #perl6
01:28 TimToady (speaking of How To Do Things With Words)
01:30 |jedai| joined #perl6
01:31 s1n i originally read that as perl-ocutionary
01:35 TimToady I was intending for you to read it that way.  :)
01:36 TimToady the funny thing is that the subject matter is exactly what we were talking about earlier
01:36 TimToady but my using it as a joke was a perlocutionary act, apparently
01:38 s1n heh, clever
01:40 s1n speaking of adverbs, i'm reading moritz_'s testing rfd
01:40 s1n moritz_: i agree with ruoso, :test is a bit more readable
01:50 mncharity joined #perl6
01:52 TimToady "test" is too common, as is "ok".  see my reply
01:53 TimToady (coming soon to a mailing list near you)
01:54 hercynium joined #perl6
01:56 |jedai| joined #perl6
01:57 s1n yes, but why would the namespace be cluttered?
01:57 s1n can't we put something like :ok or :test in a separate namespace?
01:58 s1n is :Test::ok not possible (especially if hard-wired)?
01:59 TimToady doesn't really fit into adverb syntax, and a bit unwieldy for multiple uses in the same file
02:00 TimToady :TEST isn't much harder to type than :OK
02:00 TimToady I think this would be a good place for all caps just for the visual thwack between the eyes
02:01 mncharity hmm... http://perl6.wikia.com/wiki/Perl6_Wiki ... /me wonders if it should be in the /topic...
02:02 mncharity eeep.  lots of information about flat stomachs.  err... maybe not.
02:05 TimToady flattery will get you nowhere...
02:17 mncharity @tell avar Re your elf status inquiry (days ago), my focus is getting elf to run TimToady's STD.pm grammar, enroute to a bootstrapped front-end.  The CL elf is kept unrotted, but being off that critical path, isn't getting much love.  Volunteers encouraged.  cspencer expressed interest.  There are other ways, many pure-p6, to help as well.
02:17 lambdabot Consider it noted.
02:20 mncharity @tell avar Progress along the path is steady - no obstacles, or planning puzzles, just puttering along - but rather slow.  My tuits tend to go where there are collaborators or cheerleaders, and other than TT's vital STD work, there's not been much of that for elf.  Collaborators or cheerleaders encouraged.
02:20 lambdabot Consider it noted.
02:26 pugs_svn r24981 | putter++ | [elf_h] Added a primitive for runtime symbol lookup.  IR analysis bugfix (incorrect notes<crnt_package> after block-less package decls).
02:26 pugs_svn r24981 | putter++ | [elfparse] Dusted rx post actions. Added rx return type coercion using post actions.  PrecOp enabled and working with infix.  Accept non-Match objects in Match trees.  STD_blue_run/STD_green_run sym bugfix.  Tweaked Makefile dependencies.  Modified std.pm comment convention.
02:31 mncharity roadsign: [ tribulations -> EXPR -> say 3 >  travel time and distance unclear.
02:34 [particle] joined #perl6
02:34 mncharity but nice to see ./elfgreenstd -v -e 'say /<STD::infix>/.match("a+").match_describe' give a match with STD's $m<O> precedence info.  even if it has a bogus $m[0] :/ .
02:39 TimToady if you actually call Cursor's .list method it's supposed to translate .<0> to .[0]
02:39 mncharity TimToady: random observation: I found it curious that %additive showed up both in 'is defequiv' and PrecOp's Additive.
02:39 TimToady but it doesn't attempt to prepopulate an array
02:40 mncharity re Cursor, err no, it's a bug with the rx_on_re engine.
02:40 TimToady ah.
02:40 TimToady defequiv is just the default for if you don't give "is equiv" in your operator macro.  It's not implemented yet...
02:41 mncharity <sym> is converted to $<sym>=(foo) , but none of the test cases caught that the alias implementation leaves a false $0 behind.
02:42 TimToady note also that the precedence info is coming via letter O, not number 0
02:43 TimToady but I see you typed it that way already
02:43 mncharity it's come up before, but I note that rx tests should really do "dump resulting Match tree in a cannonical string form, and compare that against a full correct string", rather than doing spot checks of this property or that.  it will be hard enough to write enough test cases without disregarding most of there info.
02:43 mncharity s/their
02:44 mncharity :O :0  "A treatise on the emotional content of emoticons rendered in different typefaces".
02:45 TimToady :O :0 :|
02:46 TimToady :O :o :.
02:46 mncharity lOl
02:46 |jedai| joined #perl6
02:48 mncharity re 'I can ignore defequiv for now', thanks :)
02:48 TimToady :⚬
02:49 * mncharity resists the temptation to search unicode tables...
02:50 mncharity though it would be nice to have a "show me characters "like" this one (or these)".  image search across unicode glyphs.
02:54 mncharity /me toys with the idea of writing an elf_quickstart.txt - every step needed, software and cpan, to take a bare debian, and getting all of elf running on it.  hmm...?
02:55 mncharity end of day.  goodnight all.  "Xmas '09 or bust"
02:55 |jedai| joined #perl6
03:04 alester_ joined #perl6
03:13 alester_ HI EVERYONE
03:13 pmichaud alester_: pong :-)
03:13 alester_ I'm working on my kenote for FP2009
03:13 alester_ and I got this big idea
03:13 alester_ well,
03:13 alester_ let me show you what I have so far first
03:14 pasteling "Andy" at 64.81.227.163 pasted "FP2009 keynote thoughts" (33 lines, 1.4K) at http://sial.org/pbot/34610
03:15 alester_ I want us to start talking about Rakudo like it's here today
03:15 kid51 joined #perl6
03:16 pmichaud I think that's fine; we have to be careful not to overpromise.
03:16 alester_ but it exists today
03:17 alester_ and I want to tell people to work on it
03:17 alester_ because it exists today
03:17 alester_ Part of that is a good working rakudo.org
03:17 pmichaud sure, but if someone comes in wanting wholesome crunchy Perl 6 goodness with all of the wonderful Synopsis features, they may get turned off.  That said, we _can_ point to people who are using it.
03:17 alester_ and helping with rakudo
03:17 pmichaud I'm not saying I disagree -- I'm just saying we need to be careful not to overpromise :-)
03:18 alester_ Sure
03:18 alester_ and part of that promise is documentation
03:18 alester_ of what we want people to do
03:18 pmichaud agreed fully.
03:18 alester_ For example, as far as I know we have no toolchain
03:18 alester_ no way to install modules
03:18 alester_ no LWP
03:18 alester_ no DBI
03:18 alester_ etc etc etc
03:19 pmichaud are you saying we should write those soon, or are you inviting others to start writing them?
03:19 alester_ yes
03:19 alester_ Also, here's the 2nd part of my notes
03:20 pmichaud from a rakudo perspective:  if you want that toolchain to be in existence by FP2009, it ain't gonna happen.
03:20 pasteling "Andy" at 64.81.227.163 pasted "# All that matters is maintaining Perl 5" (28 lines, 1K) at http://sial.org/pbot/34611
03:20 alester_ no, I know
03:22 alester_ Anyway, a big part of this is having things to communicate
03:23 alester_ and a place to do it.
03:23 pmichaud in general, I already make a point of explicitly adding the 5 or 6 behind "Perl", unless talking about a community or "Perlish features" or the like.
03:23 alester_ That's good for you.
03:23 alester_ Rest of us, no. :-0
03:23 alester_ and it's all about mass communciation
03:23 alester_ if we all start saying "Perl 5" and "Perl 6" it'll mean something.
03:24 pmichaud personally I think that meme will catch on as more people start playing with Perl 6.  But I have no objection to getting people to say it sooner.  :-)
03:26 pmichaud overall I like the threads of your keynote so far :-)
03:26 alester_ the thrid one is about community but not relevant here
03:26 alester_ Anyway
03:26 alester_ let's think about what we need as far as rakudo.org
03:26 alester_ Blog
03:26 alester_ What else?
03:26 pmichaud documentation
03:27 pmichaud a wiki would be nice, but we could grab one somewhere else.
03:27 pmichaud if we can get svn.rakudo.org or git.rakudo.org or whatever we choose to use to work, that's a bonus.
03:27 pmichaud I don't think we need a mailing list beyond the existing perl6-* lists.
03:28 pmichaud at least, notyet.
03:28 alester_ "documentation" menaing what
03:28 pmichaud how to obtain rakudo
03:28 pmichaud how to build rakudo
03:28 pmichaud where to report bugs
03:28 pmichaud how to know if something is a bug
03:28 pmichaud where to get more information about perl 6
03:28 alester_ About perl 6 or about Rakudo?
03:28 pmichaud how to become a developer
03:28 alester_ ok.
03:29 pmichaud about perl 6
03:29 alester_ who's gonna write this stuff?
03:29 pmichaud to much of the community, "Perl 6" and "Rakudo" are still synonymous.
03:29 alester_ Who's gonna admin it?
03:29 alester_ I don't mind adminning
03:29 pmichaud I'll write a lot.  I'll also be happy to admin, or co-admin.
03:29 pmichaud I know that a lot of the rakudo devs are eager to see a central rakudo site.
03:29 alester_ of course
03:30 pmichaud (where "eager" translates into "willing to write content")
03:30 pmichaud personally I'd like to be liberal in granting write privileges to the site, to encourage content creation.
03:30 pmichaud at least at first.
03:30 alester_ agreed
03:30 alester_ mind you , i don't know squat abotu drupal
03:30 alester_ but I'm assured it's simple
03:31 alester_ and I know many folks who do
03:31 pmichaud neither do I, but I'm pretty sure we have people who can help :-)
03:31 pmichaud diakopter has suggested that we use WebGUI instead, though.
03:31 pmichaud (and has also offered to host things, on perlsix.(com|org|net)
03:32 alester_ I don't know who diakopter is
03:32 alester_ and I'd rather not use WebGUI
03:32 alester_ JT is a good friend, and I know it's in Perl, but I just don't like it.
03:34 pmichaud I'm not familiar with WebGUI either, so I'm going based on others' opinions.
03:35 pmichaud anyway, for the next couple of days I have to focus on rakudo repository issues, immediately after that will be website issues.
03:35 alester_ I'm gonna see if I can crnak a lot of Drupal goodness tonite
03:35 pmichaud that would be very helpful.
03:35 alester_ Risking the wrath of my Cruel But Fair editor
03:36 _jedai_ joined #perl6
03:38 alester_ is there anything else you as Rakudo manager want to get out ther?
03:38 pmichaud for the keynote, or for the site?
03:39 alester_ yes
03:39 alester_ what yo uwant me to exhort folks to do.
03:39 alester_ Other ideas of things we need:
03:39 alester_ Who is who
03:39 alester_ What is the diff between Perl 6 and Rakudo
03:39 alester_ What is Parrot and why do I care
03:40 alester_ Will the repo split be done by FP?
03:40 pmichaud in all likelihood, yes.
03:40 km3 joined #perl6
03:40 pmichaud parrot has a pretty firm deadline to be moved by Feb 6.
03:40 pmichaud whatever we do with rakudo we likely need to do by August 26.
03:41 pmichaud my expectation at this point is that people who don't want to know about parrot won't need to be bothered with it.
03:41 pmichaud at least, not as far as "download, install, test" is concerned.
03:41 alester_ how are they going to get Parrot?
03:41 alester_ what's the link to your plan on this?
03:41 alester_ I saw it andlost it
03:42 pmichaud it'll be part of the rakudo repo
03:42 pmichaud all the planning I have thus far is on the perl6-compiler mailing list.
03:42 pmichaud anyway, my plan is that downloading rakudo also gives you the appropriate version of parrot
03:42 alester_ So there will be a clone of Parrot in the Rakudo repo?
03:42 alester_ ok
03:43 pmichaud and the rakudo build process will build parrot (unless you supply the magic options that say to use some other copy of parrot)
03:43 eternaleye joined #perl6
03:43 pmichaud it kinda reverses things from the way we've been doing them, but I think it makes more sense for people who want to play with rakudo perl 6.
03:43 pmichaud it also means that the average user doesn't have to worry about mapping versions of rakudo with versions of parrot.
03:43 alester_ sure
03:44 pmichaud i.e., we do that for you :-)
03:44 pmichaud to your earlier question (what do I want to get out there)
03:44 pmichaud three things
03:44 pmichaud (1) rakudo exists
03:44 pmichaud (2) please play with it and report bugs
03:44 pmichaud (3) please help us improve the Perl 6 test suite
03:45 pmichaud those are, by far, the biggest helps at this point.
03:45 alester_ ok
03:45 alester_ so one page we need is: How to improve the Perl 6 test suite
03:45 pmichaud we're also interested in people who can help develop Rakudo itself (of course), but if I had a choice between a rakudo devel or someone writing tests, I'd almost prefer the tests
03:45 alester_ One thing I want on the rakduo.org site
03:45 alester_ if I may be so imposing
03:45 alester_ is that we need defined responsibilties.
03:46 alester_ "You there, you are in charge of these pages."
03:46 pmichaud that can work.
03:47 pmichaud but yes, we do end up with lots of "frequently asked questions" sorts of pages.
03:49 pmichaud anyway, part of our current problem is that we don't really have a good place to put this information now, except for the perl6 wiki (which for some reason annoys me to great end)
03:50 pmichaud I think that if we had a place on rakudo.org, more such information would be forthcoming.
03:51 alester_ are we thinking wiki on rakduo.org?
03:51 alester_ I'm not
03:51 pmichaud drupal has some sort of limited wiki extension.
03:52 pmichaud but that's not what I'm aiming at
03:52 pmichaud I'm simply saying we haven't had a central place for such information -at all-  other than the perl6 wiki
03:52 pmichaud I'm not saying the central place has to be a wiki.
03:52 alester_ ok
03:52 SamB joined #perl6
03:53 pmichaud I just want a central place where we can make it possible for multiple authors to easily be adding and updating content in an organized fashion.  :-)
03:53 pmichaud having a blog is great, but I see that as being of only equal importance to the other information.  we really need both.
03:54 alester_ yup
03:54 alester_ agreed
03:54 alester_ I need a subdomain for rakudo.org while I work on it
03:54 alester_ I guess dru will do
03:55 alester_ aside: How tough is it to set up a git repo?
03:55 alester_ I want one that's not github
03:56 alester_ my own
03:56 alester_ private
03:56 pmichaud I don't know how difficult it is.
03:56 alester_ ok, just a stab
03:56 pmichaud I was planning to use something like github unless/until we can easily put one on perl.org or equivalent.
03:56 alester_ ok, anything else we need?
03:56 pmichaud (if we use git, that is)
03:57 SamB joined #perl6
03:57 pmichaud however, Robrt says that it would be very easy to move a repo from github onto a perl.org server at some point in the future.
03:57 pmichaud I presume that means it would be easy to do elsewhere also.
03:57 alester_ sure
03:59 s1n pmichaud: success, i finally got that laptop, installing arch on a vm, and will start taking it to work on thursday
04:00 pmichaud s1n: yay!
04:00 pmichaud okay, 10:00 -- I need to go spend some time with my wife
04:00 pmichaud bbl
04:00 alester_ kthx
04:00 alester_ give her smoochies for us for your time.
04:00 alester_ appreciate it.
04:00 |jedai| joined #perl6
04:13 buubot joined #perl6
04:47 alester_ pmichaud: I do enjoy the feel of http://drupal.org/
04:54 [particle]1 joined #perl6
05:01 jhuni joined #perl6
05:09 REPLeffect joined #perl6
05:09 mj41_ joined #perl6
05:28 iblechbot joined #perl6
05:28 meppl joined #perl6
05:38 aindilis` joined #perl6
05:46 alester_ nslookup dru.rakudo.org
05:47 agentzh joined #perl6
06:00 donaldh joined #perl6
06:11 _jedai_ joined #perl6
06:17 On joined #perl6
06:53 ashizawa joined #perl6
06:55 justatheory joined #perl6
07:03 DemoFreak joined #perl6
07:05 [particle] joined #perl6
07:07 xinming joined #perl6
07:13 DemoPhreak joined #perl6
07:37 agentzh joined #perl6
07:46 |jedai| joined #perl6
07:50 meppl joined #perl6
08:14 schmalbe joined #perl6
08:21 mberends joined #perl6
08:26 pbuetow joined #perl6
08:27 mberends r35840 'make perl6' works on Debian amd-64, r35841 and later fail: perl6_ops_switch.c: In function 'Parrot_DynOp_perl6_switch_0_8_2':
08:27 mberends perl6_ops_switch.c:462: error: 'core_switch_op_lib' undeclared (first use in this function)
08:27 mberends perl6_ops_switch.c:462: error: (Each undeclared identifier is reported only once
08:27 mberends perl6_ops_switch.c:462: error: for each function it appears in.)
08:28 Traveler joined #perl6
08:32 moritz_ mberends: svn up please, chromatic++ fixed things like this a few hours ago (at least I think so)
08:33 mberends moritz_: did svn up 5 mins ago, now running make, thanks
08:37 mberends moritz_: r35856 after realclean fails: Could not find non-existent sub !keyword_role
08:38 mberends $work &    #sorry, gotta go...
09:08 mberends joined #perl6
09:17 iblechbot joined #perl6
09:26 [particle]1 joined #perl6
09:38 masak joined #perl6
09:38 lsyx joined #perl6
09:41 lsyx left #perl6
09:49 masak moritz_++ # rogue prelude
09:49 moritz_ masak: want commit access? :)
09:49 masak sure, why not? :)
09:49 masak you have my email address, I'm sure.
09:51 [particle] joined #perl6
09:55 jferrero joined #perl6
10:10 rakudo_svn r35858 | jonathan++ | [rakudo] Move a =cut that broke stuff.
10:33 kane_ joined #perl6
10:35 ejs joined #perl6
10:37 vixey joined #Perl6
10:44 ejs joined #perl6
10:46 braceta joined #perl6
11:03 mberends masak: ping
11:07 agentzh joined #perl6
11:10 pmurias joined #perl6
11:39 PZt joined #perl6
11:46 [particle]1 joined #perl6
12:20 mvitor joined #perl6
12:23 mberends masak: unping &    # (lunch)
12:23 masak oh, I was pinged. sorry, didn't backlog.
12:23 masak I'll be here for the rest of the afternoon.
12:34 hudnix joined #perl6
12:36 masak moritz_: my semi-complaint posted to p6l. putting it into words only served to further convince me that a great mistake is being made. :/
12:46 jnthn mwaha...handles with regex is the works.
12:48 masak jnthn: I'm sorry?
12:54 jnthn masak: So am I...
12:54 jnthn class ReFrontend { has $.backend is rw handles /^hi/ };
12:54 masak ooh!
12:54 masak convenient.
12:54 masak haven't had use for that yet, but good to know it's there.
12:56 ejs joined #perl6
12:56 jnthn will be once the spectests pass ;-)
12:57 jnthn the handles ClassName case also works.
12:57 masak woot.
13:08 km2 joined #perl6
13:13 ludan joined #perl6
13:20 rakudo_svn r35861 | jonathan++ | [rakudo] Make 'handles' trait verb handle pairs, classes, roles and smartmatching on anything else.
13:23 masak jnthn++
13:26 jnthn Now to track down why handles * doesn't work...
13:27 mberends masak: reping # come on out, I know you're in there!
13:27 * masak jumps out
13:27 masak ta-daa!
13:27 masak mberends: pong
13:28 mberends wifi @work is much better, but my attention span is fragmented
13:29 mvitor joined #perl6
13:29 mberends re: u4l, you have my full support and commitment to write
13:32 masak mberends: goodie. I will now lay out my very brief plan.
13:33 masak 1. make a simple 'psi' tool work for all the individual search cases. i.e. write satisfactory documentation for each type of construct, and have psi find it when asked.
13:34 masak 2. hack, hack, hack. write, write, write.
13:34 masak 3. profit!
13:34 kanru joined #perl6
13:34 masak mberends: I imagine your Pod parser figures in there somehow. I want to use the Pod format for documentation.
13:35 khatar joined #perl6
13:35 khatar hello
13:35 jnthn hi
13:35 masak greetings.
13:36 mberends btw, why 'psi' ? pounds per square inch = pressure ?
13:38 masak mberends: it's parallel to Ruby's 'ri', which I like.
13:38 khatar "Synopses" are the "perl6 reference", yes ?
13:38 masak khatar: aye.
13:38 khatar ok... i'm searching for the equivalent of perl5 file globbing in it
13:38 khatar does it desapear ?
13:39 masak mberends: also, 'psi' is often connected with ESP, mind-reading and stuff. a connotation I like.
13:39 ejs1 joined #perl6
13:39 masak mberends: that's what I'd like a documentation tool to do. read my mind. (In a good way)
13:39 mberends super! dwimmy pod6!
13:39 masak buubot: spack glob
13:39 buubot masak: S02-bits.pod:16 S03-operators.pod:1 S04-control.pod:4 S05-regex.pod:2 S06-routines.pod:8 S10-packages.pod:2 S11-modules.pod:2 S12-objects.pod:10 S16-io.pod:3 S26-documentation.pod:1 S29-functions.pod:4
13:40 masak khatar: I think file globbing is still in Perl 6, but I don't remember with which syntax.
13:40 masak khatar: might I direct you to the tests? they might give further enlightenment.
13:41 khatar oh
13:41 khatar good idea! i don't have the reflex to see tests as a doc
13:41 masak http://svn.pugscode.org/pugs/t/
13:41 masak khatar: some tests are obsolete, but even then they provide historical clues :)
13:42 masak khatar: the tests in t/spec are normative.
13:42 masak those outside aren't.
13:42 masak (but they might still be right, of course)
13:43 khatar thx for clues masak
13:43 masak mberends: yes, dwimmy. but I see it as a worthy and interesting challenge to use as much of 'standard' Pod as possible to acheive this aim.
13:43 masak khatar: good luck on your quest. be sure to come back and report later.
13:43 mberends if rakudo has a glob() it's recent, I had to write a workaround for myself a few weeks ago
13:43 masak mberends: Rakudo doesn't have it.
13:44 jnthn I don't remember seeing glob spec'd.
13:44 masak but that was not the question, the question was "does Perl 6 have globbing?"
13:44 jnthn Depends what you take something not currently being in the spec (if it indeed isn't) to mean. :-P
13:45 masak oh, that last part was directed at mberends.
13:45 khatar ok. I explain:
13:45 jnthn masak: Oh.
13:45 khatar i begin to think that perl6 could kill shell programming if it has:
13:46 khatar - a configurable and powerfull line edition system (ZLE is the reference)
13:46 mberends understood. it seemed as if khatar was hoping to actually use glob(), not just read about it
13:47 khatar - a cool system to pipe objects ( powershell is the reference)
13:47 khatar mberends, no: glob('**/*') is too long:
13:47 khatar in perl5, just <**/*> works!
13:47 Exodist joined #perl6
13:48 masak khatar: sounds like you want a module for this.
13:48 masak one that gives you a new quoting construct.
13:48 khatar for <**/*[ch]> { for $=<$_> { print if /^#include/ }}
13:48 pugs_svn r24982 | jnthn++ | [t/spec] Some new tests for handles, and unfudge most of the existing ones, plus use dies_ok where appropriate.
13:49 khatar this would be used by shell scripters for sure
13:50 rakudo_svn r35862 | jonathan++ | [rakudo] Fix whatever.
13:50 khatar and what was wondering before joinning is: as zsh as a very powerfull globbing system , is it possible to define what comes into <>
13:51 khatar to add zsh-like globbing to perl6
13:52 masak khatar: all is fair if you predeclare
13:53 moritz_ khatar: <> has enough semantics already... but you could think about the builtin function "glob"
13:54 khatar masak, predeclare what ?
13:55 masak khatar: that you want to change the semantics of <>
13:55 khatar moritz_, you have to admit that glob('foo') is not as attractive than <foo> for the shell scripter :)
13:55 moritz_ khatar: yes, but shell scripters... well... use the shell.
13:55 jnthn Yeah, the thing is that <foo> already means something in Perl 6.
13:56 khatar arhhhh ... yes! it's an array :-(
13:56 moritz_ khatar: but you can define something along the lines of Q:g<...> where the :g adverb stands for glob
13:57 khatar yeaaahhh! ok
13:57 khatar this is what i'm searching for
13:58 masak Perl 6 delivers.
13:58 masak but I doubt any of the implementations allow you to define that yet.
13:59 moritz_ STD.pm does, I guess
13:59 masak moritz_: unfortunately, STD.pm doesn't actually _run_ the program :)
14:05 spx2 joined #perl6
14:05 masak mberends: still there?
14:06 mberends intermittently, yes
14:06 masak mberends: ...which brings me to my second point. I'm still enormously impressed with the Pod parser work you've done, so...
14:06 masak ...I've decided to review it and blog about it. if that's ok with you.
14:06 masak it'll be like a book review.
14:07 [particle] joined #perl6
14:07 masak the point of which will be to (1) increase awareness of the Pod parser suite, and (2) increase awareness about literate programming and its habits of treating programs as literature.
14:08 masak I'm aware it sounds a little funny. it's an experiment. :)
14:08 mberends yes, that's very ok. there is still some bitrot, so I should stabili[sz]e it in time for your publication. we share the goal of clear writing, beautiful code etc.
14:09 masak good.
14:09 masak I can wait a few days, if that's what you need.
14:09 * mberends can never tell how much time will be needed :)
14:10 masak curse you, Hofstadter!
14:10 PerlJam publish early, publish often  :-)
14:10 masak PerlJam: are you saying I should just go ahead and do the review?
14:10 mberends M$ mo : if it compiles, ship it!
14:10 PerlJam I am.
14:11 masak PerlJam: you have a point.
14:11 PerlJam and mberends shouldn't mind a little bitrot as that happens when things are in flux.
14:11 masak PerlJam++
14:11 masak but let's make it Saturday, as I tend to foolishly schedule a lot of work during the work week.
14:12 * mberends accepts the pressure (psi) of maintaining Pod::Parser bitrot free
14:14 mberends masak: thanks, it will be good to have more eyes looking for bugs etc.
14:14 masak mberends: looking forward to providing the eyes.
14:15 PerlJam mberends: just don't be a slave to perfection.
14:16 masak code trumps talk, aye.
14:19 * jnthn realizes that the case where you have a class nested within a role is nasty.
14:22 masak jnthn: what does that even mean?
14:22 jnthn role Foo[::T] { class Bar is T { ... } method x { say Bar.new.is(T) } }
14:23 jnthn erm, .sa
14:23 jnthn .isa # argh
14:23 jnthn I guess (42 but Foo[Int]).x should always give true...
14:23 jnthn But it means having a separate class per role type-instantiation.
14:24 masak jnthn: Java has something similar for when you don't declare inner classes 'static'.
14:24 jnthn *nod*
14:25 braceta_ joined #perl6
14:25 mberends if I can unbreak Pod::Parser for rakudo r{latest}, there is an xhtml emitter in the pipeline, partial support for pod5<->pod6, additions test suite...
14:26 jnthn mberends: The paresr is written in Perl 6? :-)
14:26 mberends si
14:26 jnthn Nice!
14:27 masak incredibly nice. I'm eager to review it.
14:28 PerlJam mberends: did you independently create it, or hack the pod parsing from STD a little, or use Damian's perl5 prototype?
14:28 mberends it declares grammar Pod6 { .... }; hence the $x ~~ / <Pod6::whatever> / a day or two ago
14:29 moritz_ Pod6.parse($x)
14:29 mberends new from the ground up
14:29 masak mberends: does it conform to STD.pm?
14:29 masak there's a big fat warning in S26 about S26 being obsolete.
14:30 masak and people are directed to STD.pm.
14:30 viklund masak: I know how to make november run on the server (I think)
14:31 braceta_ joined #perl6
14:31 masak viklund: don't sneak up on me like that! o_O
14:31 viklund as soon as the mother of my child gets home I'll do it
14:31 masak viklund: sounds very good.
14:31 PZt joined #perl6
14:31 masak viklund++
14:31 masak we had a mergefest yesterday at the November HQ.
14:32 masak it was the most fun I've had in a long time.
14:36 mberends masak: which instance of STD.pm? When I last looked, it specified only the outer =begin pod and =end pod markers and little else. S26 is only spec for the innards afaik.
14:36 masak mberends: ok. I realize that I will have to delve into these issues myself anyway, when I do the review.
14:37 masak mberends: it seems strange to me that S26 would defer to STD.pm if the latter doesn't actually contain more recent information.
14:43 * jnthn is about done with handles
14:43 jnthn Still have the s/a/b/ case to do but waiting on having that implemented first.
14:44 jnthn And also the case where we write it on a method to delegate on the return value.
14:44 jnthn Want to ask pmichaud about that one...
14:50 mberends masak: try grep -i pod ~/pugs/src/perl6/STD.pm
14:51 masak mberends: you're making that assumption again. :P
14:51 mberends the directory one? you didn't format your hard drive?
14:52 masak actually, yes.
14:52 masak but I liked the old way of arranging things. it's far superior.
14:53 * mberends now has 7 parrot revision directories
14:53 masak oy, why?
14:55 masak mberends: I did the grep and I see what you mean now. this is something that we should collaborate with TimToady on. maybe he'll accept patches to STD.pm that parse Pod.
14:56 pugs_svn r24983 | jnthn++ | [t/spec] Tests for handles @foo ...
14:58 mberends why = regression. when something breaks, not knowing whether rakudo or my code is the problem. (usually it's me of course, but even parrot wobbles sometimes :P )
15:00 rakudo_svn r35864 | jonathan++ | [rakudo] Implement use of has @array handles ... and also give an error if has %x handles ... is used (the synopses reserve the syntax for now but don't specify it).
15:04 masak mberends: I am aware of that problem. just haven't solved it that way.
15:12 jnthn std: my Array of Int $x;
15:12 p6eval std 24983: OUTPUT«00:05 83m␤»
15:15 pmurias joined #perl6
15:21 viklund masak: come on over to november-wiki
15:21 estrabd joined #perl6
15:25 kisu joined #perl6
15:30 ruoso joined #perl6
15:30 ruoso Hello!
15:30 lambdabot ruoso: You have 2 new messages. '/msg lambdabot @messages' to read them.
15:40 kanru joined #perl6
15:48 braceta joined #perl6
15:49 jhorwitz joined #perl6
15:51 nihiliad joined #perl6
15:54 ruoso joined #perl6
15:55 ruoso hmpf... my uplink is cutting my connections again...
16:00 rakudo_svn r35866 | jonathan++ | [rakudo] Parse and implement 'of' keywrod, and switch s/typename/fulltypename/ in a place where STD.pm has it.
16:02 justatheory joined #perl6
16:16 pugs_svn r24984 | jnthn++ | [t/spec] Add some tests for using parametric roles, including the of syntax form, as type constraints.
16:20 rakudo_svn r35867 | jonathan++ | [rakudo] Add S12-role/parameterized-type.t to spectest.data.
16:26 stephenlb joined #perl6
16:28 [particle]1 joined #perl6
16:29 pmurias joined #perl6
16:30 pmurias ruoso: hi
16:30 ruoso hi pmurias
16:31 pmurias do you think changing PurePrototypeHOW to lookup methods in ^!instanceof if they are not found in ^!methods is a good idea?
16:31 pmurias (done it just wandering if i should commit it ;)
16:34 pmurias ruoso: i also changed the br instruction in mold to treat everything other than native false as true
16:37 ruoso pmurias, I think diakopter's problem building smop probably tells us that it's time to split up smop sources into different packges
16:39 ruoso pmurias, that would turn it into a DelegatedPrototypeHOW
16:40 pmurias the PurePrototypeHOW is more like SingletonHOW now
16:40 rakudo_svn r35868 | jonathan++ | [rakudo] Roles need to know how to .WHICH (if nothing else so we can recursively parameterize them).
16:41 pmurias ruoso: how much work would the split be?
16:41 ruoso pmurias, I'm not sure yet.. but it's likely to be a lot
16:41 ruoso specially splitting the build system
16:42 ruoso pmurias, knowhows can be clonned
16:42 ruoso pmurias, it is PurePrototype because it doesn't delegate
16:43 ruoso that's what I meant...
16:43 pmurias what's the advantage of not delegating?
16:43 ruoso being protected against changes in the delegated object
16:47 kanru joined #perl6
16:48 alanhaggai joined #perl6
16:48 pmurias ruoso: re the split i'm unsure if it's worth doing it now instead of implementing basic features
16:48 pugs_svn r24985 | jnthn++ | [t/spec] Some harder tests for parameterized types, when we parameterize the role with itself. All passing.
16:52 ruoso but I think we could have PurePrototypeHOW simply named PrototypeHOW
16:52 ruoso and make it the way you did
16:52 ruoso but the problem with that is that the handling of attributes become much more complex
16:52 ruoso pmurias, take a look how pureprototypehow handles add_attribute now
16:52 ruoso when you define an attribute in a pureprototype it already initializes the instance storage
16:52 ruoso which is not a problem considering you're going to clone the object when you want a different instance
16:52 ruoso pmurias, and that's actually the reason that makes it interesting for bootstrapping purposes
16:53 ruoso pmurias, that's the reason I'm also unsure
16:55 pmurias well if instance_storage autovivied the problem would be largly gone right?
16:55 ruoso not at all
16:55 PZt joined #perl6
16:56 ruoso because in the intialization of the instance storage you have the bind a container as the attribute was declared
16:58 pmurias so we need some sort of a BUILDALL method right?
16:59 ruoso which is basically what ClassHOW do
17:03 pugs_svn r24986 | pmurias++ | [smop] PurePrototypeHow does delegated to .^!instanceof
17:05 hercynium joined #perl6
17:10 rakudo_svn r35869 | coke++ | Add a basic version of .pick() for Range and hopefully not break anything.
17:13 pugs_svn r24987 | pmurias++ | [smop] rename PurePrototypeHOW to PrototypeHOW
17:19 duke_leto joined #perl6
17:23 duke_leto left #perl6
17:23 spx2 joined #perl6
17:29 ruoso pmurias, remember you need to change mildew to use that for "knowhow"s
17:29 ruoso pmurias, but the way it is now, it is going to fail on the use of attributes
17:30 ruoso I think implementing .^!clone in p6opaque is probably going to work better
17:42 duke_leto joined #perl6
17:43 duke_leto left #perl6
17:44 ejs1 joined #perl6
17:53 pbuetow joined #perl6
17:56 mberends joined #perl6
17:59 ejs2 joined #perl6
18:01 vixey joined #Perl6
18:02 pugs_svn r24988 | jnthn++ | [t/spec] If we're testing that a type-check allows good things, we also need to check it won't accept wrong things.
18:10 rakudo_svn r35870 | jonathan++ | [rakudo] If we take a type as a parameter, we should just bind the parameter directly do that name, not treat it as if it's a type capture. Otherwise, we get wrong answers in various cases, such as when parametric roles are parameterized with other roles.
18:12 TimToady jnthn: why isn't type capture treated that way too?
18:12 jnthn TimToady: There's a difference between (I think):
18:12 jnthn sub foo(::T $x) { ... }
18:12 jnthn and
18:13 jnthn sub foo(::T) { ... }
18:13 jnthn One takes a parameter $x and captures it's type into T
18:13 ruoso_ joined #perl6
18:13 jnthn The second would I believe just expect something to be passed that does Abstraction
18:13 jnthn Which would be bound to T.
18:13 jnthn Right? Wrong?
18:13 TimToady how is "capture its type into T" different from binding?
18:14 jnthn In the first case the parameter that is passed goes into $x itself. And then we put the type of that parameter into T
18:14 jnthn In the second case, the parameter that gets passed ends up in T.
18:14 TimToady in either case, you make sure ::T has the proto-object of whatever the parameter was
18:14 TimToady whether or not the argument was a protoobjet
18:15 jnthn Ah.
18:15 TimToady protoobjét, pardon...
18:15 jnthn That's exactly the behavior I just got rid of.
18:15 ruoso_ TimToady, have you had some time to take a look at yesterday's backlog?
18:15 jnthn Oh, hmm. The alternative is that a Role always returns itself when asked .WHAT.
18:15 ruoso_ or I should say backlong
18:16 ruoso_ jnthn, I always thought a Role returns itself in the .WHAT
18:16 jnthn Heh, OK.
18:16 ruoso_ as well as any protoobject
18:16 jnthn In that case I'll do it that way.
18:16 jnthn erm?
18:16 jnthn "as well as any protoobject"?
18:16 ruoso_ Object.WHAT returns Object
18:16 [particle]1 any other
18:17 jnthn Yes.
18:17 jnthn And for a role it returns the role itself?
18:18 * jnthn does it that way
18:18 * ruoso_ consider Foo to be a protoobject for role Foo { }
18:18 ruoso_ I don't see a difference between a protoobject of a class or of a role
18:18 TimToady makes me wonder if roles and protoobjects can be unified somehow...
18:19 jnthn TimToady: Plesae stop wondering. :-S
18:19 ruoso_ I always thougth there isn't really a role type
18:19 TimToady I will let ruoso_ wonder on my behalf then... :P
18:19 ruoso_ as well as there isn't really a class type
18:20 ruoso_ in fact... the difference between a Role and a Class is the thing that responds for its HOW, in my understanding
18:20 ruoso_ in the meanwhile, TimToady, I hate to be annoying (ok, I don't hate it), but we would need some resolution in the capture issue soon...
18:21 jnthn There isn't really a class type apart from the one mentioned in S12. ;-)
18:21 ruoso_ S12 mention it to say it isn't ;)
18:21 jnthn (In the traits section)
18:21 jnthn Yeah, I know that quote too.
18:21 jnthn class MyBase {
18:21 jnthn multi trait_auxiliary:is(MyBase $base, Class $class; $arg?) {...}
18:21 jnthn What is Class here?
18:22 ruoso_ an inconsistency in S12?
18:22 ruoso_ ;)
18:22 ruoso_ maybe there is a Class Role
18:22 ruoso_ and a Role Role
18:22 ruoso_ so you can differentiate them in the signature matching
18:23 jnthn Perhaps. ;-)
18:23 ruoso_ but maybe
18:23 ruoso_ subset Class of Object where { .HOW === ClassHOW }
18:24 ruoso_ subset Role of Object where {.HOW === RoleHOW }
18:24 jnthn .HOW gives the particular instance of he metaclass for $_ though?
18:24 jnthn So === wouldn't work?
18:25 riffraff joined #perl6
18:25 jnthn .HOW.isa(ClassHOW) ?
18:25 tux300181 joined #perl6
18:25 ruoso_ when class-based, yes...
18:25 jnthn But subset type could well be the way to go.
18:25 ruoso_ SMOP is prototype based, so you have just ClassHOW
18:26 ruoso_ and the methods are registered in the protoobject
18:27 jnthn Ah, OK.
18:27 jnthn Thus why you just have ClassHOW.
18:27 jnthn Fair enough.
18:27 jnthn *one ClassHOW
18:27 ruoso_ yes... it looked simpler to implement arbitrary mixins
18:27 ruoso_ any object can become its own prototype
18:27 ruoso_ you just have to add a method to it, or compose a role to it
18:28 pugs_svn r24989 | moritz++ | [irclog] try to log /quit's via evil monkey-patching, rg++
18:28 ruoso_ $foo.^add_method('bar', sub { say "Hello" }); $foo.bar
18:28 rhr joined #perl6
18:29 ruoso_ the same way as...
18:29 ruoso_ $foo.^compose_role(Bar)
18:29 ruoso_ and I guess
18:30 ruoso_ $foo.^compose_role(Bar, \($role, $parameters))
18:30 ruoso_ in fact, that backslash is wrong there...
18:30 ruoso_ it is already a single positional argument, right?
18:31 jnthn It's only allowed to take one positional there.
18:31 jnthn Though the parser IIRC doesn't promise you that, you need to check it.
18:31 ruoso_ there where?
18:31 khatar does rakudo lives in a different svn than parrot ?
18:31 jnthn $x does Foo($one_thingy_here)
18:31 moritz_ khatar: no, it's in languages/perl6/ in the parrot repo
18:31 khatar well
18:32 ruoso_ jnthn, why only one positional?
18:32 khatar i update like this : rsync -av --delete svn.perl.org::parrot-HEAD parrot
18:32 jnthn ruoso_: Because the spec says so.
18:32 khatar less parrot/languages/perl6/t/spectest.data gives me a long list of files
18:32 ruoso_ hmm... interersting...
18:32 khatar i can't find in my fs
18:32 jnthn ruoso_: Also you are only allowed to have one attribute in any role you mix in this way.
18:32 jnthn And the value is used to initialize that one attribute.
18:32 jnthn It's for property initilization really.
18:32 ruoso_ any special reason to that?
18:32 moritz_ khatar: do you have a svn client installed?
18:33 jnthn ruoso_: It's just The Design.
18:33 jnthn I'd imagine S12 doesn't have it that way for no reason. ;-)
18:34 ruoso_ jnthn, but the spec does use named attributes in role attributes
18:34 khatar moritz_, i don't use svn but i can install
18:34 ruoso_ named arguments, that is
18:34 khatar (i'm confortable with git in fact)
18:34 jnthn ruoso_: Where?
18:34 moritz_ khatar: 'make spectest' tries to pull in the test files from the pugs svn repository
18:34 moritz_ khatar: so without an svn client that's bound to fail
18:35 jnthn A role applied with C<does> may be parameterized with an initializer
18:35 jnthn in parentheses, but only if the role supplies exactly one attribute
18:35 jnthn to the mixin class:
18:35 jnthn $fido does Wag($tail); $line does taint($istainted);
18:35 khatar ok
18:35 khatar i install
18:36 ruoso_ jnthn, it uses Array[:of(Int)] later in the same section
18:36 khatar but the next rsync will erase those files, right ? it's much better to use svn averywhere ?
18:36 pugs_svn r24990 | moritz++ | [irclog] better nick change messages, rg++ again
18:36 moritz_ khatar: that's what I do (use svn for parrot and the tests)
18:36 jnthn ruoso_: That's a parameter to the role.
18:36 jnthn Also, that should now I think just be Array[Int]
18:37 ruoso_ ok, I think I'm confussing the thing between [ ] and ( )
18:37 jnthn (Because we don't multi-dispatch on named parameters, so it's a bit awkward having of resulting in a named parameter...)
18:37 jnthn Yes.
18:37 khatar so i'll do either
18:37 jnthn (...) is the bit I'm talking about.
18:37 jnthn The [...] is part of the longname of the role.
18:37 jnthn Well, supplies values for it...or something like that. :-)
18:38 * jnthn really needs to work on S14.
18:39 jnthn While the roles stuff is fresh in my head.
18:39 ruoso_ jnthn, alright... so to use Array($foo) it needs only a single positional argument
18:39 jnthn ruoso_: Right.
18:39 ruoso_ but does the same apply to Array[$foo]?
18:40 jnthn No
18:40 ruoso_ ah....
18:40 ruoso_ right..
18:40 rakudo_svn r35872 | jonathan++ | [rakudo] Revert last patch - foo(::T) should act like a type capture after all, according to TimToady++. And then a Role hands back itself in response to .WHAT.
18:40 jnthn That'd be a curious thing to supply there though.
18:40 jnthn Array[Int] would be a better example.
18:40 ruoso_ jnthn, not if $foo is a protottype
18:40 ruoso_ ;)
18:40 jnthn ruoso_: True
18:41 jnthn It *would* work.
18:41 ruoso_ but I guess you can send named arguments to Array( ) as if they were arguments to .new
18:42 ruoso_ 1 but Dog(:name('Fido'), :color('black')
18:42 ruoso_ )
18:42 jnthn I think S12 says otherwise.
18:42 jnthn (OK, we could choose to make it say that...)
18:43 ruoso_ it actually agrees with you
18:43 ruoso_ "Note that the parenthesized form is not a subroutine or method call. It's just special initializing syntax for roles that contain a single property"
18:43 jnthn Right.
18:43 Psyche^ joined #perl6
18:44 ruoso_ but it would be cool to support the named parameters ;)
18:44 jnthn We handle it specially in Rakudo and we even give a compile time error about it.
18:44 ruoso_ not that "1 but Dog" is a sane example... but ....
18:45 jnthn (If you supply more than one positional there).
18:45 moritz_ if you think sufficiently abstract...
18:45 jnthn Yeah, I wouldn't object if the named ones became spec.
18:46 ejs1 joined #perl6
18:46 * ruoso_ still trying to think what "1 but Dog" could mean ;)
18:47 ilbot2 joined #perl6
18:47 Topic for #perl6is now http://pugscode.org/ http://planetsix.perl.org/ | nopaste: http://sial.org/pbot/perl6 | evalbot: perl6: say 3; (or rakudo:, pugs:, elf:, etc) | irclog: http://irc.pugscode.org/ | ~340 days 'til Xmas
18:47 moritz_ ruoso_: one object, but it's a dog ;-)
18:47 DemoFreak joined #perl6
18:48 khatar moritz_, it works ! thanks
18:48 ruoso_ jnthn, actually the quote I took was talking about "but", not about the arguments to the role
18:48 [particle]1 joined #perl6
18:49 TimToady the special syntax predates the WHENCE syntax, so maybe those could be combined
18:49 TimToady 1 but Dog{:name<Fido>, :color<black>}
18:50 PerlJam ruoso_: 1 but Dog  is my #1 pooch.
18:50 |jedai| joined #perl6
18:50 TimToady your life is a bitch?
18:51 ruoso_ TimToady, the later syntax really does make sense, since BUILD needs to be called for the protoobject with the given object as invocant
18:52 jnthn Aye.
18:52 TimToady the special syntax is still useful for 1 positional arg though
18:52 jnthn TimToady: We could say you *either* have one positional *or* many named.
18:52 ruoso_ yes, since BUILD doesn't expect a positional argument
18:53 TimToady or maybe we special case a positional for roles with one attr
18:53 ruoso_ the special syntax is supposed to turn that into a named argument
18:53 TimToady sounds like a plan
18:53 ruoso_ 1 but answer(42) is really: 1 but answer{ :answer(42) }
18:53 jnthn Well, or whatever the one attr that answer has is called.
18:54 ruoso_ yes yes...
18:54 ruoso_ that is a misleading example
18:54 jnthn (Right now there's no requirement that the attr and the role name match)
18:54 TimToady 1 but answer{ :*(42) }  :)
18:54 jnthn worreva
18:54 ruoso_ can you really send "whatever" as the key to a named argument?
18:55 TimToady no, hence the smiley
18:55 ruoso_ *phew*
18:57 TimToady meanwhile, I've broken STD entirely by trying to add unary associativity for mtnviewmark++
18:57 TimToady my EXPR was assuming that lack of associativity means unary, sigh
18:59 ruoso_ TimToady, in a unrelated matter... as writing code for the SMOP prelude, I realised that "for"'s ability to leak out as the implicit return is probably going to be a FAQ...
19:00 ruoso_ people is really used to for as a control statement
19:00 ruoso_ not as a sub call
19:00 ruoso_ in the sense that control statements are transparent to implicit return
19:00 ruoso_ as in if/eles
19:00 ruoso_ *if/else
19:02 |jedai| joined #perl6
19:03 ruoso_ Q: why the for block doesn't execute sometimes? A: because you might be using the function that contains it in a lazy context...
19:03 jnthn I didn't realize it could do that.
19:04 jnthn I know it's meant to collect the results of the iteration and can return that.
19:04 jnthn Or will implicitly return that.
19:04 ruoso_ that *and* it is lazy
19:04 jnthn Oh?
19:04 jnthn Where's that spec'd?
19:04 ruoso_ as map
19:04 jnthn for is not map
19:04 ruoso_ it kinda is
19:04 jnthn (or shouldn't be anyway...)
19:04 jnthn *kinda* but not exactly.
19:05 jnthn I'd really really not want for to be so map-ish as it can do that.
19:05 TimToady no, they're essentially identical
19:05 jnthn It's just too surprising.
19:05 jnthn TimToady: OK, then I'd argue that's a mistake. :-)
19:05 TimToady that's how it's specced
19:05 jnthn Map - sure, being lazy there ain't surprising.
19:05 jnthn But having for suddently turn into something that doesn't execute..
19:06 ruoso_ yeah... "for" is a imperative keyword
19:06 ruoso_ "map" is a functional keyword
19:06 jnthn sub foo { for 1..100 { .say }
19:06 jnthn }
19:06 jnthn foo();
19:06 jnthn Doesn't use the return value, but I'd really like that to print 100 lines of output!
19:06 ruoso_ jnthn, in that case, it will, because in void context, it should be exausted
19:06 ruoso_ the same for map
19:07 jnthn Ah.
19:07 jnthn OK, maybe that's not quite so bad then..
19:07 TimToady basically, the situation doesn't arise unless you've screwed up what the function is supposed to be returning anyway
19:07 PerlJam and aas long as we still encourage people to use "return" ...
19:07 jnthn Hmm.
19:07 ruoso_ TimToady, my point is that this is somewhat fragile
19:08 PerlJam s/aa/a/
19:08 jnthn Yeah, it's maybe not as serious as I first thought.
19:08 jnthn I'd rather for were just simple though.
19:08 TimToady if you're using for for its side effects, and you always want to return something, it'll be a separate statement anyway
19:08 TimToady it is simple
19:08 TimToady it's just a map
19:08 ruoso_ the problem is that the definition of the context might be far away from the end of the function
19:08 jnthn Programmer expections simple, not implementation simple. :-)
19:09 duke_leto joined #perl6
19:09 duke_leto left #perl6
19:09 ruoso_ sub foo (*@args) { say @args[0] }; sub bar { for 1..100 { .say } }; bar(foo);
19:09 TimToady lists are lazy in Perl 6, so people who want side effects have to keep track of that.
19:10 ruoso_ *I*'m fine with that...
19:10 ruoso_ but it will probably become a FAQ
19:10 TimToady at least it's a different FAQ than for Perl 5 :)
19:10 ruoso_ heh
19:11 TimToady and they're learning FP rather than idiosyncratic syntax
19:11 ruoso_ Perl 6: lisp with a syntax ;)
19:12 khatar any other good news from pugs ? like perl6 modules ?
19:12 TimToady syntax with a lisp
19:13 khatar moritz_, i'm ashamed: make spectest was on the readme
19:13 khatar i didn't noticed it the first time i read
19:14 ruoso_ that remembers me mildew still doesn't notice Void context
19:19 ejs1 joined #perl6
19:21 ruoso_ TimToady, in yet another unrelated matter, re-opening an issue open yesterday... if every built-in type is a Role, is Object a Role?
19:22 khatar good night perl6 people
19:24 mberends g'night khatar, hope you will enjoy coming back often
19:35 pmurias joined #perl6
19:36 |jedai| joined #perl6
19:45 |jedai| joined #perl6
19:47 jferrero joined #perl6
19:48 lisppaste3 joined #perl6
19:52 ruoso_ jhorwitz, hi... did you talk with ambs?
19:53 jhorwitz ruoso_: no, been sick and extremely busy.  but thanks for reminding me.
19:55 TimToady ruoso_: why not?  Object just puns to a class that has no attributes
19:55 pugs_svn r24991 | moritz++ | [S29] changed outdated notice about document location, noticed by Coke++
19:55 ruoso_ TimToady, cool... as I stated yesterday, it also solves the "making undef defined" problem
19:55 ruoso_ and allows different implementations of Object
19:56 moritz_ if Object is a role, am I still allowed to write 'class Object is also { ... }'?
19:56 jnthn Hmm.
19:56 TimToady yes, but it applies only to the punned class
19:56 jnthn Not do anything that otherwise does Object.
19:56 TimToady roles are immutable
19:56 ruoso_ is the punned class a singleton?
19:57 ruoso_ I mean
19:57 jnthn Each role gets one punned class (per parameterization)
19:57 jnthn Is I think the best way to have it.
19:57 TimToady why not?
19:57 ruoso_ do every already instantiated objcet of that class see the new version? or only the new instances?
19:58 jnthn for is also I think all the existing instances would.
19:58 jnthn At least, that's how it works in Rakudo ATM.
19:58 braceta left #perl6
19:59 ruoso_ this basically goes to...
19:59 ruoso_ should a role store a punned class that might be changed?
19:59 jnthn The role holding onto the pun is the obvious implementation, I think.
20:00 TimToady I suspect people would expect it to work that way
20:00 ruoso_ the other option would be that to be an optimization only
20:00 ruoso_ and the pun to happen everytime the Role is used as a class
20:00 jnthn That'd create a whole _bunch_ of punned classes.
20:00 ruoso_ (which could be optimized away, for the common case)
20:00 jnthn That'd be very sub-optimal.
20:01 ruoso_ but would protect older instances from action-at-a-distance
20:01 jnthn I think just going with the role storing its punned class (where we understand the role meaning the role with a given set of arguments to its parameters) is the easiest and clearest way to go.
20:02 jnthn If people are doing is also, they probably want existing instances affected. Otherwise they could make a subclass and create new instances out of that.
20:02 ruoso_ but maybe it's just my twisted mind to think that's relevant ;)
20:02 ruoso_ jnthn, that's a point
20:03 jnthn Action at a distance is bad generally. But I don't expect is also to be something used regularly.
20:03 ruoso_ we can assume that "is also" *is* action-at-a-distance
20:03 * moritz_ agrees with jnthn
20:03 jnthn *nod*
20:03 ruoso_ and therefore discourage it
20:04 jnthn I hadn't ever thought of it as a construct I would encourage. ;-)
20:04 ruoso_ explaining that they can make a lexical bind to a subclass replacing the original class visibility
20:04 moritz_ I mostly think of it as a construct to build a prelude ;)
20:05 jnthn ruoso, Yes, that's exactly the right way to handle this kind of situation.
20:05 ruoso_ one could even think of a keyword to huffmanize it
20:05 jnthn Take advantage of scope.
20:05 jnthn my class Foo is locally { ... }
20:06 jnthn (declares lexical class Foo and then makes it derive from the outer Foo)
20:06 jnthn Or something.
20:06 jnthn I'm not good at naming stuff.
20:06 ruoso_ that looks like a solution
20:06 jnthn Aye. I'll delegate the choice of name to someone else.
20:07 jnthn gotta head to the airport, bbl
20:07 ruoso_ anyway... the "my" there is options
20:07 ruoso_ optional
20:08 ruoso_ because it will only declare that name *in the current package*
20:08 ruoso_ not in the GLOBAL:: package
20:09 ruoso_ one could even think that "is also" should behave like that by default and let monkey-patch to something more de-huffmanized
20:09 ruoso_ TimToady, what do you think?
20:10 TimToady is ALSO maybe
20:10 TimToady but grep can find "is also" pretty easily
20:11 jferrero joined #perl6
20:14 ruoso_ TimToady, is ALSO being the mokey-patch?
20:15 TimToady presumably
20:15 TimToady I like shouting on things the boss should frown at :)
20:15 TimToady learned it from Ada, kinda
20:16 TimToady with UNCHECKED_TYPE_CONVERSION
20:16 ruoso_ class Foo is MONKEY_PATCHED { ... }
20:16 ruoso_ :)
20:17 TimToady I'm looking for a monkey-faced smiley...
20:17 ruoso_ monkey Foo {... }
20:18 |jedai| joined #perl6
20:18 ejs1 joined #perl6
20:19 TimToady (:-)
20:19 TimToady (8-)
20:20 TimToady maybe "is also" and "is instead" are only available if there's a "use MONKEY_PATCHING" at the top
20:21 ruoso_ they can be available
20:21 ruoso_ the question is the visibility of the change
20:21 pmurias joined #perl6
20:21 TimToady well, can depend on the scope of the declaration, I think
20:22 pmurias ruoso_: what will the directory structure after the split refactor be?
20:22 ruoso_ pmurias, I was thinking in smop-???? inside smop
20:23 ruoso_ TimToady, the idea I'm throwing is that "is also" replaces the "name" not changes the class itself
20:23 TimToady which you can do with my but not our
20:23 ruoso_ where "is also" creates a subclass, and "is instead" creates an unrelated class"
20:23 ruoso_ our only means that it is registered in the *current* package
20:24 ruoso_ not in the original package where the class was defined
20:24 TimToady but why would you do that instead of derivation?
20:24 ruoso_ to steal the name
20:24 ruoso_ making localized custom versions of classes the code in the inner scope will expect
20:24 TimToady my class Foo is OUTER::Foo {...}
20:25 spx2_ joined #perl6
20:25 ruoso_ I was arguing that in the current scheme, monkey-patch is more huffmanized than scoped customizations
20:25 pugs_svn r24992 | moritz++ | [irclog] monkey-patch with less noise, rg++
20:25 TimToady not if we require a use
20:26 ruoso_ right...
20:26 ruoso_ ok...
20:26 * ruoso_ commute &
20:28 moritz_ I need a small example for a case where 'is copy' is useful on a positional argument - any ideas?
20:31 pmurias fixing the argument
20:38 jan_ joined #perl6
20:44 __felix__ joined #perl6
20:49 pugs_svn r24993 | lwall++ | [S03] more alignment with STD
20:49 pugs_svn r24993 | lwall++ | [S12] monkey patching now requires a special "use MONKEY_PATCHING" at the top
20:53 moritz_ TimToady: S02 mentions .pos, maybe you want to remove that?
21:08 [particle] joined #perl6
21:11 |jedai| joined #perl6
21:11 bahaa2008 joined #perl6
21:12 bahaa2008 moritz_, hi
21:12 moritz_ hi
21:12 bahaa2008 moritz_, i have promlem with search.ph in your ircbot
21:12 bahaa2008 pl **
21:12 moritz_ you're not the only one
21:13 bahaa2008 is it work with mysql ?
21:13 bahaa2008 this is the line with problem
21:13 bahaa2008 my $q0 = $dbh->prepare("SELECT COUNT(DISTINCT day) FROM irclog $sql_cond");
21:13 moritz_ I wanted to redo it with KinoSearch, but that still doesn't contain the features I need (although I've been told they are being worked on)
21:13 bahaa2008 i cann't apply this query on mysql
21:14 moritz_ what's the error message?
21:14 bahaa2008 how You have to choose at least one column to display
21:15 moritz_ uhm, do you try that with the mysql command line client?
21:15 bahaa2008 no
21:15 bahaa2008 with phpmyadmin
21:16 moritz_ $sql_cond is a variable, so you have to replace it with something useful
21:16 bahaa2008 the problem only occurs when search by text
21:16 bahaa2008 i know
21:16 bahaa2008 i replaced it
21:16 bahaa2008 the problem only occurs when search by text
21:17 moritz_ so what does the replaced query look like?
21:17 bahaa2008 but with nickname it works fine
21:19 bahaa2008 my query --> SELECT COUNT(DISTINCT day) FROM irclog WHERE AND MATCH(line) AGAINST(modem)
21:19 bahaa2008 modem is the word i search for for example
21:19 moritz_ ah, the AND shouldn't be there
21:20 bahaa2008 same problem
21:21 bahaa2008 what database are you used to test the code ?
21:21 moritz_ somehow I get a very different error message
21:22 moritz_ because modem needs to be quoted
21:22 bahaa2008 how
21:22 moritz_ with double quotes
21:22 moritz_ I use mysql-5.0.32-7etch8
21:22 bahaa2008 same error
21:22 moritz_ then you have problem with phpmyadmin, not with mysql
21:23 moritz_ afk
21:23 bahaa2008 mine is  4.1.22
21:23 bahaa2008 ok let me try command line
21:24 explorer__ joined #perl6
21:24 |jedai| joined #perl6
21:26 bahaa2008 error Can't find FULLTEXT index matching the column list
21:28 moritz_ CREATE TEXT KEY `message_index` (`line`)
21:28 moritz_ or something like that should help
21:29 moritz_ but we're getting more and more off-topic => /msg please
21:34 mberends moritz_: on broken $*ERR topic, any idea what (and who) is involved in fixing http://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=62540 ?
21:35 moritz_ mberends: no idea. You might bug pmichaud or jnthn
21:35 mberends ok, thanx
21:37 c9s_ joined #perl6
21:46 bahaa2008 moritz_, thanks
21:58 Whiteknight joined #perl6
22:01 _jedai_ joined #perl6
22:10 DemoFreak joined #perl6
22:13 cognominal joined #perl6
22:26 ruoso joined #perl6
22:26 |jedai| joined #perl6
22:33 icwiener joined #perl6
22:33 DemoFreak joined #perl6
22:47 |jedai| joined #perl6
22:52 maerzhase joined #perl6
22:58 |jedai| joined #perl6
23:04 bahaa2008 joined #perl6
23:29 [particle]1 joined #perl6
23:31 _jedai_ joined #perl6
23:35 pugs_svn r24994 | lwall++ | [S02,S03] delete some .pos fossils
23:36 TimToady moritz++ too
23:45 km2 joined #perl6
23:48 Limbic_Region joined #perl6
23:56 ruoso TimToady, one thing has been bugging me... I already understood that infix are subs, and it looks like postcircumfix are methods... are postfix and prefix methods also?
23:56 ruoso or am I misunderstanding everything?
23:57 ruoso because =$foo sure looks like a method
23:57 ruoso as well as $foo\i
23:57 ruoso but $i++ can't be a method
23:58 ruoso nor can ++$i
23:59 ruoso or is
23:59 Psyche^ joined #perl6
23:59 ruoso or are they all subs that somehow end up calling a method? (which would make it considerably more complicated

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

Perl 6 | Reference Documentation | Rakudo