»ö« 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.
ugexe IO::Handle(:path('-')) is not an IO::Path 00:00
Xliff_ My bad. 00:01
method path(IO::Handle:D:) { $!path.IO }
ugexe if $!path is IO::Special then its calling IO::Special.new(...).IO
00:01 cdg_ left
ugexe if its an IO::Path then .IO indeed turns it into a path 00:01
Xliff_ adds to list of things to experiment with. 00:02
AlexDaniel dunno but there are two issues created: github.com/perl6/doc/issues/498 github.com/perl6/doc/issues/499
Xliff_ AlexDaniel++ 00:03
ugexe IO::Handle.path is not typed 00:04
AlexDaniel github.com/perl6/roast/issues/119 00:07
geez, created 3 issues with one code snippet…
00:09 milwauke` joined
AlexDaniel ugexe: actually 00:10
IO::Handle.new(path => ‘-’).path.say # "".IO
ugexe .path.perl.say -> "-".IO(:SPEC(IO::Spec::Unix),:CWD("/home/nickl/perl6/openssl")) 00:11
IO::Handle.new(:path("-")).path.perl.say -> "-".IO(:SPEC(IO::Spec::Unix),:CWD("/home/nickl/perl6/openssl")) 00:12
heh
skink ugexe, Waiting for AppVeyor to pass/fail atm 00:13
ugexe you can "-".IO.slurp (although it just sits there) but not "".IO.slurp
AlexDaniel IO::Handle.new(path => ‘-’).path.path.say # -
ugexe so thats kinda messed up 00:14
AlexDaniel ugexe: it does not look right, but at the same time I'm unsure what is wrong exactly…
skink ugexe, bump to 0.0.4 or 0.1.0? 00:15
ugexe i would say it should at least always return "-".IO or IO::Special (or have "-".IO turn into IO::Special)
skink Since it was a fairly significant change
AlexDaniel ugexe: ¯\_(ツ)_/¯ I don't think that I will be able to formulate that in a bug report 00:16
ugexe skink: you're probably right
probably that the .gist should give "-".IO 00:18
skink ugexe, Tests passed again. PR'd 00:19
ugexe the only difference between IO::Handle.new(path => $*CWD).path.say and IO::Handle.new(path => $*CWD).path.perl.say is .perl includes the CWD 00:20
yet for "-" the difference is "".IO vs "-".IO
skink I like how openssl.org has an RSS feed for their blog, but not for their vulns/updates 00:23
AlexDaniel ugexe: but "smth".IO is IO::Path, not IO::Handle 00:24
ugexe "smth" is a Str which has its own method IO
AlexDaniel ugexe: no but, what's the point of .gist?
“Returns a string representation of the invocant, optimized for fast recognition by humans.” 00:25
ah, ok
nevermind 00:26
ugexe skink: need to point the badge urls to a different url
AlexDaniel geez wtf is that
m: IO::Handle.new(:path(‘-’)).say
camelia rakudo-moar 626b5a: OUTPUT«IO::Handle is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting line 1␤ in method new at src/RESTRICTED.setting line 32␤ in block <unit> at /tmp/I7_KL1MATt line 1␤␤»
00:27 yqt left
AlexDaniel “write string requires an object with REPR MVMOSHandle” makes sense, sure… but what kind of an error message is that :) 00:27
skink ugexe, Since sergot doesn't have appveyor set up should I just remove the linking entirely? 00:28
AlexDaniel it is also an interesting pitfall. When doing .say I meant to print the object itself, not print something using this handle
ugexe yet IO::Handle.new(:path(‘-’)).gist.say works...
skink: hmm i thought i would be able to set it up on the repo, but maybe not 00:29
00:29 Khisanth left
skink AppVeyor is linked to the github account through OAuth 00:29
00:29 Khisanth joined
ugexe yeah it looks like it should work if you point it at ugexe/openssl/branch/master 00:30
AlexDaniel ugexe: RT #128097
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128097
skink It'll have a different project ID link as well, I think. Could you check in your appveyor settings for the badge? 00:31
ugexe [![Build status](ci.appveyor.com/api/projects/statu...ch/master) 00:32
and that links to sergot/openssl github repo (not ugexe/openssl) i believe
skink: you may be able to link it yourself too... under "General" just set the GitHub repository 00:33
to sergot/openssl. then use the badge for master branch
skink ugexe, I've pointed it at sergot/openssl. I think merging now will cause appveyor to re-run on sergot's rather than mine now? 00:36
Or I can just push the change to use your badge 00:37
Your choice
ugexe i think it should work 00:38
merged 00:39
skink Yeah appveyor is building the merge now 00:40
ugexe cool, good work
if you set your email in git your future PRs/commits will link to your profile and whatnot 00:42
help.github.com/articles/setting-y...ight-email 00:43
00:48 kurahaupo joined 00:49 RabidGravy left
ugexe ah now they are showing up correctly 00:50
skink I had my local git to to my private github email, but forgot to check 'Keep my email address private' in settings 00:51
so there was a public/private address conflict I suppose
00:52 kurahaupo_ joined 00:55 kurahaupo left, perlawhirl left 00:57 snarkyboojum joined 01:01 snarkyboojum left 01:04 colomon left 01:06 BenGoldberg joined, colomon joined 01:09 cpage_ left 01:10 kurahaupo_ left
AlexDaniel m: say comb 1, ‘foobar’, 2 01:19
camelia rakudo-moar 626b5a: OUTPUT«(f o)␤»
AlexDaniel I would have never expected this parameter order…
01:21 kurahaupo joined 01:26 cpage_ joined
AlexDaniel m: say “\x[999999]” 01:27
camelia rakudo-moar 626b5a: OUTPUT«Error encoding UTF-8 string: could not encode codepoint 10066329␤ in block <unit> at /tmp/x3tCrn5xeu line 1␤␤»
AlexDaniel m: say +“\x[999999]”
camelia rakudo-moar 626b5a: OUTPUT«Unhandled exception: Error encoding UTF-8 string: could not encode codepoint 10066329␤ at <unknown>:1 (/home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm:print_exception)␤ from gen/moar/m-CORE.setting:21493 (/home/camelia/rakudo-…»
01:40 Actualeyes joined 01:41 kurahaupo_ joined 01:43 parisba_ left 01:44 kurahaupo left, BuildTheRobots joined 01:45 AlexDaniel left, olinkl joined 01:46 ZoffixWin left 01:47 charsbar_____ left 01:48 kurahaupo joined, parisba_ joined 01:49 colomon left, kurahaupo_ left 01:56 risou joined 01:59 aries_liuxueyang left, charsbar_____ joined 02:00 aries_liuxueyang joined 02:01 skink left 02:03 kurahaupo left 02:05 mr-foobar left 02:07 finanalyst joined 02:10 kid511 joined 02:11 kid51 left 02:14 noganex_ joined 02:17 huggable left, huggable joined, noganex left 02:20 kid51 joined 02:21 kid511 left 02:22 colomon joined
BenGoldberg m: 0x999999.chr.say; 02:25
camelia rakudo-moar 626b5a: OUTPUT«Error encoding UTF-8 string: could not encode codepoint 10066329␤ in block <unit> at /tmp/qRcaefh7_M line 1␤␤»
BenGoldberg notes that perl5 does not complain about encoding absurdly high codepoints. 02:26
02:27 cdg joined 02:32 cdg left 02:44 grondilu left 02:59 skids joined 03:03 cdg joined 03:05 |2701 left 03:09 cpage_ left
aleogen "The perlstyle document states that line noise in regular expressions could be mitigated using the /x modifier to add whitespace." lol 03:11
03:20 espadrine left 03:29 kid51 left 03:31 ZoffixWin joined
ZoffixWin *sigh* all three of my perl 6 processes on linode server are leaking like crazy. Leaked 300MB while I was taking a shower :/ 03:38
If I go to perl6.party and click on each post, I leak 80MB
m: say 488592 - 488784 03:39
camelia rakudo-moar 626b5a: OUTPUT«-192␤»
ZoffixWin And I leak 192KB per one command to huggable :/
ZoffixWin cries salty tears 03:40
m: say 104028 - 101616 03:42
camelia rakudo-moar 626b5a: OUTPUT«2412␤»
ZoffixWin Even my restarter script is leaking. It leaked 2412KB of memory since I joined this channel. And it's just this: twitter.com/zoffix/status/72676873...45/photo/1 03:43
ZoffixWin is using `top` to look at "RES" memory FWIW... I hope I'm looking at the right thing.
03:44 milwauke` left 03:51 jack_rabbit joined
ZoffixWin Aaaandd.. we're swapping like crazy i.imgur.com/QR3cWjV.png 03:55
Code for perl6.party and huggable, if anyone interested: github.com/zoffixznet/perl6.party github.com/zoffixznet/huggable 03:56
ZoffixWin goes to bed
(P.S. It wasn't huggable restarter but the change watcher script from github.com/zoffixznet/perl6-Bailad...Restarter) 03:59
04:05 CIAvash joined 04:07 BenGoldberg left 04:08 BenGoldberg joined 04:34 cpage_ joined
protium say 5.1 + 6.2 04:39
M: say 5.1 + 6.2 04:40
camelia rakudo-MOAR : OUTPUT«No such file or directory»
rakudo-MOAR : OUTPUT«(timeout)Can't exec "./rakudo-inst/bin/perl6-m": No such file or directory at lib/EvalbotExecuter.pm line 206.␤cat: /home/camelia/rakudo-inst/revision: No such file or directory␤»
skids m: 1;
camelia rakudo-moar 626b5a: OUTPUT«WARNINGS for /tmp/xJgcQpTf5m:␤Useless use of constant integer 1 in sink context (line 1)␤»
skids m: 5.1 + 6.2
camelia rakudo-moar 626b5a: OUTPUT«WARNINGS for /tmp/57hZf8S3vo:␤Useless use of "+" in expression "5.1 + 6.2" in sink context (line 1)␤»
skids m: say 5.1 + 6.2 04:41
camelia rakudo-moar 626b5a: OUTPUT«11.3␤»
04:44 khw left 04:47 BenGoldberg left 04:55 Cabanossi left 04:57 Cabanossi joined 04:59 kurahaupo joined 05:04 kurahaupo left 05:05 pierre_ joined, cdg left
leedo_ is there a good way to iterate over regex captures? $/.list.map() doesn't seem very happy :( 05:06
ah, nevermind. i should go to bed :( 05:07
skids m: "aaa" ~~ /(a)+/; $/.list.map: *.say 05:11
camelia rakudo-moar 626b5a: OUTPUT«[「a」 「a」 「a」]␤»
skids m: "aaa" ~~ /(a)+/; $/.list.flat.map: *.say
camelia rakudo-moar 626b5a: OUTPUT«「a」␤「a」␤「a」␤»
leedo_ yeah, the whatever star wasn't working as i had hoped 05:16
m: my %h = ( a => 1 ); say %h.keys.map: %h{*}; 05:17
camelia rakudo-moar 626b5a: OUTPUT«Cannot call map(Seq: List); none of these signatures match:␤ ($: Hash \h, *%_)␤ (\SELF: &block;; :$label, :$item, *%_)␤ (HyperIterable:D $: &block;; :$label, *%_)␤ in block <unit> at /tmp/8TIdTxlObL line 1␤␤»
skids yeah the {} owns the * in that. 05:18
I find this happens a lot -- you start with a whatever star then realize your expression is more complicated than what they were meant for. 05:20
05:34 kaare_ joined 05:41 jjido joined 06:04 xinming_ joined 06:06 wamba joined 06:07 xinming left 06:12 skids left 06:13 jjido left 06:17 huggable left, huggable joined 06:23 pierre_ left 06:38 _28_ria left, pierre_ joined 06:41 _28_ria joined 06:54 vaisian__ joined 07:04 domidumont joined 07:08 domidumont left 07:09 domidumont joined 07:21 jjido joined 07:30 firstdayonthejob joined 07:36 DrEeevil is now known as AmazingPudding 07:38 azawawi joined
azawawi hi 07:38
.tell RabidGravy hi. Please send me a pull request from your Net::ZMQ fork (even if it fails the tests for now) 07:39
yoleaux azawawi: I'll pass your message to RabidGravy.
07:41 azawawi left 07:54 obfusk left 07:56 obfusk joined 08:13 darutoko joined 08:34 rindolf joined 08:35 RabidGravy joined 08:54 jjido left 08:57 darutoko left 08:58 darutoko joined 09:01 Emeric joined 09:04 vaisian__ left, vaisian joined 09:10 espadrine joined 09:17 Ven joined 09:38 mr-foobar joined 09:42 mr-foobar left 09:43 cpage_ left, mr-foobar joined 09:44 BenGoldberg joined 09:46 pierre_ left 10:00 jack_rabbit left, mr-foobar left 10:01 mr-foobar joined 10:08 perlawhirl joined, mr-foobar left 10:09 mr-foobar joined 10:11 ufobat joined
ufobat ola :) 10:11
10:14 TEttinger left 10:17 huggable left, huggable joined 10:18 vaisian left 10:22 petercommand left, petercommand joined 10:25 Relsak joined, jjido_ joined, cpage_ joined 10:30 jjido_ left
RabidGravy erp 10:38
yoleaux 07:39Z <azawawi> RabidGravy: hi. Please send me a pull request from your Net::ZMQ fork (even if it fails the tests for now)
RabidGravy :-\
10:42 perlawhirl left 10:47 spider-mario joined, mr-foobar left 10:49 mr-foobar joined
teatime heh 10:50
teatime wonders if RabidGravy's response is, "Don't look at it! It's hideousssss" 10:51
RabidGravy it's software it's almost bound to be hideous 10:52
10:54 sortiz left 11:00 pierre_ joined 11:03 Ven left 11:07 Ven joined 11:10 cpage_ left 11:18 mr-foobar left 11:26 jjido_ joined 11:27 araujo left 11:28 araujo joined 11:31 jjido_ left 11:34 pierre_ left 11:46 Relsak left 11:51 pierre_ joined, colomon left 11:52 colomon joined
dalek c: 09e49ae | RabidGravy++ | doc/Type/IO/Handle.pod:
Document IO::Handle.path

closes #499
11:53
c: 8ba3aee | RabidGravy++ | doc/Type/IO/Special.pod:
Document IO::Special

This is really rather dumb but puts it in there.
Closes #498
masak afty, #perl6
nebg with years... we have all to switch to perl6 ? or perl5 will still continue to exist ? i mean.. .for example with python... they suggest to switch and use always python3 now since in 2020 the support for python 2.x will be dead... how about perl ? 11:57
RabidGravy awful or useless documentation on IO::Special (largely because the class itself is nearly useless) 11:58
nebg, no
nebg RabidGravy, what no ?
please give a context
RabidGravy your question
Emeric Perl 5 != Perl 6, so I guess Perl 5 won't be dead before a long 11:59
RabidGravy Perl 5 and Perl 6 are different languages in the same family with distinct road maps
Emeric There are still a lot of people working on Perl 5
masak as a mostly-Perl 6 developer, I find I simply don't worry too much about the fate of Perl 5
you might want to consider why it is you do ;) 12:00
12:00 colomon left
masak maybe you relish the thought of a conflict between the two languages 12:00
maybe you're worried you might be investing in the wrong thing
maybe you thing it matters more than it actually does
think*
RabidGravy because the languages are distinct and there is so much Perl 5 code out there it's not going anywhere 12:01
12:01 vendethiel joined
masak Perl 5 and Perl 6 already occupy slightly different niches 12:01
Perl 5 being the battle-tested tank, that trudges on no matter what
Perl 6 being the infinitely competent butterfly, which zooms where it wants and helps people live their dreams 12:02
12:02 vendethiel- left 12:04 colomon joined 12:09 colomon left 12:11 kaare_ left 12:12 AlexDaniel joined
dogbert17 Good afternoon £perl6 12:15
psch .oO( that's a weird looking hashtag ) 12:16
o/ dogbert17
dogbert17 psch: hi, yeah, need coffee
today I'm trying to document Instant.from/to-posix. This time counting business is a minefield... 12:18
12:18 Ven left
dogbert17 I have almost finished a draft, should I gist it or make a PR? 12:18
moritz it's called a pound tag :-) 12:19
masak how very sterling of you 12:23
dogbert17 ok, here's the gist, it's probably filled with nonsense, rip it apart in a nice manner plz :) gist.github.com/dogbert17/b5625897...40b96c12de 12:31
unix/Posix/UTC/TAI argh 12:32
masak has a look 12:35
dogbert17 yay 12:36
masak: you're doing sterling service :)
masak heh
12:36 kid51 joined
masak dogbert17: if I were to nitpick, I feel the example is given twice in the from-posix section 12:37
maybe you want to consider saying it abstractly in the text, and then concretely (as-is) in the code
something like "If C<$prefer-leap-second> is C<True>, the return value will be the first of the two possible seconds in the case of a leap second." 12:38
(and then the example shows just that)
the rest looks good 12:39
I'm unhappy about the value .to-posix returns, but that's no fault of the documentation 12:40
dogbert17 masak: thx, reload the gist I've made some changes 12:41
masak reads the diff
oh, do keep that second line of code 12:42
dogbert17 masak: ok
masak it shows the difference between passing True and keeping the False default
dogbert17 masak: it's back 12:43
masak cool. end of review. 12:45
12:45 Ven joined
dogbert17 masak++ 12:45
RabidGravy haha, IO::Special is totally b0rked 12:46
masak masak's API guidelines, episode #958642: if you call your method return-X for some X, don't return X and also some other weird info. the latter is surprising to the user. 12:47
RabidGravy m: say $*ERR.path.what
camelia rakudo-moar 2b74c9: OUTPUT«<STDERR>␤»
RabidGravy anyone on windows able to run that and check that it returns the same? 12:48
masak, my API design guidelines include not making routine names a hostage to fortune 12:50
AlexDaniel the whole IO::Special thing is just… too special 12:51
RabidGravy yeah it really is quite stupid 12:52
AlexDaniel yeah, that word… I was not willing to say it myself 12:53
RabidGravy just grepping the source to find if it is actually used anywhere except for creating a fake path for the STDIO handles
masak RabidGravy: fortune, as in "FORTUNE (6)" :P 12:54
RabidGravy AlexDaniel, I'm going to change IO::Special so that it expects <STDIN>, <STDOUT> and <STDERR> rather than what it does now 12:56
12:57 colomon joined
BenGoldberg According to the docs, .modified/.accessed/.changed of IO::Special always return an undefined Instant. Why can't fstat be used on the underlying file descriptor? 13:03
RabidGravy I wondered that too 13:05
AlexDaniel m: say $*PROGRAM-NAME
camelia rakudo-moar 2b74c9: OUTPUT«/tmp/jWpCKO190a␤»
13:05 BenGoldberg left
AlexDaniel interestingly return ‘-e’ when ran with -e 13:06
returns*
13:07 BenGoldberg joined
psch AlexDaniel: github.com/perl6/nqp/blob/master/s...r.nqp#L271 13:09
well, i'm not 100% sure that it gets bound to $*PROGRAM-NAME from there, but it's on purpose :) 13:10
RabidGravy AlexDaniel, github.com/rakudo/rakudo/pull/763 fixes the underlying problem with the expected values 13:11
masak AlexDaniel: were you expecting some value other than '-e' ?
teatime '' might have been more useful, since it can't be a filename. 13:12
or undef
masak either of those feel less clear to me
RabidGravy it's consistent with the behaviour of Perl 5 at least 13:13
dalek c: e82d315 | (Jan-Olof Hendig)++ | doc/Type/Instant.pod:
Added documentation for from-posix and to-posix. masak++
masak sometimes you want to be suggestive/intuitive rather than extremely correct 13:14
AlexDaniel masak: this is just stupid
echo 'say $*PROGRAM-NAME, ‘that is just stupid’' > -e; perl6 -- -e
guess what happens
teatime that was my position. 13:15
AlexDaniel right
13:15 zakharyas joined
teatime I can see your point masak; I guess we're both entitled to our opinions. 13:15
AlexDaniel are there any tests for this? 13:16
masak are you surprised that, if you put `-e` after the `--`, it runs the file `-e`?
I don't think I properly understand your position
teatime he's pointing out that you cannot actually test whether the code is executing from perl6 -e
AlexDaniel masak: I am surprised that $*PROGRAM-NAME returns the same thing
teatime since it could be frome a file name -e 13:17
*named
masak my point is that that's not gonna happen unless you make it happen
which is, you know, your perogative
AlexDaniel huh
masak but most people might be, "ok, so don't do that, then"
which is what I meant about it sometimes being worth being suggestive/intuitive rather than extremely correct
psch $ python -c 'import sys; print(sys.argv[0])'
AlexDaniel anyway, -e is not a program name…
psch -c
just as another data point vOv 13:18
masak I know I prefer to see `-e` in that output rather than `` or `Any`
psch it's semantically not the same, i know
teatime and program-file being empty/false when there's no program-file seems intuitive enough to me :)
psch teatime: but it's program-name, not -file
teatime ok, same thing applies enough
-e is an anonymous program
13:19 hotel_california joined
teatime s/enough/though/ 13:19
psch $ ruby -e 'puts $PROGRAM_NAME' 13:20
-e
teatime heh, is that really your standard for sanity? :)
AlexDaniel now that's interesting
13:20 hotel left
psch teatime: i'm just looking what other languages do 13:20
teatime the python one really shocks me, though
masak yes, that *is* my standard for sanity. if you create a file called "-e" and then complain that things are unintuitive, then that's because you created a weird situation. 13:21
teatime would have betted on that one being 'python', if anything
AlexDaniel perl -E 'say $PROGRAM_NAME'
nothing
empty string
psch AlexDaniel: 'use English;' or 'say $0'
AlexDaniel ah
okay…
masak AlexDaniel: might be a good habit never to run `perl` without -w
psch AlexDaniel: with -w you'd get "uninitialized variable" or thereabout :)
AlexDaniel ok right
my bad 13:22
13:22 colomon left
AlexDaniel it prints -e then :) 13:22
13:24 colomon joined, Ven left
dalek c: 902d36e | RabidGravy++ | doc/Type/IO/Special.pod:
Fix to reflect reality rather than what the code thinks it is doing.

