Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-08-27

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:18 Kyo91_ joined #perl6
00:22 Cabanossi joined #perl6
00:29 Ben_Goldberg joined #perl6
00:56 u-ou- joined #perl6
01:02 Kyo91_ joined #perl6
01:06 Geth ¦ whateverable/master: 13 commits pushed by (Aleks-Daniel Jakimenko-Aleksejev)++, (Sylvain Colinet)++
01:06 Geth ¦ whateverable/master: review: https://github.com/perl6/whateverable/compare/0840d63c02...46dba9ddff
01:13 Kyo91_ joined #perl6
01:16 Geth ¦ whateverable: c91eb7f60b | (Aleks-Daniel Jakimenko-Aleksejev)++ | bin/Releasable.p6
01:16 Geth ¦ whateverable: Change R6 link
01:16 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/c91eb7f60b
01:22 greppable6 joined #perl6
01:22 releasable6 joined #perl6
01:22 quotable6 joined #perl6
01:22 bisectable6 joined #perl6
01:22 committable6 joined #perl6
01:22 coverable6 joined #perl6
01:22 bloatable6 joined #perl6
01:22 evalable6 joined #perl6
01:22 benchable6 joined #perl6
01:22 unicodable6 joined #perl6
01:22 statisfiable6 joined #perl6
01:22 nativecallable6 joined #perl6
01:37 raschipi joined #perl6
01:38 Kyo91_ joined #perl6
01:51 ilbot3 joined #perl6
01:51 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:00 wamba joined #perl6
02:03 Kyo91_ joined #perl6
02:08 kannan joined #perl6
02:23 ilbot3 joined #perl6
02:23 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:32 noganex_ joined #perl6
02:33 aindilis joined #perl6
03:04 snarkyboojum joined #perl6
03:16 Kyo91_ joined #perl6
03:25 u-ou- joined #perl6
03:35 Zoffix teatime: it's because ~~ is not symmetric. The thing on RHS dictates how the match is done and in this case it's a typecheck. Failure is a Nil (it's its subclass), so Failure ~~ Nil is true, but Nil is not a Failure, so Nil ~~ Failure is false
03:36 teatime I ended up doing some reading.  Good explanation.
03:37 u-ou- joined #perl6
03:45 u-ou- joined #perl6
03:53 u-ou- joined #perl6
03:58 Cabanossi joined #perl6
04:05 simcop2387 joined #perl6
04:08 u-ou- joined #perl6
04:19 u-ou- joined #perl6
04:43 Cabanossi joined #perl6
04:43 u-ou- joined #perl6
05:05 llfourn joined #perl6
05:18 Kyo91_ joined #perl6
05:19 yht joined #perl6
05:43 Cabanossi joined #perl6
05:47 timotimo i wouldn't say "int32.^roles doesn't work" has something to do with "natives having rough edges". roles is simply a thing that's not possible to have for natives
05:53 Guest69863 joined #perl6
06:00 roguelazer joined #perl6
06:13 Cabanossi joined #perl6
06:47 nadim joined #perl6
06:52 atroxaper joined #perl6
07:04 yht joined #perl6
07:12 llfourn joined #perl6
07:13 Cabanossi joined #perl6
07:13 lancew joined #perl6
07:17 smls joined #perl6
07:19 smls m: say (HyperWhatever).^mro;
07:19 camelia rakudo-moar f097e5: OUTPUT: «sub (*@_) { #`(Sub|58907344) ... }?»
07:20 Kyo91_ joined #perl6
07:39 darutoko joined #perl6
07:50 wamba joined #perl6
08:08 sacomo joined #perl6
08:20 rindolf joined #perl6
08:28 Cabanossi joined #perl6
08:32 lizmat_ joined #perl6
08:39 snarkyboojum joined #perl6
08:40 avalenn joined #perl6
08:45 vivus-ignis joined #perl6
08:50 eponym joined #perl6
08:58 Cabanossi joined #perl6
09:03 ufobat joined #perl6
09:10 * sjn looks at jnthn's http://mi.cro.services/ :)
09:10 sjn ...and found a typo \o/
09:12 timotimo the website is probably on github as well
09:14 learningperl6 joined #perl6
09:14 learningperl6 howdy! how goes perl6
09:15 sjn learningperl6: perl6 is great! :)
09:16 sjn timotimo: doesn't seem so? can't find it. :-|
09:18 timotimo oh
09:21 Kyo91_ joined #perl6
09:21 learningperl6 sjn :)
09:22 lancew joined #perl6
09:22 sjn timotimo: it is hosted on google, but not under the croservices project is seems
09:24 learningperl6 is mi.cro.services something jnthn strated?
09:25 sjn learningperl6: it's an edument project, it seems. just read about it on the facebooks
09:26 timotimo you mean "on github", right?
09:26 timotimo yeah, jnthn started cro
09:27 epony joined #perl6
09:27 sjn timotimo: mi.cro.services ip address points to a googleusercontent.com owned IP
09:27 learningperl6 apart from its website is there any other place than facebook to learn more ?
09:28 Cabanossi joined #perl6
09:28 timotimo ah, ok
09:28 lancew_ joined #perl6
09:29 sjn learningperl6: it's pretty new, so I guess not?
09:30 learningperl6 sjn: ah!. my hiatus explains my questioning then :) thanks anyway.
09:33 Skarsnik joined #perl6
09:37 espadrine joined #perl6
09:37 lancew__ joined #perl6
09:40 learningperl6 timotimo: last I remember when I was lurking, you were working on Levenshtein distance? ( meanwhile I'm asking am browsing the repository)
09:42 timotimo that was loooong ago :D
09:44 aborazmeh joined #perl6
09:44 aborazmeh joined #perl6
09:44 ecocode joined #perl6
09:46 learningperl6 timotimo: :)
09:50 smls j: say "ab" ~~ / [ "ab" || "a" ]: "b" /;
09:50 camelia rakudo-jvm f097e5: OUTPUT: «java.nio.file.NoSuchFileException: /nqp/lib/Perl6/BOOTSTRAP.jar?  in <anon> (gen/jvm/ModuleLoader.nqp:90)?  in load_module (gen/jvm/ModuleLoader.nqp:77)?  in <anon> (gen/jvm/CORE.setting)?  in <anon> (gen/jvm/ModuleLoader.nqp:255)?  in load_sett…»
09:51 smls ?
09:52 timotimo looks like it didn't get built correctly
09:55 pmurias joined #perl6
10:01 aborazmeh joined #perl6
10:01 aborazmeh joined #perl6
10:06 tadzik so, cro!
10:06 tadzik what a release
10:07 timotimo oh yes
10:11 learningperl6 :)
10:12 pmurias so Cro is intended to be a web framework for writing micro services?
10:14 Rawriful joined #perl6
10:16 sacomo joined #perl6
10:16 timotimo i wouldn't call it "web framework"
10:17 timotimo it can do much more than web
10:18 timotimo should we have a file descriptor duplication method on IO::Handle?
10:19 pmurias timotimo: what can it do besides web?
10:22 timotimo ZMQ isn't really web
10:22 timotimo and TCP in general, SSL sockets in general
10:22 margeas joined #perl6
10:25 lichtkind joined #perl6
10:27 bjz joined #perl6
10:32 xinming joined #perl6
10:38 yht joined #perl6
10:43 Cabanossi joined #perl6
10:47 ufobat m: my $c = "Some::Thing"; ::($c).new()
10:47 camelia rakudo-moar f097e5: OUTPUT: «Failed??Actually thrown at:?  in block <unit> at <tmp> line 1??»
10:48 ufobat this error is not really helpful :(
10:50 ufobat shoudn't this failure be converted into an exception? i'd expect something like this:
10:50 ufobat m: my $c = "Some::Thing"; try { ::($c).new(); CATCH {default {  $_.throw } } }
10:50 camelia rakudo-moar f097e5: OUTPUT: «No such symbol 'Some::Thing'?  in block  at <tmp> line 1?  in block <unit> at <tmp> line 1??»
10:50 Skarsnik you can fill a bug repport for that I think
10:51 ufobat okay, will do
10:51 Skarsnik like you can send a mail to rakudobug@perl6.org or something like that
10:53 ufobat yap, done .) thank you
11:00 araraloren_ joined #perl6
11:05 snarkyboojum joined #perl6
11:09 andreoss joined #perl6
11:11 andreoss why comma acts as a statement terminator?
11:11 nowan joined #perl6
11:12 andreoss m: my $x = 1, #`new line here` 2, 3; say $x; # 2 and 3 are in sink context
11:12 camelia rakudo-moar f097e5: ( no output )
11:13 andreoss m: my $x = 1, #`<new line here> 2, 3; say $x; # 2 and 3 are in sink context
11:13 camelia rakudo-moar f097e5: OUTPUT: «WARNINGS for <tmp>:?Useless use of constant integer 2 in sink context (lines 1, 1)?Useless use of constant integer 3 in sink context (lines 1, 1)?1?»
11:16 nowan joined #perl6
11:18 araraloren_ m: my $x = 1, #`<new line here> 2, 3; say $x; # 2 and 3 are in sink context`
11:18 camelia rakudo-moar f097e5: OUTPUT: «WARNINGS for <tmp>:?Useless use of constant integer 2 in sink context (lines 1, 1)?Useless use of constant integer 3 in sink context (lines 1, 1)?1?»
11:18 araraloren_ m: my $x = 1, #`<new line here> 2 3; say $x; # 2 and 3 are in sink context`
11:18 camelia rakudo-moar f097e5: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Two terms in a row?at <tmp>:1?------> 3my $x = 1, #`<new line here> 27?5 3; say $x; # 2 and 3 are in sink contex?    expecting any of:?        infix?        infix stopper?        statemen…»
11:18 araraloren_ m: my $x = 1, #`<new line here> 2 3;`
11:18 camelia rakudo-moar f097e5: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Two terms in a row?at <tmp>:1?------> 3my $x = 1, #`<new line here> 27?5 3;`?    expecting any of:?        infix?        infix stopper?        statement end?        statement modifier…»
11:18 araraloren_ m: my $x = 1; #`<new line here> 2 3;`
11:18 camelia rakudo-moar f097e5: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Two terms in a row?at <tmp>:1?------> 3my $x = 1; #`<new line here> 27?5 3;`?    expecting any of:?        infix?        infix stopper?        statement end?        statement modifier…»
11:19 andreoss comman is missing
11:19 andreoss
11:19 andreoss *comma
11:19 andreoss m: my $x = 1, 2, 3; say $x;
11:19 camelia rakudo-moar f097e5: OUTPUT: «WARNINGS for <tmp>:?Useless use of constant integer 2 in sink context (lines 1, 1)?Useless use of constant integer 3 in sink context (lines 1, 1)?1?»
11:19 andreoss hmm
11:20 andreoss it acts diffrenly in the repl
11:20 araraloren_ andreoss, it's a comma expression?
11:21 andreoss % printf 'my $x = 1,\n2,3' | perl6
11:22 araraloren_ Maybe it suppress the warning
11:22 wamba joined #perl6
11:22 Kyo91_ joined #perl6
11:23 andreoss if I type `my $x = 1,2,3` in repl I end up with `$x == (1,2,3)`;
11:24 araraloren_ Oh, Perl 6 not have comma expression, I think
11:24 andreoss actually not
11:25 andreoss it's just the repl which gives a misleading output
11:26 ufobat i am getting the error "
11:26 ufobat Too many positionals passed; expected 1 argument but got 2
11:26 ufobat in block  at /home/martin/.workspace/p6/VoteImproved/../Bailador/lib/Bailador/Route/Controller.pm (Bailador::Route::Controller) line 17
11:26 andreoss and supresses warnings for some reasom
11:26 ufobat my line 17 is:                 require ::($.class);
11:26 ufobat i don't get why :(
11:26 araraloren_ Hmm, if you want bind a list, you can `my $x := 1, 2, 3; say $x;`
11:27 kannan joined #perl6
11:27 piojo joined #perl6
11:27 araraloren_ What is $.class for ?
11:28 ufobat it's a Str of an existing class, it work in my oneliner :(
11:28 ufobat a name of a class that i want to require
11:29 smls andreoss, araraloren_: The REPL doesn't print "Useless use of ... in sink context" for the last statement, because it doesn't sink that statement. It prints its.
11:31 araraloren_ If I run this `my $x = 1, 2, 3;` why it just print `(1, 2, 3)`
11:32 araraloren_ and this `my ($x) = 1, 2, 3;` will print `(1)`
11:32 smls It interprets it as  ((my $x = 1), 2, 3);
11:33 araraloren_ oh ?
11:33 piojo m: my ($x, $y) = 1, 2, 3;
11:33 camelia rakudo-moar f097e5: ( no output )
11:33 piojo m: my ($x, $y) = 1, 2, 3; say $y;
11:33 camelia rakudo-moar f097e5: OUTPUT: «2?»
11:33 smls m:  my @a = my $x = 1, 2, 3;  dd @a;  dd $x;
11:33 camelia rakudo-moar f097e5: OUTPUT: «Array @a = [1, 2, 3]?Int $x = 1?»
11:33 piojo smls: it doesn't break it down the way you described
11:34 piojo it interprets it as parallel assignment
11:34 timotimo araraloren_: you have to have something with @ on the lhs of the =
11:34 timotimo otherwise it'll be item assignment and ignore everything after the first thing
11:34 piojo it sees it as: my (list of variables) = list;
11:34 timotimo m: my ($a, $b, $c) = 9, 9, 9; say $a; say $b; say $c;
11:34 camelia rakudo-moar f097e5: OUTPUT: «9?9?9?»
11:34 araraloren_ timotimo, yeah, I know, I just want see how
11:34 smls piojo: I was referring to `my $x = 1, 2, 3;`
11:35 timotimo m: my $x; @$x = 9, 9, 9; say $a; say $b; say $c;
11:35 camelia rakudo-moar f097e5: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Variable '$a' is not declared?at <tmp>:1?------> 3my $x; @$x = 9, 9, 9; say 7?5$a; say $b; say $c;?»
11:35 timotimo m: my $x; @$x = 9, 9, 9; say $x.perl
11:35 camelia rakudo-moar f097e5: OUTPUT: «WARNINGS for <tmp>:?Useless use of constant integer 9 in sink context (lines 1, 1, 1, 1)?Cannot modify an immutable Any ((Any))?  in block <unit> at <tmp> line 1??»
11:35 timotimo mhm
11:36 araraloren_ Actually I would not write that code, my @x = 1, 2, 3; would be the correct way
11:36 timotimo yeah
11:36 timotimo lunch &
11:37 araraloren_ But that's a pleasure of explore Perl 6's syntax :)
11:38 piojo m: grammar Matcher { rule TOP { <hash> }; proto rule atom {*}; rule atom:sym<hash> { . }; }; Matcher.parse('x');
11:38 camelia rakudo-moar f097e5: OUTPUT: «P6opaque: no such attribute '$!pos' in type Match when trying to get a value?  in regex TOP at <tmp> line 1?  in block <unit> at <tmp> line 1??»
11:38 piojo The error should be "No such method 'hash' for invocant of type 'Matcher'"
11:38 piojo How do I know which project to file this bug with?
11:40 piojo I assume it's either rakudo or moarvm. Is there any quick guideline?
11:40 araraloren_ what you mean..
11:40 araraloren_ m: grammar Matcher { rule TOP { <atom> }; proto rule atom {*}; rule atom:sym<hash> { . }; }; say Matcher.parse('x')
11:40 camelia rakudo-moar f097e5: OUTPUT: «?x?? atom => ?x??»
11:41 piojo I know the regex is wrong. But the error message is also wrong
11:41 piojo the error said "no such attribute $!pos", which is nonsense because I never used any "pos"
11:41 araraloren_ ok
11:41 piojo Since perl6 is 3 projects, I assume this is a rakudo issue. Is that correct?
11:42 araraloren_ yeah, it need improve the error message .
11:42 araraloren_ yeah, it should be
11:42 piojo thanks
11:43 piojo I'll mail it in, then
11:43 araraloren_ piojo, maybe you can ask somebody in perl6-dev(maybe right channel name)
11:43 ufobat AHHHH Golfed it down :/
11:45 piojo ?araraloren_: thanks, I'll check
11:50 ufobat btw require ::($class) works
11:50 ufobat but require ::($.class) doesn't work
11:51 nowan joined #perl6
11:53 ufobat https://rt.perl.org/Public/Bug/Display.html?id=131971
12:00 ecocode joined #perl6
12:01 andreoss joined #perl6
12:05 [particle] joined #perl6
12:14 BenGoldberg joined #perl6
12:16 ecocode joined #perl6
12:23 Kyo91_ joined #perl6
12:30 bjz joined #perl6
12:44 piojo joined #perl6
12:46 AlexDaniel joined #perl6
12:47 committable6 joined #perl6
12:47 benchable6 joined #perl6
12:47 evalable6 joined #perl6
12:47 quotable6 joined #perl6
12:47 unicodable6 joined #perl6
12:47 bloatable6 joined #perl6
12:47 bisectable6 joined #perl6
12:47 coverable6 joined #perl6
12:47 greppable6 joined #perl6
12:47 releasable6 joined #perl6
12:47 statisfiable6 joined #perl6
12:50 andrzejku_ joined #perl6
12:53 xinming joined #perl6
12:54 andrzejku_ joined #perl6
13:03 sena_kun joined #perl6
13:03 lizmat joined #perl6
13:11 andreoss joined #perl6
13:12 ecocode joined #perl6
13:14 andreoss https://github.com/andreoss/ob-perl6 # Org Babel for Perl 6
13:28 beginner joined #perl6
13:28 beginner hello
13:28 Cabanossi joined #perl6
13:28 beginner is there abstract data type in perl 6
13:29 lancew__ joined #perl6
13:31 lancew_ joined #perl6
13:34 eroux joined #perl6
13:36 andreoss beginner: classes with stubs are abstract
13:37 andreoss m: class Abstract { method foo { ... } } ; class Concrete is Abstract { has $.foo = 10 }; Concrete.new.foo.say
13:37 camelia rakudo-moar f097e5: OUTPUT: «10?»
13:41 beginner andreoss : ok but am here referring about the data type
13:47 Zoffix beginner: is there a description of what you're trying to accomplish? I glanced over a wiki for Abstract Data Type but it doesn't really tell me much.
13:49 Zoffix Are roles it? https://docs.perl6.org/syntax/role
13:49 Zoffix m: role Meow { method meow { say "meow" } }; class Foo does Meow {}; Foo.new.meow
13:49 camelia rakudo-moar f097e5: OUTPUT: «meow?»
13:49 Geth ¦ whateverable: 558b932ee0 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 5 files
13:49 Geth ¦ whateverable: Actually fix these tests
13:49 Geth ¦ whateverable:
13:49 Geth ¦ whateverable: Oops in 87f3f1c0cbe654539591d6511681bd989e1b2248
13:49 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/558b932ee0
13:49 Geth ¦ whateverable: c920e058bd | (Aleks-Daniel Jakimenko-Aleksejev)++ | 5 files
13:49 Geth ¦ whateverable: Make tests parallelizable
13:49 Geth ¦ whateverable:
13:49 Geth ¦ whateverable: See issue #205. It is not entirely perfect because bots still lock
13:49 Geth ¦ whateverable: each other when using same builds (especially on HEAD), but this makes
13:49 Geth ¦ whateverable: the test suite go from 22 minutes to ?11 minutes.
13:49 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/c920e058bd
13:49 Geth ¦ whateverable: 39e5c53825 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files
13:49 Geth ¦ whateverable: Split by “\n”, do not use .lines
13:49 Geth ¦ whateverable:
13:49 Geth ¦ whateverable: Otherwise it may mistakenly split some line in half.
13:49 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/39e5c53825
13:51 Zoffix "ADTs are a theoretical concept in computer science … mainstream computer language do not directly support formally specified ADTs."
13:52 greppable6 joined #perl6
13:52 Zoffix "In programming languages, an abstract type is a type in a nominative type system that cannot be instantiated directly; a type that is not abstract – which can be instantiated – is called a concrete type"
13:52 Zoffix Yeah, sounds like our roles. Though we have auto-punning where you could instantiate a role, but it gets punned and basically becomes a class in that case.
13:52 andreoss beginner: classes are types in this case
13:52 piojo beginner: perl6 has parameterized types, too. I think roles are a better fit, but you can also use a parameterized type like generics in other languages
13:59 andreoss m: role Queue[::T] { method enqueue(T $x) { ... } ; method dequeue returns T { ... } } # begginer
13:59 camelia rakudo-moar f097e5: ( no output )
14:01 beginner Zoffix : http://web.mit.edu/6.005/www/fa14/classes/08-abstract-data-types/#designing_an_abstract_type
14:02 beginner http://www.fas.harvard.edu/~cscie119/lectures/intro.pdf
14:02 mr-foobar joined #perl6
14:02 kannan joined #perl6
14:02 timotimo andreoss: check out my adt module on modules.perl6.org
14:02 timotimo though those are "algebraic data types"
14:08 Zoffix buggable: eco adt
14:08 buggable Zoffix, ADT 'Algebraic Data Types inspired by Haskell.': https://github.com/timo/ADT
14:08 smls beginner: In Perl 6, the `Iterable`, `Positional` and `Associative` roles common interfaces for data structures. Is that what you mean?
14:08 smls For example class `Array` does both the `Iterable` and `Positional` role.
14:09 Zoffix beginner: thanks :) That stuff's over my head, so I'll shut up. Sorry :)
14:10 mcmillhj joined #perl6
14:10 mcmillhj joined #perl6
14:14 mcmillhj_ joined #perl6
14:16 yht joined #perl6
14:21 mcmillhj joined #perl6
14:24 Kyo91_ joined #perl6
14:25 BenGoldberg m: role Callback[\T] { }; constant sorter_t = Callback[ :(Any, Any --> Order) ]; my sorter_t $x;
14:25 camelia rakudo-moar f097e5: OUTPUT: «===SORRY!===?QAST::Block with cuid 3 has not appeared?»
14:27 Zoffix BenGoldberg: would you report that as a bug, please? End users should never see that error
14:27 Zoffix huggable: rakudobugs
14:27 huggable Zoffix, Report bugs by emailing to <rakudobug@perl.org>
14:27 jsimonet Hello, http://perl6.fail is not responding, I don't know if you are aware of this problem? The DNS is not responding.
14:28 Zoffix jsimonet: thanks. The domain was deliberately let to expire. The new address is https://fail.rakudo.party/
14:29 jsimonet ok, thanks !
14:32 skids joined #perl6
14:40 pelev joined #perl6
14:41 mcmillhj_ joined #perl6
14:53 khw joined #perl6
15:04 ShalokShalom joined #perl6
15:08 sjoshi joined #perl6
15:21 BenGoldberg Zoffix, rakudo-bug-ed
15:21 jkva_ I'm trying to install Rakudo Star 2017.07 in Docker, but get the error that I'm missing File::Copy when running Configure.pl. What's the preferred way to make sure that my container base image has the proper modules available to install from source?
15:22 jkva_ My base image runs 5.24, fwiw.
15:24 timotimo is that something like alpine linux?
15:24 timotimo i.e. "throw away everything we possibly can"?
15:24 jkva_ @timotimo: is that to me? It's running a base installation of Debian stable
15:25 timotimo OK, then at least you can just apt-get perl5 packages :)
15:25 andreoss File::Copy is core module
15:25 jkva_ Sweet! Thanks :)
15:27 lancew_ joined #perl6
15:27 jkva_ If it's core, I shouldn't get the error then? Anyway this is turning into a Perl5 question now, I'll go to the appropriate channels. my Perl6 code worked fine ;)
15:29 jkva_ Ah, found the problem :)
15:31 timotimo interesting, do tell!
15:33 jkva_ timotimo: you were 100% right, just needed to `apt-get install perl`
15:34 timotimo huh, did you have something like "perl-core"?
15:34 jkva_ Which installed `libgdbm3 libperl5.24 perl-modules-5.24 rename`
15:34 timotimo or "perl-tiny"?
15:34 jkva_ Haven't a clue tbh, I'm not familiar with the config for the debian:stable baseimage
15:35 timotimo good to know in any case
15:35 AlexDaniel joined #perl6
15:35 jkva_ Yeah. Never used Docker until today so lots of new stuff
15:36 mcmillhj_ joined #perl6
15:40 woolfy joined #perl6
15:42 mcmillhj joined #perl6
15:47 mcmillhj joined #perl6
15:59 Zoffix Thanks.
16:03 mcmillhj joined #perl6
16:06 woolfy left #perl6
16:14 Cabanossi joined #perl6
16:19 mcmillhj joined #perl6
16:20 mr-foobar joined #perl6
16:24 Kyo91_ joined #perl6
16:25 bjz joined #perl6
16:37 samcv how do i fix how do i fix "Unhandled exception: Missing or wrong version of dependency " when running my system perl 6 inside the rakudo directory
16:37 samcv and don't say, don't be in the rakudo directory. i need a workable way to get it to not look in ./ for nqp/rakudo libs
16:38 lizmat samcv: I'm afraid I don't have an answer
16:39 samcv :(
16:39 samcv is there an env var i can change it to anything else?
16:43 gfldex lolibloggedalittle: https://gfldex.wordpress.com/ # <-- jnthn review welcome
16:44 gfldex and now with proper link: https://gfldex.wordpress.com/2017/08/27/out-of-order-mystery/
16:49 lizmat joined #perl6
16:52 timotimo gfldex: i think you also want LAST in addition to CLOSE there
16:53 skids samcv: Well, recently %*ENV<NQP_LIB> was added, see nqp commits 152094b7 and dd25a924
16:53 timotimo i made a little bufferer for IO::Handle that works with binary modes
16:53 timotimo it has a different api from IO::Handle, though
16:54 samcv ah
16:54 timotimo gfldex: i'd expect LAST is fired also when the supply is regularly closed
16:55 timotimo oh, i might misunderstand
17:07 gfldex timotimo: testing
17:08 gfldex timotimo: LAST will not be executed
17:09 rindolf joined #perl6
17:11 timotimo who wants to give me a very fast conversion from a Buf of 8 uint8 to one uint64?
17:21 timotimo benchable6: compare HEAD for ^10_000 { Buf.new(1, 2, 3, 4); Buf.shift + Buf.shift +< 8 + Buf.shift +< 16 + Buf.shift +< 24 } ||| for ^10_000 { Buf.new(1, 2, 3, 4); Buf.shift + Buf.shift * 64 + Buf.shift * 128 + Buf.shift * 192 }
17:21 benchable6 timotimo, starting to benchmark the 1 given commit
17:21 benchable6 timotimo, https://gist.github.com/21cf5f1f5c66bd8c299b05f6e7a097d8
17:22 timotimo that code si broken %)
17:24 timotimo on my machine those are equally fast, but i expect the time to create the bufs dominates the bitshift or multiplication time by a few orders of magnitude
17:26 * AlexDaniel slaps benchable6
17:30 benchable6 joined #perl6
17:31 AlexDaniel benchable6: compare HEAD for ^10_000 { Buf.new(1, 2, 3, 4); Buf.shift + Buf.shift +< 8 + Buf.shift +< 16 + Buf.shift +< 24 } ||| for ^10_000 { Buf.new(1, 2, 3, 4); Buf.shift + Buf.shift * 64 + Buf.shift * 128 + Buf.shift * 192 }
17:31 benchable6 AlexDaniel, starting to benchmark the 1 given commit
17:31 benchable6 AlexDaniel, https://gist.github.com/fdd1e2309da826acbfb04826d77ddf9a
17:31 AlexDaniel timotimo: :(
17:32 timotimo :o
17:32 timotimo the code is wrong anyway
17:33 AlexDaniel oh, that's your code being wrong? :)
17:33 timotimo yes
17:33 AlexDaniel okay
17:33 timotimo benchable6: compare HEAD for ^100_000 { my $buf = Buf.new(1, 2, 3, 4); my int64 $a = $buf.shift + $buf.shift +< 8 + $buf.shift +< 16 + $buf.shift +< 24 } ||| for ^100_000 { my $buf = Buf.new(1, 2, 3, 4); my int64 $a = $buf.shift + $buf.shift * 64 + $buf.shift * 128 + $buf.shift * 192 }
17:33 benchable6 timotimo, starting to benchmark the 1 given commit
17:33 benchable6 timotimo, ¦HEAD: «Benchmark: ?Timing 10 iterations of 0, 1...?«timed out after 10 seconds»»
17:33 timotimo benchable6: compare HEAD for ^10_000 { my $buf = Buf.new(1, 2, 3, 4); my int64 $a = $buf.shift + $buf.shift +< 8 + $buf.shift +< 16 + $buf.shift +< 24 } ||| for ^10_000 { my $buf = Buf.new(1, 2, 3, 4); my int64 $a = $buf.shift + $buf.shift * 64 + $buf.shift * 128 + $buf.shift * 192 }
17:33 benchable6 timotimo, starting to benchmark the 1 given commit
17:33 Geth ¦ whateverable: f7d80f3d99 | (Aleks-Daniel Jakimenko-Aleksejev)++ | bin/Benchable.p6
17:33 Geth ¦ whateverable: Fix lib path in Benchable
17:33 Geth ¦ whateverable:
17:33 Geth ¦ whateverable: Issue #219.
17:33 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/f7d80f3d99
17:34 benchable6 timotimo, https://gist.github.com/6b6501f8c0475c742f6554fc18ca99de
17:38 timotimo benchable6: compare HEAD my $buf = Buf.new(1, 2, 3, 4); for ^10_000 { my int64 $a = $buf.AT-POS(0) + $buf.AT-POS(1) +< 8 + $buf.AT-POS(2) +< 16 + $buf.AT-POS(3) +< 24 } ||| my $buf = Buf.new(1, 2, 3, 4); for ^10_000 { my int64 $a = $buf.AT-POS(0) + $buf.AT-POS(1) * 64 + $buf.AT-POS(2) * 128 + $buf.AT-POS(3) * 192 }
17:38 benchable6 timotimo, starting to benchmark the 1 given commit
17:38 benchable6 timotimo, https://gist.github.com/98a6b512027d4c3b8041c6758db3d068
17:39 AlexDaniel benchable6: compare HEAD sleep 1 ||| sleep 0.5
17:39 benchable6 AlexDaniel, starting to benchmark the 1 given commit
17:39 timotimo benchable6: compare HEAD my $buf = Buf.new(1, 2, 3, 4); for ^100_000 { my int64 $a = $buf.AT-POS(0) + $buf.AT-POS(1) +< 8 + $buf.AT-POS(2) +< 16 + $buf.AT-POS(3) +< 24 } ||| my $buf = Buf.new(1, 2, 3, 4); for ^100_000 { my int64 $a = $buf.AT-POS(0) + $buf.AT-POS(1) * 64 + $buf.AT-POS(2) * 128 + $buf.AT-POS(3) * 192 }
17:39 benchable6 AlexDaniel, ¦HEAD: «Benchmark: ?Timing 10 iterations of 0, 1...?«timed out after 10 seconds»»
17:39 benchable6 timotimo, starting to benchmark the 1 given commit
17:39 benchable6 timotimo, https://gist.github.com/2cc3f9e208e8c9b708b00b06df54f009
17:39 timotimo interesting
17:40 timotimo benchable6: compare HEAD my $buf = Buf.new(1, 2, 3, 4); for ^500_000 { my int64 $a = $buf.AT-POS(0) + $buf.AT-POS(1) +< 8 + $buf.AT-POS(2) +< 16 + $buf.AT-POS(3) +< 24 } ||| my $buf = Buf.new(1, 2, 3, 4); for ^500_000 { my int64 $a = $buf.AT-POS(0) + $buf.AT-POS(1) * 64 + $buf.AT-POS(2) * 128 + $buf.AT-POS(3) * 192 }
17:40 benchable6 timotimo, starting to benchmark the 1 given commit
17:40 benchable6 timotimo, ¦HEAD: «Benchmark: ?Timing 10 iterations of 0, 1...?«timed out after 10 seconds»»
17:41 AlexDaniel if you do it without “compare” in two separate queries then the limit is higher I believe
17:41 timotimo ah
17:41 timotimo not so important
17:41 timotimo i know now that bitshift is faster and that's nice
17:41 timotimo but that's what i had already
17:41 timotimo so no way to get faster here
17:44 Cabanossi joined #perl6
17:44 gdonald joined #perl6
17:47 smls .tell lizmat Can you review this when you have time? https://github.com/rakudo/rakudo/pull/1139
17:47 yoleaux smls: I'll pass your message to lizmat.
17:48 lizmat .
17:48 yoleaux 17:47Z <smls> lizmat: Can you review this when you have time? https://github.com/rakudo/rakudo/pull/1139
17:49 lizmat smls: I assume this is all spectest clean?
17:49 smls On my Moar/Linux build, yes.
17:49 lizmat otoh, I don't think there are terrible many tests for this, or am I wrong ?
17:51 smls There are postcircumfix .[] and .{} tests all over the place, in roast - but I don't think they have great coverage.
17:56 smls lizmat: I additionally used the following test file locally: https://pastebin.com/raw/yE0RJjcq
17:56 lizmat smls: why not add those to roast ?
17:57 smls Dunno where to add them...
17:58 lizmat fwiw, I wouldn't know either, so maybe start a new file ?
18:01 timotimo "worse is better"
18:06 jkva_ Thanks @timotimo!
18:07 jkva_ Very nice, didn't know `lines` defaulted to `argfiles`
18:08 timotimo oh that's you! :)
18:09 jkva_ Yeah. Been wanting to use Perl6 for the meetup rafflers for a while :)
18:09 timotimo you can also implement world's shortest cat: perl6 -e 'say slurp'
18:09 jkva_ It just needed to pick a random name from a file of newline-separated names, so otherwise easy enough
18:10 jkva_ My first real usage of Perl6 :)
18:14 MilkmanDan joined #perl6
18:16 andreoss m: BEGIN { $*IN = "/usr/share/dict/words".IO.open }; $*IN.lines.pick.say
18:16 camelia rakudo-moar 95a70c: OUTPUT: «===SORRY!===?Failed to open file /usr/share/dict/words: No such file or directory?»
18:17 smls_ joined #perl6
18:18 timotimo i don't think that can work, because of dynamic variables being dynamically scoped
18:18 timotimo and the rest of the code is far away from the dynamic scope of the begin block
18:19 timotimo m: BEGIN { say $*IN.perl }
18:19 camelia rakudo-moar 95a70c: OUTPUT: «IO::Handle.new(path => IO::Special.new("<STDIN>"), chomp => Bool::True, nl-in => $["\n", "\r\n"], nl-out => "\n", encoding => "utf8")?»
18:19 timotimo hmm
18:19 andreoss works for me
18:20 andreoss i've been using $*IN, $*OUT redefined in BEGIN block for a while
18:20 andreoss is it error-prone somehow?
18:23 Ven`` joined #perl6
18:23 AlexDaniel don't you need an INIT block instead?
18:23 timotimo oh, OK
18:23 timotimo well, it probably won't survive precome if you have it in a module instead of a script
18:24 AlexDaniel also, this is exactly how you can change $*IN.nl-in when doing perl6 -npe
18:25 andreoss what -np does?
18:25 Kyo91_ joined #perl6
18:27 skids same as perl5.  wraps the script in a get/print loop.  Uses a tweaked alternate setting IIRC.
18:27 andreoss it would really nice if perl6 could detect itself being a pipe end and just silently execute code instead
18:27 andreoss i mean `echo 1 | perl6`
18:28 timotimo ?
18:28 andreoss *would be
18:28 timotimo oh you mean without the repl outputting stuff?
18:28 andreoss yes
18:30 andreoss i use -e '$*IN.slurp.EVAL' as a work-around
18:37 emeric joined #perl6
18:37 jkva_ timotimo: Is that `lines` shorthand in the docs, that you know of?
18:38 timotimo i think so
18:38 timotimo let me see
18:38 Zoffix jkva_: yeah: https://docs.perl6.org/type/IO::Handle#routine_lines
18:38 jkva_ Thanks!
18:38 timotimo zoffix is fast
18:39 Zoffix jkva_: note that in v6.d language, the default will be $*IN instead of $*ARGFILES when inside sub MAIN() {}
18:39 Zoffix jkva_: words(), lines(), slurp(), get(), and getc() all default to argfiles
18:40 jkva_ Splendid, I should've seen that, even read through `lines` earlier.
18:40 Zoffix Oh, more specifically: $*ARGFILES will be set to just $*IN inside sub MAIN {}; it will still be IO::ArgFiles object.
18:42 jkva_ Zoffix: Once I get Perl6 better, this should make sense to me :)
18:42 Zoffix (why special default inside MAIN: because you usually do things with arguments inside sub MAIN, so it's not very useful for $*ARGFILES to still use the arguments as names for files; with $*ARGFILES defaulting to just $*IN, you can still use lines()/words()/etc and if you really do want to treat args as filenames, you can still make your own IO::CatHandle)
18:43 jkva_ Slightly confused on how the default of `$fh = = $*ARGFILES` works correctly on an array of filenames?
18:43 jkva_ Does that get folded in into the set of the lines in all files?
18:43 Zoffix jkva_: we have a type called IO::CatHandle
18:44 Zoffix jkva_: which basically switches to a new file when the first one is exhausted
18:44 jkva_ Nice.
18:46 Zoffix Or IO::Handle or IO::Pipe; and IO::CatHandle basically acts like a read-only IO::Handle (virtually identical interface; the only caveats are with seeking that can't cross file boundaries
18:47 Zoffix )
18:54 mr-foobar joined #perl6
19:01 jkva_ https://github.com/perl6/docker \o/
19:02 jkva_ Could've saved myself some work...
19:02 Zoffix Oh :) I should've mentioned we had it.
19:02 Zoffix huggable: docker :is: Rakudo Docker images https://github.com/perl6/docker
19:02 huggable Zoffix, Added docker as Rakudo Docker images https://github.com/perl6/docker
19:06 jkva_ Really fast now, don't need to build in my own Dockerfile!
19:07 Zoffix \o/
19:14 woolfy joined #perl6
19:17 Zoffix woolfy \o/
19:21 jkva_ woolfy \o/
19:24 mcmillhj joined #perl6
19:26 Zoffix .ask andreoss RE '$*IN.slurp.EVAL'; Would you know of a great way to detect whether the input is being piped to perl6? I googled around and answers say there's no fool-proof way. The other alternative is implementing "silent" line editor, which looks trivial to do, but `RAKUDO_LINE_EDITOR=silent perl6` is even longer than the $*IN/EVAL trick. https://github.com/rakudo/rakudo/blob/nom/src/core/REPL.pm#L211-L217
19:26 yoleaux Zoffix: I'll pass your message to andreoss.
19:27 Skarsnik Zoffix, hm should there be something to read on 0 if it's piped?
19:29 Zoffix No idea.
19:29 geekosaur Zoffix, there's no foolproof way even in C
19:29 Zoffix Thanks.
19:30 Zoffix maybe we could add a command-line switch...
19:30 geekosaur the closest you get is if it's not seekable then it's either a pipe or a fifo or a socket
19:30 geekosaur (but you can argue the latter two are special cases of the former)
19:31 ufobat joined #perl6
19:32 Zoffix geekosaur: would it be sane to check seekability when loading REPL and make it silent if STDIN is not seekable?
19:33 geekosaur Zoffix, for a REPL there's a simpler and usually even more correct check: isatty()
19:33 geekosaur you generally don;t want verbosity if feeding from a file
19:33 Zoffix geekosaur++ thanks
19:38 Aaronepower joined #perl6
19:38 AlexDaniel joined #perl6
19:40 woolfy \o/
19:41 woolfy Pictures from The Perl Conference in Amsterdam, by Judith: Day 1: https://myalbum.com/album/vEDfZPrP8Jp0 ; Day 2: https://myalbum.com/album/ItlqEDaVG7Xb ; Day 3: https://myalbum.com/album/vqxcZx4xWb4Y
19:42 cdg joined #perl6
19:44 Cabanossi joined #perl6
19:49 Geth ¦ doc: pstuifzand++ created pull request #1473: Fix method name set-name -> set-name-age
19:49 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1473
19:50 b2gills Perhaps a flag could be added for when you don't want to use the REPL
19:51 skids Or have -e accept '-'
19:51 Zoffix I was thinking of doing the .tty check and checking if RAKUDO_LINE_EDITOR is (if it's not, use the bare REPL)
19:51 Zoffix s/is/is set/;
19:52 Zoffix woolfy: who's the person with one forearm?
19:57 jkva_ Zoffix: Tinita
19:58 Zoffix Ah. Thanks.
20:04 Zoffix woolfy++ nice pics
20:05 andreoss joined #perl6
20:06 aeruder m: (^5).Supply.batch(elems => 2).tap: *.say
20:06 camelia rakudo-moar 84b40c: OUTPUT: «[0 1]?[2 3]?[4]?»
20:06 aeruder m: (^5).Supply.batch(elems => 1).tap: *.say
20:06 camelia rakudo-moar 84b40c: OUTPUT: «0?1?2?3?4?»
20:06 aeruder m: (^5).Supply.batch(elems => 2, seconds => 200).tap: *.say
20:06 camelia rakudo-moar 84b40c: OUTPUT: «[0 1]?[2 3]?[4]?»
20:06 aeruder m: (^5).Supply.batch(elems => 1, seconds => 200).tap: *.say
20:06 camelia rakudo-moar 84b40c: OUTPUT: «[0]?[1]?[2]?[3]?[4]?»
20:07 aeruder this API drives me insane, I personally think Supply.batch ever returning self just seems broken
20:07 aeruder it seems a pretty reasonable expectation that you'd get lists out of whatever supply it returns
20:08 Zoffix aeruder: I think it returns a new Supply, not self.
20:08 aeruder but, it is actually part of the tested spec, so how do I go about proposing to change that
20:08 aeruder Zoffix: not if elems is 1 and seconds is unspecified
20:08 aeruder m: my $s = (^5).Supply; say ($s === $s.batch(elems => 1));
20:08 camelia rakudo-moar 84b40c: OUTPUT: «True?»
20:09 mst that seems like a trivial optimisation and I don't see how it matters
20:09 aeruder except it isn't
20:09 timotimo right
20:09 timotimo batch is supposed to create one-elemen tlists
20:09 aeruder see the taps up there, now you have to do all kinds of param checking to make sure you're getting lists or not
20:09 timotimo not really
20:10 timotimo m: say 5.elems
20:10 camelia rakudo-moar 84b40c: OUTPUT: «1?»
20:10 aeruder m: (^5).Supply.batch(elems => 1).tap: *.say
20:10 camelia rakudo-moar 84b40c: OUTPUT: «0?1?2?3?4?»
20:10 aeruder m: (^5).Supply.batch(elems => 1, seconds => 500).tap: *.say
20:10 camelia rakudo-moar 84b40c: OUTPUT: «[0]?[1]?[2]?[3]?[4]?»
20:10 timotimo m: (^5).Supply.batch(elems => 1, seconds => 500).tap(-> @foo { say @foo.perl });
20:10 camelia rakudo-moar 84b40c: OUTPUT: «[0]?[1]?[2]?[3]?[4]?»
20:10 aeruder why is elems => 1, seconds => undef some special case
20:10 timotimo m: (^5).Supply.batch(elems => 1).tap(-> @foo { say @foo.perl });
20:10 camelia rakudo-moar 84b40c: OUTPUT: «Type check failed in binding to parameter '@foo'; expected Positional but got Int (0)?  in block <unit> at <tmp> line 1??»
20:10 timotimo there, that's not so great
20:10 aeruder exactly
20:11 aeruder but it is part of the actual tested spec for perl6
20:11 TEttinger joined #perl6
20:11 timotimo so yeah, put the test in 6.c-errata
20:11 aeruder so, i'm just wondering how to go about changing this
20:11 aeruder https://github.com/aeruder/rakudo/commit/1e1b4c6e191b48b34bb59a4fd56930e2a94f4736 -- like this
20:12 aeruder it seems pretty reasonable that batch just always returns a supply that produces lists
20:12 Zoffix aeruder: where's the test located? Is it part of 6.c-errata or just master
20:13 Zoffix s: (^5).Supply, 'batch', \(elems => 1)
20:13 SourceBaby Zoffix, Sauce is at https://github.com/rakudo/rakudo/blob/4af1d95cf/src/core/Supply.pm#L852
20:13 aeruder it was in some other repo, i'm pretty new to perl6 and the dev process
20:13 aeruder perl6-roast
20:14 skids Which git branch, is the question.
20:14 aeruder https://github.com/perl6/roast/blob/master/S17-supply/batch.t#L60
20:14 mst oh, right, I see, sorry
20:16 skids Yeah so the procedure for an test-incompatible change once it is agreed that the test was wrong is to add a test to 6.c-errata which serves to announce that 6.c's tests were wrong.
20:16 skids And then also into master afer the fix, IIRC.
20:16 skids (That is, the 6.c-errata branch of roast)
20:17 aeruder who "agrees" in this case?
20:17 Zoffix aeruder: submit your PR with the fix and mention that it breaks that test. The test looks wrong to me and if other devs agree, it'll be changed.
20:17 timotimo o/
20:17 aeruder well, i mean, who.. officially... are the people who need to agree
20:17 aeruder :)
20:18 Zoffix aeruder: me timotimo jnthn lizmat samcv TimToady moritz AlexDaniel
20:18 * timotimo blushes
20:18 timotimo i don't belong that early in the list
20:19 aeruder i think i've actually found a whole mess of non-spec problems with Supply.batch fwiw, just getting started somewhere here
20:19 samcv hello
20:19 Zoffix The list is unordered :")
20:19 lizmat aeruder: good catch
20:19 lizmat looking at it now
20:19 timotimo ^- author of that method
20:19 Zoffix aeruder: FWIW there's #perl6-dev channel where more dev eyes would notice the discussion :)
20:19 aeruder ok, so should i just do a PR on rakudo? and mention that it breaks the tests in roast?
20:19 Zoffix Yeah
20:20 aeruder ok, let me start with that
20:20 samcv awesome :)
20:26 Kyo91_ joined #perl6
20:26 Aaronepower I heard it was easy to use python libraries in perl6 is that true? I want try and use BeautifulSoup in p6
20:27 BenGoldberg joined #perl6
20:27 timotimo it's pretty easy
20:27 Zoffix buggable: eco Inline::Python
20:27 buggable Zoffix, Inline::Python 'Use Python code and libraries in a Perl 6 program': https://github.com/niner/Inline-Python
20:27 Zoffix Aaronepower: I believe that ^ module is what provides that functionality.
20:27 dwarring joined #perl6
20:27 AlexDaniel the way it handles non-positive ints is really bothering me
20:27 timotimo Aaronepower: https://perlgeek.de/blog-en/perl-6/2017-012-inline-python.html and https://gist.github.com/awwaiid/ef3f0abcfa96e34977b4 are good starting points i'm sure
20:28 AlexDaniel Aaronepower: by the way, why? Are you sure you don't need this? https://github.com/Skarsnik/perl6-gumbo
20:28 timotimo AlexDaniel: what does?
20:28 Aaronepower AlexDaniel: Huh
20:28 AlexDaniel timotimo: .batch: elems => …
20:29 AlexDaniel 0 is identical to 1, negative numbers act like infinity
20:29 Aaronepower AlexDaniel: Well I need something that has a lot of the capabilities of BeautifulSoup. I've found that a lot of libraries never come close.
20:29 AlexDaniel Rats act like infinity
20:29 timotimo oh?
20:29 aeruder AlexDaniel: yea, good point
20:29 AlexDaniel m: Supply.from-list(1..10).batch(elems => 2.5).tap({ .say })
20:29 camelia rakudo-moar 84b40c: OUTPUT: «[1 2 3 4 5 6 7 8 9 10]?»
20:30 aeruder AlexDaniel: it really should be using >= rather than ==
20:30 Zoffix in .comb we do <1 => 1
20:30 Zoffix m: dd "foobar".comb: -42
20:30 camelia rakudo-moar 84b40c: OUTPUT: «("f", "o", "o", "b", "a", "r").Seq?»
20:30 aeruder yea, i think changing things to >= would have a similar effect
20:31 AlexDaniel Aaronepower: go for it then :) I think I've used python-gumbo with BeautifulSoup, it was fine.
20:31 AlexDaniel Aaronepower: (using Inline::Python mentioned above)
20:31 AlexDaniel m: dd "foobar".comb: 2.5
20:31 camelia rakudo-moar 815faa: OUTPUT: «Cannot resolve caller comb(Str: Rat); none of these signatures match:?    (Str:D $: *%_)?    (Str:D $: Int:D $size is copy, $limit = *, *%_)?    (Str:D $: Str $pat, *%_)?    (Str:D $: Str $pat, $limit, *%_)?    (Str:D $: Regex:D $pattern, :$mat…»
20:32 AlexDaniel well, I'm fine with it complaining
20:33 * Zoffix thinks the entire codebase needs to be combed and decide what's the correct behaviour is for such cases and then do it consistently accross the board.
20:33 AlexDaniel yea
20:34 aeruder pun++ :P
20:34 AlexDaniel but we do know that defaulting to Inf is not quite right
20:34 bjz joined #perl6
20:36 andreoss left #perl6
20:36 cdg joined #perl6
20:37 AlexDaniel you can still work with it
20:37 AlexDaniel m: (^5).Supply.batch(elems => 2).tap(-> List() $foo { say $foo.join(‘|’) })
20:37 camelia rakudo-moar 815faa: OUTPUT: «0|1?2|3?4?»
20:37 AlexDaniel m: (^5).Supply.batch(elems => 1).tap(-> List() $foo { say $foo.join(‘|’) })
20:37 camelia rakudo-moar 815faa: OUTPUT: «0?1?2?3?4?»
20:38 AlexDaniel using .list on something is a fairly common idiom if you expect one thing or a list of things at the same time
20:39 cdg joined #perl6
20:42 woolfy Zoffix: not my pics, but by Judith de Hont, the conference's communications officer.  :-)
20:46 AlexDaniel greppable: batch
20:46 greppable6 AlexDaniel, https://gist.github.com/56c24fbbc311ccddfa60ebac370ed576
20:46 Zoffix Noted
20:47 AlexDaniel Not exactly what I was looking for… “NA-NA-NA-NA-BATCHFILE!”
20:59 aeruder been a while, forgot that github auto-updated the pull request everytime i updated the remote branch D:
21:04 AlexDaniel lizmat: I don't understand your question. The check that was mentioned causes “flush” to happen
21:05 lizmat ah, ok, if you accept $elems to be < 1
21:05 aeruder also to handle rational (2.3)
21:05 aeruder in a reasonable way
21:06 AlexDaniel ah, now I understand the question
21:06 lizmat Int(Cool) :$elems would do that also
21:07 AlexDaniel hm, that sounds like a better way to approach it
21:07 aeruder I also use it because right now I'm defaulting the batch size to 0 in the case of !$elems
21:08 aeruder because in the timeout case, there is a distinction between 0 and 1, but in the non-timeout case there isn't
21:08 aeruder could make that more explicit tho
21:09 * aeruder is still trying to figure out how to run tests correctly in roast :-/
21:11 Skarsnik Aaronepower, duuno Beautifulsoup lookpretty standard
21:12 Aaronepower Skarsnik: Stuff like removing and stripping elements from the in memory tree is something that is usually missing.
21:13 AlexDaniel don't we have that in XML?
21:13 Skarsnik Could be added to the XML module
21:13 Skarsnik but I think XML has method for that?
21:13 Cabanossi joined #perl6
21:14 Skarsnik and I added stuff in gumbo to prefilter stuff
21:14 Aaronepower AlexDaniel: Can XML handle html5?
21:14 Skarsnik no
21:14 AlexDaniel Aaronepower: no, that's what Gumbo is for
21:15 Skarsnik not its job
21:15 Aaronepower AlexDaniel: Oh, your comment implied that XML could do that for HTML
21:15 AlexDaniel Aaronepower: Gumbo module gives you XML::Document, so everything XML has applies
21:15 * tinita waves to Zoffix
21:17 AlexDaniel Skarsnik: hm, but what if you want to get html5 back?
21:17 Skarsnik good question
21:17 AlexDaniel Skarsnik: like change something and then have everything else roundtrip
21:18 Skarsnik does not look like gumbo has an api for writing
21:19 Zoffix tinita: oh cool :) You're in #perl6
21:22 tinita Zoffix: =)
21:23 tinita have to get back to learn more perl6 actually
21:23 Skarsnik AlexDaniel, probably need to find another lib? but generating html5 should be easier than generating it
21:37 AlexDaniel Skarsnik: I think so too. But we have nothing in the ecosystem yet
21:38 ParsonsNose joined #perl6
21:43 woolfy left #perl6
21:46 andreoss joined #perl6
21:54 zakharyas joined #perl6
22:02 committable6 joined #perl6
22:12 _cronus joined #perl6
22:13 _cronus hello everybody. Is there a way to get an element from (1..16).permutations without calculating all the previous permutations?
22:16 Skarsnik sounds like something that could be done with lazy list?
22:22 andreoss m: (1..10).permutations.^name.say
22:22 yoleaux 19:26Z <Zoffix> andreoss: RE '$*IN.slurp.EVAL'; Would you know of a great way to detect whether the input is being piped to perl6? I googled around and answers say there's no fool-proof way. The other alternative is implementing "silent" line editor, which looks trivial to do, but `RAKUDO_LINE_EDITOR=silent perl6` is even longer than the $*IN/EVAL trick. https://github.com/rakudo/rakudo/blob/nom/src/core/REPL.pm#L211-L217
22:22 camelia rakudo-moar 815faa: OUTPUT: «Seq?»
22:23 andreoss m: (1..10).permutations.lazy.^name.say
22:23 camelia rakudo-moar 815faa: OUTPUT: «Seq?»
22:24 Skarsnik fun
22:25 _cronus Skarsnik, andreoss: thanks
22:27 Kyo91_ joined #perl6
22:29 _cronus Skarsnik, andreoss: any pointers where I can find more info on lazy lists in the docs? I know I've seen it somewhere, but for some reason I can't find it.
22:30 andreoss my point is you probably cannot calculate an element non sequentially
22:32 andreoss https://github.com/rakudo/rakudo/blob/nom/src/core/Rakudo/Iterator.pm#L2296
22:37 nadim joined #perl6
22:39 _cronus andreoss: thanks again.
23:05 AlexDaniel aeruder++
23:08 AlexDaniel aeruder: are you planning to submit roast PR too?
23:13 Cabanossi joined #perl6
23:29 cdg joined #perl6
23:29 MilkmanDan joined #perl6
23:33 cdg joined #perl6
23:51 AlexDaniel what is the easiest way to getppid?
23:56 snarkyboojum joined #perl6
23:59 census joined #perl6
23:59 BenGoldberg joined #perl6

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

Perl 6 | Reference Documentation | Rakudo