»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
Zoffix Demos[m]: is that bad? RE: "yay! perl makes symlinks on windows with SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE" 00:18
Zoffix isn't sure if the "yay" was sarcastic or geniuine :) 00:19
jnthn: the qp// was killed. It won't happen :) 00:20
Or I should say: it was deliberate to remove all traces of it
samcv++ # encoding work 00:22
m: sub prefix:<🛣> { $^v.IO }; dd 🛣'/tmp/bar' 00:24
camelia IO::Path.new("/tmp/bar", :SPEC(IO::Spec::Unix), :CWD("/home/camelia"))
Zoffix Demos[m]: there's your path-making operator :}
erana_ about shameen.dyndns.net, could someone test port 80 of the webserver at 152.35-136-217.adsl-dyn.isp.belgacom.be 00:35
Then you can see the markov ai I was talking about 00:36
erana_ attack page, oh boy 00:38
knation I am a perl 5 dev and looking to get started with perl 6, I am running into a problem that I am sure has a simple solution. I am looking to import a module into another file, I have the following file structure: bin/main.pm6 and I want to import from bin/Controller/Test.pm6 02:16
I have read that this is the correct syntax in my main.pm6 file: `use lib 'Controller::Test'` but it does not seem to be able to find the module
geekosaur use lib adds a director tot he module path 02:20
use Controller::Test;
if it's in the current directory then you may need: use lib '.';
geekosaur this is more or less the same as perl 5 except that perl 6 likes to use precompiled modules instead of perl 6 source 02:21
knation Thanks all, taking a second look now! 02:25
timotimo there ought to be a link from Positional to docs.perl6.org/language/operators#...ix_%5B_%5D in the docs 02:30
Herby_ o/ 03:30
MasterDuke samcv: "Since there was no functionality for writing utf-16 to a file previously, there should be no back compatibility issues with before at all before, luckily there aren’t any back compatibility issues.", is awkward 04:00
jmerelo Hi! 06:59
tyil hi jmerelo :>
jmerelo Hi, tyil How're you doing? :-) 07:00
jmerelo Hi, lizmat ! 07:00
tyil jmerelo: just got to work, doing fine here 07:07
been looking at github.com/rakudo/rakudo/blob/nom/...in.pm#L17, to see if I can fix one of these TODOs
jmerelo tyil: that would be great. 07:08
jmerelo tyil: I raised a couple of issues about EnumHOW, don't know if you have seen them (maybe you have and that's why you're telling me) 07:08
tyil: there are lots of other issues in Rakudo anyway, you've got many to choose from... 07:09
tyil yeah, but I haven't done anything in rakudo's perl 6 code yet 07:10
tyil I found these particular issues through a SO answer (stackoverflow.com/questions/350072...rl-6?rq=1) 07:11
jmerelo tyil: you might find zoffix's z useful to build and test everything
tyil: although probably you have that (or something similar) already.
tyil not yet, but if I go into actually trying to fix it, I'll probably write up scripts to automate all the annoying parts before my first PR :p 07:12
jmerelo tyil: good luck!
tyil thanks :D 07:13
lookatme_q :) 07:15
lizmat weekly: opensource.com/article/18/9/using-sigils-perl-6 08:51
notable6 lizmat, Noted!
El_Che lizmat: | **@** | Array | Positional | 09:25
**@** ?
lizmat argh... the messed up the markdown -> HTML conversion 09:26
tyil I just wanted to say 09:27
that looks like she tried to bolden it
El_Che it's tricky when the formatting is done with special chars that p6 also uses
lizmat the thing is that on GitHub, the markdown rendered the sigils as bold inside that table 09:29
tyil GitHub has its own flavour of markdown 09:30
maybe that can explain some of the differences
lizmat yeah, apparently :-( 09:31
El_Che I know you can't change it :( 09:32
lizmat well, I sent emails to the editors 09:33
but they're still asleep :-)
AlexDaniel github has 3 of its own flavours 09:54
gists, comments and wiki pages are all different
tyil heh 09:56
I thought it was all GFM
AlexDaniel tyil: github.com/AlexDaniel/GFM-test/blo.../README.md github.com/AlexDaniel/GFM-test/issues/1 github.com/AlexDaniel/GFM-test/wiki 10:00
that's one example off the top of my head
tyil that's pretty different 10:02
AlexDaniel I remember there was some feature that I simply couldn't get to work in gists at all 10:03
something related to tables and code blocks
but IIRC it worked in wikis
AlexDaniel or maybe in comments, I don't remember at all now 10:04
cognominal-p6 A sequitur about my question yesterday. What will be the point to use str in place of Str, which caused my problem in the first place, if eventually the optimizer will be capable optimize out the OO rigmarole when possible. 10:15
tyil because eventually is not right now would be my first guess 10:16
cognominal-p6 I would agree with that. So my use of str was premature optimization 10:18
jnthn Primarily it's there for bootstrapping reasons, but also a `my str @arr` can be rather more compact in memory 10:19
There's not much reason to use it on a scalar
jnthn And what performance reasons there are increasingly falling away as optimization gets smarter 10:19
cognominal-p6 jnthn++ 10:20
cognominal-p6 Also my code was facepalm. It was contained the equivalent of my str $s = 'toto'; $s.say # so much for going without OO 10:25
s/was//
timotimo well, you can use methods on $s if it's "str", but it'll be boxed to a Str on the spot for you 10:52
and that Str object will immediately become garbage
timotimo however, if the say method call is inlined, partial escape analysis (one of the newest opts) can probably excise it 10:52
leont I'm considering splitting splitting App::prove6 out of TAP::Harness. Are there any ecosystem reasons why this would be painful for end-users? 10:55
El_Che .tell lizmat "Elizabeth Mattijsen has been programming for a living since 1978 in various (mostly now defunct) programming languages." <-- I think the "dead languages" introduction will be associated with Perl 5 and 6 by casual readers. I would drop that part. 12:11
yoleaux El_Che: I'll pass your message to lizmat.
Zoffix If a routine shows up red in profile instead of green like all the others, how to find out why? 12:40
There's no "BAIL" in spesh log. 12:41
timotimo Zoffix: the JIT log would have it, not the spesh log 12:42
Zoffix Ah 12:43
timotimo though with a little branch i've got in moarvm, the information goes into the spesh log, too
Zoffix giggles at "BAIL: op <setmethcache>" 12:44
.oO( is there a setcocainecache op? )
cognominal-p6 Is Walter White in the core team ? 12:46
Zoffix BAIL: op <setmethcache> 12:47
Constructing JIT graph (cuuid: 83, name: '!cursor_start')
timotimo: these two lines are one after the other. Does it mean !cursor_start was not made green because of setmethcache op? 12:48
timotimo no, to find out what was bailed you have to look upwards for a "Constructing JIT graph" line
potentially an "Entering inline"
oh, the spesh log *does* have info about bailed jits
El_Che the number of times I get an error for using ~ instead of .
timotimo "JIT was not successful" 12:49
Zoffix El_Che: you should write less Perl 5 :) 12:50
timotimo are perl5's error messages as good as perl6's when you write the other perl by accident? 12:51
Zoffix no
$ perl -wlE 'say "foo" ~ "bar"'
syntax error at -e line 1, near ""foo" ~"
Execution of -e aborted due to compilation errors.
timotimo i wonder if a module could be written for that
Zoffix timotimo: what should I be looking for anyway? 12:52
in the log
JIT was not successful and compilation took 4us 12:53
Latest guard tree for '!cursor_init' (cuid: 80, file: gen/moar/stage2/QRegex.nqp:1415)
Is that it?
timotimo that comes at the very end of a compile piece
so it corresponds to what comes before it
Zoffix ok
timotimo is the routine red or yellow in the profile?
Zoffix red 12:54
MVM_SPESH_LOG=log.log ./nqp --profile --profile-filename=out.html -e 'my int $x; while $x++ < 100_000 { "foo" ~~ /:i FOO/ }'
That's what I'm profiling and I wanna know why !cursor_init is red
timotimo can you check if the spesh log ends in about a gazillion "planned nothing" bits?
ah, probably not that then
Zoffix Well, I wanna know how to know why a thing is red, in general
no, I don't see any planned nothings at the end 12:55
timotimo i'll have a look-see myself. it's usually easy to see why something is yellow instead of red, but it's hard to find out why something is completely red
Zoffix Ah
timotimo param_on_o makes cursor_init bail fwiw 12:57
Zoffix What does that op do?
timotimo gets an optional named parameter as an object 12:58
Zoffix ah
timotimo it's the p argument
timotimo well, p and c, and also shared 12:58
and braid and build
all of those arguments get a param_on_o generated for ti
timotimo it looks like there's no matching interned callsite for spesh to latch on 12:59
too many arguments perhaps
Zoffix Oh well. 13:00
timotimo (since nameds count double)
timotimo hum, but the limit is 8 13:00
Zoffix so violent 13:05
timotimo these spambots annoy me
Zoffix deop? :)
timotimo i probably should, yeah
El_Che timotimo: you see their spam I guess
timotimo yes, i do
El_Che argh
timotimo test 13:06
Zoffix test successfull
tadzik five by five
timotimo good
Zoffix timotimo: and the "easy to see why yellow" thing.. I'd just look for BAIL? 13:09
timotimo BAIL in the jit log, or "JIT not successful" in the spesh log 13:09
Zoffix Thanks 13:09
timotimo the JIT log is currently the only way to figure out which op causes the bail
that'll change soon-ish
Zoffix \o/ 13:10
Zoffix yeah, it was easy indeed :) it's getlexrelcaller 13:11
timotimo imgur.com/abx6RwQ - it looks like this in the future 13:11
well, similar 13:12
that's the current state
Zoffix cool
timotimo getlexrelcaller for $/?
Zoffix Yeah
timotimo huh, "caller" doesn't appear even once in my speshlog for that code you gave 13:13
Zoffix timotimo: this is with a rakudo version of the code: MVM_JIT_LOG=log.log ./perl6 --profile --profile-filename=out.html -e '"foo" ~~ /:i FOO/ for ^10_000' 13:14
timotimo ah, ok
Zoffix Do we have any collection of slow code snippets? 13:14
Zoffix Like something to look at for potential improvements 13:14
timotimo nothing centralized, i don't think 13:16
timotimo github.com/koorchik/formula-evalua...-benchmark - this is one benchmark i remember from long-ish ago 13:18
Zoffix looks
.oO( why do we use `--profile --profile-filename=out.html` instead of just `--profile=out.html` and derive the type of profile from extension )
13:19
timotimo we'll potentially get that change, fwiw 13:20
Zoffix good 13:20
jnthn Because --profile=heap is how you ask for a heap profile instead 13:21
And I'd not be surprised if we have a --profile=sample at some point in the future
timotimo jnthn: masterduke suggests having --profile-kind instead
Zoffix oh, I thought --profile took file formats, but now I see it's already derived from extension of --profile-filename 13:23
It's just a ton of annoying typing is all.
jnthn No, it takes which profiler to use
Hmm, I always just let it pick the filename for me :) 13:24
Zoffix but then you run it again and you have to open again, rather than just hittin F5 in browser :)
jnthn That way I never accidentally overwrite a previous profile I might want to compare against later :)
I figure your memory is better than mine :-)
Zoffix nah, I just re-open if I want to keep old profile (in a separate tab) or refresh I want to discard :) 13:25
jnthn Anyway, not really opposed, if it's more convenient for many folks :)
Though probably need to continue recognizing --profile-filename= for a while 13:26
Geth DBIish: fe3e78ceee | (Jonathan Stowe)++ | lib/DBDish/Oracle/Native.pm6
CLOB support in Oracle

