»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:00 keusej left 00:05 keusej joined 00:06 sufrostico left
ely-se ZoffixWin: github.com/rightfold/Inline-FALSE/...ne/FALSE.t :) 00:08
00:08 emdashcomma_ left
ZoffixWin ely-se, there's Test::Output :} 00:09
ely-se :O
00:09 emdashcomma joined
ely-se Now the slang part. :P 00:09
ZoffixWin I forget which state it's in though... I recall I was trying to make it capture output from Test.pm6 and wrote IO::MiddleMan just for that... and then I went on vacation :)
ely-se, cool, I wanna see the slang part :)
ely-se Also not sure whether I'll do the inline assembly part. 00:10
Would be fun but difficult.
00:14 secwang left
sortiz m: say Cursor.^methods 00:31
camelia rakudo-moar fb0a13: OUTPUT«Method 'gist' not found for invocant of class 'NQPRoutine'␤ in block <unit> at /tmp/8POc9k7lYQ line 1␤␤»
sortiz ?!?!
00:31 Sgeo_ joined, Sgeo left
sortiz What is a Cursor? 00:32
00:33 leont left
ely-se m: Cursor.WHY.say 00:34
camelia rakudo-moar fb0a13: OUTPUT«(Any)␤»
ely-se nobody knows!
sortiz Is something regex related! 00:35
ely-se m: sub f { 1.List }; f.perl.say
camelia rakudo-moar fb0a13: OUTPUT«(1,)␤»
ely-se m: sub f { 1.List }; f eqv 1
camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kj8HJBJej9␤Undeclared routine:␤ eqv used at line 1␤␤»
ely-se m: sub f { 1.List }; say f eqv 1 00:36
camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Q3oJNeyMmf␤Undeclared routine:␤ eqv used at line 1␤␤»
ely-se m: sub f { 1.List }; say(f() eqv 1)
camelia rakudo-moar fb0a13: OUTPUT«False␤»
00:37 Skarsnik left
ely-se Is there a slang creation guide? 00:37
00:37 pierre-vigier left
sortiz Nope, but some examples in ecosystem, see Slang:* 00:38
s/:/::/
ely-se ok :) 00:40
00:41 mscha left, musiKk left 00:42 richi235 left 00:43 richi235 joined
sortiz Cursor has a page in docs/Types, but only to say "Internal state of the regex engine...", ok. 00:45
00:50 alpha123 joined 00:53 RabidGravy left 00:57 araujo_ joined 00:59 araujo__ left, awesomess3 joined
awesomess3 Failed running /usr/bin/perl Configure.pl 00:59
do I need to apt-get install some more gcc libraries or something?
probing whether your compiler thinks that it is gcc Can't compile simple gcc probe, so something is badly wrong at build/probe.pm line 92. 01:00
ZoffixWin do you have build-essential?
01:00 araujo__ joined
awesomess3 aha! that was it 01:01
01:02 araujo_ left
awesomess3 the building froze at "Stage parse" 01:05
oh there we go it's doing something now
geekosaur parse is pretty slow currently, yes 01:06
sortiz, Cursor is an internal implementation detail that I don't think is supposed to be visible, but due to known bugs sometimes is? 01:08
(hence the errors referring to nqp things, which are internal details) 01:09
dalek osystem/rightfold-patch-1: 6e3cc66 | rightfold++ | META.list:
Add Inline::FALSE

