Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-03-06

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:18 J-L I'm gonna log off now.  Thanks for all your help!
00:18 timotimo you're welcome :)
00:24 laouji joined #perl6
00:40 laouji joined #perl6
00:43 tinyblak joined #perl6
00:46 coffee` joined #perl6
00:47 dayangkun joined #perl6
00:48 laouji joined #perl6
00:53 ugexe is it possible for test reports to replace /home/user with ~,%home%, or something? or is that information important to have?
00:56 TimToady m: my grammar G { regex foo { } }
00:56 camelia rakudo-moar 2f7d46: OUTPUT«5===SORRY!5===␤Null regex not allowed␤at /tmp/VT0JrJKePO:1␤------> 3my grammar G { regex foo {7⏏5 } }␤Unrecognized regex metacharacter   (must be quoted to match literally)␤at /tmp/VT0JrJKePO:1␤------> 3my grammar G { regex foo {7…»
00:57 TimToady somewhere there's a try that's collecting the first typed_panic and inadvertently making it continue parsing
01:07 laouji joined #perl6
01:08 Ben_Goldberg joined #perl6
01:12 dalek rakudo/nom: 1d21058 | TimToady++ | src/Perl6/World.nqp:
01:12 dalek rakudo/nom: only move the eject, not the actual cursor, duh
01:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1d21058bb7
01:12 dalek rakudo/nom: c8b81a3 | TimToady++ | src/Perl6/ (3 files):
01:12 dalek rakudo/nom: [minor] fix tab damage
01:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c8b81a39c6
01:13 TimToady that fixes the exceptions test
01:15 adu joined #perl6
02:29 Vlavv joined #perl6
03:14 laouji_ joined #perl6
03:29 noganex joined #perl6
03:50 laouji joined #perl6
04:02 FROGGS__ joined #perl6
04:16 anaeem1 joined #perl6
04:43 laouji joined #perl6
05:27 diana_olhovik_ joined #perl6
05:52 KCL_ joined #perl6
06:02 dalek perl6-examples: cefd99f | paultcochrane++ | categories/shootout/k-nucleotide.p6.pl:
06:02 dalek perl6-examples: [shootout] convert hard tabs into spaces
06:02 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/cefd99f8ef
06:02 dalek perl6-examples: 06a92fc | paultcochrane++ | categories/shootout/k-nucleotide.p6.pl:
06:02 dalek perl6-examples: [shootout] add initial docs about k-nucleotide example
06:02 dalek joined #perl6
06:07 dalek specs: 512a0b7 | TimToady++ | S02-bits.pod:
06:07 dalek specs: typo
06:07 dalek specs: review: https://github.com/perl6/specs/commit/512a0b7c81
06:15 atweiden joined #perl6
06:28 dalek joined #perl6
06:51 laouji_ joined #perl6
07:07 [Tux] Inline::Perl5 still incredibly slow compared to two days ago
07:11 gfldex joined #perl6
07:13 tinyblak_ joined #perl6
07:13 diana_olhovik joined #perl6
07:14 telex joined #perl6
07:14 Rounin joined #perl6
07:20 anaeem1_ joined #perl6
07:30 wicope joined #perl6
07:46 zby_home joined #perl6
07:58 [particle]1 joined #perl6
07:58 Ven joined #perl6
08:00 Foxcool joined #perl6
08:05 prime joined #perl6
08:05 oetiker_ joined #perl6
08:06 oetiker joined #perl6
08:12 Ven joined #perl6
08:12 Ven o/,#perl6
08:12 darutoko joined #perl6
08:15 eli-se joined #perl6
08:15 eli-se hi
08:16 moritz \o
08:26 nwc10 good *, *
08:27 moritz * *, nwc10
08:27 moritz === SORRY ===\nTwo stars in a row
08:28 nwc10 is that why there is a compiler release between each star release? :-)
08:28 moritz aye :-)
08:33 salva joined #perl6
08:42 masak good morning, #perl6
08:43 Ven \o, masak
08:43 masak m: * * * # three stars in a row!
08:43 camelia rakudo-moar c8b81a: ( no output )
08:45 zakharyas joined #perl6
08:45 nwc10 $ perl -le 'print ******'
08:45 nwc10 1
08:46 nwc10 even I'm not sure how many of the things that cause that behaviour would be considered to be special cases.
08:47 Ven at first this was p6 and I was wondering "what". but it's perl5 and I'm even more puzzled..
08:47 nwc10 it's treated as ** ** **
08:48 nwc10 first and last ** pairs are typeglobs
08:48 nwc10 m: 0 ** 0
08:48 camelia rakudo-moar c8b81a: ( no output )
08:48 nwc10 m: say 0 ** 0
08:48 camelia rakudo-moar c8b81a: OUTPUT«1␤»
08:48 nwc10 and undefined typeglobs end up being treated as the number 0
08:48 nwc10 $ perl -wle 'print ******'
08:48 nwc10 Argument "*main::*" isn't numeric in exponentiation (**) at -e line 1.
08:48 nwc10 Argument "*main::*" isn't numeric in exponentiation (**) at -e line 1.
08:48 nwc10 1
08:48 nwc10 and 0 ** 0 is 1, obviously. :-)
08:50 zakharyas1 joined #perl6
08:52 kjs_ joined #perl6
08:53 * masak .oO( did you mean "0 ** 0 is 1, not-so-obviously"? ) :P
08:54 mohij joined #perl6
08:54 nwc10 I *thought* that it was special-cased in the C code, but it doesn't seem to be.
08:54 masak well, it *is* the agreed-upon default in mathematics.
08:54 masak at least in the cases where people don't say "it doesn't have a limit in that point"
08:54 nwc10 aye, I have learned this
08:54 zakharyas1 joined #perl6
08:55 nwc10 (the first bit, not the second bit)
08:55 nwc10 but it can mean that you need to special case your implementation to get it to behave
08:55 nwc10 much like 2**31 wasn't the *right* integer on Irix, without some cheating
08:56 masak nwc10: think of how x ** 0 and 0 ** x behave as x tends to 0. the first tends to 1, the second tends to 0.
08:56 nwc10 maths is hard - can we write Perl 6 instead please? :-)
08:57 masak nwc10: OTOH, if you look at things like the binomial theorem, it makes sense to special-case 0 ** 0 as 1.
08:57 nwc10 yes, I'd sort of realised that "it makes sense, oh wait, 0 * 0 * 0 is 0, 0 * 0 is 0, etc"
08:57 nwc10 I didn't know about the binomail theorum
08:58 nwc10 nor do I know *why/how* the factorial function can be well defined for all numbers other than negative integers. But IIRC I've read that it can, and failed to understand the details.
09:02 smls joined #perl6
09:02 smls FROGGS++ # NativeCall documentation
09:02 yoleaux 4 Mar 2015 17:27Z <moritz> smls: ideally on both, and ideally automatically inserted in one place
09:03 kaare_ joined #perl6
09:04 smls FROGGS__: though half-way down the page, it suddenly starts refering to "Zavolaj" without introducing the name to users first
09:04 masak nwc10: mostly you have to realize that the unit of multiplication is 1. so if you multiply an empty list of stuff, you get 1.
09:04 smls Should we edit out all mentions of "Zavolaj" and consistently call it "NativeCall
09:04 smls ?
09:05 [Sno] joined #perl6
09:11 donaldh joined #perl6
09:12 moritz aye
09:18 dalek doc: 400e3b2 | smls++ | lib/Language/nativecall.pod:
09:18 dalek doc: say "NativeCall" instead of "Zavolaj"; use slightly prettier ".new;" instead of ".new();"
09:18 dalek doc: review: https://github.com/perl6/doc/commit/400e3b2ead
09:31 rindolf joined #perl6
09:36 jnthn morning o/
09:36 timotimo heyo jnthn :)
09:36 nwc10 morning jnthn
09:37 * nwc10 is feeling more pleased by the state of portability.
09:38 jnthn :)
09:38 timotimo i'm pretty impressed we're getting this amount of portability
09:38 nwc10 we need it
09:38 timotimo sure
09:39 timotimo the hardest thing to port to is still windows, isn't it? :P
09:39 nwc10 well, we're blocking on at least libuv for VMS.
09:40 timotimo is VMS still alive? i think i've only ever heard VMS used as a joke
09:40 timotimo but i may have confused it with something else
09:40 nwc10 yes, VMS is still alive.
09:40 timotimo i should investigate that for a tiny bit
09:40 nwc10 sadly the VMS machines I have (or had, not checked recently) only had Java 6
09:40 virtualsue joined #perl6
09:40 nwc10 MVS is also alive. And frustratingly still EBCDIC
09:41 timotimo https://en.wikipedia.org/wiki/OpenVMS - is this a good place to start looking at this?
09:41 nwc10 probably
09:41 nwc10 I don't think that "VMS" is anything like a priority
09:41 nwc10 things like AIX and HP/UX, which libuv (almost) supports probably should be. If anyone wants to do them
09:42 nwc10 although "run on the JVM" is an option too
09:42 timotimo fair enough i guess?
09:43 masak nwc10: it seems that the Gamma function "extends factorial in a natural way" from positive integers to complex numbers, and that's its claim to fame. the rest is details. :)
09:44 laouji_ joined #perl6
09:44 timotimo once we have more of the recent moarvm optimizations ported to the jvm, i expect the jvm's jit will be able to do crazy things
09:45 fhelmberger joined #perl6
09:45 brrt joined #perl6
09:45 brrt \o
09:45 timotimo ohai brrt!
09:45 nwc10 o/
09:45 brrt ohai timotimo
09:46 brrt nwc10, has your patch been applied yet?
09:46 brrt the ppc32 patch
09:46 brrt and ohai nwc10 :-)
09:46 nwc10 I believe so but I think that any local checkout you have can be used to verify this.
09:46 nwc10 mine might be confused because they already have it
09:48 arnsholt masak: And it's quite useful in stats/probability
09:48 arnsholt Distributions generalised from discrete to continuous tend to need something along those lines
09:49 masak arnsholt: oh, interesting.
09:58 FROGGS morning
09:59 FROGGS smls++ # seems I have missed some "zavolaj"'s :o)
10:02 brrt yes, it can has been applied
10:03 nwc10 ah OK good. thanks :-)
10:06 espadrine joined #perl6
10:07 DrForr joined #perl6
10:15 nine_ Where do tests for Test.pm live?
10:16 FROGGS tests?
10:16 FROGGS there are none
10:16 jnthn t/01-sanity/99-test-basic.t may count :)
10:16 moritz nine_: we don't have any, cause Test.pm isn't very testable right now
10:18 pecastro joined #perl6
10:20 FROGGS m: my role TypedPointer[::TValue] { method ^name($obj) { 'Pointer[' ~ TValue.^name ~ ']' } }; # jnthn: didn't you fix that?
10:20 camelia rakudo-moar c8b81a: OUTPUT«Potential difficulties:␤    Useless declaration of a has-scoped method in multi (did you mean 'my method name'?)␤    at /tmp/Zng4o6377F:1␤    ------> 3my role TypedPointer[::TValue] { method7⏏5 ^name($obj) { 'Pointer[' ~ TValue.^name␤»
10:24 tinyblak joined #perl6
10:26 firefish5000 joined #perl6
10:31 FROGGS m: sub foo is DEPRECATED('blarg') { 42 }; say foo
10:31 camelia rakudo-moar c8b81a: OUTPUT«42␤»
10:31 FROGGS isnt that supposed to print deprecation messages?
10:32 pecastro joined #perl6
10:33 pecastro joined #perl6
10:34 nine_ Any opinions on this? https://github.com/rakudo/rakudo/pull/381
10:37 dalek rakudo/nom: bd0804f | (Stefan Seifert)++ | lib/Test.pm:
10:37 dalek rakudo/nom: Better diagnostics in Test::is for strings differing only in whitespace
10:37 dalek rakudo/nom:
10:37 dalek rakudo/nom: If the expected value differs from the got value only by whitespace at
10:37 dalek rakudo/nom: the end of a line, it's very hard to find this difference. Using .perl
10:37 dalek rakudo/nom: for the diag output on the other hand makes it trivial to find
10:37 dalek rakudo/nom: whitespace differences.
10:37 dalek rakudo/nom:
10:37 dalek rakudo/nom: With this patch is("foo \nbar baz", "foo\nbar baz"); gives:
10:37 dalek rakudo/nom: expected: "foo\nbar baz"
10:37 dalek rakudo/nom:      got: "foo \nbar baz"
10:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bd0804f1e4
10:37 dalek rakudo/nom: 8310181 | FROGGS++ | lib/Test.pm:
10:37 dalek rakudo/nom: Merge pull request #381 from niner/nom
10:37 dalek rakudo/nom:
10:37 dalek rakudo/nom: Better diagnostics in Test::is for strings differing only in whitespace
10:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/83101813d4
10:37 larion joined #perl6
10:37 FROGGS I've seen tester reports where expected and got looked identical
10:38 timotimo aye
10:38 nine_ Thanks :)
10:38 FROGGS nine_++
10:38 sqirrel_ joined #perl6
10:39 nine_ Now I only need to find out where my superfluous whitespace comes from ;)
10:40 dalek doc: 6bc83dd | smls++ | lib/Language/nativecall.pod:
10:40 dalek doc: prefer lowe-case name for example sub; some minor formatting tweaks
10:40 dalek doc: review: https://github.com/perl6/doc/commit/6bc83dd92f
10:42 kjs_ joined #perl6
10:42 [Tux] useful change indeed
10:47 rurban joined #perl6
10:58 timotimo https://gist.github.com/anonymous/786c6ff3d25623d9f997 - does this seem sensible? i got fed up with my perl6-m script having "../install" in them.
11:01 jnthn .oO( löwe-case )
11:04 masak Muphry's Law strikes again!
11:09 dalek Heuristic branch merge: pushed 173 commits to rakudo/cpp by FROGGS
11:10 zakharyas joined #perl6
11:12 cognominal joined #perl6
11:13 dalek roast: c61b5ba | lizmat++ | S02-magicals/ (2 files):
11:13 dalek roast: Unfudge now passing tests
11:13 dalek roast: review: https://github.com/perl6/roast/commit/c61b5ba390
11:15 lizmat hmmm... seems like nine_ 's change to Test::is breaks some tests
11:15 lizmat No such method 'subst' for invocant of type 'MyMatch'
11:15 lizmat in method dispatch:<hyper> at src/gen/m-CORE.setting:1397
11:15 lizmat in block  at lib/Test.pm:137
11:16 lizmat No such method 'subst' for invocant of type 'Capture'
11:16 lizmat No such method 'subst' for invocant of type 'Signature'
11:17 lizmat maybe we need an Any.subst ?
11:18 spider-mario joined #perl6
11:18 nine_ lizmat: sorry, would this be a fix?
11:18 nine_ -            if [eq] ($got, $expected)>>.subst(/\s/, '', :g) {
11:18 nine_ +            if [eq] ($got, $expected)>>.Str>>.subst(/\s/, '', :g) {
11:18 lizmat testing
11:19 lizmat yeah, that seems to do the trick
11:19 lizmat running full spectest to be sure
11:24 dalek rakudo/nom: 9a95f18 | lizmat++ | lib/Test.pm:
11:24 dalek rakudo/nom: Fix tests on classes that don't do .subst, nine++
11:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9a95f18316
11:38 colomon joined #perl6
11:38 masak I find it odd that that fix was needed.
11:38 masak might be my understanding that's at fault, though.
11:38 masak why is it needed? :)
11:38 nine_ masak: subst is a Str method, but $got and $expected are Mu?
11:38 timotimo Capture and Signature are not Cool
11:39 timotimo well, subst is a Cool method
11:39 Ven joined #perl6
11:39 masak right.
11:39 lizmat and apparently any class Foo either
11:39 masak I still thing it's rather arbitrary what's Cool and what isn't.
11:39 lizmat masak: fwiw, it doesn't make much sense to me either
11:39 masak I know the original intent was to emulate p5's "forgiveness" in casting a small set of core types.
11:40 masak but it shows up in these circumstances mostly as confusion as to what's Cool and what isn't.
11:40 lizmat but I guess I lack the original hysterical raisons
11:40 * masak .oO( Perl 6 core devs uncertain about what's Cool )
11:40 masak lizmat: the original hysterical raisins are what I just said. emulate p5's type forgiveness.
11:41 nine_ We clearly need more hippsters to tell us what's Cool
11:41 lizmat (ok)
11:41 lizmat I was discussing certain aspects of Perl 6 yesterday with Stevan Little
11:41 masak like, .subst is clearly a Str operation, but you can also do it on an Int, or an Array.
11:41 masak nine_: and the coolsterst to tell us what's Hip.
11:42 jnthn Key examples: Str, Int, Num, Parcel, List (so Array), EnumMap (so Hash), and Bool
11:42 nine_ masak: and "coolster" is actually defined in the urban dictionary...
11:42 masak nine_: and "hip" is actually defined in Grey's Anatomy.
11:43 jnthn Not to be confused with 50 Shades of Grey
11:43 lizmat (Stevan Little) apart from the usual suspects that people trying Perl 6 run into at the moment
11:43 * masak .oO( 50 shades of grey's anatomy )
11:43 jnthn :D
11:43 lizmat he mentioned on thing that I hadn't heard about before / didn't see mention before
11:44 lizmat suppose we have 2 modules with the same name loaded at the same time
11:44 lizmat but with different auth / version
11:44 jnthn For me, the guideline on Cool is something like "built in, value type, has sane ways to view it as a Int, Num, or Str"
11:44 jnthn Uh, s/value type//
11:44 jnthn :)
11:45 masak :)
11:45 lizmat if both modules create an object, how can we smartmatch them apart ?
11:45 masak s/value type/type/ :P
11:45 masak lizmat: ooh
11:45 masak lizmat: interesting
11:45 masak lizmat: and do we always want them to be different?
11:45 jnthn lizmat: With the full name
11:45 masak nice.
11:45 jnthn lizmat: And note that in a given scope, the short name can only ever be talking about *one* of them.
11:46 lizmat yeah, but if they produce an object that is used *outside* of the scope it was created in ?
11:46 jnthn Then it's two different types
11:47 masak ok, so objects simply won't smartmatch across auth/versions?
11:47 lizmat sub a { use Foo:auth<one>; Foo.new }; sub b { use Foo:auth<two>; Foo.new }; say a ~~ b   # what would this say ?
11:47 jnthn masak: I don't see how they sanely can.
11:47 masak oki
11:48 lizmat jnthn: so my code example would say "false" ?
11:48 jnthn lizmat: Well, there you have two instances
11:48 lizmat yup
11:48 jnthn lizmat: Remove the ".new", and we get the question you probably meant to ask?
11:48 jnthn Because
11:48 jnthn m: class A { }; say A.new ~~ A.new
11:48 camelia rakudo-moar 9a95f1: OUTPUT«False␤»
11:48 jnthn :)
11:48 jnthn m: class A { }; say A ~~ A
11:49 camelia rakudo-moar 9a95f1: OUTPUT«True␤»
11:49 lizmat say a.WHAT eq b.WHAT then
11:49 lizmat ok
11:49 jnthn a.WHAT ~~ b.WHAT will be False
11:49 jnthn eq will give you two warnings about undefined instances, and True :)
11:50 jnthn m: class A { }; say (~A).perl
11:50 camelia rakudo-moar 9a95f1: OUTPUT«use of uninitialized value of type A in string context  in block <unit> at /tmp/lhfzZGSIOE:1␤␤""␤»
11:50 jnthn But yeah, I really don't think we can sanely start considering them the same type
11:50 lizmat his example was really: so, I have to versions of this module loaded,
11:50 rubio joined #perl6
11:50 jnthn I see the use case for different versions as when you want to use two things that *depend* on a different version of it
11:50 lizmat how can I use MMD to create subs that will match objects from one or the other
11:51 lizmat sub bar(Foo... and then?
11:51 jnthn And provided it's a black box dependency, you're fine
11:51 jnthn lizmat: One candidate that will match objects of both versions, or?
11:52 lizmat no, two candidates that will match the different versions of the modules
11:52 lizmat *module
11:52 lizmat multi old(Foo for version 1.0); multi new(Foo for version 2.0)
11:52 jnthn lizmat: If you mean MMD to distinguish them then I guess multi m(Foo:ver<1.2>:auth<lizmat>) { } and multi m(Foo:ver<1.2>:auth<jnthn>) { }
11:53 lizmat ok, so that's the plan, or did we just make that up? :-)
11:53 jnthn I thought that was the plan all along?
11:53 lizmat well, there's a catch there
11:53 jnthn That importing a versioned thing imports the full name *and* the short name.
11:53 lizmat auth and version are about *compilation units*
11:54 lizmat types are about classes inside those compilation units
11:54 lizmat ok, anything exported will be both short and long name
11:54 lizmat and the long name will be taken from the compilation unit info
11:55 kjs_ joined #perl6
11:55 jnthn I think we can quite reasonably say that if you declare an auth/version for the compilation unit then it's applied to the things inside that unit.
11:56 jnthn We may want, with short names, to take the same poisoning model we have with enum values
11:56 lizmat ??
11:57 timotimo m: enum Foo < Hello Goodbye >; enum Bar < Hello Byebye >; say Hello;
11:57 camelia rakudo-moar 9a95f1: OUTPUT«Potential difficulties:␤    Redeclaration of symbol Hello␤    at /tmp/Oow68RNpJT:1␤    ------> 3llo Goodbye >; enum Bar < Hello Byebye >7⏏5; say Hello;␤Cannot use poisoned alias Hello, because it was declared by several enums.␤Please access…»
11:57 timotimo m: enum Foo < Hello Goodbye >; enum Bar < Hello Byebye >; say Foo::Hello;
11:57 dalek rakudo/nom: 9c66311 | lizmat++ | src/core/ (3 files):
11:57 dalek rakudo/nom: Better checks for being on Win
11:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9c66311358
11:57 camelia rakudo-moar 9a95f1: OUTPUT«Potential difficulties:␤    Redeclaration of symbol Hello␤    at /tmp/PErwBXfr4z:1␤    ------> 3llo Goodbye >; enum Bar < Hello Byebye >7⏏5; say Foo::Hello;␤Hello␤»
11:57 timotimo lizmat: ^
11:58 lizmat ok  :-)
11:58 lizmat jnthn: of course, we may want to actually match a range of versions
11:58 lizmat so maybe a "where" model might be better ?
11:58 jnthn lizmat: For 6.0.0, I think we say that type names are non-fuzzy.
11:59 lizmat ok, I can live with that  :-)
11:59 jnthn lizmat: I would like to hope that actual cases where we'll have people mixing two versions in the same compilation unit will be relatively rare.
12:00 lizmat well, it could be a module that post-processes info from another module
12:00 lizmat that needs to be able to handle API changes in that other module
12:00 lizmat so it may be less rare than you think
12:00 lizmat I mean, we have many modules that build on other modules  ;_)
12:00 dalek Heuristic branch merge: pushed 45 commits to perl6-examples by paultcochrane
12:01 timotimo there could be a pattern of a "versioning adaptor module" that'd handle two versions of the same module and interactions between them?
12:01 timotimo like a "migration module"?
12:01 [ptc] all examples now run in perl6-examples
12:01 [ptc] much more cleanup required...
12:01 lizmat timotimo: yes, that is one example
12:01 jnthn lizmat: That sounds odd, in so far as the module that uses theother one could say what version it wants
12:02 jnthn I also note that if you are writing programs that mash up different modules, you generally want to prefer dynamic typing
12:02 lizmat that feels very rigid from a toolchain point of view
12:02 timotimo [ptc]: excellent work!
12:03 lizmat my idea to fix this was a bit different, though
12:03 lizmat when a distribution is installed, all of the meta info should be available as well
12:03 [ptc] timotimo: thanks :-)
12:04 lizmat I was more thinking along a .WHERE macro/method
12:04 lizmat that would work like .HOW, but give you access to the distribution info of the compunit
12:04 lizmat and smart matching would then become something like
12:05 lizmat multi a(Foo where *.WHERE.auth eq 'jnthn')
12:05 jnthn I don't see how that can work
12:05 jnthn Foo can't be bound to two things
12:06 jnthn It'd need to be something more syntactic that does a query over things starting with Foo that are in scope...
12:07 lizmat hmmm...
12:09 jnthn I'd urge starting simple and discovering actual pain points when we start to play with it, though.
12:09 lizmat agree
12:09 lizmat ok, let's leave it at this for now
12:09 lizmat and get back to SMOP
12:10 jnthn We might be able to find a way to use something like "Foo:ver<1.*>:auth<*>" as a type query, for example.
12:10 lizmat that feels like inventing a new syntax while we have "where" already with all its flexibility
12:10 jnthn But I'd start with the easy, precise match, thing
12:11 lizmat agree..  :-)
12:11 jnthn Yeah, but that supposes that we somehow arrange for every version of a type to match the type's shortname, and I don't know we can reasonably make that happen.
12:12 jnthn (Not saying it's impossible, just that it's not obvious to me)
12:12 lizmat ok
12:14 dalek specs: c3cee44 | lizmat++ | S99-glossary.pod:
12:14 dalek specs: Add SMOP lemma
12:14 dalek specs: review: https://github.com/perl6/specs/commit/c3cee44d2d
12:15 dalek Heuristic branch merge: pushed 19 commits to specs/newio by lizmat
12:16 nine_ lizmat++ # answering my quesion before I even asked it!
12:29 dalek Heuristic branch merge: pushed 28 commits to rakudo/newio by lizmat
12:30 lizmat afk for a bit&
13:01 kjs_ joined #perl6
13:04 Ven joined #perl6
13:17 smls What's this I hear about an "array" type (lower-case "a")?
13:17 kjs_ joined #perl6
13:17 rubio left #perl6
13:18 timotimo native arrays?
13:18 masak though I don't know that they're spelled "array".
13:18 smls seen here: http://irclog.perlgeek.de/perl6/2015-03-05#i_10231390
13:18 timotimo me neither
13:18 sjn \o
13:18 masak (maybe they are and I haven't been paying attention. but I don't think so.)
13:19 sjn Question: who's manaaging the content on rkaakudo.org?
13:19 masak smls: ...huh.
13:19 masak smls: so maybe yes, then.
13:19 timotimo looks like it's just a shortcut for how to refer to native arrays until something is decided on
13:19 smls Does this mean Array will not gain native-compact storage directly?
13:19 * masak .oO( rKAAKudo: Rakudo, but for Parrots )
13:20 smls s/gain/gain support for/
13:20 timotimo no clue
13:20 brrt joined #perl6
13:21 nine_ It would seem like native arrays and Arrays are quite different. The latter supporting lazyness for example
13:21 timotimo i thought List does lazy, does Array do it, too?
13:21 timotimo .o( what the fuck do i know about perl6? )
13:22 smls yep, Array does it too
13:22 masak Perl 6 is weird.
13:23 geekosaur joined #perl6
13:23 nine_ Perl 6 just has too many features. Let's scrap it and start Perl 7. I'd suggest starting with a touring machine and removing everything non-essential.
13:24 geekosaur joined #perl6
13:24 smls I think TimToady once explained that he thinks Array supporting laziness is worth it because it lets us assign some lazy lists to @ variables without having to use binding
13:24 coffee` joined #perl6
13:24 osfameron one of these maybe? http://www.evanscycles.com/categories/bikes/touring-bikes
13:24 timotimo turing machine!
13:24 nine_ timotimo: see! You already removed the non-essential 'o'. The process works!
13:25 timotimo <3
13:25 smls Though I'm not very convinced of that benefit, as it does work with all lazy lists anyway
13:25 smls *does not
13:25 brrt there is also another way to do that
13:25 brrt which would be to replace the (eager) array with a proxy referencing the array and the lazy list
13:26 smls If native array support does get added to the Array type after all, I wonder if IntLexRef shouldn't also be merged with Scalar
13:28 * sjn is at a cafe, enjoying a 4-3 minute lag on his ssh connection
13:29 sjn anyhoo, rakudo.org content...
13:29 * masak .oO( a universal touring machine is a machine that can give any other machine a free tour )
13:29 smls Currently,  my Foo $a  makes a Scalar container which can hold objects of type Foo, and  my Foo @a  makes an Array container which can hold objects of type Foo.
13:29 smls Native types seems to break that rule...
13:31 moritz yes, they avoid the container entirely
13:31 moritz at least for scalars
13:31 smls well...
13:31 smls IntLexRef is kinda a container
13:32 smls also implementation wise, they all store pointers rather than the actual values, if I understand correctly
13:33 smls m: my num $i = 1.0;  # on a related note...
13:33 camelia rakudo-moar 9c6631: OUTPUT«This type cannot unbox to a native number␤  in block <unit> at /tmp/x69TI3h4Ai:1␤␤»
13:33 smls LTA error message
13:33 smls should probably say "floating-point number" instead of "number"
13:35 moritz or "num"
13:35 smls yep
13:36 jnthn my int @a; # will actully bind an array[int], which is non-lazy, to @a
13:36 jnthn my Int @a; # a (potentially lazy) Array[Int]
13:37 jnthn Anything behind .VAR.WHAT on natives is, for now, implementation defined.
13:37 jnthn No, the native ref types are not getting unified with Scalar, that ruins all type-driven optimization.
13:38 anaeem1_ joined #perl6
13:42 smls fair enough; I'll refrain from naughtily peeking behing .VAR
13:43 jnthn Well, if you're interested in how it works, that's fine. Relying on what's behind it in your code, less fine. But it's *very* rare for code to explicitly mention Scalar by name. :)
13:44 jnthn (So by extension I very much doubt there will be used cases for mentioning the native ref types by name)
13:46 smls but "Scalar" is officially specced, right?
13:46 jnthn Yes, that one is
13:46 jnthn As is Proxy
13:47 smls Proxy is what array subscripts return for nonexistent elements?
13:47 jnthn No, that's a Scalar also
13:47 jnthn A Scalar, at present, can have code attached saying "run this when first assigned to"
13:48 jnthn Which is how auto-viv is typically done
13:48 * jnthn wouldn't find re-visiting that detail at some point...
13:48 smls What about rw class attributes, do they use Proxy?
13:48 jnthn *mind
13:48 jnthn For object attributes, no
13:49 jnthn They don't need to, since thre's already a container
13:49 smls ah, it's only when u want to emulate them with a method
13:49 jnthn For native ones, it's a native ref
13:49 anaeem1 joined #perl6
13:49 jnthn Though I expect rw accessors for native things to get inlined, and the ref taking optimized away as a result
13:50 jnthn The native refs design is a careful balance of "make them behave like first-class l-values and not be too surprising in untyped code" along with "enable a dynamic optimizer to get rid of them"
13:51 smls makes sense (if it works out well)
13:52 jnthn So far I'm fairly happy with how the first part is shaping up, and need to write more code to prove the second part can work as well as intended.
13:52 jnthn btw, agree on tweaking the error wording on the num assignment thing
13:53 KCL joined #perl6
14:00 anaeem1 joined #perl6
14:04 Ulti I'm not sure why having this little slang makes me so happy since I could just use the function seq("") as easily as `` but I just like that my class has a literal in the language :)
14:04 anaeem1 joined #perl6
14:04 moritz Ulti: tell that literal :-)
14:05 Ulti I got my grammar to automatically detect DNA/RNA/AminoAcids now too so it constructs the correct subclass based on just the sequence data so has deep magic
14:06 Ulti I dont think its useful as a programmer but it makes being an investigative scientist playing with data really slick
14:09 MilkmanDan joined #perl6
14:11 spider-mario joined #perl6
14:13 MadcapJake joined #perl6
14:13 jnthn Ulti++ # literally awesome :)
14:15 anaeem1 joined #perl6
14:23 smls Too bad it's not advent time; if it was we could now pressure Ulti into writing another very interesting bio/perl6 advent post ;)
14:24 lizmat re http://irclog.perlgeek.de/perl6/2015-03-05#i_10229514 : the reason I implemented "is-win" was because the same logical check was done in many different (and sometimes incorrect) ways throughout the core and the spectest
14:25 jnthn lizmat: +1 on us having it
14:25 lizmat I have not seen a need anywhere for an "is-unix" or anything like that
14:25 kjs_ joined #perl6
14:25 smls maybe if you want to check if you use 'fork'?
14:26 skids joined #perl6
14:26 lizmat m: try fork
14:26 camelia rakudo-moar 9c6631: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HVxywpR7jz␤Undeclared routine:␤    fork used at line 1␤␤»
14:27 lizmat m: say $?TABSTOP; $?TABSTOP = 4; say $?TABSTOP  # hardly a constant, is it :-)
14:27 camelia rakudo-moar 9c6631: OUTPUT«8␤4␤»
14:27 lizmat it appears Str.indent and Str.outdent are using that
14:28 lizmat shouldn't that be $*TABSTOP really ?
14:33 Ulti smls I was planning on writing up a couple of blog posts, one on the optimiser changes in the last six months and how it's affected my code, and one about how "easy" it is to hack in your own syntax magic into Perl6
14:34 Ulti though really I just stole tony-o's code and picked my part of the P6 grammar to target :)
14:34 Ulti did a "slang" keyword ever get made? because it feels like you could make something quite general
14:38 Ulti tony-o++
14:40 Ulti out of interest is their an equivalent to wantarray in Perl6?
14:40 Ven no!
14:40 Ulti or will a single scalar being asigned to a @var just get treated as a single element list anyway
14:41 Ven can't have wantarray. (also, doesn't want to :P)
14:41 Ulti because if so I will probably scalarafy single objects
14:41 Ven Ulti: as a single element list
14:42 Ven (I mean -- `my @foo = $scalar` will be a single-element list.AFAIK)
14:43 FROGGS[mobile] joined #perl6
14:43 Ulti the other way around is also true by the looks of it
14:44 anaeem1_ joined #perl6
14:44 Ulti though the repl can't handle multiline things :'(
14:44 ab5tract jnthn: speaking of auto-viv, i was harping about `$x *= 5 == 5` the other day...
14:44 Ulti so I can't actually type my literal into there
14:44 Ulti or paste it
14:44 smls There's no such thing as wantrarray in Perl 6, because context flows outwards and allowing it both ways would make multi-dispatch ambiguous
14:44 smls I think
14:45 smls scalars tend to behave like single-element lists where approriate
14:45 lizmat afk again
14:45 anaeem1 joined #perl6
14:46 ab5tract moritz pointed out that this is by design, but it also smells a bit funny. hard to tell if that smell comes from perl-5-expectations, or what. but currently auto-viv feels a bit under-cooked. for instance, `$x /= 5` explodes
14:47 * moritz would be fine with multi infix:</>() { 1 }
14:48 smls Ulti: If you want something to behave differently in different "contexts", you'll have to return an object which does that
14:48 jnthn m: my $x /= 5;
14:48 camelia rakudo-moar 9c6631: OUTPUT«No zero-arg meaning for infix:</>␤  in method Numeric at src/gen/m-CORE.setting:15182␤  in sub infix:</> at src/gen/m-CORE.setting:5208␤  in block <unit> at /tmp/2VCVfpe7M6:1␤␤»
14:48 jnthn That's not about auto-viv really, that's the same issue as
14:48 jnthn m: say [/] ()
14:48 camelia rakudo-moar 9c6631: OUTPUT«No zero-arg meaning for infix:</>␤  in method gist at src/gen/m-CORE.setting:15184␤  in sub say at src/gen/m-CORE.setting:18007␤  in block <unit> at /tmp/H3GWJY5LHQ:1␤␤»
14:48 Ulti smls it's more I'd rather just return a list and if it only has one thing when assigning to a scalar not have the container
14:48 jnthn Which both work on the same mechanism.
14:49 ab5tract jnthn: it seems that the auto-viv of * and / are coming from the [$op] stuff
14:49 diana_olhovik joined #perl6
14:49 jnthn No, the semantics of the two are just defined in the same way (by the operator having 0 and 1 arg candidates)
14:49 ab5tract right, that's what i understand. but it was an open question, at least for PerlJam and I, whether those should be tied together
14:49 jnthn And yes, it's intentional.
14:49 ab5tract jnthn: okay
14:50 jnthn (As in, the implementation intended to do it this way; it's not an accident.)
14:50 jnthn afaik, it matches what the design docs say too
14:50 ab5tract right, that part i was already assured of :)
14:50 jnthn It's a bit of a DWIM, which means it can have a bit of a WAT
14:51 perl6_newbee joined #perl6
14:51 ab5tract right, the biggest WAT for me is lying under the surface:
14:51 ab5tract m: my ($x, $c, $d); say [*] $x, $c, $d
14:51 camelia rakudo-moar 9c6631: OUTPUT«use of uninitialized value of type Any in numeric context  in block <unit> at /tmp/3NiI3bceZH:1␤␤use of uninitialized value of type Any in numeric context  in block <unit> at /tmp/3NiI3bceZH:1␤␤use of uninitialized value of type Any in numeric cont…»
14:52 ab5tract what is happening to auto-viv-to-1 here?
14:52 smls there's no auto-viv happening there
14:53 PerlJam good $localtime all!
14:53 ab5tract it _feels_ to me at least that it should produce the exact same as [*] with no args
14:53 PerlJam o/
14:53 jnthn What smls said. Reduction and auto-viv are defined in terms of the same mechanism for getting a unit value
14:53 smls in Perl 5, too, using undef in numeric ops is a warning/error, while the pre/post-increment ops are special-cased to allow it
14:53 ab5tract smls: sure, i also understand that part. we did get into details before
14:53 jnthn Rather than both being cases of auto-viv.
14:53 ab5tract smls: not for all numeric ops
14:54 jnthn I think it's possible to argue for [*] doing what you're suggesting.
14:54 ab5tract for instance, $x *= 5 will warn. $x += 5 will not (in perl 5)
14:54 jnthn I'm not sure if it makes things better or worse. :)
14:55 ab5tract jnthn: indeed. i'd like to clarify that my position is not that i have any clue what it _should_ do, only that what it currently _does_ feels weird and very corner-casey to me
14:55 spider-mario joined #perl6
14:55 rmgk_ joined #perl6
14:56 ab5tract i'd rather not have any auto-viv for numeric ops than have "0 if + or -, 1 if *, and explode if /"
14:57 ab5tract or, at least, that's how exploring it makes me feel
14:57 smls maybe ++ should be the *only* numeric op that is allowed to operate on an undefined value; then it would be a neatly contained "exception to the rule"
14:57 ab5tract smls++ :)
14:57 PerlJam smls++ indeed.
14:58 ab5tract and maybe arg-less [/] could return a NaN or so
14:58 ab5tract or something not quite as LTA than what happens now
14:59 masak if I got to decide, arg-less [/] would be a *compile*-time error.
14:59 masak because it's clearly nonsensical, and if you write it in code, then you're confused. :)
14:59 masak (though I guess that only goes for the static case)
14:59 PerlJam masak: perhaps ab5tract means "valueless"  :)
15:00 molaf joined #perl6
15:00 masak PerlJam: I think I got him in the right way.
15:00 masak PerlJam: same deal with `my $var /= $stuff;`
15:01 perl6_newbee Hello guys
15:01 PerlJam perl6_newbee: greetings
15:01 masak perl6_newbee! \o/
15:01 ab5tract masak: compile time error would be cool, and then it would die if it were triggered in run-time? sub half-thing { @_[0] /= 2 }
15:01 perl6_newbee :-)
15:01 ab5tract ?
15:01 masak perl6_newbee: how long are you planning to keep that nick? until you've read all the spec docs? :P
15:02 masak perl6_newbee: will you tell us when you change the nick?
15:02 masak perl6_newbee: or will you just stick with it forever, even when you're an undisputed Master of All Things Perl 6?
15:02 perl6_newbee lol I have the feeling I will be a perl newbee forever...
15:02 masak me too... :P
15:02 FROGGS[mobile] masak: what are spec docs? :p
15:02 PerlJam That's very zen in a way
15:02 masak FROGGS[mobile]: ahhh orz omg sorree
15:03 masak FROGGS[mobile]: synopsoids
15:03 masak FROGGS[mobile]: synopticals
15:03 PerlJam FROGGS[mobile]: if you're mobile, does that mean you are aging slower than the rest of us?
15:03 perl6_newbee hmm, masak, if I publish a Perl6 module I will change the nick, deal?
15:03 masak perl6_newbee: deal.
15:04 PerlJam perl6_newbee: as long as you don't change it to perl6_guy_who_wrote_that_module  ;)
15:04 * masak .oO( perl6_newbee_now_with_a_module )
15:04 masak PerlJam: dang :)
15:04 perl6_newbee rofl
15:04 PerlJam great minds or something
15:04 masak perl6_newbee: stop being in my head :)
15:04 masak er, PerlJam
15:04 masak one of you guys need to change your nick, for tab completion reasons.
15:04 PerlJam clearly not me.
15:04 perl6_newbee hmm maybe something like still_perl6_newbee
15:05 masak the community demands it!
15:05 masak like me and moritz. one of us changed our nick ages ago... hm. seems we didn't. :P
15:05 PerlJam (I've been PerlJam for nigh on 20 years, I don't think I'm going to be able to adjust to a new nick :)
15:05 masak PerlJam: you've had it for long enough! time to change! :P
15:05 PerlJam old dogs, nick trick and all that
15:05 PerlJam er, new tricks
15:05 PerlJam heh
15:06 * masak .oO( old dogs, nwc10 trick )
15:06 perl6_newbee Is tab completion a problem?
15:06 masak perl6_newbee: duh!
15:06 masak :P
15:06 PerlJam Now I *know* I'm getting old.  My mistyped "nick trick" is causing me fits
15:06 ab5tract so what do i do to raise this auto-viv-numeric-op-madness beyond dithering about it once a week on #perl6?
15:06 pierrot joined #perl6
15:06 Ven masak: I'm strongly convinced anything that we KNOW will fail at runtime should be a compile-time error :P.
15:07 perl6_newbee \me scratches the head
15:07 PerlJam ab5tract: IS there a ticket in RT?
15:07 ab5tract well, it's not a bug. everyone agrees it is operating as designed
15:07 PerlJam claim it as a bug anyway
15:07 masak Ven: me too.
15:09 ab5tract ok
15:10 PerlJam Really, the only thing that bothers me is that we've drilled into people's heads since days of yore than  $x *= $y  is the same thing as $x = $x * $y.  my $x *= 5 (and my $x /= 5); should behave exactly like the expanded version IMHO.
15:13 dalek rakudo-star-daily: 05e2b85 | coke++ | log/ (9 files):
15:13 dalek rakudo-star-daily: today (automated commit)
15:13 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/05e2b85894
15:13 raiph joined #perl6
15:14 perl6_newbee do someone use Perl6 on WIndows?
15:14 PerlJam perl6_newbee: aye.
15:14 PerlJam perl6_newbee: in fact, I think that's jnthn's primary development environment
15:15 perl6_newbee cool. Do you have a problem if write strings into an file
15:15 perl6_newbee to be precisly. I wrote 3 strings into a file but instead of "string\nstring\nstring" I got "stringstringstring"
15:16 perl6_newbee Anyone with the same problem?
15:16 PerlJam perl6_newbee: How did you write those strings?
15:16 PerlJam perl6_newbee: if you didn't write the newlines or use say (which provides newlines for you), then you won't get them.
15:17 perl6_newbee my $fh = 'properties.txt'.IO.open(:w); $fh.say($hash_key ~ "=" ~ $hash_value); $fh.close;
15:17 moritz you call .say() once, so you get one newline
15:17 FROGGS[mobile] PerlJam: right, I already saved a second :o)
15:18 njmurphy joined #perl6
15:18 perl6_newbee I forgot a for $hash.kv -> $k, $v {} thanks Moritz
15:18 perl6_newbee The same code on Linux worked fine
15:18 moritz m: for %*ENV.kv -> $k, $v { $*OUT.say("$k=$v") }
15:18 camelia rakudo-moar 9c6631: OUTPUT«MANPATH=/home/camelia/perl5/perlbrew/perls/perl-5.20.1/man:/usr/local/man:/usr/share/man␤PERLBREW_VERSION=0.71␤PERLBREW_PERL=perl-5.20.1␤SHELL=/bin/bash␤PERL5LIB=/home/camelia/perl5/lib/perl5/:/home/camelia/perl5/lib/perl5/x86_64-linux/␤USER=came…»
15:19 moritz perl6_newbee: oh, a windows/newline problem?
15:19 smls Maybe it fails to turn \n into \r\n on Windows?
15:19 perl6_newbee seems to me
15:20 perl6_newbee On Monday I can chekc the file with a hex editor and check that
15:21 perl6_newbee anyway, another newbe question. this time an unicode one again
15:21 masak decommute &
15:22 perl6_newbee If I save a txt file on Windows with the notepad and open it with perl6 I get the BOM bytes at the begin of the file as ?.
15:22 perl6_newbee e.G.: for 'file.txt'.IO.lines -> $line { say $line }
15:22 perl6_newbee shows "?string from file"
15:23 nine_ perl6_newbee: file is saved in UTF8 encoding?
15:23 perl6_newbee yes
15:24 nine_ UTF8 forbids a BOM
15:25 perl6_newbee nine_: I don't think so. according to Wiki it is not
15:25 perl6_newbee U+FEFF byte order mark (BOM). BOM use is optional,
15:25 nine_ I stand corrected
15:25 perl6_newbee it has its own unicode
15:27 nine_ http://de.m.wikipedia.org/wiki/Byte_Order_Mark says in UTF8 its encoded as EF BB BF
15:28 perl6_newbee and should be at the begin of the text. That is was the Notepad does and the txt file looks like
15:29 perl6_newbee I mean EF BB BF is at the begin and perl6 shows a ? for that byte sequence
15:29 moritz the BOM just comes out like any other character
15:30 perl6_newbee Do I have to handle that? I mean, why?
15:30 brrt ideally, not
15:31 brrt but tbh byte order marks are quite silly in utf-8
15:31 brrt :-)
15:31 kjs_ joined #perl6
15:32 moritz open() could have a :strip-bom option or so
15:33 brrt hmm, i suppose you already have to pass a flag for non-utf8 encodings?
15:33 moritz yes
15:34 perl6_newbee for a script running on linux and windows I have to check the OS and call Open different then?
15:35 perl6_newbee I don't like that solution
15:35 moritz you wouldn't
15:35 moritz you could pass :strip-bom even on linux
15:35 perl6_newbee it would only remove BOM if it found it.
15:35 moritz right
15:37 brrt the second question is how many of your files will be bom-encoded by notepad
15:37 perl6_newbee in that case I would like it the other way. To have BOM striped other the :dont-strip-bom attribute is set
15:37 brrt no... no
15:37 perl6_newbee all of them.
15:37 perl6_newbee It is the default behavour on Windows 7.
15:37 brrt because you don't for sure if you're going to see a BOM
15:38 brrt well, that's windows suckiness then
15:38 brrt i've had too much windows suckiness problems today to have any mercy with that
15:38 moritz perl6_newbee: most of the files I work with don't have a BOM
15:38 brrt screw windows. and screw microsoft and their stupid byte order marks, open file limitations and all other 'quirks' that make up the windows experience
15:39 brrt and with that, i bid you goodbye :-)
15:39 perl6_newbee I only use WIndows at work. But I think user on Windows will have this BOM issue every time the open a notepad saved txt file.
15:39 rjbs- Yeesh.
15:40 perl6_newbee THey will stomp about it earlier or later. So BOM removed by default would trigger problems on Linux or on other places?
15:40 moritz there's a balance to be made between enough magic and too magic
15:41 moritz for example: if you read files and don't notice you have a BOM there
15:41 moritz and you write the files
15:41 PerlJam perl6_newbee: what if it's *not* a BOM, but looks like one?
15:41 perl6_newbee nod
15:41 moritz how do you determine whether to write a BOM?
15:41 rjbs- PerlJam: so very unlikely
15:41 njmurphy left #perl6
15:41 perl6_newbee aaah
15:41 perl6_newbee I see
15:41 jnthn PerlJam: If you *know* you're reading UTF-8, can there ever actually be ambiguity?
15:42 rjbs- If the default for text i/o is to decode UTF-8 in and writing UTF-8 out, I'd expect to drop leading BOM and to not write one on output.
15:42 jnthn PerlJam: That is, if it's not taken as a BOM, I don't think it's valid chars?
15:42 moritz .u FEFF
15:42 yoleaux U+FEFF ZERO WIDTH NO-BREAK SPACE [Cf] (<control>)
15:42 jnthn The only time it'd get problematic is if you opened a file and then read binary from it.
15:42 moritz well, the BOM is also a valid zero-widht non-breaking space
15:42 PerlJam oh, I guess I wasn't thinking that it's UTF-8.   (I'm dealing with some binary formats right now that could easily have BOM-looking bytes at the front)
15:43 moritz PerlJam: you open those with :bin anyway
15:43 rjbs- Don't you have to specify file discipline when you open it?
15:43 rjbs joined #perl6
15:43 jnthn PerlJam: If we implemnt this, then it belongs, imo, in the UTF-8 decoding handling
15:44 rjbs (Huh, .tp TLD has finally vanished from root servers.)
15:44 PerlJam aye
15:44 perl6_newbee I vote for this feature ^^
15:45 jnthn I don't think there's a problem with most sane Windows programs if you don't write out a BOM.
15:45 jnthn But on the whole I suspect not tolerating one when reading is going to just create a lot of questions
15:46 jnthn While tolerating it is unlikely to burn anybody if it's implemented in the correct place.
15:48 muraiki nine_: after installing perl 5.20.2 using perlbrew, I was able to install Inline::Perl5 via panda, even with a slightly out of date libperl-dev system package (which I'm not sure is even used if I'm also using perlbrew). thanks for your help!
15:48 muraiki now the moment of truth... does our crazy monolith load properly using Inline::Perl5
15:49 PerlJam muraiki: I had problems with Inline::Perl5 on 5.20.1, but it worked perfectly on 5.20.0.   Didn't have time to explore the cause though.
15:49 muraiki perljam: thanks, good to know
15:50 muraiki hrm, how to change perl5's @INC...
15:50 PerlJam muraiki: use lib "/path/to/foo";
15:50 PerlJam muraiki: set PERL5LIB
15:50 muraiki oh, that won't make perl6 sad? thanks :)
15:51 muraiki sorry, I'm a noob
15:51 PerlJam no worries.
15:51 PerlJam (that use lib line was for your P5 program BTW)
15:52 muraiki oh, that's what i was confused about. I'm trying to use a perl5 module that's installed system wide, but since it was installed for system perl perlbrew can't find it
15:53 muraiki I guess I can just inline the use lib using $p5.run ?
15:53 PerlJam I'd do the env var personally
15:53 PerlJam perlbrew sets PERL5LIB, you just need to add to it.
15:53 muraiki oh, duh
15:53 muraiki thanks :)
15:53 muraiki hey, it's friday!
15:55 jnthn .oO( ♬ Tomorrow is Saturday, and Sunday comes afterwards! ♬ )
15:55 muraiki oh God
15:55 muraiki what have i done...
15:59 muraiki well, got a segfault
16:06 telex joined #perl6
16:06 [Sno] joined #perl6
16:08 muraiki hrm, seems like the problem is with actually using Inline::Perl5. if I do `my $p5 = Inline::Perl5.new;` I get a segfault
16:09 btyler muraiki: are you trying to start multiple p5 interpreters in a single p6 process?
16:09 muraiki btyler: no, this is the only one I have
16:09 muraiki I just tried via repl `use Inline::Perl5; my $p5 = Inline::Perl5.new;`
16:16 estrabd joined #perl6
16:18 muraiki oh, maybe this goes back to perljam mentioning things being broken on 5.20.1 with Inline::Perl5
16:18 muraiki let me compile 5.20.0
16:31 TimToady *yawn*
16:32 FROGGS[mobile] [yawn] *, *
16:34 jnthn m: sub infix:<yawn>(|) { say 'such tired' }; [yawn] *, *
16:34 camelia rakudo-moar 9c6631: OUTPUT«such tired␤»
16:40 5EXAAN260 joined #perl6
16:45 muraiki btyler: I can Inline::Perl5.new using 5.20.0. so yeah, something is broken with 20.1/2
16:46 btyler muraiki: hum, good to know. glad you sorted it
16:56 raiph joined #perl6
17:01 perl6_newbee Does anyone know what happened to NativeCall? DBIish installation failed because of missing NativeCall and panda says it does not exists in ecosystem
17:01 TimToady is now in with rakudo
17:02 TimToady so maybe you have a version skew of some sort
17:02 perl6_newbee Thx. But my Rakudobrew says it is up-to-date
17:02 TimToady or a dependency that needs to be removed somewhere
17:02 PerlJam muraiki: https://github.com/niner/Inline-Perl5/issues/16    Please add any useful commentary there.
17:03 muraiki unfortunately the only thing I got was a segfault :(
17:03 muraiki but I guess I can at least add that ;)
17:03 TimToady perl6_newbee: I think you are not the first person to run into this, so maybe someone who did has an answer
17:03 perl6_newbee sign, I guess I will just wait and hope it will solve itself
17:04 perl6_newbee TimToady: thx
17:07 PerlJam Um ... DBIish no longer has an explicit  dependency on NativeCall as of 15 days ago.
17:07 perl6_newbee um
17:08 PerlJam perl6_newbee: can you post a transcript of what you're seeing somewhere like gist.github.com
17:08 PerlJam ?
17:08 perl6_newbee panda says Fetching DBIish. So I think it should be the current one
17:08 PerlJam come to think of it, I haven't tried installing DBIish with panda in a while ...
17:08 * PerlJam tries
17:08 perl6_newbee Do you mean more than the command line output?
17:09 PerlJam yeah, what you typed and what panda told you
17:09 perl6_newbee ok
17:10 perl6_newbee PerlJam: http://pastebin.com/EH8Rqm57
17:10 PerlJam also my DBIish installation failed because I don't have mysql running on this box, but it didn't complain about NativeCall at all
17:11 TimToady using old metadata somehow?
17:11 moritz PerlJam: huh, the installation shouldn't fail due to missing mysql
17:11 moritz PerlJam: please open an issue, including the error you were getting
17:11 perl6_newbee I don't have mysql running neither, but the failure says Pg.pm6. Postgresql?
17:11 dalek doc: e89c8d6 | moritz++ | lib/Type/Cool.pod:
17:11 dalek doc: Cool.rindex
17:11 dalek doc: review: https://github.com/perl6/doc/commit/e89c8d685d
17:12 moritz yes, postgres
17:13 moritz the tests should all be written so that a missing backend driver or db shouldn't cause a failure
17:13 * moritz builds a new rakudo
17:13 torbjorn joined #perl6
17:14 nine_ muraiki: I use perl 5.20.1 so it should work
17:14 yoleaux 17:03Z <PerlJam> nine_: See https://github.com/niner/Inline-Perl5/issues/16
17:14 TimToady Usability Idea: maybe the 'is native' trait should introspect the signature for use of 'int'
17:15 moritz and do what with it?
17:15 muraiki nine_: I only tried 5.20.2 (failed) and 5.20.0 (worked)
17:15 TimToady carp about it not being int32?
17:15 TimToady or possibly rewrite it
17:15 moritz or just assume int32?
17:16 smls re moritz's last doc commit: Isn't "Str(Cool)" a little redundant as a typespec?
17:16 smls Since all Cool types can be coerced to Str.
17:16 TimToady more generally, force it to C's int type
17:16 TimToady possibly with a warning
17:16 nine_ muraiki: maybe I'll find some time to try it this weekend
17:16 moritz smls: it means that Cool things type-check OK against that parameter
17:16 moritz smls: and it means that it's interpreted as Str
17:16 moritz smls: I don't see a redundancy
17:16 nine_ PerlJam: a stacktrace may help figure it out
17:17 simcop2387 joined #perl6
17:17 smls well, the second part "interpreted as a string" doesn't restrict the type in addition to Cool
17:17 TimToady but it does imply immediate rather than lazy coercion
17:17 moritz smls: no, but it supplies information about how it'll be used
17:18 smls it's kinda part of the implementation of the sub ("what does it do with its args") rather than the typespec ("what args are accepted")
17:18 TimToady which might be very useful if the body would coerce over and over
17:18 smls Do we even still need Cool now that we have coercive types?
17:18 moritz smls: but it's rather relevant that index or rindex on arrays don't search for elements, but do a string-wise search
17:19 jnthn And knowing "it's a Str" on the inside of the rotuine may also help the optimizer.
17:19 PerlJam nine_: muraiki is playing with it now.  Maybe get him to generate one.  I'm attempting to get some other work done and being distracted by IRC :)
17:19 smls right, i suppose having such an implementation detail in the signature makes it more self-documenting
17:19 nine_ |Tux|: noticed you mentioning some Inline::Perl5 slowness. Do you have some benchmark I can work with?
17:19 moritz well, the point of perl6/doc is to document stuff :-)
17:19 TimToady it says something about the semantics of the routine
17:19 [Tux] my CSV module
17:20 [Tux] I can try to cut that down for you
17:20 TimToady if you have a Str(Cool) argument, it means you should never try to write an Int(Cool), because it won't work, and violates the contract that wants to do string processing
17:20 TimToady so it's useful more on a design level
17:21 masak hello #perl6 from
17:21 masak A TRAIN
17:21 masak \o/
17:21 [Tux] nine_: https://gist.github.com/Tux/f781bdefeb190e12a265
17:21 [Tux] rather easy to remove the Slang::Tuxic from there
17:21 smls TimToady: So why isn't the param's type relaxed to Str() ?
17:21 jnthn masak: Surfar du med full fart?
17:21 TimToady Str(Cool) really says I am a Str interface but you may only write a multi that is outside of Cool
17:22 moritz \o masak; what are you training for? :-)
17:22 donaldh joined #perl6
17:22 masak jnthn: no, because the wifi is "too weak in first class" according to the conductor
17:22 muraiki nine_: I could generate a stack trace, if only I knew how to :(
17:22 masak jnthn: I swear, they keep coming up with new ways to suck every time.
17:22 jnthn Wow!
17:23 TimToady well, on Amtrak they only have WiFi in first class...
17:23 smls TimToady: I don't get it, but I have to go. I trust that it actually all makes sense... ;)
17:23 masak moritz: reminded me of https://www.youtube.com/watch?v=yR0lWICH3rY
17:23 smls left #perl6
17:26 nine_ muraiki: perl6 is just a shell script. If you look at it it's just executing moar. Copy that line, appwnd the parameters you would mormally pass to perl6 and add gdb --args to the font
17:26 TimToady I see JVM backend is still completely hosed this morning...
17:26 nine_ muraiki: run that, press r and enter and when it segfaults press bt and enter
17:26 nwc10 TimToady: oh? donaldh certainly fixed the first thing that broke recently when you made a sane change
17:26 TimToady trying again without TEST_JOBS
17:27 nine_ muraiki: otherwise I'll just try to reproduce it when I'm back home
17:27 * donaldh hears his name
17:27 [Tux] nine_ does that help?
17:27 TimToady maybe I have something old that needs cleaned out
17:28 TimToady or maybe it's related to which JVM I'm using
17:28 perl6_newbee moritz: I removed rakudo and cloned it again. This time NativeCall was no longer a problem, unfortunatelly another tests failed: https://gist.github.com/wbiker/76d303624c1e0ed9eb1f
17:28 nine_ |Tux|: maybe. I'll give it a try when I' m at home
17:28 TimToady avoiding TEST_JOBS doesn't help
17:28 TimToady well, and running individual tests doesn't help either
17:28 masak TimToady: oh, I didn't know you use the construction "needs [X]ed" -- is it a West Coast thing? (I've heard diakopter use it.)
17:28 TimToady I get about 3 pages of failed tests in the summary
17:29 * donaldh gets freaked out when he compiles nqp with NQP_VERBOSE_EXCEPTIONS=1
17:29 TimToady masak: I was intentionally speaking Wisconsin-ese and blame tchrist++
17:30 prevost joined #perl6
17:30 TimToady but yeah, I said it knowing it was not in my dialect
17:30 TimToady not actually sure where it comes from exactly
17:31 TimToady because bad linguist :)
17:33 perl6_newbee .seen moritz
17:33 yoleaux I saw moritz 17:22Z in #perl6: <moritz> \o masak; what are you training for? :-)
17:34 perl6_newbee .to moritz I removed rakudo and cloned it again. This time NativeCall was no longer a problem,  unfortunatelly another tests failed: https://gist.github.com/wbiker/76d303624c1e0ed9eb1f
17:34 yoleaux perl6_newbee: I'll pass your message to moritz.
17:35 Rounin joined #perl6
17:36 muraiki nine_: https://github.com/niner/Inline-Perl5/issues/16
17:37 muraiki nine_: I can try to reproduce the crash after altering my INC if you'd like
17:38 muraiki actually I was just able to reproduce it
17:38 muraiki I'll add the info
17:38 nine_ muraiki: thanks!
17:38 perl6_newbee there are very few information about multiline comment #` and hard to find respectively. It works just one line. What is the end string of a multi line comment? It's not `#
17:39 TimToady it always depends on which brackets you use after the tick
17:39 perl6_newbee aaaah
17:39 perl6_newbee cool
17:39 TimToady and you can use [[[ ... ]]] and such to avoid ambiguity
17:40 TimToady m: say #`[[[ unbalance [ in here ]]] 42;
17:40 camelia rakudo-moar 9c6631: OUTPUT«42␤»
17:40 perl6_newbee thats briliant. I love it
17:40 TimToady well, it's just an extension of an existing principle for quotes
17:40 TimToady a comment is just a quote that goes away, kinda
17:41 laouji joined #perl6
17:41 perl6_newbee now as you mentioned it... I did not think this way of comments
17:41 perl6_newbee and it makes sense
17:41 muraiki nine_: ok, stack trace added
17:42 * masak is very, very slightly in favor of multiline comments :)
17:44 rindolf joined #perl6
17:47 TimToady masak: I note that that was a single-line comment...
17:53 itz_ joined #perl6
17:55 sirdancealot joined #perl6
18:04 itz joined #perl6
18:09 masak TimToady: I meant multiline comments as opposed to nothing, not as opposed to single-line comments. :)
18:11 eli-se joined #perl6
18:11 donaldh TimToady: I concur lots of test failures on JVM https://gist.github.com/donaldh/6c1076d6a801995d952c
18:11 * donaldh will take a look this evening
18:14 * donaldh 's evening begins in two hours or so
18:16 J-L joined #perl6
18:17 J-L Hi, I have a question about documentation, like the kind you see at http://doc.perl6.org/type/Str .  What exactly does ":D" as in "Str:D:" mean?  Is there a page that explains what that means?
18:17 donaldh defined
18:17 donaldh as opposed to :U which means undefined
18:18 J-L When would you ever need to use undefined?
18:19 donaldh In a method that takes a type object and constructs something
18:19 cognominal joined #perl6
18:20 J-L And what's the difference between a sub and a method?  I see both defined, and they both seem like a function used in conjunction with a Class.
18:21 FROGGS m: my $a = "a"␤~ "b";␤~ "c"␤
18:21 camelia rakudo-moar 9c6631: ( no output )
18:21 FROGGS why doesnt that warn? ó.ò
18:21 masak J-L: subs are not associated with a class or object at all.
18:21 masak m: sub foo { say "OH HAI" }; foo()
18:21 camelia rakudo-moar 9c6631: OUTPUT«OH HAI␤»
18:21 FROGGS I wasted more than half an hour on that
18:22 masak J-L: it's just that if you want, you could define a sub inside a class block. but that doesn't make objects "callable with the sub" -- it only makes the sub reachable from within the class block.
18:23 FROGGS m: +42
18:23 camelia rakudo-moar 9c6631: ( no output )
18:23 FROGGS m: 42
18:23 camelia rakudo-moar 9c6631: ( no output )
18:23 FROGGS m: 42; 1
18:23 kjs_ joined #perl6
18:23 camelia rakudo-moar 9c6631: OUTPUT«WARNINGS:␤Useless use of constant integer 42 in sink context (line 1)␤»
18:23 TimToady m: my $a = "a"␤~ "b";␤~ "c";␤42;
18:23 camelia rakudo-moar 9c6631: OUTPUT«WARNINGS:␤Useless use of "~ " in expression "~ \"c\"" in sink context (line 3)␤»
18:23 masak J-L: subs can be called from the same block as they're defined in. (and nested blocks.) methods are called on objects, like $obj.bar()
18:23 FROGGS hmmmm
18:23 TimToady the sinker isn't aware that the mainline doesn't use its last value
18:23 J-L masak:  Does it make the sub reachable from outside the class block, as well?
18:23 FROGGS TimToady: bit I've got another statement after that
18:23 FROGGS but*
18:23 TimToady I just put one and got the warning
18:23 masak J-L: no, the reach ends at the end of the block the sub is defined in.
18:23 [Coke] m: class stuff { sub hi { say "hi" }}; hi();
18:23 camelia rakudo-moar 9c6631: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fmHke2eS3c␤Undeclared routine:␤    hi used at line 1␤␤»
18:24 TimToady if it's in a block, that doesn't work either
18:24 avuserow how can I use ulimit on hack to avoid running things out of memory? something like 'ulimit -m 500000' to cap at 500MB?
18:24 TimToady m: { my $a = "a"␤~ "b";␤~ "c";␤42; }
18:24 camelia rakudo-moar 9c6631: ( no output )
18:24 [Coke] m: class stuff { sub hi { say "hi" } method eek() { hi() }}; stuff.eek;
18:24 camelia rakudo-moar 9c6631: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sMUBAiEl2_␤Two terms in a row␤at /tmp/sMUBAiEl2_:1␤------> 3class stuff { sub hi { say "hi" }7⏏5 method eek() { hi() }}; stuff.eek;␤    expecting any of:␤        infix stopper␤        infix or…»
18:24 [Coke] m: class stuff { sub hi { say "hi" } ; method eek() { hi() }}; stuff.eek;
18:24 camelia rakudo-moar 9c6631: OUTPUT«hi␤»
18:24 TimToady the useless use warning is still relatively useless
18:24 FROGGS TimToady: that's my code: https://gist.github.com/FROGGS/7a43b46dd5a20325d819#file-mangle-p6-L8
18:24 J-L When I read the documentation for Strings at http://doc.perl6.org/type/Str , I see the chomp() routine defined as both a multi sub and multi method.  What's the difference?
18:24 FROGGS ahh, yeah
18:25 [Coke] J-L: "thing".chomp (method) vs chomp("thing") sub
18:25 TimToady we've pointed out the inside-block difficulty before, but it hasn't risen to the top of anyone's queue yet
18:25 FROGGS yeah
18:25 [Coke] multi in both cases means that multiple subs/methods might have the same name but take different args.
18:26 J-L Coke:  Do they both operate on "thing", or does one (or both?) return a new new object, leaving one unchanged?
18:26 [Coke] return value is sub/method dependant.
18:27 [Coke] in that case, those are literals. you can't chang ea literal.
18:27 [Coke] (if the sub/method doesn't take an "is rw" parameter, it can't mutate the things passed in regardless)
18:28 * TimToady would love to work on the sink warnings himownself, but has to write a talk for Budapest this weekend
18:28 itz joined #perl6
18:28 J-L Coke:  That's nice... I'm liking the "is rw" signifier.
18:28 nwc10 what's in Budapest? and when?
18:28 nwc10 that's drivable from here.
18:28 nwc10 :-)
18:29 jnthn nwc10: TimToady is in Budapest, this weekend :P
18:29 J-L Coke:  So with chomp, I see one signature has "Str:D" while the other has "Str:D:" (an extra ':').  What's the difference?
18:29 TimToady no, just writing the talk this weekend
18:29 jnthn Ah :)
18:29 TimToady going on Monday night, conf is like Thursday night or so
18:30 PerlJam J-L: That second colon distinguishes the invocant from the rest of the args.
18:30 jnthn Enjoy. I didn't go to Budapest for a while, but have nice memories
18:30 TimToady going to .ro after that
18:31 nwc10 http://cluj.pm/pages/events.html -- March 16th
18:31 * TimToady is pleased to be able to show Budapest to Glo this time
18:31 nwc10 TimToady: when we went for a day, we found it very interesting. We only used euros
18:31 dalek rakudo/cpp: 60db3bc | FROGGS++ | / (2 files):
18:31 dalek rakudo/cpp: implement trait 'is mangled' (short for 'is mangled<C++>')
18:31 dalek rakudo/cpp:
18:31 dalek rakudo/cpp: For CPPStructs we already know that methods need to be mangled before calling into the
18:31 dalek rakudo/cpp: C++ library, but for subroutines we need a way to tell what we are up to.
18:31 dalek rakudo/cpp: review: https://github.com/rakudo/rakudo/commit/60db3bcac3
18:31 nwc10 prices quoted in euros, paid in euros, got change in euros
18:32 nwc10 [please do not rely on this still being true :-)]
18:32 TimToady Last time I was there they were celebrating the 50th anniversary of 1956, so it was impossible to get any coffee before my talk
18:32 TimToady that's why I now carry penguin mints everywhere I go :)
18:33 nwc10 because the TSA would object to a tranger stove and an aeropress? :-)
18:33 pmurias joined #perl6
18:33 TimToady but it was quite the event, people pretending to be dead on the bridge and such
18:33 nwc10 (I keep joking that we should get that for work, as the ultimate DR coffee solution)
18:34 TimToady .oO(drug paraphenalia...)
18:34 nwc10 TimToady: not sure if you've seen this - I found it quite sobering: http://en.wikipedia.org/wiki/Shoes_on_the_Danube_Bank
18:34 J-L Coke and PerlJam:  What about the method sign() ?  I see it has no args.  Wouldn't it still need a "Str:D:", like mthod ord() ?
18:35 [Coke] you looking at docs or code?
18:35 TimToady nwc10: no, hadn't seen that, and of course it wasn't there at my last visit
18:35 J-L Coke:  I'm looking at docs.  Specifically, http://doc.perl6.org/type/Str .
18:36 moritz m: say Str.sign
18:36 yoleaux 17:34Z <perl6_newbee> moritz: I removed rakudo and cloned it again. This time NativeCall was no longer a problem,  unfortunatelly another tests failed: https://gist.github.com/wbiker/76d303624c1e0ed9eb1f
18:36 camelia rakudo-moar 9c6631: OUTPUT«use of uninitialized value of type Str in numeric context  in block <unit> at /tmp/1g_N75Q9Sa:1␤␤0␤»
18:36 moritz J-L: it doesn't need the :D constraint
18:36 TimToady that is another place where Perl 6 defaults to lazy semantics
18:36 nwc10 TimToady: I fail at maths. As was also somewhat demostrated this morning. :-)
18:37 [Coke] so it uses the default invocant.
18:37 J-L Oh, okay.
18:37 TimToady because we don't know in advance whether the method will handle a type object
18:37 TimToady if you care, you put the :D, and if not, we still pick it up as a run-time error
18:38 TimToady mostly we don't care
18:38 TimToady though some of us care more than others :)
18:38 TimToady it's part of the whole gradual typing thing to not care
18:39 dalek DBIish: b327e9e | moritz++ | t/99-common.pl6:
18:39 dalek DBIish: use skip_rest so that the plan is not screwed up.
18:39 dalek DBIish:
18:39 dalek DBIish: perl6_newbee++
18:39 dalek DBIish: review: https://github.com/perl6/DBIish/commit/b327e9ecc8
18:39 TimToady People coming from Haskell tend to freak out just a bit that all of our types are Maybe-ish :)
18:40 TimToady well, native types aren't Maybe-ish, but "just"
18:41 TimToady we think that's a natural place to draw a distinction in defaults
18:41 eli-se joined #perl6
18:41 [Coke] I already envision me grumping at developers to add more type declarations. "this ain't coldfusion", I'll say.
18:41 TimToady one can of course implement a policy module/slang and hold a gun to their heads until they use it
18:42 eli-se what's a type declaration?
18:42 TimToady maybe I shouldn't use that phrase right after what nwc10 said...
18:42 TimToady a type annotation
18:42 TimToady my Int $foo;
18:43 nwc10 I'm unaware of anyone I know personally who suffered or died, but I have constant reminders of it in the 2nd distrcit of Vienna - many building have brass plaques in the pavement outside detailing who (and how many) were deported and murdered.
18:43 TimToady really, a type declaration would be like "subset Foo of Bar where *.speshul;"
18:43 eli-se Oh, I see.
18:43 TimToady or 'class Dogwhistle {...}'
18:43 TimToady we we're pretty sloppy in how we talk here
18:43 TimToady natural languages and all that...
18:43 eli-se Specifications in code are good. There's no reason to put them elsewhere or nowhere when you can put them in your code.
18:44 pmurias joined #perl6
18:44 TimToady well, all principles can be driven into the ground to the exclusion of other principles :)
18:45 PerlJam I think that's how people learn sometimes.
18:45 [Coke] even that one?
18:45 TimToady yup
18:45 itz_ joined #perl6
18:45 PerlJam Use that new hammer for every problem until you can figure out that it probably shouldn't be used for certain problems.
18:45 TimToady which is why even Perl 6 occasionally makes hard and fast rules
18:46 ab5tract TimToady: how many hands would it take to count those?
18:46 TimToady those which?
18:46 ab5tract the occasional hard and fast rules :)
18:47 TimToady one-pass parsing, TTIAR, required ws after keywords, required absence of ws before postfixes, required ws before infix when it collides with postfix
18:47 TimToady depends on how you count
18:48 TimToady but on a higher level, all is fair if you predeclare
18:48 ab5tract i'm curious because it might be nice to have those all together in some doc somewhere
18:48 TimToady so you can still break any of these hard-and-fast rules, but only if you predeclare that you're gonna
18:48 J-L I tell ya, I REALLY like Perl6's "is rw" modifier (and the fact that if it's not there, it leaves the argument unchanged).  Before that, it bothered me that I could never really be sure if the passed-in argument was modified.  Lisp had this problem; Ruby didn't.
18:48 TimToady but that's really just a facet of one-pass-parsing, if you like
18:49 TimToady LTM is pretty darn important too
18:49 TimToady since that's basically how we write your lexer for you based on the grammar
18:50 TimToady syntax categories are pretty fundamental in how you combine sublexers
18:51 TimToady what I said earlier about comments being like quotes was only a half truth, because a comment can occur inside any whitespace, but a quote can only occur where a term is expected
18:51 J-L Say, I'm trying to find a Pure-Perl6 solution to the Perl5 FAQ question shown with 'perldoc -q "on the keyboard"', which is "How do I check whether input is ready on the keyboard?".
18:51 PerlJam TimToady: you should teach a language construction class.  :)
18:51 PerlJam it might pair well with a compiler construction class
18:52 TimToady I dunno...here's 50 principles of language design, and you're on your own for how to balance them...
18:52 J-L I already found pure-Perl6 solutions for the other two questions shown with "perldoc -q keyboard" (that relate to the keyboard), now I want to formulate the solution for the third.
18:53 kjs_ joined #perl6
18:53 J-L Namely, how do I check whether input is ready on the keyboard, without resorting to a non-standard module.
18:54 PerlJam J-L: you just want to check, but not read if there is input there?
18:54 TimToady by writing the standard module?
18:54 J-L PerlJam:  Correct.
18:54 PerlJam J-L: then, what TimToady said :)
18:54 J-L TimToady:  If I can write the standard module in puer-Perl6, yes.
18:54 TimToady the trouble here is that there's no canonical way that works on any OS
18:55 japhb m: my Supply $supply .= new; my $emitted = 0; $supply.tap({ ++$emitted}); constant ITERS = 1_000; my int $i = 0; my num $t0 = nqp::time_n(); while ($i = $i + 1) < ITERS { $supply.emit("test") }; my $rate = ITERS / (nqp::time_n() - $t0); say "supply.emit -> tap: { $rate.fmt('%.3f') } items/sec";
18:55 yoleaux 5 Mar 2015 09:25Z <jnthn> japhb: DIHWIDT. You've only allowed one processing thread, scheduled two pieces of work, and had the first block the thread. In the future, "await ..." instead of .result should be usable to resolve this; I think .result will always be the blocking thing.
18:55 camelia rakudo-moar 9c6631: OUTPUT«Cannot modify an immutable Supply␤  in method dispatch:<.=> at src/gen/m-CORE.setting:1355␤  in any  at src/gen/m-Metamodel.nqp:1619␤  in block <unit> at /tmp/fJvcIUDO9G:1␤␤»
18:55 japhb m: my $supply = Supply.new; my $emitted = 0; $supply.tap({ ++$emitted}); constant ITERS = 1_000; my int $i = 0; my num $t0 = nqp::time_n(); while ($i = $i + 1) < ITERS { $supply.emit("test") }; my $rate = ITERS / (nqp::time_n() - $t0); say "supply.emit -> tap: { $rate.fmt('%.3f') } items/sec";
18:55 camelia rakudo-moar 9c6631: OUTPUT«supply.emit -> tap: 3296.434 items/sec␤»
18:55 TimToady so if you write your OS in Perl 6, you're home free :P
18:55 J-L TimToady:  In Perl5 we had the select() statement, which I know worked on Unix, and *I think* worked on Windows.  (Not 100% sure about that, though.)
18:55 nwc10 camelias all the way down
18:55 TimToady either that, or you're emacs
18:55 japhb jnthn: How hard would it be to increase that rate? ^^^  Is there a lot of headroom there, or is it unlikely to increase much?
18:56 J-L There was also IO::Handle::select(), which I think also worked on Windows.
18:56 TimToady select doesn't work on windows if you try to mix in sockets
18:56 vendethiel joined #perl6
18:56 TimToady but maybe that module hides the problem
18:57 japhb jnthn: Also, where were you suggesting I put await in my lockup test?  Replace the inner .result?  The outer .result?  Both?
18:57 japhb m: my Supply $supply .= new;
18:57 camelia rakudo-moar 9c6631: OUTPUT«Cannot modify an immutable Supply␤  in method dispatch:<.=> at src/gen/m-CORE.setting:1355␤  in any  at src/gen/m-Metamodel.nqp:1619␤  in block <unit> at /tmp/9UzXpD6iSJ:1␤␤»
18:57 ab5tract TimToady: I for one am looking forward to a post-release effort to gather historical/contextual discussion about the more influential decisions in perl 6 vis a vis 'balance'
18:57 japhb Is the above idiom dead? ^^^
18:58 TimToady japhb: no
18:58 japhb m: my Int $i .= new;
18:58 camelia rakudo-moar 9c6631: ( no output )
18:58 TimToady it's just a bug
18:58 japhb Hmmm, so just a bug in Supply somehow.
18:59 TimToady I don't think it's a maybe bug
18:59 japhb Huh?
18:59 TimToady sorry, haskellian joke
19:00 moritz it's probably related to Supply being a role
19:00 moritz m: role R { }; my R $x .= new()
19:00 camelia rakudo-moar 9c6631: OUTPUT«Cannot modify an immutable R␤  in method dispatch:<.=> at src/gen/m-CORE.setting:1355␤  in any  at src/gen/m-Metamodel.nqp:1619␤  in block <unit> at /tmp/IfTUTwHEdv:1␤␤»
19:00 japhb Yeah, appears so.
19:00 japhb moritz++  # Diagnosis at a glance
19:01 moritz it helps to have stared at the Supply code for quite some time :-)
19:01 japhb Heh
19:01 ab5tract there is a _lot_ for the perl 6 effort to offer the craft and community of language design in terms of retrospective analysis
19:02 jnthn japhb: The await will, in the future, make a difference there if you put in in the inner .result call. Won't hurt for both.
19:02 TimToady but it's difficult to dredge things out that were decided in my subconscious, except by examining the resulting rationalizations that showed up later...
19:02 TimToady and it's not always clear that the rationalizations were the actual reason for the decision...
19:03 japhb jnthn: Ah, good, thank you.
19:03 PerlJam TimToady: are you saying that it all only makes sense in hindsight?  :)
19:03 moritz m: role R { }; my R $x = R.new()
19:03 camelia rakudo-moar 9c6631: ( no output )
19:03 ab5tract ah, most certainly. but i'm thinking also of technical decisions, such as the nom rewrite or how we landed on 6model
19:03 TimToady well, sometimes I decided that I didn't like something, and figured out reasons afterwards
19:03 J-L Hmmm...maybe Perl5's IO::Select::can_ready DOESN'T work on Windows.  (I just tried and it didn't seem to work.)
19:03 jnthn japhb: The, uh, supply rate is pretty slow at the moment
19:03 ab5tract that interact and inform the language design
19:03 TimToady but that could maybe just be prejudice
19:03 ab5tract *interact with
19:04 PerlJam TimToady: intuition born from experience
19:04 TimToady "maybe just" pun intended
19:04 japhb jnthn: Any hope of improvement?  Or something fundamental to the design, like the forced context switch issue that existed with Channels?
19:04 ab5tract :)
19:04 jnthn japhb: Yes, hope. Part of the point of the model is that they don't suffer the forced context switch issue and more more cache friendly
19:04 jnthn japhb: There's just not be much work on optimization there yet.
19:04 jnthn *been
19:05 japhb Ah, OK
19:05 J-L I just read about promises.  Are those implemented with threads?
19:05 TimToady still working on correctness, really
19:05 jnthn Indeed
19:05 japhb J-L: You can start code in a threadpool, and get a promise back, if that's what you mean.
19:06 jnthn J-L: That's a slight level confusion, but a Promise can certainly represent a piece of working being done on a thread
19:06 TimToady see for instance the behavior of https://raw.githubusercontent.com/kgoess/restart-concurrent/master/restart.p6
19:06 japhb But it's the scheduler that decides how threads are allocated.
19:06 TimToady (after taking the return out of the block)
19:06 ab5tract that in itself is excellent stuff, imo. i guess i don't talk to that many language designers, in the end, but i don't feel like i read a lot of open discussion about 'process', nor do i think that any effort has quite taken the process that perl 6 has
19:07 jnthn J-L: start { ... } schedules work on a thread, as japhb said which thread is up to the Scheduler. It doesn't start a thread per bit of work you shcedule, though. Not unless you go out of your way to make that happen, anyway.
19:07 jnthn Gotta go for a bit...
19:07 jnthn bbl
19:08 * japhb actually has an app that starts by computing how many threads it would take to start all pending tasks at once, and then installs a new scheduler told to manage a threadpool that large
19:08 TimToady "I think it has something to do with free will."  --God (at least the one in Time Bandits)
19:09 El_Che TimToady: still waiting for your talk video
19:09 El_Che they are clearly keeping the best until the end
19:09 El_Che the sneaky bastards :)
19:09 japhb It always makes me chuckle when I run that app and my system fans start spinning up to jet engine levels.
19:09 TimToady well, just means the "6.0.0" fecal material will hit the rotating blades again :)
19:10 TimToady japhb: wow, nice setup :)
19:10 J-L The goal of what I want to do is to make a non-blocking read of keyboard input.  If there's input waiting, return it, and if there's not, either return undef or an empty string.  Anybody have any idea how to do that?
19:11 TimToady well, I have a unix-centric way
19:12 gfldex joined #perl6
19:14 TimToady well, no, I use single-char input but it's blocking
19:15 TimToady currently looks like this:
19:15 TimToady shell "stty raw -echo min 1 time 1 </dev/tty";
19:15 TimToady $TTY = open("/dev/tty");
19:15 TimToady at later...
19:15 TimToady my $buf = Buf.new;
19:15 TimToady repeat { $buf ~= $TTY.read(1) } until try my $s = $buf.decode;
19:16 fhelmberger joined #perl6
19:16 TimToady (that's from my quiz editor that I've been using for years now)
19:17 TimToady though that particular bit of code was just upgraded to allow UTF-8 input
19:17 spider-mario joined #perl6
19:17 J-L TimToady:  Tell me about the "repeat" line.  What's it doing, exactly?  What does it do if there's no input?  Does it eventually break out?
19:17 hahainternet he reads characters into the buf
19:18 hahainternet well
19:18 hahainternet he reads bytes into the buf
19:18 hahainternet until they are decodeable as characters?
19:18 hahainternet i assume anyhow
19:18 TimToady repeat is just a loop that tests at the end
19:18 J-L And what if there's nothing to read?  Does it break out?
19:18 hahainternet also lo @ #perl6 crew
19:18 TimToady as I said, it blocks
19:18 hahainternet prly fails at EOF too i assume
19:19 hahainternet but i don't know perl6's exception type stuff in any way
19:19 TimToady I dunno, I have an exit command :)
19:19 J-L I'm confused about the "until try" part, as well as the "~=" part.
19:19 Hor|zon joined #perl6
19:20 masak J-L: the `try my $s = $buf.decode` part is an expression. if decoding fails, it swallows the exception (and becomes falsy).
19:21 TimToady actually, ^D is a valid editor command :)
19:21 TimToady ~= is just append
19:21 TimToady since ~ is concatenate
19:22 TimToady try is catching the exception that is thrown by .decode if its input is not well-formed UTF-8
19:22 retupmoca m: await start { .say for lines }
19:22 camelia rakudo-moar 9c6631: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bhí gleanntáin ghlas’ G…»
19:22 retupmoca oh
19:22 retupmoca apparently I need to update; that breaks here
19:23 huf is that irish or scottish?
19:23 masak huf: Irish.
19:24 huf how can you tell? in case both look greek to you :)
19:24 TimToady J-L: btw, wrt http://irclog.perlgeek.de/perl6/2015-03-05#i_10231179 I had to explicitly hack ^D and ^Z recognition into Perl for windows at one point
19:24 TimToady so would not be at all surprised if P6 didn't support those sequences yet
19:24 moritz huf: one can tell by 'git log -- stdin' in perl6/evalbot
19:25 huf moritz: :)
19:27 J-L Thanks, TimToady.  I appreciate it.  When will the version that has ^D and ^Z recognition be available?
19:28 TimToady well, as subsequent discussion pointed out, it may be the readline hiding those
19:28 TimToady for the REPL
19:28 TimToady we do have devs on Windows, so support is probably already there
19:28 J-L I'm reading up on Promises, and I wonder:  How do I break a Promise?  I tried "$promise.vow.break;" but I'm getting:  Access denied to keep/break this Promise; already vowed
19:29 TimToady but maybe jnthn++ never needs to type EOF
19:29 moritz J-L: how did you create the promise?
19:29 anaeem1_ joined #perl6
19:30 J-L moritz:  I used:  my $p = Promise.start({ sleep 5; 42});  # $p is my $promise
19:30 laouji joined #perl6
19:30 moritz J-L: die()ing in the Promise breaks it
19:30 J-L moritz:  Is there a way I can kill it from outside?
19:31 moritz J-L: no, but you can create a combined promise that you can break
19:32 moritz my $breakable = Promise.new; my $p = Promise.anyof(start { ... }, $breakable); $breakable.break # breaks $p too
19:32 J-L moritz:  I'm not familiar with combined promises.  Can the code in a Promise just read an outside variable and die if the variable has a certain state?
19:32 moritz J-L: see the example I just gave
19:34 moritz J-L: and yes, you could also use an outside variable and die
19:34 moritz but that won't help while you're hanging in some kind of IO operations
19:35 lizmat FROGGS: re http://irclog.perlgeek.de/perl6/2015-03-06#i_10233001 , looks like pushing an ENTER phaser, does not activate phasers for that scope
19:35 xfix_ joined #perl6
19:35 TimToady jnthn: I think it's fine if native array methods default to eager whenever possible, including .pick(*) but not .roll(*)
19:35 lizmat m: sub foo is DEPRECATED { LEAVE say "leaving"; 42 }; say foo   # adding any other phaser, makes it work
19:35 camelia rakudo-moar 9c6631: OUTPUT«leaving␤42␤Saw 1 call to deprecated code during execution.␤================================================================================␤Sub foo (from GLOBAL) called at:␤  /tmp/xBd3x44wPH, line 1␤Please use something else instead.␤--------…»
19:36 J-L moritz:  But would using an outside variable to die be safe?  That is, thread-safe?  (I know that in some languages that's not a good idea.)
19:37 moritz J-L: a simple scalar should be safe
19:37 J-L moritz:  When I run "my $breakable = Promise.new;  my $p = Promise.anyof(start { sleep 5; 42 }, $breakable);", I'm getting:  Too many positionals passed; expected 1 argument but got 2
19:37 khisanth_ joined #perl6
19:39 moritz J-L: need parens after start, I suppose
19:39 TimToady that should be okay
19:39 moritz &start is just a sub
19:39 TimToady start is a statement_prefix
19:39 moritz it is?
19:39 TimToady supposed to be
19:39 moritz well, it's not :-)
19:40 moritz works with parens here :-)
19:40 J-L moritz:  Do the parens surround $breakable?
19:40 moritz J-L: I mean  Promise.anyof( start(...), $breakable)
19:42 TimToady std: start()
19:42 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Undeclared routine:␤     'start' used at line 1␤Check failed␤FAILED 00:01 134m␤»
19:42 TimToady std: start {...}
19:42 camelia std 28329a7: OUTPUT«ok 00:00 136m␤»
19:43 J-L moritz:  Adding in those parens seemed to work.
19:44 TimToady S04:1432
19:44 synopsebot Link: http://design.perl6.org/S04.html#line_1432
19:44 TimToady so to be future comabitable, write (start {}), not start({})
19:45 J-L I'm also trying the die-ing approach to stop a promise that reads input a line at a time:  my $alive=1;  my $p = Promise.start({while $alive {my $text = $*IN.get; say "Got $text"}});  sleep 5;  $aliv=0;  $p.result;
19:46 J-L ...but when I type a short line + ENTER during its sleep, nothing prints and then I get:  Reading from stream failed: connection already in progress
19:47 kjs_ joined #perl6
19:47 TimToady *compatible
19:47 J-L (Mistake:  When I wrote $aliv=0 I meant $alive=0)
19:48 J-L Are you allowed to read and write from std input/output inside a Promise's code?
19:49 itz joined #perl6
19:50 TimToady re 0 ** 0, see also http://rosettacode.org/wiki/Zero_to_the_zero_power
19:53 anaeem1 joined #perl6
19:57 TimToady nine_: re http://irclog.perlgeek.de/perl6/2015-03-06#i_10233083 if you're doing anything with exceptions, the pre and post strings can have different ws now, since the default is now to move the ⏏ to the front of a ws
19:58 mohij joined #perl6
19:58 Sqirrel joined #perl6
19:59 TimToady speaking of which, I think some of our tests may be overly specific to our single implementation
20:00 TimToady it's not clear that we should be testing error messages, when the main point of having exception classes is to make that not necessary
20:00 Hor|zon joined #perl6
20:02 ab5tract J-L: you should be able to do anything from inside a Promise's code, unless i'm misunderstanding the feature
20:03 lizmat FROGGS: I'm not seeing a fix for is DEPRECATED, perhaps jnthn can provide pointers
20:03 lizmat FROGGS: I'm not sure when the code for "is DEPRECATED" actually runs, before or after the op trees for the routine have been created
20:04 FROGGS lizmat: I am debugging it atm
20:04 lizmat ok, I'll drop it from my list then
20:04 FROGGS yeah :o)
20:09 J-L moritz and abstract:  Basically, I'm trying to run at the command line:  echo hello | perl6 -e "my $alive = True; my $p = Promise.start({while $alive {my $text = $*IN.get; say 'Got ', $text}}); sleep 5; $alive = False"
20:09 J-L ...but nothing's printing.  It should print "Got hello", right?
20:12 raiph "[perl6] Complex Attribute Validation and/or Triggers" http://perlmonks.org/?node_id=1119046
20:13 ab5tract J-L: honestly I think that moritz promise-of-a-promise approach makes more sense to me
20:13 dalek specs: 4f024c5 | TimToady++ | S99-glossary.pod:
20:13 dalek specs: generalize smop a bit
20:13 dalek specs: review: https://github.com/perl6/specs/commit/4f024c5852
20:14 PerlJam raiph: I think tye's reply sums it up  :)
20:14 J-L moritz and abstract:  Regardless, shouldn't this work?:  echo hello | perl6 -e "my $p = Promise.start({my $text = $*IN.get; say 'Got ', $text}); sleep 5;"
20:14 J-L Nothing prints for me.
20:15 retupmoca I think there's a windows rakudobug: running "perl6 -e 'await start { .say for lines }'" in my terminal window doesn't work
20:15 J-L This prints for me, but putting it inside a Promise doesn't for some reason:  echo hello | perl6 -e "my $text = $*IN.get; say 'Got ', $text"
20:15 retupmoca but that same thing worked fine here
20:15 ab5tract J-L: my rakudo is compiling atm, and i won't be able to test windows
20:16 retupmoca seems reading from stdin from a thread isn't working properly on windows
20:16 ab5tract J-L: what happens when you add $p.result after the sleep call?
20:17 ab5tract (in the non-$alive version)
20:18 J-L This DOES work for me:  perl6 -e "my $p = Promise.start({say 'Got text'}); sleep 5;"
20:18 ab5tract ok
20:19 retupmoca J-L: yes, this matches my tests: no threads, everything is fine; stdout in thread, everything is fine; stdin in thread, doesn't work
20:20 retupmoca (I'm on windows powershell with nom/master/master)
20:20 J-L This:  echo hello | perl6 -e "my $p = Promise.start({my $text = $*IN.get; say 'Got ', $text}); sleep 5; say $p.result"
20:20 J-L Gives me this:  ===SORRY!===\nReading from stream failed: connection already in progress
20:22 mraynham joined #perl6
20:23 raiph PerlJam: thanks
20:33 rurban joined #perl6
20:35 mraynham Hi. I'm just starting to look at Perl 6, and have been to http://rakudo.org/how-to-get-rakudo/.  I found the content a bit confusing, and wondered what the procedure is for suggesting improvements?
20:35 mraynham The "How to help" page suggests that I need to create an account, but I can't find out how to do that.
20:35 vendethiel mraynham: "suggesting an improvement" on perl6
20:35 vendethiel ?
20:37 TimToady I take it to mean improvements on the particular page
20:38 TimToady since obviously Perl 6 can't be improved <cough>
20:38 vendethiel *g*
20:39 mraynham Yes, improvements to the "How to get Rakudo page".
20:40 * raydiak doesn't know if there is any particular way to file an issue w/rakudo.org itself other than here, nor who maintains it
20:40 kjs_ joined #perl6
20:40 raydiak since it's on wordpress instead of a github project like most of the rest of our core web presence
20:40 PerlJam mraynham: perhaps email pmichaud with your improvements (or ask how to create an account :)
20:40 * sjn asked about that page just earlier today
20:41 * sjn would love to see that page improved too
20:42 mraynham Yeah, I thought as much.  I'll email pmichaud and see what I can do.
20:42 sjn mraynham: you Andy?
20:42 PerlJam hold on, I'm seeting if I have an account on rakudo.org with admin privs.
20:42 PerlJam er, seeing
20:42 sjn s/you/you're/
20:43 PerlJam ah, I do
20:43 mraynham sjn: Nope.  I'm Mike.
20:44 sjn ah, ok. we had exactly the same topic of discussion at Oslo.pm :)
20:44 sjn in other news, coincidences happen.
20:45 nwc10 how is Damian?
20:45 * sjn spoke with dconway yesterday
20:46 sjn he's fine, doing his .eu tour right now
20:46 dalek rakudo/nom: 9034557 | lizmat++ | src/core/ (6 files):
20:46 dalek rakudo/nom: Kill the Type(Any) coercion meme
20:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/903455724f
20:46 jnthn lizmat, FROGGS: If you are wanting to be able to have traits that can set up phasers, we can probably have it work for those cases it doesn't already
20:46 PerlJam mraynham: if you respond to my priv msg, I can give you an account on rakudo.org
20:48 mraynham PerlJam: Thanks
20:49 FROGGS jnthn: yes, that is what we need
20:49 jnthn FROGGS: Which one do you need that doesn't work?
20:49 FROGGS jnthn: is DEPRECATED (ENTER phaser)
20:50 FROGGS looks like it is optimized away O.o
20:50 jnthn Not even that
20:50 J-L So, for now, as for making non-blocking reads from STDIN using Promises, it's a bug in Rakudo in Windows, and I need to wait for the fix, correct?
20:50 * sjn redirects Andy from Oslo.pm towards mraynham and PerlJam, just in case he wants to help improve the rakudo.org installation page
20:50 FROGGS jnthn: but --optimize=off helps
20:50 jnthn It's that we emit code-gen to call ENTER phasers upon seeing one in the code.
20:50 jnthn Really? Wow :)
20:51 FROGGS jnthn: the 'run_phasers_code' is in the ast
20:51 jnthn Oh
20:51 PerlJam sjn; there are lots of admins for rakudo.org here (though, I suspect they login about as frequently as I do :)
20:51 FROGGS but... still weird
20:51 jnthn I bet it doesn't recognize that it's not a flattenable blcok, 'cus the phaser isn't lexically within it.
20:52 FROGGS optimize=1 also works, but optimize=2 doesnt
20:54 FROGGS I dont get it.... I was thinking that the optimizer in rakudo only fiddles with the ast... but the ast of the working and the non-working version are identical
20:55 FROGGS maybe something is optimized that does not show up in the ast?
20:55 timotimo hmm, i dun wanna backlog
20:55 timotimo so much backlog
20:55 TimToady $x *= 5 is not going to change, for the reason given in the design docs that nobody actually bothers to read anymore
20:56 jnthn FROGGS: I'm really not sure :S
20:57 skids TimToady: well, I was just reading them right now AaMoF :-)
20:57 PerlJam TimToady: There's just so much to read!  Got a pointer to the specific place where it's mentioned?
20:59 ab5tract TimToady: is that "Assignment doesn't look like binding, but consider that it's really calling some kind of underlying set method on the container, which must be mutable in order to change its contents."
20:59 retupmoca jnthn: is it known that "await start { .say for lines }" breaks on windows console (with perl6-m)?
21:00 retupmoca jnthn: or should I rakudobug?
21:00 ab5tract http://design.perl6.org/S09.html#Autovivification ?
21:00 TimToady S03:4115
21:00 synopsebot Link: http://design.perl6.org/S03.html#line_4115
21:00 TimToady it's carefully hidden in the section on Assignment operators
21:01 PerlJam :-P
21:01 J-L On my Windows,    perl6-m -e "await start { .say for lines }"   gives me:  ===SORRY!===  and I have to CTRL-C to get out.
21:02 FROGGS jnthn: I am checking now which optimization breaks it
21:08 TimToady +1 to always stripping BOM on textual input
21:09 jnthn retupmoca: Wasn't known to me, but I can reproduce it
21:10 ab5tract TimToady: so I'm more understanding of the nuances here now
21:10 ab5tract m: my %k; %k<b> = 3; %k<g> = 7; for <a b c d e f g> { %k{$_} *= 6 }; %k.say
21:10 camelia rakudo-moar 9c6631: OUTPUT«a => 6, b => 18, c => 6, d => 6, e => 6, f => 6, g => 42␤»
21:11 lizmat m: say Supply.HOW.WHAT   # a better way to find out if something is a Role ?
21:11 camelia rakudo-moar 903455: OUTPUT«(Perl6::Metamodel::ParametricRoleGroupHOW)␤»
21:12 ab5tract which means you can do the following easily: (I suppose it is more difficult to introduce a "conditional autovivify")
21:12 ab5tract m: my %k; %k<b> = 3; %k<g> = 7; for <a b c d e f g> { %k{$_} *= 6 if defined %k{$_} }; %k.say
21:12 camelia rakudo-moar 903455: OUTPUT«b => 18, g => 42␤»
21:14 jnthn m: my %k; %k<b> = 3; %k<g> = 7; %k<a b c d e f g>:v >>*=>> 6; say %k;
21:14 camelia rakudo-moar 903455: OUTPUT«b => 18, g => 42␤»
21:14 ab5tract jnthn: that is very pretty indeed :)
21:16 jnthn lizmat: Better than...?
21:16 fhelmberger joined #perl6
21:17 lizmat m: say Supply.HOW.^attributes.map: *.name   # grepping on $!pun e.g. ?
21:17 camelia rakudo-moar 903455: OUTPUT«@!candidates @!add_to_selector $!selector @!role_typecheck_list $!name $!why $!pun $!made_pun $!pun_repr $!boolification_mode␤»
21:17 ab5tract though to continue my verbosity vs readability theme, i wish this would also work:
21:17 ab5tract m:  %k<b> = 3; %k<g> = 7; %k<a b c d e f g>:values >>*=>> 6; %k.say
21:17 camelia rakudo-moar 903455: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vXe0ChKIn3␤Variable '%k' is not declared␤at /tmp/vXe0ChKIn3:1␤------> 3%k<b>7⏏5 = 3; %k<g> = 7; %k<a b c d e f g>:value␤    expecting any of:␤        postfix␤»
21:18 ab5tract m: my %k; %k<b> = 3; %k<g> = 7; %k<a b c d e f g>:values >>*=>> 6; %k.say
21:18 jnthn lizmat: Oh, that's an awful way
21:18 camelia rakudo-moar 903455: OUTPUT«Unexpected named parameter 'values' passed␤  in sub postcircumfix:<{ }> at src/gen/m-CORE.setting:3619␤  in block <unit> at /tmp/D3xGs51QbB:1␤␤»
21:18 lizmat jnthn: I agree...
21:18 jnthn m: say Supply.HOW.archetypes.composable
21:18 camelia rakudo-moar 903455: OUTPUT«1␤»
21:19 dalek doc: ca2186e | skids++ | lib/Language/regexes.pod:
21:19 dalek doc: Add docs for modified quantifier
21:19 dalek doc: review: https://github.com/perl6/doc/commit/ca2186eecb
21:20 ab5tract at that point the only "cryptic" part is the double hyper operator, but that's only in the case of not yet fully understanding/thinking in hyper operators
21:20 lizmat m: say (class {}).HOW.archetypes.composable   # checking
21:20 camelia rakudo-moar 903455: OUTPUT«0␤»
21:20 lizmat m: say (role {}).HOW.archetypes.composable   # checking
21:20 camelia rakudo-moar 903455: OUTPUT«1␤»
21:20 b2gills TimToady: I assume you actually mean: " +1 to stripping the BOM by default on utf[8|16|32] "
21:24 ab5tract with such terse syntax possible, the space saved with by abbreviations may not always be worth it. so I suppose I am proposing a full-length variant for every abbreviation in core (within reasonable limits, of course)
21:24 TimToady I think we should strip the BOM on ASCII files too :)
21:24 [Coke] then I have know two names for things? meh
21:27 ab5tract [Coke]: fair point. also, on second thought, this is perl 6 makes this insanely easy to add as a slang. :)
21:28 ab5tract . o ( composed well that sentence not )
21:28 [Coke] I am hoping that "the release" has a corresponding eclipse plugin up and running with builtin doc help.
21:29 ab5tract but either way you would obviously only ever need to remember one :P
21:30 ab5tract until you read someone else's code, of course
21:32 lizmat jnthn: seems this diff is not cutting it: https://gist.github.com/lizmat/ec93cc17376c985b69c9  suggestions?
21:33 FROGGS shouldnt it be mutate.HOW.archetypes(mutate) ?
21:34 FROGGS ohh, probably not
21:34 retupmoca J-L: jnthn: windows console problem has been rakudobugged
21:34 FROGGS lizmat: it should read: mutate.HOW.make_pun(mutate)."$name"(|c)
21:34 FROGGS lizmat: at least that is what I am sure of
21:35 jnthn lizmat: I'm a bit surprised we need that patch
21:35 lizmat ok, but that part of the code doesn't run
21:36 FROGGS lizmat: yeah
21:36 lizmat mutate.HOW.archetypes.composable is 0 for Supply in the setting
21:36 jnthn I think the issue may be more that we already punned it to call the dispatch:<.=> ?
21:37 lizmat m: my Supply $s .= new
21:37 camelia rakudo-moar 903455: OUTPUT«Cannot modify an immutable Supply␤  in method dispatch:<.=> at src/gen/m-CORE.setting:1355␤  in any  at src/gen/m-Metamodel.nqp:1619␤  in block <unit> at /tmp/eAH2kBFy8R:1␤␤»
21:37 lizmat 1355 is mutate."$name"(|c);
21:37 gtodd if it were truly insanely super scary easy = perl6 would write a slang *by itself* and call it perl7 ...
21:38 FROGGS hmmm, the 'is DEPRECATED' bug is triggered by the block at Perl6::Optimizer:1310
21:39 jnthn lizmat: Yeah, I'm looking at a profile (because the profiler tells me the call graph, not 'cus I'm looking at speed :))
21:39 jnthn lizmat: And it makes the pun the dispatches to the .=
21:42 jnthn lizmat: Plesae can you have a go with a patch like this: https://gist.github.com/jnthn/a62bec1143386cd2bb22
21:42 lizmat jnthn: you're right, mutate is already a Perl6::Metamodel::ClassHOW
21:42 lizmat will do
21:43 FROGGS jnthn: a call to P6::O.inline_call breaks 'is DEPRECATED'
21:46 lizmat perhaps we need to remove "inline_info" inside the is DEPRECATED trait ?
21:46 raydiak r: role R does Callable { method postcircumfix:<( )> (|) { self.say } }
21:46 camelia rakudo-moar 903455: OUTPUT«===SORRY!===␤Internal error: failed to remove block␤»
21:46 raydiak mwahaha golfed you, sneaky bug...
21:46 lizmat $ 6 'my Supply $s .= new; say $s'
21:46 lizmat Supply.new()
21:46 lizmat spectesting now
21:47 FROGGS lizmat: I dont see any code that removes inline_info in any way...
21:47 lizmat isn't that a mixin?
21:47 FROGGS lizmat: and I also dont see anything that an extra phaser would change here...
21:48 lizmat 2761:        $*W.apply_trait($/, '&trait_mod:<is>', $code, inlinable => $inline_info)
21:48 jnthn FROGGS: Which call is it inlining?
21:48 FROGGS yes, that sets inline_info
21:48 DrForr joined #perl6
21:48 FROGGS jnthn: I dunno
21:48 FROGGS I'll dump the inline_info....
21:48 jnthn FROGGS: Take a look? ;)
21:49 jnthn FROGGS: Well, you have the code object it's trying to inline too so you can just .name on it.
21:49 FROGGS :P
21:49 lizmat FROGGS: maybe we need to mark the routine as "soft"
21:49 FROGGS ohh
21:50 lizmat $r = $r but soft ?
21:50 kjs_ joined #perl6
21:51 FROGGS jnthn: it is inline my sub foo
21:51 jnthn FROGGS: Is that the one you're marking DEPRECATED?
21:51 FROGGS where the is DEPRECATED trait is applied on
21:51 dalek rakudo/nom: a9e5ae7 | lizmat++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
21:51 dalek rakudo/nom: Fix my Role $foo .= new, jnthn++ for actual code
21:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a9e5ae7a7a
21:51 jnthn FROGGS: Right, I think maybe we need to refuse to inline blocks that have phasers
21:51 jnthn FROGGS: Preferably by not putting the inline_info on them in the first place
21:52 jnthn FROGGS: It's about the last thing we do in routine_def, so the DEPRECATED trait should have already had its say by then.
21:53 FROGGS I see
21:57 raydiak r: role R does Callable { method foo { self.say } }
21:57 camelia rakudo-moar 903455: OUTPUT«===SORRY!===␤Internal error: failed to remove block␤»
21:59 dolmen joined #perl6
22:02 jnthn raydiak: Eww
22:03 raydiak jnthn: writing up the report now
22:03 raydiak you can even trigger it just with
22:03 raydiak r: role R does Callable { self.say }
22:03 camelia rakudo-moar 903455: OUTPUT«===SORRY!===␤Internal error: failed to remove block␤»
22:03 raydiak (instead of 'self used where no self available' error)
22:04 raydiak otoh, this works...
22:04 raydiak r: role R is Callable { self.say }
22:04 camelia rakudo-moar 903455: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤'self' used where no object is available␤at /tmp/tmpfile:1␤------> 3role R is Callable {7⏏5 self.say }␤    expecting any of:␤        prefix or term␤»
22:04 raydiak r: role R is Callable { method { self.say } }
22:04 camelia rakudo-moar 903455: ( no output )
22:05 raydiak r: role R does Callable { method { self.WHAT } }
22:05 camelia rakudo-moar 903455: ( no output )
22:05 raydiak metamethods don't break it
22:06 dalek rakudo/nom: 1b74e4e | FROGGS++ | src/Perl6/Actions.nqp:
22:06 dalek rakudo/nom: do not add inlining info to block with phasers
22:06 dalek rakudo/nom:
22:06 dalek rakudo/nom: When we inline these blocks we inline away said phasers. This showed up when applying trait
22:06 dalek rakudo/nom: "is DEPRECATED" to subroutines for example. lizmat++ and jnthn++ for successful collab :o)
22:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1b74e4ee15
22:06 timotimo oh, hehe
22:06 timotimo clever
22:09 lizmat yeah!
22:10 moritz but spesh might still inline them?
22:10 FROGGS if it does it does not break the phasers
22:13 jnthn Right
22:14 jnthn The overall design of spesh is that its effects - besides speed increases and allocation decreases - are not meant to be otherwise observable.
22:15 dalek rakudo/newio: 9034557 | lizmat++ | src/core/ (6 files):
22:15 dalek rakudo/newio: Kill the Type(Any) coercion meme
22:15 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/903455724f
22:15 dalek rakudo/newio: a9e5ae7 | lizmat++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
22:15 dalek rakudo/newio: Fix my Role $foo .= new, jnthn++ for actual code
22:15 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/a9e5ae7a7a
22:15 dalek rakudo/newio: 1b74e4e | FROGGS++ | src/Perl6/Actions.nqp:
22:15 dalek rakudo/newio: do not add inlining info to block with phasers
22:15 dalek rakudo/newio:
22:15 dalek rakudo/newio: When we inline these blocks we inline away said phasers. This showed up when applying trait
22:15 dalek rakudo/newio: "is DEPRECATED" to subroutines for example. lizmat++ and jnthn++ for successful collab :o)
22:15 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/1b74e4ee15
22:15 dalek rakudo/newio: 6b353b4 | lizmat++ | src/ (7 files):
22:15 dalek rakudo/newio: Merge branch 'nom' into newio
22:15 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/6b353b4da1
22:15 jnthn And it can care about preserving VM interface level semantics.
22:19 dalek rakudo/cpp: 04178ab | FROGGS++ | lib/NativeCall.pm:
22:19 dalek rakudo/cpp: only mangle symbols before making the call
22:19 dalek rakudo/cpp: review: https://github.com/rakudo/rakudo/commit/04178abf10
22:24 raydiak < FROGGS jnthn lizmat >»++
22:29 raydiak r: role R { method foo () handles <bar> { } } # [BUG]? any reason we shouldn't be able to delegate to a method in a role?
22:29 camelia rakudo-moar 1b74e4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Method 'add_method' not found for invocant of class 'Perl6::Metamodel::GenericHOW'␤at /tmp/tmpfile:1␤------> ␤»
22:36 dalek roast: f3b7e45 | lizmat++ | S12-construction/autopairs.t:
22:36 dalek roast: Unfudge now passing my Role $r .= new tests
22:36 dalek roast: review: https://github.com/perl6/roast/commit/f3b7e45c38
22:38 J-L Is there a Perl6 equivalent to Perl5's alarm() ?
22:39 J-L Also, what is the best way to get the last element of an array?  In Perl5 I could do $a[-1], but in Perl6 what should I do?  @a[@a.end] ?
22:40 geekosaur *-1
22:41 geekosaur that is, @a[*-1] is the last element
22:41 geekosaur in general things like magic negatives have been replaced with the whatever star, to avoid program bugs when an index buggily gets decremented past 0
22:42 J-L Thanks, geekosaur.  Is there a web page that teaches that specifically?  If so, I'd like to learn whatever else it teaches.
22:42 geekosaur you are in effect declaring that you intend to access from the end
22:42 lizmat hmmm... looks like we borked the jvm build
22:42 * lizmat sneaks away to get some sleep&
22:45 geekosaur not sure, beyond the synopses at design.perl6.org (specifically "The Whatever Object" and following sections in https://raw.githubusercontent.com/perl6/specs/master/S02-bits.pod for this)
22:48 telex joined #perl6
22:51 * donaldh is dissecting the jvm build
22:53 raydiak J-L: as an overview of what is going on there, the * is a Whatever, which you're likely reading about...using * in most expressions will give a little closure/anonymous sub we call a WhateverCode, which takes an arg for the * and returns the result of the expression...so "*-1" is kinda like "sub ($v) { $v-1 }"
22:54 raydiak J-L: now the other part of the magic is that when you pass a callable thing like a sub or a WhateverCode to an array subscript, it gets passed the .elems of the array and uses the result as the (non-negative) index
22:55 raydiak J-L: so in effect @a[*-1] is the same as @a[@a.elems-1] (nearly the same as your original question's example), just a much, much nicer way to write it :)
22:57 raydiak and dare I say, both far more expressive and functional than just saying "negative subscripts count backwards from the end"
22:57 J-L raydiak:  Yes, much nicer.  Thanks.
22:57 J-L Here's a new question:  Is that a page that can explain how to use pack() and unpack() in Perl6?
22:58 cognominal joined #perl6
23:00 raydiak eh, not so much...the quality of the barely-existant un/pack docs are about on par with the implementation, unfortunately, from what I've heard
23:00 mule joined #perl6
23:02 J-L How are they different?  (the pack/unpack between Perl5 and Perl6)  I ask because I'm porting some code over from Perl 5 to Perl 6 and I still have to convert the pack() code over.
23:04 J-L I need a Perl 6 equivalent for Perl5's:  split(m//, $string)
23:04 raydiak well, P5 un/pack is featureful and mature, while ours is at some indeterminate point of development as I understand it...idk how much of it works or not, and if anything has been changed
23:04 b2gills I'm not sure that the details of how pack will work in Perl 6 have been completely nailed down yet
23:05 raydiak r: "foo".comb.perl.say # J-L: P6 version of split //
23:05 camelia rakudo-moar 1b74e4: OUTPUT«("f", "o", "o").list␤»
23:07 b2gills more generally $string.comb(/./)
23:07 laouji joined #perl6
23:09 J-L TOoh!  comb() looks nice!  Thanks!
23:10 raydiak yer welcome :)  wrt alarm(), I'm pretty sure we don't have it in lieu of higher-level timing and async stuff like Promise.in()...could get at it w/NativeCall if you really wanted but then you have to make it work on both posix and windows again
23:10 J-L Okay, here's one that's stumping me:  In Perl5, I could do:  $c ^= $n;  But in Perl6, when I try:  $c +^= $n; I seem to get a one(...) object (something I'm not familiar with).
23:11 timotimo hm, can you try [+^]= ?
23:11 J-L raydiak:  Actually, I was asking about alarm() simply because I wanted to use a Promise, but reading from STDIN in a Promise is a bug in Windows Raduko.
23:12 timotimo it is?
23:12 timotimo what does it lead to?
23:12 timotimo because moarvm does lock its I/O objects
23:13 J-L Oops... 2 things:  1) [+^]= works fine.  2) +^= also works fine.  I made a previous mistake and didn't undo it before testing +^=, so it carried over.
23:15 J-L Is there a Perl6 equivalent to Perl5's __END__ ?
23:15 timotimo oooh
23:15 timotimo what exactly do you want to do with it?
23:15 timotimo there's =begin end, or =finish
23:15 timotimo one of the two
23:18 J-L I like to mark the end of my file with __END__.  Makes it easier to copy and paste into a post and back.
23:19 J-L If I have a string with arbitrary binary data and I want to get its length (as number of bytes), how do I do that?
23:20 raydiak you'd be better off using a Buf (which has .bytes iirc) instead of a Str
23:20 J-L Not only that, but with __END__ I can put additional information promised at the top of my script.  Especially long amounts of data that might be useful in the future.
23:20 raydiak you can convert a Str to a Buf using .encode
23:24 raydiak the separation is basically there b/c you can't meaningfully talk about characters in a Buf/Blob or bytes in a Str and so forth without carefully considering encoding...is the source of a lot of subtle unicode bugs
23:25 raydiak I think Pod blocks are supposed to supplant __END__ but idk much about them myself
23:28 dalek nqp/js: db1a1c1 | (Pawel Murias)++ | t/nqp/95-cclass.t:
23:28 dalek nqp/js: Rescue issclass tests from the nqp-jvm repo
23:28 dalek nqp/js: review: https://github.com/perl6/nqp/commit/db1a1c1ddd
23:28 dalek nqp/js: da1949a | (Pawel Murias)++ | / (4 files):
23:28 dalek nqp/js: Pass test 95.
23:28 dalek nqp/js:
23:28 dalek nqp/js: Implement nqp::isclass, nqp::findcclass, nqp::findnotcclass.
23:28 dalek nqp/js: review: https://github.com/perl6/nqp/commit/da1949a535
23:28 dalek nqp/js: fc5f19a | (Pawel Murias)++ | TODO:
23:28 dalek nqp/js: Remove done item from TODO.
23:28 dalek nqp/js: review: https://github.com/perl6/nqp/commit/fc5f19a765
23:30 raydiak wrt Promise on windows, a Promise.in doesn't introduce async into your own code, just like a signal handler actually doesn't...so if you were going to solve your problem by stuffing code in a signal handler, I'd think you could just as easily say «my $p = Promise.in($wait); until $p { say "waiting and doing stuff" }; say "done waiting";»
23:30 vendethiel pmurias++
23:30 raydiak which, isn't as pretty as we'd like, but workarounds are seldom pretty :)
23:39 Possum joined #perl6
23:40 J-L In Perl5, I often dealt with binary data by reading it to a string, manipulating it, and writing it out to file.  In fact, I could compose a binary string with $string.=chr($num) which would append a byte of value $num to $string.
23:41 J-L But now in Perl6, that doesn't seem to work; I'll append 300*500 chr()s, only to find out that when I call $string.encode.bytes that I get 587200.
23:42 raydiak you can do all the same things with Buf...it even does Stringy
23:42 raydiak if you aren't really working with strings, you really don't want to use real strings
23:43 raydiak in this case, .encode uses utf8 by default, so depending on what your chr()s actually are, .encode could produce a number of bytes != 1 for 1 char
23:44 jercos Can you append to a Buf?
23:44 raydiak they are variable in length, yes
23:44 raydiak m: my $b = Buf[uint8].new; $b[4] = 255; say @$b;
23:44 camelia rakudo-moar 1b74e4: OUTPUT«0 0 0 0 255␤»
23:45 Ben_Goldberg joined #perl6
23:45 raydiak or $b[*-1] if you like :)
23:46 jercos Hrm...
23:46 jercos m: my $b = Buf.new(1, 2, 3);$b[*] = 4;say $b
23:46 camelia rakudo-moar 1b74e4: OUTPUT«This type cannot unbox to a native integer␤  in method STORE at src/gen/m-CORE.setting:9007␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:3405␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:3487␤  in block <unit> at /tmp/YjJXLjXNbA…»
23:46 raydiak you *can* treat it directly *as* a string too, but I haven't used them that way, separating strings and binary was really brilliant and I'm going along with it :)
23:47 raydiak +* or *-0 or so should work
23:47 jercos m: my $b = Buf.new(1, 2, 3);$b[+*] = 4;say $b
23:47 camelia rakudo-moar 1b74e4: OUTPUT«Buf:0x<01 02 03 04>␤»
23:47 jercos there we go
23:47 raydiak b/c * by itself makes a whatever instead of a whatevercode, which gives you all elems
23:47 TimToady and you can append to a buf with ~=
23:47 TimToady I had an example doing that earlier today
23:47 jercos m: my $b = Buf.new(1, 2, 3);$b ~= Buf.new(4);say $b
23:47 camelia rakudo-moar 1b74e4: OUTPUT«Buf:0x<01 02 03 04>␤»
23:48 TimToady http://irclog.perlgeek.de/perl6/2015-03-06#i_10236360
23:49 raydiak m: my $b = Buf.new; $b ~= "a"; say $b.decode
23:49 camelia rakudo-moar 1b74e4: OUTPUT«Cannot use a Buf as a string, but you called the Stringy method on it␤  in method Stringy at src/gen/m-CORE.setting:6449␤  in sub infix:<~> at src/gen/m-CORE.setting:1582␤  in block <unit> at /tmp/2tvKVvpjLn:1␤␤»
23:49 raydiak m: my $b = Buf.new; $b ~= 50; say $b.decode
23:49 camelia rakudo-moar 1b74e4: OUTPUT«Cannot use a Buf as a string, but you called the Stringy method on it␤  in method Stringy at src/gen/m-CORE.setting:6449␤  in sub infix:<~> at src/gen/m-CORE.setting:1582␤  in block <unit> at /tmp/D45c5nHbP2:1␤␤»
23:50 raydiak m: my $b = Buf.new; $b ~= $*IN.read(1); say $b.decode
23:50 camelia rakudo-moar 1b74e4: OUTPUT«C␤»
23:50 J-L I want to write this Buf[uint8] to a file.  Can I just write it out as if it were a Str?
23:50 raydiak J-L: yes
23:50 jercos J-L: you can write it out as if it were a buf ;)
23:51 donaldh Well that's tricky. The fix for nqp::index on JVM that lets rakudo work at all on JVM also means we produce a different compiler that fails a lot of spectests on JVM.
23:52 donaldh And my laptop battery is now flat, finding that out.
23:52 J-L How do I append to a Buf?  I mean, I can use array subscripting ([ ]), but then I have to use an index.
23:52 donaldh r: Buf.^methods
23:52 camelia rakudo-moar 1b74e4: ( no output )
23:52 donaldh r: Buf.^methods.say
23:52 camelia rakudo-moar 1b74e4: OUTPUT«␤»
23:53 raydiak J-L: check the backlog like 10 or 20 lines up :)
23:54 retupmoca m: my $b = pack("n", 123); $b ~= pack("n", 456); say $b; say $b.unpack("nn") # small pack/unpack example
23:54 camelia rakudo-moar 1b74e4: OUTPUT«Buf:0x<00 7b 01 c8>␤123 456␤»
23:54 skids joined #perl6
23:55 J-L When I say:  my $b = Buf[uint8].new; $b ~= chr(66);
23:55 J-L I get:  Cannot use a Buf as a string, but you called the Stringy method on it
23:55 retupmoca m: my $b = buf8.new; $b[+*] = 66; say $b;
23:55 camelia rakudo-moar 1b74e4: OUTPUT«Buf[uint8]:0x<42>␤»
23:56 jercos m: my $b = Buf.new(74,97,80,104); $b ~= Buf.new(10); $*OUT.write: $b
23:56 camelia rakudo-moar 1b74e4: OUTPUT«JaPh␤»
23:56 raydiak m: $*IN.read(1).perl.say
23:56 camelia rakudo-moar 1b74e4: OUTPUT«Buf[uint8].new(67)␤»
23:57 raydiak r: my $b = Buf.new: ^4; say $b ~ Buf.new: 4,5,6
23:57 camelia rakudo-moar 1b74e4: OUTPUT«Buf:0x<00 01 02 03 04 05 06>␤»
23:59 eli-se omg my compiler works
23:59 timotimo \o/

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

Perl 6 | Reference Documentation | Rakudo