»ö« 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.
azawawi good night & 00:12
00:12 azawawi left 00:21 cdg joined 00:25 cdg left 00:27 Cabanossi left 00:28 Cabanossi joined 00:29 rindolf left 00:30 BenGoldberg joined 00:31 lizmat joined 00:32 margeas left 00:39 COMBORICO joined
raschipi squashable6: next 00:46
squashable6 raschipi, ⚠🍕 Next SQUASHathon in ≈9 hours (2017-11-04 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
00:59 evalable6 left, evalable6 joined, ChanServ sets mode: +v evalable6 01:06 aborazmeh joined, aborazmeh left, aborazmeh joined 01:16 mempko left 01:22 cdg joined 01:27 cdg left 01:37 khw left 01:38 cdg joined
COMBORICO Anyone on the shortwave tonight? 01:53
geekosaur hasn't been on shortwave in years >.> 01:55
(too much radio noise hereabouts)
01:55 Cabanossi left, khw joined
COMBORICO Still have the equipment? 01:56
geekosaur in storage somewhere
little handheld doesn't go below 30 MHz, can't even listen... not that I have a suitable antenna 01:57
01:58 Cabanossi joined
COMBORICO Were you able to get the same distant stations regularly? 01:58
02:02 kalkin-- joined 02:06 kalkin- left 02:11 darkmorph joined
COMBORICO m: my @array = 1..3; say <1 2 3> eqv @array; 02:23
camelia False
02:24 ivans left 02:25 Herby_ joined
Herby_ \o/ 02:25
COMBORICO Goodnight y'all. 02:27
02:28 COMBORICO left, bitrauser_ joined 02:30 colomon left 02:31 bitrauser left 02:36 Actualeyes joined 02:47 colomon joined 02:50 ilbot3 left 02:54 piojo joined 02:56 ilbot3 joined, ChanServ sets mode: +v ilbot3, Cabanossi left 02:58 Cabanossi joined 03:00 cdg left 03:01 cdg joined 03:06 cdg left
Herby_ Working my way through Think Perl 6 and stuck on this exercise: Write a subroutine named 03:09
avoids
that takes a word and a string of forbidden letters,
and that returns
True
if the word doesn’t use any of the forbidden letters.
whoops, sorry for the weird paste
piojo Herby_: do you know that regexes interpolate not only strings, but arrays as well? 03:13
Herby_ I figured it would require that but I can't figure out how to interpolate variables in a regex
I was thinking something of: print True if $word ~~ / <[$letters]> /
but that's not quite working for me
piojo try putting the letters in an array 03:14
Herby_ m: my $letters = "test"; my @a = $letters.comb; say @a; 03:15
camelia [t e s t]
piojo and you can interpolate an array directly into a regex. It's interpreted as "or" 03:17
Herby_ m: my $word = "test"; my @a = "zy".comb; say "Letters found" if $word ~~ @a; 03:18
camelia ( no output )
Herby_ m: my $word = "test"; my @a = "es".comb; say "Letters found" if $word ~~ @a;
camelia ( no output )
Herby_ ?
m: my $word = "test"; my @a = "es".comb; say "Letters found" if $word ~~ /@a/; 03:19
camelia Letters found
Herby_ m: my $word = "test"; my @a = "zy".comb; say "Letters found" if $word ~~ /@a/;
camelia ( no output )
Herby_ gotcha :)
thanks!
piojo welcome. Let me know if I ever give the wrong level of hints :) 03:21
03:26 evalable6 left 03:27 evalable6 joined, noganex_ joined, napo1eon joined 03:30 noganex left 03:33 cpage left 03:34 BenGoldberg left
Geth doc: 39539835bf | (Alex Chen)++ (committed using GitHub Web editor) | doc/Type/Grammar.pod6
Rewrite Type/Grammar.pod6

Review needed
And plz help improving examples of `*%opt` arguments.
I have try : ... (12 more lines)
03:43
synopsebot Link: doc.perl6.org/type/Grammar
doc: 474fcc802e | (Alex Chen)++ (committed using GitHub Web editor) | doc/Type/Grammar.pod6
Merge pull request #1645 from perl6/W4anD0eR96-patch-1