See github.com/rightfold/Inline-FALSE
01:11
01:11 araujo_ joined 01:12 araujo__ left 01:13 jack_rabbit joined
sortiz geekosaur, Thank you. IMO that class should inside a Internal package, if only to avoid trip over it. 01:15
s/a/an/
01:16 pjcj left
geekosaur well, it is inside a internal package (nqp). but if one leaks out somehow, better to provide some information about what it is than none at al 01:16
othrwise debugging such leaks becomes rather difficult 01:17
sortiz m: say Global.WHAT
camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CuAQXyxWGo␤Undeclared name:␤ Global used at line 1␤␤»
sortiz m: say Cursor.WHAT 01:18
camelia rakudo-moar fb0a13: OUTPUT«(Cursor)␤»
geekosaur hm. no, I don't think thats supposed to be there
but I am also be confused about where Cursor sits; possibly it's exposed for a reason (to let you do something clever with regexes) 01:19
(in which case maybe it should be a MONKEY)
TimToady Cursor is the part of Grammar that tracks position during parsing
all grammars and regex derive from Cursor
awesomess3 so I did `panda install Task::Star' and it doesn't even say how many packages it's gonna install :/ :( :'( 01:20
sortiz But need to seat in GLOBAL:: ?
TimToady nothing much is in GLOBAL unless you put it there 01:21
m: say GLOBAL::.keys
camelia rakudo-moar fb0a13: OUTPUT«()␤»
geekosaur m: say OUTER::.keys 01:22
camelia rakudo-moar fb0a13: OUTPUT«()␤»
geekosaur heh
01:23 ely-se left
sortiz So why is visible at this level? 01:24
TimToady m: say grammar { }.^mro
camelia rakudo-moar fb0a13: OUTPUT«((<anon|72129712>) (Grammar) (Cursor) (Any) (Mu))␤»
TimToady for the same reason Any and Mu are
sortiz Ok, I understand now. Thanks! 01:25
01:26 awesomess3 left 01:30 pierre-vigier joined 01:31 BenGoldberg left, yqt left 01:32 BenGoldberg joined 01:39 psy_ left
dalek osystem: 1a0a939 | (Pierre VIGIER)++ | META.list:
Add AttrX::Lazy

See github.com/pierre-vigier/Perl6-AttrX-Lazy
01:51
osystem: 21303d7 | (Zoffix Znet)++ | META.list:
Merge pull request #133 from pierre-vigier/master

Add AttrX::Lazy
osystem: 6e3cc66 | rightfold++ | META.list:
Add Inline::FALSE

See github.com/rightfold/Inline-FALSE
01:52
osystem: 5307b79 | (Zoffix Znet)++ | META.list:
Merge pull request #134 from perl6/rightfold-patch-1

Add Inline::FALSE
ZoffixWin pierre-vigier, umm... what happened to your repo? 01:53
Oh, never mind\ 01:54
pierre-vigier ?
what do you mean?
Hi #perl6 01:55
dalek osystem: 25d4255 | (Zoffix Znet)++ | META.list:
Fix URL for pierre-vigier/Perl6-AttrX-Lazy
ZoffixWin You renamed the repo after adding a URL to META.list
01:56 colomon left, colomon joined
pierre-vigier hum, really, let me check 01:56
ZoffixWin I already fixed it 01:57
pierre-vigier sorry :( 01:58
ZoffixWin I'll never forgive you! :)
01:58 laz78 joined 02:03 autark left 02:04 AlexDaniel joined 02:10 mprelude left, mprelude joined 02:17 adu joined 02:20 psy_ joined 02:24 laz78 left 02:30 laz78 joined 02:31 pierre-vigier left 02:42 secwang joined 02:44 pierre-vigier joined 02:49 molaf_ joined 02:51 Herby_ joined
Herby_ Good evening, everyone! 02:51
o/
adu hi
how are you?
Herby_ I'm doing well! How you doing? 02:52
adu I'm in a cold place
but I have internet! :)
Herby_ You in that big storm that the northeast US is getting?
adu en.wikipedia.org/wiki/January_2016...nter_storm 02:53
it's even on Wikipedia!
:)
02:53 molaf left
Herby_ I'm hanging out here in Colorado. Was actually in the 50s today! 02:53
adu nice
02:54 rindolf left
adu Herby_: so any Perl6-specific questions? 02:54
Herby_ At the moment, no. Just trying to brainstorm for a simple project to learn Perl 6
I've worked my way through the intro tutorial
adu I bought several bottle of wine before the storm, so I'm quite happy
Herby_ red? 02:55
adu Herby_: do you want to learn correspondances or uniquenesses?
white, and hard apple cider
Herby_ ehhh, not sure of the difference!
adu Herby_: if you wanted to learn how to do what you do in other languages in perl6, then do something like design a filesystem api 02:56
Herby_: if you wanted to learn things that are uniquely describable in perl6, then try and implement something like csv from scratch
ZoffixWin :S
Herby_ that sounds a tad beyond my current knowledge/skills! 02:57
adu Herby_: in every language, you're going to have a Directory class, a File class, a Node class that is a superclass, etc.
Herby_ I'd like to start simpler, with learning OO programming through Perl 6
adu Herby_: oh, so you want to learn programming
Herby_ yesss
adu Herby_: why are you starting with Perl6? 02:58
Herby_ I have a grasp of conditional statements, workflow etc
I'm not
I've toyed with PYthon and Perl 5
but haven't gone beyond the basics
purely as a hobby
adu Herby_: programming is about rules, and in ideal circumstances, math
math has something that programming doesn't: "referential transparency" 02:59
in other words, if x = 5, then x = 5 for all of time, that is, anytime you see x, you can replace it with 5
Herby_: one concept that is pretty universal is OOP 03:00
in OOP, there are methods (which is the OOP word for function), and classes (which are a description of fields + methods, where field is an OOP word for variable attached to an object) 03:01
03:01 colomon left
adu Herby_: let me know if I'm talking too much 03:01
Herby_ Nope, I'm following :)
adu Herby_: in perl6, there are many different kinds of methods: sub, submethod, method, regex, token, rule, etc 03:02
Herby_: there are also many different kinds of classes, I only know of 2: classes and grammars 03:03
03:03 secwang left
adu Herby_: a collection of classes is generally called a "module" (Java calls them packages), Perl6 also has these 03:03
C++ calls them "namespaces" 03:04
03:04 secwang joined
Herby_ ok 03:04
03:04 colomon joined 03:05 alpha123 left
adu Java enforces a 1-to-1 correspondance between Classes, Packages, and Files, but Perl6 doesn't enforce this 03:05
you can have many classes in a file
you can have many modules in a file
Herby_: there are several things that could probably propell your programming career 03:06
(1) www.checkio.org/
(2) rosettacode.org/wiki/Rosetta_Code 03:07
Herby_ ok, let me bookmark
adu (3) projecteuler.net/archives
(4) oeis.org/
(1) is a programming game 03:08
(2) is a dictionary of algirhthms with other languages intermixed
(3) is challenges that will improve your problem solving skills
and (4) are simple patterns similar to (3) like fibonacci and factorials 03:09
03:10 araujo_ left, araujo_ joined
ZoffixWin wishes CodeEval added Perl 6 :( 03:13
Contacted them. They said they won't.
Herby_ they are threatened by the beauty of the language?
03:15 araujo_ left 03:16 araujo joined, araujo left, araujo joined 03:21 BenGoldberg left 03:22 secwang left
lucs shell('exit 42', :err).err.close; # Doesn't capture :err, and prints 「The spawned process exited unsuccessfully (exit code: 42)⋯」 03:25
my $x = shell('exit 42', :err).err.close; # Captures sorrectly, prints nothing, as it should :/
03:25 secwang joined
lucs A variation on rt.perl.org/Public/Bug/Display.html?id=125757 03:26
adu ZoffixWin: CodeEval sounds cool!
lucs having found that assignment work-around for his code, goes to bed 03:27
ZoffixWin Yeah, and companies post challenges and if you pass them, can apply for a position. At least in theory, but I imagine it makes it easier to get rid of completely incompetent coders fast. 03:28
03:28 araujo_ joined 03:30 araujo_ left, araujo_ joined 03:31 araujo left 03:38 pierre-vigier left 03:41 kris joined 03:42 kris left 03:43 noganex joined 03:44 secwang left
AlexDaniel huggable: exitcode :is: rt.perl.org/Public/Bug/Display.html?id=125757 03:45
huggable AlexDaniel, Added exitcode as rt.perl.org/Public/Bug/Display.html?id=125757
03:46 noganex_ left 03:51 sortiz left 03:52 secwang joined 03:56 secwang left 03:57 Peter_R is now known as Guest19075 03:58 Peter- is now known as Peter_R
Herby_ ok. Question: I want to create a class called "Customer". The customer has a name, and starts with $balance = 0 03:59
how do I go about setting balance = 0 for each new customer object created?
if that makes sense
well, when a customer object is created, initialize the balance as 0 04:01
04:02 adu left
AlexDaniel m: class Customer { has $.balance = 42 }; say Customer.new.balance 04:02
camelia rakudo-moar fb0a13: OUTPUT«42␤»
AlexDaniel Herby_: ↑ ?
Herby_ Wow, ok. That simple? Then I can add a method to the Class, so that the customer can make a deposit and it will update $balance?
AlexDaniel m: class Customer { has $.balance = 42; method buy-beer { $!balance -= 10 } }; my $c = Customer.new; $c.buy-beer; say $c.balance 04:04
camelia rakudo-moar fb0a13: OUTPUT«32␤»
Herby_ Sweet, thanks!
AlexDaniel yeah, it is really short in Perl 6
revhippie what unit is the balance in? seems like a pricey beer in the US 04:05
AlexDaniel revhippie: in bottles
Hotkeys lol
Herby_ One more question while you're helping :) 04:06
AlexDaniel empty bottles I mean
Herby_ how would I adjust that if I want the customer class to require a name when the object is created? 04:07
my $c = Customer.new("Jimmy")
and jimmy would start with his balance of zero
04:07 kid51 left
AlexDaniel m: class Customer { has $.name; has $.balance = 42; method buy-beer { $!balance -= 10 } }; my $c = Customer.new(name => ‘Larry’); say $c.name 04:08
camelia rakudo-moar fb0a13: OUTPUT«Larry␤»
Herby_ I'm poking my way through perl6maven tutorial on OO but its going on 4 years old, and its pretty brief
would that let you create a Customer object without passing it a name?
Hotkeys make sure you put 'is required' on name
Herby_ ah ok
yeah, thats what I was curious about
AlexDaniel Hotkeys: right. Good point
Hotkeys I think
is it 'is required'
I can't remember
yeah it is 04:09
AlexDaniel yes
Herby_ m: class Customer { has $.name is required; has $balance = 0; method deposit { $!balance += 10 } }; my $c = Customer.new( name => 'James' ); say $c.name; 04:10
camelia rakudo-moar fb0a13: OUTPUT«James␤»
Herby_ m: class Customer { has $.name is required; has $balance = 0; method deposit { $!balance += 10 } }; my $c = Customer.new; say $c.name;
camelia rakudo-moar fb0a13: OUTPUT«The attribute '$!name' is required, but you did not provide a value for it.␤ in block <unit> at /tmp/Ay8_b8IHuU line 1␤␤»
Herby_ great
m: class Customer { has $.name is required; has $balance = 0; method deposit { $!balance += 10 } }; my $c = Customer.new( name => 'James' ); say $c.name; $c.deposit; say $c;
camelia rakudo-moar fb0a13: OUTPUT«James␤Customer.new(name => "James")␤»
Herby_ m: class Customer { has $.name is required; has $balance = 0; method deposit { $!balance += 10 } }; my $c = Customer.new( name => 'James' ); say $c.name; $c.deposit; say $c.balance; 04:11
camelia rakudo-moar fb0a13: OUTPUT«James␤Method 'balance' not found for invocant of class 'Customer'␤ in block <unit> at /tmp/hXRrVoE9fY line 1␤␤»
Herby_ m: class Customer { has $.name is required; has $!balance = 0; method deposit { $!balance += 10 } }; my $c = Customer.new( name => 'James' ); say $c.name; $c.deposit; say $c.balance;
camelia rakudo-moar fb0a13: OUTPUT«James␤Method 'balance' not found for invocant of class 'Customer'␤ in block <unit> at /tmp/tq0rcNMa1v line 1␤␤»
Herby_ ?
04:11 colomon left
AlexDaniel yeah, it has to be $.balance 04:11
otherwise you don't get public getter
Herby_ m: class Customer { has $.name is required; has $.balance = 0; method deposit { $.balance += 10 } }; my $c = Customer.new( name => 'James' ); say $c.name; $c.deposit; say $c.balance;
camelia rakudo-moar fb0a13: OUTPUT«James␤Cannot assign to an immutable value␤ in method deposit at /tmp/5TMKtXUmE1 line 1␤ in block <unit> at /tmp/5TMKtXUmE1 line 1␤␤»
AlexDaniel $balance is probably equivalent to $!balance 04:12
Herby_ i'm hosing something up
m: class Customer { has $.name is required; has $.balance = 0; method deposit { $!balance += 10 } }; my $c = Customer.new( name => 'James' ); say $c.name; $c.deposit; say $c.balance;
camelia rakudo-moar fb0a13: OUTPUT«James␤10␤»
Herby_ there we go
not positive I understand when/where to use '.' or '!'
AlexDaniel yeah this is explained in one of the traps
04:12 Psyche^ joined
AlexDaniel huggable: traps 04:12
revhippie hmm. the error earlier referred to $!name, though. mild confusion.
huggable AlexDaniel, doc.perl6.org/language/traps
AlexDaniel doc.perl6.org/language/traps#Assig...attributes 04:13
revhippie: yeah, I'm doing the wrong thing. Looking at the code instead of reading the error :) 04:14
04:14 treaki__ joined
revhippie AlexDaniel: $.foo is just shorthand for $!foo-with-accessors, right? 04:14
AlexDaniel revhippie: yeah 04:15
Herby_ Alex, in that 'trap's link that huggable posted, it shows using 'self' in class methods 04:16
is that needed?
or rather, when is that needed?
AlexDaniel Herby_: if you want to get the same object when using methods 04:17
04:17 Psyche^_ left 04:18 treaki_ left
AlexDaniel m: class Foo { has $.x = 5; method bar { $!x *= 2; self } }; say Foo.new.bar.bar.bar.bar.bar 04:18
camelia rakudo-moar fb0a13: OUTPUT«Foo.new(x => 160)␤»
AlexDaniel m: class Foo { has $.x = 5; method bar { $!x *= 2 } }; say Foo.new.bar.bar.bar.bar.bar
camelia rakudo-moar fb0a13: OUTPUT«Method 'bar' not found for invocant of class 'Int'␤ in block <unit> at /tmp/RZHGCDNoQH line 1␤␤»
AlexDaniel not necessary unless you really mean it 04:19
Herby_ Ok, think I get that
AlexDaniel though otherwise method “double” in that example is going to return some garbage
that is, it does “return $!y *= 2;” which is hardly something meaningful 04:20
so in that particular case it might be a good idea to return self 04:21
another option is to return nothing…
Hotkeys Unrelated to current discussion 04:22
but
I can't build rakudo on windows 7 after this commit github.com/rakudo/rakudo/commit/58...3bd2127f95
including and after*
actually 04:25
hold on
04:26 adu joined
AlexDaniel Herby_: perhaps later it will become a good style to return self when you don't want to return anything 04:27
Herby_ thanks for the tips, Alex. I'm working my way through this python OO tutorial and trying to transfer it into Perl 6: www.jeffknupp.com/blog/2014/06/18/...ogramming/ 04:28
Hotkeys I'll make the claim that it's after github.com/rakudo/rakudo/commit/79...33487a5cbf
since that's where my current problem starts
AlexDaniel Herby_: have you tried doc.perl6.org/language/classtut already? 04:29
Hotkeys C:\Users\John\rakudobrew\moar-7934ffe7b9538d9bbf188f821964ef33487a5cbf\install/i
nclude/moar\platform/inttypes.h(2) : fatal error C1083: Cannot open include file
: 'msinttypes/inttypes.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\amd64\cl.EXE"' : return code '0x2'
oh oops
didn't mean to do that
sorry chat
anyway that's the error 04:30
Herby_ AlexDaniel, I have but it seems to go from 0 to 100 pretty quick. I'm
I'm still struggling with the basics of OO
Hotkeys hoelzro: there's the issue I meant the other day if you're around 04:31
AlexDaniel haha, here is a quiz 04:32
m: class Foo { has $!.name }; say Foo.new
camelia rakudo-moar fb0a13: OUTPUT«Foo.new␤»
AlexDaniel how does it work? :)
04:32 araujo__ joined
Herby_ creates an object of type Foo, with no name? 04:33
Hotkeys this issue is too deep for me
04:34 araujo__ left
Hotkeys seems like it goes all the way down to moarvm 04:34
04:34 xinming_ joined, araujo__ joined
AlexDaniel Herby_: !. part is tricky 04:34
m: class Foo { has $!.name }; say Foo.new.^attributes 04:35
camelia rakudo-moar fb0a13: OUTPUT«(Mu $!!)␤»
04:35 araujo_ left, xinming left
Herby_ you done lost me :) 04:36
04:36 araujo__ left, araujo__ joined
AlexDaniel m: class Foo { has $.name }; say Foo.new.^attributes 04:36
camelia rakudo-moar fb0a13: OUTPUT«(Mu $!name)␤»
AlexDaniel m: class Foo { has Str $.name }; say Foo.new.^attributes 04:37
camelia rakudo-moar fb0a13: OUTPUT«(Str $!name)␤»
AlexDaniel but wtf is $!. …
04:38 araujo_ joined
Hotkeys oh 04:39
well
I found a solution to the problem
Herby_ do tell 04:40
AlexDaniel Hotkeys: downgrade? :)
Hotkeys I copied the msinttypes folder from somewhere in nqp includes to /install/include
and now it works fine
but how do I commit this change 04:41
04:41 araujo__ left
adu is cold 04:41
Hotkeys or PR it rather
Herby_ adu, drink wine to warm up 04:42
Hotkeys I need someone who knows about the build process
adu Herby_: done, now what? 04:43
Hotkeys github.com/MoarVM/MoarVM/blob/3ffc...inttypes.h 04:44
this file tries to do msinttypes/inttypes.h for windows
Herby_ adu: now embrace the warmth
Hotkeys but it can't find it
04:44 revhippie left
Hotkeys oh is that not the current location 04:44
oops 04:45
yeah it is nvm 04:46
Herby_ Ok. next level question: now that I have a bunch of Customer objects... how do I create another class called Accounts, that contains all my Customer objects?
at a high level 04:47
adu Herby_: I have 4 bottles left, I can email one of them to you :)
Herby_: I think you want a list 04:48
Hotkeys oh
the problem is here github.com/MoarVM/MoarVM/commit/ba...f1ef94cd25 I *think*
adu Herby_: in that case you generally want (A) The account class to be responsible for creating customers, or (B) the customer is given an account to "register" with 04:49
AlexDaniel Herby_: do you want it to happen automatically?
Herby_: and are you sure that it has to be a separate class? 04:50
adu Herby_: also, I wouldn't call it "Accounts" I would call the classes "Customer" and "CustomerFactory"
Herby_ Well. Lets say I wanted to give all my Customers a $200 bonus deposit
adu Herby_: that sounds like a method on CustomerFactory 04:51
CustomerFactory.universal_bonus(200)
Herby_ how would CustomerFactory know which Customers exist?
not sure if I'm asking that
correctly
adu Herby_: I assume that CustomerFactory as created every Customer 04:52
Herby_: so every time it creates a customer, it remembers it
Herby_ hmmm
adu Herby_: so you just iterate through every Customer that the CustomerFactory has created
Herby_: another option is SQL 04:53
skids Usually "Factory" connotes something that makes classes, AFAIK.
adu skids: perhaps there are many different types of customers... 04:54
AlexDaniel m: class Customer { my @all; submethod BUILD() { @all.push: self }; method customers { return @all } }; Customer.new; Customer.new; say Customer.customers
camelia rakudo-moar fb0a13: OUTPUT«[Customer.new Customer.new]␤»
skids should probably backlog some.
AlexDaniel as easy as that
adu B2BCustomer, SmallCustomer, MultiNationalCustomer, DistributorCustomer, ...
Herby_ I think I get that AlexDaniel. What is the gist of submethod BUILD? 04:55
adu, I'm looking at learning a little SQL too :)
adu Herby_: C++ has 2 "special" methods, creation and destruction, I think Perl6 has more than 2 special methods 04:56
skids Herby_: It's for initializing attributes, when plain old initializers are not enough.
adu Herby_: what you're talking about is simple with SQL
AlexDaniel can anybody tell me how to have both custom BUILD and the default one? 04:57
that is, if I want to run some code on object creation yet not to set fields manually 04:58
Herby_: BUILD is… like a constructor 04:59
skids m: class Customer { my @all; method new(|c) { my $ret; @all.push($ret = self.bless(|c)); $ret; }; method customers { return @all } }; Customer.new; Customer.new; say Customer.customers # you don't need build just to set a class var
camelia rakudo-moar fb0a13: OUTPUT«[Customer.new Customer.new]␤»
AlexDaniel skids: not something I'd like to see in the code… 05:00
skids m: class Customer { my @all; method new(|c) { @all.push(self.bless(|c)); }; method customers { return @all } }; Customer.new; Customer.new; say Customer.customers # you don't need build just to set a class var 05:01
camelia rakudo-moar fb0a13: OUTPUT«[Customer.new Customer.new]␤»
skids I guess the self is good enough to push already.
Oh but you'd need to break off the actual return value.
m: class Customer { my @all; method new(|c) { @all.push(self.bless(|c))[*-1]; }; method customers { return @all } }; Customer.new.say; Customer.new.say; say Customer.customers 05:02
camelia rakudo-moar fb0a13: OUTPUT«Customer.new␤Customer.new␤[Customer.new Customer.new]␤»
Herby_ lol I'm lost :)
adu what's the difference between new() BUILD() and BUILDALL()?
skids BUILDALL by default is what calls all the BUILDs. New does not have an actual object until bless is called. Build has an allocated object. 05:03
adu so in the Python world, new is __new__ and BUILD is __init__ 05:04
zostay goodness gracious sakes alive... i just discovered @x.combinations and crapped my pants... perl6 rocks
adu zostay: what's combinations? 05:05
zostay m: my @x = 1 .. 9; say @x.combinations(2) 05:06
camelia rakudo-moar fb0a13: OUTPUT«((1 2) (1 3) (1 4) (1 5) (1 6) (1 7) (1 8) (1 9) (2 3) (2 4) (2 5) (2 6) (2 7) (2 8) (2 9) (3 4) (3 5) (3 6) (3 7) (3 8) (3 9) (4 5) (4 6) (4 7) (4 8) (4 9) (5 6) (5 7) (5 8) (5 9) (6 7) (6 8) (6 9) (7 8) (7 9) (8 9))␤»
adu skids: yeah, a class var is how I would do it in Python
zostay gives you all the possible pick-2 combinations or pick-n or with no n pick-n for all n
adu zostay: oh, that's like Haskell list comprehensions
zostay great, i'm glad we stole that too then 05:07
adu zostay: Haskell list comprehensions are pretty cool
Herby_ skids
in your example 'method new(|c)'.... what does '|c' do? 05:08
skids Herby: it is used to move the arguments to new over to bless. It is called a Capture.
adu zostay: also, you can do the same thing with a for-loop
skids m: sub f(|c) { c.perl.say }; f(1,2,3,:named); 05:09
camelia rakudo-moar fb0a13: OUTPUT«\(1, 2, 3, :named)␤»
adu Herby_: do you know any other languages? 05:10
AlexDaniel adu: wow, it looks so complicated github.com/rakudo/rakudo/blob/a282...List.pm#L9
Herby_ i have very basic knowledge of python and perl
conditional statements, loops etc
this 'bless' stuff is kind of new to me
skids AleDaniel: It has to be lazy, that's how lazy things are implemented under the hood, if they don;t just hang of another existing lazy construct. 05:11
AlexDaniel skids: yeah I understand 05:12
adu Herby_: a Perl6 Capture is similar to Python's (*args, **kwargs)
Herby_ k 05:13
adu Herby_: "bless" is unique to Perl5 and Perl6, from what I understand it magically transforms data into "objects"
zostay or if you don't care about what other languages do, just think of a capture as the way you can say "take whatever arguments they pass and capture them, i don't care what they actually are" 05:14
you can look into the capture to see what they are in case you care, but you don't have to care
Herby_ gotcha
adu zostay: well, at least Python distinguishes between positional and keywords
zostay if you just want to pass arguments on, it's the easiest way
Perl6 distinguishes between positionals and named arguments too
AlexDaniel but still, how can I run some code during the object initialization (e.g. when the constructor should normally run)?
without destroying autogenerated BUILD 05:15
and without messing around with bless
do I want too much? I don't think so. In fact, I remember that there was a way to do that 05:16
it was hidden but at least it existed
skids AlexDaniel: call a sub durin initialzation of an attribute -- it's sleazy but a reliable workaround. 05:18
AlexDaniel skids: I don't think that 「self」 is available at that point 05:19
skids It is, actually.
AlexDaniel m: class Foo { $!x = say self }; Foo.new
camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/O1U2W1Bamk␤Variable $!x used where no 'self' is available␤at /tmp/O1U2W1Bamk:1␤------> 3class Foo { $!x7⏏5 = say self }; Foo.new␤»
AlexDaniel m: class Foo { $!x = zzz; method zzz { say self } }; Foo.new 05:20
camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CSZUcwlTNL␤Variable $!x used where no 'self' is available␤at /tmp/CSZUcwlTNL:1␤------> 3class Foo { $!x7⏏5 = zzz; method zzz { say self } }; Foo.n␤»
AlexDaniel skids: ?
skids Hrm, hold on let me find that.
AlexDaniel ah
m: class Foo { has $!x = zzz; method zzz { say self } }; Foo.new
camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pZfArlQ7w2␤Undeclared routine:␤ zzz used at line 1␤␤»
AlexDaniel m: class Foo { method zzz { say self }; has $!x = zzz }; Foo.new 05:21
camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/k3JRBXgfgl␤Undeclared routine:␤ zzz used at line 1␤␤»
AlexDaniel that's not how you call methods, right? :)
zostay m: class A { has $x. = self.zzz; method zzz { say self } }; A.new 05:23
camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/OeSCXGqg9P␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/OeSCXGqg9P:1␤------> 3class A { has $x.7⏏5 = self.zzz; method zzz { say self } }; ␤»
zostay m: class A { has $.x = self.zzz; method zzz { say self } }; A.new
camelia rakudo-moar fb0a13: OUTPUT«A.new(x => Any)␤»
zostay stupid typo 05:24
05:24 lokien_ joined
AlexDaniel m: class A { has $.x = { say self }() }; A.new; A.new 05:25
camelia rakudo-moar fb0a13: OUTPUT«A.new(x => Any)␤A.new(x => Any)␤»
skids zostay++ 05:26
AlexDaniel this workaround does not really make me happy 05:27
skids Roles need some work.
And I expect that that will jog loose some things.
(the only real reason to *need* that workaround is for roles) 05:29
Hotkeys is there a moarvm channel? 05:34
skids irclog.perlgeek.de/moarvm/ 05:37
Hotkeys found it, thanks 05:38
05:39 WAAVSZC joined
Hotkeys oh 05:47
So it seems
the problem is simply that the rakudo moarvm version is out of date
05:48 kaare_ joined, Cabanossi left
Hotkeys Who do I talk to about getting the moar revision bumped 05:50
05:52 Cabanossi joined
Herby_ any more examples or tutorials on Perl 6 classes and objects? outside of doc.perl6.org/language/classtut#Co..._our_class 05:52
rather, any more recommended tutorials
05:58 ptolemarch joined
adu Herby_: I don't recommend tutorials, I recommend problems, problems that you may already know the solution to, maybe not in Perl6, but that's part of the fun 06:01
06:03 khw left
adu Herby_: and it doesn't have to be a hard problem, it could be really simple, like "count to 10" or "draw a box" 06:03
Herby_ yeah, I just need to try more problems 06:04
Hotkeys I made a pull request for a moar revision bump in perl6/nqp 06:05
adu one of the first things I do when learning a programming language (after HelloWorld) is implementing the "matrix determinant"
Hotkeys I wasn't sure entirely how the bump increments but it was more for increasing the commit than anything
in 2015.12-29-g8079ca5 what does the '29' indicate? 06:07
06:09 jme` left, Mokok joined
Hotkeys adventofcode.com/ has some fun problems 06:12
Herby_ yesss, I was having some fun with that over the holidays
Hotkeys could try and do them in p6
if you haven't already
Herby_ the few I could figure out, I did in p6. But I'm thinking I can look at other's solutions and see how I'd rewrite it in p6 06:14
06:23 adu left
Herby_ m: class Customer { has $!name; } my $c = Customer.new(name => 'Bob'); say $c.name; 06:23
camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1Blxq8QLJU␤Strange text after block (missing semicolon or comma?)␤at /tmp/1Blxq8QLJU:1␤------> 3class Customer { has $!name; }7⏏5 my $c = Customer.new(name => 'Bob'); sa␤ expecting any of:␤ …»
Herby_ m: class Customer { has $!name } my $c = Customer.new(name => 'Bob'); say $c.name; 06:24
camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dSD5ru_tnr␤Strange text after block (missing semicolon or comma?)␤at /tmp/dSD5ru_tnr:1␤------> 3class Customer { has $!name }7⏏5 my $c = Customer.new(name => 'Bob'); sa␤ expecting any of:␤ …»
Herby_ m: class Customer { has $.name } my $c = Customer.new(name => 'Bob'); say $c.name;
camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1UsgjtQCNe␤Strange text after block (missing semicolon or comma?)␤at /tmp/1UsgjtQCNe:1␤------> 3class Customer { has $.name }7⏏5 my $c = Customer.new(name => 'Bob'); sa␤ expecting any of:␤ …»
Herby_ I need to go to bed
m: class Customer { has $.name }; my $c = Customer.new(name => 'Bob'); say $c.name; 06:25
camelia rakudo-moar fb0a13: OUTPUT«Bob␤»
06:41 Mokok left 06:44 CIAvash joined 06:45 Herby_ left 06:47 maslan left
moritz Good monring. 06:56
07:00 AlexDaniel left 07:02 laz78 left 07:05 xtreak joined 07:07 hankache joined
hankache morning #perl6 07:07
07:14 laz78 joined 07:28 domidumont joined 07:29 lokien_ left 07:32 domidumont left 07:33 domidumont joined 07:36 laz78 left 07:46 ptolemarch left 07:50 araujo__ joined 07:52 araujo__ left, araujo__ joined, araujo_ left 07:59 pierre-vigier joined 08:14 cibs left 08:17 xinming_ left 08:19 darutoko joined
[Tux] csv-ip5xs 17.999 08:24
test 22.532
test-t 12.193
csv-parser 49.424
08:28 xinming joined
[Tux] Now that the dust on v6.c has settled and people start using perl6 (I hope), can I please draw your attention to the CRNL issue again, as it causes data loss 08:34
gist.github.com/Tux/1542d23b568508160329
I esp like to head jnthn's opinion on this 08:35
or should I RT this? 08:43
08:46 perl6newbee joined
DrForr .seen niner 08:48
yoleaux I haven't seen niner around.
hankache [Tux] I thing jnthn knows most about it 08:51
[Tux] I know he knows, but I want to know if there will be a solution, and if what/how
he also knows about core dumps in utf8-c8, but that has (for me) a lower priority 08:52
masak [Tux]: yes, please do RT it
[Tux]: I haven't studied the thing deeply, but it feels to me that part of the issue is that your data has both string nature (since you care about chars) and buffer nature (since you care about individual \r and \n bytes) at the same time 08:54
[Tux] I know, and Liz explained me a lot, but I think all we need is an option to leave NL/CR/CRNL unchanged as it had been up to the beginning of 2015-12 08:55
but that might be a shortsighted opinion
hankache there is something weird happening with travis
masak hankache: we should have some kind of CI testing of travis :P 08:56
DrForr istravisdownorisitjustme.com.
hankache masak method foo (Int $var where 0 .. 360) doesn't work on travis and says cannot modify an immutable range 08:57
although it works fine on local build
if you replace it with method foo (Int $var) {if 0 < $var < 360 ...........} then it works on travis 08:58
masak m: class C { method foo(Int $var where 0..360) { say "OH HAI" } }; .foo(45), .foo(1080) given C.new
camelia rakudo-moar fb0a13: OUTPUT«OH HAI␤Constraint type check failed for parameter '$var'␤ in method foo at /tmp/XbnFXRbPEa line 1␤ in block <unit> at /tmp/XbnFXRbPEa line 1␤␤»
Hotkeys I think it might be a good idea [Tux] 08:59
masak hankache: sounds very fishy. if you can, please investigate more
08:59 rindolf joined
Hotkeys we already have the option to explicitly use nl/cr/crnl 08:59
masak today's autopun spotting: twitter.com/AndyKindler/status/690...7638516737
Hotkeys why not a leave-it-be option 09:00
hankache masak this ^^ in travis when you call foo(45) says #cannot modify immutable range
[Tux] that was what I was looking for
moritz it seems like Text::CSV wants to operate on Codepoints, not on Graphemes
[Tux] Hotkeys, *what* is that option?
09:01 xtreak left
[Tux] moritz, I plan to use utf8-c8 for that 09:01
Hotkeys oh
uh
use newline :lf
etc.
[Tux] err, wrong :) => that is global/lexical. I need it as a IO attribute to an existing handle 09:02
and it should be alterable *after* the handle was opened
so a proces can be passed an open file handle, temporarily set/reset that option, process, reset to what it was and return 09:03
Hotkeys That's the only option I know of 09:04
not sure if what you're looking for is currently availabe
[Tux] I was aware of that, but it won't fly
Hotkeys I agree 09:05
actually 09:06
if you know there is going to be only one type
there's docs.perl6.org/routine/open#Newline_options
masak hankache: what Rakudo is travis using, then? the above is fb0a13. 09:07
Hotkeys [Tux]: I keep trying to tab complete your name with "tu(tab)" 09:08
darn brackets
09:08 kmel joined
[Tux] [Tux] is PC at home, Tux and |Tux| are at work and Tux is already taken by someone else on freenode :( 09:09
09:09 kmel left
Hotkeys ah 09:09
09:09 azawawi joined
azawawi good morning #perl6 09:09
[Tux] Hotkeys, the "problem" with the nl attribute is that I do not know what it is before I parse the (CSV) file(s) 09:10
Hotkeys right
[Tux] and Text::CSV also supports a mixture of line endings, as CSV does not require it to be consistent 09:11
09:11 kmel joined
[Tux] so «1,2,,4\r\n1,2,3,\r1,,3,4\n» is completely valid CSV for Text::CSV 09:11
09:11 hankache left 09:12 kmel left
masak [Tux]++ # bringing up a real problem with his code, sticking to his guns, being civil 09:13
Hotkeys: you need a better IRC client. irssi does tu<Tab> just fine 09:15
Hotkeys shh
09:16 hankache joined
hankache masak same on travis 09:16
Hotkeys I understand why having the logical newline thing is an alright idea, but there definitely needs to be the option to not translate them at all
[Tux]++
[Tux] rt.perl.org/Ticket/Display.html?id=127358 09:18
I hope to have that one as explanatory as possible without leaving important details
azawawi [Tux]++ 09:20
what's the best module for parsing HTML on Perl 6? 09:21
stmuk I've used HTML::Parser::XML 09:22
Hotkeys tomorrow I might actually start my work on contributing to the Lingua::* part of the ecosystem 09:30
like I've been saying I'd do for weeks
azawawi im scrapping www.imagemagick.org/api/magick-wand.php to get the C prototype + documentation to generate the POD and more nativecall methods for MagickWand :) 09:33
09:37 azawawi left
dalek p: 3656f4d | (John Spurr)++ | tools/build/MOAR_REVISION:
Bump MOAR_REVISION to fix windows building

