Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-03-24

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 pmichaud 'night from me also -- bbt
00:01 geekosaur joined #perl6
00:04 Omni|AFK joined #perl6
00:04 Omni|Work Is Parrot still the base of perl6?
00:13 lichtkind good night
00:13 lichtkind #
00:13 lichtkind good night
00:14 lichtkind ahh sorry
00:14 lichtkind had vusual problems
00:14 lichtkind Omni|Work:  yes rakudo still runs on parrot
00:14 lichtkind but will run also on other VM
00:15 lichtkind as Niecza, another compiler does today
00:15 timotimo and pugs, which doesn't run under a common VM
00:15 timotimo does pugs implement its own bytecode + VM under the hood?
00:16 lichtkind it runs on GHC
00:16 timotimo so ... it translates perl6 code into haskell and compiles and runs that? or what?
00:16 lichtkind i mean it has its own intermediatary structures
00:17 lichtkind yes
00:17 timotimo that's kind of cool
00:17 lichtkind theres also perlito
00:17 lichtkind which compiles to js and can run in a browser too
00:18 timotimo and it's got less features or passing tests than the intersection of passing tests for pugs, niecza and rakudo? :)
00:18 lichtkind true
00:18 lichtkind pugs was revitalized recently
00:18 lichtkind rakudo and niecza are really the heavyweights
00:19 timotimo how much exactly does the "std" implementation do, btw? is it only a grammar or does it do any semantics at all? maybe some type checking?
00:19 lichtkind real fun starts when rakudo runs on .net and jvm which will be full feature and bug compatible, which is more that ruby or python ever had
00:20 lichtkind ok STD is no implmentation
00:20 Omni|Work lichtkind: Thanks! I was thinking of the ideal situation for my simple Pythong server designed to serve up Bugzilla.
00:20 timotimo std: sub a(Int $a where * > 0) { say $a }; a(-1);
00:20 p6eval std 1ad3292: OUTPUT«ok 00:01 114m␤»
00:20 Omni|Work And parrot was the ideal situation. But, of course, no Python on Parrot. :-/
00:20 timotimo "no python on parrot" is wrong, there are several implementations :p
00:20 lichtkind yes no fullblown python however
00:21 lichtkind timotimo: ok lets explain STD
00:21 Omni|Work From what I can tell that means there have been several starts and no finishes. :-)
00:21 timotimo i wonder how hard it would be to make pypy emit PIR or something :p
00:21 timotimo there have also only been "several starts and no finishes" for perl6 ;)
00:21 * Omni|Work laughs.
00:22 Omni|Work I thought perl6 was very close to being done recently. I saw a flurry of press about it, and some really long strings of odd characters that did some really amazing stuff.
00:22 lichtkind timotimo: its just a parser which tells jou if some code is valid perl 6 and what part is what kind of token, it does no compiling just transformation into an AST
00:22 timotimo ah, okay
00:22 lichtkind Omni|Work: perl 6 is usable today
00:22 lichtkind its just not very fast or complete
00:23 * Omni|Work nods.
00:23 lichtkind timotimo: STD is actually a specification of perl 6 and an 100% corret parser which understands all of perl 6 which no other does
00:23 Omni|Work Not even any other human!
00:23 lichtkind :)
00:24 lichtkind thats one huge advantage over perl 5
00:24 timotimo :)
00:24 timotimo it is!
00:24 * Omni|Work laughs.
00:24 lichtkind we have an exact spec which can compile into a parser which can tell you if the code is correct
00:24 Omni|Work That is a nice advantage.
00:24 lichtkind that perl 5 never had
00:25 * Omni|Work nods.
00:25 timotimo it really is!
00:25 Omni|Work You had to run your program in order to figure out if it the syntax was correct.
00:26 lichtkind which doest gave guarabtee to understand what actually happened
00:26 * Omni|Work nods.
00:26 lichtkind even after seen the optree you didnt understood in some cases
00:27 lichtkind the perl 6 ready is a hairy question becasue any reasonably language needed time to ripe and we announced it befor we even started :9
00:28 lichtkind and you simply cant compare it with python 3000 which brought less new stuff than perl 5.10
00:29 lichtkind ok thei took different route and fight different sets of problems
00:29 timotimo :)
00:29 lichtkind any question remaining i leave now otherwise
00:30 timotimo python 3000 still caused enough problems ;)
00:30 timotimo i'm fine. thanks for the enlightenment and gute nacht :)
00:30 lichtkind yes it forces you adopt the new oop model , moose and the new mop will be otional
00:31 lichtkind will not come with 5.16 but 5.18 i suppose
00:31 timotimo "the new mop" will be exactly what perl6 has right now?
00:31 lichtkind now
00:31 lichtkind a mini version
00:31 lichtkind use MooseX to get full shebang
00:31 timotimo ok, fair enough
00:31 lichtkind only most needed parts will come into core
00:32 lichtkind its also to reduce codebase and increase speed of moose
00:32 lichtkind allrigth over and out
00:32 lichtkind have fien night
00:33 lichtkind fine
00:33 Omni|Work I have to run and enjoy the fantastic Seattle sunshine.
00:33 Omni|Work Thanks for your explanations.
00:33 Omni|Work And, I'm not being silly, it is gorgeous in Seattle today.
00:34 Omni|Work left #perl6
00:36 localhost joined #perl6
00:50 cogno joined #perl6
01:16 cogno joined #perl6
01:20 Tene joined #perl6
01:20 Tene joined #perl6
01:26 jaldhar joined #perl6
01:32 Trashlord joined #perl6
01:59 BruceZu-CNBJ joined #perl6
02:39 sivoais joined #perl6
02:48 xinming joined #perl6
02:53 aindilis joined #perl6
03:33 jaldhar joined #perl6
04:00 benabik joined #perl6
04:02 leprevost joined #perl6
04:07 sisar joined #perl6
04:12 am0c joined #perl6
04:24 Su-Shee_ joined #perl6
04:48 shinobicl_ joined #perl6
04:54 Psyche^ joined #perl6
04:57 TimToady joined #perl6
05:05 TimToady just figgered out I was badly netsplit for the last few hours
05:06 cogno joined #perl6
05:09 sorear wb
05:10 TimToady not that Friday nights are the liveliest time of the week
05:18 kaare_ joined #perl6
05:34 wolfman2000 joined #perl6
05:37 parthm joined #perl6
05:45 isBEKaml joined #perl6
05:58 mucker joined #perl6
06:06 sorear TimToady: still around?
06:16 TimToady vaguely
06:17 sorear wondering if you have any thoughts on the meaning of my @foo[**]
06:18 sorear at issue is the fact that normally my @foo[2 xx 5] requires 5 indexes to get a real slot, otherwise you just get a slice
06:19 sorear but @foo[* xx **] doesn't require infinite indexes
06:19 sorear * xx *
06:19 TimToady I'd say that's all the leaves for a multidim array, since ** is as many dimensions as necessary to match on either end
06:20 sorear I don't follow
06:20 sorear 1. leaves?
06:21 sorear 2. I thought ** made an infinite list
06:21 TimToady no, just an indefinite number
06:22 TimToady so .[1; **; 2] in a 2-d array, it represents 0 *s
06:22 sorear is that syntactic?
06:23 TimToady well, it has to know it operates at the ; level
06:24 sorear what are leaves?
06:24 TimToady the Foo of 'my Foo @matrix[3,3]'
06:25 TimToady er, 3;3
06:25 sorear ah, that's what I suspected
06:25 TimToady whereas * is just the op index
06:25 TimToady *top
06:29 sorear how does @foo[**] know whether @foo[2;3;4] is a leaf or a slice?
06:29 TimToady by the declaration of @foo
06:29 sorear my @foo[**]
06:29 TimToady which might be reduced to a dimensionality number
06:30 TimToady in that case it'd have to look at the effective shape of the actual data, if we allow it
06:31 TimToady presuming the Foo doesn't support Positional
06:31 TimToady alternately, we can bias it shallow or deep in ambiguous cases
06:32 sorear I'd rather not allow it, but S09:444
06:33 TimToady it's related to the shallow/duck/deep hyper question, I suppose
06:36 sorear so, one basic question would be 'my @foo[**]; say @foo[2;3].gist'
06:36 TimToady that doesn't appear to be a question :)
06:37 TimToady what's at 2;3 might be a leaf or it might not
06:38 sorear That's to be considered an entire program.
06:38 sorear What would it print, if ** were implemented as you imagine it?
06:39 TimToady well, I'd expect is says some variant of Nil, possibly with some autoviv info if it can't figure out it's strictly an rvalue
06:40 TimToady (think of Nil as the simplest Failure here)
06:40 sorear erm
06:41 sorear 'sub foo($x) { say $x.gist }; my @bar[**]; foo(@bar[2;3])
06:41 sorear '
06:41 sorear ==> 'foo(Nil)'
06:41 sorear which is the same as foo() because Nils are treated as argument-not-provided, use-defaults
06:41 sorear which is a runtime error, required positional not provided
06:41 sorear is that REALLY what we want?
06:42 sorear my p5-sense wants foo to just get an undefined value, not no value at all
06:42 TimToady then declare it $x?
06:43 TimToady I'm also assuming that Nil will be outside of Any
06:43 TimToady along with other failures
06:45 TimToady if you want to think of @bar[2;3] as returning a failure with autoviv info attached, that seems about right to me
06:45 TimToady the autoviv info isn't so very different from what is needed in a good error message anyway, I suppose
06:46 TimToady the issue of whether Nil is a failure with no other info is kinda independent of that
06:47 * sorear blinks a few times
06:47 * TimToady is speaking in terms of the OKness proposal here, more or less
06:48 sorear so, Nil + 1 should be 1 with a warning? &infix:<+> accepts ($x?, $y?) ?
06:49 sorear because I want 'say @array[2] + 5' to behave p5ishly
06:49 sorear if NaN and Nil are both kinds of failure, then why does NaN + 1 = NaN but Nil + 1 = 1 ?
06:53 TimToady well, NaN is a *bad* number, whereas Nil is just missing, I suppose one could argue, and lots of missing things like to default to 0 or '' (but not all, hence the warning)
06:54 birdwindupbird joined #perl6
06:54 TimToady then there's the whole issue of default values for arrays and hashes
06:56 TimToady which puts a weird spin on what you return to enable autoviv
06:56 TimToady presumably you could have a KetSet defaulting to 0, but then the autoviv element has to be 0 and also indicate it's not really there somehow
06:57 TimToady which is making my brane feel like it's almost bedtime
07:01 sorear well then I'll let you go ;)
07:01 sorear sleep well
07:01 TimToady well, False for a KeySet, 0 for a KeyBag, I guess
07:03 TimToady night, zzz &
07:06 sorear huh, it turns out a faster computer can run niecza's build substantially faster.
07:11 sorear niecza> my %hash; %hash<k> := 1..3; join ';', %hash<k>
07:11 sorear 1;2;3
07:12 dalek niecza: 1252cdb | sorear++ | lib/Kernel.cs:
07:12 dalek niecza: Don't itemize containers bound into an aggregate
07:12 dalek niecza:
07:12 dalek niecza: In accordance with discussions this week on #perl6.  This affects things like
07:12 dalek niecza: my %foo; %foo<k> := 1..3; join ';', %foo<k>
07:12 dalek niecza: review: https://github.com/sorear/niecza/commit/1252cdbdfd
07:13 fglock joined #perl6
07:14 sorear o/ fglock
07:14 fglock sorear: hi
07:19 fglock I'm looking at how to implement BEGIN blocks - the side-effects are hard to put back into the AST
07:41 sorear for niecza, implementing BEGIN required turning the AST system completely upside down
07:41 sorear in a metaphorical sense
07:54 lestrrat joined #perl6
08:14 tadzik hello #perl6
08:23 sorear hello tadzik
08:35 MayDaniel joined #perl6
08:42 Su-Shee joined #perl6
08:46 NamelessTee joined #perl6
09:28 JimmyZ_ joined #perl6
09:32 mj41 joined #perl6
09:54 nwc10 joined #perl6
10:25 havenn joined #perl6
10:25 MayDaniel joined #perl6
10:41 moritz \o
10:43 tadzik '
10:43 tadzik o/
10:51 fsergot o/
10:56 colomon o/
11:17 masak o/
11:23 birdwindupbird joined #perl6
11:31 masak sorear++ # tackling the S09 mysteries
11:31 masak also, the more I backlog over TimToady's OKness musings, the more nervous I become. :/
11:31 masak I mostly don't like where those ideas seem to be heading.
11:33 timotimo "pecl6, you're NOT going out dressed like this! go to your room and change!"
11:33 timotimo perl6*, durr
11:33 masak p6: my %hash; %hash<k> := 1..3; join ';', %hash<k>
11:33 p6eval pugs, rakudo a4c78f, niecza v15-5-g1252cdb:  ( no output )
11:33 masak p6: my %hash; %hash<k> := 1..3; say join ';', %hash<k>
11:33 p6eval pugs, rakudo a4c78f, niecza v15-5-g1252cdb: OUTPUT«1;2;3␤»
11:34 masak wow, total accord.
11:35 taryk joined #perl6
11:35 timotimo well, one would hope?
11:36 taryk|2 joined #perl6
11:41 masak my prior for it wasn't too large, since sorear++ made the change a few hours ago.
11:45 whiteknight joined #perl6
11:47 * felher just read a bit of S03 and wonders:
11:47 felher If i want objects of a class be able to compare to other objects of that class, i most likely want to define a 'WHICH'-method on them, right?
11:48 felher And then can '===' or '~~' those objects :)
11:48 felher nom: say "blar".WHICH
11:48 p6eval rakudo a4c78f: OUTPUT«Str|blar␤»
11:50 sjn heh
11:50 sjn the "Blair".WHICH project :)
11:50 felher *lol* :D
11:51 MayDaniel_ joined #perl6
11:55 felher Hm. So those object would automagically work with 'when'. sweet :)
11:57 masak r: class A { has $.x; method WHICH { "A|$.x" } }; my $a1 = A.new(:x(5)); my $a2 = A.new(:x(5)); say $a1 === $a2
11:57 p6eval rakudo a4c78f: OUTPUT«True␤»
11:57 masak r: class A { has $.x }; my $a1 = A.new(:x(5)); my $a2 = A.new(:x(5)); say $a1 === $a2
11:57 p6eval rakudo a4c78f: OUTPUT«False␤»
11:57 conntrack joined #perl6
11:57 masak seems to work fine, yes.
11:58 masak r: class A { has $.x; method WHICH { "A|$.x" } }; my $a1 = A.new(:x(5)); my $a2 = A.new(:x(42)); say $a1 === $a2
11:58 p6eval rakudo a4c78f: OUTPUT«False␤»
11:58 felher nom: say Mu.WHICH
11:58 p6eval rakudo a4c78f: OUTPUT«Mu␤»
11:58 felher Hm, and since every object seems to have a .WHICH-method, that seems to be roughly equivalent to java's compare.
11:59 masak heh. S03:1279 calls .WHICH a "metamethod" -- it really isn't. S03:1286 calls .WHICH a "macro" -- it really isn't.
12:00 masak felher: it's roughly equivalent to Java's .hashCode
12:02 felher masak: right. Maybe its more correct if i say: .WHICH is roughly equivalent to Java's .hashCode but seems to serve the same purpose as Java's .compare?
12:04 masak I don't see the connection to Java's .compare at all. That's the sole method on the Comparable interface. it's a static method with two Object paramters to be compared.
12:04 masak .WHICH is non-static and takes no non-invocant parameters.
12:05 masak Java's .compare is better contrasted with something like infix:<cmp> in Perl 6.
12:05 felher masak: oh, yeah, i meant equals... :)
12:05 masak oh!
12:05 felher damn it :) Sorry
12:07 masak .equals does value comparison, so it's best contrasted with infix:<eqv>, I think.
12:07 masak .WHICH serves slightly different purposes depending on whether your type is an entity type or a value type.
12:08 masak in the former case, all the attributes across two objects can be identical, but .WHICH would still differ. (in which case you don't need to override it, because that's the default behavior)
12:08 masak in the latter case, if the two objects are equivalent in terms of attributes, .WHICH will return the same value. (in which case you need to define your own)
12:10 felher masak: well, .equals, if you don't change it, seems to be more like '=:=', i.e. comparing the references of two objects. If you change it, you can compare the values of object, if you want to, but don't have to.
12:11 moritz \o
12:11 masak yeah. we're saying the same thing now.
12:11 felher great :)
12:12 masak furthermore, .equals in Java is just a "projected" version of .hashCode, in the sense that whenever .equals returns True on two objects, .hashCode is expected to give the same result on those two.
12:13 masak the reason .equals isn't automatically derived from .hashCode is that hashing can be expensive, and .equals can be made faster in many cases.
12:26 masak now the t/spec/S19-command-line/dash-e.rakudo tests TODO-pass. I'll unfudge them.
12:26 masak interesting suspicion: could it be that my fiddling with locale and LANG changed the outcome of those tests? :)
12:27 dalek roast: 47b0ce4 | masak++ | S19-command-line/dash-e.t:
12:27 dalek roast: Revert "[S19-command-line/dash-e.t] fudged for rakudo"
12:27 dalek roast:
12:27 dalek roast: This reverts commit 4cfafd6979ac540dd788615e8dfec5727b7b642d.
12:27 dalek roast: review: https://github.com/perl6/roast/commit/47b0ce4d0e
12:32 moritz masak: could be
12:35 felher masak: whats an 'entity type'?
12:42 ab5tract joined #perl6
12:47 taryk joined #perl6
12:48 mj41 joined #perl6
12:55 taryk joined #perl6
13:04 parthm joined #perl6
13:05 masak felher: a type of object with inherent identity. in the dichotomy "entity type"/"value type", the entity types generally have setters, and their .WHICH methods compute based on some object address, not based on the attributes.
13:06 masak contrast with a value type, which behaves a lot like built-in value types like Int or Str or Bool. two objects that both are 42, or both "OH HAI", or both False, are identical because-and-only-because they represent the same value.
13:07 masak in short, objects of value type are identical iff they are equivalent. entity types are not.
13:24 felher masak: ok, thanks :)
13:25 masak there's the usual pure/sinful division between value types and entity types. just like with FP/assignment, or monads/side-effects, or DRY/denormalization.
13:26 masak that is, there are clear benefits to doing things the pure way (using value types, for example), and the academic view often backs that side.
13:26 masak but generally you have to be sinful somewhere. the core business component of a design is often an entity type of some sort.
13:30 moritz there are also clear benefits to mutable data structures
13:31 moritz like, that's what computers do best
13:31 moritz try something very trivial like "count how often each character occured in a string" with immutable data structures in O(acceptable)
13:32 masak right.
13:32 masak though immutability sometimes gives surprising speed/space benefits, too.
13:32 masak git being perhaps the prime example of that.
13:32 masak all you ever do in a repo is build ever deeper immutable structures.
13:33 masak and it all works out very efficiently, because it's factored just the right way.
13:33 felher masak: would List.equals equals a list with the same elements vs. [1,2,3].WHICH is different from [1,2,3].WHICH be an example of the difference you saw between .WHICH and .equals?
13:33 moritz masak: except when you use branches, which you do all the time
13:34 masak felher: two Arrays [1, 2, 3] in Perl 6 would have different .WHICH values and compare false with infix:<===> (because they are mutable containers and thus entity types). but they would compare True with infix:<eqv>.
13:34 masak s/two/two distinct/
13:35 felher masak: great. Then i think i got your point :)
13:35 masak moritz: I don't understand the "except". you're still building immutable structures.
13:35 Chillance joined #perl6
13:35 moritz masak: and you're updating the 'master' and 'HEAD' pointers, which are mutable objects
13:36 masak that falls under my "you have to sin a little" exception. the point is that commits are immutable/value objects.
13:37 moritz right
13:37 masak actually, commits flaunt their immutability by promising that their SHA hash value describes the entire commit.
13:37 moritz but I refuse to call them "sin"
13:37 masak you don't have to accept my analogy, just that it's describes a valid point ;0
13:37 masak ;)
13:38 moritz accepted
13:38 masak \o/
13:39 masak call it "impurity" or whatever. I tend to see the phenomenon all the time nowadays. many successful models seem to have just the right engineering mixture of academic purity and pragmatic schmutz.
13:43 masak that ties in, by the way, to why I don't like putting up "theory" and "practice" as irreconcilable opposites. they seem more like disciplines that co-exist and thrive off each other.
13:47 felher I have to go shopping to get someting nom'able. Thanks for your explanations and your patience, masak :)
13:47 felher masak++
13:49 masak thanks for letting me babble on about things I'm still learning myself. :)
13:49 masak felher++
13:49 masak moritz++
13:53 masak moritz: this book http://www.amazon.com/Purely-Functional-Structures-Chris-Okasaki/dp/0521663504/ has always caught my interest. I wouldn't be surprised if it contained a recipe for a persistent but O(acceptable) data structure for counting how often each character occurs in a given string.
13:54 masak I haven't read it yet, but I'd like to.
14:00 havenn joined #perl6
14:14 pochi joined #perl6
14:24 GlitchMr joined #perl6
14:25 GlitchMr Just wondering, I want to make something serious in Perl 6, and I wonder if any text editor can do syntax highlighting for Perl 6 (not Perl 5).
14:27 moritz vim and emacs
14:27 moritz and padre
14:31 GlitchMr Thanks, I will check those
14:31 MayDaniel joined #perl6
14:34 GlitchMr ... ok... Padre seems to work weirdly... I press "Enter" and it makes two linebreaks... just what...
14:35 masak probably something the good folks on #padre would like to hear about.
14:35 GlitchMr And syntax highlighter in Padre... is very simple...
14:36 GlitchMr It only seems to recognize few keywords, numbers and strings...
14:36 masak to be honest, I haven't found a syntax highlighter for Perl 6 yet that's worth the hassle of setting it up.
14:36 ponbiki joined #perl6
14:37 GlitchMr heh... I guess I should make one yourself :P.
14:37 GlitchMr Before doing anything...
14:37 masak the one I was least disappointed with was the cperl-mode in Emacs, which is a Perl 5 syntax highlighter, but is fault-tolerant enough to handle Perl 6 fairly well.
14:37 masak GlitchMr: I'd rather see you contributing Perl 6 code than Perl 6 syntax highlighter code ;)
14:37 GlitchMr I've considered Notepad++, but it's failure with Perl 6 grammars...
14:39 GlitchMr Perhaps Kate would work (Perl 5, but it doesn't seem to find regexpes everywhere)... perhaps...
14:39 masak I know jnthn uses http://www.e-texteditor.com/
14:40 masak it seems decent, even though it'll never replace vim and Emacs for me ;)
14:40 havenn joined #perl6
14:40 GlitchMr Looks nice, but I don't think I want to pay $50 for yet another editor :P
14:43 masak huh. never noticed it cost money.
14:46 PacoAir joined #perl6
14:50 flussence .oO( make your code flow like natural language and you won't need highlighting! )
14:51 GlitchMr heh...
14:51 GlitchMr It's hard to call "sub" for example natural language :P
14:52 GlitchMr ... but... do I need this word...
14:52 GlitchMr ... after all... code blocks can be created using {}...
14:53 masak but they can't be 'return'-ed from.
14:53 GlitchMr perl6: my $a = 5; $a();
14:53 p6eval rakudo a4c78f: OUTPUT«Method 'postcircumfix:<( )>' not found for invocant of class 'Int'␤  in <anon> at src/gen/BOOTSTRAP.pm:812␤  in any <anon> at src/gen/BOOTSTRAP.pm:808␤  in block <anon> at /tmp/t1yJ0EfOgk:1␤␤»
14:53 p6eval ..pugs: OUTPUT«*** Cannot cast from VInt 5 to VCode (VCode)␤    at /tmp/fPwlXVGinE line 1, column 12-16␤»
14:53 p6eval ..niecza v15-5-g1252cdb: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class Int␤  at /tmp/TuWJ9Mulxo line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3838 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3839 (module-CORE @ 65)…
14:53 benabik joined #perl6
14:53 GlitchMr perl6: my $a = { 5 }; print $a();
14:53 p6eval pugs, rakudo a4c78f, niecza v15-5-g1252cdb: OUTPUT«5»
14:54 GlitchMr But... do I need to return?
14:56 flussence I was reading an article yesterday about "point-free" code in Haskell, pretty interesting and sort of related to that
14:57 flussence the idea is you don't name point A or point B (the input/output values), just define how to get from one to the other
14:58 flussence I suppose the p6 equivalent would be using $_ a lot
14:59 colomon I'd think it would be more along the lines of chained method calls or feeds.
14:59 colomon n: say ^Inf.map(* ** 2).grep(* %% 3)[^10]
14:59 p6eval niecza v15-5-g1252cdb: OUTPUT«0..^10␤»
14:59 flussence makes sense :)
15:00 colomon n: say (^Inf).map(* ** 2).grep(* %% 3)[^10]
15:00 p6eval niecza v15-5-g1252cdb: OUTPUT«0 9 36 81 144 225 324 441 576 729␤»
15:00 colomon though I guess I did use two Whatevers in there.  :)
15:00 flussence I think it boils down to "avoid defining variables"
15:01 flussence (avoid "="?)
15:01 GlitchMr perl6: ({sleep 2; print ('a')}()) | (print('b')) | (print('c'));
15:01 p6eval pugs: OUTPUT«*** Unsafe function 'sleep' called under safe mode␤    at /tmp/rfqjQYaSJT line 1, column 3-10␤»
15:01 p6eval ..rakudo a4c78f, niecza v15-5-g1252cdb: OUTPUT«abc»
15:01 GlitchMr So I guess that it doesn't use multithreading for now :P...
15:02 flussence The ». syntax is specced to, but right now it's just emulated by processing inputs in random order
15:02 GlitchMr lol...?
15:03 flussence it's to stop people writing code that assumes it'll always be ordered
15:03 masak GlitchMr: you never "need" to return, but sometimes logic gets simpler if you can.
15:04 GlitchMr Well, technically all you need are variables, conditional goto and file handle operations :P...
15:05 GlitchMr perl6: my @array = 1..10; @array».say;
15:05 p6eval rakudo a4c78f: OUTPUT«6␤5␤3␤8␤9␤2␤10␤7␤4␤1␤»
15:05 p6eval ..pugs: OUTPUT«2␤3␤4␤5␤6␤7␤8␤9␤10␤1␤»
15:05 p6eval ..niecza v15-5-g1252cdb: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
15:06 GlitchMr But... isn't emulation of multithreading nearly useless?
15:06 masak yes.
15:07 masak feel free to implement the real thing for us.
15:07 GlitchMr :P
15:07 GlitchMr Well, I can understand it could be very difficult :P.
15:07 GlitchMr And this is community project ;)
15:07 masak not very. just difficult.
15:08 GlitchMr Is there forking at least?
15:08 masak maybe in Niecza.
15:08 flussence as the web's shown, people usually write code until it works for them, not for what the spec says :)
15:08 GlitchMr Which would work...
15:08 dalek ecosystem: 282fbc0 | colomon++ | META.list:
15:08 dalek ecosystem: Tried to fix Math::ContinuedFractions.
15:08 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/282fbc0f17
15:10 dalek features: db29f93 | (Carl Mäsak)++ | features.json:
15:10 dalek features: Second attempt at unbreaking the json
15:10 dalek features:
15:10 dalek features: That comma shouldn't be there, I guess.
15:10 dalek features: review: https://github.com/perl6/features/commit/db29f932c5
15:23 colomon wow, panda search Math is going very slowly....
15:25 * colomon naturally immediately runs the command again to see if it is as slow the second time.
15:30 MayDaniel joined #perl6
15:31 masak what's the slow part?
15:31 masak (my guess is JSON parsing)
15:31 colomon I've no idea, I just know it's slow.
15:32 colomon panda-niecza is drastically faster at this command
15:32 colomon neither point actually helps me understand why Math::ContinuedFractions cannot be found.  :\
15:34 masak debugging time! \o/
15:36 colomon have there been recent changes to JSON that would make it much slower?
15:38 colomon 4m21s on rakudo
15:38 colomon 6s on niecza
15:38 colomon CAVEAT: I think panda-niecza is probably using a several months old version of JSON
15:39 xenu joined #perl6
15:39 masak that's... slow. :(
15:40 masak I consider that an error.
15:40 masak if you can golf it, I'll rakudobug-submit it for you.
15:41 colomon if I can do all the work, you'll do the last step?  ;)
15:42 masak dang, that usually works! ;)
15:43 orafu joined #perl6
15:43 jevin joined #perl6
15:43 ivan`` joined #perl6
15:43 krakan joined #perl6
15:44 colomon shell "wget 'feather.perl6.nl:3000/list' -O '$!projectsfile'";
15:44 colomon why is this how the ecosystem information is fetched?
15:45 colomon it doesn't have Math::ContinuedFractions
15:45 masak tadzik: ping
15:46 * flussence runs `perl6 --profile `which panda` search Math`, ooc
15:46 masak I have no idea, but my guess would be that feather.perl6.nl:3000/list is populated from https://github.com/perl6/ecosystem/blob/master/META.list somehow
15:47 Psyche^ joined #perl6
15:50 masak walk &
15:56 flussence argh... I did > instead of 2> and half the output disappeared off my scrollback!
15:56 havenn joined #perl6
16:11 havenn joined #perl6
16:13 GlitchMr joined #perl6
16:13 flussence hm, this profile says half the time is spent in grammar parsing... which means the other half isn't
16:15 nwc10 left #perl6
16:17 flussence so JSON::Tiny isn't *entirely* at fault, but that's about all I can figure out from this output, it's all too low-level for me.
16:22 colomon flussence++
16:23 flussence I've stuck the profile in my homedir on feather3, if anyone wants it
16:23 colomon url?
16:24 * colomon doesn't actually have an account on featherN...
16:24 flussence it doesn't seem to be running a httpd, I could try running a temporary one...
16:26 colomon nah, don't sweat it.
16:26 colomon e-mail it to my id at gmail?
16:26 flussence that'd work :)
16:26 flussence username@ ?
16:26 colomon yes
16:28 flussence sent
16:28 colomon got it, thank you
16:37 thou joined #perl6
16:46 jferrero joined #perl6
16:49 TimToady japhb: I would say that rosettacode is a very good place to put examples, but not the only place, since it's organized more by task rather than by language, and sometimes you just want a bunch of things from one language together, or have a better indexing scheme than RC provides to find poorly named tasks
16:49 sorear good * #perl6
16:50 TimToady o/
16:50 havenn joined #perl6
16:50 sorear masak: I too am uneasy about the way OKness is headed.
16:51 sorear o/ TimToady
16:54 sorear There have been a total of four semantic commits this month.  I am planning to skip this month's release.
16:57 _sri joined #perl6
17:00 jferrero joined #perl6
17:00 whiteknight joined #perl6
17:02 moritz don't
17:02 moritz if you do time-based releases, do time-based releases
17:08 masak +1
17:10 spider-mario joined #perl6
17:11 sorear o/ masak
17:11 spider-mario hi, I’m glad to see that there are so many people interested in Perl 6 :)
17:11 sorear Hello and welcome, spider-mario
17:11 spider-mario I’m a new and enthusiastic user.
17:12 sorear Nah, they aren't really here for Perl 6, they just hang out bucause it's one of the friendliest channels here :p
17:12 spider-mario :D
17:13 * sorear has tuits for the first time in ages and is puzzling over how multidimensional arrays should work
17:18 sorear well, this is an awkward silence.  I guess I should ask spider-mario some questions or something
17:18 spider-mario or I could ask one
17:19 spider-mario would you know how to have raw interpolation of a variable in a regex?
17:19 fsergot joined #perl6
17:20 gfldex spider-mario: http://perlcabal.org/syn/S05.html#Variable_%28non-%29interpolation
17:20 gfldex i herein confirm to be here for the general friendlyness
17:20 spider-mario that’s what I’ve come across
17:21 spider-mario oh, sorry, I missed a point
17:21 spider-mario “However, if $var contains a Regex object, instead of attempting to convert it to a string, it is called as a subrule, as if you said <$var>.”
17:21 spider-mario I kind of read it backwards
17:21 spider-mario so, I just need to write <$x>, appearently.
17:21 spider-mario thanks. :)
17:22 spider-mario great, it works, indeed
17:22 spider-mario \o/
17:22 TimToady I think you were defining "raw" backwards from us there :)
17:23 TimToady we tend to think of the bare string as raw, and interpolating it as a regex as "cooked"
17:23 pmichaud good afternoon, #perl6
17:23 TimToady which is backwards from how P5 thinks of it
17:23 pmichaud (briefly)
17:23 spider-mario oh, ok
17:23 spider-mario sorry, I’ll remember that :)
17:24 TimToady no problem, just one of the many areas we flipped the default to something a bit more sensible
17:24 masak spider-mario: welcome!
17:25 spider-mario thank you :)
17:25 TimToady and the very fact that the new default is more sensible causes us to forget that other people might think of it the other way around
17:26 pmichaud sorear: (time based releases) -- I agree with moritz++ and masak++.  Do the time-based release, even if there's not much (or even any) change from the previous release.  Unless the release process is a pain.  :-)
17:26 pmichaud sorear: is your release process documented somewhere?  Maybe now is the time to get release managers :-)
17:27 colomon sorear-tuits++
17:28 GlitchMr perl6: my $a = 2; $a ==== 2; print $a;
17:28 sorear :-)
17:28 p6eval niecza v15-5-g1252cdb: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Cannot make assignment out of === because chaining operators are diffy at /tmp/bWRoTfCkc0 line 1:â�¤------> [32mmy $a = 2; $a ====[33mâ��[31m 2; print $a;[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/l…
17:28 p6eval ..rakudo a4c78f: OUTPUT«True»
17:28 p6eval ..pugs: OUTPUT«2»
17:29 sorear spider-mario: in Perl 5 a regex is a kind of string that is parsed at match time.  In Perl 6 regexes are code with a funny syntax that is parsed with the rest of your code.
17:30 sorear <$foo> is really a kind of eval()
17:30 spider-mario that’s what I suspected
17:30 spider-mario but thanks for making it clear and explicit
17:30 sorear like how you can sort of interpret 5 + eval($foo) * 8 as "interpolating" $foo into the expression
17:30 sorear with the caveat that precedence is fixed
17:30 GlitchMr Well, in Perl 5, s/blah/print 2/e; is also kind of eval, but parsed in compile time :P.
17:30 sorear <$foo> always interpolates as an atom
17:30 GlitchMr (unlike PHP)
17:30 masak I'd volunteer to do a Niecza release.
17:30 pmichaud I suspect we'd have several Niecza release volunteers.
17:31 sorear you can't do my $foo = '*' ; / q <$foo> /
17:31 pmichaud I'd volunteer but my tuits are too unreliable.
17:31 GlitchMr As B::Deparse says...
17:32 jferrero joined #perl6
17:33 pmichaud okay, time for me to go again .. bbl
17:33 colomon o/
17:34 shinobicl__ joined #perl6
17:34 masak r: my $foo = '*'; say "q*" ~~ / q <$foo> /
17:34 p6eval rakudo a4c78f: OUTPUT«===SORRY!===␤Method 'rxtype' not found for invocant of class 'Integer'␤»
17:34 masak innerestin'.
17:34 sorear masak: there's docs/release.txt; I don't know how useful it is
17:35 sorear n: my $foo = '*'; say "q*" ~~ / q <$foo> /
17:35 p6eval niecza v15-5-g1252cdb: OUTPUT«Unhandled exception: Quantifier quantifies nothing␤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1362 (die @ 3) ␤  at /home/p6eval/niecza/src/STD.pm6 line 5722 (STD.sorry @ 5) ␤  at /home/p6eval/niecza/src/STD.pm6 line 4827 (Regex.metachar:quant @ 5) …
17:35 spider-mario Quantifier quantifies nothing
17:35 spider-mario is that what you meant by
17:35 spider-mario <sorear> <$foo> always interpolates as an atom
17:35 spider-mario ?
17:36 masak sorear: it looks straightforward enough. I could dry-run it once first, just to be sure there are no surprises.
17:36 sorear I mean that it's interpreted as /q [[[[ * ]]]] /
17:36 spider-mario hm.
17:36 sorear [] is how we write (?: ) now
17:36 TimToady give or take a billion square brackets
17:37 masak I prefer Niecza's error to Rakudo's.
17:37 masak r: say '' ~~ / * /
17:37 p6eval rakudo a4c78f: OUTPUT«===SORRY!===␤Method 'rxtype' not found for invocant of class 'Integer'␤»
17:37 masak ah, there we go.
17:37 TimToady what sorear means is that the interpolated expression must be able to stand on its own as a regex
17:37 * masak submits LTA rakudobug
17:38 kaare_ joined #perl6
17:38 TimToady to do something lower level than that would require a macroish thing
17:38 sorear I do have the tuits for a release.
17:38 TimToady of the sort masak isn't working on yet
17:39 sorear The original idea was that I might be wasting p6a's time with a nearly empty annoucement
17:39 spider-mario I understood it that way
17:39 spider-mario and it matches what I needed
17:39 spider-mario (no pun intended)
17:39 sorear or also like how 'my $x = 2 + 3; say $x * 5' doesn't print 17
17:40 sorear LTA, tuits, p6a, I wonder if spider-mario is lost ;)
17:41 spider-mario I haven’t seen “LTA”, but I am, a little. :p
17:41 masak TimToady: are you implying I'd ever take on 'is parsed' macros? :) doubtful.
17:41 spider-mario oh, 18:37:40
17:42 spider-mario (LTA)
17:42 masak "Less Than Awesome"
17:42 spider-mario thanks :)
17:42 jferrero joined #perl6
17:42 masak a code word for "it gives an error message, but it's not up to our high standards"
17:46 sorear p6[acul] = perl6-{announce,compiler,users,language}@perl.org
17:46 spider-mario thank you
17:46 masak sorear: I think you should do the release, and not be the least apologetic about not having done as many semantic commits as you would've liked. consider it a "legitimate PR moment", because it is. a minute of everyone's time where they all slow down, read your thoughts on current and future Niecza development, and get excited about Niecza.
17:47 masak sorear: this is *especially* true since Niecza doesn't have a web site. :P
17:47 spider-mario (I feel like I’m repeating myself, does English not have any other expression to thank someone else?)
17:47 masak spider-mario: a "tuit" is an idealized piece of productivity.
17:48 spider-mario oh, that’s an interesting concept :D
17:48 masak spider-mario: from the phrase "I'll do it when I get around to it."
17:48 sorear "here, have a round tuit"
17:48 masak ("a round tuit" -- get it?) :)
17:48 masak spider-mario: on Perl conferences and workshops people are known to hand out free tuits. they're round, made of wood, and slightly bigger than a coin.
17:49 shinobicl__ left #perl6
17:49 spider-mario sounds like something I want.
17:49 * sorear wonders what the size of coins in .se is
17:49 shinobicl__ joined #perl6
17:51 masak sorear: see the table at https://en.wikipedia.org/wiki/Swedish_krona#Coins
17:53 spider-mario the more I learn about Perl 6, the more I love it
17:53 spider-mario it’s like the programming language I’ve always been dreaming of
17:54 spider-mario and its community looks amazing :)
17:55 masak glad you like it. :) many of us are here for just those reasons, too.
17:59 sorear masak: ...the pictures aren't showing up for me
18:00 masak curious. not here either.
18:01 masak though judging by the source, those are not very realistic images anyway.
18:02 masak just circles showing the approximate color.
18:03 isBEKaml joined #perl6
18:03 masak isBEKaml! \o/
18:03 isBEKaml masak: hi!
18:05 sorear the measurements at least are there... about the same as USD coins
18:05 isBEKaml hmm, there has been little change since last niecza build. sorear, big thing cooking? :)
18:06 sorear nah, just tuit starved.
18:06 sorear spring break soon :>
18:06 isBEKaml \o/ sorear++
18:06 isBEKaml Not sure if I can help, anything LHFish?
18:07 masak spider-mario: "LHF" -- "low-hanging fruit" :)
18:07 spider-mario :D
18:07 BruceZu-home joined #perl6
18:08 spider-mario I love learning all those expressions
18:08 spider-mario thanks a lot :D
18:08 isBEKaml spider-mario: nah, just hover over those looking like acronyms on irclog.perlgeek.de. You get quite a bunch here. :)
18:08 masak oh, right!
18:09 masak also, you get links into the spec, when people say things like S01:33
18:11 isBEKaml [Coke]: what does the state of pugs look like as far as test runs go? close to 50%? :)
18:11 * masak makes supper &
18:15 isBEKaml std: my @foo[ ** ];
18:15 p6eval std 1ad3292: OUTPUT«ok 00:01 110m␤»
18:15 isBEKaml std: my @foo[25 xx 42];
18:15 p6eval std 1ad3292: OUTPUT«ok 00:01 112m␤»
18:23 shinobicl__ left #perl6
18:25 shinobicl__ joined #perl6
18:29 TimToady masak: two bug reports for the price of one; rakudo and niecza both fail this test for different reasons: https://gist.github.com/2185853
18:29 TimToady niecza because it has not take-rw (though take works because it doesn't properly decontainerize)
18:30 TimToady rakudo because of the scoping issue in the list comprehension (pretty much any refactoring of the loop and conditional works)
18:32 MayDaniel joined #perl6
18:45 TimToady the take vs take-rw issue is kind of a killer for putting a forest fire up on RC that works under both niecza and rakudo
18:47 masak I've never seen a gather inside of a statement_mod for before. is that spec'd to do what you mean?
18:48 TimToady it's not inside
18:48 masak well, the statement_mod modifies the whole statement, doesn't it?
18:48 TimToady the statement that gather starts
18:48 TimToady statement prefixes are like a big left curly
18:49 TimToady just as listops are like a left paren
18:49 masak oh, so you're saying it's LHS = (gather EXPR if for)
18:49 sorear what -rw forms are needed?
18:49 sorear take-rw, return-rw, leave-rw?
18:49 TimToady anything that decontainerizes by defualt
18:49 sorear I can certainly add those as synonyms for the non-rw forms, until such time as the latter work
18:49 * colomon is imagining that creating take-rw in niecza is probably very easy, given that regular take already works that way....
18:50 TimToady that would be a good temp workaround
18:51 TimToady masak: I don't know what you mean by that.  gather statement is like gather { statement }, and the modifiers on statement belong to statement in either case, and don't escape to even see the gather
18:53 sorear colomon: that's exactly what I mean
18:53 colomon sorear: yeah, we were both typing the same idea at the same time.  :)
18:53 colomon sorear: and bonus, it's a new feature for this month's release!
18:53 TimToady \o/
18:56 dalek niecza: efda208 | sorear++ | lib/CORE.setting:
18:56 dalek niecza: Add take-rw and return-rw
18:56 dalek niecza:
18:56 dalek niecza: They are currently synonymous with the undecorated forms, but this won't
18:56 dalek niecza: last forever.
18:56 dalek niecza: review: https://github.com/sorear/niecza/commit/efda20854e
18:56 TimToady oh, and that test case also has a hack because nom doesn't autoviv, which could go away if that were fixed
18:56 * colomon wishes he knew why his VIsual C++ 2005 project files will not upgrade to Visual C++ 2010.  :(
19:03 thou joined #perl6
19:05 ggoebel joined #perl6
19:10 zipf joined #perl6
19:23 taryk left #perl6
19:33 masak TimToady: I'm wondering if you haven't just re-discovered https://rt.perl.org/rt3/Ticket/Display.html?id=109322
19:33 moritz r: /*/
19:33 p6eval rakudo a4c78f: OUTPUT«===SORRY!===␤Quantifier quantifies nothing at line 1, near "/"␤»
19:34 moritz r: my $x = '*'; /<$x>/
19:34 p6eval rakudo a4c78f:  ( no output )
19:34 moritz r: my $x = '*'; /q <$x>/
19:34 p6eval rakudo a4c78f:  ( no output )
19:34 moritz r: my $x = '*'; so /<$x>/
19:34 p6eval rakudo a4c78f: OUTPUT«Method 'match' not found for invocant of class 'Any'␤  in method Bool at src/gen/CORE.setting:8330␤  in sub prefix:<so> at src/gen/CORE.setting:2053␤  in block <anon> at /tmp/xUQbVM7GvY:1␤␤»
19:35 moritz r: my $x = '*'; 'a' ~~ /<$x>/
19:35 p6eval rakudo a4c78f: OUTPUT«===SORRY!===␤Method 'rxtype' not found for invocant of class 'Integer'␤»
19:35 moritz the real question is, why doesn't it parse-error the same way as the original regex?
19:36 masak r: '' ~~ / * /
19:36 p6eval rakudo a4c78f: OUTPUT«===SORRY!===␤Method 'rxtype' not found for invocant of class 'Integer'␤»
19:36 masak it does.
19:36 masak question is what exact circumstances trigger it.
19:36 moritz r: /* *
19:36 p6eval rakudo a4c78f: OUTPUT«===SORRY!===␤Quantifier quantifies nothing at line 1, near " *"␤»
19:36 moritz r: /* /
19:36 p6eval rakudo a4c78f: OUTPUT«===SORRY!===␤Quantifier quantifies nothing at line 1, near " /"␤»
19:36 moritz r: /*/
19:36 p6eval rakudo a4c78f: OUTPUT«===SORRY!===␤Quantifier quantifies nothing at line 1, near "/"␤»
19:36 moritz hm
19:38 moritz what's the difference?
19:38 masak far as I can see, you get the 'rxtype' error (at compile time!) if you include the '~~'.
19:38 masak which makes no sense at all.
19:39 masak "I notice that I am confused." :)
19:39 moritz aye
19:39 moritz nqp: /*/
19:39 p6eval nqp: OUTPUT«Quantifier quantifies nothing at line 1, near "/"␤current instr.: 'nqp;HLL;Grammar;panic' pc 22008 (src/stage2/gen/NQPHLL.pir:7047) (src/stage2/gen/NQPHLL.pm:329)␤»
19:41 moritz r: "" ~~ /*/
19:41 p6eval rakudo a4c78f: OUTPUT«===SORRY!===␤Quantifier quantifies nothing at line 1, near "/"␤»
19:41 moritz r: "" ~~ / * /
19:41 p6eval rakudo a4c78f: OUTPUT«===SORRY!===␤Method 'rxtype' not found for invocant of class 'Integer'␤»
19:41 moritz so, one needs ~~ *and* whitesapce to trigger it?
19:42 moritz r: / * /
19:42 p6eval rakudo a4c78f: OUTPUT«===SORRY!===␤Method 'rxtype' not found for invocant of class 'Integer'␤»
19:42 moritz no, just whitespace
19:42 moritz so, probably a parsing bug
19:45 masak ah.
19:45 * masak updates the RT ticket
19:45 masak moritz++ # rational elucidation
19:47 moritz the parsing chain goes like this: TOP -> Nibbler -> termconj -> termish -> quantified_atom -> atom -> metachar:sym<quantifier>
19:47 moritz and all of them are tokens
19:47 moritz and none allows whitespace
19:49 moritz std: / */
19:49 p6eval std 1ad3292: OUTPUT«ok 00:01 109m␤»
19:49 masak o.O
19:51 havenn joined #perl6
19:52 moritz it parses the blank as metachars:sigwhitespace
19:53 moritz niecza: / */
19:53 p6eval niecza v15-6-gefda208:  ( no output )
19:53 moritz o.O
19:53 masak the rot goeth deep.
19:54 moritz I tried to see how STD and niecza do it, so that I could replicated that behaviour
19:54 TimToady implementing S05:321 correctly will probably fix that
19:54 moritz well, I decided not to that now :-)
19:56 TimToady 'that' as a predicate, yum
19:56 * masak .oO( that that! )
19:56 TimToady That me again, Sam.
19:57 masak "A riff off a non-quote!", he that incredulously.
19:57 moritz just a missing verb
19:57 TimToady at first I almost said: That sentence one verb
19:58 masak moritz: aye. and quite an easy to make/explain omission.
19:58 masak 'to' looks a bit like 'do'.
19:58 TimToady in other news, Perl 6 has introduced the 'go do' statement
19:59 masak it a Perl 6 statement as an expression... in a Google Go goroutine? :)
19:59 masak argh, s/it /it evaluates /
20:00 masak the non-verb disease is spreading!
20:00 spider-mario oh, I just saw you are the author of ufo, masak?
20:01 masak spider-mario: if you can call it an act of authoring, yes.
20:02 spider-mario yes, I see there are contributions from others
20:02 spider-mario nice job, everyone :)
20:02 moritz well, the aliens did a nice job, no? :-)
20:03 masak there's nothing particularly innovative about ufo. but I think it's my most popular Perl 6 script out there.
20:03 masak those weird visitors deserve all the credit, of course. and ingy.
20:04 noteventime joined #perl6
20:05 masak noteventime! \o/
20:07 colomon ingy is not a weird visitor?
20:08 TimToady it is not weird for ingy to visit
20:09 masak I never feel weird around ingy.
20:09 colomon but ingy is weird, ergo, when he visits, he is a weird visitor
20:09 colomon ingy++, btw
20:13 y3llow_ joined #perl6
20:13 bruges_ joined #perl6
20:33 masak perl6: say "5 breads" + "2 fish"
20:33 p6eval pugs: OUTPUT«7␤»
20:33 p6eval ..niecza v15-6-gefda208: OUTPUT«Unhandled exception: Cannot parse number: 5 breads␤  at /home/p6eval/niecza/lib/CORE.setting line 1366 (die @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3405 (ANON @ 10) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3407 (NumSyntax.str2num @ 4) ␤ …
20:33 p6eval ..rakudo a4c78f: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \$v, Mu %_!)␤␤  in method Numeric at src/gen/CORE.setting:644␤  in sub infix:<+> at src/gen/CORE.setting:2284␤  in sub infix:<+> at src/gen/CORE.setting:2284␤  in block <anon> at /tmp/MQR1lC3xrk:1␤␤»…
20:34 masak perl6: say "5" + "2"
20:34 p6eval pugs, rakudo a4c78f, niecza v15-6-gefda208: OUTPUT«7␤»
20:34 masak Rakudo's error message leaves something to be desired, IMO.
20:34 colomon +1
20:35 * masak submits rakudobug
20:37 spider-mario hm, what do I need to do for “prove -e perl6 -r t/” to run t/foo.pl?
20:37 spider-mario the current output I get is:
20:37 spider-mario Files=0, Tests=0,  0 wallclock secs ( 0.00 usr +  0.00 sys =  0.00 CPU)
20:37 spider-mario Result: NOTESTS
20:37 spider-mario “prove -e perl6 t/foo.pl” works as expected
20:38 spider-mario (runs my tests and Result: PASS)
20:38 masak spider-mario: try renaming it foo.t
20:38 masak by tradition that's how test scripts are named. probably prove goes looking for *.t, too.
20:38 spider-mario it worked, thanks :D
20:39 spider-mario yes, I was having trouble trying to get that tradition.
20:39 masak stick with it. it's not a bad tradition.
20:39 spider-mario I meant trying to know what it was.
20:40 spider-mario I’m not against it at all. :p
20:40 spider-mario sorry if I’m not always clear, English is not my native language
20:40 spider-mario (it’s French)
20:42 rsimoes joined #perl6
20:42 masak ah, merveilleux.
20:51 moritz yep, our Failure handling is faulty
20:52 * moritz replied to a stale chat, sorry
20:55 noteventime masak: ? :)
20:56 Araq joined #perl6
20:58 masak noteventime: just glad you're popping by :)
20:59 masak Araq: hey, welcome back! :)
20:59 Araq thanks
20:59 * masak takes a brief vacation from his job as #perl6 doorman
20:59 Araq didn't find the time to play with perl 6's way of parsing though
21:00 masak I hear they're making new time as we speak.
21:00 masak some people consider that's a mistake, citing inflation as a clear risk if we keep pumping time into an already diluted economy.
21:02 Araq well *my* time is limited
21:02 Araq I don't think I'll benefit from the new time
21:03 PacoAir_ joined #perl6
21:05 lichtkind joined #perl6
21:07 stdio joined #perl6
21:08 stdio hello
21:08 stdio is there an explanation of why, for example, perl6 went from print to say, and other such differences?
21:09 spider-mario print is still there
21:09 spider-mario and say was already there in 5.10
21:09 Araq so that perl has the shortest "hello world" program
21:09 stdio so print will always be there?
21:09 Araq 'say' is only 3 chars
21:09 stdio Arag haha really?
21:10 Araq I think so
21:10 Araq and afaik, 'say' was backported to perl 5
21:10 spider-mario I think cat has it, actually
21:10 spider-mario hello.txt : Hello World!
21:10 spider-mario $ cat hello.txt
21:10 spider-mario Hello World!
21:11 noteventime masak: I see, thank for the warm welcome.
21:11 stdio a lot of syntax changes in perl6 :\
21:11 noteventime thanks*
21:11 spider-mario Araq: I can confirm that
21:11 spider-mario $ perl -e 'use v5.10; say "hello"'
21:11 spider-mario hello
21:12 spider-mario (alternatively, you may "use feature 'say'" instead of v5.10)
21:12 spider-mario (feature 'say' is just part of what v5.10 does)
21:13 stdio is there specific reason you guys use 5.10 instead of 5.14?
21:14 masak stdio: who says we use 5.10 instead of 5.14? :)
21:14 stdio some of you :)
21:14 spider-mario stdio: “use v5.10” is just a line of code
21:14 masak 'say' was introduced in Perl 5.10.
21:14 stdio oh
21:14 spider-mario and it gives better compatibility than “use v5.14” if you only use say
21:15 masak I'd suggest using Perl 5.16 if you have the choice :)
21:15 colomon stdio: print is still there.  but say is the more common function, and saving four characters (two in the function and the \n) on something you do all the time is a pretty big win
21:15 masak stdio: the big win with 'say', in my opinion, is that you don't have to type "\n" so much.
21:15 masak that's just so common.
21:16 masak and it feels like the language is nice to help you avoid that, with a *shorter* function name that 'print', no less.
21:16 stdio i come from the old days of perl, been out of loop for a while
21:16 spider-mario or even “. "\n"” if you do not use string interpolation
21:16 spider-mario (~ instead of . in 6)
21:16 masak spider-mario: pro tip: never concatenate-then-print. just use commas ;)
21:16 spider-mario (or , if passing multiple arguments to print)
21:17 masak right.
21:17 spider-mario yeah, isn’t . kind of the php way? :D
21:18 spider-mario to me, php seems to try being perl and not being perl at the same time
21:18 Araq how about making blocks shorter by using indentation instead of {}? ;-)
21:18 spider-mario actually, haskell allows both
21:19 spider-mario I’ve found significant indentation to work greatly in Haskell
21:19 Araq yep
21:21 Araq but I guess for perlers indentation based syntax is blasphemy
21:22 stdio what do you mostly code in perl, web apps or admin scripts? backend apps?
21:24 masak depends who you ask.
21:24 masak Araq: all is fair if you predeclare. but it's never going to be part of the main Perl slang.
21:26 Araq I never got that part of perl
21:26 Araq it tries to introduce shortcuts all over the place and yet getting rid of {;} or the sigils was never even considered
21:28 * lichtkind made link anchors for  quote adverbs and there proper linking
21:29 masak Araq: I dispute "never even considered". you'll probably find that most Perl people will happily discuss those two syntactic features, and why they like or don't like them.
21:29 Araq yeah ok, I'm unfair
21:29 masak as for me, I happen to like sigils and semicolons.
21:29 spider-mario ; is a separator in perl rather than a terminator, which makes it possible to avoid it sometimes.
21:30 masak to the point that I'm slightly uneasy about the new \-sigil sigilless variables.
21:30 Araq well masak, you like 'say' does not require \n
21:30 masak but I'm going to withhold judgement about them until we have a working implementation.
21:30 Araq and it's good because it's a common thing
21:31 Araq and I don't disagree btw
21:31 masak Araq: yes, but the sigils and the semicolons do useful work for me.
21:31 masak putting them in makes sense in various ways.
21:31 masak semicolons: I like the freedom of laying out my statements on several lines. if you lose the statement separators, you'll have to start to make compromises with that.
21:32 masak sigils: ever used variable interpolation in strings? it's quite handy. also, the "mini-namespacing effect" with $ @ % &. also, clearly separating nouns from verbs.
21:40 spider-mario interpolation does not require sigils, does it?
21:40 spider-mario there’s the more general {}
21:46 lichtkind 9i dont quite get it
21:47 masak spider-mario: sure. but sigils allow interpolation without {} or any other marker. the sigil is marker enough.
21:52 fgomez joined #perl6
21:53 masak "He put the {noun} on the {place} and went back to the {location}." versus "He put the $noun on the $place and went back to the $location."
21:58 spider-mario honestly, I might prefer the first one
21:58 spider-mario which makes it clearer where interpolated variables stop
21:59 masak r: my ($noun, $place, $location) = <clock mantlepiece kitchen>; say "He put the {$noun} on the {$place} and went back to the {$location}."
21:59 p6eval rakudo a4c78f: OUTPUT«He put the clock on the mantlepiece and went back to the kitchen.␤»
21:59 masak then it's available to you.
22:00 masak and sometimes it's advisable, for exactly the reason you give.
22:10 MayDaniel joined #perl6
22:11 Araq see you, good night
22:11 Araq left #perl6
22:23 havenn joined #perl6
22:25 havenn joined #perl6
22:46 mj41 joined #perl6
22:53 sorear masak:
22:53 sorear n: my \foo = 5; say foo
22:53 p6eval niecza v15-6-gefda208: OUTPUT«5␤»
22:56 masak sorear: woot. what's your impression of them so far?
23:12 benabik joined #perl6
23:25 masak p6: my $x = 31; say :8($x)
23:25 p6eval pugs: OUTPUT«25␤»
23:25 p6eval ..niecza v15-6-gefda208: OUTPUT«Unhandled exception: Numbers may not be passed :base(); if you wanted to render the number in the given base, use $number.base($radix); if you want to treat the number as a string, explicitly coerce it first␤  at /home/p6eval/niecza/lib/CORE.setting line 13…
23:25 p6eval ..rakudo a4c78f: OUTPUT«Nominal type check failed for parameter '$str'; expected Str but got Int instead␤  in sub unbase at src/gen/CORE.setting:4008␤  in block <anon> at /tmp/WxHEFGpJCh:1␤␤»
23:26 * masak submits LTA rakudobug
23:26 Timbus joined #perl6
23:26 spider-mario p6: my \foo = 5; say foo
23:26 p6eval rakudo a4c78f: OUTPUT«===SORRY!===␤Malformed my␤at /tmp/0axah2ZQwu:1␤»
23:26 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "\\"␤    expecting "=", formal parameter, context, ":" or "("␤    at /tmp/iexIhFvdCS line 1, column 4␤»
23:26 p6eval ..niecza v15-6-gefda208: OUTPUT«5␤»
23:27 ruoso joined #perl6
23:42 sorear masak: I haven't used them much
23:47 fgomez joined #perl6
23:48 derrazo joined #perl6
23:51 thou joined #perl6
23:51 masak 'night, #perl6
23:51 colomon o/

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

Perl 6 | Reference Documentation | Rakudo