»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:16
adu joined
00:22
silug joined
00:29
adu left
00:32
adu joined
00:37
Cabanossi left
00:38
Cabanossi joined
00:42
Rawriful joined
00:53
aborazmeh joined,
aborazmeh left,
aborazmeh joined
00:57
TEttinger joined
01:00
lizmat joined
01:17
markong left
01:18
llfourn_ left
01:19
cpage_ left
01:22
bloatable6 left,
bloatable6 joined,
ChanServ sets mode: +v bloatable6
01:23
rashipi joined
01:33
adu left,
lizmat left
01:34
mudman joined
01:36
Cabanossi left,
espadrine left
01:37
konsolebox left
01:38
Cabanossi joined,
konsolebox joined
01:39
Rawriful left,
adu joined
01:48
kitsunenokenja left
01:51
llfourn joined
01:58
comborico1611 joined
02:00
lizmat joined
02:05
lizmat left
02:07
Cabanossi left
02:08
Cabanossi joined
02:09
George joined
|
|||
George | hi | 02:09 | |
what is this? | 02:10 | ||
teatime | It's a dream, George. | 02:11 | |
(This is the user support / discussion channel for the Perl 6 programming language) | |||
02:12
BenGoldberg joined
02:14
kitsunenokenja joined
02:20
adu left
|
|||
comborico1611 | Heh | 02:21 | |
I once showed my school buddy back in 1999 IRC connecting, and he thought i was "hacking". | 02:22 | ||
I had the background black, and all the flashing text and colors looked hacker legitimate. | 02:23 | ||
George | I mean what kind of information can one ask for here? | ||
comborico1611 | Information about the programming language Perl 6. | 02:24 | |
George | It says how to get started, but 'm just reading the tutorial, I was just curius about it | 02:25 | |
I've never seen this sort of thing before | 02:26 | ||
teatime | You're welcome to ask questions etc. that come up as you go through it. | ||
Like Perl6? Or an IRC help channel? | |||
comborico1611 | I was curious about programming back in 2000, then 17 years and by, and just this summer i got back into it. | ||
I'm pretty sure he means irc. | 02:27 | ||
02:27
adu joined
|
|||
George | both acually | 02:27 | |
comborico1611 | I think his head is reeling a bit by the ircness of irc. | ||
Heh | 02:28 | ||
George | I come from Haskell | ||
comborico1611 | Weird. Know any others? | ||
George | they say perl 6 is functional so I was giving i a try | ||
like programming languages? | |||
yes | 02:29 | ||
teatime | it can be, I really like how successfully it is 'multi-paradigm' | ||
George | I mean I started learning haskell recently | ||
comborico1611 | Oh okay. Not weird anymore. | ||
teatime | I have tried to learn Haskell about 3 times. | ||
I think I must have been smarter when I was younger. | |||
George | I am liking it actually | ||
comborico1611 | I got the impression you were a young'n that hadn't been introduced to the programming culture. | 02:30 | |
rashipi | At one point, a Perl6 compiler was the most important Haskell aplication and drove Haskell development. | ||
teatime | yiss | ||
although it was before my time with it | |||
comborico1611 | Hmm. Didn't know that. | ||
rashipi | As languages, they were developed togheter. | ||
teatime | but the links between haskell and perl6 become apparent from time to time | 02:31 | |
comborico1611 | Hmm. | ||
George | yes I heard that | ||
02:31
llfourn_ joined
|
|||
George | but if one has never coded in perl before is perl6 a good starting point? | 02:31 | |
geekosaur | I'd argue it's a better starting point than perl 5, unless you need to use perl 5 later. | 02:32 | |
perl6 is much less idiosyncratic --- it behaves consistently, whereas perl 5 is kinda infamously a mass of special cases | |||
teatime | perl6 is fun. that's about all I can contribute. | 02:33 | |
(perl5 was a lot of fun too, but I don't think it would be again if I were starting today.) | 02:34 | ||
George | yes I'm starting to get an idea from the pearl from Haskell tutorial and the one from Python | ||
02:35
llfourn left
|
|||
rashipi | Pearl is another language. | 02:36 | |
teatime | George: the name misleads a lot of people into thinking they're super-closely-related; they're not so much, they're different languages. | ||
perl 6 and 5 I mean | |||
George | ok ok | ||
geekosaur | they're conceptually related, nbut that's as far as it goes | 02:37 | |
02:38
ido joined,
ido left
|
|||
geekosaur | there's a number of core ideas that are in common, intentionally, which is why we call it perl. but perl 6 is taking advantage of a lot of general development in programming languages to express those core ideas in a more consistent and better organized way | 02:38 | |
comborico1611 | George, what languages do you know? | 02:41 | |
George | C/C++ Python and \JS | ||
and a little of PHP | 02:42 | ||
comborico1611 | I've never heard of the backslash one. | ||
teatime | "escape JavaScript" is a popular developer goal :) | ||
George | thats a typo | ||
comborico1611 | Lol | 02:43 | |
George | ahahah | ||
02:43
kitsunenokenja left
02:44
astronav_ joined
|
|||
comborico1611 | That's good stuff. I better get some sleep. Goodnight. Hope to see you on here George. | 02:44 | |
George | Thanks comborico1611! | ||
02:44
comborico1611 left
02:45
mudman left,
ilbot3 left
|
|||
George | Thanks to teatime, geekosaur and everyone else who has answered my questions but I think I have to go myself | 02:46 | |
teatime | Take it easy, and welcome. | ||
02:46
George left
02:56
ilbot3 joined,
ChanServ sets mode: +v ilbot3
03:03
lizmat joined
03:06
Cabanossi left,
pentashift joined
03:07
lizmat left
03:08
Cabanossi joined
|
|||
Herby_ | with regex and grammers, what is the difference between | and || | 03:14 | |
if any | |||
teatime | there is a difference, 1 second | ||
I beleive one matches in order given and the other matches longest alternative | 03:15 | ||
but let me find the actual docs | |||
docs.perl6.org/language/regexes#Alternation:_|| | |||
rashipi | | is for longest match | 03:16 | |
|| is left to right. | |||
Herby_ | thanks! | ||
rashipi | 'dog || doge' will never match doge | 03:18 | |
Herby_ | teatime: thanks for the link | ||
03:20
adu left
|
|||
Herby_ | rashipi: and 'dog | doge' will always match doge? | 03:22 | |
assuming doge is actually in the string | |||
teatime | yiss | ||
rashipi | m: say 'doge is the word' ~~ /dog|doge/ | 03:23 | |
camelia | 「doge」 | ||
rashipi | m: say 'doge is the word' ~~ /dog||doge/ | 03:24 | |
camelia | 「dog」 | ||
rashipi | m: say 'doge is the word' ~~ /doge||dog/ | ||
camelia | 「doge」 | ||
03:29
pentashift left
03:31
wamba left
03:32
adu joined
03:35
BenGoldberg left
03:46
eliasr joined
03:49
aborazmeh left
03:56
konsolebox left
03:57
konsolebox joined,
noganex_ joined
04:00
noganex left
04:01
cpage_ joined
04:03
konsolebox left,
konsolebox joined
04:18
astronav_ left
04:21
Cabanossi left,
Cabanoss- joined
04:22
Cabanoss- is now known as Cabanossi
04:26
cdg joined
04:31
cdg left
04:34
lizmat joined
04:35
adu left
04:36
cdg joined
04:38
lizmat left
|
|||
Herby_ | grammars are hard | 04:39 | |
04:40
cdg left
|
|||
rashipi | what you're trying to do? | 04:48 | |
Herby_ | as an exercise, I'm trying to write a grammar to parse torrent names | ||
pastebin.com/jwbjyQCv | 04:52 | ||
the title matches everything except the end: -ASAP[ettv] | 04:53 | ||
season, episode, and resolution dont match | |||
rashipi | because it's greedy | 04:54 | |
Put a ? to turn it frugal | 04:55 | ||
that way it will match the least possible | |||
Herby_ | where do I put the ? | ||
teatime | heh I've never heard that called frugal... I like it | 04:56 | |
rashipi | It's in the docs, haha | ||
Then it will match a single letter | |||
04:58
khw left
|
|||
Herby_ | no luck. | 05:02 | |
i'll look at it with fresh eyes tomorrow | 05:03 | ||
o/ | |||
05:03
Herby_ left
05:06
Cabanossi left
05:07
Cabanossi joined
|
|||
ZzZombo | Say, I have a grammar rule A that calls rule B, can I in my actions object get the match for A for the corresponding match B inside the action method? | 05:14 | |
05:21
thowe joined
05:23
pentashift joined
05:26
llfourn_ left
|
|||
geekosaur | uh? B doesn't know if it can only ever be called by A, and if tyhat *is* the case then there's likely some refactoring that will give you both | 05:32 | |
now if you mean from A's action method, B should be available as a named submatch | 05:33 | ||
05:45
konsolebox left
05:46
konsolebox joined
05:50
araraloren joined
05:59
poohman left,
eliasr left
06:06
konsolebox left
06:07
konsolebox joined
06:21
pentashift left
06:26
lizmat joined
06:31
lizmat left
06:44
zakharyas joined
06:45
kaare_ left
06:49
kaare_ joined
06:51
cdg joined
06:52
rashipi left
06:56
cdg left
07:03
silug left
07:07
darutoko joined
07:11
tim__ joined,
thowe left
07:21
zakharyas left
07:23
pentashift joined
07:24
tim__ left
07:28
lizmat joined
07:29
HoboWithAShotgun joined
|
|||
HoboWithAShotgun | who is froggs? (github.com/FROGGS/p6-Archive-Tar) | 07:30 | |
07:33
lizmat left
07:39
ribasushi left
07:41
lizmat joined
07:45
zakharyas joined,
lizmat left
07:47
ribasushi joined
07:55
rindolf joined
08:03
zakharyas left
08:05
Cabanossi left
08:06
Cabanossi joined
08:13
pmurias joined
08:18
lizmat joined
08:23
lizmat left
08:29
parv joined
08:35
sftp left
08:36
sftp joined
08:37
pentashift left
08:38
domidumont joined
08:42
konsolebox left
08:43
domidumont left,
domidumont joined
08:44
konsolebox joined
08:50
poohman joined
08:56
wander joined
08:57
wamba joined
|
|||
wander | m: my %h; my @a = [1,2,3]; %h<k> = %(name=>"kk", :@a); .say for %h<k><a>; .say for %h<k><a>.Array; | 08:58 | |
camelia | [1 2 3] 1 2 3 |
||
wander | Here is an interesting example, I think, of the topic "container" | 08:59 | |
"container" is considered as one of the most hard topic to understand of Perl 6 by people around me. | 09:02 | ||
09:02
domidumont left
|
|||
wander | So I want to attempt to figure out how we design Perl 6 "container", the only article I found about it is from the doc site. | 09:03 | |
wonder if there someone ever talked about it, such like in a blog or something. | |||
one of the most annoying cases is an Array `[ ... ]' sometimes becomes `$[ ...]` | 09:05 | ||
09:13
poohman left
09:20
Cabanossi left
09:22
Cabanossi joined
09:33
espadrine joined,
mryan50 joined,
zakharyas joined
|
|||
mryan50 | wander: [ … ] is an array container; $[ … ] is a scalar container holding a reference to an array container | 09:35 | |
… well, at leat I think that’s how it is | 09:36 | ||
s/leat/least/ | 09:37 | ||
wander | yes, i know this. you can see the example above about '%h' and '@a', so @a happens to be convert form array to a refer, interesting and confusing when you first meet it. | 09:39 | |
09:45
lizmat joined
|
|||
wander | scalar containers, callable containers and etc.. when they appear singly, things go well. but variable is passed and thus container changes, here things go, somehow, confusing | 09:47 | |
so i wonder if someone has had a talk about this topic :P | 09:50 | ||
09:50
nativecallable6 left,
nativecallable6 joined,
ChanServ sets mode: +v nativecallable6
09:52
Foxymoron joined,
mryan50 left
|
|||
lizmat | wander: do you have an example of something that confuses you? | 09:55 | |
09:57
Foxymoron left
09:58
mryan50 joined
09:59
yqt joined
10:08
sena_kun joined
|
|||
wander | no. i don't remember it, some i have met but fixed in someway so i forget it. i will ask for help if facing a very issue. however, my friends who i recommend Perl 6 to tell me the concept "container" is not so clearly | 10:12 | |
so i don't ask for help to fix a particular issue, but look for a talk about "container" | 10:13 | ||
10:15
mryan50 left
10:18
zakharyas left
|
|||
lizmat | wander: jnthn.net/papers/2015-spw-perl6-course.pdf specifically the "Variables" chapter | 10:19 | |
10:19
Cabanossi left
10:22
Cabanossi joined
|
|||
wander | thank you ^_^ | 10:24 | |
10:28
HoboWithAShotgun left
|
|||
moritz | wander: docs.perl6.org/language/containers | 10:32 | |
wander | yes, i mention it above and be reading it :P | 10:34 | |
10:34
mryan50 joined
|
|||
moritz | sorry, didn't fully backlog | 10:38 | |
10:39
lizmat left
|
|||
teatime | morning moritz | 10:39 | |
and was gonna say lizmat | |||
10:41
cdg joined
10:45
cdg left
10:46
geospeck joined
10:49
konsolebox left
10:50
konsolebox joined
10:52
HoboWithAShotgun joined
10:57
konsolebox left
10:58
mryan50 left
11:00
konsolebox joined
11:13
robertle joined
11:14
mryan50 joined
11:15
HoboWithAShotgun left
11:16
konsolebox left
11:17
xinming_ joined,
konsolebox joined
11:20
xinming left
11:26
konsolebox left
11:28
konsolebox joined
11:33
mryan50 left
11:35
kaare_ left,
kaare_ joined,
Cabanossi left
11:36
epony left
11:37
Cabanossi joined
11:38
konsolebox left
11:40
konsolebox joined
11:48
konsolebox left
11:49
konsolebox joined
11:54
konsolebox left
11:55
konsolebox joined
11:57
parv left
11:58
geospeck left
12:00
konsolebox left
12:01
konsolebox joined
12:06
Cabanossi left
12:07
Cabanossi joined
12:08
konsolebox left
12:09
konsolebox joined
12:10
markong joined
12:13
llfourn joined
12:14
konsolebox left
12:15
konsolebox joined
12:16
nightfrog left
|
|||
ZzZombo | m: class A{ has %.b is default(Nil)};my $c:=A.new.b<asd>; my $a is default(Int)=A.new.b<asd>; say $a.VAR.perl | 12:16 | |
camelia | Invocant of method 'perlseen' must be an object instance of type 'Mu', not a type object of type 'Int'. Did you forget a '.new'? in block <unit> at <tmp> line 1 |
||
12:24
konsolebox left
12:25
konsolebox joined
12:41
epony joined
12:43
leedo left
12:46
kitsunenokenja joined,
Rawriful joined
12:49
stmuk_ joined
12:52
stmuk left
12:58
gagalicious left
13:00
gagalicious joined
13:19
Cabanossi left
13:21
HoboWithAShotgun joined,
domidumont joined
13:22
Cabanossi joined
13:24
markmont left
13:39
astronav_ joined
13:42
domidumont left
13:44
astronav_ is now known as astronavt_
13:45
adu joined
14:04
gagalicious left
14:07
gagalicious joined
14:12
ShalokShalom joined,
kaare__ joined
14:13
adu left,
char_var[buffer] left
14:14
kaare_ left,
char_var[buffer] joined
14:15
char_var[buffer] left
14:20
markmont joined,
lizmat joined
14:22
astronavt_ is now known as astronavt
14:24
eliasr joined
14:28
poohman joined
|
|||
poohman | hello all - I say the method "into" being used in one of Jonathans old presentations. but when I use it, it says undeclared routine. | 14:29 | |
I saw , I meant | |||
masak | on what type? | 14:33 | |
poohman | I didnt mention any type - getting some content using a POST request - grepping it - and using into to shove it into a variable | 14:35 | |
my $content = await $resp.body; | 14:36 | ||
$content | |||
==> grep(/\V*'HREF'\V*\v+/) | |||
==> into my $href; | |||
something like this | |||
14:36
Cabanossi left,
lizmat left
|
|||
HoboWithAShotgun | ==> is a kind of into operator | 14:36 | |
ZzZombo | remove `into`, be happy | ||
poohman | oh ok | 14:37 | |
14:37
Cabanossi joined,
pecastro left
|
|||
poohman | wow cool | 14:37 | |
thanks | 14:38 | ||
need to work on my regex - but it compiled - thanks | 14:39 | ||
14:40
markmont left
14:41
leedo joined,
lizmat joined
14:46
konsolebox left
|
|||
masak | HoboWithAShotgun++ | 14:46 | |
14:46
lizmat left
14:49
markmont joined
|
|||
HoboWithAShotgun | what's the praise for, masak? | 14:50 | |
masak | helping poohman | ||
HoboWithAShotgun | how do itell github to merge a fricking pull request? | ||
masak | oh, and ZzZombo++ also :) | ||
HoboWithAShotgun: usually there's a button | |||
or you can do it locally | 14:51 | ||
HoboWithAShotgun | for which i am loking for for quite a while now ^^ | ||
oh, there. nvm | 14:52 | ||
timotimo | so scimon's slides have examples that make me think junctions misbehave with chained operators: | ||
14:53
konsolebox joined
|
|||
timotimo | m: say 4 < 1^2^3^4^5 < 2; say say 4 < 1^2^3^4^5; say 1^2^3^4^5 < 2 | 14:53 | |
camelia | one(True, False, False, False, False) one(False, False, False, False, True) True one(True, False, False, False, False) |
||
14:54
pecastro joined
14:58
konsolebox left
14:59
geospeck joined
15:00
konsolebox joined
15:06
Cabanossi left
15:07
Cabanossi joined
15:08
aindilis left
15:10
pecastro left
15:12
dogbert17 joined
15:17
pecastro joined
15:18
mson left
15:20
gagalicious left
15:23
astronavt left
15:41
araraloren left
15:44
lizmat joined
15:46
astronavt joined
15:50
preaction joined,
steeznson joined,
Cabanossi left
15:51
steeznson left
15:52
Cabanossi joined
15:56
kitsunenokenja left
|
|||
ZzZombo | <ZzZombo> m: class A{ has %.b is default(Nil)};my $c:=A.new.b<asd>; my $a is default(Int)=A.new.b<asd>; say $a.VAR.perl | 15:56 | |
err | 15:57 | ||
m: class A{ has %.b is default(Nil)};my $c:=A.new.b<asd>; my $a is default(Int)=A.new.b<asd>; say $a.VAR.perl | |||
camelia | Invocant of method 'perlseen' must be an object instance of type 'Mu', not a type object of type 'Int'. Did you forget a '.new'? in block <unit> at <tmp> line 1 |
||
ZzZombo | ^ | ||
15:58
nightfrog joined
16:00
kitsunenokenja joined
16:02
Herby_ joined
|
|||
Herby_ | o/ | 16:02 | |
APic | \o | ||
16:03
stmuk joined
|
|||
ZzZombo | Hey, is it normal for older Rakudo installations in Windows to remain in the list of installed applications? | 16:03 | |
on* | |||
Herby_ | It doesn't for me but I always make a point to uninstall the previous installation first before installing the new | 16:04 | |
ZzZombo | I just install over, since the installer doesn't complain, and also wouldn't it force me to reinstall all modules every time? | 16:05 | |
16:05
stmuk_ left
|
|||
lizmat | m: say Int.VAR.perl | 16:06 | |
camelia | Int | ||
lizmat | hmmm | ||
m: say (my Int $).VAR.perl # ZzZombo: golfed | 16:07 | ||
camelia | Invocant of method 'perlseen' must be an object instance of type 'Mu', not a type object of type 'Int'. Did you forget a '.new'? in block <unit> at <tmp> line 1 |
||
Herby_ | ZzZombo: possibly. I'm new to this :) | 16:10 | |
ZzZombo | I wasn't even trying 😢 lizmat! | 16:12 | |
16:13
domidumont joined
|
|||
ZzZombo | it just appeared in this piece of code and it scared me, so I needed somebody to tell me this will go away from me | 16:13 | |
lizmat | seems something gets confused | 16:14 | |
but it also feels a bit like DIHWIDT | |||
(aka Doctor, It Hurts When I Do This) | |||
so don't do that :-) | |||
using .VAR is generally a code smell | 16:15 | ||
so why where you using that? | |||
ZzZombo | I'm not, the `.VAR.perl` part was only because I wanted be EXTRA sure I've got the right thing out of the hash, that is, Nil. | 16:16 | |
to be* | |||
16:19
breinbaas joined
16:20
krunen joined
16:21
charsbar left
16:22
charsbar joined,
khw joined,
tangible6 left,
yoleaux left,
yoleaux joined,
ChanServ sets mode: +v yoleaux
|
|||
Geth | doc: 7acf5e5f1f | (Elizabeth Mattijsen)++ | doc/Type/Telemetry/Period.pod6 Remove incorrect documentation from T:Period - this pod was from before the Instrument refactoring - a Telemetry::Period object is the same as a Telemetry object, only the *meaning* of the values is different. |
16:22 | |
synopsebot | Link: doc.perl6.org/type/Telemetry/Period | ||
16:22
tangible6 joined,
epony left,
bisectable6 left,
unicodable6 left,
releasable6 left
16:23
statisfiable6 left,
Geth__ left
|
|||
lizmat | m: class A{ has %.b is default(Nil)}; dd A.new.b<asd> # ZzZombo: quicker way to find out it gives Nil | 16:24 | |
camelia | Nil %!b = Nil | ||
ZzZombo | yeah, but when assigning it to a variable, it turns into Any w/o asking, that all the fudge is about. | 16:25 | |
lizmat | ZzZombo: "my $a" is short for "my Any $a", so assigning Nil to that *will* give you an Any | 16:27 | |
that's supposed to be the way it works | |||
Geth | doc: 2769ad2534 | (Elizabeth Mattijsen)++ | 2 files Move snapper doc, it is not a Type |
16:30 | |
ZzZombo | I see. The original issues wasn't even about that directly, it's about how could I pass a type in a hash to some function and use it or some default value if not present. | ||
In a similar vein to `my $class=%h<class> // $default;$class.new` | 16:31 | ||
16:31
TreyHarris left
|
|||
Geth | doc: 3354ac7e4f | (Elizabeth Mattijsen)++ | doc/Type/Telemetry/snapper.pod6 Make sure we link correctly to Telemetry |
16:37 | |
synopsebot | Link: doc.perl6.org/type/Telemetry/snapper | ||
doc: 0ed5cba7b1 | (Elizabeth Mattijsen)++ | doc/Type/Telemetry/Period.pod6 Make sure we link correctly to Telemetry |
|||
synopsebot | Link: doc.perl6.org/type/Telemetry/Period | ||
lizmat goes back to driving& | 16:38 | ||
16:38
lizmat left,
setty1 joined
16:50
unicodable6 joined,
releasable6 joined,
ChanServ sets mode: +v releasable6,
statisfiable6 joined
16:54
travis-ci joined
|
|||
travis-ci | Doc build errored. Elizabeth Mattijsen 'Move snapper doc, it is not a Type' | 16:54 | |
travis-ci.org/perl6/doc/builds/307527921 github.com/perl6/doc/compare/7acf5...69ad253493 | |||
16:54
travis-ci left
|
|||
buggable | [travis build above] ☠ Did not recognize some failures. Check results manually. | 16:54 | |
16:56
travis-ci joined
|
|||
travis-ci | Doc build errored. Elizabeth Mattijsen 'Remove incorrect documentation from T:Period | 16:56 | |
travis-ci.org/perl6/doc/builds/307525868 github.com/perl6/doc/compare/fc30d...cf5e5f1fce | |||
16:56
travis-ci left
|
|||
buggable | [travis build above] ☠ Did not recognize some failures. Check results manually. | 16:56 | |
poohman | m:say("Hello") | 17:05 | |
evalable6 | Hello | ||
poohman | m:my $source = "abcd\n123\nyjk\n897\nn1n2n3k\n";my @lines = $source.lines;@lines ==> grep(/\d+/) ==> my @num | ||
evalable6 | |||
poohman | m: my $source = "abcd\n123\nyjk\n897\nn1n2n3k\n";my @lines = $source.lines;@lines ==> grep(/\d+/) ==> my @num | 17:06 | |
camelia | ( no output ) | ||
17:07
travis-ci joined
|
|||
travis-ci | Doc build errored. Elizabeth Mattijsen 'Make sure we link correctly to Telemetry' | 17:07 | |
travis-ci.org/perl6/doc/builds/307530100 github.com/perl6/doc/compare/2769a...d5cba7b11a | |||
17:07
travis-ci left
|
|||
buggable | [travis build above] ☠ Did not recognize some failures. Check results manually. | 17:07 | |
poohman | m: my $source = "abcd\n123\nyjk\n897\nn1n2n3k\n";my @lines = $source.lines;@lines ==> grep(/\d+/) ==> my @num; say @num; | ||
camelia | [123 897 n1n2n3k] | ||
Geth | doc: 8d7aaa52d3 | (Jan-Olof Hendig)++ | doc/Type/Complex.pod6 Added documentation for sqrt |
17:08 | |
synopsebot | Link: doc.perl6.org/type/Complex | ||
Grrrr | 17:09 | ||
Herby_ | anyone know how to get hexchat to properly display camelia's unicode characters? | 17:10 | |
teatime | Herby_: Can you see → my arrows ↔ | 17:12 | |
Herby_ | yep | ||
teatime | then I think your problem is just that your configured font lacks the glyphs being used | ||
maybe try DejaVu instead | 17:13 | ||
or Unifont, if you want an ugly font that has almost literally everything | |||
(if you can specify a "fontstack" to search for glyphs, ending it with Unifont works great.) | |||
Herby_ | teatime: i'll give that a shot, thanks! | 17:14 | |
poohman | m: my $source = "abcd\n123\nyjk\n897\nn1n2n3k\n";$source ==>lines ==> grep(/\d+/) ==> my @num; say @num; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Preceding context expects a term, but found infix ==> instead at <tmp>:1 ------> 3jk\n897\nn1n2n3k\n";$source ==>lines ==>7⏏5 grep(/\d+/) ==> my @num; say @num; |
||
teatime | works if you do lines() instead of lines | 17:17 | |
poohman | m: my $source = "abcd\n123\nyjk\n897\nn1n2n3k\n";$source ==>lines() ==> grep(/\d+/) ==> my @num; say @num; | ||
camelia | [123 897 n1n2n3k] | ||
poohman | perfecto - thanks a lot | ||
teatime | well kindof | ||
oh, yes, nevermind | |||
poohman | kindof?? | ||
teatime | didn't realize the grep wasn't anchored | 17:18 | |
poohman | is there a difference | ||
teatime | it works | ||
17:19
Herby_ left,
Herby_ joined
|
|||
teatime | Herby_: looks relevant: hexchat.readthedocs.io/en/latest/ti...ial-glyphs | 17:19 | |
Herby_ | m: say "Hello world"; | 17:20 | |
camelia | Hello world | ||
teatime | looks like you can indeed specify a "font stack" | ||
Herby_ | teatime: I think I got it installed | ||
went with unifont | |||
thanks for the help! | |||
teatime | any time | ||
17:35
astronavt left
17:41
ramillies joined
17:51
ramillies left
17:53
travis-ci joined
|
|||
travis-ci | Doc build passed. Jan-Olof Hendig 'Added documentation for sqrt' | 17:53 | |
travis-ci.org/perl6/doc/builds/307539704 github.com/perl6/doc/compare/0ed5c...7aaa52d3ab | |||
17:53
travis-ci left
|
|||
Geth | doc: 023ac493d1 | (Jan-Olof Hendig)++ | doc/Type/Dateish.pod6 Fix formatting and a partly broken link |
17:56 | |
synopsebot | Link: doc.perl6.org/type/Dateish | ||
poohman | m: my token {[01 ... 31]} | 17:57 | |
camelia | ( no output ) | ||
geospeck | are Roles similar to interfaces from other languages eg Java? | ||
poohman | m: my token day {[01 ... 31]} | 17:58 | |
camelia | ( no output ) | ||
poohman | could I use something like this in Grammar - stringify it in some way | 17:59 | |
?? | |||
teatime | you can use it in a grammar without stringifying | ||
poohman | really - will it work directly?? | 18:00 | |
teatime | yup | ||
that's what it's for :) | |||
poohman | wow | 18:01 | |
let me try it | |||
back to programming after some years - so I dont really know how it is with other languages - but is something like this possible in the new generation languages | 18:03 | ||
i mean is this possible in most of the new generation languages | |||
or is it perl6 magic here?? | |||
teatime | grammars like Perl6 has are pretty unique to perl6 | 18:04 | |
when feeling optimistic, I expect them to spread and be loved the same way perl5 advanced regular expressions | 18:05 | ||
poohman | 😆 - I tried the following just as a test - didnt want to be surprised again | 18:06 | |
m: my $months=['Jan', 'Feb' ...'Dec'] | |||
camelia | ( no output ) | ||
teatime | there are grammar/parser implementations for other languages (e.g. Marpa), and there is the older tech of parser generators etc., but perl6 builds it into the language, and makes it very quick and easy to get started with | ||
heh, I don't expect that'll work | 18:07 | ||
poohman | It did give a result though | ||
teatime | m: say ['Jan', 'Feb' ... 'Dec'].first(12) | ||
camelia | Nil | ||
teatime | m: say ['Jan', 'Feb' ... 'Dec'] | ||
camelia | [Jan Feb Fea Fdz Fdy Fdx Fdw Fdv Fdu Fdt Fds Fdr Fdq Fdp Fdo Fdn Fdm Fdl Fdk Fdj Fdi Fdh Fdg Fdf Fde Fdd Fdc Fdb Fda Fcz Fcy Fcx Fcw Fcv Fcu Fct Fcs Fcr Fcq Fcp Fco Fcn Fcm Fcl Fck Fcj Fci Fch Fcg Fcf Fce Fcd Fcc Fcb Fca Fbz Fby Fbx Fbw Fbv Fbu Fbt Fb… | ||
teatime | yup | ||
poohman | super cool | 18:08 | |
no I meant integration of lazy lists etc in Grammars | |||
teatime | oh | ||
lists work like alternation, but I wouldn't think they stay lazy | |||
18:11
markmont left
|
|||
poohman | thanks teatime - time to hit the sack - seeya | 18:12 | |
teatime | o/ | ||
18:19
travis-ci joined
|
|||
travis-ci | Doc build errored. Jan-Olof Hendig 'Fix formatting and a partly broken link' | 18:19 | |
travis-ci.org/perl6/doc/builds/307553269 github.com/perl6/doc/compare/8d7aa...3ac493d1a6 | |||
18:19
travis-ci left
|
|||
buggable | [travis build above] ✓ All failures are due to: missing build log (1 failure). | 18:19 | |
18:21
jstuder joined
18:22
epony joined
18:27
darutoko left
18:32
jstuder left
18:35
astronavt joined
18:37
kaare__ left,
kaare__ joined
18:38
Khisanth left
18:42
markmont joined
18:58
jstuder joined
18:59
jstuder left
19:04
Khisanth joined,
HoboWithAShotgun left
19:16
kyan joined
19:18
kaare__ left
19:22
domidumont left
|
|||
lucs | Where are string escape sequences documented? (like \n, \o, \c, etc.) | 19:46 | |
19:47
kybr joined
|
|||
teatime | lucs: there's more of it here than initially meets the eye, if you read the paragraphs: docs.perl6.org/language/quoting#Escaping:_q | 19:50 | |
if I'm not overlooking an exhaustive list elsewhere, though, it could def. be improved. | 19:51 | ||
lucs | Yeah, maybe it would be nice to have a list somewhere, cross-referencing to the proper documentation. | 19:52 | |
I'm actually wondering if there's an escape to enter a decimal value, like one enters an octal value (so \077 would be something like \d119). | 19:54 | ||
teatime | looks like \c[] should do it | 19:56 | |
\c[119] | |||
ilmari | m: say "\c[65]" | ||
camelia | A | ||
teatime | docs.perl6.org/language/unicode#En..._Sequences | ||
lucs | Looks good, thanks. | ||
tyil | I just noticed, there's no unicode op for -> and => in perl 6, is there? | 19:57 | |
for pointy blocks and fat commas | |||
ilmari | m: for 42 → $a { say $a } | 19:58 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing block at <tmp>:1 ------> 3for 427⏏5 → $a { say $a } expecting any of: block or pointy block infix infix stopper |
||
ilmari | m: for 42 -> $a { say $a } | ||
camelia | 42 | ||
gfldex | m: say a ⇒ 42; | 19:59 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Bogus term at <tmp>:1 ------> 3say a 7⏏5⇒ 42; expecting any of: argument list infix infix stopper postfix prefix statement e… |
||
ilmari | m: sub infix:<⇒>($a, $b) { $a => $b }; say foo ⇒ 42 | 20:00 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Preceding context expects a term, but found infix ⇒ instead at <tmp>:1 ------> 3nfix:<⇒>($a, $b) { $a => $b }; say foo ⇒7⏏5 42 |
||
ilmari | m: sub infix:<⇒>($a, $b) { $a => $b }; say 'foo' ⇒ 42 | ||
camelia | foo => 42 | ||
gfldex | m: constant term:<⇒> := &infix:«=>»; say 'a' ⇒ 42; | 20:01 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Confused at <tmp>:1 ------> 3onstant term:<⇒> := &infix:«=>»; say 'a'7⏏5 ⇒ 42; expecting any of: infix infix stopper postfix statement end… |
||
20:06
HoboWithAShotgun joined
20:18
mson joined
20:25
kitsunenokenja left
20:30
s0me0ne-unkn0wn joined
20:31
SCHAPiE joined
20:33
lizmat joined,
Rawriful left
20:34
s0me0n3-unkn0wn left
20:35
Cabanossi left
20:37
Cabanossi joined
|
|||
moritz | m: constant term:<⇒> := &infix:«=>»; say ⇒ | 20:39 | |
camelia | sub infix:«=>» (Mu $key, Mu \value) { #`(Sub+{is-pure}+{Precedence}|49597216) ... } | ||
20:43
ivans left
20:48
ivans joined
21:06
Cabanossi left
21:07
Cabanossi joined
21:17
raiph left
|
|||
tyil | docs.perl6.org/routine/unlink says unlink returns True if you give it a single path, but in practice it seems to return a list | 21:18 | |
cry.nu/p/7ijn | |||
returns Array @ok = ["/tmp/0R14ZKUJ_U"] | |||
are the docs out of date here (if so, I'll make a pr), or is this a bug? | 21:19 | ||
21:19
rindolf left
|
|||
Geth | doc: 0a93d3f44d | (Elizabeth Mattijsen)++ | 2 files Move snapper pod into Telemetry |
21:20 | |
lizmat | tyil: good question, please make an issue out of it so we can discuss | 21:24 | |
theperlfisher.blogspot.nl/2017/11/t...hings.html # new blogging by DrForr | |||
tyil | I'm just rereading it, and it seems correct, the method would return True, but I use it as a sub(), which is slurpy and returns a list | ||
"/tmp/filename".IO.unlink returns True as expected | 21:25 | ||
I was already in the making of a ticket when I realized I was reading it wrong | 21:26 | ||
21:30
HoboWithAShotgun left
21:31
dustinm` joined
21:33
dustinm` left
21:37
dustinm` joined
21:41
geospeck left
21:43
yqt left
21:46
setty1 left
21:51
travis-ci joined
|
|||
travis-ci | Doc build failed. Elizabeth Mattijsen 'Move snapper pod into Telemetry' | 21:51 | |
travis-ci.org/perl6/doc/builds/307614490 github.com/perl6/doc/compare/023ac...93d3f44d85 | |||
21:51
travis-ci left
|
|||
buggable | [travis build above] ☠ Did not recognize some failures. Check results manually. | 21:51 | |
lizmat | *sigh* | ||
21:56
AlexDaniel left
21:57
AlexDaniel joined
|
|||
lizmat | hmmm... the errors all seem to be in stuff I didn't touch ? | 22:00 | |
Geth | doc: 8e8acb4556 | (Elizabeth Mattijsen)++ | doc/Type/Telemetry.pod6 Oops, =head 2 should be =head2 |
22:01 | |
synopsebot | Link: doc.perl6.org/type/Telemetry | ||
wander | morning ~ | 22:14 | |
lizmat: I close #1684 for your commit. Thanks for your effort :-) | 22:15 | ||
lizmat | wander: yw | 22:16 | |
22:19
mudman joined
22:28
robertle left
|
|||
gfldex | I'm stuck with an error message, that goes: | 22:35 | |
X::Multi::NoMatch+{X::Await::Died}: Cannot resolve caller report(List, :html); none of these signatures match: | |||
(*%_ --> Str:D) | |||
(@s, :@columns is copy, :$header-repeat is copy, :$legend is copy, :$csv is copy, :@format --> Str:D) | |||
(List, :$html is copy) | |||
I'm pretty sure the last candidate could match | |||
Juerd | It does look rather matching :) | 22:37 | |
gfldex | the first two candidates are in module A and the last one in module B | 22:38 | |
could that confuse Rakudo? | |||
timotimo | it shouldn't | 22:39 | |
you could try to output the candidates at the exact point it breaks | |||
to make sure the list isn't different because of error reporting issues? | 22:40 | ||
gfldex | there is some nqp trickery in module A involved | ||
in this line github.com/rakudo/rakudo/blob/mast...y.pm6#L714 | 22:41 | ||
(to me that nqp spell could very well open a gate to hell :) | 22:42 | ||
no sorry, wrong line, right line: github.com/rakudo/rakudo/blob/mast...y.pm6#L721 | |||
timotimo | ah, no | 22:44 | |
that's just a shorthand for "assign a value to this attribute and return the object that was assigned into" | 22:45 | ||
i.e. do { bindattr($obj, Type, '$!attr', $value); $obj } | |||
22:50
Ven joined,
Ven is now known as Guest21319
22:53
pecastro left
|
|||
lizmat | gfldex: do you have a gist of what you're trying to do? | 22:59 | |
gfldex | lizmat: gist.github.com/e61d9f6153bffd7438...0c70d061ec | 23:00 | |
23:03
pmurias left
23:05
noganex joined
23:08
noganex_ left
|
|||
lizmat | gfldex: why the is copy? | 23:08 | |
also, have you tried: (@s, :$html!) ? | 23:09 | ||
Herby_ | m: my @patterns = ('s', '\d\d'; 'e', '\w\w';); for @patterns -> $key, $value { say $key; say $value;}; | 23:10 | |
camelia | (s \d\d) (e \w\w) |
||
Herby_ | I'm messing something up. how do I loop through a multidem list? | 23:11 | |
lizmat | @patterns.kv -> $key, $alue | 23:14 | |
Herby_ | m: my @patterns = ('s', '\d\d'; 'e', '\w\w';); for @patterns.kv -> $key, $value { say $key; say $value;}; | ||
camelia | 0 (s \d\d) 1 (e \w\w) |
||
lizmat | .oO( looks like my v key bounces ) |
||
Herby_: then I'm not getting what you want (but then again I'm pretty tired) | 23:15 | ||
Herby_ | i'm not great at explaining myself :) | ||
in the first loop, i'd like $key = 's', $value ='\d\d' | 23:16 | ||
jnthn | Try for @patterns -> [$key, $vlaue] { } | ||
To unpack the sublist | |||
gfldex | lizmat: then I get: | 23:17 | |
X::Multi::NoMatch+{X::Await::Died}: Cannot resolve caller report(List, :html); none of these signatures match: | |||
Herby_ | m: my @patterns = ('s', '\d\d'; 'e', '\w\w';); for @patterns -> [$key, $value] { say $key; say $value;}; | ||
camelia | s \d\d e \w\w |
||
gfldex | (*%_ --> Str:D) | ||
(@s, :@columns is copy, :$header-repeat is copy, :$legend is copy, :$csv is copy, :@format --> Str:D) | |||
(@s, :$html is copy) | |||
Herby_ | jnthn: that was it, thanks | ||
23:18
BenGoldberg joined
23:20
Cabanossi left
|
|||
lizmat | gfldex: and with just (:$html!) ? | 23:21 | |
gfldex | lizmat: same | ||
23:22
Cabanossi joined
|
|||
lizmat | gfldex: you are calling report with only named parameters, right ? | 23:23 | |
gfldex | lizmat: yes | 23:24 | |
jnthn | multi sub report(List, :$html is copy) { will require a List to be passed, but I only see calls passing named arguments to it, and none passing an initial list positional | 23:26 | |
Am I missing something? | 23:27 | ||
(Probably, 'cus I only glanced the discussion... :)) | |||
gfldex | jnthn: I tried a proper @s too, both in the sig and the caller | ||
lizmat | gfldex: the @s is wrong: you don't need that | ||
gfldex | I know, I tried without too, to no avail | 23:28 | |
I shall golf and issue tomorrow. | 23:29 | ||
Herby_ | m: my $p = '(\d\d)'; say '23' ~~ / $p / | 23:31 | |
camelia | Nil | ||
Herby_ | m: my $p = '(\d\d)'; say '23' ~~ / $($p) /; | ||
camelia | Nil | ||
jnthn | <$p> | 23:32 | |
Herby_ | m: my $p = '(\d\d)'; say '23' ~~ / <$p> /; | ||
camelia | 「23」 | ||
Herby_ | :) | ||
thanks | |||
23:32
cpage_ left
23:36
pecastro joined
23:39
mudman left
|
|||
Herby_ | m: my $p = '(\d)\d'; if '23' ~~ / <$p> / { say $0; } | 23:42 | |
camelia | Nil | ||
Herby_ | where am I going wrong? (sorry to pepper with questions) | ||
jnthn | Expecting regexes to be stringier than they are. In fact, they're more like subs, and the match state is per sub | 23:44 | |
m: my $p = '(\d)\d'; if '23' ~~ / <p=$p> / { say $<p>[0]; } | 23:45 | ||
camelia | 「2」 | ||
Herby_ | my ultimate goal is I have an array of pattens, and I want to loop through the array and apply the patterns to a string and extract the captures | ||
jnthn | Can explicitly capture it like that | ||
m: my $p = '(\d)\d'; if '23' ~~ / <p=$p> / -> :p($/) { say $0; } # hmm :) | 23:46 | ||
camelia | Cannot resolve caller postcircumfix:<[ ]>(Mu, Int); none of these signatures match: (\SELF, Any:U $type, |c is raw) (\SELF, int $pos) (\SELF, int $pos, Mu \assignee) (\SELF, int $pos, Mu :$BIND! is raw) (\SELF, int $pos, … |
||
jnthn | m: my $p = '(\d)\d'; if '23' ~~ / <p=$p> / -> (:p($/)) { say $0; } # hmm :) | 23:47 | |
camelia | 「2」 | ||
jnthn | That lets you refer to the inner things as $0 etc. | ||
23:47
wander left
|
|||
Herby_ | jnthn: thanks. i'll have to try and parse that mentally :) | 23:48 | |
perlawhirl | Herby_: alternatively... eval your string into an Regex... unless it makes you feel dirty | ||
ie: my $s = '(\d)\d'; my $p = EVAL("/$s/"); if '23' ~~ $p { say $0; } # Can camelia EVAL? | |||
m: use MONKEY-SEE-NO-EVAL; my $s = '(\d)\d'; my $p = EVAL("/$s/"); if '23' ~~ $p { say $0; } | 23:49 | ||
camelia | 「2」 | ||
jnthn | If you're going to apply them many times, that would probably be more performant, yes | 23:50 | |
Well, if doing all the EVALs up front I mean | |||
Herby_ | perlawhirl: thanks. I don't feel dirty cause I still am trying to figure out what I'm doing :) | ||
perlawhirl | yeah... @patterns = @strings.map: -> $s { EVAL("/$s/") } # now you have a list of Regex's | 23:51 | |
Herby_ | perlawhirl and jnthn: thanks for the ideas | 23:53 | |
perlawhirl | lizmat: I tried out toggle. I like it so far... provides something akin to takewhile/dropwhile, but more general. | 23:57 | |
23:57
poohman left
23:58
poohman joined
|