Rewrite Type/Grammar.pod6
03:48 mson left 03:52 raschipi_ joined 03:53 Herby_ left 03:55 cdg joined 03:56 Cabanossi left 03:58 Cabanossi joined 04:00 cdg left, raschipi_ left 04:03 AlexDaniel left 04:11 mempko joined 04:15 wander left
Geth DBIish: lefth++ created pull request #108:
Fix infinite loops when passing certain arrays to pg-array-str
04:15
piojo Speaking of which, is there a standard way using timeouts in a test? 04:19
The test API might be: finishes-within 10, &func, 'func timed out and may be an infinite loop.'; 04:22
04:25 espadrine left, awwaiid joined
piojo Oh, and on an unrelated note, there's a small issue in the recent doc/Type/Grammar change--is Alex Chen around? 04:30
geekosaur the problem with time-based tests is they don't work at all well with free CI which might not bother to give you something resembling the entire time 04:31
piojo geekosaur: in this case, it's a very fast function which entered an infinite loop for some inputs. 0.25 seconds should be plenty of time for the test. (But running on a shared server, that's not perfectly predictable.) 04:34
So our solution right now is to just not write that sort of test?
or to write a test for the value and the test runner will automatically decide if it's taking unreasonably long? 04:35
04:39 Cabanossi left 04:42 Cabanossi joined 04:48 aborazmeh left 04:58 khw left 05:00 mempko left 05:18 cdg joined 05:21 cdg left 05:22 troys_ is now known as troys 05:28 mempko joined 05:35 troys left 05:36 darkmorph left 05:37 eliasr left 05:40 wander joined
wander Recently, when I talk with friend about parse a C program using Perl 6 Grammar 05:45
I said, Grammar doesn't perform a typical lexical analysis, but match the whole program by regexes 05:46
Does it make sense?
.ask moritz ^^
yoleaux wander: I'll pass your message to moritz.
geekosaur it's a perfectly good parser; the regexes it understands are extended and extensible to form a grammar 05:48
05:48 wamba joined
geekosaur you could parse C with it, if you wanted to write the parser. you could even deal with the typedef issue 05:48
...maybe even better than most parsers, since the typedef keyword could define new type tokens on the fly sym:type<...> 05:49
sorry, think that would be ctype:<...> or similar 05:50
raschipi "but match the whole program", this doesn't make sense, the grammars are used to parse Perl6 and it doesn't happen... 05:54
piojo Well perl6 regexes aren't actually regular expressions. Grammars aren't even close. 05:55
geekosaur ^
piojo so the words we use to describe regular expressions don't strictly apply.
perl6 grammars don't "match"
geekosaur what perl 6 calls a regex is much, much more powerful than what is normally called a regex. and grammars unleash their full power 05:56
piojo wander: in your recent grammar documentation change, you should probably change the commas back to '(', ')' because the meaning is different 05:57
05:59 ryn1x_ left
piojo wander: -Every type declared with C<grammar> (which doesn't explicitly states its-superclass) 06:00
+Every type declared with C<grammar>, which doesn't explicitly states its+superclass,
^ I'm not sure that change is right 06:01
you changed it to say that "grammar does not state its superclass"
wander piojo: can it be "Every type declared with C<grammar> and not explicitly stateing its superclass, becomes a subclass of I<Grammar>." 06:09
I myself have been confuse with the '()' version, but still I change it in a wrong way
piojo wander: that seems the most clear and correct way
wander: That's understandable. Do you agree with me about the intended meaning? 06:10
wander sure 06:11
piojo I never used a grammar with a base class before. I didn't realize you could, but I just checked it and it's valid
so your new revision is the best way of saying it :)
I mean, what you wrote two minutes ago
wander: typo, s/stateing/stating/ 06:12
wander I see
Geth doc: b7616acbaa | (Alex Chen)++ (committed using GitHub Web editor) | doc/Type/Grammar.pod6
Fix wrong expression, piojo++
06:14
synopsebot Link: doc.perl6.org/type/Grammar
piojo thanks! 06:15
wander As for parsing C program by Grammar, in fact I've implemented a dirty parser of a subset of C. I found it, unlike Lex/Yacc, has a typical lexical analysis stage. 06:18
06:19 evalable6 left, evalable6 joined, ChanServ sets mode: +v evalable6
wander It seems like I am parsing the program(code) by "matching" using rules/tokens/regexes, associated actions 06:19
piojo I think the associate actions is what makes it not just matching 06:29
*associated
And even gathering the input into match groups is more than a pure "match / fail to match" test would do. 06:30
06:38 nadim_ joined 06:42 darutoko joined
wander The mainly difference is, let's think about a number 42, in Lex/Yacc way, 42 becomes token NUMBER and then be passed to Yacc; in Grammar way, some rules/tokens say, "Hey, I want a <number>!", so it turns to token number, which trys to get a <number> from the text with a CURSOR. 06:44
so in Lex/Yacc , lexical analysis pushes syntax analysis, while in Grammar it is on the contrary 06:45
piojo Parsing theory is really cool, but I somehow manage to forget everything almost as soon as I learn it 06:53
because I don't normally write more than one type of parser
so all the distinctions between different types don't stick in the "useful knowledge" part of my brain 06:54
06:54 Cabanossi left
piojo I've never used Lex or Yacc. Just grammars and hand-coded functions that are specific to one syntax, like CSV 06:55
06:57 Cabanossi joined 06:59 Todd joined
Todd Hi All, How do I make this test case insensititive? 07:00
perl6 -e 'my $x="abcDEF"; if ( $x ~~ /abcdef/ ) { say "yes";} else { say "no";}' no
geekosaur m:i/.../ or /:i .../ 07:01
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/nhsg7vyVsN
Undeclared routine:
or used at line 1
geekosaur fwaps evalable6
Todd Perfect. Thank you! 07:02
# perl6 -e 'my $x="abcDEF"; if ( $x ~~ m:i/abcdef/ ) { say "yes";} else { say "no";}' yes
I thought "m" meant match? do I need to use "m" only because I did not care about case? 07:03
geekosaur m is used to make it easier to add adverbs, or if you need to use a delimiter other than /
you can ut the adverbs inside the match as the first thing instead 07:04
*can put
rx// is how you quote a regex as a value instead of immediately matching like m// or plain //
er, I think I mean qr//
Todd I understand now 07:05
wander Todd, m// matches $_ by default 07:10
m: $_ = "42"; say m/42/
camelia 「42」
geekosaur so does // 07:11
the only difference is m// is more explicit, and lets you switch delimiters and put the adverbs on the m
perl 5 also uses m// but only has the switch-delimiters thing, since the 'adverbs' are appended 07:12
Todd Thank you!
wander m: $_ = "42"; say /42/ 07:16
camelia /42/
wander geekosaur: ^^
does it?
geekosaur huh? 07:17
wander you say // matches $_ by default
m: $_ = "42"; say "l" if /42/ 07:18
camelia l
wander :P 07:19
geekosaur hm, I did mean rx// earlier apparently.
geekosaur would be asleep, but thunderstorm
07:19 evalable6 left 07:20 evalable6 joined, ChanServ sets mode: +v evalable6 07:21 cpage_ left 07:31 mempko left
Todd If it was any of you guys that told me about "spurt" and "slurp", I have been using both like crazy. Thank you! 07:32
07:34 wamba left 07:42 domidumont joined 07:43 Piotr_ joined 07:47 domidumont left, Todd left, domidumont joined 07:51 abraxxa joined 07:54 Piotr_ left 07:55 Cabanossi left 07:57 Cabanossi joined 07:59 domidumont left, domidumont joined
wander .ask moritz if your new book is reachable in SafariBooksOnline 07:59
yoleaux wander: I'll pass your message to moritz.
08:01 cpage_ joined
moritz wander: I have no idea 08:07
yoleaux 05:46Z <wander> moritz: ^^
07:59Z <wander> moritz: if your new book is reachable in SafariBooksOnline
moritz wander: if the old one is, the new will likely be available as well
08:09 wander_ joined 08:10 pecastro left, pecastro joined 08:11 wander left 08:15 pecastro left 08:24 rindolf joined 08:25 wander_ left, Cabanossi left, wander joined 08:27 Cabanossi joined 08:29 raschipi left 08:44 pecastro joined 08:49 pmurias joined 08:54 Cabanossi left, zakharyas joined 08:57 Cabanossi joined 09:00 pecastro left 09:05 patrickz joined 09:12 cdg joined 09:17 cdg left 09:19 ivans joined 09:26 Cabanossi left 09:27 Cabanossi joined 09:31 lowbro left 09:32 lowbro joined, lowbro left, lowbro joined
piojo Are there simple guidelines for how to organize functions/modules so circular dependencies aren't a problem? 09:36
I just realized Perl 6 is the only language I've used in a long time that doesn't allow two classes to call each other's functions
(I know about forward declarations, but the modules can't include each other so dispatch will always fail) 09:38
09:39 araujo joined
moritz you can, if you load the other module at run time 09:42
though it tends to be best to avoid it
piojo moritz: thanks. I'd like to avoid it, but this project is in early stages so things are changing 09:43
moritz premature modularization is the root of some evil :-)
pmurias piojo: if you keep the classes in a single file won't the forward declarations fix stuff? 09:44
piojo hmm... I feel like I've gotta keep things a little small, since perl 6 isn't statically parsed by IDEs
and I need to find things by scrolling/searching
and vim tabs (per file) to go from one logical area to another
Geth doc: a011ba984a | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/tables.pod6
add another pod renderer
09:45
synopsebot Link: doc.perl6.org/language/tables
piojo grr, when I write "require XXX;", the compiler tells me: 09:47
This type (NQPMu) does not support associative operations
I finally know what that means, but that error message really, REALLY needs to die
we will lose users because of that.
09:53 Ven joined, Ven is now known as Guest33365
moritz what does it mean? 09:54
piojo I think it means something can't be serialized (in a precompiled module) by the compiler
usually, though I'm sure it can happen in other cases
my thought was that it should be changed to an exception, and caught (within the compiler) so a higher level error can be shown
but I don't know if that's feasible, since I don't know the guts of perl 6... 09:55
09:55 Cabanossi left 09:57 Cabanossi joined 09:58 cdg joined 10:03 cdg left 10:06 wander left 10:07 sena_kun joined 10:10 cosimo left 10:12 cosimo joined 10:20 sproctor joined 10:22 pecastro joined 10:25 llfourn left
piojo moritz: Actually, I can't figure out runtime module loading to allow modules to reference each other circularly 10:25
A.pm6: (try require B) === Nil and say "Failed to load B!"; unit module A; 10:28
B.pm6: unit module B; use A;
c.p6: use lib '.'; use B;
And when I make little changes like adding a "say" statement, weird stuff happens. Like it may work suddenly, or it may say SORRY, Expected MAST::Frame, but didn't get one 10:29
10:29 pecastro left 10:30 knight__ left
sproctor m: my $part = "1|2";my $reg = rx/<$part>/;say "1" ~~ $reg; 10:32
camelia 「1」
sproctor So... that works. Why?
jnthn <$part> is the syntax for "interpolate this string as if it were regex syntax" 10:34
As opposed to rx/$part/ which would treat it as a literal string to be matched
sproctor Yeah. So I'm trying to find that in the docs.
@piojo surely circular references are a bad sign? 10:37
piojo sproctor: I don't know about that. After all, this is why forward declaration exists. Could you write an Employee class and an Employer class without the two ever calling each other's methods? 10:38
lizmat you can stub a class: 10:39
yoleaux 2 Nov 2017 23:44Z <jnthn> lizmat: Yes, we only create a new affinity workers reluctantly, e.g. if the existing ones have stuff in their queues.
2 Nov 2017 23:48Z <jnthn> lizmat: That tends to work out pretty well: web servers scale their threads for message handling appropriately by load, for example.
sproctor I see your point.
piojo lizmat: how do I call its methods after stubbing it? I must import its symbols somehow.
lizmat m: class A { ... }; class B { my $a = A.foo }; class A { method foo { } } 10:40
camelia ( no output )
piojo lizmat: they're in different files, for the sake of navigation and my own sanity
I plan to reorganize everything later, but this is such early development
I just want it to work now, and refactor in a month
lizmat piojo: are they to be always used together nonetheless? 10:41
.oO( I just want it to work now, and refactor in a month )
piojo lizmat: there's a lot of database work, and I'm not sure which data needs to come from which sources yet, so I'm having a hard time organizing things perfectly
lizmat I've heard that before :-)
piojo lizmat: yeah, but I'm the one that ends up doing all the refactoring for everyone else :P
I'm the only one I know that has the Refactoring book 10:42
lizmat hehe
sproctor Always an issue.
lizmat well, what I can say from experience is that it is better to make things right the first time
and knowing that, don't be afraid to throw away the first version
because it made you figure out there was a better way to do it 10:43
piojo lizmat: that is reasonable, I'm just not sure it's doable. This is a new type of project for me 10:45
10:46 azawawi joined
azawawi hi 10:46
piojo A web service which mostly gets stuff from a database and does simple logic and data transformations. And I'm trying to categorize the functions based on the data they deal with, but there are dependencies, and data that needs to be cached for speed
So if the classes can't talk to each other, I'm going to have to do something horrible like storing cached data in dynamic variables!
lizmat in memory caching? memcached caching? database caching ? 10:47
piojo caching of some important and mostly unchanging database records
Also, there are functions that deal mostly with game level data (static, not changing), but needs to deal a little with per-player data (from a different class) 10:48
and like I said, I'm quite capable of organizing it, but I don't want this reorganization to be a daily thing.
lizmat reorganization should only be a daily thing for a overseeable period of time :-) 10:49
10:53 Guest33365 left
sproctor So, you've got (for example) a GameState that includes a list of Players and a Player that contains a reference to the GameState? What if you define a GameStateRole that gives all the information that the Player needs and the same for Player. Then GameState can include a PlayerRole and Player can include a GameStateRole. 10:59
11:02 leont joined 11:05 Ven joined, Ven is now known as Guest30134, Guest30134 left
piojo sproctor: it's a little uglier than that 11:07
The files are modules, not classes, since the server is stateless and doesn't remember anything--all data lives in the DB (except some cached frequently accessed hashes) 11:08
11:10 ZzZombo joined
piojo sproctor: there's a PlayerData module and a SceneManager module. PlayerData::load($user) gets some relevant data from the DB, and also gets more specific data from other modules (It will add info from SceneManager::get-state($user)) 11:10
ZzZombo Hello there!
piojo the problem is that one of those other modules wants to access data that has a getter inside PlayerData.pm6
sproctor Hmmmm 11:12
ZzZombo I'm confused by docs.perl6.org/language/functions#sub_MAIN
sproctor In what way? 11:13
piojo sproctor: In this case, I should move it, but am I going to keep moving things around and changing dependencies and eventually get myself stuck?
sproctor surely unstuck.
ZzZombo Shouldn't it be `:$file($data)` instead of `:file($data)`?
11:14 cdg joined
leont timotimo: ping? 11:14
ZzZombo Also, if there a way to read from Windows registry?
piojo ZzZombo: :file($data) is a way of writing a key-value pair. The key is 'file', the value is $data, but in this case it does something more interesting-- 11:16
sproctor Ah ha! Of course.
11:16 AlexDaniel joined
piojo when you do that in a function signature, it means you expect to receive a named argument called "file", but locally it'll be assigned to a variable called $data 11:17
ZzZombo ah, I see. Thanks!
11:18 cdg left 11:19 pecastro joined 11:24 Cabanossi left 11:27 Cabanossi joined
AlexDaniel squashable6: next 11:28
squashable6 AlexDaniel, 🍕🍕 SQUASHathon is in progress! The end of the event in 2 days and ≈0 hours. See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
AlexDaniel, No! It wasn't me! It was the one-armed man! Backtrace: gist.github.com/32319090b838a1551b...7f4b06daab
AlexDaniel oops…
piojo The only way I could find to include a module at runtime is to use "require MyModule;" inside a method/sub (not a class/module) 11:32
moritz the main code of a module runs at compile time 11:33
you could do it in INIT I assume
piojo moritz: I don't think that works, for some reason
moritz m: INIT require Test; say Test.^name 11:34
camelia Test
piojo moritz: it works different for .pm6 modules
11:34 squashable6 left
moritz :( 11:34
11:34 squashable6 joined
piojo after that, I can access the code in that function as ::('MyModule').some-function() 11:34
11:34 ChanServ sets mode: +v squashable6
AlexDaniel squashable6: next 11:34
squashable6 AlexDaniel, 🍕🍕 SQUASHathon is in progress! The end of the event in 2 days and ≈0 hours. See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
AlexDaniel, Log and stats: gist.github.com/d1e7939fa368342337...d15d676010
piojo err, :: ('MyModule').some-function()
it's cumbersome but I'm glad to know this is possible, in case of emergency. 11:35
Geth whateverable: 61a995c389 | (Aleks-Daniel Jakimenko-Aleksejev)++ | bin/Squashable.p6
Expect that the log may be empty
11:36
11:39 wamba joined
Geth doc: patzim++ created pull request #1647:
Update ecosystem module upload docs (CPAN).
11:44
squashable6 🍕 patzim++ opened pull request “Update ecosystem module upload docs (CPAN).”: github.com/perl6/doc/pull/1647
🍕🍕🍕 First contribution by patzim++! ♥
🍕 AlexDaniel++ wrote a comment on “Useless "Documentation for " in some page titles.”: github.com/perl6/doc/issues/1623#i...-341681896
🍕🍕🍕 First contribution by AlexDaniel++! ♥
🍕 AlexDaniel++ labeled issue “Useless "Documentation for " in some page titles.”: github.com/perl6/doc/issues/1623
11:51 wander joined 11:52 margeas joined
wander jnthn, thanks for irclog.perlgeek.de/perl6/2017-11-03#i_15396016 11:55
11:55 Ven joined
wander I've been looking for it for one day 11:55
11:56 Cabanossi left, Ven is now known as Guest43736 11:57 Cabanossi joined
wander I believe interpolating regexes is useful, it should be documented. 12:00
By the way, how do you guys think about github.com/perl6/doc/issues/1646 12:01
m: my token tok { a }; say "a" ~~ /<.&tok>/ 12:06
camelia 「a」
wander m: my token tok { a }; say "a" ~~ /<.tok>/
camelia No such method 'tok' for invocant of type 'Match'. Did you mean 'to'?
in block <unit> at <tmp> line 1
wander m: grammar { token TOP { <.tok> }; token tok { a } }.parse("a")
camelia ( no output )
wander m: say grammar { token TOP { <.tok> }; token tok { a } }.parse("a")
camelia 「a」
wander ^^ interesting, the syntaxes are quite the same, but indeed very different 12:08
outside grammar, `&` is needed, why is it needed?
piojo wander: any time you want to write a callable without calling it, like to get a reference to a function. 12:11
wander yes, i see that. but inside `grammar` things are different 12:12
piojo wander: really? in general, the are, but it looks like this case is pretty similar 12:13
wander that's why I say they "are quite the same, but indeed very different".
you know, f is so different from &f 12:14
piojo Regarding github.com/perl6/doc/issues/1646 , I don't agree 12:15
12:15 Guest43736 left, cdg joined
piojo oh, I need to read the criticism first 12:15
but when I look up a routine or class, I like to see info about it, not just the API 12:16
(A short description, not an essay.)
Making this change seems like a step backwards from the criticism here: www.reddit.com/r/perl/comments/79w...s/dp6r8j7/ 12:19
because info in /Language/* is harder to find than type/routine pages. It doesn't usually come up on searches.
It's probably just not as full of keywords for indexing.
12:20 cdg left, zakharyas left
wander I wonder if '/routine/*` don't have a independent file, but gather messages from other files 12:21
s/<<a/an/
moritz that's correct 12:22
piojo wander: oh, you're right. So /routine/* doesn't contain descriptions. That's just /type/* 12:23
moritz the routine docs mostly resides the in the doc/Type/**.pod files
piojo I really, really like the descriptions in /Type/*, and they come up on searches so they're more helpful than an equivalent description would be in /language/
and when I use new libraries in other languages, the ones where I can only find pure API reference drive me mad. 12:24
I wonder if the complainer was really talking about other situations, like the fact that we have 3 pages about perl 6's OOP 12:25
wander while 2 pages about grammar :-(
12:28 wamba left
DrForr IIRC one of those grammar pages is a full-on tutorial, so "only 2 pages" isn't quite the whole story. 12:28
piojo does the regex page count as another?
When I was writing a toy parser, I wanted to know everything, I found myself looking at all of them. but I'm not sure combining them would have any benefit. 12:29
I feel like things get "buried" when there's too much data 12:30
DrForr theperlfisher.blogspot.cz/2016/02/f...rs-pt.html might help.
12:31 mcmillhj joined
wander piojo: regex page is relevant. if I want to talk about some feature in regex doc, for completeness it involves grammar, and vice versa 12:33
piojo DrForr: I don't mean for right now. Just saying I wouldn't suggest consolidating everything without a really good idea about how it should be organized.
wander but they do be different things
12:37 llfourn joined
DrForr Regexes start to shade into grammars when you find yourself wanting a name for a term... 12:37
wander when it comes to documentation, docs.racket-lang.org/ 12:38
12:39 ChoHag_ joined, ChoHag left
wander it's quite neat and useful, with distinctive levels 12:39
12:42 piojo left
wander DrForr: inside design.perl6.org/S05.html#Grammars Regex and Grammar are in the same file. but FWIW, it will be too large, and many people only want to know about regex. 12:43
DrForr But that's a design document, not actual documentation. 12:45
(I will fully admit to not having watched much of this discussion.)
wander just it's headache for me finding Regex, Grammar, Grammar Tutorial are ... I don't know how to say it ... stir together(?) 12:55
DrForr Well, I find that regex, labeling terms, and parsing full-on text exists on a continuum. 12:58
DickClarke www.usenix.org/system/files/confer...-unruh.pdf 12:59
12:59 harrison joined, AlexDaniel left 13:00 bdmatatu joined 13:08 cdg joined
ZzZombo <ZzZombo> Also, if there a way to read from Windows registry? 13:19
13:21 mson joined
DrForr You could potentially bind with NativeCall, not sure how that'd work on Windows though. 13:21
13:31 pmurias left, aborazmeh joined, aborazmeh left, aborazmeh joined 13:35 wamba joined 13:40 zakharyas joined 13:45 cdg left 13:47 pecastro left 13:48 pecastro joined 13:49 azawawi left 13:51 wamba left 13:57 aborazmeh left 14:01 darkmorph joined 14:04 khw joined 14:05 abraxxa left 14:13 eliasr joined 14:19 harrison left, ab6tract joined
ab6tract good afternoon, #perl6! 14:19
big hugs from Amsterdam
quick question: didn't we used to have some kind of joke about 42 and the meaning of life? 14:20
moritz hugs back
m: say 42.WHY
camelia No documentation available for type 'Int'.
Perhaps it can be found at docs.perl6.org/type/Int
»
moritz hmmm
ab6tract ah! .WHY 14:21
that makes a lot more sense than .WHAT in terms of being a joke that wouldn't also make a lot of people unhappy :
:)
seems like it's been removed though 14:22
14:22 mcmillhj left
moritz m: 'Life, the Universe and Everything'.WHY 14:23
camelia ( no output )
moritz m: say 'Life, the Universe and Everything'.WHY
camelia 42
moritz got it!
m: say 'something else'.WHY
camelia No documentation available for type 'Str'.
Perhaps it can be found at docs.perl6.org/type/Str
»
ab6tract thanks moritz. that significantly improves my mood for the afternoon :D 14:25
moritz: hmm, it seems that installing p6doc does not make documentation available via .WHY. i wonder if it is possible to make this work? 14:28
moritz ab6tract: I don't know either 14:29
lizmat ab6tract: to make that in any way performant, that probably would have to be a different setting, like e.g. RESTRICTED setting 14:33
invoked with something like: 'use why' ?
14:33 mcmillhj joined 14:38 ggoebel left 14:42 Thrush joined, Ven joined 14:43 Ven is now known as Guest66351
Thrush I'm wondering why these two commands give different output, and how to make them the same: Command 1: (@a X @a X @a).say; Command 2: ((@a X @a) X @a).say; 14:43
m: my @a = <a b>; (@a X @a X @a).say; ((@a X @a) X @a).say 14:44
camelia ((a a a) (a a b) (a b a) (a b b) (b a a) (b a b) (b b a) (b b b))
(((a a) a) ((a a) b) ((a b) a) ((a b) b) ((b a) a) ((b a) b) ((b b) a) ((b b) b))
Thrush m: my @a = <a b>; (@a X @a X @a).say;
camelia ((a a a) (a a b) (a b a) (a b b) (b a a) (b a b) (b b a) (b b b))
Thrush m: my @a = <a b>; ((@a X @a) X @a).say;
camelia (((a a) a) ((a a) b) ((a b) a) ((a b) b) ((b a) a) ((b a) b) ((b b) a) ((b b) b))
Thrush The reason I ask is because I'm writing code that needs to do a product of arrays together, but not all at once (so I can't do @a X @b X @c X @d etc.). 14:45
14:45 cdg joined
Thrush There's an "accumulator" array, and it will get other arrays "product-ed" onto it, and I want it to take the first form (that is: @a X @a X @a) instead of the second (that is: (@a X @a) X @a). 14:46
Is there a way to do this simply?
14:48 ZzZombo left
ab6tract somewhat related question. What is .WHO all about? 14:48
14:49 ZzZombo joined, ZzZombo left, ZzZombo joined 14:50 cdg left
MasterDuke Thrush: can you wait and just do the product at the end once you've accumulated all the arrays? 14:51
Thrush MasterDuke: Maybe, but the number of arrays is different. They'll be created in a loop.
14:52 ggoebel joined
Thrush MasterDuke: You know, using [X] on a collective array might work. I'm testing it out now... 14:52
MasterDuke maybe something like: my @products = [X] @arrays ?
14:52 ChoHag joined 14:53 ChoHag_ left
Thrush MasterDuke: I'm trying that out, and it appears to work. So, good suggestion! I'm still wondering how to do it through one accumulator array. 14:54
ab6tract never mind, i've managed to grok it a bit 14:55
wander Thrush, docs.perl6.org/language/operators#...Precedence
look up Meaning of $a ! $b ! $c 14:56
Thrush It seems that "@a = @a X @b" isn't the same as "@a X= @b". Is this by design, or is it a mistake? 14:58
14:58 cdg joined
Thrush m: my @a = <a b>; my @b = <a b>; @a = @a X @b; @a.say 14:58
camelia [(a a) (a b) (b a) (b b)]
Thrush m: my @a = <a b>; my @b = <a b>; @a X= @b; @a.say
camelia [b b]
Thrush Shouldn't "@a = @a X @b" be the same as "@a X= @b" ? 14:59
15:00 cdg_ joined
Thrush MasterDuke: While your suggestion works, I need an accumulator array that gets "producted", then "grepped", then "producted", then "grepped", over and over. So I can't just store them all up in one array, then do a product. The product is "as you go along", if that makes sense. 15:01
wander X is a metaoperator 15:02
15:02 cdg__ joined
ilmari docs.perl6.org/language/operators#...perator%29 15:02
15:02 cdg_ left
wander so in `X=`, `X`modify`=` 15:02
Thrush wander: So does X being a metaoperator make a difference?
15:02 cdg left
ilmari Thrush: it means that the X in @a X= @b is not the same operator as the X in @a X @b 15:03
15:03 mempko joined
Thrush wander, ilmari: I'm trying to follow, but I'm confused. 15:03
ilmari m: my @a = <A B>; my @b = <a b>; say @a Z @b; @a Z= @b; say @a 15:04
camelia ((A a) (B b))
[a b]
kalkin-- m: class Tile { has $.x; has $.y; method draw() { say "drin"; } }; my @map; for 0..^10⁶ { @map.append: Tile.new(:x(rand), :y(rand)) }
camelia ( no output )
kalkin-- The above script takes a lot of time, any hints how to make it faster? 15:05
Or should I just use for each tile an array with all the needed values?
Or even go as far as using repr('CStruct')? 15:06
wander <ilmari> Thrush: it means that the X in @a X= @b is not the same operator as the X in @a X @b
that is it, I think it's directly enough, they are not the same 15:07
ilmari read the link I posted about the cross metaop 15:08
15:09 Cabanossi left, wamba joined
kalkin-- Hmm using a CStruct isn't that much faster, only a second 15:09
Thrush I see that the X (and Z) metaoperator can take an infix operator. Can it also take a block/lambda ? 15:10
15:12 Cabanossi joined
Thrush I read the link you supplied, ilmari. But I don't see how it applies to the difference between "@a = @a X @b" and "@a X= @b" 15:13
ilmari Thrush: it means that X= is not your usual <op>= shorthand 15:14
15:14 AlexDaniel joined
ilmari because X is a metaop of its own, that looks confusingly similar to the X infix op 15:14
squashable6 🍕 AlexDaniel++ labeled issue “rw (what it stands for)”: github.com/perl6/doc/issues/1639 15:15
ilmari ditto the Z metaop (it even says in the docs it's not the same as the Z binop, maybe X should too)
squashable6 🍕 AlexDaniel++ labeled issue “named capture using non-capturing group confusion”: github.com/perl6/doc/issues/1634 15:16
🍕 AlexDaniel++ labeled issue “rw (what it stands for)”: github.com/perl6/doc/issues/1639
🍕 AlexDaniel++ labeled issue “Missing docs for creatin…”: github.com/perl6/doc/issues/1641
🍕 AlexDaniel++ labeled issue “Deadlink for Metamodel::…”: github.com/perl6/doc/issues/1642
🍕 AlexDaniel++ labeled issue “doc >>. on lists of Callables”: github.com/perl6/doc/issues/1643
15:16 setty1 joined
AlexDaniel squashable6: shut up for a little bit 15:16
squashable6 AlexDaniel, .oO( Mmmm… pizza! )
🍕🍕🍕 First contribution by W4anD0eR96++! ♥ 15:18
15:22 diakopter joined
AlexDaniel squashable6: ok you can be loud again 15:24
squashable6 AlexDaniel, ALRIGHT, LET'S DO IT!!!
diakopter - 15:25
Thrush I just found that I can make ((@a X @a) X @a) be the same as (@a X @a X @a) with this: ((@a X @a) X @a).map( {|$_[0],$_[1]} ) 15:26
m: my @a = <a b>; ((@a X @a) X @a).map( {|$_[0],$_[1]} ).say
camelia ((a a a) (a a b) (a b a) (a b b) (b a a) (b a b) (b b a) (b b b))
Thrush I am wondering if there is a simpler way to write that argument to map(). 15:27
Question: How do I create a 10-element array of all 1? [1] x 10 doesn't seem to work: 15:30
wander m: my @a = <a b>; say ((@a X @a) X @a).map( *.flat );
camelia ((a a a) (a a b) (a b a) (a b b) (b a a) (b a b) (b b a) (b b b))
Thrush m: ([1] x 10).perl
camelia ( no output )
Thrush m: ([1] x 10).perl.say
camelia "1111111111"
wander say (flat [1] xx 10) 15:31
evalable6 (1 1 1 1 1 1 1 1 1 1)
diakopter who are all these peeps 15:33
squashable6 🍕 zoffixznet++ submitted a review on pull request “Update ecosystem module upload docs (CPAN).”: github.com/perl6/doc/pull/1647#pul...w-74119946
🍕🍕🍕 First contribution by zoffixznet++! ♥
ugexe run, its old man diakopter 15:34
squashable6 🍕 zoffixznet++ wrote a comment on “Update ecosystem module upload docs (CPAN).”: github.com/perl6/doc/pull/1647#iss...-341738663
15:36 telex left
Thrush m: my @a = <a b>; say ((@a X @a) X @a).map( *.flat ); 15:36
camelia ((a a a) (a a b) (a b a) (a b b) (b a a) (b a b) (b b a) (b b b))
Thrush m: my @a = <a b>; my @b = @a X @a; my @c = (@b X @a).map( *.flat ); @c.say
camelia [((a a) a) ((a a) b) ((a b) a) ((a b) b) ((b a) a) ((b a) b) ((b b) a) ((b b) b)]
Thrush Why don't those produce the same output? I'm so confused about what "flat" does. 15:37
m: my @a = <a b>; my @c = ((@a X @a) X @a).map( *.flat ); @c.say 15:38
camelia [(a a a) (a a b) (a b a) (a b b) (b a a) (b a b) (b b a) (b b b)]
Thrush Is there a nice page that explains "flat" ? I've read documentation about it, but it still puzzles me. 15:39
AlexDaniel squashable6: log 15:40
squashable6 AlexDaniel, Log and stats: gist.github.com/7d58c213d81551aa48...b5040ef1da
15:40 Zoffix joined
Zoffix Thrush: dunno about docs, but .flat flattens all nested, non-scalarized Itearables into a single, flat iterable 15:41
m: dd (1, (2, (3,))).flat
camelia (1, 2, 3).Seq
wander Thrush, container counts
Zoffix However, if an iterable is inside a scalar container, it's treated as a single item and not a collection of items, and those aren't flattened
m: dd (1, $(2, (3,))).flat
camelia (1, $(2, (3,))).Seq
AlexDaniel Thrush: we can probably improve the docs to make it clearer. Perhaps consider filing an issue on github.com/perl6/doc/issues/
squashable6 🍕 AlexDaniel++ labeled issue “need example of alternate test descriptions”: github.com/perl6/doc/issues/1586 15:42
Zoffix Thrush: I found this document helpful when I struggled with containers. Perhaps it'd be of help to you as well: docs.perl6.org/language/containers Once you master containers, .flat's behaviour becomes obvious
wander zoffix: irclog.perlgeek.de/perl6/2017-11-03#i_15396393
Thrush m: dd (1, (2, (3,))).flat 15:43
camelia (1, 2, 3).Seq
Thrush m: dd [1, [2, [3,]]].flat
camelia (1, $[2, [3]]).Seq
Thrush m: dd [1, [2, [3]]].flat
camelia (1, $[2, [3]]).Seq
Zoffix Thrush: note that Arrays create scalar containers for their elements. Lists don't
m: dd [1, [2, [3]]].»<>.flat 15:44
camelia (1, 2, $[3]).Seq
Zoffix m: dd [1, [2, [3, [3, 4]]]].»<>.flat
camelia (1, 2, $[3, [3, 4]]).Seq
15:44 telex joined
Zoffix m: dd [1, [2, [3, [3, 4]]]].»List.flat 15:44
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing dot on method call
at <tmp>:1
------> 3dd [1, [2, [3, [3, 4]]]].»7⏏5List.flat
expecting any of:
postfix
Zoffix m: dd [1, [2, [3, [3, 4]]]]».List.flat
camelia (1, 2, 3, $[3, 4]).Seq
Thrush Zoffix: Thanks for the clarification about Arrays creating scalar containers.
Zoffix squints at these evals... something don't feel right :) 15:45
Thrush m: dd [1, [2, [3, [3, 4]]]]>>.List.flat
camelia (1, 2, 3, $[3, 4]).Seq
Zoffix Oh right. ». also follows the "do not descend into containerized iterables" thing :) 15:46
15:47 mcmillhj left
Zoffix wander: sounds like we're talking about the same thing. This is what I expect /routine/ docs to be like: docs.perl6.org/type/IO::Handle#method_open The describe what the routine does and references other methods for details on what encodings you can set, etc. It doesn't go into showing a million of examples of how to .open() everything under the moon. That'd be the job for IO guides in /language/ 15:47
15:48 cdg__ left
Thrush If flat() works on non-scalar containers, then why do these say()s produce different output? my @a = <a b>; (@a, @a).flat.say; my @b = (@a, @a); @b.flat.say 15:52
m: my @a = <a b>; (@a, @a).flat.say; my @b = (@a, @a); @b.flat.say
camelia (a b a b)
([a b] [a b])
Thrush m: my @a = <a b>; [@a, @a].flat.say; my @b = (@a, @a); @b.flat.say 15:53
camelia ([a b] [a b])
([a b] [a b])
Thrush m: my @a = <a b>; (@a, @a).flat.say; my @b = (@a, @a); @b.List.flat.say
camelia (a b a b)
(a b a b)
15:53 Herby_ joined
Zoffix Thrush: in the first version, you're sticking two `@a`s into a List, which doesn't make any containers. In the second version, you're sticking two `@a`s into Array `@b` and arrays create containers, so the second one is scalarized (is that a term?) and hence unflattened 15:53
Thrush Ahhh... I think I see something now.
wander starts with sigil `@`, `@b` is Array, not List 15:54
ugexe m: my @a = <a b>; my @b = (@a X @a); say @b.map(|(@a X |*)) # from perlawhirl 4 days ago 15:55
camelia ((a a a) (b a a) (a a b) (b a b) (a b a) (b b a) (a b b) (b b b))
15:55 mcmillhj joined 15:56 Cabanossi left
Zoffix wander: `@` just defaults to Array. The sigil indicates the type is Positional, not that it's an Array 15:57
15:57 Cabanossi joined
Zoffix m: my @a := 1, 2, 3; my @b := class Foo does Positional {}; say @a.^name; say @b.^name 15:57
camelia List
Foo
Zoffix Happy SQUASHathoning \o 15:58
Zoffix &
15:58 Zoffix left
wander zoffix: so after redesign/rearrange, /language/ should document the basic usage, like outline, and set links to details in /type/? 15:58
have learned it XD
16:01 mcmillhj left
wander what's important is, if possible, build a guideline on "How To Document". Now it is separated in CONTRIBUTING.md, EXAMPLES.md and STYLEGUIDE.md, and can be improved 16:02
16:02 cdg joined
Thrush I notice sometimes there are methods that look like this: object.method( blah ); and sometimes ones that look like this: object.method: blah; Is there a difference? Where can I read up on the differences? 16:04
And does someone have a good link to read up on the "*" symbol? That is, the one that is often used as a argument? 16:06
jnthn Thrush: They semantics are the same, the syntax is different, though. : means that the rest of the statement is the arguments.
Thrush jnthn: Does that mean that they're always interchangeable?
16:07 cdg left
jnthn Thrush: It's especially nice when doing `$obj.meth: { ... }` when the block spans several lines; then you don't have to stick a closing ) after the block 16:07
16:07 Guest66351 left
jnthn Thrush: In terms of their semantics, yes; they compile into the very same thing. It's just a syntax difference with regards to the parsing of arguments. 16:08
16:08 mcmillhj joined
MasterDuke Thrush: docs.perl6.org/type/Whatever 16:10
16:11 mson left 16:13 dakkar joined, mcmillhj left 16:14 troys joined
dakkar hello! is the metacpan-like service at hack.p6c.org usable? I notice that Zef has it configured 16:14
I maintain www.thenautilus.net/metacpan.atom and I wanted to see if I could make one for p6 module releases 16:15
16:16 cdg joined
diakopter ugexe: omg 16:16
[Coke] "diakopter? That's a name I've not heard in a long time" 16:18
~~
ugexe dakkar: jdv79 was doing the metacpan work. additional interest/collaboration may inspire him to continue. 16:19
dakkar ugexe: thank you, good to know! 16:20
16:21 mcmillhj joined 16:24 Ven joined, Ven is now known as Guest27335 16:26 mcmillhj left 16:27 Piotr joined 16:28 mcmillhj joined 16:29 Zoffix joined
Zoffix dakkar: you may wanna subscribe to this Issue: github.com/perl6/modules.perl6.org/issues/81 It should be resolved fairly soon, since some people expect it to and it'll have a JSON API to fetch recent stuff. 16:30
dakkar looks 16:31
16:33 mcmillhj left
squashable6 🍕 W4anD0eR96++ wrote a comment on “add operator declarators to /type/Sub”: github.com/perl6/doc/issues/1573#i...-341757350 16:33
dakkar Zoffix: nice! not what I need, but very good that's in the works 16:35
Zoffix dakkar: what do you need?
dakkar my feed diffs the changelog between the last stable release and the latest release 16:36
Zoffix dakkar: that might be tough, as it doesn't look like having a ChangeLog is an established practice for our ecosystem 16:37
dakkar ouch
Zoffix Just flipping through modules.perl6.org/search/?q=from%3Acpan and found only one module that got "Changes" file in it 16:38
16:38 cdg_ joined
dakkar (the program that generates the feed: www.thenautilus.net/cgit/metacpan-...ee/meta.pl ) 16:38
good habits are hard to keep up! ☺
Zoffix :)
We could add that as an item for TODO Issues dists being flagged as modules.perl6.org/todo/ 16:39
16:39 mxco86 left 16:40 mcmillhj joined
Zoffix Filed as an issue: github.com/perl6/modules.perl6.org/issues/93 16:40
dakkar at some point I'd like to make another feed with "the interesting parts" of the full diff between releases, although the definition of "interesting" is a bit fuzzy
16:40 AlexDaniel left
Zoffix \o 16:40
16:40 Zoffix left
dakkar Zoffix: thank you! we can't have p6 dists being less awesome that p5 ones 😜 16:41
16:41 cdg left 16:42 cdg_ left
Geth ecosystem: e43f433e15 | (Jonathan Worthington)++ (committed using GitHub Web editor) | META.list
Remove Cro distributions; they're now on CPAN
16:42
dakkar oh Cro! another thing I want to play with 16:44
buggable New CPAN upload: cro-0.7.1.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...7.1.tar.gz 16:46
New CPAN upload: cro-core-0.7.1.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...7.1.tar.gz
New CPAN upload: cro-http-0.7.1.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...7.1.tar.gz
New CPAN upload: cro-tls-0.7.1.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...7.1.tar.gz
New CPAN upload: cro-websocket-0.7.1.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...7.1.tar.gz
New CPAN upload: cro-zeromq-0.7.1.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...7.1.tar.gz
16:47 mson joined
dakkar jnthn: is this the release with the 'delegate' feature in Cro::HTTP::Router? 16:49
jnthn cro.services/docs/releases#0.7.1 for anyone curious what's in the release
dakkar: Yes
dakkar yay!
implement authentication in one router, delegate to the other router that actually runs the logic 16:50
jnthn gah, and now I see them on the site, I see Text::Markdown doesn't cope so well with nested bulletpoints 16:51
timotimo jnthn: i believe these change lists were meant to have nested lists
yeah
jnthn Yeah, just checked, the Markdown is correct 16:52
Also just glanced the container build log and yeah, it installed latest Text::Markdown while building
16:55 Cabanossi left
jnthn Well, will either work around that or see if I can patch the module later 16:56
Time to eat now :)
16:56 Cabanossi joined
timotimo good nom 16:58
jnthnom :)
16:59 zakharyas left
leont timotimo: github.com/Leont/yamlish/commit/b4...t-25354281 16:59
ilmari leont: did you say you'd thrown the yaml test suite at yamlish?
timotimo leont: subst used to have a but where it accessed a semi-random $/ up the scope, now it properly accesses the one in the scope subst is called from, which is read-only in this method 17:00
17:06 domidumont left
leont That is almost making sense, but not quite 17:07
17:07 buggable left, buggable joined, ChanServ sets mode: +v buggable
leont The problem is that it's overwriting the $/ of its outer scope? 17:07
timotimo m: "hi" ~~ /./; say $/; "foobar".subst(/.../, "!!!"); say $/
camelia 「h」
「foo」
timotimo c: 2017.08 "hi" ~~ /./; say $/; "foobar".subst(/.../, "!!!"); say $/ 17:08
committable6 timotimo, ¦2017.08: «「h」␤「foo」»
17:08 Thrush left
timotimo c: 2017.07 "hi" ~~ /./; say $/; "foobar".subst(/.../, "!!!"); say $/ 17:08
17:08 lowbro left
committable6 timotimo, ¦2017.07: «「h」␤「foo」» 17:08
timotimo hold on
c: 2017.08 sub test($/) { say $/; "foobar".subst(/.../, "!!!"); say $/ }; "hi" ~~ /./; test($/);
committable6 timotimo, ¦2017.08: «「h」␤「h」»
timotimo c: 2017.10 sub test($/) { say $/; "foobar".subst(/.../, "!!!"); say $/ }; "hi" ~~ /./; test($/);
committable6 timotimo, ¦2017.10: «「h」␤「h」»
timotimo c: HEAD sub test($/) { say $/; "foobar".subst(/.../, "!!!"); say $/ }; "hi" ~~ /./; test($/);
committable6 timotimo, ¦HEAD(1c2c7d8): «「h」␤Cannot assign to a readonly variable ($/) or a value␤ in sub test at /tmp/E_PQY0jVMi line 1␤ in block <unit> at /tmp/E_PQY0jVMi line 1␤ «exit code = 1»»
timotimo c: 2017.10 sub test($/) { say $/; "foobar".subst(/.../, "!!!"); say $/ }; "hi" ~~ /./; test($/); say $/ 17:09
committable6 timotimo, ¦2017.10: «「h」␤「h」␤「h」»
timotimo not sure where exactly it ended up assigning, or if it skipped it altogether
BBL
17:09 telex left 17:10 ab6tract left
leont Thanks! I think I now understand it better :-) 17:14
17:18 telex joined
El_Che any alpine devs around? 17:21
kalkin-- I'm trying to find out what the difference is between 1..3 and 1...3 when I use it in a for loop 17:26
m: for 1..3 { say $_ }; for 1…3 { say $_ }
camelia 1
2
3
1
2
3
17:30 sproctor left 17:32 robertle joined 17:35 mr-foobar joined
Geth doc: fd7cce7a03 | MasterDuke17++ (committed using GitHub Web editor) | doc/Type/Whatever.pod6
Some grammar and consistency fixes
17:36
synopsebot Link: doc.perl6.org/type/Whatever
squashable6 🍕🍕🍕 First contribution by MasterDuke17++! ♥
17:39 napo1eon left 17:41 troys is now known as troys_, greppable6 left, troys_ is now known as troys, greppable6 joined, ChanServ sets mode: +v greppable6 17:42 domidumont joined
buggable New CPAN upload: OAuth2-Client-Google-0.1.0.tar.gz by BDUGGAN cpan.metacpan.org/authors/id/B/BD/...1.0.tar.gz 17:47
diakopter has someone made Cro versions of these benchmark targets? www.techempower.com/benchmarks/ 17:48
robertle ;;[[[[[[[['] 17:49
ilmari hello robertle's (cat|child) 17:50
18:00 AlexDaniel joined 18:04 dakkar left
AlexDaniel squashable6: status 18:05
squashable6 AlexDaniel, 🍕🍕 SQUASHathon is in progress! The end of the event in 1 day and ≈17 hours. See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
AlexDaniel, Log and stats: gist.github.com/b9d6933e91be8e123b...9e1465838c
AlexDaniel hm, so GitHub now signs all commits made with its online editor? 18:08
18:09 Cabanossi left
AlexDaniel
.oO( … what's the point? )
18:09
18:10 knight__ joined 18:12 Cabanossi joined
knight__ Hello, Is there any "native" possibility to call Perl5 modules from Perl6, I do not want use Inline::Perl5 18:13
?
lucs m: say 'spaces?' xx 3
camelia (spaces? spaces? spaces?)
lucs Oh, xx is for lists, sorry. 18:16
18:19 Piotr left
perlpilot knight__: What's wrong with Inline::Perl5? 18:19
18:20 Piotr joined
mst knight__: what do you mean 'native' 18:21
given what it's doing is calling code written in a completely different programming language, Inline::Perl5 seems as native as you're going to get to me.
knight__ perlpilot: I do not want rewrite program. Lazy boy :-)
mst what?
the whole point of Inline::Perl5 is you don't have to rewrite anything
mst looks confused 18:22
knight__ mst: I understand, but I wrote whole program, and someone ask me, that Do Perl6 works with Perl5 modules.
mst what?
knight__ mst: Again, I wrote whole program, in Perl6 with perl6 modules. 18:23
mst ok?
knight__ I sent this program, and
mst Inline::Perl5 for rakudo lets you call perl5 code from rakudo
Inline::Perl6 for perl5 lets you call rakudo from perl5
what's the problem?
knight__ My professor :-) 18:24
I cannot do it by my own.
mst I still don't understand what you're asking for.
perlpilot ah, that's a different problem. Get your prof to use Perl 6
mst knight__: if it was perl homework, then writing it in a completely different language was an error. 18:25
knight__ it was in perl, but I can write in perl6, but he does not know anything about perl6, he is asking to use perl5 modules to be imported in my program ... 18:26
mst knight__: perl6 is not perl.
knight__ I know, I was asking him about it.
mst but 'use Some::Perl5::Module:from<Perl5>;' works 18:27
so I don't see how that isn't the answer
knight__ Ok, AGAIN 18:28
I wrote program in Perl6
He knows about it.
mst ok? 18:29
knight__ I sent the program, and he wrote me email. And He mentioned that, Perl6 has native support of perl5 modules.
mst yes, via Inline::Perl5
knight__ -> Without installing Perl6 modules -> Inline::Perl5
[Coke] he's wrong
mst no
[Coke] he might be thinking of some 12 year old project that isn't a thing anymore. 18:30
mst :from<Perl5> is native perl6 syntax, and works if you have Inline::Perl5
like I keep telling you
knight__ mst: But He does not want install any Perl6 modules :-)
mst knight__: tough
knight__ yep :-)
*never ending story* 18:31
18:35 wamba left
knight__ moritz: and everyone who helped me, thank you, Perl6 is IMO fantastic language, bye, I must do homeworks in different language, bye Perl6 for now! :-( 18:37
Bye all
18:37 knight__ left 18:39 bisectable6 left, bisectable6 joined, ChanServ sets mode: +v bisectable6
Herby_ m: say .join('') for <c e r a>.permutations 18:40
camelia cera
cear
crea
crae
caer
care
ecra
ecar
erca
erac
eacr
earc
rcea
rcae
reca
reac
race
raec
acer
acre
aecr
aerc
arce
arec
18:41 pmurias joined 18:45 evalable6 left, evalable6 joined, ChanServ sets mode: +v evalable6 18:47 darutoko left 18:49 mcmillhj left
[Coke] m: <w h a t>.join.say 18:52
camelia what
Herby_ ah nice 18:53
18:56 cdg joined 18:57 cdg left 18:58 Rawriful joined 19:00 cdg joined 19:01 mcmillhj joined 19:04 mempko left 19:12 Guest27335 left, darkmorph left
wander do we have a build-in role like Comparable? 19:14
[Coke] "what is comparable" ? 19:16
19:17 cdg_ joined
wander I can compare two instances of it 19:18
perlpilot string compare?
numeric compare?
geekosaur an example of something that *isn't* comparable is complex numbers
perlpilot generic compare?
geekosaur meaningfully
you can force an order on it easily enough but it doesn't represent anything meaningful about the relationship between the values 19:19
AlexDaniel m: class Foo { has $.z }; multi sub infix:<cmp>(Foo:D $a, Foo:D $b) { say ‘hi’; Less }; (Foo.new(:42z), Foo.new(:50z), Foo.new(:2z)).sort.say
camelia (Foo.new(z => 42) Foo.new(z => 50) Foo.new(z => 2))
AlexDaniel that doesn't do what I wanted it do :S 19:20
Geth doc: de1d46d801 | (Patrick Sebastian Zimmermann)++ | doc/Language/modules.pod6
Update ecosystem upload docs (CPAN).

As explained here: rakudo.party/post/CPAN6-Is-Here
synopsebot Link: doc.perl6.org/language/modules
Geth doc: e0b91762fc | (Patrick Sebastian Zimmermann)++ | 31 files
Merge branch 'master' of github.com/perl6/doc
squashable6 🍕 patzim++ merged pull request “Update ecosystem module upload docs (CPAN).”: github.com/perl6/doc/pull/1647
doc: 76badf6457 | (Patrick Zimmermann)++ (committed using GitHub Web editor) | doc/Language/modules.pod6
Merge pull request #1647 from patzim/master

Update ecosystem module upload docs (CPAN).
squashable6 🍕 patzim++ wrote a comment on “Update ecosystem module upload docs (CPAN).”: github.com/perl6/doc/pull/1647#iss...-341801833
perlpilot geekosaur: github.com/rakudo/rakudo/blob/mast...ex.pm#L474 :)
19:21 cdg left
geekosaur yes, I said you can force an ordering on it 19:21
19:21 mson left
wander maybe 'role Comparable[::Type] { method compare(Type $o --> Order) { ... } }' 19:21
not so good :( 19:22
AlexDaniel wander: well, the comparison is done with cmp op, so in theory it should be possible to add another candidate with params restricted to objects of your class and that should work, except that it doesn't… 19:23
wander I will try it
AlexDaniel how can I make &sort call my own cmp? 19:25
without forcing it to do so by passing a callable to it
19:26 Rawriful left, Rawriful joined
geekosaur I think you can't? this sounds like the same issue we already have for other types, if a method is invoked from a method on Any then you get the Any candidate instead of the actual type's candidate 19:27
wander m: class Foo { has $.z }; multi sub infix:<cmp>(Foo:D $a, Foo:D $b) { say ‘hi’; Less }; (Foo.new(:42z), Foo.new(:50z), Foo.new(:2z)).sort(&infix:<cmp>).say 19:28
camelia hi
hi
hi
(Foo.new(z => 42) Foo.new(z => 50) Foo.new(z => 2))
19:28 Rawriful left
geekosaur or Cool, etc. something near the root doesn;t specialize to types toward the leaves 19:28
19:28 Rawriful joined
wander AlexDaniel: ^^ is it? 19:29
19:32 domidumont left
AlexDaniel wander: yea, but this way it doesn't have to be infix:<cmp>, you can call it any way you want 19:33
19:33 wander left
AlexDaniel wander: it's probably the first time I see someone wanting Comparable, which is probably a very reasonable wish but people usually people don't notice its absence because you can just pass a code block to &sort :) 19:34
greppable6: infix\:\<cmp\> 19:35
greppable6 AlexDaniel, gist.github.com/59fd62f246bd12d8e2...84d2407495
AlexDaniel so what's the point of this? github.com/ugexe/zef/blob/c5e45a06...n.pm6#L145 19:38
“allow easier sorting” what's so easier about it?
squashable6 🍕 bduggan++ self-assigned issue “Deadlink for Metamodel::…”: github.com/perl6/doc/issues/1642 19:46
🍕🍕🍕 First contribution by bduggan++! ♥
19:47 wander joined
Geth doc/enum_how: 5d08cfcc98 | (Brian Duggan)++ | doc/Type/Metamodel/EnumHOW.pod6
Add Metamodel::EnumHOW page

Resolves #1642
19:47
wander AlexDaniel: yes, I should get used to the Perlish way 19:48
19:49 Piotr left
Geth doc: bduggan++ created pull request #1648:
Add Metamodel::EnumHOW page
19:50
squashable6 🍕 bduggan++ opened pull request “Add Metamodel::EnumHOW page”: github.com/perl6/doc/pull/1648
19:56 Cabanossi left 19:57 Cabanossi joined 19:59 darkmorph joined 20:02 mcmillhj left 20:03 releasable6 left, releasable6 joined 20:06 mcmillhj joined 20:11 mcmillhj left 20:12 travis-ci joined
travis-ci Doc build passed. Brian Duggan 'Add Metamodel::EnumHOW page 20:12
travis-ci.org/perl6/doc/builds/296950054 github.com/perl6/doc/commit/5d08cfcc98ac
20:12 travis-ci left 20:13 mcmillhj joined 20:14 troys is now known as troys_ 20:18 mcmillhj left, Piotr joined 20:24 mcmillhj joined 20:29 mcmillhj left
squashable6 🍕 AlexDaniel++ wrote a comment on “Mention 「my %h{Int}」 syn…”: github.com/perl6/doc/issues/1588#i...-341820678 20:38
20:38 mcmillhj joined
squashable6 🍕 AlexDaniel++ wrote a comment on “Grammar.parse talks abou…”: github.com/perl6/doc/issues/1583#i...-341821228 20:40
20:40 mempko joined 20:43 mcmillhj left 20:45 kaare_ left 20:48 kaare_ joined 20:51 Piotr left 20:54 mcmillhj joined 20:56 azawawi joined
azawawi hi 20:56
20:57 pecastro left 20:59 mcmillhj left 21:02 pecastro joined
azawawi timotimo: ping 21:03
21:06 HelpWithPerl joined, mcmillhj joined
HelpWithPerl Hey gus 21:06
21:06 b2gills joined
HelpWithPerl guys* 21:06
I'm having trouble using the "perl6" command on my debian machine 21:07
If I go into the location where all the perl files are stored, there is an executable called "perl6"
If I run that, I can write perl code and it works, but not otherwise 21:08
[Coke] is that diretory in your path?
21:09 bitrauser_ left
[Coke] when you say it doesn't work, can you put a copy of the error you're seeing in a nopaste somewhere? 21:09
21:09 bitrauser joined
[Coke] also may be of interest: how you installed perl6 on that box, and when you *can* run perl6, what does perl6 --version say? 21:10
if it's packages.debian.org/jessie/rakudo, don't use that one
bitrauser Good UTC+01:00, everyone, and happy Squashaton :) Hope I'm not too late. 21:11
21:11 mcmillhj left
[Coke] HelpWithPerl: I'm heading out, but if you provide that info, I'm sure folks can help you 21:12
21:14 pecastro left
HelpWithPerl The message I'm seeing is: bash: perl6: command not found 21:15
geekosaur that just means you need to set $PATH
HelpWithPerl Ah, okay
Stupid question: how do I do that? :3 21:16
geekosaur export PATH=/path/to/the/perl6/dir:$PATH
21:16 mempko left
geekosaur and add that or something similar to it to ~/.bash_profile (you may already have PATH settings in there, in which case just stick the perl6 dir at the front of the existing setting) 21:16
21:18 espadrine joined
geekosaur (it's not a great idea to put add-on packages directly in /usr/bin on most systems, that directory is owned by the system package manager and it will often find ways to mess things up if you start dropping extra stuff in it.) 21:19
oh, if you already have ~/.profile then don't create a ~/.bash_profile, use ~/.profile instead.
21:20 mempko joined
HelpWithPerl I was just about to ask 21:20
geekosaur if you have both then you potentially have a bit of a problem, as bash will only read ~/.bash_profile in that case. (but .bash_profile may have something in it to read .profile. this is not unusual if you switch shells a lot for e.g. testing reasons)
geekosaur does that ... but, uh. am far from the normal user case 21:21
21:22 pecastro joined
geekosaur also some linuxes give you a full set fo shell dotfiles with the common stuff in .profile and shell specific add-ons in .bash_profile, .zshprofile, etc. 21:22
21:24 mcmillhj joined
geekosaur (further confused by zsh having separate shstyle and csh-style dotfiles and they interact in weird ways) 21:25
HelpWithPerl Interesting stuff 21:26
Anyway, I've opened the .profile file
And am just wondering if there's any specific place I need to add export PATH=/path/to/the/perl6/dir:$PATH 21:27
geekosaur pretty much anywhere not inside an "if"
HelpWithPerl The first time I read that, I read it as "anywhere inside an "if" 21:28
21:28 mcmillhj left
HelpWithPerl Okay, I've added that command into .profile, and I'm trying to do the "perl6" command, but it gives the same error message 21:30
21:30 setty1 left
geekosaur yes, I said "and add" 21:30
chnaging that file means it should be there next time you log in. you also have to do it in any open terminals for the current session 21:31
21:31 R0b0t1_ joined 21:33 bdmatatu left, Yes_ joined
HelpWithPerl I think I've messed something up 21:35
I don't have a bash_profile, only a .profile, so I've added the export PATH=/path/to/the/perl6/dir:$PATH to there, at the very bottom
Then I saved the file
And then I opened a new terminal, and tried to run the perl6 command 21:36
21:36 mcmillhj joined
MasterDuke HelpWithPerl: can you paste the exact line you added? 21:38
21:38 Yes_ left
HelpWithPerl Sure: export PATH=/path/to/the/perl6/dir:$PATH 21:39
MasterDuke you need to put the acutal path there. something like: /usr/local/bin/:$PATH 21:40
geekosaur right, I don't know where you foudn the perl6 command so I tried to make it clear that you need to put that directory (not the full path to perl6 itself, just the directory part!) ther 21:41
21:41 pecastro left, mcmillhj left 21:42 pecastro joined
HelpWithPerl Guys 21:48
IT WORKS1
Thanks so much!
azawawi gist.github.com/azawawi/ec06083efc...04340f6331 # a quick ::pack Benchmark of Data::MessagePack vs MsgPack 21:57
MasterDuke azawawi: that's around ruby/python/etc speed now? 21:59
azawawi MasterDuke: yup near it :) 22:00
22:00 patrickz left
azawawi MasterDuke: i didnt benchmark it.. let me check it :) 22:00
22:01 COMBORICO joined
COMBORICO m: my @digits = <1 2 3 6 5 4 7 8 9>; my @removed-digits = splice @digits, 3, 3, 4, 5, 6; 22:04
camelia ( no output )
COMBORICO Oops, dang it. Forgot say.
22:07 robertle left
azawawi MasterDuke: python script does it in 0.057s (25 iterations, 10k list size) vs 2.15s for the Perl 6 native version (MsgPack) 22:07
MasterDuke: at least we're getting there :)
MasterDuke cool 22:08
azawawi MasterDuke: heap corruption is still there 22:09
MasterDuke: but at higher list size counts (30_000 is the mark on my machine) 22:10
MasterDuke: this improved a lot... github.com/azawawi/perl6-msgpack/c...6ac42a93c9
MasterDuke azawawi: maybe you should .tell dogbert17, he's good at tracking those sorts of things down
valgrind and gdb weren't very helpful, but you could also try asan 22:12
azawawi MasterDuke: it is a nativecall thing... happens exactly here github.com/azawawi/perl6-msgpack/b...er.pm6#L25
MasterDuke azawawi: nine might also be a good person to ask, he does a lot with NativeCall 22:13
azawawi MasterDuke: either i dont fully understand the msgpack sbuffer implementation or we have a bug with nativecall buffer index lookup 22:14
22:16 mson joined 22:19 mempko left 22:23 cdg joined 22:26 cdg_ left 22:27 comborico1611 joined
comborico1611 m: @digits = <1 2 3 6 5 4 7 8 9>; my @removed_digits = splice @digits, 3, 3, 4, 5, 6; say @removed_digits; say @digits; 22:27
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '@digits' is not declared
at <tmp>:1
------> 3<BOL>7⏏5@digits = <1 2 3 6 5 4 7 8 9>; my @remov
22:27 cdg left
comborico1611 m: my @digits = <1 2 3 6 5 4 7 8 9>; my @removed_digits = splice @digits, 3, 3, 4, 5, 6; say @removed_digits; say @digits; 22:28
camelia [6 5 4]
[1 2 3 4 5 6 7 8 9]
comborico1611 Another typo . . .
azawawi travis-ci.org/azawawi/perl6-msgpac.../296986289 # macOS and Linux tests are now passing :) 22:39
22:39 COMBORICO left 22:41 azawawi left, nadim_ left, Cabanossi left 22:42 Cabanossi joined 22:46 mcmillhj joined 22:51 mcmillhj left 22:56 mempko joined 22:58 mcmillhj joined 23:00 wamba joined 23:04 rindolf left 23:05 mcmillhj left 23:06 rindolf joined, comborico1611 left, cdg joined 23:10 Cabanossi left 23:11 cdg left 23:12 Cabanossi joined 23:13 mcmillhj joined 23:17 mcmillhj left 23:18 HelpWithPerl left, pmurias left 23:19 diakopter left, troys_ is now known as troys 23:20 cdg joined
MasterDuke .tell azawawi btw, `$packed = (^$size).map({$buffer[$_]})` should be faster than repeatedly .appending 23:23
yoleaux MasterDuke: I'll pass your message to azawawi.
23:24 cdg left 23:27 mcmillhj joined 23:32 grumble left, mcmillhj left 23:34 grumble joined 23:38 rindolf left 23:43 mcmillhj joined 23:47 sena_kun left
Geth doc: 0333bf50e8 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 3 files
Document LEAVE + exit trap

Resolves #1581
23:48
squashable6 🍕 AlexDaniel++ closed issue “Using exit() when you re…”: github.com/perl6/doc/issues/1581
23:50 mcmillhj left 23:56 Cabanossi left
squashable6 🍕 AlexDaniel++ wrote a comment on “add invocant to glossary”: github.com/perl6/doc/issues/1557#i...-341854661 23:56
23:56 Cabanossi joined
squashable6 🍕 AlexDaniel++ labeled issue “Discuss performance benefits of native types”: github.com/perl6/doc/issues/1534 23:57
🍕 AlexDaniel++ unlabeled issue “Discuss performance benefits of native types”: github.com/perl6/doc/issues/1534 23:58
23:59 grondilu joined