»ö« 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 cognominal left, cognominal joined 00:11 rindolf left
SmokeMachine Why .list isn’t a .Positional? Is it because it’s a role and not a class? 00:16
00:18 FROGGS__ left 00:48 xcm left 00:49 xcm joined 00:50 raiph joined
Geth ecosystem: 4e00ad22d6 | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
Implementation of alerts.perl6.org API

  github.com/zoffixznet/perl6-WWW-P6lert
  (N.B.: alerts.perl6.org is not up yet; just entering the module so it
percolates through things in time for announce blog post)
01:00
01:03 Cabanossi left 01:04 Cabanossi joined 01:09 markong left 01:19 dct left 01:33 devmikey left 01:43 setty1 left 01:47 wamba left, raiph left 01:48 devmikey joined
AlexDaniel and perl 6 wins again! code-golf.io/ 01:52
π and τ are still not there though
01:53 notbenh_ left 01:54 notbenh_ joined 01:58 akagi201___ joined 02:15 pilne left 02:30 eliasr left 02:38 cdg joined
Geth ecosystem: f1eaca293f | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
Add p6lert to eco

  "Command line utility to fetch alerts.perl6.org alerts"
  github.com/zoffixznet/perl6-p6lert
02:39
02:42 aindilis joined 02:43 setty1 joined 02:44 ilbot3 left 02:45 adrianmc87 joined 02:46 adrianmc87 left 02:47 Zoffix joined
Zoffix moritz: you around? I went to setup apache for alerts.perl6.org and copied the *-mojo* file for mp6.org and I see a comment in it: "this file comes from github.com/moritz/p6c-ansible [...] Please don't modifiy it on". Did you want to set All The Things with that Ansible thing or just the mp6.o? 02:49
moritz: like, should I go and do my thing with alerts.perl6.org or are we doing these differently.
moritz: FWIW, I was planning to run the cro server on hack and reverse-proxy from www.p6c to there 02:50
SmokeMachine: I guess... But .list is also a lot easier to type 02:54
02:58 ilbot3 joined 02:59 troys_ is now known as troys
Zoffix :| fresh rakudo build on hack and zef install dies with "Failed to find dependencies: "; no mention of any missing ones :/ 02:59
That's with zef --depsonly --serial --debug install . in github.com/perl6/alerts checkout 03:04
timotimo c: releases say 0xabcdefabcdef12 «+>« (8, 16, 24, 32, 40, 48, 56) 03:06
committable6 timotimo, ¦releases (26 commits): «(188900977659375 737894443981 2882400171 11259375 43981 171 0)␤» 03:07
Zoffix If relevant: (from changelog): + Added big int support for `+<` and `+>` ops [6409ee58][ef29bb9f][66e8e72c] 03:09
In 2017.05
And there was some breakage IIRC, but it was fixed before release
03:17 unicodable6 left, benchable6 left, unicodable6 joined, benchable6 joined
Zoffix Worked fine after installing IRC::Client and Cro separately. Perhaps there's a clash when you got too many deps that it doesn't resolve some of them properly :/. 03:19
03:22 setty1 left
Zoffix Anyone got commands I could copy-paste to make alerts severt and bot start as a service? I don't know systemd 03:41
.... and geth... I see there's /etc/systemd/system/geth.service but it doesn't start automagically 03:42
ZofBot: the humans abandoned me! 03:45
ZofBot Zoffix, I would love to dive into the POD stuff deeper, but unfortunately I only have just the right amount of time to do the release and the advent post, that's it for this year :) I feel like there should be some connection between pod and pandoc but dunno what I would feel like / be able to, work on in
03:46 Actualeyes joined, Geth left
Zoffix I think I may have managed... 03:47
ZOFsystemd: make a "service file" in /etc/systemd/system/ then run `sudo systemctl enable TehService` 03:48
hm or maybe not. Geth never came back :P 03:49
03:50 Geth joined, ChanServ sets mode: +v Geth 03:51 Geth left
Zoffix gah 03:51
03:51 Geth joined, ChanServ sets mode: +v Geth
Zoffix looks like `WorkingDirectory=/home/geth/geth/` needed to have the last slash on it 03:51
03:53 p6lert joined
Zoffix \o/ 03:53
p6lert: add 6.d-proposed method Str.parse-names was renamed to .uniparse. .parse-names will warn in 6.d and will be removed in 6.e 03:54
p6lert Zoffix, Added alert ID 1: alerts.perl6.org/alert/1
Zoffix I love you, robots. You never fail me <3
Zoffix starts churning out a blog
03:59 devmikey left 04:01 akagi201___ left 04:54 Cabanossi left 04:57 Cabanossi joined 05:26 titsuki joined 05:27 titsuki_ left 05:34 cdg left 05:40 khw left
Geth doc: 2a28c82a76 | (Alex Chen)++ | doc/Type/Signature.pod6
Fix #1724

