»ö« 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. |
|||
Xliff | m: class A {}; constant ThatHandler := (Str, Int, Str --> A); sub a (ThatHandler &handler) { A.new }; | 00:00 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Confused at <tmp>:1 ------> 3; constant ThatHandler := (Str, Int, Str7⏏5 --> A); sub a (ThatHandler &handler) { expecting any of: statement end statement modifier … |
||
Xliff | m: class A {}; constant ThatHandler := &(Str, Int, Str --> A); sub a (ThatHandler &handler) { A.new }; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Confused at <tmp>:1 ------> 3 constant ThatHandler := &(Str, Int, Str7⏏5 --> A); sub a (ThatHandler &handler) { expecting any of: statement end statement modifier … |
||
geekosaur | m: class A {}; constant ThatHandler := :(Str, Int, Str --> A); sub a (ThatHandler &handler) { A.new }; | ||
camelia | ===SORRY!=== QAST::Block with cuid 2 has not appeared |
||
geekosaur | (you're looking for Signatures. but this looks like an untested case) | 00:01 | |
Xliff | Ahhh... | ||
Ticket? | |||
00:01
itaipu left
|
|||
geekosaur | not sure; that usage actualy looks wrong to me | 00:01 | |
Xliff | 'k | 00:02 | |
geekosaur | btu not sure how you'd actually do it | ||
Xliff | m: class A {}; constant ThatHandler := :(Str, Int, Str --> A); sub a (ThatHandler $a) { A.new }; | ||
camelia | ===SORRY!=== QAST::Block with cuid 2 has not appeared |
||
geekosaur | basically 'ThatHandler' is a signature, not a function with that signature | ||
Xliff | m: class A {}; constant ThatHandler := :(Str, Int, Str --> A); sub a ($a) { A.new }; | ||
camelia | ===SORRY!=== QAST::Block with cuid 2 has not appeared |
||
Xliff | m: class A {}; constant ThatHandler := :(Str, Int, Str --> A); | ||
camelia | ===SORRY!=== QAST::Block with cuid 2 has not appeared |
||
Xliff | m: class A {}; constant ThatHandler := :(Str, Int, Str); | ||
camelia | ===SORRY!=== QAST::Block with cuid 2 has not appeared |
||
Xliff | m: constant ThatHandler := :(Str, Int, Str); | 00:03 | |
camelia | ===SORRY!=== QAST::Block with cuid 1 has not appeared |
||
Xliff | Wow | ||
m: constant ThatHandler = :(Str, Int, Str); | |||
camelia | ===SORRY!=== QAST::Block with cuid 1 has not appeared |
||
Xliff | m: constant &ThatHandler = :(Str, Int, Str); | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Type check failed in constant declaration of &ThatHandler; expected Callable but got Signature (:(Str $, Int $, Str $)) at <tmp>:1 ------> 3constant &ThatHandler = :(Str, Int, Str)7⏏5; |
||
Xliff | OK. | ||
I will ask Zoffix | |||
Or jnthn | 00:04 | ||
00:04
jameslenz joined
00:05
p6bannerbot sets mode: +v jameslenz
00:06
nebuchadnezzar joined
00:07
itaipu joined,
p6bannerbot sets mode: +v nebuchadnezzar
00:08
p6bannerbot sets mode: +v itaipu
00:09
jameslenz left
|
|||
Xliff | m: Inf == Inf | 00:09 | |
camelia | WARNINGS for <tmp>: Useless use of "==" in expression "Inf == Inf" in sink context (line 1) |
||
Xliff | m: say Inf == Inf | 00:10 | |
camelia | True | ||
Xliff | m: say 5 < Inf | ||
camelia | True | ||
00:11
lizmat left
00:15
itaipu left
|
|||
Geth | ecosystem: 1b662250e8 | (Aleks-Daniel Jakimenko-Aleksejev)++ | META.list Add Project Blin |
00:23 | |
00:27
kurahaupo left,
kurahaupo joined,
kurahaupo left
00:28
kurahaupo joined,
p6bannerbot sets mode: +v kurahaupo
|
|||
Geth | whateverable: fbb0469f5e | (Aleks-Daniel Jakimenko-Aleksejev)++ | META6.json Bump version |
00:47 | |
00:54
jbotz left
|
|||
Geth | Blin: 94a6b4693e | (Aleks-Daniel Jakimenko-Aleksejev)++ | bin/blin.p6 Temporarily add some env vars for control Before MAIN is implemented. |
00:58 | |
SmokeMachine | Xliff: I do that this way: github.com/FCO/Red/blob/master/lib.../Utils.pm6 | 01:16 | |
01:18
cognominal-p6 joined
01:19
p6bannerbot sets mode: +v cognominal-p6,
ryn1x left
01:20
ryn1x joined,
p6bannerbot sets mode: +v ryn1x
|
|||
Xliff | sub kebab-to-snake-case($_) is export { S:g/'-'/_/ }; kebab-to-snake-case('Hi-there').say | 01:21 | |
evalable6 | Hi_there | ||
Xliff | sub kebab-to-snake-case($_) is export { S:g/'-'/_/ }; sub camel-to-snake-case($_) is export { kebab-to-snake-case lc S:g/(\w)<?before <[A..Z]>>/$0_/ }; camel-to-snake-case('GtkThisObjectIsSilly').say | 01:22 | |
evalable6 | gtk_this_object_is_silly | ||
Xliff | SmokeMachine++ # Nice! | ||
Only problem there is that I need to drop off the first hump. So In the above example, I only want "this_object_is_silly" | 01:23 | ||
AlexDaniel | m: sub kebab-to-snake-case($_) is export { TR/-/_/ }; kebab-to-snake-case('Hi-there').say | 01:31 | |
camelia | Hi_there | ||
AlexDaniel | TR is a recent-ish addition to rakudo, so maybe using S is better | 01:32 | |
Geth | Blin: 953c12d91d | (Aleks-Daniel Jakimenko-Aleksejev)++ | README.md Simpler example, env vars, note on portability |
01:35 | |
01:39
cognominal-p6 left,
cognominal-p6 joined
01:40
p6bannerbot sets mode: +v cognominal-p6
01:42
w_richard_w joined,
Zoffix joined,
p6bannerbot sets mode: +v Zoffix
|
|||
Zoffix | Xliff: "<Xliff> I will ask Zoffix" Ask about what? | 01:42 | |
01:43
p6bannerbot sets mode: +v w_richard_w
01:46
MasterDuke left
01:47
w_richard_w left
|
|||
Xliff | Zoffix: \o | 01:47 | |
When specifying a C callback, I have to do something equivalent to "sub (&handler(Arg1Type, Arg2Type --> ReturnType)". Is there a way to put that into a constant so it can be reused if necessary? | 01:48 | ||
I've tried the following, and got a weird error. | |||
m: constant ThatHandler = :(Str, Int, Str); | |||
camelia | ===SORRY!=== QAST::Block with cuid 1 has not appeared |
||
Xliff | m: constant ThatHandler := :(Str, Int, Str); | ||
camelia | ===SORRY!=== QAST::Block with cuid 1 has not appeared |
||
Xliff | So I don't know how that would look, syntactically | ||
Zoffix | Xliff: use a subset | 01:49 | |
m: class A {}; subset Meows of Callable where .signature ~~ :(Str, Int, Str --> A); sub a (Meows \handler) { A.new }; a sub (Str, Int, Str --> A) {} | |||
camelia | ( no output ) | ||
Zoffix | m: class A {}; subset Meows of Callable where .signature ~~ :(Str, Int, Str --> A); sub a (Meows \handler) { A.new }; a sub (Str, Int --> A) {} | ||
camelia | Constraint type check failed in binding to parameter 'handler'; expected Meows but got Sub+{Callable[A]} (sub (Str $, Int $ -->...) in sub a at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Xliff | Zoffix++ # You rock | ||
And will that work with nativecall, too? | |||
Zoffix | No idea. One way to find out :) | 01:50 | |
Xliff | LOL! OK. Just another thing to add on to the pile! Thanks. | 01:52 | |
Zoffix | I knew I saw a ticket for signature constant! R#1301 | 01:55 | |
synopsebot | R#1301 [open]: github.com/rakudo/rakudo/issues/1301 constant does not support signature literal | ||
01:58
molaf left
02:04
roguelazer left
|
|||
Xliff | Oh, wow. So existing issue and I just need to work around it for now. | 02:08 | |
oK | |||
Zoffix: You can see where it would be helpful in the list of types I have, starting here: github.com/Xliff/p6-GtkPlus/blob/m...es.pm6#L15 | 02:10 | ||
02:10
molaf joined
|
|||
Xliff | So with subsets, any use needs to be sigil-less? | 02:10 | |
02:11
p6bannerbot sets mode: +v molaf
|
|||
Zoffix | Xliff: you can use `$` sigil or write `(&handler where Meows)` | 02:11 | |
Xliff | OK. Will try it with nativecall and see what I get. Thanks. | ||
Zoffix | `(Meows &foo)` is meant to be `(&foo where .returns Meows)` by my understanding, but looks like it's buggy colabti.org/irclogger/irclogger_log...-10-21#l36 | 02:12 | |
And @foo and %foo would parametarize it (and I was expecting `Meows &foo` to equaly parametarize) | |||
02:27
parv joined,
parv left
02:37
ryn1x left
02:41
Zoffix left
02:56
ryn1x joined,
p6bannerbot sets mode: +v ryn1x
03:50
kurahaupo left
03:51
kurahaupo joined,
kurahaupo left,
kurahaupo joined
03:52
p6bannerbot sets mode: +v kurahaupo,
ryn1x left
|
|||
SmokeMachine | m: Mu eqv Mu # that's the problem! | 03:57 | |
camelia | WARNINGS for <tmp>: Useless use of "eqv" in expression "Mu eqv Mu" in sink context (line 1) Type check failed in binding to parameter '<anon>'; expected Any but got Mu (Mu) in block <unit> at <tmp> line 1 |
||
SmokeMachine | m: say Mu eqv Mu # that's the problem! | ||
camelia | Type check failed in binding to parameter '<anon>'; expected Any but got Mu (Mu) in block <unit> at <tmp> line 1 |
||
04:06
jameslenz joined
04:07
p6bannerbot sets mode: +v jameslenz
04:15
ryn1x joined,
p6bannerbot sets mode: +v ryn1x
04:16
jameslenz left
04:52
sacomo left,
kurahaupo left
04:53
kurahaupo joined
04:54
p6bannerbot sets mode: +v kurahaupo
05:05
guifa joined,
p6bannerbot sets mode: +v guifa
|
|||
guifa | Let's say you're reading a config file that includes some regex info. How would you store the data into a regex? All the interpolable stuff in the docs has it store the reference to variables (e.g. still live), and not the actual content of the variable (and not static) | 05:06 | |
e.g. my $a = "^fu"; my $b = ??; "fubar" ~~ $b; $a = "z"; "fubar" ~~ $b; | 05:07 | ||
What needs to go in the ?? so that both smartmatches are true? | |||
Xliff | guifa: I don't understand what you mean from that example. Can you post code? | 05:24 | |
05:25
vrurg left
05:34
mattp_ left
05:36
guifa left
|
|||
ugexe | m: my $a = "^fu"; my $b = rx/<$a>/; say "fubar" ~~ $b; $a = "z"; say "fubar" ~~ $b; # except this fails to match the second time | 05:42 | |
camelia | 「fu」 Nil |
||
geekosaur | yeh, because it's not interpolating $a at the point of definition | ||
sadly I think this currently requires EVAL | 05:44 | ||
05:57
mattp_ joined
05:58
p6bannerbot sets mode: +v mattp_
06:06
kurahaupo_ joined,
p6bannerbot sets mode: +v kurahaupo_
06:07
kurahaupo left,
kurahaupo_ left
06:08
kurahaupo joined,
p6bannerbot sets mode: +v kurahaupo
06:13
jameslenz joined,
p6bannerbot sets mode: +v jameslenz
06:17
jameslenz left
06:20
ryn1x left
06:31
mattp_ left
06:37
mattp_ joined,
p6bannerbot sets mode: +v mattp_
06:42
leah2 left
|
|||
moritz | or a closure | 06:42 | |
say "fubar" ~~ $b; | 06:43 | ||
m: sub make-re(Str $s) { rx/<$s>/ }; my $a = '^fu'; my $b = make-re($a); say say "fubar" ~~ $b; $a = "z"; say "fubar" ~~ $b; | 06:44 | ||
camelia | 「fu」 True 「fu」 |
||
moritz | m: sub make-re(Str $s) { rx/<$s>/ }; my $a = '^fu'; my $b = make-re($a); say "fubar" ~~ $b; $a = "z"; say "fubar" ~~ $b; | ||
camelia | 「fu」 「fu」 |
||
06:44
marmor joined
06:45
p6bannerbot sets mode: +v marmor
06:46
leah2 joined
06:47
p6bannerbot sets mode: +v leah2
06:51
mattp_ left
06:52
marmor left
06:57
mattp_ joined,
p6bannerbot sets mode: +v mattp_
07:01
domidumont joined
07:02
p6bannerbot sets mode: +v domidumont
07:35
kurahaupo left
07:36
kurahaupo joined,
p6bannerbot sets mode: +v kurahaupo
07:47
kurahaupo left
07:48
kurahaupo joined,
kurahaupo left,
kurahaupo joined
07:49
p6bannerbot sets mode: +v kurahaupo
08:02
noganex_ left,
noganex joined
08:03
p6bannerbot sets mode: +v noganex
08:13
jameslenz joined
08:14
p6bannerbot sets mode: +v jameslenz
08:27
jameslenz left
08:28
noganex left,
noganex joined
08:29
p6bannerbot sets mode: +v noganex
08:43
sena_kun joined
08:44
p6bannerbot sets mode: +v sena_kun
08:50
w_richard_w joined
08:51
p6bannerbot sets mode: +v w_richard_w
08:53
lizmat joined,
p6bannerbot sets mode: +v lizmat,
w_richard_w left
08:59
irco left
09:00
irco joined
09:01
p6bannerbot sets mode: +v irco
09:02
HaraldJoerg joined
09:03
p6bannerbot sets mode: +v HaraldJoerg
09:09
rindolf joined
09:10
p6bannerbot sets mode: +v rindolf
09:11
noganex_ joined
09:12
p6bannerbot sets mode: +v noganex_
09:14
noganex left
09:18
kensanata joined,
p6bannerbot sets mode: +v kensanata
09:22
finanalyst joined
09:23
p6bannerbot sets mode: +v finanalyst
|
|||
finanalyst | timotimo: thanks for the answer on perl-user list about &*EXIT | 09:27 | |
yoleaux | 16 Oct 2018 10:39Z <Zoffix> finanalyst: give -Ilib to the executable prove runs instead of prove itself: prove -e "perl6 -Ilib" -vr t/ | ||
timotimo | no prob | 09:29 | |
i'm only at the keyboard intermittently | |||
but if you need more help or run into trouble, feel free to ask, it might take a while for me to respond | |||
i haven't tested the code i sent, either :| | |||
El_Che | Watching Ovid's talk about Perl 5 and 6 | 09:36 | |
09:37
cognominal-p6 left
|
|||
kensanata | I'm still wondering how to run my cro app from the command line (such that I can restart it from cron or monit, for example). Right now I'm invoking perl6 instead of using cro run. Is this expected? I have the shell script I use to start it and my service.p6 in this blog post, if you feel like taking a look: alexschroeder.ch/wiki/2018-10-21_C...Service%3f | 09:54 | |
El_Che | are you planning using it on Linux? | 09:58 | |
a systemd service file is the way to go there | |||
no tracking of pids, autostarting, etc | 09:59 | ||
sena_kun | kensanata, do you see restart endlessly without apparent reason, or it occurs when e.g. something is written under cwd of `cro run`? | ||
El_Che | (it probably the only thing I like about systemd) | ||
kensanata | El_Che: It's going to run on a Debian server. There, all my existing Mojolicious apps run as my user, not from systemd. I was hoping I didn't need to change that. | 10:00 | |
lizmat | PSA: this weeks Perl 6 weekly will be published around noon on Monday, due to not being able to do it later on the day | ||
sena_kun | if first one, please report it as a bug, it shouldn't be like that. if second one, you probably want either another storage to write/edit filesystem, or exclude some directories. | ||
El_Che | kensanata: systemd can run an app as a user (but I see what you mean) | ||
Also, looking at this cro.services/docs/cro-tool, the cro-tool looks like a dev tool, not a way to deploy production to me | 10:01 | ||
(e.g. the autostarting) | |||
kensanata | Hm. | 10:02 | |
I figured the section "Running Services" would be whatever counts as "best practice". | 10:03 | ||
El_Che | yeah, maybe see what jnthn has to say | ||
kensanata | sena_kun: I'll take a look at the subdirectories. Perhaps I need some more ignore stuff in my .cro.yml, that's possible. | 10:04 | |
sena_kun | kensanata, I am asking because I had an issue where I wrote user content to `static/foo/bar` and on every upload it was restarted, so it might be a possible trap. Otherwise, if it just restarts constantly, that's a bug. | 10:05 | |
kensanata | sena_kun: You are right. I was doing two things at the same time, trying to switch to cro and trying to write propper log files. Propper log files into the same directory... Ouch! | 10:06 | |
El_Che | I repeat that I would be very uneasy with autorestart on production, but that's silly me :) | 10:07 | |
I would also consider putting a good reverse proxy on front | |||
kensanata | El_Che: I agree. | ||
sena_kun | I agree with that too. | ||
And reverse-proxy is indeed a nice thing to have in this case. | 10:08 | ||
kensanata | El_Che: Right now Apache2 is acting as the proxy with fail2ban watching the Apache logfiles. | ||
sena_kun | kensanata, but anyway, I hope the case with restarts is resolved. | ||
El_Che | yeah, that's a good idea | ||
www.youtube.com/watch?v=3x7O5cy0TG...p;t=22285s <-- probably the most recent cro talk | 10:09 | ||
kensanata | I saw Jonathan speak in Switzerland. That made me want to try cro in the first place. :) | 10:11 | |
El_Che | ah lol | ||
10:18
molaf left
|
|||
timotimo | systemd also handles logging for you if you want | 10:18 | |
kensanata | timotimo: Yeah, but cro also just writes log files for me, and I know how to configure logrotate and all that, I don't see an actual benefit, yet. | ||
10:20
pheix joined
|
|||
kensanata | OK, so now my shell script starts nohup cro run & because cro doesn't daemonize itself. I guess I still find that surprising. And I wonder about the tradeoffs. So the benefit (which El_Che doubts) is automatic restarts? I also see now that using cro run gives me two moar processes (one runs cro, the other runs my process). | 10:20 | |
10:21
p6bannerbot sets mode: +v pheix
|
|||
kensanata | If there's nothing else that I'm missing, perhaps running the service using perl6 directly instead of via cro isn't such a bad idea after all. I think I'll do that. | 10:21 | |
El_Che | the daemonize thing is easily solved by init.d and systemd | 10:22 | |
running stuff as a real user instead of a system user is indeed what tricky | 10:23 | ||
10:23
jameslenz joined
|
|||
sena_kun | kensanata, cro run gives you automatic linking between services, restarts, separate envs, but yes, I'd say it's more of development too, not deployment one. | 10:24 | |
10:24
p6bannerbot sets mode: +v jameslenz
|
|||
El_Che | you often pay for extra dev features | 10:24 | |
sena_kun | exactly. :) | 10:25 | |
pheix | Hi, friendz! Noobs ques: is it possibe to define parent class from str var, something like this: my $n = 'Foo'; class Bar is $n { }, I've tried ::($n) but its fails with "This type cannot unbox" :(((( | 10:26 | |
10:28
jameslenz left
|
|||
El_Che | pheix: I don't get the qestion. What are you trying to define? A substype of string? | 10:36 | |
pheix | @El_Che I'm trying to define a new class with name from string. Usually we have to code class Foo { ... }, but my goal is to use dynamic name, that is passed from config. | 10:38 | |
El_Che | ah ok | 10:39 | |
sena_kun | that's a work for MOP, I think. pheix, see docs.perl6.org/type/Metamodel::Cla...d_new_type | 10:40 | |
m: my $n = 'Foo'; my $class = Metamodel::ClassHOW.new_type(:name($n)); $class.HOW.compose($class); say $class.^name; | 10:42 | ||
camelia | Foo | ||
sena_kun | pheix, but you should know it's kind of a black magic and there are not so much cases when it's a right tool for the job. :) | 10:43 | |
unless you want some meta-programming if your life. | |||
pheix | sena_kun, thanx a lot! | 10:44 | |
10:45
kensanata left
|
|||
El_Che | the most usefull case I had for metaprogramming was adding methods on the fly, but roles takes care of most cases | 11:09 | |
11:25
jbotz joined
11:26
p6bannerbot sets mode: +v jbotz
12:24
jameslenz joined
12:25
p6bannerbot sets mode: +v jameslenz
12:29
jameslenz left
12:32
cognominal-p6 joined
12:33
p6bannerbot sets mode: +v cognominal-p6
12:37
lelf joined
12:38
cognominal-p6 left,
p6bannerbot sets mode: +v lelf,
cognominal-p6 joined
12:39
p6bannerbot sets mode: +v cognominal-p6
12:53
Michael_S left
|
|||
perlawhirl | is there a way to accept files of $*ARGFILES besides 'IO|IO::Handle' | 12:54 | |
i meant... files (ie. IO::Path) -OR- IO::Handle | 12:55 | ||
seems there's no role that encapsulates both. no biggie, just wanting to confirm | 12:56 | ||
12:57
cognominal-p6 left
13:26
Zoffix joined,
p6bannerbot sets mode: +v Zoffix
|
|||
Zoffix | perlawhirl: what do you mean by "accept"? IO::CatHandle takes any mix of Str, IO::Path, IO::Handle, IO::Pipe objects. | 13:27 | |
perlawhirl | m: say 'f'.IO ~~ IO::CatHandle | 13:30 | |
camelia | False | ||
Zoffix | perlawhirl: ah. Yeah, just use a `($ where IO|IO::Handle)`. In Rakudo, that even will be rewritten to just two cheap typechecks. | 13:33 | |
m: subset Meows where IO::Path|IO::Handle; say 'f'.IO ~~ Meows; say $*OUT ~~ Meows; # also this | 13:34 | ||
camelia | False False |
||
Zoffix | huh | ||
c: HEAD subset Meows where IO::Path|IO::Handle; say 'f'.IO ~~ Meows; say $*OUT ~~ Meows; # also this | |||
committable6 | Zoffix, ¦HEAD(f021079): «TrueTrue» | ||
Zoffix | (camelia has RESTRICTED setting with disabled IO::Path/IO::Handle) | ||
13:41
darthdeus_ left
|
|||
SmokeMachine | m: role R { multi method r(--> Int) { ... } }; class C does R { multi method r(--> Str) {} } | 13:42 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Multi method 'r' with signature :(C: *%_ --> Int) must be implemented by C because it is required by a role at <tmp>:1 |
||
SmokeMachine | :) | 13:43 | |
Zoffix | SmokeMachine++ | 13:45 | |
Geth | doc: 5811e6412f | (JJ Merelo)++ | 2 files Adds link and rephrases closes #2401 |
13:46 | |
SmokeMachine | Zoffix: how do we add a feature/behabior to a future version of perl6 (for example 6.e)? | 13:47 | |
*behavior | 13:48 | ||
Zoffix | SmokeMachine: depends on the feature. Right now we can only compile-time stuff | 13:49 | |
SmokeMachine: and you'd do it in Grammar/Actions/World with `if $*W.lang-ver-before('e') { stuff for earlier versions } else { stuff for 6.e and later }` | 13:50 | ||
(I think static Optimizer can also use it) | 13:51 | ||
Sample in Actions: github.com/rakudo/rakudo/blob/mast....nqp#L1357 | 13:52 | ||
SmokeMachine | So, I can’t do that on RoleToClassApplier... | ||
Zoffix | Probably not | 13:53 | |
Blocked by R#1289 | 13:54 | ||
synopsebot | R#1289 [open]: github.com/rakudo/rakudo/issues/1289 [6.e] Implement a Way to Know Caller's Language | ||
SmokeMachine | So I shouldn’t try this yet? github.com/rakudo/rakudo/issues/2384 | ||
Zoffix | SmokeMachine: well, I don't know what the solution looks like. If it requires to know caller's language version, then you can't do it, but if you only need to know the currently active language version while compiling then it'd be the above method. | 13:56 | |
SmokeMachine | Zoffix: thanks... | 13:58 | |
14:05
regreg joined
14:06
p6bannerbot sets mode: +v regreg
14:09
aindilis left
14:10
aindilis joined,
p6bannerbot sets mode: +v aindilis,
aindilis left
14:11
aindilis joined
14:12
p6bannerbot sets mode: +v aindilis
14:18
atroxaper joined,
leah2 left
14:21
leah2 joined
14:22
p6bannerbot sets mode: +v leah2,
regreg left
14:23
lichtkind joined,
p6bannerbot sets mode: +v lichtkind
14:25
jameslenz joined
14:26
p6bannerbot sets mode: +v jameslenz
14:29
guifa joined,
p6bannerbot sets mode: +v guifa,
jameslenz left
|
|||
Geth | ¦ Blin: AlexDaniel self-assigned Zef issues github.com/perl6/Blin/issues/2 | 14:34 | |
14:35
atroxaper left,
atroxaper joined,
domidumont left
14:36
p6bannerbot sets mode: +v atroxaper
|
|||
atroxaper | Hello, #perl6 ! | 14:36 | |
AlexDaniel | o/ | ||
atroxaper | Please, help me. What I have to do for stop executing the code under 'start' block? $p = start { sleep 100; }; Now I only have a promise. I try to break it but it does not help me :) | ||
AlexDaniel: \o | 14:37 | ||
moritz | atroxaper: I don't think you can kill a start block | ||
or a thread, for that matter | |||
AlexDaniel | atroxaper: may I ask why you want to do that? | 14:39 | |
atroxaper | moritz: how can I run and terminate some work then? I did not find any terminate method on the Thread too. | ||
moritz | atroxaper: you might need to start a separate process if you really need a hard termination | 14:40 | |
14:40
domidumont joined,
jameslenz joined
14:41
p6bannerbot sets mode: +v domidumont,
p6bannerbot sets mode: +v jameslenz,
uzl joined
|
|||
guifa | Xliff, my connection died last night, but I did come up with the answer on the regex. To "lock in" variable's values in regexes, you have to make it using EVAL. e.g. $foo = "rx/$bar/".EVAL; Otherwise, if the value of $bar changes, $foo will act in accordance with $bar's new value which bombs spectacularly if $bar is a loop variable. . | 14:41 | |
14:42
p6bannerbot sets mode: +v uzl
|
|||
moritz | guifa: the other option is a closure | 14:43 | |
m: sub make-re(Str $s) { rx/<$s>/ }; my $a = '^fu'; my $b = make-re($a); say "fubar" ~~ $b; $a = "z"; say "fubar" ~~ $b; | 14:44 | ||
camelia | 「fu」 「fu」 |
||
atroxaper | moritz: imagine I want to get some resources over http. But they can stuck. I can wrap the start block on Promise.any with 'timeout' promise. But number of such stucked process will grow over time. I think it is not good, yes? | 14:45 | |
guifa | moritz, that's definitely a lot cleaner (and safer! even though it's my own config files being read in, when I end up distributing the code I'd rather keep other safe) | 14:46 | |
moritz | atroxaper: that's why we have things like connection timeouts | ||
atroxaper | moritz: It is strange for me, as for Java programmer, to not have a way to terminate a thread. Even softly like in Java. | 14:47 | |
14:47
domidumont left
|
|||
uzl | m: say: "Hello"; | 14:48 | |
camelia | WARNINGS for <tmp>: Useless use of constant string "Hello" in sink context (line 1) |
||
atroxaper | moritz: yes. I understand that I have to use 'process' with timeout inside rather outside killing :) Thank you for clarify that moment. I thought I miss something in the documentation. | 14:49 | |
guifa | Would be great if Regex had a sort of .freeze() to do that. I get the utility of letting the variable be mutable, but it's a bit counterintuitive too. Either way, I think I might try adding that to the docs, because I can't be the only one who was banging his head up against a wall trying to get the interpolation stuff to work | ||
uzl | m: say: "Hello" | ||
camelia | WARNINGS for <tmp>: Useless use of constant string "Hello" in sink context (line 1) |
||
uzl | Do we have a name for this type of invocation? | ||
BTW, this works fine in the REPL. Why it throws this error here? | 14:50 | ||
sena_kun | m: say "Hello" | 14:52 | |
camelia | Hello | ||
moritz | it's not an error, it's a warning | ||
uzl: and the : marks the "say" as a label | |||
14:52
lelf` joined
|
|||
moritz | and in the REPL, it only "works" because the REPL automatically echos the return value of the last statement | 14:52 | |
14:53
p6bannerbot sets mode: +v lelf`
|
|||
Kaiepi | using : like that only works for methods iirc | 14:54 | |
AlexDaniel | hehe, yeah, not to be confused with `say “hello”:` or `“hello”.say: |()` | ||
uzl | moritz: Thanks! I should have read the message better ;-) | 14:55 | |
So : wouldn't work with a function that doesn't offer method invocation syntax? | 14:56 | ||
Zoffix | No functions offer that. | ||
14:56
lelf left
|
|||
Zoffix | uzl: it's purely a syntax for method calls, but you can use `.&foo` syntax which is a form of method call that uses a function as the callable for the method (passing invocant as first arg) | 14:56 | |
m: “hello”.&say | 14:57 | ||
camelia | hello | ||
Zoffix | m: sub meows { say $^a ~ $^b } "foo".&meows: "bar" | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Strange text after block (missing semicolon or comma?) at <tmp>:1 ------> 3sub meows { say $^a ~ $^b }7⏏5 "foo".&meows: "bar" expecting any of: infix infix stopper … |
||
Zoffix | m: sub meows { say $^a ~ $^b }; "foo".&meows: "bar" | ||
camelia | foobar | ||
14:58
Zoffix left
|
|||
AlexDaniel | thelackthereof.org/Perl6_Colons :) | 14:58 | |
uzl | Oh, great! Thanks! | ||
pmurias | what's a good syntax for evalling larger chunks of foreign code | 15:00 | |
? | |||
heredocs cause problems aren't treated as constants by eval and require 'use MONKEY-SEE-NO-EVAL' | 15:01 | ||
15:02
fake_space_whale joined
15:03
finanalyst left,
p6bannerbot sets mode: +v fake_space_whale,
renormalist joined
15:04
p6bannerbot sets mode: +v renormalist
|
|||
moritz | so, just ues MONKEY-SEE-NO-EVAL; ? | 15:08 | |
*use | |||
pmurias | moritz: doesn't look good in rakudo.js code examples | 15:16 | |
15:22
lelf`` joined
|
|||
moritz | m: say q⛄stuff⛄ | 15:22 | |
camelia | stuff | ||
moritz | you can always use that :-) | ||
15:22
p6bannerbot sets mode: +v lelf``
15:23
zakharyas joined,
p6bannerbot sets mode: +v zakharyas
15:25
lelf` left,
lelf``` joined
15:26
p6bannerbot sets mode: +v lelf```
15:27
lelf`` left
15:30
aindilis left
15:31
aindilis joined
15:32
p6bannerbot sets mode: +v aindilis
15:41
rindolf left
15:50
lizmat left
15:52
cognominal-p6 joined
15:53
regreg joined,
p6bannerbot sets mode: +v cognominal-p6
15:54
p6bannerbot sets mode: +v regreg
15:57
rindolf joined,
jbotz_ joined
15:58
p6bannerbot sets mode: +v rindolf,
p6bannerbot sets mode: +v jbotz_
15:59
jbotz left
16:02
Cleverson joined,
aindilis left,
p6bannerbot sets mode: +v Cleverson
16:04
cognominal-p6 left,
cognominal-p6 joined
16:05
p6bannerbot sets mode: +v cognominal-p6
16:09
guifa left
16:10
Cleverson left,
aindilis joined
16:11
p6bannerbot sets mode: +v aindilis
|
|||
SmokeMachine | m: say “hello”: | 16:12 | |
camelia | hello | ||
16:15
lelf``` is now known as lelf
16:18
lelf is now known as lel,
lel is now known as lelf
16:20
Zoffix joined,
p6bannerbot sets mode: +v Zoffix
|
|||
Zoffix | pmurias: that sounds like a bug with heredocs and should be filed | 16:20 | |
16:20
cognominal-p6 left
|
|||
Zoffix | pmurias: but you can use method form of EVAL to bypass monkey | 16:20 | |
m: my $v = 'say "noice"'; "$v".EVAL | 16:21 | ||
camelia | noice | ||
16:23
_uzl joined
16:24
p6bannerbot sets mode: +v _uzl
16:25
uzl left
|
|||
pheix | Hi, #perl6! I've found a bug in doc. Here: docs.perl6.org/routine/add_attribute, $name param is spare and raises "Too many positionals passed; expected 3 arguments but got 4". | 16:27 | |
timotimo | if you use the .^add_attribute form, then $obj will be passed for you | 16:29 | |
it would probably be good to have a little note about that in every metamodel method | 16:30 | ||
pheix | timotimo: got "Too many" on simple .add_attribute | 16:31 | |
timotimo | that's more interesting | ||
true, the add_attribute method in src/Perl6/AttributeContainer.nqp actually only takes $obj and $meta_attr | 16:32 | ||
and the name comes from the $meta_attr.name | |||
good catch | |||
it'd sure be nice to have a direct link to the edit form on github for the right file right from the page itself ... | 16:33 | ||
Geth | doc: 0097c67631 | timo++ (committed using GitHub Web editor) | doc/Type/Metamodel/AttributeContainer.pod6 remove the `$name` parameter that add_attribute doesn't take thanks to pheix++ on irc for the tip |
16:34 | |
synopsebot | Link: doc.perl6.org/type/Metamodel::Attr...eContainer | ||
sena_kun | timotimo, it is at the bottom of the page, not directly edit form though, but it's one click distance. | ||
pheix | \m/ | ||
timotimo | oh, it is? | 16:35 | |
docs.perl6.org/routine/add_attribute - not on pages that pull together text from multiple pages :) | |||
sena_kun | oh, indeed. sorry. | 16:36 | |
timotimo | no prob | ||
it'd have to look different, of course | |||
since these pages have multiple source files | |||
though it could also put a source location anchor on the url for the editor, if it supports that | 16:37 | ||
16:38
_uzl left
16:44
uzl joined,
uzl left
16:47
cognominal-p6 joined,
p6bannerbot sets mode: +v cognominal-p6
|
|||
pheix | are there any news about alias name for Perl6? | 16:48 | |
16:48
rhizon8r left
16:49
rhizon8r joined,
p6bannerbot sets mode: +v rhizon8r
|
|||
Kaiepi | m: say 1..10 Z/ (2,4...20) | 16:51 | |
camelia | (0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5) | ||
Kaiepi | m: my $a = 'a'; $a [R~]= 'b'; say $a | ||
camelia | ba | ||
Kaiepi | what other modifiers like R and Z exist? | 16:52 | |
timotimo | Kaiepi: S, but it doesn't do anything | 16:53 | |
and X, which is extremely useful | |||
16:54
cognominal-p6 left
16:55
cognominal-p6 joined,
p6bannerbot sets mode: +v cognominal-p6
|
|||
tobs | Kaiepi: technically also ! as in `21 !R%% 5` | 16:56 | |
if you search for metaoperators, there are some more in that category | 16:57 | ||
timotimo | if you count !, then you can also count = | 16:59 | |
tobs | timotimo: do you have an example? | 17:00 | |
oh, of course += and co., with the = on the right, not the left :/ | 17:03 | ||
pmurias | pheix: TimToady is working on one | 17:05 | |
Zoffix: it's a bug, the problem is that heredocs are filled in a postprocessing pass | |||
so at the point the EVAL arguments are checked for being literals the heredocs isn't a literal yet | 17:07 | ||
17:11
atroxaper left
17:18
pheix left
17:21
rhizon8r left,
rhizon8r joined
17:22
p6bannerbot sets mode: +v rhizon8r,
rhizon8r left
17:23
MasterDuke joined,
p6bannerbot sets mode: +v MasterDuke,
MasterDuke left,
MasterDuke joined,
herbert.freenode.net sets mode: +v MasterDuke,
p6bannerbot sets mode: +v MasterDuke
17:30
dotdotdot left
17:32
dotdotdot joined,
p6bannerbot sets mode: +v dotdotdot
17:41
lelf left
17:45
dotdotdot left
18:00
ryn1x joined
18:01
p6bannerbot sets mode: +v ryn1x
18:02
lelf joined
18:03
p6bannerbot sets mode: +v lelf
|
|||
Geth | doc: 8425844e6f | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/pod.pod6 add missing 'v' |
18:04 | |
synopsebot | Link: doc.perl6.org/language/pod | ||
18:04
dotdotdot joined
|
|||
timotimo | tobs: i like max= and min= | 18:05 | |
18:05
p6bannerbot sets mode: +v dotdotdot
|
|||
Geth | doc: nxadm++ created pull request #2403: Fix #2402 |
18:08 | |
doc: a49bb55b82 | (Claudio Ramirez)++ | doc/Language/functions.pod6 Fix #2402 |
|||
doc: 15183a2026 | nxadm++ (committed using GitHub Web editor) | doc/Language/functions.pod6 Merge pull request #2403 from nxadm/master Fix #2402 |
|||
synopsebot | Link: doc.perl6.org/language/functions | ||
18:10
domidumont joined
18:11
kurahaupo left,
p6bannerbot sets mode: +v domidumont
18:12
regreg left
18:36
noganex_ left,
dotdotdot left,
noganex joined
18:37
p6bannerbot sets mode: +v noganex,
lelf` joined
18:38
p6bannerbot sets mode: +v lelf`
18:39
lelf left
18:40
kurahaupo joined
18:41
p6bannerbot sets mode: +v kurahaupo,
ExtraCrispy left
18:42
lelf` left,
ExtraCrispy joined,
p6bannerbot sets mode: +v ExtraCrispy
18:43
dotdotdot joined,
dotdotdot left
18:47
dotdotdot joined,
pecastro joined,
p6bannerbot sets mode: +v dotdotdot
18:48
p6bannerbot sets mode: +v pecastro
19:01
dotdotdot left
19:04
zakharyas left
|
|||
moritz | I have some ideas for reviving the Perl 6 Coding Contest: gist.github.com/moritz/6f06ec7153c...2616d8b075 | 19:04 | |
19:04
zakharyas joined
19:05
p6bannerbot sets mode: +v zakharyas
19:06
dotdotdot joined
19:07
p6bannerbot sets mode: +v dotdotdot
|
|||
masak | ooh | 19:09 | |
it was a lot of fun, wasn't it | 19:10 | ||
timotimo | it was | ||
19:12
cjkinni left
19:15
dotdotdot left
19:19
cjkinni joined,
p6bannerbot sets mode: +v cjkinni
19:25
dotdotdot joined
19:26
p6bannerbot sets mode: +v dotdotdot,
noganex_ joined
19:27
p6bannerbot sets mode: +v noganex_
19:28
noganex left
|
|||
Geth | doc: 937646d297 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/mop.pod6 give a practical example for a regular user |
19:30 | |
synopsebot | Link: doc.perl6.org/language/mop | ||
19:31
domidumont left
|
|||
Geth | doc: 392d834673 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/mop.pod6 clearly show the common acronym |
19:32 | |
19:32
dotdotdot left
|
|||
timotimo | moritz: to get the best ideas for reviving the perl 6 coding contest, we should have a perl 6 coding contest contest | 19:34 | |
Geth | doc: 6483f941cc | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/mop.pod6 use a better sub name |
19:39 | |
synopsebot | Link: doc.perl6.org/language/mop | ||
19:40
ryn1x left
|
|||
Zoffix | I don't think we have enough information to proceed. We should have a perl 6 coding contest contest contest to get ideas for how to handle the perl 6 coding contest contest | 19:41 | |
Bucciarati: d | 19:44 | ||
Bucciarati: wrong person | |||
buggable: d | |||
buggable | Zoffix, Diwali is in 16 days, which is 2 weeks, 1 day, 4 hours, 15 minutes, and 24 seconds. Need to review -162 commits per day (-1139/week) to complete. Need 1 teaser flyers. Still have 2 TODO features costing 8 hours. Still have 0.3 policies to write. Still have ~95% of ChangeLog to do. | ||
moritz | no chance to stem the coding contest in the remaining 16 days | 19:49 | |
19:49
lichtkind left
|
|||
timotimo | maybe we can hold a contest to see how to get out of this ever expanding tower of contest-contestification | 19:51 | |
tbrowder___ | ref Diwali: maybe another Christmas release? a tradition? | ||
p6 present? | |||
timotimo | nine: github.com/rakudo/rakudo/blob/mast...y.pm6#L263 - do you know how best to make this work under circumstances where trying to precompile a module gives "no such file or directory"? | 19:52 | |
i'd expect it comes from the proc::async | |||
tbrowder___ | p6 gift to mankind | 19:53 | |
timotimo | lol | ||
19:53
dotdotdot joined,
dotdotdot left
|
|||
timotimo | the $*EXECUTABLE is "-bash".IO | 19:53 | |
i can just set --exec-name | 19:54 | ||
--execname* | |||
MasterDuke | i think TimToady said he explicitly didn't want to release 6.d on a christmas to not appear to be setting a precedent of christmas releases | ||
timotimo | m) m) m) m) m) | 19:55 | |
Zoffix raises an eyebrow at suggestion of delaying Diwali to happen on Christmas instead of Diwali, for the express purpos of running a conditing contest at the same time -_- | 19:58 | ||
tbrowder___ | ok, i forgot Diwali was a date or event... | 19:59 | |
timotimo | you mean a confectionery contest? | ||
tbrowder___ | not Dinali in Alaska... | ||
MasterDuke | nor a river in egypt | 20:00 | |
timotimo | (that's because a confectionery is a konditor in german) | ||
(so a conditing contest sounds a little bit like konditorei contest) | |||
20:00
lizmat joined,
p6bannerbot sets mode: +v lizmat
|
|||
tbrowder___ | ah, the old saturday night live crew is here again | 20:02 | |
20:03
zakharyas left
20:04
zakharyas joined,
p6bannerbot sets mode: +v zakharyas
20:05
zakharyas left
20:06
aindilis left,
zakharyas joined,
aindilis joined
20:07
p6bannerbot sets mode: +v zakharyas,
p6bannerbot sets mode: +v aindilis
20:09
zxcvz left
20:12
dotdotdot joined
20:13
p6bannerbot sets mode: +v dotdotdot
|
|||
geekosaur | why is $*EXECUTABLE claiming to be a login shell? | 20:16 | |
timotimo | because i just catted ./perl6-m and it has --execname="$0" | 20:20 | |
geekosaur | that seems like some rather impressive confusion somewhere, like .bash_profile is doing "source perl6-m". or someone set perl6-m as login shell and somehow login is chasing the #!s instead of just using the basename like it's supposed to | 20:22 | |
timotimo | huh? | ||
catted and copy-pasted is what i meant to say | |||
geekosaur | oh | 20:23 | |
El_Che | is it only on you machine or something generic? | ||
> say $*EXECUTABLE | |||
"/opt/rakudo-pkg/bin/rakudo".IO | |||
on mine | |||
geekosaur | if I am understanding correctly, timotimo cut and pasted part of perl6-m into .profile | 20:24 | |
timotimo | no | ||
geekosaur | or .bashrc but that has other confusions built in that could make an even bigger mess | ||
timotimo | into the prompt | ||
geekosaur | ah | ||
thatd do it, yes | |||
timotimo | that was one big confusion | 20:25 | |
the other one was that "rr record /foo/bar/moar blah/perl6.moar" just outputted "Tests: some-github-address" | |||
20:25
dotdotdot left
|
|||
timotimo | and "which rr" gave me /usr/bin/rr | 20:25 | |
but which doesn't know about aliases | 20:26 | ||
geekosaur | right, it's easily confused | ||
it can also tell you what the next shell you start will see instead of what your running shell sees | |||
POSIX specced "type" instead of "which" for a reason | 20:27 | ||
timotimo | ah, that's what i needed | 20:28 | |
i wouldn't have thought of "type", i know type on DOS is like cat | |||
20:28
Guest13389 left
|
|||
timotimo | BTW, PROCJAM 2018 is running since yesterday and until... a week later? | 20:31 | |
geekosaur | they wanted to avoid stuff already in use on varius unixes, whchc ounts out "where", "which", and "whence" among others | ||
timotimo | WHY | ||
20:31
holyghost left
20:32
holyghost joined,
p6bannerbot sets mode: +v holyghost,
dotdotdot joined
20:33
robertle left,
p6bannerbot sets mode: +v dotdotdot
20:39
dotdotdot left,
zakharyas left
20:44
|oLa| joined
20:45
pmurias left,
p6bannerbot sets mode: +v |oLa|,
dotdotdot joined
20:46
p6bannerbot sets mode: +v dotdotdot
20:48
beeman left
20:50
dotdotdot left
20:53
Guest13389 joined,
dotdotdot joined
20:54
p6bannerbot sets mode: +v Guest13389,
p6bannerbot sets mode: +v dotdotdot,
beeman joined,
p6bannerbot sets mode: +v beeman
20:57
|oLa| left
20:58
dotdotdot left
20:59
dotdotdot joined
21:00
p6bannerbot sets mode: +v dotdotdot
21:03
dotdotdot left
21:04
dotdotdot joined,
itaipu joined
21:05
p6bannerbot sets mode: +v dotdotdot,
p6bannerbot sets mode: +v itaipu
21:06
dotdotdot left,
dotdotdot joined
21:07
p6bannerbot sets mode: +v dotdotdot,
dotdotdot left
21:10
dotdotdot joined
21:11
p6bannerbot sets mode: +v dotdotdot
21:18
dotdotdot left
21:19
tobs left,
dotdotdot joined
21:20
tobs_ joined,
p6bannerbot sets mode: +v tobs_,
tobs_ is now known as tobs,
p6bannerbot sets mode: +v dotdotdot
21:27
dotdotdot left
21:34
cjkinni left
21:35
cjkinni joined,
p6bannerbot sets mode: +v cjkinni
21:36
dotdotdot joined
21:37
p6bannerbot sets mode: +v dotdotdot
21:44
dotdotdot left
21:47
kybr left
21:54
sena_kun left
21:55
ryn1x joined,
p6bannerbot sets mode: +v ryn1x
21:56
dotdotdot joined
21:57
p6bannerbot sets mode: +v dotdotdot
21:59
regreg joined,
p6bannerbot sets mode: +v regreg
22:01
dotdotdot left
22:07
regreg left
22:09
dotdotdot joined
22:10
p6bannerbot sets mode: +v dotdotdot
22:12
Zoffix left
22:15
rindolf left,
pecastro left
22:26
aindilis left
22:27
aindilis joined
22:28
p6bannerbot sets mode: +v aindilis
22:34
ryn1x left
22:35
ryn1x joined,
vrurg joined,
p6bannerbot sets mode: +v ryn1x
22:36
p6bannerbot sets mode: +v vrurg
22:37
dotdotdot left
22:39
dotdotdot joined
22:40
p6bannerbot sets mode: +v dotdotdot
22:52
dotdotdot left
22:53
ryn1x left,
dotdotdot joined
22:54
p6bannerbot sets mode: +v dotdotdot
22:58
dotdotdot left
22:59
HaraldJoerg left
23:09
graphene joined
23:10
p6bannerbot sets mode: +v graphene
|
|||
timotimo | www.twitch.tv/classictetris - classic tetris world championship grand finals | 23:10 | |
23:12
dotdotdot joined
23:13
p6bannerbot sets mode: +v dotdotdot
23:18
dotdotdot left
23:23
dotdotdot joined
23:24
p6bannerbot sets mode: +v dotdotdot
23:31
dotdotdot left
23:43
dotdotdot joined
23:44
p6bannerbot sets mode: +v dotdotdot
23:48
dotdotdot left
23:55
dotdotdot joined
23:56
p6bannerbot sets mode: +v dotdotdot
23:57
jbotz_ left,
AlexDaniel left
23:58
AlexDaniel joined,
p6bannerbot sets mode: +v AlexDaniel
|