»ö« 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.
00:01 mcmillhj left
timotimo what i like to do is have a channel where i send a specific number of permits and when i want to do something that consumes a resource i receive from the channel and when that part of code is done it sends on the channel 00:02
actually, it might be better to "await" the channel, because that can suspend the task back to the thread pool i assume 00:03
guifa Hmm, I'll look into trying that. Although ultimately all this is just trying out different features. As long as my project runs, multi or single threaded, my dissertation advisor will be happy haha 00:05
Geth doc/car-grant-midrat: f644d9dd66 | (Zoffix Znet)++ | doc/Language/numerics.pod6
Start writing Numerics guide
00:06
00:07 mcmillhj joined 00:12 mcmillhj left 00:17 Herby_ joined
Herby_ how do I convert a number into a character? for example, getting the ascii value of 126 00:18
my googlefu is failing 00:19
00:20 kurahaupo_ joined, vcv_ left
Herby_ "42".char 00:22
m: 42.char
camelia No such method 'char' for invocant of type 'Int'. Did you mean any of these?
can
chars
chop
chr

in block <unit> at <tmp> line 1
00:23 kurahaupo left
guifa .ord 00:25
00:25 mcmillhj joined
Herby_ m: 42.ord 00:25
camelia ( no output )
Herby_ m: say 42.ord
camelia 52
guifa err, wait, wrong direction 00:26
chr is what you want
Herby_ m: say 42.chr 00:27
guifa p6: say 42.chr
camelia *
Herby_ thanks :)
was reading this reddit thread on brute forcing hello world: www.reddit.com/r/ProgrammerHumor/c...world_now/ 00:28
was going to try a p6 solution
00:29 camelia left 00:30 camelia joined, mcmillhj left 00:31 ChanServ sets mode: +v camelia 00:32 w_richard_w joined 00:33 guifa left 00:34 kurahaupo_ left 00:35 kurahaupo joined
Herby_ ta da! gist.github.com/sylints/0fd150aaa7...c85f8f56e5 00:41
00:44 thowe joined
thowe Hi, Perl6. Tell me things that will make me happy. 00:44
MasterDuke Herby_: fwiw, rakudo doesn't lift the @target_array.elems out of the loop, so it's being called for every iteration. elems is pretty fast, so it frequently doesn't matter, but good to know
Herby_ thowe: I just brute-forced hello world
MasterDuke: I didn't know that. Thanks!
thowe OK, cool. I didn't know Hello World required much in the way of force, but you do you. 00:45
00:45 mcmillhj joined
Herby_ MasterDuke: would it be overly complicated to somehow multi-thread it? so one thread starts at the beginning, the other thread starts at the end, and they meet in the middle? 00:45
maybe threading isn't the right term. those concepts are pretty foreign to me
00:46 kurahaupo left, kurahaupo joined
Voldenet afair not many interpreters/compilers optimize that case when you call .length, .elems, .count or similar, because they assume mutability of the collection 00:48
MasterDuke you'd have to be careful since it (generally) isn't safe to write to an array from multiple threads, but yeah, you could do that
00:50 mcmillhj left
MasterDuke Voldenet: true. however, i don't think rakudo lifts any sort of sub/method call out 00:50
but i think it's just that the optimization hasn't been implemented yet, not that the language precludes it 00:53
00:59 kurahaupo left, kurahaupo joined
Voldenet huh, I've tried my luck in implementing bruteforce hello world 01:02
but it doesn't work 01:03
my @a = "Hello world".comb; my $b = @a.elems; loop { my @c = (^$b).map({ "Helowrd ".comb.roll }); @c.join("").print; sleep(.001); "\r".print; return if @c eq @a }
I'm not sure why
;>
oh, I should've put the `print "\r"` after return
Herby_ first glance i didnt understand your Helowrd :) 01:05
01:05 mcmillhj joined
Voldenet my @a = "Hello world".comb; my $b = @a.elems; loop { my @c = (^$b).map({ "Helowrd ".comb.roll }); @c.join("").print; last if @c eq @a; "\r".print } 01:05
now it works*
*if your computer is lucky 01:06
Herby_ m: my @a = "Hello world".comb; my $b = @a.elems; loop { my @c = (^$b).map({ "Helowrd ".comb.roll }); @c.join("").print; last if @c eq @a; "\r".print }
Voldenet I guess the bot isn't too lucky. ;D
camelia (timeout)Hw w wHe
Herby_ camelia isnt feeling well today
01:06 AlexDaniel left
Voldenet I could've just given him the 32..126 chrs, but it would probably take ages 01:08
Herby_ your code is still chugging along on my computer :)
01:09 markong left, kurahaupo left 01:10 mcmillhj left, kurahaupo joined
Voldenet theoretically this should take forever 01:10
;D
my @a = "Hello world".comb.Array; my $b = @a.elems; my @al = @a.unique.Array; my @c = @a.map({""}); loop { @c .= map({ @al.roll }); @c.join("").print; last if @c eq @a; "\r".print } 01:17
this should run more ops/sec
and it would probably be even faster if I just dropped the map
Herby_ can you work some parallel/async/concurrency magic on it?
Voldenet Hm, I am not sure if it's worth it 01:18
timotimo you mean just put .race in one place and suddenly it's super fast? ;) 01:21
Herby_ timotimo: exactly!
01:23 kurahaupo left, mcmillhj joined, kurahaupo joined
Voldenet huh... 01:27
there's a performance difference between "for ^$b { ... }" and "... for ^$b" 01:28
01:28 mcmillhj left
Voldenet ix.io/18Uh 01:28
The sample code when I can benchmark it
timotimo right, one has a lexical scope of its own and that is harder to optimize 01:29
Voldenet meh, I guess it depends on the state of the cpu 01:30
it's equally fast now
01:35 kurahaupo left 01:36 kurahaupo joined 01:39 mcmillhj joined 01:42 FROGGS_ joined 01:45 mcmillhj left 01:46 FROGGS left, ilbot3 left 01:50 zachk left, kurahaupo left 01:51 kurahaupo joined 01:56 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:59 mcmillhj joined 02:04 mcmillhj left 02:05 kurahaupo left 02:06 kurahaupo joined 02:07 mcmillhj joined, spacedbat joined
spacedbat I'm writing a perl6 repl mode for emacs, and I'd like it to print a version banner when it starts up 02:08
currently it just prints "To exit type 'exit' or '^D'" 02:09
02:09 mcmillhj_ joined, mcmillhj_ left, mcmillhj_ joined
timotimo if you want you can start up the perl6 with -MMyReplStartupStuff 02:10
spacedbat that leads to my question - how do I get the version, build and other parameters that perl5 has in the Config module? 02:11
timotimo you mean perl6?
spacedbat well, I know how to get them in perl5
timotimo oh
spacedbat not in perl6
timotimo i only read half the sentence
m: say $*PERL; say $*VM 02:12
camelia Perl 6 (6.c)
moar (2018.04.34.g.25.f.165.ad.7)
timotimo m: say $*PERL.perl; say $*VM.perl
camelia Perl.new(compiler => Compiler.new(id => "FF60E53B83E216DE11280A60669EBE56B93D633B", release => "", codename => "", name => "rakudo", auth => "The Perl Foundation", version => v2018.04.21.g.24.a.907747, signature => Blob, desc => Str), name => "Perl 6"…
spacedbat sweet, that'll do the trick
thanks 02:14
timotimo yw
02:14 mcmillhj_ left 02:16 kurahaupo left, kurahaupo joined
spacedbat VM.version 02:22
hah wrong window
02:23 mcmillhj_ joined 02:26 kurahaupo left 02:27 kurahaupo joined 02:28 mcmillhj_ left 02:34 mcmillhj left 02:37 mcmillhj joined, kurahaupo left, kurahaupo joined 02:41 mcmillhj left 02:47 wamba joined, mcmillhj joined 02:49 kurahaupo left, kurahaupo joined 02:52 mcmillhj left 03:01 kurahaupo left, kurahaupo joined, mcmillhj joined 03:06 mcmillhj left 03:13 kurahaupo left 03:14 kurahaupo joined 03:16 eliasr left 03:18 kurahaupo left, mcmillhj joined 03:21 stan7 left 03:23 mcmillhj left 03:27 athenot joined 03:29 Tison joined 03:30 athenot_ joined 03:32 athenot left, Herby__ joined
spacedbat my next question: is there a way to run some code supplied on the command line, say via the -e flag, and lastly evaluate an expression to start the REPL? 03:33
03:38 mcmillhj joined 03:39 Zoffix joined
spacedbat any ideas how to start the repl from within a perl6 program, as though perl6 was run without arguments? 03:40
Zoffix Kinda, but it involves using unsupported code 03:41
spacedbat ah - what I'm aiming to do is print a banner when my emacs perl6 repl starts
Zoffix perl6 -e 'say "Look, ma! A banner!\n\n"; use nqp; nqp::getcomp("perl6").interactive' 03:42
spacedbat timotimo suggested using -M but that would involve creating a file which complicates things a bit - ideally I'd be able to supply the banner as a -e one liner and go on to the repl
ok, and nqp::getcomp is unsupported/likely to change?
Zoffix It is unsupported. It might change, dunno 03:43
03:43 mcmillhj left
spacedbat right... I've read some of your stuff online, I want to thank you for your works Zoffix 03:43
Zoffix :) 03:44
spacedbat ok that works a treat - I might support customizing the initialization of the repl so if the needed incantation changes it will be easy for users to adapt 03:46
Zoffix spacedbat: or maybe this works too: perl6 -e 'say "A banner\n"; run $*EXECUTABLE' 03:47
a perl-within-perl
more exactly: perl6 -e 'say "A banner\n"; my $ = run $*EXECUTABLE'
(the second version doesn't sink the Proc so if someone types exit(42) in REPL there's no "The spawned process exited unsuccessfully" message 03:48
)
03:52 mcmillhj joined
spacedbat right, I was doing the $*EXECUTABLE trick before but to get the banner by passing it -v 03:53
however the banner then appeared later than I wanted it to
thanks for the tip 03:54
does perl6 have an equivalent of exec (replace current process?)
Zoffix nope
03:55 mcmillhj_ joined
spacedbat maybe there's a posix lib, or I guess I could just nativecall it 03:55
Zoffix As for appearing later. Hmm, maybe try setting $*OUT.out-buffer: False; before printing the banner. If you're not running with a tty STDOUT, it'll be buffered.
"by passing it -v" what does that mean? 03:56
spacedbat by later I mean, it printed To exit type 'exit' or '^D' first
then the banner
I was doing this first thing after the repl started: say run($*EXECUTABLE.Str, '-v', :out).out.slurp-rest 03:57
I'm an old hand at perl5 but a bit rusty, much less familiar with perl6 03:58
03:58 wamba left
Zoffix Seems to print fine when you pass the code in -e gist.github.com/zoffixznet/665f492...47bc9fa47d 03:58
There's also a switch to have a silent repl
spacedbat yes I noticed that, but I want this to be interactive 03:59
I like the run $*EXECUTABLE trick, but I'd rather not spawn an extra process that lingers
04:00 mcmillhj_ left
spacedbat there's a few things for me to try now, cheers 04:00
Kaiepi node has a repl module to allow people to do this
spacedbat I noticed there is a REPL trait - seen a gist where someone made a custom repl 04:02
Zoffix That might've been mine from awhile back when we had to workaround a bug that made it into the release 04:04
spacedbat this was it: gist.github.com/regnarg/3b98a0b5f3...c1bb0da3ff
04:05 mcmillhj left
Zoffix Ah 04:05
Well, it's using the same nqp::getcomp('perl6'); I showed above
spacedbat yes
I don't need all that extra stuff, would like this to be vanilla perl6 repl with a banner to start with 04:06
I'm going to contribute it to the perl6-mode for emacs
04:10 mcmillhj joined 04:15 mcmillhj left 04:22 mcmillhj joined
Herby__ are there any tutorials floating about on the "Whatever" operator? 04:23
other than the official docs
Zoffix Haven't read it, but there's this article: perl6advent.wordpress.com/2017/12/...of-perl-6/ 04:24
04:24 khw left
Herby__ great, thanks 04:25
04:27 mcmillhj left 04:31 Tison left
Geth doc: 9c0ca74e52 | 陈梓立++ (committed using GitHub Web editor) | META6.json
Update META6.json
04:34
04:37 ParsonsNose left 04:39 athenot_ left 04:41 MasterDuke left, mcmillhj joined 04:46 mcmillhj left 04:59 mcmillhj joined 05:01 andrzejk_ joined 05:04 mcmillhj left 05:15 entonian joined, skids left 05:17 mcmillhj joined 05:20 entonian left 05:22 mcmillhj left 05:29 mcmillhj joined 05:33 mcmillhj left 05:35 andrzejk_ left, Herby__ left 05:38 Util left, Util joined 05:40 sauvin joined 05:45 irco left 05:54 mcmillhj joined 05:56 BenGoldberg left
Zoffix How to get nqp::stringify op in HLL? It looks like it's added but it ain't available: github.com/perl6/nqp/blob/master/s...ps.nqp#L95 05:58
nqp: say(nqp::stringify("42"))
camelia 42
Zoffix m: use nqp; say(nqp::stringify("42"))
camelia ===SORRY!===
No registered operation handler for 'stringify'
05:59 robertle left, mcmillhj left 06:01 AlexDaniel joined 06:08 darutoko joined 06:12 mcmillhj joined, todd joined
todd hi all. A mystery. This works: $ClipStr ~~ s:global/"\t"/"\n"/; for split( "\n", $ClipStr ) -> $Line { 06:12
but this does not: for split( "\t", $ClipStr ) -> $Line { 06:13
or this for split( ord(9), $ClipStr ) -> $Line {
Zoffix What happens when it doesn't work? 06:14
06:16 mcmillhj left
todd The whole $ClipStr gets transfered into only one $Line 06:18
Zoffix m: my $ClipStr = "foo\tbar"; for split("\t", $ClipStr) -> $line { dd $line } 06:19
camelia Str $line = "foo"
Str $line = "bar"
Zoffix What's the actual code you're using?
todd I forgot the name of that clipboard routing I can copy it onto the web 06:20
paste something or other 06:21
Zoffix I'm guessing you aren't actually using split the way you showed above and instead you stored the return value into a variable first which containerized it. Either bind it ($x := split) or decont it (for $x<>) 06:22
huggable: decont
huggable Zoffix, Article on containers and decont: perl6advent.wordpress.com/2017/12/...oneandonly
06:24 AlexDaniel left
todd remembered: vpaste.net vpaste.net/VHsUU 06:24
Zoffix todd: use "\t" 06:25
m: dd ord 9
camelia 57
Zoffix That just gives you the ord for character "9"
todd \t did not work either 06:26
Zoffix It's just "\t" without any ord(). Is that what you used?
todd for split( "\t", $ClipStr ) -> $Line { do something } 06:28
It did not split the string
Zoffix Add `dd $ClipStr` before the loop. What does it print?
06:31 robertle joined
todd no. just one long line 06:31
Zoffix But what is it? 06:32
What's the output?
todd whatever I copyu into the secondary clipboard as one long line, unless I to a s:g/"\t"/|\n"/ on it change the tabs to new line and then split on new lines 06:35
06:35 Zoffix left, jmerelo joined
Geth doc: 70eb782934 | 陈梓立++ (committed using GitHub Web editor) | META6.json
Revert add IO::Socket::SSL

Misunderstand the error message from travis-ci.org/perl6/doc/jobs/372312669 .
06:35
todd I know it is a tab because of this proofing statement: for split( "", $ClipStr ) -> $Char { say "$Char = <", ord( $Char ), ">" }; 06:36
oh, you know what. I have othjer fish to fry. My ReadSecondardClipboard is removing the new line between lines, so I am go to forget about this for the moment 06:42
Geth perl6-lwp-simple: JJ self-assigned IO::Socket::SSL required for running tests github.com/perl6/perl6-lwp-simple/issues/9
ed0fd62843 | (JJ Merelo)++ | 2 files
06:47
perl6-lwp-simple: 5e3f100440 | (JJ Merelo)++ | 3 files
Refactos code with new URL refs #9
perl6-lwp-simple: 28f07586f3 | (JJ Merelo)++ | META6.json
Bumps up version closes #9
jmerelo I really don't know why we have to wait for 30 minutes for rakudo to compile in the "official" travis version. 06:56
06:56 mcmillhj joined 06:59 parv joined 07:01 mcmillhj left 07:04 domidumont joined
Geth doc: 5b9515d2af | (JJ Merelo)++ | META6.json
Bumps up dep version to avoid errors
07:04
doc: 53583e5ffd | (JJ Merelo)++ | META6.json
Fixes JSON error
07:09
07:11 domidumont left 07:12 domidumont joined 07:13 mcmillhj joined, kurahaupo joined 07:17 mcmillhj left 07:21 sena_kun joined 07:23 wamba joined 07:24 mcmillhj joined 07:28 todd left 07:29 mcmillhj left
buggable New CPAN upload: P5sleep-0.0.5.tar.gz by ELIZABETH modules.perl6.org/dist/P5sleep:cpan:ELIZABETH 07:36
07:36 mcmillhj joined, lizmat left 07:38 lizmat joined 07:40 Kaiepi left 07:41 mcmillhj left 07:43 troys left 07:47 mcmillhj joined 07:49 Kaiepi joined 07:51 mcmillhj left, Kaiepi left 07:52 Kaiepi joined 07:56 Guest43854 joined 07:58 kurahaupo left
Geth doc: f9ea5db422 | (JJ Merelo)++ | META6.json
Bumps up Pod::To::HTML version too
08:01
doc: 561cfd1afc | (JJ Merelo)++ | META6.json
Fixes JSON error
08:03 domidumont left
AlexDaniel` huggable: stars 08:15
huggable AlexDaniel`, perl6advent.wordpress.com/2017/12/...of-perl-6/
AlexDaniel` huggable: colons
huggable AlexDaniel`, thelackthereof.org/Perl6_Colons
08:17 espadrine_ left 08:20 rindolf joined 08:23 wamba left 08:26 mcmillhj joined
Geth doc: 5394d4248d | (JJ Merelo)++ | 4 files
Eliminates duplicate reference for 'is defined'

And along with it, probably the "Trait" category of the search part. Closes #1514
08:26
doc: cd254920e7 | (JJ Merelo)++ | doc/Type/Mu.pod6
Minor typographic changes but closes #1800
synopsebot Link: doc.perl6.org/type/Mu
jmerelo Thank to Zoffix closing cascade yesterday mainly, the number of open issues is below 270 for the first time since I remember... github.com/perl6/doc/issues 08:27
Do enjoy the moment for an instant before I insert another issue and crank it back to 270
lizmat jmerelo: on that thought: I just found out that we don't document which methods the Positional and Associative roles are providing 08:30
jmerelo lizmat: well, issue that. All moments of joy are ephemeral
08:31 mcmillhj left
lizmat hehe... will do 08:31
08:32 robertle left 08:35 andrzejk_ joined 08:40 mcmillhj joined 08:42 Todd joined
Todd Is there a way to remove the last character with the subsitute command s/ ? A replacement for $Clipboard = chop( $Clipboard ); 08:43
08:46 mcmillhj left
jmerelo Todd: does it have to be with s/? 08:46
Todd No. I wanted to put in my read me files as how to do it both ways 08:47
chop does word fine
work
jmerelo p6: say "last character is out þ".chop 08:48
camelia last character is out
jmerelo Todd: Can you please post it to to Stackoverflow?
Todd Stackoverflow?
`þ".chop` is still chop. I am looking for a perl6 -e 'my $x="a b c d "; $x ~~ s///; say "<$x>";' 08:50
jmerelo Todd: yep, I always ask people to also post the question to StackOverflow so that it can be searched afterwards, and also get more answers. 08:51
p6: my $x="a b c d "; $x ~~ s///; say "<$x>"; 08:52
camelia 5===SORRY!5=== Error while compiling <tmp>
Null regex not allowed
at <tmp>:1
------> 3my $x="a b c d "; $x ~~ s/7⏏5//; say "<$x>";
jmerelo p6: my $x="a b c d "; $x ~~ s/ $//; say "<$x>";
camelia <a b c d >
jmerelo p6: my $x="a b c d "; $x ~~ s/\ $//; say "<$x>";
camelia 5===SORRY!5=== Error while compiling <tmp>
No unspace allowed in regex; if you meant to match the literal character, please enclose in single quotes (' ') or use a backslashed form like \x20
at <tmp>:1
------> 3my $x="a b c d "; $x ~~ s/\ …
jmerelo p6: my $x="a b c d "; $x ~~ s/' '$//; say "<$x>";
camelia <a b c d>
08:52 wamba joined
Todd $ perl6 -e 'my $x="a b c d "; $x ~~ s/" "$//; say "<$x>";' <a b c d> 08:53
Perfect! Thank you!
What does the $ do?
jmerelo Todd $ matches the end of the string 08:55
08:55 mcmillhj joined
jmerelo Todd: now please if you have a minute post it too in StackOverflow. The logs of this IRC channel are not search-engine friendly for people looking for answers. Thanks! 08:56
Geth doc: b8c697d31e | (Elizabeth Mattijsen)++ | doc/Language/5to6-perlfunc.pod6
Added some more P5 -> P6 wisdom

  - got to sleep
08:58
doc: d779c58b7c | (Elizabeth Mattijsen)++ | doc/Language/5to6-perlfunc.pod6
Some more Perl 5 -> 6 tweaks
synopsebot Link: doc.perl6.org/language/5to6-perlfunc
Todd I absolutely adore the folks over on [email@hidden.address] Is that list searchable?
Geth doc: 5a656e4f9c | (JJ Merelo)++ | doc/Language/operators.pod6
Adds ⁇ ‼ to the index

And rephrases a bit the doc. Basically I was checking to close #1851, and I don't like to close without an actual change. So...
synopsebot Link: doc.perl6.org/language/operators
jmerelo Todd: yep. It's a bit better than these logs for searching, but still worse than StackOverflow. Moreover, *everyone* searches SO first.
09:00 ufobat joined, mcmillhj left
Todd Actually it is searchable. I just found a bunch of stuff. I will put my notes over on [email@hidden.address] Any reason to duplicate on Stack Overflow? 09:00
09:03 mcmillhj joined
ufobat lizmat, i've started with sereal :) 09:03
lizmat ++ufobat # way cool!
lemme know when you have something in a repo :)
ufobat it's on github already. but i just started like 45min ago 09:05
github.com/ufobat/p6-Sereal
09:07 mcmillhj left
lizmat ufobat: cool, am about to be afk for most of the rest of the day, so will look at it later :-) 09:07
Todd Sorry on the Stackoverflow. They are too gosh awful nosey. I am not giving them my personal information 09:09
09:10 TEttinger left
Todd Got around the nosey questions. I will see if I can post 09:12
buggable New CPAN upload: P5built-ins-0.0.10.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/....10.tar.gz 09:16
09:16 FROGGS_ is now known as FROGGS
Todd stackoverflow.com/questions/500748...n-a-string 09:17
I posted a lot more over on the mailing list
09:17 Guest43854 left
jmerelo Todd: Thanks! 09:19
Todd: you can send those too, once you've signed. A bit of advice: post just the question, and leave some time for people to answer it. You can then answer it yourself if you want, and accept it. If you post question & answer it could be flagged as a not-question 09:21
09:23 pmurias joined
Todd I will probably get flagged 09:28
jmerelo Todd: you can still edit it. Say something like "This is the answer that was suggested. Is there some easier way of doing that?" 09:30
09:31 andrzejk_ left 09:33 w_richard_w left
lizmat commute& 09:35
09:35 lizmat left
Todd I did as you suggest 09:39
09:45 domidumont joined
jmerelo p6: my $x="a b c d "; say $x.chop 09:45
camelia a b c d
jmerelo Todd: done a bit of editing. SO people are rather picky with questions. 09:46
Todd: please note also that chop in Perl 5 returns the character that has been removed; it returns the string with the character removed in Perl 6. 09:47
09:47 lizmat joined
Todd interesting. I still have a few things in perl 5, but am transitioining over. 09:49
Calling it a night
09:49 Todd left 09:59 eliasr joined 10:05 andrzejk_ joined
buggable New CPAN upload: P5shift-0.0.1.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.1.tar.gz 10:06
10:11 andrzejk_ left
Geth doc: 4818aa3e7e | (Elizabeth Mattijsen)++ | doc/Language/5to6-perlfunc.pod6
Explain P5 -> P6 difference for shift/unshift better
10:15
synopsebot Link: doc.perl6.org/language/5to6-perlfunc
10:18 wamba left 10:22 espadrine_ joined 10:23 espadrine_ is now known as espadrine 10:24 markong joined
jmerelo Problems with compile-time exceptions, in StackOverflow stackoverflow.com/questions/500754...tion-types 10:28
lizmat masak: ^^^ 10:34
timotimo committable6: releases use experimental :macros; macro a { 'foo' }; say a; 10:39
committable6 timotimo, gist.github.com/2779b46a772f8d78b0...fa8488399a
timotimo AlexDaniel`: oh no, whateverable is very unhappy! 10:40
AlexDaniel`: maybe the filesystem had an oops? 10:41
10:41 Guest18 joined
timotimo or just filled up 10:43
10:45 parv left 10:51 Guest18 left 10:53 andrzejk_ joined, andrzejk_ left, andrzej__ joined 10:55 andrzejk_ joined, andrzej__ left, Guest18 joined
buggable New CPAN upload: P5shift-0.0.2.tar.gz by ELIZABETH modules.perl6.org/dist/P5shift:cpan:ELIZABETH 10:56
10:57 andrzej__ joined, andrzejk_ left 10:58 lasse_ joined, lizmat left 11:02 andrzej__ left
buggable New CPAN upload: P5push-0.0.2.tar.gz by ELIZABETH modules.perl6.org/dist/P5push:cpan:ELIZABETH 11:06
timotimo huh, i can "touch testfile" just fine 11:07
11:15 jmerelo left 11:40 stmuk_ joined 11:42 stmuk left
AlexDaniel` timotimo: the filesystem is fine actually 11:45
timotimo: it is intentionally read-only
c: releases chdir ‘sandbox’; run <perl6 -e>, 「use experimental :macros; macro a { 'foo' }; say a;」 11:46
let's try this…
it should start in sandbox/ by default, but atm it doesn't
committable6 AlexDaniel`, gist.github.com/950390469d33c76a49...b8fe7aea0c
AlexDaniel` what the… 11:47
6c: say 42
committable6 AlexDaniel`, ¦6c (29 commits): «42␤»
AlexDaniel` so why is it even trying to write there
c: releases chdir ‘sandbox’; run <perl6 -e>, 「use experimental :macros; macro a { 'foo' }; say a;」 11:48
committable6 AlexDaniel`, gist.github.com/354e79e4a4f49aec4b...6fae151e7a 11:49
AlexDaniel` c: releases run :cwd(‘sandbox/’), <perl6 -e>, 「use experimental :macros; macro a { 'foo' }; say a;」 11:50
committable6 AlexDaniel`, gist.github.com/30ca826007ae9c7e0f...a2b219f9e9
AlexDaniel` timotimo: I don't get it. I don't know why it attempts to write there 11:51
c: releases run :cwd(‘sandbox/’), <perl6 -e>, 「say 42」 11:53
committable6 AlexDaniel`, ¦releases (29 commits): «42␤» 11:54
12:04 titsuki joined 12:08 lizmat joined 12:09 kaare_ left
timotimo perhaps stracing will help, but it won't show you what part of the program is causing a given system call, just in what order they happen 12:22
Geth doc: 7bc35a6f3e | (Jan-Olof Hendig)++ | doc/Type/List.pod6
Fixed incorrect example output
12:36
synopsebot Link: doc.perl6.org/type/List
sena_kun m: say [-] 10; 12:37
camelia 10
sena_kun huh, is that a recent change? 2018.03 gives me `-10`. 12:38
12:38 timotimo left
dogbert17 sena_kun: github.com/rakudo/rakudo/commit/ed...a38c647171 12:38
12:38 timotimo joined
sena_kun dogbert17, thanks! 12:39
12:41 noganex left 12:43 DataLinkDroid left 12:44 vike left 12:46 vike joined
El_Che lo 12:47
13:09 MasterDuke joined
Geth doc: 80c1bc1ea5 | (Luca Ferrari)++ | doc/Type/IO/Socket/INET.pod6
C<> on host name and port.
13:15
doc: cf6d90476d | (Luca Ferrari)++ | doc/Type/IO/Socket/INET.pod6
Align server socket params to avoid long lines.
synopsebot Link: doc.perl6.org/type/IO::Socket::INET
doc: 2d484ca0ce | (Luca Ferrari)++ | doc/Type/IO/Socket/INET.pod6
Align parameters in socket client example, avoid long lines.
13:16 andrzejk_ joined
buggable New CPAN upload: P5push-0.0.3.tar.gz by ELIZABETH modules.perl6.org/dist/P5push:cpan:ELIZABETH 13:16
13:16 andrzejk_ left
buggable New CPAN upload: P5shift-0.0.3.tar.gz by ELIZABETH modules.perl6.org/dist/P5shift:cpan:ELIZABETH 13:16
13:16 andrzejk_ joined 13:18 wamba joined, andrzejk_ left 13:19 andrzejk_ joined 13:23 andrzejk_ left 13:24 Guest18 left 13:27 domidumont left 13:37 kurahaupo joined 13:43 rindolf left 13:44 rindolf joined
Geth doc: 917aff0957 | cfa++ | doc/Language/5to6-perlfunc.pod6
nbsp
13:53
synopsebot Link: doc.perl6.org/language/5to6-perlfunc
Geth doc: 733175d7e2 | cfa++ | 2 files
spelling
14:00
14:10 noganex joined
donpdonp c.pm6: use A::B::D; package A::B { class C is D {} }; d.pm6: package A::B { class D {}} 14:15
is there a way to say 'use D' in c.pm6, perhaps inside the package {}
to make the use line shorter...
ive tried a few things but havent found a way to use partial package paths... 14:16
El_Che is interested in the answer 14:22
14:25 robertle joined 14:29 comborico1611 joined
thowe I seem to recall a module or method to do exactly that in Perl5, but don't remember it. I've seen mst do it in code. 14:30
timotimo use always refers to compunits 14:31
i.e. "use FooBar" can give you a "BleepBloop" if that's what's in the file that has that name
El_Che you'll loose namespacing that way 14:38
you want to keep namespacing, you just want a short way to reference in the consuming class 14:39
timotimo i'm not sure i understand 14:40
Herby_ o/ 14:43
El_Che timotimo: import graphics.*; Circle myCircle = new Circle();
timotimo right 14:44
Geth doc: cee043457e | cfa++ | doc/Language/5to6-perlfunc.pod6
examples compilation
14:45
synopsebot Link: doc.perl6.org/language/5to6-perlfunc
El_Che or in go, that has a flat namespace: import "github.com/nxadm/ldifdiff" ... output, err = ldifdiff.DiffFromFiles(params.Source, params.Target, params.IgnoreAttr)
14:45 lizmat left 14:47 lizmat joined 14:56 khw joined 14:58 Zoffix joined
Zoffix nqp: use nqp; say(nqp::numify("42.42e0")) 14:58
camelia 42.42
Zoffix m: use nqp; say(nqp::numify("42.42e0"))
camelia ===SORRY!===
No registered operation handler for 'numify'
Zoffix How can I enable that op in HLL?
AlexDaniel` timotimo: oh, I know 14:59
Will fix once i'm back home
thowe so, I almost hate to ask, but there seemed to be some debate recently... Should I put "use v6.c;" at the top of my script? 15:00
timotimo you can also put v6.d.PREVIEW if you're using "await" a bunch
and you're okay with code migrating between threads
thowe SInce I don't grok what you just said, I won't. 15:01
Zoffix thowe: it depends on your needs. `use v6.c` says "I want language version 6.c". So when new language features come out—like the stuff timotimo mentioned—your program won't have them available. This may be what you want, since you wrote the program for that specific language version, but you may also wish to always use the latest language version (which is what lack of `use v...` would use). Some people 15:05
also put it in to get more helpful errors if you accidentally run your perl6 script with perl compiler, but IME I found little use in that advice.
Answer to my question: gist.github.com/zoffixznet/1dd32f5...7b04bbd014 15:07
yoleaux 15:06Z <pmurias> Zoffix: I'll look into it
15:07 Zoffix left 15:12 andrzejk_ joined 15:13 lizmat left 15:15 domidumont joined 15:18 zakharyas joined 15:20 zakharyas left 15:21 zakharyas joined 15:24 lasse_ left 15:27 lizmat joined 15:32 lizmat left, andrzejk_ left 15:38 Kaiepi left 15:41 Kaiepi joined 15:42 andrzej__ joined
ufobat m: use Test; lives-ok { X::NYI.new.throw(feature => 'foo')} 15:42
camelia not ok 1 -
# Failed test at <tmp> line 1
Use of uninitialized value of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in sub _diag at /home/camelia/rakudo-m-inst-1/shar…
15:43 andrze___ joined
ufobat m: use Test; lives-ok { X::NYI.new(feature => 'foo').new()} 15:43
camelia ok 1 -
ufobat i know that in my first example it was wrong, but the error is strange, isnt it?
m: use Test; lives-ok { X::NYI.new(feature => 'foo').throw()} 15:44
camelia not ok 1 -
# Failed test at <tmp> line 1
# foo not yet implemented. Sorry.
ufobat m: X::NYI.new.throw(feature => 'foo') 15:45
camelia not yet implemented. Sorry.
in block <unit> at <tmp> line 1
15:45 andrz____ joined 15:46 andrzej__ left 15:47 andrze___ left 15:50 AlexDaniel joined 15:53 rouking joined
rouking How do I pass a pair to a sub without it being interpreted as a named argument? 15:54
timotimo either put quotes around the key, or put parethesis around the pair
15:54 Zoffix joined, andrz____ left
Zoffix m: -> $x { dd $x }( :42foo.Pair } # another way 15:55
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> 3-> $x { dd $x }( :42foo.Pair 7⏏5} # another way
Zoffix m: -> $x { dd $x }( :42foo.Pair ) # another way
camelia Pair $x = :foo(42)
15:55 andrzejk_ joined
Zoffix ufobat: that's not an error, that's a warning 15:55
ufobat: the diagnostics of the failed test print the stringified exception, and since you never set the feature argument, it's stringifying an undefined value, resulting in a warning 15:56
rouking thanks
ufobat ah!
Zoffix m: { dd @_ }( :42foo.Pair, (:70bar), "meows" => 2, 4 R=> "key", Pair.new("some-key", 42) ) 15:58
camelia [:foo(42), :bar(70), :meows(2), :key(4), :some-key(42)]
timotimo so many ways
ufobat i am not sure, but i'd say thats wrong to not handle the undefined value manually. because in the end the warning about the stringification is not helpful
Zoffix ufobat: fix it: github.com/rakudo/rakudo/blob/mast...#L781-L785 15:59
15:59 pilne left
Zoffix just this even github.com/rakudo/rakudo/blob/mast...n.pm6#L785 16:00
16:00 andrzejk_ left
ufobat what about has $.feature is required? 16:00
Zoffix s/"$.feature not yet implemented. Sorry."/"{$.feature andthen "$_ not" orelse "Not"} yet implemented. Sorry."/
ufobat is going to dinner first ;-) 16:01
wine and g(r)eek food!
Zoffix To me, makes more sense to make it optional, where the message doesn't mention any features if none were provided.
16:01 committable6 left
ufobat if you dont fix it i'll send a PR tomorrow or monday 16:02
16:02 committable6 joined
AlexDaniel c: releases chdir ‘sandbox’; run <perl6 -e>, 「use experimental :macros; macro a { 'foo' }; say a;」 16:02
c: use experimental :macros; macro a { 'foo' }; say a;
c: releases use experimental :macros; macro a { 'foo' }; say a;
committable6 AlexDaniel, ¦use: «Cannot find this revision (did you mean “all”?)» 16:03
AlexDaniel, gist.github.com/b85f9b6475d21ff14e...c046f8ea03
AlexDaniel, ¦releases (29 commits): «===SORRY!===␤Too few positionals passed; expected 3 arguments but got 2␤ «exit code = 1»»
16:03 bisectable6 left, andrzejk_ joined, bisectable6 joined
AlexDaniel timotimo: ↑ there 16:04
fixed
thanks