»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
00:12 Kaiepi left 00:13 dotdotdot left 00:16 dotdotdot joined 00:17 cpage joined, p6bannerbot sets mode: +v dotdotdot, p6bannerbot sets mode: +v cpage 00:24 Celelibi joined 00:25 p6bannerbot sets mode: +v Celelibi 00:28 Kaiepi joined 00:29 p6bannerbot sets mode: +v Kaiepi 00:30 dotdotdot left
Xliff .seen TimToady 00:31
yoleaux I saw TimToady 18 Oct 2018 00:06Z in #perl6: <TimToady> my wife will tell you I go way too quiet when I'm thinking :)
00:32 aindilis joined 00:33 p6bannerbot sets mode: +v aindilis 00:37 dotdotdot joined 00:38 p6bannerbot sets mode: +v dotdotdot 00:39 kurahaupo_ joined, p6bannerbot sets mode: +v kurahaupo_ 00:41 kurahaupo left 00:46 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke, MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke 00:47 vrurg joined 00:48 p6bannerbot sets mode: +v vrurg 01:15 fake_space_whale joined, p6bannerbot sets mode: +v fake_space_whale 01:22 dotdotdot left 01:23 dotdotdot joined 01:24 p6bannerbot sets mode: +v dotdotdot 01:32 Kaiepi left 01:33 Kaiepi joined 01:34 p6bannerbot sets mode: +v Kaiepi 01:36 Celelibi left 01:42 dotdotdot left 01:44 dotdotdot joined 01:45 p6bannerbot sets mode: +v dotdotdot 01:47 kerframil joined, p6bannerbot sets mode: +v kerframil 01:55 molaf left 02:08 molaf joined 02:09 p6bannerbot sets mode: +v molaf 02:12 vrurg left 02:13 ufobat_ joined 02:14 p6bannerbot sets mode: +v ufobat_ 02:17 ufobat left 02:25 dotdotdot left
holyghost I've started an ai agent system in perl6. There's an Actor MusicAgent class which you can ask for music 02:31
02:31 dotdotdot joined
holyghost basically this actor has to be sent over the network, then it nestles in a server and you can talk to your local agents. They also carry a database with them with e.g. files, info. links, URIs, UTf-8 etc 02:32
02:32 p6bannerbot sets mode: +v dotdotdot
holyghost the meaning is they are distributed from your home and venture forth on the internet so you only make agents which you like 02:35
e.g. on a non-reserved network port 02:36
02:37 graphene left
holyghost you home server then lets them deploy music links for example 02:37
02:38 graphene joined 02:39 p6bannerbot sets mode: +v graphene 02:44 dotdotdot left
buggable New CPAN upload: AI-Agent-0.1.1.tar.gz by HOLYGHOST cpan.metacpan.org/authors/id/H/HO/...1.1.tar.gz 02:51
02:58 dotdotdot joined
SmokeMachine Xliff: maybe a watch-path on /proc? 02:59
02:59 p6bannerbot sets mode: +v dotdotdot
Xliff SmokeMachine: I'm trying to adopt forkstat for the process. Looks promising. 03:01
03:01 Kaiepi left
buggable New CPAN upload: AI-Agent-0.1.2.tar.gz by HOLYGHOST cpan.metacpan.org/authors/id/H/HO/...1.2.tar.gz 03:01
03:02 Kaiepi joined, p6bannerbot sets mode: +v Kaiepi 03:11 dotdotdot left 03:17 dotdotdot joined, p6bannerbot sets mode: +v dotdotdot 03:18 Celelibi joined 03:19 Kaiepi left, p6bannerbot sets mode: +v Celelibi, Kaiepi joined 03:20 p6bannerbot sets mode: +v Kaiepi 03:21 sno left
buggable New CPAN upload: AI-Agent-0.1.3.tar.gz by HOLYGHOST cpan.metacpan.org/authors/id/H/HO/...1.3.tar.gz 03:21
03:23 graphene left 03:24 graphene joined
holyghost Instead of using learning I might go through a hash of common Agent "ask" functionality 03:25
then the agent gives you something
It now includes a NES Music ROM file sent
03:25 p6bannerbot sets mode: +v graphene, graphene left
holyghost note that homebrew ROMS are not illegal 03:25
03:27 graphene joined
holyghost It only needs a protocol and a client-server perl6 code 03:27
03:27 p6bannerbot sets mode: +v graphene
holyghost It could also include a meta server but I might use DNS so you knock on someone's door if the agent wants to connect :-) 03:28
rogue/non-rogue port I mean :-)
buggable New CPAN upload: AI-Agent-0.1.4.tar.gz by HOLYGHOST cpan.metacpan.org/authors/id/H/HO/...1.4.tar.gz 03:31
03:33 graphene left
holyghost eco: AI::Agent 03:34
buggable holyghost, Nothing found
03:34 graphene joined 03:35 p6bannerbot sets mode: +v graphene, sauvin left 03:40 sauvin joined, p6bannerbot sets mode: +v sauvin
holyghost back in the day, in pre-mouse sierra games, you could do "ask about *text*" or "look at *text*", which parsed your action instead of clicking somewhere, it's such a parser I need to let agents ask something on another one's system. 03:42
I mean to let your homeserver server ask the agents something
03:49 caa51h left 03:52 dotdotdot left 03:53 graphene left 03:54 graphene joined, fake_space_whale left 03:55 p6bannerbot sets mode: +v graphene 04:00 MasterDuke left 04:04 caa51h joined 04:05 p6bannerbot sets mode: +v caa51h 04:11 dotdotdot joined 04:12 p6bannerbot sets mode: +v dotdotdot
buggable New CPAN upload: AI-Agent-0.1.5.tar.gz by HOLYGHOST modules.perl6.org/dist/AI::Agent:cpan:HOLYGHOST 04:21
holyghost eco: AI::Agent 04:23
buggable holyghost, AI::Agent 'AI network Agent system': modules.perl6.org/dist/AI::Agent:cpan:HOLYGHOST
04:25 molaf left
holyghost I programmed Bubble Bobble in GNU smalltalk yesterday, I'll see if I can make a system in perl 6 04:27
s/yesterday/on sunday 04:28
04:33 Actualeyes left, Actualeyes joined 04:34 p6bannerbot sets mode: +v Actualeyes 04:41 troys left 04:49 fake_space_whale joined, p6bannerbot sets mode: +v fake_space_whale 04:50 curan joined, p6bannerbot sets mode: +v curan 04:57 HaraldJoerg joined 04:58 p6bannerbot sets mode: +v HaraldJoerg 05:01 kerframil left 05:08 dotdotdot left 05:10 dotdotdot joined 05:11 p6bannerbot sets mode: +v dotdotdot
buggable New CPAN upload: AI-Agent-0.1.6.tar.gz by HOLYGHOST modules.perl6.org/dist/AI::Agent:cpan:HOLYGHOST 05:12
05:15 dotdotdot left 05:17 fake_space_whale left 05:18 dotdotdot joined 05:19 p6bannerbot sets mode: +v dotdotdot 05:23 jmerelo joined, p6bannerbot sets mode: +v jmerelo 05:32 Bucciarati left
jmerelo squashable6: status 05:32
yoleaux 16 Oct 2018 16:44Z <AlexDaniel> jmerelo: is there a ticket for rerevert of the commit that was reverted in D#2374 ?
16 Oct 2018 17:30Z <AlexDaniel> jmerelo: I got to know about it in colabti.org/irclogger/irclogger_log...10-16#l581 and was somewhat surprised
synopsebot D#2374 [closed]: github.com/perl6/doc/issues/2374 [bug][site] Most search results point to pages that do not exist
squashable6 jmerelo, Next SQUASHathon in 10 days and ≈4 hours (2018-11-03 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
jmerelo .tell I am not sure I understand what you mean. I reverted that and it seems to be fixed now, but my intention is to roll it back carefully to check that everything works 05:34
yoleaux jmerelo: I'll pass your message to I.
tyil using m:ov// I can match strings in another string, with overlapping due to the :o, but I can't seem to use :o without :v, and I can't find :v on the regex adverbs documentation page 05:37
jmerelo tyil: please create an issue about :v 05:38
tyil ok
05:39 Kaiepi left, Kaiepi joined 05:40 p6bannerbot sets mode: +v Kaiepi
tyil jmerelo: github.com/perl6/doc/issues/2406 05:42
jmerelo tyil++
tyil oh, well, after reading through more, :ov is 1 adverb, shorthand for :overlap 05:43
I thought all adverbs were single letters or full words 05:44
guess I thought wrong here
jmerelo tyil: maybe it should be clarified anyway... some
tyil it does say "(short :ov)", which is how I found out :p 05:45
I just had a wrong assumption and looked for the wrong thing
jmerelo tyil: maybe we should say we shouldn't do that assumption 05:46
tyil: just clarify that on the issue, and we'll take care of it (or close it if really doesn't need anything). Thanks anyway
tyil done :) 05:50
buggable New CPAN upload: AI-Agent-0.1.7.tar.gz by HOLYGHOST modules.perl6.org/dist/AI::Agent:cpan:HOLYGHOST 05:51
holyghost ^-- there's agent to agent dispatching now, there is a music (link) agent and a NES Music ROM agent 05:55
05:55 abraxxa joined
holyghost It needs to be filled with lots of parsing :-) 05:55
05:56 p6bannerbot sets mode: +v abraxxa 05:57 wbn left
holyghost the Agent class should be usable I mean 05:57
now I'm going to drink a beer *I hate JSON, I'd rather have PSON" 05:58
05:59 wbn joined 06:00 p6bannerbot sets mode: +v wbn 06:03 dotdotdot left 06:04 dotdotdot joined 06:05 p6bannerbot sets mode: +v dotdotdot 06:13 Bucciarati joined 06:14 p6bannerbot sets mode: +v Bucciarati 06:19 dotdotdot left 06:20 dotdotdot joined 06:21 p6bannerbot sets mode: +v dotdotdot
jmerelo holyghost++ I've taken a look and a bit of more information could help. I couldn't figure out exactly what it does. 06:24
06:25 robertle joined, jmerelo left, p6bannerbot sets mode: +v robertle 06:33 domidumont joined, p6bannerbot sets mode: +v domidumont 06:42 dotdotdot left 06:51 dotdotdot joined 06:52 p6bannerbot sets mode: +v dotdotdot 06:57 cognominal-p6 left 07:00 dotdotdot left 07:04 graphene left 07:05 graphene joined 07:06 p6bannerbot sets mode: +v graphene 07:07 graphene left, dotdotdot joined 07:08 p6bannerbot sets mode: +v dotdotdot 07:11 haukex joined, p6bannerbot sets mode: +v haukex 07:15 pecastro joined, p6bannerbot sets mode: +v pecastro 07:21 dotdotdot left 07:22 dotdotdot joined 07:23 p6bannerbot sets mode: +v dotdotdot, cognominal-p6 joined 07:24 p6bannerbot sets mode: +v cognominal-p6 07:30 sno joined 07:31 p6bannerbot sets mode: +v sno 07:37 dotdotdot left 07:38 dotdotdot joined, dakkar joined 07:39 p6bannerbot sets mode: +v dotdotdot, p6bannerbot sets mode: +v dakkar 07:41 haukex left, ufobat_ is now known as ufobat 07:42 zakharyas joined, kensanata joined, p6bannerbot sets mode: +v kensanata, dotdotdot left, p6bannerbot sets mode: +v zakharyas 07:45 cognominal-p6 left, cognominal-p6 joined, dotdotdot joined 07:46 p6bannerbot sets mode: +v cognominal-p6, p6bannerbot sets mode: +v dotdotdot 07:48 zakharyas left 07:49 cognominal-p6 left 07:51 cognominal-p6 joined, cognominal-p6 left, rindolf joined 07:52 cognominal-p6 joined, p6bannerbot sets mode: +v cognominal-p6, p6bannerbot sets mode: +v rindolf, p6bannerbot sets mode: +v cognominal-p6 07:58 haukex joined 07:59 p6bannerbot sets mode: +v haukex 08:08 haukex left
sjn o/ 08:14
08:15 haukex joined
sjn Anyone here considering going to 35c3 in Leipzig this year? :) 08:15
sjn thinks it would be cool to have some Perl 6 presence there :-D 08:16
08:16 dotdotdot left, p6bannerbot sets mode: +v haukex, dotdotdot joined, lizmat left 08:17 p6bannerbot sets mode: +v dotdotdot 08:22 HaraldJoerg1 joined 08:23 HaraldJoerg left, p6bannerbot sets mode: +v HaraldJoerg1 08:32 lizmat joined, p6bannerbot sets mode: +v lizmat 08:33 dpk left 08:34 yoleaux left 08:36 zakharyas joined 08:37 p6bannerbot sets mode: +v zakharyas 08:39 AlexDaniel left 08:40 dpk joined, p6bannerbot sets mode: +v dpk, zakharyas left 08:51 dotdotdot left 08:55 dotdotdot joined 08:56 p6bannerbot sets mode: +v dotdotdot 09:03 dotdotdot left 09:08 dotdotdot joined 09:09 p6bannerbot sets mode: +v dotdotdot 09:14 jbotz joined 09:15 p6bannerbot sets mode: +v jbotz
masak sjn: it would :) 09:28
general question: how kosher is it to prefer \s+ to <.ws> just because you want to make the declarative prefix longer in a rule? 09:30
moritz if you are aware that it doesn't always do the same thing, sure 09:31
masak aye
but in this case I know it's whitespace between two \w 09:32
(and I don't have any "comments are whitespace" concerns either)
moritz may I ask why you need a longer prefix that includes whitespace? 09:33
it's likely fine, I just try to get a good sense of what's going on 09:34
(in case I ever need to write a v2 of my book :D)
masak hehe 09:45
well, this was sort of take II of getting something in 007 to work
I'm still not convinced it's the best way forward, but it seems to get me unstuck for now 09:46
I have a situation where I want to allow not just `func ...`, `macro ...`, `my ...`, but `export func ...`, `export macro ...`, `export my ...`
before that change, all those rules had an unambiguous declarative prefix, but when I made the change with <.ws>, the declarative prefix was `export` for call of them, which... didn't make the test suite happy 09:47
it all passes now, with \s+
before you suggest it, I could also do this by introducing a new <exportable_statement> proto rule, and do `export <exportable_statement>`. I might still go that way in the future 09:48
09:50 zakharyas joined 09:51 p6bannerbot sets mode: +v zakharyas 10:11 haukex left 10:15 cognominal-p6 left, haukex joined, p6bannerbot sets mode: +v haukex 10:22 donaldh joined 10:23 p6bannerbot sets mode: +v donaldh, cognominal-p6 joined 10:24 p6bannerbot sets mode: +v cognominal-p6
donaldh weekly: codegolf.stackexchange.com/a/174540/66624 10:25
notable6 donaldh, Noted!
masak I don't know if I've said this, but I love writing a small smattering of multis to define a structurally recursive algorithm
the syntax isn't as clean as Haskell's, but the feeling is much the same: very much a focus on the declarative, not the imperative 10:26
multis are the best
10:30 yoleaux joined, ChanServ sets mode: +v yoleaux, p6bannerbot sets mode: +v yoleaux 10:35 Kaiepi left, Kaiepi joined 10:36 p6bannerbot sets mode: +v Kaiepi 10:41 haukex left 10:42 cognominal-p6 left, cognominal-p6 joined, kurahaupo_ is now known as kurahaupo 10:43 p6bannerbot sets mode: +v cognominal-p6 10:47 Hor|zon joined 10:48 p6bannerbot sets mode: +v Hor|zon, haukex joined 10:49 p6bannerbot sets mode: +v haukex
moritz agreed, multis rock 10:53
10:56 jameslenz joined 10:57 p6bannerbot sets mode: +v jameslenz 11:04 Hor|zon left, Hor|zon joined 11:05 Kaiepi left, p6bannerbot sets mode: +v Hor|zon 11:06 scimon joined 11:07 p6bannerbot sets mode: +v scimon
scimon Afternoon all 11:07
11:08 Kaiepi joined 11:09 p6bannerbot sets mode: +v Kaiepi
moritz good localtime() scimon 11:13
scimon Point 11:27
11:32 lizmat left 11:35 lizmat joined, p6bannerbot sets mode: +v lizmat 11:41 haukex left 11:46 haukex joined, p6bannerbot sets mode: +v haukex
timotimo today is not points-free day? 11:57
12:01 haukex left
moritz pointcaree-free day :) 12:04
timotimo that's pure hyperbole 12:05
12:09 AlexDaniel joined, p6bannerbot sets mode: +v AlexDaniel
scimon Oh dear. Well apparently I need to get a hair cut. 12:09
12:09 scimon left
lizmat
.oO( marriage comes with compromises )
12:12
masak moritz: multis rock, paper, and scissors ;) 12:16
moritz masak: what about lizmats, erm, lizards? :) 12:17
masak we all have our lizards.
lizmat
.oO( the lizard queen from new orleans :-)
12:18
masak .oO( warning: local lizards may apply )
when I do `use Foo; BEGIN say $foo` from a Foo.pm with `our $foo is export = "OH HAI"`, it prints "OH HAI" 12:21
do module bodies run as part of precompilation?
12:22 cognominal-p6 left
moritz yes, I think so 12:24
masak 8-ball: "all signs point to yes"
also, a `say "OH HAI"` in the module runs before a `BEGIN say "main"` after the `use` 12:25
12:26 jmerelo joined 12:27 p6bannerbot sets mode: +v jmerelo
masak pmurias: then I'm back to not quite understanding what you meant by colabti.org/irclogger/irclogger_log...05-28#l232 12:31
it appears in Perl 6 "compile time" and "module load time" are *not* separate 12:32
I suspect in the end because it's Least Surprise to get runtime values from a module, not values from static lexpads 12:33
(yes, I'm thinking about macros being imported from modules, how can you tell?) 12:40
12:54 MasterDuke joined 12:55 p6bannerbot sets mode: +v MasterDuke 12:59 Zoffix joined, p6bannerbot sets mode: +v Zoffix, [Sno] joined
Zoffix What's the difference between "parametric" and "parametarized"? 12:59
13:00 p6bannerbot sets mode: +v [Sno]
jmerelo Zoffix: they are different things. You can parametrize something. I am not sure what parametric would mean in this context. You can do parametric design, for instance. 13:00
13:01 sno left
moritz only ever does paramedic design 13:05
13:07 MasterDuke_ joined, jmerelo left, p6bannerbot sets mode: +v MasterDuke_ 13:08 MasterDuke_ left 13:09 MasterDuke_ joined 13:10 p6bannerbot sets mode: +v MasterDuke_, MasterDuke_ left, MasterDuke left
masak Zoffix: far as I can gather, "parametric" means "having parameters" and "parameterized" means "having had parameters added". though I'm not 100% sure it's all that clear-cut. 13:13
Zoffix ok 13:16
Thanks.
13:21 zxcvz joined
moritz fwiw Rakudo contains 0 occurences of Paramterized and lots of Parametric 13:22
13:22 p6bannerbot sets mode: +v zxcvz
moritz ah, parameterized as lower case 13:22
Zoffix (FWIW, I was looking at MVMStable struct and its `paramet` union of `ric` and `erized` structs) 13:24
13:24 Kaiepi left 13:25 Kaiepi joined 13:26 p6bannerbot sets mode: +v Kaiepi
Zoffix masak: so is `Array[Int]` parametarized or parameteric? :) 13:28
masak: what differences are there between `Array[Int]` and `Positional[Int]`? 13:29
masak well, "generic types" are also known as "parametric polymorphism", so at least one of the terms is in use there 13:30
Zoffix: you might also check how the MOP in Rakudo names these things 13:31
I see GenericHOW, ConcreteRoleHOW, and CurriedRoleHOW in there 13:32
Zoffix There's both parametric, according to MoarVM
masak oh, and ParametricRoleHOW, as well as ParametricRoleGroupHOW 13:33
Zoffix surmises Positional is parametric; Positional[Int] is parametarized; i.e. it took a parametric type and created a concrete parameterization of it. 13:34
Don't fix my bug tho :}
13:42 abraxxa left 13:48 guifa joined, p6bannerbot sets mode: +v guifa
guifa I noticed that in some of the older design documents, there was talk of using "method conversion:<Class> () { … }" in a class to allow for implicit conversion to any type. But I can't seem to get that work or find anything to that effect. It's not *horrible* having to specify $foo.Bar when a method signature requires Bar, but is there any way in the current spec to do that conversion automagically for any class? 13:54
moritz yes, with Target() 13:55
m: sub f(Int() $x) { say $x * $x }; f "42"
camelia 1764
Zoffix And the stuff in brackets is your wider target (defaulting to `Any` if you don't specify anything 13:56
m: sub f(Int(Cool) $x) { say $x * $x }; f "42"
camelia 1764
Zoffix m: sub f(Int(Cool) $x) { say $x * $x }; f class {}
camelia Type check failed in binding to parameter '$x'; expected Cool but got <anon|1> (<anon|1>)
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
Zoffix Docs are here, seems like: docs.perl6.org/type/Signature#Coercion_type 13:57
guifa But if you have no control over the method signature, that won't work 13:59
moritz correct 14:00
14:01 Zoffix left 14:02 xtreak joined, p6bannerbot sets mode: +v xtreak
guifa Is there any disadvantage to using foo(Bar() $x) over foo(Bar $x)? Just a minor performance penalty if it's not passed an actual Bar? (just thinking ahead for future module design) 14:04
moritz in general, the error messages are simpler to understand if you use just Bar 14:05
14:05 sena_kun joined 14:06 p6bannerbot sets mode: +v sena_kun, zakharyas left, zakharyas joined 14:07 curan left, p6bannerbot sets mode: +v zakharyas 14:11 zakharyas left
moritz also, Bar is more specific, which matters if you use multis 14:11
14:18 Ven` joined 14:19 p6bannerbot sets mode: +v Ven` 14:23 Hor|zon left 14:40 xtreak left 14:56 pmurias joined, p6bannerbot sets mode: +v pmurias 14:58 Hor|zon joined 14:59 p6bannerbot sets mode: +v Hor|zon 15:00 fake_space_whale joined 15:01 p6bannerbot sets mode: +v fake_space_whale, haukex joined 15:02 p6bannerbot sets mode: +v haukex
SmokeMachine m: multi a(Str(Int) $a) { say "$a from Int" }; multi a(Str $a) { say "$a from Str" }; multi a(Str(Cool) $a) { say "$a from Cool" }; a 1; a "2"; a 3.14 15:03
camelia 1 from Int
Ambiguous call to 'a(Str)'; these signatures all match:
:(Int $a)
:(Str $a)
:(Cool $a)
in block <unit> at <tmp> line 1
SmokeMachine :(
it would be great if that were possible... 15:04
and I think the error msg is LTA... is it?
:(Int $a) doesn't match a(Str)... 15:06
moritz yes, it looks like the coercion type is missing from the signature 15:10
lizmat m: sub a(Int(Str)) { }; dd &a.signature # appears to be missing, period 15:13
camelia :(Str $)
15:17 cognominal-p6 joined 15:18 p6bannerbot sets mode: +v cognominal-p6
SmokeMachine R#2416 and R#2417 15:18
synopsebot R#2416 [open]: github.com/rakudo/rakudo/issues/2416 Signatures does not shows Coercion types when gisted.
R#2417 [open]: github.com/rakudo/rakudo/issues/2417 Multies do not use Coercion types constraints to decide what candidate to call
15:19 samebchase left 15:20 samebchase joined, p6bannerbot sets mode: +v samebchase 15:22 Kaiepi left, scimon joined 15:23 p6bannerbot sets mode: +v scimon 15:25 Kaiepi joined 15:26 donaldh left, p6bannerbot sets mode: +v Kaiepi 15:27 domidumont left
SmokeMachine m: say :(Str(Int)).params.head.type # I think the problem is here... 15:35
15:35 molaf joined
camelia (Int) 15:35
15:36 p6bannerbot sets mode: +v molaf
SmokeMachine m: sub a(Str(Int) $a) { say $a.^name }; a 42 15:39
camelia Str
15:39 robertle left
SmokeMachine lizmat: Sorry, but isn't it accepting a Int that will be converted to Str? 15:39
m: sub a(Str(Int) $a) { say $a.^name }; a "42" 15:40
camelia Type check failed in binding to parameter '$a'; expected Int but got Str ("42")
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
SmokeMachine and it doesn't accept Str...
15:41 cognominal-p6 left 15:43 troys joined 15:44 p6bannerbot sets mode: +v troys
lizmat SmokeMachine: the part that is between parentheses, is what it should accept 15:46
Int() means, accept Any, coerce to Int 15:47
Int(Str) means, accept Str, coerce to Int
SmokeMachine lizmat: yes... so `multi a(Str(Int) $a) { say "$a from Int" }; multi a(Str $a) { say "$a from Str" }; multi a(Str(Cool) $a) { say "$a from Cool" };` shouldn't conflict...
15:47 kensanata left
lizmat feels to me that it shouldn't 15:48
SmokeMachine the candidates should accept a Int, a Str and a Cool respectively,,,
sorry, I can't get it... what am I not seeing?
oh, sorry, are you agreeing? 15:49
lizmat yeah, and it does apparently conflict
15:50 jmerelo joined
scimon That is weird. 15:50
lizmat m: multi a(Str(Int) $a) { say "$a from Int" }; multi a(Str $a) { say "$a from Str" }; a "42" # should work, afaics
camelia Ambiguous call to 'a(Str)'; these signatures all match:
:(Int $a)
:(Str $a)
in block <unit> at <tmp> line 1
15:51 p6bannerbot sets mode: +v jmerelo
lizmat unless I'm misunderstanding multi-dispatch 15:51
jnthn might know where we are going wrong
scimon (Side note Str(Str) doesn't work either (I do like the try weird things) )
SmokeMachine lizmat: sorry... but... so what did you disagree on R#2417?
synopsebot R#2417 [open]: github.com/rakudo/rakudo/issues/2417 Multies do not use Coercion types constraints to decide what candidate to call
scimon I would have expected it to work. 15:52
16:03 fake_space_whale left 16:10 scimon left 16:11 guifa left 16:12 pmurias left 16:13 pmurias joined, p6bannerbot sets mode: +v pmurias 16:14 pmurias left 16:19 pmurias joined, p6bannerbot sets mode: +v pmurias 16:22 Ven` left 16:28 dakkar left 16:33 Ven` joined 16:34 p6bannerbot sets mode: +v Ven`, Zoffix joined, p6bannerbot sets mode: +v Zoffix
El_Che releasable6: status 16:36
releasable6 El_Che, Next release will happen when it's ready. 1 blocker. 489 out of 492 commits logged
El_Che, Details: gist.github.com/4f515d281cc4310f38...122b3727dc
Zoffix I vaguely recall there being some issue or by-design that the "from" of the coercer must be wider than the "to" and basically the "to" must typecheck to a "from" 16:37
So Int(Cool) is fine, but Int(Str) ain't, because Int ain't a Str 16:38
m: -> Int(Str) $x { dd $x }(42)
camelia Type check failed in binding to parameter '$x'; expected Str but got Int (42)
in block <unit> at <tmp> line 1
16:38 Ven` left
Zoffix Or maybe that behaviour can be just understood from what lizmat said that parens type is just what's accepted 16:43
El_Che Will this release be postpone to 6.d? 16:44
Zoffix El_Che: no
El_Che ok 16:45
16:45 pmurias left 16:47 pmurias joined, p6bannerbot sets mode: +v pmurias
El_Che thx for the info 16:49
16:52 Zoffix left 16:54 cognominal-p6 joined 16:55 p6bannerbot sets mode: +v cognominal-p6
AlexDaniel heh, postpone.d 17:00
17:01 noganex_ left
AlexDaniel El_Che: yeah, I'm optimistic about it. Only one blocker left, though I might be able to dig more :) 17:01
17:01 noganex joined
jmerelo AlexDaniel: good luck 17:01
17:02 p6bannerbot sets mode: +v noganex 17:07 cognominal-p6 left, cognominal-p6 joined 17:08 p6bannerbot sets mode: +v cognominal-p6 17:09 molaf left 17:14 noganex_ joined 17:15 p6bannerbot sets mode: +v noganex_ 17:16 noganex_ left 17:17 noganex_ joined, noganex left, robertle joined, p6bannerbot sets mode: +v noganex_ 17:18 p6bannerbot sets mode: +v robertle 17:21 lizmat left 17:22 haukex left 17:25 zakharyas joined 17:26 p6bannerbot sets mode: +v zakharyas
buggable New CPAN upload: Math-Vector3D-0.0.1.tar.gz by JEFFOBER cpan.metacpan.org/authors/id/J/JE/...0.1.tar.gz 17:31
17:37 cognominal-p6 left 17:52 domidumont joined, pmurias left, jast left 17:53 p6bannerbot sets mode: +v domidumont 17:54 jast joined 17:55 p6bannerbot sets mode: +v jast 17:57 pmurias joined, p6bannerbot sets mode: +v pmurias 17:58 molaf joined, p6bannerbot sets mode: +v molaf 18:07 zakharyas left
SmokeMachine is there a way to make the code runner by a EVAL do not access any outside itself but some stuff I permit? 18:10
I mean something like this: github.com/substack/static-eval 18:12
timotimo you can pass it the lexical environment it's supposed to be able to access 18:15
SmokeMachine timotimo: how? 18:16
timotimo looks like the docs don't say 18:17
s: &EVAL, \("hello")
SourceBaby timotimo, Ehhh... I'm too scared to run that code.
timotimo s: "EVAL", \("hello")
SourceBaby timotimo, Ehhh... I'm too scared to run that code.
timotimo s: 'EVAL', \("hello")
SourceBaby timotimo, Ehhh... I'm too scared to run that code.
timotimo s: '&EVAL', \("hello")
SourceBaby timotimo, Ehhh... I'm too scared to run that code.
timotimo github.com/rakudo/rakudo/blob/31b1...de.pm6#L28 18:18
look at the :$context named argument
SmokeMachine hum!!!
thanks! 18:19
timotimo YW :)
pmurias SmokeMachine: it won't be safe the way static-eval is 18:20
SmokeMachine pmurias: you are right... :( 18:21
m: my $a = 42; q"$a = 13".EVAL: :context(PseudoStash.new); say $a
camelia 13
SmokeMachine so... no way to do that? 18:22
18:23 Kaiepi left, Kaiepi joined 18:24 p6bannerbot sets mode: +v Kaiepi
Geth Blin: cd9e6ac312 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files
Turn off zef auto-update

Resolves #2.
18:25
doc: f3b3fdd10f | (JJ Merelo)++ | doc/Language/regexes.pod6
Adds clarification for non-collating two-letter adverbs

Which closes #2406. Also some reflow and rephrasing.
18:28
synopsebot Link: doc.perl6.org/language/regexes
18:28 jmerelo left 18:29 noganex joined 18:30 p6bannerbot sets mode: +v noganex
SmokeMachine m: my $a = 42; sub a { my $a = 13; q"say $a".EVAL: :context(OUTER::) }; a 18:33
camelia 42
18:33 noganex_ left 18:35 Zoffix joined, p6bannerbot sets mode: +v Zoffix 18:36 molaf left
Zoffix timotimo: SmokeMachine `:context` is not a public interface of EVAL and any code using it will break once optimizer gets better: colabti.org/irclogger/irclogger_log...06-16#l164 18:36
Also RT#128419
synopsebot RT#128419 [new]: rt.perl.org/Ticket/Display.html?id=128419 [BUG] throws-like uses :context CALLER:: that will break soon 18:37
timotimo oh!
SmokeMachine Zoffix: is there another way to do what I'm trying to do?
Zoffix SmokeMachine: no idea 18:38
SmokeMachine I think that would be very useful... 18:39
18:39 domidumont left
geekosaur wonders how many people actually use p5's Safe 18:39
pmurias masak: BEGIN {} in a module runs in the modules compile time 18:40
SmokeMachine I was trying to port this github.com/olxbr/json-path-t to perl6... but without static eval, that's dangerous...
pmurias masak: a say outside of a BEGIN runs at module load time 18:41
timotimo what kind of features does it have that would be unsafe?
pmurias SmokeMachine: :context to EVAL will not let you do what you want 18:42
SmokeMachine timotimo: this kind of stuff: github.com/olxbr/json-path-t/blob/...ics.js#L73 18:43
pmurias: but is there any other thing that will let me to do that?
timotimo interesting, indeed. 18:44
SmokeMachine timotimo: what's interesting? 18:47
pmurias SmokeMachine: so what you want is to translate a JSONPath expression to p6 and then safely evaluate the resulting p6? 18:48
timotimo the features it offers
SmokeMachine timotimo: json-path-t? 18:49
pmurias: no...
18:49 Zoffix left
SmokeMachine json-path-t accepts code after the `=>`... 18:49
timotimo ah, so literally any perl6 code, huh
SmokeMachine pmurias: the code after `=>` is what Id like to "static eval" 18:50
like I do here github.com/olxbr/json-path-t/blob/...dex.js#L33 18:51
pmurias with Perl6 being used instead of JS right? 18:53
SmokeMachine pmurias: yes... 18:54
pmurias SmokeMachine: I don't see a way to that easily without writing your own static-eval
SmokeMachine :( 18:55
pmurias: I had started to code that some time ago: github.com/FCO/json-path-transform 18:56
19:06 haukex joined 19:07 p6bannerbot sets mode: +v haukex 19:11 HaraldJoerg1 left 19:12 Ven` joined, p6bannerbot sets mode: +v Ven` 19:16 Ven` left 19:17 lichtkind joined
pmurias if I attempt to use a module that's missing in the list of places where it was searched I get /home/pmurias/.perl6 19:17
19:17 p6bannerbot sets mode: +v lichtkind
pmurias if I actually put it there it doesn't get loaded 19:17
unless I add a -I/home/pmurias/.perl6 19:18
is that how it should be?
geekosaur I thnk it's referring to repos in those locations for precompiled modules; zef installs under there, for example 19:20
this could stand to be clarified perhaps
19:22 lichtkind left 19:34 haukex left, Zoffix joined, p6bannerbot sets mode: +v Zoffix 19:38 sena_kun left 19:46 lichtkind joined 19:47 leont joined, p6bannerbot sets mode: +v lichtkind, p6bannerbot sets mode: +v leont, AlexDaniel left 19:48 AlexDaniel joined, p6bannerbot sets mode: +v AlexDaniel 20:02 zxcvz left, shareable6 left, shareable6 joined 20:03 p6bannerbot sets mode: +v shareable6, Kaiepi left 20:05 Kaiepi joined 20:06 p6bannerbot sets mode: +v Kaiepi 20:22 Sent joined, p6bannerbot sets mode: +v Sent 20:23 Sent left 20:33 cognominal-p6 joined 20:34 p6bannerbot sets mode: +v cognominal-p6
buggable New CPAN upload: Sparrowdo-VSTS-YAML-Angular-Build-0.0.6.tar.gz by MELEZHIK modules.perl6.org/dist/Sparrowdo::V...n:MELEZHIK 20:41
20:42 cognominal-p6 left, cognominal-p6 joined 20:43 p6bannerbot sets mode: +v cognominal-p6 20:47 kensanata joined, p6bannerbot sets mode: +v kensanata 20:48 robertle left 20:49 patpoker joined, p6bannerbot sets mode: +v patpoker 20:52 ZofBot left
Geth Blin: 977ca80686 | (Aleks-Daniel Jakimenko-Aleksejev)++ | lib/Blin/Processing.pm6
Don't bother with skipped revisions

Previously it'd go through the whole trouble of fetching a build, unpacking it, and eventually failing (before it even reached that code). Just avoid all that by `return`-ing earlier.
20:53
20:57 shareable6 left, reportable6 left, committable6 left, releasable6 left, bisectable6 left, committable6 joined, ChanServ sets mode: +v committable6, reportable6 joined, ChanServ sets mode: +v reportable6, shareable6 joined, ChanServ sets mode: +v shareable6, releasable6 joined, ChanServ sets mode: +v releasable6, greppable6 left, bisectable6 joined, ChanServ sets mode: +v bisectable6, notable6 left, greppable6 joined, ChanServ sets mode: +v greppable6, notable6 joined 20:58 p6bannerbot sets mode: +v committable6, p6bannerbot sets mode: +v reportable6, p6bannerbot sets mode: +v shareable6, p6bannerbot sets mode: +v releasable6, cognominal-p6 left, p6bannerbot sets mode: +v bisectable6, p6bannerbot sets mode: +v greppable6, p6bannerbot sets mode: +v notable6 21:00 patpoker left 21:02 cognominal-p6 joined 21:03 p6bannerbot sets mode: +v cognominal-p6 21:04 molaf joined 21:05 p6bannerbot sets mode: +v molaf 21:07 cognominal-p6 left, holyghost left, holyghost joined, cognominal-p6 joined 21:08 p6bannerbot sets mode: +v holyghost, p6bannerbot sets mode: +v cognominal-p6 21:12 morreo joined, p6bannerbot sets mode: +v morreo 21:16 pmurias left 21:17 agentzh left
morreo p6: say 3; 21:18
camelia 3
21:23 ryn1x joined 21:24 p6bannerbot sets mode: +v ryn1x 21:25 agentzh joined, p6bannerbot sets mode: +v agentzh 21:26 jbotz left
Geth doc: d45b317971 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/mop.pod6
simplify
21:36
synopsebot Link: doc.perl6.org/language/mop
21:41 kensanata left, pecastro left 21:42 ryn1x left
SmokeMachine m: use nqp; my $a = 42; my $compiler := nqp::getcomp("perl6").compile(q[$a = 13]).(); say $a # :) 21:46
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$a' is not declared
at <tmp>:1
------> 3<BOL>7⏏5$a = 13
SmokeMachine m: use nqp; my $a = 42; my $compiler := nqp::getcomp("perl6").compile(q[say 1 + 2]).(); say $a # :)
camelia 3
42
21:50 ryn1x joined 21:51 p6bannerbot sets mode: +v ryn1x
SmokeMachine m: use nqp; my $a = 42; my $compiler := nqp::getcomp("perl6").compile(q[say "/etc/passwd".IO.slurp]).() # :( 21:58
camelia bin:x:1:1:bin:/bin:/bin/bash
daemon:x:2:2:Daemon:/sbin:/bin/bash
ftp:x:40:49:FTP account:/srv/ftp:/bin/bash
games:x:12:100:Games account:/var/games:/bin/bash
lp:x:4:7:Printing daemon:/var/spool/lpd:/bin/bash
mail:x:8:12:Mailer daemon:/var/sp…
SmokeMachine i think Ill have to not accept perl6 code, but a DSL... :( 21:59
22:06 Ven` joined 22:07 p6bannerbot sets mode: +v Ven` 22:10 Ven` left 22:28 ryn1x left 22:30 SobiX joined, p6bannerbot sets mode: +v SobiX 22:39 sno joined, [Sno] left, p6bannerbot sets mode: +v sno 22:41 dct joined, p6bannerbot sets mode: +v dct
Kaiepi say you have a nativecall function that returns a string with a bunch of null terminators at the end 22:44
when you use it in perl6 do the null terminators get stripped out?
22:46 Ven` joined, p6bannerbot sets mode: +v Ven` 22:48 fake_space_whale joined 22:49 p6bannerbot sets mode: +v fake_space_whale 22:51 Ven` left 22:52 cognominal-p6 left
holyghost Kaiepi: it makes no sense to use null terminators for e.g. $string.length 23:13
23:15 rindolf left
timotimo Kaiepi: they stay in the string 23:16
of course if you nativecall stuff that assumes \0 to be the end of a string, it'll stop at the first \0
holyghost that's why I said terminators, not terminator 23:17
timotimo oh 23:27
i totally didn't read the question completely
i would have to test, but i do believe strings will be read up to the first \0 on the return path, but you can also return a CArray[uint8] and manually read the right number of bytes and decode them to a string 23:28
m: Buf.new(97, 97, 0, 0, 0, 97, 97).decode.perl.say 23:29
camelia "aa\0\0\0aa"
23:29 SobiX left
holyghost m: my $str = Buf.new(97, 97, 0, 0, 0, 97, 97,0,0,0).decode.perl; say $str; 23:33
camelia "aa\0\0\0aa\0\0\0"
holyghost m: my $str = String.new(97, 97, 0, 0, 0, 97, 97,0,0,0); say $str; 23:34
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
String used at line 1. Did you mean 'Stringy'?
holyghost m: my $str = String.new('\97', '\97', '\0', '\0', '\0', '\97', '\97','\0','\0','\0'); say $str; 23:37
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
String used at line 1. Did you mean 'Stringy'?
23:37 dct left
geekosaur it's Str 23:37
holyghost m: my $str = Str.new('\97', '\97', '\0', '\0', '\0', '\97', '\97','\0','\0','\0'); say $str;
camelia Default constructor for 'Str' only takes named arguments
in block <unit> at <tmp> line 1
timotimo you can't construct a string like that
holyghost I see 23:38
geekosaur and yeh, all the core types have special constructors
holyghost So I should add '\0' etc with concat or .
23:39 jbotz joined
holyghost m: my $str = Str.new('97', '97', '0', '0', '0', '97', '97','0','0','0'); say $str; 23:39
camelia Default constructor for 'Str' only takes named arguments
in block <unit> at <tmp> line 1
23:40 p6bannerbot sets mode: +v jbotz
SmokeMachine m: say "bla\0ble" 23:40
camelia bla␀ble
23:40 jbotz left 23:41 jbotz joined
holyghost m: my $str = "123\0\0\0"; print $str; 23:41
camelia 123␀␀␀
holyghost truncation method needed
23:41 p6bannerbot sets mode: +v jbotz 23:42 morreo left
holyghost m: my $str = "123\0\0\0"; print $str.strdup(); 23:44
camelia No such method 'strdup' for invocant of type 'Str'
in block <unit> at <tmp> line 1
23:46 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke 23:47 MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke 23:48 jameslenz left
Kaiepi damn 23:50
timotimo Kaiepi: what's your exact issue? maybe we can help? 23:51
Kaiepi i'm writing a library for cast5 encryption and the way it encrypts/decrypts strings, it can only take strings with length divisible by 8 23:54
so atm if it's not divisible by 8, i pad it with null terminators
but i don't want them to stay in the string afterwards
holyghost Kaiepi: maybe use a sum instead of a string 23:55
0xff = 1*16+16 then divide by 2 or something 23:56
I'm sorry 16+15
Kaiepi a sum?
holyghost sum up your ascii chars 23:57
then modulate with 16
or shift to get a character
use that as a number to en/decrypt 23:58
else you can use little endian strings or auto-strip 23:59
Kaiepi atm my code looks like this hastebin.com/ideheyaquf.rb