»ö« 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.
bioduds perl Configure.pl --backend=moar --gen-moar 00:44
===SORRY!=== No suitable MoarVM (moar executable) found using the --prefix (You can get a MoarVM built automatically with --gen-moar.)
makes no sense to me
timotimo try an explicit --prefix argument to Configure.pl? 00:56
or let it output what prefix each of the three pieces are actually working with? 00:57
bioduds cause it suggests me to --gen-moar and I do 01:07
timotimo of course 01:07
bioduds this is 2016.07
timotimo --gen-moar is supposed to install a moar and an nqp in whatever --prefix you supplied
bioduds doesn't happen on 2016.04
timotimo if you don't supply a --prefix, it goes with basically "./install/" 01:08
is there a install/bin/moar there?
stmuk bioduds: no the third line from the bottom still has a .04 reference
bioduds no
oh, correct 01:09
let me fix that
timotimo maybe Configure.pl could list what it could have considered
and give a better error message?
though i think i've already seen an error message like that?
stmuk maybe refactor the version into an env var so you only have to change it one place like rakudo-star-${VERSION} 01:10
timotimo also, if you --gen-moar, that's not supposed to error out?
bioduds you have a good eye man
trying again
im a little tired actually 01:11
yes stmuk 01:12
this is in my plan for final changes
once all works on all linux distros im testing
after I gather all suggestions from you top cats on P6 as well 01:13
bioduds question, I do need to make and then make install? 01:14
timotimo normally, yes 01:18
but if you just "make install", it'll do the same thing as "make" before it can install
bioduds it is working now 01:42
on ubuntu 14.04
AlexDaniel hehe 02:39
ugexe `zef --sha1 locate <some sha1>`, `zef locate lib/My/Module.pm6`, and `zef locate My::Module` have been added. Each one tells you the local distribution its from, as well as the absolute path to whatever file represents it 05:05
gist.github.com/ugexe/da5ff890c43a...c0e40ac0d7 05:08
moritz ugexe++ 06:09
avuserow I have an issue with unsigned native types within classes, where it treats unsigned integers as their signed counterparts. I can report this bug, but I was wondering if there's a bunch of native type work in the future or if it was potentially fixable without tons of changes. 07:04
m: my uint8 $var = -1; say $var; class Foo {has uint8 $.bar is rw}; my $foo = Foo.new; $foo.bar = -1; say $foo.bar; # an example of this problem 07:05
camelia rakudo-moar 88ceab: OUTPUT«255␤-1␤»
avuserow (I would expect 255 for both)
avuserow I believe this to be the same as rt.perl.org/Public/Bug/Display.html?id=127210 , even though I am seeing it without the repr change. (I would mention this on RT but have no clue how to reply to a bug there) 07:13
BASIM Wow relax on the party, people 08:44
So... anyone in here that can help me with printer drivers? 08:45
lizmat printer drivers ??? 08:46
BASIM: how does that relate to perl 6?
BASIM well... I just thought you guys would be experts in computers and stuff, so maybe you could help me getting my printer working 08:47
TheLemonMan bulletproof logic, I must admit 08:51
kaare__ Yeah, honestly. Why don't you guys write a perl 6 printerdriver? 09:06
lizmat $*PRN # voila 09:07
Woodi kaare__: I think, what lizmat++ presented was just spec of it. now we need voluntiers and few years. anyway drivers are boring, you need to rewrite some hardware access api in software, you can't simply create things just out of air as with compiler code :> 09:54
nine hasn't managed to get his own printer working yet 09:58
lizmat nine: perhaps you could use Inline::Perl5 ? 09:59
El_Che a printer: device, often in combination with a scanner, that old people use to put books on 10:00
Woodi El_Che: I put many thing on my multi-function machine... and on monitor too... but I'm not old !! 10:03
baest it seems like a simple thing to do, but if a have a class with a DateTime attribute how do I assign a new DateTime to it beside the constructor? 10:37
Zoffix avuserow, that's a strange branch name. Was it an error that it got created? github.com/perl6/roast/tree/d8cf465
Zoffix baest, attributes are read-only by default. You'd need to `is rw` it 10:38
baest Zoffix: ahh, yes, I forgot that completely
thanks
Zoffix avuserow, it's equal to master, so I deleted it on the assumption it was just an error 10:41
tbrowder need advice: i'm converting a cpan p5 module to p6. it has many functions that return a variable number of array elements depending on the number of inputs. something like "my @arr = foo(@input)" where @input can be one to N elements. what would be a better way in p6 to structure such a function? 11:09
titsuki Hi #perl6. Is docs.perl6.org in the maintenance now ? 11:10
timotimo it works for me at the moment 11:12
titsuki hmm
I can't access the official document page both Opera and Edge browser now... 11:14
timotimo what kind of error do you get? can you try something like ping, traceroute, ...?
JimmyZ tbrowder: sub foo(*@input) { } 11:15
titsuki timotimo: ping returns no responces. gist.github.com/titsuki/829ec20ccb...00247a5e6e 11:16
timotimo OK, with traceroute we could perhaps find out where on the way the packets get dropped 11:18
JimmyZ can
timotimo but i'm not sure how we'd continue from there
masak greetings, #perl6
titsuki traceroute gist.github.com/titsuki/9548facad8...f2dbd7eee3 11:19
timotimo wow, you're really not getting far at all
tbrowder JimmyZ: thanks. i mean the io: would it be better to modify the input as read/write or no real difference in just returning a new array?
timotimo is your access point or internet router or modem dropping some kinds of ICMP traffic ... ?!?
masak japhb: yes, that's precisely the answer that modulo can't give ;)
timotimo titsuki: or maybe you have some kind of firewall software that's a bit too "protective"? 11:20
anyway, if you have a machine that you can ssh to, you can ssh -D 4321 and use localhost:4321 as a SOCKS proxy in your web browser
masak tbrowder: if you're not sure which way is better, may I suggest trying it two or more ways, to see which one comes out nicer? 11:21
timotimo it'll be a tiny bit slower, but it may get you through
m: my $foo = "hello"; $foo .= &say
camelia rakudo-moar 88ceab: OUTPUT«hello␤»
timotimo ^- neat!
titsuki timotime: I see. thanks !
timotimo tbrowder: if your function returns an array, the user can use .= &yourfunc to replace the old array with the new, otherwise use $foo.&yourfunc to leave the original intact 11:22
tbrowder: if you "is rw" and modify the existing one, there is no such choice
timotimo tbrowder: and, what's worse, you can't yourfunc(1, 2, 3, 4) or yourfunc((1, 2, 3, 4)) if it's "is rw", because then there's no way to get the values out, it'll probably even refuse to call because it's not an rw thing you're passing in 11:24
tbrowder masak: yes, i should experiment with a small example
titsuki timotimo: I did nothing, but I can view the official document page now...
timotimo OK, so just a little network hiccup
happens all the time
timotimo is AFKBBL for a bit
tbrowder timotime: that's p6ish, thanks!
timotimo why do people keep calling me that? :D 11:25
timotimo it's timotime, c'mon grab your friends, we'll go to very distant lands~ 11:25
masak .oO( "friends" and "lands" don't rhyme ) 11:28
profan poet's license
masak Poet's License 2.0
profan :D 11:29
timotimo Artsy Fartsy License 2.0
tbrowder timotimo: sorry bout typo, but i think that's the first time i've mangled yr name 12:10
timotimo titsuki just spelled it the very same a few lines earlier 12:12
that's what made me wonder ;)
tbrowder no guarantee it won't happen again, though 12:13
timotimo ;)
i usually just type someone's first few letters and press tab 12:14
masak I just call every one "Tab". easier that way.
everyone*
tbrowder i haven't figured out how to tab on ipad with my irc client yet 12:15
nine I mapped the volume down button on my phone to tab in VX ConnectBot 12:17
tbrowder opinions on best irc client for ipad and pc browser most welcome; i'm using irccloud at the moment
lizmat I use Colloquy on my iPhone: it lists suggestions of logged in people to select from 12:21
so "timo" would pop up like "timotimo: " for me
timotimo i do pop up all the time don't i :) 12:23
lizmat :-) 12:24
dalek line-Perl5: 0157367 | (Thomas Klausner)++ | README.md:
document how to import functions from Perl5 modules
12:33
line-Perl5: 3d37361 | niner++ | README.md:
Merge pull request #74 from domm/master

