»ö« 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:00
p6bannerbot sets mode: +v aborazmeh,
stux|wor- joined,
stux|wor- left,
lizmat joined,
p6bannerbot sets mode: +v lizmat
00:05
lizmat left
00:09
|aaron24 joined,
|aaron24 left
00:19
lichtkind left
00:21
vrurg joined
00:22
p6bannerbot sets mode: +v vrurg
00:24
Herby_ left
00:31
powerdan25 joined,
powerdan25 left
00:40
aborazmeh left
00:49
leont left
01:08
kurahaupo left
01:09
kurahaupo joined
01:10
p6bannerbot sets mode: +v kurahaupo
01:23
biberao13 joined,
biberao13 left
01:50
goiken2 joined
01:51
goiken2 left
01:58
w_richard_w joined,
p6bannerbot sets mode: +v w_richard_w
02:04
Wobni joined,
p6bannerbot sets mode: +v Wobni
02:09
epony left,
w_richard_w left
02:11
Wobni left
02:26
natorious20 joined,
natorious20 left
02:39
kazlock joined,
kazlock left
02:41
beeman joined,
p6bannerbot sets mode: +v beeman
02:48
w_richard_w joined,
p6bannerbot sets mode: +v w_richard_w
|
|||
ccc | m: role Foo {has &op(::?CLASS:D, ::?CLASS:D --> ::?CLASS:D);} | 02:53 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> The () shape syntax in routine declarations is reserved (maybe use :() to declare a longname?) at <tmp>:1 ------> 3op(::?CLASS:D, ::?CLASS:D --> ::?CLASS:D7⏏5);} |
||
ccc | m: role Foo {has &op:(::?CLASS:D, ::?CLASS:D --> ::?CLASS:D);} | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> You can't adverb has &op at <tmp>:1 ------> 3:(::?CLASS:D, ::?CLASS:D --> ::?CLASS:D)7⏏5;} |
||
ccc | so what's the syntax to constrain a callable attribute to have a particular signature? | ||
m: role Foo {has &.op:(::?CLASS:D, ::?CLASS:D --> ::?CLASS:D);} | 02:57 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> You can't adverb has &.op at <tmp>:1 ------> 3:(::?CLASS:D, ::?CLASS:D --> ::?CLASS:D)7⏏5;} |
||
ccc | m: role Foo {has &.op(::?CLASS:D, ::?CLASS:D --> ::?CLASS:D);} | 02:58 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> You can't adverb ::?CLASS at <tmp>:1 ------> 3role Foo {has &.op(::?CLASS:D7⏏5, ::?CLASS:D --> ::?CLASS:D);} expecting any of: pair value |
||
ccc | m: role Foo {has :(::?CLASS:D, ::?CLASS:D --> ::?CLASS:D) &.op} | 03:00 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed has at <tmp>:1 ------> 3role Foo {has7⏏5 :(::?CLASS:D, ::?CLASS:D --> ::?CLASS:D |
||
ccc | m: my &op:(Int, Int --> Int) | 03:01 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> You can't adverb &op at <tmp>:1 ------> 3my &op:(Int, Int --> Int)7⏏5<EOL> |
||
ccc | m: my &op(Int, Int --> Int) | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> The () shape syntax in routine declarations is reserved (maybe use :() to declare a longname?) at <tmp>:1 ------> 3my &op(Int, Int --> Int7⏏5) |
||
03:03
jrewing joined,
p6bannerbot sets mode: +v jrewing
|
|||
ccc | m: my &op(Int, Int --> Int) | 03:04 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> The () shape syntax in routine declarations is reserved (maybe use :() to declare a longname?) at <tmp>:1 ------> 3my &op(Int, Int --> Int7⏏5) |
||
ccc | m: my &op:(Int, Int --> Int) | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> You can't adverb &op at <tmp>:1 ------> 3my &op:(Int, Int --> Int)7⏏5<EOL> |
||
ccc | What's the syntax to constraint the signature of a Callable variable or class attribute? | 03:05 | |
03:09
jrewing left
03:10
w_richard_w left
03:11
ExEs47 joined,
ExEs47 left
03:13
ccc left
03:15
kurahaupo left
03:16
kurahaupo joined
03:17
p6bannerbot sets mode: +v kurahaupo
03:31
huff3r25 joined
03:33
huff3r25 left
03:37
Zoffix joined,
p6bannerbot sets mode: +v Zoffix
|
|||
Zoffix | .tell ccc list binding with Capture on RHS. m: my (&op:(Int, Int --> Int)) := \(sub (Int, Int --> Int) {}) It's possible there's a simpler way, but I'm hitting a weird potential bug on. | 03:38 | |
yoleaux | Zoffix: I'll pass your message to ccc. | ||
03:38
Zoffix left
03:45
rindolf joined
03:46
p6bannerbot sets mode: +v rindolf
|
|||
Geth | doc: 74cf14d539 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Blob.pod6 Align Blob.gist with latest propspec POV: github.com/rakudo/rakudo/commit/cc2fcc9af2 Propspec: github.com/perl6/roast/commit/cef3...2c358fe405 |
03:49 | |
synopsebot | Link: doc.perl6.org/type/Blob | ||
Xliff_ | \o | 04:00 | |
Is there any way to log the parsing process when running perl6? | |||
04:13
Herby joined
04:14
p6bannerbot sets mode: +v Herby
04:21
araraloren_ joined
04:22
p6bannerbot sets mode: +v araraloren_
04:51
epony joined,
p6bannerbot sets mode: +v epony
04:55
Herby left
05:16
avar left,
avar joined,
avar left,
avar joined,
p6bannerbot sets mode: +v avar
05:17
p6bannerbot sets mode: +v avar
05:27
fake_space_whale left
05:48
avar left,
avar joined,
avar left,
avar joined,
p6bannerbot sets mode: +v avar
05:49
p6bannerbot sets mode: +v avar
05:59
saymonz joined
06:00
p6bannerbot sets mode: +v saymonz
06:06
saymonz left
|
|||
Xliff_ | \o/ | 06:09 | |
I can get widget info out of GtkBuilder! :D | |||
06:40
jmerelo joined
06:41
p6bannerbot sets mode: +v jmerelo
06:47
kensanata joined,
p6bannerbot sets mode: +v kensanata
06:54
miruoy0 joined,
miruoy0 left
|
|||
kensanata | Is there a more idiomatic way of writing [ map { id => $_ }, @pages ] if I need [{id=>a}, {id=>b}, ...]? AlexDaniel at one point suggested X=> but I can't get that to work. | 07:12 | |
07:24
g3ntoo17 joined,
g3ntoo17 left
|
|||
timotimo | 07:25 | ||
m: my @pages = <a b c d e>; say "id" X=> @pages | |||
camelia | (id => a id => b id => c id => d id => e) | ||
timotimo | try this, please | 07:26 | |
kensanata | timotimo: Thanks. When I try it in my code, it seems that I only get id => e, the last element. Actual code right now: %context<pages> = "id" X=> @pages; -- I guess the assignment changes something? | 07:30 | |
timotimo | ah | 07:31 | |
kensanata | Or maybe I'm just getting the first one? Let me check. | ||
timotimo | yes, you'll want to put the RHS in parenthesis | ||
07:32
quester left
|
|||
kensanata | Hm, that appears to make no difference. | 07:32 | |
timotimo | let's see | ||
m: my %context; my @pages = <a b c d e>; %context<pages> = ("id" X=> @pages); say %context.perl | 07:33 | ||
camelia | {:pages($((:id("a"), :id("b"), :id("c"), :id("d"), :id("e")).Seq))} | ||
timotimo | ah, you wanted an array of them, too | ||
especially since a .Seq will only let you iterate across it once | |||
m: my %context; my @pages = <a b c d e>; %context<pages> = ["id" X=> @pages]; say %context.perl | |||
camelia | {:pages($[:id("a"), :id("b"), :id("c"), :id("d"), :id("e")])} | ||
timotimo | m: my %context; my @pages = <a b c d e>; %context<pages> = ["id" X=> @pages]<>; say %context.perl | ||
camelia | {:pages($[:id("a"), :id("b"), :id("c"), :id("d"), :id("e")])} | ||
timotimo | not sure if you can get rid of the scalar container around it | ||
kensanata | I'm not sure whether I actually need an array. The %context stuff is going to get used for Template::Mustache. | 07:36 | |
timotimo | you'll surely want to at least .cache the Seq | 07:37 | |
07:37
sena_kun joined
07:38
p6bannerbot sets mode: +v sena_kun
|
|||
kensanata | I don't know about the internals of Template::Mustache. But if you're saying that the result would be brittle, then I do want an array. I don't know much about the differences between lists, arrays, and sequences. Normally it just works. :) | 07:39 | |
timotimo | you can think of a sequence like an iterator, except the sequence actually contains an iterator inside of it | ||
that means at least that after you've gone through the sequence once it'll not work any mor | 07:40 | ||
kensanata | I see. | 07:41 | |
jmerelo | kensanata: and Arrays are immutable, while lists are not. | ||
timotimo | you got it reversed, jmerelo | ||
jmerelo | timotimo: I was afraid so. | 07:42 | |
timotimo: I always do. Thanks for pointing it out. | |||
kensanata | Well, I come at this from Emacs Lisp and Java, and there arrays and lists are very different. In Perl I often get the feeling that they are interchangeable until they're not. And I never know when it's going to hit me. | 07:43 | |
I still can't reproduce my problem in a small file. Perhaps that would help me avoid the same problem in the future. | |||
m: my @pages = <a b c d e>; my %h; %h<x> = ("id" X=> @pages); say %h<x>; say %h<x>; | 07:44 | ||
camelia | (id => a id => b id => c id => d id => e) (id => a id => b id => c id => d id => e) |
||
kensanata | So this looks good and yet it doesn't work in my real code. What do I need to change to reproduce the problem? | ||
timotimo | you're still getting only one result? | 07:45 | |
kensanata | No, %context<pages> = ["id" X=> @pages] works. | 07:46 | |
I'm just trying to improve my understanding, now. :) | |||
araraloren_ | o| | 07:47 | |
timotimo | o_ | ||
Geth | doc/master: 5 commits pushed by (JJ Merelo)++ | 07:48 | |
jmerelo | kensanata: maybe you can post a gist, or simply point out to the repo. If it works differently with big files, it might be a bug. | 07:49 | |
buggable | New CPAN upload: Getopt-Advance-1.1.0.tar.gz by ALOREN modules.perl6.org/dist/Getopt::Adva...pan:ALOREN | 07:57 | |
08:08
domidumont joined
08:09
p6bannerbot sets mode: +v domidumont
|
|||
Xliff_ | \o/ | 08:11 | |
:D | |||
=D | |||
\o\ /o/ \o\ /o/ | |||
Self contained glade and Perl6 code! | 08:12 | ||
github.com/Xliff/p6-GtkPlus/blob/m...-builder.t | |||
timotimo | ooh not bad | 08:13 | |
tadzik | wow! | 08:15 | |
08:18
dogbert2 joined
|
|||
Xliff_ | timotimo: Yeah. I plan on making your Cairo package a dependency. Just need to get to the point where I can start working on GDK | 08:18 | |
08:18
marmor joined,
p6bannerbot sets mode: +v dogbert2
|
|||
timotimo | i see you have a script that generates code | 08:19 | |
maybe it'd be cool to have that in cairo, too | |||
Xliff_ | Also self contained styles: github.com/Xliff/p6-GtkPlus/blob/m...widget.css | ||
timotimo | if it even applies? | ||
08:19
p6bannerbot sets mode: +v marmor
|
|||
Xliff_ | :> | 08:19 | |
Yes. It's just a skeleton generator. Get's me close without having to go through the drudgery. | 08:20 | ||
timotimo | oh, OK | ||
08:21
dogbert2_ left
|
|||
Xliff_ | Still need to find a way to insure control codes aren't applied when I extract data from $=pod | 08:22 | |
But it works. | |||
jmerelo | Xliff_: cool! Great job! | ||
timotimo | there's Pod::To::Text, maybe it could be made to have a really-only-text output mode | 08:23 | |
until then, Pod::Walker maybe? | |||
Xliff_ | I'll look into it when I run into a burning bridge. | ||
jmerelo | timotimo: that's sorely missing. Most Pod navigation is made pretty ad-hoc | ||
Xliff_ | I've gone through so many rounds of refactoring it's not funny. | ||
timotimo | :S | 08:24 | |
Xliff_ | timotimo: You mean Pod::TreeWalker? | ||
timotimo | that must be the one | ||
Xliff_ | github.com/houseabsolute/perl6-Pod-TreeWalker | ||
jmerelo | timotimo, Xliff_ : I didn't know that one... | 08:25 | |
08:25
graphene left
|
|||
jmerelo | Thanks | 08:25 | |
08:26
graphene joined
08:27
p6bannerbot sets mode: +v graphene
|
|||
Xliff_ | timotimo: Yeah, that looks like it will help. Kinda like dropping a kiloton bomb to kill a roach, though. | 08:27 | |
timotimo | *shrug* :) | ||
Xliff_ | :) :s | 08:28 | |
timotimo | you're using perl6 already :D | ||
Xliff_ | LOL | ||
Good point. | |||
It's suddenly disturbing to relize the yield isn't as important as the ease with which you can put things together. :P | |||
The tricky part is figuring out how to replace the actual text. | 08:31 | ||
Think something like this: | |||
"<property name="Label">OK</property>" | 08:32 | ||
So it's going to be more than just grabbing the text contents. For now. I guess I can always run a regex to lower case any characters that appear before a '<' | 08:33 | ||
timotimo | maybe you can use the verbatim tag around the whole thing, but ... meh | 08:34 | |
Xliff_ | Was thinking that, but ... I agree. meh | ||
Implementing a verbatim pod block might be easier. | 08:35 | ||
timotimo | or using a heredoc instead of pod | ||
Xliff_ shudders. | |||
timotimo | if you put the heredoc into a sub, you can use it before you define it | ||
Xliff_ | Ooh! Good point. | ||
I think I will make it so you can specify alternative methods for both. | 08:36 | ||
Oh! YUP! | 08:37 | ||
I already wrote that mechanism. :D | |||
timotimo | :D | ||
Xliff_ | my $a = GTK::Application.new( :ui($ui), :style($style) ); | 08:38 | |
08:42
zxcvz left
08:46
kensanata left
09:14
andrzejku joined
09:15
p6bannerbot sets mode: +v andrzejku
|
|||
Xliff_ | LOL! Added a statusbar, but can't do it through glade. Changes should be available at the same link. | 09:20 | |
timotimo | or you could interpret the control codes and turn them back into what their text would have been %) | 09:25 | |
er, i was scrolled up still | |||
Xliff_ | timotimo: LOL! I think I'm cool with using pod unless there's a conflict. | 09:27 | |
:) | |||
And now I've also checked that you can add to a glade generated UI, after the fact! :D | 09:28 | ||
timotimo | have you considered using .WHY to store glade data? :P | ||
Xliff_ | ?!? | ||
How would I do that? | |||
timotimo | well, putting the stuff into a declarator comment | ||
m: say "gimme a newline" | |||
camelia | gimme a newline | ||
Xliff_ | Ooh! That's an idea. | ||
Will look into that as an idea for Dialog code. | |||
timotimo | m: #| testsub do-it() { gimme-my-text }; sub gimme-my-text { say callframe(1).routine.WHY }; do-it | 09:29 | |
camelia | No such method 'routine' for invocant of type 'CallFrame' in sub gimme-my-text at <tmp> line 2 in sub do-it at <tmp> line 2 in block <unit> at <tmp> line 2 |
||
timotimo | m: #| testsub do-it() { gimme-my-text }; sub gimme-my-text { say callframe(1).code.WHY }; do-it | ||
camelia | test | ||
Xliff_ | LOL | ||
Can it do post and pre? | 09:30 | ||
timotimo | i do believe post and pre will just be combined for you by rakudo | ||
Xliff_ | m: #! test\n | 09:31 | |
camelia | ( no output ) | ||
Xliff_ | Hrm. I forget how to insert newlines in IRC> | 09:32 | |
m: #| test; sub whee { say "Whee!" }; #= tester | 09:33 | ||
camelia | ( no output ) | ||
Xliff_ | m: #| test; sub whee { say "Whee!" }; #= tester; say &whee.WHY.leading; | ||
camelia | ( no output ) | ||
Xliff_ | m: #| test; sub whee { say "Whee!" }; #= tester; whee; | ||
camelia | ( no output ) | ||
timotimo | forgot a ne wline | 09:34 | |
Xliff_ | Yeah. I don't know if this client can do it. | ||
timotimo | hold on | ||
m: #| test;  sub whee { say "Whee!" }; #= tester;  whee; | |||
camelia | Whee! | ||
timotimo | m: #| test;  sub whee { say "Whee!" }; #= tester;  say &whee.WHY.leading; | ||
camelia | test; | ||
timotimo | m: #| test;  sub whee { say "Whee!" }; #= tester;  say &whee.WHY.trailing; | ||
camelia | tester; | ||
Xliff_ | Yeah. That's what I was looking for. | 09:35 | |
That might be useful! :) | |||
timotimo | cool | ||
Xliff_ | Hope that works for class definitions, too. | ||
timotimo | ought to | ||
09:37
zxcvz joined,
p6bannerbot sets mode: +v zxcvz
09:39
graphene left
09:40
graphene joined
09:41
p6bannerbot sets mode: +v graphene
09:50
SkyHawk joined
09:55
SkyHawk left
|
|||
Geth | doc: jonbeebe++ created pull request #2343: Fixed links to :r, :w, and :x |
10:01 | |
10:02
epony left
|
|||
Geth | doc: ef1d282327 | (Jonathan Beebe)++ (committed using GitHub Web editor) | doc/Type/IO.pod6 Fixed links to :r, :w, and :x |
10:05 | |
doc: ac22b65682 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/IO.pod6 Merge pull request #2343 from jonbeebe/patch-1 Fixed links to :r, :w, and :x: Well spotted. Thanks. |
|||
synopsebot | Link: doc.perl6.org/type/IO | ||
10:05
debfx0 joined,
p6bannerbot sets mode: +v debfx0
10:07
epony joined,
p6bannerbot sets mode: +v epony
10:08
debfx0 left
|
|||
Geth | doc: a3be58359f | (JJ Merelo)++ | 2 files Adds example to join Which closes #2344. Also clarifies what is meant by "immutable" in the definition of Str. |
10:16 | |
10:19
walterve23 joined,
walterve23 left
10:24
marmor left
10:30
broquaint joined
10:31
p6bannerbot sets mode: +v broquaint
10:41
xinming joined
10:42
p6bannerbot sets mode: +v xinming
10:44
xinming_ left
10:49
sena_kun left
|
|||
Geth | doc: 44a72d783f | (JJ Merelo)++ | doc/Type/List.pod6 Adds another example showing flattening slurpiness As suggested by @ciavash. Refs #2344 |
11:04 | |
synopsebot | Link: doc.perl6.org/type/List | ||
11:05
b2gills joined
11:06
p6bannerbot sets mode: +v b2gills
11:08
julius25 joined,
julius25 left
11:14
jtopian26 joined,
p6bannerbot sets mode: +v jtopian26
11:15
jtopian26 left
11:20
ExtraCrispy joined
11:21
p6bannerbot sets mode: +v ExtraCrispy,
shakygator6 joined
11:22
p6bannerbot sets mode: +v shakygator6
11:25
shakygator6 left
11:29
Eugene19 joined
11:30
Eugene19 left
11:31
vike1 left
11:32
jmerelo left
11:56
andrzejku left
12:08
zxcvz_ joined
12:09
p6bannerbot sets mode: +v zxcvz_,
zxcvz left,
zxcvz_ is now known as zxcvz
12:14
damaxi joined
12:15
vike1 joined,
p6bannerbot sets mode: +v damaxi,
p6bannerbot sets mode: +v vike1
12:17
lizmat joined,
p6bannerbot sets mode: +v lizmat
12:19
kurahaupo left,
kurahaupo joined
12:20
kurahaupo left,
kurahaupo joined
12:21
p6bannerbot sets mode: +v kurahaupo
12:29
vike1 left
12:30
kensanata joined,
p6bannerbot sets mode: +v kensanata
|
|||
kensanata | Sometimes I wonder whether I've made the right decision picking Template::Mustache instead of Template::Mojo. What do other people use, and why? | 12:35 | |
12:37
jvoisin19 joined
12:39
jvoisin19 left
12:41
zxcvz left
12:45
raatiniemi joined
12:46
raatiniemi left
|
|||
timotimo | my current web application does its UI with React.js and just serves static files and json data ;) | 12:48 | |
12:48
ccc joined
12:49
p6bannerbot sets mode: +v ccc,
leont joined
|
|||
ccc | m: my &f:(Int, Int --> Int) | 12:49 | |
yoleaux | 03:38Z <Zoffix> ccc: list binding with Capture on RHS. m: my (&op:(Int, Int --> Int)) := \(sub (Int, Int --> Int) {}) It's possible there's a simpler way, but I'm hitting a weird potential bug on. | ||
03:41Z <Zoffix> ccc: for attributes, it'd probably be `where .signature ~~ :(…)`, but it's currently throwing a weird error R#2336 github.com/rakudo/rakudo/issues/2336 | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> You can't adverb &f at <tmp>:1 ------> 3my &f:(Int, Int --> Int)7⏏5<EOL> |
||
synopsebot | R#2336 [open]: github.com/rakudo/rakudo/issues/2336 Weird error with subsetting Callable variables | ||
12:49
p6bannerbot sets mode: +v leont
|
|||
ccc | What's the syntax for constraining the signature of a callable variable/attribute ? | 12:50 | |
kensanata | timotimo: Heh. :) | ||
ccc | m: my (&op:(Int, Int --> Int)) | 12:51 | |
camelia | ( no output ) | ||
ccc | m: my (&op:(Int, Int --> Int)) = sub (Int $a, Int $b --> Int) {$a + $b}; say op(3,2) | 12:52 | |
camelia | No such method 'signature' for invocant of type 'Int' in block <unit> at <tmp> line 1 |
||
12:52
MasterDuke left
|
|||
ccc | m: sub f(Int $a, Int $b --> Int) {$a + $b}; my (&op:(Int, Int --> Int) = &f; say op(3,2) | 12:56 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Invalid typename 'say' in parameter declaration. at <tmp>:1 ------> 3b}; my (&op:(Int, Int --> Int) = &f; say7⏏5 op(3,2) |
||
ccc | m: sub f(Int $a, Int $b --> Int) {$a + $b}; my (&op:(Int, Int --> Int)) = &f; say op(3,2) | ||
camelia | No such method 'signature' for invocant of type 'Int' in block <unit> at <tmp> line 1 |
||
ccc | Even in C I can constrain the signature of a function pointer. Why is it so darn hard in perl6? | 12:57 | |
So far, I can't tell if it's even possible. | 12:58 | ||
13:02
fake_space_whale joined
13:03
p6bannerbot sets mode: +v fake_space_whale
13:05
araraloren__ joined
13:06
p6bannerbot sets mode: +v araraloren__
13:09
araraloren_ left,
pmurias joined,
p6bannerbot sets mode: +v pmurias
|
|||
pmurias | Zoffix: what do you think about splitting some of the docs pages about complex topics into a tutorial and reference parts? | 13:10 | |
lizmat | weekly: 6guts.wordpress.com/2018/09/29/eli...ed-guards/ | 13:11 | |
notable6 | lizmat, Noted! | ||
ccc | Is it possible to constrain the signature of a callable variable or attribute? | ||
If so, how? | 13:12 | ||
m: sub foo (&c:(Int, Int -->Int)) {say c(3,2)}; foo(&div) | 13:17 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: div used at line 1. Did you mean 'dir', 'die'? |
||
13:17
kradalby joined,
kradalby left
|
|||
lizmat | ccc: something like: | 13:17 | |
m: subset IntSub of Sub where *.name.starts-with("internal-"); my IntSub $foo = sub internal-bar { }; my IntSub $bar = { } | 13:18 | ||
camelia | Type check failed in assignment to $bar; expected IntSub but got Hash (${}) in block <unit> at <tmp> line 1 |
||
lizmat | m: subset IntSub of Sub where *.name.starts-with("internal-"); my IntSub $foo = sub internal-bar { }; my IntSub $bar = sub bar { } | ||
camelia | Type check failed in assignment to $bar; expected IntSub but got Sub (sub bar { #`(Sub|4891...) in block <unit> at <tmp> line 1 |
||
timotimo | camelia: the div operator's actual name is either &infix:<div> or shorter &[div] | ||
oops | |||
ccc: ^ | |||
13:19
Daedbffe4 joined,
Daedbffe4 left
|
|||
ccc | m: sub foo (&c:(Int, Int -->Int)) {say c(3,2)}; foo(&[div]) | 13:19 | |
camelia | Constraint type check failed in binding to parameter '&c'; expected anonymous constraint to be met but got Sub+{is-pure}+{Precedence} (proto sub infix:<div>...) in sub foo at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
lizmat | I guess I misunderstood the question | ||
ccc | lizmat: no I was checking something else | ||
Is it even possible to constrain a callable variable's signature, and if so how? | 13:20 | ||
timotimo | it should | ||
ccc | None of the modules installed seem to do it (by grepping for /my \&\w+/) | ||
timotimo | if not with that syntax, you should at least be able to put Callable[foo, bar] in front | ||
greppable6: my Callable | 13:21 | ||
greppable6 | timotimo, 6 lines, 1 module: gist.github.com/5d505c1b7ba0aafdb6...127d929dca | ||
timotimo | yeah | ||
ccc | timotimo: okay I want a callable that takes 2 Ints and returns an Int in a variable. How do I say it? | 13:22 | |
pmurias | m: say &infix:<div>.signature | 13:24 | |
camelia | ($, $, *%) | ||
pmurias | ccc: ^^ a lot of the builtins have different signatures then you might expect, as they are extendable multi methods | 13:25 | |
timotimo | OK, it seems like Callable[...] only really takes the return type as argument | 13:26 | |
ccc | I want to do something like "my &op(Int, Int -->Int)" (the intuitive way to do it) | ||
I tried subsetting without success | 13:27 | ||
m: subset Op of Callable where .signature ~~ :(Int, Int --> Int); my Op &foo = sub (Int $a, Int $b --> Int) {$a + $b} | 13:28 | ||
camelia | Type check failed in assignment to &foo; expected Callable[Op] but got Sub+{Callable[Int]} (sub (Int $a, Int $b -...) in block <unit> at <tmp> line 1 |
||
13:29
ZzZombo left
13:30
ZzZombo joined,
p6bannerbot sets mode: +v ZzZombo
|
|||
timotimo | you've got it double | 13:30 | |
& already means callable | |||
my Op &foo asks for a callable that returns a sub that fits Op | |||
ccc | timotimo: then what sigil do I use? | ||
timotimo | you need "my &foo is Callable" or "my Callable $foo" | ||
i'll be afk for a bit | 13:31 | ||
ccc | m: subset Op of Callable where .signature ~~ :(Int, Int --> Int); my Op $foo = sub (Int $a, Int $b --> Int) {$a + $b} | ||
camelia | ( no output ) | ||
ccc | timotimo: How do I call a scalar callable | 13:32 | |
jnthn | $foo() | 13:33 | |
ccc | m: subset Op of Callable where .signature ~~ :(Int, Int --> Int); my Op $foo = sub (Int $a, Int $b --> Int) {$a + $b}; say $foo(3,2) | ||
camelia | 5 | ||
ccc | Yay!! | ||
I better write that down somewhere it's not in the perl6 docs that I could find and I'll never remember it. | 13:34 | ||
m: subset Op of Callable where .signature ~~ :(Int, Int --> Int); my Op $foo = sub (Int $a, Int $b --> Int) {$a div $b}; say $foo(3,2) | 13:35 | ||
camelia | 1 | ||
13:36
sostenuto15 joined
|
|||
ccc | m: subset Op of Callable where .signature ~~ :(Int, Int --> Int); my Op $foo = sub (Int $a, Int $b --> Int) {$a / $b}; say $foo(3,2) | 13:36 | |
camelia | Type check failed for return value; expected Int but got Rat (1.5) in sub at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
13:36
sostenuto15 left
|
|||
ccc | m: subset Op of Callable where .signature ~~ :(Int, Int --> Int); my Op $foo = sub (Int $a, Int $b --> Int) {max($a,$b)}; say $foo(3,2) | 13:37 | |
camelia | 3 | ||
ccc | m: subset Op of Callable where .signature ~~ :(Int, Int --> Int); my Op $foo = sub (Num $a, Int $b --> Int) {max($a,$b)}; say $foo(3,2) | ||
camelia | Type check failed in assignment to $foo; expected Op but got Sub+{Callable[Int]} (sub (Num $a, Int $b -...) in block <unit> at <tmp> line 1 |
||
ccc | If I were going to update the perl6 docs to mention this, where should it be Callable, Signature, ...? | 13:40 | |
13:41
kensanata left
13:48
robertle left
13:49
Tyrantelf18 joined,
p6bannerbot sets mode: +v Tyrantelf18
13:51
Tyrantelf18 left
13:53
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
p6bannerbot sets mode: +v aborazmeh
13:54
p6bannerbot sets mode: +v aborazmeh
13:55
robertle joined
13:56
p6bannerbot sets mode: +v robertle
13:57
molaf joined,
p6bannerbot sets mode: +v molaf
13:58
ZzZombo_ joined,
p6bannerbot sets mode: +v ZzZombo_
14:00
graphene left,
aborazmeh left,
woolfy joined
14:01
p6bannerbot sets mode: +v woolfy,
ZzZombo left,
ZzZombo_ is now known as ZzZombo,
graphene joined
|
|||
woolfy | If anyone needs a picture of stuffed toy Camelia (or crocheted Camelia), go see my Flickr album: www.flickr.com/photos/wendyga/albu...3975955358 | 14:02 | |
14:02
p6bannerbot sets mode: +v graphene
|
|||
woolfy | Or pictures of some Perl-swag: www.flickr.com/photos/wendyga/albu...1244380607 | 14:02 | |
14:09
vike1 joined
14:10
p6bannerbot sets mode: +v vike1
14:12
Voldenet left
14:17
Voldenet joined,
Voldenet left,
Voldenet joined,
p6bannerbot sets mode: +v Voldenet
14:18
p6bannerbot sets mode: +v Voldenet
14:21
HaraldJoerg joined
14:22
p6bannerbot sets mode: +v HaraldJoerg
14:39
wintrmute13 joined,
wintrmute13 left
14:43
pecastro joined,
p6bannerbot sets mode: +v pecastro
14:47
titsuki joined
14:48
p6bannerbot sets mode: +v titsuki
|
|||
CIAvash | I could not find any tests in roast for something like `join '|', <a b c>, 'd', 'e', 'f'`. Currently it flattens everything because `*@values` is used in the signature. If it's supposed to work like the join method maybe it shoud be `+@values`? | 14:52 | |
14:54
gilben3 joined,
gilben3 left
14:55
woolfy left
|
|||
buggable | New CPAN upload: AccountableBagHash-0.0.2.tar.gz by ELIZABETH modules.perl6.org/dist/AccountableB...:ELIZABETH | 14:57 | |
15:00
MilkmanDan left,
MilkmanDan joined,
p6bannerbot sets mode: +v MilkmanDan
15:04
HaraldJoerg1 joined
15:05
p6bannerbot sets mode: +v HaraldJoerg1
15:08
HaraldJoerg left
15:12
graphene left
15:13
graphene joined
15:14
p6bannerbot sets mode: +v graphene
15:20
nibble_zero5 joined,
p6bannerbot sets mode: +v nibble_zero5
|
|||
rindolf | hi all | 15:25 | |
15:26
molaf left
|
|||
timotimo | ohai | 15:26 | |
15:26
HaraldJoerg1 is now known as HaraldJoerg,
nibble_zero5 left
|
|||
pmurias | CIAvash: if you really want to check if roasts depends on something change it and run roast | 15:44 | |
15:44
zxcvz joined,
minikdo joined,
p6bannerbot sets mode: +v zxcvz
15:50
minikdo left
16:04
SharmaJiKaBeta26 joined
16:05
jmerelo joined,
Guest68333 joined,
rfold joined,
p6bannerbot sets mode: +v jmerelo
16:06
p6bannerbot sets mode: +v rfold,
kensanata joined,
p6bannerbot sets mode: +v kensanata,
SharmaJiKaBeta26 left
16:08
Guest68333 left
16:15
araraloren__ left
16:19
coincoin1693 joined,
coincoin1693 left,
AlexDaniel left
16:20
AlexDaniel joined,
p6bannerbot sets mode: +v AlexDaniel
16:24
AlexDaniel left,
AlexDaniel joined,
p6bannerbot sets mode: +v AlexDaniel,
void1 left,
AlexDaniel left
16:25
lizmat left
16:26
kyaputen22 joined,
kyaputen22 left
|
|||
xinming | m: my @a = (0.125, 0.25, 0.375 ... *); @a[8].say; | 16:26 | |
camelia | 1.125 | ||
xinming | Is it possible to use the (0.125, 0.25, 0.375) kind of syntax to generate a list with specified length? | 16:27 | |
Let's say, I want @a = (.... ); But with @a[99] elements available, the @a[100] returns Any | |||
moritz_ | m: my @a = (0.125, 0.25, 0.375 ... *).head(100) | 16:31 | |
camelia | ( no output ) | ||
moritz_ | m: my @a = (0.125, 0.25, 0.375 ... *).head(100); say @a[99]; say @a[100] | ||
camelia | 12.5 (Any) |
||
moritz_ | xinming: like this? | ||
xinming | Thanks, the .head(..) is what I what. | ||
Still need time to get used to the "method" thing in perl6. | 16:32 | ||
16:38
basil1x9 joined
16:39
basil1x9 left
16:41
graphene left
16:42
graphene joined
16:43
p6bannerbot sets mode: +v graphene,
jh1 joined,
p6bannerbot sets mode: +v jh1
16:44
ccc left,
jh1 left
16:45
MasterDuke joined,
p6bannerbot sets mode: +v MasterDuke,
MasterDuke left,
MasterDuke joined,
herbert.freenode.net sets mode: +v MasterDuke,
p6bannerbot sets mode: +v MasterDuke
|
|||
kensanata | I'm writing some Cro tests and I'd really like some XPath or Mojolicious-like CSS accessors. What would you suggest I do? | 16:49 | |
I guess I'm going to install XML::XPath because I don't know what the other thing is even called. :) | 16:50 | ||
Hm. DOM::Tiny could be the thing I need! | 16:52 | ||
17:34
ppv15 joined,
p6bannerbot sets mode: +v ppv15
17:39
ppv15 left
17:48
kdavyd10 joined,
kdavyd10 left
17:51
ilbelkyr_ is now known as ilbelkyr,
kensanata left,
damaxi left
17:52
lizmat joined,
p6bannerbot sets mode: +v lizmat
18:01
john_parr joined,
p6bannerbot sets mode: +v john_parr
18:05
graphene left,
damaxi joined
18:06
p6bannerbot sets mode: +v damaxi,
graphene joined
18:07
p6bannerbot sets mode: +v graphene
18:23
molaf joined,
p6bannerbot sets mode: +v molaf
18:37
Guest54668 left,
damaxi left
18:38
giraffe joined,
p6bannerbot sets mode: +v giraffe,
giraffe is now known as Guest82400
18:50
padv16 joined
18:51
john_parr left,
padv16 left
18:52
domidumont left
19:01
jmerelo left
19:03
itaipu joined
19:04
p6bannerbot sets mode: +v itaipu
19:20
damaxi joined
19:21
p6bannerbot sets mode: +v damaxi
|
|||
pmurias | stackoverflow-- # I can't comment on a post referencing the graal backend because I don't have enough brownie points :( | 19:24 | |
lizmat | pmurias: perhaps I could do it for you ? | ||
19:28
WestCoastHotDog joined,
WestCoastHotDog left
|
|||
pmurias | in stackoverflow.com/questions/524694...rk-online, re "which can in turn target JS", As far as I'm aware there are no plans for Graal to target JS, there are vague plan for it to target webassembly (ones it matures and gains extra features) but I'm not aware of an actual effort. | 19:29 | |
19:30
rfold left
19:35
DHE15 joined,
DHE15 left
|
|||
pmurias | lizmat: would be great, I don't think I'll collect those brownie points any time soon ;) | 19:38 | |
19:39
rindolf left
|
|||
lizmat | pmurias: added | 19:43 | |
pmurias | lizmat: thank you | 19:53 | |
pmurias wishes that Graal/Truffle could actually emit javascript as the truffle backend is a lot more fun ;) | |||
20:00
zxcvz left
20:01
rindolf joined,
molaf left,
p6bannerbot sets mode: +v rindolf
|
|||
leont | 5 upvotes is all you need to comment :-) | 20:05 | |
20:07
Celelibi_ is now known as Celelibi
|
|||
leont | Also, if you need someone with high reputation privileges (e.g. to protect a question) I can help out with that sort of thing. Not that I'm expecting that to happen soon | 20:11 | |
20:14
kenvandine25 joined,
kenvandine25 left
20:17
vike1 left,
Sgeo_ joined
20:18
p6bannerbot sets mode: +v Sgeo_
20:19
Sgeo left
20:22
cognominal-p6 left
20:26
vike1 joined
20:27
p6bannerbot sets mode: +v vike1
20:28
pmurias left
20:32
cognominal-p6 joined,
p6bannerbot sets mode: +v cognominal-p6
20:35
damaxi left
20:43
robertle left
20:45
akkad29 joined
20:46
p6bannerbot sets mode: +v akkad29
20:47
akkad29 left
20:55
vike1 left,
cognominal-p6 left
20:56
cognominal-p6 joined,
p6bannerbot sets mode: +v cognominal-p6
20:57
AlexDaniel joined,
p6bannerbot sets mode: +v AlexDaniel
21:06
vike joined
21:07
p6bannerbot sets mode: +v vike
21:11
quester joined,
p6bannerbot sets mode: +v quester
|
|||
buggable | New CPAN upload: App-Tasks-0.0.4.tar.gz by JMASLAK modules.perl6.org/dist/App::Tasks:cpan:JMASLAK | 21:17 | |
21:17
eggiar joined
21:18
rindolf left,
p6bannerbot sets mode: +v eggiar
|
|||
eggiar | mm | 21:19 | |
I didn't find someone here | 21:21 | ||
timotimo | greetings eggiar | ||
21:22
chimera3________ joined,
chimera3________ left
|
|||
eggiar | can you tell me how to use this :v | 21:25 | |
21:31
damjan18 joined,
damjan18 left,
quester left
|
|||
eggiar | hmm | 21:34 | |
21:35
b2gills left
21:38
kybr left
21:42
kodapa26 joined,
kodapa26 left
|
|||
timotimo | oh sorry | 21:47 | |
i was reading some stuff off the side and didn't look back | 21:48 | ||
eggiar: what in particular do you need help with? | |||
21:52
b2gills joined
21:53
p6bannerbot sets mode: +v b2gills
|
|||
AlexDaniel | re sin with rats and “I didn’t manage to program my way around this, but perhaps some of you know a solution?”, sure, any way to generate sin digits will do | 21:54 | |
maybe it's a good idea for a module | |||
and maybe for benchmarks also | |||
21:55
TheOnlyBouncer12 joined
|
|||
AlexDaniel | though I guess continued fraction approach will explode in denominator, but there has to be a better way :) | 21:56 | |
21:56
eggiar left,
p6bannerbot sets mode: +v TheOnlyBouncer12
|
|||
AlexDaniel | (this is about medium.com/@jcoterhals/perl-6-smal...8da055cfc4 ) | 21:56 | |
timotimo | after a given point fall back to interpolation? :P | ||
AlexDaniel | interpolation? | 21:58 | |
I understand it was a joke but I don't get it :) | |||
timotimo | well, it doesn't give you real precision | 22:00 | |
22:01
TheOnlyBouncer12 left
22:06
HaraldJoerg left
22:19
b2gills left
|
|||
Xliff_ | If I have the arguments to a sub in an array, what's the easiest way to convert that array to something acceptable by positional arguments? | 22:52 | |
I thought @a.list would work, but it doesn't seem to be. | |||
m: sub a($b, $c) { say $b; $say $c; }; my @a(1, 2); a(@a.list); | 22:53 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$say' is not declared. Did you mean '&say'? at <tmp>:1 ------> 3sub a($b, $c) { say $b; 7⏏5$say $c; }; my @a(1, 2); a(@a.list); |
||
Xliff_ | m: sub a($b, $c) { say $b; say $c; }; my @a(1, 2); a(@a.list); | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> The () shape syntax in array declarations is reserved at <tmp>:1 ------> 3($b, $c) { say $b; say $c; }; my @a(1, 27⏏5); a(@a.list); expecting any of: constraint forma… |
||
Xliff_ | m: sub a($b, $c) { say $b; say $c; }; my @a(1, 2); a(@a.List); | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> The () shape syntax in array declarations is reserved at <tmp>:1 ------> 3($b, $c) { say $b; say $c; }; my @a(1, 27⏏5); a(@a.List); expecting any of: constraint forma… |
||
Xliff_ | m: sub a($b, $c) { say $b; say $c; }; my @a(1, 2); &a(@a.list); | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> The () shape syntax in array declarations is reserved at <tmp>:1 ------> 3($b, $c) { say $b; say $c; }; my @a(1, 27⏏5); &a(@a.list); expecting any of: constraint form… |
||
Xliff_ | m: sub a($b, $c) { say $b; say $c; }; my @a=(1, 2); &a(@a.list); | ||
camelia | Too few positionals passed; expected 2 arguments but got 1 in sub a at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Xliff_ | m: sub a($b, $c) { say $b; say $c; }; my @a(1, 2); &a(@a.Seq); | 22:54 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> The () shape syntax in array declarations is reserved at <tmp>:1 ------> 3($b, $c) { say $b; say $c; }; my @a(1, 27⏏5); &a(@a.Seq); expecting any of: constraint forma… |
||
Xliff_ | m: sub a($b, $c) { say $b; say $c; }; my @a(1, 2); &a(@a); | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> The () shape syntax in array declarations is reserved at <tmp>:1 ------> 3($b, $c) { say $b; say $c; }; my @a(1, 27⏏5); &a(@a); expecting any of: constraint formal pa… |
||
Xliff_ | m: sub a($b, $c) { say $b; say $c; }; my @a(1, 2); &a(@a.flat); | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> The () shape syntax in array declarations is reserved at <tmp>:1 ------> 3($b, $c) { say $b; say $c; }; my @a(1, 27⏏5); &a(@a.flat); expecting any of: constraint form… |
||
22:54
pecastro left
22:58
b2gills joined
|
|||
xinming | What module is recommend to write http server in perl6? | 22:59 | |
22:59
p6bannerbot sets mode: +v b2gills
|
|||
xinming | http::server::async seems no update for a year. Is it still maintained? | 22:59 | |
timotimo | cro will take you very far, i'm sure | ||
Xliff_: you need to *@a for it to become positionals | |||
and you apparently got an earlier line back that was missing the = before my @a and (1, 2) | 23:00 | ||
xinming | I do use cro, But needs something really light weight. :-) | ||
No need to be big in my case. | 23:01 | ||
23:01
john_parr joined,
p6bannerbot sets mode: +v john_parr
|
|||
Xliff_ | m: sub a($b, $c) { say $b; say $c; }; my @a=(1, 2); &a(*@a); | 23:03 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse expression in argument list; couldn't find final ')' (corresponding starter was at line 1) at <tmp>:1 ------> 3 { say $b; say $c; }; my @a=(1, 2); &a(*7⏏5@a); expecting a… |
||
Xliff_ | OK, so the change has to be in the signature. | 23:04 | |
For some reason I thought I could convert the array to a list and do it that way. | |||
timotimo | sorry! | 23:06 | |
i told you completely the wrong thing | |||
you actually need |@a | |||
m: sub a($b, $c) { say $b; say $c; }; my @a=(1, 2); &a(|@a); | |||
camelia | 1 2 |
||
23:15
wiliz14 joined
23:20
wiliz14 left
23:22
Bucciarati left,
Bucciarati joined
23:23
p6bannerbot sets mode: +v Bucciarati
|
|||
timotimo | Xliff_: ^ | 23:27 | |
23:29
Guest31449 joined,
Guest31449 left
23:32
avar left,
avar joined,
avar left,
avar joined,
p6bannerbot sets mode: +v avar
23:33
p6bannerbot sets mode: +v avar
23:49
graphene left
23:50
graphene joined
23:51
p6bannerbot sets mode: +v graphene
23:52
Guest69528 joined
23:53
p6bannerbot sets mode: +v Guest69528
23:55
Guest69528 left
23:59
THE_GFR|H joined,
THE_GFR|H left
|