Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-11-26

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 viki kyclark: never mind, it's not a bug.
00:00 viki Hmm
00:00 viki Or maybe it is.
00:01 viki Here's the crux of the issue:
00:01 viki m: my $c = "\x[33F]"; say $c.ord; say $c.ord.succ; say $c.ord.succ.chr; say $c.ord.succ.chr.ord;
00:01 camelia rakudo-moar 15f51a: OUTPUT«831␤832␤̀␤768␤»
00:01 viki it gets normalized or whatever we call it, but that normalized form is a lower .ord, so from that it soon reaches the original form and the loop continues
00:03 eisen74 joined #perl6
00:05 viki m: "\x[340]\x[300]".uninames.say
00:05 camelia rakudo-moar 15f51a: OUTPUT«(COMBINING GRAVE ACCENT COMBINING GRAVE ACCENT)␤»
00:09 viki m: .succ.chr.ord < $_ and say "{.base: 16} is problematic 'cause .succ is {.chr.ord.base: 16}" for ^0x110000
00:09 camelia rakudo-moar 15f51a: OUTPUT«33F is problematic 'cause .succ is 33F␤340 is problematic 'cause .succ is 300␤342 is problematic 'cause .succ is 342␤343 is problematic 'cause .succ is 313␤373 is problematic 'cause .succ is 373␤37D is problematic 'cause .succ is 37D␤386 is pro…»
00:10 viki m: .succ.chr.ord < $_ and say "{.base: 16} is problematic 'cause .succ is {.succ.chr.ord.base: 16}" for ^0x110000
00:10 camelia rakudo-moar 15f51a: OUTPUT«33F is problematic 'cause .succ is 300␤340 is problematic 'cause .succ is 301␤342 is problematic 'cause .succ is 313␤343 is problematic 'cause .succ is 308␤373 is problematic 'cause .succ is 2B9␤37D is problematic 'cause .succ is 3B␤386 is prob…»
00:10 viki m: my $x = 0; .succ.chr.ord < $_ and $x++ for ^0x110000; say "$x problematic codepoints"
00:10 camelia rakudo-moar 15f51a: OUTPUT«1094 problematic codepoints␤»
00:11 viki So basically such issue exists anytime your sequence has any of these 1094 codepoints in the middle of it
00:11 viki m: say ("\x[33F]" ... "\x[341]").elems
00:11 camelia rakudo-moar 15f51a: OUTPUT«63␤»
00:12 viki ... why didn't that hang :/
00:12 viki m: say ("\x[33F]" ... "\x[341]")
00:12 camelia rakudo-moar 15f51a: OUTPUT«(̿ ̾ ̽ ̼ ̻ ̺ ̹ ̸ ̷ ̶ ̵ ̴ ̳ ̲ ̱ ̰ ̯ ̮ ̭ ̬ ̫ ̪ ̩ ̨ ̧ ̦ ̥ ̤ ̣ ̢ ̡ ̠ ̟ ̞ ̝ ̜ ̛ ̚ ̙ ̘ ̗ ̖ ̕ ̔ ̓ ̒ ̑ ̐ ̏ ̎ ̍ ̌ ̋ ̊ ̉ ̈ ̇ ̆ ̅ ̄ ̃ ̂ ́)␤»
00:13 viki oh 341 is also  messed up heh
00:14 viki m: say ("\x[A5A]" ... "\x[A5C]").elems
00:14 camelia rakudo-moar 15f51a: OUTPUT«(timeout)»
00:14 viki m: say (*.parse-base(16) - *.parse-base(16))("A5C", "A5A")
00:14 camelia rakudo-moar 15f51a: OUTPUT«2␤»
00:14 viki hehe
00:14 viki Well, I'd call that a bug :)
00:15 viki Or is it?
00:15 viki It's Quantum Bug... It's both a bug and ain't one ;)
00:24 viki God damn.. Digital Extremes ruined my day today :(
00:24 viki They changed a thing in a game and I don't like it...
00:24 * viki goes to fix Rakudo bugs instead
00:24 geekosaur disappointment-driven development
00:25 viki heh
00:32 bjz joined #perl6
00:55 aborazmeh joined #perl6
00:55 aborazmeh joined #perl6
00:59 seatek joined #perl6
01:04 viki m: nqp: nqp::say(nqp::islt_n(nqp::div_n(1e0,0e0), 0e0))
01:04 camelia rakudo-moar 15f51a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Could not find nqp::div_n, did you forget 'use nqp;' ?␤at <tmp>:1␤------> 3nqp::say(nqp::islt_n(nqp::div_n(1e0,0e0)7⏏5, 0e0))␤»
01:04 viki nqp: nqp::say(nqp::islt_n(nqp::div_n(1e0,0e0), 0e0))
01:04 camelia nqp-moarvm: OUTPUT«0␤»
01:04 viki nqp: nqp::say(nqp::islt_n(nqp::div_n(1e0,-0e0), 0e0))
01:04 camelia nqp-moarvm: OUTPUT«1␤»
01:04 viki Don't need an op. ^ that is pretty obvious (compared to atan2)
01:04 viki wc
01:06 labster joined #perl6
01:10 kyclark_ joined #perl6
01:12 adu joined #perl6
01:14 finanalyst joined #perl6
01:18 pierre__ joined #perl6
01:18 pierre__ joined #perl6
01:30 Sgeo__ joined #perl6
01:31 * viki is rocking to https://youtu.be/TGDbkrWXzhw?t=43m39s
01:31 viki Hacking Party \o/
01:37 avalokite joined #perl6
01:46 labster joined #perl6
01:48 viki m: say IO::Handle ~~ Cool
01:48 camelia rakudo-moar 15f51a: OUTPUT«False␤»
01:50 viki Is printf(IO::Handle:D, Cool:D $format, *@args) candidate a bad idea? that's adding to current candidate printf(Cool:D $format, *@args)
01:51 MasterDuke (this is not an answer to your question) i have no idea why some things are Cool and others aren't
01:51 viki Cool things make sense as both a number and a string
01:52 MasterDuke yeah, i'm actually bothering to read the documentation
01:52 viki .oO( TFW you're scrolling through old logs and wondering if that nick is Zoffix... )
01:53 viki I'm basically wanting to add IO::Handle printf, because the current docs make me cry ( https://docs.perl6.org/routine/printf )
01:54 viki And to mirror the IO interface, it'd make sense that the printf() sub can do filehandles too.
01:54 MasterDuke FWIW, Perl 5 printf takes a filehandle
01:54 viki I think we had a similar talk about comb()
01:55 viki Alright, so there's some exisitng precedent/expectations for my idea.
01:55 MasterDuke comb()ing a filehandle?
01:55 viki Nah, defaulting for comb 'fooo' to be comb 1, 'foo' or something like that
01:57 MasterDuke seems reasonable
01:58 viki At the end it was ruled that was too magical
01:59 MasterDuke don't know how it's any less magical than 'foo'.comb
02:04 BenGoldberg joined #perl6
02:15 zilti did someone succeed to install rakudo on netbsd?
02:18 ugexe i installed rakudo on netbsd on a raspberry pi months ago
02:19 zilti I always get a segfault when compiling, not sure if it's rqp or MoarVM
02:24 kalkin-_ joined #perl6
02:25 ugexe are you asking us to guess, or waiting for someone to ask you to paste the output somewhere?
02:26 labster joined #perl6
02:34 viki option c: debug on your own and submit a PR fixing the issue \o/
02:38 bjz_ joined #perl6
02:39 araujo joined #perl6
02:43 zilti ugexe, viki: ah, I did open a ticket: https://github.com/MoarVM/MoarVM/issues/441
02:46 viki Thanks!
02:46 timotimo can we actually work with the core dump?
02:46 timotimo like, if we don't have a netbsd of our own?
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:48 timotimo it'd be a good first step if you could just gdb --args the_full_commandline_here, and just "bt full" when it reaches the crash
02:48 timotimo also, i'm not sure if valgrind runs on netbsd, but it probably does. so try to run "valgrind the_full_commandline_here" and give us the output
02:48 timotimo that'd be good
02:51 zilti Ok, will do that! Thanks
03:02 * timotimo goes to bed
03:06 nchambers joined #perl6
03:07 samcv how can I make attributes inherited by other classes?
03:07 samcv the methods get inherited but I would like to access the data without having to copy a large data structure back and forth each time. is this possible?
03:07 timotimo private attributes are private to the one class only, derived classes can use the method accessors
03:08 timotimo using the accessors doesn't force you to copy stuff around, though
03:08 seatek you have to use $.varname
03:08 samcv ok, can i write to the variables though?
03:08 seatek you have to use $.varname is rw
03:08 samcv yeah ok
03:08 samcv hmm. but what if i only want inheriting classes to use it and not the main program?
03:08 timotimo if you don't want the attribute to be publically writable, you can have a private accessor method and call that from subclasses
03:08 timotimo i think
03:09 samcv how do I do that timotimo ?
03:09 seatek yeah i haven't found a nice way to do that yet
03:09 samcv ah
03:10 samcv i'll just use `is rw` for now
03:10 timotimo m: class Parent { has $.attr; method !dothething is rw { $!attr } }; class Child is Parent { method do-evil-magic($a) { self!Parent::dothething = $a } }; my $c = Child.new(); say $c.attr; $c.do-evil-magic(42); say $c.attr
03:10 camelia rakudo-moar 2efeda: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot call private method 'dothething' on package Parent because it does not trust Child␤at <tmp>:1␤------> 3evil-magic($a) { self!Parent::dothething7⏏5 = $a } }; my $c = Child.new(); say $c.a␤ …»
03:10 seatek purists seem to believe you should never be able to access attributes
03:10 seatek except through methods
03:10 timotimo okay, not like that.
03:10 timotimo private attributes are for separating your logic from the API your class provides
03:10 seatek and i haven't found a good way to "override" the "automatic" accessors created for attributes
03:11 samcv well seatek i am inheriting methods. and the base class holds the data, but
03:11 samcv but most methods aside from loading/unloading and such are in the dependent classes
03:11 * timotimo bedtime for real
03:11 samcv night
03:11 seatek hehe
03:11 seatek nite nite
03:12 samcv hmm is it threadsafe though to do .data{'something'} = 'something else'; in a dependent class?
03:12 seatek yeah i've just been doing those as $.vars
03:12 samcv i know it isn't from the main program
03:12 seatek that i do not know
03:13 samcv hmm i guess i could abstract more... but
03:13 seatek i'm pretty sure it would be though
03:13 samcv wanted my base class to not be specific to what the data was
03:13 samcv and only load/unload
03:13 seatek you could do that with roles if i'm remembering right
03:14 samcv ugh no wait that makes it way too complex
03:14 samcv since the datatypes are all different. at least the structures
03:14 cibs joined #perl6
03:16 seatek m: role R { has $!var = 5; }; class C does R { method test() { say $!var }; }; my $c - C.new; $c.test;
03:16 camelia rakudo-moar 2efeda: OUTPUT«WARNINGS for <tmp>:␤Useless use of "-" in expression "my $c - C.new" in sink context (line 1)␤Use of uninitialized value of type Any in numeric context␤  in block <unit> at <tmp> line 1␤Cannot resolve caller Numeric(C: ); none of these signatures m…»
03:17 seatek i hate this one-line thing
03:17 viki m: role R { has $!var = 5; }; class C does R { method test() { say $!var }; }; my $c = C.new; $c.test;
03:17 camelia rakudo-moar 2efeda: OUTPUT«5␤»
03:17 seatek yes that's it :)
03:18 seatek thanks viki
03:18 BenGoldberg It doesn't have to be one-line.  Stuff your code in a gist, and then type m: url
03:18 seatek it's like stuff you "inherit" from roles are "copied" into your parent class
03:18 viki seatek: the roles get inlined into the class, yeah
03:18 seatek so you can get away with makign your base class have private attributes if you use roles
03:19 seatek viki: yeah :) i really like that feature. i've been loving the way you can use roles
03:21 seatek samcv: that make sense? if you just throw your base class "holder" vars into role Base::Blah instead of class Base::Blah then you've got what you want
03:22 samcv nice
03:22 seatek i think of roles like templates or macros that get copied in
03:22 araujo joined #perl6
03:22 araujo joined #perl6
03:25 seatek BenGoldberg: ooo! I didn't know we do that :)
03:26 samcv ah yeah seatek that's what i wanted, roles
03:26 samcv want it to inherit like everything. though maybe not submethods tho idk at this point because not using those
03:26 samcv since all the objects are using 100% of the functions of the base class
03:27 noganex joined #perl6
03:27 seatek you can slice those up too if you want to clear them out and organize them a bit, and just bring in multiple roles
03:27 samcv so inheriting objects are actually two objects? and roles are one object that takes the parent and adds to it?
03:28 samcv well idk 'two objects' but it doesn't inherit private attributes and state right?
03:28 samcv but multiple layers of it that are seperate
03:28 seatek classes pay attention to that attribute scoping
03:28 seatek roles just copy the code ;)
03:28 samcv cool
03:30 seatek oh you migth want to watch out for collisions though -- when you use roles if you use the same names in what roles them in... it's fatal
03:30 seatek classes override the same names, roles explode horribly
03:31 seatek i have found that particularly vexxing on more than one occasion
03:31 seatek but i'm a slob
03:31 samcv m: my role test { has $!thing = 10; }; my class test2 does test { method get { $!thing++; return $!thing; } }; my test2 $classy; $classy.get.say;
03:31 camelia rakudo-moar 4663d4: OUTPUT«Cannot look up attributes in a test2 type object␤  in method get at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
03:32 samcv hmm this doesn't work
03:32 samcv or. uh did i not call .new
03:32 samcv m: my role test { has $!thing = 10; }; my class test2 does test { method get { $!thing++; return $!thing; } }; my $class = test2.new; $classy.get.say;
03:32 camelia rakudo-moar 4663d4: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$classy' is not declared. Did you mean '$class'?␤at <tmp>:1␤------> 3rn $!thing; } }; my $class = test2.new; 7⏏5$classy.get.say;␤»
03:32 samcv m: my role test { has $!thing = 10; }; my class test2 does test { method get { $!thing++; return $!thing; } }; my $classy = test2.new; $classy.get.say;
03:32 camelia rakudo-moar 4663d4: OUTPUT«11␤»
03:32 samcv hmm ok that worked
03:33 viki m: role test { has $!thing = 10; }; class :: does test { method get { $!thing++; return $!thing; } }.new.get.say;
03:33 camelia rakudo-moar 4663d4: OUTPUT«11␤»
03:33 viki m: role test { has $!thing = 10; }; class :: does test { method get { ++$!thing } }.new.get.say;
03:33 camelia rakudo-moar 4663d4: OUTPUT«11␤»
03:33 ugexe m: role Foo { method test { say $?CLASS } }; role Bar { method test { say $?CLASS } }; class Impl does Foo does Bar { }; Impl.new.test # is this what you were trying to do?
03:33 camelia rakudo-moar 4663d4: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Method 'test' must be resolved by class Impl because it exists in multiple roles (Bar, Foo)␤at <tmp>:1␤»
03:34 seatek no we like to use code that actually works ;)
03:36 samcv ugh for some reason the same thing that worked in a simpler example isn't working in my code
03:36 seatek that's just the universe punishing you for something
03:37 samcv saying it's not declared in the dependant class
03:37 samcv that `does` that role
03:37 samcv yes seatek that is it
03:37 samcv though one difference is i don't initialize the attribute like i did with camelia
03:38 seatek you defined the role yeah? and use'd it or have it in thet same file yeah?
03:39 samcv yes
03:39 seatek i think it wants to come before the class too if i'm remembering right (like compile order is important)
03:39 seatek or i may be hallucinating
03:40 samcv https://gist.github.com/2eea11092a4e2ce09269299da9327f9f here is the relevant code
03:40 samcv well this file should be able to standalone probably
03:41 samcv so yeah. it gives that error
03:41 samcv Attribute $!hash not declared in class history-class
03:42 seatek what if you take away the my's
03:43 samcv nope seatek. tried that already ;)
03:43 ugexe s/$!hash/%!hash/
03:44 samcv omg
03:44 seatek ha!! :)
03:44 samcv !!!
03:44 seatek ugexe: good eye! :)
03:44 samcv magic!
03:48 dudz what's a word that means priority but the top of the list is the lowest priority?
03:49 ugexe a stack?
03:49 ugexe last in, first out
03:50 dudz thats how stacks work?
03:50 dudz so i could call my list a stack list, and that would mean what i typed above?
03:50 TEttinger not sure what priority means here
03:50 ugexe if you can replace priority with order
03:51 dudz yeah its really just in which order i want to run something
03:51 dudz i'm trying to find a nice and tidy comment title for something
03:51 ugexe LIFO and FIFO are common terms
03:51 TEttinger LIFO and FIFO are two common terms when you are talking about the order things go in and are taken out. LIFO=last in first out, FIFO=first in first out
03:52 TEttinger stacks are LIFO, queues are FIFO
03:53 geekosaur generally priority in this context is for when things are added in indeterminate order but should be taken out in a particular order. (priority queues, priority search queues)
03:56 dudz yeah, i have a list of values, and they can come in any order, but when i find them i want to compare and sort based on the least important so i can treat them with cruelty
03:56 geekosaur I don't think there's a pqueue in the ecosystem yet
03:57 geekosaur oh, hah. https://github.com/hoelzro/p6-priorityqueue
04:05 labster joined #perl6
04:14 seatek did i hear someone say that stuff use'd is going to be lexically scoped soon, so that something use'd in one place will need to be use'd again in another if it's needed there too?
04:14 seatek and if i did hear that, was it true?
04:15 geekosaur if your'e doing a use inside an inner scope instead of at file scope, I'd expect the result to be restricted to that scope, yes
04:15 ugexe m: { use Test; ok 1; }; { ok 1 }
04:15 camelia rakudo-moar 0a874f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    ok used at line 1␤␤»
04:16 geekosaur perl 5, and in fact most other languages that allow imports at scopes inner to a file/compunit, work the same way
04:16 seatek gosh i must already be compensating for it
04:18 seatek in perl5 if i used a file in one file -- say some library... and another library needed that file, i'd never get an error, because it was like, that file got interpreted once, and was useable everywhere then... within the same running program. i swear it was like that
04:19 MasterDuke nine is/was working on lexical module loading, don't remember if that got committed already
04:19 geekosaur perl 5 does use in two steps. if you always use qualified names from it, only the load step is needed. for unqualified names, there also needs to be an import step which is scoped
04:20 geekosaur note that use foo; my $x = Foo->new; (perl 5) it's actually a fully qualified name, so no import is needed and it's available everywhere.
04:20 seatek MasterDuke: that will be The Way Things Are when it gets committed then?
04:20 MasterDuke believe so
04:21 seatek k
04:21 geekosaur (but in perl 6 there are more scopes, so I'm not sure the equivalent would do that)
04:22 seatek i'll just keep my lists of use'es very very long
04:22 geekosaur mm, actually I think it will. so if you are looking for classes from the "use"d module, it will work; if you are looking for subs from it (as opposed to methods), you need to "use" in each scope where you need them
04:22 seatek yieah
04:24 seatek why would anyone want to do a "unit class ...." rather than a "class ..."
04:24 seatek just to make conversions easier?
04:24 MasterDuke the commit messages here have some more info https://github.com/rakudo/rakudo/tree/lexical_module_load
04:25 cibs joined #perl6
04:25 MasterDuke so everything isn't indented one extra level perhaps
04:25 viki seatek: saves an indent level, if that class is all you got in the file: https://github.com/zoffixznet/perl6-App-Nopaste/blob/master/lib/App/Nopaste.pm6#L1
04:28 seatek hehe - ok. Cuz wherever i see it being used, it looks suspicously like it used to be a "package" with lots of subs
04:29 geekosaur wouldn't surprise me if that were the most common current usage
04:32 kyclark_ joined #perl6
04:38 ugjka joined #perl6
04:45 giraffe joined #perl6
04:46 adu joined #perl6
05:10 Cabanossi joined #perl6
05:11 TimToady joined #perl6
05:20 perlawhirl joined #perl6
05:35 eisen74 joined #perl6
06:19 xtt2 joined #perl6
06:23 domidumont joined #perl6
06:28 domidumont joined #perl6
06:30 ZzZombo Do hashes still return things in random order?
06:36 TEttinger why wouldn't they?
06:37 TEttinger a hash function returns a seemingly-random value that is determined by the thing being hashed
06:38 ZzZombo because that is stupid not to have a way to disable it on selected hashes.
06:41 TEttinger I don't know enough perl6 to be able to answer about the current implementation. most programming languages have the default hash, dictionary, map, whatever they call it have unpredictable ordering; some use actually random ordering because it can be faster and the order of an unordered data structure shouldn't be relied upon. many languages have extra data structures that combine a list and hash
06:41 TEttinger this can be called an ordered hash/map/dictionary, insertion-ordered whatever, Java for some reason calls it LinkedHashMap
06:43 TEttinger they aren't the default for memory usage reasons; the list has memory costs in addition to the normal hash's memory usage. they are better in other ways.
06:43 pierre__ joined #perl6
06:43 pierre__ joined #perl6
06:43 TEttinger (also adding or removing needs changing both the hash and list)
06:49 viki ZzZombo: there is a way to "disable" it.... .sort
06:49 ZzZombo But usually when you have such sort of a problem to solve, it meanss you wanna the order intact.
07:03 TEttinger viki, yeah, insertion-ordering and sorting are a weirdly partly-overlapping thing
07:09 xiaomiao joined #perl6
07:24 CIAvash joined #perl6
07:26 dalek doc: 848a53d | gfldex++ | doc/Type/Method.pod6:
07:26 synopsebot6 Link: http://doc.perl6.org/type/Method
07:26 dalek doc: tell that the invocant defaults to self and how to call a free floating
07:26 dalek doc: method
07:26 dalek doc: review: https://github.com/perl6/doc/commit/848a53d936
07:28 ZzZombo There is already an example "greeting".$m("hello");
07:28 ZzZombo right above
07:29 ZzZombo is it right?
07:34 dalek doc: d2e6925 | gfldex++ | doc/Type/Method.pod6:
07:34 synopsebot6 Link: http://doc.perl6.org/type/Method
07:34 dalek doc: link to Routine
07:34 dalek doc: review: https://github.com/perl6/doc/commit/d2e6925892
07:34 dalek doc: 554c148 | gfldex++ | doc/Type/Method.pod6:
07:34 dalek doc: link to Signature
07:34 synopsebot6 Link: http://doc.perl6.org/type/Method
07:34 dalek doc: review: https://github.com/perl6/doc/commit/554c148c08
07:34 solarbunny joined #perl6
07:35 gfldex ZzZombo: yes, but with an anonymous method and as such differently invoced.
07:40 travis-ci joined #perl6
07:40 travis-ci Doc build errored. Wenzel P. P. Peppmeyer 'link to Signature'
07:40 travis-ci https://travis-ci.org/perl6/doc/builds/179005566 https://github.com/perl6/doc/compare/848a53d9363d...554c148c089c
07:40 travis-ci left #perl6
07:47 ZzZombo wut
07:51 dalek doc: acc5d53 | gfldex++ | doc/Type/Signature.pod6:
07:51 synopsebot6 Link: http://doc.perl6.org/type/Signature
07:51 dalek doc: link to Method and Sub
07:51 dalek doc: review: https://github.com/perl6/doc/commit/acc5d53626
07:51 gfldex the SSL module comes with a heisentest
08:01 geekosaur joined #perl6
08:02 RabidGravy joined #perl6
08:08 bjz joined #perl6
08:13 travis-ci joined #perl6
08:13 travis-ci Doc build passed. Wenzel P. P. Peppmeyer 'link to Method and Sub'
08:13 travis-ci https://travis-ci.org/perl6/doc/builds/179006641 https://github.com/perl6/doc/compare/554c148c089c...acc5d53626cc
08:13 travis-ci left #perl6
08:14 firstdayonthejob joined #perl6
08:17 cibs joined #perl6
08:20 ZzZombo what was the reverse of 'so' again?
08:23 RabidGravy you mean 'not' ?
08:24 RabidGravy haven't had much coffee yet, struggling with what reverse means in this case :)
08:28 pmurias joined #perl6
08:29 pmurias ZzZombo: how do you want the hashes to order things?
08:39 bjz_ joined #perl6
08:52 ZzZombo in the same order you put them in
08:53 RabidGravy you would have to make your own Map class to do that
08:55 Tonik joined #perl6
08:59 seatek yeah on the very rare occation i've had to worry about that, i use arrays of hashes
09:02 pierre__ joined #perl6
09:14 perlawhirl joined #perl6
09:26 pmurias ZzZombo: you will have to use a module for that
09:33 pierre__ joined #perl6
09:35 rindolf joined #perl6
09:36 pmurias ZzZombo: the random ordering is not something that has been "stupidly" enabled without a way to turn it of, but the ordering you want would have to be implemented at a performance cost
09:40 Actualeyes joined #perl6
09:41 espadrine joined #perl6
09:41 RabidGravy I'm still struggling to find a way to "discover" the inner packages within something like "class A {  class B { } }"
09:42 RabidGravy so e.g. in the compose of A I want to find 'B' (and any random inner classes that might be there)
09:43 RabidGravy I'm sure there is a way to do this, I just can't determine the right pseudo package to monkey with
09:49 vendethiel joined #perl6
09:51 FROGGS joined #perl6
09:52 FROGGS o/
09:52 RabidGravy boom
09:56 pmurias ZzZombo: hopefully someone will write a module to implement your insertion ordered hashes but I don't think it will be added to the core
10:00 grondilu joined #perl6
10:02 RabidGravy doing it naively would be trivial, by just sub-classing Hash with an over-ride on AT-KEY and ASSIGN-KEY to keep the insertion order
10:03 RabidGravy and then whichever of the .keys, .values, .pairs are required
10:27 wamba joined #perl6
10:36 pierre__ joined #perl6
10:40 perlawhirl ZzZombo: https://github.com/zostay/perl6-ArrayHash
10:41 perlawhirl from the description: "You can think of this as a Hash that always iterates in insertion order or you can think of this as an Array of Pairs with fast lookups by key."
10:50 bjz joined #perl6
11:00 RabidGravy I think my earlier question can be arranged as, is there a way of doing:
11:01 RabidGravy m: class  A { class B {}; say A::.values }
11:01 camelia rakudo-moar 7c5ea3: OUTPUT«((B))␤»
11:01 canopus joined #perl6
11:02 RabidGravy but where you don't know A in advance and have been handed it in a variable
11:03 RabidGravy or does it only work with the type name like that
11:03 RabidGravy obviously I can do it in an EVAL but there's nasty
11:04 FROGGS m: class  A { class B {}; say A::.values }; my $a = A.new; say $a.WHAT::.values
11:04 camelia rakudo-moar 7c5ea3: OUTPUT«((B))␤()␤»
11:04 FROGGS m: class  A { class B {}; say A::.values }; my $a = A.new; say ::($a.WHAT)::.values
11:04 camelia rakudo-moar 7c5ea3: OUTPUT«((B))␤Use of uninitialized value of type A in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤No such symbol ''␤  in block <unit> at <tmp> line 1␤␤Ac…»
11:04 RabidGravy ah
11:04 FROGGS m: class  A { class B {}; say A::.values }; my $a = A.new; say ::($a.^name)::.values
11:04 camelia rakudo-moar 7c5ea3: OUTPUT«((B))␤()␤»
11:04 FROGGS hmmm
11:04 RabidGravy duh me
11:05 FROGGS m: class  A { class B {}; }; my $a = A.new; say $a.WHAT::
11:05 camelia rakudo-moar 7c5ea3: OUTPUT«(A)␤»
11:06 FROGGS no idea why it doesnt print B
11:07 RabidGravy yeah that's what I've been seeing
11:07 FROGGS m: class  A { class B {}; }; my $a = A.new; say A::.values; say $a.WHAT.::.values
11:07 camelia rakudo-moar 7c5ea3: OUTPUT«===SORRY!===␤MVMArray: Can't pop from an empty array␤»
11:07 FROGGS sad that there is no B in that sentence either :P
11:08 RabidGravy I think I'll go with the EVAL in the first instance
11:09 RabidGravy in the whole scope of the rabbit hole I'm going down that's fairly sane
11:09 CIAvash joined #perl6
11:14 domidumont joined #perl6
11:31 xfix joined #perl6
11:41 Actualeyes joined #perl6
11:46 pierre_ joined #perl6
11:49 Lucas_One joined #perl6
11:51 CIAvash joined #perl6
12:14 ZzZombo why is there Str.chop() but no something to remove characters from the start?
12:14 nine MasterDuke: plan is that it will behave like this: { { use Foo; Foo.new; #`(Foo found and works) }; Foo.new #`(There's no Foo in this scope, so we throw an error here) }
12:16 nine seatek: ^^^
12:18 ZzZombo m: put 'String'.substr(2,*-1)
12:18 camelia rakudo-moar 7c5ea3: OUTPUT«rin␤»
12:19 ZzZombo m: put 'String'.substr(2)
12:19 camelia rakudo-moar 7c5ea3: OUTPUT«ring␤»
12:20 ZzZombo how does it evalute *-1 into an actual index?
12:21 jnthn *-1 is just a function -> $x { $x - 1 }, and it calls the function with .chars of the string
12:21 seatek nine: thank you for the confirmation. i've been coding for that, so i'm happy i haven't been typing extra for no good reason! :)
12:21 ZzZombo is it built-in into the function itself or black compiler magic?
12:21 jnthn Part of the method definition
12:21 lizmat m: 'string'.substr(2, { .say; 1 } )
12:21 camelia rakudo-moar 7c5ea3: OUTPUT«4␤»
12:22 jnthn You can pass any code object there, as lizmat showed
12:22 lizmat m: 'string'.substr(0, { .say; 1 } )
12:22 camelia rakudo-moar 7c5ea3: OUTPUT«6␤»
12:22 ZzZombo hm, the definitions look rather ordinarily. Nothing says they accept Callables.
12:22 jnthn m: my $s = * - 1; say $s(4); say $s(43)
12:22 camelia rakudo-moar 7c5ea3: OUTPUT«3␤42␤»
12:22 ZzZombo unless they are simplified on purpose in the docs, or something.
12:23 jnthn m: Str.^lookup('substr').candidates>>.signatures.say
12:23 camelia rakudo-moar 7c5ea3: OUTPUT«No such method 'signatures' for invocant of type 'Method'␤  in block <unit> at <tmp> line 1␤␤»
12:23 jnthn m: Str.^lookup('substr').candidates>>.signature.say
12:23 camelia rakudo-moar 7c5ea3: OUTPUT«((Cool $: $from, $length?, *%_))␤»
12:23 jnthn Hm, maybe the magic happens inside of there
12:24 jnthn oh
12:24 bjz_ joined #perl6
12:24 jnthn m: say &substr.candidates>>.signature
12:24 camelia rakudo-moar 7c5ea3: OUTPUT«((Str:D \what, Int:D \start) (Str:D \what, Callable:D \start) (Str:D \what, Int:D \start, Int:D \want) ($what, \start, $want?))␤»
12:24 seatek nine: it's a big change. but the sooner the better i say. less carnage to clean up.
12:28 ZzZombo The return value of your trait_mod is ignored, isn't it?
12:28 jnthn Yup
12:29 lizmat jnthn: fwiw, substr is one of the few cases where the logic is in the sub, not in the method
12:29 lizmat this is contrary to most other sub/method duals
12:29 jnthn Indeed. Should probably be fixed at some point.
12:29 lizmat do you know if there is a specific reason to do it like that?
12:29 lizmat ok, I'll put it on my list then
12:29 jnthn I seem to recall arguing against it being that way before :)
12:30 lizmat well, performance would come to mind
12:30 lizmat but otoh, that was probably before we had good MMD caching support
12:30 jnthn *nod*
12:30 jnthn But yeah, it'll get in the way of us doing Cat some day
12:31 jnthn If the sub doesn't delegate to the method
12:31 jnthn Probably same story for when we improve Uni and friends
12:31 lizmat ok
12:31 jnthn So worth fixing
12:32 lizmat oki, need to finish up native shaped array opts first
12:32 jnthn :)
12:32 lizmat 1+dim .STORE specifically  :-)
12:35 jnthn Nice
12:35 jnthn Lunch, then I'll see if I feel like a SEGV hunt this afternoon...
12:35 pmurias jnthn: re mutators blog post, are those even used commonly enough that syntax sugar instead of Proxy is required?
12:36 pierre_ joined #perl6
12:39 jnthn pmurias: Syntax sugar in that area has been suggested/requested more than once in the past, and I wrote the post to have a good place to point people at as to why we don't provide it and don't plan to.
12:39 RabidGravy is there any way of allowing a parameterized class definition like "class Foo[whatever] { }" assuming I'm already monkeying with the MOP?
12:40 seatek roles do that.. different from roles?
12:40 RabidGravy yeah different to roles
12:40 RabidGravy actually as part of the definition
12:41 seatek are you never satisfied? ;)
12:41 MasterDuke jnthn: your post reminded me of Steve Yegge's post about the kingdom of nouns vs verbs, but i haven't read it recently enough to know if they really are similar. are you familiar with it? and if so, are they related?
12:43 RabidGravy nope :)  I could achieve the intent with a trait but it would be overly verbose in the circumstance
12:44 jnthn RabidGravy: You can implement method ^parameterize like Array does
12:46 jnthn RabidGravy: In short: no, classes aren't parametric, but at the meta level what is parametric or not simply boils down to "does the meta-object respond to .parameterize", so if you're willing to interpret that and make it mean what you'd like it to mean, you're in with a chance :)
12:47 seatek it's unnatural
12:48 RabidGravy right so adding a role to the meta object with parameterize should do the job
12:48 jnthn MasterDuke: It's been a while since I read that post also. :)
12:48 RabidGravy let's see
12:49 gfldex RabidGravy: please provide code if possible, this may be ENODOC
12:49 jnthn MasterDuke: I think it was getting at a slightly different point than my main point, though my notes on us not stigmatizing procedural programming likely relate.
12:50 jnthn MasterDuke: Though I think lack of first class functions was also a moan of the kingdom of nouns post too
12:50 jnthn Curiously, Java has actually got those at long last :)
12:52 MasterDuke yeah, i should read it again and see how much things are better
12:53 FROGGS jnthn++ # blog
12:55 jnthn I guess one of the things I've found a tad frustrating with Java (and C# to a degree too) is that in a well-meaning quest to get people to write good OO code, they made OO code the only code you could write. But OO isn't easy, and badly done OO tends to make things worse rather than better.
12:56 ZzZombo so I'm generating a method dynamically, is it possible to change the invocant part of my method handler(Any:D: $self,|c) from Any:D to a $class:D that I know only from a string?
12:56 jnthn It's like autotune. When every single pop song is using it, it all becomes a bit naff. :P
12:58 jnthn lunch; bbl :)
13:10 cdg joined #perl6
13:14 nine First draft of lexical module loading docs: https://gist.github.com/niner/70f7b46eefb7e22af78d896bea11efeb
13:14 nine Comments/suggestions/patches very welcome :)
13:14 AlexDaniel joined #perl6
13:21 perlawhirl joined #perl6
13:24 ZzZombo method eager(Seq:D:) returns Bool:D
13:24 ZzZombo Returns an eagerly evaluated List based on the invocant sequence
13:24 ZzZombo wut
13:26 perlawhirl m: say 1..10
13:26 camelia rakudo-moar 7c5ea3: OUTPUT«1..10␤»
13:26 perlawhirl m: say eager 1..10
13:26 camelia rakudo-moar 7c5ea3: OUTPUT«(1 2 3 4 5 6 7 8 9 10)␤»
13:26 perlawhirl it eagerly evaluates a lazy list
13:30 perlawhirl oh i just saw your first message... are you questioning the Bool thingy
13:30 ZzZombo yes
13:30 perlawhirl umm yeh... that looks wrong
13:31 timotimo that's why it's in boldface :)
13:32 perlawhirl timotimo: thanks
13:34 perlawhirl ok... text appearance setting in my term emulator had boldface disabled
13:34 perlawhirl i see it now
13:34 timotimo oh, interesting
13:35 perlawhirl ecureCRT
13:36 perlawhirl i dunno what happened to the S... SecureCRT
13:41 AlexDaniel ah no
13:41 AlexDaniel let's see
13:42 ZzZombo if I have sub x($blah,|c), how do I refer to c in the body?
13:43 ZzZombo just |c?
13:43 RabidGravy well just c
13:43 ZzZombo hm
13:43 RabidGravy it's a Capture object
13:43 RabidGravy so e.g.
13:44 ZzZombo "Inside a Signature, a Capture may be created by prefixing a sigilless parameter with a vertical bar |. This packs the remainder of the argument list into that parameter." <-- why does it have to be sigilless?
13:44 RabidGravy m: sub foo(|c) { say c.list };  foo("ab");
13:44 camelia rakudo-moar 7c5ea3: OUTPUT«(ab)␤»
13:44 pierre_ joined #perl6
13:44 ZzZombo RabidGravy: thanks!
13:45 timotimo what happens if you call it |$foo?
13:45 dalek doc: 97836f7 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Type/Seq.pod6:
13:45 synopsebot6 Link: http://doc.perl6.org/type/Seq
13:45 dalek doc: Seq.eager does not return a Bool
13:45 dalek doc:
13:45 dalek doc: It is a List for sure
13:45 dalek doc: review: https://github.com/perl6/doc/commit/97836f7f49
13:45 timotimo m: sub x(|$foo) { say $foo.perl }; x(1, 2, 3, :5lol)
13:45 camelia rakudo-moar 7c5ea3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Obsolete use of | or \ with sigil on param $foo␤at <tmp>:1␤------> 3sub x(|$foo7⏏5) { say $foo.perl }; x(1, 2, 3, :5lol)␤    expecting any of:␤        shape declaration␤»
13:45 timotimo ah, that's why, i suppose
13:46 RabidGravy fairly good reason :)
13:46 AlexDaniel ZzZombo: ok, I think the Bool thingy is wrong indeed, so I fixed it
13:46 ZzZombo eh, why is it obsolete?
13:46 AlexDaniel ZzZombo: thanks for reporting
13:46 ZzZombo doing my part
13:46 AlexDaniel well, you probably meant @foo?
13:46 AlexDaniel without a question mark though :)
13:50 AlexDaniel commit: pre-glr sub x(|$foo) { say $foo.perl }; x(1, 2, 3, :5lol)
13:50 committable6 AlexDaniel, https://gist.github.com/cfeb632a353ec6120a43cc14c8ea6588
13:51 AlexDaniel commit: all sub x(|$foo) { say $foo.perl }; x(1, 2, 3, :5lol)
13:51 committable6 AlexDaniel, https://gist.github.com/fee63950b0aaf947b2a6d71d0aff82cf
13:51 AlexDaniel does anybody have any idea?
13:52 perlawhirl about what... the 'Obselete' thing?
13:53 perlawhirl it's coming from a $/.CURSOR.panic() inside the Grammar for token parameter
13:54 AlexDaniel … do we still need it?
13:55 timotimo depends. when was it not obsolete? what did it mean?
13:55 timotimo does anybody still remember? :)
13:56 AlexDaniel commit: all sub x(|$foo) { say $foo.perl }; x(1, 2, 3)
13:56 committable6 AlexDaniel, https://gist.github.com/45770fc35b46dc7398b48d90ce153cc6
13:56 timotimo i think it's been there for years
13:56 perlawhirl *shrug* generally captures are used when you don't want to unpack anything... typically to punt it elsewhere... maybe assigning a capture to a scalar is bad because you giving it a container/shape
13:56 AlexDaniel it is a pre-moar thing
14:04 andrzejku joined #perl6
14:05 ZzZombo Quoted method name requires parenthesized arguments.
14:05 ZzZombo return $self."%accessors<setter>"(c.kv.eager); <--here
14:05 ZzZombo how to fix?
14:06 AlexDaniel hmmm what is $self?
14:06 ZzZombo object
14:07 AlexDaniel I'm just wondering why not "self"
14:07 viki m: my $self = 'FF'; my %accessors = setter => 'parse-base'; say $self."%accessors<setter>"(16)
14:07 camelia rakudo-moar 7c5ea3: OUTPUT«255␤»
14:07 ZzZombo because a Wizard made it so
14:07 AlexDaniel m: $self = ‘FF’; my %accessors = setter => ‘parse-base’; say $self."%accessors<setter>": 16
14:07 camelia rakudo-moar 7c5ea3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$self' is not declared␤at <tmp>:1␤------> 3<BOL>7⏏5$self = ‘FF’; my %accessors = setter => ␤»
14:08 AlexDaniel m: my $self = ‘FF’; my %accessors = setter => ‘parse-base’; say $self."%accessors<setter>": 16
14:08 camelia rakudo-moar 7c5ea3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'.␤at <tmp>:1␤------> 3se-base’; say $self."%accessors<setter>"7⏏5: 16␤»
14:08 viki m: my $self = 'FF'; my %accessors = setter => 'parse-base'; my \c = class { method kv { 16 } }; say $self."%accessors<setter>"(c.kv)
14:08 camelia rakudo-moar 7c5ea3: OUTPUT«255␤»
14:08 viki ZzZombo: can't reproduce.
14:08 AlexDaniel viki: well it's right there ↑ if you omit parens
14:08 AlexDaniel so it is just unparseable this way, use parens
14:09 viki AlexDaniel: yes and "fixing it" would be using parantheses, which ZzZombo's example does.
14:09 AlexDaniel u: shrug
14:09 unicodable6 AlexDaniel, U+1F937 SHRUG [So] (🤷)
14:10 ZzZombo sorry, turned out there was a stray line indentical to that, guess I accidentally made a copy I didn't notice before.
14:10 AlexDaniel \o/
14:12 AlexDaniel u: raising
14:12 unicodable6 AlexDaniel, U+1F64B HAPPY PERSON RAISING ONE HAND [So] (🙋)
14:12 unicodable6 AlexDaniel, U+1F64C PERSON RAISING BOTH HANDS IN CELEBRATION [So] (🙌)
14:16 AlexDaniel ok after a recent update all of these are rendered with a female character instead of a neutral smiley face or genderless human outline… great
14:16 AlexDaniel I remember there was a person here trying to figure out which font is used to render a specific character
14:20 viki On my box they're rendered as a bald dude with a very sickly skin colour: http://i.imgur.com/VmLb0tS.png
14:21 AlexDaniel 🤷🙋
14:21 AlexDaniel viki: I guess it is better than this: https://files.progarm.org/2016-11-26-162134_197x87_scrot.png
14:23 ZzZombo Any help would be appreciated:
14:23 ZzZombo m: https://gist.github.com/ZzZombo/5caa51f9b238462d628a5b556920a0d8
14:23 camelia rakudo-moar bdc7a9: OUTPUT«("\$!name" => "name", Attribute.new, ("\$!name",))␤5===SORRY!5=== Error while compiling <tmp>␤Too many positionals passed; expected 4 arguments but got 5␤at <tmp>:58␤»
14:23 AlexDaniel viki: and obviously better than this: https://files.progarm.org/2016-11-26-162318_1120x54_scrot.png
14:23 pierre_ joined #perl6
14:24 ZzZombo that's what I made for Delphi-like attribute accessors.
14:24 ZzZombo Except that error is in my way!
14:25 viki ZzZombo: what are :$handled [:$setter=True,:$getter=True] ? is that destructuring?
14:25 ZzZombo Citing Sub.pod6: "Use destructuring to call traits with complex arguments.", so I guess so?
14:26 timotimo http://hack.p6c.org/~timo/mysterious_but_harmless_binary  -  feel free to download and run this binary and guess why i'm pretty proud of it :)
14:26 timotimo viki, nine, others
14:26 ZzZombo timotimo: rusty click of the day?
14:26 viki ZzZombo: does it need a comma after $handled?
14:27 timotimo ZzZombo: i don't program in rust, though i'm intrigued about it
14:27 ZzZombo timotimo: it was a pun on the word "risky" :)
14:27 AlexDaniel ︎🙌
14:28 timotimo thought so
14:28 AlexDaniel nope, didn't work
14:28 ZzZombo viki: I don't understand, do you ask if there should be a comma?
14:28 viki ZzZombo: yeah
14:29 ZzZombo I don't see one in the examples.
14:29 * viki doesn't run random executables to guess why someone is proud
14:29 AlexDaniel timotimo: soo… that's moar
14:30 timotimo AlexDaniel: and? :)
14:30 AlexDaniel timotimo: it's in a single binary file
14:30 timotimo well, yeah, moar is always only a single binary file
14:30 timotimo except it usually has libmoar.so to go with it, which this one don't
14:30 timotimo but that's not exciting at all
14:30 viki you made it relocatable?
14:30 AlexDaniel is it small or something?
14:31 viki I'm just being asked if I want to open it with notepad.exe
14:32 timotimo viki: you're on windows, then? :\
14:32 timotimo this isn't what i'd call "relocatable"
14:32 AlexDaniel :D
14:33 viki timotimo: I'll answer with a visual aid: http://i.imgur.com/GLz8lFK.png
14:33 viki :)
14:33 timotimo and at a whooping 15 megabytes, that's definitely not small
14:34 AlexDaniel SO WHAT DID YOU DO?
14:34 timotimo fair enough. so you *can* run it :)
14:34 AlexDaniel :)
14:34 viki I don't want to
14:34 timotimo trusting me or not is your choice, of course
14:34 viki I have bad experience with "harmless binaries"
14:34 timotimo yeah, okay, i'll spill the beans :(
14:34 timotimo you're no fun
14:34 viki And even if I trust you, what if you messed up :)
14:34 timotimo you remember how people kept saying "it can't be done! you're crazy!"
14:35 viki no
14:35 timotimo about putting a program into a single binary with the moar binary?
14:35 viki and your binary is a hello world packaged into a single binary?
14:35 timotimo no
14:35 timotimo it's nqp packaged into a single binary
14:35 viki :o
14:35 timotimo unmodified nqp
14:36 AlexDaniel timotimo: how do I run it?
14:36 pmurias timotimo: why are you trying to convince people to run binaries downloaded over unencrypted http? ;)
14:36 timotimo chmod +x it, ./ it
14:36 AlexDaniel ERROR: please be so kind and provide an arbitrary single commandline argument.
14:36 timotimo yes, do as it says please
14:36 AlexDaniel --help gives moarvm help
14:36 viki timotimo++ cool!
14:36 timotimo try "lol" or "wat" or "arbitrary"
14:36 timotimo 055af1619093f1812ee62df6c3e6dc17dc1c53b0  mysterious_but_harmless_binary
14:36 timotimo sha1sum of the binary for pmurias
14:37 AlexDaniel Illegal instruction ?
14:37 timotimo uh oh
14:37 timotimo why is that?
14:38 AlexDaniel you remember how people kept saying "it can't be done! you're crazy!"
14:38 timotimo turs out they just meant "it's illegal to do that"?
14:38 viki ZzZombo: you can add --ll-exception switch and it'll give you more stuff in the error
14:38 AlexDaniel no, but at least this particular binary does not seem to work :)
14:38 timotimo it can't give more info with Illegal instruction
14:38 pmurias timotimo: the binary should fire up a NQP REPL?
14:39 timotimo that's a "the CPU is upset and kills your process"
14:39 timotimo pmurias: if you don't give it an nqp script, yes
14:39 viki ZzZombo: and at a guess, you don't need $class in add_method
14:40 viki ZzZombo: (from docs) method add_method(Metamodel::MethodContainer: $obj, $name, $code)  <-- it has a colon after MetamodleMethodContainer, that indicates it's the invocant
14:41 AlexDaniel timotimo: soo… do I need to have it in a specific place or do I need to have some kind of a file around?
14:41 ZzZombo what is $obj then?
14:41 ZzZombo also that switch didn't really tell me anything.
14:41 timotimo AlexDaniel: can you gdb it? does the sha1sum match? what exactly are you doing to cause the error?
14:42 AlexDaniel timotimo: sha1sum matches
14:42 AlexDaniel ./mysterious_but_harmless_binary lol
14:42 AlexDaniel Illegal instruction
14:42 timotimo you have a 64bit system?
14:42 AlexDaniel yes
14:42 ZzZombo oh wait
14:43 viki s: 42.HOW, 'add_method'
14:43 SourceBaby viki, Something's wrong: ␤ERR: X::Multi::NoMatch exception produced no message␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤  in block <unit> at -e line 6␤␤
14:43 ZzZombo if I look at the file names, it says "(C:\rakudo\share\nqp\lib/Perl6/Metamodel.moarvm:add_method)", so probably you are right. But still, the state of add_method is unclear.
14:44 timotimo AlexDaniel: so ... gdb it, please?
14:44 viki ZzZombo: looks like a typo in the docs. Should be add_method(Metamodel::MethodContainer $obj: $name, $code)
14:44 viki ZzZombo: oh, no, I see why it's written that way
14:44 ZzZombo I think even better would be to use $class instead of $obj, the latter implies an instance rather than a type.
14:45 domidumont joined #perl6
14:45 AlexDaniel timotimo: anything specific? https://gist.github.com/AlexDaniel/91dd4da1fd7cc6a2d539357ad1e0ae99
14:45 timotimo "run lol" please
14:45 viki ZzZombo: you see, $foo.^add_method(<a b c>) is the same as $foo.HOW.add_method($foo, <a b c>)
14:45 ZzZombo viki: why?
14:45 RabidGravy it is an object
14:45 viki And in the docs the method is documented without the ^
14:46 ZzZombo so the ultimate conclusion on the use of it?
14:46 AlexDaniel oh, this is interesting
14:46 ZzZombo get rid of $class in param list?
14:46 AlexDaniel timotimo: https://gist.github.com/AlexDaniel/8b0a6856bdedcc3440a92db2749f9394
14:46 viki ZzZombo: yes
14:47 timotimo AlexDaniel: but there's nothing special about that line? :\
14:47 timotimo oh!
14:47 timotimo OH!
14:47 timotimo haha, i'm silly
14:48 ZzZombo m: https://gist.github.com/ZzZombo/5caa51f9b238462d628a5b556920a0d8
14:48 camelia rakudo-moar bdc7a9: OUTPUT«("\$!name" => "name", Attribute.new, ("\$!name",))␤5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:101␤------> 3<BOL>7⏏5<EOL>␤»
14:48 timotimo i configured my moar with -march=native
14:48 ZzZombo err
14:49 viki ZzZombo: what's with c.kv.eager?
14:49 viki m: https://gist.github.com/zoffixznet/21fff132bdacee9682025c195ed2e2fe
14:49 camelia rakudo-moar bdc7a9: OUTPUT«("\$!name" => "name", Attribute.new, ("\$!name",))␤New name: Bob, old name: unnamed.␤A.new␤»
14:49 timotimo AlexDaniel: so since you don't have the exact same cpu as me, it probably uses some optimization-related instruction your cpu doesn't have
14:50 AlexDaniel timotimo: ok, fix it?
14:50 AlexDaniel timotimo: and I'll run it again
14:50 timotimo yes, i'm uploading the new version now
14:50 timotimo c37e662155612839aceb11a070c5a47a895dcf1e
14:50 timotimo that's the new sha1sum, it's up at the same address as before
14:51 viki zoffix@VirtualBox:/tmp/tmp.HFcxxlx7fR$ ./mysterious_but_harmless_binary "wat"
14:51 viki > nqp::say("Hello world!")
14:51 viki Hello world!
14:51 viki >
14:52 AlexDaniel nope
14:52 AlexDaniel ok let's see
14:52 ZzZombo viki: thank you
14:52 AlexDaniel ah no
14:52 AlexDaniel it works!
14:52 timotimo hooray
14:52 AlexDaniel timotimo: IT WORKS!! IT WORKS!!!!
14:52 ZzZombo but what does '|' do exactly here?
14:53 viki ZzZombo: it's a slip
14:53 * viki is in the middle of devouring chicken wings....
14:53 ZzZombo bon appetite
14:54 timotimo AlexDaniel: i'm glad :)
14:56 CIAvash joined #perl6
14:56 ZzZombo viki: what do you think about the whole thing? Any possible improvements?
14:58 chris2 joined #perl6
15:01 ZzZombo m: sub x('Str:D' $s){put $s};x('meow')
15:01 camelia rakudo-moar bdc7a9: OUTPUT«Constraint type check failed for parameter '$s'␤  in sub x at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:01 ZzZombo m: sub x(Str:D $s){put $s};x('meow')
15:01 camelia rakudo-moar bdc7a9: OUTPUT«meow␤»
15:01 ZzZombo what does it attempt to do in the first case?
15:01 timotimo if there was no $s, it'd only match for 'Str:D'
15:02 timotimo m: sub x('Str:D' $s){put $s};x('Str:D')
15:02 camelia rakudo-moar bdc7a9: OUTPUT«Str:D␤»
15:02 timotimo it clearly works the same way with a $s after it
15:02 viki ZzZombo: my %accessors=(setter=>$setter,getter=>$getter); can be written as my %accessors= :$setter, $getter; and if c.Bool {...} doesn't need a .Bool. Looks fine other than that, but I know nothing of MOP or traits
15:02 timotimo you missed a : before $getter
15:02 viki yeah
15:03 ZzZombo what line?
15:03 viki 10
15:03 viki Oh, it was *I* who missed the :
15:04 viki but the %accessors is on line 10
15:04 AlexDaniel m: sub foo(25 $n) { dd $n }; foo 25
15:04 ZzZombo I don't see anything like that... ah
15:04 camelia rakudo-moar bdc7a9: OUTPUT«25␤»
15:04 AlexDaniel I have never seen that
15:04 titsuki hi #perl6
15:04 titsuki Does "rakudobug@perl.org" currently work ? I can't send a bug report.
15:05 AlexDaniel titsuki: it was working yesterday, I think
15:05 viki titsuki: what happens when you do send something?
15:06 titsuki viki: it returns the following message: https://gist.github.com/titsuki/0f4e610ad501f3113bf7e16c9bfff965
15:07 AlexDaniel m: sub foo(True $n) { dd $n }; foo False
15:07 camelia rakudo-moar bdc7a9: OUTPUT«Bool::False␤»
15:07 AlexDaniel bug or not?
15:07 viki m: sub foo(True) { dd 'meow' }; foo False
15:07 camelia rakudo-moar bdc7a9: OUTPUT«"meow"␤»
15:07 viki well, that certainly is :D
15:08 AlexDaniel OOPS
15:08 AlexDaniel bisect: sub foo(True) { dd 'meow' }; foo False
15:08 bisectable6 AlexDaniel, On both starting points (old=2015.12 new=bdc7a91) the exit code is 0 and the output is identical as well
15:08 bisectable6 AlexDaniel, Output on both points: "meow"
15:08 TimToady notabug
15:08 TimToady m: say False ~~ True
15:08 camelia rakudo-moar bdc7a9: OUTPUT«Potential difficulties:␤    Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* instead␤    at <tmp>:1␤    ------> 3say False ~~ 7⏏5True␤True␤»
15:08 viki Sure, but it doesn't show that warning when used in sig.
15:09 ZzZombo m: sub foo(True $n) { dd $n }; foo 'KAABLAAAAM'
15:09 camelia rakudo-moar bdc7a9: OUTPUT«Type check failed in binding to $n; expected Bool but got Str ("KAABLAAAAM")␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:09 TimToady you're supposed to know the principle by the time you start writing multi-siggies :)
15:09 AlexDaniel well, not exactly
15:10 viki titsuki: lemme try to send one as a test...
15:10 titsuki viki: thx!
15:11 TimToady .oO(humongous backlog is humongous)
15:11 ZzZombo uh, I thought to call foo with such signature you would have to call it as foo <expression returning True> <Any>
15:12 ZzZombo why does it bind parameters straight to $n?
15:17 viki titsuki: yeah, I got the same error
15:17 viki titsuki: what was the bug anyway?
15:17 setty1 joined #perl6
15:19 titsuki viki: Here: https://gist.github.com/titsuki/11a483c0aaa509c24407878491698f51
15:20 viki :o
15:20 titsuki viki: I'll try to send it later. thx!
15:20 AlexDaniel viki: so I guess I'll rakudobug it because there is no warning?
15:20 viki that looks scary :)
15:21 AlexDaniel viki: or should we just document it as a trap
15:21 viki AlexDaniel: well, you can try, but RT is broken
15:21 viki AlexDaniel: well, IMO it should warn, just like it does with regular smartmatch, but you also have TimToady's comments above... and well, Rule 1? :)
15:22 AlexDaniel f∞×↓⋆ng RT
15:22 ZzZombo how can I get the default value for an attribute?
15:22 * TimToady is fine with a warning there too, for the record
15:22 viki \o/
15:22 TimToady which is why I had a smiley above
15:23 viki AlexDaniel: titsuki: I emailed perlbug-admin at perl.org and the email seems to have gone through... so... let's wait
15:23 AlexDaniel ok, Rule 1.1: Rule 1 does not apply if there is a smiley
15:23 viki :D
15:28 ZzZombo [23:10:55] <ZzZombo> uh, I thought to call foo with such signature you would have to call it as foo <expression returning True> <Any>
15:28 ZzZombo [23:11:54] <ZzZombo> why does it bind parameters straight to $n?
15:28 ZzZombo anyone knows that?
15:29 viki ZzZombo: well, the True thing is wrong, since the thing uses smartmatch
15:30 viki ZzZombo: foo('meow' $n) {} ... on the other hand. That lets you specify an exact value $n must be for that sub to be called and, yeah, usually you wouldn't use $n (since you know what it should be), but I guess it works with it specified too
15:31 ZzZombo I meant this:
15:31 ZzZombo m: sub foo(True $n) { dd $n }; foo 'KAABLAAAAM'
15:31 camelia rakudo-moar bdc7a9: OUTPUT«Type check failed in binding to $n; expected Bool but got Str ("KAABLAAAAM")␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:31 ZzZombo also, shouldn't there be a comma between the args?
15:31 ZzZombo so many questions D:
15:31 viki m: multi n(τ) { "tau!" }; multi n(π){ "pi!" }; multi n { "meh, just $^n" }; say n $_ for π, 2*π, 42
15:31 camelia rakudo-moar bdc7a9: OUTPUT«pi!␤tau!␤meh, just 42␤»
15:32 viki ZzZombo: think of it as sub foo(Bool $n) { dd $n }; foo 'KAABLAAAAM'; it'd blow up the same
15:32 viki and you don't need a comma
15:32 viki except instead of a Bool you provide an exact value
15:32 khw joined #perl6
15:32 viki (which also happens to be incorret in this case due to smartmatching)
15:33 ZzZombo m: sub foo('13666' $n) { dd $n }; foo 'KAABLAAAAM'
15:33 camelia rakudo-moar bdc7a9: OUTPUT«Constraint type check failed for parameter '$n'␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:33 ZzZombo m: sub foo('13666' $n) { dd $n }; foo '13666'
15:33 camelia rakudo-moar bdc7a9: OUTPUT«"13666"␤»
15:34 ZzZombo I see
15:34 AlexDaniel viki: I loved your comment, by the way
15:34 AlexDaniel viki: about cryogenic chamber
15:34 viki heh
15:34 AlexDaniel viki: you've missed some numbers in the amount of years though, I think
15:35 * viki shrugs
15:35 AlexDaniel digits I mean
15:35 viki it was 1AM :)
15:35 AlexDaniel yeah, you needed some sleep…
15:37 AlexDaniel viki: by the way, fwiw, commit messages are normally ≤ 72, not 80
15:37 viki I'm a rebel ;)
15:37 AlexDaniel that's fine, but the lines wrap around weirdly even on github :)
15:38 viki At least until dalek stops cutting off commit messages that are X-lines long :)
15:38 seatek they even go in and pick out all the extra invisible spaces you might have left in your files
15:39 viki Seem to wrap fine on my github: http://i.imgur.com/pB16vKx.png
15:39 seatek i think they're... obsesive ;)
15:40 AlexDaniel viki: https://files.progarm.org/2016-11-26-173955_645x360_scrot.png and https://files.progarm.org/2016-11-26-174010_902x470_scrot.png
15:41 psch getting frozen inside a cryogenics chamber is probably not particularly conductive to getting unfrozen anyway
15:42 viki I see.
15:42 psch 'cause, y'know, that's the science of achieving extremely low temperatures and the effect of those temperatures :P
15:43 mscha joined #perl6
15:43 psch granted, only the cryonicists really care about the distinction
15:43 psch i'm not one, i'm too poor /o\
15:44 mscha m: say (2..36).map({108.base($^b)}); # This works, but ...
15:44 camelia rakudo-moar bdc7a9: OUTPUT«(1101100 11000 1230 413 300 213 154 130 108 99 90 84 7A 73 6C 66 60 5D 58 53 4K 4G 4C 48 44 40 3O 3L 3I 3F 3C 39 36 33 30)␤»
15:44 mscha m: say (2..36).map(108.base(*)); # ... why doesn't this?
15:44 camelia rakudo-moar bdc7a9: OUTPUT«Cannot resolve caller base(Int: Whatever); none of these signatures match:␤    (Int:D $: Int:D $base, *%_)␤    (Int:D $: Cool $base, $digits?, *%_)␤  in block <unit> at <tmp> line 1␤␤»
15:44 * viki blasts https://www.youtube.com/watch?v=ndOi66foF7o and goes on another bug-fixing marathon
15:45 psch viki: ^^^  that's what i was thinking of wrt Whatever vs Block-closures!
15:45 viki mscha: * when it's a term on its own turns into a Whatever, not WhateverCode
15:45 psch mscha: the Whatever binds to the base method call, hence you're calling 108.base(*) 35 times, and the first of those already doesn't work because Whatever isn't meaningful as a base
15:46 cdg joined #perl6
15:46 mscha Thanks, viki, psch.
15:57 wamba joined #perl6
15:58 kyclark_ joined #perl6
16:11 araujo joined #perl6
16:43 chris2 joined #perl6
16:45 viki grrr... need a faster box
16:45 viki I'm fixing bugs faster than spectest can finish...
16:47 viki or, put another, way: I'm breaking too many things in my fixes that constantly fixing them and re-running spectest is annoying ^_^
16:50 cibs joined #perl6
16:51 AlexDaniel viki: what about making rakudo faster?
16:51 AlexDaniel :)
16:51 viki heh
16:53 viki m: say 579 / 154
16:53 camelia rakudo-moar bdc7a9: OUTPUT«3.759740␤»
16:53 viki my 24-core VM runs stresstest almost 4 times faster than my current box... That's a lot of making-rakudo-faster to do :)
16:54 viki But I can't use Atom on that VM ('cause I ssh)... Can't win :(
16:57 gfldex viki: you can tunnel nfs via ssh
16:59 viki What's nfs? Wasn't it a Windows file system or something?
16:59 RabidGravy well a Sun file system
16:59 viki I tried sshfs, but Atom just freezes, 'cause I think it tries to read all the files to make things in its tree view or something
17:01 AlexDaniel I use sshfs a lot
17:03 AlexDaniel but yes, if your editor does that kind of stuff then it is a problem
17:14 AlexDaniel viki: oh, another option is to rsync after you save
17:15 viki yah, worth tryingh
17:26 firstdayonthejob joined #perl6
17:28 adu joined #perl6
17:31 viki m: dd Version.new("...|||||||.")
17:31 camelia rakudo-moar 085145: OUTPUT«Version.new␤»
17:31 viki m: dd Version.new("...|||||||.") leg v6.c
17:31 camelia rakudo-moar 085145: OUTPUT«Order::Less␤»
17:31 * viki wonders how come bogus version strings in there don't just throw
17:32 viki Like there's a condition for that case: # get "v" highlander␤else { self.new }
17:34 telex joined #perl6
17:36 cdg joined #perl6
17:41 viki Ah, I guess it's 'cause you can generally feed it any old slop and it'll make something sensible:
17:41 viki m: say Version.new("34\x[308]5:###meow77.|[43")
17:41 camelia rakudo-moar 938d4d: OUTPUT«v34̈5.meow.77.43␤»
17:42 geekosaur fsvo sensible
17:43 viki m: use v34̈5.meow.77.43
17:43 camelia rakudo-moar 938d4d: OUTPUT«===SORRY!===␤Error encoding ASCII string: could not encode codepoint 776␤»
17:45 FROGGS hehe
17:46 FROGGS good CATch
17:46 viki It was Zefram, actually. I'm debugging 'it :)
17:48 vendethiel .u ĐÐ
17:48 yoleaux U+00D0 LATIN CAPITAL LETTER ETH [Lu] (Ð)
17:48 yoleaux U+0110 LATIN CAPITAL LETTER D WITH STROKE [Lu] (Đ)
17:48 vendethiel ugh
17:49 AlexDaniel .u ä
17:49 yoleaux U+0061 LATIN SMALL LETTER A [Ll] (a)
17:49 yoleaux U+0308 COMBINING DIAERESIS [Mn] (◌̈)
17:49 AlexDaniel u: ä
17:49 unicodable6 AlexDaniel, U+00E4 LATIN SMALL LETTER A WITH DIAERESIS [Ll] (ä)
17:50 AlexDaniel I wonder what kind of the output most people expect
17:51 viki my terminal is all messed up with those
17:51 viki http://i.imgur.com/qphXsZF.png
17:54 geekosaur doesn't handle utf8 very well, does it?
17:56 zakharyas joined #perl6
18:02 mxco86 joined #perl6
18:02 lizmat_ joined #perl6
18:03 tailgate can a multi-dispatch proto in NQP have different number of arguments?
18:07 BenGoldberg joined #perl6
18:07 tailgate class methods, or subs I mean
18:12 viki FROGGS: is it actually a catch or DIHWIDT?
18:13 viki use v\d+blah is only for perl versions, innit
18:14 viki oh
18:14 viki v34̈5.meow.77.43
18:14 viki dasd
18:14 FROGGS would still be nice if it failed differently
18:14 viki m: say v34̈5.meow.77.43 v42
18:14 camelia rakudo-moar 2f72fa: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say v34̈5.meow.77.437⏏5 v42␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement mod…»
18:14 viki m: say v34̈5.meow.77.43 cmp v42
18:14 camelia rakudo-moar 2f72fa: OUTPUT«Less␤»
18:18 revere joined #perl6
18:28 Lucas_One left #perl6
18:34 eisen74 joined #perl6
18:35 RabidGravy ok I think I may have hit the buffers on my MOP hackery du jour
18:36 viki m: say "a\x[308]" leg "b\x[308]"
18:36 camelia rakudo-moar 2f72fa: OUTPUT«More␤»
18:38 viki m: say "b\x[308]" leg "k\x[308]"
18:38 camelia rakudo-moar 2f72fa: OUTPUT«More␤»
18:38 viki m: say .ords for "b\x[308]", "k\x[308]"
18:38 camelia rakudo-moar 2f72fa: OUTPUT«(98 776)␤(107 776)␤»
18:38 viki How come it's More?
18:41 psch j: say "b\x[308]" leg "k\x[308]"
18:41 camelia rakudo-jvm 76b061: OUTPUT«Less␤»
18:43 psch r: use nqp; say nqp::cmp_s("b\x[308]", "k\x[308]")
18:43 camelia rakudo-jvm 76b061: OUTPUT«-1␤»
18:43 camelia ..rakudo-moar 2f72fa: OUTPUT«1␤»
18:44 geekosaur o.O
18:44 psch that's kinda interesting
18:44 psch apparently an MVMGrapheme32 is really just an MVMint32
18:45 cdg joined #perl6
18:45 psch and on moar the grapheme for "b\x[308]" isn't numericall (i.e. C) less-than than "k\x[308]"
18:45 psch 'cause that's what cmp_s does, in the end
18:46 psch ...well, minus "maybe my MVM src is out of date" :)
18:47 psch https://github.com/MoarVM/MoarVM/blob/master/src/strings/ops.c#L1397
18:47 RabidGravy I've got a weird that is a bit too complicated to post a snippet, but it involves two different EXPORTHOW::DECLARE thingies over-ridding ClassHOW in different ways
18:48 RabidGravy now if I nest them in a declaration, if there is a compose() over-ride on the inner one then it blows up with
18:48 RabidGravy "Representation must be composed before it can be serialized"
18:48 psch RabidGravy: shouldn't you export a new declarator instead of overriding the ClassHOW to get class to behave differently?
18:48 RabidGravy works fine without the compose() method
18:49 psch i mean, i assume you have your reason, but maybe that could solve it?
18:49 RabidGravy psch that's what I'm doing
18:49 psch ah, okay, i guess i misinterpreted "overriding ClassHOW"
18:49 cdg joined #perl6
18:49 RabidGravy class EXPORTHOW::DECLARE::foo is Metamodel::ClassHOW does Somerole { }
18:54 mst ohhh, EXPORT HOW, my brain was trying to parse it as <something> THROW
18:54 RabidGravy :)
18:55 psch well, the only thing i can think of is that you're not setting is_composed
18:55 psch or that some stuff happens out of order for some reason (which probably helps even less as a guess or advice) vOv
18:56 RabidGravy it certainly seems like something happening out of order in some way
18:57 RabidGravy all the compose do callsame
19:06 kyclark_ joined #perl6
19:10 araujo joined #perl6
19:10 araujo joined #perl6
19:12 psch RabidGravy: can't you golf it by removing most of the new stuff in the ClassHOW subclasses?
19:12 psch RabidGravy: maybe that already gives insight too
19:14 RabidGravy yeah just what I was thinking, it's tricky in the sense that you need three separate files
19:15 psch fwiw, that's a feature i wished for a while camelia would have
19:15 psch as in, gists with multiple files etc
19:15 psch not sure how easy that actually is, i think she creates tmp file names for gists
19:18 RabidGravy yep, it "works" in the degenerate case too, 'ang on I'll just them
19:19 zakharyas joined #perl6
19:22 AlexDaniel psch: yeah I know https://github.com/perl6/whateverable/issues/36
19:23 psch AlexDaniel: well, i suppose if whateverable does it camelia doesn't have to
19:23 AlexDaniel sure. Not yet though :(
19:23 RabidGravy psch, https://gist.github.com/jonathanstowe/9db38df33a31a5902d4b0b794be0b19b - simply tested with "perl6 -I. -MBar"
19:23 psch but yeah, camelia does create 'evalbot-file-XXXXXXXXXX' which means module loading is kinda not doable
19:24 RabidGravy remove the compose from "inner" and it doesn't blow up
19:24 psch i suppose shifting everything into tmpdirs per eval call would be possible, but... idk
19:24 AlexDaniel once we actually start running stuff in containers for whateverable this won't be an issue at all
19:24 psch AlexDaniel: well, if whateverable annexes 'm:' at least... :)
19:25 andrzejku joined #perl6
19:25 psch RabidGravy: gotta build r-m first, but i'll try and see if i can figure something out
19:26 AlexDaniel if everything planned for whateverable gets implemented, I think we won't need camelia at all… :)
19:26 AlexDaniel evalable6: .say for ^1000
19:26 evalable6 AlexDaniel, rakudo-moar 2f72fa0: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27␤28␤29␤30␤31␤32␤33␤34…»
19:26 evalable6 AlexDaniel, Full output: https://gist.github.com/1d5bdf24d4dc69e6c0a611f0cd0e64be
19:27 AlexDaniel but that'll need some work. You can't even run something on jvm yet
19:27 psch fwiw, the whole EvalServer thing is actually pretty straight forward
19:28 psch although i suppose it strongly depends on what you're doing in whateverable and how you're doing it
19:29 AlexDaniel what is the startup time, by the way?
19:29 AlexDaniel I'm wondering how long would it take to do one bisectable query…
19:29 psch well that's the thing
19:30 psch we don't do startup time on j:
19:30 psch because Eval*Server* ;P
19:30 AlexDaniel yea but we can't run 4 thousand evalservers
19:30 AlexDaniel s
19:30 AlexDaniel … or can we…
19:30 timotimo how does java feel about getting swapped out completely to disk while it's waiting for a socket to receive connections?
19:31 psch i'm pretty sure the EvalServer starts a thread per eval request
19:31 mst timotimo: betrayed and unloved
19:31 timotimo yo mst
19:31 timotimo can we do something to make it easier for you to bring your makefile and configure improvements up stream? :)
19:32 RabidGravy so I had occassion to look at Scala again during the week, and I am still confirmed in my opinion of it
19:34 psch RabidGravy: huh, *running* Bar works, i.e. './perl6 -I. Bar.pm'
19:36 timotimo https://github.com/rakudo/rakudo/pull/324 - even though it has been resting for a long time, it'd be cool if this could make it into rakudo
19:37 RabidGravy Clip Arser!!
19:40 stux|RC-only joined #perl6
19:40 AlexDaniel ohhh
19:40 AlexDaniel so that's for proper command line argument parsing?
19:40 AlexDaniel finally?
19:41 timotimo parsing arguments to rakudo itself
19:41 AlexDaniel ahmmm…
19:41 AlexDaniel 2 years ago, oops
19:41 psch yeah the bit about "join the whole command line invocation with \0 to parse it with <ws=\0>" wasn't too well received vOv
19:42 psch timotimo++ suggested to use some private unicode character for that, no idea if that alleviates those concerns
19:43 viki Clip arser? :)
19:44 timotimo that's what RabidGravy came up with
19:45 viki Glad I'm not the only one who read it that way.
19:46 psch RabidGravy: i don't think i can make anything of your MOP woes :|
19:48 RabidGravy yeah, it's way weird, I'm not quite willing to call bug on it as it's on the hairy side anyway
19:48 psch m: class A::B {...}; class A { class B { } }
19:48 camelia rakudo-moar 2f72fa: ( no output )
19:48 psch the curious thing is, stubbing like that ^^^ doesn't work for the inner
19:48 psch which is kinda weird
19:49 psch i had thought maybe that does something, but it just complains about "stubbed but not defined"
19:57 ___crlz___ joined #perl6
20:01 RabidGravy the thing is that it appears to be the presence of the compose there, it seems to crap out without calling the provided compose
20:04 rpburkholder joined #perl6
20:06 dalek doc: c72b2e9 | (Daniel Mita)++ | doc/Language/testing.pod6:
20:06 synopsebot6 Link: http://doc.perl6.org/language/testing
20:06 dalek doc: Remove duplicate done-testing text
20:06 dalek doc: review: https://github.com/perl6/doc/commit/c72b2e9904
20:06 dalek doc: 66070d3 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/testing.pod6:
20:06 dalek doc: Merge pull request #1020 from mienaikage/remove-duplicate-text
20:06 dalek doc:
20:06 dalek doc: Remove duplicate done-testing text
20:06 synopsebot6 Link: http://doc.perl6.org/language/testing
20:06 dalek doc: review: https://github.com/perl6/doc/commit/66070d32d0
20:09 psch RabidGravy: well, the stub not working as it should might mean that it doesn't find the package and thus cannot compose it
20:10 psch RabidGravy: but that's a more or less completely blind guess, i'm really not too deep into our MOP, honestly
20:11 psch m: role R { }; class A does R { }; class B is A { }; B.^roles.say
20:11 camelia rakudo-moar 2f72fa: OUTPUT«((R))␤»
20:11 psch not sure why that would happen, anyway
20:11 psch i mean, missing something related to {Pseudo,}Stash
20:17 labster joined #perl6
20:18 RabidGravy yeah, maybe something is getting confused by it it not being a direct descendent of PackageHOW or summat
20:18 RabidGravy let's try that
20:21 RabidGravy nope
20:22 ___crlz___ joined #perl6
20:22 RabidGravy this only came about because I was thinking about expressing the relationship between a schema and the tables in an ORM-like thing
20:26 vendethiel .oO( He said it! The Pattern That Shall Not Be Named )
20:28 RabidGravy :)
20:29 RabidGravy conceptually I don't find it difficult, it's finding a nice way to express things in a way that plays to Perl 6 strengths that is difficult
20:30 B3AN joined #perl6
20:31 B3AN left #perl6
20:37 adu joined #perl6
20:44 TEttinger joined #perl6
20:45 RabidGravy but doing it nicely with like "schema Foo { table Bar {}; table Baz {} };" seems off the cards for the problem stated above
20:58 chris2 joined #perl6
21:00 rindolf joined #perl6
21:02 moritz http://perlpunks.de/paste/show/5839f868.76a3.3ad why does this die?
21:03 moritz $.left seems to be a BinaryTree[Int], not an Int, no?
21:04 ranguard joined #perl6
21:05 geekosaur why are the type objects claimed to be T instead of Int by .perl?
21:06 moritz good question
21:07 moritz is the exception an error in rakudo, or in me?
21:07 * moritz too tired to tell
21:08 geekosaur code looks reasonable to me
21:08 * geekosaur was wondering if maybe that stray T was actually a hint as to what was going wrong...
21:11 moritz I'll submit a rakudobug
21:11 AlexDaniel moritz: please tell if that works
21:12 AlexDaniel ah, there was a bug reported 2 hours ago
21:12 AlexDaniel so the issue is probably gone
21:16 moritz just checking if the bug still exists with today's rakudo:
21:16 moritz m: https://gist.github.com/moritz/5fe8be212699be4f79559910b3f1ec58
21:16 camelia rakudo-moar 2f72fa: OUTPUT«LL[Int].new(item => 5, next => LL[Int].new(item => 4, next => LL[T]))␤5␤No such method 'visit' for invocant of type 'Int'␤  in method visit at <tmp> line 6␤  in block <unit> at <tmp> line 15␤␤»
21:19 * geekosaur specifically wonders: if the type object ended up using T instead of Int, is something else confused and trying to use T instead of Int and complaining about *that* mismatch incorrectly?
21:19 moritz ok, here is the weird thing
21:20 moritz the backtrace says it's in the inner invocation of that method
21:20 moritz why didn't it call say() in there before recursing?
21:21 geekosaur it did. that was the 5. it's dying on the next call (since only one additional visit in the backtrace)
21:22 geekosaur which is why I wonder if that one is somehow looking for, in the gist, LL[T] and throwing on an LL[Int] (and then reporting that badly)
21:23 geekosaur (although that's a weird way to misreport that mismatch... then again iirc some similarly odd mismatch reports of that variety have happened)
21:28 moritz huh, when I change $.next to $!next, it works
21:30 adu joined #perl6
21:33 moritz things are going south here
21:33 moritz I'm trying to prepare some slides for a training
21:34 moritz first I get caught up in a rakudobug
21:34 moritz now vim refuses to export syntax-hilighted HTML, which it did nicely a few hours ago
21:35 ranguard joined #perl6
21:48 trnh joined #perl6
21:50 cdg joined #perl6
21:54 tojo hmm, just installed rakudo with rakudobrew to debian jessie, but can't get IO::Socket::Async examples to work, but with osx precompiled rakudo they work
21:54 tojo any hints about this or is it just me?
21:55 tojo i don't get any error messages, but it doesn't open listening port
21:55 RabidGravy well they work on *Linux* because I wrote some of them
21:56 RabidGravy it's not so clever when it can't open the port to listen sometimes
21:56 RabidGravy try a really high random port number
21:57 jnthn Could also check if it shows up in `neststat -l`
21:57 jnthn uh, netstat
21:58 tojo ah
21:58 tojo tcp6       0      0 localhost:10033         [::]:*                  LISTEN
21:58 tojo ipv6
21:58 tojo how i can change to listening ipv4?
21:59 timotimo hm, do we allow to actually give the bind argument?
21:59 timotimo then it'd probably just be 0.0.0.0?
21:59 timotimo not sure if that throws out ipv6 reliabley?
22:00 tojo hm, with that it listens on every interface?
22:01 geekosaur it should... but I thought linux used the 6to4 stuff
22:01 geekosaur so listening on [::] with a port < 65536 should also listen on 0.0.0.0 same port
22:02 timotimo what, does ipv6 have more ports?
22:02 timotimo (well, port is really a tcp-or-udp-related thing
22:02 timotimo but you get the idea)
22:03 geekosaur it's ulong instead of ushort for port number, yes
22:03 dalek doc: f381605 | coke++ | doc/Type/Method.pod6:
22:03 synopsebot6 Link: http://doc.perl6.org/type/Method
22:03 dalek doc: fix typo
22:03 dalek doc: review: https://github.com/perl6/doc/commit/f381605f10
22:03 dalek doc: f94db38 | coke++ | xt/code.pws:
22:03 dalek doc: learn new code snippets
22:03 dalek doc: review: https://github.com/perl6/doc/commit/f94db38659
22:03 tojo but yeah, that 0.0.0.0 did the trick, thanks!
22:03 geekosaur you just don't see that much since it can't really be reflected into ipv4
22:03 RabidGravy for clients it's a pain as libuv seems to prefer v6 so if it can resolve an AAAA it will try that first
22:04 geekosaur and my machine isn't a good test as I only have ipv4 locally
22:05 geekosaur hm, no, listed ip6 sockets and the autoconfigure local one is set. so I guess debianoids do distinguish them
22:06 dmaestro joined #perl6
22:08 RabidGravy ooh does localport work for clients? that would fix a longstanding issue on HUA regarding the tests on a v6 enabled network
22:09 RabidGravy localhost rather
22:09 geekosaur depends on what's in the hosts file
22:20 RabidGravy no, specifying the localhost to the client as 0.0.0.0 rather than letting it pick one (possibly v6)
22:21 geekosaur that should work if it lets you specify, yes
22:21 * RabidGravy looks at the code
22:21 perlawhirl Does anyone wanna help me bike shed an option name before i push this module to ecosystem
22:21 perlawhirl https://github.com/0racle/p6-Pod-To-Markdown-Fenced
22:22 perlawhirl should the config option be 'info' instead of 'lang', given that Commonmark refers to that thing as the 'info string'
22:24 RabidGravy geekosaur, the code would indicate that the IO::Socket::INET will bind to a specfied localhost for both client and servers
22:31 adu joined #perl6
22:36 ___crlz___ joined #perl6
22:38 eisen74 joined #perl6
22:45 kyclark_ joined #perl6
22:53 seatek joined #perl6
22:57 bjz joined #perl6
23:03 canopus joined #perl6
23:05 wamba joined #perl6
23:23 Ven joined #perl6
23:30 Actualeyes joined #perl6
23:34 mscha joined #perl6
23:48 chris2 joined #perl6
23:49 cdg joined #perl6
23:53 viki titsuki: got reply from the admin: "Please try again.  There was a configuration error that has been fixed."

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

Perl 6 | Reference Documentation | Rakudo