»ö« 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.
Voldenet oh wait, it doesn't work 00:00
BenGoldberg m: sub try-intern { state $s = SetHash.new; $s<^a> ?? $s<$^a> !! $s<$^a> = $^a }; try-intern($_).say for ("foo", "fo"~"o");
camelia True
True
Voldenet that number is surprisingly small
BenGoldberg heh
Voldenet :D
BenGoldberg m: sub try-intern { state $s = :{}; $s{$^a} //= True; $s{$^a}:k }; try-intern($_).say for ("foo", "fo"~"o"); 00:01
camelia foo
foo
BenGoldberg m: sub try-intern { state $s = :{}; $s{$^a} //= True; $s{$^a}:k }; try-intern($_).WHERE.say for ("foo", "fo"~"o");
camelia 139923813746048
139923813989552
00:02
BenGoldberg fooey.
Voldenet so, you see... doing such stuff in raw perl isn't that easy :) 00:04
hm, does perl6 allow arbitrary objects as keys? if yo it might always return a copy 00:05
s/yo/so/
BenGoldberg :{} creates a hash which allows objects as keys.
m: my $objhash = :{}; $objhash{ Pair.new( 23, "Skidoo" ) }; dd $objhash; 00:06
camelia Hash[Mu,Any] $objhash = :{}
BenGoldberg m: my $objhash = :{}; $objhash{ Pair.new( 23, "Skidoo" ) } = True; dd $objhash;
camelia Hash[Mu,Any] $objhash = :{(23 => "Skidoo") => Bool::True}
timotimo you can also do it with "my %foo{Any}"
when you do my %foo = :{...} it will iterate the hash literal on the right and put all the stuff into a regular string-keyed hash 00:07
Voldenet m: sub try-intern(\a) { state %s; %s{a} = a unless %s{a}; %s{a} }; try-intern($_).WHERE.say for ("foo", "fo"~"o", "f"~"oo"); 00:11
camelia 140110714081648
140110714081648
140110714081648
Voldenet yeah, it's the same 00:12
BenGoldberg timotimo++ 00:14
00:14 chatter29 joined
llfourn skids++ your PR fixed an issue I was having where define_slang throws a bunch of warnings. 00:15
chatter29 hey guys
allah is doing 00:16
sun is not doing allah is doing
skids llfourn: thanks, let me know if it blew anything up, but hopefully it's all upside :-)
chatter29 to accept Islam say that i bear witness that there is no deity worthy of worship except Allah and Muhammad peace be upon him is his slave and messenger
00:18 chatter29 left
mst well that was a slightly different script 00:20
skids
.oO(As-Salaam-a-see-ya-later, bot)
00:22
Voldenet hm, interning strings slow it down just a little bit and improves things just a little bit 00:23
non-interned: 10.04user 0.00system 0:10.04elapsed 100%CPU (0avgtext+0avgdata 86008maxresident)k
interneed: 10.07user 0.02system 0:10.09elapsed 100%CPU (0avgtext+0avgdata 84688maxresident)k
checked with: sub try-intern(\a) { state %s; %s{a} = a unless %s{a}; %s{a} }; use nqp; for ^10000 { state @x.push: try-intern ~Date.today; nqp::force_gc; } 00:24
BenGoldberg Those numbers are too close...
Voldenet (obviously Date.today is sloooooooooooooooooooooooow, also gc too)
yeah, I think they're too close too, but 2MB is a definite difference
(do you know any other method that's pretty much guaranteed to generate immutable data?) 00:25
s/immutable/always the same/ 00:26
with getpid the difference is as small 00:27
ugh, nqp::getpid
non-intern: 2.84user 0.01system 0:02.86elapsed 100%CPU (0avgtext+0avgdata 76140maxresident)k
intern: 2.84user 0.01system 0:02.86elapsed 100%CPU (0avgtext+0avgdata 76140maxresident)k
AlexDaniel allah is doing spam bots :S 00:28
Voldenet Hm?
oh wait, interned version is: 2.85user 0.01system 0:02.86elapsed 100%CPU (0avgtext+0avgdata 75120maxresident)k
now it fits, clear 1MB gain
so, there's no real cost for interning a string (except that keeping copies might be very costly with strings never repeating) 00:29
also, it might actually count instances instead and trim the least used one, but I'm not sure how to extract the key from a hash 00:30
and it could use some fancy data structures I'm not sure how to implement in pure perl6 00:33
00:39 Cabanossi left
timotimo you can just .keys on a hash 00:40
if i get what you mean right
00:42 Cabanossi joined
Voldenet No, not that, I wanted to get an exact key box by certain key ;) 00:45
%s{a}:k always returns different object
also, does moarvm use pcmpestri for string comparison in that case?
it could, because string comparison is the most frequent of costly operations :P 00:47
timotimo i have no idea what pcmpestri is 00:50
also, don't forget to differentiate between Str and str, since the Str has a str in it that may be shared more aggressively 00:51
Voldenet pcmpestri is a x86 method for comparing strings :) 00:53
timotimo can it do 32-bit-per-char strings, too? 00:54
also, does it rely on a null terminator?
Voldenet hmm, I guess it wouldn't matter
and it relies on the third parameter, /length/
samcv what's the difference between comparig memery and comparing strings.... aside from null termination 00:55
Voldenet comparing the length is cheaper than comparing the string though, I bet
samcv aside from that ^
that's one of the checks mvm does comparing length first
or one of the couple of sanity checks like check if any of them have 0 length
Voldenet I guess there's none 00:56
but afair sse2 does hav only the operation for 4*32b comparison 00:58
and pcmpestri/pcmpistri/pcmpestrm and so on can speed this up a lot
webcache.googleusercontent.com/sea...g_sse_4.2+ 00:59
(i'm not a book of sse codes, maybe there was something comparable earlier) 01:00
samcv i guess it only differs in that the data is seperated into containers of a certain number of bits
as opposed to just a blob or whatever
and it can be assumed that each number of bits is distinct and only need to be compared over multiples of those bits rather than every single bit 01:01
so it can skip 8 bits at a time for string comparisons or 32 bits at a time if it was a 32 bit string
Voldenet actually, pcmpistri uses null-termination and pcmpestri uses explicit length 01:02
still, since perl is known for 'decent text processing', I guess this would be nice :) 01:03
meh, maybe it's not that great ┐(´~`;)┌, I always use it with java though :) 01:05
oh, llvm uses that too ┐(´~`;)┌ 01:09
samcv well case insensitive regex is about to get twice as fast, about 1.8 times compared to a month ago
huggable, status
huggable samcv, nothing found
samcv NeuralAnomaly, status
NeuralAnomaly samcv, [✘] Next release will be in 2 weeks and 4 days. Since last release, there are 13 new still-open tickets (13 unreviewed and 0 blockers) and 56 unreviewed commits. See perl6.fail/release/stats for details
samcv that's plenty of time then to finish. cool
Voldenet yay, that goes for grammars being faster too! \o/ 01:10
I like grammars, but they're not on bison's level yet :(
samcv have not seen bison 01:12
Voldenet well, yacc
01:21 mcmillhj joined
AlexDaniel samcv++ 01:24
01:26 evalable6 joined, ChanServ sets mode: +v evalable6
TEttinger Voldenet: not sure what you meant, are you using SSE instructions from Java? 01:27
Voldenet well, i found out java's using it, so by using java I'm using them
01:27 mcmillhj_ joined
Voldenet :P 01:27
TEttinger oh neat 01:28
Voldenet (obviously not all interpreters on all platforms, just hostpot)
01:28 mcmillhj left
TEttinger I know Java has intrinsics for a bunch of things 01:28
01:28 mst left, kst` joined, mst joined, perigrin joined
timotimo Voldenet: feel free to experiment with some intrinsic types or some other kind of annotation inside moarvm's source 01:28
Voldenet I sure will, maybe I'll just set up a nqp::stringintern 01:29
TEttinger the list I have for JVM is here, may be useful for the JVM perl 6 gist.github.com/apangin/7a9b7062a4bd0cd41fcc
Voldenet > java/lang/String.compareTo(Ljava/lang/String;) 01:30
yay, perl6 is using it too ;D
not moarvm, but it's something 01:31
timotimo we can't keep using java/lang/String for long, though
Voldenet Hm? Why so? 01:32
timotimo it can't do nfg
Voldenet ah, right, unicode stuff
timotimo very custom unicode stuff 01:33
TEttinger some custom CharSequence?
timotimo like, unicode doesn't specify a "latin capiatl letter a with lots of zalgo applied to it" as its own codepoint
but we do
Voldenet I think I tried using NFKD once and it didn't work for some polish letter
TEttinger can you subclass String if you aren't abiding by javac's rules?
Voldenet ;(
timotimo what'd be the use? 01:34
is java/lang/String actually subclassable?
TEttinger java.lang.String is a final class, I'm just wondering if you could extend itat all
I know generics don't exist while not using javac
not sure how real "final" is on a class
timotimo okay, i gotta go 01:35
have a good one!
01:40 Cabanossi left
TEttinger you too! 01:40
01:42 Cabanossi joined
Voldenet m: .chr.say for "gżegżółka".NFKD 01:43
camelia g
z␤̇
e
g
z␤̇
o␤́
ł
k
a
Voldenet
very fancy decomposition :P
TEttinger what would that decompose to?
Voldenet I'd expect l with some kind of - 01:44
but unicode says otherwise
TEttinger but l with dash is different :P
what's the NFKD decomposition for icelandic eth and thorn? 01:45
Voldenet maybe, but I still can't use NFKD to remove non-ascii letters
TEttinger because you can enter chinese into it anyway>
?
it isn't a romanization scheme
Voldenet chinese would be mostly /\ ;)
01:46 ilbot3 left
TEttinger there's lots of letters with unclear decomposition. there's clicks from languages that otherwise use the Latin alphabet, or IPA and Latin mixed 01:46
old english has eth, thorn, wynn, ezh, long s, etc. 01:47
Voldenet but honestly, I'm not sure of the usage of NFKD (what's the point) except for maybe string normalization
m: .chr.say for "Þ".NFKD
camelia Þ
Voldenet welp, kind of expected
TEttinger I think it's for identifying diacritical marks
01:47 ilbot3 joined, ChanServ sets mode: +v ilbot3
TEttinger and where something may be represented by either a single grapheme or multiple next to each other 01:48
Voldenet but "ł" is diacritical, some accents even used l instead
TEttinger right but what's the combining mark that goes on it? I don't know if one is in unicode
it's some kind of middle slash, right?
01:49 labster left
Voldenet yeah, no idea what's its name 01:49
an oblique hyphen maybe, but utf has only double oblique hyphen
I remember PHP4 or 5 having problems with that specific letter in some case, so it's always been strange 01:51
SmokeMachine m: class InternStr is Str {method new(Str \str) {state %s; %s{str} //= InternStr.bless: :value(str)}}; multi infix:<eq>(InternStr \a, InternStr \b) {a === b}; my $a = InternStr.new: "foo" x 99999; my $b = InternStr.new: ("f" ~ ("o" x 2)) x 99999; my $start = now; $ = $a eq $b for ^10000; say now - $start; my $c = "foo" x 99999; my $d = "foo" x 99999; $start 01:53
= now; $ = $c eq $d for ^10000; say now - $start
camelia WARNINGS for <tmp>:
Useless use of $start in sink context (line 1)
0.016654
SmokeMachine www.irccloud.com/pastebin/R7Iep6j9/ 01:55
Voldenet well, string comparisons on interned strings is pretty much instant, that's expected 01:57
02:04 mcmillhj_ left 02:07 kurahaupo__ joined 02:10 Cabanossi left 02:12 Cabanossi joined 02:32 AlexDaniel left 02:41 noganex_ joined 02:43 vendethiel joined, noganex left 02:47 vendethiel- left 03:10 Cabanossi left 03:11 Cabanossi joined 03:12 xtreak joined 03:34 ZzZombo joined 03:35 cyphase joined 03:40 Cabanossi left 03:41 Cabanossi joined 03:42 xtreak left 03:45 v1_ joined 04:03 BenGoldberg left 04:06 kurahaupo__ left, kurahaupo__ joined 04:10 vendethiel- joined 04:11 v1_ left, vendethiel left 04:12 kurahaupo__ is now known as kurahaupo 04:13 xtreak joined 04:14 v1_ joined 04:15 v1_ left 04:21 labster joined 04:24 wamba joined 04:28 xtreak left
samcv Emoji Version 5.0 has been finalized today 04:32
04:33 Alikzus left
samcv new emoji sequences too. like mage with different skin todes and elf and merperson. woah 04:33
going a little out there. but why not i guess
04:33 ZzZombo left
samcv argh whatttt is this Emoji_Tag_Sequence. new emoji property XD just to make my life harder 04:34
04:39 Alikzus joined 04:42 vendethiel- left, vendethiel joined 04:47 Tonik joined 04:50 mcmillhj joined 04:58 curan joined
skids
.oO(skin todes. Eww.)
05:01
05:03 skids left 05:04 vendethiel- joined, vendethiel left
samcv now flags can have tags or some crazy thing. 05:05
will look at that tomorrow. at least i finished the 1.7x :i boost to moarvm PR 05:06
05:09 Cabanossi left 05:11 khw left, Cabanossi joined 05:13 kurahaupo left, kurahaupo__ joined 05:14 aborazmeh joined, aborazmeh left, aborazmeh joined 05:16 kurahaupo_ joined
Voldenet okay, some perl5 first: my $c = 5; $a{b} = $a{b} + $c || $c; print $a{b}."\n" 05:17
how do I do something similarly short in p6?
05:17 kurahaupo__ left
Voldenet i'm using ternary but it's a bit... hm, clumzy 05:17
clumsy, even
samcv let me look 05:18
05:18 domidumont joined
Voldenet oh 05:19
samcv my $c = 5; $a<b> = $a<b> + $c || $c; say $a<b> # as long as those wer'nt variables
the {b}
Voldenet m: my $c = 5; my %a; %a<b> = (%a<b> // 0) + $c; say %a<b>
camelia 5
Voldenet ah, so // is a null coalescing op
samcv anything not defined 05:20
m: Nil.defined.say; 0.defined.say; Str.defined.say
camelia False
True
False
samcv Str being the string 'type' class. which is not yet defined
Voldenet well yeah, but I wanted "set it as 0 if not defined"
which is good ;)
in p5 i did $a{b} || 0 tho 05:21
samcv is c zero? 05:22
my $c = 5; my $a; my $a; $a<b> = $a<b> + $c || $c; $a<b>.say 05:23
m: my $c = 5; my $a; my $a; $a<b> = $a<b> + $c || $c; $a<b>.say
camelia Potential difficulties:
Redeclaration of symbol '$a'
at <tmp>:1
------> 3my $c = 5; my $a; my $a7⏏5; $a<b> = $a<b> + $c || $c; $a<b>.say
Use of uninitialized value of type Any in numeric context
in block <unit> at <tmp> lin…
samcv m: my $c = 5; my $a; $a<b> = $a<b> + $c || $c; $a<b>.say
camelia Use of uninitialized value of type Any in numeric context
in block <unit> at <tmp> line 1
5
samcv m: my $c = 5; my $a; $a<b> = ($a<b> // 0) + $c || $c; $a<b>.say
camelia 5
05:24 domidumont left
samcv does that work right Voldenet? i'm not sure what you're trying to do 05:24
Voldenet a regular null coalescing, but I figured already :) 05:25
samcv kk
05:25 domidumont joined
Voldenet transition from || into // had me befooled for a little though ;) 05:26
05:26 aborazmeh left
samcv there's also `orelse` which is sorta like // but not as tightly binding 05:27
orelse is for undefined things or is for undefined + falsey things
Voldenet is there a feature like elvis operator in C#? 05:29
value?.invokeFirst()?.invokeSecond()?.invokeThird()?.Field 05:30
which basically translate to: if(value != null){ var tmp1 = value.invokeFirst(); if(tmp1 != null){ var tmp2 = tmp1.invokeSecond() ... 05:31
and so on
basically "if the left side is null then don't invoke the method/field/indexer"
a real lifesaver in huge, undefined sets
samcv oh so if the method returns a null then it won't continue down the chain? Voldenet ? 05:33
Voldenet yeah, exactly
and the whole expression is just null of the default(T) of the last field or method's type 05:34
samcv that sounds neat. it may be possible, but i do not know of one off the top of my head. have you heard about junctions yet?
Voldenet yeah, junctions for infixes looks nice
samcv the very last method in the chain (even though it didn't run) you mean? 05:35
Voldenet yeah, because of how .net runtime works it must know the type of the method
samcv m: my $var = Nil.?Str; say $var.WHAT; say $var.defined 05:36
camelia Use of Nil in string context
in block <unit> at <tmp> line 1
(Str)
True
Voldenet m: my $var = Nil?.Str; say $var.WHAT;
camelia 5===SORRY!5=== Error while compiling <tmp>
Bogus postfix
at <tmp>:1
------> 3my $var = Nil7⏏5?.Str; say $var.WHAT;
expecting any of:
infix
infix stopper
postfix
statement end
stateme…
samcv will have to check how that even parses. as i have no clue what it's doing internally
Voldenet nope, it's not C# yet :P
moritz Voldenet: .? has a bit of a different semantics in Perl 6. It invokes the methods on the RHS only if the method on the LHS has that method
samcv m: my $var = Nil.?fakemethod; say $var.WHAT; say $var.defined 05:37
camelia (Any)
False
samcv m: my $var = Nil.fakemethod; say $var.WHAT; say $var.defined
camelia (Any)
False
samcv :\ what
m: my $var = 'word'.?fakemethod; say $var.WHAT; say $var.defined
camelia (Any)
False
samcv m: my $var = 'word'.fakemethod; say $var.WHAT; say $var.defined
camelia No such method 'fakemethod' for invocant of type 'Str'
in block <unit> at <tmp> line 1
samcv m: my $var = quietly 'word'.fakemethod; say $var.WHAT; say $var.defined 05:38
camelia No such method 'fakemethod' for invocant of type 'Str'
in block <unit> at <tmp> line 1
samcv m: my $var = 'word'.?comb; say $var
camelia (w o r d)
samcv cool 05:39
Voldenet moritz: but that's the different operator, .? is not ?. :)
and I guess .? has the meaning of "when right side exists" while the latter would mean "if the left side exists"
I guess I could hijack some junction to do it though, probably. 05:40
samcv m: use Test; throws-like({ $a = 'a' x 9999999999999999999 }, Exception, 'too large repeat count throws instead of going negative');
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$a' is not declared
at <tmp>:1
------> 3use Test; throws-like({ 7⏏5$a = 'a' x 9999999999999999999 }, Except
samcv m: use Test; my $a throws-like({ $a = 'a' x 9999999999999999999 }, Exception, 'too large repeat count throws instead of going negative');
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3use Test; my $a7⏏5 throws-like({ $a = 'a' x 99999999999999
expecting any of:
infix
infix stopper
statement end
samcv m: use Test; my $a; throws-like({ $a = 'a' x 9999999999999999999 }, Exception, 'too large repeat count throws instead of going negative');
camelia 1..2
ok 1 - code dies
ok 2 - right exception type (Exception)
ok 1 - too large repeat count throws instead of going negative
05:50 wamba left, RabidGravy joined 05:53 Tonik left, Cabanossi left 05:54 kurahaupo_ left 05:55 kurahaupo__ joined 05:56 Cabanossi joined 06:01 imcsk8_ joined, imcsk8 left 06:05 eater left 06:08 eater joined 06:12 mcmillhj left
samcv just gonna remove some code i don't know what it does and make sure nothing breaks. :P 06:13
also should see how old this code is as well
ok 3 years ago is a long time ago since this spot was changed 06:15
err wait this section only 8 m ago. github.com/perl6/nqp/commit/778d1a...7588da9ea5 06:16
should be fine to remove all the unneeded things now 06:17
06:19 wamba joined 06:20 mcmillhj joined 06:27 mcmillhj left, domidumont left 06:32 gdonald left 06:33 gdonald joined 06:35 kurahaupo__ left 06:37 darutoko joined
Voldenet hm, I wonder if this should leak: ix.io/pfh 06:37
samcv depends on how much 06:39
Voldenet about this much (seconds on the left, kB on the right) ix.io/pkM
samcv kB leaked? what program is this?
valgrand? 06:40
grind*
Voldenet nah, just regular smaps
06:40 mcmillhj joined
Voldenet > awk '/Rss/{i+=$2}END{print i}' /proc/`pidof moar`^Cmaps 06:40
erm
> awk '/Rss/{i+=$2}END{print i}' /proc/`pidof moar`/smaps
a professional profiler ;) 06:41
samcv you think it's leaking because memory usage is going up?
heh
Voldenet Hm, I'm not sure if it is.
The idea is to leave this for a few hours and see if it gets bad ;)
samcv yeah. would be interested after a few hours 06:42
Voldenet it's just 30 minutes, but the steady growth is... worrying
samcv forcing the gc is just to try and get better readings? is that it Voldenet 06:43
Voldenet yyyyyyeah, I should use valgrind, shouldn't I? ;D
samcv there's perl6-valgrind-m 06:44
so you don't have to do much work
you should already have it
06:45 mcmillhj left
samcv qq<"$contents">; would look nicer than doing those ~ and ~ 06:45
instead of '"'~ $contents ~ '"';
Voldenet hm, old habits, just replaced . with ~ 06:46
samcv also could do “'$contents'”
if you have a compose key
.oO( wonders if there are space insensitive quoting like how regex is by default not sensitive to quoting)
06:47
that could be useful. or something
06:47 darutoko- joined 06:48 darutoko left
samcv also do you know about Q quoting Voldenet ? 06:48
Q is one of my favourite quoting methods. becuase backspaces don't need escaping 06:49
06:49 domidumont joined
Voldenet yeah, Q quoting is nice 06:49
samcv and heredocs are nice too
Voldenet, what editor are ypou using?
Voldenet hm, nano/emacs/atom 06:50
the first one for giggles, not really
samcv have you seen github.com/perl6/Atom-as-a-Perl6-IDE and gotten at least the syntax highlighter?
for atom that is
Voldenet yes, in fact I'm using it ;)
samcv yay :)
glad to know my work is being used <3
also that page has fun stuff like this github.com/perl6/Atom-as-a-Perl6-I...-operators 06:51
really useful when i'm working with a long file
El_Che there is als azawawi's atom-perl6-tools that add stuff to it 06:52
syntax chekcing, file browser, icons
samcv i didn't have much fun with atom-perl6-tools
it got really in the way
El_Che really? 06:53
samcv and errors and stuff
Voldenet, the syntax highlighter we use on docs.perl6.org too
since i converted the site from Pygments highlighter
El_Che I tried it sunday and it worked great (once I add MyLib/lib to my PERL6LIB before starting atom)
samcv hm
what is this MyLib/lib
El_Che s/add/added/
samcv is it project dependent?
El_Che the lib directory of the code I was working on 06:54
samcv ok so wherever you project was. ok
maybe that's why i hated it and it just wasted all my cpu lol
El_Che I guess adding a local lib should be trivial in the tools
I'll ping him when he's here
06:54 Cabanossi left
El_Che yes, without the lib thing every "use" is marked as error 06:55
samcv he finally released new atom release which relied on the new Perl6 highlighter, he either is slow with responding or just busy a lot
Voldenet mmm, running that script with valgrind really wasn't the best idea... now I wonder if I really eval files more 80 times per second 06:56
so I can worry about the actual memory usage :D
06:56 Cabanossi joined 06:57 mcmillhj joined
samcv EVALing file is not the best thing to do maybe? 06:58
idk
it basically have to recompile the code 06:59
Voldenet > possibly lost: 192,024 bytes in 3,432 blocks
it's something ¯\_(ツ)_/¯
samcv unless that's what you're actually trying to do, check the EVAL stuff
Voldenet well, I might check out if slurp alone causes that or if it's EVAL's fault
(EVALFILE just slurps and EVALs, right?)
samcv well yeah. but it has to start the parser up all over again and blah. what file are you even testing? 07:01
Voldenet the test case is self-contained :P
samcv i mean eval is not supposed to be used unless there's no other way 07:02
07:02 mcmillhj left
samcv self-contained? 07:02
private you mean?
Voldenet hm, it's just "~now" in the moment of testing
samcv ah ok. that's it
Voldenet I just wanted to see if it's a good approach to loading perl files/scripts/modules dynamically
samcv does it even call EVAL at all?
argh. i wouldn't do that lol
you can dynamically load modules 07:03
lexically even
Voldenet the problem with other approaches is that you can't unload and reload them easily
samcv have it only affect a certain block of code
Voldenet GC would at some point go crazy (unless you couldn't really unload the code)
samcv ah if there are changes to it?
Voldenet Yeah. That's the fun. :)
samcv well if you figure it out let me know 07:04
Voldenet EVALFILE seems good... enough for the case
samcv my ircbot i just had a perl 5 script that does some processing
uh EVALFILE doesn't or doesn't load things into scope?
Voldenet I think/I hope not. 07:05
samcv then how is it helpful?
Voldenet You can return things and interact with the caller.
07:05 abraxxa joined
samcv Voldenet you could try this 07:05
star: my $module = try { require JSON::Tiny } 07:06
camelia ( no output )
samcv and then maybe you can re-load it later
and keep it in that variable or whatever
though nine might know the answer 07:07
Voldenet yeah, unloading things was never a priority in most langs
samcv i'm sure there is a way to do it. i just don't know it
Voldenet using evals helps keeping things moderately tidy though
samcv let me finish something and then i'll check some things for you
07:08 mr-foobar left
Voldenet sure thing, but evals still look as good as hacky ;-) 07:09
also, it feels a lot like perl5, unfortunately I don't need to put 1; at the end
07:10 mcmillhj joined
samcv hah 07:10
there is so much fun in perl 6. what have yo learned so far?/when did you start learning
07:11 mr-foobar joined
Voldenet just a few weeks back, I've so far learned some basics only :P 07:11
classes / parameter passing (not sure if completely though) / how to implement ops in moar / grammars and all the fancy async stuff 07:13
samcv nice
Voldenet tbh, the best idea so far for me is how concurrency is pretty straightforward
especially with Supplies and Channels, that simplify the code a lot 07:14
No more race conditions! :P
samcv perl6 is pretty much the greatest 07:15
Voldenet yeah, i feel like I could rewrite whatever language I wanted in it :-)
samcv :)
how did you hear about perl 6?
07:16 mcmillhj left, espadrine_ joined
Voldenet from an image 07:16
perl-begin.org/humour/perl6_perl_6_cover_lg.jpg
:P 07:17
07:17 vendethiel- left
samcv i became a core developer around Dec 18th of last year, learned perl 6 like 4 months before that, before that just knew perl5 and knew perl 6 was a thing 07:17
07:17 vendethiel joined, dakkar joined
samcv then decided it was the language of the future, started commiting a steady stream of patches and now it's pretty great to be working on improving an already great language 07:17
omg that book
Voldenet :-)
samcv good thing it says "Not REALLY" 07:18
Voldenet Actually, it's improving perl5
samcv hmm?
Voldenet Stuff like $hash{key}
samcv oh perl 6 you mean?
Voldenet yeah, it never made real sense in p5
samcv yeah, they borrow a lot of things
what do you mean? 07:19
that you didn't have to quote it? or accessing a hash with a scalar?
Voldenet accessing a hash with a scalar...
samcv hah
you can still do that in perl 6 though if you want
but then it's actually IN a scalar
Voldenet also, wantarray was one gloomy feature
samcv it's not accessing a hash like a scalar 07:20
it actually is in a scalar container
which is. making actual sense. unlike perl 5
Voldenet :-)
samcv Unicode 10 comes out in april or something 07:21
or hope they don't add any new radical things. need to look into new flag things
Voldenet I honestly hope they fix at least some diacritics (to the point I can safely use it to convert any latin-derived language into ascii)
samcv what do you mean 07:22
why do you want ascii :P
Voldenet m: .chr.say for "gżegżółka".NFKD
camelia g
z␤̇
e
g
z␤̇
o␤́
ł
k
a
Voldenet hm, storing files, arbitrary ascii-only ids
samcv that doesn't have anything to do with unicode though right
Voldenet i feel like "ł" should really be decomposed, even if there's no character for that dash
samcv oh lol. 07:23
Voldenet Nope, doesn't at all.
samcv Voldenet, do you know about how the flags are implemented?
so there's new codepoints started in unicode 9.0. A-Z so you could use ISO names and have flags show up
m: say "\c[United States]" 07:24
camelia 🇺🇸
Voldenet well none of my fonts support it, but I believe you
:D
samcv idk how that shows up. but it's two codepoints. regional indicator U and regional indicator S
m: say "\c[United States]".uninames
camelia (REGIONAL INDICATOR SYMBOL LETTER U REGIONAL INDICATOR SYMBOL LETTER S)
samcv but the crazy thing. is they also support 3 letter names
so if you have 5 regional indicators right next to each other
they're support to be 1 RI of 3 codepoints and the next be 2 codepoints 07:25
and no other thing in unicode acts like that
and now they added some new thing so scotland and england got flags called 'flag tags' or something
Voldenet ಠ_ಠ I bet the complexity is worth it
samcv it is
there's a good reason they did that and don't use ZWJ but i forget what it was 07:26
Voldenet at least it allows me to fancy meme faces (ノ´ー`)ノ
samcv yes. very true
m: "\c[facepalm]".say
camelia 5===SORRY!5=== Error while compiling <tmp>
Unrecognized character name [facepalm]
at <tmp>:1
------> 3"\c[facepalm7⏏5]".say
samcv m: "\c[facepalming]".say
camelia 5===SORRY!5=== Error while compiling <tmp>
Unrecognized character name [facepalming]
at <tmp>:1
------> 3"\c[facepalming7⏏5]".say
samcv u: facepalm
unicodable6 samcv, Found nothing!
Voldenet m: "\c[face palm]".say 07:27
camelia 🤦
samcv yeah that
Voldenet :D
samcv we eve support unicode sequences like emoji sequences with \c (since i added it a month or so ago)
u-ou :U
samcv which is pretty fancy
m: say "\c[woman gesturing OK]"
camelia 🙆‍♀️
Voldenet ...and none of my fonts support it yet :>
samcv m: say "\c[woman gesturing OK]".uninames.perl.say 07:28
camelia ("FACE WITH OK GESTURE", "ZERO WIDTH JOINER", "FEMALE SIGN", "VARIATION SELECTOR-16").Seq
True
samcv m: say "\c[woman gesturing OK]".chars
camelia 1
samcv and it still sees it as one character
Voldenet, you don't see ANYTHING there?
or you see like a woman and then a female symbol
Voldenet Well, I see female symbol.
samcv you should install the noto fonts + noto emoji and that will cover almost all of unicode
u-ou m: say "\c[PILE OF POO]"
camelia 💩
u-ou :>
samcv and if you have those installed and still can't see it. then maybe you are using a terminal that's not falling back to other fonts on misses 07:29
Voldenet Probably, but I just can't stop using consolas ;)
u-ou I'm having a look at perl 6 at a glance
looks ok
Voldenet yeah, probably term's fault too
samcv what terminal do you have Voldenet
Voldenet putty
samcv ew
Voldenet :-)
u-ou :U 07:30
samcv get an actual one...
Voldenet inb4 "windows inferior race" ;)
samcv nah cause putty sucks
nothing to do with windows, it's just a terrible program. doesn't care about fonts period
Voldenet, though to install the fonts see here www.google.com/get/noto/help/install/
you can get ALL the noto fonts and get like 97% unicode coverage
Voldenet Got em already. 07:31
samcv Voldenet, maybe this last answer? superuser.com/questions/599899/can...s-in-putty 07:32
Voldenet There's no real alternative for lightweight-xterm emus on windows
samcv idk what that is. but it might do what you want. idk
also see this plus.google.com/+KimNilsson/posts/bRbxuuxtCUV 07:33
TEttinger I like cmder a lot 07:34
samcv so it seems totally doable
TEttinger on windows
samcv does it autouse fallback fonts TEttinger
TEttinger I think you can tell it to
Voldenet well... www.youtube.com/watch?v=CXpuRIZzJog ;P
but I'll get emojis in putty working, because it looks fancy
samcv Voldenet, this seems to be the most specific one github.com/pyroscope/rtorrent-ps/issues/8
well to properly do it you should do all 10 noto fonts 07:35
TEttinger looks like cmder allows one fallback font, for specified unicode ranges I think?
samcv because it covers too much of unicode to be stored in one font
looks like fontlink may be more multipurpose or something. i guess you link extra fonts to whatever font you're using for putty 07:36
so write a program to format it to windows regkeys from a directory listing of the font folder than copy and paste output # now that would be www.youtube.com/watch?v=CXpuRIZzJog 07:37
lol
07:37 mcmillhj joined 07:38 Cabanossi left
Voldenet :D 07:39
07:40 Cabanossi joined 07:42 mcmillhj left
samcv then write a script and do it to all fonts installed on your system 07:45
and. can't think of anything else overkill you could do after that 07:46
07:46 mcmillhj joined
Voldenet hm, using more than 10 fonts is not probably the wisest 07:47
samcv oh?
Voldenet hm, it has to work somehow, probably loads all fonts listed 07:48
:)
samcv nah. only loads in case you are missing
then would cache it
Voldenet but putty doesn't support it >.>
samcv support what?
Voldenet linked fonts, apparently 07:49
samcv wtf
Voldenet hm, wondrous things
samcv www.chiark.greenend.org.uk/~sgtatha...nking.html 07:50
they fixed it in 2006
unless they broke it *again*
07:50 zakharyas joined, geekosaur left
lizmat clickbaits p6weekly.wordpress.com/2017/03/27/...-the-same/ 07:51
07:51 mcmillhj left
samcv o/ lizmat 07:51
Voldenet Well, I can live without emojis, tbh. ;-)
I guess I'll add some transliteration for them, so I don't see boxes though
07:51 geekosaur joined
lizmat samcv o/ 07:51
samcv what os version do you have? 07:52
tho it's probably just putty being crappy
transliteration?
07:52 wamba left
lizmat Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 07:52
Voldenet yeah, "utf -> utf description" :P
'not the best, but works' :-)
samcv lol 07:53
Voldenet i wish weechat had perl6 support, i'd have to do it with perl5 tho
07:54 mcmillhj joined 07:55 bjz joined 07:56 bjz left 07:59 mcmillhj left 08:04 espadrine_ left 08:15 bjz joined 08:16 mcmillhj joined 08:21 mcmillhj left, kurahaupo__ joined
moritz there's an Inline::Perl6 module for Perl 5 08:24
08:27 mcmillhj joined 08:28 domidumont left 08:33 wamba joined 08:36 mcmillhj left
u-ou when is fork() likely to be implemented? 08:40
08:40 parv joined
moritz in Perl 6? not, because it's not portable 08:40
though it's not hard to get it running through NativeCall 08:41
u-ou perl5 more or less has a portable fork
it even works on windows
08:41 mcmillhj joined
u-ou yeah, will look into nativecall 08:41
moritz github.com/cspencer/perl6-posix
submit a pull request for it to implement fork, that would be the right place
u-ou it = perl6-posix ? 08:42
08:42 mtj_ left
u-ou ok 08:43
geekosaur u-ou, for some value of "works" that isn't very
it's a hideous hack and you can break it fairly easily
u-ou ahh
geekosaur because windows doesn't do fork
u-ou so fork is out?
samcv what do you need fork for u-ou ? 08:44
u-ou an irc bot
samcv and so what do you need to fork? 08:45
an executable?
another perl 6 script? a perl 5 script?
u-ou perl 6
geekosaur (perl 5's fork() on Windows starts a nw *thread* with its own private perl 5 interpreter context. you can fairly easily still access and change the old context, because they're still sharing the same address space)
samcv fork the perl 6 script currentl yrunning?
u-ou yeah
samcv sounds like a horrible idea
08:45 mcmillhj left
samcv we have concurrency features 08:45
so you can execute code at the same time 08:46
u-ou okay
samcv do you need an intro to them? i can link you
08:46 mtj_ joined
u-ou sure 08:47
samcv I wrote a good intro here: cry.nu/perl6/multithreading-in-perl6/ and once you read part 1 and 2 then going to the docs and reading the pages should be good supplemental info
but that will get you started
08:47 tokomer joined
u-ou thanks :) 08:47
samcv perl 6 docs page is docs.perl6.org/language/concurrency once you get done with my tutorial
08:47 mtj_ left 08:48 mtj_ joined 08:49 mcmillhj joined 08:50 jonas1 joined 08:54 gdonald left, mcmillhj left, gdonald joined 08:55 Cabanossi left 08:56 Cabanossi joined, rindolf joined 08:57 domidumont joined 08:58 mcmillhj joined 09:00 kurahaupo_ joined, kurahaupo_ left
andrzejku hi :) 09:00
09:00 kurahaupo__ left
andrzejku did you hear that web assembly is fully supported in firefox 09:01
09:03 mcmillhj left 09:07 mcmillhj joined, JimmyZ joined
andrzejku samcv: good job 09:11
masak andrzejku: and in Chrome, it seems
09:12 mcmillhj left
u-ou night 09:16
09:18 domidumont1 joined, domidumont left 09:20 mcmillhj joined
parv samcv, in 1st para, last line under "Channels" (re: cry.nu URL) "... if we have removed all the items from the queue and we have closed it with .closed". Is the last word supposed to be ".close" instead? If not, is there some wording issue? 09:23
09:24 mcmillhj left 09:33 melezhik joined 09:45 mcmillhj joined, rindolf left 09:49 mcmillhj left 09:51 lukaramu joined 09:52 salva0 joined, tokomer left 09:54 Cabanossi left 09:56 Cabanossi joined, rindolf joined 09:57 parv left
Geth ecosystem: c99527ca47 | (Alexey Melezhik)++ | META.list
Sparrowdo::Cpanm::GitHub - Sparrowdo module to installs CPAN modules fetched from remote GitHub repositories

  github.com/melezhik/sparrowdo-cpanm-github
10:02
10:03 wamba left, mcmillhj joined 10:04 labster left, tadzik left, wictory[m] left, ilmari[m] left, CIAvash[m] left, xui_nya[m] left, Matthew[m] left, unclechu left, mienaikage left, dp[m] left, M-Illandan left 10:07 wictory[m] joined 10:08 mcmillhj left 10:12 mcmillhj joined, drrho_ left 10:13 drrho_ joined 10:14 geekosaur left 10:15 geekosaur joined 10:16 mcmillhj left
DrForr o/' 10:20
10:22 mcmillhj joined
DrForr gist.github.com/drforr/eff47ce7999...5c259b814f 10:25
I'm a little confused by the behavior depicted by above.
In the meantime I'll rebuild p6 to see if this is something else messing with me. 10:26
10:26 mcmillhj left 10:29 pmurias joined 10:31 perlawhirl joined, perlawhirl left 10:35 mcmillhj joined
jnthn DrForr: when uses smartmatching, so it'd smartmatch against the whole expression there. and short-circuits, however, thus returning Perl6::WS, which becomes the target of the smartmatch 10:35
DrForr: Effectively, the stuff to the right of the and is dead code
Because a type object will always be False
geekosaur just figured that out... 10:36
DrForr That makes sense.
It just means another layer of code, but I think I need another layer there anyway. 10:38
10:38 perlawhirl joined 10:40 mcmillhj left
perlawhirl hi perlers 10:40
10:40 wamba joined
perlawhirl I'm sure I saw this answered recently... but how can I pass a hash (or maybe a list of pairs) as object args? 10:40
m: my class A { has $.x; has $.y }; say map { A.new: $_ }, { :1x, :2y } 10:41
camelia Default constructor for 'A' only takes named arguments
in block <unit> at <tmp> line 1
jnthn | 10:42
lizmat m: my class A { has $.x; has $.y }; say map { A.new: |$_ }, { :1x, :2y }
camelia (A.new(x => 1, y => Any) A.new(x => Any, y => 2))
10:42 bjz left
lizmat m: my class A { has $.x; has $.y }; say map { A.new: |$_ }, { (:1x, :2y) } 10:42
camelia Default constructor for 'A' only takes named arguments
in block <unit> at <tmp> line 1
lizmat hmmm
gregf_ m: my class A { has $.x; has $.y }; say map { A.new: |$_ }, { :1x, :2y } 10:43
camelia (A.new(x => 1, y => Any) A.new(x => Any, y => 2))
lizmat m: my class A { has $.x; has $.y }; say map { A.new: |$_ }, { \(:1x, :2y) }
camelia Default constructor for 'A' only takes named arguments
in block <unit> at <tmp> line 1
jnthn The hash is being taken as the single argument to map there, under signle arg rule, and thus iterated
And all the other things being tried are making the hash into a block ;) 10:44
lizmat ah, hash , not block :-)
duh
jnthn ${ :1x, :2y } probably does it
It it's desired to treat it as one item
I'm guessing there's a list of them in the real case this was golfed from, though, otherwise why the map... :)
perlawhirl yes, there would be a list of them 10:45
10:48 bjz joined
masak m: say { :1x, :2x }.perl 10:48
camelia {:x(2)}
masak Last One Wins, apparently 10:49
10:49 mcmillhj joined
lizmat masak: yes, we don't have push semantics for that 10:49
and just assigning without checking for existence, is faster 10:50
gregf_ m: [ (:1x, :2y), \(:1x, :2y)].map: *.^name.say
camelia List
Capture
masak lizmat: in newer versions of JavaScript, it's a compile-time error to have dupe keys 10:51
I can sort of see the logic in that 10:52
10:52 vendethiel left
masak and it has zero runtime cost 10:52
10:53 vendethiel joined 10:54 mcmillhj left
jnthn Dupe literal keys is probably cheap to detect 10:55
(At compile time)
masak m: say { foo => 5, foo => 42 }.perl 10:57
camelia {:foo(42)}
jnthn "Last one wins" is useful when you have literals with defaults then flatten a hash in atop of that with settings
masak oh, no argument there
jnthn But it'd be odd to write it and mean it in a literal
masak just talking about the very-probably-a-thinko situation of duplicate actual keys in a hash literal
10:58 japhb left
jnthn Right. 10:58
I could see it warning or even being a compile error in 6.d; I guess that the only argument against is "what if I'm generating code" but I think the answer then is "generate better code" :P :P 10:59
11:00 mcmillhj joined, japhb joined
perlawhirl eh... FWIW I just modified my class.. added a .new multi that accepts Hash, and now 'map { A.new: %$_ }' is working 11:00
i'm just playing around here so a dirty fix is good enought
actually... that %$_ coercion isn't necessary 11:01
11:04 mcmillhj left
pmurias I should add is-approx tests in roast/S24-testing? 11:05
* Should I
11:07 mr-foobar left
geekosaur github.com/rakudo/rakudo/commit/42f34fb8ae ? 11:07
masak that's is_approx, not is-approx ;) 11:08
11:08 mcmillhj joined
perlawhirl m: my class A { has $.x; has $.y; multi method new(%z) {A.new: |%z} }; say map {A.new: $_}, {:1x :2y},{:3x :4y} 11:10
camelia (A.new(x => 1, y => 2) A.new(x => 3, y => 4))
11:11 mr-foobar joined
perlawhirl hrm, this works too 11:12
m: my class A {has $.x; has $.y;}; say map {A.new: |%$_}, {:1x :2y},{:3x :4y}
camelia (A.new(x => 1, y => 2) A.new(x => 3, y => 4))
perlawhirl but breaks with single arg to map, as discussed above
which is fine... i'm using map because i have multiple hashes 11:13
11:13 mcmillhj left
pmurias if it's not a thinko it would be intentionally confusing (or auto-generated) 11:14
11:17 mcmillhj joined 11:22 mcmillhj left 11:26 dp[m] joined, tadzik joined, M-Illandan joined, Matthew[m] joined, unclechu joined, ilmari[m] joined, mienaikage joined, xui_nya[m] joined, CIAvash[m] joined 11:31 ZzZombo joined, abraxxa left 11:32 abraxxa joined
pmurias I have added is-approx tests to roast. I'm not sure if is_run is the correct way of testing the cases when it fails 11:37
11:41 abraxxa left 11:42 abraxxa joined, mcmillhj joined 11:47 mcmillhj left 11:48 Ulti joined 11:51 raschipi joined 11:52 Sound joined 11:54 wamba left 11:58 mcmillhj joined
pmurias Should roast assume that int is 64bit at least? 11:58
12:02 wamba joined 12:03 mcmillhj left, robertle joined 12:08 Cabanossi left
raschipi Voldenet: Earlier you asked about functions that deal with sparse lists. In Perl6, we call that "Failures", which is a kind of undefined object. They propagate like you asked Null to propagate. 12:11
12:11 Cabanossi joined, mcmillhj joined 12:13 eroux joined 12:16 mcmillhj left 12:22 mcmillhj joined
robertle what are people using for logging in perl6? I use log4perl quite ahppily in perl5... 12:26
12:26 mcmillhj left
DrForr Then you can still use it with Inline::Perl5 :) 12:27
Alternatively check out the Log namespace on modules.perl6.org, there are a bunch of them there. 12:28
robertle I did see them, but was wondering what people's experiences were
raschipi buggable: eco log
buggable raschipi, Found 15 results: Crust::Middleware::Syslog, Games::BubbleBreaker, Template::Mustache, Log::Syslog::Native, Sys::Lastlog. See modules.perl6.org/#q=log
12:28 eroux left
robertle I did look at Log::minimal, but it seems to be a bit too minimal :) 12:29
DrForr I haven't used any of them yet myself.
12:29 Sound left 12:36 Sound joined 12:39 gdonald left, gdonald joined, Cabanossi left 12:41 Cabanossi joined 12:46 itaipu joined 12:58 mcmillhj joined 13:03 vendethiel- joined, vendethiel left 13:07 cdg joined 13:09 xtreak joined 13:10 Cabanossi left 13:11 Cabanossi joined, ZzZombo left 13:19 kurahaupo__ joined 13:23 wamba left 13:33 skids joined 13:36 lukaramu_ joined 13:39 Cabanossi left 13:40 lukaramu left 13:41 Cabanossi joined
SmokeMachine m: my %a{List} = (1, 2) => 42; my $l = List.new: 1,2; say %a{$l} # should it work? 13:56
camelia (Any)
geekosaur SmokeMachine, I suspect that should throw. I think hash keys must be value types 14:02
I suspect it's using the address or something currently (maybe the .WHICH) 14:03
m: my %a{List} = (1, 2) => 42; dd %a
camelia Hash[Any,List] %a = (my Any %{List} = ((1, 2)) => 42)
14:03 sufrostico left
geekosaur hm 14:04
SmokeMachine m: my %a{Int} = 1 => 42; say %a{1} 14:05
camelia 42
geekosaur oh, it stringified.
14:05 sufrostico joined
timotimo will => stringify numbers, too? 14:05
m: say (1 => 42).perl
camelia 1 => 42
timotimo m: say (1 => 42).key.perl 14:06
camelia 1
SmokeMachine m: my %a{Int} = 1 => 42; say %a.keys.head.WHAT
camelia (Int)
timotimo ok, it won't
geekosaur m: my %a{List} = :{(1, 2) => 42}; my $l = List.new: 1,2; say %a{$l}
camelia Potential difficulties:
Useless use of hash composer on right side of hash assignment; did you mean := instead?
at <tmp>:1
------> 3my %a{List} = :{(1, 2) => 42}7⏏5; my $l = List.new: 1,2; say %a{$l}
(Any)
geekosaur m: my %a{List} := :{(1, 2) => 42}; my $l = List.new: 1,2; say %a{$l} 14:07
camelia Type check failed in binding; expected Associative[Any,List] but got Hash[Mu,Any] (:{((1, 2)) => 42})
in block <unit> at <tmp> line 1
geekosaur too tired to figure this out :/
14:09 perlawhirl left 14:19 bjz left 14:26 wamba joined
raschipi Has anyone played with this: www.cl.cam.ac.uk/~mgk25/ucs/example...8-test.txt 14:27
?
14:30 eroux joined, eroux left 14:37 curan left 14:42 sufrostico left 14:44 sufrostico joined 14:47 eroux joined 14:48 eroux left 14:50 eroux joined 14:51 eroux left 14:54 eroux joined, eroux left 14:57 eroux joined, nowan left 14:58 wamba left, eroux left 14:59 itaipu left, nowan joined, itaipu joined 15:08 eroux joined 15:09 eroux left, eroux joined 15:10 eroux left 15:19 eroux joined 15:20 eroux left 15:23 eroux joined, eroux left 15:25 vendethiel- left 15:30 eroux joined, eroux left 15:31 xtreak left 15:32 xtreak joined 15:35 eroux joined, eroux left 15:36 eroux joined, eroux left 15:40 itaipu left 15:41 eroux joined, eroux left 15:42 itaipu joined 15:47 eroux joined, eroux left 15:48 eroux joined, eroux left 15:50 sufrostico left 15:54 eroux joined, eroux left 15:55 khw joined 15:56 gdonald left 15:57 gdonald joined 15:58 abraxxa left
Geth doc: titsuki++ created pull request #1261:
Add an index for Single Argument Rule Slurpy
16:02
doc: a67540419a | titsuki++ | doc/Type/Signature.pod6
Add an index for Single Argument Rule Slurpy
doc: 8817092203 | (Itsuki Toyota)++ | doc/Type/Signature.pod6
Merge pull request #1261 from titsuki/single-argument-rule-slurpy

Add an index for Single Argument Rule Slurpy
16:02 eroux joined 16:03 eroux left 16:06 dakkar left 16:07 eroux joined, sufrostico joined, eroux left 16:08 nhywyll joined, robertle left 16:18 eroux joined, eroux left 16:20 eroux joined
SmokeMachine m: my %a; say %a{1;2;3;4;5} 16:20
camelia ((Any))
SmokeMachine m: my %a; say %a{1,2;2;3;4;5}
camelia ((Any) (Any))
SmokeMachine m: my %a; say %a{1,2;2;3;4;5,6}
camelia ((Any) (Any) (Any) (Any))
16:21 eroux left, eroux joined 16:22 eroux left 16:23 domidumont1 left 16:24 Zoffix joined
Zoffix Perl 6 IO TPF Grant: Monthly Report (March, 2017): blogs.perl.org/users/zoffix_znet/20...-2017.html 16:25
.tell [Coke] my March report is now available: blogs.perl.org/users/zoffix_znet/20...-2017.html You can get it in Markdown format at github.com/zoffixznet/IOwesomeness...ar-2017.md 16:26
yoleaux Zoffix: I'll pass your message to [Coke].
16:26 Zoffix left 16:32 xtreak left
[Coke] . danke 16:34
yoleaux 16:26Z <Zoffix> [Coke]: my March report is now available: blogs.perl.org/users/zoffix_znet/20...-2017.html You can get it in Markdown format at github.com/zoffixznet/IOwesomeness...ar-2017.md
16:34 wamba joined 16:40 ChoHag joined 16:44 robertle joined 16:45 mcmillhj left, ChoHag left 16:47 mcmillhj joined, tojo joined 16:48 raschipi left 16:50 domidumont joined 16:51 wamba left, ChoHag joined 16:53 TeamBlast left 16:55 TeamBlast joined 16:56 mcmillhj left 16:59 Sound left 17:00 Actualeyes left 17:01 sufrostico left 17:06 Actualeyes joined 17:08 mcmillhj joined 17:26 Sgeo left 17:34 hankache joined 17:37 Sound joined 17:38 Cabanossi left, raschipi joined 17:40 zakharyas left 17:41 itaipu left, Cabanossi joined 17:42 khw left 17:46 hankache left 17:47 raschipi left 17:48 itaipu joined 17:53 nhywyll left 17:55 itaipu left 17:56 spider-mario left, setty1 joined 17:57 spider-mario joined 18:03 sufrostico joined 18:09 lostinfog joined 18:12 estrabd left 18:14 estrabd joined, estrabd left 18:16 estrabd joined 18:17 estrabd left 18:18 estrabd joined 18:26 cdg left 18:29 dct joined 18:33 araujo left
gfldex does IO support any form of locking? 18:33
stmuk_ zoffix++ 18:34
18:35 araujo joined, araujo left, araujo joined 18:37 TeamBlast left 18:39 TeamBlast joined
RabidGravy gfldex, like " method lock(IO::Handle:D: Int:D $flag)" ? 18:39
gfldex RabidGravy: either such method does not exist or it's an ENODOC 18:41
RabidGravy well, it's in the source so it exists
18:41 lostinfog left
gfldex where is the method to test for a lock? 18:42
"file locks under Unix are by default advisory" 18:43
RabidGravy er yes
18:43 espadrine_ joined
gfldex so having a lock method without a test is kinda pointless 18:43
RabidGravy er, no
gfldex well, you can lock it ofc. You just can't honour locks. 18:44
18:44 dct left
gfldex I want to be nice :( 18:44
RabidGravy sure, you lock the file , some other process tries to lock the file and it blocks until it is unlocked 18:45
gfldex doesn't make for very good error messages tho 18:46
[Coke] .seen froggs
yoleaux I saw FROGGS 17 Jan 2017 21:11Z in #perl6: <FROGGS> dataf3l: to this: hg.dyncall.org/pub/dyncall/dyncall/...allf.c#l91
RabidGravy or I guess, non-blocking it throws and exception
gfldex I can use a Promise.anyof ofc to get at least a timeout 18:47
RabidGravy: did you try if .lock actually blocks?
RabidGravy no, I'm just guessing it uses the flock semantics 18:48
gfldex roast seams not to know about .lock 18:50
18:51 vendethiel joined
RabidGravy Looking in Moar it does non-blocking and throws an exception 18:52
18:59 sjoshi joined
RabidGravy You could of course implement your own with lockf 19:01
19:02 darutoko- left
gfldex RabidGravy: wouldn't work on windows. The .open call would already throw. 19:03
and it's not that hard to fake blocking 19:04
19:04 astj_ left
gfldex RabidGravy: could you point me to the moar source please? 19:05
19:05 sjoshi left
RabidGravy line 384 in src/io/syncfile.c 19:06
19:06 ParsonsNose joined 19:09 wamba joined
Voldenet gfldex: it's not hard to fake blocking, but wrappers will be of inferior performance relatively 19:10
19:12 yqt joined 19:15 Tonik joined
gfldex no enum to build $flag 19:16
19:16 labster joined
gfldex ohh, there is a plan for that already 19:16
19:17 jonas1 left 19:18 sufrostico left
samcv hello all 19:20
19:23 Sgeo joined, setty1 left 19:24 AlexDaniel joined 19:27 domidumont left 19:29 nadim joined 19:39 Cabanossi left 19:40 nadim left, nadim_ joined 19:41 Cabanossi joined 19:45 perlawhirl joined, bjz joined 19:46 TeamBlast left 19:49 TeamBlast joined 19:51 dct joined 19:56 TeamBlast left, bjz left, nadim_ left, dj_goku left 19:59 TeamBlast joined 20:02 dudz joined 20:07 ChoHag left 20:09 perlawhirl left 20:11 andrzejk_ joined 20:12 dct left 20:15 haxmeister joined 20:16 raschipi joined, TeamBlast left 20:17 cdg joined 20:18 dct joined 20:20 TeamBlast joined 20:21 mst left, mst joined 20:23 Cabanossi left 20:24 dct left 20:25 Cabanossi joined 20:36 dct joined 20:37 cyphase left 20:39 cyphase joined, raschipi left
andrzejk_ huh virtualization on mac 20:42
is very poor
geekosaur ? 20:43
20:45 sufrostico joined
Voldenet well, macs were never superior to windows/linux 20:47
as servers, obviously, desktops are /tastes/
20:50 itaipu joined 20:54 lichtkind__ joined 20:58 lichtkind_ left
andrzejk_ Voldenet i see 21:00
Voldenet I cann't test my app on linux in this stupid mac
the virtual machine freeze all the time 21:01
geekosaur which virtual machine? 21:02
DrForr When I was using Macs, "Parallels" was the rage, but that's probably changed quite a bit.
geekosaur virtualbox is buggy, that's because virtualbox sucks. parallels and vmware work fine, so it's not "virtualization sucks"
m44st4 c'est que dans ELF64 - shellcoding, le binaire est SUID, mais on a pas d'appel system autorisé vers geteuid et setreuid ? 21:03
geekosaur parallels is fast but mishandles edge cases, vmware is slower but tick solid
*rock solid
where did I get "tick" from?
21:03 gdonald left
andrzejk_ geekosaur maybe it is buggy but it is free 21:03
21:03 gdonald joined 21:04 Tonik left
Voldenet andrzejk_: just run linux natively 21:05
andrzejk_ Voldenet linux on imac works even worse
Voldenet whoa, seriously? :o 21:06
i thought apple's hardware was ok
geekosaur I can't say it's worse than running linux on random HP laptops (or random laptops period...)
21:07 zakharyas joined
andrzejk_ Voldenet it is okay, but imac2015 got really fucked display card support 21:07
so it is much more better to got osx 21:08
21:08 yqt left, skids left 21:10 RabidGravy left, kurahaupo_ joined 21:11 kurahaupo__ left, kurahaupo_ is now known as kurahaupo 21:18 cdg_ joined 21:20 cdg left 21:23 tojo left 21:24 andrzejk_ left, mcmillhj left 21:33 secki joined, zakharyas left 21:37 literal_ joined 21:40 Cabanossi left, Cabanossi joined 21:44 mcmillhj joined
El_Che geekosaur: in my experience, virtualbox is a lot less buggy than vmware workstation 21:44
geekosaur: and certainly you don't have to wait month for a fix after new OS releases 21:45
21:45 dct left
El_Che geekosaur: I have a paid VMware license (work) and moved nevertheless to virtualbox 21:45
21:49 haxmeister left 21:50 TEttinger left 21:55 wamba left
Voldenet El_Che: ymmv - vmware on windows handled usb devices best (compared to qemu/vbox), qemu/kvm were the easiest to script for me 21:56
so I bet it all depends on what are you using it for
El_Che vbox works fine nowadays even with usb3 21:57
it sucked in the past in that regard
Voldenet Hm, I've had some problems with usb 3.0 but it was in the past idd
El_Che i got the vmware license when vbox crashed too much 21:58
but in like a year the tables turned
Voldenet Well, free software will always have more testers 21:59
El_Che (and I switched my os at work from a managed windows with virtualized linux to an illegal linux with a win vm)
Voldenet and in the long run it should win (unless someone pours in enormous amounts of money)
El_Che life is good now ;)
yeah. The tricky part is the Oracle overlord
but so far it's ok 22:00
Voldenet Well, when you balance the costs I'm sure testing is not very cheap and getting free testers is really awesome
especially when you consider number of configs to test on 22:01
however, you can release paid product and treat your consumers as testers too }:->
samcv hi Voldenet
Voldenet Oh, hi again! :)
El_Che the clue is actuelly follow the release (be up to date) and roll back if the new release is buggy 22:02
Voldenet: lol
22:05 rindolf left, damnlie_ left 22:08 secki left, espadrine_ left
alphah hello perl6, I have this grammar that parse linux package name of the form: name-ver-arch-build.ext gist.github.com/anonymous/04e1f3c6...8f2f79813c 22:09
I'm trying to modify the grammar to parse packages which have hyphen "-" in name
Voldenet hmmm, hmmm, you'd need to make your token regexes 22:11
(that's what I think at least)
22:12 cdg_ left
Voldenet that's because tokens can't really backtrack, so the name has to make a choice whether to match the first part as a package name 22:12
however, you could also try this 22:13
alphah hmm, aah gotcha
Voldenet token name { <alnum>+ [ '-' <-[0-9]><alnum>+ ]? }
it won't match packages of format "something-9test" but that's not a realistic case :) 22:14
and 'something-3...' is probably a version
alphah yes I think this is enough for my case, I dont think I will have complicated package names 22:15
Thanks a lot Voldenet 22:16
22:17 damnlie joined
Voldenet therefore if you 22:18
erm
wrong chan :P
ehm, bad habits, perl6 doesn't allow 0-9 22:19
> token name{ <alnum>+ [ '-' <-[0..9]><alnum>+ ]? }
that's what I meant
alphah yes, last one worked 22:20
Voldenet or even better
token name{ <alnum>+ [ '-' <!digit><alnum>+ ]? } 22:21
readability
actually 22:22
token name{ <alnum>+ [ '-' <!digit><alnum>+ ]* }
so it'd even match
some-funky-package-2.0-armv7-3.pkg
alphah better :like: 22:24
22:32 literal_ left
Voldenet actually, it's tricky to parse them package names :) 22:36
timotimo <!digit> isn't the same as <-[0..9]> though 22:37
Voldenet Oh?
timotimo m: say "⁵" ~~ / <!digit> /; say "⁵" ~~ / <-[0..9]> / 22:38
camelia 「」
「⁵」
Voldenet hm, so digit is more like :N?
say "⁵" ~~ / <!digit> /; say "⁵" ~~ / <-:N> /
timotimo not sure about its precise definition
Voldenet m: say "⁵" ~~ / <!digit> /; say "⁵" ~~ / <-:N> /
camelia 「」
Nil
Voldenet m: say "⁵" ~~ / <!digit> /; say "⁵" ~~ / <!:N> /
camelia 「」
Nil
22:39 lukaramu_ left
Voldenet hmmm, docs say that <!:N> should work as negation 22:41
oh
:!N
m: say "⁵" ~~ / <!digit> /; say "⁵" ~~ / <:!N> /
camelia 「」
Nil
alphah hmm 22:42
Voldenet m: say ($_ ~~ / <:!N> /) for <1 a b c>
camelia Nil
「a」
「b」
「c」
timotimo tbh, i'm a bit surprised it even creates a match object there
for <!digit>
Voldenet m: say ($_ ~~ / <!digit> /) for <1 a b c> 22:43
camelia 「」
「」
「」
「」
timotimo oh 22:44
haha
yeah, it's a lookahead assertion
Voldenet Oh, wow. :D 22:45
timotimo i meant <-digit> there 22:46
m: say "⁵" ~~ / <-digit> /
camelia 「⁵」
timotimo oh, OK
22:51 itaipu left 22:52 BenGoldberg joined 22:59 robertle left 23:03 asdfgh joined 23:05 salva0 left 23:06 pmurias left, mcmillhj left 23:07 mcmillhj joined 23:12 mcmillhj left 23:23 mcmillhj joined 23:25 kyan joined 23:27 stmuk joined 23:28 mcmillhj left 23:29 stmuk_ left
BenGoldberg m: sub foo { my $i = 0; gather do while callframe($i++) -> $c { take $c.file } }; foo; 23:32
camelia ctxcaller needs an MVMContext
in block <unit> at <tmp> line 1
23:32 kurahaupo__ joined 23:34 kurahaupo left 23:37 kurahaupo__ left
u-ou m: my $p = start { .say for lines }; await $p 23:42
camelia »Wann treffen wir drei wieder zusamm?«
»Um die siebente Stund‘, am Brückendamm.«
»Am Mittelpfeiler.«
»Ich lösche die Flamm.«
»Ich mit«

»Ich komme vom Norden her.«
»Und ich vom Süden.«…
u-ou why is that in German?
OH
timotimo just for fun
AlexDaniel it's just a stdin
u-ou that wasn't an error
timotimo hahaha :D
AlexDaniel maybe you will like this one more
23:42 TEttinger joined
AlexDaniel e: say slurp 23:42
evalable6 ♥🦋 ꒛㎲₊⼦🂴⧿⌟ⓜ≹℻ 😦⦀🌵 🖰㌲⎢➸ 🐍💔 🗭…
AlexDaniel, Full output: gist.github.com/160cd051ac0a74ad99...7e20c48beb
u-ou I get an error when I try that code
timotimo that would be hilarious
if rakudo just randomly gave german error messages sometimes 23:43
u-ou error: error is in the wrong language
23:43 ParsonsNose left
TimToady error: you don't know Swahili, so just guess 23:44
u-ou maybe perl7 should just be a language for error messages
AlexDaniel (and written in error messages also) 23:45
u-ou so with that code I tried I get Tried to read() on a socket from outside its originating thread 23:47
23:47 mcmillhj joined
timotimo yeah, that's what we get for using libuv for synchronous code 23:47
you can use an older version of rakudo where you don't get that error, but then you'll just get nothing from that "socket" at all 23:48
u-ou :< 23:50
23:51 mcmillhj left 23:53 Cabanossi left 23:56 Cabanossi joined 23:58 skids joined