document how to import functions from Perl5 modules
stmuk nine: ping? 12:35
El_Che tbrowder: serverbot to remote ssh + screen
nine stmuk: pong 12:42
stmuk I've written some curli using code which may horrify you :) 12:43
if there is any saner way of doing uninstall than github.com/stmuk/panda/commit/5e15...def4dc1031 I'd be grateful for advice 12:44
nine stmuk: gist.github.com/niner/b39258032f70c083e57b 12:52
stmuk ah that looks better 12:54
nine stmuk: for the next life, I can only recommend implementing alls that Repository stuff yourself. It makes such tasks a lot easier :) 12:56
stmuk maybe the gist examples (which are hard to find) might be better in a perl6/toolchain-misc-examples repo? 12:57
or somewhere else with better visibility? 12:58
inline pod6 in the rakudo source maybe 12:59
nine feel free to put them wherever you think they will do good :)
lizmat perhaps we should include it in core ? 13:01
stmuk I can see 3 examples on gist.github.com/niner?page=2 of potential use .. are there more?
nine An updated install-dist.pl is alrady included with rakudo's source 13:03
(to become raccoon)
module-source.pl is outdated 13:04
poohman hello, a newbie to perl6 and perl here 13:05
nine Hi poohman 13:06
lizmat poohman o/
poohman hello nine, lizmat - need some help regarding grammars and parse outputs
lizmat poohman: although I'm a relative grammar noob, I'll try to give an answer :-) 13:09
poohman thanks, I created a grammar and parsed a file successfully using it - now when I try to output the parsed data using say it prints out the token name along with the text 13:11
is it possible to print only the text just like we do with normal variables
stmuk maybe the curli docs should just go in the p6doc repo
timotimo poohman: you can get the matched text by using .Str on the result 13:12
the result of a match is a so called "Match Object", it keeps a lot of structure for you if you need it
poohman thanks a lot - let me check it out and get back to you 13:13
timotimo you can access it like a list and like a hash; if you have a token named "foobar" directly inside your match object, you can get the value through $my_result<foobar>; what exact things you have available can be figured out with $my_result.keys, and $my_result<foobar>.keys if foobar is a key inside $my_result will give you "the next step"
i have to go AFK for a bit now
good luck and have fun! :)
stmuk or maybe uninstall-dist.pl should be a roast test?
TimToady a shorter way to coerce to string is the ~ prefix 13:14
baest is pastebin.com/gjVz6kCw a bug? That is it seems to disregard pod before empty MAIN method 13:25
and then pushes the description down 13:27
CIAvash baest: You probably want #| not #= 13:32
TimToady what CIAvash++ said 13:33
think of = as like assignment, it wants something on the left
and #| wants to have a paragraph of things with a fake | for the left margin
well, a | for the fake left margin :) 13:34
baest CIAvash: ok cool thanks. I was looking at perl6advent.wordpress.com/2014/12/...t-of-main/
TimToady or the one with horizontal lines goes to something on the same line, and the one with the vertical line goes to something below 13:34
baest CIAvash++, TimToady++ 13:37
El_Che lizmat: I have something I don't know if it's Weekly news material: github.com/nxadm/rakudo-pkg . It has not end users to mind but release managers/packagers: create native rakudo packages (deb/rpm) with docker. It needs people to add more supported OS'es 14:30
maybe a should write a small blog post
lizmat sounds like a plan :-)
El_Che so far it creates ubuntu (amd64 and i386) debs and centos 7 (amd64) rpms, the OSes I use on a regular base. I imagine some people use other stuff. What does TimToady use? Mint? ;) 14:33
it's all nine's fault actually :) 14:34
lizmat yes :-) 14:34
elohmrow El_Che: cool! 14:38
yoleaux 31 Aug 2016 20:00Z <bartolin> elohmrow: the UnwindException you get trying to install a module with rakudo-j is one of the bigger known bugs with the JVM backend: rt.perl.org/Ticket/Display.html?id=124279
31 Aug 2016 20:05Z <bartolin> elohmrow: there are a lot of skipped tests in roast due to this error. you can grep for UnwindException in roast to find tests with this failure mode
elohmrow yoleaux: thanks for the info - it did not stop me in the end doing what i needed to do for my talk, but ... 14:39
TheLemonMan El_Che, why is ruby needed ?
El_Che TheLemonMan: the pkgs are created with fpm 14:40
but that's in the container
the pkgs have no dependencies
TheLemonMan oh, I see
El_Che moarvm and nqp are in the same pkg as the included 3rd party libs
El_Che idea is "run this command and create pkgs" without installing stuff on your pc 14:41
everything is in the container
elohmrow ++
El_Che so as long you run a platform supported by docker you can create all the pkgs for whatever distro is included in my repo 14:42
the contao 14:43
the imgs are on the docker hub
so no extra downloads
just the docker cmd or beter, my wrapper script
El_Che in principle osx pkg creation is also supported, but I have no idea if the pkg fotmat is popular (I see img mostly) 14:45
but rakudo already supplies mac and win binary pkgs so tht problem has been taken care off 14:47
TheLemonMan El_Che, the readme states the dockerfiles are in bin but you've put em in docker/ 14:53
El_Che thx. I'll fix it at home 15:00
lizmat: what did you do with b d foy? his first perl6 module?!? 15:06
lizmat :-) 15:07
El_Che that was.. unexpected
lizmat APW shutting down& 15:12
stmuk drinks tea from his Cluj mug 15:13
lizmat afk again& 16:29
domm nine: wir sind im Himal. 17:16
Unavowed Does perl6 have an equivalent of python's "with" keyword or RAII in C++ (nicer than remembering to use LEAVE)? 17:24
arnsholt There's no built-in syntax, but it's pretty easy to write a normal function that does the job 17:26
Unavowed Something like sub with($obj, &code) { &code($obj); $obj.destroy } with(open("file"), -> $f { $asdf = $f.read() }) ? 17:28
arnsholt m: class Considerable { method cleanup { say "clean!" } }; sub considering(Considerable $obj, &block) { &block($obj); LEAVE { $obj.cleanup } }; considering Considerable.new, -> $c { say $c } # Like so, more or less 17:29
camelia rakudo-moar 4d5abd: OUTPUT«Considerable.new␤clean!␤»
arnsholt Yeah, that's pretty much it. Just remember to use LEAVE, so clean-up gets called on abnormal exits too 17:30
Unavowed Right, thanks
TimToady or you can use 'will leave { .cleanup }' directly on a declaration 17:52
though not on a parameter (yet)
Unavowed That's a bit nicer, good to know, thanks 17:56
stmuk 18:05
poohman__ hello all, Thanks Timotimo, Str. helped 18:09
i have another question - there is a difference in the parsing if I use the Grammar: Debugger and when I dont use it 18:10
is this normal
?
TimToady are bugs normal? :) 18:12
poohman__ :) newbie alert 18:34
am a newbie here, so please bear with me 18:35
and by the way is Timtoady, the Timtoady?? 18:36
TimToady so I've been told :) 18:37
poohman__ wow, screenshot at once - look who Im chatting with :) 18:38
can I do something about it? the problem I mean 18:40
masak no, you can't do anything about chatting with TimToady :P
TimToady
.oO(chat happens)
18:41
El_Che TimToady is famous. He's the guy who invented the hooverboard it seems 18:42
TimToady I vaguely recall there's an existing bug report on Grammar::Debugger bitrotting since last year
poohman__ read the bug report - was too deep for me - but will try changing my h* to s* and see if it helps 18:51
masak poohman__: the short answer is "yes, there are known cases where switching on Grammar::Debugger changes the outcome of the parse" 19:12
the details are deeper than that, but it's still a bug no matter how you look at it 19:13
poohman__ ok, will have to try to figure it out without the debugger as it work with it, thanks for the info 19:20
masak I was debugging a misparse the other day. tried Grammar::Debugger -- but it obviously screwed up the observables, so I found the bug without it. 19:22
masak (it made the baseline passing input fail) 19:22
avuserow .tell Zoffix I had no intention of doing anything with roast. not sure how that could've happened. thanks for cleaning up :) 19:25
yoleaux avuserow: I'll pass your message to Zoffix.
tushar Can someone point me to a documentation or a good tutorial about POD? I am having trouble finding one. Thanks 20:29
masak tushar: you mean Pod for Perl 6, yes? 20:31
not POD for Perl 5?
tushar Yes Perl 6 POD
tushar I tried to look into Perl 6 documentation website but it only has information about POD for tables 20:34
DrForr I ended up reading the synopses - look on perl6.org homepage for the link.
tushar @DrForr - Thanks 20:37
masak yes, that's what I would suggest, too. 20:41
DrForr Do multiple 'unit class Foo;' declarations cause multiple unit scopes in the same file? Or are they nested? I'm guessing the former. 21:15
moritz I thought they were disallowed 21:16
DrForr NM, multiple 'unit class' is disallowed.
DrForr Just deciding how it should look in terms of Perl6::Tidy. Which by now is more Perl6::P6PI or something like that. 21:18
I think the simplest way is to treat it as a block with no delimiters. 21:19
AlexDaniel is there any reason to use a “try” block if you are providing your own CATCH? 21:23
moritz no 21:24
moritz *finally* installed a cron job to renew the perl6.org certificates automatically
AlexDaniel gets rid of one level of indentation
moritz: oh right, I should do that one day too… 21:25
moritz clever of the letsencrypt folks to only allow certificates with 90 days validity; that creates extra incentives to automate it
and their current version of their client has a --nointeractive option 21:26
AlexDaniel yes
moritz (and lots of third-party clients are meant for non-interactive runs as well)
masak 'night, #perl6 22:31
tushar where do Perl 6 modules get installed in mac? I have installed rakudo star as .dmg and using panda to install modules? 22:32
lambd0x Hi everyone! 22:39
rightfold hi 22:40
lambd0x rightfold: :)
rightfold: Man, I think my code's msg is not ok :S ... can you take a look at it, plz? bpaste.net/show/1e1e5f4e05cc 22:42
code: bpaste.net/show/961563fa5862 22:43
lambd0x is this normal? 22:58
timotimo lambd0x: when you do ,= you put the list itself as its first element, and the second element is the RHS of the ,= 23:04
that's quite probably not what you meant to do :) 23:05
m: my @foo = 1; @foo ,= 2, 3, 4, 5; say @foo.perl
camelia rakudo-moar aceb4a: OUTPUT«(my \Array_36012208 = [Array_36012208, (2, 3, 4, 5)])␤»
timotimo you see how it gives the exact code to restore this exact state?
m: my @foo = 1; @foo ,= 2, 3, 4, 5; say @foo === @foo[0]; say @foo === @foo[0][0] 23:06
camelia rakudo-moar aceb4a: OUTPUT«True␤True␤»
lambd0x timotimo: Yeah it wasn't really. I'm trying to insert a number in a index if that index is empty or alonside it if not. I think it's easier to do with hashes but I think it's achievable too with arrays :P 23:18
timotimo: ah actually I just noticed it was way easier than what I thought :S 23:23
m: my @a; @a[0].push(2); @a[0].push(3); @a[1].push(4); say @a;
camelia rakudo-moar aceb4a: OUTPUT«[[2 3] [4]]␤»
timotimo you probably want to use splice if you want it to go in the middle 23:25
pushing into an empty array element will auto-vivify an array there for you
similar to how this works:
m: my @foo; @foo[3][1][0][5] = "hello there!"; say @foo.perl
camelia rakudo-moar aceb4a: OUTPUT«[Any, Any, Any, [Any, [[Any, Any, Any, Any, Any, "hello there!"],]]]␤»
lambd0x timotimo: can you give me an example of splice, pls? 23:28
timotimo yeah 23:30
m: my @foo = 0, 1, 2, 3, 4; @foo.splice(2, 0, 9, 9, 9); say @foo.perl 23:31
camelia rakudo-moar aceb4a: OUTPUT«[0, 1, 9, 9, 9, 2, 3, 4]␤»
timotimo this means "at position two, delete 0 elements, then put 9, 9, and 9 in that place 23:31
lambd0x timotimo: It's what I want, indeed. thank you :) 23:32
timotimo YW
lambd0x by the way, is known if '^' for lower boundaries of ranges such as for $i^..^4 { ... } is buggy? Because I've issued a segmentation error at moar/vm and later found out that the code would work as expected if that instruction were replaced by ($i+1)..^4 { ... } no error at all would happen. 23:43
github.com/MoarVM/MoarVM/issues/400 23:44
TimToady what does +$i ^..^ 4 do/ 23:51
?
perhaps $i is not numeric?
lambd0x timotimo: The error happens with a simple bubblesort alg. For inputs sizing up to 5000 els it will start giving problem, otherwise it won't. And changing the $i^..^ to ($i+1)..^ the problem doesn't appears. 23:53
TimToady: I think it's interpreted as num 23:54