»ö« 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.
geekosaur you haven't tried to use a C dependency on Windows, have you? (it's not just language; start with just finding the @#$% DLL...) 00:02
zengargoyle can you not put C in a DLL and have it in your $?RESOURCES or whatnot? 00:05
geekosaur it necessarily gets renamed, then something like gtk that relies on runtime loading of stuff breaks because the dll has the wrong name 00:07
but, you still have to get the stuff built. (a) windows does not come with a c compiler (b) neither does rakudo (c) if you try to make a user build gtk or readline, they will kill you (d) if you try to build it as part of a module install, you will want to kill yourself 00:08
zengargoyle ah, gotcha. 00:10
geekosaur and if you download it, you get to hope it didn't change incompatibility (especially fun with gtk3, which doesn't have a stable api or abi unless the gnome devs finally got a clue) 00:11
zengargoyle i haven't tried, but i've thought about just copying some .so i need and pretending i built it like with LibraryMake just making sure the're all loaded. 00:12
zengargoyle things like LD_LIBRARY_PATH and LD_PRELOAD usually work for me when some extreme trickery is needed. (but you do sometimes have to set ENV and re-exec yourself. 00:14
geekosaur glwt on windows 00:15
Zoffix Doc site isn't updating for some reason 00:22
oh, some reason = hack is ded 00:24
can't ssh
Zoffix Anyone got the keys to the thing that fixes things on it? :) 00:27
Zoffix .tell timotimo no one's around ATM and I dunno when you'll get this message, but hack is ded and docs ain't building. Would you restart it, please? 00:31
yoleaux Zoffix: I'll pass your message to timotimo.
lookatme morning 00:37
ijneb If I have two loops to go through every pixel in a picture 00:43
What's the best way to modify that so that I can go through 10 pixels at a time in parallel
AlexDaniel ijneb: have you tried .hyper or .race? 00:46
MasterDuke ijneb: instead of something like: `for @a { for @b { } }`, you could try `for @a.race(:10batch) { for @b.race(:10batch) { } }`
ijneb I've never used this, I'll play around with it -- thanks guys 00:49
lookatme looks cool :)
lookatme m: for [1..10].hyper(:5batch) -> $x { say $*THREAD, " GOT $x"; } 01:01
camelia ( no output )
lookatme m: for [1..10].hyper(:5batch) -> $x { say $*THREAD, " GOT $x"; }; sleep 5; 01:02
camelia ( no output )
ijneb I'm confused
Why isn't gist.github.com/anonymous/efb38a09...32b0f14cd3 giving any output
lookatme But why it not working if I remove the around parentheses
m: (for [1..10].hyper(:5batch) -> $x { say $*THREAD, " GOT $x"; }); sleep 5;
camelia Thread #4 GOT 1
Thread #5 GOT 6
Thread #4 GOT 2
Thread #5 GOT 7
Thread #4 GOT 3
Thread #4 GOT 4
Thread #5 GOT 8
Thread #4 GOT 5
Thread #5 GOT 9
Thread #5 GOT 10
01:03
lookatme ijneb, glot.io/snippets/eshzzzsc2k 01:10
AlexDaniel interesting, it seems to throw it away in sink context
ijneb weird 01:11
lookatme I added the parentheses and it works fine. :)
AlexDaniel it may be a bug, I'm not sure 01:12
ijneb if it's on multiple lines, it doesn't seem to work
ijneb weird, still doesn't work for me 01:15
lookatme m: say for [1..10].hyper(:5batch) -> $x { say $*THREAD, " GOT $x"; }; sleep 5;
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of bare "say"; in Perl 6 please use .say if you meant to call it as a method on $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun
at <tmp>:1
--…
lookatme m: say do for [1..10].hyper(:5batch) -> $x { say $*THREAD, " GOT $x"; }; sleep 5;
camelia Thread #5 GOT 6
Thread #4 GOT 1
Thread #5 GOT 7
Thread #4 GOT 2
Thread #5 GOT 8
Thread #5 GOT 9
Thread #4 GOT 3
Thread #5 GOT 10
Thread #4 GOT 4
Thread #4 GOT 5
()
lookatme yeah, it doesn't work in sink context
m: for [1..10].hyper(:5batch) -> $x { say $*THREAD-DDDD; }; sleep 5; 01:16
camelia ( no output )
lookatme AlexDaniel, and it not found that syntax error ^^^ 01:18
it's like a over optimization 01:19
AlexDaniel lookatme: it's just how dynamic variables work 01:20
so there's no compile-time check
( relevant docs: docs.perl6.org/language/variables#The_*_Twigil )
lookatme oh, I forgot it
sorry
:S 01:21
ijneb so
AlexDaniel would be nice to have a ticket for hyper/race thingy, then we will probably see if it's actually a bug or not :) 01:22
ijneb any other way to do this? lol
AlexDaniel ijneb: you can use .map instead of for and then you don't have to worry about it being in sink context 01:23
m: <5 8 9>.race.map({ .say })
camelia 5
8
9
lookatme m: do for [1..10].hyper(:5batch) -> $x { say $*THREAD; }; sleep 5; 01:24
camelia Thread #4
Thread #4
Thread #5
Thread #4
Thread #5
Thread #4
Thread #5
Thread #4
Thread #5
Thread #5
lookatme It can be done add `do` before `for` loop 01:25
:)
ijneb oh, thanks lookatme 01:26
lookatme you welcome. I don't know that .hyper or .race before :) 01:27
AlexDaniel actually 01:32
c: HEAD for <a b c>.hyper { say 2 }
committable6 AlexDaniel, ¦HEAD(6745517): «»
AlexDaniel c: 2016.06 for <a b c>.hyper { say 2 }
committable6 AlexDaniel, ¦2016.06: «2␤2␤2»
AlexDaniel may be a regression
bisect: for <a b c>.hyper { say 2 } 01:33
bisectable6 AlexDaniel, Bisecting by output (old=2015.12 new=6745517) because on both starting points the exit code is 0
AlexDaniel, bisect log: gist.github.com/deb67cc94b8841ba39...040aaf02ce 01:34
AlexDaniel, (2017-06-15) github.com/rakudo/rakudo/commit/9b...a9bb083507
AlexDaniel yep, I guess so
c: 9b0b9effe5^,9b0b9effe5 for <a b c>.hyper { say 2 }
committable6 AlexDaniel, ¦9b0b9effe5^: «2␤2␤2» ¦9b0b9ef: «»
AlexDaniel I'll submit a ticket
lookatme AlexDaniel++ 01:35
AlexDaniel okay, RT #131865 01:41
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131865
AlexDaniel ijneb: thanks :)
ijneb AlexDaniel: Thanks for taking notice c; 01:44
astronav_ perl6 people: what are you guys using it for? 03:06
lookatme astronav_, for fun 03:38
Arlenik hi, i'm trying to rewrite this Haskell code in Perl6: repl.it/KCbm 03:52
this is what i've got so far: glot.io/snippets/esi4g6p6ay
which isn't correct 03:53
BenGoldberg m: my $fizzes := ("", "", "fizz") ... *; say $fizzes[^5] 04:03
camelia ( fizz fjaa fjab)
BenGoldberg m: my $fizzes := ("", "", "fizz") xx *; say $fizzes[^5]
camelia (( fizz) ( fizz) ( fizz) ( fizz) ( fizz))
Arlenik but using 'xx *' gives a list of list, which I can't seem to flatten 04:05
BenGoldberg m: my $fizzes := |("", "", "fizz") xx *; say $fizzes[^5] 04:06
camelia ( fizz )
BenGoldberg m: my $fizzes := flat(("", "", "fizz") xx *); say $fizzes[^5]
camelia ( fizz )
BenGoldberg m: my @f0 := ("", "", "fizz"); my @fizzes = @f[^Inf]; say @fizzes[^5] 04:07
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '@f' is not declared
at <tmp>:1
------> 3y @f0 := ("", "", "fizz"); my @fizzes = 7⏏5@f[^Inf]; say @fizzes[^5]
BenGoldberg m: my @f0 := ("", "", "fizz"); my @fizzes = @f0[^Inf]; say @fizzes[^5]
camelia ( fizz (Any) (Any))
BenGoldberg m: my @f0 := ("", "", "fizz"); my @fizzes := map @f0[* % 3], ^Inf; say @fizzes[^5] 04:08
camelia Cannot resolve caller map(Str, Range); none of these signatures match:
(&code, + is raw)
in block <unit> at <tmp> line 1
BenGoldberg m: my @f0 := ("", "", "fizz"); my @fizzes := map { @f0[$_ % 3] }, ^Inf; say @fizzes[^5]
camelia Type check failed in binding; expected Positional but got Seq (?)
in block <unit> at <tmp> line 1
BenGoldberg m: my @f0 := ("", "", "fizz"); my @fizzes = map { @f0[$_ % 3] }, ^Inf; say @fizzes[^5]
camelia ( fizz )
BenGoldberg m: my @fizzes = roundrobin("", "", "fizz"); say @fizzes[^5] 04:15
camelia (( fizz) (Any) (Any) (Any) (Any))
BenGoldberg m: my @fizzes = gather { take |("", "", "fizz") for ^5 }; say @fizzes[^5] 04:17
camelia (( fizz) ( fizz) ( fizz) ( fizz) ( fizz))
Geth doc: dd83864e7f | (Will "Coke" Coleda)++ | 2 files
Fix xt/ tests.
04:18
doc: 9214d8935e | (Will "Coke" Coleda)++ | STYLEGUIDE.md
Add note about say vs. put in docs.

