Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-12-19

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 Juerd Let's ask rafl what's going on then :)
00:02 Juerd rafl: ping :)
00:06 theorbtwo joined #perl6
00:27 rafl Juerd, avar: yes, it was removed from testing quite some time ago. mostly because a lack of tuits on my side.
00:50 ferreira left #perl6
00:52 Juerd rafl: Ah - is this a structural problem?
01:11 cnhackTNT joined #perl6
01:15 cmarcelo joined #perl6
01:23 cmarcelo joined #perl6
01:34 hcchien joined #perl6
01:45 drbean joined #perl6
01:59 polettix joined #perl6
02:03 jjore-m joined #perl6
02:07 pbuetow joined #perl6
02:14 Torment joined #perl6
02:19 jjore-m left #perl6
02:28 explorer joined #perl6
02:30 zakame joined #perl6
02:34 Limbic_Region joined #perl6
03:10 thoughtp1lice joined #perl6
03:33 [particle1 joined #perl6
03:37 ispy_ joined #perl6
03:56 glion quit
03:56 * Auzon hands glion a slash
03:57 Auzon Need one of those? ;)
03:57 * glion waves and feints
03:58 glion what i really wanted was a shell...
03:58 Auzon Oh. Well, I have two, but I don't think they'd help you much ;)
03:58 * glion makes a necklace of shells
03:59 glion i wouldn't mind a peek at one of your shells, i'll show you mine
04:00 Auzon Uh... I'm not sure how to reply to that ^_^'
04:00 glion probably you have some interesting stuff on your system,
04:01 glion but i might need a graphic interface to see it
04:01 glion otoh you might have some great coding, but then it would be
04:01 glion on CPAN. So what do I need a shell for?
04:02 Auzon I'm not a /great/ coder. But I do have an interesting project (at least to me)
04:03 elmex_ joined #perl6
04:03 glion what are you up to?
04:03 Auzon One of those browser-based game things
04:03 Auzon College drained a lot of progress, but...
04:05 glion cool, i'm working on a perl module for multitrack recording and mixing
04:05 Auzon Wow, that's neat. :)
04:05 glion the audio processing engine is already out there, and already
04:05 Auzon A whole lot more interesting than my stuff. Though I am trying to figure out how to make water "flow"...
04:06 glion a perl interface to that processing engine
04:06 glion My main aim has been to have fun while picking up some higher level
04:06 glion concepts.
04:06 Auzon Have you heard of Pidgin?
04:07 * glion reaches for his browser
04:07 Auzon Open source instant messaging client
04:07 Auzon Formerly Gaim
04:07 glion how is IM different from IRC
04:08 Auzon IM is the general term. IRC is a specific protocol
04:08 Auzon IM is a broad category, including AIM, IRC, Yahoo, MSN, Jabber, etc
04:08 glion oh, like sending bits of graphics, html etc.
04:08 Auzon I use it for just text, but yeah
04:09 Auzon I've wanted to make a Perl binding for libpurple (the library that Pidgin is built off of)
04:09 glion If it will help, you can look at Audio::Ecasound which
04:10 glion interfaces Ecasound (written in C) with perl.
04:10 Auzon Sadly, I don't know C :-/
04:11 Auzon Pidgin has a (poorly maintained) Perl scripting engine internally, which is why I thought it'd be easy
04:11 glion Can you talk to it through STDIN
04:12 glion It's own copy of a perl interpreter?
04:12 Auzon Embedded
04:12 glion yup
04:12 Auzon I imagine I could write a program to eval things, but it wouldn't be headless...
04:13 glion what's wrong with having a head?
04:13 Auzon I want to use the backend to make a multiprotocol IM bot
04:15 glion If you look around, you might find an example that suites you
04:15 glion close enough to copy
04:15 Auzon Good idea
04:15 Auzon I'll put it on my to do list ;)
04:15 glion Right now I am bringing up module, my firsts, starting to write tests
04:15 glion I am proud.
04:16 Auzon I need to get in the habit of writing more and better tests
04:16 glion The perl build environment is substantially furnished
04:16 Auzon Right now, my tests require that they are run in a certain order :-/
04:17 glion At these point is easier that I put them in 01_sometest.t than anywhere else
04:17 Auzon How many tests do you have?
04:17 glion Uh, a couple
04:18 glion I'm on the add-as-you-go plan
04:18 Auzon My project (the game) is at 271 tests with that plan, and they're a tangled mess
04:18 Auzon 271 or so
04:18 glion Like right now, I'm not reading my cnofiguration file, so make a test for whether it reads
04:19 glion Holy rat piss!
04:20 Auzon Well, it does have a forum-like system integrated, and each action within the game has its own file.
04:21 glion I could see how some kinds of testing could be as complex and tangled as the pgorams they test
04:22 Auzon Well, I use a database (MySQL), and the problem is that the database is assumed to be in a certain state.
04:22 glion A browser game with a forum
04:22 glion For multiple users
04:22 Auzon Yeah
04:22 Auzon I tried to keep as much as possible out of the web interface, so I can test the objects themselves easier
04:25 glion I am dumping my data structures to YAML, and will use git to manage switching between each snapshot of system state (i.e. slider positions). Users will be able to branch their projects and develop on different branches, even merge, all at no cost to me.
04:25 Auzon Neat
04:26 * glion pounds his check and bellows
04:26 Auzon I have a SVN repository for my project (and other code, too)
04:27 glion Git is my first experience with version control and my life will never be the same
04:27 glion I have to train myself not to clog up directories with old versions.
04:27 Auzon One of the players likes to make Greasemonkey scripts for similar games. So I made an interface for scripts that returns output in JSON. It can't do much, but it should be enough to prevent people to try to parse the site's HTML due to laziness :P
04:27 Auzon and version control is amazing
04:27 Auzon I can't imagine coding without it
04:28 glion I can, filenames like e87, but then I was running as a single procedural script.
04:29 Auzon Actually, for a while, I had some projects that I emulated a repository
04:29 Auzon I find it hard to return to those projects now :P
04:31 glion There is a way of learning to think mathematically, but that often develops after thickets of code are already in place
04:32 Auzon What do you mean?
04:32 * Auzon needs a faster computer to run virtual machines on
04:33 glion I have procedural code, introducing a couple of classes to get rid of conditional code.
04:34 glion The thinking mathematically part involves map, grep, hashes and other constructs to somehow self assemble in my mind as a solution to a problem
04:34 glion Now expanding to include objects and classes
04:35 Auzon map and grep are so useful. I was forced to program in Java for CS125 this semester. It was terrible.
04:35 glion I've been sorting through all my variables... I haven't seen my cute little tk user interface pop up for such a long time, <<sniff>>
04:36 Auzon Tk, hm?
04:36 Auzon I want to get Wx working with PAR. That'd be pretty nice.
04:37 glion I might switch over to another widget set after I retire.
04:38 glion tk was my first, and fairly straightforward to learn.
04:38 Auzon I haven't chosen one yet, so I imagine I can still be free from them
04:38 Auzon I've played with all though
04:39 glion HOw difficult, do you guess to port from Tk to Wx
04:39 glion ?
04:39 Auzon It depends on how your code is laid out
04:39 Auzon But I don't think you could stick a layer between them, for instance
04:41 glion For the moment I am focusing on the non GUI aspects. I'll let others stand on my gigantic shoulders.
04:41 Auzon It's hard to change code when it's heavily involved with the UI
04:41 Auzon Anyway, I shall talk with you later.
04:42 jjore-m joined #perl6
04:43 glion I have about 700 lines of it. I used classes UI UI::Text UI::Graphical to get rid of about 30 lines of conditional code such as  refreshwindow if $gui
04:44 glion One widget, the one-per-track widget is 300 lines!
04:44 glion So I am not eager to make big changes there, as you can imagine, even tho I think my code is well organized.
04:44 glion Bye!
04:44 glion Nice talking to you.
04:54 amnesiac joined #perl6
05:05 f0rth joined #perl6
05:10 glion ll
05:26 thoughtp1lice joined #perl6
05:38 AzureStone joined #perl6
06:16 Psyche^ joined #perl6
06:27 Ashizawa joined #perl6
06:55 zakame_ joined #perl6
07:09 jrockway joined #perl6
07:35 bsb left #perl6
07:41 devogon joined #perl6
07:59 penk joined #perl6
08:03 marmic joined #perl6
08:16 zakame_ joined #perl6
08:17 iblechbot joined #perl6
08:35 franck___ joined #perl6
09:03 penk joined #perl6
09:08 penk joined #perl6
09:08 AzureStone joined #perl6
09:08 cnhackTNT joined #perl6
09:08 xdg joined #perl6
09:08 IllvilJa joined #perl6
09:08 alc joined #perl6
09:08 xinming joined #perl6
09:08 Auzon joined #perl6
09:08 qmole joined #perl6
09:08 exp_evalbot joined #perl6
09:08 pugs_svn joined #perl6
09:08 kcwu joined #perl6
09:08 nipotaway joined #perl6
09:08 buu joined #perl6
09:08 broquaint joined #perl6
09:10 xinming joined #perl6
09:25 agjal joined #perl6
09:25 penk joined #perl6
09:25 AzureStone joined #perl6
09:25 cnhackTNT joined #perl6
09:25 xdg joined #perl6
09:25 IllvilJa joined #perl6
09:25 alc joined #perl6
09:25 Auzon joined #perl6
09:25 qmole joined #perl6
09:25 exp_evalbot joined #perl6
09:25 pugs_svn joined #perl6
09:25 kcwu joined #perl6
09:25 nipotaway joined #perl6
09:25 buu joined #perl6
09:25 broquaint joined #perl6
09:42 moritz_ we just lost exp_evalbot and the svn bot for a minute...
09:43 moritz_ they'll be back as soon as the server is up again
09:43 moritz_ wie bekomme ich denn zu einem String die Unicode-Namen?
09:47 exp_evalbot joined #perl6
09:48 pugs_svn joined #perl6
09:48 moritz_ sorry, wrong channel
09:55 pbuetow joined #perl6
09:55 masak joined #perl6
10:14 b_jonas joined #perl6
10:21 explorer joined #perl6
10:21 meppel joined #perl6
10:24 ebassi joined #perl6
10:46 explorer joined #perl6
11:00 theorb joined #perl6
11:09 fglock joined #perl6
11:33 explorer joined #perl6
11:34 macae joined #perl6
11:51 jferrero joined #perl6
12:10 drrho joined #perl6
12:24 franck___ joined #perl6
13:00 nnunley joined #perl6
13:02 penk joined #perl6
13:05 njbartlett joined #perl6
13:41 jhorwitz joined #perl6
13:42 cmarcelo joined #perl6
13:57 b_jonas joined #perl6
14:15 sahadev joined #perl6
14:32 ajs joined #perl6
14:33 ajs left #perl6
14:33 chacha_chaudhry joined #perl6
14:46 pmurias joined #perl6
14:49 penk joined #perl6
15:03 polettix joined #perl6
15:06 pmurias fglock: what are there resons for auto_deref being used instead of emiting FETCH calls?
15:07 fglock pmurias: I think it is no longer used
15:08 pmurias fglock: it is
15:08 fglock looking
15:09 pmurias $foo.method is turned into $foo.FETCH.method
15:12 fglock pmurias: it's a shortcut for checking if the object is a container
15:12 fglock there are other ways to do that
15:12 pmurias food&
15:13 fglock VAR() uses " exists $container->{_dispatch_VAR} "
15:13 fglock it works the same
15:14 fglock $foo.FETCH.method will not work, but
15:14 fglock VAR($foo).FETCH.method should work
15:18 pmurias fglock: in sub foo($arg) {VAR($arg)};foo(1); what is $arg?
15:19 fglock not sure what you mean, but it's a Scalar
15:19 fglock $arg is a "my" variable inside foo()
15:20 fglock it's .BIND to "1"
15:20 pmurias fglock: so it would be an Int
15:21 pmurias not a Scalar
15:21 fglock yes, it depends how you look at it
15:22 gbacon joined #perl6
15:22 pmurias by .BIND you mean :=?
15:23 fglock yes
15:23 pmurias pugs: my $var1;say VAR($var1) === VAR($var2);
15:23 exp_evalbot OUTPUT[*** ␤    Unexpected ");"␤    expecting "::"␤    Variable "$var2" requires predeclaration or explicit package name␤    at /tmp/ZuFEUEcbm0 line 1, column 38␤]
15:25 pmurias in sub foo($arg is rw) {...};my $var;foo($var);is the container in $arg $var or a proxy object?
15:28 fglock in kp6, $arg and $var point to a common "container cell"
15:29 fglock in a sense, they are both "proxy objects"
15:30 pmurias fglock: aren't they the same container?
15:31 fglock no, they are different containers, but they are currently "bind" to each other
15:32 fglock $a := $b; $b := $c    # $a no longer binds to $b
15:32 moritz_ >
15:32 moritz_ > Für Hilfe besten Dank!
15:32 moritz_ >
15:32 moritz_ > Gruß Berthold
15:32 lambdabot <stdin>: hGetLine: end of file
15:32 lambdabot Illegal character ''\188''
15:32 lambdabot at "�r" (column 3)
15:32 lambdabot Illegal character ''\159''
15:32 lambdabot at "�" (column 5)
15:32 lambdabot <stdin>: hGetLine: end of file
15:32 moritz_ sorry
15:32 moritz_ dammned copy & paste
15:36 pmurias fglock: "$var := 1;say VAR($var).isa(::Int)" prints 1?
15:36 zakame_ joined #perl6
15:37 fglock no, VAR($var) isa Scalar
15:37 fglock (but I think it's broken in kp6)
15:38 pmurias fglock: i'm not sure, but i get your point of view
15:39 pmurias pugs: $var := 1;say VAR($var).isa(::Int)
15:39 exp_evalbot OUTPUT[*** ␤    Unexpected " :="␤    expecting "::"␤    Variable "$var" requires predeclaration or explicit package name␤    at /tmp/IDj64ENXah line 1, column 5␤]
15:39 fglock pmurias: pugs says it is
15:39 pmurias pugs: my $var := 1;say VAR($var).isa(::Int)
15:39 exp_evalbot OUTPUT[1␤]
15:42 masak joined #perl6
15:44 pmurias fglock: i think it's important to have it done correctly
15:45 barney joined #perl6
15:45 fglock pmurias: yes, it is - I misunderstood the spec
15:47 lorn joined #perl6
15:47 pmurias i hate when ispell doesn't accept a word and suggest the word it dosn
15:48 pmurias 't accept as a suggestion
15:48 pmurias s/as a suggestion//
15:48 penk joined #perl6
15:49 pmurias fglock: the reason i asked about auto_deref is that is limits method dispatch caching
15:51 fglock isn't it mutability that limits caching?
15:53 pmurias fglock: my assumption is that one dosn't modify the classes much at runtime
15:54 fglock I mean, container mutability
15:54 fglock hmm - you mean to FETCH before dispatch?
15:54 pmurias yes
15:54 fglock I think that's possible, yes
15:56 pmurias we would have to use DISPATCH_VAR then
15:56 pmurias * wouldn't
15:59 Kattana joined #perl6
15:59 fglock I don't know if it covers all the cases - it needs some experiments
16:07 fglock pmurias: you could try it out
16:07 ispy_ joined #perl6
16:09 pmurias i could try it out later(i'll try it for Perl5Cached)
16:10 fglock ok :)
16:26 renormalist joined #perl6
16:33 Limbic_Region joined #perl6
16:37 cognominal_ joined #perl6
16:39 Psyche^ joined #perl6
16:42 renormalist joined #perl6
16:43 [particle] fglock: this code is causing perl6 pain: my $testing_started; END { say $testing_started }
16:43 [particle] No scope found for PAST::Var '$testing_started'
16:43 [particle] seems it can't do a lexical lookup from the END block for a var defined outside it. same problem for BEGIN?
16:44 fglock the problem is related, yes - but END is a bit simpler
16:44 [particle] true
16:44 fglock because the lexical scope actually exists
16:45 fglock you need a way to make the ":outer" thing
16:45 fglock doesn't parrot support END blocks natively?
16:45 kcwu joined #perl6
16:45 [particle] no
16:45 fglock with something like :end
16:47 fglock you can fix that by emitting the END blocks as if they were inner subroutines, and then just call these subroutines at the actual END
16:47 [particle] could each end block have a different :outer? or do they all share the top level block in the compunit?
16:47 fglock each block belongs to the lexical scope where it was defined, I think
16:47 fglock so it's actually an inner subroutine
16:48 [particle] hrmm, that's not how perl6 handles it now
16:48 [particle] it runs the main code, then executes everything registered in @?END_BLOCKS
16:48 fglock assuming the lexical scope is not destroyed
16:48 fglock hmm - maybe it's actually a closure
16:48 [particle] ill look at S0*
16:49 fglock this makes more sense
16:49 moritz_ that's why I just wanted to say
16:49 gbacon fglock: was just wondering whether it was closing over free vars
16:49 fglock it seems so
16:50 [particle] the very end of S04 has something to say about that
16:50 gbacon sign of maturity: in Perl 5, everything was a scalar; now, everything's a closure :-)
16:50 fglock you can test it in Perl5, it should work just the same
16:51 [particle] >perl -e"my $c='hi'; END{print $c}"
16:51 [particle] hi
16:51 moritz_ aye, that's a closure
16:52 jrockway left #perl6
16:57 justatheory joined #perl6
17:01 AzureBOT joined #perl6
17:02 kyrbe joined #perl6
17:02 kyrbe left #perl6
17:03 ahmadz joined #perl6
17:08 pugs_svn r19230 | pmurias++ | [kp-perl5cached] removed DISPATCH_VAR calls, not respecting auto_fetch FETCHing before every method call (too often)
17:08 pugs_svn r19230 | pmurias++ | some tests fail
17:09 ahmadz left #perl6
17:14 Caelum joined #perl6
17:15 cognominal_ joined #perl6
17:18 jrockway joined #perl6
17:19 agjal joined #perl6
17:19 IllvilJa joined #perl6
17:45 manne joined #perl6
17:49 Caelum joined #perl6
17:50 ahmadz joined #perl6
17:51 ahmadz joined #perl6
17:52 drbean_ joined #perl6
17:53 ahmadz left #perl6
18:10 chris2 joined #perl6
18:16 g joined #perl6
18:17 g For Lord Grace! take a look at www.montoya.in
18:17 g sinners!
18:18 g it´s a joke)
18:18 g i´m joking
18:18 g lel
18:18 g i laugh alone!
18:18 g www.montoya.in
18:19 Auzon Am I alone when I wonder "What the heck?"
18:20 moritz_ no
18:20 moritz_ I'd just call it "spam"
18:21 Auzon Yes, but so bizarre spam.
18:33 rhc joined #perl6
18:37 pmurias joined #perl6
18:40 manne_ joined #perl6
18:42 penk joined #perl6
19:02 amnesiac joined #perl6
19:14 justatheory joined #perl6
19:14 TJCRI joined #perl6
19:39 rindolf joined #perl6
20:07 [particle] fglock: ping
20:07 fglock [particle]: pong
20:07 [particle] phone call?
20:08 Limbic_Region . o O ( there is a "phone home" joke in there somewhere )
20:08 PerlJam the cabal is always at home where ever they are.
20:08 [particle] there's a cabal?
20:10 Auzon http://perlcabal.org ?
20:10 lambdabot Title: Perl6 Community Development Server
20:11 agjal good night
20:11 Auzon See you
20:24 kane_ joined #perl6
20:44 rindolf joined #perl6
20:45 polettix joined #perl6
20:51 stevan_ joined #perl6
21:33 gbacon @botsnack
21:33 lambdabot :)
21:34 Auzon lambdabot: good bot
21:39 devogon joined #perl6
21:43 shillo joined #perl6
21:49 agjal joined #perl6
21:57 Basileus joined #perl6
22:06 PhileasFox joined #perl6
22:10 rindolf joined #perl6
22:12 stef_ joined #perl6
22:21 thoughtpolice joined #perl6
22:43 silug joined #perl6
22:58 polettix joined #perl6
23:14 Blwood joined #perl6
23:15 Blwood ?eval sum (1..5)
23:15 Blwood ?eval [~] sum (1..5)
23:15 Blwood :(
23:15 Auzon pugs: sum(1..5)
23:15 exp_evalbot RESULT[15]
23:15 Auzon kp6: sum(1..5)
23:15 exp_evalbot r19230: OUTPUT[syntax error at position 3, line 1 column 3:␤sum(1..5␤   ^ HERE␤]
23:15 Blwood oh okey thx :)
23:15 Auzon ;)
23:16 Auzon mp6: sum(1..6)
23:16 Blwood pugs: (*) (1..5)
23:16 exp_evalbot OUTPUT[*** ␤    Unexpected "("␤    expecting operator␤    at /tmp/hYjkJJJAG3 line 1, column 5␤]
23:16 Auzon (Dunno if there is a mp6)
23:16 Blwood i can't remember the right syntax to use (*) :( ?
23:16 Auzon pugs: [*] 1..5
23:16 exp_evalbot RESULT[120]
23:16 Blwood ahhh
23:16 Blwood thank you :)
23:17 Auzon No problem. I like playing with the bots
23:17 Auzon pugs: .say for ^4
23:17 exp_evalbot OUTPUT[0␤1␤2␤3␤]
23:18 Blwood pugs: split //, ([*] 1..5)
23:18 exp_evalbot OUTPUT[*** Null patterns are invalid; use <?null> or an empty string instead␤    at /tmp/KiwMzY7UeT line 1, column 7-9␤]
23:18 Blwood argh
23:18 Auzon Pugs is more complete, but (from what I've seen) kp6 is more likely to be compiled to Parrot
23:19 Blwood okay :) i'm just playing with the syntax at the moment, comparing it to haskell
23:19 Auzon I don't know Haskell :-/
23:19 Blwood worth learning :)
23:20 Auzon I suppose, especially since my webhost has Haskell support
23:21 Blwood do you know what's the syntax to use split// in perl6 ? i can't find it :(
23:22 Auzon pugs: split /<?null>/, [*] 1 ..^5
23:22 Auzon pugs: split '', [*] 1 ..^5
23:22 Auzon Dunno if those are it
23:22 exp_evalbot RESULT[("2", "4")]
23:22 exp_evalbot RESULT[("2", "4")]
23:22 Auzon They are ^_^
23:22 Blwood pugs: split '', [*] 1..5
23:22 exp_evalbot RESULT[("1", "2", "0")]
23:22 Blwood oh cool thx :)
23:23 Auzon Or... maybe this too?
23:23 Auzon pugs: ([*] 1..5).split('')
23:23 exp_evalbot RESULT[("",)]
23:23 Auzon Nope.
23:24 Blwood pugs: [+] split '', [*] 1..10
23:24 Blwood amazing :)
23:24 exp_evalbot RESULT[27.0]
23:24 Auzon Yeah, I'm pretty happy about the reduce operator
23:25 Auzon pugs: (1 .. 5) ~~ (5 .. 1)
23:25 exp_evalbot RESULT[Bool::False]
23:25 Blwood :)
23:25 Auzon False? O.o
23:25 Auzon I guess.
23:25 Blwood that's strange
23:25 Auzon pugs: (1 .. 5) => (5 .. 1)
23:25 exp_evalbot RESULT[((1, 2, 3, 4, 5) => ())]
23:25 Auzon Hm, nope.
23:26 Auzon Oh right
23:26 Auzon pugs: 1,2 Z 3,4
23:26 exp_evalbot RESULT[((1, 3), (2, 4))]
23:26 Auzon I'm trying to make a hash by zipping two lists
23:26 Blwood ah the zipWith in haskell :)
23:28 Auzon pugs: 1, 2 Z*Z 3,4
23:28 exp_evalbot RESULT[((1, Inf, 3),)]
23:28 Auzon I don't think that's what I meant
23:28 Auzon pugs: ...
23:28 exp_evalbot OUTPUT[*** Cannot use this control structure outside a 'routine' structure␤    at /tmp/b9DEVDyxgR line 1, column 1 - line 2, column 1␤]
23:28 Auzon Oh dang
23:29 Auzon pugs: $s = sub {...}; $s->();
23:29 exp_evalbot OUTPUT[*** ␤    Unexpected " ="␤    expecting "::"␤    Variable "$s" requires predeclaration or explicit package name␤    at /tmp/jy2AcQRMTV line 1, column 3␤]
23:30 Auzon pugs: % 1,2 Z 3,4
23:30 exp_evalbot OUTPUT[*** ␤    Unexpected " 1"␤    expecting "::"␤    at /tmp/n4xgVYIOVW line 1, column 2␤]
23:30 Auzon That should work but doesn't
23:30 Blwood maybe not implemented yet ?
23:30 Auzon pugs: [=>] 1,2 Z 3,4
23:30 Auzon Probably
23:30 exp_evalbot RESULT[((1, 3), (2, 4))]
23:31 Auzon pugs: {1,2 Z 3,4}
23:31 exp_evalbot RESULT[((1, 3), (2, 4))]
23:31 Auzon Still nope.
23:31 Auzon pugs: %hash = (a => 1, b => 0, c => 0); print $hash<a>
23:31 exp_evalbot OUTPUT[*** ␤    Unexpected " ="␤    expecting "::"␤    Variable "%hash" requires predeclaration or explicit package name␤    at /tmp/hu9IDrXXQC line 1, column 6␤]
23:31 Auzon pugs: %hash = {a => 1, b => 0, c => 0}; print $hash<a>
23:31 exp_evalbot OUTPUT[*** ␤    Unexpected " ="␤    expecting "::"␤    Variable "%hash" requires predeclaration or explicit package name␤    at /tmp/jUZq5dtwzq line 1, column 6␤]
23:31 Auzon pugs: my %hash = {a => 1, b => 0, c => 0}; print $hash<a>
23:31 exp_evalbot OUTPUT[*** ␤    Unexpected "<a"␤    expecting "::"␤    Variable "$hash" requires predeclaration or explicit package name␤    at /tmp/QmULzPkz8m line 1, column 49␤]
23:32 Auzon pugs: my %hash = {a => 1, b => 0, c => 0}; print $hash{'a'}
23:32 exp_evalbot OUTPUT[*** ␤    Unexpected "{'"␤    expecting "::"␤    Variable "$hash" requires predeclaration or explicit package name␤    at /tmp/hvffiSOhJU line 1, column 49␤]
23:32 Auzon pugs: my %hash = {a => 1, b => 0, c => 0}; print %hash{'a'}
23:32 exp_evalbot OUTPUT[1]
23:32 Auzon pugs: my %hash = {a => 1, b => 0, c => 0}; print %hash<a>
23:32 exp_evalbot OUTPUT[1]
23:32 Auzon pugs: my %hash = {a => 1, b => 0, c => 0}; print %hash<a b c>
23:32 exp_evalbot OUTPUT[100]
23:32 Auzon That's pretty neat, but I still want to zip two lists to make a hash
23:36 Auzon pugs: (1..10) + (11..20)
23:36 exp_evalbot RESULT[20.0]
23:36 Auzon pugs: (1..10) ^+ (11..20)
23:36 exp_evalbot RESULT[(10 ^ (1, 2, 3, 4, 5, 6, 7, 8, 9, 10))]
23:37 Auzon :-/
23:37 Tene pugs: my @a = 1..3; my @b = 'a'..'c'; my %h = zip @a, @b; %h
23:37 exp_evalbot RESULT[{("1" => "a"), ("2" => "b"), ("3" => "c")}]
23:37 Tene like that?
23:37 Auzon Yep
23:37 Tene That what you expected it would be like?
23:37 Auzon I think so
23:38 Auzon {1 => 'a', 2 => 'b', 3 => 'c'}
23:38 Auzon I dunno if the parens matter up there
23:38 Tene They don't.
23:38 Auzon Ah
23:38 Auzon I like that ^_^
23:39 Tene () flatten in list context, [] don't.
23:40 Auzon pugs: my $version is const = '5.10.0'; $version.subst(/0/, 1);
23:40 exp_evalbot RESULT[\"5.11.0"]
23:41 Auzon But, I told it to be constant. :-/
23:41 Auzon pugs: constant $version = '5.10.0'; $version.subst(/0/, 1);
23:42 exp_evalbot RESULT[\"5.11.0"]
23:42 Auzon pugs: const $version = '5.10.0'; $version.subst(/0/, 1);
23:42 exp_evalbot OUTPUT[*** ␤    Unexpected " ="␤    expecting "::"␤    Variable "$version" requires predeclaration or explicit package name␤    at /tmp/H659RaBBZk line 1, column 15␤]
23:42 Auzon So constant is there, just not working
23:48 Auzon pugs: "Hi there".say.say
23:48 exp_evalbot OUTPUT[Hi there␤1␤]
23:48 amnesiac joined #perl6
23:51 ispy_ joined #perl6
23:52 Tene Auzon: pugs doesn't respect 'constant'
23:52 Tene it parses it and ignores it.
23:52 Auzon That's what I figured ;)
23:52 Tene pugs: my $foo is squibble = 'abcd'
23:52 exp_evalbot RESULT[\"abcd"]
23:52 ispy_ I don't think it respects 'exists' either, unless I'm doing something wrong :)
23:53 Auzon pugs: constant $foo = "ham";
23:53 exp_evalbot RESULT[\"ham"]
23:53 Auzon pugs: squibble $foo = "ham";
23:53 exp_evalbot OUTPUT[*** ␤    Unexpected " ="␤    expecting "::"␤    Variable "$foo" requires predeclaration or explicit package name␤    at /tmp/uaWacBHj5w line 1, column 14␤]
23:54 Tene my
23:55 Auzon Yeah, but it took constant.

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

Perl 6 | Reference Documentation | Rakudo