There was a problem that stopped moar from working because it couldn't find msinttypes/inttypes.h, but that problem was fixed in this revision.
09:39
09:39 TEttinger left
Hotkeys Woo 09:42
09:44 telex left 09:46 telex joined
nine_ DrForr: I'm here 09:48
Hotkeys nine_: are you niner
nine_ Hotkeys: yes. I go by "niner" when "nine" as user name is already taken. 09:49
Hotkeys Ah
Well ty for the pull and the git knowledge
09:51 hankache left, azawawi joined 09:52 nine_ is now known as nine 09:54 drrho left, drrho joined
masak Hotkeys: ooc, what git knowledge? 09:56
10:00 drrho left, drrho joined
Hotkeys masak: the moar and nqp revisions are made with git describe 10:00
masak ah, yes 10:01
10:11 SCHAAP137 joined 10:13 leont joined 10:16 lnrdo joined, lnrdo left 10:17 hankache joined 10:22 pierre-vigier left, hankache left 10:23 pierre-vigier joined 10:24 RabidGravy joined 10:27 Mokok joined
Mokok Hello 10:27
10:28 ely-se joined
masak hi, Mokok 10:29
gfldex m: say "Hi Mokok!";
camelia rakudo-moar fb0a13: OUTPUT«Hi Mokok!␤»
masak m: say "Hi Mokok!".flip 10:31
camelia rakudo-moar fb0a13: OUTPUT«!kokoM iH␤»
Mokok m: say "Hi mask!".flip 10:33
camelia rakudo-moar fb0a13: OUTPUT«!ksam iH␤»
RabidGravy boom! 10:44
Hotkeys bang!? 10:45
ely-se ZoffixWin++
10:48 inwigilator joined
inwigilator hello 10:48
Hotkeys Hello inwigilator 10:49
inwigilator can I write something like next;? 10:51
10:52 araujo_ joined 10:53 araujo__ left
RabidGravy yes 10:53
DrForr m: for ^2 -> $i { next }
camelia ( no output )
inwigilator i need to replace smh like else { continue; } 10:55
DrForr Yes, as you can see, 'next' does indeed work. 10:58
inwigilator ok I got it
RabidGravy You may also want to see doc.perl6.org/language/phasers if you want to do things at different points of loop execution 10:59
also (and I'm not sure where this is documented) if you want to do "next" to a label then the next is typically a method on the label 11:02
m: OUTEST: for <a b c d e> -> $a { INNEST: for ( 0 .. 4 ) -> $b { say "$a - $b"; (Bool.pick ?? INNEST !! OUTEST).next; }} 11:04
camelia rakudo-moar fb0a13: OUTPUT«a - 0␤a - 1␤a - 2␤a - 3␤b - 0␤b - 1␤b - 2␤c - 0␤c - 1␤c - 2␤d - 0␤e - 0␤e - 1␤e - 2␤e - 3␤e - 4␤»
RabidGravy which is quite cute (but useless) 11:05
note also you can't use OUTER or INNER as labels (maybe it should warn about that)
inwigilator Use of Nil in string context in block <unit> at 1.1.46.pl6 line 9 11:08
RabidGravy "undefined" 11:10
inwigilator and line 9 is: loop (my $i=0; $i < @word_array.elems; $i++) {
line 9: loop (my $i=0; $i < @word_array.elems; $i++) {
ok 11:12
fixed :D
11:18 Relsak joined
inwigilator hey hey @arr = split("", "asd") first and last element is nil 11:19
ely-se m: my @xs = 1, 2, 3; my @ys = 1, 2, 3; @xs = @ys; say @xs === @ys; @xs := @ys; say @xs === @ys; 11:22
camelia rakudo-moar fb0a13: OUTPUT«False␤True␤»
inwigilator m: @arr = split("", "and"); say @arr[0]; 11:24
camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/wh38ctkt6u␤Variable '@arr' is not declared␤at /tmp/wh38ctkt6u:1␤------> 3<BOL>7⏏5@arr = split("", "and"); say @arr[0];␤»
inwigilator m: my @arr = split("", "and"); say @arr[0];
camelia rakudo-moar fb0a13: OUTPUT«␤»
inwigilator why NL? 11:25
ely-se newline
inwigilator I didn't put new line
ely-se you did
inwigilator how?
ely-se use print instead of say
inwigilator m: my @arr = split("", "and"); print @arr[0]; 11:26
camelia ( no output )
ely-se say appends a newline
inwigilator oh ok
but tell me now why no output
why it is nil?
m: my @arr = split("", "and"); print @arr[1];
camelia rakudo-moar fb0a13: OUTPUT«a»
inwigilator split should give me [a, n, d] array 11:27
11:30 pierre-vigier left
RabidGravy it doesn't 11:32
m: my @a = "and".comb(*); say @a[0]; 11:33
camelia rakudo-moar fb0a13: OUTPUT«Cannot call comb(Str: Whatever); none of these signatures match:␤ (Cool $: *%_)␤ (Cool $: Regex $matcher, $limit = { ... }, *%_)␤ (Cool $: Str $matcher, $limit = { ... }, *%_)␤ (Str:D $: *%_)␤ (Str:D $: Int:D $size, $limit = { ... …»
RabidGravy m: my @a = "and".comb(); say @a[0];
camelia rakudo-moar fb0a13: OUTPUT«a␤»
RabidGravy if you want to split into all the chars use comb
inwigilator ok thanks :)
RabidGravy, I tried unpack but reading perl6 documentation of rme is a bit difficult 11:34
RabidGravy unpack is "experimental" in this release as it is proposed that it be replaced with something "more 6-ish" 11:35
CIAvash m: my @a = 'and'.split('', :skip-empty); say @a[0];
camelia rakudo-moar fb0a13: OUTPUT«a␤»
RabidGravy for the most part the pack/unpack is a subset of that in perl 5 11:36
leont Is there any way for me to (dynamically) give a closure method a name? 11:38
method ($arg) is named($name) { ... } or some such? 11:39
RabidGravy yeah
er
m: my &foo = { say "foo" }; &foo.^set_name("zub"); say &foo'
camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/v7DBMq3mDj␤Two terms in a row␤at /tmp/v7DBMq3mDj:1␤------> 3oo" }; &foo.^set_name("zub"); say &foo7⏏5'␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ s…»
RabidGravy m: my &foo = -> { say "foo" }; &foo.^set_name("zub"); say &foo' 11:40
camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bPugD_pz4g␤Two terms in a row␤at /tmp/bPugD_pz4g:1␤------> 3oo" }; &foo.^set_name("zub"); say &foo7⏏5'␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ s…»
RabidGravy m: my &foo = -> { say "foo" }; &foo.^set_name("zub"); say &foo
camelia rakudo-moar fb0a13: OUTPUT«-> { #`(zub|70733024) ... }␤»
RabidGravy (so used to typing in the shell) 11:41
but that's only so it "knows its own name", I'm not sure you can use it 11:42
leont It's mainly to make debugging nicer, really 11:43
And to make ^methods say something sensible
RabidGravy :)
leont Now lets see if I can make a trait out of this 11:46
11:46 pierre-vigier joined 11:51 SCHAAP137 left 11:53 musiKk joined 11:57 ely-se left 12:01 felher left
leont What are the AUTOGEN methods I'm seeing in my ^methods? 12:02
jnthn leont: iirc, auto-generated proto methods (when multis were written without a proto)...but I thought they usually were set_name'd 12:03
m: class A { multi m() { } }; say A.^methods 12:04
camelia rakudo-moar fb0a13: OUTPUT«()␤»
jnthn oh, duh 12:05
m: class A { multi method m() { } }; say A.^methodsoh
camelia rakudo-moar fb0a13: OUTPUT«Method 'methodsoh' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤ in block <unit> at /tmp/FVxvbjGocn line 1␤␤»
leont Yeah, it seems defining a proto gets rid of a AUTOGEN
jnthn m: class A { multi method m() { } }; say A.^methods
camelia rakudo-moar fb0a13: OUTPUT«(m)␤»
jnthn Yeah, but there the generated proto is called m
So I wonder what code-path you're taking that loses the renaming :)
leont m: class A { multi method m() { } multi method m(Int) {} }; say A.^methods 12:06
camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tMI7PZ7QfL␤Strange text after block (missing semicolon or comma?)␤at /tmp/tMI7PZ7QfL:1␤------> 3class A { multi method m() { }7⏏5 multi method m(Int) {} }; say A.^method␤ expecting any of:␤ …»
leont m: class A { multi method m() { }; multi method m(Int) {} }; say A.^methods
camelia rakudo-moar fb0a13: OUTPUT«(m)␤»
leont Hmmmmm
jnthn That gets it right too
leont I do a compose at a later point, because I dynamically add some methods
Could it get lost there?
jnthn Do you add multi methods? Do they have a name?
leont Ah, yes. When I add the proto I suddenly see that multi in the list where I previously didn't 12:07
No I'm not adding multi methods dynamically
jnthn Hm
If you manage to boil it down to a smallish test case that reproduces the lack of renaming I'd be curious to see it. 12:08
Not that I'll have time to fix much for another week, but...
12:08 BenGoldberg joined
leont On it 12:09
12:10 xdoctor joined
RabidGravy I think I've seen it with ClassHOW methods 12:12
leont (it was on Path::Iterator, BTW) 12:16
12:28 Skarsnik joined, felher joined, Mokok left 12:31 treaki__ left 12:32 CIAvash left 12:37 ely-se joined 12:47 Actualeyes left, lokien_ joined 12:51 spider-mario joined 12:58 colomon joined 13:01 inwigilator left 13:05 kid51 joined 13:07 FROGGS joined
FROGGS o/ 13:07
leont I know I can do $object."$name"(|$capture), can I do the same but with a $method instead of a $name? 13:11
moritz leont: you can just invoke it 13:12
FROGGS leont: $method($invocant, ...)
moritz leont: $method($object, |$capture)
leont Ah, I see
FROGGS because it is ~~ Callable
RabidGravy thator $invocant.$method(...)
FROGGS are you sure? 13:13
RabidGravy I'm sure yes
FROGGS I was thinking this would not even parse right
leont I thought that gave an error, but apparently it didn't
jnthn yeah, $invocant.$method(...) works fine with $method is callable :) 13:14
13:14 Actualeyes joined
FROGGS aha 13:14
so we do an istype check while we parse?
RabidGravy that's why you have to put the quotes round it when it's a string rather than a method object
FROGGS hmmm, can we actually do an istype check? probably not 13:15
RabidGravy or that's how I've rationalised it in my brain anyhow
FROGGS RabidGravy: you are right
jnthn It's a syntactic distinction.
RabidGravy I used that all over the place in some module 13:16
jnthn It's a runtime error is $method is not something that knows how to be invoked
RabidGravy ah, so you could add a CALL-ME to a string to make it do "something else" in that case, never occurred to me 13:18
leont Signature doesn't really expose named arguments. Guess I have to extract that out of the params… 13:20
13:20 Actualeyes left
RabidGravy m: class Foo {}; my $a = "foo" but role { method CALL-ME(*@args) { say @args } }; Foo.new.$a("zub") 13:21
camelia rakudo-moar fb0a13: OUTPUT«[Foo.new zub]␤»
RabidGravy hahahaha
FROGGS yes, that's where I love Perl 6 :o)
things like routines are not hacks, they are based on real concepts that are properly implemented 13:22
so many nice things fall out of basic rules
13:23 hankache joined
FROGGS would love to work on Perl 6 full time... but then he's working for $dayjob on a Sunday -.- 13:24
RabidGravy files it away in the "things I can't immediately think of a use for" category 13:26
13:30 maslan joined 13:33 rindolf left 13:36 _mg_ joined
nine jnthn: I guess having MoarVM unmap bytecode files more predictably is out of the question? 13:36
yoleaux 18 Jan 2016 15:29Z <orbus> nine: thanks - taking a look
13:37 jantore left
RabidGravy The big problem with Perl 6 for me is that I keep getting distracted by "OooOooh I can do this really cool thing, I wonder what I could use it for" and spend twice as long doing everything 13:38
leont RabidGravy: I know! I just rewrote a part of my code to use reflection on signatures instead of hardcoding things, because may at some point in the future I might want to write extensions… 13:40
RabidGravy :) 13:41
leont nine: is that for that Windows problem?
nine yes
leont memory mapping with FILE_MAP_COPY (equivalent of MMAP_PRIVATE) might help too (just a guess) 13:42
nine I've now confirmed my initial suspicion. Though making MoarVM unmap earlier would probably be just a bad workaround for my inability to come up with a better system for outdating precomp files 13:43
leont No idea how smart Windows manages that though
RabidGravy leont, strangely I was just playing with a ClassHOW extension to do "find me all the methods with this signature" :)
ZoffixWin What is the Perl 6's idomatic way to count a character in a string? like Perl 5's =~ tr/a//;
nine .charws 13:44
13:44 Actualeyes joined, jantore joined
nine m: say "hello".chars 13:44
camelia rakudo-moar fb0a13: OUTPUT«5␤»
FROGGS a specific char I guess
ZoffixWin Yes, a specific char.
say "foo" =~ tr/o//; in P5 returns 2 13:45
RabidGravy m: say "faarpo".comb.grep("a").elems
camelia rakudo-moar fb0a13: OUTPUT«2␤»
ZoffixWin :o grep?
I didn't realize you could use grep with those arguments 13:46
RabidGravy m: "faarpo" ~~ /a/; say $/.elems
camelia rakudo-moar fb0a13: OUTPUT«0␤»
RabidGravy m: "faarpo" ~~ /a/; say $/
camelia rakudo-moar fb0a13: OUTPUT«「a」␤»
FROGGS m: say "faarpo".comb.Bag<a>
camelia rakudo-moar fb0a13: OUTPUT«2␤»
RabidGravy the default is just to smart match 13:47
nine m: say "foobarboo".comb("o").elems 13:48
camelia rakudo-moar fb0a13: OUTPUT«4␤»
nine doc.perl6.org/type/Str#routine_comb
Docs are great :)
RabidGravy :)
so basically there are a thousand and one ways to do it 13:49
ZoffixWin Well, the grep way was obvious, but it also has a problem of being uber slow. Perl 5 completed counting 200M characters in 0.3 seconds... The Perl 6 grep variant is still running
ZoffixWin will try the comb("o") way when it completes
has been over a minute already -_-
13:50 pierre-vigier left
ZoffixWin I'm killin' it 13:51
3m35s (and I killed it; it didn't complete)
.comb("o") is much better 13:52
13:52 FROGGS_ joined
ZoffixWin m: say "It's only {11.780/0.313} times slower than Perl 5's version" 13:52
camelia rakudo-moar fb0a13: OUTPUT«It's only 37.635783 times slower than Perl 5's version␤»
ZoffixWin nine++
13:53 _mg_ left
RabidGravy while you're looking for the fastest, I suspect ""foooople" ~~ m:g/o/; say $/.elems" is probably slower still 13:53
leont Truth be told, tr in p5 is ridiculously well-optimized
jnthn nine: afaik, we unmap them when the GC can collect the MVMCompUnit. We can't really do it any sooner than that.
ZoffixWin leont, yeah, which is why I'm perfectly fine with the 37 times slower :P 13:54
leont It's one of those "C isn't going to do it faster" things
13:54 hankache left 13:55 FROGGS left
leont Possibly a :count on comb, to make it return a count instead of a list of matches is useful 13:56
13:56 AlexDaniel joined
leont I suspect this sort of thing is not uncommon 13:56
nine It's also something that should be very easy to detect for the optimizer 13:57
13:57 inwigilator joined, pierre-vigier joined
leont Wouldn't that require too much high-level knowledge? E.g. this comb and this elems will always refer to the stringy ones ones. 13:59
nine Oh yes, it would have to know that .comb is called on a Str. It could generate both code paths and a runtime type check to pick the right one. Or leave it to spesh for optimization. In both cases you're right that it's not as simple to optimize as it looked. 14:02
jnthn No need for an adverb, just need to write an Iterator for that case of comb that implements the count-only method
Then .comb("o").elems will use it
nine And that's what we already have :) 14:03
lizmat++ got there first :)
jnthn oh, that already is there
OK, so as our code-gen and general optimization gets better, so will that code :) 14:04
nine We could have guessed it actually. There's no way a naive high level implementation could have been only 37 times slower than Perl 5 at this. 14:05
jnthn True :)
AlexDaniel jnthn: by the way, have you looked at rt.perl.org/Public/Bug/Display.html?id=127330 ? To me it sounds like compiling sub calls is just slow, not only in this particular case. Perhaps fixing this will make any code compile faster? 14:07
leont Seqs are awesome like that :-) 14:10
nine Yep. Their power lies in deferring the actual work so they have the chance to know more about the actual use case and can optimize for that. 14:11
14:16 kappa_ joined 14:18 kappa__ joined
kappa__ p6: my uint64 $n = 0xffffffffffffffff; say $n; 14:18
camelia rakudo-moar fb0a13: OUTPUT«-1␤»
kappa__ I am trying to get unsigned behaviour from uint but failing 14:19
14:20 kappa_ left 14:21 kappa_ joined
AlexDaniel m: my uint64 $n = 0xafffffaffffafafa; say $n; 14:22
camelia rakudo-moar fb0a13: OUTPUT«-5764607866631947526␤»
leont p6: my uint64 $n = 0xffffffffffffffff; say Int($n);
camelia rakudo-moar fb0a13: OUTPUT«-1␤»
leont Hmmmm
AlexDaniel m: my uint64 $n = 0xaafffffaffffafafa; say $n;
camelia rakudo-moar fb0a13: OUTPUT«Cannot unbox 68 bit wide bigint into native integer␤ in block <unit> at /tmp/HFH3ziDQfq line 1␤␤»
14:23 kappa__ left
kappa_ UInt works ok, but not the lowercase ones 14:25
FROGGS_ kappa_: it is ticketed since a while
14:25 azawawi left
FROGGS_ kappa_: jnthn was working on it lately iirc 14:25
14:28 _mg_ joined
RabidGravy to augment or apply a role that is the question 14:28
orbus hrm
coming up with a gihub username is hard 14:29
github*
kappa_ FROGGS_: ok, thanks, good to know
orbus has been thinking about it for a couple weeks
AlexDaniel orbus: what about “orbus”?
orbus taken
ZoffixWin m: say Blob.new(<72 101 108 108 111 32 87 111 114 108 100 33>).decode: 'ASCII';
camelia rakudo-moar fb0a13: OUTPUT«Hello World!␤»
ZoffixWin Perl ++
orbus and not sure I want to use that anyway
AlexDaniel orbus: plorbus?
orbus heh 14:30
AlexDaniel or if that's taken, plorbus6
orbus maybe
14:30 kappa_ left
orbus yeah, I guess there's nothing that says I can't make another one for non-p6 stuff 14:30
ZoffixWin orbus, what about andbus?
X)
orbus lol
xorbus
FROGGS_ hehe
xorbus
AlexDaniel xorbus is also free
FROGGS_ heh
AlexDaniel nandbus should also work fine
orbus I was actually thinking about orbusx - but I like the joke better
14:31 _mg_ left
RabidGravy m: say ('a' .. 'z').pick(8).join('') 14:31
camelia rakudo-moar fb0a13: OUTPUT«tixudchy␤»
AlexDaniel RabidGravy: what's that? A password generator?
orbus is pick cryptographically secure?
RabidGravy rarely creates something memorable to me 14:32
orbus that's why you use a password manager - if it's memorable, somebody can probably guess it
AlexDaniel m: ^10¹⁵ .pick.base(36).say 14:33
camelia rakudo-moar fb0a13: OUTPUT«36GMQMXUOI␤»
AlexDaniel m: ^10¹⁵ .pick.base(36).say
camelia rakudo-moar fb0a13: OUTPUT«2YJOIKVH3F␤»
AlexDaniel m: ^36¹⁵ .pick.base(36).say # better
camelia rakudo-moar fb0a13: OUTPUT«GY999220CFPR4IQ␤»
ZoffixWin xkcd.com/936/ 14:34
AlexDaniel you can also control the length like this
m: (36¹⁴..36¹⁵).pick.base(36).say 14:35
camelia rakudo-moar fb0a13: OUTPUT«OMI34UTHWKRKDEK␤»
AlexDaniel oops, off by one 14:36
m: (36¹⁴..(36¹⁵-1)).pick.base(36).say # should be 15 chars
camelia rakudo-moar fb0a13: OUTPUT«XTRPSZUG3G293TO␤»
AlexDaniel or
m: (36¹⁴..^36¹⁵).pick.base(36).say
camelia rakudo-moar fb0a13: OUTPUT«BWB3C5J7UJ9ROML␤»
ZoffixWin m: my $b = Blob.new(<72 101 108 108 111 32 87 111 114 108 100 33>); Blob[2] = 100; say $b.decode: 'ASCII';
camelia rakudo-moar fb0a13: OUTPUT«Cannot modify an immutable Blob[Int]␤ in block <unit> at /tmp/PpJXNgP9H2 line 1␤␤»
nine ZoffixWin: it's really telling when major advances in IT security don't come from scientific papers, but from online comics.
ZoffixWin dammit... Are there mutable blobs?
nine ZoffixWin: Bufs 14:37
ZoffixWin Thanks
orbus hmmm, well certainly the longer the better 14:42
it still seems like using only common words, even in combination, would make dictionary-type attacks more likely
probably your passwords should just all be 4096 bit random keys
nine Also ironic: Perl grew up to be the perfect tool for manipulating texts, yet in Perl 6 we have Hash as mutable Map, Array as mutable List, Buf as mutable blob with Str being the only non-primitive immutable type without a mutable companion. 14:43
orbus allocating a new string is more efficient than trying to do string manipulation? 14:44
orbus doesn't know about the guts much
nine Well you can share immutable things between many users. That's very good for optimization 14:45
orbus sure
ZoffixWin m: subset Pos of Int where * > 0; my Pos $x = 1; say $x 14:46
camelia rakudo-moar fb0a13: OUTPUT«1␤»
ZoffixWin :o
m: subset Pos of Int where * > 0; my Pos $x = 1; $x--
camelia rakudo-moar fb0a13: OUTPUT«Type check failed in assignment to $x; expected Pos but got Int␤ in block <unit> at /tmp/NPAtwS5ar_ line 1␤␤»
ZoffixWin m: subset Pos of Int where * < 0; my Pos $x = -1; $x++
camelia rakudo-moar fb0a13: OUTPUT«Type check failed in assignment to $x; expected Pos but got Int␤ in block <unit> at /tmp/wzaajldYKj line 1␤␤»
orbus I guess I'm thinking of c-style strings, where they're basically a contiguous block of memory
doing manipulation on them is problematic
unless you're just flipping case or something 14:47
it's much easier to allocate a new chunk of memory and put the modified string there
and then just deallocate the old one
14:48 Actualeyes left
orbus but I'm hardly a c guru - I can see strategies for working in those constraints, but all of them require more memory, more bookkeeping, or both 14:48
but hey, if somebody wants to write StrBuf - go for it :) 14:49
14:50 spider-mario left
orbus and I really have no clue how p6 strings are implemented under the hood 14:50
I'm assuming it's already more complex
ZoffixWin m: grammar Counter { token TOP { [ <char> | . ] }; token char { o } }; Counter.parse: "foo", :actions((class { has $!counter = 0; method TOP ($) { say $!counter; }; method char ($) { $!counter++ };}).new); 14:52
camelia rakudo-moar fb0a13: OUTPUT«0␤»
ZoffixWin How come it's zero and not 2?
m: grammar Counter { token TOP { [ <char> | . ] }; token char { o } }; Counter.parse: "foo", :actions((class { has $!counter = 0; method TOP ($) { say $!counter; }; method char ($) { $!counter++; say "Inside the char!" };}).new); 14:53
camelia rakudo-moar fb0a13: OUTPUT«0␤»
moritz ZoffixWin: first of all, you forgot to quantify the <char>
ZoffixWin Ah, right
m: grammar Counter { token TOP { [ <char> | . ]* }; token char { o } }; Counter.parse: "foo", :actions((class { has $!counter = 0; method TOP ($) { say $!counter; }; method char ($) { $!counter++; say "Inside the char!" };}).new); 14:54
camelia rakudo-moar fb0a13: OUTPUT«Inside the char!␤Inside the char!␤2␤»
ZoffixWin moritz++
Was there a second of all?
moritz ZoffixWin: also 'parse' implicitly anchors the match
ah, but you do allow .
never mind the point
"second, nothing"
ZoffixWin I didn't know parse anchored, so thanks :D
RabidGravy "second, anything else I may not have thought of" 14:55
orbus Hey, is there a plan for when goto will be implemented? I want to write some spaghetti code. 15:00
:D
15:01 Actualeyes joined
orbus on the surface, goto seems like it might be difficult to implement in p6 15:02
ZoffixWin Hm... docs.perl6.org/language/io doesn't mention anything for how to read input from the user 15:03
STDIN
m: say $*IN
camelia rakudo-moar fb0a13: OUTPUT«IO::Handle<<STDIN>>(opened, at octet 0)␤»
ZoffixWin how do I go about reading a single char from $*IN? .getc seems to wait until I press ENTER 15:06
Testing with perl6 -e 'loop { given $*IN.getc { when " " { exit; }; default { .print } } }' 15:07
leont That is terminal buffering 15:08
ZoffixWin hm.. how do I get rid of it? 15:09
stdbuf -i0 perl6 ... doesn't seem to do it :/ 15:11
leont Term-termios is probably your friend
You probably want raw modus 15:12
15:15 pierre-vigier left
ely-se How can I create a class that implements an array of roles? 15:15
ZoffixWin I see panda now cares about Perl versions... "Term::termios requires Perl version 6.0.0. Cannot continue."
ely-se s/implements/does/
15:15 laz78 joined
moritz class Foo does Role1 does Role2 { } 15:16
ely-se m: role R { }; constant C := Metamodel::ClassHOW.new_type(name => 'C'); C.^add_role(R); C.^compose(); 15:17
camelia ( no output )
ely-se moritz: that's not an array :p
ZoffixWin leont++ Term::termios does what I want
moritz ely-se: right, it's a lsit
*lsit
ARGL
*list
ZoffixWin :D
ely-se m: role R { method m() { say self } }; constant C := Metamodel::ClassHOW.new_type(name => 'C'); C.^add_role($_) for @[R]; C.^compose(); C.new.m; 15:18
camelia rakudo-moar fb0a13: OUTPUT«C.new␤»
ely-se nice
moritz: oh, hmm 15:19
m: role A { }; role B { }; constant Roles := A, B; class C does Roles { }
camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/P5UDBkDqlG␤Cannot call trait_mod:<does>(C, List); none of these signatures match:␤ (Mu:U $doee, Mu:U $role)␤ (Variable:D $v, Mu:U $role)␤at /tmp/P5UDBkDqlG:1␤»
ely-se m: role A { }; role B { }; constant Roles := A, B; class C does |Roles { } 15:20
camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/58sNGw_NG5␤Malformed trait␤at /tmp/58sNGw_NG5:1␤------> 3 }; constant Roles := A, B; class C does7⏏5 |Roles { }␤»
moritz ely-se: a list, not a List
15:21 CIAvash joined
ely-se :v 15:23
15:24 zakharyas joined 15:29 psy_ left, musiKk left 15:33 khw joined 15:34 xpen joined
jdv79 ZoffixWin: which "json spec" are you referring to? 15:38
15:38 pmurias joined
ZoffixWin context? 15:38
pmurias nine: re mutable strings, do we have much use cases for them?
jdv79 your last post on blogs.perl
ZoffixWin jdv79, RFC7159: rfc7159.net/rfc7159#rfc.section.2 15:39
ely-se for (1, 2, (3, 4), 5) { .perl.say } 15:40
pmurias nine: it seems to be once they become mutable rather we have to choose if we view them as an array of graphemes/code points/bytes rather than applying different view to them 15:41
ely-se m: for (1, 2, (3, 4), 5) { .perl.say }
camelia rakudo-moar fb0a13: OUTPUT«1␤2␤(3, 4)␤5␤»
15:44 xpen_ joined, xpen left
ely-se m: ((1, 2, 3)>>.Str).WHAT.say 15:44
camelia rakudo-moar fb0a13: OUTPUT«(List)␤»
15:45 ely-se left
jdv79 huh. i guess it was inevitable. 15:47
though iirc part of the point of the json spec was that it would never change. 15:48
ZoffixWin hah
jdv79 wonder if that's its or will this be the beginning of the demise of json 15:49
ZoffixWin Not until we get something better :)
nine pmurias: to be clear: I don't think we're lacking mutable strings. It just sounds ironic that our types turned out that way and I love irony :)
ZoffixWin Is END { $!saved-term-settings.setattr(:DRAIN); } safe? 15:58
As in, is the value of $!saved-term-settings guaranteed to exist at that time? 15:59
Context: gist.github.com/zoffixznet/9479d47...oo-pm6-L16
16:01 xpen_ left
ZoffixWin Or maybe I should use LEAVE phaser 16:02
m: class Foo { has $!bar; submethod BUILD { $!bar = "Foo"; }; END { $!bar = 0; say "Tossing bar"; }; method x { say $!bar } }; Foo.new.x
camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8f3AOF9vS8␤Variable $!bar used where no 'self' is available␤at /tmp/8f3AOF9vS8:1␤------> 3od BUILD { $!bar = "Foo"; }; END { $!bar7⏏5 = 0; say "Tossing bar"; }; method x { s␤»
ZoffixWin I need a DESTROY or something
m: class Foo { has $!bar; submethod BUILD { $!bar = "Foo"; }; submethod DESTROY { $!bar = 0; say "Tossing bar"; }; method x { say $!bar } }; Foo.new.x 16:03
camelia rakudo-moar fb0a13: OUTPUT«Foo␤»
ZoffixWin What's called during an object destructions? 16:06
m: class Foo { has $!bar; submethod BUILD { $!bar = "Foo"; }; submethod DESTROY { $!bar = 0; say "Tossing bar"; }; method x { say $!bar } }; { my $x = Foo.new; $x.x }; say 42 16:09
camelia rakudo-moar fb0a13: OUTPUT«Foo␤42␤»
jdv79 nada implicitly, right?
ZoffixWin The spec mentions "DESTROY submethods" but it doesn't seem to be working: design.perl6.org/S12.html 16:10
jdv79, what's "nada"?
jdv79 nothing
destroy only fires if and when the gc gets around to it
iirc scope guards are the closest you can get 16:11
LEAVE basically
ZoffixWin Actually, I realize that, in my particular case, I can do the clean up in method TOP($/) {...} 16:12
16:15 rindolf joined 16:20 sftf joined
jnthn AlexDaniel: I saw it; I think it'll be addressed with more general compiler performance improvemnets, and is unlikely anything special about that example. 16:21
orbus: fwiw, flipping case is also not always possible in-place since it can change the length of the string :) 16:22
nine jnthn: I rejected the ticket for that very reason
jnthn nine: Well, the other reason is that it has to observable. How fast is fast enough? :) 16:23
16:23 ely-se joined
nine Well obviously it's fast enough when it doesn't annoy me anymore. Though writing a test that checks my annoyance level might be a bit of a challenge... 16:25
16:26 araujo_ left 16:27 araujo joined, araujo left, araujo joined
jnthn Indeed :) 16:28
16:29 revhippie joined 16:30 nightfro` joined, nightfro` is now known as nightfrog
jnthn is a bit curious about 3c2fc66ab and what the use case for passing on --profile is :) 16:36
dalek kudo/nom: d67cb03 | (Stefan Seifert)++ | src/core/CompUnit/PrecompilationRepository.pm:
Remove obviously accidentally pasted line
16:37
16:39 Praise left
ely-se m: role R { }; constant g = Metamodel::ClassHOW.new_type; g.^add_parent(Grammar); g.^add_role(R); g.^compose; 16:39
camelia ( no output )
ely-se I get an error on the g.^add_parent(Grammar); call that "Parents cannot be added to a class after it has been composed"
16:40 Praise joined, Praise left, Praise joined
ely-se m: role R { }; constant g := Metamodel::ClassHOW.new_type; g.^add_parent(Grammar); g.^add_role(R); g.^compose; 16:40
camelia ( no output )
16:41 musiKk joined
ely-se m: constant g = Metamodel::ClassHOW.new_type; g.^is_composed.say; 16:42
camelia rakudo-moar fb0a13: OUTPUT«Method 'say' not found for invocant of class 'NQPMu'␤ in block <unit> at /tmp/GopdQKmsCt line 1␤␤»
ely-se m: constant g = Metamodel::ClassHOW.new_type; say g.^is_composed;
camelia rakudo-moar fb0a13: OUTPUT«Method 'gist' not found for invocant of class 'NQPMu'␤ in block <unit> at /tmp/T1CuAmkKhv line 1␤␤»
ely-se m: constant g = Metamodel::ClassHOW.new_type; say g.^is_composed(); 16:43
camelia rakudo-moar fb0a13: OUTPUT«Method 'gist' not found for invocant of class 'NQPMu'␤ in block <unit> at /tmp/8wVh4ceMhg line 1␤␤»
16:43 Actualeyes left
jnthn ely-se: Strange you get the error locally but not here... 16:43
I mean, it's right you can't add a parent after composition 16:44
But your example here clearly doesn't...
ely-se here's the full code: gist.github.com/rightfold/ed345900cf17fd90d646 16:45
I don't get the error either if I do it on a smaller code example.
(line 48 in the gist)
16:45 Actualeyes joined
jnthn uh, wait 16:46
constant = BEGIN time = evaluated once ever
So if you call that sub more than once, you'll be trying to add_parent to the same thing you did on the first call 16:47
ely-se aha :)
jnthn my \grammar = ... :)
Took me a couple of reads to spot :)
dalek kudo/2016.01-preparation: 7741d58 | jnthn++ | src/core/Supply.pm:
Fix scoping bug in Supply.grep.
16:48
kudo/2016.01-preparation: 8162bdf | (Tommy Stanton)++ | src/core/Exception.pm:
Fix typo in X::Seq::Consumed exception
ely-se ah, seems to work with $ as well
I thought .^ maybe wanted to work on the container
thanks
this is also quite a nasty trap: 16:55
m: [[]].perl.say
camelia rakudo-moar d67cb0: OUTPUT«[]␤»
ely-se m: [[],].perl.say
camelia rakudo-moar d67cb0: OUTPUT«[[],]␤»
orbus alright
time to look seriously at publishing my module 16:56
jnthn ely-se: Single arg rule, but yes, was a trade-off we knowingly made.
orbus now needs to figure out how META.info works
ely-se IMO the whole treating of non-lists as single-element lists is going to do more bad than good
jnthn It's just part of the very general Perl design approach that operations tend not to be overloaded with multiple semantics, and so can coerce their arguments into something that fits the desired operation. 16:58
It's the same reasoning behind $a + $b always doing numeric addition, and $a ~ $b always doing string concat. 16:59
leont It is a bit confusing, but not an issue all that often 17:01
ZoffixWin orbus, you may find modules.perl6.org/repo/Test::META useful.
orbus appreciate the pointer 17:02
have to setup github first
and possibly write some more tests, although I have quite a few already
guess you can never have too many 17:03
ely-se m: ((),).say
camelia rakudo-moar d67cb0: OUTPUT«(())␤»
orbus actually, here's a question - is there any standard way to provide optional tests?
ZoffixWin orbus, use skip
orbus hm
okay
ZoffixWin orbus, I'm also working on Test::When
orbus okay cool 17:04
ZoffixWin (not ready for use yet, though... and I'm... vacationing :P)
orbus no worries
my module is concurrency based and I wrote a couple multithreaded torture tests
they take a while to run though
probably better not to mess with them in a normal install
oh, that reminds me 17:05
jnthn: question, for you - if a thread is blocking waiting for a channel, does it not yield its slot in the thread scheduler? 17:06
because I saw some behavior suggesting it may not
jnthn orbus: No, it doesn't 17:07
Channels are intended for situations where you want to block
We may well introduce a way to receive-async at some point 17:08
ely-se lol
m: sub array(*@xs) { @xs }; array(1, 2, 3).perl.say
camelia rakudo-moar d67cb0: OUTPUT«Cannot find method 'array'␤ in block <unit> at /tmp/Yut0cXKDKm line 1␤␤»
ely-se m: sub arrays(*@xs) { @xs }; arrays(1, 2, 3).perl.say
camelia rakudo-moar d67cb0: OUTPUT«[1, 2, 3]␤»
orbus right
jnthn So you can await that, and in conjunction with upcoming non-blocking away support it'll work out
orbus well I guess I just don't understand how the scheduler works :p
I guess that's kind of where I'm going with this 17:09
so I did like 20 concurrent receive promises
@p = start {$c.receive} xx 20
(this was for torture test)
ZoffixWin m: my Buf[int8] $x; $x.append: 0; say $x
camelia rakudo-moar d67cb0: OUTPUT«Cannot modify an immutable Buf[int8]␤ in any at gen/moar/m-Metamodel.nqp line 1718␤ in block <unit> at /tmp/UV9pSKlT_M line 1␤␤»
orbus and then I tried to make a couple promises to send stuff to them
but it seemed like the receive promises totally tied up the scheduler, so the sends never happened 17:10
and it just blocked forever
ZoffixWin Can I use uint8 as Buf elements, so that, say, $buf[0]++ will become 0 if it's currently 255?
jnthn Yeah...you have to use .then for now to get non-blocking. It's on the todo list
OK, I need to go and cook dinner :) I'll be back later :)
orbus cool
later
moritz m: my $b := Buf[int8].new(0); say ++$b[0] 17:11
camelia rakudo-moar d67cb0: OUTPUT«1␤»
17:11 spider-mario joined
moritz m: my $b := Buf[int8].new(255); say ++$b[0] 17:11
camelia rakudo-moar d67cb0: OUTPUT«0␤»
ZoffixWin Thanks
moritz ZoffixWin: seems to work as expected :-)
17:12 adu joined
ZoffixWin m: my $b = Buf[uint8].new(255); say ++$b[0]; $b.push: 0; say --$b[1] 17:12
camelia rakudo-moar d67cb0: OUTPUT«0␤255␤»
ZoffixWin How come you used the binding operator instead of simple assignment?
moritz just common paranoia, I think
ZoffixWin Ah
moritz comes from having deal with too much low-level stuff (like MOP) 17:13
where you don't want to .^compose the Scalar container :-)
17:13 lsm-desktop left 17:18 lsm-desktop joined 17:20 zakharyas left 17:22 adu left 17:23 spider-mario left, Zero_Dogg left, spider-mario joined 17:24 Zero_Dogg joined, Zero_Dogg left, Zero_Dogg joined 17:26 mr-foobar joined 17:31 nbrown joined 17:33 rickbike joined 17:34 Calibellus left
ZoffixWin m: my \ꜜ = 42; say ꜜ 17:34
camelia rakudo-moar d67cb0: OUTPUT«42␤»
ZoffixWin huggable, unicode vars :is: Find fancy unicode chars that can be used as term names: m: (0 .. 0xFFFF).grep({.uniname ~~ /:i 'arrow'/ and .uniprop ~~ /^ L/})».chr.print 17:36
huggable ZoffixWin, Added unicode vars as Find fancy unicode chars that can be used as term names: m: (0 .. 0xFFFF).grep({.uniname ~~ /:i 'arrow'/ and .uniprop ~~ /^ L/})».chr.print
17:39 rurban joined, lokien_ left 17:44 Peter_R left 17:45 Peter_R joined
rickbike o/ #perl6 17:50
ZoffixWin Is there an easier way to write: say "nope"; exit;
17:51 sftf left
ZoffixWin Like adding "\n" to die() message in Perl 5: I want to print a message and exit, but I don't want to print the stack trace 17:51
moritz ZoffixWin: do you want it to be catchable, like in Perl 5? 17:52
ZoffixWin Yeah
moritz ZoffixWin: or always fatal, like with "exit"
ZoffixWin Hm... either, I guess. But catchable is good, if it's short and sweet :) 17:53
Oh, fail!
Well, still a stack trace. 17:54
screw it... stack trace it is
ely-se Is there an API for parsing POD and just POD? 17:55
autarch I'm going to do a short presentation on p6 for my local perl mongers group - several people asked that I try to cover "differences between 5 and 6" - I was wondering if anyone had any suggestions for things to highligh 17:56
leont ely-se: you can access it by using the $= variables
E.g. $=pod[0]
orbus autarch: it's kind of a long list
autarch yeah, that was my feeling too
orbus maybe summarize doc.perl6.org/language/5to6-nutshell ?
ZoffixWin autarch, "it's completely different; like learning a new language"? :) 17:57
autarch heh, yeah
ely-se leont: no I have pod in a text file and I want to parse it
orbus well not totally completely different - it still ends up looking very perl-ish
ely-se it is not in Perl 6 source code
orbus and many things are just close enough to trip you up
leont Valid POD is valid Perl 6 ;-)
rickbike autoarch: include what is _not_ in Perl6 or ecosystem (yet), and what is planned 17:58
autarch rickbike: that seems like an even bigger topic!
rickbike autoarch: yes, but expectations need to be addressed 17:59
autarch rickbike: if you could be a little more specific that'd be helpful 18:00
masak hello #perl6 from a train \o/ 18:01
rickbike autoarch: it's not installed by default is a big one, and the tools for installing, ide's, etc
nine waves to masak 18:02
moritz ZoffixWin: the proper solution is to write your own exception class whose .gist method doesn't print a backtrace, and throw that
masak autarch: github.com/perl6/mu/blob/master/do...rences.pod
moritz ZoffixWin: and maybe write a shortcut for that
masak autarch: I don't make any guarantees about how up-to-date that document is
nine ZoffixWin: shouldn't it be actually your user's decision whether to show a backtrace or not?
autarch masak: that's fine, it's still helpful
moritz ZoffixWin: maybe we want a :!bt option in die() or so 18:03
rickbike What characters are allowed in flags (MAIN)
moritz rickbike: they are just identifiers
ZoffixWin: but so far, there has been no consensus on that
ZoffixWin nine, pro'lly 18:04
ely-se leont: yeah, but I don't want to accidentally execute Perl 6 code
orbus java is the language I have the most experience with regarding exceptions - it only shows a backtrace for uncaught exceptions 18:05
I haven't played with p6 exceptions that much yet
in java if you catch the exception and then exit (gracefully or not), you don't see a backtrace 18:06
18:11 laz78 left, rurban left 18:12 sjoshi joined 18:13 Peter_R left, rurban joined 18:14 musiKk left, Peter_R joined, rickbike left 18:16 nbrown left 18:17 laz78 joined 18:18 laz78 left
masak orbus: same holds for Perl 6. 18:20
orbus that's kind of what I thought
masak orbus: if you `exit()`, you'll see no exception.
orbus maybe I didn't understand the question - working on several things at once :)
18:24 niceperl joined 18:26 ely-se left 18:34 lizmat joined
gfldex jnthn: is it reasonable to expect that type checks get a little faster with more work on the compiler? (i'm writing propagande right now, hence the question) 18:36
jnthn gfldex: I've never seen them show up in profiles much today anyway :) 18:37
gfldex: We optimize quite a lot of them out on hot paths already at specialization time. But yes, as our dynamic opt improves, more of them will be ripped out. 18:38
gfldex nice
jnthn Or multiple related ones lifted to a single one :)
leont Will explicit return types help at that too? 18:41
arnsholt I guess adding types will tend to help the optimizer, so generally the slight increase in cost on invocation will be won back in better code inside a body? 18:42
18:43 firstdayonthejob left, Actualeyes left 18:44 ely-se joined 18:45 BenGoldberg left
jnthn leont: They're at their most useful on subs where we might benefit from static inlining some, or anywhere if they're native 18:47
18:47 perl6newbee left, laz78 joined 18:49 rickbike joined
inwigilator hey 18:51
I want to you sdl6 lib on os x 18:52
I copy sdl.framework
to my libraries but still sdl6 cant see binaries
ZoffixWin inwigilator, what's the error message/ 18:54
18:56 CIAvash left
inwigilator w8 trying to install it via panda 18:59
ZoffixWin :/ 19:01
19:01 Peter_R left, niceperl left
masak m: sub pronounce { $^abbreviation.subst(/8/, "eight", :g) }; say pronounce "w8" 19:01
camelia rakudo-moar d67cb0: OUTPUT«weight␤»
masak :P 19:02
timotimo i'm one of the authors of SDL2::Raw; sadly, i have no OS X machine i can try stuff out with, inwigilator
inwigilator timotimo, yeah I am already trying this
masak .oO( ...so if you could please send me one ASAP... )
19:02 Peter_R joined
inwigilator have you got some examples made in raw? 19:02
timotimo hahaha
ZoffixWin I believe they're actually tring to use github.com/PerlGameDev/SDL6/blob/m...ib/SDL.pm6
timotimo yeah, in SDL2::Raw's repository there's an examples/ folder. both examples require Cairo to be installed, though 19:03
ZoffixWin inwigilator, yes, there's an examples dir. modules.perl6.org/repo/SDL2::Raw
ely-se m: module M { class C { } }; say M::C
camelia rakudo-moar d67cb0: OUTPUT«(C)␤»
ely-se m: module M { my class C { } }; say M::C
camelia rakudo-moar d67cb0: OUTPUT«Could not find symbol '&C'␤ in block <unit> at /tmp/sFtEeOSGEr line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/sFtEeOSGEr line 1␤␤»
19:03 rickbike left 19:04 gtodd left
inwigilator Cannot locate native library 'libSDL2.dylib': dlopen(libSDL2.dylib, 1): image not found 19:07
ZoffixWin inwigilator, I've never used OSX, but it has a package manager, right? Search it for SDL2 lib 19:08
19:08 Amendil left
ZoffixWin It's package libsdl2-2.0-0 on Bodhi Linux FWIW 19:08
timotimo i think that should be the right filename, no? 19:09
ZoffixWin I've successfully launched the snake example, so at least it works on Linux :)
19:10 hankache joined
AlexDaniel snake example? Where can I find that? 19:12
ZoffixWin AlexDaniel, github.com/timo/SDL2_raw-p6/blob/m...s/snake.pl
AlexDaniel, twitter.com/zoffix/status/690212830092644352
19:13 Peter_R left
gfldex lolibogedalittle gfldex.wordpress.com/2016/01/24/ke...and-sound/ 19:13
19:14 Peter_R joined 19:16 zengargo1le left 19:17 virtualsue joined 19:18 zengargoyle joined 19:19 domidumont left 19:20 nbrown joined 19:21 domidumont joined 19:22 cschwenz joined
ZoffixWin Curious... is there a way to rewrite this loop without having to declare $level outside the loop? gist.github.com/zoffixznet/1127bbede08f2e8368aa 19:24
19:25 nbrown left
geekosaur ZoffixWin, it doesn't have a native package manager, actually. which is why there are third party ones like macports, fink, homebrew, ... 19:25
ZoffixWin :( 19:26
geekosaur (also a port of gentoo portage, one of netbsd pkgsrc, ......)
AlexDaniel ZoffixWin: use state? 19:27
ZoffixWin AlexDaniel, oh, right :D 19:28
moritz ZoffixWin: loop (my $level; True; ) { ... } 19:31
19:31 ely-se left 19:32 caasih joined
ZoffixWin m: loop (my $i = 0; $i < 10; $i++ ) { $i.say } 19:32
camelia rakudo-moar d67cb0: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
ZoffixWin I didn't realize loop {} was a C-style loop
AlexDaniel ZoffixWin: RTFM? :) 19:33
ZoffixWin pfft
Who does that
:)
AlexDaniel ZoffixWin: but yeah, it would be weird to think that TIMTOWTDI-ish language does not have a C-style for loop 19:34
what kinda bothers me though is this
m: loop (my $i = 0; $i < 10; $i++ ) { }; say $i
camelia rakudo-moar d67cb0: OUTPUT«10␤»
AlexDaniel which means that the next time you write it in the same scope you can't use 「my $i」 19:35
ZoffixWin :o 19:36
revhippie is that intended or a bug?
AlexDaniel it was discussed and it seems like that's how it should be, but hey… I don't think that it dwims
19:36 araujo_ joined
AlexDaniel the reason was that it is tied to the surrounding { } 19:37
m: { loop (my $i = 0; $i < 10; $i++ ) { }; }; say $i
camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_4L8GryMky␤Variable '$i' is not declared␤at /tmp/_4L8GryMky:1␤------> 3(my $i = 0; $i < 10; $i++ ) { }; }; say 7⏏5$i␤»
AlexDaniel so yeah
19:38 araujo left, gist_nb joined, araujo__ joined 19:39 ely-se joined 19:42 araujo_ left
jnthn Yeah, it's intended; scope is determined by curlies, the only exception being signatures (which are of course associated with the curlies that follow them). 19:42
19:42 gist_nb left 19:43 ggoebel14 joined
jnthn loop isn't that common anyway, so it'd not warrant a discontinuity. And `if my $x = foo() { }` is better written `if foo() -> $x { }`, and similar for unless/while/until 19:43
19:44 lokien_ joined 19:45 domidumont left, Amendil joined 19:46 musiKk joined
ZoffixWin m: say ^255 .»chr 19:46
camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/d3Rcfo5Bmm␤Malformed postfix call (only alphabetic methods may be detached)␤at /tmp/d3Rcfo5Bmm:1␤------> 3say ^255 .7⏏5»chr␤»
ZoffixWin :/
19:46 ggoebel13 left, araujo_ joined, mr-foobar left 19:48 araujo__ left
AlexDaniel m: say (^255)\ ».chr 19:49
camelia rakudo-moar d67cb0: OUTPUT«(␀ ␤
AlexDaniel ZoffixWin: ↑ if you really want to have a space there
inwigilator hey see this during perl6 sdl2 library 19:52
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL2, v1)
19:52 araujo__ joined, pmurias_ joined
ZoffixWin inwigilator, yeah, that's just a warning and it's removed now. If you install latest and greatest, bleeding edge Rakudo, you won't see it 19:53
19:53 araujo_ left
inwigilator ohh 19:53
I install it from
dalek osystem: 3bad032 | (Zoffix Znet)++ | META.list:
Add Inline::Brainfuck to the ecosystem