Provide valid example of Type/Signature.pod6, X«Constraining signatures of Callables|Callable (constrain)»
05:51
synopsebot Link: doc.perl6.org/type/Signature
05:58 wander joined
wander \o 05:59
piojo star: use LWP::Simple; use JSON::Fast; 06:26
camelia ===SORRY!===
P6M Merging GLOBAL symbols failed: duplicate definition of symbol INET
piojo m: use LWP::Simple; use JSON::Fast;
camelia ===SORRY!===
Could not find LWP::Simple at line 1 in:
/home/camelia/.perl6
/home/camelia/rakudo-m-inst-2/share/perl6/site
/home/camelia/rakudo-m-inst-2/share/perl6/vendor
/home/camelia/rakudo-m-inst-2/share/perl6
CompUn…
piojo There's something wrong with my rakudo. It can't include LWP::Simple, then JSON::Fast. But it works in the other order. 06:30
06:30 aindilis` joined
piojo I'm sure it's just my current build, but I can't figure out why this started happening. 06:31
06:32 aindilis left 06:33 troys is now known as troys_ 06:34 aindilis` left 06:35 aindilis joined 06:38 jeromelanteri joined 06:39 khisanth_ left
piojo Oh, looks like zef installed JSON::Fast twice. Lovely. I guess that's why the --upgrade flag says "BETA" 06:40
geekosaur which suggests those two have different JSON::Fast deps, and if the older one is loaded first then the newer one conflicts 06:41
but if the newer one is loaded first then it satisfies the dependency for the other as well? 06:42
(although technically they shouldn't do that, I think. not sure how that case is supposed to work.)
06:52 troys_ is now known as troys 06:53 troys left 06:54 khisanth_ joined
piojo geekosaur: I might have actually installed a downgrade as an upgrade (zef upgrade .), so that probably screwed things up. 06:57
but it's fixed now, and I'm debugging a more serious Rakudo problem
I'm debugging type errors, but this is a little out of my league 06:59
geekosaur perl6 supports multiple versions of modules installed, and versioned importes 07:01
what happens if two modules require different versions, I don't know
piojo geekosaur: I'm actually looking into this now, but understanding rakudo's core is pretty hard at first: rt.perl.org/Public/Bug/Display.html?id=128287 07:04
I think the comment in the bug report will be highly useful: "It's as if we end up with two "instances" of the same parameterized type, and the type check gets confused about which one to check against." 07:05
07:05 espadrine left
piojo maybe one type gets created in precomp, the other at runtime, and they aren't merged/combined? 07:05
07:14 darutoko joined 07:20 sena_kun joined 08:17 dct joined 08:29 wamba joined 08:33 dct left 09:04 scimon joined 09:05 rindolf joined 09:21 domidumont joined 09:26 domidumont left 09:27 domidumont joined 09:29 FROGGS joined 09:34 darutoko- joined, darutoko- left 09:36 darutoko left 09:37 eikef joined 09:53 dct joined 10:17 darutoko joined 10:33 Sm4rkey joined
Summertime p6: Set.new((1,2,3),(1,2,3)) 10:39
camelia ( no output )
Summertime p6: put Set.new((1,2,3),(1,2,3));
camelia 1 2 3
Summertime huh, so that got changed from 6.c I guess 10:41
Zoffix mc: put Set.new((1,2,3),(1,2,3)); 11:12
committable6 Zoffix, ¦2015.12: «1 2 3 1 2 3␤»
Zoffix c: 2015.12,HEAD dd Set.new((1,2,3),(1,2,3));
committable6 Zoffix, ¦2015.12: «set($(1, 2, 3),$(1, 2, 3))␤» ¦HEAD(418fc06): «Set.new((1, 2, 3))␤»
Zoffix Summertime: a lot of setty/baggy behaviour was unspecced in 6.c and was clarified around August. I guess this is one of the differences. 11:13
11:15 piojo_ joined
Zoffix c: 2015.12,2017.12,HEAD dd Set.new((1,2,3),(1,2,3)); 11:15
committable6 Zoffix, ¦2015.12: «set($(1, 2, 3),$(1, 2, 3))␤» ¦2017.12: «Set.new((1, 2, 3),(1, 2, 3))␤» ¦HEAD(418fc06): «Set.new((1, 2, 3))␤»
Zoffix Ohhh
Summertime: this is actually the result of the List type being made a value type if it only has value types. 11:16
And it's still new on HEAD, not in any release. This is the only change I see due to it in 6.d-proposals spec: github.com/perl6/roast/commit/5670...81984f39f2 11:18
Looks like both are part of 6.c spec too 11:19
.tell lizmat looks like the value-type-list thing violates 6.c spec. Is there a way of making that change a 6.d-only change? irclog.perlgeek.de/perl6/2017-12-29#i_15631590 11:20
yoleaux Zoffix: I'll pass your message to lizmat.
11:20 eliasr joined
Zoffix Gonna do more 6.d-proposals review this long weekend, so we could get it outta the door sooner than later. 11:22
Also, if someone has ideas for fixing R#1289 .. comment on it
synopsebot R#1289 [open]: github.com/rakudo/rakudo/issues/1289 [severe] [6.d BLOCKER] Implement a Way to Know Caller's Language
11:23 Sm4rkey left
Zoffix Announcing P6lert: Perl 6 Alerts Directly From Core Developers: rakudo.party/post/Announcing-P6ler...Developers 11:24
11:38 rindolf left 11:41 rindolf joined 11:58 Zoffix left 12:08 xinming_ is now known as xinming 12:15 markong joined 12:34 eikef left 12:40 wander left 12:41 wander joined 12:42 leont joined
leont Anyone an idea why one of my users could be observing a «Cannot flush handle: Failed to flush filehandle: Input/output error» error on Windows? github.com/perl6/tap-harness6/issues/22 12:42
I could put the flush in a try block or something, but I don't like suppressing errors I don't understand 12:44
12:49 eikef joined 13:02 Zoffix joined
Zoffix leont: similar symptom is described in RT#131700 13:03
synopsebot RT#131700 [new]: rt.perl.org/Ticket/Display.html?id=131700 [IO] prompt not working on bash-on-ubuntu on win10
Zoffix Gonna try to debug it tonight
|12h rt.perl.org/Ticket/Display.html?id=131700
ZofBot Zoffix, Will remind you on 2017-12-29T20:03:34.519417-05:00 about rt.perl.org/Ticket/Display.html?id=131700
leont Zoffix: thanks 13:06
13:07 eikef left 13:23 natrys joined, manchicken joined 13:25 bdmatatu joined
leont How do I get the version of a module/package/whatever programmatically? 13:26
bdmatatu There was a discussion about this here: colabti.org/irclogger/irclogger_log...09-08#l529 13:33
manchicken Anybody with Travis-CI experience know how to get Travis to stop rebuilding Perl 6 every time I run a thing? 13:44
Zoffix manchicken: that's the default script that just brews latest perl6 on each run. You'd need to set custom options to avoid that. Try gfldex.wordpress.com/2017/04/14/sp...up-travis/ 13:45
manchicken My biggest issue is the OSX image. Still trying to resolve this stupid `dlopen()` problem where it can't find the image, despite all of the environment variables pointing right at it. 13:48
Do you think I can just cache ~/.rakudobrew? 13:50
Zoffix Don't know. You could just toss it and build without it 13:52
huggable: sauce
huggable Zoffix, Install untested latest development version of Rakudo from source: github.com/zoffixznet/r#table-of-contents
manchicken This is killing me: travis-ci.org/manchicken/perl6-Fcntl
I want to have OSX in the CI... but I just can't get dlopen to find my symbol. 13:53
It looks like the modules which use `NativeCall` have no problem... but for some reason my module which only uses it for tests is having a problem. 14:03
14:09 leont left
Zoffix manchicken: don't know anything about it, but FWIW I see you're setting -I things here github.com/manchicken/perl6-Fcntl/...is.yml#L23 Awhile back, I had issues with setting -I things and had to change them to `'-Ilib', |('-I' «~« $*REPO.repo-chain.map: *.path-spec)` because zef builds in some special place or something: 14:10
github.com/zoffixznet/perl6-LN/com...e87682c4e4
Perhaps you could add something that tells you whether the stuff is really up in there vOv
\o
14:10 Zoffix left
manchicken Are there ways to get `NativeCall` to respond to paths that I set in Perl 6 code? 14:13
The documentation only seems to indicate how you can point it to a specific file, which doesn't seem like what I want to do.
I just want to add lookup paths. 14:14
Off, I just looked at the Most Wanted list again. 14:20
The POSIX module is going to be a beat.
Beast* 14:21
I wonder if half of the reason it hasn't been started is because of how huge it is.
It's dirty tricks time with Travis... 14:25
14:27 bdmatatu left 14:28 setty1 joined
manchicken If I started implementing the POSIX module, how likely do y'all think it would be for others to start joining in ? 14:35
Also, I wonder if maybe it makes sense to break such a dense module up.
`POSIX::FileHandling` and `POSIX::Signals`, that type of stuff.
Dunno...
It's just so big.
SUCCESS! 14:45
Woot! I have uploaded perl6-Fcntl to CPAN. 14:52
buggable New CPAN upload: perl6-Fcntl-0.0.1.tar.gz by MSTEMLE cpan.metacpan.org/authors/id/M/MS/...0.1.tar.gz 14:58
manchicken I guess I now add the line to github.com/perl6/ecosystem ?
In the META.list?
Geth ecosystem: 3994b3a97e | (Michael D. Stemle, Jr)++ | META.list
Adding Fcntl
15:02
15:04 cdg joined
Geth perl6-most-wanted: 0b230d839e | (Michael D. Stemle, Jr)++ | most-wanted/modules.md
Removing Fcntl from the list now that I've pushed it.
15:04
15:06 piojo_ left 15:12 manchicken left 15:19 jferrero joined 15:21 manchicken joined 15:23 Possum joined
timotimo m: Blob.new(1, 2, 3, 4).subbuf(10..1) 15:27
camelia From argument to subbuf out of range. Is: 10..1, should be in 0..4
in block <unit> at <tmp> line 1
timotimo m: Blob.new(1 xx 100).subbuf(10..1)
camelia Unable to allocate an array of 18446744073709551608 elements
in block <unit> at <tmp> line 1
manchicken Oof, I suppose one of the hardest bits for POSIX is going to be the volume of platforms it has to account for. 15:29
It might make the most sense to break POSIX up... 15:30
Then there's the question of whether I should pick POSIX next, or dig into some l10n stuff. 15:34
It would be nice to have a good ICU implementation.
15:39 vichib joined 15:40 troys joined 15:47 konsolebox left, cdg left, cdg joined 15:48 manchicken left 15:51 khw joined 15:53 statisfiable6 left, cdg left, statisfiable6 joined, ChanServ sets mode: +v statisfiable6, konsolebox joined 15:57 Zoffix joined 16:00 AlexDaniel left 16:04 nativecallable6 left 16:05 quotable6 left, releasable6 left, nativecallable6 joined, ChanServ sets mode: +v nativecallable6, quotable6 joined, ChanServ sets mode: +v quotable6, releasable6 joined, ChanServ sets mode: +v releasable6, cdg joined, committable6 left, committable6 joined, ChanServ sets mode: +v committable6 16:10 cdg left 16:18 cdg joined 16:38 leont joined 16:49 wamba left 16:54 Zoffix left 16:55 FROGGS left 16:56 FROGGS joined 16:58 troys is now known as troys_
tony-o does metacpan not show perl6 modules in search? 16:58
timotimo i don't think it does 17:00
17:26 piojo_ joined
ilmari tony-o: modules.perl6.org/ indexes perl6 modules on cpan 17:29
17:31 scimon left
tony-o so does modules.zef.pm :-) 17:31
was just curious about metacpan's status
modules.zef.pm now has the readmes working again 17:34
ilmari I don't think there are any plans for indexing perl6 modules on metacpan
17:38 imcsk8 left, cdg left
tony-o ah 17:46
bummer 17:47
17:58 cdg joined 18:02 cpage left 18:09 xinming left 18:10 xinming joined 18:25 domidumont left 18:33 piojo_ left 18:39 darutoko left 18:46 eliasr left 18:54 troys_ is now known as troys 19:01 lelf joined
lelf hi. you do ‘use X’. After that, how do you know what has changed and what is X? (e.g.: foo is in scope now, X is a package, X.WTF will tell me that info) 19:29
19:38 bisectable6 left, bloatable6 left, squashable6 left, coverable6 left, bisectable6 joined, ChanServ sets mode: +v bisectable6, bloatable6 joined, squashable6 joined, ChanServ sets mode: +v squashable6, coverable6 joined, ChanServ sets mode: +v coverable6, greppable6 left, reportable6 left, greppable6 joined, ChanServ sets mode: +v greppable6 19:39 leont left
timotimo m: use Test; say Test::.keys 19:47
camelia (&todo_output EXPORT &failure_output &output)
timotimo m: use Test; say Test::EXPORT::Default::.keys
camelia Could not find symbol '&Default'
in block <unit> at <tmp> line 1
timotimo m: use Test; say Test::EXPORT::DEFAULT::.keys
camelia (&does-ok &like &eval-lives-ok &pass &cmp-ok &subtest &flunk &dies-ok &unlike &todo &skip &use-ok &isnt &skip-rest &diag &eval-dies-ok &is-deeply &throws-like &ok &is &done-testing &bail-out &is-approx &lives-ok &MONKEY-SEE-NO-EVAL &plan &nok &is_appr…
timotimo m: use Test; say ::.keys 19:48
camelia ($=pod &eval-lives-ok &like &does-ok $_ $/ &dies-ok &flunk &subtest &cmp-ok &pass !UNIT_MARKER &unlike $=finish EXPORT &use-ok &skip &todo $! &throws-like &is-deeply &eval-dies-ok &diag &skip-rest &isnt ::?PACKAGE GLOBALish &done-testing &is &ok &live…
tony-o m: class X { }; say GLOBAL::.keys; 19:50
camelia (X)
19:58 pnov2017 joined
lelf m: use Test; say Test.HOW 20:00
camelia Perl6::Metamodel::ModuleHOW.new
lelf ^ any better way?
tony-o what information are you trying to get, exactly?
what subs were imported, if there is a new class available to your code, what methods are in the class, what the class name is? 20:01
timotimo's code shows for modules what subs were imported into scope, what are exported by default - mine shows for a class 20:02
lelf I'm interested in everything :) but last question is about whether it's a unit class/module/grammar/...? 20:03
tony-o m: use Test; class X {}; say Mu ~~ X; say Mu ~~ Test; 20:04
camelia False
False
tony-o oops
m: use Test; class X {}; say X.HOW; say Test.HOW; 20:12
camelia Perl6::Metamodel::ClassHOW.new
Perl6::Metamodel::ModuleHOW.new
20:13
tony-o a little better, with grammar lelf: 20:15
m: sub x($t) { $t.HOW.^name }; use Test; class X {}; grammar Y { }; say x(X); say x(Test); say x(Y);
camelia Perl6::Metamodel::ClassHOW
Perl6::Metamodel::ModuleHOW
Perl6::Metamodel::GrammarHOW
20:16 cog_ joined 20:18 cognominal left 20:25 stmuk joined
lelf m: say (1..5)».WHAT 20:27
camelia (Range)
lelf why?
20:27 stmuk_ left
timotimo WHAT is special and won't do things like hyper method calls 20:28
m: say (1..5)>>.^name
camelia Range
timotimo apparently neither will that
lelf m: say .^name for 1..2 20:29
camelia Int
Int
20:34 s0me0n3-unkn0wn joined, stmuk_ joined
tony-o what were you expecting from that timotimo ? 20:36
timotimo call .^name on each element of what Range.list gives you 20:37
20:37 stmuk left, s0me0ne-unkn0wn left
timotimo m: say (1..5)>>.uniname 20:37
camelia (<control-0001> <control-0002> <control-0003> <control-0004> <control-0005>)
timotimo m: say (1..5)>>.Str>>.uniname
camelia (DIGIT ONE DIGIT TWO DIGIT THREE DIGIT FOUR DIGIT FIVE)
tony-o ah
20:43 dugword joined, dugword left 20:58 troys is now known as troys_, evalable6 left, evalable6 joined, reportable6 joined, ChanServ sets mode: +v reportable6 21:00 pilne joined 21:01 troys_ is now known as troys
pnov2017 what's perldoc equivalent in 6? 21:02
teatime p6doc 21:15
docs.perl6.org/programs/02-reading-docs
21:16 leont joined 21:22 geospeck joined 21:26 lelf left 21:30 AlexDaniel joined 21:33 lelf joined
Summertime m: my $total = 0; put do for 0..5 {$total += $_}; 21:34
camelia 15 15 15 15 15 15
Summertime what would be the best way to avoid that "issue"?
m: my $total = 0; put do for 0..5 {($total += $_).clone}; # its a way around it but... it seems a bit cumbersome? 21:35
camelia 0 1 3 6 10 15
jnthn m: put [\+] 0..5 21:36
yoleaux 28 Dec 2017 20:29Z <Zoffix> jnthn: would you be able to clarify what is a ".list"? github.com/rakudo/rakudo/issues/1344
camelia 0 1 3 6 10 15
yoleaux 09:21Z <piojo> jnthn: Could you please take a look at this bug? I've debugged it some but it's really out of my league: rt.perl.org/Ticket/Display.html?id...50f25eb6ab
09:28Z <piojo> jnthn: I added comments that I hope will be useful, but the next step requires understanding how how MVMObjects are created (or looked up) as modules are parsed after (not during) compilation.
jnthn m: my $total = 0; put do for 0..5 {item $total += $_}; # also this :) 21:37
camelia 0 1 3 6 10 15
21:37 Herby_ joined
Herby_ o/ 21:37
21:38 lelf left
Summertime ah, that seems to be it, thank you! 21:38
21:42 Ven`` joined 21:46 leont left
timotimo m: my $total = 0; put do for 0..5 { ($total += $_)<> } 21:48
camelia 0 1 3 6 10 15
timotimo decontainerization postfix operator
lizmat yes, because that's really what you need
21:51 pmurias joined
Summertime hmm, is there a reason that op isn't in the docs? just hasn't been doc'd yet, or is it that troublesome? 21:52
pmurias tony-o: re metacpan showing Perl 6 modules even once it supports Perl 6 modules I guess the main metacpan.org site will only show Perl 5 modules as that's what people search for when writing Perl 6
Summertime oh, nevermind, found it 21:53
21:54 lelf joined 21:56 geospeck left 21:57 Ven`` left 22:00 lelf left, troys is now known as troys_ 22:07 Herby_ left 22:16 comborico1611 joined, lelf joined 22:17 eliasr joined 22:19 setty1 left 22:21 lelf left 22:24 espadrine joined 22:35 Zoffix joined 22:37 lelf joined 22:41 pecastro joined 22:42 lelf left 22:43 stmuk joined 22:46 stmuk_ left 22:52 rindolf left 22:53 cdg left 22:58 lelf joined 23:01 natrys left 23:02 comborico1611 left, comborico1611 joined 23:06 lelf left
Zoffix nqp: say(QAST::WVal.new(:value(42), :ann('foo', 1)).ann('foo')) 23:12
camelia This representation (VMArray) cannot unbox to a native string (for type NQPArray)
at gen/moar/stage2/QASTNode.nqp:204 (/home/camelia/rakudo-m-inst-2/share/nqp/lib/QASTNode.moarvm:ann)
from gen/moar/stage2/QASTNode.nqp:128 (/home/camelia/rakudo-m-inst-2…
Zoffix Is there a way to set .annotate('foo', 'bar') directly via a named arg? 23:13
23:17 comborico1611 left
Zoffix nm; read the sauce for QAST::Node; there ain't one. 23:18
23:18 comborico1611 joined 23:23 pecastro left
tony-o pmurias: can't tell if you're joking 23:27
23:30 pnov2017 left 23:35 pmurias left
teatime Q: is there a type constraint that will accept: Int 4, int/int32/int64 4, Num 4e0, Rat 4.0, but reject: 4.3 and 4.00000000000000000000003 etc. ? 23:38
jnthn No, but I figure you can define a subset Integerish of Numeric where $_ == .round; or so 23:39
timotimo m: say 4.narrow == 4
camelia True
23:39 leont joined
jnthn Uh, .narrow is perhaps better :) 23:39
timotimo m: say 4.narrow ~~ Int; say 4.3.narrow ~~ Int 23:40
camelia True
False
jnthn Or .floor
timotimo m: say 4e0.narrow ~~ Int;
camelia True
jnthn Don't use .round, it'll get false negs
TEttinger m: say 16/4.narrow ~~ Int; 23:52
camelia False
TEttinger not sure of the precedence there 23:53
or if 16/4 is the syntax for a ratio
jnthn m: say (16/4).narrow ~~ Int; 23:54
camelia True
jnthn Method calls are very tight 23:55
In fact, they're as tight as it gets :)
TEttinger but is (16/4) a ratio or is it dividing 16 by 4 as an operation? 23:56
m: say (16/4).what; 23:57
camelia No such method 'what' for invocant of type 'Rat'. Did you mean any of these?
Rat
flat

in block <unit> at <tmp> line 1
TEttinger I guess
23:57 comborico1611 left
jnthn It's an operation 23:57
Though it will be constant-folded at compile time
TEttinger I am probably misunderstanding what a Rat is
23:58 leont left
TEttinger that said (16/4) is a Rat I think 23:58
23:58 comborico1611 joined, sena_kun left