»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
andreoss exit code 11 00:02
timotimo if it segfaults after a plan and a few "ok" or "nok" lines it's that output
or, er, the other one?
if someone with a hackernews account wants to clarify something: 00:04
there's someone with a piece of code that's really slow 00:05
someone else put a piece of code up that's really really fast, but sadly also wrong
andreoss how do i investigate segfaults with Perl 6? gdb?
timotimo yes, gdb is a good start; you'll likely want to run perl6-gdb-m with the env var MVM_JIT_DISABLE=yes set
00:05 dubi0us left
timotimo the code is about substituting the first y on each line into a n; sadly, the faster code only replaces the first y in each ~65k block into an n and is therefore not equivalent 00:06
andreoss: when you're attached to moar, there's a few nice debug helpers, but you'll definitely want to rebuild your moarvm to have debug symbols and less optimization, i.e. --debug=3 --optimize=0 in moarvm's Configure.pl
andreoss: one of the debug helpers is MVM_dump_backtrace(tc) - you can pretty much always go "up" a few frames to find one that has tc available 00:07
00:09 mcmillhj joined
andreoss is "has $.value" substitutable with `method value` or it will cause problems? 00:11
00:11 pharv_ left
timotimo if it's not rw, and you're not using introspection on your class, then yeah. should be fine 00:11
m: class A { has $.foo }; say A.^attributes 00:12
camelia (Mu $!foo)
timotimo m: class A { method foo { } }; say A.^attributes
camelia ()
timotimo of course you can keep the attribute $!foo because it doesn't clash with the method
oh
00:13 pierre_ joined
timotimo i forgot about the important thing, which is that if you have "has $.foo" you can set the value for that in the constructor, and the default .perl will also output it 00:13
andreoss m: role F { has $.v = 1 }; role G { method v { 2 }} ; role H does F does G {} ; H.v.say
camelia 2
andreoss m: role F { has $.v = 1 }; role G { method v { 2 }} ; role H does G does F {} ; H.v.say
camelia 2
00:13 mcmillhj left
andreoss m: role Abs { method v {...} }; role F does Abs { has $.v = 1 }; role G does Abs { method v { 2 }} ; role H does G does F {} ; H.v.say 00:14
camelia 2
andreoss $.v is considered as method here
timotimo of course, $.v is sugar for $(self.v)
the attribute is actually $!v 00:15
00:15 pilne joined
andreoss but 00:15
jdv79 i kinda agree with mr. miller on a few of his points
andreoss m: role Abs { method v {...} }; role F does Abs { has $.v = 1 }; role G does Abs { has $.v = 2 } ; role H does G does F {} ; H.v.say
camelia Attribute '$!v' conflicts in role composition
in any protect at gen/moar/stage2/NQPCORE.setting line 1033
in block <unit> at <tmp> line 1
andreoss so i can use `has $.v` only once
timotimo m: role WithPriv { has $!whoa }; class A does WithPriv { method foo { say $!whoa } }; A.new.foo 00:16
camelia (Any)
ugexe how else would it work?
jdv79 the curly brace thing, lack of default grammar diagnostics, the odd whatever star rules, the odd itemization rules - they are all a but unseemly
timotimo ^- you can put private attributes into classes with a role
andreoss ugexe: i keep `has $.v = ...` in Abs and can have several of those in different roles 00:18
timotimo jdv79: default grammar diagnostics may actually be coming ~soon
i don't think the whatever star rules are especially odd
zengargoyle must read the miller thing instead of just comments. :)
timotimo if sqrt(*) would be the same as *.sqrt, that'd make whatever stars pretty much useless 00:19
zengargoyle i don't see how grammar can be smart enough to give actual errors.
timotimo <a b c d>.map(* ~ "foo") would do what?
it would give you a function that gives you a four element list of whatever-you-passed concatenated with "foo"
ugexe so use a method - an attribute is not meant to be an analog for a method even though it gets a getter/setter method 00:20
timotimo zengargoyle: it can give you the high water mark, i.e. the furthest it has gotten
jdv79 but iirc its weird that * doesn't work in all cases that $_ does
zengargoyle and isn't that just in the $/ that comes back that failed?
timotimo jdv79: i'd have to look at the article again, or do you have an example ready to paste?
jdv79 i don't. sorry.
zengargoyle i always wondered exactly how * + * worked.... is it left to right? 00:21
or right to left....
timotimo jdv79: the difference between $_ vs * is that with $_ you have explicit curlies to denote the scope
you use the whatever star if the rules for what scope you'll get are clear enough to make them useful 00:22
on top of that, we want to be able to pass just * to a bunch of things, like .roll(*)
a whatever in an argument list doesn't curry to contain the function call it's in, same for .[] and .{} which arguably are also argument lists 00:23
00:24 mcsnolte left
timotimo zengargoyle: i'm not sure why you're confused about * + * tbh? the rule is textual order gives argument order 00:25
if you need something else, use the R metaop if it doesn't cause confusion, or "upgrade" to curlies and $^a, $^b, ...
zengargoyle gotcha, i just think i've only seen multiple * in things like + or *(multiply) where it wasn't clear.... 00:26
timotimo ugh, i think i sound a bit grumpy; please excuse the tone, i've got a bit of a headache
ugexe regex? foo ** 0..2 00:27
timotimo ah, sure. i haven't looked, but i'd expect the docs cover this. if not, doc bug please
00:27 Cabanossi left
timotimo ugexe: i'm confused, what's that an answer to? 00:28
00:28 moop_ joined
TimToady already has a patch for the default grammar diagnostics, but has to think about ecosystem damage first 00:28
00:29 Cabanossi joined
timotimo gives a littl cheer 00:30
zengargoyle i might check, but i find re-reading and re-reading and re-reading docs to see what's changed headache inducing. :)
timotimo that sounds fair, but whatever star currying hasn't changed since i got onto the project :D
00:30 basket` left
timotimo except if you mean only changes in the docs as to what's covered and what isn't 00:30
in which case, yeah, that's fair 00:31
not really something that can be fixed :|
00:32 Kyo91 left
zengargoyle yeah, release and p6delta or such, but for now... "gah, it wasn't there last week" is a PITA. :) 00:32
00:32 basket` joined 00:35 lookatme joined
lookatme morning 00:37
moop_ morning 00:38
zengargoyle woot 00:39
timotimo noot 00:40
zengargoyle m: my @f = 1, 2, * - * ... Inf;say @f[^10] 00:42
camelia (1 2 -1 3 -4 7 -11 18 -29 47)
zengargoyle half of my brain says that should be 1,2,2-1, ... the other half thinks it's just $^a - $^b :S 00:43
timotimo well, it's 1 - 2 which is -1, then it's 2 - -1 which is 3, then it's -1 - 3 which is -4 00:47
er, i think that's what you meant?
zengargoyle yeah, it folds the wrong way... i'd think the first * would grab the 2 and curry and the second * would grab the 1 and it would be 2-1 00:48
andreoss m: sub foo($m) { temp $*t = $m.WHAT }; foo(1).say
camelia Can only use 'temp' on a container
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo well, you can totally do that with R- 00:49
m: my @f = 1, 2, * R- * ... Inf;say @f[^10]
camelia (1 2 1 -1 -2 -1 1 2 1 -1)
zengargoyle instead it's like 2 * == $^a and $^b and you count the * and go back and find that many arguments.
timotimo the reason the first * gets the 1 and the second * gets the 2 is because the ... operator gives you a "sliding window"
zengargoyle yeah, i think the often use of curry doesn't quite fit in my head. first * shoule be 2, second * should be 1. folding instead of sliding... 00:53
00:54 dubi0us joined
timotimo ah, i see where you're coming from 00:54
yeah, currying is kind of different here from what it's usually used for 00:55
zengargoyle but nah, i haven't thought about it that much yet.... :)
timotimo i.e. a function with two arguments being turned into a func of 1 arg returning another func of 1 arg returning the result
zengargoyle right....
timotimo i'm not actually sure where exactly the name "whatever currying" came from and what the thought process was exactly 00:56
zengargoyle i can get both ways, maybe 'curry' isn't something that should really be used to describe whatever *.
but i haven't really thought about any other cases than the common Inf Seq thing.... or trivial single use whatever in method calls... 00:57
timotimo fun fact: before i made an optimization, we used to generate multiple cascading calls when we parsed multiple whatever stars in one thingie
zengargoyle heh 00:58
00:58 dubi0us left 01:00 astj joined 01:03 dubi0us joined 01:04 raschipi joined 01:07 nadim left, rgrau left, dubi0us left
timotimo bedtime, bye! 01:11
01:12 dubi0us joined 01:13 raschipi left
lookatme timotimo, bye 01:15
01:16 iyra left
TimToady the design docs actually try to avoid the word "currying", and talk about autopriming instead 01:17
but it's hard to get people to use words differently than they do
01:18 dubi0us left
TimToady partial function applicatoin is not really the same thing as currying, but people confuse them all the time 01:18
01:18 dubi0us joined
TimToady *tion 01:20
TimToady has checking in a grammar failure message patch, now we'll see if it blows up the ecosystem...
01:23 moop_ left
zengargoyle TimToady: i'll try and read up on partial application vs currying and begin the crusade to stamp out 'currying' as not quite right. 01:24
01:27 Cabanossi left 01:29 Cabanossi joined 01:34 dubi0us left 01:38 dubi0us joined 01:44 ilbot3 left 01:46 dubi0us left 01:49 dubi0us joined 01:51 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:53 dubi0us left 01:55 Rawriful left
Geth doc: 3afe181824 | (Will "Coke" Coleda)++ | doc/Language/faq.pod6
remove trailing whitespace
01:57
doc: 9575dd6798 | (Will "Coke" Coleda)++ | doc/Language/faq.pod6
avoid double the
brimonk How do I get the value for pi (3.141592...) in perl6?
andreoss m: say π 01:58
camelia 3.14159265358979
brimonk m: say pi 01:59
camelia 3.14159265358979
brimonk I think that 'pi' makes more sense.
I don't have a 'π' key on my keyboard :)
01:59 pierre_ left 02:00 pierre_ joined
lookatme Nobody have a π on keyboard. 02:03
andreoss Greeks do
02:04 noganex joined 02:05 pierre_ left
lookatme :) except geeks 02:05
geekosaur <compose> p i
and Greeks was literal there
lookatme yes, you are right 02:06
02:06 vike left 02:07 noganex_ left 02:09 dubi0us joined, hythm_ joined
andreoss m: sub infix:">>="($a, $b) {$b}; say (1 >>= 2) 02:11
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3sub infix:7⏏5">>="($a, $b) {$b}; say (1 >>= 2)
andreoss m: sub infix:«>>=»($a, $b) {$b}; say (1 >>= 2)
camelia 2
BenGoldberg brimonk, Depending on your keyboard, you might be able to type pi by typing ALT-(277) 02:12
s/277/227/
02:12 vike joined 02:13 dubi0us left
andreoss this doesn't work in REPL for some reason 02:15
lookatme m: sub infix:<<">>=">>($a, $b) {$b}; say (1 >>= 2) 02:18
camelia 2
andreoss echo 'sub infix:«>>=»($a, $b) {$b}; '; echo ; echo 'say 1 >>= 2;' | perl6
doesnt work if newline involved
lookatme No, because it not get first line 02:21
the sub define
the sub definition
andreoss { echo 'sub infix:«>>=»($a, $b) {$b}; '; echo ; echo 'say (1 >>= 2);'; }| perl6 02:22
my bad
lookatme echo 'sub infix:<<">>=">>($a, $b) {$b}'"\n\n"'say 1 >>= 2;' | perl6 02:24
but this not work too
echo 'sub infix:<<">>=">>($a, $b) {$b}; say 1 >>= 2;' | perl6 02:25
this form work
andreoss I guess it's Readline issue 02:26
lookatme seems like it not see the sub definition
echo 'sub infix:<<">>=">>($a, $b) {$b};'"\n"'say &[+>];'"\n"'say &[>>=]' | perl6 02:28
02:29 cpage_ left
AlexDaniel lookatme: “Nobody have a π on keyboard.” ?? O_o 02:29
lookatme AlexDaniel, it's my mistake, forget it :) 02:30
AlexDaniel I wonder what has to be done to get rid of the common misconception that keyboard layouts are unmodifiable 02:31
andreoss can i know which type a function defined to return from inside of it? 02:32
::?ROUTINE? 02:33
AlexDaniel m: sub foo(--> Int) { say &?BLOCK.returns }; foo
camelia (Int)
AlexDaniel m: sub foo(--> Int) { say &?ROUTINE.returns }; foo
camelia (Int)
andreoss i see 02:34
AlexDaniel I'm thinking about removing π from a dedicated key (and instead having nothing at all there). 「Compose * p」 is good enough considering how often I need π 02:35
andreoss there's no &?CALLER or something like that? 02:38
ugexe docs.perl6.org/language/5to6-perlfunc#caller 02:39
docs.perl6.org/language/variables#..._variables 02:40
02:47 escherlat left 02:49 dubi0us joined
BenGoldberg m: sub foo(--> Int) { say callframe }; foo 02:52
camelia <tmp> at line 1
BenGoldberg m: sub foo(--> Int) { say callframe(0) }; foo
camelia <tmp> at line 1
BenGoldberg m: sub foo(--> Int) { say callframe(-1) }; foo
camelia SETTING::src/core/CallFrame.pm at line 55
02:53 dubi0us left
BenGoldberg m: sub foo(--> Int) { dd callframe.code }; foo 02:54
camelia Sub+{Callable[Int]} foo = sub foo ( --> Int) { #`(Sub+{Callable[Int]}|61861736) ... }
BenGoldberg m: sub foo(--> Int) { dd callframe.code.returns }; foo
camelia Int
BenGoldberg andreoss, ^
02:55 ramortegui joined
ugexe that and an explanation is in the first link 03:00
03:05 BenGoldberg left 03:06 khw left
andreoss multi's have strange call stacks 03:07
03:08 dubi0us joined 03:10 Cabanossi left 03:11 ckraniak left 03:13 Cabanossi joined 03:14 Xliff joined
Xliff 'lo 03:14
lookatme o/
Xliff What is the best way to upgrade all perl6 modules on a system? 03:15
$ panda list --installed | grep -v panda | awk -e '{print $1}' | xargs panda install
^^ Should work, but panda doesn't check the version until install time, and installing the same version of a module is a fatal error (and really shouldn't be if more than one module is specified on the command line) 03:16
lookatme Hmm, panda is obsolete
Xliff Yet rakudobrew stll installs it... :p
lookatme why you not use zef ? 03:17
03:17 dubi0us left
Xliff Coz rakudobrew installs panda. 03:17
lookatme zef --upgrade
Xliff Installing now
lookatme this will update all module
03:17 pierre_ joined 03:18 khw joined
Xliff And zef install doesn't install it in the right path, it looks like. 03:19
03:19 dubi0us joined, Resol joined
Resol Hi there! Is there something special one needs to do to get Proc::Async to work on Windows? 03:21
Trying to run the simple example from the Proc::Async page on docs.perl6.org ... runs fine on MacOS
Doesn't work on Windows 03:22
Both systems using Rakudo 2017.07
03:23 dubi0us left
lookatme What's the rakudo complaint ? 03:25
Xliff zef wrapper needs "#!/usr/bin/env perl6" at the top or it doesn't run.
lookatme Xliff, It should install module to the local repo
I don't know much about it
Resol, What's the rakudo complaint ? 03:26
Xliff lookatme: It does, but it is not in any shape to be executable at install-time.
I know this because I just had to do it.
1) Installs in wrong place.
03:27 pilne left
Resol Ultimately it says "no such file or directory" 03:27
Xliff 1a) Solution: "cd ~/.rakudobrew/bin; ln -sf ../moar-nom/zef/bin/zef; chmod a+x ~/.rakudobrew/moar-nom/zef/bin/zef"
03:28 cpage_ joined
Xliff 2) Does not invoke perl6 in command line mode, so it doesn't run without "#!/usr/bin/env perl6" at the top of ~/.rakudobrew/moar-nom/zef/bin/zef 03:28
Resol but given that I'm just using 'echo' in the Proc::Async.new('echo', 'foo', 'bar'); that seems odd
03:28 dubi0us joined
lookatme Resol, which example are you trying run? 03:29
Xliff lookatme: Also, the command is "zef upgrade" not "--upgrade" ;)
lookatme Xliff, oh, type mistake, sorry
03:29 pierre_ left
Resol Hi Lookatme 03:29
Xliff lookatme: No worries. I got it working after all that. 03:30
lookatme Actually I never use that upgrade command
Resol I'm trying to run the echo foo bar one.
To exit type 'exit' or '^D' > my $proc = Proc::Async.new('echo', 'foo', 'bar'); Proc::Async.new(path => "echo", args => ["foo", "bar"], w => Any, enc => "utf8", translate-nl => Bool::True, started => Bool::False) > $proc.stdout.tap(-> $v { print "Output: $v" }, quit => { say 'caught exception ' ~ .^name }); Tap.new > $proc.stderr.tap(-> $v { print "Error: $v" }); Tap.new > my $promise = $proc.start; Promise.new(scheduler => ThreadPoolSche
It works like a champ on my Mac, but not on Windows :-(
I guess I pasted too much into the line 03:31
Xliff Resol: I don't think that example will run on Windows without some changes.
Resol my $proc = Proc::Async.new('echo', 'foo', 'bar');
Hi Xliff ... okay, fair enough ... 03:32
can you recommend the changes?
03:32 dubi0us left
Resol The error message at the bottom is: 03:33
caught exception X::AdHoc Unhandled exception in code scheduled on thread 6 > no such file or directory
03:34 hythm_ left
lookatme If you mean the example under `class Proc::Async`, it should be run correctly 03:35
03:35 pharv_ joined
Resol Hi Lookatme ... yes, that's the one. 03:35
Xliff "echo" is not a binary command. It's part of cmd.exe
Resol If i put it into Rakudo on my Mac, works fine.
If I do it on Rakudo on my Windows 10 machine, it doesn't work 03:36
Xliff Yes, because OSX runs a POSIX command line where echo is an actual command..
Resol Okay, so the Proc::Async has to be an executable?
I can try a different executable in place of echo
Xliff try "my $proc = Proc::Async.new('cmd.exe', '/k', 'foo', 'bar');
Or
try "my $proc = Proc::Async.new('cmd.exe /k', 'foo', 'bar'); 03:37
I think the first should work.
I don't have perl6 installed on my Windows host.
lookatme I don't use that win32 installation 03:38
I use bash on win10
Resol Okay, got it ... I swapped out the echo for another executable and it worked fine.
I'll try your way too ...
Xliff Toldja. ;)
lookatme okay, Resol that make sense
Xliff Resol: You must remember, Windows is an entirely different environment than Unix-ish 03:39
So many examples will have to be rewritten for it.
Resol Hi Xliff, yes, I know its different, but I was hoping that the examples would work. 03:40
I'm trying to convince some folks to consider using Perl6 at work, and we're an all Windows shop.
So I started running through some examples ...
I know I'll never convince anyone to give it a try if the examples on the site don't work. 03:41
lookatme yeah, echo is both a binary and a command in bash
Resol And it's not like I can convince them to move to Linux of MacOS.
03:41 pierre_ joined
lookatme we should mark it not working on windows 03:42
Xliff Resol: You could try using CygWin
It compiles on Windows and provides a unix-ish environment.
Most examples from the web page should then be doable.
lookatme bash on win10 is better than Cygwin
Xliff And I think "rakudobrew" will work on it. 03:43
Win 10 bash != bash
Win 10 bash is not a POSIX environment.
Cygwin is.
lookatme no, I mean `bash on win10`
Xliff I know what you meant. :p
lookatme a linux subsystem
Xliff Hrm.
Resol Is there a way for me to mark things as not working as I run through examples?
Xliff If it is a Linux subsustem, then it should run the examples properly. 03:44
Resol Or is it best to ask questions here?
geekosaur the problem there is, if it's a native build, echo is a cmd built-in not a command you can launch that way
Xliff My thinking is that you are still running windows environment by default when you use Proc::Async
geekosaur 'cmd', '/c', 'echo foo bar'
yes, because there is no echo.exe
it is a cmd built-in
Xliff geekosaur: Yeah. I told him that
lookatme Xliff, yeah, it works perfectly like Linux does. That subsystem is base on Ubuntu
Xliff lookatme: Not perfectly, as your initial attempts prove. 03:45
lookatme Xliff, yeah, maybe but better than cmd 03:46
lunch time bye
geekosaur windows is not an os x, it is not a posix, it is not a linix
Xliff Since I think it will start a cmd, not a bash shell
geekosaur yes
lookatme I recommend open that feature on win10. 03:47
geekosaur the first should work 03:48
after the executable, it pretty much doesn't matter how you break it up, it has to be reassembled for windows to pass it anyway 03:49
Resol yes, the 'cmd.exe', '/c', 'echo foo bar' works great
Makes a lot of sense to me now ...
And would be great to be able to update that section of the docs with this little tip. 03:50
Certainly had me scratching my head.
geekosaur if that's on the doc site, you should report a bug so the example can either be rewritten or a windows example provided 03:51
Resol Okay, sure ... how do I report a bug? 03:52
I'm happy to try to do that
geekosaur we need more windows contributors 03:56
that's not really a solution for a windows shop
03:57 dubi0us joined
geekosaur seriously, we are supposed to be leaving behind older perl's unix mindset 03:58
suggesting that people who want to use perl 6 on windows install a bad linux emulation on windows is not a solution
hve another window open and file doc bugs as you run across non-working examples 03:59
this should be _fixed_
Resol Well, for this problem, since it's just a different format of the example, I can add a bug report on it ... I just need to know how to report bugs. 04:00
geekosaur but yes, also ask here and hopefully we can give you examples that work natively 04:01
Resol Gotcha ...
I found the GitHub site and will report the issue now 04:02
04:02 dubi0us left 04:03 dubi0us joined
geekosaur huggable, doc bugs 04:08
huggable geekosaur, github.com/perl6/doc/issues
04:08 dubi0us left 04:09 dubi0us joined 04:10 pierre_ left, mcmillhj joined 04:11 pierre_ joined 04:13 dubi0us left 04:15 bwisti left 04:16 pierre_ left 04:19 mcmillhj left 04:22 pharv_ left 04:24 mr-foobar left 04:26 Cabanossi left, mr-foobar joined 04:27 mcmillhj joined 04:28 abdef1 joined
abdef1 This is a really simple question -- but how do I exist a subroutine ahead of it actually finishing 04:28
04:28 Cabanossi joined
geekosaur return 04:28
04:29 dubi0us joined
geekosaur (this is actually listed as a function/routine, because in perl 6 it works by throwing a control exception. which also means you can use it as a method on the return value!) 04:29
abdef1 ohh 04:30
I didn't know you could return nothing 04:31
thanks
04:31 mcmillhj left
geekosaur righ, just return without a value if you don't have a return value. you can also advertise this in the signature: sub foo (Int --> ) 04:32
04:33 dubi0us left 04:38 mcmillhj joined
abdef1 Is there another way to clear an array 04:40
other than @a = Nil;
04:41 k-man left, k-man joined 04:42 mcmillhj left
lookatme @a = []; 04:43
04:43 ckraniak joined 04:44 dubi0us joined 04:48 dubi0us left 04:49 dubi0us joined 04:50 Sgeo left 04:54 dubi0us left, mcmillhj joined 04:56 mr-foobar left 04:57 mr-foobar joined, Cabanossi left 04:58 Sgeo joined, Cabanossi joined, xtreak joined 04:59 dubi0us joined, skids left 05:00 pharv_ joined, dubi0us left 05:01 mcmillhj left
Xliff "zef upgrade" is busted (it is beta) 05:04
Filing bug.
05:05 dubi0us joined 05:06 dubi0us left 05:10 xtreak left 05:15 wamba joined, tojo_ is now known as tojo 05:17 tojo is now known as tojo_ 05:19 tojo_ is now known as tojo 05:22 Altreus left, Altreus joined 05:23 xtreak joined 05:24 mr-foobar left 05:27 xtreak left 05:29 mr-foobar joined 05:30 ramortegui left 05:36 khw left 05:37 lowbro joined, lowbro left, lowbro joined 05:39 dubi0us joined 05:41 Cabanossi left 05:42 andrzejku joined 05:43 dubi0us left, Cabanossi joined 05:49 dubi0us joined 05:50 xtreak joined 05:54 dubi0us left 05:57 pierre_ joined 05:59 dubi0us joined 06:02 pierre_ left, abdef1 left 06:03 dubi0us left
marcusramberg hey, tried installing perl6 and zef from arch AUR, but seems the zef package has invalid sha256sum, and zef-without-alacryd dies with Malformed UTF-8 at line 6 col 412 06:05
06:08 pierre_ joined, dubi0us joined 06:12 dubi0us left
CIAvash[m] marcusramberg: It's easy to install zef manually if you want to github.com/ugexe/zef#manual 06:14
marcusramberg CIAvash[m]: cool, thanks. unfortunately that also fails with the Malformed UTF-8 error. Possibly it's the Rakudo in arch that's to blame. 06:15
gist.github.com/marcusramberg/2b33...71ee5c39f8 06:16
06:16 wamba left
marcusramberg (rakudo-2017.01-1) I see there's another arch package called rakudo-star that is 2017.07-2 06:17
06:18 domidumont joined
lookatme maybe you can report a zef issue 06:21
marcusramberg think I might try rakudobrew instead of arch packages. the rakudo-star package also failed sha512sums 06:22
06:25 domidumont left
CIAvash[m] marcusramberg: The latest version of rakudo on aur is 2017.07, is this the one you installed? aur.archlinux.org/packages/rakudo/ 06:25
06:25 domidumont joined
marcusramberg CIAvash[m]: yes. aur/rakudo 2017.07-1 (52) 06:25
aur/rakudo-star 2017.07-2 (14) failed to install 06:26
06:26 mr-foobar left
CIAvash[m] hmm, I have that rakudo installed and zef installs without any problems for me 06:26
marcusramberg CIAvash[m]: from the zef package? 06:27
06:27 Cabanossi left, pierre_ left
marcusramberg btw aur.archlinux.org/packages/zef/?comments=all seems somone else is also seeing that malformed utf-8 package 06:27
CIAvash[m] Didn't try that one, manually it installs fine
marcusramberg (from the commens)
06:28 Cabanossi joined
marcusramberg hmm, maybe it's my env that's causing the utf-8 error then. 06:28
guess I can open an issue on github zif
06:29 mr-foobar joined 06:32 ShalokShalom_ joined 06:33 pierre_ joined 06:34 xinming left, xinming joined, dubi0us joined 06:36 ShalokShalom left 06:38 nadim joined 06:39 dubi0us left 06:43 eroux left 06:46 ufobat joined 06:50 dubi0us_ joined 06:54 dubi0us_ left 06:57 mr-foobar left
samcv so i have boyer-moore string search working on MoarVM. 07:00
my $string = 'a' x 100000000 ~ 'b'; nqp::index($string, 'aaaaaaaaaaaaaaaaab', 0);
07:00 mr-foobar joined
samcv before 28.0579458s after 2.94111041s 07:00
obviously this is a skewed case that shows off the algorithm
07:03 El_Che left, ijneb left 07:04 wamba joined
lookatme samcv, so `before` is normal search ? 07:05
samcv before is before i added the algorithm
but both i tested with nqp::index operator just to make sure i know what is going on
and this case is more extreme than others since it causes it to skip all the repeated a's 07:06
lookatme oh I see
samcv but brute force it has to iterate through the needle 'aaaaaaaaaaab' on every single part of the haystack 07:07
lookatme yeah, do we have multi string search algorithm ?
samcv but with the algorithm it does not
07:07 xtreak left
samcv what is multi string search algorithm 07:07
07:08 xtreak joined
lookatme use different algorithm for different case 07:08
samcv spectest passes. neat
uh
well we use memmem which does krunth-morris pratt on linux but ONLY if both are flat blob strings of the SAME storage type
lookatme oh 07:09
samcv if one is a strand then it doesn't work, and if the needle and haystack are different bits, one 8 and one 32 then it doesn't work. and reverts to brute force
we didn't implement it ourselves but relied on memmem in either glibc on linux, or we compiled in freebsd's libc version on mac and windows
(i added that like forget when, 4 months ago?) 07:10
not that long ago
lookatme oh
samcv and that just searches within one blob of memory for another piece of memory
which is why it only works for same type of string, and both have to be flat
07:10 abraxxa joined
CIAvash[m] samcv: Is the slides for the "High End Unicode in Perl 6" talk available somewhere? 07:11
lookatme I'm not get it the different type of string
samcv yep 07:12
cry.nu/YAPC-EU-2017
lookatme Does string have different type ?
07:12 xtreak left
samcv start here: cry.nu/YAPC-EU-2017/MoarVM-Internals/#/9 07:12
to learn about moarvm strings
CIAvash[m] samcv: thanks 07:13
samcv from the internals talk. the start of the talk is about collation, so i jumped to the other part
lookatme oh
samcv collation probably should have come last, but
07:14 dubi0us joined 07:18 dubi0us left
andreoss samcv: this link doesn't work for some reason 07:20
07:26 Cabanossi left, mr-foobar left
ufobat both work for me 07:27
07:28 Cabanossi joined, Kyo91 joined 07:30 mr-foobar joined
samcv andreoss, maybe copy it manually? 07:32
and make you sure have javascript enabled
07:33 Kyo91 left
andreoss I guess it uses spdy or something like that which icecat/iceweasel doesn't support 07:33
07:34 nadim left
moritz upgrade to HTTP/2 and other fancy stuff should be only after successful transport negotiation 07:40
works for me in firefox and chromium
07:43 dubi0us joined 07:47 TEttinger left, dubi0us left
samcv cool knuth morris pratt algorithm is now PR'd :) 07:49
just randomly did that cause i was bored
but it turned out to be productive
07:49 mcmillhj joined 07:54 mcmillhj left, rindolf joined
andreoss works in midori though 07:56
07:57 mr-foobar left 08:00 jonas1 joined 08:02 mr-foobar joined 08:03 nattefrost joined 08:08 nadim joined
moritz samcv++ # boredom-driven algorithm implementation :-) 08:09
the true hallmark of a software geek
anybody want to implement <commit> in regexes? You'll earn a special mention in my upcoming book! :-) 08:11
moritz decided not to do it himeself because morphing the language into what I want it to be for the book is a sure way to slip deadlines 08:12
08:12 zakharyas joined
samcv <commit> ? 08:13
moritz if the regex backtracks past a <commit> rule, it'll fail, and recursively fail all calling regexes too 08:14
much like the [ expected || <.panic("oh noes")> ] pattern 08:15
samcv do we not have that yet?
is that something planned NYI?
moritz it's been specced all along, but not yet implemented
it's basically a more declarative way of reporting parse errors in regexes, and I'd really like to include it in my chapter on generating good parse error messages 08:16
but it needs to work first :-)
08:21 El_Che joined 08:22 xtreak joined 08:23 Guest69863 joined 08:24 dakkar joined
andreoss how do i re-export symbols? 08:25
08:33 xtreak left
zengargoyle samcv++ woot faster 08:34
samcv :-)
08:40 Guest69863 left 08:46 xtreak joined
zengargoyle andreoss: what do you mean by 're-export symbols'? 08:46
andreoss the thing :EXPORT should do, i.e make imported stuff exportable 08:47
zengargoyle so B uses C which exports c() into B, and then if A uses B you still want c() in A? 08:49
andreoss yes 08:50
08:50 xtreak left
lookatme This not implement in Perl 6 08:50
andreoss i could re-export classes by augmenting them, is there a work-around for roles? 08:51
08:54 dubi0us joined
zengargoyle i think of B implementing it's own export function so it can export it's own exports and export the c(). 08:55
08:57 jjatria joined 08:58 dubi0us left, nebuchadnezzar left 08:59 nebuchadnezzar joined
zengargoyle how hacky are you willing to try? 09:00
09:05 pierre_ left
zengargoyle this line of questioning reminds me that i still want to know how to Test a Class/Module/Package 's internal functions that are private and not exported. 09:05
you can't test my-bit-of-refactored-code() unless it's actually exported so you can see it.... 09:06
unlike p5 where almost anything is possible if you try hard enough. i guess i don't know the appropriate magic yet. :) 09:08
09:11 aborazmeh joined, aborazmeh left, aborazmeh joined 09:12 pierre_ joined 09:18 dubi0us joined 09:19 pharv_ left 09:20 dubi0us left, pmurias joined 09:27 wamba left 09:31 xtreak joined 09:32 xtreak left 09:36 Sgeo left
samcv hmm i wonder if the spec has an NFKC regex adverb 09:37
09:37 xtreak joined
samcv if anyone saw my unicode talk or saw the slides these font varients cry.nu/YAPC-EU-2017/High-End-Unicode/#/18 when gotten the NFKC forms get compatibility form 09:38
m: "ℍ".NFKC.Str.say
camelia H
samcv even if there isn't one i will probably want to add it 09:39
yeah :nfkc is one option 09:40
so is :nfd and :nfc and :nfg. not sure how nfc would be different than nfc... but eh design specs
09:40 lookatme left
samcv and :nfkd just sounds like ignoremark + nfkc. i think they're exactly the same 09:41
09:42 xtreak left, pmurias left 09:44 dubi0us joined
samcv though i guess you save one step since it's combined into one 09:44
i'm not sure how to add regex adverbs in the grammar 09:46
if someone tells me how i will add it to moarvm 09:47
09:48 dubi0us left
samcv oh nice i just found the `file-icons` package for Atom editor 09:48
it adds logos for each filetype to the tabs. and perl6 files show as a butterfly 09:49
pics: i.imgur.com/M4s6xgW.png 09:50
09:54 cpage__ joined, cpage left, cpage__ is now known as cpage 09:55 dubi0us joined, sena_kun joined, andreoss left 09:56 cpage_ left, Sgeo joined, Cabanossi left 09:57 cpage_ joined 09:58 Cabanossi joined 09:59 dubi0us left
zengargoyle samcv: how is Atom? i am long-long-long time vi/text user and fear GUI like things.... 10:01
samcv i like it
there's a readme for setting it up for perl 6 github.com/perl6/Atom-as-a-Perl6-IDE
i'll have to add this module i found for the icons to the list
10:03 pmurias joined 10:04 ijneb joined 10:06 ShalokShalom_ is now known as ShalokShalom 10:08 llfourn joined
zengargoyle i might have to give it a try... see if my brain can handle it without screaming OMG it's not vim all the time. :P 10:08
10:12 lichtkind left 10:18 dubi0us joined
sena_kun if my role A does role B, it cannot use attributes of B, right? And there is no way to overcome it? 10:19
10:22 dubi0us left 10:25 lichtkind joined
zengargoyle m: my role A { has $.a; }; my role B does A { has $.b; }; my class C does A { has $.c; method foo() { say self.a }; }; my $c = C.new; $c.foo(); 10:25
camelia (Any)
zengargoyle m: my role A { has $.a = "woot"; }; my role B does A { has $.b; }; my class C does A { has $.c; method foo() { say self.a }; }; my $c = C.new; $c.foo(); 10:26
camelia woot
sena_kun oh, self.a actually works, because it's a method... I've tried $! instead. thanks, zengargoyle!
moritz and if you need write access, you can model that through a private "is rw" method, iirc 10:27
zengargoyle role and class are mostly same, there is some difference, but mostly same. 10:29
10:31 aborazmeh left
zengargoyle moritz: i swear i'll actually read my dead tree p6 fundamentals :) 10:32
moritz zengargoyle: though it doesn't talk about roles in that detail 10:37
10:40 wamba joined
moritz Perl 6 OO is a topic that can fill a book on its own :-) 10:41
10:42 Cabanossi left
zengargoyle moritz: nah, that was like an aside... book looks really nice, but i probably read your RSS feed. :) 10:43
10:43 Cabanossi joined
zengargoyle really liked the colored graphs and diagrams and code highlighting and such on multiple flipping-through looks. 10:46
andrzejku moritz, whats happend to your book?:D
moritz andrzejku: to which? 10:48
andrzejku by example
10:48 dubi0us joined
moritz andrzejku: it's now called "Perl 6 Fundamentals", and has been published by Apress 10:48
andrzejku moritz, is it the same? 10:49
stmuk how's the formating in the kindle version? wondering whether to get ebook or physical? 10:50
zengargoyle the dead tree is really pretty looking. :)
moritz andrzejku: apress took over when it was 80% finished
andrzejku moritz, ohh 10:51
moritz andrzejku: so there's a bit more in P6F than in "by examples", and then there's typesetting, proof reading etc
stmuk: I only know the PDF and the dead tree version, not the kindle version, so I can't comment
andrzejku moritz, I still prefer Perl6 by Example :D 10:52
10:52 wamba left, dubi0us left
moritz andrzejku: it describes the book better, but the publisher was afraid it sounded like it contained only examples 10:53
stmuk I wonder if Wendy is bringing any copies to Swiss Workshop 10:54
10:54 jjatria left, jjatria joined
moritz she bought 20 copies in bulk and brought them to TPC in Amsterdam, but I heard they were all sold/given away 10:55
but if she learns there is interest, maybe she places a second bulk order :-)
stmuk: maybe shoot her an email and ask? :-)
zengargoyle that's really cool. :) 10:57
moritz and apress will also publish my Perl 6 Regex book 10:58
likely Q1/Q2 2018
10:58 gregf_ joined
moritz manuscript submission deadline is Dec. 1 for me :-) 10:58
andrzejku moritz, I don't like Apress publisher :P 10:59
moritz, my favorite one is No starch press 11:00
moritz andrzejku: I tried :-) they turned down the idea 11:01
too small of a market, they said
andrzejku moritz, ohh but they announce very cool things 11:02
zengargoyle let's teach them a lesson raar :P
moritz has no hard feelings 11:03
andrzejku moritz, I think it is better to print book undergound
moritz, and then sell them out
moritz I greatly appreciate any publisher who actually takes the time to consider a proposal, and respond
from many publishers I never got any answer
andrzejku: I considered this, but I don't really enjoy publishing as much as I enjoy writing 11:04
zengargoyle i can't even imagine the publish part, so moritz++
andrzejku :) 11:05
www.nostarch.com/gtfo
moritz also having a book published by a major house makes for a *very* nice line on a resume
even if it often doesn't pay off financally
ckraniak I figured out a way to re-export anyway
11:07 pierre_ left
zengargoyle ckraniak: ??? 11:07
11:08 dubi0us joined
stmuk andrzejku: but the dead trees doesn't execute :) 11:08
ckraniak Not great but better than flat nothing 11:09
11:09 markmont left
ckraniak Put use in an arbitrary package 11:09
11:10 dubi0us_ joined
zengargoyle heh, i have this seed of an idea of a P6 module with POD6 that executes and self-documents and is a 'book' of sorts... 11:10
ckraniak So if module C has our sub foo()
zengargoyle so if it compiles and tests OK it's a good book. :) 11:11
ckraniak B can do "package hammerspace { use B::C; }
... our sub foo() is export { B::C::foo(); } 11:12
zengargoyle ckraniak: did you change your nick?
ckraniak ?
It logged me off for a bit yesterday but no
11:12 dubi0us left
zengargoyle ah, nm, somebody had very similar question a short while ago. 11:13
ckraniak I had that question day before. Its why I have an answer now :-)
zengargoyle i thought you were somebody else..... :) 11:14
11:14 dubi0us_ left
zengargoyle how did you do it? somebody else might be interested if you figured something out.... 11:14
ckraniak ... 11:15
see above
Its the functionality I was mostly after for re-exporting
11:18 araraloren joined
zengargoyle ah, gotcha. i think the person/question i was thinking about wanted automagic A uses B (exports c()) and then F uses A and they want c() in F (because A re-exported). 11:19
ckraniak Yeah I don't know that
11:20 zakharyas left
zengargoyle yeah, my bad, it just sounded so similar. 11:20
ckraniak Maybe twiddling with OUR:: could get you there but I did not try that
zengargoyle and i missed your day-ago.
araraloren Perl 5 has similar feature, I think 11:22
zengargoyle yes, i'm pretty sure it's doable if you try hard enough, but there's no magic 'use B <foo> and re-export' syntax or anything that makes it trivial.
ckraniak S-11 talked about a possible :EXPORT tag I think 11:23
Like "use B :EXPORT" 11:24
zengargoyle heh, :EXPORT was what the previous questioner mentioned... :)
i guess they tried it and it didn't work yet.... 11:25
11:25 Cabanossi left
pmurias zengargoyle: re self executing book, you mean something like literate programming? 11:25
ckraniak I tried it also and it does not work 11:26
:-)
zengargoyle pmurias: yeah, just half baked idea since POD and code and #| comments and all that is code and introspectable and it seems neat to have a book that self-tests and self-publishes... 11:28
11:28 Cabanossi joined 11:29 Kyo91 joined
zengargoyle it's just an extension of having 'MAIN("test");" to run tests and 'MAIN("doc"); 11:30
11:32 rindolf left 11:33 Kyo91 left
zengargoyle or Notebooks if we can ever do that sort of thing. 11:33
11:33 dubi0us joined
zengargoyle couldn't figure out how to make $=data actually work.... if POD6 is ever not NYI it seems possible. 11:35
11:37 markmont joined, dubi0us left 11:38 Rawriful joined 11:40 rindolf joined
zengargoyle the making $=data be available by default, i had module that parsed and created data sections but couldn't navigate nqp and settings and just making $=data a thing that just worked. :/ 11:41
pmurias zengargoyle: is POD6 really NYI? I remember using it?
moritz it sorta kinda works, occasionally :-)
zengargoyle pmurias: by the spec..... there's tons of neat things that don't exist yet.
moritz docs.perl6.org is all rendered from pod6 sources, so it exists at least that much 11:42
but integration with the rest of the language could be better
zengargoyle there's like =data
and =alias
where you can have your <DATA> sections named like many p5 modules and just get at them with $=data<section> 11:43
11:44 dubi0us joined, skids joined
pmurias wonders what would encourage more people to work on docs.perl6.org 11:45
on the content specifically
11:46 jjatria left
zengargoyle nice deltas so you don't have to re-read them over and over and over. 11:47
some better than "use github and clicky at things" instructions/workflow.
and easy 'perl6 someprog my-doc' so you can proof your edits. 11:48
i need to be able to do a quick look at all of my L<> I<> B<> yadda POD formatting to make sure it's decent and working before thinking about a PR request. 11:52
modulo spelling mistakes or such...
11:52 dubi0us left, skids left
pmurias zengargoyle: by nice deltas you mean the sort of thing you have on say wikipedia with the changes highlighed in the rendered document rather then a diff of the source code? 11:53
zengargoyle pmurias: yeah, sounds about right.... i just know i really don't want to go and read the docs for the N-th time to try and notice that foo() has now been documented. 11:54
they could have the answer now, but my brain will go "i've read this already" and just skip over it even if there's a new paragraph with what i wanted to know. 11:56
11:56 Cabanossi left 11:57 raschipi joined 11:58 Cabanossi joined 11:59 mr-foobar left 12:00 mr-foobar joined
zengargoyle pmurias: maybe my ideal is along the lines of perl5delta, where you read a big long thing that tells you all the new things. 12:02
or even a weekly or monthly like diff of docs...
zengargoyle guesses github would show me if i tried hard enough. :) 12:03
pmurias zengargoyle: hand crafting a list of changes for the docs doesn't seem an optimal use of time 12:04
zengargoyle yeah, just pondering. i haven't figured out the really easy 'just start vim and edit and fix' vs the pointy-clicky. 12:06
i guess i'd like it like "your patch is good, but update the CHANGES or Contributors section" 12:08
so you'd commit "some doc thingy" and CHANGES:"documented this thingy" at the same time. 12:09
and then there's the document vs spec thing... i have quite a few cut-n-paste snippets of wisdom, but should they go in documentation? 12:12
are they spec? will they change?
pmurias zengargoyle: having people update a CHANGES file seems like an extra barrier 12:13
zengargoyle yeah... it's like the new ecosystem addition thing i see now where there is clicky-these-checkboxes that makes me fear adding something new to ecosystem. 12:15
12:15 sftp left 12:16 sftp joined
zengargoyle has totally had the "add yourself to contributor's list" as patch rejection. 12:16
and a good "this is how to fix docs" doc would be handy. some expectations and desired things vs "just click the edit button". 12:18
nine Well the Unicode consortium may have not anticipated the use in programming languages all that well 12:19
zengargoyle and suffer the wrath of the perl 6 gods if you get it wrong.
12:20 xtreak joined
pmurias nine: ? 12:21
12:21 xtreak left
zengargoyle no one expects the perl 6 unicode inquisition. 12:22
12:23 xtreak_ joined 12:28 xtreak_ left
nine pmurias: sorry, disregard :) 12:29
12:29 mr-foobar left, zakharyas joined
zengargoyle pmurias: i guess if there was like a p6hacking doc that laid out a workflow with git/hub/whatever and said "add your change", "good commit message", and "preview/check your stuff", and 'push'. 12:30
i'd be more up to writing docs. i don't want to fumble through. 12:31
12:31 mr-foobar joined
zengargoyle p5 hacking was 'read perlhack' and email patch. i'm sure git changes that a bit. but a checklist or workflow or explicit direction and a set of expectations is better than "click the edit button"... IMHO 12:34
nine zengargoyle: I'm sure you are aware of rakudo/docs/ChangeLog? 12:36
zengargoyle perldoc perlhack --- This document explains how Perl development works. It includes details
nine zengargoyle: would you be willing to write such a document? 12:37
zengargoyle maybe? i'm in the midst of figuring out how to use 'hub' and other git thingys to just hack hack hack and push a PR. 12:39
zengargoyle hates pointy-clicky-thingns.... not the best for that. 12:41
raschipi zengargoyle: Do you know git? Github doesn't take away the git interface. You can clone the repo locally and then push to the github repo...
All without clicking a single time.
zengargoyle raschipi: i have commit, i'm just not gonna use it except for the most minor of things. :) 12:42
12:42 Cabanossi left
zengargoyle i'd still rather do a PR for something and let others check or approve than just commit myself. 12:43
12:43 Cabanossi joined
zengargoyle i think the 'hub' program makes fork/fix/PR an easy process, but i haven't quite tried and worked everything out just yet. 12:44
raschipi I see. You could at least commit to your own ghithub fork and then only have to click to send the pull request. 12:45
12:49 mcmillhj joined
Geth doc: 4c3df89574 | rafaelschipiura++ (committed by Zoffix Znet) | doc/Language/syntax.pod6
Regarding separators in if/elsif/else blocks. (#1439)

  * Update syntax.pod6
  * Added back in mention of optional semicolons
  * Restored original wording
... (10 more lines)
12:49
zengargoyle raschipi: yeah, i have done so... my 'easy' is `diff ../perl.orig .` | mail -s [email@hidden.address] like, not OMG click buttons. 12:50
raschipi Thanks Zoffix. 12:52
12:53 dubi0us joined
zengargoyle and either way, i think an actual 'perl6hack' sort of doc that describes some best workflow types and expectations that anyone (even the 12 year old girl) could follow and get a thumbs-up would help in the "get people to write documentation". 12:53
12:53 Guest69863 joined, salva joined
raschipi zengargoyle: I think POD6 has to be implemented toghether with that, doesn't it? Because having the tools but nothing to display with them would be a problem... 12:55
12:56 nattefrost left 12:57 dubi0us left 12:58 wamba joined, mr-foobar left 13:00 mr-foobar joined
zengargoyle yeah, that's the at least how to view your POD as text to make sure you didn't do anything terribly stupid before you commit or PR, because who knows actually how the HTML is going to render in the end. 13:00
13:04 cdg_ joined
nadim zengargoyle: Apropos serialization and remoting data. As I wrote yesterday the biggest issue is re-creating objects on the receiving side, it's dead slow. I may be doing something wrong though. Another issue is that once serialized the data can be over the limit of a one packet size, so we also need a system to split packets, send them, and put them together in the right order. I think there's nothing for that, so it must be build from 13:11
yoleaux 15 Aug 2017 23:56Z <zengargoyle> nadim: thanks, and good night.
nadim scratch.
timotimo: ready for some testing? i need some feedback. 13:13
13:14 domidumont left, dubi0us joined
zengargoyle nadim: lol, i'm totally quilty of "my data fits in UDP packet". :) 13:17
13:17 pmurias left
zengargoyle s/quilty/guilty/ 13:18
nadim :)
13:18 ryu0 left
zengargoyle chuckles that my UDP packets were JUMBO so 9k :P 13:20
13:23 dubi0us left 13:28 Cabanossi left, Cabanossi joined, dubi0us joined, skids joined, xinming left 13:29 mr-foobar left, andrzejku left, pierre__ joined 13:30 mr-foobar joined 13:31 raschipi left
zengargoyle nadim: fatal flaw in many things is thinking that UDP is/will be better than TCP. YMMV. 13:32
you will eventually end up re-implementing TCP on your UDP and doing it poorly. most likely... :)
there are exceptions.... 13:33
Ulti timotimo: yeah they also then went ahead and used the lang anyway :D 13:34
but unfortunately are having immediate problems with OpenSSL :(
www.reddit.com/r/programming/comme...h=1fc32902
13:37 dubi0us left
Ulti its kind of lame that https is almost certainly a big thing people will want to do but making bindings to openssl is always a PIA even the Perl 5 module often gets wedged just because of system specific weirdness 13:37
13:37 pierre__ left
Ulti I think they might be on windows given they're saying DLL 13:37
which is an extra bag of fun 13:38
timotimo huh, but we do have openssl don.t we? 13:39
Ulti yeah
but its failing to install for them
timotimo urgh
zengargoyle warns the world not to use openssh for high speed large data transfer.
Ulti in two different ways :/ which is hardly the most reassuring intro
timotimo sorry nadim, my productive output has been miniscule over the last days, i'm not sure how much i can look into it 13:40
it's true that using google.com to test https isn't the best of ideas 13:42
Ulti yeah they are also having issues even if they dont test :S which is next level uhoh 13:43
timotimo it definitely is
13:43 Guest69863 left, MilkmanDan left
Ulti does Rakudo* come with this stuff? 13:44
thats perhaps a win
13:44 MilkmanDan joined
zengargoyle explains that openssh has it's own buffering scheme that bypasses the OS TCP buffering scheme and will not fill up a 10Gbs pipe over long banwith delay paths.... use the patched hpn-ssh, or Grid-FTP. 13:45
Ulti who are you explaining to? 13:46
zengargoyle general dis on openssh :) 13:47
13:48 dubi0us joined
zengargoyle if you go fast and long distance, openssh will bite you. 13:48
if you are slow or close, you'll never notice, so openssh ahoy! 13:49
Ulti if you want to go fast you want to use one of these things that opens a tonne of TCP connections and uses all of them 13:50
zengargoyle Ulti: yes, but no.
Ulti if its local network point to point I usually tar netcat and dont even bother with compression
zengargoyle 10g on single connection over long distance (continent-size-distance) is entirely possible, just not with openssh, 13:51
timotimo ah they couldn't use openssl because of work network requiring proxies and such 13:52
zengargoyle it's bandwith delay product and openssh buffers not being smart. it's tuned for local network or slow pipes.
Ulti timotimo: orly 13:53
10g isnt much data though
try 10TB
zengargoyle you need enough buffer to fill 2x pipe. so it gets to the end and you get an ACK. 13:54
Ulti wanders off because he should be working not having fun ;P
zengargoyle plain openssh doesn't have big enough buffer to do 10G halfway around the world.
Ulti: that's 10Gb/s continuous machine-to-machine around half the globe. openssh ain't gonna do that. 13:57
13:57 raschipi joined, Kyo91 joined
zengargoyle it doesn't have the buffer space to acomplish such a feat. :) 13:57
13:58 mr-foobar left 14:00 mr-foobar joined
zengargoyle goes don't get me started on MS TCP stack brokeness. :P 14:01
14:02 ggoebel left
zengargoyle spent a few years doing high performance research computing networking and constantly curses my plebian AT&T consumer DSL. :) 14:04
14:06 domidumont joined 14:22 wamba left, lowbro left, dubi0us left 14:25 dubi0us joined 14:28 dubi0us left 14:31 sftp left 14:32 sftp joined 14:35 araraloren_ joined, dubi0us joined 14:38 araraloren left 14:39 dubi0us left 14:40 TimToady left, Cabanossi left 14:41 TimToady joined 14:43 Cabanossi joined 14:53 wamba joined 14:55 dubi0us joined 14:58 mr-foobar left 15:00 dubi0us left 15:01 mr-foobar joined 15:02 dubi0us joined 15:05 Kyo91_ joined, Kyo91_ left 15:06 awwaiid left, Kyo91 left 15:21 andrzejku joined, ck joined, ck is now known as Guest27368 15:22 wamba left, ckraniak left, ckraniak joined 15:23 Skarsnik joined
Skarsnik Hello 15:24
nadim, did you resolve your issue with has/HAS in ddt?
15:25 Guest27368 left 15:27 mr-fooba_ joined, andrzejku left 15:28 khw joined 15:29 andrzejku joined
b2gills .tell evanm TimToady recently made Perl 6 Grammars print an error message if it fails to .parse github.com/rakudo/rakudo/commit/9501edae4f 15:29
yoleaux b2gills: I'll pass your message to evanm.
15:29 mr-foobar left 15:36 lizmat left, lizmat joined
mspo yay 15:37
I'm glad grammars improves
it's a big feature and people want it *tight*
15:40 nadim left 15:41 basket` left, Cabanossi left 15:42 troys joined 15:43 Cabanossi joined 15:46 ggoebel joined
TimToady m: sub foo (Int --> ) { say 'ok' }; foo(10) 15:51
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed return value
at <tmp>:1
------> 3sub foo (Int --> 7⏏5) { say 'ok' }; foo(10)
TimToady m: sub foo (Int --> Nil) { say 'ok' }; foo(10)
camelia ok
TimToady geekosaur: ^^^ 15:52
you have to be explicit about returning nothing
15:53 cdg_ left, cdg joined 15:58 cdg left 15:59 araraloren_ left 16:00 abraxxa left 16:02 devmikey joined 16:05 raschipi left
sena_kun now the curious one: hwo to shuffle a list? 16:06
timotimo you .pick(*) it 16:07
sena_kun it won't repeat values. great, thanks. 16:08
TimToady you use roll(*) if you want an infinite list with repeats
as in, rolling an infinite number of dice 16:09
sena_kun I know it is infinite, but I can slice by the list size to get a shuffle and it works perfectly.
or just cut it with `.list` or something.
16:23 nadim joined
TimToady .roll won't give you a shuffle though, since it can repeat 16:23
yoleaux e.g. .roll 1d12
mspo wait is there a D&D bot in here? 16:26
sena_kun .roll 2d6
yoleaux 2 + 1 = 3
16:26 zakharyas left
sena_kun .roll 1d12 16:26
yoleaux 10
mspo crit fail 16:27
sena_kun yeah, 3 is not good. 16:28
mspo m: .roll 1d12
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3.roll7⏏5 1d12
expecting any of:
infix
infix stopper
statement end
statement modifier
statement modif…
sena_kun but 10/12 is better.
16:28 cdg joined, zakharyas joined
sena_kun m: (^12).roll(1) 16:28
camelia ( no output )
sena_kun m: say (^12).roll(1)
camelia (2)
sena_kun ugh. 16:29
not my day.
lizmat m: (^12).roll # 1 is default and returns a scalar value
camelia ( no output )
mspo m: say (1,2,3,4,5).roll(2)
camelia (1 5)
lizmat m: say (^12).roll # 1 is default and returns a scalar value
camelia 11
lizmat m: dd (^12).roll # 1 is default and returns a scalar value
camelia 8
mspo m: say (1,2,3,4,5).roll(2).WHAT 16:30
camelia (Seq)
mspo m: say (1,2,3,4,5).WHAT
camelia (List)
lizmat if you specify a value, you will always get a Seq
mspo should there be sigils for lists and bags and seqs and stuff? 16:33
16:35 dubi0us left 16:36 dubi0us joined
b2gills @ is for Positional values like a List or a Seq, and% is for Associative values like a Set or a Bag 16:36
my @a := (1,2,3); say @a.^name
m: my @a := (1,2,3); say @a.^name
camelia List
mspo m: my @a = (1,2,3); say @a.WHAT 16:37
camelia (Array)
mspo m: my @a := (1,2,3); say @a.WHAT
camelia (List)
b2gills s/' or a Seq'//; # actually Seq isn't a Positional, just ignore that part 16:38
mspo is a set positional?
b2gills m: say Set.^roles 16:39
camelia ((Setty) (QuantHash) (Associative))
b2gills a Set is more like a Hash than an Array, that is why you often have to call `.keys` on it 16:40
Positional is for ordered values that can be accessed at random indexes (so not Seq) 16:41
A Set is unordered 16:42
16:46 dakkar left 16:48 raschipi joined 16:50 nadim left 16:51 robertle joined
AlexDaniel say roll ^12 16:52
evalable6 ()
AlexDaniel :/
say roll 2, ^6
evalable6 (2 2)
AlexDaniel say roll 2, ^6
evalable6 (5 0)
AlexDaniel here's your D&D bot
sena_kun say roll 1, ^12 16:53
evalable6 (0)
sena_kun life is scary.
AlexDaniel why so? 16:54
mspo AlexDaniel: rolling 0? :)
sena_kun :)
raschipi say roll 1, ^100
evalable6 (90)
mspo m: say roll 2, ^5 + 1
camelia (2 2)
mspo m: say roll 2, ^5, + 1 16:55
camelia (1 ^5)
mspo m: say (roll 2 ^5) + 1
camelia one(1, 1)
Skarsnik m: say roll 1, 1.20;
camelia (1.2)
Skarsnik m: say roll 1, 1..20;
camelia (10)
raschipi say ^5 + 1
evalable6 1..^6
mspo m: say 1 + roll 2, ^5
camelia 3
mspo m: say 1 + roll 2, ^5
camelia 3
mspo m: say 1 + roll 2, ^5
camelia 3
mspo huh
raschipi + knows how to operate on ranges, but not on seqs 16:56
AlexDaniel say roll 2, ^6 +1
evalable6 (6 4)
16:56 Cabanossi left
raschipi m: for ^10 {say roll 2, ^6 +1} 16:57
camelia (1 3)
(6 1)
(1 4)
(3 5)
(1 5)
(2 6)
(1 1)
(4 6)
(3 4)
(3 5)
mspo m: (1 .. 6).roll(1)
camelia ( no output )
mspo m: (1 ... 6).roll(1)
camelia ( no output )
raschipi m: (1 ... 6).roll(1).say 16:58
camelia (3)
mspo yeah there it is
16:58 Cabanossi joined
mspo m: (1 ... 6).roll(1).Int.say 16:58
camelia 1
AlexDaniel say roll 2, (1…6)
evalable6 (1 1)
b2gills m: say 1 X+ roll 2, ^5
camelia (3 2)
raschipi m: say ^5 + 1 == 1..^6 16:59
camelia True
AlexDaniel say roll 2, ‘⚀’..‘⚅’
evalable6 (⚂ ⚂)
TimToady m: say roll 2, 1 + ^6 17:00
camelia (4 6)
TimToady m: say roll 5, 1 + ^6
camelia (3 6 3 1 6)
TimToady hmm, I'll go for a full house
m: say roll 5, '⚀' .. '⚅' 17:01
camelia (⚃ ⚅ ⚃ ⚁ ⚅)
TimToady I'll go for a full house again :)
m: say roll 1, '⚀' .. '⚅' 17:02
camelia (⚂)
mspo TimToady: good use of the dice
TimToady m: say roll 1, '⚀' .. '⚅'
camelia (⚃)
mspo there are cards in utf8, I think
TimToady got it!
17:02 ggoebel left
TimToady indeed, and they're used in rosettacode examples 17:02
17:02 setty1 joined
mspo m: say 🂡 ... 🂮 17:02
camelia 5===SORRY!5===
Argument to "say" seems to be malformed
at <tmp>:1
------> 3say7⏏5 🂡 ... 🂮
Bogus postfix
at <tmp>:1
------> 3say 7⏏5🂡 ... 🂮
expecting any of:
infix
infix stopper
p…
mspo aww
TimToady quotes needed
mspo m: say "🂡" ... "🂮" 17:03
camelia (🂡 🂢 🂣 🂤 🂥 🂦 🂧 🂨 🂩 🂪 🂫 🂬 🂭 🂮)
mspo love that
m: say "🂡" ... "🃞"
camelia (🂡 🂢 🂣 🂤 🂥 🂦 🂧 🂨 🂩 🂪 🂫 🂬 🂭 🂮 🂯 🂰 🂱 🂲 🂳 🂴 🂵 🂶 🂷 🂸 🂹 🂺 🂻 🂼 🂽 🂾 🂿 🃀 🃁 🃂 🃃 🃄 🃅 🃆 🃇 🃈 🃉 🃊 🃋 🃌 🃍 🃎 🃏 🃐 🃑 🃒 …
TimToady hope your game wants 🂬
Skarsnik thx hexchat for showing me only square xD
mspo m: say "🂡" ... "🃞".roll(5)
camelia (🂡 🂢 🂣 🂤 🂥 🂦 🂧 🂨 🂩 🂪 🂫 🂬 🂭 🂮 🂯 🂰 🂱 🂲 🂳 🂴 🂵 🂶 🂷 🂸 🂹 🂺 🂻 🂼 🂽 🂾 🂿 🃀 🃁 🃂 🃃 🃄 🃅 🃆 🃇 🃈 🃉 🃊 🃋 🃌 🃍 🃎 🃏 🃐 🃑 🃒 …
AlexDaniel .tell moritz 🙏 unicode in irc log
yoleaux AlexDaniel: I'll pass your message to moritz.
Skarsnik not sure if this could show properly on a gtk2 client 17:04
17:04 zakharyas left
raschipi m: say ('🂡' .. '🂮').List.elems #Hum, something is wrong. 17:04
camelia 14
mspo TimToady: a knight?
TimToady .u 🂬
yoleaux U+1F0AC PLAYING CARD KNIGHT OF SPADES [So] (🂬)
17:04 zakharyas joined
raschipi m: say ('🂡' .. '🃞').List.elems 17:04
camelia 62
mspo oh crap extra cards!
TimToady yup
raschipi Aren't there 52 cards in a deck?
mspo depends on the deck 17:05
germany uses cups and bells and stuff
TimToady not in a Pinochle deck :)
mspo so we need a sequence that skips knights and jokers at least
TimToady Rook cards have 14 per suit too
raschipi I imagined it wasn't a standard deck. Is this defined by Unicode? 17:06
TimToady Flinch cards have 15
mspo ranguard: yeah
raschipi: yeah
17:06 ab6tract joined
raschipi u: 🂯 17:06
unicodable6 raschipi, U+1F0AF <reserved> [Cn] (🂯)
ab6tract o/ 17:07
mspo method skip(--> TODO)
raschipi u: 🂿
unicodable6 raschipi, U+1F0BF PLAYING CARD RED JOKER [So] (🂿)
ab6tract so i have been playing around with Evan Miller's proc async example
my apologies if this has been discussed (to death) before, but
gist.github.com/ab5tract/20d7a03e5...b5e0174a95
Skarsnik hm, what font are you using?
TimToady m: say ("🂡" ... "🃞").grep: *.uniname.match(/KNIGHT/).not 17:08
camelia (🂡 🂢 🂣 🂤 🂥 🂦 🂧 🂨 🂩 🂪 🂫 🂭 🂮 🂯 🂰 🂱 🂲 🂳 🂴 🂵 🂶 🂷 🂸 🂹 🂺 🂻 🂽 🂾 🂿 🃀 🃁 🃂 🃃 🃄 🃅 🃆 🃇 🃈 🃉 🃊 🃋 🃍 🃎 🃏 🃐 🃑 🃒 🃓 🃔 🃕 …
AlexDaniel u: playing card
unicodable6 AlexDaniel, U+1F0A0 PLAYING CARD BACK [So] (🂠)
AlexDaniel, U+1F0A1 PLAYING CARD ACE OF SPADES [So] (🂡)
b2gills There is a "\c[PLAYING CARD TRUMP-21]"
unicodable6 AlexDaniel, 83 characters in total: gist.github.com/dea6aa7044280592aa...e51e074e64
AlexDaniel b2gills: right after PLAYING CARD FOOL
ab6tract I found it a bit surprising that you cannot cleanly combine Proc::Async stdout/stderr with a whenever block 17:09
mspo m: my $uscards = ("🂡" ... "🂫"); $uscards.append("🂭" ... "🂮"); say $uscards; 17:10
camelia Cannot resolve caller append(Seq: Seq); none of these signatures match:
(Any:U \SELF: |values is raw)
in block <unit> at <tmp> line 1
mspo m: my $uscards = ("🂡" ... "🂫"); $uscards.push("🂭" ... "🂮"); say $uscards; 17:11
camelia Cannot resolve caller push(Seq: Seq); none of these signatures match:
(Any:U \SELF: |values is raw)
in block <unit> at <tmp> line 1
mspo okay nevermind
b2gills m: my $uscards = ("🂡" ... "🂫").Array; $uscards.append("🂭" ... "🂮"); say $uscards;
camelia [🂡 🂢 🂣 🂤 🂥 🂦 🂧 🂨 🂩 🂪 🂫 🂭 🂮]
AlexDaniel ab6tract: I'm not entirely sure what you are trying to say. Why do you have to tap? For example, this is how I'm using it: github.com/perl6/whateverable/blob...#L175-L195
ab6tract AlexDaniel: hmm, without that line I get a broken Promise 17:13
"To avoid data races, you must tap stdout before running the process"
timotimo you put $proc.start before the $proc.stdout lines?
ab6tract AlexDaniel: I see in your example that react is not within a start block. I didn't realize that this is possible
AlexDaniel ab6tract: yes, so “whenever $proc.stdout” goes before “whenever $proc.start” I think
ab6tract sorry? i declare the react block before i await $proc.start 17:14
AlexDaniel ab6tract: that's the point. It will block until all promises are kept, or until you call “done”
ab6tract oh, ok now I'm following you 17:15
timotimo the react will first run the code "inside it", so it's quite possible that you're actually legit racing there 17:16
AlexDaniel the race that I see is that it can “$proc.start” before “whenever $proc.stdout” 17:17
which is what XXX comment talks about, I guess 17:18
and maybe which is why "$proc.stdout.tap" is there
ab6tract so much nicer
gist.github.com/ab5tract/20d7a03e5...b5e0174a95
AlexDaniel ab6tract: I think you can also omit “done” in this case. It's there in my example because of “whenever Promise.in($timeout) { … }” 17:19
ab6tract: so I want it to bail out from react even though the timeout promise is not kept yet
17:20 ash_gti joined, domidumont left
AlexDaniel hm, too bad you can't write “whenever $proc.start;” 17:21
but “whenever $proc.start {}” is not too bad anyway 17:22
ab6tract AlexDaniel: at least it recognizes '{ }' as a bare block there, rather than mistaking for a hash like it can for signatures
AlexDaniel notices how his message use exactly the same wording to talk about opposite things. D'oh
ab6tract: yes, this is what I was thinking too :)
timotimo that's because it's a method call, no?
17:22 ufobat left
raschipi m: my $proc = Proc::Async.new(:r, 'echo','Man is amazing, but he is not a masterpiece'); react {whenever $proc.stdout { say "OUT: $_"; }; $proc.start} 17:23
camelia Proc::Async is disallowed in restricted setting
in sub restricted at src/RESTRICTED.setting line 1
in method new at src/RESTRICTED.setting line 32
in block <unit> at <tmp> line 1
AlexDaniel timotimo: sorry?
timotimo you mean "whenver $proc.start { }"? 17:24
b2gills ab6tract: start, and react are statement prefixes, so your previous code could have been `start react whenever $proc.stdout { say "OUT: $_"; }`
ab6tract b2gills: good point, they thunk
AlexDaniel raschipi: I'm not entirely convinced that this is a good idea
ash_gti so, I’m curious why two pretty similar scripts have vastly different runtimes, I can make some guesses but the difference is pretty drastic 17:25
raschipi AlexDaniel: I'm not too, I was just goofing around.
Skarsnik ash_gti, example? ^^
b2gills `react` doesn't return anything, it just blocks until you get a `done` called
ash_gti `time yes | head -n1000000 | perl6 -pe 's/y/n/‘` finishes in 2 minutes, but `time yes | head -n1000000 | perl6 -e 'for $*IN.readchars { .subst("y", "n").print }’` finishes in 82 ms (according to the --profile)
AlexDaniel raschipi: it is assuming that .stdout supply is going to finish around the same time the process will finish too, and I'd love to see a written guarantee for this stuff somewhere… until then, whenever $proc.start {} :)
ab6tract AlexDaniel: so are there any differences between `react` and `start react` ?
AlexDaniel ab6tract: react blocks 17:26
b2gills I'm not really fond of `start react` by the way, it is a misuse of Promise.start
timotimo ash_gti: check the output, i believe the output differs between both scripts
ab6tract solves me problem :D
*my
17:26 grondilu joined
grondilu irclog.perlgeek.de/perl6/2017-08-15#i_15016321 <= rakudo-js will target wasm? Is that official? 17:27
raschipi grondilu: No, pmurias already corrected me
grondilu is disappointed
ash_gti ah sorry, I pasted the wrong second one
b2gills I think there could be a corollary of `start` called `kickoff` that does `Thread.start` in the same way that `start` calls `Promise.start` 17:28
ab6tract b2gills: i can dig it
AlexDaniel ab6tract: start react is just a regular start block with react in it
ash_gti `time yes | head -n1000000 | perl6 -e 'for $*IN.readchars { .subst("y", "n", :g).print }’` < still finishes in .72 seconds
ab6tract AlexDaniel: yeah but ISTR there was a point when react could only exist within a start 17:29
timotimo OK, but then that's only correct if you use "yes" and not, for example "yes yesyes"
i.e. only because yes spits out a single y per line
b2gills `start` returns a Promise, if you aren't going to use the Promise why are you indirectly calling `Promise.start`
ab6tract but maybe i have a wire crossed and am thinking of whenever only being allowed in a react :)
Skarsnik did you try with $*IN.lines ?
ash_gti using $*IN.lines is the same time as the first example 17:30
or really close to it
AlexDaniel ab6tract: well, if you want the processing to happen in parallel while you do something else, then sure? Like my $p = start react { … }; say ‘OK, while I'm doing the work, wanna play chess?’
b2gills whenever is also allowed in a `supply` block
m: my $p = Promise.in(1); say Thread.start({react whenever $p {done}; say 'done'}); say 'going'; await $p 17:32
camelia Thread #6
going
done
ab6tract AlexDaniel: Right, I am feeling more convinced that I was mistaken. Still, I thought it `react { }` alone used to throw an exception. Like I said, maybe I am misremembering.
17:33 koto joined, koto left
ab6tract b2gills: nice one 17:33
17:34 sena_kun left
AlexDaniel honestly, I don't entirely understand react/whenever. In a way, this gives me a possibility to do synchronous processing of asynchronous events (kind of), but is it actually what I need? For example… 17:34
17:35 ChoHag left
AlexDaniel If I do 「whenever $proc.stdout { #`{do something} };」, then why does it have to interfere with 「whenever $proc.stderr { #`{do something else} };」 ? 17:35
17:36 PerlMonger joined
PerlMonger Hey guys 17:36
b2gills For a second I thought there was debugging in Thread.start; totally forgot about the call to `say` before it
AlexDaniel so if I block for a few sceonds on stdout processing, the rest is going to wait? Do I *really* want that?
PerlMonger I'm having trouble running my perl6 files using the "perl6" command
But if I run the perl6 executable, I can run code inside of there 17:37
AlexDaniel PerlMonger: interesting! Are there any errors shown?
PerlMonger Yes, let me try again one sec
bash: perl6: command not found 17:38
mspo PerlMonger: do you mean it doesn't work via perl6 foo.pl6 or #!/usr/bin/perl6 ? 17:39
PerlMonger: try the full path
AlexDaniel PerlMonger: you probably want to a path to your perl6 executable into your $PATH, that's if you're on linux
PerlMonger Okay, I'll try that now
ilmari any reason we're using the texas camelia in /topic? 🦋 existss… 17:41
17:41 lucasb joined
mspo p6: say 3; 17:42
camelia 3
b2gills I personally have a symbolic link /home/brad/bin/perl6 that points to /opt/rakudo/bin/perl6
mspo m: say 3;
camelia 3
AlexDaniel ilmari: it exists now, but it didn't for a looong time 17:43
ilmari: interestingly, it says “UTF-8 is our friend!” :) 17:44
PerlMonger I've now used "Open With" and found the perl6 executable in the correct directory, and tried to use that to run my file, but now nothing happens 17:46
b2gills If you are on Windows it will either not open a terminal window, or it will open a terminal it and close it as soon as it is done. which can happen quickly 17:48
17:48 mcsnolte joined
PerlMonger I am on Debian 17:48
b2gills Even more reason for it to not open a terminal window 17:49
ash_gti so, trying a few different things, `perl6 -e 'for $*IN.readchars.lines { .subst("y", "n").say }'` is about 1 second, `perl -e 'for $*IN.lines { .subst("y", "n").say }'` is about 20 seconds; however, just doing: perl6 -pe ’s/y/n/‘ takes 2 minutes
b2gills Windows has a bit that tells the computer if it is a terminal program or a gui program
* Executables on Windows 17:50
PerlMonger How would you reccomend I run my perl6 script without opening in terminal? Other than copy pasting the code into a running perl6 executable, of course :) 17:51
17:53 jonas1 left
mspo what do you want to happen? 17:53
b2gills xterm -e perl6 -e 'say "hi"; sleep 3' 17:54
ab6tract AlexDaniel: I suppose the solution to the moment where you want something different, you can spawn multiple react blocks?
raschipi If the 'perl6' command is workig in the command line, you can use the '#!/usr/bin/env perl6' trick.
tojo PerlMonger: Atom code editor has neat Perl6 plugin on which you can execute code "without" opening the terminal just using hotkeys. Assuming that you are just playing with Perl 6 now 17:55
17:55 zakharyas left
mspo where does that output go? 17:55
timotimo ab6tract: not sure if it helps, but you can also "whenever start { } { }" inside react 17:56
i haven't followed the exact problem closely
PerlMonger Is it called language-perl6 by any chance, tojo?
AlexDaniel ab6tract: or just use taps instead. react is very safe in a sense that you're not going to access stuff from different threads, which is great. So it's a wonderful thing to do by “default”, maybe. But I'm looking at some places where I use react, and I'm not entirely sure that it is what I wanted to write. 17:57
tojo PerlMonger: that should be it, there is only one or two plugins available 17:58
PerlMonger raschipi: Nope, doesn't work :P
b2gills you can think of `react {}` as just an extension of the `supply {}` feature
PerlMonger Okay, thanks guys!
Will play about with this and be back later 17:59
17:59 PerlMonger left
perlpilot Perl 6 would *so* benefit from a concurrency book right about now. There seems to be quite a few people playing with Promise, Supply, and Channel (even if only by virtue of using one of the async modules) and not enough "easy knowledge" to point them in the right direction. 18:03
(unless you count asking on #perl6 as "easy")
18:06 troys is now known as troys_ 18:07 itaipu joined 18:08 Kyo91 joined
ab6tract AlexDaniel: oh, for sure 18:10
taps are great 18:12
timotimo perlpilot: we should oint people strongly at jnthn's presentations (both videos and slides) 18:13
18:15 xinming joined 18:16 ChoHag joined, ab6tract left
ugexe a concurrency book would be nice, although when it doesn't have to be sprinkled with `* except in 6.d it does this` 18:17
mspo it's like you need a wiki :) 18:19
El_Che videos --how fantatisc the talk may be-- don't replace docs. You need to be very motivated to watch many of them 18:24
timotimo that's why i also pointed out the slides
they are also good on their own, i'd claim
El_Che not a fan of slides without context (although john's slides for the perl6 intro are great) 18:25
I enjoyed those a lot 18:26
18:27 ChristopherBotto joined
raschipi Do you have a link? 18:28
El_Che let me look them up
18:28 cdg_ joined, ggoebel joined
El_Che www.jnthn.net/papers/2015-spw-perl6-course.pdf 18:29
18:30 nadim joined
raschipi Thanks 18:30
18:32 cdg left, cdg_ left
El_Che raschipi: there is quite good stuff in the parent dir: www.jnthn.net/articles.shtml 18:33
I saw the talks of FOSDEM 2014+2015 and NLPW 2014, and of course with a speaker like jnthn providing context it's a lot nicer 18:34
18:38 cdg joined, wamba joined 18:42 Cabanossi left, cdg left, espadrine joined 18:43 Cabanossi joined 18:47 ck joined, ck is now known as Guest43710 18:49 ckraniak left 18:50 ckraniak joined 18:54 Guest43710 left
ash_gti is using perl6 -pe ‘1` pretty similar to doing: `for $*IN.lines { say 1; }` ? or are the command line options doing something fundamentally different? 19:01
Skarsnik hm 19:02
ash_gti I guess actually running perl6 -pe 1 doesn’t work though, hmmm 19:03
geekosaur it should be the same as for $*IN.lines { 1; say $_ } 19:04
19:07 troys_ is now known as troys
raschipi ash_gti: It works for me... 19:08
19:09 itaipu left 19:10 ash_gti left 19:14 ChristopherBotto left
Skarsnik m: say &1 19:15
camelia Nil
19:25 itaipu joined
[Coke] (doc examples that are OS specific) instead of marking "doesn't work on windows", perhaps noting "works on OS X" or "linux", e.g.) 19:30
geekosaur problem is, people reporting it may not be able to say that 19:32
they know it fails on platform X, they may not be in a positon ot test on Y or Z
19:32 ZofBot left, ryu0 joined 19:33 ZofBot joined, ChanServ sets mode: +v ZofBot
geekosaur the person triaging it is the one who can check working/not working pltforms 19:33
19:37 cdg joined
El_Che It looks like perl6 conquered Switserland: act.perl-workshop.ch/spw2017/schedu...2017-08-26 19:37
19:38 ash_gti joined 19:41 cdg left 19:45 TEttinger joined 19:46 NeuralAnomaly left
nadim Skarsnik: I must admit that I don't remember a issue with has/HAS, what I was, if I recal well, was surprised how they looked like. I will write a test and check it again, thank you for reminding me. 19:46
19:46 NeuralAnomaly joined, ChanServ sets mode: +v NeuralAnomaly
nadim I just receive a very surprising error when using Terminal::Print, "Cannot invoke this object (REPR: Null; VMNull)" I reported the error if it interests someone github.com/ab5tract/Terminal-Print/issues/44 19:49
19:50 gigavinyl joined
brimonk AlexDaniel: Thanks for your assistance in fixing my problem! 19:51
It just got resolved.
19:51 ChoHag left
raschipi m: my $n = Numeric.new; $n.Bool; 19:53
camelia MoarVM panic: Memory allocation failed; could not allocate 82944 bytes
Skarsnik nadim, HAS inline a struct in a struct, where has will put a pointer. class B is cstruct { has int150000 $.a }; class A is cstruct {has B $.b}; # 1 pointer in size; class C is cstruct { HAS B $.b} # int1500000 size; 19:54
raschipi I know this is strange, but I don't think an infinite loop and leaking memory is what's appropriate in this case, right?
Skarsnik weird lol
19:56 gigavinyl left 19:57 gigavinyl joined
Skarsnik this take forever, seem like it stuck in an infinite loop 19:59
19:59 gigavinyl left
jdv79 timotimo: yeah, that's true 19:59
19:59 gigavinyl joined
Skarsnik nadim, an attribute will get .inlined attribute to true if it's HAS 20:05
20:05 aaaa1 joined
aaaa1 What other template based things are there other than Bailador? 20:05
20:05 jsimonet left 20:06 cdg joined
aaaa1 Is Uzu an alternative? 20:06
AlexDaniel brimonk: you're welcome! :) 20:08
aaaa1: it could be, depending on your needs. 20:10
20:10 grondilu left
AlexDaniel but I think uzu is for static websites only, isn't it? 20:10
20:10 cdg_ joined 20:11 cdg left
aaaa1 no idea 20:11
20:11 cdg_ left, cdg joined 20:12 cdg_ joined 20:14 awwaiid joined 20:15 gigavinyl left 20:16 cdg left, gigavinyl joined 20:19 lucasb left 20:22 gigavinyl left 20:26 dubi0us left 20:30 Kyo91 left, dubi0us joined 20:34 ChoHag joined 20:35 dubi0us_ joined, dubi0us left, andrzejku left
timotimo excuse me, jdv79, what is? 20:38
20:39 dubi0us_ left, dubi0us joined
timotimo aaaa1: uzu is a static site generator while bailador is a slim web app framework; both use existing template libraries. Bailador has Mojo and Mustache, whereas uzu has Template6 and Mustache; find them and others on modules.perl6.org by searching for "Template" 20:39
20:40 quotable6 left, troys is now known as troys_, Kyo91 joined 20:41 setty1 left
raschipi buggable: eco Template 20:42
buggable raschipi, Found 14 results: HTML::Template, Template::Mojo, Template6, Template::Mustache, Plosurin. See modules.perl6.org/s/Template
timotimo thanks raschipi
mspo mustache and mojo are in sar 20:43
star
20:43 dubi0us left 20:44 markmont left
ShalokShalom how is the overhead when calling other languages? 20:46
20:47 troys_ is now known as troys
timotimo ShalokShalom: the benchmark Tux runs every day for his CSV module has a mode where it uses Text::CSV_XS from Perl5 to parse each individual line. it's more than 2x faster than the pure perl6 version 20:47
does that help you estimate? 20:48
20:48 devmikey left
ShalokShalom so Perl5 is much faster as 6? 20:48
20:49 devmikey joined
ShalokShalom and there is no overhead 20:49
raschipi ShalokShalom: The module is written in C
ShalokShalom i know
raschipi So, no Perl5 involved here at all. 20:50
ShalokShalom nearly no overhead would be as answer enough
raschipi Yes, nearly no overhead.
ShalokShalom raschipi: i am refering to "" from Perl5 to parse each individual line. it's more than 2x faster than the pure perl6 version"
thanks
raschipi Yes, XS is part of Perl5, but it's not written in Perl5, it's written in C 20:51
timotimo sadly it's not possible to nativecall directly into XS code
brimonk Is there a way to still have native C modules in perl6?
timotimo of course
Skarsnik yes NativeCall
brimonk Because that would (maybe) solve everyone's problem.
If speed is really an issue.
timotimo anyway, you go through the Inline::Perl5 overhead for every line and it's not too slow
geekosaur "Text::CSV_S from Perl5" 20:52
er CSV_XS
Skarsnik I use a C lib to parse HTML5
raschipi I see, thanks.
Skarsnik and I need to do the same for XML
geekosaur the _XS part is significant
it s a module *for* perl 5, using Perl 5's C extensions
Skarsnik because perl6 xml parsing is slow
geekosaur I don't think XS will be doable in perl 6 since it tends to be far too tight with perl 5 internals
er, using perl 5 XS modules
20:53 gigavinyl joined
timotimo yeah, XS modules really expect there to be a full perl5 interpreter in memory 20:53
20:53 dubi0us joined
timotimo the pypy people have done something for CPython extensions, which is basically python's XS, but it's an inredible amount of work & hassle 20:54
Skarsnik NC is so... simple 20:55
it's beautiful :)
El_Che It is
a work of art :) 20:56
Skarsnik (and GPTrixie make it a breeze to do binding) 20:57
El_Che maybe it's too beautiful, resulting in importing the C's insecure model into perl6 instead of a more secure perl6 program?
Skarsnik what do you can C insecure model?
raschipi Manual memory management.
20:58 dubi0us left
Skarsnik Well you should use it to bind 'proper' lib 20:58
El_Che my point is that a C lib is a huge win for perl6 (performance, a lib when no native lib is around), but there is a price to pay 21:00
21:01 dubi0us joined 21:02 gigavinyl left
Skarsnik it's a time save for stuff like HTML5. for me it's a waste of time to do "yet another html5 parser". I don't want to know the time it could take to have some as solid as browser parser 21:02
ChoHag Has anyone attempted a grammar for html5? 21:03
Do they still summon Cthulhu like regex do?
El_Che Skarsnik: yes, that the "a lib when no native lib is around" usecase 21:04
which I certainly appreciate
geekosaur you could write one but I suspect it'd be too strict for actualhtml in the wild
for real, dirty, broken html5 as found in the wild, pretty much any solution that isn't tagsoup-ish will summon nasal demons 21:05
21:05 dubi0us_ joined, gigavinyl joined, dubi0us left
ChoHag Oh I thought they'd fixed the "attempt to render linenoise" problem in html5. 21:06
raschipi ChoHag: You're thniking of XHTML, HTML5 isn't XML bacause web developers hate strict parsers apparently. 21:07
geekosaur even xhtml is something of a failure
people will produce garbage and call you broken if you can't handle it
21:07 robertle left
Skarsnik HTML5 is deeply defined, even error like non closing tag and stuff are specified 21:07
geekosaur yes, but about 3 people actually pay attention to it
likewise xhtml 21:08
Skarsnik (the doc is pretty huge)
raschipi Yeah, they just embraced the brokeness.
Skarsnik hm, I am pretty sure all browser supporting HTML5 do the same thing (following the doc)
21:09 dubi0us_ left, skids left, mcmillhj left
raschipi Skarsnik: Yes, the follow the specification, but the specification is for tag soup. 21:10
Skarsnik yeah but you ensure that a html5 page will have the same tree accross all thing supporting html5. it's a big pls 21:11
geekosaur if only 21:12
firefox wouldn't have quirks mode if that were true
21:13 aaaa1 left, dubi0us joined, abcdef1 joined
abcdef1 How do I separate classes from the main.pm file? 21:14
21:14 kerframil joined 21:15 raschipi left 21:17 gigavinyl left
[Coke] geekosaur: yes, people can report a failure of a particular example, but I'm saying we advertise the good bits, not the bad bits. 21:18
abcdef1 I created a directory inside of the root directory called 'lib' and did `use lib 'lib'; use RTObjects;` 21:24
with `unit module RTObjects;` in '/lib/RTObjects.p6'
It still can't find RTObjects 21:25
21:25 markmont joined 21:26 espadrine left
gfldex abcdef1: try to rename the module to `.pm` or `.pm6` 21:26
geekosaur use looks for .pm or maybe .pm6, not .p6 21:27
abcdef1 That worked; thanks guys!
21:27 Cabanossi left
gfldex docs are a bit sloppy when it says: "Source files generally use the standard .pm extension, and scripts or executables use .pl." 21:28
21:28 Cabanossi joined
Skarsnik huggable, modules 21:28
huggable Skarsnik, 100 Most Popular (by github stars and recently updated) Modules: perl6 -MWWW -e 'jget("modules.perl6.org/.json")<dists&...dated>) after Date.new: "2017-01-01"}).head(100)»<name>.grep(none |<p6doc panda v5>, /^ "Inline::"/).put'
nadim Skarsnik: I remember what one of my problems with has/HAS was, I can't see the difference in the dump and I would have liked to do that. 21:31
Skarsnik nadim, need to check for .inlined . my $has = $attr.inlined ?? 'HAS' !! 'has'; 21:32
nadim Skarsnik: cool! otherwise it looked like this i.imgur.com/SRGmoyC.png
let me see what I can do with that inline information 21:33
Skarsnik I should have pointed to github.com/Skarsnik/nativecall-typ...ag.pm6#L96 that could have helped for your stuff
since I validate CStruct in this
21:34 Kyo91 left, cdg joined 21:37 cdg_ left, ash_gti left 21:38 dubi0us left 21:39 cdg left
nadim Looks more accurate with HAS, I also forgot to show rw for native, that's fixed too. i.imgur.com/Kv3LWzX.png 21:40
21:41 cdg joined 21:42 cdg left, rindolf left
nadim meh! size should be different 21:43
copypasta error! pfiuu 21:44
i.imgur.com/Kv3LWzX.png 21:45
Skarsnik still show 16 and 16 21:46
nadim pasted the same link :(
i.imgur.com/Kv3LWzX.png
21:48 dubi0us joined
nadim well ... Lol! found a bug in imgur web page! this should be it i.imgur.com/CL59VK4.png 21:49
Qapla' 21:50
Skarsnik: do you have a few struc definition laying around you can share so I have an example a bit more complexe than that one?
Skarsnik github.com/Skarsnik/nativecall-typ...ndatype.p6 ? 21:52
21:52 dubi0us left
Skarsnik nadim, if you want real life stuff github.com/Skarsnik/perl6-gumbo/bl...inding.pm6 21:54
21:57 Skarsnik left, dubi0us joined
nadim i.imgur.com/Irpwuyw.png 21:59
22:01 dubi0us left 22:03 itaipu left 22:06 gigavinyl joined, dubi0us joined 22:07 gigavinyl left 22:08 gigavinyl joined, gigavinyl left 22:11 dubi0us left
abcdef1 What's the difference between a method and a submethod? 22:16
basket Submethods aren't inherited in derived classes 22:17
abcdef1 oh, I see
22:20 dubi0us joined 22:21 gigavinyl joined 22:22 troys is now known as troys_, gigavinyl left 22:23 gigavinyl joined 22:24 dubi0us left
abcdef1 I'm getting a `Bus error (core dumped)` while using SDL2::Raw 22:25
any ideas as to why that would happen?
nadim stray pointer on the C side 22:26
abcdef1 hm
nadim timotimo: will most probably be more helpful
22:27 gigavinyl left
abcdef1 I think I've fixed it, but I have no idea how lol 22:28
I just went around tweaking things and the problem disappeared
22:29 sludin joined
nadim do you have both versions of your code? 22:30
abcdef1 I think it may have been I wasn't using `SDL_RenderClear($render);` enough 22:31
nadim if you have it in your editor undo buffer, undo, make a commit, redo, make a commit, that will help the author 22:32
22:33 dubi0us joined
sludin Is there a process to follow for porting perl5 modules to 6? I have seen the most wanted list and the "Create a module" doc but I am missing the details of 'good citizen' porting. 22:37
I want to port my Protocol::ACME library but there is a wall of dependencies to port first and wanted to start picking away at those. 22:39
22:39 char_var[buffer] joined 22:40 Sgeo left, char_var[buffer] left, salva left, Sgeo joined, cpage_ left 22:41 char_var[buffer] joined 22:46 raschipi joined
ugexe generally its implement 10% of the perl5 module and then call it good 22:48
more seriously though - it can be pretty simple. but you'll find yourself wanting to redesign it to fit in better with the additional features/paradigms available to you 22:49
22:52 nadim left, salva joined, BenGoldberg joined
raschipi And when you get used to it, start to feel like you're fighting every other language. 22:56
22:57 BenGoldberg left, BenGoldberg joined
sludin Thanks for the responses. I'll poke around and make some educational mistakes along the way ;) 23:01
raschipi sludin: Here is an interesting talk on using the Perl6 toolset to do better: www.youtube.com/watch?v=DnsUSkwnRf...mp;index=8 23:06
23:06 mcmillhj joined 23:11 mcmillhj left 23:14 cpage_ joined
abcdef1 What's the fastest graphics library for making a raytracer? 23:21
I think Cairo has been the best so far
out of the ones I've tried
could Imlib2 work faster? 23:23
23:25 pierre_ joined
abcdef1 could writing to a bmp in pure perl6 without any libraries potentially be faster? 23:26
23:28 ash_gti joined 23:29 pierre_ left 23:30 sludin left 23:36 pilne joined 23:38 mcmillhj joined, kerframil left 23:40 Rawriful left 23:41 Sgeo_ joined, Sgeo left 23:42 mcmillhj left, gigavinyl joined 23:45 gigavinyl left 23:47 stmuk_ joined 23:49 stmuk left, cdg joined 23:50 abcdef1 left 23:54 cdg left, mcmillhj joined 23:57 Cabanossi left 23:58 Cabanossi joined, Sgeo_ left, mcmillhj left, Sgeo joined