Use Brainfuck language in your Perl 6 programs: github.com/zoffixznet/perl6-Inline-Brainfuck
inwigilator panda
ZoffixWin inwigilator, no, you didn't 19:54
inwigilator ZoffixWin, sure I did
ZoffixWin Wanna bet? :D
inwigilator, panda is a Perl 6 program, so I can't see how you could install your Perl 6 compiler with it. 19:55
inwigilator so rakudo-star isn't in brew already
19:55 pmurias left
ZoffixWin Not the Christmas one, no 19:55
You can get one using instructions on getperl6.com 19:56
(Task::Star is just a package you can install with panda)
And you can run "rakudobrew build moar" instead of "rakudobrew build moar 2015.12", to get the bleeding edge Perl 6
stmuk or wait a fortnight or so for 2016.01! 19:57
ZoffixWin :/ I sure hope it won't be named 2016.01 19:58
'cause it'll be Feb already
19:59 colomon left, gtodd joined 20:00 colomon joined 20:01 hankache left, atweiden joined
AlexDaniel yeah!!! 20:02
snake example works great
ZoffixWin \o/
20:02 colomon left, araujo_ joined 20:03 araujo__ left
AlexDaniel shooter example kinda doesn't 20:03
atweiden i have a patch for YouCompleteMe to handle p6 identifiers: ix.io/nG4
AlexDaniel I mean, something works but it is very buggy
ZoffixWin Yeah, it didn't for me either
atweiden is there a BNF for p6 identifiers, or is doc.perl6.org/language/syntax the best link i can give?
ZoffixWin atweiden, Perl 6 Grammar is the best you can get methinks :) 20:04
atweiden thanks to the vim-perl team
20:04 domidumont joined, araujo_ left 20:05 araujo_ joined
AlexDaniel there's a bug in the snake example 20:05
you can make 180° turns
ZoffixWin atweiden, actually, you can probably find something useful in github.com/MadcapJake/language-per...egexp.cson 20:06
AlexDaniel oh, and when you hit your tail it is just chopped off? Hmm
ZoffixWin atweiden, MadcapJake would know more about it
m: my \Δ = 'Look ma, an identifier'; say Δ 20:07
camelia rakudo-moar d67cb0: OUTPUT«Look ma, an identifier␤»
ZoffixWin m: my \say = 'Look ma, an identifier'; say say 20:08
camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ua8cIN9UE0␤Two terms in a row␤at /tmp/ua8cIN9UE0:1␤------> 3my \say = 'Look ma, an identifier'; say7⏏5 say␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ …»
ZoffixWin m: sub term:<say> {'Look ma, an identifier'}; say say
camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0mCYlkLLXm␤Two terms in a row␤at /tmp/0mCYlkLLXm:1␤------> 3rm:<say> {'Look ma, an identifier'}; say7⏏5 say␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤…»
ZoffixWin m: my \say = 'Look ma, an identifier'; say(say) 20:09
camelia rakudo-moar d67cb0: OUTPUT«Look ma, an identifier␤»
ZoffixWin :D
AlexDaniel m: sub term:<say> {'Look ma, an identifier'}; &say say
camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TAEYkyF1Cz␤Two terms in a row␤at /tmp/TAEYkyF1Cz:1␤------> 3m:<say> {'Look ma, an identifier'}; &say7⏏5 say␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤…»
AlexDaniel m: sub term:<say> {'Look ma, an identifier'}; &say: say
camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vEk9oDitdn␤Confused␤at /tmp/vEk9oDitdn:1␤------> 3:<say> {'Look ma, an identifier'}; &say:7⏏5 say␤ expecting any of:␤ colon pair␤»
AlexDaniel ok whatever
ZoffixWin m: my \x = 42; say x x x x x x x x x 20:10
camelia rakudo-moar d67cb0: OUTPUT«4242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242…»
atweiden ZoffixWin MadcapJake/p6dx looks like it would be good to bundle with YouCompleteMe like they do for python/jedi rust/racerd
ely-se Sometimes I feel like I've come to the point where I understand so much about software development that there isn't anything interesting left to learn. :( 20:11
Hotkeys ZoffixWin: lol
20:11 araujo__ joined
ely-se In the past I'd learn about higher-order functions (exciting!) and inheritance (exciting!) and Perl (exciting!) but now I can't find anything new to learn that is slightly challenging anymmore 20:11
ZoffixWin ely-se, that's the time when you start learning AI and attempt to achieve singularity :)
20:12 araujo_ left, domidumont left 20:13 araujo_ joined
moritz ely-se: well, you can move away from pure languages and language features: testing, architecture, DDD, deployment techniques, project management, reliability features, ... 20:14
ely-se: or algorithms of course; there's a sheer infinite amount of wealth there
DrForr Reimplement the Y combinator from scratch.
moritz &?ROUTINE exists :-) 20:15
20:15 araujo__ left
dalek kudo/2016.01-preparation: 432ff2e | moritz++ | docs/announce/2016.01.md:
Announcement: State the language version we implement
20:17
AlexDaniel ely-se: have you tried prolog?
ely-se AlexDaniel: no, but I have tried Mercury which is also a logic programming language.
ZoffixWin moritz, "6v.c" looks off 20:18
DrForr pricks up his ears at that mention.
AlexDaniel ely-se: I don't know… learn bash, lol :)
dalek kudo/2016.01-preparation: 005ca63 | moritz++ | docs/announce/2016.01.md:
Fix version number, ZoffixWin++
20:19
ely-se I have been slightly interested in scientific computing but I have no use-cases for it
20:19 pmurias joined 20:21 virtualsue left
lizmat moritz: s/6v.c/v6.c/ 20:21
ZoffixWin lizmat, too slow :D
lizmat :-) yeah 20:22
20:22 pmurias_ left, darutoko left
masak ely-se: I assume you've already looked into category theory? 20:22
ely-se yup
I don't know all the rules by heart but I have a general idea of what it's about
20:22 araujo__ joined
atweiden oh lawd, YouCompleteMe! "The regex is quite... opaque, so it is quite hard to review what it is doing. Could you update the PR description with an overview of the change and how you tested it?" :) 20:23
ZoffixWin lol
atweiden lol tests
20:24 araujo_ left
masak ely-se: that's excellent. I'm still learning. I can fit Yoneda in my head, but each time I blink it falls out again. 20:24
atweiden i'll just patch it downstream in my PKGBUILDs
ZoffixWin atweiden, it kinda makes me think that regex should be a simple "\S"... not that I know wtf YoucompleteMe is 20:25
atweiden YCM is semantic code completer for vim and maybe other editors (?)
ZoffixWin m: sub term:<(╯°□°)╯︵┻━┻> { "Complete me" }; say "you" ~ (╯°□°)╯︵┻━┻
camelia rakudo-moar d67cb0: OUTPUT«youComplete me␤»
atweiden for anyone who can carry the torch github.com/Valloric/ycmd/pull/320 20:26
ely-se that regex is not very unreadable 20:27
ZoffixWin atweiden, what's \xC0-\xFF supposed to match?
I'm more concerned with it being off (as in, it doesn't capture all possible Perl 6 identifiers) 20:28
even if you exclude crazy cases like the last eval above
atweiden unicode?
i pulled it from github.com/vim-perl/vim-perl/blob/.../perl6.vim
inwigilator ZoffixWin, is there some bigger tutorials
for sadly and perl6?
or I should follow C
atweiden ZoffixWin: it doesn't 20:29
i don't think it works for when you have certain unicode chars
ZoffixWin atweiden, that doesn't look like unicode to me
m: say (\xC0..\xFF)».chr
camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4D1Bhq0rhC␤Undeclared routines:␤ xC0 used at line 1␤ xFF used at line 1␤␤»
atweiden the main thing is it does kebab case
20:29 khisanth_ left
ZoffixWin m: say (0xC0..0xFF)».chr 20:29
camelia rakudo-moar d67cb0: OUTPUT«(À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ)␤»
ZoffixWin m: my $÷x = 42; say $÷x 20:30
camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/H_LYDtnxrS␤Preceding context expects a term, but found infix = instead␤at /tmp/H_LYDtnxrS:1␤------> 3my $÷x =7⏏5 42; say $÷x␤»
ZoffixWin Reading your regex, it'd match the above
inwigilator, for SDL, it'd be C. For Perl 6, try learnxinyminutes.com/docs/perl6/ and perl6intro.com/ 20:31
atweiden m: my $var = 1; my $varי;
camelia ( no output )
atweiden it doesn't support the $varי
ZoffixWin .u י
yoleaux U+05D9 HEBREW LETTER YOD [Lo] (י)
DrForr . o ( Kneel before Yod )
ZoffixWin Why is the above not a "undeclared" error?
ely-se masak: I'm thinking about trying some of the non-esoteric concatenative languages like Forth 20:32
ZoffixWin Oh, there are two mys
ely-se Or Factor
20:32 sjoshi left
DrForr Try PostScript then, more practical. 20:32
masak ely-se: oh, I've always wanted to give Forth a closer look, too. it seems to hold worthwhile secrets about refactoring and code re-use. 20:34
ely-se refactoring in a concatenative language is literally cut–paste
masak ely-se: have you looked some at Joy?
ely-se Nein.
leont knows someone who in college wrote a report about simulations in postscript, the document was the simulation…
ely-se Only concatenative languages that I have used were FALSE and Befunge. 20:35
masak "In Joy, the meaning function is a homomorphism from the syntactic monoid onto the semantic monoid." -- I didn't even know semantics had a monoid.
ely-se Well if you have an identitiy semantic and a closed associative operator on semantics then your semantics form a monoid :)
Hotkeys Concatenative langs are fun 20:36
I've only really tried factor though
masak ely-se: apparently the associative part is function composition -- that makes sense 20:38
ely-se well yes
Hotkeys Thinking with the stack is definitely interesting
ely-se most concatenative languages have a single blank operator which composes two functions that take and return stacks 20:39
moritz m: use IO::Socket::INET
camelia rakudo-moar d67cb0: OUTPUT«===SORRY!===␤IO::Socket::INET is a builtin type. You can use it without loading a module.␤»
20:39 alpha123 joined 20:40 TEttinger joined, niceperl joined 20:41 sortiz joined 20:42 alpha123 left
sortiz \o #perl6 20:42
ZoffixWin o/
dalek kudo/2016.01-preparation: ae29543 | moritz++ | docs/ChangeLog:
Fill out ChangeLog a bit
20:42 alpha123 joined
moritz [Coke]: if you have no better idea, I'd name the 2016.01 release "Kerman", just becase we never had a release name from Iran before 20:43
masak ely-se: I tried to produce a typed version of that once. I found Cat as prior art... but I didn't like it much. felt too contrived.
20:43 khisanth_ joined
masak ely-se: the central problem seems to be that some functions don't know statically how deep into the stack they dig. and so you end up trying to type the stack itself. 20:43
ely-se masak: I tried that too. I avoided that problem (and incidentally the problem of hideous unmaintainable programs) by not offering any operations that don't statically know how deep to dig. 20:44
masak I should try that. 20:45
ely-se I think the stack should be treated the same as classes are treated as opposed to hashes in Perl 6: you know at design-time what it looks like. 20:46
20:46 molaf_ left, geraud joined
masak aye 20:47
it's not so much that I felt a need to type the stack myself; it's that I saw Cat had gone that route, and it kind of turned me off
ely-se masak: in my design functions had a type that described the top N elements on the stack before the call and the top M elements on the stack after the call, so the type of + would be (int int -> int)
variadics are naturally unsupported 20:48
masak *nod* 20:49
ely-se if only my PMs with vendethiel were archived :) 20:50
vendethiel I do archive all our PMs
ely-se D: 20:51
inwigilator hey, I don't get SDL bindings
they don't return err codes or what?
ZoffixWin They should be very similar to just calling the C functions 20:52
20:52 dotness joined
inwigilator my $param = SDL_Init(VIDEO); 20:53
SDL_Init(VIDEO)
should return code
20:54 diana_olhovik_ joined
ZoffixWin inwigilator, yeah, doesn't look like the Perl 6 version is made to return it. timotimo would know more 20:55
ely-se
.oO(insigilator)
20:56
20:56 araujo_ joined
inwigilator ely-se, ? 20:56
ely-se inwigilator, $ @ % 20:57
20:57 araujo__ left 20:58 dotness left
RabidGravy wooo got Sofa doing the basic CRUD stuff, more in three days than I had since April :) 20:59
20:59 diana_olhovik_ left 21:00 raiph joined
RabidGravy (and only had to make a tiny change to HTTP::UserAgent to make all the PUT POST DELETE malarkey work :) 21:01
ZoffixWin sweet 21:03
RabidGravy++
mprelude Is perl 6 'production-ready' yet? 21:21
AlexDaniel huggable: production
huggable AlexDaniel, nothing found
AlexDaniel awww
RabidGravy people use it in "production"
mprelude I am aware that it's a very flawed question.
AlexDaniel mprelude: yeah, there are different ways to answer that question depending on what you actually need
moritz mprelude: people are making money by using Rakudo
mprelude: does that answer your question?
mprelude moritz: Yes :) 21:22
AlexDaniel I'd say no :)
whatever… :)
mprelude It means if I implement something today, is the language likely to change and break it? :D
RabidGravy nope
masak mprelude: yes, but probably much less so than you might think
AlexDaniel mprelude: well, after christmas release it is not supposed to change much 21:23
masak mprelude: the breaking changes are much more controlled than they were 7 years ago
RabidGravy well, I'd say "not if you're carefule"
mprelude I've been using p5 for years, keep wanting to do something in 6.
AlexDaniel mprelude: whether it happens to be true or not, well, we will see
mprelude: you missed so much! People have been using Perl 6 for years! 21:24
masak mprelude: cool! welcome aboard! write something and show it to us ;)
mprelude: pro tip: start small
21:24 sevvie joined
mprelude masak: Thanks, my usual start point is an implementation of the base IRC protocol :P 21:25
I've done that in about 15 languages now
alpha123 that's actually pretty smart
i like that
i might start doing that
sevvie hm. glad I joined when I did. I might start doing that too. XD
mprelude alpha123: It's a nice way to get a feel for a language, and you're working with a spec so can't get caught up in feature creep etc.
masak mprelude: sounds like fun!
mprelude It's also a really easy way to do TDD etc because it's a strict spec 21:26
masak mprelude: you might even enjoy combining that with Perl 6's concurrency features
AlexDaniel mprelude: perhaps you might want to look at existing implementations
mprelude masak: Will have to take a look.
alpha123 Perl6 would be a pretty swell language to implement an irc daemon or client in actually
masak mprelude: soo... let us know when you're writing to us on this channel using a Perl 6 IRC client, OK? :P
mprelude Are there any decent TDD (or better, BDD) modules yet?
masak mprelude: Test.pm is good for most things
mprelude: I usually layer something on top of that when I need to 21:27
mprelude masak: I'm a big fan of Cucumber for testing, but will look at Test.pm
masak oh, if you want to write tests Gherkin-style, I'm not sure what to recommend 21:28
probably easiest to yak-shave your own little thing for that
mprelude Might start with Test.pm, do some small stuff, then if I get to it, write a Gherkin-style testing lib
Lots to think about :)
sevvie gherkin, another good spec for experimenting in a language with. o.o 21:29
masak mprelude: if you've used Test::More in Perl 5, then Test.pm (which comes built-in with Rakudo) should feel familiar
21:32 Cabanossi left 21:33 abaugher left 21:34 rurban left, abaugher joined 21:35 Cabanossi joined
inwigilator huh, where is destroyWindow method 21:39
ZoffixWin, are you there? 21:41
masak inwigilator: please stand by while we locate ZoffixWin, who is not responding at the moment 21:42
mprelude Is there an equivelant to cpanfile for perl6 so I can one step initialize a project?
21:42 firstdayonthejob joined 21:44 rindolf left 21:45 kaare_ left
orbus okay 21:45
so
I have a module
RabidGravy I think a couple of people have made something similar
orbus how do I get it onto modules.perl6.org?
AlexDaniel orbus: send a pull request 21:46
RabidGravy PR to github.com/perl6/ecosystem adding the META.info of your project to META.list
orbus I only signed up for github today
still sort of figuring it out
ZoffixWin orbus, the README explains: github.com/perl6/ecosystem
inwigilator, wat?
orbus I've only used git for solo development prior to this 21:47
21:47 anthk_ joined
orbus okay, will take a look 21:47
thanks
inwigilator ZoffixWin, there are no DestroyWIndow method
ZoffixWin inwigilator, you can read the sauce and see everything it defines or not: github.com/timo/SDL2_raw-p6/blob/m...DL2/Raw.pm
inwigilator only DestroyRender method exist
ZoffixWin ZoffixWin, then define it yourself.
did... did I just talk to myself?
inwigilator, sub destroyWindow is native('SDL_whatever') {...}. It should be easy enough 21:48
anthk_ hello, a program which ran with a sightly older version of perl6 now gives me a "Cannot unbox a type object" error 21:49
AlexDaniel huggable: new module :is: Fork ecosystem repo, add your module to META.list and send a pull request. See README here: github.com/perl6/ecosystem
huggable AlexDaniel, Added new module as Fork ecosystem repo, add your module to META.list and send a pull request. See README here: github.com/perl6/ecosystem
inwigilator ZoffixWin, I am not sure should I get this lib to my lib folder in project and then try to add new method yeah?
AlexDaniel anthk_: no line number?
anthk_: if yes, then try with --ll-exception
anthk_: also, what is exactly “slightly older”? 21:50
orbus okay
ZoffixWin inwigilator, you don't need it in your project... if SDL2::Raw already works. See docs.perl6.org/language/nativecall
orbus will publish his module after he gets something to eat
can't publish on an empty stomach 21:51
ZoffixWin goes back to watching TV
inwigilator ZoffixWin, ey no :D
I need to add a new method to my main file and if it is work I can post it to contribute or what? 21:52
ZoffixWin inwigilator, yeah, submit a PR to SDL2::Raw 21:53
21:54 raiph left
inwigilator ZoffixWin, what is PR? 21:55
21:56 anthk_ left
mprelude Pull request 21:56
inwigilator ok thanks :)
21:58 anthk_ joined
anthk_ AlexDaniel: wait 21:59
AlexDaniel: pastebin.com/raw/geUb6cek 22:02
22:07 raiph joined 22:10 laz78 left
inwigilator I don't understand the meaning of *.type it is Whatevercode.new 22:11
is it like an object or what
22:11 cschwenz left, cosarara_ is now known as cosarara
lizmat shouldn't github.com/jnthn/p6-stomp be in the ecosystem ? 22:12
22:12 BenGoldberg joined
orbus guess that depends if jnthn considers it release-worthy yet 22:13
I saw the blog posts he was writing about it - didn't seem like he was done yet 22:14
skids inwigilator: "*.type" means "-> $thing { $thing.type }". A WhateverCode is Code made by a Whatever ("*") 22:16
inwigilator skids, whats a difference between * and _? then 22:17
AlexDaniel anthk_: hmm runs fine here 22:18
skids inwigilator: _ is just a topic. * makes code.
m: (*.say)(1) 22:19
camelia rakudo-moar d67cb0: OUTPUT«1␤»
22:19 espadrine joined
skids so *.say made a code object that says its argument, and then I called it with a 1. 22:19
AlexDaniel anthk_: can you change that so that it does not use a file?
anthk_: i.e. just hardcode some buf or something 22:20
anthk_: this way we can run it on camelia and see if it breaks here too
ely-se m: my &f = *.say; &f(42)
camelia rakudo-moar d67cb0: OUTPUT«42␤»
inwigilator ye I see
ely-se m: my &twice = * * 2; say &twice(3)
camelia rakudo-moar d67cb0: OUTPUT«6␤»
AlexDaniel m: say (* * *)(2, 10)
camelia rakudo-moar d67cb0: OUTPUT«20␤»
inwigilator m: say (*.type)(2) 22:21
camelia rakudo-moar d67cb0: OUTPUT«Method 'type' not found for invocant of class 'Int'␤ in block <unit> at /tmp/DoYw_lEAzn line 1␤␤»
AlexDaniel m: say (* × 2)(42) 22:22
camelia rakudo-moar d67cb0: OUTPUT«84␤»
AlexDaniel m: say {$_ × 2}(42)
camelia rakudo-moar d67cb0: OUTPUT«84␤»
AlexDaniel m: say {$^a × 2}(42)
camelia rakudo-moar d67cb0: OUTPUT«84␤»
22:22 Skarsnik left
AlexDaniel m: say -> $a {$a × 2}(42) 22:22
camelia rakudo-moar d67cb0: OUTPUT«84␤»
AlexDaniel jeez I love that 22:23
and it keeps going like that forever
skids m: class A { method type { A } }; (*.type)(A.new).say; # .type is probably something the code where you saw *.type defined.
camelia rakudo-moar d67cb0: OUTPUT«(A)␤»
AlexDaniel m: say sub ($a) {$a × 2}(42)
camelia rakudo-moar d67cb0: OUTPUT«84␤»
AlexDaniel m: say anon sub double($a) {$a × 2}(42) 22:24
camelia rakudo-moar d67cb0: OUTPUT«84␤»
ely-se m: say { [+] 2 xx $_ }(42)
camelia rakudo-moar d67cb0: OUTPUT«84␤»
skids inwigilator: the actual builtins for find the type of something are .WHAT and .^name 22:25
Hotkeys whoa
perl 6 has '×'?
m: 3 × 4 22:26
camelia rakudo-moar d67cb0: OUTPUT«WARNINGS for /tmp/dLfKNLzG6N:␤Useless use of "×" in expression "3 × 4" in sink context (line 1)␤»
Hotkeys oh
skids inwigilator: But .WHAT is more of macro
Hotkeys what does it do
flussence and ÷
inwigilator m: 2.WHAT
camelia ( no output )
Hotkeys m: say 3 × 4
camelia rakudo-moar d67cb0: OUTPUT«12␤»
skids m: 2.WHAT.say
camelia rakudo-moar d67cb0: OUTPUT«(Int)␤»
Hotkeys ah
forgot say
ely-se m: say 'a' x 3 × 4
camelia rakudo-moar d67cb0: OUTPUT«aaaaaaaaaaaa␤»
inwigilator skids, oh ok :) 22:28
AlexDaniel Hotkeys: how did you miss that?
flussence (and yes, we've already had the obligatory phase of forum FUD proclaiming how this one tiny addition will make the entire language unreadable...)
AlexDaniel Hotkeys: do you know about ∞? :)
Hotkeys: or superscripts… 22:29
Hotkeys: or smartquotes.
inwigilator Cannot look up attributes in a type object
22:29 acrussell left
skids inwigilator: that means you tried to call a method directly on a class instead of an object 22:30
inwigilator mm 22:31
skids (or, probably, tried to access class!attribute, or something you call did.) 22:32
inwigilator skids, pastebin.com/SHfxKFbn
I am trying to access public attire
22:32 kjs_ joined
inwigilator but as I read in intro it is proper way to do it 22:33
declared $.isRunning and I want to access it $!isRunning
in direct mode
skids m: class A { has $!a; method new { $!a = 1 } }; A.new # there is no object yet in .new, is why. 22:34
camelia rakudo-moar d67cb0: OUTPUT«Cannot look up attributes in a type object␤ in method new at /tmp/R5h8gcEQy0 line 1␤ in block <unit> at /tmp/R5h8gcEQy0 line 1␤␤»
inwigilator skids, ?:D 22:35
skids In new you either have to call bless yourself, and do such things after bless, or you need to do it in a submethod BUILD.
(If you do not call bless in new it is automatically added at the end)
Hotkeys AlexDaniel: yeah I know about the other fun unicode 22:36
set ops etc
I just didn't know the multiplication one
skids m: class A { has $!a; submethod BUILD { $!a = 1 } }; A.new.perl.say;
camelia rakudo-moar d67cb0: OUTPUT«A.new␤»
AlexDaniel Hotkeys: doc.perl6.org/language/unicode_texas 22:37
Hotkeys what does o do 22:38
is that compose
inwigilator skids I need to learn more about it 22:39
Hotkeys m: &join ∘ &comb 22:40
camelia ( no output )
inwigilator is it perl6 feature?
Hotkeys m: say &join ∘ &comb
camelia rakudo-moar d67cb0: OUTPUT«-> |args is raw { #`(Block|63053648) ... }␤»
Hotkeys hmm
AlexDaniel Hotkeys: ring operator… not documented
Hotkeys ah
22:40 musiKk left
AlexDaniel Hotkeys: p6weekly.wordpress.com/2015/10/05/...-new-face/ 22:40
skids inwigilator: some other languages make a similar distinction but they don't call them "new" and "BUILD" 22:41
Hotkeys so it is compose
inwigilator skids, okay thanks :)
22:42 inwigilator left 22:44 ely-se left 22:47 niceperl left
orbus the docs suggest that overriding new is considered poor practice 22:47
but that seems to be the only way to get positional arguments for your constructor
kind of annoying 22:48
AlexDaniel orbus: can't you do that with BUILD?
orbus I don't think so - as far as I know you can only do named arguments with BUILD 22:49
RabidGravy I don;t think so
skids orbus: Lots of people do it. Just try to be aware that your new might be reused by subclasses.
orbus hm, yeah
AlexDaniel ehhh… Am I the only one who feels that OOP stuff in Perl 6 is a little bit weird sometimes?
orbus I think OOP stuff in general is a little weird 22:50
RabidGravy m: class F { submethod BUILD($a) { } }; F.new(1)'
camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/epkO2lQldP␤Two terms in a row␤at /tmp/epkO2lQldP:1␤------> 3 F { submethod BUILD($a) { } }; F.new(1)7⏏5'␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ …»
orbus but no, I wouln't say you're alone
the BUILD/new thing still strikes me as odd, but maybe it just needs to be explained better 22:51
22:51 colomon joined
orbus the OO doc in general seems like it needs a refresh 22:52
there's a number of things it doesn't cover
or only covers briefly
dalek osystem: 72e4c1f | gotoexit++ | META.list:
Add Concurrent::BoundedChannel to the ecosystem.
osystem: 4ee4f27 | RabidGravy++ | META.list:
Merge pull request #135 from gotoexit/master

