»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
TimToady | ZoffixLappy: obviously we're already to Step 3: Then they fight you. | 00:14 | |
ZoffixLappy | :) | 00:15 | |
Xliff | Next stop: "You Win!" | 00:16 | |
00:19
pierre_ joined
|
|||
BenGoldberg | m: for 1..2 { say $^x, $^y }; for 1..2 { say $^y, $^x }; | 00:22 | |
camelia | rakudo-moar 3cab7c: OUTPUT«1221» | ||
BenGoldberg | While having placeholder arguments sorted alphabetically makes intuitive sense, istr them being documented as being used in order of appearance... that is, both of the above two ought to produce the same output. | 00:25 | |
ZoffixLappy | If they're documented that way, it's an error that should be fixed. Perhaps, you're confusing regex captures? | 00:29 | |
m: 'foobar' ~~ /(foo(bar))/; say $0; say $1 | |||
camelia | rakudo-moar 3cab7c: OUTPUT«「foobar」 0 => 「bar」Nil» | ||
ZoffixLappy | :/ not the output I expected.... | ||
m: 'foobar' ~~ /(foo) (bar)/; say $0; say $1 | 00:30 | ||
camelia | rakudo-moar 3cab7c: OUTPUT«「foo」「bar」» | ||
ZoffixLappy | Interesting... | ||
BenGoldberg | en.wikibooks.org/wiki/Perl_6_Progr..._Arguments | 00:31 | |
m: dd 'foobar' ~~ /(foo(bar))/; | 00:32 | ||
camelia | rakudo-moar 3cab7c: OUTPUT«Match.new(ast => Any, list => (Match.new(ast => Any, list => (Match.new(ast => Any, list => (), hash => Map.new(()), orig => "foobar", to => 6, from => 3),), hash => Map.new(()), orig => "foobar", to => 6, from => 0),), hash => Map.new(()), orig => "foobar…» | ||
ZoffixLappy | Fixed. Thanks. | 00:34 | |
00:34
wamba left
00:36
Ben_Goldberg joined,
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg
|
|||
ugexe | is there a way to get around another subroutine calling `exit()` other than &*EXIT? | 00:39 | |
&exit.wrap({ return; }); still exits | |||
ZoffixLappy | m: sub foo {exit}; &exit.wrap({ ; }); foo; say "Meow" | 00:43 | |
camelia | rakudo-moar 3cab7c: OUTPUT«Meow» | ||
ZoffixLappy | Seems to work? | ||
00:58
Actualeyes joined
01:03
tardisx left
01:09
ZoffixWin_ joined,
ZoffixWin_ left,
ZoffixWin_ joined
01:11
tardisx joined
01:22
Herby_ joined
|
|||
Herby_ | Evening, everyone! | 01:22 | |
o/ | |||
hotel | \o | ||
ZoffixLappy | \o | 01:26 | |
Herby_ | o/ | ||
01:26
molaf joined
|
|||
Herby_ | ZoffixLappy: you're a blogging machine! | 01:27 | |
I'm learning quite a bit reading through them, hope you keep it up :) | |||
hotel | oh that's a good idea | ||
make a blogging machine in p6 | |||
Herby_ | when in doubt, blog it out | ||
hotel | someone made a shitpost generator in java for tumblr | 01:28 | |
ZoffixLappy | Herby_, thanks. I'm doing it for quite selfish reasons of trying to learn the stuff myself :) This morning, I still had no solid idea of how to use the S/// operator and now I do :) | ||
Herby_ | hotel: I just looked it up, here's the tagline for it: "I am a JAVA program who's purpose is to churn out the worst posts imaginable" | 01:33 | |
thats great | |||
hotel | yep | ||
Herby_ | and the 5th post on that page: "I am the zodiac" | 01:35 | |
ZoffixLappy | heh | 01:36 | |
hotel | so like I said, why not make one in p6? :P | ||
maybe that'll be my first project | |||
Herby_ | blog about the blog project. i'd read it | ||
i don't have the chops for that yet | |||
hotel | I don't have any chops yet, still can't get rakudo to build right | 01:37 | |
though that's mostly my fault | 01:38 | ||
>shiny tools have shiny problems< | 01:40 | ||
dalek | osystem: fcf6c5e | (Andy Weidenbaum)++ | META.list: Add module TXN::Parser |
01:45 | |
osystem: b119fb8 | (Zoffix Znet)++ | META.list: Merge pull request #201 from atweiden/txn-parser Add module TXN::Parser: github.com/atweiden/txn-parser |
|||
01:48
pierre_ left
01:55
colomon joined
01:56
AlexDaniel joined
01:57
pierre_ joined
|
|||
AlexDaniel | this is so awesome essenmitsosse.de/pixel/?showcase=tr...mp;slide=4 | 02:02 | |
reminds me of perl a bit :) | |||
m: use MONKEY-TYPING; augment class Int { method foo { say self } }; int.foo | 02:05 | ||
camelia | rakudo-moar 3cab7c: OUTPUT«(int)» | ||
ZoffixLappy | AlexDaniel, heh... I hope it's not this part that reminds you of Perl: i.imgur.com/jp9yT6v.jpg | 02:10 | |
:) | |||
Pretty cool though... Other than the crash.... | 02:11 | ||
AlexDaniel | ZoffixLappy: no, it does not remind me that your browser is broken :)1 | 02:12 | |
ZoffixLappy | lol | ||
02:14
Herby_ left
02:15
winger_ joined
02:18
kid51 left
02:24
noganex joined
02:29
pierre_ left
02:33
hotel_california joined
|
|||
dalek | c: 7ad327f | (Zoffix Znet)++ | doc/Language/operators.pod: Fix heading levels |
02:35 | |
02:47
winger__ joined
02:48
pierre_ joined
02:51
winger_ left,
pierre_ left
02:52
pierre_ joined
02:57
pierre_ left
02:58
pierre_ joined,
colomon left
03:05
colomon joined
03:07
colomon left
03:19
hotel_california is now known as hotel
03:29
vendethiel joined
03:41
Amnez777 joined
03:44
Actualeyes left
03:45
colomon joined,
Amnez777- joined
03:47
Amnez777 left
03:50
BenGoldberg left
04:17
pierre_ left
04:19
pierre_ joined
04:22
pierre_ left
04:23
pierre_ joined
04:28
Amnez777- left,
Cabanossi joined
04:29
Actualeyes joined
04:31
pierre_ left
04:33
Amnez777 joined
04:34
vendethiel left
04:35
Timbus joined
04:36
pierre_ joined
04:37
pierre_ left
|
|||
MadcapJake | m: PROCESS::<&EXIT> = -> $_ { Nil }; exit | 04:39 | |
camelia | ( no output ) | ||
MadcapJake | ugexe: ^^ | ||
04:40
hotel is now known as hotel|netteiru
|
|||
jdv79 | ZoffixWin_: are you an educator or well versed presenter? | 04:40 | |
nice posts lately. | 04:41 | ||
04:41
Actualeyes left
04:55
Actualeyes joined
05:03
vendethiel joined
05:16
zhmylove joined
05:21
al2o3-cr joined
05:22
rurban joined
05:24
vendethiel left,
jjido joined
05:26
zhmylove left
05:28
m0ltar left
05:29
zhmylove joined
05:30
m0ltar joined
05:37
pierre_ joined
05:40
chienjo joined
05:42
chienjo left
05:43
pierre_ left
05:44
aries_liuxueyang joined
05:45
domidumont joined,
domidumont left
05:46
domidumont joined
05:50
domidumont left
05:51
domidumont joined,
jjido left
05:52
finanalyst joined
|
|||
finanalyst | hi. Is there any good way to test code containing 'warn'? | 05:52 | |
yoleaux | 22 Feb 2016 20:37Z <ab6tract> finanalyst: your 'Intro to Sixy Perl' pastebin is awesome! you should consider publishing it somewhere more permanent! | ||
finanalyst | i wrote to perl-users, but thought I would ask here too. | 05:54 | |
05:56
finanalyst left,
finanalyst joined
05:57
CIAvash joined
05:58
cognominal left
05:59
sno joined
06:01
finanalyst left
06:02
_mg_ joined
06:05
finanalyst joined
06:07
domidumont left
06:10
zhmylove left
06:13
zhmylove joined
06:20
hotel joined
06:21
hotel|netteiru left
06:24
firstdayonthejob joined
06:25
domidumont joined
06:26
zhmylove left
06:30
zhmylove joined
06:31
CIAvash left
06:34
CIAvash joined,
hotel_california joined
|
|||
TimToady | finanalyst: warn throws a control exception that can be caught with a CONTROL block | 06:35 | |
06:35
hotel left
|
|||
finanalyst | TimToady: that I understand. But it is how to do this in a test snippet that I'm not sure about. Where does the CATCH block go | 06:36 | |
it would seem intuitive to me that there is a 'warns-ok' routine in TEST | 06:37 | ||
06:38
jjido joined,
firstdayonthejob left
06:43
jjido left
06:44
pierre_ joined,
jjido joined
06:45
rurban left,
zhmylove left
|
|||
masak | mornin', #perl6 | 06:47 | |
06:48
zhmylove joined
06:49
jjido left
06:52
RabidGravy joined
|
|||
moritz | \o masak, * | 06:53 | |
RabidGravy | oink! | 06:57 | |
_nadim | Morning all | 06:58 | |
07:02
jamesnek1 joined
07:04
cschwenz joined
|
|||
cschwenz | \o #perl6 :-) | 07:04 | |
07:08
sue joined
07:10
abraxxa joined
|
|||
cschwenz | in perl6, how do i get the computer to do nothing for 0.012 seconds? (i need to translate some perl5 code which has "select( undef, undef, undef, 0.012 );") | 07:13 | |
moritz | cschwenz: sleep 0.012 | 07:14 | |
07:15
zhmylove left
|
|||
moritz | I hope you're not worried that it only applies to the current thread, not the whole computer :-) | 07:15 | |
cschwenz | \o/ perl6 has a sane sleep ! | ||
moritz: i'm very okay with it only applying to the current thread :-) | 07:16 | ||
moritz | m: sleep 0.012; say now - INIT now | ||
camelia | rakudo-moar 3cab7c: OUTPUT«0.013980» | ||
RabidGravy | or if you actually want to do something something in the future but could usefully be doing something in the meantime, see Promise.in($secs) | 07:17 | |
07:18
boegel joined
|
|||
_nadim | Do we have a module that given something that looks like a command line would parse it? The format of the command line itself is not known (user defined) | 07:19 | |
cschwenz | isn't there a port of Getopt::Long? | ||
RabidGravy | I think so | 07:20 | |
_nadim | There is, completely undocumented but i wrote "format of options are unknown" | ||
RabidGravy | modules.perl6.org/#q=getopt | ||
07:21
tardisx left
|
|||
_nadim | I did that, Getopt:::Long is not documented, Getopt::Tiny makes the same mistake as P5 and the doc is, well, fuzzy, Getopt::Type doesn't fit the work. | 07:21 | |
I smell a Getopt::Whatever module coming | 07:22 | ||
RabidGravy | yes I think you need to read some code | ||
and/or help make one of the existing modules do what you want | 07:23 | ||
07:23
zhmylove joined
|
|||
_nadim | I read the codes, and if there is nothing available, Getopt::Whatever will come, but it would be a pitty to no use what already exists. | 07:23 | |
RabidGravy | on the face of it, it doesn't seem that difficult | 07:24 | |
07:24
tardisx joined
|
|||
_nadim | No, a grammar and some actions. And not even that is necessary. | 07:25 | |
but I want to finish what I am doing not start another module in the middle of it. | 07:27 | ||
RabidGravy | life sucks like that | ||
07:27
_28_ria joined
|
|||
_nadim | specially when the thing one is doing is a template to make starting new modules easier ;) | 07:29 | |
07:33
domidumont left
07:34
telex joined
07:36
domidumont joined
07:39
hotel joined
07:40
hotel_california left
07:42
daniel-s joined,
aries_liuxueyang left,
leont joined
07:43
ufobat joined
|
|||
ufobat | god morning! | 07:43 | |
RabidGravy | erp | ||
07:44
zhmylove left,
jjido joined
07:49
tardisx left,
jjido left,
al2o3-cr left
07:52
darutoko joined,
zhmylove joined
07:53
dolmen joined
07:55
zakharyas joined
07:56
sue left,
maybekoo2 joined
07:57
zhmylove left,
aries_liuxueyang joined
08:10
Amnez777 left,
nebuchadnezzar joined,
Amnez777 joined
08:12
g4 joined
08:15
ZoffixWin_ left
08:20
al2o3-cr joined
08:25
al2o3-cr left
08:26
dolmen left
08:27
CIAvash left
|
|||
dalek | osystem: 515bf6e | RabidGravy++ | META.list: Add App::ModuleSnap See github.com/jonathanstowe/App-ModuleSnap |
08:29 | |
RabidGravy | Xliff, ^ | ||
08:31
wamba joined
|
|||
RabidGravy | thus ensuring that the next one is my fiftieth | 08:31 | |
Any objections if I alter the doc.perl6.org/language/modules#Dist...ng_Modules to have META6.json rather than META.info? | 08:33 | ||
reason being that the future PAUSE thingy requires that afaiu | 08:34 | ||
also do both zef and panda support the specced "source" now? | 08:36 | ||
08:39
leont left
08:43
Cabanossi left,
ufobat left
|
|||
_nadim | jnthn: App-ModuleSnap++ | 08:44 | |
jnthn | ...what? :) | 08:45 | |
08:46
jjido joined
|
|||
_nadim | hehe, the other jonathan :) | 08:47 | |
08:50
Cabanossi joined,
jjido left
08:52
rindolf joined
09:04
tardisx joined
09:06
tardisx left
|
|||
RabidGravy | easy mistake to make, he's the one with the beard | 09:13 | |
but jnthn++ just because | |||
_nadim | RabidGravy++ (now I know who you are ;) ) | 09:20 | |
09:24
zhmylove joined
|
|||
RabidGravy | :-O | 09:25 | |
stmuk_, you about? | 09:26 | ||
09:26
domidumont left
|
|||
cschwenz | so, from doc.perl6.org/language/operators#Op...Precedence , what do "~&", "~<", and "~>" do? (the only mention of them i can find is in the linked operator precedence table) | 09:27 | |
psch | cschwenz: bit-wise and, bitshift left, bitshift right, in order | ||
oh no | |||
Str-wise, not bit-wise | |||
i don't know if the semantics are actually clear | |||
hm, char wise maybe, actually? | 09:28 | ||
moritz | they make sense on buffers | ||
but on Grapheme clusters? | |||
psch | m: say "foo" ~& "fou" | ||
camelia | rakudo-moar 6cb231: OUTPUT«foe» | ||
psch | m: say "foò" ~& "fou" | ||
camelia | rakudo-moar 6cb231: OUTPUT«fop» | ||
psch | .u snowman | ||
yoleaux | U+2603 SNOWMAN [So] (☃) | ||
psch | .u rocket | ||
yoleaux | U+1F680 ROCKET [So] (🚀) | ||
psch | m: say "🚀" +& "🚀" | 09:29 | |
camelia | rakudo-moar 6cb231: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5🚀' (indicated by ⏏) in block <unit> at /tmp/R2_bby_Znw line 1Actually thrown at: in block <unit> at /tmp/R2_bby_Znw line 1» | ||
psch | m: say "🚀" ~& "🚀" | ||
camelia | rakudo-moar 6cb231: OUTPUT«🚀» | ||
psch | oh ffs :) | ||
m: say "🚀" ~& "☃" | |||
camelia | rakudo-moar 6cb231: OUTPUT«☀» | ||
cschwenz | :-D | ||
so they would appear to work on NFG characters? | 09:30 | ||
moritz | they appear to work, yes | 09:31 | |
psch | m: say ("🚀".ord +& "☃".ord).chr # looks equivalent from here | ||
camelia | rakudo-moar 6cb231: OUTPUT«☀» | ||
RabidGravy | yeah, bitwise is +< etc | 09:32 | |
m: say 2 +< 2 | |||
camelia | rakudo-moar 6cb231: OUTPUT«8» | ||
jnthn | It works at codepoint level, iirc | ||
So it operates on each codepoint in an NFG synthetic | |||
Which means you may or may not get another synthetic out :) | |||
cschwenz | jnthn++ | ||
psch | .u combining | ||
yoleaux | U+0300 COMBINING GRAVE ACCENT [Mn] (◌̀) | ||
U+0301 COMBINING ACUTE ACCENT [Mn] (◌́) | |||
U+0302 COMBINING CIRCUMFLEX ACCENT [Mn] (◌̂) | |||
cschwenz | that is what i was trying to ask about | ||
psch | m: say "🚀\c[COMBINING GRAVE ACCENT]" ~& "☃" | 09:33 | |
camelia | rakudo-moar 6cb231: OUTPUT«☂» | ||
jnthn | Whether it's useful for anything outside of ASCII cute tricks is another matter :) | ||
oh interesting.... | 09:35 | ||
I'm not sure it actually is doing what I thought it would be | |||
github.com/MoarVM/MoarVM/blob/mast...ps.c#L1373 | |||
moritz | well, there is a use case for string bitwise ops | ||
for example if you want to to find borders in a text table | |||
you can start with chr(255) x 80, and ~& every line | 09:36 | ||
and see what columns remain in the end | |||
if your data is large enough, only separate columns have non-zero bytes in the end | |||
09:37
domidumont joined
|
|||
jnthn | Cute :) | 09:37 | |
09:37
zhmylove left
|
|||
moritz | (or if you know the separator character in advance, you can see the string with that instead of the chr(255), and see which columsn remain the same) | 09:38 | |
jnthn: that's signed integer arithmetic in MVM_string_bitand, right? | 09:40 | ||
09:41
zhmylove joined
|
|||
moritz | can this create the number of a not-yet-created grapheme cluster? | 09:41 | |
jnthn | moritz: Yeah, that's what I fear might happen | 09:42 | |
It's not clear why it works this way | |||
moritz | m: say "नि" & "5" | ||
camelia | rakudo-moar 6cb231: OUTPUT«all(नि, 5)» | ||
moritz | m: say "नि" ~& "5" | ||
camelia | rakudo-moar 6cb231: OUTPUT«4» | ||
moritz | m: say "नि" ~& "\r\n" | ||
camelia | rakudo-moar 6cb231: OUTPUT«नि» | ||
RabidGravy | can anyone else remember what the github alternative thingy that stmuk_ is using is? | 09:43 | |
some GitFoo | |||
moritz | RabidGravy: bitbucket? gitlab? | ||
RabidGravy | gitlab | ||
cheers, just changing the wording of the modules.pod to make it clear that github is per example rather than an absolute requirement | 09:44 | ||
moritz | m: say "नि" ~> 1 | ||
camelia | rakudo-moar 6cb231: OUTPUT«infix:«~>» not yet implemented. Sorry.  in block <unit> at /tmp/3CjJH3GbMW line 1» | ||
moritz | m: say "नि" ~< 1 | 09:45 | |
camelia | rakudo-moar 6cb231: OUTPUT«infix:«~<» not yet implemented. Sorry.  in block <unit> at /tmp/rBvD9tOSOA line 1» | ||
moritz not sorry at all | |||
09:46
jjido_ joined
09:50
nowan_ joined
09:51
jjido_ left
|
|||
stmuk_ | RabidGravy: gitlab | 09:54 | |
RabidGravy | and that works fine for modules doesn't it (before I commit this) | ||
stmuk_ | it pretty much resembles github and you can login with gh creds | 09:55 | |
RabidGravy | cool | ||
stmuk_ | yes some features aren't visible on modules.perl6.org butapart from that that works fine | ||
09:56
domidumont left
|
|||
RabidGravy | excellent | 09:57 | |
is it worth explaining *why* you probably want to use META6.json rather META.info in the modules doc? I'm torn | 09:58 | ||
stmuk_ | colour syntax in vim | ||
RabidGravy | :) | ||
I think I'll leave it, not much point describing forward compatibility when it's not quite clear what the end state will be | 10:00 | ||
10:01
zhmylove left
10:04
zhmylove joined
10:05
domidumont joined
|
|||
dalek | c: 28989a3 | RabidGravy++ | doc/Language/modules.pod: A few small changes: * prefer META6.json to META.info * more explanation on 'provides' * make it clear that other repos than github may work |
10:06 | |
10:08
Actualeyes left
|
|||
RabidGravy | what next? | 10:17 | |
psch | full SysEx support for Audio::PortMIDI? :P | 10:19 | |
10:19
maybekoo2 left
|
|||
RabidGravy | I thought you were sending me a patch for that ;-p | 10:19 | |
psch | yeah, i might eventually :) | 10:20 | |
RabidGravy | lots of things that I could fix up in my existing modules, also some 5 to 10 modules that I haven't finished yet | ||
cschwenz | error message feature request: when perl6 cannot find a matching signature, perl6 prints all of the signatures it found for a multi-method; will we please add the signature it was trying to find? | 10:21 | |
RabidGravy | it does doesn't it? | ||
psch | m: multi f($) { }; multi f($, $) { }; f 1, 2, 3 | ||
camelia | rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qtM5TzAf4ICalling f(Int, Int, Int) will never work with any of these multi signatures: ($)  ($,)at /tmp/qtM5TzAf4I:1------> 3multi f($) { }; multi f($, $) { }; 7⏏5f 1, 2, 3» | ||
RabidGravy | yeah | ||
psch | cschwenz: it does. at the very beginning :) | ||
ah, we still have a bug with disappearing anon positionals there :/ | 10:22 | ||
RabidGravy | it's different for multi methods | ||
psch | m: say :($, $).perl | ||
camelia | rakudo-moar 6cb231: OUTPUT«:($, $)» | ||
psch | m: say :($, $).gist | ||
camelia | rakudo-moar 6cb231: OUTPUT«($,)» | ||
RabidGravy | eugh | ||
cschwenz | so, i am seeing "Cannot call AUTOGEN( […] ); non of these signatures match: […]" are you saying the "[…] AUTOGEN( […] ) […]" is the signature it was trying to find? | 10:23 | |
RabidGravy | ah that old AUTOGEN thingy | ||
cschwenz | do i need to update/upgrade perl6? | ||
psch doesn't know about any AUTOGEN thingies | |||
RabidGravy | if you add "proto method <name> (|c) { * }" you will get the right name | 10:24 | |
psch, under some circumstances it doesn't create the proto name right so it just leaves it as "AUTOGEN" | 10:25 | ||
I've never figured out quite what those circumstances are sufficiently to RT IT | |||
psch | o.o | ||
that sounds a bit bad | |||
cschwenz: can you golf the code that gives you that error? | 10:26 | ||
in case it stays around when golfed this might be an angle to try and figure out what's actually happening | 10:27 | ||
cschwenz | psch: probably | ||
10:27
Actualeyes joined
|
|||
RabidGravy | it's something in the area of more than one multi with a certain number of candidates | 10:28 | |
cschwenz | so, with that solved, next question… if i have multi-methods which take a single positional value, and said value has a default, why does "$obj.foo()" not do what i mean and use the default? (instead it complains about not finding a signature match) | 10:29 | |
psch | m: class A { multi method f($ = "foo") { say "ok" }; }; A.f | ||
camelia | rakudo-moar 6cb231: OUTPUT«ok» | ||
psch | there most be more to that issue :) | 10:30 | |
RabidGravy | I think I've encountered that one before too, can't remember the circumstances | ||
10:30
zhmylove left
|
|||
RabidGravy | but yeah a golfed example of that one would be good | 10:31 | |
cschwenz | p6: class Foo { multi method bar( Int $baz = 1 ) { say "Int $baz"; }; multi method bar( Rat $baz = Rat.new(1, 1) ) { say "Rat $baz"; }; }; my $obj = Foo.new(); $obj.bar(); | 10:32 | |
camelia | rakudo-moar 6cb231: OUTPUT«Ambiguous call to 'bar'; these signatures all match::(Foo $: Int $baz = 1, *%_):(Foo $: Rat $baz = { ... }, *%_) in block <unit> at /tmp/tmpfile line 1» | ||
psch | oh, that's easy. two candidates with one parameter with default are two candidates with 0 parameters | ||
cschwenz | hmm, that error message is different than the one i'm seeing | ||
psch | cschwenz: maybe you do have to upgrade your rakudo :) | ||
cschwenz | psch++ | 10:33 | |
10:33
zhmylove joined
|
|||
psch | cschwenz: if it sticks around you might simply have golfed too much, too | 10:33 | |
...although i'm at a loss to guess what else could cause what you're describing | 10:34 | ||
10:39
cdg joined
10:43
cdg left
10:44
daniel-s left
10:47
robertle joined,
jjido_ joined,
tbrowder joined
|
|||
tbrowder | need help with env var PERL6LIB: rakudo (nom) seems not to recognize the colon path separator | 10:49 | |
...I set "export PERL6LIB=path1" and rakudo finds my module; I set "export PERL6LIB=path1:path2" and the module is not found; am I doing something stupid? | 10:50 | ||
10:50
daniel-s joined
|
|||
psch | tbrowder: PERL6LIB expects specs seperated by comma | 10:51 | |
a spec doesn't have to be a path, either | |||
which is why we don't use colon as a separator i guess, as it could be needed for a protocol | |||
like url#git://github.com/someone/something.git | 10:52 | ||
10:52
jjido_ left,
daniel-s left
10:53
daniel-s joined,
zhmylove left,
Actualeyes left
10:54
Actualeyes joined
|
|||
tbrowder | psch: oh! thanks, that works! next question then: how do I get the rakudo to search the paths in another rakudo install where the resources are specified differently? | 10:54 | |
psch | i don't understand the question. you want one rakudo executable to include the (sha1'd) module sources from another? | 10:55 | |
10:56
zhmylove joined
|
|||
tbrowder | psch: yes, or else tell me how to install them into the new rakudo build | 10:56 | |
psch | tbrowder: RabidGravy++ recently published a module for exactly that | 10:57 | |
RabidGravy | :) | ||
robertle | I have problems with understanding the very basics of modules as well: to get started I create a single module with a single sub with "is export" in it. I can use that module, and call the sub. great. but I am very confused about the namespacing: I seem to be only able to access exported stuff (which is ok), and the export puts it in the namespace of the loader. so the actual namespace of the sub does not | ||
10:57
_28_ria left
|
|||
robertle | matter anymore. interestingly the "unit module xyz" at the top of my module does not need to match the path of it (also ok), so effectively the namespace does not matter at all! that can't be right, there must be more to it... | 10:57 | |
am I right in assuming that the "use" looks up by filename/path, so that does not have to match the namespace? | 10:58 | ||
RabidGravy | robertle, subs are "my" scoped by default, they aren't in a "namespace", if you want to refer to them with a full package name, qualify them with "our" | ||
10:58
Actualeyes left
|
|||
psch | tbrowder: App::ModuleSnap, fyi | 10:59 | |
10:59
daniel-s left
|
|||
RabidGravy | but yes, the default behaviour of the repos is to derive the path from the module name supplied to "use" or "require" | 10:59 | |
of course a CompUnit::Repository could be made that does something else | 11:00 | ||
robertle | RabidGravy: right, so if I "need" then the contents of the file in question get loaded. if that's "our" then I can access it by namespace, if it is "my" then it's private to the namespace and inaccessible. if I use "use" instead, the loaded bits also are made availabel in the loading namespace, so no need to prefix anymore. that abut right? | 11:01 | |
RabidGravy | for installed modules it is different again, as the name of the module isn't directly reflected in the installed module name | ||
robertle, not quite | |||
tbrowder | psch: so how will App::ModuleSnap help me if I can't get it installed for the new rakudo? | 11:02 | |
robertle | RabidGravy: right, the file vs namespace is a bit academic because you want them to match up anyway, everythign else is just plain confusing | ||
psch | tbrowder: i have no idea how it works, but i'd assume you install it for the old rakudo that already has the modules you need | ||
11:02
Actualeyes joined
|
|||
RabidGravy | yes | 11:02 | |
psch | tbrowder: RabidGravy probably appreciates any feedback re documentation or functionality :) | ||
11:02
finanalyst left
|
|||
RabidGravy | it basically traverses the $*REPO.rep-chain, finding all the Distributions which aren't something it made or "CORE" and then writes out a META6.json with all those as dependencies | 11:03 | |
so in your other perl6 you do "panda install ." and voila | |||
tbrowder | psch: ah! okay, I'll give it a shot | 11:04 | |
I have to go now but will try it and report back--thanks!! | |||
11:04
tbrowder left
|
|||
RabidGravy | because I seem to install a lot of modules for testing purposes I find myself with the need to completely eradicate everything once in a while and reinstall the modules | 11:05 | |
I've just discovered that "Flash Magic Eraser" is perfect for cleaning the white rubber parts of Converse All Stars, almost box fresh looking ;-) | 11:08 | ||
11:09
kid51 joined
|
|||
RabidGravy | is there something other than github "organizations" that people use for organising e.g. a "special interest group"? I'm thinking of starting a "Perl6 Audio" thingy | 11:11 | |
psch | haha | 11:12 | |
DrForr | SIGAUD, ISAGN. | ||
psch | special interest group made me laugh :) | ||
RabidGravy | :) | ||
psch | i don't think they have anything like that on github though | ||
i'd totally join an org for that though, even if it might be somewhat inappropriate as an org on github vOv | 11:13 | ||
11:13
ufobat joined
|
|||
RabidGravy | well an "organisation" gives you all the github stuff, wiki, issues and a github.io site but yeah it's not so much about the code as collecting and promoting the stuff | 11:14 | |
ufobat | ola! :D just in case someone cares! my notebook is alive again | ||
RabidGravy | and of course becoming an evil and secretive cabal | ||
psch | right, but a github-page would be a good start for promoting i think | ||
11:15
wamba left
|
|||
RabidGravy | so yeah, create a github organisation and create the page | 11:15 | |
psch | i mean, unless you have an appropriate domain lying around... :) | ||
11:16
wamba joined
|
|||
RabidGravy | jeezus-knievel.com? | 11:16 | |
perlmonkeys.org? plastic-fernandez.com, its-going-to-be-fabulous.com all unused but not really suitable ;-) | 11:17 | ||
goatponi.es | |||
psch | its-going-to-be-fabulous.com is pretty close though | ||
robertle | RabidGravy: let me try again for "our" and "need" only. "our" stuff gets put in a namespace according to the enclosing "module". "need" loads a unit and therefore makes the namespaces within and what is "our" in them available. "my" stuff from the loaded unit is unavailable because it is lexically scoped, and the unit is the lexical scope. right? | 11:18 | |
RabidGravy | yes, but "need" is a red herring here, | ||
however you load it if the sub in a module isn't our scoped you can't access it at all outside the module | 11:19 | ||
robertle | RabidGravy: right, I said "need" only because "use" does something on top of it. let's check my "use" and "is export" understanding: "is export" or the more elaborate versions thereof takes whatever we are talking about and places it in a special namespace of the module. if you "use" a unit, everything from that special namespace makes it available in the loader. about right? if so: does use put into the t | 11:22 | |
RabidGravy | m: module Foo { sub bar() { say "bar" }; our sub baz() { say "baz" };}; Foo::baz(); Foo::bar(); | ||
camelia | rakudo-moar 6cb231: OUTPUT«bazCould not find symbol '&bar' in block <unit> at /tmp/JljyT__jh2 line 1Actually thrown at: in block <unit> at /tmp/JljyT__jh2 line 1» | ||
robertle | arget namespace or the target lexical scope? | ||
psch | "use" puts the used module into the current lexical scope, and imports all exported symbols into the current lexical scope | 11:24 | |
robertle | RabidGravy: understood that part, but that's because bar() isn't part of the Foo namespace, just part of the lexical scope that happens to be created by the module/namespace block. rigt? | ||
psch | well, after (potentially compiling and) loading the source file | ||
RabidGravy | yes | 11:25 | |
11:25
zhmylove left
|
|||
RabidGravy | subroutines are lexically scoped by default | 11:25 | |
11:26
pmurias joined
|
|||
psch | m: say MY::.keys | 11:26 | |
camelia | rakudo-moar 6cb231: OUTPUT«($=pod !UNIT_MARKER EXPORT $_ $! ::?PACKAGE GLOBALish $¢ $=finish $/ $?PACKAGE)» | ||
psch | and lexical scope is a namespace too /o\ | ||
robertle | ok, great! somewhat off topic, but is there a way to "use" from a different namespace and put in this *namespace* rather than this lexical scope? there is such a concept in UML, and it is thoroughly confusing and interestingly impossiblt to implement in C++ and java, which makes you wonder why it is in UML in the first place... | ||
psch | robertle: i think reexportation could cover that at least partially, but i don't know in how far that's implemented | 11:27 | |
RabidGravy | yeah, there are export tricks available | ||
robertle | psch: interesting! I don't really have any use for it, just wondering... | ||
psch | m: module Foo { use Test :EXPORT }; import Foo; | 11:28 | |
camelia | rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/g5NffKCkaGError while importing from 'Test': no such tag 'EXPORT'at /tmp/g5NffKCkaG:1------> 3module Foo { use Test :EXPORT 7⏏5}; import Foo;» | ||
psch | that's the speculated syntax, but yeah... | ||
RabidGravy | well at it's simplest you can define a "sub EXPORT" in your compilation unit which returns a hash that is keyed on the names you want to export with *what* as the value | 11:29 | |
and some <hand wave> other thing with the EXPORT package | 11:30 | ||
psch | m: module Foo { use Test; }; import Foo; ok 1 | 11:31 | |
camelia | rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ExKc1N3mzAUndeclared routine: ok used at line 1» | ||
psch | hm, i don't get the test case we have for that | ||
oh, we're not running it anyway :) | 11:32 | ||
github.com/perl6/roast/blob/master...e-export.t this one fyi | |||
llfourn_ | m: module Foo { use Test; BEGIN trait_mod:<is>(&ok,:export) }; import Foo; ok 1 # maybe? | ||
camelia | rakudo-moar 6cb231: OUTPUT«ok 1 - » | ||
psch | llfourn_: yeah, that i'd expect to work, but see the linked test. that's what was once thought to be the easy way to make it work | 11:33 | |
it's still in roast, but we're not running it | |||
llfourn_ | mmm | 11:34 | |
I wrote a module to do it fyi | |||
github.com/LLFourn/p6-CompUnit-Uti...-exporting | |||
11:35
wamba left
|
|||
RabidGravy | llfourn_++ # making stuff | 11:37 | |
11:37
daniel-s joined
|
|||
llfourn_ | RabidGravy++ xx 10 :) making stuff | 11:37 | |
11:39
Actualeyes left
11:44
tbrowder joined
|
|||
RabidGravy | but it's nearly may and no-one has made a mailling list manager yet | 11:44 | |
11:48
jjido_ joined
|
|||
tbrowder | psch & RabidGravy: I realize now (I think) if I want to hack on rakudo I should create my own branch and let rakudobrew manage it on my own machine. That way there shouldn't be any major problems with standard module handling. Am I right? | 11:48 | |
RabidGravy | psch, having done a cursory survey of the alternatives I'm thinking that a github organisation is easiest and makes collaboration easier and chuck a custom domain on it later | ||
psch | tbrowder: uhh, for actual hacking on rakudo itself i at most branch rakudo inside its own repo | 11:49 | |
tbrowder: and build with Configure.pl | |||
RabidGravy | tbrowder, I've always used rakudobrew for day to day stuff then what psch said for hacking on rakudo | ||
tbrowder | but the problem with that has been finding modules | ||
..installed modules | 11:50 | ||
psch | i don't think i ever needed modules to hack on the compiler | ||
i'd suggest golfing the code module code that is buggy and writing tests from that | |||
RabidGravy | yeah I see it as two different enterprises | ||
llfourn | tbrowder: I just do panda --prefix=/path/to/forked_rakudo/lib if I want to install a module on non-rakudobrew rakudo | 11:51 | |
RabidGravy | and when I really do need to do it I just use one or more -I<path to module> on checkouts of the modules | ||
couple of times fixing breakage in my own or other modules from change in rakudo I do that | 11:52 | ||
11:52
jjido_ left
11:53
pierre_ left
|
|||
RabidGravy | or bisection of said breakage | 11:53 | |
tbrowder | psch, RabidGravy, llfourn: okay, sounds good--thanks; bye | ||
11:54
tbrowder left
11:56
pierre_ joined
11:59
rurban joined,
kid51 left,
rurban left
12:00
Actualeyes joined
|
|||
literal | if I want to loop over an arrayref stored in a hash, do I always need @() ? as in: for @(%hash<foo>) -> $bar { ... } | 12:02 | |
RabidGravy | psch (or anyone else who might be interested) any thoughts on what one might call said Perl6 Audio organization? "Perl6 Audio Cabal", "Perl6 Noise Gang", "Butterflies on Acid"? | 12:03 | |
llfourn | literal: |%hash<foo> is more idiomatic imo | 12:04 | |
psch | Butterflies on Acid feels more like the first collab album published by the org tbh | ||
RabidGravy | indeed | ||
literal | llfourn: ah, of course | ||
RabidGravy | I'm going with the middle one | ||
psch | i do like Perl 6 Noise Gang yeah | ||
note the space though | |||
the synopses even said it has to be an unbreaking one | |||
12:04
rba_ joined
|
|||
psch | ...i put that in a comment in a nqp-j java file once and then the build stopped working :P | 12:05 | |
grondilu wonders if we could not have %hash<foo>@ to mean @(%hash<foo>) | 12:07 | ||
12:07
domidumont left
|
|||
literal | and is there a more straightforward way of getting all the matched strings of a group than this? @matches = $<mygroup>.map({~$_}) | 12:07 | |
_nadim | jnthn: I pushed a pull request for Grammar::Tracer, the output should be like this with the patch imgur.com/YoFIvU4 | ||
llfourn | in p5 there is $hash{foo}->@* now | ||
(or *@..) | |||
rba_ | How to avoid passing getting an error when passing and Inf from a Num to an Int? e.g. > say Inf.Int | 12:08 | |
psch | m: sub postfix:<@>(\c) { @(c) }; my %h = a => 1, b => 2; say %h@ | ||
camelia | rakudo-moar 6cb231: OUTPUT«(a => 1 b => 2)» | ||
grondilu | psch: nice | ||
psch | i don't think that's a useful CORE op, fwiw | ||
rba_: there's been a long-standing no-final-word kind of situation around that afaik | 12:10 | ||
llfourn | literal: I haven't seen a better way than that. It mgiht be kinder to write it as .map(*.Str) or .map(~*) | ||
psch | rba_: that's to say that the design documents speculated Int to somehow be able to accomodate Inf, but most implementors find it either wrong or too hard to make work usefully | ||
rba_: practically i'd suggest you add a multi candidate that explicitely accepts Inf and does what you would do if it would be allowed in Int | 12:11 | ||
m: "foo" ~~ /(.)+/; say @0 | 12:12 | ||
camelia | rakudo-moar 6cb231: OUTPUT«[「f」 「o」 「o」]» | ||
rba_ | psch: I did it like this "return $b != Inf ?? round $b !! False;" | ||
psch | rba_: i'd consider returning the type object Int instead of False | ||
m: "foo" ~~ /(.)+/; say ~<<@0 | 12:13 | ||
camelia | rakudo-moar 6cb231: OUTPUT«[f o o]» | ||
psch | literal: ^^^ that also works, fwiw | 12:14 | |
rba_ | psch: like this "return $b != Inf ?? round $b !! Int;" ? | ||
psch | rba_: yeah. that way you stick to your type at least | ||
12:14
domidumont joined
|
|||
psch | rba_: in the end it strongly depends on how what else is going on, of course :) | 12:14 | |
RabidGravy | So "Perl 6 Noise Gang" it is, I'll just check in the other place to see if there are any objecttions | ||
gfldex | m: my %e = enum <one two three>; say one.WHAT, " It's a ghost!"; | ||
camelia | rakudo-moar 6cb231: OUTPUT«() It's a ghost!» | ||
rba_ | psch: Got it. Thanks | 12:15 | |
psch | RabidGravy: ...there's another place for talking about Perl 6 and using it for music? | ||
RabidGravy | no, no #p6dev ;-) | ||
psch | oh :P | ||
llfourn | psch: I think >>/<< is not guaranteed to return it in the same order | ||
jnthn | llfourn: It gives results in order, but side-effects can be parallel/out-of-order | 12:16 | |
psch | ...which hopefully doesn't matter for stringification of Match objects :) | ||
otherwise i'd think we'd have a problem somewhere | 12:17 | ||
llfourn | jnthn: Ah.. thanks that makes sense now | ||
gfldex | m: my %e = enum <one two three>; say one.WHAT; my $foo = class :: { has $.one = 0 }; say $foo.WHAT; # Is this difference in introspectiveness intentional? | ||
camelia | rakudo-moar 6cb231: OUTPUT«()(<anon|81105168>)» | ||
psch | m: enum f < a b c >; say a.WHAT | 12:18 | |
camelia | rakudo-moar 6cb231: OUTPUT«(f)» | ||
psch | gfldex: well, considering the enum you assign is anonymous... | ||
ufobat | what does Int(Any) in a Signature mean? github.com/supernovus/perl6-psgi/b...GI.pm6#L15 | 12:19 | |
12:19
rindolf left
|
|||
gfldex | psch: so is the class | 12:19 | |
grondilu | m: talk: { say "hi" } # it occured to me that labels can be used as comments | ||
camelia | rakudo-moar 6cb231: OUTPUT«hi» | ||
12:19
zhmylove joined,
huf joined
|
|||
dalek | href="https://perl6.org:">perl6.org: e64aafc | (Zoffix Znet)++ | fetch-recent-blog-posts.pl: Fix bug with recent blog updater Not all blogs (e.g. masak's) have a `type="text/html"` on the `<link>`. Exclude that restriction from the selector. |
12:19 | |
psch | gfldex: oh, right. yeah, that looks like we want something similar for the enum... | 12:20 | |
gfldex | i shall rakudobug | ||
psch | m: my %e = enum < a b c >; say a.WHERE | ||
camelia | rakudo-moar 6cb231: OUTPUT«140372698805376» | ||
psch | m: my %e = enum < a b c >; say a.WHAT.WHICH | ||
camelia | rakudo-moar 6cb231: OUTPUT«» | ||
llfourn | m: sub foo(Int(Any) $i) { $i.say }; foo("5") # In this case it will coerce the Str "5" to Int 5 | ||
camelia | rakudo-moar 6cb231: OUTPUT«5» | 12:21 | |
llfourn | ufobat: ^^ | ||
12:21
sno left
|
|||
psch | m: class A { method Int { 5 } }; sub f(Int(A) $x) { say $x }; f A # more expansive example | 12:21 | |
camelia | rakudo-moar 6cb231: OUTPUT«5» | ||
psch | Int(Any) seems really misleading to me, 'cause it's Cool that allows it and all... vOvo | 12:22 | |
-o | |||
ufobat | ah! coercion, | ||
psch wonders what exactly happened to the COERCE proposal... | |||
llfourn | yes, of sorts | 12:23 | |
ufobat | i'd like to read the documentation about that :) | ||
RabidGravy | anyone else want an invite to Perl6-Noise-Gang ? | ||
llfourn | ufobat: docs.perl6.org/language/functions#Coercion_Types | ||
dalek | href="https://perl6.org:">perl6.org: b476ad6 | (Zoffix Znet)++ | fetch-recent-blog-posts.pl: Make link finder smarter Commit 061cbe2265a6ed9eb9d5bb3a8daee21f96c7bd8b suggests not restricting <link>s by text/html will give bogus URLs, but some blogs do not have text/html |
12:24 | |
ufobat | llfourn :D thank you | ||
sjn | RabidGravy: noise gang? | 12:25 | |
RabidGravy | sjn, audio/music cabal | ||
:) | 12:26 | ||
sjn | ah, cool | ||
RabidGravy | just thought it was about time we got some application domain specific thingies going | ||
sjn | fair enough | ||
RabidGravy | sjn, want an invite then while I've got the page open? | 12:27 | |
sjn isn't much of an audio geek at all | |||
llfourn | if I have a signature like :(Int $a,Str $b) is there a way to attempt to bind to it and get a useful exception if it doesn't work? | ||
psch | and off goes Music::Helpers | ||
llfourn | :($a,$b).try-bind(1,2,3) # eg throws and exception | ||
psch | now i can slack off on that again, 'cause there's an org to take care of it \o/ | ||
RabidGravy | ;-p | 12:28 | |
github.com/Perl6-Noise-Gang | 12:31 | ||
anyone a dab hand with photoshop/gimp/paint want to knock up a quick "camelia with some musical thing" logo | 12:32 | ||
12:33
wamba joined
|
|||
dalek | c: 741f52b | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod: doc anonymous enums |
12:36 | |
12:37
abraxxa left
12:39
pierre_ left
12:41
pierre_ joined
|
|||
psch | RabidGravy: we also need all kind of domain-appropriate groups i think | 12:41 | |
...well, maybe not, i can't even think of one really fitting (and somewhat humorous) example vOv | 12:42 | ||
_nadim | RabidGravy: what would Perl6-Noise-Gang be? | 12:43 | |
RabidGravy | for people interested in doing audio/music related stuff | ||
_nadim | Nice but I suck at music, can barely put a song on ;) | 12:44 | |
12:45
pierre_ left
12:48
m0ltar left
|
|||
psch | hmm, i wonder if travis still does Music::Helpers correctly now... | 12:48 | |
12:48
jjido_ joined
|
|||
RabidGravy | I ought to try putting Audio::PortMIDI in travis, I wasn't sure how much of alsa it had to have the default sequencer ports an shizzle | 12:51 | |
psch | hm, shouldn't it just work if you send stuff back and forth across the loopback? | 12:53 | |
12:53
jjido_ left
|
|||
_nadim | Can someone look and see if there is a obviously wrong in the grammar? nopaste.linux-dev.org/?1096659 | 12:54 | |
RabidGravy | yeah, it was the presence or not of the "Midi Through" device | ||
12:54
cdg joined
|
|||
grondilu | I have the error message: | 12:54 | |
Cannot find method 'package_at_key': no method cache and no .^find_method | |||
and yet my results seems fine. I don't understand what's wrong. | 12:55 | ||
I mean it does find the sub since the results are good. | |||
(or method whatev) | |||
12:56
domidumont left
12:57
domidumont joined
|
|||
grondilu | I'll try to golf it | 12:58 | |
13:02
rurban joined
13:05
daniel-s left,
andreoss joined
13:06
rurban left
13:07
daniel-s joined
13:09
tbrowder joined
|
|||
RabidGravy | in HTML is it "Perl 6" | 13:11 | |
13:11
pmurias left
|
|||
perlpilot | yes | 13:11 | |
RabidGravy | yeah that works | 13:13 | |
tbrowder | psch & llfourn & RabidGravy: yt hints helped to make my hackable rakudo work, but I found some gotchas: (1) panda needs to be executed from OUTSIDE the rakudo repo fork, (2) the best choice of place to install seems to be /path/to/rakudo-repo/install/share, and (3) I still needed to specify the install path with PERL6LIB; but I now have a working solution--thanks! | ||
RabidGravy | cool | 13:14 | |
llfourn | tbrowder: yep I think I had to do all 3 of those too :) | ||
andreoss | what would be the reverse operation of .uniname? | 13:15 | |
m: "a".uniname.say | |||
camelia | rakudo-moar 6cb231: OUTPUT«LATIN SMALL LETTER A» | ||
andreoss | m: "a".uniname.reverse_uniname == "a" | ||
camelia | rakudo-moar 6cb231: OUTPUT«WARNINGS for /tmp/60ucTlAn_h:Useless use of "==" in expression ".reverse_uniname == \"a\"" in sink context (line 1)Method 'reverse_uniname' not found for invocant of class 'Str' in block <unit> at /tmp/60ucTlAn_h line 1» | ||
psch | m: say "\c[LATIN SMALL LETTER A"] | ||
camelia | rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1jd8KQYr5CUnrecognized character name LATIN SMALL LETTER A"at /tmp/1jd8KQYr5C:1------> 3say "\c[LATIN SMALL LETTER A"7⏏5]» | ||
psch | huh | 13:16 | |
andreoss | as a method probably? | ||
psch | m: say "\c[LATIN SMALL LETTER A]" | ||
camelia | rakudo-moar 6cb231: OUTPUT«a» | ||
psch | oohh | ||
"] vs ]" | |||
andreoss: what do you propose that method does? | 13:17 | ||
andreoss: i mean, it has to be a method on Str, right? | |||
13:17
sufrostico joined
|
|||
andreoss | it takes uniname and return a string much like charnames::str_vianame in p5 | 13:18 | |
13:18
cdg left
|
|||
andreoss | *string_vianame | 13:18 | |
13:18
cdg joined
13:19
Sgeo left
|
|||
psch | i don't think we have anything like that currently | 13:19 | |
13:20
_4d47 joined
|
|||
tbrowder | I think I'll propose the tidbits for the docs... | 13:21 | |
13:23
cdg left
|
|||
andreoss | m: "Hello".uninames>>.subst(/^ <?before LATIN | DIGIT >/, "FULLWIDTH ").map({ "\\c[" ~ $_ ~ "]" }).join.say | 13:23 | |
camelia | rakudo-moar 6cb231: OUTPUT«\c[FULLWIDTH LATIN CAPITAL LETTER H]\c[FULLWIDTH LATIN SMALL LETTER E]\c[FULLWIDTH LATIN SMALL LETTER L]\c[FULLWIDTH LATIN SMALL LETTER L]\c[FULLWIDTH LATIN SMALL LETTER O]» | ||
13:25
cdg joined
|
|||
psch | m: ('"' ~ ("Hello".uninames>>.subst(/^ <?before LATIN | DIGIT >/, "FULLWIDTH ").map({ '\\c[' ~ $_ ~ ']' }).join) ~ '"').EVAL.say | 13:25 | |
camelia | rakudo-moar 6cb231: OUTPUT«Hello» | ||
psch | andreoss: well, if i'm right and we really don't have anything like that i think i'd agree we could use it | ||
andreoss | EVAL is bad | 13:26 | |
13:27
tbrowder left
|
|||
jnthn | andreoss: Please file a feature request for a sub/method to map a char name into its codepoint, we don't have one of those yet | 13:29 | |
For now either EVAL, or `use nqp` and then nqp::codepointfromname('FULLWIDTH LATIN SMALL LETTER E') | |||
13:30
zwu joined
|
|||
jnthn | Guess TimToady++ will be able to supply us a nice name :) | 13:31 | |
zwu | is using full path name of symbols bypass the compiler check, for example M1::call_foo() in script? | ||
jnthn | (Which reverse_uniname is not. :P) | ||
13:32
_28_ria joined
13:44
Actualeyes1 joined,
Actualeyes left
13:45
maybekoo2 joined
13:46
ZoffixWin joined,
ZoffixWin left,
ZoffixWin joined
|
|||
ZoffixWin | jdv79, no. Neither. | 13:47 | |
13:49
domidumont left,
jjido_ joined
13:50
domidumont joined
|
|||
MadcapJake | RabidGravy: I have a repo of Audio::FluidSynth that I started a while back (needs some TLC) but I haven't yet added it to my github, perhaps I could put it up in the Noise Gang org? | 13:52 | |
13:53
pierre_ joined
|
|||
timotimo | what is this noise gang org you're speaking of | 13:53 | |
MadcapJake | timotimo: github.com/Perl6-Noise-Gang | ||
timotimo | neat | ||
RabidGravy | MadcapJake, what's your gh id? | ||
MadcapJake | MadcapJake | ||
13:54
jjido_ left
|
|||
timotimo | MadcapJake, MadcapJake. | 13:54 | |
RabidGravy | timotimo, want an invite? It's "timo" isn't it | ||
MadcapJake | MadcapJake xx 2 | ||
psch | ooh, the logo is actually already pretty neat | ||
RabidGravy | just some note clipart I blagged ;-) | 13:55 | |
RabidGravy invites timotimo anyway | |||
timotimo | no, just "timo" | ||
psch | hah, but it has 6 note lines | ||
timotimo | that's perfect | 13:56 | |
for perl 6 | |||
RabidGravy | :) | ||
zwu | if both modules have exported a same name sub foo() is export {...}, in the main script use m1; use m2; will give error: Cannot import symbol &foo from m2, because it already exists in this lexical scope. It will stop us to use both of m1 and m2, though the actual foo is defined under m1:: and m2::. | ||
RabidGravy | no | ||
psch | m: sub f { }; sub f { } # this also never works | ||
camelia | rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JgRfKimQeHRedeclaration of routine fat /tmp/JgRfKimQeH:1------> 3f { }; sub f { } # this also never works7⏏5<EOL>» | ||
RabidGravy | don't export them by default and make them "our" subs | 13:57 | |
zwu | importance of the export alias is definitly necessary I think. | ||
RabidGravy | you can do that | ||
psch | so merging GLOBALs from two used modules with identical exported symbols can never work either | ||
zwu | sometime we cannot control the modules to not to export. | ||
ZoffixWin | m: use nqp; "Hello".uninames>>.subst(/^ <?before LATIN | DIGIT >/, "FULLWIDTH ")>>.&({nqp::codepointfromname($_)})».chr.join.say | ||
camelia | rakudo-moar 6cb231: OUTPUT«Hello» | ||
13:58
neuron joined
|
|||
zwu | for example if I use two third party modules, both have exported a same symbol. | 13:58 | |
MadcapJake | It should default to overwrite globals and then you can still access the other via m1::<&foo> right? | ||
psch | zwu: well, use is lexical. you can always use the modules in different scopes | ||
MadcapJake: no, if it's < my ... is export > you can't access it via the namespace long name | |||
MadcapJake | oh yeah the `my` makes it non-global | 13:59 | |
13:59
skids joined
|
|||
RabidGravy | use them in different scopes and then re-export them from that scope with different names even | 13:59 | |
psch | m: module Foo { sub ok is export { say "ok!" } } }; { import Foo; ok }; { import Test; ok 1 } | ||
camelia | rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RAw0A8aLfoUnexpected closing bracketat /tmp/RAw0A8aLfo:1------> 3 Foo { sub ok is export { say "ok!" } } 7⏏5}; { import Foo; ok }; { import Test; ok» | ||
psch | m: module Foo { sub ok is export { say "ok!" } }; { import Foo; ok }; { import Test; ok 1 } | ||
camelia | rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/iJP2sqhtvhCould not find module Test to import symbols fromat /tmp/iJP2sqhtvh:1------> 3" } }; { import Foo; ok }; { import Test7⏏5; ok 1 }» | ||
psch | m: module Foo { sub ok is export { say "ok!" } }; { import Foo; ok }; { use Test; ok 1 } # grr | ||
camelia | rakudo-moar 6cb231: OUTPUT«ok!ok 1 - » | ||
robertle | witin a start { ... }, how can I get any idea of the thread I am running under? an id or so? | 14:00 | |
psch | overwriting symbols is really a bad idea in any case i think | 14:01 | |
timotimo | m: start { say $*THREAD }; say $*THREAD | ||
camelia | rakudo-moar 6cb231: OUTPUT«Thread #3Thread #1 (Initial thread)» | ||
timotimo | also interesting is $*SCHEDULER | ||
psch | m: say $*THREAD.WHAT | ||
camelia | rakudo-moar 6cb231: OUTPUT«(Thread)» | ||
grondilu | apparently it was the use of race that produced the error mentioned above. | 14:02 | |
robertle | timotimo: thanks! I knew $*SCHEDULER, but not $*THREAD... | ||
timotimo | at the moment, .race and .hyper are not really stable at all | ||
14:03
ZoffixWin left
|
|||
RabidGravy | m: module Foo { sub ok is export { say "ok!" } }; my &foo-ok; my &test-ok; { import Foo; &foo-ok = &ok }; { use Test; &test-ok = &ok }; foo-ok; test-ok 1; | 14:04 | |
camelia | rakudo-moar 6cb231: OUTPUT«ok!ok 1 - » | ||
RabidGravy | not quite "re-exporting" but doable | 14:05 | |
grondilu | could have you done 'our &foo-ok is export'? | 14:08 | |
14:08
_4d47 left
|
|||
moritz | I don't think we can export variables at this point | 14:09 | |
RabidGravy | you can do that as an export sub though | ||
14:09
m0ltar joined
|
|||
_nadim | Can we Haz a substr that would do what a lot (well .. ) of people want? when giving an end that is before the start of the sub string, just return an empty one. Although it has not happened lately, the forever checking if one is withing range, if one os going to count from the end or what kind of error, if any, will be send back is tiresome. and it would add some huffman encoding points to the whole handling of strings. | 14:10 | |
grondilu | I meant it as a way to re-export as you just tried | ||
m: module Foo { module Bar { our sub f {} }; import Bar; our &f is export = &Bar::f }; | 14:11 | ||
camelia | ( no output ) | ||
grondilu | m: module Foo { module Bar { our sub f {} }; import Bar; our &f is export = &Bar::f }; import Foo; f(); | ||
camelia | ( no output ) | ||
grondilu | m: module Foo { module Bar { our sub f { say "hi" } }; import Bar; our &f is export = &Bar::f }; import Foo; f(); | ||
camelia | rakudo-moar 6cb231: OUTPUT«hi» | ||
RabidGravy | yeah I thought that worked | ||
grondilu | cool, I was wondering how to do this. | 14:12 | |
RabidGravy | but then moritz made me doubt myself | ||
moritz | sorry for that | ||
grondilu | it'd be easier if we had 'import Bar; re-export Bar;' | 14:13 | |
or just 'export Bar;' | 14:14 | ||
14:14
cdg left
|
|||
psch | _nadim: what do you mean "end"? substr takes start position and length | 14:14 | |
zwu | thanks for ans, i tried to use "{ use m1; ...}" and "{use m2;...}" under individual lexical code, it works. but when I replaced use with require, it doesn't work. | 14:15 | |
RabidGravy | require doesn't import | ||
you need to do the import explicitly | 14:16 | ||
14:16
tharkun joined
|
|||
RabidGravy | you can also specify the actual symbol to import with require - e.g. "require Foo <&foo>" | 14:16 | |
zwu | I used require "full path name"; | ||
how can I do if I want to import dynamically? | 14:17 | ||
grondilu | m: module A { our sub term:<§> {} }; say &A::term<§>; # not sure if such syntax is ok | ||
camelia | rakudo-moar 6cb231: OUTPUT«(Any)» | ||
zwu | I used required "full path file name" | ||
grondilu | RabidGravy: how would I do it for an infix? | 14:19 | |
I mean I can't write &Bar::infix:<*>, can I? | |||
RabidGravy | the same | ||
yeah | |||
grondilu | oh wait | ||
jnthn | Use the bracketed infix syntax | 14:20 | |
RabidGravy | or that | ||
grondilu | m: module A { our sub term:<§> {} }; say &A::term:<§>; | ||
camelia | rakudo-moar 6cb231: OUTPUT«sub term:<§> () { #`(Sub|87002416) ... }» | ||
RabidGravy | but they're just subs with funy names | ||
grondilu | I had forgotten a colon earlier. YEs it works indeed. | ||
14:22
loren joined
14:23
vendethiel joined
|
|||
grondilu | but now, what if they are 'multi' and not 'only'? | 14:23 | |
14:23
geekosaur left
|
|||
zwu | thanks. using the bracket <&foo> works. | 14:23 | |
grondilu | I mean I can not add multi candidates to say infix:<*> without using the 'multi infix:<*>(|c) {...}' syntax, can I? | 14:25 | |
14:25
dalek joined,
ChanServ sets mode: +v dalek,
john51_ joined,
sftp joined,
AlexDaniel left
14:26
geekosaur joined
|
|||
zwu | can we use bracket in the "import" or "use" command too? | 14:26 | |
MadcapJake | grondilu: correct | ||
14:26
psch_ joined
|
|||
grondilu | to I can not use the trick above to re-export multis. It's a bit LTA. | 14:27 | |
s/to I/so I/ | |||
14:27
psch_ is now known as psch
|
|||
MadcapJake | grondilu: yeah I've run into that before too | 14:28 | |
14:28
tharkun_ joined
|
|||
dalek | c: d42ebaa | VZ++ | doc/Language/regexes.pod: Add matching "/" at the end of regex Trivial change to avoid unterminated regex in an example. |
14:28 | |
c: 3333a9d | (Zoffix Znet)++ | doc/Language/regexes.pod: Merge pull request #474 from vadz/patch-2 Add missing matching "/" at the end of regex |
|||
BooK | is there a better way to write @a».Int ? | 14:29 | |
sorry, @a = @a».Int | |||
grondilu | +<<@a | ||
ah no | |||
BooK | because nodal, I remember what masak said some days ago :-) | 14:30 | |
perlpilot | grondilu: Have you seen github.com/perlpilot/p6-Test-Class...ass.pm6#L4 ? I dunno if that's helpful or not as I haven't been paying attention. | ||
perlpilot meeting & | |||
grondilu | m: my @a = (rand xx 3) X*10; @a [>>.]= Int; | ||
camelia | rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/esVRA6WKkRMalformed postfix callat /tmp/esVRA6WKkR:1------> 3my @a = (rand xx 3) X*10; @a [>>.7⏏5]= Int;» | ||
_nadim | psch: youin, that sucks. can't give a negative length, so you must do all the computations before; again and aga | 14:31 | |
psch: you can't give a negative length, so you must do all the computations before; again and again, that sucks. | |||
psch | m: say "negative length".substr(*-10, *-4) | ||
camelia | rakudo-moar 6cb231: OUTPUT«ive le» | ||
14:31
remmie2 joined
|
|||
grondilu | m: my @a = (rand xx 3) X*10; @a [X.]= Int; | 14:31 | |
camelia | rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/k9i9Bv2DD6Malformed postfix callat /tmp/k9i9Bv2DD6:1------> 3my @a = (rand xx 3) X*10; @a [X.7⏏5]= Int;» | ||
psch | _nadim: that doesn't do what you need? | 14:32 | |
grondilu | m: my @a = (rand xx 3) X*10; @a X[.=] Int; | ||
camelia | rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IvfvBwL_WZCannot cross with .= because dotty infix operators are too fiddlyat /tmp/IvfvBwL_WZ:1------> 3my @a = (rand xx 3) X*10; @a X[.=]7⏏5 Int;» | ||
grondilu gives up | |||
_nadim | m: say "negative length".substr(0, -4) | ||
camelia | rakudo-moar 6cb231: OUTPUT«Number of characters argument to substr out of range. Is: -4, should be in 0..Inf; use *-4 if you want to index relative to the end in block <unit> at /tmp/TPuU6HoGeM line 1Actually thrown at: in block <unit> at /tmp/TPuU6HoGeM line 1» | ||
psch | m: say "negative length".substr(0, *-4) | ||
camelia | rakudo-moar 6cb231: OUTPUT«negative le» | ||
psch | _nadim: it even says "use *-4 if you want to index relative to the end" | ||
14:33
loren left,
tharkun left,
huf left,
aries_liuxueyang left,
molaf left,
uruwi left
|
|||
RabidGravy | SPLITTERS! | 14:33 | |
14:33
ribasushi joined
|
|||
_nadim | it's not relative to the en, or we'd be doing computation again, it's a length that is negative, big difference | 14:33 | |
psch | _nadim: but a negative length is a semantically invalid concept. it doesn't make any sense | 14:34 | |
RabidGravy | er | ||
_nadim | they said the same thing about the root of negative numbers ;) | ||
psch | yeah, no, it's not the same thing... | ||
anyway, what's your use-case ooc? | |||
grondilu | m: module Foo { module Bar { our sub f is export { say "hi" } }; sub EXPORT { %(Bar::EXPORT::DEFAULT) } }; | 14:35 | |
camelia | ( no output ) | ||
tony-o | MadcapJake: ++ for myhtml | ||
grondilu | m: module Foo { module Bar { our sub f is export { say "hi" } }; sub EXPORT { %(Bar::EXPORT::DEFAULT) } }; import Foo; f() | ||
camelia | rakudo-moar 6cb231: OUTPUT«hi» | ||
14:35
pierre_ left
|
|||
grondilu | perlpilot: oh that works | 14:35 | |
_nadim | psch: well, often it is when you have a string to display and a certain width of display. | ||
MadcapJake | tony-o: thanks! | ||
grondilu | and it's fairly elegant as well | ||
RabidGravy | aah gah doo doo doo | 14:36 | |
tony-o | just saw it as i'm checking the cron settings for modules.zef.pm | ||
_nadim | psch: I actually met the case earlier when patching Gramar::Tracer | ||
psch | _nadim: why not use comb for that? | ||
instead of substr | |||
RabidGravy | or sprintf | ||
14:37
huf joined,
aries_liuxueyang joined,
molaf joined,
uruwi joined,
richi235 joined,
JimmyZ joined,
vike joined,
vytas joined,
M-Illandan joined,
gtodd joined,
masak joined,
[Coke] joined,
chris2 joined
|
|||
MadcapJake | tony-o: 1.6 million downloads wooohoo! ;) | 14:37 | |
psch | or that i suppose, yeah | ||
14:37
loren joined
|
|||
_nadim | EG: $sniplen > 0 ?? colored(' ' ~ $snippet.substr(0, $sniplen).perl, 'white') !! '' | 14:37 | |
sprintf doesn't take negative length either, back to the board | 14:39 | ||
as for comb, I need to check again what it accepts for arguments | |||
This is _really_ not a big deal, just something Ihave seen a lot of times | |||
tony-o | MadcapJake: wait until you refresh :-p | ||
14:39
daniel-s left
|
|||
RabidGravy | _nadim, 90% of programming is bounds checking ;-O | 14:40 | |
14:40
Juerd joined
|
|||
grondilu | perlpilot: trying this trick in one of my modules I got a spectacular fail: "Interrupted command". Never seen that before. | 14:40 | |
14:41
khw joined
|
|||
grondilu | probably on shell level since it was "commande interrompue" (in my language) | 14:41 | |
psch | m: my $foo = lines()[0..2].join; $foo.comb(/. ** 10/)>>.say | ||
camelia | rakudo-moar 6cb231: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGallAgus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina» | ||
14:41
ggherdov joined
|
|||
RabidGravy | yeah, that looks like something bit the dust under the hood | 14:42 | |
psch | ...making up a regex that doesn't split words is a bit harder - i mostly don't remember the syntax for the anchor right now :P | ||
grondilu | m: module Foo { our class Bar { our multi infix:<*> is export { -1 } }; sub EXPORT { %(Bar::EXPORT::DEFAULT) } }; import Foo; say Foo::Bar*Foo::Bar | 14:43 | |
camelia | rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4sfINh6CVrCannot use 'our' with individual multi candidates. Please declare an our-scoped proto insteadat /tmp/4sfINh6CVr:1------> 3r { our multi infix:<*> is export { -1 }7⏏5 }; sub EXPORT { %(Ba…» | ||
_nadim | m: '1234567'.comb(-4 ,1) | ||
camelia | ( no output ) | ||
_nadim | m: '1234567'.comb(-4 ,1).say | ||
camelia | rakudo-moar 6cb231: OUTPUT«(6)» | ||
grondilu | m: module Foo { our class Bar { multi infix:<*> is export { -1 } }; sub EXPORT { %(Bar::EXPORT::DEFAULT) } }; import Foo; say Foo::Bar*Foo::Bar | ||
camelia | rakudo-moar 6cb231: OUTPUT«Use of uninitialized value of type Foo::Bar in numeric context in block <unit> at /tmp/sSilg5F3QI line 1Use of uninitialized value of type Foo::Bar in numeric context in block <unit> at /tmp/sSilg5F3QI line 10» | ||
_nadim | m: '1234567'.comb(-4 ).say | 14:44 | |
camelia | rakudo-moar 6cb231: OUTPUT«(1 2 3 4 5 6 7)» | ||
grondilu | m: module Foo { our class Bar { multi infix:<*> is export { -1 } }; sub EXPORT { %(Bar::EXPORT::DEFAULT) } }; import Foo; say Foo::Bar.new*Foo::Bar.new | ||
camelia | rakudo-moar 6cb231: OUTPUT«Cannot call Numeric(Foo::Bar: ); none of these signatures match: (Mu:U \v: *%_) in block <unit> at /tmp/Bd7IbQAo5h line 1» | ||
_nadim | m: '1234567'.comb(-3 ).say | ||
camelia | rakudo-moar 6cb231: OUTPUT«(1 2 3 4 5 6 7)» | ||
zwu | I found there is a different behavior between the import and require: module m1 { our sub foo() {...}; our class TestClass {...}}; //// use m1; I can call m1::foo(); and my $tc = m1::TestClass.new(); //// however, when I use require "m1_filename"; I can call m1:foo() too but my $tc=m1::TestClass.new() gives me error of no symbole of &TestClass. | ||
14:44
pierre_ joined
|
|||
_nadim | m: '1234567'.comb(-3, 2 ).say | 14:44 | |
camelia | rakudo-moar 6cb231: OUTPUT«(5 6)» | ||
gtodd | has perl6 scaled enough to begin monetizing ? :-) | 14:45 | |
_nadim | m: '1234567'.comb(3, 2 ).say | ||
camelia | rakudo-moar 6cb231: OUTPUT«(123 456)» | ||
_nadim | m: '1234567'.comb(-3, 0 ).say | ||
camelia | rakudo-moar 6cb231: OUTPUT«()» | ||
BooK | how do I see the canonical form of a Rat? (as numerator/denominator) | ||
_nadim | m: '1234567'.comb(3, 0 ).say | ||
camelia | rakudo-moar 6cb231: OUTPUT«()» | ||
_nadim | BooK: .perl does that I believe | 14:46 | |
timotimo | BooK: you'd have to .nude.join("/") probably | ||
BooK | ah nude | ||
I had tried with gist and perl | |||
_nadim | Data::Dump::Tree | ||
it shows num/denum | 14:47 | ||
14:47
rindolf joined
|
|||
BooK | thanks _nadim & timotimo | 14:48 | |
_nadim | and "$r.numerator ~ '/' ~ $r.denominator" of course | 14:49 | |
zwu | why does it say no symbole of &TestClass when using m1::TestClass.new(), for which m1 module is loaded by require "m1_filename.pm6", module m1 {our class TestClass ...} | 14:50 | |
14:50
jjido_ joined,
lostinfog joined
|
|||
gtodd | _nadim: over time you can make all the .things() that do stuff with "strings" be perfectly consistent and better :-) | 14:54 | |
14:55
jjido_ left
|
|||
RabidGravy | ooh the domain "noisegang.com" is actually available | 14:56 | |
14:56
ZoffixWin joined
|
|||
timotimo | neato | 14:57 | |
ZoffixWin | I'm looking at this: docs.perl6.org/language/5to6-perlfunc#exec .... is there no way at all to basically restart your own script? | ||
I want Bailador to watch my source for changes and restart itself when it detects a change | |||
_nadim | yoohoo!!! putting \n* at a start of a grammar makes things happen! why? I need more time. | 14:58 | |
Xliff | OK. I have a release branch in git. How do I go about adding that branch to the ecosystem? | ||
perlpilot | ZoffixWin: you could use IO::Notification for that. | ||
ZoffixWin | Xliff, click Pencil icon and add URL to *raw* meta file here: github.com/perl6/ecosystem/blob/ma.../META.list | ||
perlpilot, thanks, but watching isn't a problem.. it's restarting that's a problem :) | 14:59 | ||
RabidGravy | Xliff, what's your GH id? I gonna invite you to a party | ||
perlpilot | oh | ||
Xliff | Xliff [email@hidden.address] | ||
RabidGravy | well actually a github organisation but the other thing is more fun | ||
no, no github id | 15:00 | ||
Xliff | ZoffixWin, I've already cloned ecosystem and done that, but before I release, I want to know if I can specify a release branch, or if I will need to create another branch for further development. | ||
psch | Xliff: the links inside the META.list contain the branch | 15:01 | |
ZoffixWin | Xliff, I think if you link to the meta from the branch, that'll work | ||
RabidGravy | yeah a release branch is fine as long as specify the correct thing in the META.list and the correct urls in the META6.json | ||
_nadim | feedback please, this is the modified output of Grammar::Trace, anything that could be done better? imgur.com/Wimuoso | ||
gtodd | Grammar::Trace or Grammar::Tracer ? | 15:03 | |
ZoffixWin | exit shell($command); doesn't really do the trick... 'cause the socket is still in use when the second copy of bailador starts :/ | 15:04 | |
_nadim | Grammar::Tracer, jnthn's module | ||
Xliff | So this should work as a source_url in META.info: git://github.com/Xliff/p6-audio-oggvorbis.git#v0.0.1 | 15:07 | |
ZoffixWin | That won't get indexed | 15:08 | |
hm | |||
perlpilot | ZoffixWin: when you figure this out, I expect a module to make it easier for the next guy and a blog post about your adventure ;-) | 15:09 | |
ufobat | ZoffixWin++ :D | ||
perlpilot | ZoffixWin++ btw. Your blog posts have been excellent | ||
Xliff | Do panda and zef use the URL in META.list, or the one in META.info? | 15:10 | |
ufobat | ZoffixWin, funny, yesterday i tried to kill my webserver with fast requests and it didnt happen as well | ||
15:10
kaare_ joined
15:11
sno joined
|
|||
gtodd | _nadim: I remember being amazed by jnthn's presentation (from youtube ?) and thinking it would be neat if there were Grammar::Tracer plugins that would output the trace in different formats | 15:11 | |
ZoffixWin | Xliff, I believe they use a JSON file generated by this script: github.com/perl6/ecosystem/blob/ma...atelist.pl | ||
15:11
colomon left
|
|||
gtodd | _nadim: wow ... I just checked and that was a long time ago 8-} | 15:12 | |
ZoffixWin | Xliff, and this part mangles source in META: github.com/perl6/ecosystem/blob/ma...ist.pl#L62 | ||
_nadim | gtodd: It's a replacement of his format, IMVHO, clearer and much more compact. But maybe it is a good idea to have different formats | ||
RabidGravy | Xliff, yeah the META file in the META.list is retrieved and then the installer will use the source in that to retrieve the actual module source | 15:13 | |
perlpilot | sethgodin.typepad.com/seths_blog/20...-gate.html seems like something #perl6 should be continually cognizant of | 15:14 | |
_nadim | ZoffixWin's post are great, except for his aversion for parenthesis, he puts ' :' everywhere ;) | ||
perlpilot | _nadim: feature! | ||
ZoffixWin | Yes, I hate parentheses with passion :) | ||
zwu | hello, is it a bug? it says no symbol of &TestClass when calling m1::TestClass.new() for which m1 module is loaded by require "m1_filename.pm6", module m1 {our class TestClass ...} | 15:15 | |
perlpilot | ZoffixWin: were you accosted by a LISP variant at some point? :) | ||
Xliff | OK. So the META.info has to match the release branch. Got it. | 15:16 | |
Thanks. | |||
gtodd | _nadim: I remember (again a long time ago) someone making a video of a web framework of some kind (maybe Django) which showed how a request was handled by the code ... highlighting the actual lines of code and showing how different modules were loaded and handed off the request and reponse etc. It was really well done but probably a lot of work. Then a few years later jnthn's module (tiny I think) Grammar::Tracer almost was able to do the sam | ||
RabidGravy | zwu, better show us the actual code as I'm pretty certain that works | 15:18 | |
ZoffixWin | Xliff, well, I found just one module that doesn't use the default branch as the META file URL, but in their source, they still listed just the URL without branch: github.com/nkh/P6-Data-Dump-Tree/b.../META.info | ||
I guess you get to be the pioneer to figure out whether this stuff actually works :) | 15:19 | ||
psch | the /release/ bit in the path *is* the branch, no? | ||
15:19
vendethiel left
|
|||
ZoffixWin | psch, yes. But that's not part of the `source` URL in the META | 15:19 | |
psch | ZoffixWin: ooh, right. i misunderstood which level the branch has to be tracked | 15:20 | |
_nadim | gtodd: Grammar::Trace is very useful, I am trying to figure out why my rammar sucks right now ;), but I think it can be polished a bit more. Conway had a great regex visualizer, there are ideas to get from there. | ||
RabidGravy | ZoffixWin, that should work as long as the META file doesn't change differently in the branch | 15:21 | |
gtodd | _nadim: exactly ... I was thinking a sort of typescript playback of the parse ... a deep dive into perl6's *brain* .... a plugin architecture for Grammar::Tracer of some kind might lead to something cool ... Grammar::Tracer::Plugin::Animated::MP4 ? :-D | ||
ZoffixWin | RabidGravy, but branch information from the META file URL is not preserved anywhere: ecosystem-api.p6c.org/projects.json | 15:22 | |
15:23
domidumont left
|
|||
RabidGravy | ah I see | 15:23 | |
yeah, that's not so useful then | |||
_nadim | gtodd: reminds me of hen I made movies of a build system, where you see the rulestrigger and the graph build up | ||
15:23
colomon joined
|
|||
ZoffixWin | And seems that at least panda doesn't switch to any branches: github.com/tadzik/panda/blob/2beab...her.pm#L46 | 15:23 | |
gtodd | _nadim: wow cool ... btw I agree about ZoffixWin's posts ... I think they should have footnotes showing the parenthetcial alternative to ": " :) | ||
zwu | here is the test code I have gist.github.com/anonymous/35b0e607...b0513a0112 | 15:24 | |
gtodd | also there's too much blood :-D | ||
ZoffixWin | heh | ||
gtodd | ZoffixWin: ++ ! | ||
RabidGravy | I'm kinda mixed about the parens on methods | 15:25 | |
15:25
colomon left
|
|||
RabidGravy | at first I thought the colons was ugly, now I've warmed to it for single argument methods | 15:25 | |
zwu | RabidGravy: can you also take a look on the code at gist.github.com/anonymous/35b0e607...b0513a0112 | 15:26 | |
tadzik | hmm | ||
psch | i kind of want to make an effort to get used to indirect method invocation syntax :P | ||
tadzik | would you like panda to be able to checkout branches (or specific commits) when you do 'panda install git://foo.bar/baz.git@devel' or something? | ||
_nadim | The problem is that the examples are for beginers too and when you have a colum instead for a well delimited , parenthesis, scope and then you shuffle in adverbs, like Zoffix likes to do, then you need concentration to match things up. | 15:27 | |
gtodd: I'll try to find the movie I made, or maybe I could generated a new one. | |||
15:28
colomon joined,
ZoffixWin left
|
|||
gtodd | RabidGravy: it will take a while for P6BP to emerge :) | 15:29 | |
15:29
neuron left
|
|||
gtodd | with perl5 it's always educational to see how perl -MO=Deparse "sees" your script ... or how perlcritic would rewrite it :) | 15:31 | |
RabidGravy | zwu, if you change the line to "my $tc = ::('m1::TestClass').new()" it will work, the reason it doesn't work how you have it is that the symbol isn't there at compile time | 15:36 | |
"require" being a runtime thing | |||
zwu | oh, that ::('m1::TestClass') is to by pass the compiler, but why the sub works m1::foo() ? | 15:37 | |
Xliff | *Whew* | ||
I'm off master and on to v0.0.2 | 15:38 | ||
Now to get v0.0.1 into the ecosystem. | |||
zwu | RabidGravy: I just tested the code ::('m1::TestClass').new(), it works. | ||
RabidGravy | zwu, well it's a "run time symbol lookup", the sub works because the sub isn't looked up until runtime when it's package qualified | 15:39 | |
TimToady | jnthn: given that we overload \c[] for both \c65 and \c[LATIN CAPITAL LETTER A], I can't offhand think of a really good reason not to overload chr to take either chr(65) or chr("LATIN CAPITAL LETTER A") | 15:40 | |
15:40
g4 left
15:41
zakharyas left
|
|||
RabidGravy | and the reason it blows up the way it does is that rather than dying in compilation when it can't find the symbol it just evaluates to the Failure which is what you are seeing | 15:41 | |
15:41
_mg_ left
|
|||
zwu | ah... thanks RabidGravy. But why the m1::TestClass with packaged qualified does not the same at runtime as the sub? | 15:41 | |
15:41
maybekoo2 left
|
|||
RabidGravy | because types are handled differently | 15:42 | |
psch | m: A.new; class A { } | 15:43 | |
camelia | rakudo-moar 1acf80: OUTPUT«5===SORRY!5=== Error while compiling /tmp/71re6RxjxjIllegally post-declared type: A used at line 1» | ||
psch | m: ::('A').new; class A { } | ||
camelia | ( no output ) | ||
zwu | thanks! | ||
Xliff | How often does raw.githubusercontent.com/ get updated? I just pushed a change on META.info to master and I don't see it reflected in the URL from ecosystem/META.list | 15:44 | |
RabidGravy | I guess the compiler optimistically thinks that something may come along and actually provide the symbol but makes it a Failure that will happen at run-time if it doesn't | ||
Xliff, every twenty minutes or so I think | 15:45 | ||
Xliff | Yep. Just saw it. Submitting PR now. | ||
Aaand. Done. | 15:47 | ||
RabidGravy | ooh who killed dalek | ||
dalek | osystem: ca2ba7a | Xliff++ | META.list: New Perl6 Module Add Audio::OggVorbis to the perl6 ecosystem. |
||
osystem: 2faa6a2 | RabidGravy++ | META.list: Merge pull request #202 from Xliff/patch-1 New Perl6 Module |
|||
Xliff | \o/ | ||
OK. I'm already late. I wanted to get this in before I had to leave. | 15:49 | ||
See ya in the afternoon, #perl6. | |||
jnthn | m: say chr("65") | ||
camelia | rakudo-moar 1acf80: OUTPUT«A» | ||
jnthn | TimToady: Only thing is we'd break ^^ :) | ||
TimToady: Unless we try numification as a fallback | 15:50 | ||
15:50
cschwenz left
15:51
jjido_ joined
|
|||
zwu | what's the disadvantage is we change to the runtime lookup for types when they are with package qualified? | 15:52 | |
TimToady | can just look at the first char to see if numeric; don't think any uninames start numeric | ||
15:53
robertle left
|
|||
TimToady | m: .say if .uniname ~~ / ^ \d / for 0..0x10ffff | 15:54 | |
camelia | ( no output ) | ||
TimToady | would probably be a bit faster than a fallback | 15:55 | |
15:55
maybekoo2 joined
|
|||
TimToady | though of course we're depending upon the Unicode Consortium to continue following this (unwritten?) policy | 15:55 | |
15:55
jjido_ left,
pecastro joined
|
|||
RabidGravy | zwu, well typically you should check the result of the lookup for being a Failure rather than it just blowing up if the symbol really isn't defined | 15:56 | |
people are doing that in modules when something is optionally loaded at run time | 15:57 | ||
see e.g. github.com/sergot/http-useragent/b...t.pm6#L345 | 15:58 | ||
16:02
uruwi left
16:04
vendethiel joined
|
|||
TimToady | well, something in there is already making the decision to distinguish \c[65] from \c[LATIN CAPITAL LETTER A] | 16:07 | |
and we should use that mechanism, or emulate it | |||
jnthn | TimToady: OK, sounds good. :) | 16:09 | |
I'll see if I can sneak it in at some point...will be a nice break from hunting GC/concurrency issues. :) | |||
RabidGravy | snark hunting | 16:10 | |
16:12
nd3i joined
|
|||
nd3i | eli5? p6: say {my $s ="Camelia"; $s.subst(/<[aeiou]>/, { .uc }, :g)}() | 16:13 | |
timotimo | sure | 16:14 | |
so, when you call the subst method on the string $s, it'll search for the regex | |||
the :g at the end specifies that it's supposed to replace as often as it can, rather than stopping after the first change | |||
nd3i | Oops. I thought the bot would pick that up. I get: CAmElIA | 16:15 | |
timotimo | right | ||
it only reacts when the m: or p6: is at the very beginning; i think even a space character will prevent it from running | |||
that setting has its pros and cons :) | |||
nd3i | But when I want to modify the string, I have to use the s/// form | ||
p6: say {my $s ="Camelia"; $s ~~ s:g/<[aeiou]>/{ .uc }/; $s}() | 16:16 | ||
camelia | rakudo-moar 1acf80: OUTPUT«CCAMELIAmCAMELIAlCAMELIACAMELIA» | ||
timotimo | you can use S/.../.../ when your string is set to $_ (which the "given" statement-suffix does, for example) | ||
ah, hehe | |||
the smartmatch operator sets the value of $_ to what you match against, i.e. $s | |||
so you're replacing every vowel with $s.uc | 16:17 | ||
p6: say {my $s ="Camelia"; $s ~~ s:g/<[aeiou]>/{ $/.uc }/; $s}() | |||
camelia | rakudo-moar 1acf80: OUTPUT«CAmElIA» | ||
nd3i | so is there something I can use in the s/// form to call a method on the current match? | ||
Ahh, u beat me to it! Thanks. | |||
timotimo | :) | 16:18 | |
you're welcome | |||
BooK | what's this signature? (Mu:U \v: *%_) | 16:19 | |
nd3i | Ack! but $/ doesn't work in the method form | ||
16:19
uruwi joined
|
|||
BooK | and where can I read up on signatures? | 16:19 | |
TimToady | m: say {my $s ="Camelia"; $s.subst-mutate(/<[aeiou]>/, -> $_ { .uc }, :g); $s }() | ||
camelia | rakudo-moar 1acf80: OUTPUT«CAmElIA» | ||
nd3i | p6: say {my $s ="Camelia"; $s.subst(/<[aeiou]>/, { $/.uc }, :g)}() | ||
camelia | rakudo-moar 1acf80: OUTPUT«CAmElIA» | ||
nd3i | Oops. It works here but not in my REPL ... | 16:20 | |
Ok, it works for me in a new session | |||
16:21
ZoffixWin joined
|
|||
nd3i | Maybe the $/ was left over from a previous line? | 16:21 | |
RabidGravy | BooK, that is a method signature for a method that explcitly requires a type object and has no explicit arguments | 16:22 | |
TimToady | BooK: Mu:U is a type that accepts any indefinite type object, \v is a sigil-less declaration of a "variable" named "v", the ":" means that's the invocant, and *%_ will slurp up any named arguments into the %_ array | ||
RabidGravy | it would like like "method whatever(Mu:U \v) { ... }" | 16:23 | |
and doc.perl6.org/type/Signature seems like a good place to read on the matter ;-) | 16:24 | ||
it wouldn't like what I typed of course because it is missing a colon after the \v | |||
16:25
loren left
|
|||
ZoffixWin | Looks like IO::Notification is buggy.... If I run this script, it prints all the directories it finds, but then says 'no such directory'. BUT, if I comment out that 0.1 second sleep on line 7, then the problem doesn't happen: gist.github.com/zoffixznet/e07d896...4675ff3aef | 16:25 | |
So it seems like creating a lot of IO::Notifications too fast is problematic | 16:26 | ||
And if I use design-docs instead of . as the initial watch path, it crashes only about 15% of the time | 16:28 | ||
16:29
maybekoo2 left
|
|||
timotimo | nd3i: you don't need $/ in the method variant, because the method will invoke your code-block with the match as its first (only?) positional parameter; in other words: you can just use $_ inside your block | 16:30 | |
ZoffixWin | Yes, the Match object is the only arg | 16:31 | |
nd3i | Ok, so I just have to remember that the s/// form and the method form handle a code block on the RHS differently | 16:32 | |
Sorry, on the replacement | |||
ZoffixWin | m: my $s ="Camelia"; say $s.subst: /<[aeiou]>/, *.uc, :g | ||
camelia | rakudo-moar 1acf80: OUTPUT«CAmElIA» | ||
ZoffixWin | m: say "Camelia".subst: /<[aeiou]>/, *.uc, :g | 16:33 | |
camelia | rakudo-moar 1acf80: OUTPUT«CAmElIA» | ||
ZoffixWin | nd3i, BTW, the method form of s/// is .subst-mutate. .subst is the method form of S/// | ||
timotimo | well, it's not truly the RHS of the s operator; it's more like the second half inside | 16:34 | |
at least that's how it feels to me | |||
nd3i | I think I'm at the "just enough knowlege to confuse myself" stage | ||
timotimo | the thing is, the right part of the s/// and S/// are regexy, not cody, so you have things like "the $/ has a value here" | 16:35 | |
RabidGravy | nd3i, I'm permanently at that stage | ||
nd3i | ok, that makes sense; similar to p5 | ||
ZoffixWin | m: say {my $s ="Camelia"; $s ~~ s:g[<[aeiou]>] = { $/.uc }() ; $s}() | ||
camelia | rakudo-moar 1acf80: OUTPUT«CAmElIA» | ||
timotimo | TimToady: did you have an opinion on what should be allowed to work in the listy part of an enum declaration? | 16:36 | |
16:37
rba_ left
|
|||
nd3i | right. I'm playing with the different ways to write it and getting different results. Sometimes different results from the same expression! | 16:38 | |
I'll study the suggestions here and see if the fog lifts any. TYVM | 16:40 | ||
16:41
nd3i left
|
|||
ZoffixWin | .tell perlpilot sent you some fixes: github.com/perlpilot/p6-IO-Notific...ive/pull/1 There's still a problem with it: irclog.perlgeek.de/perl6/2016-04-29#i_12411080 | 16:42 | |
yoleaux | ZoffixWin: I'll pass your message to perlpilot. | ||
mst | ZoffixWin: parens are evil because hitting the shift key is hard, that's why I wrote a lisp that uses JSONY as its format so you can use [] | 16:45 | |
16:46
zwu_ joined
|
|||
ZoffixWin | heh | 16:48 | |
16:49
pierre_ left
16:52
jjido_ joined
16:53
zwu_ left
16:57
jjido_ left
|
|||
RabidGravy | there I can see the screen again | 16:57 | |
16:59
firstdayonthejob joined
|
|||
ZoffixWin | This seems to be in the wrong queue: rt.perl.org/Ticket/Display.html?id=128021 | 17:09 | |
17:10
diakopter joined
|
|||
RabidGravy | seems fine to me, perl 5 ticket in the perl 5 queue | 17:11 | |
ZoffixWin | Oh... brainfart. I just clicked on it in rt.perl.org/ forgetting the list includes both queues >_< | 17:12 | |
RabidGravy | :) | ||
zwu | RabidGravy: thanks! | 17:19 | |
17:23
uruwi left
17:24
zwu left
|
|||
[Coke] sees that someone donated to the perl QA hackathon 2016 as "the perl6 community". Thank you, whoever you are. (I probably know who you are. :P) | 17:26 | ||
17:34
wamba left
|
|||
stmuk_ | two there are! | 17:35 | |
17:41
leont joined
|
|||
MadcapJake | ZoffixWin: you can change the dashboard to only show the Perl 6 queue (though it's slightly roundabout) | 17:41 | |
ZoffixWin head desks... | 17:45 | ||
Can't figure out why my sub is called in duplicate :/ | |||
Any idea? gist.github.com/zoffixznet/50e0a7a...a521ed4f0a Line #32 prints and you can see there are two dirs, but the output from line #35 is repeated :S | 17:46 | ||
It should 'Starting watch...' on each dir just once | 17:47 | ||
vendethiel | ZoffixWin what's |@dirs.map: { find-dirs $_ } ? | ||
ZoffixWin | vendethiel, it looks for each dir in @dirs to find all subdirectories | 17:48 | |
17:48
rba_ joined
|
|||
vendethiel | what's the result of that, I mean | 17:49 | |
ZoffixWin | vendethiel, it's printed on line 32... the result is "DIRS: [lib|bin]" | ||
Just two dirs, but I get 4 calls to watch-it :S | |||
17:50
adu joined
|
|||
RabidGravy | there perl6-noise-gang.github.io/ - worst possible template I could have chosen but hey | 17:50 | |
please feel free to nit-pick, patch, fix or completely re-do | 17:51 | ||
17:51
rba_ left,
Relsak joined
|
|||
adu | RabidGravy: can I bootstrappify it? | 17:52 | |
17:52
jjido_ joined
|
|||
RabidGravy | feel free, I shouldn't be let anywhere near web pages | 17:53 | |
ZoffixWin | Seems the supply {} block is executed twice :/ | ||
adu | RabidGravy: do you know what bootstrappify means? | ||
ZoffixWin | I print "ZOMFG" just as I enter supply {} and it gets printed twice, even though the "CMON" I print right before it gets printed just once: gist.github.com/zoffixznet/66411b0...8f193dde04 | 17:54 | |
adu, add it :) The current typography is hurting my eyes :) | |||
adu | getbootstrap.com/css/#buttons-options | 17:55 | |
when I think of bootstrap, I usually think of the buttons first :P | |||
17:57
jjido_ left
|
|||
RabidGravy | oh I've done stuff with bootstrap, I tend to do so when I start something from scratch because I'm lazy, but GH presented me with a set of templates and I just chose the least offensive looking one ';-) | 17:57 | |
ZoffixWin, the block is executed every time the the supply is tapped, which is possibly what is happening there | 17:59 | ||
ZoffixWin | Yeah, I just noticed if I remove the await .Promise; the duplication goes away | ||
But then... I'm not sure how to wait for it to be .done | 18:00 | ||
18:06
rindolf left
|
|||
ZoffixWin | *sigh* a rogue loop {} at the end of the program it is.... | 18:06 | |
18:06
_mg_ joined
18:08
al2o3-cr joined
|
|||
ZoffixWin | Heh. Thanks to my program, I now know Atom does two writes whenever you save a file, for some reason. | 18:09 | |
perlpilot | ZoffixWin++ thanks. | 18:10 | |
yoleaux | 16:42Z <ZoffixWin> perlpilot: sent you some fixes: github.com/perlpilot/p6-IO-Notific...ive/pull/1 There's still a problem with it: irclog.perlgeek.de/perl6/2016-04-29#i_12411080 | ||
perlpilot | ZoffixWin: I'm sure I had updated that module post-xmas, but I guess I never pushed the changes. | ||
18:11
dwarring joined
|
|||
ZoffixWin | perlpilot, I think there's still a bug with that code. I'm using what I believe is the same code as in your module, but in my app, when I remove lib/x directory, I'm getting three events: "Change detected [lib/x/x, FileRenamed]. app" | 18:14 | |
"Change detected [lib/x/x, FileRenamed]. app | |||
" "Change detected [lib/x, FileRenamed]. app | |||
" | |||
lib/x/x ?? :S Not even sure how it comes up with that | |||
ZoffixWin is too tired to debug that too right now | |||
perlpilot | Did you make an issue for that? | ||
I might have time tonight to look at it. | |||
ZoffixWin | No, I just found that | ||
And it's with this code, not your module exactly: gist.github.com/zoffixznet/a726ea0...a59c3c1b61 | |||
perlpilot | Hmm. ok | 18:15 | |
ZoffixWin | Ah, I see. It just creates multiple watchers on the same dir. I'm gonna create an Issue with the description of the fix. | 18:17 | |
18:19
lostinfog left
|
|||
perlpilot | ZoffixWin: if you've got any ideas on how to fix the race condition in the conditional of that if statement, that would be nice too :) | 18:21 | |
18:21
rindolf joined
18:24
andreoss left
|
|||
tadzik | hm, I'm considering making :force a default when doing CUR.install() in panda and alikes | 18:29 | |
is there ever any harm done by this action, other than potentially wasting some time on it that wouldn't otherwise needs to be spent? | 18:30 | ||
though it may de-motivate people from actually versioning their stuff properly | |||
yeah, I'm not in favour of de-educating folks. Thanks for help, #perl6 :) | 18:31 | ||
RabidGravy | couldn't do what it does with the deps? | ||
or something | 18:32 | ||
tadzik | hm? | ||
RabidGravy | only even try to install if the version you got is newer than an installed on? | ||
one? | 18:33 | ||
tadzik | it does that, yes | ||
18:33
uruwi joined
|
|||
tadzik | but I found that in module development I often go through a cycle of "install this stuff for me please even though I'm not ready to bump the version number yet" | 18:33 | |
or "I'd rather not bump the version number every time I make a change" | 18:34 | ||
so now I always do `redpanda -du .`, but it feels like there's a minor annoyance here somewhere that's easily solvable with software :) | |||
perhaps tools should default to "yes, really update regardless of the version" when you give it a location (path, git url etc) rather than a module name | 18:35 | ||
since you're likely to know what you're doing and this is exactly what you mean | |||
18:39
AlexDaniel joined
|
|||
dalek | osystem: cdb74b0 | (Zoffix Znet)++ | META.list: Add Bailador::Dev::AutoRestarter script to detect source code changes and auto-restart Bailador app: github.com/zoffixznet/perl-Bailado...oRestarter |
18:40 | |
AlexDaniel | ZoffixWin: not sure if you got an answer to your thingy but | ||
m: ‘foobar’ ~~ /(foo(bar))/; say $0; say $0[0] | |||
camelia | rakudo-moar 1acf80: OUTPUT«「foobar」 0 => 「bar」「bar」» | ||
AlexDaniel | ZoffixWin: I guess that ↑ is what you wanted | ||
18:40
pochi joined
|
|||
tadzik | ermagherd | 18:41 | |
AlexDaniel | m: ‘foobar’ ~~ /(foo(bar))/; say ~$0; say ~$0[0] | ||
camelia | rakudo-moar 1acf80: OUTPUT«foobarbar» | ||
tadzik | ZoffixWin: that's amazing! | ||
psch | m: ‘foobar’ ~~ /(foo(bar))/; .say for @0 | ||
camelia | rakudo-moar 1acf80: OUTPUT«「bar」» | ||
psch | aw | ||
ZoffixWin | AlexDaniel, thanks | ||
psch | well, only slightly misleading, isn't it | ||
m: ‘foobar’ ~~ /(foo(bar))/; put $0; put @0 | 18:42 | ||
camelia | rakudo-moar 1acf80: OUTPUT«foobarbar» | ||
AlexDaniel | what is misleading? | ||
psch | that a nested capture is the first multi-capture | ||
m: 'foobar' ~~ /(...) ** 2/; say @0 | |||
camelia | rakudo-moar 1acf80: OUTPUT«[「foo」 「bar」]» | ||
psch | AlexDaniel: the overload between @0 meaning "the first element of the first capture" as well as "the first capture that captures more than once" feels weird, is my point | 18:43 | |
AlexDaniel | oh | 18:44 | |
indeed | |||
psch | m: 'foobar' ~~ /(...) ** 2/; say @() | 18:45 | |
camelia | rakudo-moar 1acf80: OUTPUT«([「foo」 「bar」])» | ||
psch | m: 'foobar' ~~ /(...) ** 2/; say $() | ||
camelia | rakudo-moar 1acf80: OUTPUT«foobar» | ||
psch | well, those are all magical i suppose... vOv | ||
AlexDaniel | whoa… | 18:46 | |
TimToady | m: say "bicycle race".substr(2, -1) | 18:49 | |
camelia | rakudo-moar 1acf80: OUTPUT«Number of characters argument to substr out of range. Is: -1, should be in 0..Inf; use *-1 if you want to index relative to the end in block <unit> at /tmp/HvO12Bmtpt line 1Actually thrown at: in block <unit> at /tmp/HvO12Bmtpt line 1» | ||
TimToady | m: say "bicycle race".substr(2, -1) // '' | ||
camelia | rakudo-moar 1acf80: OUTPUT«» | ||
TimToady | _nadim: why not just do that? ^^^ | ||
18:57
ufobat left
|
|||
dwarring | m: <🚲 🚲 🚲>.race | 19:00 | |
camelia | ( no output ) | ||
ZoffixWin | .u 🚲 | 19:01 | |
yoleaux | U+1F6B2 BICYCLE [So] (🚲) | ||
ZoffixWin | heh | ||
m: "$_ won".say and exit for <🚲1 🚲2 🚲3>.race: :1batch | 19:03 | ||
camelia | rakudo-moar 1acf80: OUTPUT«🚲1 won🚲2 won» | ||
19:03
ufobat joined
|
|||
literal | class Foo { constant BAR = 3; }; my $foo = Foo.new; how do I get to BAR from $foo? | 19:04 | |
ZoffixWin | m: class Foo { constant BAR = 3; }; my $foo = Foo.new; say Foo::BAR | 19:05 | |
camelia | rakudo-moar 1acf80: OUTPUT«3» | ||
literal | ZoffixWin: I mean without hardcoding the class name | ||
$foo.some.method.chain.BAR | |||
ugexe | m: class Foo { constant BAR = 3; method BAR { BAR }; }; Foo.new.BAR.say | 19:06 | |
camelia | rakudo-moar 1acf80: OUTPUT«3» | ||
ZoffixWin | ^name gives Foo in this case.. um... unsure how to get bar from that | ||
m: class Foo { constant BAR = 3; }; my $foo = Foo.new; say "$foo.^name()::BAR".EVAL | 19:07 | ||
camelia | rakudo-moar 1acf80: OUTPUT«3» | ||
ZoffixWin | heh | ||
m: class Foo { constant BAR = 3; }; my $foo = Foo.new; say ::('::') | |||
camelia | rakudo-moar 1acf80: OUTPUT«Start argument to substr out of range. Is: 1, should be in 0..0; use *1 if you want to index relative to the end in block <unit> at /tmp/cktr011TA1 line 1Actually thrown at: in block <unit> at /tmp/cktr011TA1 line 1» | ||
ZoffixWin giggles | 19:08 | ||
TimToady | timotimo: haven't looked at that code in a while, but I expect some of the original enum parse/actions hackery might be interfering with the more general case, which should be able to define pretty much any terms/values from pairs, modulo semantic constraints imposed by the enum type | ||
timotimo | OK, cool :) | 19:14 | |
19:15
rindolf left
|
|||
dalek | osystem: 9c51126 | (Zoffix Znet)++ | META.list: Move Audio::MIDI::Note to Perl6-Noise-Gang |
19:21 | |
timotimo | what'll the noise gang distribution of rakudo be called? | 19:22 | |
ZoffixWin | Racket :) | 19:24 | |
jnthn | Rockudo :P | ||
ZoffixWin | jnthn++ | ||
19:25
uruwi left
|
|||
timotimo | damn, that's good | 19:25 | |
literal | is it possible to topicalize a parameter in method's signature? | 19:26 | |
jnthn | literal: Just name a parameter $_ ? | ||
psch | m: sub f($_) { .say }; f 2 | ||
camelia | rakudo-moar 1acf80: OUTPUT«2» | ||
literal | ah | ||
19:27
jjido_ joined
|
|||
stmuk_ | whose going to be a Rockudo Star? | 19:29 | |
ZoffixWin | :D | ||
19:29
yqt joined
|
|||
ugexe | a 10x Rockudo Star | 19:32 | |
19:32
AlexDaniel left
|
|||
stmuk_ | full stack! | 19:32 | |
19:34
lostinfog joined
|
|||
ZoffixWin | FYI: Yapc::eu 2016 <amalia> And we are also lauching the call for speakers medium.com/yapc-europe-2016/call-f....kspsclkzo | 19:37 | |
19:40
jjido_ left
|
|||
ufobat | strange world, my wive asked me to work on bailador because she has a bad conscience | 19:52 | |
ZoffixWin | :) | ||
ufobat | ZoffixWin, i like your restart script a lot :) | 19:54 | |
19:54
spider-mario joined
|
|||
ZoffixWin | Thanks. | 19:54 | |
looks like panda doesn't know how to --force install scripts. The install succeeds, but the script doesn't update :/ | 20:05 | ||
20:07
maybekoo2 joined
|
|||
_nadim | TimToady: That's definitely a way! | 20:07 | |
20:08
dolmen joined
|
|||
_nadim | TimToady: what surprises me with >> say "bicycle race".substr(2, -1) // '' << is that the warning is gone! | 20:12 | |
20:12
user3 joined
|
|||
tadzik | ZoffixWin: please tell me more | 20:13 | |
user3 | at this time, how much slower is the perl6 rakudo compiler compared to perl5? | ||
for general processing, and in particular for regex | |||
2x 10x slower/ | 20:14 | ||
? | |||
psch | m: my $x = "foo".substr(1, -1); say "ok" | ||
camelia | rakudo-moar 1acf80: OUTPUT«ok» | ||
tadzik | ZoffixWin: the script handling in general is quite sketchy in CURs :/ | ||
ZoffixWin | tadzik, you know the wrapper script that's generated when you install scripts inside the dist? Here's my modified one. gist.github.com/zoffixznet/d92b530...61bd0720f1 | ||
psch | _nadim: the error "disappears" because substr returns a Failure that only complains when it's evaluated | ||
ZoffixWin | tadzik, I had to add sort { $^b<ver> cmp $^a<ver> }, on line 10 for the wrapper to actually pick the latest version | ||
psch | m: my $x = "foo".substr(1, -1); say $x.WHAT | 20:15 | |
camelia | rakudo-moar 1acf80: OUTPUT«(Failure)» | ||
psch | _nadim: ^^^ | ||
tadzik | ZoffixWin: hm, interesting | ||
ZoffixWin | And I have like a dozen version installed, because I did --force install several times. | 20:16 | |
tadzik | hehe | ||
BooK | when I put a class in a module, should I do unit module Foo; class Foo { ... } ? | ||
20:16
darutoko left
|
|||
tadzik | so they did get installed, just that the generated script was broken? | 20:16 | |
BooK | and then use Foo; in the code needing it? | 20:17 | |
ZoffixWin | BooK, you can. unit class Foo; is also a thing | ||
tadzik, yes | |||
BooK | I have some private functions and variables | ||
_nadim | psch: OHHH I like it! | ||
tadzik | oh noes | 20:20 | |
ZoffixWin | m: sub defuse {so $^a}; my $x = "foo".substr(1, -1); defuse $x; say $x.words[1..4].join: ' '; say "meow" | ||
camelia | rakudo-moar 1acf80: OUTPUT«Number of characters argumentmeow» | ||
ZoffixWin | :) | ||
tadzik | ZoffixWin: speaking of 'install --force', may I interest you in being a betatest of what will soon [tm] become part of the new, big, major panda update? :) | ||
ZoffixWin | not really lol | ||
I started working on perl6.party at 9AM... it's 4:21PM now and I still don't have anything ready. Have been messing with bailador autorestart script lol | 20:21 | ||
perl6.party | |||
tadzik | hehe | 20:22 | |
ZoffixWin | Cool, hexchat recognizes it as a link | ||
20:25
Praise joined,
Praise left,
Praise joined
20:28
remmie2 left
20:30
remmie joined
|
|||
timotimo | well, if you put http:// in front ... | 20:32 | |
20:32
_mg_ left
|
|||
timotimo | oh | 20:32 | |
ZoffixWin | :) | ||
timotimo | ... never mind | ||
20:33
user3 left
|
|||
dalek | c: cd3dd6d | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod: fix enum return type in example |
20:33 | |
20:33
rurban joined
20:34
Praise left
|
|||
masak | hm, is github.com/perl6/perl6.org/commit/e64aafc918 somthing I should do something about? | 20:36 | |
20:36
Praise joined
|
|||
masak | I recall producing my feed.atom with quite some care, using a validator... | 20:37 | |
but is there an advantage (for me or others) to have that `type="text/html"` on the `<link>` ? | |||
20:38
rurban left
20:41
Ven joined
|
|||
RabidGravy | anyone else interested in being press ganged into perl 6 noise gang? | 20:45 | |
ZoffixWin | masak, that attribute declares the type of content the link points to. It's up to the tool parsing it to make use of that information. | 20:48 | |
20:48
adu left
20:49
uruwi joined
20:50
sufrostico left
|
|||
ZoffixWin | BTW, did anything happen to the whole make Bailador auto-serve static files from a specific dir thing? | 20:50 | |
I recall there was a conversation | |||
masak | ZoffixWin: my question was more -- why was the expectation of `type="text/html"` there in the first place? is it a common expectation? can I read up on this somewhere? :) | ||
ZoffixWin | masak, ah, it was there because there are multiple <link>s in the XML it's parsing, so adding the extra restriction let it avoid wrong links. | 20:51 | |
20:51
zwu joined
|
|||
ZoffixWin | As for reading, the spec I guess: www.w3.org/TR/2011/WD-html5-author...-link-type | 20:52 | |
"The type attribute gives the MIME type of the linked resource. It is purely advisory" | |||
ufobat | whats the difference between my sub something and sub something ? | ||
masak | ufobat: none | 20:53 | |
ZoffixWin | I don't think there is any. It's `my` by default. | ||
masak | ufobat: a sub is lexical by default | ||
ZoffixWin | m: class Foo { our sub bar { say 'bar' }; sub cow { say 'cow' }; my sub meow { say 'meow' } }; Foo::bar; Foo::cow; Foo::meow | ||
camelia | rakudo-moar 1acf80: OUTPUT«barCould not find symbol '&cow' in block <unit> at /tmp/Q2GwJtI1Sh line 1Actually thrown at: in block <unit> at /tmp/Q2GwJtI1Sh line 1» | ||
ZoffixWin | m: class Foo { our sub bar { say 'bar' }; sub cow { say 'cow' }; my sub meow { say 'meow' } }; Foo::bar; Foo::meow | ||
camelia | rakudo-moar 1acf80: OUTPUT«barCould not find symbol '&meow' in block <unit> at /tmp/FMSFPqLVyC line 1Actually thrown at: in block <unit> at /tmp/FMSFPqLVyC line 1» | ||
ufobat | good! thanks! | 20:54 | |
masak | ZoffixWin: ok, so this was only on the level of writing a query that found all the right <link> elements. got it. | ||
ZoffixWin | Yeah | ||
zwu | Is the S11-modules.pod? Because the example code use Sense <&common @horse>; expecting a positional parameter to export sub instead? | ||
I mean if the S11-moudules.pod documentation is outdated? | 20:55 | ||
21:02
skids left
|
|||
ufobat | oh yeah! bailador almost runs on HTTP::Server::Tiny | 21:03 | |
ZoffixWin | How do I use this %?RESOURCES thing? I'm dumping it, but it's empty | 21:07 | |
21:09
TEttinger joined,
Ven left
21:10
_28_ria left
|
|||
ZoffixWin | OK. The issue was resource/resources. The spec says "resource" directory but it's actually looking in resources | 21:10 | |
21:10
sufrostico joined
21:18
grondilu left
|
|||
ZoffixWin | Does Perl 6 has some sort of construct to ensure a path is *inside* a directory? I thought I saw an example. e.g., "foo/bar" is inside, but "foo/../../../bar" is not. You know what I mean? | 21:19 | |
I need some safe way to open a file | |||
perlpilot | $*SPEC might have a method for that | 21:21 | |
dalek | ar: 87c3a4a | (Steve Mynott)++ | / (2 files): fix PATH for make modules-install under windows |
21:22 | |
21:23
dolmen left
|
|||
ZoffixWin | Don't see one. | 21:23 | |
I guess I should splitpath filter out any updir/curdir and then join back together | |||
perlpilot | ZoffixWin: It still sounds like something that should exist in IO::Spec. Maybe get lizmat to add it :) | 21:26 | |
ZoffixWin | m: say $*SPEC.catdir: $*SPEC.splitdir('foo/../../bar/foo.txt').grep({ $_ ~~ $*SPEC.curupdir }) | 21:27 | |
camelia | rakudo-moar 1acf80: OUTPUT«foo/bar/foo.txt» | ||
ZoffixWin | uggly | ||
ugexe | m: my $path = "foo/../bar".IO; say $path.resolve; say $path.resolve.starts-with('bar') | 21:31 | |
camelia | rakudo-moar 1acf80: OUTPUT«"/home/camelia/bar".IOFalse» | ||
ugexe | somethin like that anyway | 21:32 | |
then a good ol `use MONKEY-TYPING; augment IO::Path { method contains-path($path) { <check code> };` | 21:33 | ||
ZoffixWin | ugexe++ those don't seem to be documented | ||
ugexe | theres a warning in resolve though: "# XXXX: Not portable yet; assumes POSIX semantics" | 21:34 | |
(and contains-path is not an original method, thats just a way to add it to your IO::Path objects) | 21:40 | ||
ufobat | good night :) | 21:42 | |
21:42
Relsak left
21:44
ufobat left
21:51
sufrostico left
21:52
Sgeo joined
21:59
ZoffixLappy joined
22:00
hotel_california joined
22:01
nchambers joined,
hotel left
22:03
sufrostico joined
|
|||
dalek | osystem: 6e9e9f1 | (Zoffix Znet)++ | META.list: Fix incorrect repo name |
22:03 | |
22:08
kid51 joined
22:12
grondilu joined
22:16
skids joined
|
|||
ZoffixLappy eyes github.com/ufobat/Bailador/blob/ma...ticFile.pm | 22:17 | ||
I wonder what's that for... Not used anywhere. | |||
22:21
tomboy64 joined
|
|||
ZoffixLappy | wtf... we *still* can't serve binary files with Bailador? | 22:21 | |
22:23
perlawhirl joined
|
|||
perlawhirl | RabidGravy: the link to 'module list' is borked | 22:23 | |
22:24
lostinfog left
|
|||
ZoffixLappy is baffled | 22:26 | ||
22:27
RabidGravy left
|
|||
ZoffixLappy | Ugh.. good god: github.com/supernovus/perl6-psgi/pull/7/files | 22:30 | |
literal | maybe a silly question...how do I flatten a Pair? | 22:34 | |
or an entire hash of them | |||
ugexe | lol | ||
github.com/davepagurek/perl6-psgi/...m6#L21-L24 | |||
then later does $output ~~ Buf | 22:35 | ||
ZoffixLappy | literal, flatten into what? The answer is likely | | ||
(which is a slip) | |||
literal | ZoffixLappy: to go from {1 => 2, 3 => 4} to (1,2,3,4) | ||
ugexe | so no matter what $output gets assigned a string value, so will never ~~ Buf | ||
perlawhirl | .kv | ||
m: say (this => 'that').kv | 22:36 | ||
camelia | rakudo-moar 1acf80: OUTPUT«(this that)» | ||
literal | ah, of course | ||
ZoffixLappy | m: my $p = {1 => 2, 3 => 4}; say ['a', |$p.kv] | ||
camelia | rakudo-moar 1acf80: OUTPUT«[a 1 2 3 4]» | ||
ZoffixLappy | ugexe, yeah, and it needs to be a Buf when serving binary files. I opened an Issue saying it needs to accept Buf but the "fix" changed it to Stringy :/ | 22:38 | |
22:38
tomboy64 left
|
|||
ugexe | Stringy can take a buf. the problem is even if it *is* a buf at initialization of $output, its immediately turned into a string in the following conditional by assigning a string no matter what | 22:38 | |
ZoffixLappy | hm | 22:39 | |
ugexe | m: my Stringy $output = Buf.new(1,2,3,4); say $output.WHAT; $outout = "asdf"; say $output.WHAT | 22:40 | |
camelia | rakudo-moar 1acf80: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NHD3uiZGMSVariable '$outout' is not declared. Did you mean '$output'?at /tmp/NHD3uiZGMS:1------> 3t = Buf.new(1,2,3,4); say $output.WHAT; 7⏏5$outout = "asdf"; say $output.WHAT» | ||
ugexe | m: my Stringy $output = Buf.new(1,2,3,4); say $output.WHAT; $output = "asdf"; say $output.WHAT | ||
camelia | rakudo-moar 1acf80: OUTPUT«(Buf)(Str)» | ||
22:40
tomboy64 joined
|
|||
ZoffixLappy | Hm. I'm getting "Type check failed in assignment to $output; expected Str but got Buf (Buf.new(72,84,84,80,4...)" | 22:40 | |
huh.. on this line: github.com/supernovus/perl6-psgi/b...GI.pm6#L47 | 22:42 | ||
ZoffixLappy starts to suspect maybe the installed version isn't the latest for some reason | |||
22:44
leont left
|
|||
ZoffixLappy | *sigh* Gonna nuke everything and try to use zef instead of panda | 22:44 | |
ugexe | i dunno, from what i can tell that code should not work properly | 22:45 | |
ZoffixLappy | BTW, ISTR someone asking if there was a difference between a sub and pointy block. There's this: | 22:47 | |
m: sub {return}() | |||
camelia | ( no output ) | ||
ZoffixLappy | m: -> {return}() | ||
camelia | rakudo-moar 1acf80: OUTPUT«Attempt to return outside of any Routine in block <unit> at /tmp/oxwDvtWBYK line 1» | ||
22:56
zwu left,
perlawhirl left,
perlawhirl joined
22:58
Herby_ joined
|
|||
Herby_ | Afternoon, everyone! | 22:58 | |
o/ | |||
ZoffixLappy | \o | 22:59 | |
perlawhirl | :q | 23:00 | |
lol | |||
23:00
perlawhirl left
23:01
firstdayonthejob left
|
|||
ZoffixLappy | rakudobrew build zef doesn't work | 23:08 | |
Well.. it installs zef, but when I run it I get "===SORRY!=== Failed to open file /home/zoffix/.perl6/precomp/27E0B8A90A583776A17689697FE506415BB69CBE.1461970578.11573/F9/F94CA4E91B2AF324B8A925E1F065F40258AE4D90.deps: no such file or directory" | 23:09 | ||
ZoffixLappy is exhausted from all the issues experienced today | |||
ugexe | did you `rakudobrew rehash` first? | ||
otherwise you probably have to delete .perl6/precomp for some reason | 23:10 | ||
23:11
dolmen joined
|
|||
ZoffixLappy | ugexe++ that did the trick | 23:12 | |
grondilu | m: use MONKEY-SEE-NO-EVAL; (EVAL '-> ($x, $y) {}')(); | 23:14 | |
camelia | rakudo-moar 1acf80: OUTPUT«Too few positionals passed; expected 1 argument but got 0 in block at EVAL_0 line 1 in block <unit> at /tmp/fYTPaOL2tt line 1» | ||
grondilu | m: use MONKEY-SEE-NO-EVAL; (EVAL '-> ($x, $y) {}')(1, 2); | 23:15 | |
camelia | rakudo-moar 1acf80: OUTPUT«Too few positionals passed; expected 2 arguments but got 0 in sub-signature in block at EVAL_0 line 1 in block <unit> at /tmp/akFOn5UOKA line 1» | ||
grondilu | ^not sure why that does not work | ||
m: use MONKEY-SEE-NO-EVAL; (EVAL 'sub ($x, $y) {}')(1, 2); | |||
camelia | ( no output ) | ||
grondilu | meh | ||
23:16
wamba joined
|
|||
ZoffixLappy | m: my $x = -> ($x, $y) {}; $x(1, 2) | 23:18 | |
camelia | rakudo-moar 1acf80: OUTPUT«Too few positionals passed; expected 2 arguments but got 0 in sub-signature in block <unit> at /tmp/1PwAuRxrkO line 1» | ||
ZoffixLappy shrugs | |||
Ahhh | |||
m: use MONKEY-SEE-NO-EVAL; (EVAL '-> $x, $y {}')(1, 2); | 23:19 | ||
camelia | ( no output ) | ||
ZoffixLappy | grondilu, blocks don't need parens. And if you include them, it means destructuring | ||
m: use MONKEY-SEE-NO-EVAL; (EVAL '-> ($x, $y) {}')([1, 2]); | |||
camelia | ( no output ) | ||
grondilu | oh, good to know. | 23:20 | |
I managed to successfully generate code for my Clifford module :) | 23:27 | ||
github.com/grondilu/clifford/blob/...imized.pm6 | |||
ZoffixLappy | \o/ | ||
grondilu | now I'm anxious about testing it though. Kind of scared of finding out it's all crap :P | ||
geekosaur | it's all crap, yyou will realize this in about 6 months. (approximately a universal truth :p ) | 23:30 | |
23:30
dolmen left
|
|||
ZoffixLappy | :) | 23:30 | |
TimToady | soulds about 90% true :) | 23:32 | |
*sounds | |||
arnsholt | Definitely. These last few days, I've had to look at code I haven't touched since December 2012 and early 2013, and I've had much the same reaction | 23:33 | |
23:33
zwu joined
|
|||
grondilu | unfortunatly it's something that is often said about perl. | 23:35 | |
but I do believe it's only a matter of writing sensible code, not about the language itself. | |||
23:35
hotel_california left,
hotel joined
|
|||
grondilu | First drafts are always fugly. | 23:36 | |
TimToady | well, it's true about everything, if you believe Sturgeon. | ||
ZoffixLappy | nonsense. I have a ~100,000 LOC app at work with zero documentation, but I manage it just fine | ||
TimToady | it's in assembly, right? | ||
ZoffixLappy | I hate the code. I wish I had the time to rewrite it. But it's not line noise | ||
Nah, Perl 5 | |||
geekosaur remembers maintaining about 20,000 LOC of m4 macros around a 4GL, and another 30,000 or so LOC written using those macros | 23:37 | ||
ZoffixLappy rages | 23:39 | ||
Well, reinstalling everything fixed my issue with the Buf vs Str stuff, but now it seems content_type 'whatever' doesn't work in Baildator ~_~ my PNG is getting served as text/html :/ | |||
grondilu | m: say class A::B::C {}.new.WHAT # a bit surprised about the shortening here | 23:44 | |
camelia | rakudo-moar 1acf80: OUTPUT«(C)» | ||
ZoffixLappy | m: say class A::B::C {}.new.^name | ||
camelia | rakudo-moar 1acf80: OUTPUT«A::B::C» | ||
grondilu | oh ok | 23:47 | |
ZoffixLappy | Aw, cmon... we have arrays, people :( github.com/ufobat/Bailador/blob/a7...nse.pm#L22 | 23:48 | |
Well, this app doesn't set Content-Type and calling content_type doesn't set content type :( gist.github.com/zoffixznet/cd07431...465beee7c4 | 23:49 | ||
I'm really bummed I wasted about ~2 hours so far on crap errors and issue | 23:50 |