Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-06-27

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:00 logie joined #perl6
00:13 rurban joined #perl6
00:26 rindolf joined #perl6
00:35 BenGoldberg joined #perl6
00:46 rurban joined #perl6
01:06 emilper left #perl6
01:07 klapperl_ joined #perl6
01:09 Su-Shee_ joined #perl6
01:13 hoverboard joined #perl6
01:16 woosley joined #perl6
01:17 woosley joined #perl6
01:21 FROGGS joined #perl6
02:04 shachaf joined #perl6
02:05 xiaomiao joined #perl6
02:29 noganex_ joined #perl6
02:34 shachaf joined #perl6
02:34 shachaf left #perl6
03:14 hoverboard joined #perl6
03:22 xiaomiao http://bpaste.net/show/411842/ amusing nqp-2014.06 build failure
03:25 woosley joined #perl6
03:26 xragnar joined #perl6
03:29 TimToady haven't seen that one, but I would suspect that it needs to have configure run again
03:29 TimToady I usually do that just by saying: . config.status
03:30 TimToady then it reruns Configure with the same arguments you had before
03:30 TimToady or try a fresh checkout (unless this was a fresh checkout, in which case I am clueless)
04:02 kaare_ joined #perl6
04:07 estrabd joined #perl6
04:24 brrt joined #perl6
04:34 dalek joined #perl6
04:39 dalek joined #perl6
04:42 PerlJam joined #perl6
04:44 sivoais joined #perl6
04:57 pmichaud joined #perl6
04:57 [Coke] joined #perl6
04:57 tadzik joined #perl6
05:04 kaare_ joined #perl6
05:05 hugme joined #perl6
05:05 dalek joined #perl6
05:10 gfldex joined #perl6
05:13 dalek joined #perl6
05:18 vendethiel joined #perl6
05:19 vendethiel o/
05:19 yoleaux 26 Jun 2014 21:45Z <timotimo> vendethiel: "Just enter submit to evaluate the code you typed." that "enter submit" sounds weird/wrong
05:19 yoleaux 26 Jun 2014 21:46Z <timotimo> vendethiel: i'm not sure if this is the right thing to tell a newbie, but the reason why { say "hello world!" } only outputs "hello world!" and not 1 (the return value of say) is because that piece of code wrote something to stdout and then the return value will not be printed
05:19 masak joined #perl6
05:19 brrt joined #perl6
05:19 vendethiel timotimo: yeah, not sure if it's good to tell newbees
05:21 hoverboard joined #perl6
05:24 brrt left #perl6
05:24 PerlJam joined #perl6
05:27 masak_ joined #perl6
05:28 rurban joined #perl6
05:29 rurban1 joined #perl6
05:31 tadzik joined #perl6
05:34 hugme joined #perl6
05:35 [Sno] joined #perl6
05:38 SamuraiJack_ joined #perl6
05:39 dalek joined #perl6
05:46 kaleem joined #perl6
05:53 hugme joined #perl6
06:07 fhelmberger joined #perl6
06:07 rindolf joined #perl6
06:10 labster joined #perl6
06:18 dalek joined #perl6
06:23 anaeem1_ joined #perl6
06:26 kaare_ joined #perl6
06:26 ChoHag When should attributes be referred to as $.foo, and when as <sigil>!foo ?
06:47 ponbiki joined #perl6
06:53 dmol joined #perl6
06:55 lizmat_ joined #perl6
06:56 FROGGS joined #perl6
06:56 labster_ joined #perl6
06:59 virtualsue joined #perl6
07:00 lizmat joined #perl6
07:01 hugme joined #perl6
07:06 igorsutton joined #perl6
07:07 lizmat_ joined #perl6
07:09 moritz ChoHag: $.foo is a method call, so an indirection
07:09 moritz ChoHag: from outside, you always need the indirection, because the attribute itself is private
07:10 labster joined #perl6
07:12 moritz ChoHag: from inside a class, it's basically your choice, though for write operations you need the ! form, unless the accessor is rw
07:16 Ven joined #perl6
07:22 lizmat joined #perl6
07:28 SamuraiJack_ joined #perl6
07:31 rurban joined #perl6
07:31 Ven joined #perl6
07:34 zakharyas joined #perl6
07:35 pdcawley joined #perl6
07:46 kurahaupo joined #perl6
07:48 brrt joined #perl6
08:00 darutoko joined #perl6
08:02 Rounin joined #perl6
08:07 lizmat_ joined #perl6
08:16 bloonix joined #perl6
08:18 anaeem___ joined #perl6
08:19 fhelmberger joined #perl6
08:25 pdcawley joined #perl6
08:32 rurban joined #perl6
08:43 pdcawley joined #perl6
08:45 mr-foobar joined #perl6
08:49 rom1504 joined #perl6
08:52 rom1504 left #perl6
08:52 lizmat joined #perl6
09:01 brrt left #perl6
09:07 virtualsue joined #perl6
09:17 Ven_ joined #perl6
09:33 rurban joined #perl6
09:37 yakudza joined #perl6
09:41 bakedb joined #perl6
09:49 pecastro joined #perl6
09:50 bakedb joined #perl6
09:53 denis_boyun_ joined #perl6
10:09 spider-mario joined #perl6
10:12 tadzik joined #perl6
10:34 rurban joined #perl6
10:48 ChoHag Can I tell if an attribute has been set (either with an accessor, internally by the class or at initialisation) as opposed to using its default value?
10:49 FROGGS ChoHag: only when you create a Proxy, and do something in its STORE method
10:49 FROGGS but that is ugly
10:50 FROGGS ChoHag: why do you care? would it be a problem when somebody sets something that is identical to the default value?
10:50 ChoHag On a related not, can I set attributes (or methods) on attributes?
10:50 ChoHag Probably not.
10:51 ChoHag That is - it probably doesn't matter.
10:51 ChoHag I can apply my own trait to an attribute but I can't, among other things, tell if an attribute has had that trait applied to it.
10:55 FROGGS I guess introspecting applied traits is on the roadmap...
10:55 uniejo joined #perl6
11:07 colomon smoke test ran much longer last night, but still ended with
11:07 colomon Segmentation fault (core dumped)
11:10 FROGGS :/
11:11 ChoHag Given a class which has %.foo, how would I set foo to the perl 5 equivalent of: { a => { a1=>1, a2=>2 }, b => { ... } }?
11:11 ChoHag I'm still getting my brackets mixed up in perl 6.
11:17 FROGGS m: class Bar { has %.foo is rw }; my $foo = Bar.new( :foo(a => { a1=>1, a2=>2 }, b => { ... }) ); say $foo
11:17 camelia rakudo-moar f445f8: OUTPUT«Bar.new(foo => ("b" => -> ($_? is parcel) { #`(Block|140372044679712) ... }, "a" => {"a1" => 1, "a2" => 2}).hash)␤»
11:17 FROGGS note that the { ... } is not a hash, but Code
11:35 rurban joined #perl6
11:54 kill joined #perl6
11:54 amkrankruleuen joined #perl6
12:12 sergot joined #perl6
12:17 sergot hi o/
12:18 sjn \o
12:20 nwc10 At least there's some good news to temper the continuing delays in SpaceX launching their next soft landing test: http://spacecollege.org/isee3/isee-3-status-26-june-2014-dsn-ranging-success.html
12:20 xiaomiao joined #perl6
12:21 nwc10 (oh, and 6 satellites. Apparently that's the official reason for the launch)
12:31 uniejo joined #perl6
12:33 lue joined #perl6
12:37 rurban joined #perl6
12:49 rurban joined #perl6
12:51 lue joined #perl6
12:51 jnap joined #perl6
12:51 uniejo joined #perl6
12:55 Ven joined #perl6
13:06 molaf joined #perl6
13:14 SamuraiJack_ joined #perl6
13:15 Ven It's a pretty quite day :-)
13:16 timotimo quiet*
13:23 TimToady hackathon hasn't started yet :)
13:24 anaeem1_ joined #perl6
13:26 timotimo would appreciate someone verifying my claims in the p6l mail i just sent
13:28 timotimo right now i'm not in a position to properly verify with an actual rakudo
13:30 guru joined #perl6
13:37 Ven timotimo: It's quite a day, too ;)
13:38 Ven timotimo: perl6-language ?
13:38 timotimo yes
13:38 Ven The most recent seems to be " [perl6/specs] 2d0d5a: Some more elaboration about CompUnit class" ?
13:38 timotimo oh
13:39 timotimo sorry, i meant p6u
13:39 awwaiid joined #perl6
13:39 Ven timotimo: perl6-users ? I don't see a message from you there, either
13:39 Ven unless you're kamil Lu/lage
13:40 timotimo did my message not make it through?
13:40 timotimo i got the bounce
13:40 Ven Well, I'm browsing the "archives", so it might be why
13:40 timotimo ah
13:40 timotimo p6u is so low-traffic that it's very worth it to subscribe
13:41 Ven It's there on G groups :)
13:41 timotimo fair enough, i guess?
13:41 timotimo i can see my reply in there
13:42 timotimo "15 minutes ago"
13:42 timotimo https://groups.google.com/d/msg/perl.perl6.users/LQrvIssGMds/_vl4yMVCdkgJ
13:42 Ven timotimo: yep, `is` works
13:42 timotimo the question is: does "is" work like i explained? :)
13:43 Ven well, yes, else I wouldn't have said so
13:43 timotimo thank you :)
13:45 Ven I admit I havn't checked google groups for a while, probably like 6 months
13:49 btyler joined #perl6
13:56 Ven m: role A { method foo { say 1 } }; A.new.foo
13:56 camelia rakudo-moar f445f8: OUTPUT«1␤»
13:56 Ven being able to `new` roles seems kinda confusing, uh
13:57 moritz m: role A { method foo { say 1 } }; say A.new.WHAT === A
13:57 camelia rakudo-moar f445f8: OUTPUT«True␤»
13:57 lizmat joined #perl6
13:57 TimToady interesting
13:58 Ven TimToady: that's not by design ?
13:58 TimToady arguably role A and class A are two different things
13:58 TimToady but with the pun, I don't think it's terrible to confuse them
13:58 Ven we a lisp/6 now :) ?
13:58 timotimo if you can't confuse them, the pun didn't work
13:59 TimToady a punnable role is really just a way to write a composable class, in a sense
14:00 TimToady the dicey bit is that the role is immutable, and the class is mutable, so it could diverge over time from its role
14:00 timotimo OOP is hard, let's go shopping
14:01 TimToady monkey typing will change the class, not the role
14:01 timotimo we already have trouble with monkey typing changes not applying everywhere they ought to
14:01 TimToady well, that's mostly because the bootstrap abstraction leaks
14:02 woolfy joined #perl6
14:04 rindolf joined #perl6
14:05 FROGGS joined #perl6
14:15 anaeem1_ joined #perl6
14:22 Alula_ joined #perl6
14:29 hoelzro morning #perl6
14:31 Ven o/
14:33 TimToady \o
14:33 woolfy joined #perl6
14:33 Ven There's no IO::Path#move ? Where is IO::Path anyway :(
14:34 timotimo "rename"?
14:35 Ven timotimo: yeah, but it's not in IO::Path.^methods nor in the doc.perl6, so I got confused.
14:35 timotimo oh
14:35 timotimo .^methods(:all)? :P
14:40 labster joined #perl6
14:40 btyler is feather.perl6.nl having trouble? a panda rebootstrap just failed because it got connection refused while pulling http://feather.perl6.nl:3000/projects.json
14:42 moritz btyler: not feather having trouble in general, just the web service behind :3000 being dead
14:42 moritz tadzik: ^^ please restart :-)
14:42 Ven timotimo: no. not even
14:43 moritz tadzik: and please make that web service something installable, I hate to 'su' as your user to restart it
14:45 bluescreen10 joined #perl6
14:46 btyler moritz: thanks
14:46 Ven moritz: you were the one who originally created the p5-to-p6 guide, right ?
14:47 Ven did you present it at some conference ?
14:47 treehug88 joined #perl6
14:47 Ven or maybe the "idioms" advent posts
14:47 woolfy left #perl6
14:48 moritz Ven: I didn't conference-present it, no
14:48 Ven moritz: do you think that could be interesting ?
14:48 Ven I'm starting to think it'd be
14:54 synopsebot joined #perl6
14:55 tadzik moritz: done
14:55 tadzik moritz: hmm, I can chmod stuff :P
15:01 lizmat joined #perl6
15:04 woolfy joined #perl6
15:04 telex joined #perl6
15:06 TimToady http://rosettacode.org/wiki/Events#Perl_6
15:09 * lizmat finally arrived in the hackathon room
15:09 lizmat (and is off for some Chai Tea Latte)
15:10 colomon \o/
15:11 thou joined #perl6
15:16 labster joined #perl6
15:23 raiph joined #perl6
15:24 * lizmat is back
15:24 lizmat colomon o/
15:24 colomon \o
15:24 colomon happy hacking!
15:25 raiph p5eval: sub foo { 0, 1, 2 }; my @bar = foo; say $bar[1] # just checking
15:28 labster joined #perl6
15:29 kaleem joined #perl6
15:30 btyler_ joined #perl6
15:31 Ven HOLIDAYS. yay
15:34 newbie_Perl6 joined #perl6
15:40 lizmat raiph: $ perl -E 'sub foo { 0, 1, 2 }; my @bar = foo; say $bar[1]'
15:40 lizmat 1
15:45 newbie_Perl6 joined #perl6
15:46 lizmat_ joined #perl6
15:47 raiph Thanks lizmat++ I was trying in a local shell but getting nowhere. (I needed -E, not -e.)
15:49 newbie_Perl6_ joined #perl6
15:50 hoelzro is the star release going out anytime soon?
15:52 psch joined #perl6
15:52 psch hi #perl6
15:53 lizmat_ m: sub a ($a,:$b) { say $a; say $b }; my $s = ("foo", b => 2); say $s.perl; a(|$s)   # what am I doing wrong here ?
15:53 camelia rakudo-moar f445f8: OUTPUT«$("foo", "b" => 2)␤Too many positional parameters passed; got 2 but expected 1␤  in sub a at /tmp/xfnw4RGGsF:1␤  in block  at /tmp/xfnw4RGGsF:1␤␤»
15:54 timotimo m: sub a ($a,:$b) { say $a; say $b }; my $s := \("foo", b => 2); say $s.perl; a(|$s)
15:54 camelia rakudo-moar f445f8: OUTPUT«Capture.new(list => ("foo",), hash => {"b" => 2})␤foo␤2␤»
15:55 lizmat_ timotimo++
15:58 newbie_Perl6 joined #perl6
15:58 hoverboard joined #perl6
16:00 masak joined #perl6
16:01 newbie_Perl6_ joined #perl6
16:03 moritz tadzik: don't chmod stuff; put it into /usr/local/pandaserver or so, and write an init script for it
16:03 moritz tadzik: and maybe we should run it as a separate user account
16:03 newbie_Perl6__ joined #perl6
16:04 moritz providing shared services fro a private user account just asks for trouble
16:04 Akagi20__ joined #perl6
16:09 labster joined #perl6
16:13 btyler joined #perl6
16:17 user3 joined #perl6
16:20 user3 left #perl6
16:29 jdv79 jnthn: awesome 6guts post as usual.  thanks!
16:31 molaf_ joined #perl6
16:31 user3 joined #perl6
16:38 cognominal jnthn++
16:48 virtualsue joined #perl6
16:53 mr-foobar joined #perl6
16:57 vendethiel joined #perl6
16:58 FROGGS joined #perl6
16:59 xinming_ joined #perl6
17:00 vendethiel o/ from home.
17:00 mr-fooba_ joined #perl6
17:04 [Sno] joined #perl6
17:05 vendethiel .u arrow
17:05 yoleaux U+02C2 MODIFIER LETTER LEFT ARROWHEAD [Sk] (˂)
17:05 yoleaux U+02C3 MODIFIER LETTER RIGHT ARROWHEAD [Sk] (˃)
17:05 vendethiel .u up arrow
17:05 yoleaux U+02C4 MODIFIER LETTER UP ARROWHEAD [Sk] (˄)
17:05 yoleaux U+02C4 MODIFIER LETTER UP ARROWHEAD [Sk] (˄)
17:05 yoleaux U+02F0 MODIFIER LETTER LOW UP ARROWHEAD [Sk] (˰)
17:05 yoleaux U+034E COMBINING UPWARDS ARROW BELOW [Mn] (◌͎)
17:06 vendethiel .u ⇧
17:06 yoleaux U+21E7 UPWARDS WHITE ARROW [So] (⇧)
17:06 vendethiel .u ⌃
17:06 yoleaux U+2303 UP ARROWHEAD [So] (⌃)
17:09 Akagi201_ joined #perl6
17:11 user3 left #perl6
17:26 hoverboard joined #perl6
17:28 ChoHag How can I return a hash which is lazily generated from a list where the key of the hash is the list element and the value calculated from it?
17:28 vendethiel I'm not sure we have lazy hashes (?)
17:28 uniejo joined #perl6
17:29 ChoHag Well, something that looks hash-like.
17:40 nnunley ChoHag: It looks like you'd need something that implements the the Associative and Positional roles (like a PairMap)  Possibly delegating to a Hash for memoized values?
17:42 rurban joined #perl6
17:45 raiph m: sub lazypairs (@list) { @list.map: { $_ => $_ + 1 } }; say lazypairs(^Inf)[3] # ChoHag: A lazy hash doesn't make sense to me. Perhaps you mean a lazily generated list of pairs?
17:45 camelia rakudo-moar 82af72: OUTPUT«3 => 4␤»
17:46 Akagi201_ joined #perl6
17:51 uniejo joined #perl6
17:53 Mouq joined #perl6
17:59 xinming joined #perl6
18:00 Mouq ChoHag: Maybe something like sub lazyhash (@lazy-pair-list) { @lazy-pair-list does role { method postcircumfix:<{ }> ($key) { $.first(*.key == $key) } } }, except that method postcircumfix doesn't work anymore...
18:01 Mouq (it's spelled `sub postcircumfix:<...>` now)
18:01 user3 joined #perl6
18:12 cognominal joined #perl6
18:14 uniejo joined #perl6
18:16 Rotwang joined #perl6
18:16 ChoHag I basically just want an attribute which is a hash whose values are calculated only when they're needed.
18:17 ChoHag But the keys are known in advance.
18:17 Rotwang joined #perl6
18:23 thou joined #perl6
18:23 lizmat joined #perl6
18:24 tadzik moritz: yeah, you're right. It was supposed to be a temporary solution and all :P
18:28 vendethiel joined #perl6
18:34 Mouq ChoHag: Ohhh
18:36 virtualsue joined #perl6
18:36 timotimo my %foo is default({ ... }); perhaps
18:37 lizmat m: my %foo is default( {} ); say %foo<a>.perl
18:37 camelia rakudo-moar 82af72: OUTPUT«{}␤»
18:37 lizmat m: my %foo is default( {a => 1} ); say %foo<a>.perl
18:37 camelia rakudo-moar 82af72: OUTPUT«{"a" => 1}␤»
18:38 FROGGS ahh, a blōg by jnthn++
18:38 FROGGS weird that I don't get a mail when I follow him :/
18:39 timotimo that's not what i meant :)
18:39 timotimo m: my %foo is default( -> { rand }); say %foo<a>; say %foo<b>; say %foo<a>
18:39 itz joined #perl6
18:39 camelia rakudo-moar 82af72: OUTPUT«-> () { #`(Block|140024295223472) ... }␤-> () { #`(Block|140024295223472) ... }␤-> () { #`(Block|140024295223472) ... }␤»
18:39 timotimo doh.
18:39 timotimo that doesn't thunk
18:43 Rotwang joined #perl6
18:43 timotimo FSVO thunk
18:45 TimToady http://rosettacode.org/wiki/Draw_a_clock#Perl_6  <-- more braille graphics
18:46 timotimo now do an analog clock!
18:47 Sqirrel joined #perl6
18:49 rjbs Cute!
18:49 btyler TimToady: awesome!
18:50 FROGGS TimToady: I also thought about doing it, but my version would not be that cool :o)
18:50 Rotwang joined #perl6
18:51 rjbs Curious about ( qx/stty size/.words ) -- there is no newline left in $cols because we've split on \s+, basically?
18:53 rjbs Can I make perl6-m accept a program to run from stdin?
18:54 Rotwang joined #perl6
18:54 guru joined #perl6
18:54 Mouq rjbs: .words is actually more like .comb(/\S+/)
18:54 btyler echo "'hi'.say" | perl6 # simple way worked for me: not the case for you, rjbs?
18:55 rjbs btyler: I only arrived at that a minute ago, but in a fit of brain-fever used > instead of |
18:55 rjbs btyler: so now I'm recompiling :)
18:55 rjbs btyler: I had previously tried "./perl6 -" and "./perl6 -- -"
18:55 rjbs Well, it'll get me a month-newer rakudo and moar, anyway.
18:55 virtualsue joined #perl6
18:56 btyler rjbs: ah, yes, the brain-fever :) know that one well
18:56 FROGGS TimToady++ # I run it right now, it is awesome!
18:57 btyler (also, off topic, but 1.21 jiggawatts and perl5 @ 20 were both awesome talks, rjbs++)
18:57 rjbs btyler: Oh, I'm very glad you enjoyed them, tahnks!
18:57 rjbs Thanks, eevn.
18:57 rjbs Oh, nevermind. :)
18:58 FROGGS rjbs++ # only watched the awesome 5@20 yet, but started to watch the other one...
18:59 FROGGS I've only watched a few talks in total, but I think your's are the most entertaining :o)
18:59 rjbs Well, thanks!  I was pretty happy with how they turned out.  I was also unhappy that once again I didn't manage to get a lightning talk together.  Maybe for OSCON…
19:02 rjbs TimToady++ # That's a nice clock.
19:11 gjb_ joined #perl6
19:15 japhb_ joined #perl6
19:24 matija joined #perl6
19:25 matija joined #perl6
19:26 mr-foobar joined #perl6
19:28 virtualsue joined #perl6
19:33 broquaint joined #perl6
19:34 labster joined #perl6
19:41 Ulti is there any plans to just have thinly wrapped C like ASCII strings in Perl6?
19:41 Ulti is a Buf closer to this than Str?
19:42 yeltzooo4 joined #perl6
19:43 lizmat Buf and native arrays, afaik
19:43 Psyche^ joined #perl6
19:43 lizmat native arrays being NYI, afaik
19:43 _sri joined #perl6
19:44 ggherdov_ joined #perl6
19:44 petercommand joined #perl6
19:45 Ulti moarvm uses 32 bits per character atm right?
19:47 Ulti I guess that is a #moarvm question
19:47 labster jnthn++ for blog, TimToady++ for a nice clock
19:51 Ulti oh actually my program isn't really /that/ big in memory footprint its just the runtime overhead... that's not so bad
19:52 Ulti and if I can easily quarter the value I'm seeing that is usable
19:54 brrt joined #perl6
19:55 pecastro joined #perl6
20:06 uniejo joined #perl6
20:09 kaare_ joined #perl6
20:20 japhb_ joined #perl6
20:20 vendethiel m: say (6,).perl; say @(6).perl;
20:21 camelia rakudo-moar 82af72: OUTPUT«(6,)␤(6,).list␤»
20:21 Mouq tadzik: https://github.com/tadzik/steroids/pull/2
20:21 ggherdov joined #perl6
20:24 uniejo joined #perl6
20:28 rurban1 joined #perl6
20:28 vendethiel Okay, so, I have a dilemna.
20:28 vendethiel Do I show `join ',', @a` or `@a.join(',')` ??
20:29 moritz the answer is clearly "yes"
20:29 lizmat whatever you feel more comfortable with
20:29 lizmat I feel the latter is slightly more perl6y
20:29 vendethiel moritz: thanks.
20:29 jercos personally I'd prefer the latter, or join(',', @a)
20:30 jercos leaving joins open-ended like that feels off, possibly from perl5 habit
20:30 vendethiel uh ?
20:30 moritz if it's the last statement in a line, I prefer the @a.join: ',' form
20:30 erkan joined #perl6
20:30 erkan joined #perl6
20:31 vendethiel I'm not showing the : stuff 123 lines into the tutorial :P
20:32 TimToady open-ended join ',', ... is for when ... is long
20:33 vendethiel uh² ?
20:33 vendethiel so, @a.join ?
20:34 TimToady talking about end-weight
20:34 * vendethiel is getting lost
20:34 TimToady short things want to be before long tings
20:34 vendethiel that was probably a terrible question to ask, anyway
20:35 psch did you show .split or split before?
20:35 psch i.e. if you're mostly doing method-y stuff, stay with methods, if not, don't
20:35 jercos I guess the existance of say sorta eliminates the odd case of |print join ",", @a, @b, "\n"| "oh whoops, gotta add parens on that join."
20:35 psch and add a "most of those also work as sub/methods" somewhere
20:35 TimToady and one sometimes wants to avoid having parentheses that go many lines
20:35 vendethiel psch: I only showed say
20:36 TimToady so, for instance, something like: say join ',', gather for @stuff { blah, blah, blah, take blah, blah }
20:37 TimToady puting an entire gather into () is a bit crufty, just to put a .join(',') at the end
20:37 psch i'd actually go with join ',', @a first and mention that it also works as method
20:38 psch but that's just how i imagine it to flow well, ymmv
20:40 vendethiel psch: that could be a good time to introduce readers to methods, though
20:40 labster joined #perl6
20:41 psch yeah, that's why i said you show the sub and transition to "it also works as method" :)
20:42 psch i.e. "here, that's say... we also have join... oh btw, those (and many more) also work as methods"
20:47 obra_ joined #perl6
20:47 krunen_ joined #perl6
20:48 psch i guess it might also depend on your audience; clog says it's "p5 to p6 for non-p5ers", which i understand as "there is programming knowledge but we don't know what kind", that about right?
20:49 vendethiel psch: not much programming knowledge
20:49 vendethiel let me update it to my working version
20:49 [Coke] joined #perl6
20:49 vendethiel maybe I should ask for more programming knowledge, but meh.
20:49 * [Coke] .
20:49 vendethiel o/ [Coke]
20:50 vendethiel psch: http://scriptogr.am/vendethiel/post/and-perl-6-came-forth
20:51 psch hi [Coke]
20:51 vendethiel I'm struggling not to add an explanation about what OO is
20:51 uniejo joined #perl6
20:55 psch vendethiel: as for content, i think the transition works pretty well as you have it
20:55 * Mouq found OO made much more sense when he started using Perl 6 than it did when he was using Perl 5
20:55 psch the plenks don't work for me, but that might be cultural :)
20:56 vendethiel psch: plenks ?
20:56 ClarusCogitatio joined #perl6
20:56 psch http://en.wikipedia.org/wiki/Plenk
20:56 psch i guess it is a german thing
20:57 _sri joined #perl6
20:57 psch basically, whitespace before punctuation
20:57 vendethiel psch: ooooh. Alright.
20:57 vendethiel That's just an habit because I'm french. Fixing.
20:58 R0b0t1 joined #perl6
21:01 psch i think you should add a basic OO introduction with examples though, otherwise methods probably don't make that much sense
21:02 vendethiel yeah, yeah.
21:02 _sri joined #perl6
21:04 lizmat_ joined #perl6
21:06 lestaway joined #perl6
21:09 lizmat joined #perl6
21:11 bluescreen100 joined #perl6
21:13 lizmat_ joined #perl6
21:13 cognominal joined #perl6
21:15 Akagi201_ joined #perl6
21:18 uniejo joined #perl6
21:20 woolfy joined #perl6
21:22 immortal joined #perl6
21:22 immortal joined #perl6
21:24 retupmoc1 joined #perl6
21:25 segomos_ joined #perl6
21:26 TimToady_ joined #perl6
21:26 amkrankr1leuen joined #perl6
21:26 firnsy_ joined #perl6
21:26 firnsy_ joined #perl6
21:26 petercom1and joined #perl6
21:26 FOAD_ joined #perl6
21:27 apejens_ joined #perl6
21:27 pecastro_ joined #perl6
21:32 stux joined #perl6
21:34 uniejo joined #perl6
21:36 hugme joined #perl6
21:37 sjohnson joined #perl6
21:37 muraiki joined #perl6
21:38 yakudza joined #perl6
21:39 go|dfish joined #perl6
21:41 araujo joined #perl6
22:01 uniejo joined #perl6
22:01 virtualsue joined #perl6
22:02 itz joined #perl6
22:02 BenGoldberg joined #perl6
22:10 rurban1 joined #perl6
22:19 tadzik Mouq: thanks :)
22:21 psch smartmatch tr/// returns the distance now \o/
22:21 psch i'm not really happy with my implementation though
22:21 psch (also, it's not yet PR-ready, tr/// against implicit $_ doesn't return the number of changed characters)
22:24 psch but the fact that a stand-alone tr/// doesn't do what it should might mean i've been doing it wrong all along
22:30 Mouq ++psch :)
22:30 mr-foobar lol
22:30 Mouq tadzik: np :)
22:31 * mr-foobar oops, wrong channel
22:36 BenGoldberg m: .ord.say for "ρ℮гןб".comb; .&uniname.say for "ρ℮гןб".comb
22:36 camelia rakudo-moar 8de0fd: OUTPUT«961␤8494␤1075␤1503␤1073␤GREEK SMALL LETTER RHO␤ESTIMATED SYMBOL␤CYRILLIC SMALL LETTER GHE␤HEBREW LETTER FINAL NUN␤CYRILLIC SMALL LETTER BE␤»
22:36 orafu joined #perl6
22:40 vendethiel psch: would you mind telling me what you think about the section I added ?
22:40 vendethiel I kinda think I'm not doing a good job at explaining at all
22:42 rurban1 joined #perl6
22:45 psch vendethiel: the progression seems ok to me
22:45 psch wording is a bit awkward in places, and habits are hard to break as we know ;)
22:46 vendethiel psch: don't you feel like I'm going all-out on totally unrelated stuff ?
22:46 vendethiel psch: you don't put a space before ! either, right?
22:47 psch vendethiel: yeah, 'Neat !' looks really weird to me :)
22:47 vendethiel (and the wording is awkward because I'm a terrible engrish speaker. I can try to pretend, but it falls off pretty quickly)
22:47 vendethiel oh, really :P ?
22:48 vendethiel I thought it was a saying
22:48 psch i mean 'Neat !' compared to 'Neat!' :)
22:48 vendethiel Oh :)
22:48 psch as a word it's fine, it fits with the tone you're writing in
22:48 psch similarly 'Great !'
22:48 vendethiel Alright, fixed those.
22:49 psch also, i think 'modelize' isn't really used anymore
22:49 psch and you used '(to) model' before, so you should stick with that
22:49 masak '♞, #perl6
22:50 psch night masak
22:50 Ben_Goldberg joined #perl6
22:50 psch vendethiel: in general, i think explaining perl6 for people without any programming knowledge can't be easy unless you constrain yourself to specific concepts you want to teach
22:51 vendethiel psch: do you think I'm going in the wrong direction ?
22:51 vendethiel Or, other people here, for that matters.
22:51 psch not the wrong direction per se, but the nature of the beast just means that many sub-concepts that apply to the concepts you want to teach also apply to other concepts
22:52 psch i.e. the part about 'is rw'
22:52 vendethiel which is definitely why I feel like I'm going all out.
22:52 vendethiel yeah, don't wanna talk about containers
22:52 psch you need to show it for mutable attributes, but you don't have to show it for lvalue subs
22:52 psch so that shouldn't come yet, imho
22:52 vendethiel I'll just leave the "Important" part then
22:52 vendethiel as a "note"
22:53 psch ...that was poor wording on my part; your &increment isn't actually an lvalue sub :)
22:54 vendethiel I'll start writing the XinYminutes tomorrow, then, that should make my vision clearer
22:55 Mouq vendethiel++
22:55 psch vendethiel++
22:55 BenGoldberg m: say 3 ∗ 5;
22:55 camelia rakudo-moar 8de0fd: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Sl28DuGaGVâ�¤Two terms in a rowâ�¤at /tmp/Sl28DuGaGV:1â�¤------> [32msay 3 [33mâ��[31m∗ 5;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix or meta-infixâ�¤â€¦Â»
22:56 vendethiel g'night and thanks, #perl6
22:57 psch .u ∗
22:57 yoleaux U+2217 ASTERISK OPERATOR [Sm] (∗)
22:57 psch BenGoldberg: cheeky
22:57 psch .u *
22:57 yoleaux U+002A ASTERISK [Po] (*)
22:58 BenGoldberg Sorry, I just discovered the unicode confusables http://www.unicode.org/Public/security/revision-03/confusablesSummary.txt and I'm having too much fun :)
22:59 BenGoldberg m: say 1; say 2;
22:59 camelia rakudo-moar 8de0fd: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/2R80YMOgAcâ�¤Two terms in a rowâ�¤at /tmp/2R80YMOgAc:1â�¤------> [32msay 1[33mâ��[31m; say 2;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix or meta-infix…»
23:14 PerlJam joined #perl6
23:14 Alina-malina joined #perl6
23:18 jnap joined #perl6
23:19 lizmat_ yuck
23:19 psch hm, http://doc.perl6.org/routine/%2F%2F also doesn't work
23:19 lizmat the semi-colon is not what it seems to be
23:19 psch i guess that means the webserver doesn't have (an equivalent to) ALLOW_ENCODED_SLASHES set
23:20 woolfy left #perl6
23:20 SevenWolf joined #perl6
23:20 lizmat dinner&
23:21 jnthn .u 1
23:21 yoleaux U+0031 DIGIT ONE [Nd] (1)
23:22 jnthn Hm, so which char was it... :)
23:22 jnthn .u say 1;
23:22 yoleaux U+0020 SPACE [Zs] ( )
23:22 yoleaux U+0031 DIGIT ONE [Nd] (1)
23:22 yoleaux U+0061 LATIN SMALL LETTER A [Ll] (a)
23:22 Possum joined #perl6
23:23 jnthn o.O
23:23 psch .u ;
23:23 yoleaux U+037E GREEK QUESTION MARK [Po] (;)
23:23 psch jnthn: lizmat spoiled it? :P
23:24 psch although yoleaux should probably name all of them..?
23:24 BenGoldberg yoleaux seems to be limited to outputing three lines.
23:25 jnthn oh, duh :)
23:25 jnthn BenGoldberg: Yes, I was more confused by which 3 it picked :)
23:26 BenGoldberg .u say
23:26 yoleaux U+0DC1 SINHALA LETTER TAALUJA SAYANNA [Lo] (ශ)
23:26 yoleaux U+0DC2 SINHALA LETTER MUURDHAJA SAYANNA [Lo] (ෂ)
23:26 yoleaux U+0DC3 SINHALA LETTER DANTAJA SAYANNA [Lo] (ස)
23:26 * BenGoldberg headscratches.
23:26 BenGoldberg .u a
23:26 yoleaux U+0061 LATIN SMALL LETTER A [Ll] (a)
23:26 BenGoldberg .u s
23:26 yoleaux U+0073 LATIN SMALL LETTER S [Ll] (s)
23:27 BenGoldberg oh, I see, those were letters with 'say' in their names.
23:27 mr-foobar joined #perl6
23:29 lizmat joined #perl6
23:29 segomos_ does nativecall handle mapping objects to the perl6 class? as in if i have a c library that returns a c struct, do i need to implement the p6 class to inherit CStruct and have the same order or names or both?
23:30 jnthn Names don't matter; types and order does.
23:30 jnthn It's not about inheritance, but rather representation.
23:31 woolfy joined #perl6
23:32 BenGoldberg I hope your c library function doesn't actually return a struct ... returning a pointer to a struct seems a little more likely.
23:32 segomos_ so if i have a char* should i use a str or an opaquepointer ?
23:33 segomos_ BenGoldberg: it's libxml2 - it does return the pointer
23:33 jnthn Depends.
23:33 jnthn If it's actually string data, then str
23:35 zengargo1le TimToady: that clock is rather neat, needs U+2800 BRAILLE PATTERN BLANK between characters. otherwise they end up touching or squished together sometimes (at least in my terminal/font/...).
23:36 segomos_ so if i want to read a char* with other data i should probably use a Buf?
23:38 segomos_ actually it looks like i can't do much with it if i have opaquepointer
23:43 rurban1 joined #perl6
23:52 rindolf joined #perl6
23:54 Alina-malina joined #perl6
23:56 virtualsue joined #perl6
23:56 jnthn segomos_: Right; it's opaque. :) You may have better luck with a CArray[int8] or so.
23:59 jnthn sleep &

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

Perl 6 | Reference Documentation | Rakudo