Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-09-24

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:07 dayangkun joined #perl6
00:10 rulker left #perl6
00:27 zby_home__ joined #perl6
00:39 soh_cah_toa joined #perl6
00:40 frhodes joined #perl6
00:46 frhodes joined #perl6
00:48 jerome_ joined #perl6
01:09 alvis joined #perl6
01:25 jaldhar joined #perl6
01:28 uasi joined #perl6
01:30 sorear mberends: ping
01:31 perlygatekeeper joined #perl6
01:47 djanatyn joined #perl6
01:51 mtk joined #perl6
02:17 uasi joined #perl6
02:20 envi joined #perl6
02:21 cotto joined #perl6
02:21 athomason joined #perl6
02:40 lue joined #perl6
03:03 shinobicl_ joined #perl6
03:04 cognominal_ joined #perl6
03:06 mkramer1 joined #perl6
03:06 y3llow_ joined #perl6
03:06 pothos_ joined #perl6
03:08 kcwu joined #perl6
03:09 stepnem joined #perl6
03:09 Woodi joined #perl6
03:09 Lorn joined #perl6
03:09 Lorn joined #perl6
03:10 cxreg joined #perl6
03:10 cosimo joined #perl6
03:10 flussence joined #perl6
03:10 kshannon joined #perl6
03:13 frhodes joined #perl6
03:13 Helios joined #perl6
03:13 perlygatekeeper joined #perl6
03:20 Vlavv_ joined #perl6
03:20 lue joined #perl6
03:20 yves_ joined #perl6
03:23 dukeleto joined #perl6
03:23 takesako joined #perl6
03:25 PacoLinux joined #perl6
03:31 packetknife joined #perl6
03:33 awwaiid joined #perl6
03:40 lumi_ joined #perl6
04:26 woosley joined #perl6
04:26 am0c joined #perl6
04:30 am0c joined #perl6
04:32 kaare_ joined #perl6
04:33 am0c joined #perl6
05:13 ruoso joined #perl6
05:18 REPLeffect joined #perl6
05:37 woosley joined #perl6
05:42 mberends sorear: pong
05:44 ponbiki joined #perl6
05:52 Exodist joined #perl6
05:54 sorear mberends: I am wondering if we should implement a stopgap solution to #56 for v10
05:56 mberends sorear: yes, any solution would be helpful. We could still track the issue as not fully resulved, and suggest applications do so too.
05:59 mberends sorear: what do you think is the reason interface implementations cannot be called?  They are still methods. Could it be only sometimes, for example when they are implemented in a parent class?
06:00 sorear mberends: are you familiar with the C#/CLR concept of "explicit interface implementations"?
06:01 mberends sorear: no, I'll read up on that. I understand explicit in some other contexts.
06:01 sorear in the CLR, methods that implement an interface slot don't have to be public
06:02 sorear there are two ways to implement the IDisposable interface in C#
06:03 sorear way 1: public void Dispose() { ... } - creates public method named Dispose
06:03 sorear way 2: void IDisposable.Dispose() { ... } - creates private method named <gensym>
06:03 sorear the CLR doesn't rely on names for interface mapping; classes have an explicit slot/method table
06:04 sorear way 2 is very useful if two interfaces require different semantics for the same method name
06:04 mberends I see, and Gtk uses way 2.
06:04 sorear it's also nice for the API if you think "Dispose" is a bad method name for your class
06:05 sorear the .net coding standards say any functionality should be available via some public method
06:06 sorear the approach Niecza is currently using (reflect on the object's concrete type and bind public methods) is functionally the same as what DLR languages (IPy/IronRuby) do
06:07 mberends the freedom to rename .Dispose() seems like one of those dubious nice-to-haves that leads to confusion.
06:07 sorear mberends: you have a Gtk.Gc, correct?
06:08 sorear no
06:08 sorear couldn't be
06:08 mberends sorear: gtk-sharp probably wraps Gtk.Gc
06:10 sorear it's a Cairo.Context
06:11 sorear apparently, Cairo.Context has _no_ public method that calls Dispose functionality
06:11 * sorear found the source
06:12 sorear OTOH, the finalizer does call it.  So the memory leak is not likely to be _destructively bad_
06:12 mberends Cairo is provided through gdk-sharp instead of gtk-sharp, very similar to use.
06:13 mberends yes, the finalizer is the source of the warning message that says "the programmer" forgot to call Dispose.
06:17 mberends sorear: would your hack be along the lines of: "the reflection API denies that .Dispose exists, but let's call it anyway" ?
06:18 mberends no, if it's private, it shouldn't be callable either.
06:18 REPLeffect joined #perl6
06:19 sorear mberends: my hack would be along the lines of adding a .dispose-hack method to CLR::System::Object which does the equivalent of ((IDisposable)obj).Dispose()
06:20 sorear mberends: my real fix would be to implement $obj.Class::method() syntax in general for Perl 6 code, and reflect interfaces as roles, allowing you to do $obj.IDisposable::Dispose
06:20 sorear the real fix, however, cannot be commuted with /serialize
06:23 mberends sorear: I understand. Strapping the fix on to Object is very global, thus brings the risk of .Dispose() being called inappropriately, but that's caveat utilitor.
06:24 mberends I'd argue against the hack if it implies performance degradation.
06:25 sorear nah
06:26 sorear there are already a handful of Object-strapons
06:26 sorear of course I'd like to get rid of .dispose-hack ASAP :)
06:26 mberends sorear: the /serialize refactor is a much higher priority. Thus anything incompatible with /serialize should not even be considered.
06:27 dalek niecza/serialize: 6d3b702 | sorear++ | / (4 files):
06:27 dalek niecza/serialize: Lookup variables in new model, can now handle some very simple variable uses
06:27 dalek niecza/serialize: review: https://github.com/sorear/niecza/commit/6d3b702f5c
06:34 dalek niecza: f30bd36 | sorear++ | lib/NieczaCLR.cs:
06:34 dalek niecza: Add stopgap .dispose-hack method for mberends++ GTK work
06:34 dalek niecza: review: https://github.com/sorear/niecza/commit/f30bd36115
06:35 mberends wow, such a quick turnaround! sorear++
06:47 mberends but: Unable to resolve method Dispose in class CLR::Cairo::Context :-(
06:50 sorear mberends: .dispose-hack
06:50 mberends sorear++: better name
06:51 sorear niecza: say { a => True }.any.perl
06:51 p6eval niecza v9-41-gbb5a7c3: OUTPUT«any("a", )␤»
06:52 sorear niecza: any("a").perl
06:52 p6eval niecza v9-41-gbb5a7c3:  ( no output )
06:52 sorear niecza: say any("a").perl
06:52 p6eval niecza v9-41-gbb5a7c3: OUTPUT«any("a", )␤»
06:55 dalek niecza: ed11042 | sorear++ | test.pl:
06:55 dalek niecza: Make test forgiving of Junction.perl format
06:55 dalek niecza: review: https://github.com/sorear/niecza/commit/ed11042de0
07:08 woosley joined #perl6
07:17 mberends sorear: another CLR Interop problem is inability to convert Num parameters to System.Double.  Shall I create a Github issue for this?
07:17 drbean joined #perl6
07:18 sorear what?
07:19 sorear huh.
07:20 sorear ...oops
07:20 sorear the code to marshal Num objects is under a when(Integral) condition :|
07:20 mberends in niecza/examples/gtk-clock.pl:32, passing Num (fractional) parameters in SetSourceRGB(0, 1, 1) fails. Thus we have 3-bit color.
07:20 sorear I knew I implemented it!
07:21 mberends you had said so, yes!
07:21 donri joined #perl6
07:22 mberends sorear: ok, I can fix a when()
07:22 sorear er, wait, not quite.
07:22 * mberends waits
07:25 Woodi hallo #perl6.ppls :)
07:25 mberends hallo Woodi
07:34 flatwhatson joined #perl6
07:38 sorear hello Woodi
07:38 ruoso joined #perl6
07:38 mikemol joined #perl6
07:41 drbean joined #perl6
07:44 Woodi what it can be: Can only use repr_get_attr_obj on a SixModelObject ?
07:45 Woodi i use field.hash.keys in for loop and this bumps
07:50 sorear That's an internal error and you should not be able to get it, unless you're doing improper things with pir::
07:51 sorear Somehow, an expression has evaluated to something other than a Rakudo object
07:55 [particle] joined #perl6
07:56 dalek niecza: 3896bb2 | sorear++ | lib/NieczaCLR.cs:
07:56 dalek niecza: Implement marshalling for Num and Rat
07:56 dalek niecza: review: https://github.com/sorear/niecza/commit/3896bb2a47
07:56 sorear I got carried away implementing exact Rat->decimal coercion
07:57 mberends ooh! sorear++ again :)
07:57 masak joined #perl6
07:57 masak goedemorgen, #perl6.
07:58 sorear niecza> 123456789123456789 / 10**20
07:58 sorear 0.00123456789123457
07:58 sorear niecza> CLR::System::Decimal.marshal(FatRat.new(123456789123456789, 10**20))
07:58 sorear 0.00123456789123456789
07:59 sorear o/ masak
08:00 mberends god morgon masak # thanks http://www.howtosayin.com
08:02 masak :)
08:03 * masak conducts a structured attack on pack/unpack
08:07 xinming_ joined #perl6
08:11 mberends Gtk clock looks less 1983 without its cyan background :)
08:13 sorear mm 1983
08:14 masak I was two. I didn't know the word "cyan" :)
08:14 sorear I was -7
08:14 masak :P
08:19 mberends the lo-res lo-color picture of the CGA display was so limited. It could barely resolve an 80x25 text screen with 16 colors. Consequently cyan and magenta represent "primitive color" in the memories of many oldies.
08:25 Woodi perl6: class A { has $!a; method !b() { $!a = 'internal'  }; method c() { say self!b() } }; my $c = A.new; $c.c()
08:26 p6eval rakudo 09a598, niecza v9-43-ged11042: OUTPUT«internal␤»
08:26 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "{"␤    expecting operator, ":", "," or "}"␤    at /tmp/0HNIg2IhFX line 1, column 32␤»
08:26 Woodi mberends: why i must say self!method and no such restrictions for fields ?
08:27 Woodi i do not mean to add restriction for field access :)
08:28 Woodi mberends: definetly, 16 colors is enough for everyone :) and i realy like old, green 80x25 displays :)
08:28 mberends Woodi: as I understand it, fields are private but they can have public accessors with the . twigil or not public access with the ! twigil.
08:29 sorear Woodi: cga had 4 colors when in bitmapped mode
08:29 Woodi grean alone + bold, lighten and underline is enought :)
08:30 MayDaniel joined #perl6
08:30 Woodi mberends: i prefer to access methods with [.!]method inside class definition, like fields
08:31 Woodi /bold/dimish/ :)
08:31 mberends the only CGA colors in bitmapped mode were black, magenta, cyan and white. Red, green, blue, yellow etc were not even available.
08:31 sorear mberends: I thought you could at least change the palette (slightly)
08:32 Woodi sorear: it was hardware limitation probably
08:33 mberends sorear: I think VGA (not even EGA) added those hardware capabilities (palette).
08:33 moritz you could turn the display a bit brighter :-)
08:34 mberends moritz seems a bit brighter this morning :)
08:34 sorear mberends: my recollection was: CGA = 4 out of <=16; EGA = 16 out of 64; VGA = 256 out of 64^3
08:35 sorear mberends: the earlier models had a small fixed pallet and an even smaller variable one
08:35 masak mberends: no, CGA allowed you 4 colors, but there were two palettes. this went even for non-EGA-capable hardware.
08:36 masak the unusual palette (the one you could switch to) was black, red, green, yellow.
08:36 cognominal joined #perl6
08:40 sorear Do I want to fix 14/163 failing test files before v10?  Most of them probably just need refudging after nom work
08:41 mberends naah
08:41 sorear then I guess it is time to start writing announce.v10
08:42 * sorear is currently struggling to figure out some kind of failure to initialize variables
08:47 Woodi Google will eat us one day
08:48 mj41 joined #perl6
08:48 Woodi maybe goverments should regulate moving user profiles betwin 'internet entities' in some way ? :) and how much it will cost us ? :)
08:49 dalek niecza/serialize: 7d57dc4 | sorear++ | lib/ (2 files):
08:49 dalek niecza/serialize: WIP protopad generation
08:49 dalek niecza/serialize: review: https://github.com/sorear/niecza/commit/7d57dc41d0
08:49 sorear I give up for now
08:49 * sorear sleep
08:49 Woodi gn sorear
08:49 mberends gn sorear
08:50 mberends Woodi: thinking that way is a good start to prevent it from happening. I consciously use Google very little.
08:53 Woodi for now i prefer google over MS :)
08:54 Woodi and there no real alternatives probably
08:54 mberends I prefer whoever is not the apparent monopolist
08:55 mberends monopolists become bullies. they can't help it.
08:55 * Woodi wish bookmark synchronization plugin with option to store on server of choice not plugin-developer-company...
08:55 Woodi there was LDAP support in Netscape 4.x :)
08:58 * Woodi can donate a bit for such LDAP plugin in FF :)
08:58 * mberends can donate a byte
08:58 Woodi mberends: you understand mozilla internals ? :)
08:59 mberends Woodi: good gracious no! don't want to either! I was... joking ;)
09:00 Woodi patches counts :) becouse it should be opensource ofc :)
09:02 mberends Woodi: if Niecza or Rakudo can do it, I'd rather write a custom web browser in Perl 6, just for the yak shave. I wonder if Niecza CLR Interop covers networking already?
09:05 Woodi thats remembered me something
09:05 moritz mberends: if I were to write a web browser, I'd base it on uzbl
09:05 moritz that allows one to implement browser functionality by communicating to a process with pipes or sockets
09:06 Woodi it would be nice to have perl6 modules implementing misc standards, eg HTTP, HTML, CSS... just parsers of standard
09:08 * moritz thinks that HTTP headers shouldn't be hard to parse
09:08 mberends moritz: thanks, more to read :) Sounds a bit like using netcat to make a webserver though, only a desperado would do that. Er.
09:09 Woodi i think monolitic CGI.pm was one of reasons ppls shitch to PHP so fast
09:09 daniel-s joined #perl6
09:12 dalek niecza: 9fccf74 | mberends++ | examples/gtk- (2 files):
09:12 dalek niecza: [examples] update clock and sierpinski with CLR interop improvements
09:12 dalek niecza: review: https://github.com/sorear/niecza/commit/9fccf74dee
09:12 huf Woodi: what do you mean? php *is* a monolithic CGI.pm
09:15 Woodi huf: probably. but development of web pages was from start different
09:16 Woodi and installation on web serwer :)
09:16 huf i think that was the real deal with php, the ease of deployment and config, especially for 10-minute hacks
09:17 Woodi so if CGI::Protocol module, CGI::HTML things could go another way
09:17 Woodi teknology for grandmas often wins :)
09:18 Woodi on the other hand it is Java replacing COBOL - becouse of business domain 'modules'...
09:20 Woodi business quality/warranty
09:20 Woodi COBOL *is not* dead...
09:21 Woodi so Java is new COBOL for 2080 :)
09:23 * moritz thinks that the future of webserver interaction is with Plack and similar techniques
09:24 Woodi ok, its all about 'developers' or screensavers-like count and variety :)
09:24 Woodi right, midleware for big installations is livesaving :)
09:26 Woodi so 'a ? b : c' syntax is now 'a ?? b !! c' ?  #half hour digresion :)
09:28 masak Woodi: aye.
09:28 Woodi thx :)
09:28 masak Woodi: anything we could've done to bring this information to you faster? :)
09:29 moritz std: 1 ? 2 : 3
09:29 p6eval std c22b2ee: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of ?: for the conditional operator; in Perl 6 please use ??!! at /tmp/NqDFT2Y7eF line 1:�------> [32m1 ?[33m�[31m 2 : 3[0m�Parse failed�FAILED 00:01 119m�»
09:29 moritz rakudo: 1 ? 2 : 3
09:29 p6eval rakudo 09a598: OUTPUT«===SORRY!===␤Unsupported use of ?: for the conditional operator; in Perl 6 please use ??!! at line 1, near " 2 : 3"␤»
09:29 Woodi masak: yes ! you can :)
09:29 moritz well, rakudo even tells you :-)
09:29 packetknife joined #perl6
09:30 Woodi cannot find ??!! nor in S04 nor p5-to-p6 documentation :)
09:30 masak Woodi: S03
09:31 masak Woodi: why were you compelled to look in S04?
09:31 Woodi but i program in vim not irssi yet :)
09:31 Woodi becouse 'if' defined there
09:31 masak lol @ https://twitter.com/flyosity/status/117262301123461120
09:32 moritz Woodi: http://perlgeek.de/en/article/5-to-6#post_11
09:32 moritz # ternary, conditional op $a == $b ?? 2 * $a !! $b - $a
09:33 Woodi ah, it's operator ! :>
09:34 moritz it even says "operator" in the error message :-)
09:35 Woodi ok, ok. but i was using only memories and vim... sory !!!
09:35 Woodi and domumentation about blocks :)
09:37 masak is it a coincidence that Best Practical has a logotype that is also a Perl 6 (meta)operator? http://bestpractical.com/images/bpslogo.png
09:37 masak also, I can't think of a real use for this particular operator.
09:37 masak when would I want to any() together two lists (or deeper structures) pairwise?
09:40 im2ee joined #perl6
09:41 moritz my $index = ('a'..'z' »|« 'A'..'Z').pairs.grep( *.value eq $char).key
09:41 moritz just a wee bit contrieved :-)
09:43 dalek niecza: 16ef0c8 | (Paweł Murias)++ | lib/ (2 files):
09:43 dalek niecza: cleanup the perl5 interpreter in Perl5Interpreter destructor
09:43 dalek niecza: review: https://github.com/sorear/niecza/commit/16ef0c8156
09:43 moritz ronja tries to eat my round tuit
09:43 masak anyway, it's a nice symbol.
09:43 masak the »|« I mean, not the round tuit.
09:44 moritz aye :-)
09:44 masak moritz: sounds dangerous. a baby could choke on a thing like that. :/
09:45 moritz masak: it's too big for that
09:47 im2ee Hi! :)
09:47 moritz hello im2ee
09:47 masak im2ee! \o/
09:48 im2ee Today is perl6's day :)
09:48 masak im2ee: let's create something great today!
09:48 im2ee I going to do a lof of exercises :)
09:48 * moritz wonders what we should do about rakudo release
09:48 im2ee I'm*
09:49 masak moritz: I'm simultaneously hopeful and dejected about recent Rakudo progress.
09:49 im2ee masak, i will! :)
09:49 masak moritz: we're making nice headway in a lot of areas. stalling in others.
09:49 moritz agreed
09:49 masak im2ee: ok, here's a deal: you publish the experiments you do with Perl 6, and I will review and comment on them :)
09:50 masak im2ee: I'm also a bit interested in porting GGE to nom and providing an API for the construct-all-possible-strings-from-regex thing.
09:51 moritz you can even run your experiments here with p6eval if you paste them to gist.github.com
09:52 masak moritz: if pmichaud doesn't show up to un-stuck us soon, we have something like three options: (1) slip, (2) release without pmichaud's bits, or (3) collectively emulate pmichaud and do his stuff.
09:52 masak (3) is either very very hard or impossible.
09:53 * mberends votes (1) slip
09:53 masak (and (3) is exactly what Terry Brooks tells you not to attempt)
09:53 masak I'm fine with slipping.
09:54 moritz well, I'm willing to wait until tomorrow at least
09:54 masak +1
09:54 moritz in the medium term, we should try to increase the bus number on regex stuff though
09:55 moritz but it's very hard to do that in the current stage, since pmichaud seems to have rather detailed plans on how to move forward
09:55 masak I'm extremely fine with him having that.
09:55 masak seems these things are best designed by ~1 designer.
09:56 moritz sure, my point is that we don't have that plan
09:56 masak and pmichaud has a fine grip on regular expressions.
09:56 moritz so it's hard to help
09:56 masak moritz: right. that's my point as well.
09:56 masak as far as I know, the intermediate result haven't been published anywhere.
09:56 mberends I'm interested in trying to port QRegex to 6model/c, for understanding too. I have no idea where or when to begin.
09:57 masak all I know is from private conversation during YAPC::EU.
09:59 wamba joined #perl6
10:07 whiteknight joined #perl6
10:29 baest joined #perl6
10:29 whiteknight joined #perl6
10:34 tadzik good morning #perl6
10:34 mberends hi tadzik
10:35 im2ee masak, great! :) Thank You:)
10:37 masak tadzik! \o/
10:37 jnthn *yawn*
10:38 tadzik oh, masak, I finally got my head around the blackboard vs whiteboard case
10:38 tadzik and I came to a conclusion, that what I really need, is a Giant Etch-A-Sketch :)
10:38 tadzik (after playing with it in my sisters' house)
10:38 tadzik erm, sister's
10:45 arnsholt tadzik: OOC why is an etch-a-sketch the superior choice?
10:45 jnthn masak, moritz: The NFA code that pmichaud was working on during YAPC::EU is at https://github.com/perl6/nqp/commits/nfa
10:46 tadzik arnsholt: because the pens are free, and tidying is easy
10:47 arnsholt Excellent points. Especialy the cleaning =)
10:47 tadzik yep :)
10:48 masak tadzik: *lol*
10:49 * moritz likes whiteboards
10:49 * masak likes blackboards
10:52 * tadzik likes etchasketches
10:56 espadrine joined #perl6
10:57 masak I don't think we'll reach a consensus anytime soon.
10:57 * moritz doesn't think consensus is necessary
10:59 masak to whom it may concern: https://gist.github.com/1239203 (A first approach to pack/unpack in Perl 6)
10:59 * moritz feels concerned :-)
10:59 masak :P
11:01 moritz masak: for A I would allow Bufs, and space-pad them by counting bytes
11:02 masak moritz: ok, makes sense.
11:03 masak so the only difference between a and A is the space-padding?
11:03 moritz yes
11:04 moritz uuencode encodes bytes iirc
11:04 moritz so rather a Buf
11:04 masak oki.
11:04 masak fixed.
11:06 moritz didn't you do all that work for GSOC too? :-)
11:07 masak I started in on it.
11:08 masak I don't recall making this wide an approach. was more a little at a time.
11:08 masak also, I still have some vague dreams about auto-translating the 17k pack/unpack tests from Perl 5.
11:09 masak but it kind of depends on a solid understanding of the issues brought up in the gist.
11:09 moritz masak: the last three days of Buf recreated about two thirds of your gsoc work on buf, with lots of hindsight and better tools/foundations :-)
11:10 moritz s/Buf/Buf work/
11:10 moritz most notably it wraps ByteBuffer, which didn't exist then (or was just being created, and not as powerful)
11:11 masak it was just being created back then.
11:11 masak a classical case of "HLL needs something, let's build it for them".
11:11 am0c joined #perl6
11:11 SHODAN joined #perl6
11:11 masak I'm very happy there's now a second iteration taking advantage of that. thanks moritz for spearheading that effort.
11:11 masak &
11:12 moritz masak: and I'm very happy the first iteration existed
11:17 mberends masak: some of the pack rules define precisely what the packed data should be, and implementing them will probably work fine. Other rules depend on particular Perl 6 implementations and should probably be dropped from the spec. For example j, J, f, d, F, D, p, P. They would be non-portable by definition.
11:18 jnthn mberends: I'm going to have to do the nqpclr porting of QRegex at some point in the not too distant future, so maybe that will help clarify things for your c one :)
11:19 mberends jnthn: aye :)
11:23 mberends masak: what a Perl 6 pack spec needs in the place of Perl 5's native types (meaning C types) is a lossless serialization format for each of Perl 6's data types such as Int, Rat and Num.
11:24 * moritz not sure
11:25 moritz afaict pack fills the niche of giving one a byte stream in a specific format
11:25 moritz if you want to serialize, use Storable instead
11:25 mberends masak: those Perl 6 data serialization formats need to be canonical, so that Rakudo and Niecza can read/write each other's data.
11:26 mberends moritz: ok, in that case those Perl 5 style rules should simply be dropped.
11:35 masak I'm all for dropping them.
11:35 masak that's the conservative thing to do.
11:35 masak error message could be "contact us if you have a sensible idea of what this should do" :P
11:35 moritz +2
11:36 tadzik :P
11:36 Psyche^ joined #perl6
11:36 tadzik oh, do not worry. They *will* contact us...
11:50 Chillance joined #perl6
11:51 moritz nqp: say("\c[0]")
11:51 p6eval nqp: OUTPUT«␀␤»
11:51 moritz nqp: say("a" xx 2)
11:51 p6eval nqp: OUTPUT«Confused at line 1, near "say(\"a\" xx"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23698 (src/stage2/gen/NQPHLL.pir:6757) (src/stage2/gen/NQPHLL.pm:329)␤»
11:54 mj41 joined #perl6
11:54 masak siggie DSL.
11:54 masak no, wait. that's a capture ;)
11:54 masak probably xx NI, then.
11:54 masak nqp: "a" xx 2
11:54 p6eval nqp: OUTPUT«Confused at line 1, near "\"a\" xx 2"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23698 (src/stage2/gen/NQPHLL.pir:6757) (src/stage2/gen/NQPHLL.pm:329)␤»
11:54 masak yup.
11:54 jnthn NQP doesn't have xx, as far as I know.
11:54 colomon moritz: we probably should be supporting IEEE floating point format, in both little-endian and big-endian, in addition to "internal" format (which is just going to be IEEE for virtually every platform, I think)
11:54 moritz seems like :-)
11:54 tadzik I don't see why it should
11:55 moritz tadzik: because I just had an application where it would be convenient :-)
11:55 tadzik :0
11:55 tadzik :)
11:59 moritz parrot has the 'repeat' op after all
11:59 mberends colomon: "internal" risks creating a can of worms for future implementers to deal with
11:59 tadzik an op for _that_? Odd, imho
11:59 tadzik I looked at the string pmc
12:00 moritz tadzik: very useful for initializations
12:00 tadzik hmm, maybe
12:00 tadzik moritz: what's your usecase?
12:00 moritz tadzik: an initialization :-)
12:00 tadzik :)
12:01 tadzik turns out it's pretty commonly used in Parrot too
12:03 colomon mberends: I would think not -- at least, I'd interpret "internal" as "whatever the heck the system I'm on currently uses", ie explicitly not compatible.  That should be the easiest thing for implementers to create.
12:07 mberends colomon: if explicitly not compatible, I would prefer not to offer it at all, since adequate alternatives exist. That way no bad user can complain that Perl 6 caused data loss.
12:08 moritz nqp: say(8/3)
12:08 p6eval nqp: OUTPUT«2.66666666666667␤»
12:09 moritz nqp: say(nqp::div_i(8, 3))
12:09 p6eval nqp: OUTPUT«2␤»
12:10 moritz nqp: say(nqp::ord(pir::shl__SSI("\c[1]", 3)))
12:10 p6eval nqp: OUTPUT«error:imcc:The opcode 'shl_s_s_i' (shl<3>) was not found. Check the type and number of the arguments␤       in file '(file unknown)' line 47977136␤»
12:10 moritz nqp: say(nqp::ord(pir::shl__PPI("\c[1]", 3)))
12:10 p6eval nqp: OUTPUT«error:imcc:The opcode 'shl_p_p_i' (shl<3>) was not found. Check the type and number of the arguments␤       in file '(file unknown)' line 45707951␤»
12:10 moritz nqp: say(nqp::ord(pir::sh_l__PPI("\c[1]", 3)))
12:10 p6eval nqp: OUTPUT«error:imcc:syntax error, unexpected PREG, expecting '(' ('$P102')␤  in file '(file unknown)' line 40452783␤␤»
12:10 moritz nqp: say(nqp::ord(pir::shl__PPI("\c[1]", 3)))
12:10 p6eval nqp: OUTPUT«error:imcc:The opcode 'shl_p_p_i' (shl<3>) was not found. Check the type and number of the arguments␤       in file '(file unknown)' line 55906991␤»
12:11 moritz nqp: say(pir::bors__SSS("a", "c"))
12:11 p6eval nqp: OUTPUT«error:imcc:syntax error, unexpected SREG, expecting '(' ('$S102')␤  in file '(file unknown)' line 40␤␤»
12:12 moritz seems that nqp doesn't load str_ops
12:12 moritz erm, bit_ops
12:15 moritz nom: say 1 +< 3
12:15 p6eval nom 09a598: OUTPUT«8␤»
12:16 moritz nom: say(0b11)
12:16 p6eval nom 09a598: OUTPUT«3␤»
12:21 pmurias joined #perl6
12:21 moritz nom: say(pir::repeat("x", -1))
12:21 pmurias hi
12:21 p6eval nom 09a598: OUTPUT«Cannot repeat with negative arg␤  in <anon> at /tmp/dLwjat2TiA:1␤  in <anon> at /tmp/dLwjat2TiA:1␤␤»
12:23 moritz nom: say(pir::repeat("x", 0))
12:23 p6eval nom 09a598: OUTPUT«Method 'gist' not found for invocant of class 'String'␤  in sub say at src/gen/CORE.setting:4859␤  in <anon> at /tmp/0umtdAuoYj:1␤  in <anon> at /tmp/0umtdAuoYj:1␤␤»
12:23 moritz nom: pir::say(pir::repeat("x", 0))
12:23 p6eval nom 09a598: OUTPUT«␤»
12:24 pmurias how do i rethrow the exception from eval?
12:25 moritz pmurias: eval is supposed not to catch the exception in the first place
12:25 moritz (rakudo gets that wrong)
12:26 colomon mberends: not sure why you'd want to drop "internal" floating point format -- as I said, it's the easiest to implement and it has several very good uses, being the quickest format for handling data which isn't supposed to be portable, and if you're on a platform where the floating point format is actually weird, it's needed for easy compatibility with other programs on that platform.
12:27 * colomon just discovered on wikipedia that IEEE has now expanded their floating point spec to handle several new types....
12:30 mberends colomon: I see your point, yet remain unconvinced of its value in practice
12:33 colomon mberends: note that (if moritz++'s page is correct, the "internal" floating point format is the only one Perl 5 currently supports.  Adding support for IEEE 754 floating point format was the point of my proposal.
12:36 mberends colomon: +1 to IEEE 754, and too bad for implementations that choose something else for their "internal" floating point.
12:38 MayDaniel joined #perl6
12:39 colomon mberends: it's not implementations, it's platforms
12:39 colomon IBM mainframes, for instance.
12:39 ingy hi moritz
12:39 pmurias moritz: good
12:40 colomon cray supercomputers...
12:41 ingy is there an idiom in p6 regex to say [lcurly|lsquare] ... [rcurly|rsquare] ?
12:41 * colomon has actually done significant programming on more than one platform that didn't support IEEE floating point, though admittedly, it's been over a decade now since those days...
12:41 [Coke] joined #perl6
12:41 ingy such that you only use curly or square?
12:42 mberends colomon: true, but then as moritz++ pointed out, pack should be about bytes in files, and Storable about serialization.
12:42 woosley joined #perl6
12:42 ingy also I was considering renaming pegex.receiver to pegex.action. Is there any other PEGs using the terminology "action" besides p6?
12:43 ingy I just got the python parser port working...
12:45 ingy ribasushi: o/ I got your rt tickets. care to fix on github? if so I give you teh commitz...
12:47 * moritz wonders if there should be a built-in mirror rule
12:47 moritz so that you can say (<[({]>) ~ <.mirror($0)>  <thing>
12:53 snarkyboojum ingy: yep http://piumarta.com/software/peg/peg.1.html
12:57 uasi joined #perl6
13:09 PacoLinux_ joined #perl6
13:15 Limbic_Region joined #perl6
13:15 pmurias joined #perl6
13:16 ingy moritz: what does that ~ do again?
13:16 ingy snarkyboojum: ta
13:16 moritz ingy: that's the parser generator for matching delimited stuff
13:22 packetknife joined #perl6
13:22 pmichaud good morning, #perl6
13:23 masak pmichaud! \o/
13:23 masak moritz: I'm not sure there needs to be a built-in rule for mirroring. just possible to supply.
13:23 moritz good am, pm
13:23 jnthn pmichaud! \o/
13:25 pmichaud sorry about missing the release yesterday.  some of Paula's colleagues on her projects dropped a few balls, which meant that lots of stuff got pushed to me unexpectedly :-/
13:25 masak that happens.
13:25 moritz what's the updated plan?
13:26 ingy snarkyboojum: that uses the term 'action' as a code block that gets executed on a match. I'm thinking of the name of the 'action containing class', which I call a receiver. A receiver contains actions. Still undecided.
13:26 ingy moritz: I get ~ now. thanks. I like the idea of a mirror token. :)
13:27 pmichaud I'm thinking I'll have time this afternoon to work a bit on regexes and release prep, then will do the release tomorrow morning (about 26 hrs from now), unless anyone has objections or other suggestions
13:27 masak perl6: my $a = "This value will never be set" if 0; say $a.perl
13:27 p6eval rakudo 09a598, niecza v9-46-g16ef0c8: OUTPUT«Any␤»
13:27 p6eval ..pugs: OUTPUT«\undef␤»
13:27 pmichaud (I'm very open to other suggestions :)
13:27 masak haha, '\undef'. Pugs, you so funny.
13:28 moritz pmichaud: sounds good
13:28 masak pmichaud: +1
13:28 jnthn pmichaud: +1
13:29 masak by the way, my offer to combine resurrecting Pugs with a weekly online Haskell study group still stands. just need one or two interested people to get going. :)
13:29 ingy I use /~<thing>~/ as short for /<ws>*<thing><ws>*/. I wonder if I should change that sigil. I don't *need* to because I can still use ~ outside //.
13:30 * ingy hmms
13:30 packetknife joined #perl6
13:30 arnsholt I assume that means you use hidden Markov models to classify the tokens in your grammar? =)
13:30 ingy masak: are you resurging Pugs??!!
13:30 masak ingy: no, not yet.
13:31 masak but I want to.
13:31 ingy :D
13:31 masak it's the kind of project that needs at least two people, just to establish some kind of mutual moral support.
13:32 ingy yeah. I got so much acmeism stuff on the fire.
13:32 ingy still I support you
13:32 * masak feels supported o/
13:33 ingy are there other infix operators besides ** and ~?
13:33 moritz now there's the new %
13:34 * masak thought ** was a postfix
13:34 ingy yeah?
13:34 ingy probably is
13:34 masak postfix with extras :P
13:34 ingy I think moritz regrets it though ;)
13:34 arnsholt And I've sort of classified ~ as a ternary
13:34 arnsholt Only the second half of it is invisible
13:34 masak yeah. but infixes can be ternary.
13:35 moritz je ne regret rien
13:35 masak arnsholt: ?? !! is an infix.
13:35 arnsholt Tru dat
13:35 masak ...as I just found out the other day :)
13:35 ingy moritz: what is %?
13:35 masak ingy: it's what ** used to be for separators.
13:36 ingy ?!
13:36 pmichaud \w+ % ',' /    # if I read correctly
13:36 pmichaud / \w+ % ',' /    # if I read correctly
13:36 masak ingy: see https://github.com/perl6/specs/commit/a455b11b2c4364014f34401d41001a0fa3628e3d
13:38 MayDaniel joined #perl6
13:38 ingy seriously?!
13:38 ingy did pegex talk spawn that?
13:38 masak yeah!
13:38 ingy thanks for clueing me in :\
13:39 ingy now I have to change
13:39 masak stop by more often! :P
13:39 pmichaud Perl happily steals from many sources :)
13:39 ingy bleh
13:39 jnthn This is the risk of brining things up on #perl6. It may buy you some re-implementation work. ;-)
13:39 ingy moritz: is there any analogs to the ?** stuffs I wanted?
13:39 pmichaud yeah, I bet if we stopped discussing Perl 6 we'd all have a lot less to do :)
13:40 masak ingy: why you keep addressing moritz? :)
13:40 masak I'm over here...
13:41 ingy masak: moritz has been my guy for this stuff
13:41 masak oh, ok. so it wasn't a mistab.
13:41 ingy you wanna take over ingysitting?
13:41 masak ingy: anyway, I wouldn't be surprised if most/all of your use cases can be done with %
13:41 masak heh, I don't mind answering questions. I'm sure moritz does a good job, though.
13:42 pmichaud afk again -- bbl
13:42 ingy 1) one or more with commas 2) zero or more 3) 2 or more 4) trailing comma allowed
13:42 ingy masak: ^
13:43 ingy that was basically it
13:43 masak those can be done with a bit of repetition around the % construct.
13:44 masak <stuff>* % <comma> <comma>?
13:45 masak or, hm, <stuff>+ % <comma> <comma>?
13:45 ingy well to me, a % b and a [b a]* are not the same thing
13:45 packetknife joined #perl6
13:45 masak no, it's written a+ % b
13:45 masak % is a quantifier modifier.
13:46 pmurias where can i lookup what features niecza implements?
13:46 ingy one produces data of the form [a+] and the other [a, [a+]*]
13:46 masak pmurias: http://perl6.org/compilers/features ?
13:46 masak ingy: oh, that's true.
13:47 masak ingy: but % doesn't have that problem, seemsse.
13:47 masak seemsme*
13:47 pmurias masak: is the matrix automatically update or manual built?
13:47 ingy I want all my use cases of % creating [a]
13:47 masak pmurias: the latter.
13:47 masak pmurias: well, both ;)
13:48 ingy masak: how do I get trailing b?
13:48 masak ingy: <stuff>+ % <comma> <comma>?
13:48 ingy and how do I get 2 or more?
13:49 masak ingy: (<stuff>)+ % <comma> { $0.elems >= 2 } <comma>?
13:49 masak ingy: (<stuff>)+ % <comma> { $0.elems >= 2 }
13:49 masak not sure the .elems is needed.
13:49 ingy 2 or more is a real use case. like for a | b
13:49 masak wait, yes, I think it is. Match numification goes through Match stringification.
13:50 ingy um, I thought {} is an action, and actions don't affect parsing
13:50 masak oops
13:50 masak ingy: (<stuff>)+ % <comma> <?{ $0.elems >= 2 }>
13:50 ingy anyway I have no inline actions so I'd like a syntax
13:51 masak we have inline actions, so we don't need extra syntax ;P
13:51 pmurias masak: it would be cool if the given spot in the table was filled in depending if a set of tests passes ;)
13:51 masak pmurias: :)
13:51 ingy I will do a+2 % b
13:52 ingy <stuff>+2 % <PIPE>
13:52 * masak is happily surprised to see how many gray boxes have been colored in on http://perl6.org/compilers/features
13:53 ingy inline actions are so unacmeist :P
13:54 ingy which is why p6 rules dies with p6
13:54 ingy anymo...
13:54 ingy thanks for the trix
13:55 masak from our perspective "dies with p6" sounds more like "work really well with p6".
13:56 masak but yes, it's a bit of a monopolistic practice.
13:56 ingy yes
13:57 jnthn masak: japhb++ encouraged me to fill in the missing Rakudo ones the other day, and I managed to do so...after busting the json file ;)
13:57 ingy masak: maybe you have a good answer to this hand grenade...
13:58 [Coke] rakudo: rakudo: enum A <a>; say a; eval 'sub a { "O HI" }'; say a
13:58 p6eval rakudo 09a598: OUTPUT«===SORRY!===␤Confused at line 1, near "rakudo: en"␤»
13:58 ingy masak: <hand-grenade> will there ever be a day when one does this command: 'sudo apt-get install perl6.0.0'
13:59 [Coke] masak: haskell study group? I am... intrigued.
13:59 masak jnthn: yes, I remember. I pointed out the error to you. :P
13:59 mberends [Coke]: [Coke]: don't say rakudo: rakudo:
13:59 masak [Coke]: ooh!
13:59 masak ingy: don't ask me, I'm just a happy end user! :P
14:00 masak ingy: why would I care about this silly "when will it be released" circus?
14:00 [Coke] mberends: yes, yes. typo.
14:00 [Coke] rakudo: enum A <a>; say a; eval 'sub a { "O HI" }'; say a
14:00 p6eval rakudo 09a598: OUTPUT«A::a␤A::a␤»
14:00 ingy I was asked that question at the flemish perl mongers, and I said "That doesn't make sense to me. Perl6 is a spec. THere will never be an installed perl6.0.0 binary."
14:01 mj41 joined #perl6
14:01 * [Coke] adds "cmasak" to his skip rule when trying to find updatable perl6 bugs.
14:01 ingy and the people said, "If that is true I will never give another dime to perl 6 dev"
14:02 ingy and also, "If that is true, my company will stop using perl"
14:02 pmurias ingy: no inline rules, you mean pegex won't allow me to write actions in my favourite acmeish dilect? ;)
14:02 masak ingy: of course the spec could be declared 6.0.0. but I don't see why it'd matter much for end users.
14:03 [Coke] masak: wow. I had already excluded some stuff, and was down to about 700 tickets to look at. exclude you, I'm down under 300. ;)
14:03 ingy masak: I didn't think so either. but it is HUGE to rela people
14:03 masak ingy: also, I'm not too impressed by some flemish perl mongers who have probably never contributed to Perl 6 making random threats about withholing support.
14:03 ingy they all are waiting for something that will NEVER happen
14:03 masak ingy: yes.
14:03 masak basically, yes.
14:03 masak to a first approximation.
14:03 benabik If the spec is declared 6.0.0, then any compiler that follows it could provide perl6.0.0.  Then trying to apt-get it will attempt to select one.
14:03 masak ingy: consider it a honeypot for trolls and similar-minded people.
14:03 ingy and when that becomes know, they are gonna be PISSED
14:03 [Coke] rakudo: my @a=1..5; @a >>+>> 1; @a >>->> 2
14:03 p6eval rakudo 09a598:  ( no output )
14:04 masak [Coke]: that sounds about right to me. :)
14:04 ingy people are giving you money under false assumptions
14:04 [Coke] rakudo: my @a=1..5; @a >>+>> 1; @a >>->> 2; say @a;
14:04 p6eval rakudo 09a598: OUTPUT«1 2 3 4 5␤»
14:04 mberends masak: I'm moderately interested in joining a pugs and haskell group, if it could be scheduled semi-formally during example transatlantic hours on Sundays.
14:04 ingy this needs to be put out in the open clearly, and soon
14:04 masak ingy: who is giving us money? and why do they have these assumptions?
14:05 [Coke] wait, there will never be a perl6 release? what?
14:05 [Coke] I think we're talking past each other here.
14:05 masak mberends, [Coke]: ok, cool. let's schedule something.
14:05 masak [Coke]: I didn't say that, no.
14:05 pmurias why would a rakudo 6.0.0 or niecza 6.0.0 be any different from a perl 6.0.0 release
14:05 pmurias ?
14:06 masak pmurias: it could coincide, but definitely wouldn't have to.
14:06 [Coke] masak: then I would be a lot more careful about answering that sort of question.
14:06 ingy people just don't understand it at all. I was surprised but they don't
14:06 ingy and they were really upset
14:06 ingy Liz and Wendy gave $5k
14:07 [Coke] phenny: ask jnthn if we can close RT#76818 with tests.
14:07 phenny [Coke]: I'll pass that on when jnthn is around.
14:07 masak ingy: maybe we need a document outlining all this.
14:07 ingy and if you told them that perl6 isn't coming, they would ask it back
14:07 ingy masak: YES!
14:07 masak ingy: I really don't think people would be upset if they knew how things actually are.
14:07 ingy masak: me neither
14:07 masak and not all of us here are as disillusioned about a "Perl 6 release" as I am. :)
14:08 masak I just don't consider it that important, is all.
14:08 ingy another guy told me his work is waiting for perl 6 to ship on debian
14:08 masak now, a stable spec, stable/fast/complete/robust implementations, *that's* important.
14:08 masak ingy: I thought there were already debian packages for Rakudo.
14:09 ingy and there is no way to sell the powers that be the rakudo story
14:09 ingy they really are looking for 'perl6.deb'
14:09 benabik There's no C98.deb
14:09 masak I too have grown accustomed to the fact that outsiders will never really appreciate (or care about) the Perl6-Rakudo distinction. or even the Perl6-Parrot distinction. :/
14:10 ingy benabik: right, but nobody outside this irc channel gets that perl6 is a spec
14:10 [Coke] moritz:  can you respond to my question from July on 63650 ?
14:10 jnthn I'm not sure they should have to.
14:10 phenny jnthn: 14:07Z <[Coke]> ask jnthn if we can close RT#76818 with tests.
14:10 [Coke] ingy: well, that's crazy.
14:10 [Coke] "we want perl6" "here it is" "no it isn't" "..."
14:10 masak ingy: it seems to me most of these arguments would be moot if we got to the point where we could just point to our implementations and say: here you are. Perl 6 can do this. it works great. enjoy.
14:11 masak [Coke]: I have that conversation all the time. :/
14:11 jnthn nom: my @a=1..5; @a >>+>> 1; @a >>->> 2
14:11 ingy no it's not, because you guys don't have any clear statement that that's the case
14:11 p6eval nom 09a598:  ( no output )
14:11 jnthn nom: my @a=1..5; @a >>+>> 1; @a >>->> 2; say @a
14:11 p6eval nom 09a598: OUTPUT«1 2 3 4 5␤»
14:11 masak [Coke]: "when is Perl 6 going to be released?" "we release every month." "no, here's what I mean by release..." :/
14:11 jnthn nom: my @a=1..5; @a >>+>> 1; @a >>->> 2; say @
14:11 p6eval nom 09a598: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 1, near "@"␤»
14:11 [Coke] I certainly think a doc explaining that should exist on perl6.org... but I'd be surprised if it didn't already.
14:11 jnthn nom: my @a=1..5; say @a >>+>> 1; say @a >>->> 2;
14:11 p6eval nom 09a598: OUTPUT«2 3 4 5 6␤-1 0 1 2 3␤»
14:11 jnthn [Coke]: Closable with tests, looks like.
14:11 ingy it should be the fucking HEADLINE
14:12 [Coke] jnthn: danke.
14:12 * masak hugs ingy
14:13 ingy I was going to write a blog post "perl6 will never ship" and explain the whole thing in detail
14:13 jnthn ingy: We don't need more drama. We need to quietly get on with making awesome Perl 6 implementations that people can get their work done with. Because I do plenty of conferences and that's what excites people: seeing stuff working.
14:13 masak ingy: please consider carefully what people who don't read the blog post will take away from that title. :/
14:13 masak also, full ACK to what jnthn++ just said.
14:14 ingy jnthn: if you don't just explain it now and deal with the drama, you are shooting yourself in the foo\whead
14:14 masak releasing Rakudo Star was a lot of fun. we pulled all the stops. people still just wanted more and faster. so that's what we're working on now. :)
14:15 ingy I'm just reporting what real people told me when I tried to sell them your story
14:15 [Coke] I would prefer a title of "perl6 is already shipping", but I see what ingy's shooting for.
14:15 masak I also see what ingy is shooting for.
14:15 ingy I was advocating p6, and this is what I got
14:15 masak I've wanted to write that blog post myself sometimes.
14:16 ingy masak: please do
14:16 ingy choose a better title
14:16 masak I just might.
14:16 ingy but please start the discussion
14:16 [Coke] rakudo: my $foo; say $foo.WHAT
14:16 p6eval rakudo 09a598: OUTPUT«Any()␤»
14:16 pmurias ingy: *a* perl 6.0.0 will ship, *the* perl 6.0.0 won't
14:16 [Coke] rakudo: my $foo; say $foo.WHAT.Str;
14:16 p6eval rakudo 09a598: OUTPUT«Use of uninitialized value in string context␤␤»
14:17 [Coke] jnthn: that's another one of yours: RT#76482
14:17 [Coke] "Haven't you heard? They come in six packs."
14:17 masak why do people love version numbers so much? I don't give a Rat's denominator about 6.0.0! I want an implementation that I can use in my daily life and work!
14:17 ingy I personally don't give a rats about all this. but I saw clearly that you guys were heading for a shitstorm
14:17 masak call it 0.93, I don't care!
14:18 ingy masak: if you guys don't want any money to get p6 done, then do whatever you want
14:18 masak *sigh*
14:19 [Coke] masak: I'm trying to figure out why you're upset about this feedback.
14:19 masak maybe we need to clearly distinguish PR and actual internal work here.
14:19 [Coke] where on perl6.org is this documented?
14:19 [Coke] I think it's pretty clear ingy is talking about PR here.
14:19 masak [Coke]: I'm not, really. I'm happy that ingy is stepping forward reporting a real-life PR experience.
14:19 jnthn [Coke]: Right on the top of http://www.perl6.org/compilers/
14:19 masak [Coke]: I'm not sure it's grounds for panicking.
14:20 [Coke] jnthn: I think a little more text there is a good idea.
14:20 masak specifically, the message "if sponsors only knew that a 6.0.0 is not forthcoming, they'd ask their money back" sounds extremely alarmist.
14:21 masak I'm in this not to get a 6.0.0 release of anything, just to bring Perl 6 to fruition.
14:21 ingy it's what I heard
14:21 masak yes. and that's interesting.
14:22 ingy </hand-grenade>
14:22 Woodi I personaly think that Perl 6 is implemented and not optimizet at the moment. and that more exotic features are still in scientific research. maybe there should be feature matrix partitionet like: 1. 'ALL features from C/C++' (implemented) :) 2. features from Haskel (show what work); 3) features with spec under development; 4) pure research :)
14:23 Woodi to late one line :)
14:25 ingy Woodi: you are right. but the thing is that not only does the world not get it, the majority of the perl community does not get it
14:25 [Coke] ingy: welcome to 10 years ago. ;)
14:25 ingy it's a pretty easy thing to set straight, in no uncertain terms.
14:26 [Coke] ingy: ORLY? how?
14:26 masak ingy: I think that I've somehow gotten used to that no matter what we do here in the echo chamber, people will still be tapping their foot, arms akimbo outside of it. what gives me hope is that there are plenty of people who *want* Perl 6 to succeed. but there's no easy way to succeed by outsiders' criteria, except to keep implementing a huge amount of stuff well.
14:26 [Coke] masak++; but if there's something we can add to the website to help out, by all means.
14:27 masak agreed.
14:27 Woodi ingy: i was thinking same thgings sometimes and then Perl5 development restarted :) so not so much presure on v6
14:29 Woodi and i am on debian now with two sets of Perl6 packages :)
14:29 Woodi one was apt-get'ed :)
14:29 ingy [Coke]: On the top of your main web page say this: "The term 'Perl 6' refers to a language specification. There are many implmentations of this spec, but none of them will ever be called 'Perl 6'. The current implmentations are: ..."
14:29 [Coke] Note to bug reporters: when opening tickets and saying "this is weird", please include your expected output. Your bugadmins thank you.
14:29 [Coke] ingy: but they are called Perl 6.
14:30 [Coke] do you mean "they will not be called "perl6" " ?
14:30 ingy just do that, and go back to work
14:30 ingy yes, I mean perl6
14:30 [Coke] ok. rakudo's executable is called perl6.
14:30 [Coke] so this is not an easy thing to sell.
14:31 Woodi ingy: on contrary you are right :) ppls want something declared beta at least
14:31 ingy any implementation can install /usr/bin/perl6
14:31 ingy but nobody can ship perl6.deb
14:32 Woodi -rwxr-xr-x 1 root root 15252656 Aug  7 10:07 /usr/bin/perl6
14:32 [Coke] how about "... will ever be *the* Perl 6. The current imp...."
14:32 jnthn [Coke]: #76482 loosk like correct by current spec.
14:34 ingy there will never be a Perl 6 implementation know simply as "Perl 6". All implementations can use the generic term a "Perl 6" implementation, but the specific name will not be "Perl 6"
14:35 ingy golf that into a concise statement
14:35 ingy TimToady should probably craft it
14:35 ingy then put it out front and center
14:36 ingy and let other people deal with drama while you hack :)
14:37 masak it should be noted that Perl 6 has been a language implementation since day 1.
14:37 masonkramer joined #perl6
14:37 masak this really shouldn't be a surprise to people.
14:37 replore_ joined #perl6
14:38 masak that, in essence is why I don't think there's really an oncoming "shitstorm".
14:38 ingy masak: keep your head in the sand
14:38 masak *sigh*
14:39 masak I'll allow for the fact that we haven't been utterly clear PR-wise. we suck at PR.
14:39 masak but really, this is the way it's been, always. Perl 6 is a spec.
14:39 masak release of Perl-the-spec 6.0.0 will have close to zero significance for people who want to use Perl 6.
14:39 masak other things matter a lot more.
14:39 ingy masak: the world was always round
14:40 masak ingy: I agree with that but fail to close the analogy circuit. :/
14:40 ingy masak: you are wrong about the zero significance
14:40 masak aye, maybe I am.
14:40 masak maybe I've been here too long.
14:41 masak I should say, it really won't matter one ounce *to me*.
14:41 ingy there are real people trying to keep their companies on board with perl, and waiting for a perl6 release etc.
14:41 ingy at least just tell them the truth loudly
14:42 ingy then you are off the hook
14:42 benabik Point them at 5.14…  Lots of good improvements happening.  Perl is still moving.
14:42 masak so... the companies are waiting for a Perl 6 release... but they're unaware of the distinction between spec and implementations... and they won't consider Rakudo to be "Perl 6"...? :/
14:42 ingy masak: correct
14:42 masak ingy: I'm not sure what to do about that.
14:43 masak ingy: clearly, it sucks, but it's also the way it is.
14:43 flussence IMO we could learn a few things from the WHATWG - just let some slow-moving W3C-like group have "6.0.*" so the people who prefer getting stuff done can carry on doing so :P
14:43 ingy masak: when I am at a computer conference i meet a lot of people who never heard of yaml
14:43 ingy which seems unrela to me
14:43 ingy unreal
14:43 ingy but it is real
14:44 ingy masak: I told you a way to start solving it immediately
14:44 benabik masak: For perl people, that doesn't surprise me too much.  There was no difference between p5 spec and implementation.  I would think that C/C++ people would get it, but Java people probably not.
14:44 ingy people are great about saying what $perl6 will be, but suck at shouting what it won't be
14:45 masak frankly, I feel neither capable of nor very interested in addressing this issue.
14:45 masak at least not right now.
14:45 masak helping with nom feels more important.
14:46 masak I'm not saying ingy is wrong in his analysis... just that there will always be people who don't see all the distinctions and shades of gray we do inside the Perl 6 community.
14:46 flussence speaking of nom, that Buf stuff helped a lot: https://github.com/flussence/specgraphs/raw/master/output/rakudo-tests.png
14:47 masak sure, put something up on the website to be even more clear. that's perfectly alright.
14:47 masak but let's not overreact.
14:47 ingy I just asked a geek who sat down next to me at the OSDC conference if he knew yaml
14:47 ingy nope
14:47 ingy for real just now
14:47 ingy I asked him if he knows perl 6
14:48 masak "knows" or "knows about"?
14:48 ingy he says, joking, yeah sure coming out any day now...
14:48 ingy *laughs*
14:48 ingy rakudo?
14:48 ingy blank
14:48 flussence I bet he knows PHP and/or Java though...
14:48 benabik yaml was a bit of a flash in the pan…  json has become far more common
14:48 masak ingy: you're not asking us to change the "any day now" label? that's been with us since, like, 2001...
14:48 ingy oh so yaml is dead?
14:48 ingy really
14:49 ingy yaml is more popular than ever
14:49 masak ingy: the "any day now" meme will *survive* any kind of release we ever make by perhaps a decade.
14:49 ingy anyway, you guys are soaking in p6
14:49 ingy but nobody else has a clue
14:49 masak right.
14:49 ingy even your friends at yapc
14:50 masak ingy: if you believe that we are withholding information and PR on purpose...
14:50 masak reaching out is *hard*.
14:50 ingy again, just real feedback from real human
14:50 masak hey, he knew about Perl 6!
14:51 masak that's about what I'd expect from someone who isn't involved.
14:51 ingy he knows it as the next version of perl
14:51 masak Perl 6 has a real brand going for it. and people want us to change name. :P
14:51 ingy I don't
14:51 masak me neither.
14:52 uasi joined #perl6
14:52 ingy I want you to tell everyone precisely what to expect
14:52 ingy then they will say
14:52 masak the most constructive thing I've come up with to counteract the "Perl 6 will never be released" meme is to have people start saying "haha, yes. but seriously, I used it yesterday, and it rocks." for that, we need to implement it as much as possible. preferably soon.
14:52 ingy oh! that makes sense. ok
14:53 ingy done
14:53 masak ingy: people come in here a lot, asking a lot of questions. we tell them what to expect. they don't listen and then they go away. and they're the *interested* ones.
14:53 ingy I'm not talking about them
14:53 masak good luck informing the mildly interested or disinterested ones.
14:54 ingy I'm talking about the world that trusts the perl community to DTRT and is patiently waiting....
14:54 ingy for something that will NEVER come
14:54 ingy by definition
14:54 masak I think you're exaggerating.
14:54 ingy I'm not
14:54 ingy I run into this every day
14:55 ingy I travel all over the world pimping perl
14:55 ingy and perl 6 brings up anger
14:55 jnthn *sigh*
14:55 masak sorry to hear that.
14:55 ingy and it is almost always off track
14:55 jnthn afk, for quite a while
14:56 masak ingy: I hear a lot of misconceptions about Perl 6 too. I travel places too, although perhaps not as much as you.
14:56 ingy they are wrong, but there's no reason they shouldn't be
14:56 masak ingy: to the best of my knowledge, I've managed to answer similar questions to people's satisfaction.
14:56 masak maybe you just suck at answering those questions :P
14:56 ingy masak: yes
14:57 masak ok, so it's a very local shitstorm we're talking about...
14:57 ingy masak: why are you not trying to solve this?
14:57 masak because I'm, you know, doing real stuff.
14:57 ingy it's great that you can calm a person down and set them stright
14:57 ingy straight
14:57 ingy just do it once in writing
14:58 ingy then you can just point them a a url
14:58 masak I hear you.
14:58 masak will think about it a bit.
14:58 ingy and get MORE hacking done
14:58 masak that doesn't follow, but sure :P
14:59 ingy so is % an infix?
14:59 ingy in rules
15:00 masak I think so. primarily, it's a quantifier modifier.
15:00 masak which could be seen as an infix with some restrictions.
15:00 ingy it's not a cast modulus?
15:00 ingy I thought someone (moritz?) said that
15:00 masak in STD, it's a token. https://github.com/perl6/std/commit/c22b2ee2c08b549fa7913a87986f9d995bba50d3
15:01 cognominal joined #perl6
15:01 sorear good * #perl6
15:02 colomon o/
15:02 colomon sorear: got asinh working last night, but seem to have broken it since.
15:02 ingy The C<%> because it can be pronounced
15:02 ingy 'modulo' and because it looks like the relationship of two things.
15:03 masak I don't know what you mean by 'cast modulus'.
15:03 masak sorear: *
15:04 sorear Woodi: there are two ls in Haskell.
15:05 sorear mberends: ping
15:07 ingy masak: 5 % 3
15:08 masak ingy: yes. that is http://en.wikipedia.org/wiki/Modulo_operation -- I'm familiar with it.
15:08 ingy % is modulus
15:08 masak OK.
15:08 Woodi sorear: i was aware i can mispell that name. i was active betting to use 'a' not 'e' after 'h' :) will try memoize :)
15:08 ingy and you know what a cast is
15:08 masak a type cast?
15:08 masak sure, but what does that have to do with parsing?
15:09 sorear masak: do you think niecza deserves a +- or a + for printf?
15:09 [particle] joined #perl6
15:09 masak sorear: haven't used it enough. #58 doesn't seem like grounds for giving it a +-
15:09 masak sorear: but other things might, I dunno.
15:09 mberends sorear: pong
15:09 ingy I'm asking if % is cast to a new behaviour when given rule args
15:09 masak sorear: how much of the spectest suite does it pass?
15:09 sorear mberends: what I just asked masak.
15:10 sorear I'll give it a +- because there's no .fmt
15:10 masak ingy: oh! I just consider it two completely unrelated languages.
15:10 masak ingy: the fact that it's the same character for the two operators is more of a nice symmetry/rhyme.
15:10 mj41 joined #perl6
15:11 ingy well rules are just methods in grammars
15:11 dalek features: f42e110 | sorear++ | features.json:
15:11 dalek features: Update niecza features
15:11 dalek features: review: https://github.com/perl6/features/commit/f42e1105d0
15:11 masak ingy: sure, but it's still two different grammars parsing the two kinds of %
15:12 ingy which is what I was asking :)
15:13 masak and the answer is: they're not at all the same operator. they just look alike, and they can both be called "modulo".
15:13 ingy thx
15:13 sorear like the relationship between infix:<~> and prefix:<~> ?
15:16 mberends sorear: I agree +- because there quite a few formatting options are NYI. The coverage by tests in roast is insufficient to consider sprintf or printf to be complete.
15:16 mberends yeah, grammar fail :/
15:17 masak sorear: almost; but those are two different operators of different category in the same sublanguage.
15:18 masak sorear: the two %s are two different operators of the same category (provided it is an infix in P6Regex) in different sublanguages.
15:20 Woodi how to say return undefined in perl6 ?
15:20 cognominal joined #perl6
15:23 masak Woodi: 'return'
15:23 masak you could say 'return Nil', but that's just a longer way of saying it.
15:23 masak also, consider whether it's 'fail' you want.
15:24 Woodi hmm, compile error message is quite descriptive
15:25 Woodi perl5 is more scriptable :)
15:25 masak how do you mean?
15:25 Woodi probably one syntax just work there
15:26 masak I still don't understand what you mean.
15:26 masak Perl has never been about "one and only one way".
15:26 Woodi maybe here will to with some automatic conversions
15:26 masak and if the latter two ways bother you, just forget I mentioned them :P
15:26 Woodi masak: there was no types in perl so far :)
15:26 benabik Didn't even get into typed undefineds.
15:27 masak fwiw, 'return' is how I would do it in Perl 5, too.
15:27 masak not 'return undef'.
15:27 mberends heh, in Gtk a group of tabbed windows is called a notebook, so in Perl 6 you create one with 'sub notebook' :)
15:29 colomon sorear: okay, I've got all the hyperbolic trig functions working too, except the values at Inf and -Inf are wrong for a lot of them.
15:36 masak heh -- http://twitter.com/audreyt/status/117621081526894592
15:37 masak by this I have to assume that au++ is also aware of our loose Haskell study group + Pugs revival plans...
15:37 masak [Coke], mberends: so, is tomorrow fine with you guys? :)
15:37 masak what UTC?
15:39 mberends masak: yes, tomorrow. vaguely from 8:00 to 21:00 UTC, not continuously
15:41 masak nod. agreed.
15:42 masak let's start just trying to get Pugs to run from source.
15:42 mberends +1
15:42 masak cloning the repository and making lists of LHF can come later :)
15:43 mberends we'll need commitbits
15:44 mberends or each hack on an own clone I spose
15:45 sorear haskell studygroup?
15:47 mberends sorear: yes, will you join? this will be a beginner group.
15:47 masak mberends: either of us forks au's repo on github, and gives the others commitbits.
15:47 masak sorear is not a Haskell beginner ;)
15:48 mberends masak: yes, it was more of a warning ;)
15:48 masak he's still free to join the group, of course, and definitely welcome to hack on Pugs with us...
15:48 masak but something tells me he's having enough fun with Niecza.
15:48 masak wow! just imagine, putting Pugs on 6model!
15:48 * masak boggles
15:52 mberends masak: could we make a perl6/pugs repo, and so give commitbits via hugme instead?
15:53 masak fine with me.
15:53 moritz should I do that?
15:54 masak let's wait until tomorrow ;)
15:54 * moritz has enough permission to fork into the perl6 organization
15:54 masak it's all contingent on whether we can get Pugs to compile and run.
15:55 sorear masak: pugs on 6model?
15:55 sorear mberends: I just want to make it known, that I am willing to help
15:56 masak sorear++ # cool!
15:56 mberends sorear: that's great :)
15:56 * masak discovers http://defunkt.io/hub/
15:56 masak sorear: it was just a thought. apparently it's easy to let one's ideas get ahead of oneself when planning to wake up Pugs from her beauty sleep ;)
16:13 * benabik can provide some assistance with Haskell.
16:14 benabik I don't know the pugs code, but I'm reasonably proficient with lambdastuff
16:14 TimToady 'course, by the time you replace the parser and the MOP, you mostly just have the runtime left
16:17 daniel-s joined #perl6
16:19 ggoebel joined #perl6
16:21 envi joined #perl6
16:25 dalek niecza/serialize: 0b7a754 | sorear++ | lib/ (2 files):
16:25 dalek niecza/serialize: Fix ordering bug in protopads
16:25 dalek niecza/serialize: review: https://github.com/sorear/niecza/commit/0b7a754d66
16:25 diakopter niecza: "
16:25 p6eval niecza v9-46-g16ef0c8: OUTPUT«Unhandled exception: System.IndexOutOfRangeException: Array index is out of range.␤  at Lexer.Run (System.String from, Int32 pos) [0x00000] in <filename unknown>:0 ␤  at Lexer.RunDispatch (Niecza.Frame fromf, Niecza.P6any cursor) [0x00000] in <filename unkn…
16:29 gbacon joined #perl6
16:30 diakopter std: :16{A705E} # should parse as a Blob literal
16:30 p6eval std c22b2ee: OUTPUT«[31m===[0mSORRY![31m===[0m�Malformed radix number at /tmp/oTG4WKBGmr line 1:�------> [32m:16[33m�[31m{A705E} # should parse as a Blob literal[0m�Parse failed�FAILED 00:01 117m�»
16:33 moritz someone please remind me what a Blob is
16:33 diakopter http://perlcabal.org/syn/S02.html#Blob_literals
16:33 diakopter I don't know any more than that ;)
16:33 diakopter pugs: say :16{A705E}
16:33 p6eval pugs: OUTPUT«526375770699927␤»
16:36 diakopter pugs: say :16{A705E}.WHAT
16:36 p6eval pugs: OUTPUT«Int␤»
16:36 moritz ah, a blob is an immutable buf
16:36 flussence Surprise! https://github.com/flussence/specgraphs/raw/master/niecza/output.png
16:39 flussence (this one is *much* faster to fill in than the nom one :)
16:40 TimToady well, nothing makes progress if you look at it close enough :)
16:41 * TimToady is going to chew up his entire Saturday just backlogging #perl6...
16:43 TimToady std: my $a = "xxx" ; { say $a ; my $a; }
16:43 p6eval std c22b2ee: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Lexical symbol '$a' is already bound to an outer symbol (see line 1);â�¤  the implicit outer binding at line 1 must be rewritten as OUTER::<$a>â�¤  before you can unambiguously declare a new '$a' in this scope at /tmp/IpnGmWphdn line 1:â�¤---…
16:43 TimToady niecza: my $a = "xxx" ; { say $a ; my $a; }
16:43 p6eval niecza v9-46-g16ef0c8: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Lexical symbol '$a' is already bound to an outer symbol (see line 1);â�¤  the implicit outer binding at line 1 must be rewritten as $aâ�¤  before you can unambiguously declare a new '$a' in this scope at /tmp/wBJZi682Mg line 1:â�¤-…
16:44 TimToady here's a bug . . . . . . . . . . . . . . . . . . . . . . . . . .  ^^
16:44 TimToady sorear: ^^
16:45 TimToady niecza: my $a = "xxx" ; {{{{ say $a ; my $a; }}}}
16:45 p6eval niecza v9-46-g16ef0c8: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Lexical symbol '$a' is already bound to an outer symbol (see line 1);â�¤  the implicit outer binding at line 1 must be rewritten as $aâ�¤  before you can unambiguously declare a new '$a' in this scope at /tmp/l_Hlvfiary line 1:â�¤-…
16:45 diakopter niecza startup time is so much faster on linux than on windows mono; very noticeable on p6eval vs any other machine I've tried; I dunno why
16:45 TimToady std: my $a = "xxx" ; {{{{ say $a ; my $a; }}}}
16:45 p6eval std c22b2ee: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Lexical symbol '$a' is already bound to an outer symbol (see line 1);â�¤  the implicit outer binding at line 1 must be rewritten as OUTER::OUTER::OUTER::OUTER::<$a>â�¤  before you can unambiguously declare a new '$a' in this scope at /tmp/Z…
16:46 diakopter benabik: there are plenty of jvm implementations, re: your point about C/C++ vs java
16:47 TimToady std: my $a = "xxx" ; {{{{ say OUTER::<$a> ; my $a; }}}}
16:47 p6eval std c22b2ee: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Variable OUTER::<$a> is not predeclared at /tmp/O7RBAWI_R9 line 1:â�¤------> [32mmy $a = "xxx" ; {{{{ say OUTER::<$a>[33mâ��[31m ; my $a; }}}}[0mâ�¤Potential difficulties:â�¤  $a is declared but not used at /tmp/O7RBAWI_R9 line 1:â�¤------> …
16:47 TimToady niecza: my $a = "xxx" ; {{{{ say OUTER::<$a> ; my $a; }}}}
16:47 p6eval niecza v9-46-g16ef0c8: OUTPUT«Potential difficulties:â�¤  $a is declared but not used at /tmp/Q94wuMwysW line 1:â�¤------> [32m $a = "xxx" ; {{{{ say OUTER::<$a> ; my [33mâ��[31m$a; }}}}[0mâ�¤â�¤xxxâ�¤Â»
16:48 TimToady arguably niecza is correcter, and one OUTER will be sufficient
16:48 TimToady except for the fact that the error message doesn't mention OUTER
16:48 im2ee_ joined #perl6
16:51 packetknife joined #perl6
16:51 sorear cute bug
16:51 TimToady but I don't think you need to reproduce OUTER::OUTER::OUTER::OUTER
16:51 TimToady since one OUTER says where to start looking
16:52 sorear at one point niecza was generating OUTER chains like that
16:53 TimToady well, it does have the advantage of being explicit, in case someone inserts another my $a somewhere in between
16:54 diakopter niecza: my $a = "xxx" ; { my $a = "yyy"; {{{ say OUTER::OUTER::<$a> ; }}}}
16:54 p6eval niecza v9-46-g16ef0c8: OUTPUT«Potential difficulties:â�¤  $a is declared but not used at /tmp/Y0C_hskFvT line 1:â�¤------> [32mmy $a = "xxx" ; { my [33mâ��[31m$a = "yyy"; {{{ say OUTER::OUTER::<$a> ;[0mâ�¤â�¤yyyâ�¤Â»
16:54 diakopter why did it say yyy
16:54 TimToady because
16:54 diakopter when OUTER::<$a> also gives yyy
16:54 TimToady yyy is correct
16:55 TimToady try more OUTERs
16:56 TimToady or fewer braces
16:56 masak or just name the variables differently :P
16:56 masak sheesh
16:57 diakopter niecza: my $a = "xxx" ; $a; { my $a = "yyy"; {{{ say OUTER::<$a>; say OUTER::OUTER::<$a>; say OUTER::OUTER::OUTER::<$a>; say OUTER::OUTER::OUTER::OUTER::<$a>; $a }}}}
16:57 p6eval niecza v9-46-g16ef0c8: OUTPUT«yyy␤yyy␤yyy␤xxx␤»
16:58 Woodi if role implements method then it should be available in class doing that role ?
16:59 TimToady Woodi: yes, assuming it doesn't collide with something
17:00 Woodi so i do not understand why IO::Socket::INET.read is absent...
17:00 masak Woodi: if the program compiles and the class doesn't override, then yes :)
17:00 [Coke] joined #perl6
17:01 benabik diakopter: Yes, but "Java" means "Oracle Java" to 90% of people.  Really changing due to dalvik, I suppose.
17:01 TimToady nom: say IO::Socket::INET.^methods
17:01 p6eval nom 09a598: OUTPUT«Could not find symbol 'IO::Socket::&INET'␤  in <anon> at /tmp/FLqCmwIDKH:1␤  in <anon> at /tmp/FLqCmwIDKH:1␤␤»
17:01 Woodi roles are not abstract ?
17:01 TimToady they're immutable, but of varying abstraction
17:01 TimToady they may suggest an implementation
17:02 masak TODO passed tests 2-3 in t/spec/S19-command-line/dash-e.rakudo
17:02 masak Woodi: roles may definitely implement methods.
17:03 masak even if that implementation is just 'method foo { ... }'
17:03 masak (three dots meant literally)
17:03 Woodi ok
17:05 im2ee joined #perl6
17:05 Woodi nom shows 'read' on ^methods but explodes with no STORE in ANY()
17:05 diakopter benabik: what % of people would you say "C/C++" means each of these three: msvc, gcc, clang
17:05 TimToady well, it looks to me like IO::Socket::INET isn't there at all
17:05 moritz it's disabled in evalbot
17:06 moritz for security reasons
17:06 TimToady it's not there locally either
17:06 TimToady oh wait, it is
17:06 TimToady just a 'use' doesn't work :)
17:06 sorear diakopter: what's a good jvm that will run comfortably in 384mb
17:06 benabik diakopter: Yes, it's fairly well known that the compiler isn't the definition of the language.  But most people would say Oracle Java is the definition of Java.  It's far more grey, but they're far more intertwined.
17:07 moritz TimToady: how up-to-date is your copy of nom?
17:07 diakopter sorear: I dunno
17:07 TimToady couple days
17:07 diakopter benabik: that wasn't my point; I was just asking what you imagined the distribution was
17:07 moritz I'm pretty sure it exists :-)
17:07 TimToady it finds the methods, it just fails a 'use IO::Socket::INET' if I do that first
17:08 TimToady which bamboozled me
17:08 moritz well, it's in core
17:08 moritz no need to 'use' it
17:08 TimToady seems like we should allow a 'use' on something that's already there...
17:08 moritz use Int; #?
17:09 Woodi seems use 'use' on core modules is user anti-case :)
17:09 TimToady what if we decide to kick Int out of the core someday?  :P
17:09 benabik diakopter: A majority of people I deal with know that gcc is _a_ C compiler, not _the_ C compiler.  From what I'm told, msvc people may be fuzzier on the distinction, but eh.
17:10 diakopter heh
17:10 TimToady I'd think they'd be clearer on that distinction :)
17:10 sorear heehe
17:10 sorear benabik: do you know of any alternate vms that would work for me?
17:10 TimToady VMS?!?!
17:10 * TimToady goes back into ptsd mode...
17:11 simcop2387 joined #perl6
17:11 diakopter sorear: I was reading about ildjit
17:11 benabik sorear: JVMs?
17:11 * sorear has been thinking about Niecza/JVM a little bit lately
17:11 sorear benabik: ye
17:12 masak perl6: =END␤say "OH HAI"
17:12 p6eval pugs, rakudo 09a598:  ( no output )
17:12 p6eval ..niecza v9-46-g16ef0c8: OUTPUT«OH HAI␤»
17:12 masak perl6: say "alive";␤=END␤say "OH HAI"
17:12 p6eval niecza v9-46-g16ef0c8: OUTPUT«alive␤OH HAI␤»
17:12 p6eval ..pugs, rakudo 09a598: OUTPUT«alive␤»
17:12 masak sorear: nieczabug.
17:12 benabik sorear: I've tended to just use Sun/Oracle's, honestly.
17:15 im2ee rakudo: multi combs(@, 0) { "" }; multi combs { combs(@^dict, $^n - 1) X~ @dict }; (.say for combs(<a b c>, $_)) for 1..4;
17:15 p6eval rakudo 09a598: OUTPUT«a␤b␤c␤aa␤ab␤ac␤ba␤bb␤bc␤ca␤cb␤cc␤aaa␤aab␤aac␤aba␤abb␤abc␤aca␤acb␤acc␤baa␤bab␤bac␤bba␤bbb␤bbc␤bca␤bcb␤bcc␤caa␤cab␤cac␤cba␤cbb␤cbc␤cca␤ccb␤ccc␤aaaa␤aaab␤aaac␤aaba␤aabb␤aabc␤aaca␤aacb␤aacc␤abaa␤abab␤abac␤abba␤abbb␤abbc␤abca␤abcb␤abcc␤acaa␤acab␤acac␤acba␤acbb␤acbc␤acca…
17:15 im2ee masak, works here.
17:16 masak b: multi combs(@, 0) { "" }; multi combs { combs(@^dict, $^n - 1) X~ @dict }; (.say for combs(<a b c>, $_)) for 1..4;
17:16 p6eval b 1b7dd1: OUTPUT«No applicable candidates found to dispatch to for 'combs'. Available candidates are:␤:(Positional , Int  where (0))␤:(;; Any $n, @dict)␤␤  in <anon> at line 22:/tmp/cdcc6w5zVv␤  in main program body at line 1:src/metamodel/RoleToInstanceApplier.nqp␤»
17:16 masak that's the error.
17:16 im2ee b is the latest version?
17:16 im2ee of rakudo?
17:16 masak latest version of the last development branch.
17:16 masak problem is, the current one hasn't had a release yet.
17:17 masak when you go 'b:' you get the last one, the one you have locally.
17:17 masak when you go 'rakudo:' or 'nom:', you get the new one.
17:17 masak the one that isn't all done yet. :)
17:17 masak but it sure seems to be handling this program better...
17:17 moritz and be was "all done"? :-)
17:18 masak moritz: sssh, I'm doing PR here :P
17:18 frhodes joined #perl6
17:18 TimToady if we ever do kick a core module out someday (and we probably will), it seems to me we'll end up with a class of auto-used names; and if we have that, we should at least think about making them all autousable, rather than avoiding Occam.
17:18 im2ee masak, so.. could You help me to write this program to the latest version?
17:18 masak im2ee: I thought that's what I did.
17:18 masak im2ee: it works on nom but not on Rakudo Star.
17:19 masak oh, or you meant the latest release?
17:19 masak ok, sure.
17:19 im2ee Yes, i mean the Rakudo Start :)
17:19 masak "star", not "start".
17:20 im2ee Star, yes - sorry, im bit in hurry :)
17:20 REPLeffect joined #perl6
17:20 TimToady .oO(Warning: had to assume a 'use IO::Socket::INET' before foo line 42)
17:20 Woodi btw, TimToady s/core/standard/ modules|distribution :) Linux-way :)
17:20 im2ee masak, do You have a time to do this? :) It's nothing important
17:20 masak b: multi combs(@d, 0) { say "base case" }; multi combs(@d, Int $n) { say "recursive case" }; combs([], 0); combs([], 5)
17:20 p6eval b 1b7dd1: OUTPUT«base case␤recursive case␤»
17:20 masak im2ee: I think I know what's wrong. hold on.
17:20 TimToady .oO(Warning: had to 'cpanm IO::Socket::INET' before foo line 42 :)
17:21 im2ee masak, ok. Great :)
17:21 masak b: multi combs(@, 0) { "" }; multi combs(@dict, Int $n) { combs(@dict, $n - 1) X~ @dict }; (.say for combs(<a b c>, $_)) for 1..4;
17:21 p6eval b 1b7dd1: OUTPUT«a␤b␤c␤aa␤ab␤ac␤ba␤bb␤bc␤ca␤cb␤cc␤aaa␤aab␤aac␤aba␤abb␤abc␤aca␤acb␤acc␤baa␤bab␤bac␤bba␤bbb␤bbc␤bca␤bcb␤bcc␤caa␤cab␤cac␤cba␤cbb␤cbc␤cca␤ccb␤ccc␤aaaa␤aaab␤aaac␤aaba␤aabb␤aabc␤aaca␤aacb␤aacc␤abaa␤abab␤abac␤abba␤abbb␤abbc␤abca␤abcb␤abcc␤acaa␤acab␤acac␤acba␤acbb␤acbc␤acca␤accb…
17:21 masak im2ee: there you go ;)
17:21 masak nom: multi combs(@, 0) { "" }; multi combs(@dict, Int $n) { combs(@dict, $n - 1) X~ @dict }; (.say for combs(<a b c>, $_)) for 1..4;
17:21 p6eval nom 09a598: OUTPUT«a␤b␤c␤aa␤ab␤ac␤ba␤bb␤bc␤ca␤cb␤cc␤aaa␤aab␤aac␤aba␤abb␤abc␤aca␤acb␤acc␤baa␤bab␤bac␤bba␤bbb␤bbc␤bca␤bcb␤bcc␤caa␤cab␤cac␤cba␤cbb␤cbc␤cca␤ccb␤ccc␤aaaa␤aaab␤aaac␤aaba␤aabb␤aabc␤aaca␤aacb␤aacc␤abaa␤abab␤abac␤abba␤abbb␤abbc␤abca␤abcb␤abcc␤acaa␤acab␤acac␤acba␤acbb␤acbc␤acca␤ac…
17:21 diakopter std: cpanm IO::Socket::INET
17:21 p6eval std c22b2ee: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared name:â�¤    'IO::Socket::INET' used at line 1â�¤Undeclared routine:â�¤  'cpanm' used at line 1â�¤Check failedâ�¤FAILED 00:01 118mâ�¤Â»
17:21 masak im2ee: works fine on both branches ;)
17:22 daniel-s joined #perl6
17:22 im2ee You changed only Int $n instead of $n? :)
17:22 Sarten-X joined #perl6
17:23 im2ee Hm, i mean you add () to second multi combs?
17:23 arnsholt http://joshuablankenship.com/blog/2011/09/24/beware-the-purists/ made me think of Perl 6, in a way
17:24 masak joined #perl6
17:24 masak im2ee: yeah. I had a feeling the problem was related to signature type narrowness.
17:24 im2ee masak, great. It's nice lesson. :) Thanks.
17:25 masak im2ee: probably the $n parameter is too loose if it's not typed as Int.
17:25 masak for some reason, that's not a problem in nom.
17:27 pmurias sorear: hi
17:27 pmurias diakopter: what'ls ildjit?
17:28 pmurias * what's
17:28 TimToady arnsholt: the question is, which way did it make you think about Perl 6?  :)
17:29 arnsholt Mostly the "What's wrong with Perl 5/Why aren't you working on Perl 5 instead?" crowd, I think
17:30 pmurias sorear: re niecza/jvm what would the benefits of that be?
17:31 jlaire sb goto -50
17:31 jlaire oops
17:31 * TimToady just uses pageup/pagedown...
17:32 * jlaire is on a laptop with a broken keyboard :(
17:32 jlaire the most painful bug is that up-arrow doesn't work
17:32 TimToady I've always wished that irssi would respond to spacebar or backspace at the first position and do scrolling
17:33 jlaire interesting
17:33 jlaire left/right might be nice for that, too
17:34 pmurias masak: what's the point of reviving pugs? purely fun?
17:34 TimToady learning Haskell...again...
17:40 sorear pmurias: niecza/jvm would be useful for all the people who beleive the anti-clr patent fud :)
17:41 moritz what about those who believe the anti-java patent fud? :-)
17:43 pmurias they have niecza/clr ;)
17:44 diakopter moritz: good point
17:45 pmurias sorear: is the anti-clr patent fud stopping people from contributing to niecza?
17:45 diakopter pmurias: http://lmgtfy.com/?q=ildjit
17:46 bbkr joined #perl6
17:46 TimToady with respect to the 40-match puzzle, haven't thought about it analytically, but it seems equivalent to me to a Galton's Quincunx that is diamond shaped rather than triangular
17:46 TimToady or maybe that *is* thinking about it analytically :)
17:47 TimToady masak: ^^
17:49 * TimToady has a geometric brane, not an algebraic brane...
17:50 TimToady to the extent that, when I view the Galton's Quincunx in my head, I "know" I'm facing north!
17:51 TimToady I guess you'd call that a geographic brane
17:52 TimToady "The spider is crawling up your west arm."
17:53 masak pmurias: the point, I guess, is to have a working Pugs.
17:53 * masak googles "Quincunx"
17:53 lucs What's the "40-match puzzle"?
17:54 TimToady http://irclog.perlgeek.de/perl6/2011-09-23#i_4469618
17:54 masak ...and subsequent discussion.
17:54 TimToady now you know how far back I am in the backlog... :/
17:54 lucs TimToady: Thanks.
17:55 im2ee How to create TCP server in p6? :)
17:56 im2ee Just open a port.
17:56 masak TimToady: yes. Galton's Quincunx, along with folding up in half, seems to be a way to analyze -- er, geometrize -- the problem, too.
17:57 masak im2ee: have a look at IO::Socket::INET
17:57 im2ee masak, hmm, i'm trying it, and i have some problems. :)
17:57 im2ee masak, but i have some ideas :)
17:57 TimToady well, I was thinking more of folding down in double
17:58 moritz my $s = IO::Socket::INET.new(:localhost<localhost>, :localport(1234), :listen);
17:58 moritz my $connection = $s.accept
17:58 TimToady or of a quincunx that has the bottom two angles trimmed off
17:58 masak TimToady: I'm not a native English speaker, all appearances to the contrary nonwithstanding :P
17:58 moritz say $connection.read(20).decode
17:58 TimToady to constrain the distribution to 40 choices left or right
17:58 masak right.
17:59 TimToady the constraints being a form of "gambler's ruin"
17:59 im2ee moritz, thanks :)
17:59 im2ee I wrote LocalHost and LocalPort, like in p5. :)
18:00 TimToady in fact, one could pose it exactly as a symmetrical gambler's ruin problem
18:00 moritz we CamelCase only class names in p6
18:01 * masak .oO( CameliaCase )
18:01 TimToady $She-Who-Must-Be-Obeyed is a possibility though :)
18:01 im2ee moritz, thanks :)
18:03 TimToady but yeah, we like our hyphens in preference to caps now
18:04 TimToady that leaves the letters free to be caps when it's natural, and not when it's not
18:04 TimToady Mutiny-on-the-Bounty
18:04 diakopter masak: golf: produce a list of random ascii words of random length < N
18:04 TimToady much easier to read than MutinyOnTheBounty
18:05 * im2ee is afk
18:05 moritz nom: ('a'..'z').roll((1..6).pick)
18:05 p6eval nom 09a598:  ( no output )
18:05 lucs masak: "[...] as one increases N to the millions it becomes 1." There tends to be a single match left in the other box when N is very high? I find that hard to believe.
18:05 moritz nom: say ('a'..'z').roll((1..6).pick)
18:06 p6eval nom 09a598: OUTPUT«l j␤»
18:06 moritz nom: say ('a'..'z').roll((2..7).pick).join for 1..8
18:06 p6eval nom 09a598: OUTPUT«gelctgv␤ojisg␤jqg␤jwtmbid␤kt␤ixx␤sfxnu␤bud␤»
18:06 diakopter cool
18:06 masak lucs: N being the number of simulations run, not the number of matches.
18:06 lucs Oh! Not what I'd understood :)
18:07 snikkers joined #perl6
18:07 moritz nom: say (1..8).map: {('a'..'z').roll((2..7).pick).join}
18:07 p6eval nom 09a598: OUTPUT«cgbocu xtoo fmlg zmgcqot ud xvdipo wwz ko␤»
18:07 masak lucs: I've already apologised about the confusion in the backlog :P
18:07 lucs masak: Sorry, only just skimming :)
18:08 TimToady .oO(lucs makes his sanity roll)
18:08 * TimToady doesn't...
18:08 diakopter mmm rolls
18:09 masak nom: say ~('a'..'z').roll(2..7) for ^8
18:09 p6eval nom 09a598: OUTPUT«Method 'pred' not found for invocant of class 'Range'␤  in sub postfix:<--> at src/gen/CORE.setting:1054␤  in sub coro at src/gen/CORE.setting:3855␤  in method reify at src/gen/CORE.setting:3825␤  in method reify at src/gen/CORE.setting:3629␤  in method reify at src/g…
18:09 diakopter eh
18:09 TimToady pred?!?
18:09 masak huh?
18:09 masak this proves it. everything I touch exposes a bug. :/
18:10 masak nom: say ~('a'..'z').roll((2..7).pick) for ^8
18:10 p6eval nom 09a598: OUTPUT«m k c r c z␤d f u e r m l␤c l h h h␤s k t␤h o h c k␤h p c␤s l h f v␤p f r r b e␤»
18:10 masak hm.
18:10 masak oh, right.
18:10 pmurias joined #perl6
18:10 moritz I guess it just copies the argument, and -- it until it's 0
18:10 masak nom: say ('a'..'z').roll((2..7).pick).fmt for ^8
18:10 p6eval nom 09a598: OUTPUT«d l l p␤e a f l a k x␤c z g k s j␤q i q k p g s␤m y w b m l a␤f i w␤v c x␤z n p␤»
18:10 TimToady oah
18:10 TimToady hmm, nice word
18:11 moritz nom: say ('a'..'z').roll((2..7).pick).fmt('') for ^8
18:11 p6eval nom 09a598: OUTPUT«  ␤     ␤  ␤ ␤  ␤ ␤   ␤ ␤»
18:11 diakopter heh
18:11 moritz nom: say ('a'..'z').roll((2..7).pick).fmt('%s','') for ^8
18:11 p6eval nom 09a598: OUTPUT«nmkg␤rqheyfv␤vlp␤ho␤qxil␤xeqi␤veydh␤fivqtfy␤»
18:11 masak TimToady: any reason not to make .roll(2..7) mean .roll( (2..7).pick )? :)
18:11 moritz .join is still shorter
18:11 masak moritz: thanks.
18:11 masak nom: say ('a'..'z').roll((2..7).pick).join for ^8
18:11 p6eval nom 09a598: OUTPUT«imgqtfm␤dcnec␤hxww␤zkk␤dmq␤xtaia␤hxizfve␤azx␤»
18:11 masak moritz: and somehow more descriptive.
18:12 moritz masak: oh come on, this is about golfing :-)
18:12 masak troo
18:12 diakopter .roll(Range) sounds cool
18:12 TimToady masak: but maybe they meant .roll(any 2..7)
18:12 masak TimToady: that's an odd use of junction... :)
18:12 masak junctions*
18:13 TimToady nevertheless, someone might think it
18:13 TimToady I think the huffman value of it is minimal
18:13 TimToady it's a pretty low-wattage dwim
18:14 TimToady druther save my dwims for high-wattage locations
18:14 diakopter LOL .rroll for range roll
18:14 TimToady pick-and-roll(2..7)  :)
18:14 diakopter I was thinking rick-roll
18:15 TimToady speaking of low-wattage...
18:15 diakopter ... or desert you
18:15 * TimToady goes back to lackbogging
18:16 lucs masak: Did you come up with a reasonable answer to the matches problem?
18:17 * lucs would instead ask "How many matches at most would remain in the other box, 50% (for example) of the time?"
18:17 masak lucs: sorear and moritz solved it to my satisfaction.
18:18 lucs masak: Will I find their solution if I keep reading the backlog?
18:18 masak depends if you skim or not :P
18:19 lucs :)
18:24 lucs I think I misphrased my question. What I'm trying to get at is something like: "In 100% of test runs, there will be at most 40 matches in the other box. In 98.3% (wild guess), there will be at most 39 matches left in the other box. ... . In ?% of test runs, there will be at most X matches left in the other box."
18:25 masak lucs: that's what a distribution describes.
18:26 lucs Oh. Isn't it known how to solve that? Can't be that hard, can it?
18:28 masak sorear and moritz already did, so it's certainly possible :)
18:28 * Woodi was again catched by backlog :)  http://static.themetapicture.com/media/funny-Facebook-distraction-check-me.jpg
18:30 lucs masak: Aha. Got it. Thanks.
18:37 orafu joined #perl6
18:37 soh_cah_toa joined #perl6
18:42 jlaire it's very basic dynamic programming
18:42 jlaire for relatively small values of 40 :)
18:44 masak :)
18:44 masak I've always felt that "dynamic programming" is way too bombastic a term for the actual concept.
18:45 jlaire me too
18:45 jlaire but it's standard
18:46 jlaire what confuses me even more is that many people find it difficult to understand
18:46 jlaire and some algorithm texts treat it as an advanced concept
18:46 masak "subproblem caching" would've been fine.
18:47 jlaire that's descriptive
18:51 masak "dynamic programming" is like deciding to call closures "extreme code objects".
18:53 jlaire .oO( dynamic code object )
18:55 masak or choosing to call constants "public static final"...
19:01 TimToady some of us are catty, and some of us are just dogged...
19:01 diakopter some are fishy
19:02 masak or sheepish.
19:02 * TimToady is bullish
19:03 TimToady but occasionally just bullheaded
19:03 * moritz is CamliaCased
19:03 masak 不是 :)
19:04 jlaire niecza: sub f($n) { my @p; @p[0][$n] = @p[$n][0] = 1; for 0..40 -> $x { for 0..40 -> $y { @p[$x][$y] //= 0; @p[$x+1][$y] += @p[$x][$y]/2 if $y > 0; @p[$x][$y+1] += @p[$x][$y]/2 if $x > 0; } }; @p[40][40] }; my @dist = (0..40).map: { f($_) }; say [+] @dist; say ~@dist
19:04 p6eval niecza v9-46-g16ef0c8: OUTPUT«1␤0/1 0.0900535481254757 0.0900535481254757 0.0888840215264435 0.0865449683283792 0.083083169595244 0.0785921874549606 0.0732091609169496 0.0671083975072038 0.0604920766262119 0.0535786964403591 214859239356147155/4611686018427387904 0.0397386751092177 3829…
19:05 Woodi 'Whatever    Wildcard (like Any, but subject to do-what-I-mean via MMD)' what is MMD ? and is it 'just DWIM' ?
19:05 moritz MMD = Multi Method Dispatch
19:06 TimToady using the term "method" loosely
19:06 jlaire niecza: sub f($n) { my @p; @p[0][$n] = @p[$n][0] = 1; for 0..40 -> $x { for 0..40 -> $y { @p[$x][$y] //= 0; @p[$x+1][$y] += @p[$x][$y]/2 if $y > 0; @p[$x][$y+1] += @p[$x][$y]/2 if $x > 0; } }; @p[40][40] }; say f(40) == 1/2**39
19:06 p6eval niecza v9-46-g16ef0c8: OUTPUT«Bool::True␤»
19:06 moritz maybe "MD" would have been more appropriate, but Mr. Mark Dominus might have objected :-)
19:06 TimToady or thinking of function calls as method calls on a lexical scope
19:06 moritz oh wait, that'd be MJD
19:07 gbacon you can't ... oh,  nevermind
19:07 TimToady anyhoo, we aren't picky about that
19:07 moritz jlaire++
19:07 TimToady gbacon: lemme guess, the next word is "just"
19:08 masak moritz: Multi-Junction Dispatch :P
19:08 Woodi but should i use Whatever to undefine field containing possible error text or Any or Mu ? just '' is defined ?
19:08 gbacon TimToady: we are the dreamers of dreams
19:09 Woodi EtoManyChoises
19:09 moritz Woodi: probably Any
19:09 moritz nom: my $x = enum A <b c d>; say $x.WHAT
19:09 TimToady probably Nil, if you're undefining something
19:09 p6eval nom 09a598: OUTPUT«A()␤»
19:09 moritz nom: my $x = enum A <b c d>; say $x.HOW
19:09 p6eval nom 09a598: OUTPUT«Method 'gist' not found for invocant of class 'Perl6::Metamodel::EnumHOW'␤  in sub say at src/gen/CORE.setting:4859␤  in <anon> at /tmp/hKo9p7zF2k:1␤  in <anon> at /tmp/hKo9p7zF2k:1␤␤»
19:10 TimToady or just undefine() it
19:10 Woodi ok, i undefine and check :)
19:10 TimToady perl6: my Int $x = Any;
19:10 p6eval niecza v9-46-g16ef0c8: OUTPUT«Potential difficulties:â�¤  $x is declared but not used at /tmp/SR9l8wFV70 line 1:â�¤------> [32mmy Int [33mâ��[31m$x = Any;[0mâ�¤â�¤Unhandled exception: Nominal type check failed for scalar store; got Any, needed Int or subtypeâ�¤  at /tmp/SR9l8wFV70 line 0 (MAIN …
19:10 p6eval ..rakudo 09a598: OUTPUT«Type check failed in assignment to '$x'; expected 'Int' but got 'Any'␤  in <anon> at /tmp/XfK0aa5gTm:1␤  in <anon> at /tmp/XfK0aa5gTm:1␤␤»
19:10 p6eval ..pugs:  ( no output )
19:10 buubot_backup joined #perl6
19:10 TimToady perl6: my Int $x = Nil;
19:10 p6eval rakudo 09a598: OUTPUT«Type check failed in assignment to '$x'; expected 'Int' but got 'Nil'␤  in <anon> at /tmp/9KQJ39klXi:1␤  in <anon> at /tmp/9KQJ39klXi:1␤␤»
19:10 p6eval ..niecza v9-46-g16ef0c8: OUTPUT«Potential difficulties:â�¤  $x is declared but not used at /tmp/sGUCQ43ITM line 1:â�¤------> [32mmy Int [33mâ��[31m$x = Nil;[0mâ�¤â�¤Â»
19:10 p6eval ..pugs: OUTPUT«*** No such subroutine: "&Nil"␤    at /tmp/QLOVkvee3y line 1, column 8-16␤»
19:11 masak moritz: I'll just submit that EnumHOW.gist thing as a rakudobug
19:11 moritz nom: my $x = (enum A <b c d>).enums; say $x.WHAT
19:11 p6eval nom 09a598: OUTPUT«Hash()␤»
19:11 TimToady well, niecza gets it right
19:11 moritz nom: my $x = (enum A <b c d>).enums; say $x.perl
19:11 p6eval nom 09a598: OUTPUT«{"b" => 0, "c" => 1, "d" => 2}␤»
19:13 Woodi perl6: return undef;
19:13 p6eval pugs: OUTPUT«*** Cannot use this control structure outside a 'routine' structure␤    at /tmp/T2LTUM4cmV line 1, column 1-13␤»
19:13 p6eval ..rakudo 09a598: OUTPUT«===SORRY!===␤Unsupported use of undef as a value; in Perl 6 please use something more specific:␤  Mu (the "most undefined" type object),␤ an undefined type object such as Int,␤  Nil as an empty list,␤  !*.defined as a matcher or method,␤     Any:U as a type constraint␤
19:13 p6eval ..or…
19:13 p6eval ..niecza v9-46-g16ef0c8: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Unsupported use of undef as a value; in Perl 6 please use something more specific:â�¤       Mu (the "most undefined" type object),â�¤ an undefined type object such as Int,â�¤  Nil as an empty list,â�¤  :!defined as a matcher,â�¤        Any:U as
19:13 p6eval ..a typ…
19:15 mkramer joined #perl6
19:16 moritz quick poll: should IO::Socket.recv return a Buf or a Str?
19:16 dalek rakudo/nom: a352f1b | moritz++ | src/core/Buf.pm:
19:16 dalek rakudo/nom: Buf.bytes and .chars
19:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a352f1b586
19:16 dalek rakudo/nom: e305cff | moritz++ | src/core/IO/Socket.pm:
19:16 dalek rakudo/nom: in IO::Socket.recv, interpret $bufsize as a maximal length, not a minimal one
19:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e305cffa9a
19:17 moritz are enums 'our' by default?
19:17 Woodi perl6: class A { has $!er = 'Err'; method b{ $!er.undefine } }; my $a = A.new; $a.b();
19:17 p6eval pugs:  ( no output )
19:17 p6eval ..rakudo 09a598: OUTPUT«Method 'undefine' not found for invocant of class 'Str'␤  in method b at /tmp/CrJyWSTlEl:1␤  in <anon> at /tmp/CrJyWSTlEl:1␤  in <anon> at /tmp/CrJyWSTlEl:1␤␤»
19:17 p6eval ..niecza v9-46-g16ef0c8: OUTPUT«Unhandled exception: Unable to resolve method undefine in class Str␤  at /tmp/7S1lk4E5Ej line 1 (MAIN A.b @ 4) ␤  at /tmp/7S1lk4E5Ej line 1 (MAIN mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2066 (CORE C971_ANON @ 2) ␤  at /home/p6eval/niec…
19:18 TimToady moritz: yes, as are all constants
19:18 TimToady since constants are just very small types :)
19:18 moritz nom: class A { enum B <a c> }; say A::B; say A::B::c
19:18 p6eval nom 09a598: OUTPUT«B()␤B::c␤»
19:18 moritz \o/
19:18 TimToady and that's one reason for it
19:18 Woodi $v.undef[ine]()should just work...
19:19 TimToady the word "undef" is banned in p6
19:19 benabik Mu
19:19 TimToady std: undef
19:19 p6eval std c22b2ee: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unsupported use of undef as a value; in Perl 6 please use something more specific:â�¤  Mu (the "most undefined" type object),â�¤ an undefined type object such as Int,â�¤  Nil as an empty list,â�¤  :!defined as a matcher,â�¤        Any:U as a type constrain…
19:20 moritz Woodi: iirc undefine() is only specced as a function, not as a method
19:20 Woodi so perl6 is less scripting language intentionally :)
19:20 jlaire T9Yur9puxN4, sErDJOP8PHc
19:21 jlaire ww.
19:21 TimToady we can't be dwimmy when we don't know what the user means
19:22 TimToady it's like asking the universe to create a quark without color
19:22 Woodi perl6: class A { has $!er = 'Err'; method b{ undefine($!er); say $!er } }; my $a = A.new; $a.b();
19:22 p6eval niecza v9-46-g16ef0c8: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤      'undefine' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 685 (CORE die @ 2) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1136 (STD P6.comp_unit @ 36)…
19:22 p6eval ..rakudo 09a598: OUTPUT«Any()␤»
19:22 p6eval ..pugs: OUTPUT«␤»
19:22 Woodi that work for me
19:23 TimToady P6 is actually more strongly typed than languages that mix up differently typed values as nil
19:23 TimToady undefs are "type charge" carriers in P6, like gluons
19:24 Woodi learning perl6, v5 was handy :)
19:24 Sarten-X joined #perl6
19:24 TimToady we still try to be handy most of the time, and even allow the user to have mushy ideas when we can figure out what they mean
19:24 TimToady but we can't always do that
19:25 dalek rakudo/nom: aed9fe7 | moritz++ | t/spectest.data:
19:25 dalek rakudo/nom: track test rename
19:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aed9fe781c
19:25 TimToady and at that point we try to give sufficient feedback as to what kind of distinction they need to learn to make
19:25 Woodi TimToady: backward compatybility is important when it is possible...
19:25 TimToady sure, but that's the one thing we were intentionally breaking in P6 from the start
19:28 moritz TimToady: I find it odd that anonymous enums return a hash, while named enums return something where you have to call .enums to get to the hash
19:28 Woodi understand that, but about api... some handy conventions can be unchanged (when it is not necesary
19:28 moritz that's slightly at odds with the normal convention that omitting the name just... well, means that the result doesn't have a name anymore
19:29 * Woodi stops complains :)
19:32 TimToady undef was also a syntactic problem in that it confuses the term/operator expectations, when P6 is trying to keep that as unambiguous as possible.
19:32 TimToady std: Mu $_
19:32 p6eval std c22b2ee: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a row at /tmp/HlWyXUiJ7O line 1:â�¤------> [32mMu [33mâ��[31m$_[0mâ�¤    expecting any of:â�¤       bracketed infixâ�¤        infix or meta-infixâ�¤    statement modifier loopâ�¤Parse failedâ�¤FAILED 00:01 120mâ�¤Â»
19:32 masak TimToady: why is that a problem for 'undef', though, and not for '*'?
19:32 TimToady p6 knows that Mu is a term in a way that p5 can't know about undef
19:33 TimToady * is simply a term, and never takes an argument
19:33 masak oh, troo
19:33 TimToady (undef) and (undef $x) are two completely different things in p5
19:34 TimToady p5 only gets away with it most of the time because few infix operators start with a sigil, and none of the ones that do make sense with undef on the left
19:35 ZapZ_ joined #perl6
19:35 TimToady but we want to be more extensible, and that means we can't predict the future contents of the infix namespace, or the sigil namespace for that matter
19:36 TimToady or if we'll even have sigils in some dialects
19:36 masak TimToady: quietfanatic called you a "language designer designer" on Twitter. I'm starting to see how that's very accurate. :)
19:37 [Coke] masak: My sundays are ... I have no idea if I'm free.
19:37 TimToady well, that probably makes Paul Graham a language designer designer designer, at least in terms of thinking about a 100-year language
19:37 [Coke] I just got back from a slightly unexpected 3 hour volunteering stint at the local elementary school, and am too zoned to *SQUIRREL*!
19:37 masak [Coke]: ok. sounded like mberends might have trouble any other day. but I'll field the question to him Justin Case.
19:38 buubot_backup joined #perl6
19:40 TimToady the syntactic categories can change however they want, but TTIAR is how we keep infixes and prefixes in different namespaces, and nospace is how we keep infixes and postfixes in different namespaces.  So TTIAR and nospace are more fundamental.
19:40 TimToady s/nospace/unspace/ if you prefer
19:41 [Coke] masak: I really really don't have time to learn haskell. ;)
19:41 TimToady we probably need a separate name for that concept
19:41 TimToady you can learn it lazily
19:42 gbacon joined #perl6
19:42 Woodi i hear monads are obsolote :)
19:42 masak [Coke]: so... you want to help with Pugs, but you'd prefer not to have to learn Haskell? :)
19:43 masak Woodi: Monads are outside of time, and incapable of becoming obsolete :P
19:43 TimToady just write an emitter for STD that emits Haskell as you understand it, and then let someone else fix the bugs.  :)
19:45 dalek roast: 44efcc5 | moritz++ | S (2 files):
19:45 dalek roast: rename S02-types/enum.t to S12-enums/misc.t and delete lots of crufty tests
19:45 dalek roast: review: https://github.com/perl6/roast/commit/44efcc5366
19:45 dalek roast: 62d5ffd | moritz++ | S12-enums/misc.t:
19:45 dalek roast: tests for conflicts between enums and subs (RT #63650)
19:45 dalek roast: review: https://github.com/perl6/roast/commit/62d5ffdaa6
19:45 * TimToady wonders if the Arrow of time is necessarily outside of time...
19:45 masak I should hope so!
19:46 TimToady then why don't you?
19:46 moritz [Coke]++ # ticket triaging
19:46 masak I accidentally dropped the remote control over the Railing of Time...
19:46 TimToady .oO(Remotes fly like an Arrow)
19:48 masak *lol*
19:49 TimToady .oO(I shot my Remote in the air, and where it lands, I know not where...)
19:49 Woodi anyone else gets Method 'STORE' not found for invocant of class 'Any' all today day ?
19:50 moritz nope
19:50 TimToady nom: Any = 42;
19:50 p6eval nom 09a598: OUTPUT«Cannot assign to a non-container␤  in <anon> at /tmp/wP8sQVjuzJ:1␤  in <anon> at /tmp/wP8sQVjuzJ:1␤␤»
19:50 TimToady aww
19:50 moritz nom: my $x := Any; $x = 3
19:50 p6eval nom 09a598: OUTPUT«Cannot assign to a non-container␤  in <anon> at /tmp/r0nOAQQMd6:1␤  in <anon> at /tmp/r0nOAQQMd6:1␤␤»
19:50 moritz nom: Any.STORE
19:50 p6eval nom 09a598: OUTPUT«Method 'STORE' not found for invocant of class 'Any'␤  in <anon> at /tmp/pNE1fZetI2:1␤  in <anon> at /tmp/pNE1fZetI2:1␤␤»
19:50 moritz :-)
19:50 TimToady \o/
19:50 Woodi so probably it's my modification responsible :)
19:51 TimToady this wouldn't happen in Haskell :)
19:52 DarthGandalf joined #perl6
19:52 moritz nom: say Mu.^can('gist')
19:52 p6eval nom 09a598: OUTPUT«gist␤»
19:52 moritz nom: say ClassHOW.^can('gist')
19:53 p6eval nom 09a598: OUTPUT«Could not find sub &ClassHOW␤  in <anon> at /tmp/qoP1b_RgWo:1␤  in <anon> at /tmp/qoP1b_RgWo:1␤␤»
19:57 masak wow. so, I've started to translate the pack.t test file from Perl 5 to Perl 6. this current test *opens the perl executable*, reads 8192 bytes, then runs unpack in two different ways and checks the results against each other.
19:58 masak I'm... I'm not sure I want to have a spectest that does that.
19:58 masak :)
19:58 daniel-s joined #perl6
19:59 * masak decides to hardcode the first 8192 bytes of his perl executable into the test file instead
20:02 moritz nom: say ([+] *.list).([1, 2, 3])
20:02 p6eval nom aed9fe: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:␤:(Mu, Mu %_)␤␤  in method Numeric at src/gen/CORE.setting:602␤  in sub infix:<+> at src/gen/CORE.setting:1924␤  in sub <anon> at src/gen/CORE.setting:7356␤  in <anon> at /tmp/TUbeM6…
20:02 moritz should that work?
20:02 TimToady Truman beat Dewey when I was -7, sigh
20:03 TimToady er, no, that was when I was -6
20:03 TimToady I forget...
20:04 TimToady moritz: no, whatevers don't do anything in lists
20:05 dalek niecza: 4266b44 | (Paweł Murias)++ | / (4 files):
20:05 dalek niecza: Argumentless method call on perl5 objects.
20:05 dalek niecza: review: https://github.com/sorear/niecza/commit/4266b4443c
20:05 pmurias sorear: how can i create an STable which inherits from Any?
20:06 sorear pmurias: look at NewWrapper in nieczaCLR.cs
20:07 moritz http://www.perlmonks.org/?node_id=927675 # any neat Perl 6 solutions?
20:07 sorear pmurias: chromatic has said in so many words that he ignores niecza because Microsoft.  He can't be alone.
20:07 TimToady nom: (class {}).HOW
20:07 p6eval nom aed9fe:  ( no output )
20:08 TimToady nom: (class {}).HOW.say
20:08 moritz sorear: I think chromatic ignores niecza because otherwise he'd have to admit that you don't need parrot for running Perl 6
20:08 p6eval nom aed9fe: OUTPUT«Method 'say' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤  in <anon> at /tmp/uG7ta6Zl9d:1␤  in <anon> at /tmp/uG7ta6Zl9d:1␤␤»
20:08 masak moritz: that does sound like chromatic.
20:08 TimToady nom: (class {}).HOW.Str
20:08 p6eval nom aed9fe: OUTPUT«No applicable candidates found to dispatch to for 'Str'. Available candidates are:␤␤  in hash Str at src/stage2/NQPCORE.setting:57␤  in <anon> at /tmp/95FwJHSrhf:1␤  in <anon> at /tmp/95FwJHSrhf:1␤␤»
20:08 TimToady nom: (class {}).HOW.gist.say
20:08 p6eval nom aed9fe: OUTPUT«Method 'gist' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤  in <anon> at /tmp/rQEr_D4akr:1␤  in <anon> at /tmp/rQEr_D4akr:1␤␤»
20:08 masak moritz: I haven't been picking up much resistance to the idea that Rakudo is free to explore other VMs from any Parrot developers aside from chromatic.
20:09 TimToady nom: say (class {}).^methods
20:09 p6eval nom aed9fe: OUTPUT«eager elems end classify infinite flat hash list pick roll reverse sort values keys kv pairs Array grep first join map min max minmax postcircumfix:<[ ]> at_pos all any one none postcircumfix:<{ }> reduce ACCEPTS WHERE WHICH WHY Bool so defined new CREATE bless BUILDA…
20:10 TimToady nom: say (class {}).^methods(:local)  # still want default to not be :all
20:10 donri does temp $*CWD make sense?
20:10 p6eval nom aed9fe: OUTPUT«␤»
20:10 diakopter moritz: I wouldn't say chromatic totally ignores niecza; he mentions it in a blog post and slightly explains why he can't consider using it
20:10 flussence the only realistic reason I can come up with to avoid mono is "the people developing it sound nasty", but by that logic I may as well avoid parrot too.
20:11 diakopter mono folks are the kindest around
20:11 flussence I've seen them say pretty nasty things to distro package maintainers; they don't look like the sort of people I'd want to deal with...
20:12 masak moritz: that meditation is a very interesting read. thank you.
20:12 diakopter flussence: oh
20:12 masak diakopter: I think moritz meant "ignores" as in "won't use".
20:12 masak for his own projects and so.
20:12 pmurias diakopter: where can i find chromatics blog?
20:13 diakopter modernperlbooks dot something
20:13 diakopter er
20:13 sorear 0 i.~ +./"1 arr  -- works :>
20:13 diakopter modernperlbook
20:13 flussence diakopter: this sort of thing specifically - http://blog.flameeyes.eu/2009/07/04/the-neverending-fun-of-debugging-a-debugger
20:13 diakopter pmurias: http://www.modernperlbooks.com/mt/index.html
20:15 pmurias found it, it seems chromatic generally dislikes mono instead of the patents being the main reason
20:16 im2ee Can i add something to new method? Without changing default action? And how if yes :)
20:16 masak nom: my @array = [1, 1, 1, 1, 1], [0, 1, 1, 0, 0], [0, 0, 0, 0, 1], [0, 0, 0, 0, 0], [0, 1, 0, 1, 0]; say @array.pairs.first({ all(@(.value)) == 0 }).key
20:16 p6eval nom aed9fe: OUTPUT«3␤»
20:16 masak moritz: ^
20:17 moritz masak: that was my first solutioin too :-)
20:17 moritz I also have
20:17 moritz say @array.pairs.first({ 0 == [+] .value.list}).key;
20:18 im2ee masak, what means "{ all(@(.value)) == 0 }"
20:18 im2ee ? :)
20:18 flussence (all values of (.value in list context)) == 0
20:19 masak moritz: well, as long as you know you don't have negative values in the array...
20:19 masak im2ee: what flussence said.
20:19 moritz masak: correct
20:19 moritz I also have
20:19 moritz say @array.pairs.first({ not [||] .value.list}).key;
20:19 im2ee .value == $_.value, right? :)
20:19 masak aye.
20:19 TimToady um, 0 == [+] is wrongish
20:19 TimToady -1 + 1 == 0
20:19 masak TimToady: I pointed that out above :P
20:20 moritz you can >>.abs if you allow negative numbers
20:20 TimToady oic
20:20 moritz masak: oh, and all(..) == 0  can be simplified to none()
20:20 masak oh!
20:20 masak of course!
20:20 moritz http://www.perlmonks.org/?node_id=927681
20:20 masak I even thought that before starting, but subsequently forgot...
20:20 sorear flussence: Having read that blog post, I side with miguel and directhex.  They're two of the nicest people I know outside here and I don't think their responsese were out of line at all
20:21 masak moritz++
20:21 donri what is the purpose of "fail", given that it seems to only/mainly do string errors?
20:21 TimToady seems to me that a lazy .[0] doesn't need .first
20:21 masak sometimes I want to write @.pairs.first(...).key as @.first(...) :key
20:22 flussence sorear: probably. It's not like gentoo's devs are saints themselves...
20:22 mishin_ joined #perl6
20:22 masak TimToady: .first(...) is a nice Huffmanization of .grep(...)[0]
20:22 donri also fail seems to be fatal for me (old rakudo though) but specs say default is no fatal
20:24 TimToady fail can contain any unthrown exception
20:24 TimToady and it's only supposed to throw it if it isn't checked at some point
20:24 TimToady or if the user has 'use fatal' in effect
20:25 carlin joined #perl6
20:25 TimToady but most of the time, as soon as the failure gets into void context, it should throw
20:25 donri ah, i see
20:25 DarthGandalf joined #perl6
20:25 moritz not that the implementation of fail() in the old rakudo was quite bad
20:25 moritz nom's is still bad, though not quite as bad
20:26 donri also, why is 'die' *not* fatal? :)
20:26 moritz it is not?
20:26 moritz where?
20:26 moritz when?
20:26 donri well it's not exiting
20:26 moritz example?
20:26 donri or is that just the interactive shell?
20:26 moritz could be
20:27 moritz there it's a feature :-)
20:27 TimToady it's a game where you get multiple lives
20:27 donri but then, why is "fail" fatal in the shell?
20:27 TimToady nom: say Failure.gist
20:27 p6eval nom aed9fe: OUTPUT«Failure()␤»
20:28 buubot_backup joined #perl6
20:28 moritz donri: bug
20:28 TimToady nom: say Failure
20:28 p6eval nom aed9fe: OUTPUT«Failure()␤»
20:28 TimToady nom: print Failure
20:28 p6eval nom aed9fe: OUTPUT«Use of uninitialized value in string context␤»
20:28 donri is "nom" back, i thought that was "rakudo" now
20:28 TimToady rakudo is the generic name
20:28 moritz 'nom' and 'rakudo' are synonyms, as far as p6eval is concerned
20:28 TimToady nom is the version name
20:28 donri my local install: This is Rakudo Perl 6, version 2011.04 built on parrot 3.3.0
20:29 TimToady the next major version will be rakudo but not nom
20:29 donri le old
20:29 masak perl6: say "lots of different vowels".comb("o").elems
20:29 p6eval pugs: OUTPUT«3␤»
20:29 p6eval ..rakudo aed9fe: OUTPUT«No applicable candidates found to dispatch to for 'comb'. Available candidates are:␤:(Str, Mu %_)␤:(Str, Regex $pat, Any $limit, Any $match, Mu %_)␤:(Cool, Mu %_)␤:(Cool, Regex $matcher, Any $limit, Mu %_)␤␤  in method comb at src/gen/CORE.setting:1559␤  in <anon> …
20:29 p6eval ..niecza v9-47-g4266b44: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class Str␤  at /home/p6eval/niecza/lib/CORE.setting line 296 (CORE Cool.comb @ 8) ␤  at /tmp/FO7g6fm77X line 1 (MAIN mainline @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2066 (COR…
20:29 masak b: say "lots of different vowels".comb("o").elems
20:29 p6eval b 1b7dd1: OUTPUT«No applicable candidates found to dispatch to for 'comb'. Available candidates are:␤:(Mu : Any :limit($limit);; *%_)␤:(Mu : Regex $matcher, Any $limit = { ... }, Any :match($match);; *%_)␤␤  in main program body at line 22:/tmp/vplMQUpZml␤»
20:29 masak oh, well.
20:29 donri so what is "b"? :)
20:30 TimToady the one b-fore
20:30 moritz the old rakudo
20:30 donri "buggy"
20:30 TimToady beta, but don't say that!
20:30 masak "B-star"
20:30 moritz beijing # codename of last release
20:31 TimToady so this one should also be c:
20:31 masak c as in "gamma" :)
20:31 TimToady which would confuse the heck out of DOS programmers...
20:31 masak C:\>
20:31 masak those were the newer DOSes.
20:32 masak the older ones were just A>
20:32 * moritz wants a new HPMoR chapter, but EY seems to be quite busy otherwise :(
20:32 TimToady spivaking won't rescue ambiguous pronouns :)
20:32 masak moritz: I've been reading a bit of his other stuff. it's generally very high quality.
20:33 masak TimToady: it wasn't a spivak, it's his initials :P
20:33 moritz masak: right, but most of it isn't quite as entertaining as hpmor
20:33 masak moritz: right.
20:35 TimToady you could also use [==] 0, @list
20:36 TimToady and that is supposed to short circuit as well
20:36 masak ooh
20:37 masak what's the colloquial way to compare two Buf variables for equality?
20:37 moritz that one is nice
20:37 TimToady that's after a DOH! moment when I wrote 0 == [==] @list
20:37 moritz masak: infix:<eqv>
20:37 masak thanks.
20:37 moritz (works both in b and in nom)
20:37 masak moritz++
20:38 moritz nom: say $*IN.read(2) eqv $*IN.read(2)
20:38 p6eval nom aed9fe: OUTPUT«Bool::False␤»
20:38 TimToady [==] also has the benefit of coercing to numeric
20:38 moritz nom: say Buf.new(1, 2) eqv Buf.new(1, 2)
20:38 p6eval nom aed9fe: OUTPUT«Bool::True␤»
20:38 masak I'm making good headway into the pack.t file, actually.
20:38 moritz TimToady: just how stringy is Buf?
20:38 moritz TimToady: should infix:<eq> work on bufs? what aboug gt/ge/lt...
20:39 masak automatic translation of pack.t is out of the question. at least in 2011.
20:39 TimToady I think all those can usefully work if defined as integer comparisons, even without assuming ASCII
20:39 * moritz thought so
20:41 * masak .oO( oh right, *that's* what prefix:<~> means in Perl 5... oh dear... )
20:42 masak people, what would you say a decent translation of Perl 5's C< ~0 > would be?
20:42 TimToady -1
20:43 masak ok :)
20:43 TimToady perl6: say +^0
20:43 p6eval pugs, rakudo aed9fe, niecza v9-47-g4266b44: OUTPUT«-1␤»
20:43 masak my local Perl 5 says 18446744073709551615
20:43 TimToady wowee
20:43 moritz Inf?
20:44 masak moritz: minus one :)
20:44 TimToady 2 ** 64 - 1
20:44 masak nodnod
20:44 bazqux joined #perl6
20:44 masak 2 ** 64 is the number I never memorized, remember? :/
20:45 masak a girl in my class did, and recited it to me, triumphantly.
20:45 TimToady me either, but if it's about that long, and starts with 18, it probably is :)
20:45 masak yeah :)
20:45 masak that's my rule of thumb too.
20:45 masak 2 ** 32 is one of my favorite numbers.
20:46 masak perl6: say 2 ** 32
20:46 p6eval pugs, rakudo aed9fe, niecza v9-47-g4266b44: OUTPUT«4294967296␤»
20:46 TimToady in anime you can tell all the autistic girls because they have blue-ish hair
20:46 masak TimToady: oh! I thought that was just in Soranowoto
20:50 donri rakudo website is wrong: nom is the default branch of git, so the steps are the opposite - need to git checkout to get non-nom, not to get nom
20:50 masak ソ・ラ・ノ・ヲ・ト
20:51 TimToady ヲ, not を?
20:52 TimToady innersting
20:52 TimToady well, consistent, anyway
20:52 tadzik one-eyed smile, :D, needle, antenna, some futhark character?
20:53 pmurias joined #perl6
20:53 masak TimToady: straight from Wikipedia.
20:54 masak tadzik: no, no, no, no, and no :)
20:54 tadzik dang
20:54 TimToady it's just ヲ is usually considered somewhat archaic
20:54 tadzik ト likes a piece of futhark
20:54 masak characters have no likes or dislikes.
20:55 buubot_backup joined #perl6
20:56 tadzik arm, right
20:56 tadzik well, nope
20:56 tadzik for example, Arya doesn't like sewing
20:56 tadzik she's a character with a dislike :)
20:57 worr joined #perl6
20:57 masak :P
20:57 masak I stand corrected.
20:57 masak or at least confused.
20:57 tadzik fair enough
20:57 masak she likes needles, though :)
20:57 im2ee how are You tadzik ? :)
20:57 tadzik some of them, yes
20:57 tadzik im2ee: pretty fine, thanks :) How are things?
20:58 TimToady ウオ is the usual way to write ヲ these days
20:58 TimToady that's how my last name starts out, in fact
20:58 im2ee tadzik, good enough :)
20:58 tadzik Toady? :)
20:59 TimToady no, that's my first name
20:59 * sorear thinks vowels are funny
20:59 * TimToady thinks vowels is funny
21:00 * tadzik never knows which are which
21:00 sorear suprissed it's not ワ...
21:00 im2ee Hm, can i add to default "new" method of class actions some of own action? I want to save "auto-assigning" and add some own functions :)
21:00 TimToady that's wa, not uo
21:00 masak tadzik: vowels are the ones you say vocally. consonants are the ones you sound with. :P
21:01 DarthGandalf joined #perl6
21:01 bluescreen10 joined #perl6
21:01 masak im2ee: sounds like you want a BUILD submethod.
21:01 TimToady vowels are the continuants in the middle of a syllable
21:01 im2ee masak, probably :) in BUILD submethod i don't have to writing all assigning stuff? :)
21:01 TimToady so anything that's not a stop or affricate can function as a vowel
21:02 TimToady my favorite is the one in psst
21:02 sorear there seems to be a lot more consistency between languages in the consonants than in the vowels
21:02 masak im2ee: there's a way to write them in the siggie of the BUILD.
21:03 TimToady and what is the vowel in the second syllable of "didn't"?
21:04 tadzik y
21:04 tadzik di-dynt
21:04 sorear I hear a pure consonant. d-i-dn, t
21:05 tadzik how do you say 'dn'? For me it's quite like 'dyn', in my pronounciation of 'dyn'
21:05 TimToady I'm referring to the dialect in which your tongue never leaves your alveolar ridge between the middle d and the final t
21:05 TimToady all we really do in my dialect is open up our nose to let the n out
21:05 im2ee masak, thanks. :)
21:05 TimToady and that's the vowel
21:05 benabik The vowel is ', obviously.
21:06 masak didənt
21:06 TimToady well, to be precise, [n] is the vocoid, and /'/ is (perhaps) the vowel :)
21:07 masak the schwa. it's always the schwa.
21:07 TimToady only there is no ə in my dialect that is not already nasalized
21:07 tadzik e sounds funny when you stand on your head I suppose
21:07 masak məh.
21:07 TimToady my tongue touches twice, not three times
21:07 masak mine once.
21:08 masak oh wait, twice.
21:08 TimToady you do you pronouce the did then
21:08 TimToady right
21:08 masak things get complicated once you start thinking about them :P
21:08 * sorear has to look up what an alveolar ridge is
21:08 TimToady indeed, lots of etic vs emic distinctions here, which is why it's the prototype for all etic/emic distinctions
21:09 * sorear knew ey didn't inhale eir tounge :)
21:09 TimToady well, you do with clicks
21:09 TimToady kinda
21:10 TimToady I'd say, don't get me starting on phonetics, but it's kinda too late...
21:10 masak hah, just got callbinding errors because of whitespace between function name and parentheses. the perils of translating from p5 to p6... I never make that error when writing Perl 6 from scratch.
21:13 japhb rakudo: given "a" { if /^(a)$/ { say $0 } }
21:13 p6eval rakudo aed9fe: OUTPUT«a␤»
21:13 japhb rakudo: given "a" { when /^(a)$/ { say $0 } }
21:13 p6eval rakudo aed9fe: OUTPUT«Nil␤»
21:13 japhb ^^ known?
21:14 packetknife joined #perl6
21:15 masak b: given "a" { when /^(a)$/ { say $0 } }
21:15 p6eval b 1b7dd1: OUTPUT«a␤»
21:15 masak japhb: probably part of the whole regexes not being quite done in nom yet thing.
21:16 japhb masak, nodnod.  Strange effect though.  I wouldn't expect a difference between those two.
21:16 masak indeed.
21:16 * masak submits rakudobug
21:16 japhb masak, thx
21:17 flussence at last, I have something interesting to show for all those weeks of CPU time... https://github.com/flussence/specgraphs/raw/master/impls.png
21:18 masak flussence: wow, cool! flussence++
21:18 masak I swear Niecza *feels* more implemented than just 25% of Rakudo's features...
21:19 tadzik oo, that's cool
21:19 masak but maybe there's a bias in there, given that most of the spectest suite has been built for/adaptet to Rakudo.
21:19 flussence just because the lines overlap that way doesn't mean the features do :)
21:19 masak adapted*
21:19 flussence (there's a huge grey area that nom doesn't do yet...)
21:20 dalek niecza: a20956d | (Paweł Murias)++ | / (3 files):
21:20 dalek niecza: Arguments are passed to perl 5 methods.
21:20 dalek niecza: review: https://github.com/sorear/niecza/commit/a20956d999
21:20 colomon masak: I think a large-scale effort to get the spectest fudged for Niecza would get it to more like 75%
21:21 TimToady features probably gives a better comparison
21:21 * colomon has 90% of trig working on his local copy of Niecza, just need to figure out how to elegantly integrate it to the basic build.
21:24 flussence also, the niecza numbers on my graphs are slightly more correct since it checks out t/spec at a matching date, whereas I just use make spectest on rakudo which does a git pull
21:24 flussence (if someone wants to copy-paste the code I'm using for that to make rakudo's makefile DTRT, go ahead)
21:26 masak colomon: that feels reassuring. the 75% figure, I mean.
21:27 pmurias colomon: what's the tricky part with the integration?
21:31 im2ee b: class abc { has $.lol = 'abc'; submethod BUILD { say $.lol; }}; my $abc = abc.new();
21:31 p6eval b 1b7dd1: OUTPUT«Any()␤»
21:31 im2ee why? :)
21:31 pmurias sorear: what do the STable entries do?
21:32 tadzik im2ee: rakudobug
21:32 tadzik im2ee: thought it's fixed in nom
21:32 im2ee nom: class abc { has $.lol = 'abc'; submethod BUILD { say $.lol; }}; my $abc = abc.new();
21:32 tadzik nom: class abc { has $.lol = 'abc'; submethod BUILD { say $.lol; }}; my $abc = abc.new();
21:32 p6eval nom aed9fe: OUTPUT«Mu()␤»
21:32 p6eval nom aed9fe: OUTPUT«Mu()␤»
21:33 im2ee like in:
21:33 im2ee rakudo: class abc { has $.lol = 'abc'; submethod BUILD { say $.lol; }}; my $abc = abc.new();
21:33 p6eval rakudo aed9fe: OUTPUT«Mu()␤»
21:33 tadzik someone will now tell me it's a feature, and I'm going to whine again, and masak will join again, and we'll both be dissatisfied again :/
21:33 tadzik nom: class abc { has $.lol = 'abc'; submethod BUILD { callsame; say $.lol; }}; my $abc = abc.new();
21:33 p6eval nom aed9fe: OUTPUT«Mu()␤»
21:33 tadzik b: class abc { has $.lol = 'abc'; submethod BUILD { callsame; say $.lol; }}; my $abc = abc.new();
21:33 p6eval b 1b7dd1: OUTPUT«abc␤»
21:33 tadzik great, nothing works in nom now
21:34 masak tadzik: no, I actually understood last time.
21:34 im2ee callsame?
21:34 tadzik really?
21:34 im2ee tadzik, what is callsame? :)
21:34 masak tadzik: AFAIR, what I was dissatisfied about was just a bug in Rakudo.
21:34 tadzik so what's then new easy-like-in-Moose way?
21:34 tadzik masak: well, look above
21:34 masak tadzik: not sure I want to :)
21:34 masak I might get upset ;)
21:35 tadzik masak: tl;dr: now it's broken even with callsame :)
21:35 masak ooh!
21:35 tadzik im2ee: call the next method with this name in the MRO chain
21:35 flussence rakudo: class A { multi method foo(Int $a) { } }; A.new.?foo('str'); say 'alive'
21:35 p6eval rakudo aed9fe: OUTPUT«No applicable candidates found to dispatch to for 'foo'. Available candidates are:␤:(A, Int $a, Mu %_)␤␤  in method foo at src/gen/CORE.setting:250␤  in method dispatch:<.?> at src/gen/CORE.setting:711␤  in <anon> at /tmp/dxrWCth0YM:1␤  in <anon> at /tmp/dxrWCth0YM…
21:35 masak well, that's just reality not living up to Platonic reality. I can live with that :)
21:35 tadzik im2ee: so in this case, we default to the default BUILD
21:35 flussence should that work?
21:35 tadzik flussence: I don't think so
21:35 tadzik 'str' in not an Int
21:36 flussence but I'm using .? to call it...
21:36 tadzik oh, I see what you mean I think
21:36 tadzik and I don't know how exactly .? should work too ;)
21:36 im2ee What is .? for? :)
21:36 tadzik I read it as $a.can('foo') && $a.foo
21:36 flussence rakudo: class A { }; A.new.?foo('str'); say 'alive'
21:36 p6eval rakudo aed9fe: OUTPUT«alive␤»
21:36 tadzik in which case that'd be right
21:36 tadzik because A can foo()
21:36 masak what's the colloquial way in Perl 6 to leave a do-once block?
21:36 flussence im2ee: it works the same as in p5 regex
21:37 im2ee flussence, ok, thanks. :)
21:37 flussence (?, + and * work)
21:37 im2ee Great. :)
21:37 TimToady <ingy> and how do I get 2 or more? <masak> we have inline actions, so we don't need extra syntax ;P  <--- neither of you understands % yet
21:37 TimToady <stuff> ** 2..* % <comma>
21:37 tadzik masak: my first thought is do { } while 0; and break inside
21:37 im2ee tadzik, what means "int the MRO chain"? :)
21:38 tadzik or however is 'break' in Perl 6
21:38 masak TimToady: oh! of course!
21:38 masak TimToady: it totally subsumes all of ingy's use cases.
21:38 donri "succeed"?
21:38 benabik left #perl6
21:38 masak TimToady: I understand it, I just don't grok it yet :)
21:38 tadzik im2ee: MRO is Method Resolution Order. It's your class, then the parent classes, then their parents and so on, til the beginning of time
21:38 masak tadzik: that would be 'repeat { } while 0'.
21:38 tadzik masak: mebbe, yes
21:39 colomon pmurias: the trig functions are autogenerated.  I mostly just need to figure out how to properly add that to the niecza build toolchain.
21:39 masak tadzik: 'do' does something differently in Perl 6.
21:39 tadzik there are things that, for some reason, I don't use outside of C
21:39 masak donri: "succeed" is actually a nice suggestion.
21:40 masak donri: I could do that from within a 'given' block, which "loops" once :)
21:40 pmurias colomon: what is the autogenerator written in?
21:40 im2ee tadzik, so callsame calls "new" method?
21:40 colomon pmurias: p5
21:40 tadzik im2ee: why "new"?
21:40 tadzik im2ee: I'll write an example
21:40 pmurias colomon: is p5 already a niecza dependency?
21:41 tadzik nom: class A { method a { say 'first!' } }; class B is A { method a { callsame; say 'second!' } }; B.new.a
21:41 p6eval nom aed9fe: OUTPUT«first!␤second!␤»
21:41 sorear colomon: I recommend checking the autogenerated code into git; it's unlikely it will need to be run often
21:41 sorear pmurias: no
21:41 colomon pmurias: no idea
21:41 sorear (also I made a point of purging the p5 dependency back in Jan-Feb)
21:41 im2ee tadzik, so in my example what is called by callsame? :)
21:41 colomon sorear: ah.  just paste it into Builtins.cs?  That's how I've got it locally now
21:42 sorear colomon: I'd be more inclined to put it in lib/GeneratedTrigFunctions.cs
21:42 colomon sorear: ah!  well, then, I need to figure out how to add that file to the build process.  :)
21:43 tadzik im2ee: the default BUILD that every class gets
21:43 sorear colomon: just add it to cskernel in Makefile
21:44 im2ee tadzik, ok, i had it in mind. :)
21:44 im2ee tadzik, thanks.
21:45 tadzik you're welcome
21:45 colomon sorear: is   public partial class Builtins {    what I need to declare at the top?
21:46 sorear colomon: yes, also using Niecza; using System;
21:46 colomon sorear: yes, I figured I'd just copy the usings until it worked.  :)
21:46 colomon sorear: okay, it's dinnertime here, but I'll try to tackle the conversion before bedtime
21:50 * jnthn back
21:54 masak std: 'x'x16
21:54 p6eval std c22b2ee: OUTPUT«[31m===[0mSORRY![31m===[0m�Whitespace is required between alphanumeric tokens at /tmp/d3u6mj477c line 1:�------> [32m'x'x[33m�[31m16[0m�Check failed�FAILED 00:01 120m�»
21:54 * masak thought so
21:56 diakopte1 joined #perl6
21:56 diakopter eh
21:57 jnthn tadzik: Why do you want to callsame to BUILD?
21:58 tadzik jnthn: that worked in b
21:58 TimToady it's "unwarranted chumminess with the implementation"
21:58 jnthn tadzik: That doesn't answer my question at all.
21:58 tadzik jnthn: and I want to have attributes set in in BUILD
21:58 TimToady we need some other way of saying, "apply the defaults now"
21:58 jnthn tadzik: BUILD is for setting attributes
21:58 jnthn Anything you don't touch in BUILD is set to the default value.
21:58 tadzik jnthn: Okay, then I want the Moose's BUILD feelalike
21:59 TimToady LISTEN TO ME!!!!
21:59 TimToady thank you
21:59 TimToady I'm tired of this discussion
21:59 * jnthn also
21:59 TimToady we need a verb
21:59 TimToady do-it-now()
21:59 TimToady whatever
22:00 TimToady BUILD is highly magical, and can be magicaller
22:00 jnthn Or people could just write submethod BUILD($!x = oh-look-my-default()) { }
22:00 TimToady whatever operation is assumed at the end of BUILD, we should be able to call sooner explicitly
22:00 pmurias what would be a good niecza p5 interop example? (i need something to determine the features i need to implent first)
22:00 japhb TimToady, I have an unrelated question re: your intent with a spec item, when you have a chance.
22:00 TimToady but the point of BUILD is to build the object, not to be a hook after it gets prebuilt
22:01 TimToady I don't care how Moose misuses the term
22:01 im2ee jnthn, i wanted to make connection via IO:Socket using .new method.
22:01 TimToady japhb: go ahead
22:01 masak TimToady: +1
22:02 im2ee (...) using .new method in my class
22:02 tadzik okay, I forget about Moose and BUILD then. What is the best way to have something done just after the object is good to go?
22:02 jnthn Well, back in b we had the default BUILD be the thing that applied defaults. This was terribly broken. Now BUILDALL does all those things. There's no default BUILD in nom; we only call the user-defined ones. And defaults, applying things from the init hash, etc are all done in BUILDALL - after BUILD.
22:02 TimToady use my verb
22:03 pmurias TimToady: +1
22:03 TimToady init-now() call-it-good() set-defaults() # I don't care
22:03 TimToady write a BUILD, call the verb, and do your own stuff
22:03 TimToady but it had better not depend on anything any subclass does
22:03 japhb TimToady, the spec says that command-line arguments will be passed through the val() function to attempt to convert them to non-Str classes as appropriate (integers to Int, etc.) before passing to Main.  But it's not clear to me how *hard* val() tries to do this.  In other words, does it try to convert strings that look like integers in radix notation?  Does it change 'NaN' into a real NaN? etc.
22:04 jnthn TimToady: I can implement stuff like that.
22:04 japhb *MAIN
22:04 pmurias TimToady: so every BUILD will have to contain the special verb?
22:04 tadzik I once implemented a method AFTERPARTY which was called just after the object was fully initialized
22:05 TimToady every BUILD does already imply it
22:05 TimToady just at the end
22:05 tadzik pmurias: I read that as "it's not BUILD we're looking for"
22:05 jnthn TimToady: Are we expect to not re-do it if it was already done?
22:05 tadzik but seems like I read it wrong
22:05 jnthn TimToady: Tracking that could be annoying.
22:05 jnthn Though possible.
22:05 TimToady jnthn: yes, well, it touchs the attributes, so should just work :)
22:05 sorear TimToady: in my opinion, a method that is called after setting attributes is far more useful in most cases than what BUILD is currently specced to do
22:06 sorear TimToady: what should I call it when I implement it?
22:06 pmurias can the BUILD choose not to set attributes?
22:06 jnthn pmurias: Under current spec, any attribute that BUILD doesn't touch gets its defaults applied, or takes a value from those passed to bless.
22:07 diakopter done()
22:07 tadzik sorear++
22:07 TimToady sorear: well, I think a special verb would be more optimizable than an extra dispatch
22:07 * sorear is frustrated by the resistance the Perl 6 community has to back-stealing good ideas from Moose
22:08 masak sorear: operative word "good" :)
22:08 masak jnthn: it should be possible to tell from an attribute whether it's been initialized.
22:08 TimToady I only saw a valid use case for before and after this last summer for the first time
22:08 tadzik hell, people already workaround a lack of that
22:08 tadzik even in Rakudo's settings
22:08 masak jnthn: no tracking necessary.
22:08 masak TimToady: ooc, what was that use case?
22:09 sorear before and after: like callsame/nextsame, but better Huffmanization
22:09 jnthn masak: Well, it's more about avoding the work of re-checking.
22:09 TimToady knowing whether a subclass hid something on accident or on purpose
22:09 jnthn masak: But come of think of it, that's quite cheap these days anyway.
22:10 masak TimToady: ah. yes, makes sense.
22:10 TimToady japhb: yes, yes, and yes
22:11 masak japhb: think of val() as a side-effect-free eval()
22:11 buubot_backup joined #perl6
22:12 diakopter eval use Moose
22:12 buubot_backup diakopter: ERROR: Can't locate Moose.pm in @INC (@INC contains:) at (eval 20) line 2. BEGIN failed--compilation aborted at (eval 20) line 2.
22:12 japhb TimToady, wow, really?  That's simultaneously cool and makes me worry that people will try to write file system utilities and find out that their filenames have become Num's.  I guess as long as they perfectly roundtrip as strings, that's OK ... but radix-notated integers wouldn't roundtrip, neh?
22:13 TimToady they will if you use them as strings, that's why val() is trying hard to represent allomorphic literals
22:13 sorear japhb: values returned from &val are annotated with their original string form
22:13 sorear in a 0 but True kind of way
22:14 japhb sorear, ah, interesting.
22:16 japhb ... I had a long question, but then I think I may have figured it out, lemme see:
22:17 japhb So val() returns things that isa Num or Rat or what have you, but mix in roles that override stringification
22:17 sorear That is the idea, IIUC.
22:17 japhb interesting.
22:18 japhb Is there already a decided name for that stringification-override role?
22:19 * sorear figures it would be anonymous
22:19 jnthn Could just be an anonymous one
22:19 masak rakudo: my $val = 42 but role { method gist { "apfelstrudel" } }; say $val
22:19 p6eval rakudo aed9fe: OUTPUT«apfelstrudel␤»
22:19 masak \o/
22:19 japhb oooh
22:19 masak rakudo: my $val = 42 but role { method gist { "apfelstrudel" } }; say +$val
22:19 p6eval rakudo aed9fe: OUTPUT«apfelstrudel␤»
22:19 japhb OK, which methods do I need to override?
22:19 masak eh.
22:19 japhb darn
22:19 tadzik rakudo: my $val = 42 but role { method gist { "apfelstrudel" } }; print $val
22:19 p6eval rakudo aed9fe: OUTPUT«42»
22:19 jnthn masak: hehe
22:19 tadzik hah
22:19 jnthn masak: Numeric.Numeric returns self.
22:20 jnthn masak: It then .gists :)
22:21 jnthn Not so sure what we can do about that. It's not wrong, it is however a bit confusing.
22:21 TimToady rakudo: my $val = 42 but role { method Str { "apfelstrudel" } }; print $val
22:21 p6eval rakudo aed9fe: OUTPUT«apfelstrudel»
22:21 TimToady rakudo: my $val = 42 but role { method Str { "apfelstrudel" } }; print +$val
22:21 donri rakudo: my $val = 42 but "fourty two"; say $val
22:21 p6eval rakudo aed9fe: OUTPUT«apfelstrudel»
22:21 p6eval rakudo aed9fe: OUTPUT«No applicable candidates found to dispatch to for 'infix:<but>'. Available candidates are:␤:(Mu $obj, Positional @roles)␤:(Mu $obj, Mu $role)␤␤  in sub infix:<but> at src/gen/CORE.setting:7153␤  in <anon> at /tmp/ZC7lGe13C9:1␤  in <anon> at /tmp/ZC7lGe13C9:1␤␤»…
22:22 TimToady rakudo: my $val = 42 but role { method Str { "apfelstrudel" } }; print 0+$val
22:22 p6eval rakudo aed9fe: OUTPUT«42»
22:22 japhb Ewww.  Having +$val and 0+$val be different is surprising.
22:22 donri why doesn't mine work
22:23 TimToady I thought recent spec did it by subclassing a Num on top of a Str, but I could be hallucinating
22:23 jnthn donri: Because it relies on a curious bit of S14 that didn't make it back into nom (yet).
22:23 donri oh :)
22:23 donri b: my $val = 42 but "fourty two"; say $val
22:23 p6eval b 1b7dd1: OUTPUT«42␤»
22:23 jnthn TimToady: I can't understand "subclassing a num on top of a Str"
22:23 jnthn s/can't/don't
22:23 donri b: my $val = 42 but "fourty two"; say ~$val
22:23 p6eval b 1b7dd1: OUTPUT«42␤»
22:24 jnthn ...I'm sure I'm capable of understanding it ;)
22:24 sorear japhb: gist and Str are probably the minimal set
22:24 jnthn donri: I fear that even *if* I implement the same thing in nom as master has, it'll only give you a .Str in the role, and say looks at .gist, so it may still not work out.
22:25 sorear japhb: 0+$val eqv $val has never been true, suppose $val = [1,2]
22:25 sorear japhb: I'd find $val+1-1 !eqv $val+0 to be a more worrisome state of affai
22:25 sorear wait I misundersood you nvm
22:26 japhb I didn't say '$val' and '0+$val'.  That first one was '+$val'.  That's different.
22:26 japhb right
22:26 * japhb slow and distracted
22:26 TimToady jnthn: I'm just groping for a way to make Str consider itself to be epsilon looser than Num in a multi dispatch
22:27 jnthn TimToady: Hmm.
22:27 TimToady so it'll pick the numeric methods over the string methods
22:27 jnthn TimToady: I don't have any ideas right off...I'll ponder it some.
22:27 TimToady but for anything that doesn't want numberic params, hits the Str type
22:29 TimToady this might also work out well for allomorphic scalars coming in from Perl 5
22:31 buubot_backup joined #perl6
22:32 TimToady I mean, we could fake it by declaring all our Str params as Cool right now, but that's overkill, I think
22:34 jnthn Yeah, it feels like there should be a better way
22:34 jnthn Does this work in the slightest if we flip it around somehow, and have it be a Str with something else mixed in?
22:34 jnthn "42" but role :: does Numeric { method Numeric() { 42 } }
22:35 TimToady doesn't necessarily help with dispatching to an Int param
22:35 jnthn oh wait, that may go terribly wrong...
22:35 jnthn Yeah.
22:35 jnthn duh. :)
22:35 jnthn There's always multiple inheritance :P
22:36 jnthn You encode the epsilon narrowness in the mro :)
22:36 jnthn But...I really don't like MI solutions.
22:36 jnthn Plus you can't add extra parents by mixing in.
22:37 jnthn Well, you could if you wrote a repr that allowed it I guess.
22:37 bazqux left #perl6
22:37 jnthn oh, there maybe is a way
22:38 TimToady there's a sense in which Cool *means* Stringy
22:39 TimToady in the TCL everything is a string sense
22:39 TimToady and the numeric types just optimize away the string representation when it's redundant
22:40 im2ee Good night! :)
22:40 TimToady o/
22:42 * sorear ponders modifying the multiple dispatch system by the addition of cross-coercions between types
22:44 * jnthn dies a bit inside every time he sees "modifying the multiple dispatch system" :/
22:44 jnthn Though I wonder if something could just naturally fall out of coercion types here...somehow...
22:45 TimToady I always thought they'd just install two different entries into the list
22:45 TimToady one with the exact types, and one with the looser types
22:45 jnthn Would there be an ordering of any kind?
22:45 TimToady just according the ordering that already exists
22:46 jnthn OK
22:46 TimToady so you could think of multi foo (Int(Cool) $x) as either Int or Cool
22:46 sorear what do coercion types look like?
22:46 sorear ah
22:47 TimToady and Int() defaults to something
22:47 jnthn TimToady: To say we introduced coercion types because the "as" was in the wrong place, I still have fun remembering which way around these go.
22:47 TimToady maybe Cool, maybe Any
22:47 jnthn :)
22:47 TimToady same as the coercion, Int($cool) ends up with an Int
22:48 jnthn oh!
22:48 jnthn Good way to remember it.
22:49 TimToady but I'm not sure this is related to allomorphic preferences, since those aren't necessarily about coercion at all
22:49 jnthn Ah. Dang.
22:49 TimToady except insofar as if you use a number as a string, it has to figure something out
22:50 TimToady so maybe the Str params should be Str(), and that loosens them a bit
22:50 TimToady but not under my two-different-entries approach, alas
22:51 TimToady the other way to view Foo(Bar) types is that Foo is the only type visible inside the routine, and Bar is the only type that is visible to MMD
22:52 sorear masak: how much would we lose by allowing multi foo(Str $x) to accept a Num value?
22:53 TimToady basically, making Str a synonym for Cool
22:53 TimToady when used in a sig
22:53 TimToady seems like a hack
22:53 jnthn iiuc, it'd have to be Str() though?
22:53 TimToady well, Str() would make it official
22:54 jnthn Well, that's better than a hack. :)
22:54 jnthn Trouble is that if the default thing in the parens is any then
22:54 jnthn multi x(Str() $x) {
22:54 jnthn }
22:55 jnthn multi x(Cool $x) { }
22:55 jnthn The second is narrower.
22:55 jnthn *Any
22:56 TimToady so I'm thinking Str defaults to Cool or narrower
22:56 TimToady Str() rather
22:56 TimToady or maybe there's just some happy way to mark our coercions so they work this all out among themselves :)
22:57 TimToady but I think I like the explicit coercion-allowed-here sytnax
22:57 TimToady *nt
22:57 masak sorear: it sounds rather like Moose's type system.
22:57 TimToady otherwise you get stuck in the C++ trap of having all your semantics defined somewhere else...
22:58 TimToady well, Moose has been having to deal with allomorphism for a long time now :)
22:59 TimToady and if they've made strings a little looser than numeric types, I think that's the right direction
22:59 TimToady for when we're stuck in such a situation
23:00 TimToady which I'd only been envisioning for <1 2.3 foo> and MAIN situations, as well as input, but we can get allomorphic objects from other language, not the least of which is Perl 5
23:00 jnthn It's almost like they're a conjunction type
23:00 jnthn Well, or disjunction depending on how you see it.
23:01 TimToady well, it's one thing pretending to be different things according to context
23:01 jnthn True :)
23:01 TimToady a rather tagmemic thing, actually
23:02 TimToady Dogging a dog during the dog days of summer.
23:03 TimToady or maybe we just have a way for Str to say "I defer to Numeric when tied"
23:04 TimToady then siblings don't have to be forced into unnatural relationships
23:04 TimToady er...
23:04 geekosaur joined #perl6
23:04 sorear I propose to put that declaration in Numeric and spell it method coerce:<Str>() { self.Str }
23:04 sorear Treat any coerce: method as defining a virtual superclass
23:06 TimToady which gets back into the problems we had at the beginning with derivation, it seems like
23:07 TimToady and it just feels more like a me-first solution than a you-first solution
23:08 newsbad_com joined #perl6
23:09 TimToady not claiming to have thought it through, of course...
23:09 TimToady in fact, I'm gonna nap on it &
23:15 masak 'night, #perl6
23:18 Exodist joined #perl6
23:20 [Coke] joined #perl6
23:26 jnthn sleep &
23:41 japhb nom: 42 but role {}
23:41 p6eval nom aed9fe:  ( no output )
23:41 japhb nom: 1/2 but role {}
23:41 p6eval nom aed9fe: OUTPUT«Not enough positional parameters passed; got 1 but expected 3␤  in method BUILD at src/gen/CORE.setting:5304␤  in method BUILD_LEAST_DERIVED at src/gen/CORE.setting:573␤  in sub infix:<but> at src/gen/CORE.setting:7155␤  in <anon> at /tmp/MBijIIXbzu:1␤  in <anon> at /…
23:41 japhb ^^ Wheee, another bug
23:42 newsbad_com joined #perl6
23:53 diakopter nom: 1/(2 but role {})
23:53 p6eval nom aed9fe:  ( no output )
23:54 benabik joined #perl6
23:54 dalek niecza/serialize: f1cb241 | sorear++ | / (4 files):
23:54 dalek niecza/serialize: Implement sub definitions
23:54 dalek niecza/serialize: review: https://github.com/sorear/niecza/commit/f1cb2416ec
23:54 sorear o/ benabik
23:54 benabik o/ sorear
23:54 japhb diakopter, I had golfed that down from something that had a variable on the left of 'but' and a real role on the right; the same error pattern occurs, based on the type of the left argument.
23:58 colomon sorear: back and ready to hack.
23:58 sorear o/
23:58 benabik sorear: Anything interesting happening?  :-)
23:59 sorear v10 release on Monday
23:59 sorear and we just got out of a slightly heated discussion of MAIN coercisons

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

Perl 6 | Reference Documentation | Rakudo