Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-01-17

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:19 xenoterracide left #perl6
00:22 cognominal how can I do opendir/readdir in rakudo?
00:29 colomon cognominal: as far as I know the only current way is just to run ls and capture the results.
00:30 colomon but I may be out of the loop on this.
00:30 cognominal ok, fine by me.
00:40 ash_ t/spec/S16-filehandles/dir.t has some uses of that i think, i'd referrer to those
00:40 ash_ although they are not being run by rakudo as part of their tests, so they may or maynot work
00:43 pugs_svn r29546 | diakopter++ | [sprixel] implement :: in patterns.  _properly_.
01:00 Guest48051 joined #perl6
01:03 diakopter .oO( the ! modifier to : is compile-time for sprixel )
01:06 pugs_svn r29547 | diakopter++ | [sprixel] implement : in patterns (modifier to repetition quantifiers or other alternations)
01:08 justatheory joined #perl6
01:19 Khisanth joined #perl6
01:35 pugs_svn r29548 | diakopter++ | [sprixel] implement <commit>.
01:35 pugs_svn r29548 | implement character_class.toString().
01:35 pugs_svn r29548 | refactor sequence and alternation combinators to build breadth-first
01:35 pugs_svn r29548 |   instead of depth-first instructions.
01:36 wolverian joined #perl6
01:43 rachelBROWN joined #perl6
01:44 stepnem joined #perl6
01:55 pugs_svn r29549 | diakopter++ | [sprixel] implement <.prior>
01:59 pugs_svn r29550 | diakopter++ | [sprixel] implement <!> (never match anything)
02:24 orafu joined #perl6
02:30 Guest39611 joined #perl6
02:31 vamped left #perl6
02:36 Guest1235123 joined #perl6
02:38 Guest1235123_ joined #perl6
02:48 elmex joined #perl6
02:48 elmex joined #perl6
02:48 elmex joined #perl6
02:49 elmex joined #perl6
02:49 elmex joined #perl6
02:50 elmex joined #perl6
02:56 stepnem joined #perl6
02:57 Guest39611 left #perl6
02:58 Khisanth joined #perl6
02:58 sjohnson hi
03:11 gfx joined #perl6
03:16 justatheory joined #perl6
03:16 Baggiokwok joined #perl6
03:18 Khisanth joined #perl6
03:22 cognominal joined #perl6
03:29 Daenyth joined #perl6
03:29 Daenyth Hiya all
03:31 Daenyth I was wondering, for the 2009-12 release of rakudo, is parrot 1.8.0 enough? I'm (finally) updating the arch package for it, and it says that parrot is at r0
03:33 Daenyth I'm not sure how to point the configure script to the right place
03:37 Daenyth or rather, I can see the flag, but I'm not sure where to point it :)
03:38 rachelBROWN joined #perl6
03:44 diakopter Daenyth: see http://www.rakudo.org/node/61
03:45 diakopter TimToady: does <alpha> mean the same as Unicode Letter?
03:46 diakopter (or Perl :alpha:)
03:55 ispeak joined #perl6
03:55 Daenyth ok
03:59 nihiliad joined #perl6
04:05 araujo joined #perl6
04:09 TimToady diakopter: includes _
04:09 Daenyth left #perl6
04:13 diakopter TimToady: so <alpha> means Unicode Letter or _
04:13 diakopter I mean,
04:13 diakopter sigh.
04:14 diakopter Unicode Letter plus _
04:14 TimToady either is a valid way to say it
04:14 diakopter oky doky
04:17 * diakopter steals Unicode Properties & Blocks from http://xregexp.com/plugins/xregexp-unicode.js
04:19 TimToady though it's possible we might decide that one one the other way, and leave alpha with the pure unicode definition
04:19 diakopter TimToady: I implemented nearly all of the backtracking control terms & operators
04:19 TimToady since there's idfirst for the other, probably
04:23 ispeak joined #perl6
04:25 Baggiokwok joined #perl6
04:26 diakopter ok,
04:27 TimToady currently STD assumes it includes _
04:29 diakopter /\\G[_[:alpha:]]/
04:32 diakopter TimToady: should I use the Unicode 5.2 database?
04:33 TimToady why not use the latest?
04:34 diakopter heh
04:34 vamped joined #perl6
04:35 vamped what about this: is <.> the same as <graph> ?
04:36 vamped to me "graphical character" means the same as grapheme
04:41 TimToady the Unicode consortium tends to use longer names for things than we do :)
04:42 TimToady but I'm not sure that <graph> is well defined
04:42 TimToady might be a hangover from POSIX
04:42 TimToady which usually gives me a hangover
04:43 TimToady so it's not the same as what we call a grapheme
04:44 TimToady since "non-printables" are also considered graphemes
04:45 vamped I wasn't aware of that, but it makes sense
04:45 TimToady basically, a grapheme to Perl is just a base codepoint followed by 0 or more combining codepoints
04:45 vamped so maybe <graph> could be viewed as a visible <.> ?
04:46 TimToady I'd go with whatever unicode concept is closest to the POSIX concept, if unicode has such
04:49 vamped thanks. that helps.
04:51 diakopter hmm. how far down the Unicode vortex do I want to descend
04:54 vamped lol @ "The Unicode codespace is divided into seventeen planes, each comprising 65,536 code points or 256 rows of 256 code points:"
04:56 vamped "Graphic characters are characters defined by Unicode to have a particular semantic, and either have a visible glyph shape or represent a visible space"
04:56 samlh joined #perl6
04:57 vamped and POSIX defines "graph" as "visible characters". I think we have a conversion.
04:58 vamped thinking more ... unless a space is not considered "visible"
05:04 hicx174 joined #perl6
05:05 TimToady well, it's always seemed like a relatively useless concept to me
05:06 TimToady historically speaking, mostly came down to "what won't drive my line printer crazy and spew a box of paper"
05:06 vamped I think that Unicode is contradictory to the past perl concept that print = graph + space.
05:06 vamped so something might have to change
05:07 TimToady Perl has historically ignored most of what the standards bodies have to say :)
05:07 TimToady but if Unicode claims a particular name, we should probably try to go with it
05:09 vamped agreed. but then <print> and <graph> will be the same?
05:09 TimToady certainly we should be ignoring POSIX completely now in this regard
05:09 diakopter I'm deciding to defer libicu integration (using v8-juice + libv8) to another day.  Preferably a day when I can use C++.
05:10 TimToady someone should translate the mktables.pl program of Perl 5 to spit out Perl 6 code instead.
05:10 TimToady oh, no .pl
05:11 diakopter but
05:13 diakopter how 'bout if mktables expactorated JavaScript instead
05:15 TimToady it doesn't have to be either/or
05:15 diakopter looking at http://github.com/github/perl/blob/blead/lib/unicore/mktables
05:16 TimToady and some implementations may go the minimalistic route to fit onto a cellphone
05:17 TimToady or into a mitochondrian repair robot
05:21 TimToady and in theory, NFG is just integer arrays, and Perl 6 is supposed to do those fast
05:22 TimToady and the killer is that anything like icu is unlikely to implement NFG anyway
05:23 allbery_b joined #perl6
05:38 diakopter ok. I read pdd28 (again) and understood it for the first time
05:38 diakopter where is NFG in the Synopses
05:43 diakopter ok, I just read the Unicode-in-NFG-formation thread
05:45 diakopter seems to me the temporary-composed-codepoints should be process-wide instead of per-string
05:48 diakopter bed&
05:53 samlh left #perl6
05:56 vamped left #perl6
06:11 drbean__ joined #perl6
06:15 cognominal joined #perl6
06:40 go|dfish joined #perl6
06:44 Baggiokwok joined #perl6
07:01 stepnem joined #perl6
07:18 lumi joined #perl6
07:23 goksie_ joined #perl6
07:39 SmokeMachine joined #perl6
07:46 jackyf joined #perl6
07:52 lumi joined #perl6
07:56 Mantis joined #perl6
07:57 Mantis do subroutine definitions have to go before the invocation in the source
07:57 Mantis or can they go at the bottom
08:02 iblechbot joined #perl6
08:03 eternaleye joined #perl6
08:12 Baggiokwok joined #perl6
08:31 meteorjay joined #perl6
09:17 mryan joined #perl6
09:18 mryan sure is quite around here...
09:18 mryan s/quite/quiet/
09:19 mryan perl6: "Hello World".say
09:19 p6eval elf 29550, pugs, rakudo 3867ff: Hello World␤
09:20 hejki perl6: "good (GNT) morning, #perl6".say
09:20 p6eval elf 29550, pugs, rakudo 3867ff: good (GNT) morning, #perl6
09:44 uniejo joined #perl6
09:47 payload joined #perl6
10:04 Su-Shee joined #perl6
10:04 Su-Shee good morning
10:05 cotto_working joined #perl6
10:15 saschi moin
10:16 rgrau` joined #perl6
10:19 mikehh joined #perl6
10:22 wayland76 joined #perl6
10:33 Su-Shee .oO(tax filing program in perl 6..)
10:35 lumi joined #perl6
10:59 rgrau` joined #perl6
11:13 meppl joined #perl6
11:19 lumi joined #perl6
11:20 Chillance joined #perl6
11:39 soupdragon joined #perl6
11:40 iblechbot joined #perl6
11:55 kaare joined #perl6
12:09 mikehh joined #perl6
12:45 snearch joined #perl6
12:55 fm__ joined #perl6
13:08 payload joined #perl6
13:20 rgrau` joined #perl6
13:20 drbean_ joined #perl6
13:48 sharno joined #perl6
13:49 sharno hi
13:49 sharno I'm new to programming languages
13:49 sharno is it easy to start with perl 6 ?
13:50 frettled I think we'd be slightly less than perfectly honest if we said "yes" at this point in time.
13:51 soupdragon hehe you can learn Oz from the CTM book or Scheme from little schemer
13:52 sharno is python easier to learn?
13:52 Su-Shee sharno: what's your background?
13:53 sharno I know very little in programming
13:53 sharno just some of visual basic
13:54 Su-Shee sharno: yes. what's your background? are you a student or do you come from social science..?
13:54 sharno I'm student in medical colledge
13:55 Su-Shee and what do you want to program?
13:55 sharno I'm just learning it as a hobby not for my work
13:56 Su-Shee then start with the language which you think is nice or speaks to you. really doesn't matter. take what you like.
13:56 sharno mmmmmmmmmmmm
13:56 frettled That's not very helpful ;)
13:56 sharno thanks
13:56 mssm joined #perl6
13:56 Su-Shee nowadays, they all have nice books.
13:57 sharno I saw these books "..........for Dummies"
13:57 Su-Shee frettled: of course it is. there is no "best language" if you want to start to program for the fun of it. so he can take whatever he fancies or his buddies use or...
13:57 Su-Shee sharno: "don't" ;)
13:57 frettled Su-Shee: no, but if you don't really have a clue where to start, a _few_ pointers is better.
13:58 Su-Shee frettled: hence me saying "what you think is nice" or "what speaks to you". if python looks nice to him, he should go for it.
13:58 sharno like what?
13:58 soupdragon I wouldn't recommend to read any books for dummies
13:59 sharno why?
13:59 frettled sharno: Depending on your energy and time, I'd suggest looking at two or three different languages.  You will find decent beginners' books on e.g. Java, Perl (5), Python and Ruby.  All of these have free (as in beer _and_ freedom) programming tools.  Your choice _will_ influence on how you do your programming later on.
13:59 Su-Shee because they're not really well done for beginners despite what the title says.
14:00 frettled Su-Shee: if you don't know what programming languages are out there, then that might not help :)
14:00 Su-Shee frettled: you are really recommending _Java_ to someone who wants to take up programming as a _hobby_? :)
14:00 frettled Su-Shee: yes.
14:00 soupdragon there are a lot of programming languages frettled
14:00 Su-Shee poor fellow.
14:00 frettled soupdragon: exactly
14:00 sharno I'm thinking about perl and python
14:00 frettled Nah, Java is useful in its own ways.
14:00 frettled sharno: try both.
14:00 sharno but can't decide
14:00 soupdragon I wonder why a beginner will graviate towards stuff like python today
14:01 Su-Shee sharno: they both have a nice book "learning perl/python" from O'reilly.
14:01 Su-Shee soupdragon: why not?
14:01 soupdragon rather than Oz or scheme or something like that
14:02 Su-Shee soupdragon: I don't even know what Oz is.
14:02 soupdragon probably just because it's new-ish and pop so there's all this advocacy
14:02 sharno I didn't hear about Oz or scheme before
14:02 frettled soupdragon: Oz is perhaps a bit too exotic.  Scheme might be nice, it certainly used to be a decade or two ago, but I don't know how well it's developed.
14:02 soupdragon how can it be too exotic?
14:02 Su-Shee sharno: take python or perl, you'll be fine with it.
14:02 sharno thanks su-shee :D
14:02 Su-Shee sharno: later on you can learn all other programming languages.
14:02 sharno I'll try perl
14:03 frettled soupdragon: it might not have good beginners' guides, it might not have the programming frameworks to get started on your platform of choice, etc.
14:03 sharno first
14:03 Su-Shee sharno: --> #perl
14:03 soupdragon frettled no I don't really agree with that at all
14:03 Su-Shee sharno: http://learn.perl.org/library/beginning_perl/
14:04 sharno thanks :D
14:04 frettled soupdragon: nevermind :)
14:04 sharno it will be very useful as a beginning for me
14:04 sharno :D
14:04 sharno what about perl 6 ??
14:05 sharno is it hard or because it's still in development
14:05 sharno ?
14:05 frettled It's not very hard, I think.
14:05 Su-Shee sharno: no documentation for your needs available, for starters.
14:05 ruoso joined #perl6
14:05 Su-Shee sharno: if you come from perl 5, perl 6 is relatively easy to take up.
14:05 sharno aha
14:06 frettled Some people here _are_ working on a new Perl 6 book, which certainly will help a lot.
14:06 Su-Shee yeah it'll be a good book, but probably not for "I'm new to programming"
14:06 sharno I've to go now
14:07 sharno thanks again very much
14:07 frettled sharno: there are some tutorials and stuff here, though: http://github.com/perlpilot/perl6-docs
14:07 frettled see also the Documentation section on perl6.org
14:07 frettled sharno: good luck
14:08 soupdragon actually I have no idea what 'programming frameworks' are
14:08 soupdragon so I might be too hasty to disagree on this
14:17 sjohnson hi
14:17 sjohnson haven't seen masak in a while
14:34 Exodist joined #perl6
14:39 Exodist joined #perl6
14:45 colomon__ joined #perl6
14:51 Exodist_ joined #perl6
14:52 Exodist_ joined #perl6
14:55 Exodist joined #perl6
14:56 colomon sjohnson: I believe masak reported a couple of bugs this week.
14:58 sjohnson o
15:05 nihiliad joined #perl6
15:22 fm_ joined #perl6
15:30 jan_ joined #perl6
15:33 payload joined #perl6
15:41 pugs_svn r29551 | diakopter++ | [sprixel] implemented some of the default pattern methods.
15:41 pugs_svn r29551 | implemented a ranges() emitter (naively supports 0000-FFFF only; will have to suffice until libicu is integrated, which will provide quick generation from the real Unicode 5.2ff tables.
15:41 pugs_svn r29551 | implemented xor() combinator, a deterministic (non-backtracking) alternation among (for now) deterministic choice patterns.  useful for composing exclusive match checks, such as multiple codepoint ranges (so backtracking information is not stored).
15:41 rgrau` joined #perl6
15:47 lumi joined #perl6
15:51 Psyche^ joined #perl6
16:01 pnate2 joined #perl6
16:20 ash_ joined #perl6
16:33 nihiliad joined #perl6
16:36 IgnisInCaelum joined #perl6
16:51 sundar joined #perl6
16:53 sundar left #perl6
16:54 sundar joined #perl6
16:57 sundar Hi.. I'm trying to get Perl 6 up and running on my Ubuntu. I've checked out Parrot, but now I'm unable to find the tutorial which instructed how to get rakudo within it in the languages/ folder. Do I just checkout rakudo under the languages/ folder?
16:58 colomon You can certainly do it that way.
16:59 colomon I think most of us who aren't parrot developers checkout rakudo by itself, and have it build parrot for us.
16:59 sundar Yeah, that seems the most commonly suggested way, but I'm planning to develop a language under parrot, so thought this would be a better way to do it.
16:59 colomon sure, that makes sense.
16:59 colomon (what language?)
17:03 colomon I think you need to pass Rakudo's Configure.pl the --parrot-config= option to tell it where to find parrot.
17:03 sundar Nothing fancy, a dynamic language coded in my native language instead of English. Doing it mostly for the learning experience.
17:03 colomon ah, cool.
17:04 sundar Oh yeah, thanks for reminding, would have missed it.
17:04 colomon (If you can't guess from the "I think", I always have Rakudo build parrot for me.  :) )
17:04 alexn_org joined #perl6
17:05 sundar :) Ok... I'll try things out, should probably work.
17:08 slavik sundar: s/<local official language>/english/ ???
17:08 slavik :P
17:09 slavik hmm, there's an idea, localize keywords ...
17:09 slavik or translate
17:09 sundar where is that substitution run on? I don't get it actually..
17:09 avar joined #perl6
17:10 slavik sundar, think of it this way: the only thing that make a programming language "english" are the keywords
17:10 slavik since function names can be in other languages and parsers don't know enough to care
17:10 slavik but what is keywords were translated/localized
17:11 sundar yeah, technically I need to write only a lexer
17:11 slavik I mean, when you add an if statement to your language, you're basically just translating 'if'
17:11 slavik same for while, switch, token, and other keywords
17:12 sundar in our language however, the sentence structure is different from English, so if we just replace if() with <local_lang_if>() it sounds awkward if you read out the code.
17:12 slavik sundar: like if you wanted to do "int i = 5;", the only real thing you need to change is 'int' since rakudo/parrot won't care about the label
17:12 sundar yeah, I understand it.
17:12 slavik sundar: in Perl6, you can do: { code } if (condition);
17:13 slavik sundar: what language is that? I know India has like 22 official languages
17:13 slavik according to wikipedia at least
17:13 sundar It's Tamil
17:14 Exodist joined #perl6
17:14 sundar {code} if condition; won't be good enough either. if(condition) {something} in our language is of the structure "(condition) implies {something}"
17:14 slavik so in Tamil, you can say "if this do that" ?
17:14 slavik I see
17:15 slavik then that's tricky ...
17:15 slavik so there is no word for 'if'?
17:15 slavik hmm
17:16 slavik what about the 'else' ?
17:16 sundar else has a direct corresponding word.
17:16 slavik like: (condition) implies {code} otherwise {other code}
17:16 slavik so that is fine, too?
17:16 sundar yeah..
17:16 slavik sundar: do you know the shorthand for C's if? it's in Perl (should be in Perl6 as well)
17:17 slavik http://en.wikipedia.org/wiki/%3F:
17:17 slavik condition ? value if true : value if false
17:17 slavik just substitute ? and : for proper words/terms
17:18 sundar yes, ternary would read good (but really, there's nothing to 'read' there :) ), but it won't scale for large pieces of code in true part or false part isn't it?
17:18 colomon slavik: in Perl 6 it is ?? and !! instead of ? and :.
17:18 slavik colomon: thanks :) I am not so good with Perl6 terms yet :(
17:19 slavik sundar: so then you want to change the structure of what it looks like
17:20 slavik sundar: give me two Tamil characters
17:20 colomon slavik: it's just one of those weird little changes, I believe so that ? and : could be used more readily for other things.
17:21 slavik fair enough
17:21 slavik colomon: not against it ;)
17:21 FCO joined #perl6
17:22 sundar எ, இ Why?
17:22 sundar Can you see them properly? Here I am able to..
17:22 slavik sundar: pidgin supports unicode ;)
17:22 slavik also, give me a word for 'my'
17:22 sundar Ok, Empathy does too apparently :)
17:23 sundar எனது
17:23 slavik and the word for 'implies'
17:24 slavik and print
17:24 slavik or rather say
17:24 sundar implies => எனில்
17:24 sundar say => சொல்
17:25 sundar there's another thing here, the 'say' should come _after_ the text to be meaningful.. :)
17:25 slavik and else
17:25 soupdragon what is this great script
17:26 slavik hmm, I just realized something ... georgian looks similar to this
17:26 slavik also wavy type stuff
17:27 sundar else => அன்றேல்
17:27 sundar elsif would be "அன்றி (condition) எனில்"
17:28 slavik http://paste.lisp.org/+2069
17:29 slavik bot didn't send the pastebin url
17:29 slavik sundar: but would and if-else look like that?
17:29 sundar slavik: to me, georgian looks like some other languages in India, not Tamil.. and also looks the alphabets are very simple, in tamil they're quite complicated. but I can see that they might look similar to others..
17:30 sundar wow, yes, that reads very meaningful.
17:31 sundar the only issue is introducing elsif also here.
17:31 soupdragon what if you just do s/else/அன்றேல்/
17:31 soupdragon write a big list of substitiutions and then you can just program like it's perl or whatever
17:31 soupdragon oh well it would realyl be the other way around
17:33 sundar soupdragon: we discussed that, the issue is for many other things the 'sentence structure' changes.. like if (condition) becomes "(condition) எனில்", so simple substitution afaic won't work
17:34 nbrown joined #perl6
17:40 slavik basically, it comes down to localizing the keywords and possible structures
17:41 sundar slavik: spot on.. if it was the keywords alone, s/// would do the trick, with structure modifications I'm not sure how much effort this would take.
17:43 sundar mostly though, the structure modifications I can think of are very similar, with keyword <something> becoming <something> keyword: while (condition) becomes "(condition) இருக்கையில்".
17:43 ive joined #perl6
17:45 slavik I think a modified gettext system could ahndle this, or whatever gnu has for localizations that create .po files
17:45 slavik that way I could write Perl6 code in english (or russian) and sundar could open it in Tamil
17:46 slavik or even in original and then tell the code editor (that would have to be aware of this) to convert it to other localizations
17:46 slavik hmm
17:46 slavik I think we got something here ^^
17:46 sundar Wow, that is a great idea, I never thought of it in reverse (from English to Tamil or whatever).. might help many understand code easier, esp. those not very comfortable with English.
17:46 slavik sundar: although come to think of it, you don't really need to change '??' and '!!'
17:47 slavik since they are just symbols, but whatever would make it easier
17:47 slavik hmm, who do we write to?
17:48 sundar slavik: yeah, we can ?? and !! itself, but then it won't read 'natural' anymore.. symbols are mostly harder to read than words.
17:48 sundar *we can use
17:48 slavik sundar: to be fair, symbols need to convey meaning ;) which is what words do
17:49 slavik sundar: to someone who only speaks/knows tamil, are ! and ? completely foreign chars?
17:50 sundar No not really.. we use them a lot, and anyway programmers, tamil or not, would be very familiar with them.
17:50 slavik sundar: then I would say to have then understand the meaning :P
17:50 slavik although if structures of operations are localized, then it doesn't really matter
17:51 sundar yeah, people _can_ understand the meaning, but the same holds for Perl too, and still we have 'if' constructs.. isn't it? :)
17:52 slavik well, if is not exactly ?? !! ;)
17:52 sundar slavik: yes, localizing structures is a great idea, I'm looking at gettext PO files now..
17:52 slavik but in any case, if structure for 'if' can be localized, then it doesn't matter
17:52 slavik sundar: gettext won't support this, but this is an idea
17:53 slavik so there would still need to be a universal way to denote the structures.
17:53 sundar slavik: why wouldn't it?
17:53 slavik sundar: because it simply can't, it works for strings, not for language structures ;)
17:54 slavik if you were to organize perl's structures it would be a hash: %structures{'if'} = 'some structure';
17:55 slavik what we would like to do is something like: %structure{'if'}{'tamil'} = 'tamil if structure'
17:55 slavik this would be better doable with Perl6's grammars
17:55 slavik since you can define a grammar with tokens and redefine it
17:56 slavik and Perl6 is supposed to come with the Perl6 Grammar, so all you would need to do is create copies and redefine them
17:56 sundar slavik: ah ok, I think I mostly understand now..
17:56 slavik but then you code editor would need to be in Perl6 to be able to understand it all
17:56 slavik we want to go from a 1D array of structures to 2D array
17:57 slavik make sense?
17:57 sundar or we can redefine the 1D array when we say 'use Tamil' perhaps?
17:58 slavik sundar: that's where the second dimension comes in, to make it easier
17:58 slavik so that it is %structures{$locale}{$type_of_structure}
17:58 slavik but I am probably using structure incorrectly
17:59 sundar but changing to 2D would necessitate changing the current Perl6 Grammar, isn't it?
18:01 justatheory joined #perl6
18:02 slavik no
18:03 slavik the 2D 'hash' is for storing the pieces of the grammar
18:04 sundar slavik: Ok, so you're talking about storing our own version of the Grammar, not about changing the STD.pm, is it?
18:04 sundar our own version derived from STD.pm, malleable to localization..
18:04 slavik yes
18:06 sundar Hmmm.. Wouldn't that be redundant compared to overriding the required parts of STD.pm alone (I'm assuming this is possible) ?
18:07 slavik well, somewhere in STD.pm, there should be something like the following:
18:07 slavik Grammer Perl6 {
18:07 slavik bah
18:08 slavik anyway: grammar Perl6 { ... token if { 'if' <condition> <block> } .... };
18:08 slavik that would be changed to: grammar Perl6 { ... token if { <condition> எனில் <block> } .... };
18:09 sundar yeah, this is the kind of overriding I was referring to.. What is the advantage of the 2D array method over this one?
18:10 slavik well, instead of changing what is there, we simple create another instance
18:11 slavik like: my %grammars{'default'} = grammar Perl6 {}; my %grammar{$locale} = grammar Perl6_$locale {}; where Perl6_$locale inherits from Perl6 and overrides the needed things.
18:12 sundar Ok, I see your idea and my idea are mostly convergent, differing only in minor details.. :) and I can see yours is better suited to extension to other languages..
18:13 slavik but then you need to be able to tell what locale/language the code is in
18:15 sundar is it possible to change the grammar used for reading the code with a use statement? like "use lang 'Tamil'" perhaps..
18:16 sundar but then, it's sort of circular, the interpreter must know the grammar to read that itself, isn't it?
18:16 slavik sundar, yes
18:16 sundar Hmmm.. perhaps a commandline switch then?
18:16 slavik but then you can specify a standard or something where the second line has to denote some information, similar to the firstline shebang notation
18:17 sundar yeah, somewhat like HTML files expressing their charset using a <meta> tag..
18:17 slavik because if you do 'use' that means that there is a foreign language to learn
18:17 slavik no, not that one
18:17 slavik the doctype at the top
18:18 slavik http://www.w3schools.com/tags/tag_DOCTYPE.asp
18:18 slavik that type of thing
18:18 sundar yeah, that's a better analogy..
18:19 slavik so the second line could contain some "keyword" or "locale" in the native language and then the parser would look it up
18:20 sundar we can have it that the second non-blank, non-comment line should be a language import if we're using a language other than English. that should be backward compatible too
18:20 slavik so that we would have %grammars{'english'}, %grammars{'русский'} and so on
18:20 slavik sundar: how about second line that "makes sense"
18:21 sundar where makes sense is defined as? :)
18:21 slavik makes sense is defined as ^#(.*)$ | $1 is in keys %grammars
18:22 slavik otherwise 'english'
18:23 sundar that's a good idea, but should it be a comment line?
18:23 slavik yes
18:23 slavik shebang is also commented ;)
18:23 slavik hell make it #!(.*)
18:24 sundar that's because shebang is for the shell or whatever, so Perl should ignore it.. here this is something for Perl to read, so semantically doesn't make sense to have it as a comment isn't it..
18:26 slavik should commented so that if something doesn't support it, it won't chocke on it
18:26 slavik or maybe it should
18:26 jackyf joined #perl6
18:28 sundar If this is to become a part of the Perl 6 standard, then yes it should choke if it doesn't support this..
18:32 sundar slavik: thanks a lot for so many great ideas.. I'll look into them in detail and give my ideas here later too.
18:32 sundar for now it's getting late for me, going to bed..
18:41 japhb I'm just getting back from a month or so away -- what's the status of rakudo ng these days?
18:48 slavik japhb: not a clue :P
18:48 japhb I see there's no pmichaud ... is jnthn around or just idle?
18:48 japhb seen jnthn
18:48 japhb ah, no seen bot
18:50 jnthn japhb: I'm about
18:51 jnthn japhb: Sort of.
18:51 jnthn :-)
18:51 japhb jnthn, ah, hi!
18:51 jnthn hi!
18:51 japhb So ... what's the status of the ng branch?  I've been away a while ....
18:52 TSa joined #perl6
18:52 jnthn Rakudo ng has been going slowish...both myself and pm took a break from it over Christmas and New Years, though @other++ did some nice patches to keep things moving. :-)
18:53 japhb OK, got it.
18:53 japhb Does it look like things will be picking up in time for the Feb release, or is there a case of burnout or @life-conflicts?
18:53 jnthn I'm back in action now as such, though managed to catch a cold that's been rather distracting me from doing much the last couple of days. But I think it's going away now. Kinda.
18:53 japhb Hope you feel better soon.
18:54 * japhb is really tired of seasonal sicknesses
18:54 jnthn On my part, I took a break over Christmas to avoid burnout, and came back ready to hack again - I'm suffering more inability to think than lack of motivation.
18:54 japhb heh
18:54 japhb (burnout prevention)++
18:55 mikehh joined #perl6
19:01 levengli joined #perl6
19:03 szabgab levengli, hi
19:04 szbalint hi szabgab :)
19:05 szabgab szbalint, trying to help levengli to get on the channel
19:05 soupdragon joined #perl6
19:05 perigrin joined #perl6
19:08 levengli am i finally in the room?
19:09 levengli i'm new to this room, pidgin and ubuntu. all i have to calim is perl5
19:09 levengli any recognition of life will assure me that i can move on
19:09 lumi joined #perl6
19:10 soupdragon lol
19:10 soupdragon levengli you have it
19:10 levengli my main man!
19:10 levengli thanks
19:10 betterworld joined #perl6
19:10 szabgab levengli++
19:11 betterworld joined #perl6
19:11 betterworld joined #perl6
19:11 levengli ok, now that we have that out of the way and i installed rakudu and perl6 - how do i move on
19:11 levengli any tips in familiarizing myself with perl6?
19:11 szabgab perl6: "levengli, hi".say
19:11 p6eval elf 29551, pugs, rakudo 3867ff: levengli, hi␤
19:13 levengli perl6: "levengli, hi".say
19:13 p6eval elf 29551, pugs, rakudo 3867ff: levengli, hi␤
19:13 levengli cute
19:13 levengli but on the command line, it isn't working
19:14 levengli should i be able to call:
19:14 levengli perl6 "'levengli.hi'.say"
19:14 slavik perl6 -e 'say "blah"'
19:14 ojo joined #perl6
19:14 slavik that's on the command line
19:14 jnthn levengli: Depends what your goal is. If you want to learn Perl 6, there's various resources out there - see e.g. http://www.perl6.org/documentation/. Also reading other people's Perl 6 code can be a good way to get into it.
19:14 levengli got it
19:14 levengli starting to warm up my engines
19:15 lichtkind joined #perl6
19:15 levengli i'll start with http://perlgeek.de/en/article/5-to-6
19:15 levengli thanks
19:15 go|dfish joined #perl6
19:16 Su-Shee don't forget to say "engedit" instead of "engage" ;)
19:16 lichtkind why current test pass numbers are decreasing?
19:20 jnthn lichtkind: dobry vecer :-) I suspect because most dev effort is going into the ng branch, and we lost a few to Parrot regressions/changes that didn't get hunted down yet.
19:21 lichtkind jnthn: ahoj i thought first its because some test cleanup/ removing old-bad tests
19:22 jnthn There may be some of that too.
19:22 jnthn Though I think master is frozen against a certain version of the test suite for now anyway.
19:32 colomon Do we need to get master working on the latest Parrot?  They're releasing this week, right?
19:33 stepnem joined #perl6
19:35 colomon Or not?!  "The next release of Rakudo (#15) is scheduled for March 19, 2009."
19:37 colomon :O
19:37 colomon oh, wait, I'm lost in git.  2009....
19:39 colomon Right, our next release is this Thursday.
19:40 colomon It's safe to assume, I think, that we're not going to have ng in place by then.
19:40 colomon So what needs to be done for release?
19:40 colomon I'm pretty sure master is completely broken WRT Parrot HEAD at the moment.
19:41 colomon .oO(Also starting to suspect I'm talking to myself)
19:45 [particle] joined #perl6
19:47 levengli left #perl6
19:49 rindolf joined #perl6
20:07 jnthn colomon: Last I saw, bacek was working on patching things up. Or I saw a patch or two from him anyway.
20:08 jnthn colomon: At the end of the day, though, I said to the Parrot folks way back, "if you do merge callsigs and contexts, it *will* cause issues for Rakudo; please work out how to patch it up before landing the branch".
20:09 colomon Is it a parrot patch to fix it, then?  (No master commits since the tiny log function two weeks ago, according to github.)
20:09 korpenkraxar joined #perl6
20:09 jnthn Ah, I think bacek did write a patch...I thought it had been applied.
20:09 jnthn I'm guessing not though.
20:10 jnthn Was sent to one(parrot-dev, perl6-compiler) mailing list.
20:10 jnthn Feel free to hunt it down and apply it...for some reason I thought it had been.
20:10 jnthn And we still had residual breakage.
20:10 * jnthn hopes the patch will work
20:10 jnthn I can have a dig tomorrow, anyways.
20:11 jnthn Hopefully.
20:13 colomon will try to take alook when not entertaining small child.  :)
20:15 korpenkraxar hi all! I mainly stopped by to say you guys are doing a fantastic job with Perl 6! I am looking forward to help out the best way I can atm - by coding in it this year.
20:16 colomon :)
20:17 jnthn korpenkraxar: Sounds great. Hope it's fun, and feel free to drop by here for help. :-)
20:23 korpenkraxar jnthn: I have a <3000 line Perl 5 project that needs a rewrite and I am hoping to do it in Perl 6. I actually have a few questions already. Maybe I should digg deeper into the documentation but these relates more to the current status of the Rakudo implementation than the actual language, so I'll ask the straight away:
20:23 korpenkraxar What kind of Unix-type I/O can be used with Rakudo atm? Can I do Pipes and sockets?
20:25 korpenkraxar Second, what is the status on threading and sub-processes?
20:26 jnthn korpenkraxar: Sockets yes - someone did a pure Perl 6 web server. Pipes I'm not so sure about; I think Parrot can handle them.
20:27 jnthn But maybe we don't have the Perl 6 support yet. But that may not be too hard to get added, if Parrot does support it already.
20:27 japhb I know that at least read pipes can be used, because that's how I implement qx() for Plumage
20:27 jnthn Oh!
20:27 jnthn I think we have qx in Rakudo too...
20:28 jnthn korpenkraxar: Story on threading is less good though, I'm afraid - there's nothing to see yet on that in Rakudo.
20:28 japhb But they are implemented in extremely hackish form in Parrot -- command and args are smushed into a single string and passed to a pipe spawn routine ... which means security FAIL.
20:28 jnthn Ouch. :-(
20:28 colomon Is qx run the quoted text and capture its output?  That worked in Rakudo last time I tried it.
20:28 jnthn colomon: think so.
20:30 colomon .oO(wonders if there should be a lazy version of qx)
20:35 korpenkraxar jnthn: ahh, too bad with the threading. I am looking to write a daemon that listens to multiple pipes/sockets for input and threading would have been nice. Does that also limit the ability to do for do system() or "backticks" calls?
20:37 korpenkraxar (sorry about that horrible last sentence)
20:38 jnthn korpenkraxar: Believe those work - well, their Perl 6 equivalents anyway (run and qx)
20:39 jnthn rakudo: run("ls")
20:39 p6eval rakudo 3867ff: operation not permitted in safe mode␤in Main (file /home/p6eval//p2/lib/parrot/1.9.0-devel/languages/perl6/lib/Safe.pm, line 24)␤
20:39 jnthn Yeah, implemented but we don't let you do that with the eval bot. ;-)
20:50 korpenkraxar jnthn: last and likely the most stupid question, does the funny daemon pragma (in lack of a better word): while (1) { listen_for_input_on_socket; do stuff } work as expected in Rakudo. In other words, can my program listen for input indefinitely while consuming very little CPU cycles using the corresponding loop in Perl 6?
20:50 mssm joined #perl6
20:50 cognominal joined #perl6
20:53 jnthn korpenkraxar: If you're just doing a blocking socket read, don't see why it'd so anything different than you'd expect.
20:53 korpenkraxar gr8
20:53 jnthn korpenkraxar: The syntax in Perl 6 is just loop { ... } by the way. :-)
20:53 jnthn (loop can take some extra stuff, but bare loop is infinite)
20:55 korpenkraxar :-) yeah I am pretty ignorant at this point. Sorry. Looking forward to the first Perl 6 books.
20:56 synth joined #perl6
20:57 jnthn korpenkraxar: See http://github.com/perl6/book/ for information about one book that's in progress.
20:58 Tene korpenkraxar: Yes, that works as expected, IF you are only dealing with one socket.
20:58 Tene If you're trying to listen on many sockets, you have to poll them individually.  Rakudo does not have 'select' or async IO.
20:59 jnthn Tene: Does Parrot support select yet?
21:00 jnthn (If so, I guess it's probably not so hard to expose it in Perl 6...)
21:00 korpenkraxar Tene: thanx. this is the kind of stuff and gotchas I need to know but which is hunt down.
21:01 Tene jnthn: no, no select.
21:01 Tene korpenkraxar: Rakudo does not support threads at all.
21:01 Tene jnthn: writing a Select PMC has been on my tasklist for months, but never got around to it.
21:03 korpenkraxar Tene: ok. I thought that was needed to do external systems calls at all, or capture input from commands. Good to know.
21:03 korpenkraxar njthn: Tene & Co: thanx for taking your time with my questions. It is encouraging to know an IRC like this is only a few clicks away.
21:03 Tene No problem.  Glad to help.
21:07 lumi joined #perl6
21:14 diakopter hi #perl6
21:14 Tene Hi!
21:19 diakopter Tene: hi, what's up
21:20 Tene Just hanging out at home.  I slept in a bit today.
21:22 diakopter my mental TODO list seems to have vanished. I could've sworn there were a few large items in it yesterday.
21:22 Tene I hate that.
21:22 Tene I theoretically keep a todo list in a text file, but I nearly never update or check it.
21:23 Tene I seem to have lost all momentum on rakudo/parrot, which is disappointing.  I was really enjoying that for a while.
21:24 Tene I'm considering working on updating rakudo to parrot trunk.
21:25 diakopter how many tests fail
21:25 Tene Dunno.  I haven't tried applying the patch from the list.
21:27 diakopter oh. moritz reported the patch's effect on ng.  and bacek replied that he'll work on fixing the issues (eval).
21:28 diakopter well
21:29 patspam joined #perl6
21:30 diakopter I think I should make it a goal today to get an nqp-rx clone running.  er, maybe it'll take 2 days.
21:31 diakopter I suspect the grammar portion is expressive enough
21:37 mryan joined #perl6
21:38 mryan left #perl6
22:06 colomon_ Tene: Master needs to be patched to work with latest Parrot before it can be released Thursday.
22:06 Tene colomon_: Yes, I know.  I'm confused about why you're telling me this.
22:10 colomon_ Saw a bit of conversation in the backtrace.  Wanted to make sure I'm not the only one worrying about it.
22:10 colomon_ You seemed a likely suspect.
22:11 Tene ah
22:11 Tene Perhaps. >.>
22:11 PacoLinux joined #perl6
22:11 Tene I'm leaving to run errands in just a bit.  I'll see if I can talk myself into looking at it when I get back.
22:12 colomon_ If someone could post a link to the patch, it might help me take a look if I ever get ten minutes of peace today....  :)
22:14 cspencer joined #perl6
22:15 ispeak joined #perl6
22:16 diakopter colomon_: it's linked from http://groups.google.com/group/parrot-dev/browse_thread/thread/10f507c989f9ac45
22:17 lisppaste3 joined #perl6
22:27 colomon_ diakopter: thank you!
22:36 cspencer i'm having issues building the version of parrot required by the latest rakudo-ng version.  is this a known problem?
22:38 cspencer left #perl6
22:49 payload joined #perl6
23:00 synth joined #perl6
23:07 jjore joined #perl6
23:09 * colomon has the patch building on master while he runs out to get spicy beef with peanuts....
23:09 rgrau_ joined #perl6
23:15 lumi joined #perl6
23:44 lumi joined #perl6

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

Perl 6 | Reference Documentation | Rakudo