The r/w file access tests actually don't behave like documented due to a bug that is fixed in github.com/rakudo/rakudo/pull/763
Closes #498
13:26
AlexDaniel RabidGravy: what about this github.com/perl6/doc/commit/09e49a...e41533R156 13:27
ah 13:28
I am blind
nevermind
m: say WHAT $*GROUP 13:29
camelia rakudo-moar 2b74c9: OUTPUT«(IdFetch)␤»
AlexDaniel m: say $*GROUP; say WHAT $*GROUP
camelia rakudo-moar 2b74c9: OUTPUT«users (100)␤Cannot look up attributes in a type object␤ in block <unit> at /tmp/BHm7LhmDhX line 1␤␤»
AlexDaniel m: say WHAT $*GROUP; say WHAT $*GROUP 13:30
camelia rakudo-moar 2b74c9: OUTPUT«(IdFetch)␤(IdFetch)␤»
13:30 mr-foobar joined
psch $ ghc -e 'System.Environment.getProgName >>= putStrLn' 13:32
<interactive>
(that took almost embarrassingly long to figure out, until i checked RC)
AlexDaniel can anybody explain this “Cannot look up attributes in a type object” thingy? 13:33
psch now i'm out of ideas which other interpreters to ask :S
AlexDaniel psch: dunno, is it possible in Go? 13:34
psch google says there's a repl module or two for go, no idea if there's an -e equivalent though 13:37
13:39 colomon left
RabidGravy [jonathan@coriolanus doc.master]$ node -e 'console.log(__filename)' 13:39
[eval]
13:39 colomon joined
RabidGravy so in summary, maybe we could do better, but it's no worse than what the other things do ;-) 13:40
masak technically, you could name a file '<interactive>' or '[eval]' too
psch yeah, we probably could do better, but i don't think "(Any)" or "" qualifies as "better"
RabidGravy indeed
AlexDaniel psch: what about Nil? :) 13:41
masak are you serious
RabidGravy ooO( return ('-e' but role { method IO { die "not a file" } )) ..... ;-) 13:42
13:42 kaare_ joined
psch &say.wrap(-> |c { die "you may never know!" if c ~~ / '$*PROGRAM-NAME' / && $*PROGRAM-NAME eq '-e'; say |c }) 13:43
AlexDaniel m: say $*GROUP; say WHAT $*GROUP 13:46
camelia rakudo-moar 2b74c9: OUTPUT«users (100)␤Cannot look up attributes in a type object␤ in block <unit> at /tmp/Bddi8Tw8Rr line 1␤␤»
AlexDaniel m: say $*GROUP, WHAT $*GROUP
camelia rakudo-moar 2b74c9: OUTPUT«users (100)(IdFetch)␤»
psch m: say $*GROUP.WHICH; say $*GROUP; say $*GROUP.WHICH 13:47
camelia rakudo-moar 2b74c9: OUTPUT«IdFetch|69237984␤users (100)␤IdName|79412448␤»
13:47 zakharyas left
AlexDaniel it turns into IdName :o 13:50
psch github.com/rakudo/rakudo/blob/nom/...Process.pm 13:51
RabidGravy yeah, type smileys on the .gist would fix that
ZoffixWin \o 13:53
psch o/ ZoffixWin
AlexDaniel anyway, RT #128099 if anybody is interested
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128099
ZoffixWin How to go about finding memory leaks? Is that what that valgrind thing is for? (RE: irclog.perlgeek.de/perl6/2016-05-08#i_12449184 )
psch ZoffixWin: yeah, it's a start. iirc you also need some moar flag for clean shutdowns, 'cause otherwise valgrind gives you false positives 13:54
ZoffixWin: 'cause moar doesn't clean up when it exists, because the OS does that well enough already
s/exists/exits/
JimmyZ ZoffixWin: www.brendangregg.com/FlameGraphs/me...raphs.html FYI 13:55
AlexDaniel m: say $*USER; say WHAT $*USER
camelia rakudo-moar 2b74c9: OUTPUT«camelia (1012)␤Cannot look up attributes in a type object␤ in block <unit> at /tmp/pkEmz9GQMj line 1␤␤»
ZoffixWin JimmyZ, looks like I don't got dtrace... And this page says "linux port is in development": dtrace.org/blogs/about/ 14:03
14:04 pierre_ left
JimmyZ ZoffixWin: on linux use systemTap 14:08
ZoffixWin: or ktap etc 14:09
ZoffixWin: it mentioned SystemTAP on the post 14:11
14:16 tokomer joined 14:17 huggable left
AlexDaniel m: say $*INITITME 14:19
camelia rakudo-moar 2b74c9: OUTPUT«Dynamic variable $*INITITME not found␤ in block <unit> at /tmp/FZyeVzMyB9 line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/FZyeVzMyB9 line 1␤␤»
14:21 azawawi joined
azawawi hi 14:21
RabidGravy: ping :)
RabidGravy boom!
azawawi ouch :) 14:22
RabidGravy: where is that fork? i wanna eat :) 14:23
bartolin AlexDaniel: is the last one not just a typo? 14:24
m: say $*INITTIME
camelia rakudo-moar 2b74c9: OUTPUT«Instant:1462717488.261654␤»
AlexDaniel bartolin: lol
hahaha
RabidGravy azawawi, github.com/jonathanstowe/Net-ZMQ - don't know what state it's in - I would recommend cherry picking some of the sensible looking commits 14:25
AlexDaniel bartolin: you are right, sir
bartolin *g* 14:26
AlexDaniel m: say $*INITTIME; say BEGIN now 14:27
camelia rakudo-moar 2b74c9: OUTPUT«Instant:1462717664.545326␤Instant:1462717664.640701␤»
AlexDaniel m: say $*ARGFILES 14:31
camelia rakudo-moar 2b74c9: OUTPUT«IO::ArgFiles<(Any)>(closed)␤»
AlexDaniel what?
ah
m: say $*ARGFILES.perl 14:32
camelia rakudo-moar 2b74c9: OUTPUT«IO::ArgFiles.new(:path(Any),:chomp)␤»
AlexDaniel should update rakudo on his machine
14:33 ufobat left 14:34 titsuki joined
titsuki Hi. Does anyone %?RESOURCES equivalent in run time ? 14:36
*anyone know
timotimo why wouldn't %?RESOURCES suffice?
14:36 ufobat joined
azawawi RabidGravy: cool.. will do 14:36
14:37 BenGoldberg left
titsuki timotimo, "mi6 test" command fails when testing, becaouse %?RESOURCES is Nil in runtime. 14:38
github.com/titsuki/p6-Term-Readsec...ret.pm6#L6 14:39
timotimo :o
that's bad
it should really work at runtime, too
oh, well, constants are evaluated at BEGIN time 14:40
so that's actually the other way around, but it's still a bug
titsuki hmm 14:41
ZoffixWin This works fine for me: github.com/zoffixznet/perl6-Bailad...tic.pm6#L4
timotimo others in the channel would know better than me
the only thing i can say is "what's your perl6 --version ?"
azawawi single core performance of AMD FX series is a joke... cpuboss.com/cpus/Intel-Core-i7-2600...MD-FX-8150
timotimo well, that's certainly new enough 14:42
teatime hmm 14:43
timotimo oh 14:45
i was about to say you don't have any resources in your meta6.json, but you do
tailgate I'm trying to understand an error from the rakudo compiler. When it gives me a type signature (Units::Unit $: Hash %u, *%_) how should I interpret that? What do the symbos $: and %*_ mean?
timotimo tailgate: the : after the $ means the part to the left is the invocant, i.e. the thing you called the method on 14:46
and *% is a slurpy hash, i.e. it takes all named arguments. %_ is the name of that hash
14:46 hotel joined
tailgate does the $ mean anything, or is just part of $: ? 14:47
timotimo it's just an anonymous scalar variable
14:47 hotel_california left
titsuki "fail" is maybe a little bit overstatement. See: gist.github.com/titsuki/ef385ec5fd...7d0bf0e553 But in fact %?RESOURCES is evaluated as Nil 14:47
psch m: class A { method foo() { } }; say A.^can('foo')[0].signature
camelia rakudo-moar 2b74c9: OUTPUT«(A $: *%_)␤»
tailgate so anytime I call a class method it'll be of the form (Classname $: args %*_) 14:48
psch tailgate: it's always just an $ if you don't give it a name
m: class A { method foo($invocant: ) { } }; say A.^can('foo')[0].signature
camelia rakudo-moar 2b74c9: OUTPUT«($invocant: *%_)␤»
timotimo could you "BEGIN say %*RESOURCES.perl" for us?
ZoffixWin titsuki, doesn't this need to be %^?RESOURCES<libraries/readsecret/blahlblah.so> ?
timotimo er, sorry, with the ? not wit hthe *
psch tailgate: any method that doesn't take other, explicit parameters has that signature, yes 14:49
ZoffixWin timotimo, that will just give something like Distribution::Resources.new(dist-id => "", repo => "file#/tmp/tmp.ZNq1hWL2Zm/lib")
And %?RESOURCES<blahlalfllsdflsdflsdfsd> will give an IO relative to resource dir
(even if it doesn't exist)
timotimo yeah, sorry, i told you to %*RESOURCES, but i meant %?RESOURCES 14:50
titsuki sorry
14:50 azawawi left
timotimo doesn't know more about debugging RESOURCES trouble 14:51
ZoffixWin wtf
14:51 khw joined
RabidGravy no that's right 14:51
14:51 Ven joined
dalek c: 55f9d0d | (Jan-Olof Hendig)++ | doc/Type/Dateish.pod:
Fixed a couple of typos
14:52
ZoffixWin I don't get a Nil, I get Distribution::Resources.new(dist-id => "", repo => "file#/tmp/tmp.ZNq1hWL2Zm/lib")
(using checkout of titsuki's repo)
timotimo but you don't use mi6 for this? 14:53
ZoffixWin I'm not running mi6 test though, but prove -e "perl6 -Ilib" -vlr t
timotimo maybe mi6 needs a bugfix?
titsuki but prove command also cause error gist.github.com/titsuki/6d564ff0d5...09e9ca012e 14:54
ZoffixWin ¯\_(ツ)_/¯
titsuki zoffix, it works! gist.github.com/titsuki/3de685a4c0...0951531392 14:56
timotimo ah, -Ilib was missing
14:56 smls joined
smls Hi all 14:57
ZoffixWin \o
smls I updatyed my gist for RT ticket search links: gist.github.com/smls/eed26639e60f1...114856f41c
Now has searches by status and tags 14:58
titsuki timetime, -Ilib seems nothing to do with this error gist.github.com/titsuki/dba511807f...9774389814
14:58 huggable joined
ZoffixWin TIL simply adding a path to `use lib` creates that path if it doesn't exist to store .precomp folder in :/ 14:59
smls On observation from the ticket searches: moritz and masak have submitted a bunch of [TODO] tickets years ago, which are still open.
Could you two maybe follow up on those?
titsuki sorry, I need double quotation like * prove --exec "perl6 -Ilib" -r t *
ZoffixWin Had /home/zoffix/service/huggable/test/perl6-IRC-Client/lib/ because I typoed "services" 15:00
moritz smls: what kind of follow-up are you looking for?
15:00 spider-mario left
titsuki the above works well too gist.github.com/titsuki/07f7eadf78...85585d5353 15:00
smls check if they're still relevant
thenb either close, or probably rename the tag to [BUG] or [NYI], depending on what it is 15:01
bartolin smls++ # handy rt links
titsuki thanks everyone !
ZoffixWin titsuki, if you add use lib 'lib'; to your tests that stuff won't be needed. And maybe mi6 will work too.
AlexDaniel smls: cool 15:02
moritz m: say <a\\ b\ c>.perl
camelia rakudo-moar 2b74c9: OUTPUT«("a\\", "b\\", "c")␤»
moritz RT #76120
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=76120
moritz I guess I should read up whethere that's expected nowadays 15:03
titsuki zoffix, thanks! I'll fix this program so.
moritz m: say <<a\\ b\ c>>.perl
camelia rakudo-moar 2b74c9: OUTPUT«("a\\", "b", "c")␤»
15:03 ufobat left
AlexDaniel 449 rejected tickets, wow :) 15:04
15:04 titsuki left
smls Grrrr, the stupid "Possible cross-site request forgery" warning on RT is preventing the nice custom output format of the search links from working in other browser sessions than the one I created them in... :( 15:07
timotimo yes.
it's pretty annoying
AlexDaniel m: say (4,8,15,16) Z (2,3,**)
camelia rakudo-moar 2b74c9: OUTPUT«((4 2) (8 3) (15 **))␤»
moritz TimToady: ^^ are backslashes in double angle quotes supposed to have special meaning, like quotes do?
S02 seems to talk only about quotes, but I seem to recall they were supposed to work shell-like 15:08
AlexDaniel m: say (4,8,15,16) Z (1,*) 15:09
camelia rakudo-moar 2b74c9: OUTPUT«((4 1) (8 1) (15 1) (16 1))␤»
AlexDaniel :/ I didn't know that it works
moritz m: say (4,8,15,16) X 1
camelia rakudo-moar 2b74c9: OUTPUT«((4 1) (8 1) (15 1) (16 1))␤»
ZoffixWin huggable, rakudobrew tripple patch :is: (in .rakudobrew/bin) \curl gist.githubusercontent.com/TimToad...tfile1.txt | git apply 15:10
huggable ZoffixWin, Added rakudobrew tripple patch as (in .rakudobrew/bin) \curl gist.githubusercontent.com/TimToad...tfile1.txt | git apply
psch m: say (4,8,15,16) Z (2,3,*)
camelia rakudo-moar 2b74c9: OUTPUT«((4 2) (8 3) (15 3) (16 3))␤»
15:17 BenGoldberg joined
AlexDaniel moritz: well, it is not equivalent 15:18
m: say (4,8,15,16) Z (1,5,*)
camelia rakudo-moar 2b74c9: OUTPUT«((4 1) (8 5) (15 5) (16 5))␤»
moritz AlexDaniel: yes, I know
AlexDaniel I just feel like I needed that a couple of times and didn't know that * works this way 15:19
m: (1,*) Z (2,*) 15:20
m: say (1,*) Z (2,*)
15:20 ZoffixWin left
camelia rakudo-moar 2b74c9: OUTPUT«(timeout)WARNINGS for /tmp/RfOCBEWJNC:␤Useless use of "Z" in expression "(1,*) Z (2,*)" in sink context (line 1)␤» 15:20
rakudo-moar 2b74c9: OUTPUT«((1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 …»
AlexDaniel m: say (*,* Z *)(2) 15:21
camelia rakudo-moar 2b74c9: OUTPUT«(((Any) 2))␤»
AlexDaniel m: say (*,* Z *,*)(2) 15:22
camelia rakudo-moar 2b74c9: OUTPUT«No such method 'CALL-ME' for invocant of type 'Seq'␤ in block <unit> at /tmp/dlYg0QeO6O line 1␤␤»
timotimo m: say (*, *)(1, 2) 15:24
camelia rakudo-moar 2b74c9: OUTPUT«Invocant requires a type object of type List, but an object instance was passed. Did you forget a 'multi'?␤ in block <unit> at /tmp/xK6S3duERU line 1␤␤»
timotimo m: (*, *)(1, 2).perl.say
camelia rakudo-moar 2b74c9: OUTPUT«Invocant requires a type object of type List, but an object instance was passed. Did you forget a 'multi'?␤ in block <unit> at /tmp/CJxtn7ajTI line 1␤␤»
timotimo how did i do that
15:25 finanalyst left
RabidGravy bad 15:29
BenGoldberg Very strange error message.
moritz why? 15:30
BenGoldberg m: say ((1,*) Z (2,*))
camelia rakudo-moar 2b74c9: OUTPUT«((1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 2) (1 …»
RabidGravy why is timotimo bad? 15:31
moritz no, why do you think the error message is strange?
(list here)() is an invocation
RabidGravy I don't think the error message is strange ;-)
15:31 tokomer left
BenGoldberg I think it ought to have the type of the object instance in the message. 15:32
timotimo ah, so instead it would have wanted me to go List(1, 2)
moritz timotimo: right
15:37 Ben_Goldberg joined 15:39 BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 15:43 jameslen_ joined 15:44 jameslenz left
timotimo "A critical medical equipment crashed during a heart procedure due to a timely scan triggered by the antivirus software installed on the PC to which the said device was sending data for logging and monitoring. 15:45
;_;
15:46 BenGoldberg left
timotimo "Fortunately, the patient was sedated, and the doctors had five minutes at their disposal to wait for the computer to finish rebooting, start the Merge Hemo application again, and complete their procedure without any health risks for the patient." - oh lord 15:46
RabidGravy it could have been worse "Your FREE Windows 10 upgrade is ready" 15:50
Ven :( 15:52
timotimo: link?
timotimo "we see the windows license of your currently connected patient has expired. in order to provide the Genuine Windows Advantage, all support systems have been put on hold until a new license has been acquired" 15:53
news.softpedia.com/news/medical-equ...3642.shtml
15:57 Actualeyes left 16:03 hankache joined, hankache left 16:04 hankache joined
psch m: say $*PERL.compiler 16:04
camelia rakudo-moar 2b74c9: OUTPUT«rakudo (2016.04.126.g.2.b.74.c.90)␤»
psch ww 16:05
16:05 hankache_ joined, hankache_ left, hankache left, hankache joined 16:06 cognominal joined
hankache panda is failing to install using rakudobrew build moar 16:06
any ideas? 16:07
smls `rakudobrew self-upgrade` ? 16:08
That, or nuking and reinstalling rakudobrew, is usually how I solve any issues I encounter with it... :P
hankache did rakudobrew self-upgrade. trying again now 16:09
how does rakudobrew build moar differ from moar-bleed? 16:11
lol moar-blead? 16:12
16:14 RabidGravy left
hankache so how does "build moar" differ from "build moar-blead"? and if it's bleeding edge why is it misspelled? 16:15
smls self-upgrade did the job. Thanks
smls hankache: My guess is that 'moar' uses whatever MoarVM revision is recommended for the latest Rakudo revision, whereas 'moar-blead' uses the absolute latest MoarVM revision. 16:17
Yep, I just checked: `rakudobrew moar` uses MoarVM revision 0d03bb6 (3 weegs ago, tagged "2016.04") 16:20
And `rakudobrew moar-blead` uses MoarVM revision e240e75 (50 minutes ago, no tag).
tadzik heh, it's misspelled indeed 16:22
timotimo leading edge? 16:23
tadzik wfm
moritz "blead" is common term in p5 land
timotimo i thought so, too
tadzik it did sound familiar
moritz their blead is our nom :-) 16:29
16:29 nbrown joined 16:32 Ven left
timotimo except we also have our two dependencies that can also blead 16:32
hankache Well dunno about Perl 5, I entered the Perl Kingdom through the 6th door ;)
timotimo me, too 16:33
hankache Should I spend some time learning 5? Is there any benefits?
Are there** 16:34
moritz there are, but not more than, say, learning python or lua 16:35
hankache so say "excluding Perl 6" if you wanted to wander a bit and learn the basics of a new language what would you choose? 16:37
moritz to answer that, I first need to know the why 16:40
curiosity? then learn something very different from what you know; maybe prolog, maybe haskell, maybe C#
depends on what you know already
timotimo if language development interests you, you could follow the development of Jai, jonathan blow's own programming language 16:41
hankache yup moritz mainly curiosity
timotimo Jai? 16:42
moritz IMHO there are three main axes along which you can explore
static vs. dynamic typing
paradigma (procedual, OO, functional, declarative) 16:43
big languages (python, perl) vs. small languages (lua, lisp)
timotimo ja, jai
hankache I think trying something functional would be a nice experience
timotimo learn fortran or cobol?
16:43 jack_rabbit joined
moritz neither is very functional :-) 16:44
timotimo going functional is so pass
passe*
hankache haskell ocaml F#
16:45 RabidGravy joined
xfix Just use procedure pointers in Fortran, clearly functional. 16:45
RabidGravy coo, clearly warmer than I thought 16:46
moritz F# is Fortran on .NET, right? /s 16:51
16:52 |2701 joined
hankache F# is ocaml on .NET 16:53
16:57 jack_rabbit left
AlexDaniel m: say INIT now; say BEGIN now; say $*INITTIME 16:58
camelia rakudo-moar 02d63f: OUTPUT«Instant:1462726759.530292␤Instant:1462726759.517365␤Instant:1462726759.422599␤»
smls Interesting, what is that variable for? 17:04
m: for ($*INITTIME, (BEGIN now), (INIT now)).rotor(2 => -1) { say "{.[1] - .[0]} sec" } 17:06
camelia rakudo-moar 02d63f: OUTPUT«0.1232342 sec␤0.0322948 sec␤»
timotimo right, it has to reach the "now" in parsing until it can get the value 17:09
smls If $*INITTIME is before "INIT time" and even before "BEGIN time, it's kinda misnamed though... 17:11
If it's just an internal thing, that's ok I suppose
AlexDaniel what do you mean by “internal thing”?
smls It's not mentioned in the docs or synopses. 17:12
AlexDaniel it is
smls oh?
AlexDaniel doc.perl6.org/language/5to6-perlvar
see also github.com/perl6/doc/issues/504
timotimo m: say BEGIN now; say BEGIN now; say BEGIN now; say BEGIN now; 17:14
camelia rakudo-moar 02d63f: OUTPUT«Instant:1462727678.120804␤Instant:1462727678.150711␤Instant:1462727678.178109␤Instant:1462727678.205597␤»
timotimo i expect INITTIME is set up when rakudo starts up?
17:17 cognominal left
dalek c: 65e3648 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/5to6-perlop.pod:
Use C«» instead of C<<>> for shift ops
17:17
smls Hm, S28 mentions $*INITTIME after all: design.perl6.org/S28.html 17:19
AlexDaniel m: say chars ‘abc’: # didn't know that it works without args 17:22
camelia rakudo-moar 02d63f: OUTPUT«3␤»
psch m: say &chars.candidates>>.signature
camelia rakudo-moar 02d63f: OUTPUT«((Cool $x) (Str:D $x) (str $x --> int))␤»
psch oh
that's a colon
17:26 parisba_ is now known as parisba
AlexDaniel m: say comb ‘foo’: # recent complaint 17:26
camelia rakudo-moar 02d63f: OUTPUT«(f o o)␤»
17:30 autarch joined 17:32 chris2 left 17:41 Cabanossi left, ufobat joined 17:43 Cabanossi joined 17:44 cognominal joined 17:46 profan joined
moritz m: say 'foo'.comb 17:48
camelia rakudo-moar 2ba21b: OUTPUT«(f o o)␤»
17:48 ufobat left 18:00 chris2 joined
dalek c: e45407e | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/5to6-perlop.pod:
Missing ‘C’
18:05
c: f0e96e4 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/5to6-perlvar.pod:
Another missing ‘C’
18:16
18:18 _28_ria left 18:33 yqt joined 18:39 hankache left 18:51 raiph left 18:53 cdg joined 18:56 jjido joined 18:58 huggable left 19:09 AlexDaniel left 19:11 smls left
dogbert17 m: say time # is this a POSIX timestamp? 19:12
camelia rakudo-moar 2ba21b: OUTPUT«1462734728␤»
dogbert17 the term time is documented as 'Returns an Int representing the current time.' 19:13
timotimo i think it's just a monotonous time; i think it's posix timestamp - leap seconds since then? 19:14
dogbert17 should I add that to the docs or do you think it's implicit? 19:15
timotimo i'm not sure what i'm saying is correct
m: say now - time
camelia rakudo-moar 2ba21b: OUTPUT«Instant:36.417369␤»
timotimo ^- that's the leap seconds, btw
dogbert17 what about 'Returns an Int representing the current time as a POSIX timestamp.' 19:16
timotimo what does the specs say?
dogbert17 S32 says 'Returns the current POSIX time as an Int.' 19:17
19:17 domidumont left
timotimo OK 19:18
dogbert17 I'll use that unless someone stops me :)
timotimo food time, bbl
19:21 CIAvash left
dalek c: f6b68df | (Jan-Olof Hendig)++ | doc/Language/terms.pod:
Fixed example typo, two broken links and updated the documentation for 'time'
19:22
19:23 buharin joined 19:29 AlexDaniel joined 19:31 spider-mario joined
hotel wait methods are subs but for classes, right? 19:31
AlexDaniel kinda 19:32
19:35 kaare_ left, lichtkind joined
DrForr finishes up the tutorial. 19:37
19:37 zakharyas joined
AlexDaniel DrForr: which tutorial? 19:38
DrForr OSCON.
hotel I mean I shouldn't have subs in a class, correct? 19:40
psch m: class A { our sub foo { "foo" } }; say A::foo 19:41
camelia rakudo-moar 2ba21b: OUTPUT«foo␤»
psch hotel: why not?
hotel I dunno
what's the difference then?
psch hotel: methods always need at least one argument, the invocant
hotel: further, subs are installed in the lexpad (iirc), while methods are installed in the method table of the class they belong to 19:42
hotel is the invocant as an argument implicit?
psch i think there's also some difference how strongly we can do type checking at compile time
hotel: no, but as a parameter :)
hotel hm
okay
thanks
psch hotel: as in, you don't have to declare it, but you have to call the method on an object 19:43
19:43 _28_ria joined
hotel that's what I think I meant by implicit 19:43
psch m: class A { method foo() #`[ <- no invocant ] { say "bar" } }; A #`[ <- invocant ] . foo
camelia rakudo-moar 2ba21b: OUTPUT«bar␤»
hotel ah okay
psch hotel: parameter and argument mean explicitely different things in Perl 6. took me some time to get used to :) 19:44
hotel: a parameter is what you have inside the signature, and an argument binds to that parameter when the routine is called with it as... argument
masak also note that, even though the `self` parameter is always implicit, it's always there anyway
m: class C { method foo($myself: ) { say $myself } }; C.new.foo 19:45
camelia rakudo-moar 2ba21b: OUTPUT«C.new␤»
masak also also note that, if you work at it, you can call the method as a sub
19:46 ufobat joined
masak m: class C { method foo { say "OH HAI {self}" } }; my $m = C.^find_method("foo")[0]; $m( C.new ) 19:46
camelia rakudo-moar 2ba21b: OUTPUT«OH HAI C<62706768>␤»
masak (in which case the invocant parameter is an actual parameter to the sub call)
dalek c: 3e3e2ca | (Sterling Hanenkamp)++ | doc/Language/ (2 files):
Adding docs for LAST/QUIT phasers

And also the same basic functionality in .tap.
19:47
c: 30a4a6e | RabidGravy++ | doc/Language/ (2 files):
Merge pull request #506 from zostay/supply-phasers

Adding docs for async LAST/QUIT phasers
hotel guess I'm using methods then
thanks guys
RabidGravy not quite warm enough to stay outside after dark yet 19:48
masak the litmus test for "should I use a method?" is "am I using instance state?", IMO
19:48 molaf joined
masak or perhaps "am I using instance stuff?" -- your method might simply be using other instance methods, I guess 19:49
AlexDaniel m: say WHAT Str::
camelia rakudo-moar 2ba21b: OUTPUT«(Stash)␤»
19:50 zakharyas left 19:51 rindolf left
hotel this thing I'm reading keeps talking about sane supplies... what makes a supply sane vs. insane? 19:58
20:03 rurban joined, rurban left 20:06 buharin left
jnthn hotel: Can rely on it following the grammar emit* [done | quit] 20:06
hotel: So you'll never see an emit after a done/quit, and only ever see one of those.
hotel thanks 20:07
vendethiel m: my %h = a => 1, c => 0, b => 2; say %h.sort 20:08
camelia rakudo-moar 2ba21b: OUTPUT«(a => 1 b => 2 c => 0)␤»
jnthn It in turn implies the supply is serial also
vendethiel why does .sort on a hash sort the keys, when Perl 6 doesn't define hash order?
jnthn vendethiel: %h.sort is really %h.list.sort which is really %h.pairs.sort, so you're getting whatever semantics sorting pairs has 20:09
Well, sorting a list of pairs 20:10
20:10 AmazingPudding is now known as DrEeevil
jnthn But by the time you perform the sort you're talking about a list, not a hash 20:10
vendethiel any reason not to have a useful %h.sort? or am I missing why how the behavior can be used?
masak I guess the reason to even talk about sane supplies is that there are situations when one needs to deal with not-sane supplies 20:12
jnthn tends to write stuff like %h.sort(*.value) which gives me a sorted bunch of pairs
vendethiel yes, that's what I currently have :) 20:13
jnthn In general, though, operations in Perl 6 tend to imply a certain form of data, and coerce appropriately. And .sort is an operation on a list-y thing. 20:14
masak so, %h.sort doesn't *quite* "sort the keys". it does lexicographic sorting of keys and values 20:15
jnthn So I guess I don't even really think of it as "sort a hash", so much as "sort the list I can get from this hash"
masak but I guess the difference only manifests if two distinct keys ever sort as equivalent ;)
'night, #perl6
jnthn rest well, masak o/
vendethiel masak: I sure hope that never happens to me :P. Good night! 20:17
20:20 mr-foobar left, mr-foobar joined 20:22 chris2 left 20:23 darutoko left
ufobat i've got a question. is this resetting 2 objects to a default state github.com/ufobat/Bailador/blob/ma...ext.pm#L15 somehow better compared to creating 2 new objects? 20:25
moritz ufobat: well, depends on whether somebody else might hold a reference to those objects 20:27
20:29 chris2 joined, wamba left
ufobat ah! 20:31
that makes sense
20:32 azawawi joined
ufobat but then, wouldn't it be better to have a reset() method in the classes. so the logic stays in the class rather then in the container. 20:32
azawawi hi
how do i write this more elegantly in perl 6 gist.github.com/azawawi/b602d41c43...61b6095bb9 ? 20:33
moritz ufobat: yes, a reset method would make more sense to me
ufobat thanks :) 20:39
vendethiel azawawi: phasers?
jnthn Callable $userblock could just be written as &userblock, and then called without the sigil 20:40
20:40 jjido left
jnthn with is a bit of a bad choice of sub name there also because Perl 6 already has a with 20:41
vendethiel this is like a given with timely destruction
jnthn Yeah, it's a fine enough idea...just better to pick a word that isn't a statement control in the language 20:42
Curiously, `with` (the Perl 6 one) can be used to make the sub there neater too :) 20:43
.dispose with $o; # for example
azawawi im thinking we need something like that especially for nativecall libraries
moritz guesses azawawi chose 'with' because that's what python uses for context managers 20:44
jnthn Yeah; `using` is used by some other languages
azawawi moritz: true though the name is not important. i want an elegant solution :) 20:45
jnthn Well, if you pick a word other than with (that isn't being used by Perl 6 already), then you can neaten it up a little 20:46
using Foo.new(:x(10)), -> $o {
... 20:47
}
timotimo wow, TIL
replaced @foo != @foo.unique with @foo != @foo.Set and it became muuuuch slower
jnthn You can skip the final ; because of the "} + whitespace ends the statement" rule
20:48 Emeric left
azawawi jnthn: thx 20:49
20:54 mr-foobar left, jjido joined 20:55 mr-foobar joined 21:01 ssotka joined 21:02 jjido left
ssotka How do you handle cross module dependencies? I have two modules, each needs to be able to return an object from the other. If I 'use' each from the other, perl6 starts spawning many processes. 21:05
timotimo yeah, recursive dependencies aren't possible
i forgot what the usual way to do it is :| 21:06
azawawi jnthn: so something like this gist.github.com/azawawi/b602d41c43...61b6095bb9
timotimo of course you can put both things into the same module
ssotka That actually might work better, thanks
timotimo i'm not exactly sure how far stubbing will get you
ssotka I meant putting both in the same module 21:07
timotimo yup
21:14 mr-foobar left, crucialrhyme left
jnthn azawawi: Yeah but you don't need the parens 21:14
(after using) 21:15
Which means you can do without the closing one too, and the trailing ;
21:15 mr-foobar joined
azawawi jnthn: gist.github.com/azawawi/b602d41c43...61b6095bb9 :) 21:21
and wrapping it in a new module :) 21:22
MadcapJake timotimo: back home! why is that second one faster? if/else vs when/default ?
21:23 TEttinger joined
jnthn azawawi: Yeah, though that ; you put at the end is optional :) 21:23
azawawi: Guess that's a matter of taste, though
21:24 ufobat left
MadcapJake timotimo: `[Z+]` is so nifty 21:24
azawawi the question is now what module namespace? :)
timotimo it also uses consonants instead of <:Letter> 21:25
MadcapJake how did each of them perform?
timotimo i forgot
you should try all of them on your own machine :) 21:26
so you have relatable numbers
MadcapJake nice excuse ;)
so it seems my channel-worker impl. was just channel overkill. Really like how elegant your channel version is 21:27
21:32 hotel_california joined
MadcapJake timotimo: thanks so much for your help and implementations of this! Really appreciate your insight! 21:32
timotimo very welcome
and very thanks, too :) 21:33
21:33 hotel left 21:44 hotel joined 21:45 hotel_california left 21:48 hotel_california joined 21:50 hotel left 21:57 mr-foobar left, mr-foobar joined 22:02 jack_rabbit joined
dalek osystem: 3bc1ac6 | azawawi++ | META.list:
Add Clean
22:03
azawawi github.com/azawawi/perl6-clean :)
jnthn++ moritz++
cxreg maybe some non-circular description or example of what "clean an object" means (without again saying clean) would be nice? 22:06
it may be cool but i have no idea what it means ;) 22:07
MadcapJake so any work you want to do would have to be wrapped in a block provided to clean?
azawawi yup
22:08 cdg left
azawawi cxreg: sure 22:09
cxreg: it is a start :)
22:11 Khisanth left
azawawi sleep & 22:11
22:12 Khisanth joined 22:13 azawawi left 22:24 BenGoldberg joined 22:27 rurban joined, rurban left 22:35 lichtkind_ joined, TEttinger left 22:38 ugexe left 22:39 lichtkind left 22:48 mr-foobar left 22:49 diakopter joined 22:50 mr-foobar joined 22:52 firstdayonthejob left 22:54 mr-foobar left 22:55 mr-foobar joined 22:56 DarthGandalf left 22:57 nbrown left, ugexe joined 22:58 espadrine left, huggable joined 23:00 DarthGandalf joined 23:02 wbill joined 23:03 spider-mario left
RabidGravy boom! 23:06
toodles
23:11 RabidGravy left 23:13 perturbation joined 23:19 mr-foobar left 23:20 mr-foobar joined 23:27 tomboy65 left 23:28 tomboy64 joined 23:45 ZoffixWin joined
ZoffixWin So I ran valgrind on `say "Hello, World"` and it told me "LEAK SUMMARY: definitely lost: 104,477 bytes in 2,358 blocks": gist.github.com/zoffixznet/9983b01...3b5fe94b44 23:48
On an empty program, "definitely lost: 104,393 bytes in 2,347 blocks" :S 23:50
23:52 mr-foobar left 23:53 mr-foobar joined
ZoffixWin No idea what any of this shit means... :( I guess I'll just avoid writing long-running apps :'( 23:53
BenGoldberg expects there's some option to tell rakudo to run some global cleanup / final gc, which would reduce that number a bit.
ZoffixWin I think that's what the --full-cleanup flag is supposed to be doing. 23:54
BenGoldberg Oh, I hadn't seen that.
nvmnd, then.
23:58 hotel_california is now known as hotel
hotel m: say {}.WHAT 23:58
camelia rakudo-moar 283b85: OUTPUT«(Hash)␤»
23:58 TEttinger joined
timotimo ZoffixWin: there's a few things we're not cleaning up at the moment. i think the unicode database (or some part of it) is part of that 23:58
pretty much everything that has MVM_unicode_* in the stack trace is related to that 23:59