Add Concurrent::BoundedChannel to the ecosystem.
masak orbus: the BUILD/new thing works fairly well in practice, I find 22:53
orbus: though of course it can be explained more or less well
orbus: and I agree with you -- I also think OO stuff in general is a little weird ;) 22:54
orbus I think part of the problem is I don't really understand it that well - the intent seems to be that new shouldn't be overridden because it'll call the BUILD methods all the way up the inheritance chain for you 22:55
but then you have to override it to do common things like use positional parameters 22:56
I don't know what would be a better solution, mind
Java constructors are pretty weird too 22:57
skids orbus: no it's BUILDALL that calls all the BUILDS, and that is in turn called by bless. Using your own new does not interfere with that.
orbus ah, I see
so why do the docs advise against overriding new?
skids Which docs, BTW?
RabidGravy I think it may be over-stated 22:58
orbus doc.perl6.org/language/objects
"However this is considered poor practice, because it makes correct initialization of objects from subclasses harder."
so I guess I can see that
if you have a bunch of positional parameters, it might make things difficult for subclass authros
although it works well enough in java
in practice 22:59
RabidGravy it's create a multi new rather than a non multi one and that does away
orbus docs don't say anything about multi new - so maybe my initial thought was correct, and the docs just need a refresh
skids "this is considered poor practice in some heavily OO oriented styles" maybe 23:01
orbus it'd probably be nice if it explained the potential pitfalls (and how to avoid them), rather than a vague warning implying disapproval 23:02
RabidGravy m: class F { has $.a; multi method new($a) { return self.bless(:$a) }}; class G is F { has $.b; has $.c; }; say G.new(a => 1, b => 2, c => 3); say G.new(1) 23:03
camelia rakudo-moar d67cb0: OUTPUT«G.new(b => 2, c => 3, a => 1)␤G.new(b => Any, c => Any, a => 1)␤»
orbus tmtowtdi 23:04
skids Yeah that would also be a good place to mention *%_ being there to bail you out. 23:05
RabidGravy I would go with "if you want to be polite to sub-classes then you should consider a "multi new" so the sub-class can still get the default behaviour" 23:06
23:07 kjs_ left
masak 'night, #perl6 23:08
23:09 lokien_ left
dalek c: 6c977d8 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Callable.pod:
doc infix:<∘>
23:10
c: ed6cb28 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Str.pod:
Merge branch 'master' of github.com/perl6/doc
anthk_ AlexDaniel: the file is a ROM, where you just get opcodes. Instead of fetchig the opcode from a file, just declare the opcode to a random one , like 0x7X01 23:14
BenGoldberg Hmm, I'd expect an ∘ operator to accept any two functions, provided the return signature of the rhs matched the parameter signature of the lhs. Also, I'd hope for the resulting composed funtion to have the same paramature signature of the rhs, and return signature of the lhs. 23:15
23:16 Kcop joined 23:17 RabidGravy left
AlexDaniel anthk_: 0x7X01? X? 23:17
23:20 Xor_ left, travis-ci joined
travis-ci Doc build failed. Wenzel P. P. Peppmeyer 'Merge branch 'master' of github.com/perl6/doc' 23:20
travis-ci.org/perl6/doc/builds/104513954 github.com/perl6/doc/compare/6701b...6cb28964a0
23:20 travis-ci left, laz78 joined 23:22 raiph left
anthk_ AlexDaniel: 0x7201 sorry 23:25
23:27 raiph joined
AlexDaniel anthk_: can't replicate :( 23:29
reproduce* 23:30
well, I get an infinite loop with “unknown opcode” messages
anthk_ AlexDaniel: that's enough :)
AlexDaniel oh that's enough? 23:31
m: gitlab.com/snippets/14064
camelia rakudo-moar d67cb0: OUTPUT«0100␤unknown opcode␤»
AlexDaniel anthk_: ↑ so does it look right? 23:32
anthk_ in your case yes, in my case, I think there is a problem somewhere 23:33
23:33 sQuEE left, sQuEE joined
anthk_ 2015.12-219-gd67cb03 my version of perl6 23:34
perl6 -v This is Rakudo version 2015.12-219-gd67cb03 built on MoarVM version 2015.12-29-g8079ca5 implementing Perl 6.c. 23:35
23:35 pmurias left 23:42 xdoctor left 23:45 vendethiel left 23:54 pmqs__ joined
sortiz In the docs there are lots of methods documented as returning List:D when in fact they returns Seq:D, is this deliberate or just a pre-GLRism? 23:56
23:58 pmqs_ left
BenGoldberg AlexDaniel, The perl6 && operator is the same as in perl5. What you want is +& 23:58
AlexDaniel BenGoldberg: oh, so time travel was finally invented?
BenGoldberg: I remember that discussion… it was like two days ago or so? :) 23:59
sortiz Or simply a lack of formalism?