Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-04-10

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:02 _28_ria joined #perl6
00:03 kurahaupo_ joined #perl6
00:06 _28_ria joined #perl6
00:06 ugexe heh, its all in rakudo or the ecosystem now
00:08 titsuki joined #perl6
00:09 timotimo neat.
00:10 _28_ria joined #perl6
00:23 _28_ria joined #perl6
00:24 samcv oh em gee
00:25 samcv it's working
00:25 samcv \o/
00:26 timotimo wow
00:26 samcv now people need to tell me if they work on other linux distros. https://cry.nu/files/org.perl6.rakudo-x86_64.AppImage
00:26 samcv ooooooooohhhhhhhhh yessssssssss
00:26 timotimo i was kind of hopeful when i mentioned appimages, but you actually made it happen and that's fantastic
00:26 samcv tell me if it works on your system. i have arch btw
00:26 samcv i can't believe i got it to work either
00:26 samcv cause their documentation sucks
00:26 samcv pretty bad
00:27 samcv had to figure it out
00:27 samcv super awesome
00:27 samcv now what should i try
00:28 timotimo http://imgur.com/a/EG9dE
00:28 samcv nice
00:28 timotimo this is a fedora system
00:30 samcv no nobody will have an excuse to not try perl 6
00:30 samcv *now
00:31 samcv not sure how one would call zef. but it *is* installed inside the appimage
00:32 samcv timotimo, does linenoise work properly?
00:33 samcv also timotimo is there a delay starting it up?
00:33 timotimo linenoise works
00:33 samcv yeah
00:34 samcv i ran the prompt before making the appimage so it's hopefully compiled in there
00:34 timotimo there's a delay, yeah
00:34 samcv dunno if it's frome linenoise or not
00:34 samcv or the appimage
00:34 samcv is there a way to tell if it has to compile linenoise each tme it starts?
00:34 timotimo yeah, the module debug env var
00:35 timotimo RAKUDO_MODULE_DEBUG=yes
00:35 samcv looks like it thinks its program name is ././share/perl6/runtime/perl6.moarvm
00:35 samcv if i do --help
00:35 timotimo hehe
00:35 samcv maybe i can fix that idk
00:35 timotimo well, we can have the --exename or what it is
00:36 timotimo --execname
00:36 samcv yeah
00:36 timotimo it's already $0 in the perl6 script, but that might not go through whatever appimage does to make this work?
00:36 samcv uhm
00:36 samcv it calls perl6
00:37 samcv yeah it has execname=$0
00:37 samcv can maybe clean it up in the script to not have ././
00:37 sammers samcv: works on debian sid for me
00:37 samcv nice
00:38 sammers not working with firejail, however...
00:38 samcv idk how you use that
00:38 sammers me neither
00:38 samcv :P
00:38 sammers :)
00:38 samcv time to make a new git repo for this stuff
00:39 sammers so all the modules are in the image?
00:39 samcv yes
00:39 samcv all rakudo star modules are in there
00:39 samcv if you want more, you have to go online and purchase an activation code
00:39 sammers I guess if we have a simple way to build an app image with our deps
00:39 samcv heh
00:39 samcv aka install it normally
00:40 sammers oh, can't wait
00:40 samcv i'm curious if it works on like debian jessie
00:40 sammers just a sec... I will test
00:40 samcv yay
00:41 samcv i should probably write the bash script to make the appimage today otherwise i'll probably forget all the weird things
00:41 samcv i mean it's not, that hard. if it was properly documented
00:42 sammers yeah, worked right away.
00:42 samcv sweet
00:43 sammers base debian, just installed fuse and it worked
00:43 samcv soon we will be trendy and cool
00:43 sammers bootup is slow
00:43 samcv and everybody will dl the appimages
00:43 samcv starting the script?
00:43 timotimo hm, gotta help a friend by providing my wheels
00:43 sammers but once it's up it seems ok
00:46 timotimo sammers: maybe you can be inspired by https://github.com/jnthn/p6-app-installermaker-wix
00:46 samcv can you give me the output of
00:46 samcv echo exit | RAKUDO_MODULE_DEBUG=yes ./org.perl6.rakudo-x86_64.AppImage
00:46 samcv that
00:46 samcv will go to stderr
00:47 samcv on the debian jessie one or whichever older debian it was
00:47 sammers ok, please stand by... for the Wix side, I don't have windows...
00:47 timotimo that's not important
00:48 _28_ria joined #perl6
00:48 samcv hmm timotimo
00:48 samcv won't it tell me if it recompiles things
00:48 timotimo it's only important that you give it your module and a launcher so to speak and it'll make an .msi that installs a rakudo along with your module and its dependencies and gives you a nice clickable thing to launch it
00:48 samcv or is that not possible
00:48 timotimo gotta go now!
00:48 samcv oh talking about wix
00:49 samcv also: time echo exit |./org.perl6.rakudo-x86_64.AppImage
00:50 wamba joined #perl6
00:52 samcv need to adjust some things so you can double click on it and it will just open a prompt
00:52 sammers samcv, is there an option to have the debug output write to file? > isn't working...
00:54 sammers https://gist.github.com/scmorrison/5c0c8deef41144f684ad5d896af6912d
00:55 samcv cool
00:56 samcv ok i think i uh
00:56 samcv messed up the checksums of the files. derp
00:56 samcv well it still works i guess
00:56 samcv hmm maybe will have to go through and replace checksums too. that sounds like a pain
00:56 sammers samcv, just added the time output to the gist
00:56 samcv kk thx
01:01 samcv ok well it looks like it just precompiles them into the home directory
01:02 samcv it's not too slow just doing -e or whatever
01:02 samcv and people can run their files or whatever with it fine
01:07 sammers samcv, I can pipe a script to the appimage, is there any other way to pass a script?
01:08 samcv just act like it's a perl 6 binary
01:08 samcv should work
01:09 samcv works great actually
01:09 sammers it isn't working on my setup....
01:09 sammers I get these messages, "Could not open deathstar.p6. Failed to stat file: no such file or directory"
01:09 samcv hm
01:09 sammers I will try from another system...
01:10 samcv yeah it works for me. maybe it's dependencies idk
01:10 samcv wasn't working on a jessie debian install?
01:10 samcv but REPL worked?
01:12 sammers ok, so no go for jesse either
01:12 sammers repl works
01:13 samcv hm
01:13 timotimo i need to test appimage foo.p6, too
01:13 timotimo though it would be amazingest if we had a little gtk gui for a bunch of different things you can do
01:14 samcv with perl6?
01:14 timotimo write scripts, install modules, repl, docs
01:14 timotimo could make it in p6 with gtk or as a web app
01:14 timotimo on the road again bbiab
01:14 samcv will it have a camelia avatar, like clippy
01:15 timotimo it would be catastrophic to forget that
01:15 sammers like a perl6 command center
01:15 samcv it recommends on appimages site mounting distro iso's and using those in a chroot or whatever
01:15 samcv to test out your images on multiple distros
01:24 sammers how about travis / docker?
01:27 timotimo oh samcv you should totally check out azawawi's farabi6
01:27 timotimo it's a web editor with a bunch of extra ide-like features
01:28 timotimo wow,there was a modernization commit 2 months ago
01:28 timotimo *neat*
01:29 timotimo i was afraid it'd have bitrotted so much it wouldn't start
01:29 timotimo oh, no actual code changes i don't think
01:30 timotimo now i'll go to bed
01:46 samcv night
01:46 awwaiid joined #perl6
01:48 ilbot3 joined #perl6
01:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:58 Cabanossi joined #perl6
02:25 noganex joined #perl6
02:46 perigrin joined #perl6
02:59 Cabanossi joined #perl6
03:03 Luna521 joined #perl6
03:11 Luna521 joined #perl6
03:20 samcv \o/ i got relative directories working
03:30 Luna521 joined #perl6
03:33 samcv .oO(time to run roast using appimage)
03:41 jdmmmmm joined #perl6
03:41 Cabanossi joined #perl6
03:51 samcv oh no wonder. it's failing all the .rakudo.moar tests the ones that don't send it in as .t
03:51 samcv not sure why those exist?
04:02 jeek joined #perl6
04:05 samcv and i'm sure we can get standalone perl 6 apps working with these appimages too
04:09 cpage joined #perl6
04:09 jdmmmmm joined #perl6
04:16 samcv ok i have fixed perl6 -I t/spec/packages testfile.t # which is found several places in roast.
04:16 samcv woo.
04:48 kurahaupo joined #perl6
04:56 curan joined #perl6
04:58 Cabanossi joined #perl6
05:13 Actualeyes joined #perl6
05:17 domidumont joined #perl6
05:19 esh joined #perl6
05:22 domidumont joined #perl6
05:25 xiaomiao joined #perl6
05:25 xiaomiao joined #perl6
05:27 wamba joined #perl6
05:41 Cabanossi joined #perl6
05:42 domidumont joined #perl6
05:46 rindolf joined #perl6
05:54 RabidGravy joined #perl6
05:56 g0d355__ joined #perl6
06:00 ufobat joined #perl6
06:10 gdonald joined #perl6
06:17 _28_ria joined #perl6
06:21 spebern joined #perl6
06:34 andrzejku hou hou :)
06:36 domidumont1 joined #perl6
06:48 samcv woo i think i got travisci building appimage
06:48 samcv so that means i guess my script is probably fully functional now
06:53 lowbro joined #perl6
06:53 lowbro joined #perl6
06:58 Cabanossi joined #perl6
07:04 abraxxa joined #perl6
07:09 darutoko joined #perl6
07:10 samcv would be cool if we could have an appimage for the next rakudo star
07:11 abraxxa joined #perl6
07:16 ufobat joined #perl6
07:21 domidumont joined #perl6
07:31 kurahaupo joined #perl6
07:37 parv joined #perl6
07:38 CIAvash joined #perl6
07:39 jjido joined #perl6
07:46 mxco86 joined #perl6
07:46 mxco86 joined #perl6
07:59 dakkar joined #perl6
08:04 jonas1 joined #perl6
08:04 dakkar joined #perl6
08:18 robertle joined #perl6
08:24 rodarmor joined #perl6
08:26 Cabanossi joined #perl6
08:27 wamba joined #perl6
08:29 g4 joined #perl6
08:29 g4 joined #perl6
08:31 bjz joined #perl6
08:41 nadim_ joined #perl6
08:42 nadim_ morning p6
08:42 nadim_ timotimo: do you think you could answer my question on the patch you proposed? so I can merge it (after I understand)
08:46 rindolf joined #perl6
08:46 stmuk_ samcv: oddly I was thinking about that as well!
08:46 samcv nice
08:46 samcv https://travis-ci.org/samcv/rakudo-appimage/ if you wanna see
08:47 samcv there's a dl under releases as well
08:47 stmuk_ oh excellent I've never actually used appimage but I noticed the oddly named "otterbrowser" used it
08:48 samcv it's pretty cool once i got it to work. and it's star so has all the modules built in
08:48 stmuk_ and if you have mostly done it :) bookmarked
08:48 samcv had to fix loads of path problems and stuff but finally worked it
08:48 samcv was difficult
08:48 stmuk_ samcv++
08:48 samcv well it's totally done
08:49 samcv afaik. only thing is that it doesn't drop you in the pwd you launched it in. but you can do -I lib or relative files since the perl6 script resolves it
08:49 samcv before passing it on
08:49 samcv and some other things
08:50 samcv it's badly documented. but i created random weird folders and then dumped %*ENV and grepped it to figure out the ENV vars that would give me the pwd
08:50 samcv it goes into that pwd (since it starts in its own virtual system) then it resolves the directories and files on the command line args, then it goes back to where it started so the paths work
08:51 samcv and it patches all the .moarvm files and changes the paths to be relative
08:51 samcv it installs into --prefix /rsu then you replace /rsu with ././ (same number of bytes)
08:52 samcv though it breaks some checksums maybe. but it precomps into the users home folder so launches after that shouldn't take too long
08:52 stmuk_ hmmm maybe upstream should support relative paths
08:53 stmuk_ anyway real work calls :\ I'll take a look shortly
08:54 cgfbee joined #perl6
08:59 ChoHag joined #perl6
08:59 Sound joined #perl6
09:00 gdonald joined #perl6
09:01 samcv well what we really need is being able to start perl6 in a specific directory
09:01 samcv so that $*CWD will be the expected directory
09:02 samcv dunno if perl 5 has anything like that, or we make our own option for that
09:10 Ven joined #perl6
09:16 bjz joined #perl6
09:26 zakharyas joined #perl6
09:26 sjn joined #perl6
09:31 jonas1 joined #perl6
09:35 kurahaupo_ joined #perl6
09:37 Ven_ joined #perl6
09:38 mr-foobar joined #perl6
09:38 kurahaupo__ joined #perl6
09:43 Cabanossi joined #perl6
09:45 nadim_ timotimo: found the link on the other ticket.
09:46 Ven_ joined #perl6
10:09 wamba joined #perl6
10:25 ChoHag joined #perl6
10:27 Ven joined #perl6
10:30 kurahaupo joined #perl6
10:32 kent\n joined #perl6
10:33 astj joined #perl6
10:36 astj joined #perl6
10:39 astj joined #perl6
10:45 Ven_ joined #perl6
10:46 kurahaupo joined #perl6
10:52 kurahaupo_ joined #perl6
10:54 pmurias joined #perl6
10:56 kurahaupo joined #perl6
11:04 labster joined #perl6
11:15 Ven_ joined #perl6
11:22 kent\n joined #perl6
11:30 xtreak joined #perl6
11:47 xtreak joined #perl6
11:50 robertle when using an actions class with a grammar, the action methods seem to get called as the grammar thingie is working it's way through the input, including the backtracking. so it executes the action and throws away the result? do I undertsand that correctly? is that desired?
11:50 robertle https://gist.github.com/anonymous/0c156ced8135f1ef09a8ac34fc6d03e9
11:51 robertle says "term action" three times, if you remove the "<term> '&' <expression>" line, then it calls it twice
11:51 timotimo yeah, it does call the action whenever something finishes parsing, but it can't know if the thing that uses the something will end up using it or not
11:52 robertle that is quite surprising, to me at least. is that desired? is that going to stay that way?
11:53 timotimo action methods are called "as things parse", the only other option would be to run all action stuff right at the very end of everything
11:54 timotimo but in that case you can also just put only a TOP action method and explore the match tree from that place
11:55 robertle it is surprising because most other parser generators allow actiosn embedded with the grammar, but only execute them after the engine has committed on a rule/token, not during lokahead
11:55 Ven joined #perl6
11:56 timotimo i wonder if we can determine that somehow
11:56 Cabanossi joined #perl6
11:57 masak robertle: it falls on the grammar author not to backtrack in such a way that rules that succeeded and whose action methods ran subsequently get thrown away
11:58 masak or, perhaps more simply stated, once you're writing a grammar and not just a regex, you're meant to backtrack as little as possible
11:58 robertle masak: yeah, one of the reasons I am asking is whether perhaps this is just a consequence of an awkward grammar
11:59 masak here's how I like to think of it: for any nontrivial rule, there tends to be a "point of no return"
11:59 masak after which a parsefail should be a *panic*, not lead to backtracking
11:59 robertle however for the language in this example, I can't see how to do that without backtracking. or for any non-trivial (= non-recursive) language
11:59 masak I mean, these are rules of thumb and there are exceptions to everything
11:59 robertle I would be very interested in how to express a grammar for that language in a non-backtracking way
12:00 masak I'd be happy to discuss your case in particular
12:00 masak but I'd like you to consider my point above about the "point of no return"
12:00 robertle masak: see above for paste, it's a trivial language
12:00 * masak looks
12:00 geekosaur joined #perl6
12:00 robertle you can even remove the "'!' <term>" line
12:01 masak yeah, that can totally be done without backtracking :)
12:01 masak you just need to refactor it a bit
12:01 masak something like `rule expression { ['!'? <term>]+ % ['|' | '&'] }`
12:02 masak the `%` op is very nice for separator-y bits
12:02 wamba joined #perl6
12:02 masak also, I'm never 100% I get the whitespace right until I back the grammar up by tests. YMMV
12:03 masak anyway, I guess you can see how that makes it work without backtracking
12:03 robertle right, I did see samples using both the % and the combination of multiple cases into one rule...
12:03 masak I realize you might want to factor it slightly differently yet if you plan to grab the '!' in the actions
12:03 masak but that should get you going
12:04 robertle thanks, I will play with that a bit
12:04 masak fun fact: we had an insidious scoping-related bug in 007 parsing because we didn't properly consider the "point of no return" thing
12:04 masak (i.e. side effects had time to run before backtracking happened and a completely different rule succeeded)
12:05 robertle essentially you are saying rather than using "|" in the rule, which means options and therefore potentially backtracking, use any regular sub-language that you can
12:05 masak that was "fun" to debug
12:05 robertle I think grammars are still "fun" sometimes
12:05 masak robertle: I'm saying specifically there's a way here which leads to less waste and backtracking, and should get you into less trouble generally
12:06 robertle one thing that I notice is that errors in my grammar often lead to the parser just hanging on an infinite recursion or so. that is a bit strange, should it ever build such a grammar?
12:07 masak this tends to happen when you have rules that both (a) are quantified and (b) can match zero characters
12:07 moritz robertle: that's a known error which... what masak said
12:07 masak there are ways to write a grammar *engine* such that that never happens
12:07 moritz there are also ways to structure your grammar to avoid that
12:07 masak but Rakudo's grammar engine will happily spin forever
12:08 robertle ok, understood
12:08 moritz which typically involves chaning token foo { .* }  and then <foo> to  token foo { .+ } and then <foo>?
12:11 leont joined #perl6
12:16 Ven_ joined #perl6
12:21 domidumont joined #perl6
12:24 Peter_R joined #perl6
12:26 xtreak joined #perl6
12:27 regnarg joined #perl6
12:34 gdonald joined #perl6
12:36 perlpilot joined #perl6
12:38 AlexDaniel joined #perl6
12:48 zakharyas joined #perl6
12:50 Ven_ joined #perl6
13:01 mcmillhj joined #perl6
13:13 gdonald joined #perl6
13:15 mcmillhj joined #perl6
13:16 pmurias masak: re write a grammar *engine* such that never happens, just like with writing an *interpreter* that never loops you would need to change the grammar language
13:16 Ven joined #perl6
13:16 kurahaupo joined #perl6
13:16 Geth ¦ doc: 0ca22958e7 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
13:16 Geth ¦ doc: [io grant] Reword/expand IO::Path intro prose
13:16 Geth ¦ doc: review: https://github.com/perl6/doc/commit/0ca22958e7
13:18 masak pmurias: I don't think I'm disagreeing with that -- it would change the language
13:20 masak pmurias: here's an example of what I mean
13:20 masak perl -wE'say "abc" =~ /(a?)+bc/'
13:20 masak prints the empty string (for some reason) but doesn't look infinitely
13:20 masak the corresponding p6 program loops infinitely
13:21 masak but I mean, yeah, of course "fixing" the infinite loop also changes the semantics of the grammar language
13:21 kurahaupo joined #perl6
13:22 kurahaupo joined #perl6
13:23 robertle but surely the grammar engine can tell whether the grammar in question can loop infinitely for any finite input, and if so reject the grammar
13:24 masak ...aha. the p5 program does match, it just prints what looks like something empty as a result
13:24 ilmari because it returns the last iteration of the capture, which successfully matched the empty string after the a
13:24 masak robertle: not sure that's so. but even if it were, such analysis is not done in Rakudo at present
13:24 masak ilmari: ...right.
13:24 masak ilmari: so it matches the empty string *once*, but then figures out it's not progressing?
13:25 ilmari perl5 advances the position if a zero-width match matches in the same place twice
13:25 Geth ¦ doc: 45e84addef | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
13:25 Geth ¦ doc: [io grant] Move IO::Path.path to attributes
13:25 Geth ¦ doc:
13:25 Geth ¦ doc: Also add a warning about trying to mess with the attibute.
13:25 Geth ¦ doc: review: https://github.com/perl6/doc/commit/45e84addef
13:25 masak ilmari: feels kind of like a "forward-tracking" mechanism :P
13:26 plicease joined #perl6
13:26 skids joined #perl6
13:28 plicease joined #perl6
13:28 ilmari beats infinite looping
13:28 plicease joined #perl6
13:28 masak no argument there
13:30 * masak .oO( of course, none of this would've happened in the first place if we all had just listened to Russ Cox ) :P
13:30 moritz but then we wouldn't have p6 grammars either :-)
13:31 masak we might've, but we might be talking about "procedural suffix" instead :P
13:37 nhywyll joined #perl6
13:43 Geth ¦ doc: b9de84f2b1 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
13:43 Geth ¦ doc: [io grant] Remove DateTime tutorial from IO::Path docs
13:43 Geth ¦ doc: review: https://github.com/perl6/doc/commit/b9de84f2b1
13:49 Geth ¦ doc: 45074858b8 | (Zoffix Znet)++ | doc/Type/IO.pod6
13:49 Geth ¦ doc: Fix broken URL
13:49 Geth ¦ doc: review: https://github.com/perl6/doc/commit/45074858b8
13:54 gdonald joined #perl6
13:54 Geth ¦ doc: 69b2082dc2 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
13:54 Geth ¦ doc: [io grant] Document IO::Path.chdir
13:54 Geth ¦ doc:
13:54 Geth ¦ doc: - Include deprecation notice for 6.d language
13:54 Geth ¦ doc: review: https://github.com/perl6/doc/commit/69b2082dc2
13:55 raschipi joined #perl6
13:56 wamba joined #perl6
13:59 leont joined #perl6
14:16 jdmmmmm joined #perl6
14:28 Cabanossi joined #perl6
14:37 cdg joined #perl6
14:40 cdg joined #perl6
14:42 alimon joined #perl6
14:45 xinming joined #perl6
14:47 * [Coke] yawns.
14:49 khw joined #perl6
14:49 ChoHag joined #perl6
14:52 Geth ¦ doc: d436f3cc78 | (Zoffix Znet)++ | 5 files
14:52 Geth ¦ doc: [io grant] Document IO::Spec::* don't do any validation
14:52 Geth ¦ doc:
14:52 Geth ¦ doc: Addresses RT#130900:
14:52 Geth ¦ doc: https://rt.perl.org/Ticket/Display.html?id=130900
14:52 Geth ¦ doc: review: https://github.com/perl6/doc/commit/d436f3cc78
14:52 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=130900
14:54 pmurias [Coke]: re autofudging mostly passing tests I think it doesn't make much sense for rakudo.js as it's a (currently) more buggier rakudo rather then a independently created implementation
14:55 pmurias so if it fails a roast test it's most likely because of a bug rather then some minor unimplemented feature
14:57 cognominal joined #perl6
14:59 [Coke] pmurias: ok.
15:20 gdonald joined #perl6
15:21 ChoHag joined #perl6
15:23 cdg_ joined #perl6
15:23 sufrostico joined #perl6
15:28 xiaomiao joined #perl6
15:35 Geth ¦ doc: 409044695b | (Zoffix Znet)++ | 2 files
15:35 Geth ¦ doc: [io grant] Improve chmod docs
15:35 Geth ¦ doc:
15:35 Geth ¦ doc: - Split sub and method forms, as they're very different.
15:35 Geth ¦ doc: - Remove $*CWD example; bad form without `temp`ing it first.
15:35 Geth ¦ doc: - Add examples for chmoding dirs too
15:35 Geth ¦ doc: - Add examples with an octal in a string
15:35 Geth ¦ doc: review: https://github.com/perl6/doc/commit/409044695b
15:37 Geth ¦ doc: ca4a5d8fb6 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
15:37 Geth ¦ doc: Fix up example
15:37 Geth ¦ doc:
15:37 Geth ¦ doc: Use method form, since the docs are for method form
15:37 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ca4a5d8fb6
15:41 gregf_ joined #perl6
15:42 Cabanossi joined #perl6
15:43 sufrostico joined #perl6
16:19 wamba joined #perl6
16:20 mcmillhj joined #perl6
16:25 ugexe https://github.com/CurtTilmes/Perl6-GraphQL
16:27 zakharyas joined #perl6
16:27 sufrostico joined #perl6
16:31 Geth ¦ doc: 1527d321ba | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
16:31 Geth ¦ doc: [io grant] Document :completely arg to IO::Path.resolve
16:31 Geth ¦ doc:
16:31 Geth ¦ doc: Rakudo impl: https://github.com/rakudo/rakudo/commit/6a8d63d1b6
16:31 Geth ¦ doc: Tests: https://github.com/perl6/roast/commit/a809f0f1f5
16:31 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1527d321ba
16:31 mcmillhj joined #perl6
16:42 st_elmo joined #perl6
16:45 mcmillhj joined #perl6
16:47 robertle joined #perl6
16:48 raschipi joined #perl6
16:49 cdg joined #perl6
16:55 Geth ¦ ecosystem: 354d3b3376 | (Nick Logan)++ | META.list
16:55 Geth ¦ ecosystem: Add GraphQL
16:55 Geth ¦ ecosystem:
16:55 Geth ¦ ecosystem: https://github.com/CurtTilmes/Perl6-GraphQL
16:55 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/354d3b3376
17:01 jsimonet Hello, I would like to know how objects destructors works in Perl6. I found the submethod DESTROY but is only called by the GC. Is there a way to properly close a resource before the end of the program/a block?
17:04 mcmillhj joined #perl6
17:07 timotimo well, for blocks you can use LEAVE blocks
17:07 timotimo which will get run for any kind of leaving
17:07 timotimo though not when the program exits
17:08 titsuki joined #perl6
17:12 TimToady joined #perl6
17:12 jsimonet Thank you. In objects, this doesn't work ( class Foo { LEAVE { note "leaving" } }; for ^100 { my $f = Foo.new } . It prints "leaving" only once, since LEAVE is for blocks.
17:13 timotimo yup
17:13 timotimo the body of a class gets run, but not when you instantiate the class
17:15 jsimonet I'm trying to develop a project where I have a channel, and some operations are done on the channel data. I would like to manage these data when the program ends.
17:16 jsimonet (asynchronously)
17:18 timotimo have you heard of "react" blocks? they manage subscriptions for you. not 100% sure how they interact with channels, i've mostly used them with supplies and promises
17:20 jsimonet yes, but i'm currently using Channel.Supply.tap. I suppose they work the same way?
17:21 jsimonet I wrote a previous version with react, but I needed to write something like 'start { react { whenever Channel { do-stuff; } } }'
17:23 Geth ¦ perl6-most-wanted: CurtTilmes++ created pull request #38: Remove GraphQL
17:23 Geth ¦ perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/pull/38
17:24 Geth ¦ perl6-most-wanted: 31795a73ac | (Curt Tilmes)++ | most-wanted/modules.md
17:24 Geth ¦ perl6-most-wanted: Remove GraphQL (#38)
17:24 Geth ¦ perl6-most-wanted:
17:24 Geth ¦ perl6-most-wanted: Now available: https://github.com/CurtTilmes/Perl6-GraphQL
17:24 Geth ¦ perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/31795a73ac
17:26 timotimo not the same way, i.e. you'll have to do subscription management yourself, which is what the react block would give you "for free"
17:27 timotimo subscription management meaning, among other things, what happens when channels close or throw errors or some such
17:29 domidumont joined #perl6
17:30 jsimonet ok, with QUIT phaser as mentionned in the concurency page :)
17:33 timotimo for example, yeah
17:34 * timotimo BBL
17:36 jsimonet So, I think I'll have to wrote a "flush" method for the object instance to flush and close the resource, and in case of a crash, the data will be lost.
17:37 jsimonet Thank you for your responses BTW :)
17:38 labster joined #perl6
17:57 Cabanossi joined #perl6
18:01 sufrostico joined #perl6
18:10 gdonald joined #perl6
18:14 timotimo sure
18:18 DrForr o/
18:22 timotimo yo
18:23 RabidGravy BOOM!
18:25 RabidGravy I scared myself today, I almost suggested a distributed transaction manager in a meeting, but I bit my tongue
18:25 DrForr Don't they call those databases? :)
18:25 DrForr Also good timig.
18:26 DrForr *timing
18:26 RabidGravy twas timig and the slithy toves
18:26 Cabanossi joined #perl6
18:28 * DrForr gimbls. (keeping with the theme)
18:31 RabidGravy nothing like a spotting of gimballing on a Monday evening
18:33 timotimo i have no idea what you're talking about :)
18:34 timotimo DrForr: i may have asked this before, but does anything keep perl6/doc from using Perl6::Parser for pod?
18:34 RabidGravy Jabberwockey
18:34 * lizmat starts on the Perl 6 Weekly
18:34 timotimo i meant the transaction manager thing :D
18:34 perigrin RabidGravy: is that a borogrove in your pocket or are you just mimsy to see me?
18:35 RabidGravy :)
18:35 * perigrin flees before a jubjub bird eats his children.
18:36 samcv good morning o/
18:36 RabidGravy I actually pulled myself back from the brink of making a binding for Enduro/X  the other week
18:37 DrForr timotimo: You're welcome, but at the moment it just treats it as block of text, so you won't get much in the way of detail. The POD needs to be reentrant, and it's not yet.
18:37 jjido joined #perl6
18:37 DrForr *blocks - The keyboard on this laptop must have been affected a little more than I thought by the screen crack...
18:39 timotimo reentrant?
18:40 DrForr I.E. use Perl6::Pod's parser.
18:42 timotimo you mean rakudo's, or Perl6::Parser's POD Parser?
18:42 DrForr The former.
18:43 DrForr Perl6::Parser is something of a misnomer as it doesn't actually parse anything.
18:43 timotimo oh, huh?
18:44 timotimo i thought the whole project was there so we can parse perl6 code without executing anything :)
18:44 perlpilot joined #perl6
18:45 DrForr If I were to do that I'd never get around to actually getting anything done.
18:47 DrForr Also you practically have to do that in the presence of custom operators.
18:49 timotimo damn~
18:51 DrForr Script A can use custom operators that are created conditionally in a file that gets use'd, which means I'd have to load all of _that_ code and parse it.
18:53 unclechu how do i disable stdout buffering in perl6? like i do in perl5: `$| = 1;`
18:53 timotimo unclechu: i think you use the termios module for that?
18:54 geekosaur that doesn't disable whatever buffers libuv has
18:54 nadim_ joined #perl6
18:55 DrForr I'd love to be able to statically search for '{sub|multi} infix:<+>(){}' but if I search for the static text I'll likely miss variants, and why should I rewrite Perl6::Grammar when it's already been written? Not to mention it's pretty much impossible to untangle the parsing from the compilation portions, altough I really didn't get much beyond pulling out files and utterly failing to find entry points.
18:56 DrForr The only thing that actually *executes* are the 'use' statements and BEGIN blocks, and I'm happy with that tradeoff for not having to rewrite the entire parser and .. well, never get anything actually done.
18:59 xiaomiao joined #perl6
19:01 DrForr I realize the sound I just heard was a crest falling, but it was a choice between the seemingly Sisyphean task of rewriting a parser that's already *there* and keeping it up-to-date with changes in the main code *and* getting it to output useful data vs. getting something done.
19:04 RabidGravy I don't suppose anyone knows how big __syscall_slong_t is ? or do I have to ask a compiler
19:07 RabidGravy long int apparently
19:11 alphah hello perl6, I'm trying to use look-around assertions in my grammar to to arange tokens order, which comes after which and eventually to meet the test cases in the grammar, for some reason when I use look-around assertions some tokens don't match, more details in the comments on code https://gist.github.com/anonymous/f563aee0183ff39fe4c6cc90ff0afc5b
19:11 raschipi joined #perl6
19:19 DrForr alphah: It's probably incorrectly failing because version can look like tag.
19:20 moritz uhm, does using <( and )> in subregexes work?
19:21 alphah I can make tag token to not start with digit and will test that
19:21 moritz (and suggesting to use .split('-') likely won't make you happy, right?)
19:21 DrForr And I'd really encourage you to use the Test module.
19:22 DrForr "ok Pkg.parse('rakudo-star'), 'name';" # Simpler way to write your tests.
19:22 alphah mortiz: I'm not sure what you mean, but I use <( and )> to limit the regex to what is in between
19:23 alphah mortiz: if .split(-) will work sure will make me happy
19:24 alphah DrForr: I will look into the test module, perl pilot helped me for this test cases (becuase I was writing them in comments and wa sdoing the tests manually)
19:25 DrForr Give me a sec and I'll finish rewriting this.
19:26 DrForr https://gist.github.com/drforr/f424f8187f426f0b9ddbeaa02592ddb7
19:27 alphah Thanks DrForr I will use that
19:27 DrForr That replaces your block and test loop, and also works with Travis integration.
19:28 timotimo DrForr: so what does Perl6::Parser actually do? i'm confused.
19:29 DrForr Like I said it's a bit of a misnomer, in that instead of parsing everything on its own, it uses Perl6's internal parser.
19:29 timotimo right
19:29 timotimo and then? :)
19:29 samcv not sure if it's my system or not but getting linenoise errors with appimage here: https://github.com/samcv/rakudo-appimage/releases
19:30 samcv not sure if it's my system or not though. cause i am pretty sure the exct same one worked for me before
19:30 DrForr Spits back a tree of Perl 6 objects that correspond to your perl code.
19:30 samcv can somebody test it for me? dl the org.perl6.rakudo AppImage, chmod +x then run it. should pop up perl6 repl prompt with no errors
19:39 DrForr alphah: https://gist.github.com/drforr/f424f8187f426f0b9ddbeaa02592ddb7 updated and passes your basic test suites.
19:40 DrForr Crude, and expanding package-name to ['-' \w+] doesn't do what you want. But it's a different approach.
19:41 avalenn joined #perl6
19:42 DrForr Though it's apparently an issue with \w also containing \d.
19:43 alphah DrForr: tested that and worked.
19:43 Cabanossi joined #perl6
19:44 sufrostico joined #perl6
19:44 alphah yeah I'd probably keep package-name as regex, as some cases will be "package" , "long-package" , "very-long-package-name"
19:44 DrForr Let me paste this...
19:46 DrForr https://gist.github.com/drforr/f424f8187f426f0b9ddbeaa02592ddb7 - fixed and updated so it'll also work with rakudo-perl6- # as well.
19:47 alphah Awesome Thank you!
19:47 DrForr The 'arch' token will need expanding as well, doubtless.
19:48 mcmillhj joined #perl6
19:49 pecastro joined #perl6
19:51 DrForr All I ask is that it end up on the ecoystem eventually :)
19:53 rindolf joined #perl6
19:56 alphah sure if it becomes decent enough :)
19:57 jjido joined #perl6
19:57 DrForr Done, and done.
20:00 cdg joined #perl6
20:02 RabidGravy DrForr. while you're on a roll - I've got these modules ..... ;-)
20:09 samcv guys how do you feel about having appimages created every day for moar-blead
20:09 samcv that would be cool
20:09 samcv looking at setting up github pages and having travis upload them to github pages
20:10 gfldex is there anything travis cant do? o.O
20:10 samcv yes
20:11 samcv have dependencies sanely installed and use an up to date distribution
20:11 samcv it can't do that
20:11 El_Che samcv: funny you ask
20:11 AlexDaniel .oO( travis is not doing allah is doing )
20:11 gfldex also, its api can't sync the repo list from github
20:12 El_Che samcv: I spent a few days reading stuff on Flatpack, Snap and appimage
20:12 El_Che I wasn't impressed :(
20:12 samcv well
20:12 gfldex what happend to good ditro packages?
20:12 El_Che gfldex: building ubuntu 17.04 i386 as we speak
20:13 gfldex El_Che++
20:13 El_Che I extremely dislike the Apple Appstore model of snap (and it only works as advertised on Ubuntu)
20:13 samcv idk krita has appimages. and they're trendy and cool. maybe we can be trendy and cool too :S
20:13 El_Che (I am an Ubuntu user)
20:13 samcv hahaha
20:14 samcv oh yeah
20:14 samcv snap sounds lame
20:14 samcv flatpak seems nicest, but you still have to install something
20:14 El_Che thing is, it 'works' elsewhere
20:14 El_Che but whitouth the security sandboxing
20:14 samcv but appimages don't need any install
20:14 El_Che so lame
20:14 samcv oh flatpaks? i thought they needed something to be installed?
20:14 El_Che flatpack only works on fedora :)
20:15 El_Che they have framework deps
20:15 El_Che so it's not completely self contained
20:15 El_Che which is not bad as such
20:15 El_Che I was reading up on appimage, but it never really went mainstream
20:16 El_Che and all the press is now for snaps and flatpack
20:16 AlexDaniel samcv: by the way, any chance of putting zef into it?
20:16 samcv idk appimages are most mainstream
20:16 El_Che (it does not have sandboxing either)
20:16 samcv it has zef in it
20:16 samcv atm you can only launch perl 6 but you can use any * modules
20:16 El_Che I think appimage is the most interesting of the 3
20:17 samcv yeah. tho it still sucks
20:17 samcv well not that bad but
20:17 samcv flatpak is better
20:17 samcv but appimages are more practical in $CURRENT_YEAR
20:17 El_Che I wonder though if app image is the right format for a programming lang
20:17 samcv why not
20:17 El_Che it is for a perl6 app
20:17 samcv you dl it and you run it
20:17 El_Che bundling the runtime and modules
20:17 samcv and can launch scripts with it or use the repl
20:18 samcv i mean. El_Che i can make a .tar.gz that you extract and can run
20:18 El_Che because of modules
20:18 AlexDaniel … and then if you need to install a module, then…
20:18 samcv you have to launch it from a certain path though
20:18 El_Che you need to integrate it with external stuff
20:18 samcv but i guess i could make a helper file or something like i did with appimages
20:18 El_Che while an application is self contained
20:18 samcv i mean.
20:18 samcv would just a rakudo that you unarchive and run
20:18 samcv would anybody want that
20:19 samcv cause i can do that too.
20:19 samcv but appimages seem a good way to get people to try perl6 out
20:19 samcv 10mb dl, run it. then if you like it you can install it fully
20:19 El_Che as a linux user, I would *always* prefer native packages, and if not available I will be happy with the distro independent tar.gz (like Go does)
20:20 El_Che this said, my pkgs are really lacking a repo to handle upgrades automatically
20:20 El_Che I really need to look into that
20:20 AlexDaniel samcv: why is it 10MB, by the way?
20:21 AlexDaniel I thought it would be around 7
20:21 samcv it has all modules
20:21 samcv of rakudo star
20:21 samcv idk
20:21 AlexDaniel what does it use for compression?
20:21 samcv uh
20:21 samcv the same thing linux iso's use
20:21 El_Che a rakudo star app image
20:21 El_Che nice
20:21 samcv El_Che, try out the one i have under releases
20:22 samcv https://github.com/samcv/rakudo-appimage/releases
20:22 samcv i think it works. it worked for me yesterday. but i think i broke my fuse
20:22 samcv cause it works on travis
20:22 samcv maybe it's just my build and i should build somewhere else. we will see
20:23 El_Che samcv: would it work in a Docker container? (I don't want to break stuff, just migrating to Gnome from unity :) )
20:24 samcv dunno
20:25 samcv sounds scary
20:25 samcv idk appimages seem the least hassle for the casual person checking out perl 6
20:25 samcv idk my hope is to get people to try it since they don't have to compile it etc etc
20:26 El_Che samcv: do you need to install something to support kik?
20:26 samcv appimages?
20:26 El_Che the original name
20:26 samcv you need nothing to support appimages other than having fuse installed. which like everything do
20:26 samcv ?
20:26 El_Che I like to call stuff by their old name like old people do
20:26 Cabanossi joined #perl6
20:26 El_Che how is life in the colonies?
20:26 El_Che :)
20:27 El_Che ah fuse
20:27 AlexDaniel samcv: OK I have question! If I have rakudo installed somewhere, can I easily turn it into appimage?
20:27 El_Che so they changed it
20:28 AlexDaniel samcv: I'm thinking of sharing all of whateverable builds
20:28 samcv ALL?
20:28 samcv like all builds of rakudo ever
20:28 AlexDaniel well, not all of them together, by one by one :)
20:28 El_Che they used to do a regular iso mounting so they ewere limited to 9 images in totoal
20:28 AlexDaniel so that you can ask a bot to give you an image of some particular build, yes
20:29 El_Che crappy connection here
20:29 AlexDaniel but*
20:29 Sound joined #perl6
20:29 Sound joined #perl6
20:29 El_Che I see a good use case: app bundling
20:30 El_Che the bad thing is that server probably don't have fuse
20:30 El_Che deploying perl6 like java or go would be sweet
20:30 AlexDaniel samcv: 「echo "Replacing path in binaries"」 oh wow…
20:30 samcv lolllllllllllllllllllllll
20:30 samcv yep
20:31 samcv that's why i install into /rsu so i can replace it into ././ (same number of bytes)
20:31 samcv ninja
20:31 AlexDaniel yea I noticed that
20:31 AlexDaniel can't it be any other path?
20:31 samcv if there's too many ././ then it breaks everything
20:31 _28_ria joined #perl6
20:31 samcv uh
20:31 samcv no
20:31 samcv how else to make it relative?
20:31 samcv we don't support relative builds
20:31 AlexDaniel hmm dunno just trying to understand
20:32 samcv like if it was /home/samantha/blah/blah
20:32 samcv you'd have to replace it with
20:32 AlexDaniel whateverable installs everything in /tmp/whateverable/something
20:32 samcv ./././././././././././././././././
20:32 samcv to be the same number of bytes
20:32 El_Che :)
20:32 samcv and that breaks things
20:33 AlexDaniel and thinking about it, maybe no appimage is actually required in that case… just extract it “properly” and it should work… hmmm
20:33 El_Che https://github.com/nxadm/rakudo-pkg/releases/tag/2017.03_02 <-- added Ubuntu 17.04 i386 pkgs (OS out next week)
20:33 samcv what case?
20:33 samcv oh so if you put it in that folder you mean
20:34 samcv well. can always uh
20:34 El_Che samcv: what's the problem with modules? Zef can find a valid install path?
20:34 samcv is there a problem with modules?
20:34 El_Che of the run path changes every time it runs?
20:34 samcv uh
20:34 El_Che samcv: oh, I thought you wrote that. I misunderstood
20:34 samcv there is no zef
20:34 samcv also it resolves relative directories
20:34 samcv given to it
20:35 samcv and some hackery inside the perl6 script inside usr/bin/ inside the appimage
20:35 samcv see the perl6 script in the repo
20:35 samcv also have you tried dling and running it?
20:36 El_Che I have the page open
20:36 El_Che was seeing if I could run in a container
20:36 El_Che but my connection is crappy here
20:36 El_Che (at the coast ith the family)
20:37 El_Che (connected to a provider public wifi that kind of works if I sit in the right place :) )
20:45 TEttinger joined #perl6
20:47 timotimo yay my template6 PR was merged \o/
20:47 timotimo it should now test fine again
20:51 samcv argh looks like it can't find Test module on Travis
20:51 samcv maybe i did break something
20:51 samcv well on star at least. i think nom probably works since it has no modules
20:54 timotimo Test is inside rakudo
20:54 timotimo if it can't find Test, then rakudo is gone :P
20:55 nhywyll joined #perl6
20:55 samcv nah
20:55 samcv Could not open /tmp/.mount_vGeETt/usr/(Test)
20:55 samcv hm
20:56 timotimo what, in parenthesis?
20:56 samcv yeah that's what it shows
20:56 timotimo weird
20:56 samcv use NativeCall;
20:56 samcv Could not open /tmp/.mount_vGeETt/usr/(NativeCall). Failed to stat file: no such file or directory
20:56 timotimo yeah, that doesn't look like it's possible to work
20:56 timotimo can you get the RAKUDO_MODULE_DEBUG env var up in there, or is that already set?
20:57 samcv uh linenoise and other modules WERE working
20:57 samcv but idk what i did
20:58 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2017/04/10/2017-15-kaboom-⁽¹⁾/
20:58 samcv yay
20:59 samcv hmm
20:59 samcv $*CWD is /usr
21:00 samcv well /tmp/.mount_ckZEtL/usr
21:00 gfldex I spy with my little eye and I see a https://p6weekly.wordpress.com/2017/04/10/2017-15-kaboom-%e2%81%bd%c2%b9%e2%81%be/
21:01 gfldex lizmat: you may have to republish with a better URL
21:01 samcv use NativeCall;
21:01 samcv Must specify something as a path: did you mean '.' for the current directory?
21:01 samcv in any statement_control at ././share/nqp/lib/Perl6/Grammar.moarvm line 1
21:01 samcv arghhh
21:01 timotimo yeah, we can change the url itself without changing the title
21:03 lizmat timotimo: how ?
21:03 lizmat ah, the slug?
21:03 timotimo think so, yes
21:04 lizmat https://p6weekly.wordpress.com/2017/04/10/2017-15-kaboom/
21:05 lizmat gfldex: seems both url's work, at least for me
21:05 gfldex they do for me too
21:05 gfldex i'm gonna tell reddit
21:06 timotimo cool
21:07 El_Che samcv: just run the app
21:08 El_Che I see, it's meant as a repl, not as a install?
21:08 samcv yeah
21:08 samcv i mean does it give errors on launching the repl?
21:08 samcv i mean you can run scripts with it
21:09 El_Che i complains about Linenoise
21:09 El_Che I ran into a problem while trying to set up Linenoise: Could not open /tmp/.mount_OpJshC/usr/(Linenoise). Failed to stat file: no such file or directory
21:09 timotimo yeah, wtf is that about
21:10 El_Che image -v works
21:10 El_Che but this doesn't:
21:10 samcv yeah
21:10 El_Che ./org.perl6.rakudo-x86_64.AppImage -e 'say "foo"'
21:10 samcv argh
21:10 El_Che Could not open /home/foo/"foo". Failed to stat file: no such file or directory
21:10 samcv oh that makes sense
21:10 samcv lol.
21:11 samcv cause it thinks that is a directory and it resolves it in my helper script
21:11 samcv will need to fix that
21:11 samcv wish i didn't overwrite my working binary lol
21:11 samcv oh well
21:11 El_Che https://github.com/samcv/rakudo-appimage/blob/master/perl6 <- that one?
21:11 samcv if i did it once hopefully can do it again
21:11 timotimo working binary, as in: one of the appimages?
21:12 samcv the first one i gave people
21:12 timotimo i still have that
21:12 samcv i overwrote it on my server
21:12 samcv ok
21:12 timotimo hold on
21:12 samcv then please gimme :)
21:12 samcv heh
21:12 samcv cause that one actually worked
21:12 samcv and didn't have the path issues
21:14 timotimo http://hack.p6c.org/~timo/org.perl6.rakudo-x86_64.AppImage
21:14 samcv thanks :)
21:15 samcv sweet. that works
21:15 samcv -e works too, but relative paths are busted though since i fixed that recently
21:16 samcv but if you give it full paths then it should work pretty great
21:18 bjz joined #perl6
21:23 samcv ok yay. it looks like it's just the bash script that is the issue. and taking the bash script from the old one timotimo gave me made new one work :)
21:23 samcv i was scared there was an issue patching the binaries and started to freak out
21:31 AlexDaniel s: 'unique', \(1, 2, 3)
21:36 samcv oh btw guys
21:36 samcv do we want a 'help' command on our repl
21:36 samcv python has one
21:37 samcv looks like the maker of AppImages tried my package https://github.com/samcv/rakudo-appimage/issues/1#issuecomment-293085980
21:38 samcv was interesting to see somebody type help
21:38 samcv but it makes sense. it's what i do if on some new prompt i have no clue wtf it is. like grub prompt or efi firmware cmd which i have no clue what the commands are
21:42 * gfldex .oO( We wont `help` you but we will let you `exit`. )
21:44 gfldex python wont let you go that easily!
21:44 gfldex >>> exit
21:44 gfldex Use exit() or Ctrl-D (i.e. EOF) to exit
21:44 samcv ...
21:44 samcv hah
21:45 samcv i think we should have a help though
21:45 gfldex i agree
21:45 samcv would make it more friendly
21:45 samcv what should it say though
21:45 El_Che samcv: I'll test it when you put the new img online
21:45 samcv like it doesn't matter what, but as long as something not nothing
21:45 samcv it is online
21:45 gfldex and it should have Camelia ASCII art
21:45 El_Che I give up for now, the connection is too crappy
21:46 samcv El_Che, RC2 https://github.com/samcv/rakudo-appimage/releases
21:46 El_Che (was trying to add alpine pkgs, but just surfing the pkg archive of alpine is too painfull)
21:46 gfldex but before you can have that p6doc would need to work properly
21:46 samcv yeah but should direct you to like docs.perl6.org or say something encouraging or something
21:47 samcv heh http://www.nntp.perl.org/group/perl.perl6.language/2010/09/msg34171.html
21:47 gfldex we could provide a helpful link when the repl is invoked
21:47 samcv that is too big though
21:47 samcv hm
21:48 El_Che I think that I can minimize JJ's alpine rakudodocker  img to around 15meg if I can get the pkg built
21:48 El_Che (he uses rakudobrew with all the dev deps)
21:48 El_Che however, the appimage has the advantage of not needing root!
21:48 samcv yep
21:49 El_Che that's huge
21:49 samcv yugeeee
21:49 samcv tremendous!
21:49 samcv it is pretty great though.
21:49 samcv the only real issue though. is it lands you in $*CWD that is in the appimage temp mount
21:50 samcv and not in where you start it
21:51 samcv so relative dirs don't work. but i have a hack for that, just need to make sure it doesn't hose the modules (still not sure how it did that)
21:52 TimToady joined #perl6
21:58 Cabanossi joined #perl6
22:11 gfldex lizmat: the link to Slippy::Semilist is a 404
22:11 lizmat oops, lemme check
22:12 lizmat should be fixed now, gfldex++
22:12 gfldex thanks
22:14 gfldex while de-nqp-lifying Rakudo::Slippy::Semilist to Slippy::Semilist I found that performancy drops by only 15% these days if I call .EXISTS-KEY, .BIND-KEY and friends directly
22:15 gfldex what also means that postcircumfix:<{ ]> is terribly slow (factor 25 IIRC)
22:17 samcv ok. i made better debugging of my stuff
22:17 samcv and i figured out why it's dying on using modules
22:18 samcv https://gist.github.com/samcv/401ddc20a5d99c4ced9cb73adcc44233
22:18 samcv oh my
22:18 samcv hehe
22:19 lizmat gfldex: yeah, postcircumfix:<{ }> will be hard to optimize until we have a way to indicate a signature *without any* named parameters
22:19 lizmat something like sub a(\a, !%) { }
22:19 samcv semiconfused looking at that...
22:20 lizmat well, bikeshed away
22:20 lizmat perhaps !%_ ?
22:21 samcv oh i see what it's doing... it thinks (Test) is a directory. and finds the path of it
22:21 samcv that's funny actulaly
22:22 gfldex sub s($a! where { !$a.foo}, !%_)
22:22 gfldex i not sure if I would like ! as a prefix and a suffix in sigs
22:23 gfldex I don't have a better idea tho
22:23 gfldex sub s($a! where { !$a.foo} --> Int; !%_)
22:23 gfldex that would make it stand out more
22:24 gfldex it's a thing that is not part of the Signature because it must be missing
22:25 gfldex .uni 擯
22:27 gfldex sub s($a! where { !$a.foo}, ¬%_)
22:27 timotimo samcv: why is it even trying "(Test)", i.e. where do the parens come from?
22:27 samcv uh the argv's
22:28 samcv they're in there
22:28 samcv i guess telling it it's for the Test module or something
22:28 samcv gonna fix it the same way i'm gonna fix -e, gonna have a list of command line args that if it sees those, the next one is not gonna be interpreted as a path
22:30 samcv shell scripting is so weird/bad. there's like 8 ways to do things
22:30 samcv all with caveats and weird things
22:31 samcv also: https://gist.github.com/samcv/be88a800d54aca54cc57d8122c062bcc
22:31 samcv bashhhhh why do you do this to me
22:32 samcv gotta duble check it's not the appimage mangling args tho
22:32 mst that looks very odd
22:33 samcv nope it's bash
22:33 samcv i hate shell scripting
22:33 mst how so?
22:33 samcv it's messing up my arguments
22:33 samcv when it's quoted it should not be seperate
22:33 geekosaur ?
22:34 mst samcv: uhh, bash won't split those
22:34 samcv like you quote things, and then it passes the quoted section as one command arg
22:34 mst yes, that's how bash works
22:34 samcv apparently ${BASH_ARGV[*]} does
22:34 samcv (split them)
22:34 mst oh, ah, not exactly
22:34 sufrostico joined #perl6
22:34 mst what's happening is word splitting is happening afterwards
22:35 samcv oh.
22:35 mst how are you using ${BASH_ARGV[*]} ?
22:35 samcv not quoting it. argh
22:35 mst exactly
22:35 bjz joined #perl6
22:35 mst hence why generally shell scripts that are wrappers to stuff like
22:35 mst exec $program "$@"
22:35 mst I suspect your weird bash specific thing is a fancy $@
22:35 mst hard to tell since there's lots of blaming bash and no bash code in the backlog so far :)
22:36 samcv heh
22:36 samcv ok here https://gist.github.com/bc009f92a764fffe8f2571f0d34e3bb2
22:36 samcv i quoted it. now need to track somewhere else it's spliting
22:37 samcv well wait
22:37 samcv now i get my args all messed up
22:37 samcv now that i quoted it
22:37 samcv Got Arg:       1 is ‘say hi -e’
22:37 samcv it uh. quoted it. and they're ordered in reverse order
22:38 mst what is this code actually supposed to do?
22:39 mst you're using bash-specific weirdness everywhere
22:39 samcv i agree
22:39 mst I always write either shell scripts that work on multiple OSes
22:39 samcv please help me
22:39 mst or I use perl5 to mangle things
22:39 AlexDaniel 「for a in ${NEWARGS[*]}」 that would normally be 「for a in "${NEWARGS[@]}"」
22:39 samcv :(
22:39 samcv i tried to get it to work on posix shell
22:39 AlexDaniel but depends on what exactly you're trying to achieve, I haven't looked closely
22:39 samcv but i did not kno whow
22:39 mst well it certainly doesn't work in bash atm :P
22:39 samcv i wanted to iterate $@
22:39 samcv but i couldn't figure out how
22:40 samcv after searching online for a long time. since most was related to bash
22:40 geekosaur for f in "$@"; do
22:40 mst bash -c 'for i in "$@"; do echo -- $i; done' -- -e "say 'hi'"
22:40 samcv ok using @ instead of the *
22:40 mst works fine
22:40 samcv for some reason that didn't work. but. i will do that
22:40 kyan joined #perl6
22:41 mst please can we try and make it a real shell script?
22:41 geekosaur has to be quoted, and has to be $@ not $*
22:41 samcv i must have messed something up idk
22:41 samcv yes
22:41 AlexDaniel mst: you forgot to quote "$i"
22:41 samcv that was my end goal
22:41 mst AlexDaniel: was just showing that the 'for' worked
22:41 AlexDaniel still forgot to quote it :P
22:41 mst AlexDaniel: alright, you write it then
22:41 samcv ok thanks guys
22:41 samcv will get it less bashy
22:42 AlexDaniel for i in "$@"; do printf '%s\n' "$i"; done
22:42 AlexDaniel :P
22:43 timotimo bash also needs the GLR
22:43 AlexDaniel samcv: well, in practice, you'd probably want 「cd -- "$OWD"」 and stuff like that
22:44 samcv in practice what
22:44 samcv i have that in there? not sure
22:44 samcv what you mean by that
22:44 AlexDaniel samcv: does not mean that there's necessarily a problem everywhere, but generally if you have no -- then it is quite possibly a bug
22:44 samcv also timotimo++ please tell them to get on that
22:44 AlexDaniel there are other shells that do a better job
22:44 samcv oh
22:44 samcv why do i need --
22:45 AlexDaniel samcv: because if your variable starts with - then most commands will treat it as a parameter
22:45 AlexDaniel for example
22:45 samcv yes
22:45 samcv very true
22:45 AlexDaniel a='-n'; echo "$a"
22:45 samcv thank you
22:45 samcv i will also quote the "--" as well :P /s
22:45 AlexDaniel (for that reason you cannot actually use echo to print variables, it does not support -- and you have to use printf instead)
22:46 AlexDaniel samcv: also, if you're using bash anyway, you probably want [[ ]] instead of [ ] everywhere
22:46 samcv no i want not bash
22:46 samcv but i'm going to keep it as bash and get it working first
22:46 samcv once it's working i'll posix it
22:46 samcv i think i'm almost there
22:47 samcv hmm i need to iterate the bash argv's the opposite direction
22:48 samcv uh mst how can i access one element of $@
22:48 samcv that's the original thing i tried to do so i could iterate how i wanted
22:48 AlexDaniel "$1" ?
22:49 sufrostico joined #perl6
22:49 samcv no
22:49 samcv i'm not using those i need to iterate them
22:49 samcv not access individual ones
22:49 samcv because idk how many args i will get
22:49 geekosaur POSIX shell doesn;t provide a decent way to do it programmatically
22:49 AlexDaniel hm I wonder if "${@[1]}" is going to work
22:49 geekosaur there are bash-isms that can do it
22:49 geekosaur like that
22:50 geekosaur POSIX shell requires horrors like $(eval echo -- "\$$i")
22:51 geekosaur hm, not quite, quoting :/
22:51 geekosaur $(eval echo -- "\"\$$i\"")
22:51 AlexDaniel /o\
22:52 geekosaur now you understand why so many folks punt to bash... or perl etc.
22:52 samcv save me
22:52 AlexDaniel samcv: you sure you cannot use bash?
22:52 samcv no i'm using bash now
22:53 samcv i want to make it work first
22:53 AlexDaniel samcv: then just iterate it backwards? $# is the number of arguments, access them with "${@[$i]}"
22:53 samcv yeah that's what i'm gonna do
22:56 samcv ${@[$i]} does not work
22:57 samcv printf "this command is executed at least once $i %s\n" "${@[$i]}" # bad substitution
22:59 sufrostico joined #perl6
23:00 samcv ok
23:00 samcv the problem is. i can't access $@ inside the function
23:00 AlexDaniel samcv: right, because that's how you get function args
23:01 samcv ooook
23:01 samcv now things are working
23:03 samcv all my problems are solved
23:04 samcv well. these ones are
23:10 skids joined #perl6
23:16 samcv yay it's working now :)
23:16 samcv -e now works
23:19 sjn lizmat: typo in p6weekly: "&nbnsp;"
23:21 timotimo how did Ninja Sex Party™ (only the best band in the world) get in there?!?
23:25 Geth ¦ doc: 372545c059 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
23:25 Geth ¦ doc: [io grant] Straighten up file test docs
23:25 Geth ¦ doc: review: https://github.com/perl6/doc/commit/372545c059
23:42 Cabanossi joined #perl6
23:51 gurwall_ joined #perl6
23:54 BenGoldberg joined #perl6

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

Perl 6 | Reference Documentation | Rakudo