Closes #1441
BenGoldberg m: my @fizzes = gather { while True { .take for "", "", "fizz" } }; say @fizzes[^5]
camelia (timeout) 04:19
BenGoldberg m: my @fizzes = gather { for ^5 { take $_ for "", "", "fizz" } }; say @fizzes[^5]
camelia ( fizz )
Arlenik glot.io/snippets/esi5739s6ugot it working:
got it working, glot.io/snippets/esi5739s6u
BenGoldberg m: say 42 max 'fiz' 04:20
camelia fiz
BenGoldberg m: say 42 max ''
camelia 42
BenGoldberg wouldn't have thought of using max, but *shrug* ok :) 04:21
Arlenik :) 04:22
moritz lol I blogged: perlgeek.de/blog-en/perl-6/2017-02...years.html 06:42
lookatme moritz++ 07:02
timotimo i restarted hack 07:31
yoleaux 00:31Z <Zoffix> timotimo: no one's around ATM and I dunno when you'll get this message, but hack is ded and docs ain't building. Would you restart it, please?
lookatme How can I get client information when I got a connection from IO::Socket::Async ? 07:39
moritz .tell Zoffix I can give you access to restarting hack, if you're willing to use virt-manager (or comparable tools). Please /msg me an SSH pubkey to use
yoleaux moritz: I'll pass your message to Zoffix.
lookatme Such as ip 07:40
timotimo lookatme: looks like we don't implement that yet 07:52
lookatme Oh, that's shock me. :O 07:53
timotimo .o( we probably also need to implement the happy eyeballs rfc soon-ish ) 08:11
stmuk having the p6doc docs as sqlite would be an excellent idea 09:10
RockyBalboa Hello! Quick question. Let's say I have two string variables : a class name and a method name. Can I dispatch the class and the method dynamically (without using eval) ? 09:12
jnthn ::($class-name)."$method-name"() 09:14
RockyBalboa Ohhh, I love how simple it is! A big thank you jnthn :) 09:15
stmuk next YAPC/TPC in Glasgow 09:19
pierre__ Hi all 09:20
i was playing with concurreny, to see the benefit of 6.d and premption on await compared to 6.c
something i do not understand on 6.c 09:21
let's take a simple example
m: my @p; for ^5 -> $i { @p.push( start { await( Promise.in(1) ); } ) }; await @p; say "elapsed {now - BEGIN { now } }"
camelia elapsed 1.0145656
pierre__ that code is running in 1 second more or less 09:21
if i increment the number of promises on 6.d.PREVIEW , everything works perfectly 09:22
however, on 6.c, it seems that when i hit the threadpool size, instead of take them in "slices", it enter in a dead lock
am i missing something?
timotimo stmuk: i'd need a passport to get in there by the time tpc happens? 09:25
timotimo pierre__: that also happens on my end. interesting, i'd expect it ought to be able to make progress 09:27
pierre__ Are Promises started with start lazy? 09:28
pierre__ what i'm thinking is that 09:28
timotimo lazy in what way?
pierre__ if i exceed the thread pool in the construction of the array
jnthn start just pushes onto the shceduler's queue 09:29
pierre__ the last await will never get called
and hence, the Promises would not be started
jnthn Anyway, the deadlock is because you fill up all of the pool with threads awaiting Promise.in 09:29
And then when the timer fires there's no thread to run the callback on because the pool is full
Thus the hang
timotimo oh, hah
pierre__ oh, ok, and with the premptive execution of 6.d 09:30
one of the await will give hand to the callback
jnthn Well, it's more cooperative than preemptive (in that the await is an explicit hand-off point), but yes 09:30
stmuk timotimo: what? I think you always need a national id card (if your country has one) or a passport?
lookatme HI, I'm play with IO::Socket::Async. I wrote a example, gist.github.com/araraloren/acbc0cf...c5930bf231 09:32
pierre__ anyway, my use case was "a bit dumb", i wanted to understand the difference in 6.d, so i wanted to created more await than the thread loop size :)
jnthn pierre__: You were successful ;)
lookatme my question is how to know the client is quit ? 09:33
lookatme anyone have suggestion :) 09:35
pierre__ what to you mean by quit? 09:35
if by quitting, you mean the client not sending anymore traffic, you will not know if it's "pausing" or quitting 09:36
lookatme close connection
jnthn The Supply you get from the connection will be done
lookatme I mean the client side call .close on their connection 09:36
jnthn but uh
This code doesn't make sense 09:37
lookatme Hmm? something wrong ?
jnthn Calling .tap inside of a react block is wrong 99% of the time
lookatme oh 09:38
jnthn Unless you really, really know what you're doing and want a totally unrelated pipeline :)
jnthn So the whenever should just go directly in there 09:38
lookatme jnthn, yeah, that's ok when I remove the react 09:39
There not too much document about that react.
stmuk TPC is being streamed on Facebook 09:44
timotimo stmuk: it seems like GB has already been an exception to destinations you can get to with just a german id card 09:47
can you watch streams on facebook without a facebook account? 09:48
stmuk "You can enter the UK with either a valid passport or a national identity card issued by a EEA country. 09:49
lookatme jnthn, I added a LAST Phrase, it works now.
stmuk whether that changes in 2017 noone knows. I'd hope and expect not 09:50
2019 I mean
timotimo: www.facebook.com/theperlconference...259637175/ works for me when I'm *not* logged into FB 09:51
timotimo oh cool 09:55
i'll be afk for at least 2 hours first
looks like i can scroll to any place in the stream at any time 09:56
so that's nice
stmuk that link is Damian's talk (which may go away) 09:58
timotimo may go away? :o 10:01
oh is that because he'd like people to pay for his talks or something?
stmuk yes 10:03
andreoss m: role Foo { submethod CALL-ME()} 10:09
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3role Foo { submethod CALL-ME()7⏏5}
andreoss m: role Foo { submethod CALL-ME(\a) {a} }; say Foo(a); 10:10
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
a used at line 1
andreoss m: role Foo { submethod CALL-ME(\a) {a} }; say Foo(1);
camelia Cannot invoke this object (REPR: Uninstantiable; Foo)
in block <unit> at <tmp> line 1
andreoss m: class Foo { submethod CALL-ME(\a) {a} }; say Foo(1);
camelia 1
andreoss is there a way to get CALL-ME on roles? 10:10
without instantiating 10:11
jnthn No 10:12
andreoss m: role Foo { has $.v }; sub Foo($v) { Foo.new: v => $v }; say &Foo.(10); 10:17
camelia Foo.new(v => 10)
Zoffix . 10:21
yoleaux 07:39Z <moritz> Zoffix: I can give you access to restarting hack, if you're willing to use virt-manager (or comparable tools). Please /msg me an SSH pubkey to use
Zoffix .tell moritz they key's is this one: github.com/zoffixznet.keys 10:22
yoleaux Zoffix: I'll pass your message to moritz.
andreoss can i have postcircumfix methods? 10:24
m: role Foo { method postcircumfix:«[]»($a) { $a }}; say Foo.[10] 10:25
camelia (Any)
jnthn No, postcircumfixes are considered a kind of operator, and thus part of the current language, so are located lexically
You'd implement AT-POS or similar in the class 10:26
Or export overloads of the postcircumfix sub if having some reason to
Zoffix cool samcv++ is giving a Unicode talk at TPC www.facebook.com/pg/theperlconfere...e_internal 10:33
m: role Foo { method AT-POS($a) { "heh" x $a }}; say Foo.[10] 10:34
camelia hehhehhehhehhehhehhehhehhehheh
Zoffix AlexDaniel: aren't race 11:16
AlexDaniel: aren't race/hyper still a prototype and aren't meant to be working? 11:17
AlexDaniel Zoffix: I don't think so. I remember jnthn++ doing some fixes recently which were meant to make hyper/race useful
Zoffix I don't recall any work after the semantics were being figured out 11:18
AlexDaniel I don't know if this happened though :)
I mean, I don't know if all of the most important bugs were fixed, but *shrug*
Zoffix huh? 11:19
jnthn No, they weren't 11:19
Zoffix Ok, good. I didn't miss anything good :) 11:20
AlexDaniel ok, bad, I just recommended hyper/race to somebody on this channel :( 11:21
my mistake
Zoffix AlexDaniel: there aren't so much "bugs" in them as they were a prototype that snuck in and people were trying to use it. There's new semantics on the drawing board for how these are meant to work and implementing them is still something to be done. 11:22
here: 6guts.wordpress.com/2017/03/16/con...semantics/
hm so they need to be in 6.d 11:23
that moves the timeline further down 11:24
Zoffix rather get 6.d out earlier and ship them in 6.e instead
Zoffix the docs probably should be amended to that effect :) 11:29
Zoffix &
AlexDaniel yea :S
nadim sena_kun: can you please zef install Data::Dump::Tree and tell me if it is finally installing as it should? 12:08
sena_kun nadim, haiyo. 12:10
Geth doc: 4f4c0579bb | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Iterable.pod6
Mark hyper/race as experimental
12:11
sena_kun nadim, Looks like you failed 10 tests of 21 12:13
nadim, do you need a full log?
araraloren Hi
gist.github.com/araraloren/acbc0cf...bf231?ts=4 12:14
araraloren I update the Supply example, but seems like it can not working on `base on win10` 12:15
It works fine under my fedora
RockyBalboa Hello! I'm just starting to learn Perl. A quick question about modules. If I have a class "World" defined in file "./Hello/World.pm", I can use this class doing "use Hello::World; World.new;" but is it possible to use directly "Hello::World.new" in my code? 12:17
araraloren RockyBalboa, I think you must declare your with `class Hello::World` 12:18
araraloren The example do something like ssh, free for the suggestion :) 12:21
Zoffix RockyBalboa: no. You need to load the module to bring in the stuff in it. 12:23
RockyBalboa: or do you mean using 'Hello::World' instead of just 'World'? 12:24
RockyBalboa Thx! Yes I was meaning just using 'Hello::World' instead of just 'Word' :)
Zoffix RockyBalboa: what's inside your World.pm? 12:25
RockyBalboa Do I have to use the "need" keyword or something like that?
I just have: class World { method run() { say "Hello, World!"; } }
I was wondering if I kind do somehow Hello::World.new.run instead of World.new.run (I am trying to convert a Ruby web framework to Perl 6 who dispatches request to Controller.action). 12:27
Zoffix RockyBalboa: you could name it "Hello::World" or put `unit package Hello;` at the top of the file
Some docs (unsure how good they are): docs.perl6.org/language/modules 12:28
RockyBalboa Ok thanks much Zoffix, I will experiment with that. I'm sure it's easy to do that, I'm just not getting used to work with Perl 6 yet
nadim sena_kun: yes please, the 211 tests pass her :( 12:29
araraloren I have seen that `package`. what's that ?
sena_kun nadim, gist.github.com/Altai-man/f5da19fd...1b13af6b2c - here it goes. I've compiled rakudo yesterday iirc. 12:30
Zoffix araraloren: like a namespace placeholder that can be replaced with a class or module 12:31
araraloren Hmm, I remember it's exist in Perl 5. I thought they were disappear in Perl6. 12:33
nadim sena_kun: thanks, guess if I hate this ... All tests successful. Files=1, Tests=21, Result: PASS
I'll recompile rakudo immediately
sena_kun nadim, how old is your rakudo?
nadim days 12:34
sena_kun hmmm...
nadim sena_kun: Rakudo version 6745517 , latest patch 25 hours ago, all tests pass. what's your version? 12:39
sena_kun nadim, This is Rakudo version 2017.07-138-ga91ad2da8 built on MoarVM version 2017.07-318-g604da4d0
nadim I am just a patch ahead 12:42
sena_kun :/ 12:43
nadim if you clone this and run the test manually? github.com/nkh/P6-Data-Dump-Tree
sena_kun nadim, should I update rakudo? 12:44
nadim I doubt it's a problem with that update but if you want the latest and shinniest ;) 12:44
sena_kun writing code just now, give me a minute... 12:45
sena_kun updated rakudo, trying to install. 12:47
Zoffix This is your regular reminder that you are building random dev commits that could have catastrophic bugs in them. Use releases; they're tested. 12:48
sena_kun Zoffix, they have latest bugfixes I need, so... :) 12:49
nadim, the same result with clonned repo. I hope you run testing without --force? 12:50
Zoffix sena_kun: just saying... Don't come to us crying when a bug wipes your box. 12:51
nadim I use: alias t6='PERL6LIB=lib,t prove -v -e perl6', then t6 t 12:51
Zoffix: can't use releases, two of the bugs I reported in the last weeks were fixes when I reported them. We'll need to learn to suffer :) 12:52
Zoffix That's just stupid.
raschipi Keep backups offsite. 12:53
Zoffix And I assume you're talking about your DDT module? So no one can use it because it's relying on unreleased release of rakudo.
nadim I think what you should ask is how many people build rakudo because they know things are fixed there rather than a release that can be ages old
RockyBalboa And is it possible to import everything from a module? Something like 'use Hello::*;'? 12:54
sena_kun Zoffix, sure, don't worry.
Zoffix nadim: why should I ask that?
moritz m: use Test :ALL; # no idea if this works
yoleaux 10:22Z <Zoffix> moritz: they key's is this one: github.com/zoffixznet.keys
camelia ( no output )
moritz (that was for RockyBalboa) 12:55
nadim Zoffix: that would tell you something about the users and their willingness to get something with bugs fixed
raschipi Most users will only get Rakudo from their distro.
nadim there are a few hundreds of users world wide, not a million
Zoffix nadim: you're using a complicated piece of software that's not been thoroughly tested and when pointed out that it could destroy your installation you shrug it off and tell me I should be asking how many users are equally reckless. 12:56
RockyBalboa moritz: thx, it doesn't seem to work :(
Zoffix puts DDT into the "never use" mental pile 12:57
jnthn Zoffix: We need to strike some balance though. If nobody at all uses bleeding edge releases then we may not know about the issues they introduce, if those aren't covered by whatever testing we do ourselves. 12:58
uh, bleeding edge non-releases I ment :)
*meant
nadim Zoffix: see it like this, it was not able to install because of a zef/Meta problem, it did not work because of a bug that was fixed in dev by the time I reported it, .... When I get it to install and test, finally, on the one version _I_ feel confident with, then I will test with stable. I am not sitting on my ass in the meantime 12:58
nadim Zoffix: you have been unpleasant twice in 10 mn. please stop. 12:59
Zoffix jnthn: they aren't bleeding edge releases, though. They're random commits. 13:01
jnthn Zoffix: Yes, I shouldn't have used the word release, sorry for the confusion.
Zoffix: People testing them and taking the risk are in part doing us a favor, however. 13:02
I agree we shouldn't encourage it as a general practice.
But a handful of people doing it who are willing to help triage/report bugs is useful. 13:03
raschipi nadim: Just please redirect users to a DDT version that doesn't depend on using bleading edge software like that. It's a recipe for a world of hurt. 13:04
ryu0 nadim: At least until the fixes you need so badly are available in a regular release. 13:05
nadim I will but the Rakudo version it works with in the documentation, in clear view. Once it works (it does) and installes on multiple machines , I will run a regression test to find which rakudo release it works on 13:08
So that's a welcome input, better than "stupid", which I may be, and whatever "avoid/garbage" pile 13:09
jast FWIW I thought Zoffix's point was quite clear, and neither did he call you names, nor did he label anything garbage. I see your point, but IMO there was no need to make it personal. 13:14
nadim well the thinkis that Zoffix is actually using it already. Software is nothing personal, it is just software, I just think a helpful tone is more helpful. 13:17
nadim sena_kun: when you run the test, is 04_flat.t the only one failing tests? 13:20
sena_kun nadim, yes. META.t too. And I'd recommend you to move it to xt/. 13:22
nadim was the Test::META problem something like can't find version META::0.5 something? 13:26
sena_kun nadim, Test::META is not installed on this box. 13:27
but just plain: Could not find Test::META at line 7 in:
araraloren jnthn, hi, the code I post here gist.github.com/araraloren/acbc0cf...bf231?ts=4 not working under `bash on win10` 13:29
sena_kun nadim, passes everything except for 04 after installation. 13:30
nadim my understanding is that it should get installed when running the install via Zef. Jnth also had the problem. I don't think we can avoid people having Test::META, even if I am going to move to xt.
nadim sena_kun: the problem is that one line is not there, probably a blank line. I a going to diff my output with your log again. Thanks for the help 13:30
sena_kun: but it's a weird error, same rakudo, almost, same code, and a line difference 13:31
araraloren When the server side receive message from client, it raised an exception
sena_kun nadim, I'm running tests with zef --verbose test ., can you run it like that? 13:32
araraloren I comment the exception below that gist
nadim sena_kun: I will use the same command 13:34
nadim It passes fine. ===> Testing [OK] for Data::Dump::Tree:ver('1.5.3'):auth('github:nkh') 13:36
sena_kun :? 13:37
nadim, my box may be broken then, for more clearer results you need an another tester, I guess. 13:38
nadim There's another one that had problems with Test::Meta, he will test the latest too but it is via issues in github, so a longer round trip. I'll let you know if I find where that line comes from. 13:40
at least we are testing the same way, a good start 13:41
El_Che I am browsing the sources, but is there a doc with RAKUDO internal vars with info what classes are loaded (and hopefully fron where they were loaded)? 13:51
nadim sena_kun: It's not your box, it's my test. You probably don't have Term::ANSIColor installed. I do and that's why my tests pass. I forget to out the output in BW to handle that case. So this was very helpful 13:58
sena_kun: as for Test::META, it get's installed as a dependency by Zef, I can see that happening in the log you send 13:59
sena_kun nadim, well, then no idea about Test::META. Glad that my help was useful. 14:00
nadim very,
Zoffix El_Che: docs.perl6.org/programs/00-running..._Variables 14:02
and github.com/rakudo/rakudo/wiki/dev-env-vars
[Coke] gets charged by "gittip" (now gratipay) for the first time in years. 10c a week adds up to something after 2+ years... 14:45
Zoffix m: say .1*104 14:46
camelia 10.4
nadim is there a pattern to the tags that are *releases*? the geography sounding tags or the year.month ones? 15:00
Zoffix hehe. I noticed the 255 exit code when I wrote Die.pm6 but figured I'd rather replicate rakudo's code. Looks like it was the right decision :P perltricks.com/article/git-bisect-and-perl/ 15:11
buggable: eco die
buggable Zoffix, Die 'Perl 5 like die routine for note + exit': github.com/zoffixznet/perl6-Die
Zoffix Tho we still have that same problem with Rakudo and Test.pm6. You'd have >=125 exit code if you have >=125 failing tests 15:13
stmuk perl 6 super glue live! 15:14
Zoffix where 15:15
give l;inks
stmuk web.facebook.com/theperlconference...vqkF9eBA6M
maybe remove session part
Geth ecosystem: dboys++ created pull request #360:
Added WWW::SilverGoldBull package
15:24
Geth ecosystem: 62bb3cc16f | (Denis Boyun)++ (committed by Zoffix Znet) | META.list
Added WWW::SilverGoldBull package (#360)
15:36
Zoffix buggable: eco author:github 15:37
ugexe windows can exit above 255 I think
buggable Zoffix, Found 108 results: 007, Inline::Perl5, November, HTTP::UserAgent, Inline::Python. See modules.perl6.org/s/author%3Agithub
Zoffix Why do people prefix their author name with `github`?
ugexe because $!auth = $auth // $authority // $author currently, so it shows up in their module auth just the same 15:38
ugexe that needs to go in 6.d 15:38
go away
Zoffix wouldn't mind `auth` key in META 15:39
ugexe lots of us use that
Zoffix star: use LWP::Simple: use JSON::Fast; my $d = from-json LWP::Simple.get: "ecosystem-api.p6c.org/projects.json"; say $d.grep(*<auth>.so)/$d.elems 15:41
camelia ===SORRY!===
P6M Merging GLOBAL symbols failed: duplicate definition of symbol INET
Zoffix -_-
ugexe `Simple:`? 15:42
Zoffix oh. wow, taht's one crappy error 15:42
star: use LWP::Simple; use JSON::Fast; my $d = from-json LWP::Simple.get: "ecosystem-api.p6c.org/projects.json"; say $d.grep(*<auth>.so)/$d.elems
camelia ===SORRY!===
P6M Merging GLOBAL symbols failed: duplicate definition of symbol INET
Zoffix or not
ugexe lol
github.com/sergot/http-useragent/issues/178 similar issue here 15:43
that one makes a bit more sense though
Zoffix Anyway, the answer is 22% or 196 dists 15:44
That's pretty good
ugexe they both have a *::Response (which should be totally fine, its just something to correlate to). how this could happen with INET though? thats not good
smls m: sub f (Str() $a) { dd $a }; f Str; 15:52
camelia Str $a = Str
smls m: sub f (Str() $a) { dd $a }; f Any;
camelia Use of uninitialized value of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in sub f at <tmp> line 1
Str $a = ""
smls ^^ What is going on there?
ugexe Zoffix: hmm github.com/perl6/perl6-lwp-simple/...META6.json github.com/perl6/perl6-lwp-simple/.../Simple.pm 15:53
one has `auth`, the other only `author` and `authority` - and neither are the same. maybe related
jnthn smls: The Str type object already meets the type required, so no coercion is done. The Any one doesn't, so Any.Str is called, which warns.
lizmat m: dd Str.Str 15:54
camelia Use of uninitialized value of type Str in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in block <unit> at <tmp> line 1
""
smls Ah, right.
It just confused me that the (Any) turned into a definite Str, but apparently that's what .Str does. 15:55
*defined
Zoffix ugexe: would be nice to keep auth in meta though. So just by looking at the meta file you can know all you need about the dist. I'm not really use what :auth and :ver tagged on to a class do currently 15:57
Zoffix s/really use/really sure/; 15:58
ugexe right. also it works for me on 2017.07, so makes me think its precomp related somehow
Zoffix RE update to htmlify.p6 I was rambling on about yesterday. I'm gonna go with Learn C -> write SQLite.pm6 -> write Pod::To::SQLite and then rewrite htmlify.p6 or then-to-be sqlify.p6, I guess 16:18
So it's gonna take awhile. don't wait up :) 16:19
jdv79 sounds complicated 16:23
ryu0 Zoffix: you've never used C before? 16:25
jnthn Talking of complicated... MoarVM just learned how to do speculative invocation optimizations. It *will* need tuning yet, but the upshot is (don't generalize from this, please :P) that `for ^10000000 { }` now runs in half the time it used to.
Zoffix \o/
jdv79: well, I need SQLite.pm6 for many other tasks, so it's worth it :)
ryu0: not really. Never had anything good to make with it. 16:26
ryu0 Zoffix: i happened to specialize in C for a number of years. maybe i can assist if you have questions or so.
Zoffix I'm currently reading "C Programming: A Modern Approach" seems a stellar book. 30% through it so far :) 16:27
jdv79 jnthn: cool
ryu0 which standard is it built on?
smls jnthn: Is "invocation optimizations" the same as inlining?
jdv79 Zoffix: don't we have DBIish? 16:28
ryu0 Only ANSI C is more or less fully implemented by all C compilers.
I have yet to see a cross-platform compiler that is fully C99 or C11 compliant.
jnthn smls: It allows further inlining.
Zoffix jdv79: I hate it tho
ryu0 Zoffix: what function(s) does the book recommend for string building? 16:29
jnthn smls: Effectively, when it can't prove what the callee is, but it can see from the stats it's pretty stable, it sticks a guard caluse in.
*clause
And then optimizes as if it knew
Zoffix ryu0: didn't get that far yet. And it covers C88 and C99
*c89
ryu0 Ah. C11 doesn't add much of interest.
ryu0 Zoffix: so how did you get into Perl6? i mean, what was your starting resource? 16:31
jdv79 i've only read the c book. didn't find it terribly interesting.
ryu0 ANSI C book? 16:32
smls jnthn: Isn't "can't prove what the callee is" mostly an issue with method calls?
(Wondering why it affects `for ^10000000 { }`...) 16:33
jdv79 i guess. the one by k&r.
jnthn Because the {...} is a closure 16:34
Since for is effectively map
We in theory *could* prove what it is in this case
But closure cloning is relatively high level 16:35
In that we clone the Perl 6 code object and clone the underlying code ref
Zoffix ryu0: annoying people in this channel and working on the compiler :) 16:35
jnthn So we'd need to be able to do fairly sophisticated inter-procedural alias analysis to track that, noting that .clone is a method so we'd already be some speculation deep :) 16:36
smls jnthn: Or cheat and optimize `for` loops specially... :P 16:37
jnthn smls: NQP does that. For Perl 6 it's more fraught
But cheating would still leave us with a bunch of other places we'd want this kind of opt :)
smls true
jnthn Also, every bit of clever we do in Perl6::Optimizer slows down compilation 16:38
For code that might not even be run much
So when we can avoid games there and get the win out of a more general optimization, it's preferable. :) 16:39
Dinner time; bbl
smls m: for ^100 -> $i { start { 'A'.match: /('A') { say "$i: ", $0 if not $0 }/ } } 17:51
camelia 93: Nil
smls m: for ^100 -> $i { start { 'A'.match: /('A') { say "$i: ", $0 if not $0 }/ } }
camelia 2: Nil
5: Nil
2: Nil
9: Nil
22: Nil
23: Nil
21: Nil
26: Nil
29: Nil
30: Nil
33: Nil
38: Nil
35: 「A」
41: Nil
41: Nil
41: Nil
45: Nil
48: Nil
54: Nil
56: 「A」
63: Nil
65: Nil
67: 「A」
70: Nil
72: Ni…
smls ^^ I think I found a concurrency bug with regexes.
AlexDaniel smls: maybe we should try bisecting it 17:55
bisect: for ^100 -> $i { start { 'A'.match: /('A') { say "$i: ", $0 if not $0 }/ } }
bisectable6 AlexDaniel, Bisecting by output (old=2015.12 new=1761f95) because on both starting points the exit code is 0
AlexDaniel, bisect log: gist.github.com/c04a40f14712ce5a67...1f87d3bcdb
AlexDaniel, (2016-08-03) github.com/rakudo/rakudo/commit/08...03193e7024
AlexDaniel smls: seems to be a regression after 2016.07
hm, ow yeah, this look relevant 17:56
s
AlexDaniel to me it feels like this commit should've fixed the bug :) 17:56
smls heh :) 17:57
AlexDaniel mch: for ^100 -> $i { my $z = ~$i; start { $z.match: /(“$z”) { say "$i: ", $0 if not $0 }/ } } 17:57
committable6 AlexDaniel, gist.github.com/7be0df7df542e34134...e45b06e5ab
AlexDaniel smls: I think you should submit a ticket. Maybe slap a [REGRESSION] tag, maybe not… this is way too old :) 17:59
smls Ok. gtg now, will submit later. 18:00
AlexDaniel thanks
Zoffix It's not a regression tho 18:03
Or maybe it is. 18:04
It's just before that commit, it looks like the $/ was shared around, so it wasn't necesarily "not $0" 18:05
Zoffix c: 08e39ee2653b1ae^ await ^100 .map: -> $i { $/ = 42; start { "$i".match: /(\d+)/; if $i != +$0 { say "Boom: $i $0" } } } 18:07
committable6 Zoffix, gist.github.com/557c6716c35afeee06...a3daf22c47
Zoffix Yup.
wictory[m] Hi! I'm getting "Could not find symbol &SOMETHING" when I try to access a symbol in an enum 18:32
nadim is the enum defined in the same scope? 18:33
raschipi wictory[m]: Can you golf the error down and then put it in a pastie for us?
wictory[m] The enum is defined inside a class, and I get the tests to run, but when I try to access it from a script outside of the tree it doesn't work
Zoffix wictory[m]: did you export the enum?
nadim then you must export them
Zoffix (if the class is inside the module)
wictory[m] no I haven't
timotimo m: sub ding { enum FooBar <Yoink Bongo> }; say Yoink;
camelia Yoink
nadim or have them at a higher scope
Zoffix wictory[m]: pastebin some code :) 18:34
timotimo m: class ding { enum FooBar <Yoink Bongo> }; say ding::Yoink;
camelia Yoink
timotimo m: class ding { enum FooBar <Yoink Bongo> }; say Yoink;
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
Yoink used at line 1
timotimo m: class ding { enum FooBar <Yoink Bongo> is export; }; say Yoink;
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3class ding { enum FooBar <Yoink Bongo>7⏏5 is export; }; say Yoink;
expecting any of:
infix
infix stopper
postfix
timotimo oops, that's not how you do that
Zoffix export before values 18:35
timotimo m: class ding { enum FooBar is export <Yoink Bongo>; }; say Yoink; 18:37
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
Yoink used at line 1
timotimo ah but i'll still have to write FooBar in front then?
m: class ding { enum FooBar is export <Yoink Bongo>; }; say FooBar::Yoink;
camelia Could not find symbol '&Yoink'
in block <unit> at <tmp> line 1
timotimo or not?
oh
m: class ding { enum FooBar is export <Yoink Bongo>; }; import ding; say Yoink;
camelia Yoink
timotimo there it is
export alone doesn't mean the outer scope imports it 18:38
just says what gets imported when you do import it
gfldex there are packages all the way down :)
timotimo this is the pack age 18:39
anyway, wictory[m], does that help at all?
nadim lol! if that doesn't help .... 18:41
m: 'X'.lines.elems.say ; "X\n".lines.elems.say ; "X\n\n".lines.elems.say ; 18:42
camelia 1
1
2
wictory[m] timotimo: sry I will try this now 18:42
This is the enum in question github.com/wictory/openssl/blob/10...ls.pm6#L14 18:45
wictory[m] I didn't use any < or >, is this wrong? 18:46
raschipi wictory[m]: No, it's fine, they are two ways to write the same thing.
wictory[m] so, should it be "is export"? 18:47
I'm running my out-of-tree script with "perl6 -I~/dir/perl6-openssl test.p6", to override the zef installed OpenSSL module 18:48
nadim wictory[m]: either #1 use 'is export' where you define your class and enums + import in your script or # do not use "is export" and use class::Enum to access your enum. 18:51
wictory[m] hmm so if I use "use OpenSSL::RSATools;", it will not work? 18:57
nadim wictory[m]: timotimo showed you the code for both ways, I re-explained them. Try, following timotimo sysntex, it's just 2 tries, if it still fails, nopaste your code as you have been asked above. 19:21
nadim s/sysntex/syntax/ 19:23
wictory[m] ok everyone :) so the "is export" works (obviously), the problem was that I used "perl6 -I~/dir/perl6-openssl test.p6" instead of "perl6 -I ~/dir/perl6-openssl test.p6" (notice the space) 19:33
thanks everyone for your time!
geekosaur yeh, ~ is actually shell magic and the shell won't translate it unless it's preceded by space (or colon) 19:34
wictory[m] yez 19:35
wictory[m] yes, turns out "perl6 -I$HOME/dir/perl6-openssl test.p6" works, I better remember this .. 19:36
smls m: my $c = Channel.new; (await ^10 .map: -> $i { start "".match(/ { $c.send: $i } /) }); $c.close; say $c.sort; 19:38
camelia (2 2 4 5 7)
smls bisectable6: my $c = Channel.new; (await ^10 .map: -> $i { start "".match(/ { $c.send: $i } /) }); $c.close; say $c.sort;
bisectable6 smls, Bisecting by output (old=2015.12 new=1761f95) because on both starting points the exit code is 0
smls, bisect log: gist.github.com/f11462b8c44ebb7524...d056a4a47e
smls, (2015-12-29) github.com/rakudo/rakudo/commit/46...69387023ba
smls wat. 19:39
heh, I need a more reliable test to bisect 19:40
AlexDaniel usually bisectable6 will tell you that you're doing something like “say rand”, but in this case the output was identical at least once :) 19:43
smls bisectable6: my $c = Channel.new; (await ^100 .map: -> $i { start "".match(/ { $c.send: $i } /) }); $c.close; say $c.sort.list eqv (^100).list;
bisectable6 smls, On both starting points (old=2015.12 new=1761f95) the exit code is 0 and the output is identical as well
smls, Output on both points: «False»
smls So not a regression it seems. 19:43
committable6: releases my $c = Channel.new; (await ^100 .map: -> $i { start "".match(/ { $c.send: $i } /) }); $c.close; say $c.sort.list eqv (^100).list; 19:45
committable6 smls, ¦releases (21 commits): «False»
[Coke] didn't see an answer to the tag question: tags prior to the Christmas release had named releases. This practice stopped with the that release. 20:47
Now they are just date baesd.
*based.
AlexDaniel what would be the nicest way to create a block that does nothing? {;} ? 20:53
raschipi (+ *) 20:54
timotimo tbut + does something 20:55
smls AlexDaniel: Define "does nothing". `{;}` is a block that accepts zero or one arguments, and always returns `Nil`. 21:07
AlexDaniel smls: I think I'm having a little bit of XY issue here… 21:08
timotimo probably 21:09
AlexDaniel where the solution for X is to fix the damn module
AlexDaniel which is now here: github.com/perlpilot/p6-sake/pull/11 21:25