Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-07-07

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:01 Lambd0x ugexe, If I unninstall GTK::Simple and remove module call in the code even thought the path contains the binaries it seems it won't just understand it :(
00:01 ugexe Lambd0x: show me the full command and output
00:02 timotimo Lambd0x: oh, you'll get a few FATAL errors from gtk and/or glib. they are harmless
00:02 timotimo like, when i start gimp, i get this message twice: (gimp:24418): Gimp-Widgets-CRITICAL **: gimp_device_info_set_device: assertion '(info->device == NULL && GDK_IS_DEVICE (device)) || (GDK_IS_DEVICE (info->device) && device == NULL)' failed
00:04 Lambd0x ugexe, https://pastebin.com/4wwyA3Ai (The module call has been removed from the code.)
00:04 Lambd0x this path contains all the dlls.
00:05 raschipi joined #perl6
00:05 Lambd0x timotimo, ye but my app won't run :/
00:06 ugexe Lambd0x: if you are inside the gtk-simple repo when running the command, use `perl6 -I. <whatever>`
00:06 ugexe `C:\Users\Nicolas Peter Lane\gtk-simple>perl6 -I. ..\Downloads\tabelaJM.pl6`
00:10 Lambd0x ugexe, the same thing still happens
00:12 ugexe does your script include a module named App? or is that presumably something with GTK::Simple?
00:12 mr-foobar joined #perl6
00:12 ugexe because the error you posted makes sense because the -I path you included wasn't a perl distribution/lib path
00:13 timotimo well, gtk-simple does come with a module called App
00:13 timotimo https://github.com/perl6/gtk-simple/blob/master/lib/GTK/Simple/App.pm6
00:13 Lambd0x A code provided by the GTK::Simple oop object.
00:14 ugexe well it wouldn't have known about GTK::Simple::App *at all* because the -I path didn't point to anything
00:14 Cabanossi joined #perl6
00:14 Lambd0x but even with the latter suggestion?
00:15 ugexe with -I. (while cwd is the gtk simple repo) it would find the module, so I would expect the error to be different at least
00:15 ugexe try -Ilib maybe
00:16 ugexe installed/-I<meta-path>/-I<lib-path> all work slightly different
00:16 Lambd0x ok, but in the code do I keep the Gtk::Simple module calls commented?
00:18 ugexe no. does `perl6 -I. -e "use GTK::Simple::App;"` not blow up?
00:20 ugexe Lambd0x: did you post your code somewhere?
00:21 Lambd0x ugexe, just the latter cmd of your it doesn't blow.
00:21 Lambd0x I'll post the code.
00:22 Lambd0x https://pastebin.com/ADTRmK3Z
00:30 mr-foobar joined #perl6
00:34 Lambd0x https://pastebin.com/hr7bpNpv after your suggestion of cmd I`ve tried to execute the code it hangs at least a minute then it returns this https://pastebin.com/hr7bpNpv
00:37 ugexe i wonder if its the spaces in the path
00:38 ugexe Failed to copy 'C:\Users\Nicolas Peter Lane\resources\blib\lib\GTK\libgtk-3-0.dll' to 'C:\Users\NICOLA~1\AppData\Local\Temp\libgtk-3-0.dll': Failed to copy file: no such file or directory in sub find-bundled at C:\Users\Nicolas Peter Lane\gtk-simple\lib/GTK/Simple/NativeLib.pm6 (GTK::Simple::NativeLib) line 98
00:40 ugexe does `dir C:\Users\NICOLA~1\AppData\Local\Temp\` show you a directory listing or say "The system cannot find the file specified."
00:42 Lambd0x ugexe, It lists the dir files https://pastebin.com/zuvTeH91
00:46 Lambd0x ugexe, I've tried getting the files copied before handed but it still tries to copy them and fails
00:47 Lambd0x bah It's quite complicated to get this module working for Win. ahha
00:49 ugexe hmmm so it seems to be copying all but 1 file
00:55 Lambd0x ugexe, it fails with libgtk-3-0.dll but it's there already
00:56 Lambd0x ugexe, maybe it would make sense with the issue already open that you showed to me?
00:57 k-man joined #perl6
00:58 astj joined #perl6
01:01 jdv79 could not parse XML
01:01 jdv79 cool error XML
01:02 jdv79 can't a grammar at least kick out a guess?
01:03 lookatme morning
01:05 lookatme jdv79, debug document: https://docs.perl6.org/programs/01-debugging
01:05 ugexe Lambd0x: probably need a new ticket
01:05 ugexe i'm getting the same error with your script, even though the library it says it cant load is where it says
01:08 Lambd0x I see.
01:08 Lambd0x ugexe, sad.
01:08 jdv79 Grammar::Tracer doesn't seem to work from the calling scope
01:08 jdv79 which would be neat
01:10 lookatme How about `use trace` ?
01:10 jdv79 why would that help me?
01:11 jdv79 i know what's running.  its kicking an error msg.
01:13 lookatme Sometimes, grammar error not friendly
01:13 jdv79 i guess there isn't a neat way to get generic errors
01:13 jdv79 yet
01:14 lookatme For me, I often use `<?{}>` non-capture group for debugging grammar .
01:15 timotimo Grammar::Tracer changes how grammars are compiled, so it can't be dynamic
01:15 lookatme I have not try Grammar::Tracer yet, I just know it
01:15 mst maybe the PPR::Error thing damian added after I pointed out that failed PPR parses were essentially undebuggable would help
01:15 jdv79 i'm not trying to debug a grammar i'm authoring.  just trying to figure out why the XML module failed to parse some xml
01:15 jdv79 that's the use case
01:17 lookatme m: grammar C { token TOP() { ^ <s> $ }; token s { "int main" <?{ say "GET $/";}> } }; C.parse("int main")
01:17 camelia rakudo-moar b0c8e1: OUTPUT: «GET int main␤»
01:18 lookatme That's what I said
01:18 jdv79 thanks
01:23 jdv79 well, that's interesting.  vim crashes when trying to edit that "xml" file.
01:23 jdv79 its just a reddit page
01:23 jdv79 weird
01:25 lookatme :(
01:26 jdv79 oh, its working.  my fault.  forgot the /.rss part.
01:26 jdv79 doh!
01:26 jdv79 oh but rakudo segv'd
01:26 jdv79 :(
01:31 astj_ joined #perl6
01:33 jdv79 wonder if i can golf that one
01:36 MasterDuke jdv79: did you build your own rakudo? if so, could you rebuild moar with debugging and try running in gdb and/or valgrind?
01:36 jdv79 its breaking cause of oter stuff now.  i'll try to get there...
01:46 jdv79 "Odd number of elements found where hash initializer expected" - what's that all about when i'm assiging it a ${...}
01:46 Cabanossi joined #perl6
01:46 geekosaur er? ${...} itemizes it, so you'd be assigning one thing
01:46 jdv79 it used to work
01:46 jdv79 this is code that ran "fine" > 6 months ago
01:46 jdv79 well, this part
01:48 ilbot3 joined #perl6
01:48 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!
01:50 jdv79 I'm guessing Hash.new changed so that you can just stuff a {} but it needs |{}
01:50 jdv79 weird
01:50 jdv79 *can't
02:02 MasterDuke can you show just the part that used to work so we can bisect it?
02:15 noganex joined #perl6
02:20 Geth ¦ doc: VynceMontgomery++ created pull request #1412: Document some of the Cool traps
02:20 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1412
02:22 BenGoldberg m: my role R {}; Metamodel::MethodContainer.add_method( R, "asdf", sub { 42 } ); dd R.asdf;
02:22 camelia rakudo-moar b0c8e1: OUTPUT: «No such method 'add_method' for invocant of type 'Perl6::Metamodel::MethodContainer'. Did you mean 'add_method'?␤  in block <unit> at <tmp> line 1␤␤»
02:25 Geth ¦ doc: VynceMontgomery++ created pull request #1413: Explicitly note coercion to string for .contains
02:25 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1413
02:31 TimToady joined #perl6
02:32 Geth ¦ doc: ef19e0695b | (Vynce Montgomery)++ (committed by Zoffix Znet) | doc/Language/traps.pod6
02:32 Geth ¦ doc: Document some of the Cool traps (#1412)
02:32 Geth ¦ doc:
02:32 Geth ¦ doc: As discussed in #992 there are a few possible traps in Cool, especially with regard to Lists. Some of these behaviors may change, but while they work this way, let's document them.
02:32 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ef19e0695b
02:33 Geth ¦ doc: 6ffd299f1d | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
02:33 Geth ¦ doc: Fix typo in URL
02:33 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6ffd299f1d
02:42 cpage_ joined #perl6
02:43 Cabanossi joined #perl6
02:51 casdr joined #perl6
02:56 shadowpaste joined #perl6
03:00 astj joined #perl6
03:21 Ben_Goldberg joined #perl6
03:44 Geth ¦ whateverable/master: 9 commits pushed by (Aleks-Daniel Jakimenko-Aleksejev)++
03:44 Geth ¦ whateverable/master: 568be3b8da | Don't build everything in one go
03:44 Geth ¦ whateverable/master: a24ebe84e9 | Old oops
03:44 Geth ¦ whateverable/master: ff8d1a0857 | Use --git-reference if possible
03:44 Geth ¦ whateverable/master: 8cb45343f2 | Don't try too hard when building MoarVM
03:44 Geth ¦ whateverable/master: 723c73c34e | Yet another commit range
03:44 Geth ¦ whateverable/master: b596e94c9e | Long-term storage using lrzip (issue #117)
03:44 Geth ¦ whateverable/master: 59b5f7807c | Better highlighting in Greppable output
03:44 Geth ¦ whateverable/master: 5779a0d9f9 | start-all script
03:44 Geth ¦ whateverable/master: c59c37cd1a | Better .gitignore file
03:44 Geth ¦ whateverable/master: review: https://github.com/perl6/whateverable/compare/54cc2c99dc...c59c37cd1a
03:44 AlexDaniel phew!
03:47 japhb joined #perl6
03:48 kyan joined #perl6
03:48 greppable6 joined #perl6
03:49 TreyHarris joined #perl6
03:57 Geth ¦ whateverable: a9683044c8 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files
03:57 Geth ¦ whateverable: The absence of -- in a command is usually a bug
03:57 Geth ¦ whateverable:
03:57 Geth ¦ whateverable: In this case, a query like “HEAD grep=-V say 42” was failing. Not that
03:57 Geth ¦ whateverable: it is a sensible query, but it shouldn't fail like that.
03:57 Geth ¦ whateverable:
03:57 Geth ¦ whateverable: Another possible solution is to use ‘-e’ (which expects a pattern in the
03:57 Geth ¦ whateverable: next argument), but it is slightly less explicit as I'm used to seeing
03:57 Geth ¦ whateverable: -- everywhere (and also assuming that there's a bug if I don't see it).
03:57 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/a9683044c8
03:57 Cabanossi joined #perl6
03:58 AlexDaniel 10 commits, 0 issues resolved /o\
04:01 ugexe i
04:10 Geth ¦ perl6.org: c5e401c102 | (Zoffix Znet)++ (committed using GitHub Web editor) | source/resources/index.html
04:10 Geth ¦ perl6.org: List https://perl6book.com/ chart in book section
04:10 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/c5e401c102
04:15 japhb joined #perl6
04:33 xtreak joined #perl6
04:42 Cabanossi joined #perl6
04:46 zoll joined #perl6
04:46 raiph joined #perl6
04:51 japhb joined #perl6
05:00 Atomic_qm8UY joined #perl6
05:17 Atomic_qm8UY2 joined #perl6
05:17 japhb joined #perl6
05:18 ChoHag joined #perl6
05:27 Atomic_qm8UY joined #perl6
05:29 mr-foobar joined #perl6
05:38 ufobat joined #perl6
05:42 wamba joined #perl6
05:59 astj joined #perl6
06:10 Xliff joined #perl6
06:11 |oLa| joined #perl6
06:13 nadim joined #perl6
06:17 Geth ¦ whateverable: e19b4441e5 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files
06:17 Geth ¦ whateverable: Fix tests
06:17 Geth ¦ whateverable:
06:17 Geth ¦ whateverable: I guess the idea of having suggestions defined in tests is not
06:17 Geth ¦ whateverable: perfect. Newer commits may have “nicer” shas, and this breaks tests for
06:17 Geth ¦ whateverable: no good reason. For now, I'll just change the test, but in a long run we
06:17 Geth ¦ whateverable: should come up with something better.
06:17 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/e19b4441e5
06:17 Geth ¦ whateverable: e08dcfa8bc | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/bisectable.t
06:17 Geth ¦ whateverable: Fix Bisectable test
06:17 Geth ¦ whateverable:
06:18 Geth ¦ whateverable: This test will take a bit longer given that we now have pre-2015.12
06:18 Geth ¦ whateverable: commits stored in a more compact (but slower) way.
06:18 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/e08dcfa8bc
06:24 bisectable6 joined #perl6
06:24 evalable6 joined #perl6
06:24 committable6 joined #perl6
06:24 bloatable6 joined #perl6
06:24 quotable6 joined #perl6
06:24 unicodable6 joined #perl6
06:24 coverable6 joined #perl6
06:24 greppable6 joined #perl6
06:24 benchable6 joined #perl6
06:24 statisfiable6 joined #perl6
06:26 emeric joined #perl6
06:37 DarthGandalf joined #perl6
06:38 domidumont joined #perl6
06:38 profan joined #perl6
06:39 leedo_ joined #perl6
06:41 leont joined #perl6
06:42 matt_ joined #perl6
06:47 konsolebox joined #perl6
06:52 xtreak joined #perl6
07:00 abraxxa joined #perl6
07:09 cpage_ joined #perl6
07:12 rindolf joined #perl6
07:14 salva joined #perl6
07:20 darutoko joined #perl6
07:23 domidumont joined #perl6
07:24 abraxxa joined #perl6
07:27 geekosaur joined #perl6
07:29 domidumont joined #perl6
08:00 domidumont joined #perl6
08:00 robertle joined #perl6
08:03 zoll left #perl6
08:14 xtreak joined #perl6
08:19 kyan joined #perl6
08:24 lookatme Hi
08:25 no-n hi
08:25 lookatme Is someone know well Supply ?
08:26 lookatme https://gist.github.com/araraloren/c9f53c8aecaf1272765c70b25d3c347b
08:26 lookatme I wonder how that `auto-restart` work?
08:27 lizmat lookatme: why the subs inside of the supply block ?
08:27 Cabanossi joined #perl6
08:27 lizmat why not lose the sub?
08:28 lookatme I stole the idea from jonathan's video
08:28 lizmat ah, now I see...
08:28 lizmat :-)
08:28 lizmat ok, that's clear then  :-)
08:28 * lizmat should wake up before writing comments
08:29 xtreak joined #perl6
08:32 lookatme And I comment line 43, with that line the script will be exit when an exception raised
08:51 ilmari joined #perl6
09:03 jnthn lookatme: The whenever taps the incoming Supply. When there's an asyncrhonous exception, it's caught by the QUIT, and in reaction it calls auto() again which runs whenever again which taps the Supply again, thus starting processing again. And the QUIT is re-instated for the next attempt.
09:06 lookatme jnthn, thanks, that's clear now. And that
09:07 lookatme 's make sense why when I add line 43, the script exit
09:07 bjz joined #perl6
09:09 perlawhirl m: say bag(< A B >) ⊂ bag(< A A B C C D >)
09:09 yoleaux 6 Jul 2017 18:39Z <zengargoyle> perlawhirl: thanks for p6-dately, that looks sorta like my first thoughts before reading the strptime man page and thinking about locale and stuff. dragons indeed.
09:09 camelia rakudo-moar b0c8e1: OUTPUT: «False␤»
09:09 lookatme jnthn, there still a problem, when I remove line 41 `start { $s.wait(); };`, the program not working. I thought it would be work when I call auto-restart on `$server`
09:10 jnthn No, because that just returns a Supply (into $s); you have to tap it still
09:10 jnthn $s.tap; would do it
09:11 jnthn start { $s.wait() } is just a far more expensive way to do that :)
09:11 lookatme jnthn, got it! cool! That
09:11 perlawhirl lizmat: subsets on bags look a little wonky. ps. really appreciate all the bag/set optimisations. thank you
09:11 lookatme 's work replace with .tap
09:11 lookatme jnthn, very thanks
09:12 jnthn Welcome :)
09:13 xtreak joined #perl6
09:14 jameslenz joined #perl6
09:16 parv joined #perl6
09:18 leont jnthn: regarding reading lines: :encoding is generally considered a hog, :utf8_strict is much faster (and likely to become :utf8 in the next perl5 release)
09:20 moritz for years the recommendation was to use :encoding(UTF-8) because :utf8 was unsafe
09:20 moritz I guess that's what stuck with most of us
09:21 jnthn Hm, :encoding(utf8) isn't strict? That surprises me a tad. :)
09:21 moritz it is
09:21 jnthn Good to know, though I was after all aiming for "what would the typical programmer not doing much research write" :)
09:22 moritz just :utf8 as a layer isn't
09:22 jnthn Oh
09:22 moritz open my $file, '<:utf8', $filename;
09:22 * jnthn is confused by now :)
09:22 moritz that's the unsafe thing, which leont says is fast
09:23 Juerd Oh boy, :utf8_strict becoming :utf8 means people will get comfortable using :utf8, and introduce security bugs when their code happens to be run with older versions.
09:23 jnthn I just googled perl 5 read lines utf-8 and picked the first result :)
09:23 moritz and then there's open my $file, '<:utf8_strict', $filename which is fast and safe
09:23 jnthn Well, after checking it looked like a reputable source (PerlMaven)
09:24 moritz and then there's '<:encoding(UTF-8)' which is safe and slow and has been the recommendation for years and years
09:24 Juerd First we get disabled-by-default security fixes for backwards compatibility, and now we get a kind of backwards compatibility that introduces security issues... Perl 5, what are you doing? :(
09:24 notostraca joined #perl6
09:24 leont moritz is correct
09:26 Juerd And of course the non-fixes by adding the secure version of something with entirely new syntax, while keeping the dangerous thing alive without a way to disable it. (Referring to the new <<>> that's the more secure but semantically different version of <>)
09:27 leont jnthn: my point was more that :utf8_strict is a more interesting target to benchmark against, because :encoding is known to be a slow design.
09:28 moritz otoh it's what people typically get when they write idiomatic Perl 5 code
09:28 leont True
09:28 moritz so arguments for both sides :-)
09:28 moritz when was utf8_strict introduced?
09:28 Juerd Wasn't the "first rule of benchmarks": use both alternatives :)
09:29 leont It's a CPAN module, not a core module, has been existing for a few years now
09:29 moritz oh
09:29 leont Kind of had to redesign some internals in core to make it suitable for core, for reasons you really don't want to know
09:29 moritz when I need fast UTF-8 decoding, I've been using Unicode::UTF8 from CPAN
09:29 leont :utf8_strict is based on Unicode::UTF8 :-)
09:30 astj joined #perl6
09:30 moritz oh nice :-)
09:30 moritz then I'm not as much out-of-touch as I thought I was :-)
09:32 jnthn leont: Will try against that one at some point, though as moritz noted I was aiming for typical use. :)
09:38 bjz joined #perl6
09:47 robinsmidsrod joined #perl6
09:49 robinsmidsrod joined #perl6
09:55 robinsmidsrod joined #perl6
10:04 abraxxa joined #perl6
10:04 zengargoyle wouldn't a utf8 -> utf8_struct fall under the "need to use v5.028 to activate" sort of thing and utf8 would be just utf8 unless requested somehow?
10:05 zengargoyle like you don't get postfix_defref or unicode_strings or ... on older perls.
10:12 zengargoyle you could probably add some Unicode::Normalize in the p5 somewhere to massage incoming data into some standard form.
10:18 ufobat m: class { has Int @.ints; method new (Int :$int, Int :@ints) { self.bless( ints =>  defined $int ?? [$int] !! @ints);} }.new(ints => [1,2]).perl.say
10:18 camelia rakudo-moar b0c8e1: OUTPUT: «Type check failed in binding to parameter '@ints'; expected Positional[Int] but got Array ($[1, 2])␤  in method new at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
10:18 ufobat how could i get this to work?
10:20 jnthn Depends what exactly you want :)
10:21 jnthn m: class { has Int @.ints; method new (Int :$int, :@ints) { self.bless( ints => $int // @ints) } }.new(ints => [1,2]).perl.say
10:21 camelia rakudo-moar b0c8e1: OUTPUT: «<anon|71260544>.new(ints => Array[Int].new(1, 2))␤»
10:21 jnthn That's one way
10:21 jnthn (Which allows an untyped array to be bassed to new)
10:24 leont joined #perl6
10:25 ufobat and if i want to type contraits @ints from new? or .. could this be considdered as obsolte because if i pass rubbish self.bless fails anyway, and both is a runtime error
10:27 zengargoyle m: class { has Int @.ints; submethod BUILD (Int :$int, :@ints) {  @!ints = $int // @ints } }.new(ints =>[1,2]).perl.say
10:27 camelia rakudo-moar b0c8e1: OUTPUT: «<anon|61340096>.new(ints => Array[Int].new(1, 2))␤»
10:28 ufobat another question, is there a way to reduce the named arguments in new() to one? so that from a callers perspective i could .new(ints => 1) OR .new(ints => [1,2])
10:29 astj joined #perl6
10:31 jnthn Just try it? :P
10:31 jnthn m: class { has Int @.ints; }.new(ints => 1).perl.say
10:31 camelia rakudo-moar b0c8e1: OUTPUT: «<anon|70756240>.new(ints => Array[Int].new(1))␤»
10:31 jnthn m: class { has Int @.ints; }.new(ints => [1,2,3]).perl.say
10:31 camelia rakudo-moar b0c8e1: OUTPUT: «<anon|65849280>.new(ints => Array[Int].new(1, 2, 3))␤»
10:32 jnthn I think the constraint inside of the class is enough
10:32 xtreak joined #perl6
10:32 ufobat class { has Int @.ints; method new (:$int) { self.bless( ints => $int ~~ Array ?? $int.flat !! $int);} }.new(int => 1).perl.say
10:32 astj_ joined #perl6
10:33 ufobat huh!
10:33 ufobat i like your solution much better than mine :)
10:34 ufobat thanks for all the help :)
10:35 * Zoffix puts on a fireproof suit
10:35 Hor|zon joined #perl6
10:35 Zoffix New blog post: "The Hot New Language Named Rakudo": https://perl6.party/post/The-Hot-New-Language-Named-Rakudo
11:04 * llfourn is in general agreement with the above post
11:21 tbrowder hi #perl6
11:21 llfourn hi tbrowder
11:21 tbrowder ref star builds: i thiink i see a quick solution to the --prefix problem
11:22 tbrowder hi llfourn
11:24 tbrowder if one configs *without* the prefix option, all will build locally, then the make install option could use an added prefix option to install into a system-wide directory (as root if needed)
11:26 ufobat m: class A {has Str @.a is required; has Str $.aa is required; submethod BUILD(:$a, :$!aa) {@!a = @$a} }; class B is A {has $.b is required };  B.new(a => ["1"], aa => "aa", b => 1).perl.say
11:26 camelia rakudo-moar b0c8e1: OUTPUT: «B.new(b => 1, a => Array[Str].new("1"), aa => "aa")␤»
11:26 ufobat m: role A {has Str @.a is required; has Str $.aa is required; submethod BUILD(:$a, :$!aa) {@!a = @$a} }; class B does A {has $.b is required };  B.new(a => ["1"], aa => "aa", b => 1).perl.say
11:26 camelia rakudo-moar b0c8e1: OUTPUT: «The attribute '$!b' is required, but you did not provide a value for it.␤  in block <unit> at <tmp> line 1␤␤»
11:26 perlawhirl bisectable6: say bag(< A B >) ⊂ bag(< A A B C C D >)
11:26 bisectable6 perlawhirl, Bisecting by output (old=2015.12 new=b0c8e18) because on both starting points the exit code is 0
11:27 ufobat i guess thats the expected behavoir? because submethod BUILD of a role does "work" for the first class that uses this role, right?
11:27 timotimo right, it's just a method (submethod usually) so it does the same mechanism for replacement that you get for any other (sub)method
11:27 ufobat so there is no other way to specify the "magic behavour" for the construction via named parameter for a role
11:28 ufobat i need to do that for each class that implements this role?
11:28 bjz joined #perl6
11:28 timotimo we don't have a magic mechanism yet
11:29 ufobat or could i "extend" the BUILD method defined in a role in the class?
11:30 timotimo i don't think you can without knowing the class you're applying to, i think?
11:31 tbrowder so the incantation would be something like: "perl Configure.pl ...", "make; make test" (all as an ordinary user), then, as root, "make install --prefix=/opt/desired-dir"
11:31 ufobat i was thinking of submethod BUILD (:$!classparam, *%_) { callsame(|%_)}
11:31 ufobat so i could just handle my $classparam there and pass the other to the inherited BUILD method?
11:31 ufobat not sure about callsame() and signatures, but as a principle idea?
11:31 timotimo no, callsame won't give you the original one, because it gets replaced fully
11:31 ufobat :/
11:32 timotimo you could self.OriginalClass::BUILD()
11:32 timotimo i *think*
11:33 ufobat but instead of callsame() - if i name the BUILD in the role 'BUILD-ROLE' and in the class i do  of submethod BUILD (:$!classparam, *%_) { BUILD-ROLE(|%_) }
11:35 ufobat m: class A {has Str @.a is required; has Str $.aa is required; submethod BUILD(:$a, :$!aa) {@!a = @$a} }; class B is A {has $.b is required; submethod BUILD (:$!b, *%_) {self.OriginalClass::BUILD(|%)} };  B.new(a => ["1"], aa => "aa", b => 1).perl.say
11:35 camelia rakudo-moar b0c8e1: OUTPUT: «Cannot dispatch to method BUILD on Failure because it is not inherited or done by B␤  in submethod BUILD at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
11:36 ufobat wow thats funny :D
11:37 ufobat m: class A {has Str @.a is required; has Str $.aa is required; submethod BUILD-ROLE(:$a, :$!aa) {@!a = @$a} }; class B is A {has $.b is required; submethod BUILD (:$!b, *%_) {self.BUILD-ROLE(|%_)} };  B.new(a => ["1"], aa => "aa", b => 1).perl.say
11:37 camelia rakudo-moar b0c8e1: OUTPUT: «No such method 'BUILD-ROLE' for invocant of type 'B'. Did you mean 'BUILD-ROLE'?␤  in submethod BUILD at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
11:37 ufobat is there a typo i didnt mention?
11:37 tbrowder hm, looks like we would need a new tgt, some like "make install-system /desired/prefix"
11:38 tbrowder s/some/something/
11:40 aborazmeh joined #perl6
11:40 aborazmeh joined #perl6
11:41 moritz ufobat: no, the submethod is not available from the subclass
11:41 tbrowder i would also change the current "install" tgt to "install-local" and eliminate the --prefix option.
11:41 moritz ufobat: that's the difference between submethods and methods; submethods aren't inherited
11:41 ufobat moritz, but i can! specify submethod in a role
11:41 ufobat and the class inheriting that role gets the submethod
11:42 moritz ufobat: I'm talking about yur last example. There BUILD-ROLE is define din a class, not in a role
11:42 ufobat ARGS!
11:42 ufobat i took the wrong one to continue
11:42 ufobat thanks for pointing it out!
11:45 ufobat m: role A {has Str @.a is required; has Str $.aa is required; submethod BUILD-ROLE(:$a, :$!aa) {@!a = $a} }; class B is A {has $.b is required; submethod BUILD(:$!b, *%_) { self.BUILD-ROLE(|%_)} };  B.new(a => ["1"], aa => "aa", b => 1).perl.say
11:45 camelia rakudo-moar b0c8e1: OUTPUT: «No such method 'BUILD-ROLE' for invocant of type 'B'. Did you mean 'BUILD-ROLE'?␤  in submethod BUILD at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
11:46 moritz you need class B does A
11:46 moritz not class B is A
11:46 ufobat args!
11:47 ufobat much better
11:48 ufobat m: role A {has Str @.a is required; has Str $.aa is required; submethod BUILD-ROLE(:$a, :$!aa) {@!a = $a} }; class B does A {has $.b is required; submethod BUILD(:$!b, *%_) { self.BUILD-ROLE(|%_)} };  A.new(a => ["1"], aa => "aa", b => 1).perl.say
11:48 camelia rakudo-moar b0c8e1: OUTPUT: «A.new(a => Array[Str].new("1"), aa => "aa")␤»
11:48 ufobat m: role A {has Str @.a is required; has Str $.aa is required; submethod BUILD-ROLE(:$a, :$!aa) {@!a = $a} }; class B does A {has $.b is required; submethod BUILD(:$!b, *%_) { self.BUILD-ROLE(|%_)} };  B.new(a => ["1"], aa => "aa", b => 1).perl.say
11:48 camelia rakudo-moar b0c8e1: OUTPUT: «Type check failed in assignment to @!a; expected Str but got Array ($["1"])␤  in submethod BUILD-ROLE at <tmp> line 1␤  in submethod BUILD at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
11:48 ufobat ah maybe yeah
11:48 ufobat :/
11:49 ufobat first example is nonsense now
11:52 ufobat my real world example works now with submethod BUILD-ROLE()
11:52 * ufobat needs a break
11:58 abhi_ joined #perl6
11:58 tbrowder ref star: i will work on my proposed solution as a PR if it seems reasonable to others
12:03 raschipi joined #perl6
12:08 stmuk_ tbrowder: I'd rather see R* work the same way as R itself as it does currently
12:09 stmuk_ I agree that's its non-standard for Configure.pl to copy install files in place but that is currently the way Rakudo works as well as Rakudo Star
12:10 tbrowder the solution may work for both. you are talking about the R* tarball?
12:10 stmuk_ yes
12:10 tbrowder nom also?
12:12 stmuk_ I don't follow you
12:13 tbrowder never mind, i confused myself.  anyhoo, i think the same solution could work for both. if it can, would you agree to a trial?
12:14 stmuk_ I see Rakudo Star as being a fairly conservative repacking of Rakudo itself
12:14 tbrowder right...
12:15 stmuk_ changing the way Configure/make works probably should be done in Rakudo itself
12:15 stmuk_ I'm sure people would like to see experiments in branchs and I can help test anything
12:16 tbrowder yep, but it is not easy to root the current behavior out. if i were king, i would go to a cmake build and install system.
12:18 stmuk_ yes the current behaviour is unusual and making more standard is a worthy goal
12:19 stmuk_ I'm not keen on adding cmake as a dependency .. we already have perl as a dependency and that should be powerful enough I'd have thought
12:19 tbrowder so i see my method as a first step in allowing a user config/build and then root install. then the unraveling can be done when someone has the motivation to dig into it.
12:20 jnthn The thing is that Rakudo, NQP, and MoarVM are 3 separate things, each with their own build/install. That we provide a configure option to generate the dependencies is purely intended as a convenience for getting a local development build.
12:21 jnthn Or at least, was ;-)
12:21 jnthn Maybe it would better meet expectations if instead there was an "install all 3 things" script
12:21 jnthn So you just ran *that* with required perms
12:22 jnthn And then it wouldn't look like Configure is installing stuff :P
12:22 stmuk_ :)
12:22 tbrowder cmake can be complex to change over to, but it is cross-platform and builds for linux, mac, and windows. after moving to it, dev life becomes a bit easier for build maint.
12:22 jnthn hahahahaha
12:22 stmuk_ did DESTDIR ever get into Rakudo itself I forget?
12:23 * jnthn had enough interactions with cmake on Windows to not belive that it'll make his life easier for a moment :P
12:23 stmuk_ tbrowder: although the 3 layer model does make things complicated .. the actual perl 5 scripts are well written, clear, and easy to understand
12:23 timotimo i'm watching Summer Games Done Quick right now, and i've got an idea: maybe we should write the build system as an NES rom
12:23 tbrowder jnthn: you're probbly right, pay money, take choice
12:24 timotimo there's NES emulators for pretty much every device you can think of, after all
12:24 jnthn tbrowder: Yeah, I mean, I'm sure cmake is well engineered and stuff
12:24 * stmuk_ bikesheds by suggesting SNES :P
12:24 jnthn tbrowder: But my experiences have just been "arrrgh". :)
12:24 timotimo oooh, if we build an SNES rom, we could use the custom 3d coprocessor they used for starfox
12:25 timotimo for something like a pretty progress bar during the build
12:25 jnthn I figure with time more and more people will get Perl 6 from a package manager though
12:25 jnthn Which is an even better way to not have the issue :-)
12:26 stmuk_ the perl 5 people advise *not* using package manager versions
12:26 timotimo we can be better than that!
12:26 timotimo just have to prevent distro people from applying too many patches
12:26 jnthn stmuk_: Using the package manager to install things != using packages provided by your distro
12:27 timotimo we've also got a prototype for an appimage, for example
12:27 timotimo that covers every single distro under the sun, potentially
12:27 tbrowder my interest in this build business is long-time exp with buiding as ord user and fix any probs before final installation. i feel a bit out of control with it now
12:27 stmuk_ more modern things like docker and snaps are much better than rpm/deb
12:28 raschipi You wish they were. They are just rpb/deb underneath.
12:28 timotimo appimages aren't
12:28 raschipi One isn't a substitute for the other anyway.
12:29 El_Che I don't think that docker and rpm/deb compete for the same use cases
12:29 jnthn Was gonna say, can't remember the number of dockerfiles I've written that install packages :)
12:29 stmuk_ I probably should experiment with appimage R*
12:30 llfourn +1 for rakudo SNES rom. Maybe we can sell physical rakudo SNES cartridges to support the project.
12:30 raschipi When people talk about delivery, they do compete and agree they could be better one day (not yet). But in this discussion, about building and deploying, deb/rpm does it, flatpaks don't.
12:30 timotimo you saw samcv's work in that direction, right, stmuk_?
12:30 stmuk_ nope I will backlog
12:30 timotimo at least a month old
12:30 timotimo it's in her github i think
12:32 stmuk_ https://github.com/samcv/rakudo-appimage-module-test-automation
12:32 stmuk_ the main thing people have been asking for in R* is $DESTDIR support
12:34 nicq20 joined #perl6
12:43 Cabanossi joined #perl6
12:46 * stmuk_ decides to look at this anyway
12:48 brabo joined #perl6
13:03 linuksz joined #perl6
13:16 linuksz i have two hash, and i want to make a third hash from them
13:16 linuksz every value in the hashes is a reference to a key-value pair
13:16 linuksz the hashes have keys that are the same, but both hash keys that aren't in the other hash
13:16 linuksz the references in the values points to and
13:16 linuksz - 'english_value' key in %hash1
13:16 linuksz - 'translated_value' key in %hash2, e.g.
13:16 linuksz %hash1<example_msg><english_value> = "some text"
13:16 linuksz %hash2<example_msg><translated_value> = "valami szöveg"
13:16 linuksz i want to make a hash that contains both english_value and translated_value for the key:
13:16 linuksz %hash3<example_msg><english_value> = "some text"
13:16 linuksz %hash3<example_msg><translated_value> = "valami szöveg"
13:16 linuksz how can i do it?
13:19 dct joined #perl6
13:20 moritz m: my %h1 = msg => { english => 'some text' }; my %h2 = msg => { translated => 'text halt' }; my %h; for %h1.keys -> $k { %h{$k}{english} = $h1{$k}{english}; %h{$k}{translated} = $h2{$k}{translated} }; say %h.perl
13:20 camelia rakudo-moar b0c8e1: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$h1' is not declared. Did you mean '%h1'?␤at <tmp>:1␤------> 3 for %h1.keys -> $k { %h{$k}{english} = 7⏏5$h1{$k}{english}; %h{$k}{translated} = $␤»
13:20 moritz m: my %h1 = msg => { english => 'some text' }; my %h2 = msg => { translated => 'text halt' }; my %h; for %h1.keys -> $k { %h{$k}{english} = %h1{$k}{english}; %h{$k}{translated} = %h2{$k}{translated} }; say %h.perl
13:20 camelia rakudo-moar b0c8e1: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routines:␤    english used at line 1␤    translated used at line 1␤␤»
13:21 moritz m: my %h1 = msg => { english => 'some text' }; my %h2 = msg => { translated => 'text halt' }; my %h; for %h1.keys -> $k { %h{$k}<english> = %h1{$k}<english>; %h{$k}<translated> = %h2{$k}<translated> }; say %h.perl
13:21 camelia rakudo-moar b0c8e1: OUTPUT: «{:msg(${:english("some text"), :translated("text halt")})}␤»
13:21 moritz linuksz: ^^
13:24 linuksz and something similar to .append or .push ?
13:25 moritz why?
13:25 linuksz that would be simpler.
13:26 moritz would it?
13:26 moritz then show please :-)
13:31 AlexDaniel joined #perl6
13:38 linuksz it's not good solution, because both hashes has keys that aren't in the other hash
13:40 moritz what should the result be in such a case?
13:41 linuksz a key in %hash3 with only english or only translated value
13:42 linuksz i didn't tried it, but if i think well, it will fail, if a key is only in %hash1
13:43 Cabanossi joined #perl6
13:45 moritz for (%h1.keys, %h2.keys).flat.uniq -> $k { ... }
14:02 cdg joined #perl6
14:03 cdg_ joined #perl6
14:08 ptolemarch joined #perl6
14:13 skids joined #perl6
14:27 jdv79 i think i'm still getting async related segvs.  is that a common thing?
14:28 SmokeMachine m: my %h1 = msg => { english => "some text" }; my %h2 = msg => { translated => "text halt" }; my %h; %h.push: %h1.keys Z=> (english => %h1.values>>.<english>); %h.push: %h2.keys Z=> (translated => %h2.values>>.<translated>); dd %h
14:28 camelia rakudo-moar b0c8e1: OUTPUT: «Hash %h = {:msg($[:english(("some text",)), :translated(("text halt",))])}␤»
14:29 SmokeMachine m: my %h1 = msg => { english => "some text" }; my %h2 = msg => { translated => "text halt" }; my %h; %h.push: %h1.keys Z=> %(english => %h1.values>>.<english>); %h.push: %h2.keys Z=> %(translated => %h2.values>>.<translated>); dd %h
14:29 camelia rakudo-moar b0c8e1: OUTPUT: «Hash %h = {:msg($[:english($("some text",)), :translated($("text halt",))])}␤»
14:32 AlexDaniel jdv79: well, it depends
14:32 jnthn jdv79: I've not seen much of that at all in any of the async stuff I've done of late, but it's certainly the case that code that ends up accidentally over-sharing state can trigger that.
14:33 jnthn And there are a few code-gen bugs to sort out that might cause that.
14:33 AlexDaniel jdv79: it could be that your code is broken, actually. In my experience, about 70% of problems were my mistakes, and the rest rakudo's :)
14:33 jdv79 i'm trying to golf it but its...being difficult
14:34 timotimo maybe gc debug or nursery size reduction can tease it out better?
14:35 kurahaupo joined #perl6
14:35 jnthn (Also, SEGV really isn't an appropriate response, so that's also on the todo list to fix up.)
14:36 pierre_ joined #perl6
14:36 jdv79 at least its easy to trigger.  just golfing it is being too much fun.
14:36 pierre_ Hi perl6 users
14:36 linuksz SmokeMachine, your solution isn't good, because it stores a reference to an array in %h<msg>, that contains two reference to key-value pairs. it should contain a reference to a hash
14:37 pierre_ i was off perl6 for sometime, wanted to use some perl6 at work today, to call some APIs, i see that now, we have still HTTP::UserAgent but also some Net::HTTP modules
14:38 pierre_ which one should i use? (knowing that i can't install HTTP::UserAgent with zef, some tests are failing
14:39 linuksz i will rewrite my script, so it won't need to use two hashes
14:41 jdv79 https://gist.github.com/anonymous/5a444339c4dd0325f44d28e871151daf
14:42 timotimo damn, it doesn't say which gc_mark it comes from :(
14:44 jnthn Yeah, that'd need a moar built with debug symbols
14:56 linuksz i get the following error: http://sprunge.us/fXPQ when i try to run this code:
14:56 linuksz #!/usr/bin/perl6
14:56 linuksz use v6;
14:56 linuksz use Ncurses;
14:56 linuksz initscr;
14:56 lizmat joined #perl6
14:56 linuksz exit;
14:56 jdv79 how come make install in rakudo doesn't pickup a newly build moar
14:57 timotimo linuksz: can you have a look at that file? it's potentially a script file
14:57 timotimo the .so file i mean
14:57 linuksz is the problem with the module, or i fucked up something?
14:58 timotimo it depends
14:58 timotimo if the .so file is one of these linker scripts, that's because we don't support these yet
14:58 linuksz so can i solve it, or the module developer?
14:59 jdv79 https://gist.github.com/anonymous/efbc51044e41171c0489e88916b2e50c
14:59 timotimo linuksz: maybe the module author should give a fallback where they allow you to pass a filename per env var
15:00 timotimo could you please look at what the .so file contains?
15:00 linuksz the module allows to specify the path of the library via PERL6_NCURSES_LIB variable
15:00 linuksz maybe it solve the problem?
15:01 linuksz INPUT(-lncursesw)
15:01 timotimo on my machine it contains just INPUT(libncurses.so.6 -ltinfo), which is something we don't support i believe
15:02 timotimo why that isn't just a symlink we will never know
15:04 linuksz so what should i do? can i solve it? the module author has no activity on github almost a month ago
15:04 domidumont joined #perl6
15:05 jdv79 MoarVM panic - that's new to me
15:06 jnthn Hmm...in callcapture
15:06 jnthn I saw another report relating to that not so long ago
15:06 jdv79 MoarVM panic: Heap corruption detected: pointer 0x7fb0fe405090 to past fromspace
15:06 jdv79 i'll golf it as far as i can an rt it i guess
15:06 jdv79 *and
15:08 timotimo linuksz: you can change the module's lib finding thingie locally and install your locally modified version
15:08 timotimo actually, maybe the module should be changed to also supply a version
15:11 setty1 joined #perl6
15:19 khw joined #perl6
15:20 wigner joined #perl6
15:38 nadim joined #perl6
15:44 tmp172618 joined #perl6
15:45 tmp172618 left #perl6
15:54 nadim left #perl6
15:55 nadim joined #perl6
16:04 robertle joined #perl6
16:15 bisectable6 joined #perl6
16:18 AlexDaniel .tell moritz any news regarding the unicode issue on irclog? For example, I can't even see what the actual code here: https://irclog.perlgeek.de/perl6/2017-07-07#i_14839522
16:18 yoleaux AlexDaniel: I'll pass your message to moritz.
16:19 * TimToady too
16:21 jdv79 is rt slow on the email gw?  i pushed a bug and i see and got nothing
16:23 * jdv79 wonders if i should just login and repost it
16:23 TimToady I think it goes through a moderation step that is...variable...in its throughput
16:26 jdv79 [Coke]: know about that?
16:26 mr_ron joined #perl6
16:27 mr_ron left #perl6
16:29 espadrine_ joined #perl6
16:29 jdv79 i used to get an email right back
16:29 jdv79 how do i know its not lost forever?!
16:30 konsolebox joined #perl6
16:31 AlexDaniel jdv79: you should have faith!
16:32 jdv79 in any case here it is...https://gist.github.com/anonymous/64e9b793e3ca115532002a2a1104aeed
16:32 AlexDaniel jdv79: I've never had anything actually get lost, but I've been annoyed by the delay also :)
16:32 jdv79 jnthn: that's as good as i can do.  sorry.
16:33 jdv79 i's like to know what that is all about.  not a great contributor signal
16:33 jdv79 submit a bug and nothing but crickets
16:33 jdv79 :(
16:34 AlexDaniel jdv79: well, maybe RT #128520 is for you :)
16:34 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=128520
16:40 mr_ron joined #perl6
16:41 mr_ron Perl 6 is production ready - oops - if you used "perl6" in an any scripts then get ready to rename to rakudo.
16:41 AlexDaniel mr_ron: hm?
16:47 TimToady m: say bag(< A B >) ⊂ bag(< A A B C C D >)
16:47 camelia rakudo-moar c76d93: OUTPUT: «False␤»
16:47 TimToady m: say bag(< A B >) ⊂ bag(< A A B B C C D >)
16:47 camelia rakudo-moar c76d93: OUTPUT: «True␤»
16:47 TimToady it would appear to be requiring a smaller number for every key, not just one of them
16:49 jdv79 oh cool.  the bug was created.
16:49 TimToady I would have expected that if any key's value is less than the corresponding one, it's a subbag
16:49 TimToady m: say bag(< A B >) ⊂ bag(< A B C >)
16:49 camelia rakudo-moar c76d93: OUTPUT: «False␤»
16:50 TimToady and hence the degenerate set case doesn't actually work as expected
16:50 domidumont joined #perl6
16:50 mr-fooba_ joined #perl6
16:57 Cabanossi joined #perl6
17:06 bdmatatu joined #perl6
17:07 Zoffix mr_ron: I think you're jumping about 10 steps ahead of reality.
17:08 timotimo some people really like that
17:08 kerframil joined #perl6
17:08 timotimo perl 6 is production ready - oops - the sun just exploded and consumed all life on earth in a blazing fire
17:09 timotimo hm, not sure if that really fits the other sentence
17:10 bisectable6 joined #perl6
17:11 mr_ron I know it's early but a little worried about the change and wondered if anyone else felt the same way.  I don't expect my comment to have much weight anyway.
17:14 Zoffix mr_ron: I think all comments have equal weight. I think the name of the executable is a minor, non-pressing technical issue, compared to the crux of the matter.
17:14 Zoffix As in, it doesn't have to change.
17:18 buggable joined #perl6
17:19 Zoffix buggable: 6.d
17:19 buggable Zoffix, I think 6.d Diwali will be released in about 14 weeks, 4 days, 6 hours, 40 minutes, and 44 seconds
17:19 Zoffix nice
17:21 bisectable6 joined #perl6
17:23 nhywyll joined #perl6
17:32 ab5tract joined #perl6
17:36 ab5tract TimToady: i believe that subbag behavior is due to lizmat reverting some behavior recently
17:36 yoleaux 2 Sep 2016 22:56Z <perlawhirl> ab5tract: You need to update you META6 for Terminal::Print to add OO::Monitors as a dependency
17:38 ab5tract i asked her about it earlier this week.
17:41 ab5tract Zoffix: you know, just this week i was told by a person both that Perl 6 is a waste of my time and that, frustratingly, the only real objection said person has to Perl 6 is the name
17:41 ab5tract thank you for sharing your thoughts on the topic, it helps to clarify my own
17:42 ab5tract m: bag(<A B>) (>+) bag(<A B C>)
17:42 camelia rakudo-moar c76d93: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "(>+)" in expression "bag(<A B>) (>+) bag(<A B C>)" in sink context (line 1)␤»
17:42 ab5tract m: say bag(<A B>) (>+) bag(<A B C>)
17:42 camelia rakudo-moar c76d93: OUTPUT: «False␤»
17:43 ab5tract TimToady: note that I am reading the scrollback on irclog.perlgeek so i'm not actually sure whether you were testing (>) or (>+)
17:45 ab5tract there are also some interesting corner cases in subbag logic
17:45 ab5tract m: say bag(<A A B C>) (>+) bag(<A B C C>)
17:45 camelia rakudo-moar c76d93: OUTPUT: «False␤»
17:46 evalable6 joined #perl6
17:51 Zoffix :)
17:51 ab5tract but we used to handle them all correctly in (>), according to the set operator implementations in PR #911
17:52 ab5tract and (>+) still does :)
17:52 ab5tract m: say bag(<A B C C>) (>+) bag(<A A B C>)
17:52 camelia rakudo-moar c76d93: OUTPUT: «False␤»
17:54 kerframil joined #perl6
17:56 bit_lySLH2uSZHed joined #perl6
17:58 ab5tract Zoffix: we are both using our "real" handles at the same time, too. what are the odds?! naming seems to be on the menu of themes for today :)
17:58 cdg joined #perl6
17:58 kybr i'm having trouble finding info on "Code". what is Code? i'm trying to make a c-based, callback-based system call into my perl6.
17:58 Zoffix :)
17:58 Zoffix huggable: Code
17:58 huggable Zoffix, Code object: https://docs.perl6.org/type/Code
17:59 ab5tract kybr: are you using NativeCall already?
17:59 seatek joined #perl6
17:59 kybr okay. :D sorry. sometimes googling is NOT the answer. sometimes, just browse the POD. thanks! yeah, i'm using NativeCale.
17:59 bit_lySLH2uSZHed left #perl6
17:59 Zoffix .oO( NativeKale )
18:00 Zoffix m: .^mro.say for -> {}, sub {}, my method {}, /^/,
18:00 camelia rakudo-moar c76d93: OUTPUT: «((Block) (Code) (Any) (Mu))␤((Sub) (Routine) (Block) (Code) (Any) (Mu))␤((Method) (Routine) (Block) (Code) (Any) (Mu))␤((Regex) (Method) (Routine) (Block) (Code) (Any) (Mu))␤»
18:01 Zoffix m: Code.ACCEPTS($_).say for -> {}, sub {}, my method {}, /^/, my submethod {}
18:01 camelia rakudo-moar c76d93: OUTPUT: «True␤True␤True␤True␤True␤»
18:01 Zoffix m: Code.ACCEPTS($_).say for -> {}, sub {}, my method {}, /^/, my submethod {}, *.so
18:01 camelia rakudo-moar c76d93: OUTPUT: «True␤True␤True␤True␤True␤True␤»
18:02 kybr NativeKale, HA! also, thank for this channel and all the help.
18:02 ab5tract kybr: any time :)
18:03 ab5tract if you find out anything in your adventures not already covered in the documentation, doc.git commit bits are handed out pretty freely around here :)
18:05 pilne joined #perl6
18:07 masak lizmat: the only argument against giving (<) and (<=) baggy semantics is that it's usually a Perlish thing that operators coerce their operands if needed, rather than be polymorphic
18:07 yoleaux 5 Jul 2017 11:39Z <lizmat> masak: do you have any thoughts on deprecating (<+) in favour of baggy semantics of (<) and (<=) ?
18:07 yoleaux 5 Jul 2017 13:51Z <Element80> masak: you have a bunch of PRs on this module: https://github.com/masak/data-pretty/pulls
18:07 yoleaux 5 Jul 2017 13:53Z <Element80> masak: Actually a whole ton of PRs are waiting for merge in virtually all of your dists: https://temp.perl6.party/buggable/8490434769545881499262717.html
18:08 masak lizmat: but it's not a very strong argument; it could be argued that something like `<` works just as well for Int, Rat, Num etc without casting
18:09 ab5tract masak: https://github.com/rakudo/rakudo/pull/911#issuecomment-258947434
18:09 TimToady I see it more as a sticky Complex sort of situation
18:10 TimToady or FatRat
18:10 masak hm, mebbe
18:10 masak what's sticky in this case, the Bagness?
18:10 TimToady yep
18:11 TimToady Num is also an example of a sticky type
18:12 famrani joined #perl6
18:12 ab5tract don't forget about the Mixitude ;)
18:12 TimToady m: say (1.0 + 1.0e0).WHAT
18:12 camelia rakudo-moar c76d93: OUTPUT: «(Num)␤»
18:12 TimToady Mixitude is even stickier :)
18:13 masak there are degrees of stickiness, yes
18:13 TimToady just as Complex is stickier than Num
18:14 masak I think sometimes about the fact that people want Int to be a subtype of Rat to be a subtype of Num
18:14 lucasb joined #perl6
18:14 TimToady it's worked out pretty well for our numerics, so I think it'll work pretty well for our bagatelles as well
18:15 TimToady while Int is a subtype of Rat in mathematics, we're actually in the business of making computers run fast :)
18:16 TimToady and our subtypes are not sufficiently developed to guarantee a change in REPR
18:16 masak nadim: re https://irclog.perlgeek.de/perl6/2017-07-05#i_14829671 -- I don't particularly dislike `:` on method calls, I just don't particularly use them. (and therefore I find them overused most everywhere else.)
18:18 masak nadim: if I were to find a reason for liking `.method(...)` more than `.method: ...`, I think it's that I like my method calls to look like function calls. the parens do that for me.
18:18 masak (I also tend to put in the `()` in `foo()` function calls a lot, even when I don't have to)
18:19 masak TimToady: the subtypes/REPR thing is a good point, of course. but it means living with the inevitable newcomer FAQ of why it doesn't work.
18:20 ab5tract not sure if this was already discussed when the examples on perl6.org were updated
18:20 Skarsnik joined #perl6
18:20 Skarsnik Hello
18:20 yoleaux 3 Jul 2017 22:18Z <geekosaur> Skarsnik: use MONKEY-GUTS; say nqp::defined(int.^nativesize) #`{ which is why it should be a p6 undef not nqp }
18:21 ab5tract but i have this feeling like adding TMTOWDI alternatives might be worth the additional application/presentation complexity
18:22 ab5tract or maybe that just means fleshing out the endpoint for "More examples"
18:25 ab5tract masak: why what doesn't work?
18:27 masak m: my Rat $r = 5
18:27 camelia rakudo-moar c76d93: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot assign a literal of type Int (5) to a variable of type Rat. You can declare the variable to be of type Real, or try to coerce the value with 5.Rat or Rat(5), or just write the value as 5.0␤at <tmp…»
18:28 masak people would reason "an integer is a rational number, so that ought to work"
18:28 ufobat joined #perl6
18:34 ab5tract I guess I'm just missing the inherent connection to unifying bagatelle semantics behind a specific set of operators
18:34 ab5tract my Bag $b = set <hello>
18:35 ab5tract ok, I see :)
18:36 ab5tract but then that makes me wonder whether the better answer would be to make this work
18:36 ab5tract m: my Bag() $b = set <hello>
18:36 camelia rakudo-moar c76d93: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Coercion Bag(Any) is insufficiently type-like to qualify a variable␤at <tmp>:1␤------> 3my Bag() $b7⏏5 = set <hello>␤    expecting any of:␤        constraint␤»
18:36 aindilis joined #perl6
18:36 bit_lySLH2uSZHed joined #perl6
18:38 ab5tract though I don't know enough about the compiler to know whether allowing defined coercions is possible or not
18:39 bazzaar joined #perl6
18:39 bazzaar \o perl6
18:41 Zoffix o/
18:42 nicq20 \o
18:42 famrani joined #perl6
18:43 bazzaar I'm an avid follower of all the perl6 blogs and I am in awe of the dedication that the Perl6 team show week in, week out.
18:45 Zoffix Cool.
18:47 nicq20 Anyone know of a module to easily take XML and turn it into a Hash?
18:47 Skarsnik hm
18:47 bazzaar I've just been reading Zoffix's articles on Seq's, and found them really informative, a big thanks from me for explaining that part of the current implementation.
18:47 ab5tract bazzaar: I agree with you. It's a pretty big feat, enchanting a runtime for Perl 6 into existence!
18:48 Skarsnik Probably can use the XML module and transform the XML element to hash
18:48 nicq20 The 'XML' module is ok, but it's far too complex for anything that I would use. (Plus it's a bit confusing)
18:49 Skarsnik does element<key> map to something?
18:49 Zoffix nicq20: why a hash?
18:49 nicq20 Not withou a bunch of work.
18:49 Skarsnik I don't remember but I think XML type has [] and hash operator defined
18:49 wamba joined #perl6
18:49 nicq20 Zoffix: Hash would make sense because XML elements have names in the first place.
18:50 Skarsnik hm, can be confusing
18:50 Zoffix nicq20: but so would a proper structure. What is your end goal?
18:50 Skarsnik elem<key> should give you what?
18:52 Zoffix $ perl6 -MDOM::Tiny -e 'DOM::Tiny.parse(q|<div><p id="a">Test</p><p id="b">123</p></div>|).at("#b").all-text.say'
18:52 Zoffix 123
18:52 ugexe god i hate hackerrank
18:52 Skarsnik https://github.com/supernovus/exemel/blob/master/lib/XML/Element.pm6#L786
18:52 Skarsnik there [] and <> defined on elements
18:52 Skarsnik so they can act like a hash/array
18:52 Zoffix buggable: eco dom::t
18:52 buggable Zoffix, DOM::Tiny 'Very small, self-sufficient DOM parser manipulator': https://github.com/zostay/p6-DOM-Tiny
18:53 nicq20 Skarsnik: Huh, I'll try that again. Maybe, I was doing it wrong.
18:53 ab5tract personally what I would like to see is an implementation of XML::Rabbit. the most annoying thing about using the Perl 5 implementation is the Perl 5 package semantics
18:53 bazzaar I just read Zoffix's article on language naming, I respect people's different viewpoints. I have a bit of a different view, would folks mind if I state it here?
18:55 Skarsnik nicq20, maybe you have so code example. It's been a while I haven't use XML
18:55 Zoffix bazzaar: state it
18:56 bazzaar I'm a 'perl' user, for two decades I loved to solve problems with perl5, now I love to solve problems with perl6.
18:56 bazzaar I see Perl as the brand name for a family of accessible, and exciting programming languages, and the Perl brand certainly has my allegiance.
18:56 bazzaar Who knows, down the line, there may be a Perl7 Web Edition, or something.
18:56 bazzaar Perl is evolving, and in transition, the different specifications under one umbrella is a positive thing in my book.
18:56 bazzaar In 10 years, I'm confident Perl6 will be seen as just 'Perl' to new users, but it should stay named as Perl6.
18:57 bazzaar The old motto is "don't throw the baby out with the bathwater".
18:57 bazzaar If anything, maybe try to encourage new (and existing) Perl5 literature (to use the 'Perl 5' moniker, instead of 'Perl').
18:57 nicq20 Skarsnik: I have an XML structure like: "<a><b>foo</b><c>bar</c></a>". I would like to get something like: %var<a><b> #returns "foo"
18:57 cdg joined #perl6
18:58 Skarsnik It's kinda ambiquous, there could be various A in your xml at the same level
18:59 ab5tract IIUC, Zoffix's suggestion is to use 'Rakudo Perl 6' as the full name
18:59 famrani joined #perl6
19:00 ab5tract This seems like a decent middle ground to keep the (obvious-once-stated and continued) relationship to Perl 5
19:00 nicq20 Skarsnik: Fair; I was kind of figuring that would return an array in that case.
19:00 ab5tract or the "family vibe" of Perl, so to speak
19:01 Zoffix bazzaar: that doesn't solve the issue of the Rakudo language perceived as just another version of Perl. You've been a loyal "customer" for 2 decades. You know what's-what under the Perl umbrella. But the 20-something wanna-be programmer reading the tech blogs doesn't. They're not gonna read the fine print and boilerplate text before decided whether they're should read something about it
19:01 ab5tract while also allowing the language to move into a better set of circumstances in a lot of directions
19:01 ab5tract but I also have to say that I've agreed with you for the most part.. up until earlier this week when a colleague said something to make me think a bit more about it
19:01 Skarsnik nicq20, I mean try to play around with [] and <> on xml element and see if that enought. x)
19:02 nicq20 Skarsnik: Oh! Sorry about that. :)
19:02 Zoffix Yes, exactly, the suggestion is to use "Rakudo Perl 6". This creates the ability to start a conversation about the language. To let the potential users look at the features first, without being distracted by all the baggaage.
19:02 kyan joined #perl6
19:02 Zoffix And if they make it past the point where they find out the full name has "Perl" in it, it won't really matter, as the reason they made it that far is due to a feature that caught their eye
19:04 bit_lySLH2uSZHed joined #perl6
19:05 nicq20 Skarsnik: I can't seem to get anything but [] syntax working.
19:05 nicq20 Skarsnik: Here's the docs: https://github.com/supernovus/exemel#examples
19:05 bit_lySLH2uSZHed left #perl6
19:06 Skarsnik oh yeah <> will look at the element attributes
19:07 Skarsnik You probably want to write stuff like $elem.elements(:TAG<foo>)[0]
19:09 nicq20 Skarsnik: I guess that works. :/
19:10 nicq20 Skarsnik: Not a very nice solution though. That will leave me with the element inside of an Array or two.
19:11 Skarsnik Dunno, maybe you can extends the class and add a .tag method to make the writing better
19:11 bazzaar I just wanted to give my view, you guys are more 'in the know' about how the language will evolve, than I.
19:11 ab5tract bazzaar: I also haven't "made up my mind" so to speak, but if there's a chance to minimize one of my biggest frustrations (Perl hackers who won't even take a look at Perl 6)
19:12 Skarsnik external views is good too, since you don't have your mind formated in a way that can be affected by your deep knowledge of everything
19:12 bazzaar my thanks again, for the brilliant work you are all doing.
19:12 nadim masak: I try to use : instead for () just to see what I make of it at the end ;)
19:12 Zoffix I plan to write a proper marketing plan leading up to 6.d. I think that'll show something more tangent vis-a-vis the problem of the name.
19:13 ab5tract then not only does it keep the Perl family together, it might make some long-standing (and quite sour) family dynamics less problematic
19:13 ab5tract one of the biggest things a so-called "enemy" can do to surprise another "enemy" is to make a concession that was considered impossible before
19:16 Skarsnik related to 6.d. Here some of my thoughs about NativeCall https://gist.github.com/Skarsnik/4e89902d51c245be94fcff8c0b870799
19:17 ab5tract and I put scare quotes around those because the animosity is relatively concentrated in smaller portions of each languages' user base
19:18 jdv79 now that i think about it.  its kinda hilarious that months ago, 6?, i stopped working on a pet project i was doing in p6 because of async related segvs.
19:18 Zoffix Skarsnik: would you add that to this repo, please: https://github.com/perl6/6.d-prep
19:18 jdv79 and i just picked it up last night and same issue.
19:18 ab5tract In other words, I guess I'm in the camp of "whatever it takes to get the largest amount of us to get along"
19:18 Zoffix Skarsnik: this way we keep all the 6.d things in one place instead of dozens of scattered gists :)
19:19 Skarsnik should do like a NativeCall.md ?
19:19 Zoffix Skarsnik: yeah. anything really. I still need to collect all the other gists and put them up in there and structure it all and whatnot.
19:20 jdv79 that's rough.  good thing i'll be back.  but i can't imagine a random passerby being that persistent.
19:21 Skarsnik can I use zef like panda options wise?
19:21 Skarsnik like panda --notests installdeps . is the same with zef ?
19:21 Zoffix Skarsnik: zef --/test --depsonly install .
19:21 Skarsnik Ok thanks
19:22 Skarsnik *need to patch everymodule .travis file* *run away*
19:22 jdv79 do we have some sort of bug prioritization scheme?
19:23 Skarsnik I think RT has stuff like priority?
19:23 Skarsnik Not sure if it's used thou
19:23 Zoffix jdv79: yup: https://6guts.wordpress.com/2017/05/12/looking-for-perl-6-rakudo-and-moarvm-development-funding/
19:23 Zoffix jdv79: I see the code is using XML. I'm pretty sure there's another ticket that has a SEGV with that module but it's very ungolfed.
19:24 Zoffix Maybe it was even your ticket from 6 months ago :)
19:24 jdv79 the core issue may be that there's really only one person that can fix those
19:24 jdv79 :(
19:25 Skarsnik Zoffix, dumb though, a Perl 6 Patron?
19:25 jdv79 maybe, i don't remember that far back
19:25 Zoffix Skarsnik: hm?
19:25 Skarsnik *Patreon
19:26 Zoffix Skarsnik: I don't get it. Patreon what? dumb what?
19:26 Skarsnik Have a Patreon for Perl6 on https://www.patreon.com/home
19:26 Skarsnik since it's monthly donation it's pretty more stable than just regular donations
19:26 Zoffix Ah
19:27 Zoffix jdv79: something around that. jnthn++ mostly ends up sniping those types of bugs. I'm currently thoroughly learning C to raise my skill to be able to dig into them too.
19:27 Zoffix 25% complete so far.
19:28 * Zoffix can't wait to break through the other end of the Rakudo->nqp->MoarVM tunnel and see the light.
19:29 Zoffix Must be cool to be able to work on literally every part :)
19:29 Skarsnik huhu
19:29 Skarsnik I wonder if my memory leak with code using the XML module is still here
19:30 jdv79 25% isn't nothin!  i guess.
19:31 Skarsnik Zoffix, hm the 6.d repo is writable for people of the perl6 group?
19:31 ab5tract Still, it would be interesting to see what kind of buy-in jnthn++ might be able to get if he got paid on a per RT fixed basis
19:31 Skarsnik *6.d-prep
19:32 ab5tract There's a guy who makes nine (beautiful) hand-drawn dungeon RPG maps a month and clears over 500 per map (give or take per-month donation thresholds set by supporters)
19:33 Skarsnik If you check on patreon, some artist are above 1000$/month because it's easy for people to just put like 5$/month and forget about it
19:33 ab5tract Even there, he sets predictable minima per supporter tier (aka '$5 a map ($25 per month minimum)')
19:34 Zoffix Skarsnik: yeah it is. What, you get errors?
19:34 Skarsnik but I don't know how the legal/taxes stuff issue
19:34 Skarsnik No, just asking ^^
19:34 Zoffix Ah
19:35 ab5tract m: say my $per-month = 9 * 500; say $per-month * 12 # this was the ("max average") income of the map maker
19:35 camelia rakudo-moar c76d93: OUTPUT: «4500␤54000␤»
19:35 Skarsnik I have to do work via ssh or start a VM to work on perl6 stuff at the time :(
19:38 gdonald joined #perl6
19:39 ab5tract https://www.patreon.com/dysonlogos/
19:40 linuksz joined #perl6
19:42 ab5tract He even shares the maps and adventures he wrote around the maps on his own website: https://rpgcharacters.wordpress.com/maps/adventures/
19:42 Skarsnik these maps are sexy
19:42 ab5tract You're welcome ;)
19:43 kyan joined #perl6
19:52 nicq20 What is the method called when `%foo<bar>` is run? Is it just postcircumfix?
19:53 nicq20 Err, `postcircumfix:<>`?
19:54 moritz postcircumfix:<{ }> I believe
19:54 yoleaux 16:18Z <AlexDaniel> moritz: any news regarding the unicode issue on irclog? For example, I can't even see what the actual code here: https://irclog.perlgeek.de/perl6/2017-07-07#i_14839522
19:54 khw joined #perl6
19:54 Skarsnik at-key
19:54 moritz AlexDaniel: no news, sorry; I'm currently under some nasty time constraints
19:54 Skarsnik AT-KEY even I think
19:55 notostraca joined #perl6
19:55 FROGGS joined #perl6
20:04 nicq20 Is there any sort of "this is the value of this object" method when using it's value, or does everything just use class methods like '.Str'?
20:04 * zengargoyle has been trying to think of a case where re-branding a language worked and can't.  not sure if that's because it hasn't or it has so well that i can't think of it. :|
20:04 geekosaur zengargoyle, the language formerly known as livescript
20:04 geekosaur we call it javascript these days
20:07 geekosaur (I should say Mozilla Livescript because there's a newer language with that name...)
20:08 zengargoyle my closest was Smalltalk to Squeak and Pharos... not sure exactly what the differences are there.
20:09 perigrin While two of them do start with 'S', one of those has an 'm' in it.
20:09 zengargoyle would Python 3 have taken off faster if it was called some other snake name?
20:10 perigrin Ekans
20:10 geekosaur Squeak was just a specific implementation, no?
20:10 geekosaur like considering Allegro a rebranding of Common Lisp
20:10 perigrin I think Squeak had some specific tunings for an elementary / middleschool audience.
20:11 cpage_ joined #perl6
20:11 zengargoyle geekosaur: i think so.  more like a community split on different VMs or such.
20:11 zengargoyle or a non-commercial Smalltalk-80 implementation with some tweaks.
20:15 BrassLantern joined #perl6
20:16 geekosaur yes, squeak was just a gpl-d smalltalk-80 originally
20:16 geekosaur it may have branched out on its own since I last cared
20:16 zengargoyle hehe, p6 could be nice with a Smalltalk like workspace with dynamic recompilation. :)
20:17 geekosaur in any case a language fork is different from a rebranding
20:18 geekosaur there hven't been that many actual language rebrandings/renamings, and in most of the cases I can recall the language was niche and pretty well doomed anyway; rebranding wasn't going to save them
20:24 bdmatatu joined #perl6
20:27 Skarsnik nicq20, I think you should rephrase your question, Not sure what you mean x)
20:27 kerframil joined #perl6
20:28 geekosaur likewise fwiw
20:28 bdmatatu p6: say [+] 1..1e100
20:28 camelia rakudo-moar c76d93: OUTPUT: «50000000000000001590289110975991817328705368083504703036502630629001320386155388099280879870478387696492219464257418736194801727938851902336988862645587616123664360879667548673664253072454494149672960␤»
20:28 nicq20 Sorry, about that. An example would probably be best. Give me a min...
20:28 zengargoyle nicq20: if i read you right, yes there is a way to make an individual object respond differently than some other object of that Class to methods like .Str
20:28 flatwhite joined #perl6
20:29 bdmatatu p6: say (1e100 * ( 1e100 + 1) / 2)
20:29 camelia rakudo-moar c76d93: OUTPUT: «5e+199␤»
20:31 ranguard Zoffix++ # https://rakudo.party/post/The-Hot-New-Language-Named-Rakudo
20:31 yoleaux 16 May 2017 10:45Z <Zoffix> ranguard: how can I delete all my modules from http://www.cpan.org/authors/id/P/PS/PSIXDISTS/Perl6/ and prevent anything new from me uploaded again (github username zoffixznet)? I'm gonna be uploading my dists on my own and I see some of the stuff in PSIXDISTS are modules are long deleted entirely..
20:31 bdmatatu Is this a known bug?  I think summing a large range is giving the wrong answer
20:31 nicq20 In `my $v = 5; $v + $v`, I know that the '+' method will compare the Signiture and know what to call, but what does it use to pull the value out of $v?
20:32 kliph joined #perl6
20:32 geekosaur FETCH on the Scalar bound by $v?
20:34 geekosaur but, it's not quite well defined as part of the OO hierarchy, some of the knowledge lives in the grammar (partly so it can optimize; for example it avoids actually creating that FETCH call for performance reasons)
20:36 nicq20 So Classes like Int keep their values in the grammar?
20:37 moritz no
20:37 moritz multi sub infix:<+>(Int:D \a, Int:D \b --> Int:D) {
20:37 moritz nqp::add_I(nqp::decont(a), nqp::decont(b), Int);
20:37 moritz }
20:37 moritz from src/core/Int.pm
20:37 geekosaur no, that optimization I mentioned was about Scalar not Int
20:37 nicq20 Oh, ok.
20:38 moritz here nqp::decont() explicitly extracts the value from the container
20:38 nicq20 Mabey I should re-word my question.
20:38 nicq20 *Maybe
20:38 zengargoyle m: my Int $v = 5 but "five"; say $v
20:38 camelia rakudo-moar c76d93: OUTPUT: «five␤»
20:38 geekosaur there's more levels going on conceptually than you are thinking about
20:38 zengargoyle can you make $v do .Int to a different value?
20:39 moritz m: m: my Int $v = 5 but "five" but role { method Int() { 42 }}; say $v.int
20:39 camelia rakudo-moar c76d93: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Operators 'but' and 'but' are non-associative and require parentheses␤at <tmp>:1␤------> 3m: my Int $v = 5 but "five"7⏏5 but role { method Int() { 42 }}; say $v␤    expecting any of:␤        …»
20:39 moritz m: m: my Int $v = 5 but role { method Int() { 42 }}; say $v.Int
20:39 camelia rakudo-moar c76d93: OUTPUT: «42␤»
20:40 zengargoyle m: m: my Int $v = 5 but role { method Int() { 42 }}; say $v+$v;
20:40 camelia rakudo-moar c76d93: OUTPUT: «10␤»
20:40 mr-foobar joined #perl6
20:40 zengargoyle :(
20:40 geekosaur it's not using .Int to extract the value
20:40 zengargoyle yeah,
20:40 moritz it doesn't, because it's already an Int :-)
20:40 nicq20 That was the trouble I was coming accross too.
20:41 zengargoyle i thought that was like the original question.  make an object do some .Str or .Int or whatever different than the Class implementation for other objects....
20:41 moritz nqp::add_I knows how to look into Int objects to access the numeric value
20:42 moritz it can't be method calls/turtles all the way down
20:42 zengargoyle you can add/override methods on individual object to some degree.
20:42 geekosaur ^ this is basicall what I meant by 'in the grammar'; I did not mean the Perl6::Grammar object necessarily, but in the sense of 'the lower level knows how to do things directly rather than indirect through methods)
20:42 moritz but if you want an Int that behaves as a 42, your easiest choice is to just assign 42 to your variable :-)
20:43 geekosaur hypothetically there is a FETCH method, practically it would only be used in specific cases where it can't figure out an optimized direct access
20:43 nicq20 Huh. Ok, that makes sense.
20:43 geekosaur (for example Proxy objets)
20:43 zengargoyle geekosaur: *nod*
20:43 geekosaur because that kind of method indirection is quite slow in practice
20:45 nicq20 Well, I learned something interesting today. Thanks! :D
20:48 zengargoyle i thought i had used the but role thing, but looking back i used 'handles <Bool>' on class attributes instead.
20:48 [Coke] (14 weeks? I think that's unreasonable)
20:48 yoleaux 17:14Z <AlexDaniel> [Coke]: case in point (re perl6 web app serving docs): https://irclog.perlgeek.de/perl6-dev/2017-07-07#i_14840912
20:49 [Coke] (for 6.d)
20:49 wigner joined #perl6
20:49 [Coke] (it does not have to be released on actual diwali.)
20:53 [Coke] also, -1 from me on renaming the language spec
20:53 ufobat m: my @a = 1..10; say so all(@a) == all(@a)
20:53 camelia rakudo-moar c76d93: OUTPUT: «False␤»
20:54 ufobat i thought that this returns true, if all elements on the LHS are included in the array on the RHS?
20:55 timotimo that's not the right interpretation
20:55 timotimo that code checks if all elements in @a are equal to all elements in @a
20:55 timotimo what you mean is either one(@a) == all(@a) or the other way around
20:55 timotimo m: my @a = 1..10; say so all(@a) == one(@a)
20:55 camelia rakudo-moar c76d93: OUTPUT: «True␤»
20:55 timotimo m: my @a = 1..10; say so one(@a) == all(@a)
20:55 camelia rakudo-moar c76d93: OUTPUT: «True␤»
20:55 ufobat did that change? https://perl6advent.wordpress.com/2009/12/13/day-13-junctions/ last line in the last grey box
20:56 timotimo actually, one isn't the right one
20:56 timotimo you really do want any
20:56 timotimo the last line in the last grey box also says all(@a) == any(@b)
20:56 ufobat yeah, i basically want to ensure that both lists contain the same elements ( maybe in a different order)
20:56 ufobat ah you're right
20:57 * ufobat feels stupid
20:57 ufobat sorry, my fault. thanks for the help+
20:58 timotimo no prob :)
21:00 ufobat ah! i just realized that isnt want i wanted to do
21:02 ufobat is there something better for all(@a) == any(@b) && all(@b) == any(@a)
21:02 wigner joined #perl6
21:02 moritz @a.uniq.sort eqv @b.uniq.sort ?
21:03 ufobat isnt that something from set theory?
21:03 ufobat didnt perl6 have set operators?
21:03 ufobat i cant remember :(
21:03 moritz set(@a) eqv set(@b)
21:03 moritz maybe? :-)
21:04 moritz m: my @a = 1, 4, 2; my @b = 4, 2, 1, 1; my @c = 5; say set(@a) eqv set(@b); say set(@a) eqv set(@c)
21:04 camelia rakudo-moar c76d93: OUTPUT: «True␤False␤»
21:04 ufobat yay :D
21:05 ufobat yay :D
21:09 * zengargoyle ponders the recent post about 'eqv' being $x.perl eq $y.perl...
21:11 mr-foobar joined #perl6
21:12 zengargoyle not sure if i like eqv being based on serialized stringification....
21:13 zengargoyle on the other hand, EVAL($x.perl) makes a nice .clone
21:13 zengargoyle on the third hand...
21:14 zengargoyle s/third/grasping/ :P
21:15 MasterDuke joined #perl6
21:19 cpage_ joined #perl6
21:24 evalable6 joined #perl6
21:25 Zoffix zengargoyle: serialized stringification === current behaviour you mean?
21:26 Zoffix zengargoyle: there's a proposal for an alternative: http://curt.tilmes.org/2017-TPC-eqv/#1
21:26 Zoffix huggable: eqv
21:26 huggable Zoffix, nothing found
21:26 Zoffix huggable: eqv :is: Proposal for alternative eqv semantics: http://curt.tilmes.org/2017-TPC-eqv/#1
21:26 huggable Zoffix, Added eqv as Proposal for alternative eqv semantics: http://curt.tilmes.org/2017-TPC-eqv/#1
21:27 Zoffix Oh, maybe that's the post you were referring to :)
21:29 Zoffix [Coke]: why -1 on name tweak? It'd be helpful to have reasoning of both sides available.
21:29 Zoffix 14 weeks is three months. Plenty of time.
21:31 [Coke] Zoffix: first, make a project plan. then figure out the due date.
21:32 zengargoyle Zoffix: yeah, that thing. :)
21:32 [Coke] There was a lot of work that was not done to cheat 6.c out the door, and that should be fixed if possible for 6.d
21:33 [Coke] getting 6.c out the door was a lot of effort, and I don't want to burn someone else out getting 6.d out.
21:34 [Coke] I think calling the language rakudo is going to confuse things the other way. I think the goal of not being called perl is not one I share.
21:34 [Coke] (so taking a step in that direct, which will result in a further confusion about lang vs. impl, is a step in the wrong direction)
21:35 [Coke] Also, I'd get feedback from Larry if you haven't, as I'd expect he'd have a veto there.
21:36 [Coke] (project plan) and then figure out who is doing what and what their availability is.
21:40 Zoffix [Coke]: not sharing the goal; does that extend to not agreeing that Rakudo language has entirely different strengths that Perl has?
21:40 Zoffix s:2nd/that/than/;
21:40 Zoffix I mean 3rd :P
21:41 [Coke] do you mean from a pure naming sense?
21:42 [Coke] I can't parse your question.
21:42 Zoffix [Coke]: I mean from the comparison of the two languages. If you liked Perl, you'll like Rakudo, because it's the same thing but better.
21:42 Zoffix m: say (1..1e100).int-bounds
21:42 camelia rakudo-moar c76d93: OUTPUT: «(1 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104)␤»
21:42 Zoffix hm
21:42 [Coke] ... when you say 'the two languages', what do you mean?
21:42 Cabanossi joined #perl6
21:42 [Coke] do you mean Perl 5 vs. Perl 6 ?
21:42 Zoffix m: say (1..1e100).is-int
21:42 camelia rakudo-moar c76d93: OUTPUT: «False␤»
21:42 Zoffix [Coke]: yes
21:43 [Coke] Yes, Perl 5 and Perl 6 are different languages with different strenghts.
21:43 [Coke] *strengths
21:43 mr-foobar joined #perl6
21:43 [Coke] I like that Perl 6 isa Perl.
21:44 Zoffix [Coke]: then why is it beneficial to keep the Perl name? The inherent assumption in the mind is if I like Perl 5, I'll like Perl 6, because it's the same thing, but better. When I try to act on that assumption, I get disappointed, because it's a different language with different strengths.
21:45 [Coke] That's your assumption.
21:45 Zoffix I'd argue that be a common assumption. I pre-ordered Far Cry 5 on the assumption that it will be like Far Cry 4 (that I liked), but better.
21:46 [Coke] aI wouldn't call it "inherent". This basically sounds like the old "the name is confusing". I don't like renaming our way out of it, especially this far after Christmas.
21:46 famrani joined #perl6
21:46 Zoffix It's not so much confusing, as entirely wrong.
21:47 [Coke] as you mentioned in your blog post, I've had this conversation or something like it 100s of times since the mug. You're going to probably have a tough slog convincing any old timers.
21:47 [Coke] I understand your points; I think even if I didn't want it to be called Perl, changing things *now* is just going to make the whole situation worse.
21:48 [Coke] Further muddying the waters between the lang & the impl (a distinction we've fought to keep for some time) isn't going to help either.
21:49 Zoffix The other thing I mentioned in my blog post is the assumptions from 2 years ago about brand strength failed.
21:49 [Coke] I
21:49 [Coke] am not sure what you're using to measure that
21:50 Zoffix And I'm not hearing any convincing arguments for keeping the name. Above you say you like that Perl 6 is a Perl and that is it. I'm also being repeatedly told it's forbidden to discuss the name and it's case closed.
21:50 Skarsnik I think if you never had lessons about compiler and language having 3 thing that define Perl 6 is just confusing (rakudo/Moar/Perl 6)
21:50 Skarsnik I not sure to understand what is rakudo in this
21:50 [Coke] Zoffix: I'm certainly not telling you it's forbidden. I told you -1, I told you it'll be a hard slog to convince old timers.
21:51 walfisch joined #perl6
21:51 [Coke] I haven't heard you say anything convincing based on my time in the various projects.
21:51 Zoffix [Coke]: Article comments. IRC channel user count (ave. dropped by 16). The predictions (by Ovid) of there being companies hiring Perl 6 devs in 2 years that don't appear to exist.
21:51 Zoffix [Coke]: some other people did say it was
21:52 [Coke] I'd recommend getting a chat going (Irl) at the next conference, wherever that is, and getting  google hangout going so folks not there can join in.
21:52 [Coke] Sure, and that could have nothing to do with the name.
21:53 Zoffix What does it have to do with then?
21:53 [Coke] and with the fact that we still are working on performance, documentation, we're an all volunteer effort, irc is a pita, people get burned out...
21:54 Skarsnik A big issue having no Perl 6 jobs is actually there is nothing Perl 6 does better that other language for common IT job. Like no real web framework yet
21:54 [Coke] So, good luck with the effort, I'm glad you're trying to tackle the marketing angle, I do think it's important.
21:54 Zoffix So when performance is stellar and documentation is complete, do you actually expect "Perl 6" will be anywhere near top 10 languages used in the world?
21:54 Zoffix OK.
21:54 Zoffix Yeah, I'm trying and I think when I'll have more of concrete marketing plans and stuff it'll be easier to convince the "old timers" :)
21:54 Ulti not unless its spoken about as if it is already a top 10 language
21:54 [Coke] Skarsnik: sure, module ecosystem is another hard sell. (inline perl5 helps... but if you have perl5 and don't know why p6 is great...)
21:55 Skarsnik I looked at Bailodor for example : no session; why would I want to use that?
21:55 [Coke] Zoffix: seriously, good luck (maybe not with this one particular thing. :)
21:55 Zoffix heh
21:55 [Coke] but definitely in general.
21:59 Zoffix Skarsnik: Bailador does appear to have session support: https://github.com/Bailador/Bailador/#sessions
22:00 Atomic_qm8UY joined #perl6
22:01 kliph joined #perl6
22:02 El_Che Skarsnik: I think the name discussion and the young ecosystem discussioniss not tightly coupled
22:03 Skarsnik I don't have much option about the name
22:03 Skarsnik *opinion
22:05 Skarsnik I think 6.d should be accompagned with lot of communication/marketing
22:06 kerframil joined #perl6
22:09 Skarsnik and like instead of adding like 15 000 Meta things people will never use, probably focus on stability, thing missing and the environment/ecosystem
22:10 Skarsnik but that just my opinion, anyways, good night ^^
22:11 timotimo nite Skarsnik
22:14 mr-foobar joined #perl6
22:15 Zoffix .tell bdmatatu yeah it's a bug in Range.int-bounds. It's supposed hang. 1e100 is a Num and there you have only 15 digits of precision, so the other 86 digits are all floating point noise. The buggy Range.int-bounds erroneously converts that 15 digits + 86 digits of noise into a Int, which is why you get the wrong sum. And the reason the fixed version hangs is because when failing to find .int-bounds, it'll
22:15 yoleaux Zoffix: I'll pass your message to bdmatatu.
22:15 Zoffix fully reify the range to get the elements, but while doing that you're again hit with limited precision in the 1e100 and once the reification reaches 1e15, the next +1 to it would still end up a 1e15 (not enough precision for +1), so it'd loop at that point forever. We can probably improve that to give an error tho
22:15 Zoffix .tell bdmatatu fully reify the range to get the elements, but while doing that you're again hit with limited precision in the 1e100 and once the reification reaches 1e15, the next +1 to it would still end up a 1e15 (not enough precision for +1), so it'd loop at that point forever. We can probably improve that to give an error tho
22:15 yoleaux Zoffix: I'll pass your message to bdmatatu.
22:16 Zoffix 9.99999999999999e14 is the largest Num you can .succ so perhaps we can detect attempt to reify a range with an endpoint higher than that and error out
22:17 Zoffix m: (9.99999999999999e14 .. *)[^10].say
22:17 camelia rakudo-moar c76d93: OUTPUT: «(999999999999999 1e+15 1e+15 1e+15 1e+15 1e+15 1e+15 1.00000000000001e+15 1.00000000000001e+15 1.00000000000001e+15)␤»
22:17 Zoffix hehe
22:18 Zoffix Ohhh
22:18 Zoffix Ahhh.. no, still buggy. It's just once in a while the noise kicks up on digit, but that's after many iterations and is random
22:21 kliph joined #perl6
22:27 Cabanossi joined #perl6
22:34 kliph joined #perl6
22:34 kliph joined #perl6
22:43 mr-foobar joined #perl6
22:43 Atomic_qm8UY joined #perl6
22:46 kliph joined #perl6
22:48 Zoffix Range.int-bounds is testing `$!min.floor == $!min`. Is there a reason for floor and not just .Int?
22:49 colomon_ joined #perl6
22:49 Zoffix huh, floor's faster. OK then
22:51 Zoffix Which is weird, 'cause .Int is nqp::fromnum_I(nqp::unbox_n(self),Int), but .floor also does nqp::floor on top of that :S
22:54 Zoffix oh wait, I do need .Int, not .floor
22:54 Zoffix m: say .floor == $_ with 1e100
22:54 camelia rakudo-moar c76d93: OUTPUT: «True␤»
22:54 Zoffix m: say .Int == $_ with 1e100
22:54 camelia rakudo-moar c76d93: OUTPUT: «True␤»
22:54 Zoffix oh no
22:55 Zoffix Oh well, it stays broken then
22:55 * Zoffix &
22:58 kliph joined #perl6
22:59 Zoffix Filed as https://rt.perl.org/Ticket/Display.html?id=131718 though I increasingly think this is just the Fact of Life of f.p. math. You use it, you get burnt by it.
23:08 TimToady maybe 'e' shouldn't imply mandatory floating point unless there's a . as well
23:10 TimToady or maybe we should have a variants of 'e' that imply int or rat
23:12 flatwhite joined #perl6
23:12 TimToady or maybe people should get used to writing 10 ** 100
23:12 timotimo 1ei100
23:13 timotimo or have a suffix "l" like some languages do
23:13 timotimo python had that, right?
23:13 raschipi joined #perl6
23:13 timotimo in python 2 perhaps
23:14 TimToady maybe it's really an IntRatNumStr
23:15 timotimo totally
23:15 timotimo BasicallyAValue
23:17 TimToady m: say <1*10**100>.WHAT
23:17 camelia rakudo-moar c76d93: OUTPUT: «(IntStr)␤»
23:17 TimToady m: say <10**100>.WHAT
23:17 camelia rakudo-moar c76d93: OUTPUT: «(Str)␤»
23:17 TimToady aww
23:17 kliph joined #perl6
23:27 Zoffix m: dd <1*10**100>
23:27 camelia rakudo-moar c76d93: OUTPUT: «IntStr.new(10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, "1*10**100")␤»
23:27 Zoffix TIL
23:27 Zoffix AlexDaniel will have a heart attack from that :)
23:27 Zoffix m: dd <1*2*3*4>
23:27 camelia rakudo-moar c76d93: OUTPUT: «"1*2*3*4"␤»
23:28 Zoffix m: dd <1*2>
23:28 camelia rakudo-moar c76d93: OUTPUT: «"1*2"␤»
23:28 AlexDaniel what? You can have expressions there???
23:28 * Zoffix doesn't get how 1*10**100 gets turned into IntStr
23:28 AlexDaniel how did you even find that
23:29 Zoffix TimToady used it above
23:29 evalable6 joined #perl6
23:29 bloatable6 joined #perl6
23:29 quotable6 joined #perl6
23:29 committable6 joined #perl6
23:29 benchable6 joined #perl6
23:29 coverable6 joined #perl6
23:29 bisectable6 joined #perl6
23:29 unicodable6 joined #perl6
23:29 greppable6 joined #perl6
23:29 statisfiable6 joined #perl6
23:29 AlexDaniel mch: dd <1*2*3*4>
23:29 committable6 AlexDaniel, ¦2015.12,HEAD(c76d932): «"1*2*3*4"»
23:29 AlexDaniel all: dd <1*2*3*4>
23:30 committable6 joined #perl6
23:30 AlexDaniel yeah, I know…
23:31 AlexDaniel wait, wrong snippet :D
23:33 AlexDaniel Zoffix: is it this stuff? https://github.com/rakudo/rakudo/commit/7d56f92208b2e0c1feabc20ca0f371c1ea7d54fa#diff-0fb97fa5de5ea2a50ef7b96a34581085R321
23:35 Zoffix No idea
23:35 Zoffix It seems to work only for N*M**J
23:35 Zoffix Maybe it's some weird math convention, I dunno
23:35 AlexDaniel c: 7d56f92208b2^,7d56f92208b2 dd <1*10**100>
23:35 committable6 AlexDaniel, ¦7d56f92208b2^: «"1*10**100"» ¦7d56f92: «Cannot unbox 333 bit wide bigint into native integer␤  in block <unit> at /tmp/17x2BcFPKE:1␤ «exit code = 1»»
23:35 Zoffix I think it's a way to represent any number. N*M to some power
23:36 AlexDaniel well, maybe not :D
23:36 AlexDaniel Zoffix: should we, um… document that?
23:37 kliph joined #perl6
23:37 * Zoffix was thinking more of a tactical application of a flamethrower
23:37 AlexDaniel https://github.com/perl6/roast/blob/master/S03-operators/overflow.t#L255
23:38 AlexDaniel Zoffix: well, I think a flamethrower will have to wait because of the test :)
23:38 Zoffix :)
23:39 AlexDaniel this is the actual test I believe: https://github.com/perl6/roast/blob/master/S02-literals/radix.t#L227
23:39 AlexDaniel or is it?
23:39 AlexDaniel m: dd <1.1*2**10>
23:39 camelia rakudo-moar c76d93: OUTPUT: «RatStr.new(1126.4, "1.1*2**10")␤»
23:39 AlexDaniel m: dd :10<1.1*2**10>
23:39 camelia rakudo-moar c76d93: OUTPUT: «1126.4␤»
23:40 AlexDaniel not exactly the same thing, but still
23:40 * Zoffix lols at "#?rakudo skip "Really?!""
23:43 AlexDaniel Zoffix: I'm also wondering why can't I use negative exponents with this…
23:43 AlexDaniel oh, why would I
23:43 AlexDaniel ok
23:44 AlexDaniel … WHAT?
23:45 ChoHag joined #perl6
23:45 AlexDaniel m: dd <-0*-0**-0>
23:45 AlexDaniel m: dd <-0*-0**0>
23:45 AlexDaniel m: dd <-0*-0**-1>
23:45 camelia rakudo-moar c76d93: OUTPUT: «IntStr.new(0, "-0*-0**-0")␤»
23:45 camelia rakudo-moar c76d93: OUTPUT: «IntStr.new(0, "-0*-0**0")␤»
23:45 camelia rakudo-moar c76d93: OUTPUT: «"-0*-0**-1"␤»
23:46 AlexDaniel Zoffix: alright, I'm starting to get emotional with this XD I'm done
23:48 skids joined #perl6
23:48 kliph joined #perl6
23:49 AlexDaniel m: dd <9*9**99999999999>
23:49 camelia rakudo-moar c76d93: OUTPUT: «"9*9**99999999999"␤»
23:51 sch joined #perl6

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

Perl 6 | Reference Documentation | Rakudo