From Vadim Belman Fixes #131
14:08
DBIish: 785c0111a2 | (Jonathan Stowe)++ | META6.json
Up version
hythm_ Hi, is there appreviation for "$var = 'something' if not defined $var" ? 15:20
jmerelo hythm_: $var //= something
hythm_ Thank you
knation Is Bailador the goto web framework for Perl6 at the moment? 15:22
jmerelo hythm_: Documentation at docs.perl6.org/language/operators#infix_// Called "defined-or" operator 15:23
knation: it's definetely a place you would want to go, but "the" would be Cro, I guess.
AlexDaniel hah, one of the funniest bugs: github.com/rakudo/rakudo/issues/19...1871279212 15:40
the way you have to scroll to find out what's there on the end :D 15:41
AlexDaniel although, yeah, there's a spoiler in the title :) 15:43
jnthn lol
buggable New CPAN upload: Getopt-Advance-1.0.6.tar.gz by ALOREN modules.perl6.org/dist/Getopt::Adva...pan:ALOREN 15:57
Nik_ Hi.. 16:00
timotimo greetings Nik_ 16:01
Nik_ Hi there
Nik_ Can you please guide me with few answers? 16:01
timotimo we can certainly try
Nik_ Ok thanks..first I wanna know can we make frozen binaries for win & linux 16:02
timotimo not quite; you can use WiX to create an installer for windows that will put a perl6 + your program into a fixed directory, and you can ship your application as a docker image easily 16:03
Nik_ Ok.. 16:04
Which is the most stable module to build GUI apps .
jmerelo Nik_: you can use this perl6 image as base for your Docker image hub.docker.com/r/jjmerelo/alpine-perl6/. There are others, of course. I don't know of any for Win, though 16:05
timotimo windows also has docker
i have really only tried GTK so far
Nik_ Yeah.. I m quite familiar with docker 16:06
jmerelo timotimo: of course, but I don't know if there's a base image for that. Win needs different images and binaries.
timotimo oh, it does?
i did not know *that*
jmerelo Nik_: there are a few in the ecosystem modules.perl6.org/search/?q=GUI but just the last one looks like it really builds GUIs. timotimo is right, only GTK is known 16:07
Nik_ What about perlQT? 16:07
timotimo oh, GTK::Simple ought to have a GUI tag on it
jmerelo timotimo: right. Docker isolates, does not virtualize. It needs the hosts's kernel. You can only ship images to those with the same kernel. Linuxes to linuxes (and MacOSx, but that's another story)
timotimo well, you can use Inline::Perl5 to get at PerlQT, and you can use Inline::Python to get at PySide and PyQt
jmerelo timotimo: originally, Windows was running a Linux VM with the docker daemon in it, and images were compatible. Now they have ported containerd to Windows, and it needs its own containers. 16:08
timotimo that's probably for the better
jmerelo OSX still does the Linux VM under the hood, far as I know.
timotimo and surely there's a docker container somewhere that has a linux vm inside it for doing it the old way
jmerelo timotimo: you can certainly test both to see which one works better... 16:09
timotimo if you have extremely specific needs for the GUI, maybe SDL2::Raw is something to try ... 16:10
jmerelo timotimo: you look at the Docker store now, it says which architecture (for the binary format) and OS (for the kernel) it's using. For instance, mysql store.docker.com/images/mysql-enterprise-server
timotimo you mean the "linux" and "x86-64" tags below the short description?
jmerelo timotimo: right. Here, Python, for instance, has a pull down with different OSs, including "IBM Z" store.docker.com/images/python 16:11
timotimo: the "official" docker image for Perl 6 lists only Linux store.docker.com/images/rakudo-star 16:12
timotimo nobody has been fired for ordering ibm; why don't we have that? :)
jmerelo (my image is extraofficial)
timotimo: I might have access to IBM Z under the academic initiative... I'll have to check it out.
timotimo: and Python has it. Why don't we? 16:13
timotimo was it IBM who gave out shell accounts to servers of their architecture to open source people? 16:13
jmerelo timotimo: might be. We had a very generous donation under their "Academic initiative"
jmerelo I don't know if I have renewed it... 16:14
timotimo if someone is interested in building docker images for rakudo on windows, it should be possible to do that with appveyor, i'd expect? 16:18
timotimo i suggest for the future "please state the nature of your lepidopterological emergency" when someone comes to ask for help 16:30
Geth doc: e527812f6e | (JJ Merelo)++ | doc/Type/Cool.pod6
Checks that samecase is actually included, deletes from TODO. refs #2277
doc: 1d906f1545 | (JJ Merelo)++ | doc/Type/Cool.pod6
Adds Cool.printf, refs #2277
synopsebot Link: doc.perl6.org/type/Cool
doc: 942dd69327 | (JJ Merelo)++ | doc/Type/Cool.pod6
Removes skip-test
jmerelo timotimo: don't know that very well. I don't know if they can be downloaded afterwards... 16:30
timotimo appveyor can at least store artifacts i believe? 16:31
jmerelo timotimo: in principle, it should be possible to build a Windows image using the base image and whatever you want to use, the msi or whatever.
timotimo: as said above, that might be the case, but I don't really know. I mean, hub.docker.com builds Docker images for you, but I don't know if it does that for Windows 16:32
timotimo stefanscherer.github.io/setup-wind...-appveyor/ - i just skimmed it but there's a diagram showing appveyor doing a "docker push" to docker hub
jmerelo timotimo: let's just say I don't know sh*t about Windows and let's leave it at that.
timotimo that's fair 16:33
jmerelo Windows free since the Spanish IRS changed the tax preparation program to a JVM based one. 16:37
timotimo nice
tadzik yay :)
ufobat___ is there a guide/doc/blogpost whatever that describes cro behind nginx.. i think http2 doesnt work behind a reverse proxy, does it? 16:45
timotimo i would expect reverse proxy to still Just Work, though of course the httpd you use has to support http2 16:54
timotimo AFK 16:55
koto ufobat___, not yet(guide/doc), I believe. We do have plans for reverse proxy support for next release with support of http1.1 and http2, but it is still work in progress. However, I am talking about a Cro server's ability to work/describe reverse proxy thing. When something other routes requests to host/port, it should Just Work I think, including http/2. 16:56
koto *to host/port Cro is listening on 16:56
ufobat___ Koto really? it does, i thouoght when you have a reverse proxy the tls will be terminated at the reverse proxy side, not at the cro side, and for http2 you need alpn, no? 17:00
koto ufobat___, I am not sure how reverse proxy you plan to use handles tls. As for alpn, we do support it... When it comes to direct request. This is where I am not too sure. Do you want some specific http/2 features like server push? 17:03
koto needs to try it out when less busy 17:05
sena_kun also, humbly ping jnthn 17:08
ufobat___ sena_kun, i am just intersted in general. i am planning to use cro behind nginx 17:10
sena_kun ufobat___, this idea is awesome. feel free to open tickets if any issue will become an obstacle. :) 17:15
ufobat___ yeah :D 17:19
El_Che X-Forwarded-For oit of the box support would be nice as well (eg middleware login) 17:20
yoleaux 15:52Z <lizmat> El_Che: adapted the "about me" to prevent possibly perceived association
El_Che lizmat: it's not applied yet 17:22
lizmat: also, I hope my remarks do not come over as negative, but just as an eye for this kind of unclear language/image 17:23
TimToady m: say (1, 2 ^??? 10).perl 19:08
camelia 10
(1, one(2, 0))
in block <unit> at <tmp> line 1
jmerelo TimToady: what? 19:08
jmerelo TimToady: docs.perl6.org/routine/%3F%3F%3F ??? 19:09
TimToady sorry, that was for perl6-dev 19:10
lizmat MoarVM oops: Spesh: instruction box_i missing from define-use chain 19:16
lizmat timotimo: is that something that should be reported when doing a --profile ? 19:16
timotimo it's a bug i'll be fixing in the near future 19:17
lizmat any workaround that you know of ? 19:18
Demos[m] can MAIN() support subcommand type stuff? 20:41
moritz Demos[m]: only kinda, but some of the modules have better support 20:46
lizmat Demos[m]: with docs.perl6.org/language/functions#...-MAIN-OPTS and MMD you can sorta
moritz you can do something like multi sub MAIN('edit', @options)
timotimo i do not know a workaround yet 20:50
Demos[m] oh, that works nicely 20:57
Demos[m] OK next question: can I somehow indicate that I want a method defined as a sub as well? 21:02
lizmat no 21:03
but you *can* use a sub as a method
m: sub foo($a) { dd $a }; 42.&foo 21:04
camelia 42
Demos[m] with a "."?
lizmat .&foo in the example
called on an Int object that contains 42 21:05
Demos[m] can I leave out the "&"
lizmat no, that indicates it should do a "sub" lookup 21:06
m: sub foo($a) { dd $a }; 42.foo
camelia No such method 'foo' for invocant of type 'Int'
in block <unit> at <tmp> line 1
Demos[m] m: sub foo(Int:D $a) { dd $a }; 42.foo 21:09
camelia No such method 'foo' for invocant of type 'Int'
in block <unit> at <tmp> line 1
Demos[m] can I call a method like a sub then? 21:15
lizmat well, you can, but that's cumbersome 21:17
lizmat m: class A { method foo() { say "foo" } }; my &m := A.^find_method("foo"); m(A) # Demos[m] 21:18
camelia foo
tobs m: class A { method meth { say "hi" } }; my $a = A.new; meth $a:; 21:20
camelia hi
tobs or using the magical :; statement separator
geekosaur its not magical. ":" is like "," in a parameter list but indicates the invocant for a method
tobs :-)
geekosaur matters when there's other parameters 21:21
if you want $x.foo(3) in sub form it's foo($x: 3) 21:22
lizmat TIL :-) 21:23
AlexDaniel awwaiid: what's up with thelackthereof.org/Perl6_Colons ? The website seems to be down? 22:00
Herby____ o/ 23:18
knation thepasteb.in/p/nZhl2Pkr2oYuY 23:48
Oops, the above is a question about perl6 Cro and react 23:49
tbrowder__ hey, #perl6 23:58