»ö« 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:08 cdg joined 00:13 cdg left
lookatme maybe not trap, but not comfortable for me :( 00:27
00:34 grumble left
timotimo lookatme: you're in luck! you can just install Slang::Tuxic! 00:35
Zoffix Nah, don't confuse everyone who's gonna read your code :) Just use OOP and #DeathToParens :) 00:37
timotimo heh.
00:38 pharv joined, pharv_ left
Zoffix Like you can write `grep * > 5, 1, 2, 3, 4` or `.grep: * > 5 with 1, 2, 3, 4` or `(1, 2, 3, 4).grep: * > 5` 00:38
That trap is documenteed tho in traps: docs.perl6.org/language/traps#Subr...thod_calls
m: constant grep = 42; say grep * > 5, 1, 2, 3, 4 # tho then you get this trap :) 00:39
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix > instead.
at <tmp>:1
------> 3constant grep = 42; say grep * >7⏏5 5, 1, 2, 3, 4 # tho then you get this t
Zoffix m: constant meow = 42; sub meow { 100 }; say meow # which is worse in this form
camelia 42
Zoffix m: class meow {}; sub meow { 100 }; say meow; # or this form 00:40
camelia (meow)
Zoffix m: constant meow = 42; sub meow { 100 }; say meow();
camelia 100
Zoffix m: class meow {}; sub meow { 100 }; say &meow(); # gotta use `&` too, as meow() here is a coercer 00:41
camelia 100
Zoffix m: class meow {}; sub meow { 100 }; say &meow(); # gotta use `&` too, as meow() here is a coercer
camelia 100
00:41 grumble joined
Zoffix oops 00:41
00:41 Zoffix left
lookatme m: say &sum (1, 2, 3) 00:48
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3say &sum7⏏5 (1, 2, 3)
expecting any of:
infix
infix stopper
postfix
statement end
statement modif…
lookatme m: say &sum(1, 2, 3)
camelia 6
lookatme awesome module Slang::Tuxic 00:50
daemon nn all 00:56
00:58 pierre joined 01:17 kurahaupo left 01:18 kurahaupo joined 01:34 w_richard_w joined 01:42 pharv left, pharv joined 01:44 khisanth_ left 01:47 pharv left, MasterDuke joined 01:52 MasterDuke left, sharksoft left 01:57 ChoHag left, khisanth_ joined 02:12 pharv joined 02:16 pharv left 02:24 cdg joined 02:28 cdg left 02:31 jeromelanteri joined 02:47 cdg joined, ilbot3 left 02:51 cdg left 02:53 aindilis` left, aindilis joined 02:56 ilbot3 joined, ChanServ sets mode: +v ilbot3
Geth rakudo.org: 92db004488 | (Zoffix Znet)++ | 2 files
Start repo
03:22
03:27 cdg joined 03:31 cdg left 03:44 ufobat___ joined 03:48 ufobat_ left
cfa hmm 03:51
03:51 wamba joined
cfa hmm 03:53
design.perl6.org/S11.html#Modules
"In the case of modules, the extra behavior is the availability of the export trait and any associated support for Perl 6 standard export semantics."
so, here's the confusion: if i create Foo.pm but omit 'unit module Foo', the export trait still seems to work as expected 03:54
is Foo 'just' a package in this case? it seems to have some module semantics 03:55
04:01 Zoffix joined
Zoffix So which cases cause Str.match return a Failure exactly? 04:01
m: dd 'x'.match: /y/, :x(1, 3, 2) 04:02
camelia Failure.new(exception => X::Str::Match::x.new(got => $(1, 3, 2)), backtrace => Backtrace.new)
Zoffix yey
04:02 Zoffix left 04:08 pierre left 04:12 Zoffix joined
Zoffix cfa: design.perl6.org contains historical archived documents. In a lot of cases they don't represent the current language. 04:13
04:15 noganex_ joined
Zoffix m: BEGIN '/tmp/2018-03-07/'.IO.mkdir.add('Foo.pm6').spurt: 「sub foo is export {say 42}」; use lib '/tmp/2018-03-07/'; use Foo; foo 04:17
camelia 42
Zoffix m: BEGIN '/tmp/2018-03-07/'.IO.mkdir.add('Foo.pm6').spurt: 「sub foo is export {say 42}」; use lib '/tmp/2018-03-07/'; use Foo; Foo::foo
camelia Could not find symbol '&foo'
in block <unit> at <tmp> line 1
Zoffix m: BEGIN '/tmp/2018-03-07/'.IO.mkdir.add('Foo.pm6').spurt: 「our sub foo {say 42}」; use lib '/tmp/2018-03-07/'; use Foo; foo
camelia 42
04:17 noganex left
Zoffix Without `unit module`, you can export, but the symbols are in a specific namespace. If you `our` them, you can use them even without exporting anything 04:18
cfa Zoffix: understood, though there's very little on unit and package/module relationships in the community docs
so i went digging
Zoffix m: BEGIN '/tmp/2018-03-07/'.IO.mkdir.add('Foo.pm6').spurt: 「unit module Foo; our sub foo {say 42}」; use lib '/tmp/2018-03-07/'; use Foo; foo 04:19
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
foo used at line 1
Zoffix m: BEGIN '/tmp/2018-03-07/'.IO.mkdir.add('Foo.pm6').spurt: 「unit module Foo; our sub foo {say 42}」; use lib '/tmp/2018-03-07/'; use Foo; Foo::foo
camelia 42
Zoffix m: BEGIN '/tmp/2018-03-07/'.IO.mkdir.add('Foo.pm6').spurt: 「unit module Foo; our sub foo is export {say 42}」; use lib '/tmp/2018-03-07/'; use Foo; foo
camelia 42
Zoffix And with `unit module`, the symbol is under that module's namespace and you can use it with full name if you `our` it or you can export it. 04:20
package is just a placeholder namespace
cfa okay, but let's simplify that a bit
if i omit 'unit module Foo', what is Foo.pm6?
a package with module-like export traits?
Zoffix m: package Foo { our sub meow { say 42 } }; class Foo { method meow { say 100 } }; Foo::meow; Foo.new.meow
camelia 42
100
Zoffix cfa: don't really know. I'd call Foo.pm6 "a module" and I think most people would. 04:21
cfa nods
so does that mean that Foo.pm6 with and without 'unit module Foo' (here assuming we don't want anything else on that unit line, like :auth) are interchangeable?
Zoffix In that both would be called "a module"? Yeah, but behaviour would be different. See my evals above. 04:22
nine++ and ugexe++ are the experts in this area. They'd know all the answers on how this stuff works and what's what.
cfa thanks 04:23
it'd be helpful if the first part of docs.perl6.org/language/modules clarified this 04:24
Zoffix Yeah. Export stuff could also use more info. 04:25
cfa and unit (perhaps with more centralised info on compunits)
like, the unit docs are basically docs.perl6.org/language/syntax#Mod...eclaration 04:26
there're two things here, i guess: one is discoverability and reference documentation, the other is a gentle guide to how you go about encapsulating subs 04:27
(i'm phrasing it that way to avoid saying package or module :)) 04:28
04:37 w_richard_w left, Kaypie is now known as Kaiepi, w_richard_w joined
Zoffix m: say ('abcdefghij'.subst: /y/, :x(1, 2, 3)).^name 04:48
camelia Cannot resolve caller subst(Str: Regex, :x(List)); none of these signatures match:
(Str:D $: Str:D $original, Str:D $final, *%options)
(Str:D $: $matcher, $replacement, *%options)
in block <unit> at <tmp> line 1
Zoffix m: say ('abcdefghij'.match: /./, :x(1, 2, 3)).^name
camelia Failure
Zoffix m: say ('abcdefghij'.match: /./, :nth(1, 3, 2)).^name
camelia List
Zoffix m: say (eager 'abcdefghij'.match: /./, :nth(1, 3, 2)).^name
camelia Attempt to fetch match #2 after #3
in block <unit> at <tmp> line 1
Zoffix This feels all over the place. One thing returns a Failure, the other lazily throws 04:49
m: say (eager 'abcdefghij'.match: /Y/, :nth(1, 3, 2)).^name
camelia List
Zoffix m: say ('abcdefghij'.match: /Z/, :x(1, 2, 3)).^name
camelia Failure
Zoffix And one returns a Failure regardless of the matching, while the other lazily reifies the argument and throws only if the bogus values are reified 04:50
Zoffix resists the urge to go on another rant about documenting features right away as these things pop right at you when you do -_- 04:51
04:52 u-ou joined
u-ou is there a better way to write regex foo { ‘a’ || ‘(‘ <.foo> ‘)’ } 04:52
Zoffix m: say 'abcdefghij'.match: /./, :x("1") 04:54
camelia in Str.match, got invalid value of type Str for :x, must be Int or Range
in block <unit> at <tmp> line 1
Zoffix m: say 'abcdefghij'.match: /./, :nth("1")
camelia (「a」)
Zoffix c'mon
u-ou: nothing comes to mind
u-ou the intention is to maybe have brackets 04:55
ZzZombo it's better to use `'(' ~ ')' <.foo>` for such constructs. 04:59
Zoffix Are they equivalent?
Geth doc: 145cdc26eb | (Zoffix Znet)++ | doc/Type/Str.pod6
Add more details Str.match's :nth/:x args
05:00
synopsebot Link: doc.perl6.org/type/Str
05:04 eliasr left
Geth doc: f33b51a9be | (Zoffix Znet)++ | doc/Type/Str.pod6
Doc that Str.match: :nth can produce a List of matches
05:08
05:11 xtreak joined 05:15 xtreak left
Zoffix Ah, no, the `~` version will call FAILGOAL on failed match 05:20
m: grammar { token TOP { '(' ~ ')' \d }; method FAILGOAL($/) { die "meows: $/" } }.parse: '(42)' 05:21
camelia meows: ')'
in method FAILGOAL at <tmp> line 1
in regex TOP at <tmp> line 1
in block <unit> at <tmp> line 1
05:31 cpup left 05:35 xtreak joined 05:41 curan joined 05:42 cdg joined
Geth doc: 4f6cb2161a | (Zoffix Znet)++ | doc/Type/Str.pod6
Document Str.subst[-mutate] setting of $/

For multi-match args, the List value settage was busted in Rakudo until github.com/perl6/roast/commit/af02dd68eb
05:44
synopsebot Link: doc.perl6.org/type/Str
05:44 Zoffix left 05:47 cdg left 05:53 khw left
Kaiepi proto and multi are so useful 05:59
06:04 kaare__ left 06:05 wamba left 06:07 kaare_ joined 06:09 skids left 06:15 troys left 06:26 cpup joined 06:29 pierre joined 06:36 darutoko joined
Geth doc: 6734c7f8a1 | (JJ Merelo)++ | doc/Language/regexes.pod6
Adds whitespace closes #1832
06:39
doc: 82f6de4019 | (JJ Merelo)++ | META6.json
Eliminates IO::String as hard dep closes #1827
synopsebot Link: doc.perl6.org/language/regexes
06:43 pharv joined 06:47 pharv left 06:49 wamba joined 06:52 kurahaupo left 06:53 kurahaupo joined 07:13 w_richard_w1 joined 07:14 pierre left, pierre joined 07:15 w_richard_w left 07:16 lowbro joined, lowbro left, lowbro joined 07:17 musca` left, w_richard_w joined 07:19 domidumont joined, pierre left 07:22 w_richard_w1 left 07:25 ufobat___ left, domidumont left, musca` joined, domidumont joined 07:26 rindolf joined 07:29 pierre joined 07:40 robertle joined 07:49 mempko left, xtreak left 07:50 mempko joined, kaare_ left 07:51 kaare_ joined, xtreak joined 08:10 pierre left 08:11 pierre joined 08:15 pierre left 08:22 pierre joined 08:23 zakharyas joined 08:26 dakkar joined, zakharyas left, zakharyas joined 08:27 w_richard_w left 08:40 xtreak left 08:43 xtreak joined 08:47 xtreak left
stmuk ZofBot: WRT rakudo.org replacement I'd like something where I'm able to just commit MD into git and not mess with Wordpress (which seems to suffer frequent security issues anyway) 08:53
damm autocomplete 08:54
.tell zoffix WRT rakudo.org replacement I'd like something where I'm able to just commit MD into git and not mess with Wordpress (which seems to suffer frequent security issues anyway)
yoleaux stmuk: I'll pass your message to zoffix.
08:58 scimon joined 09:06 ChoHag joined 09:16 kybr left 09:20 xtreak joined 09:21 sena_kun joined 09:24 zakharyas left 09:29 AlexDaniel joined 09:34 wamba left
TEttinger some bot just heard "wordpress" and is already heading off to hack rakudo.org 09:36
09:52 gregf_ joined 09:53 zakharyas joined 10:04 trnh joined 10:15 ZzZombo left 10:21 pierre left 10:22 pierre joined 10:24 trnh left
El_Che whut 10:25
wow
10:25 lichtkind_ joined 10:26 pierre left 10:28 kybr joined 10:31 pierre joined, ZzZombo joined 10:34 wamba joined 10:35 Actualeyes left 10:40 wamba left 10:44 pharv joined 10:48 lichtkind left, pharv left 10:53 pierre left 11:06 noganex_ left 11:21 ChoHag left 11:32 kaare_ left 11:34 kaare_ joined 11:47 cog_ joined 11:51 gabiruh left 11:53 gabiruh joined
rindolf hi all. sup? 12:02
12:03 zakharyas left 12:18 rindolf left 12:20 rindolf joined 12:23 darutoko left
dogbert2 hi rindolf 12:42
12:42 konsolebox left 12:43 konsolebox joined
rindolf dogbert2: hi 12:43
12:51 rindolf left 12:52 domidumont left, eliasr joined, domidumont joined 12:53 wamba joined, xtreak left 12:57 darutoko joined 12:59 rindolf joined 13:00 pierre joined 13:22 lizmat left 13:37 wamba left 13:40 wamba joined
dogbert2 rindolf: any new Project Euler solutions in the works? 13:42
13:43 pharv joined
rindolf dogbert2: well, i am working on one 13:46
13:47 konsolebox left, zakharyas joined 13:48 pharv left 13:52 curan left 13:53 konsolebox joined
dogbert2 which one ? 14:00
rindolf: is it one of the later ones, i.e. 612-621 ? 14:01
rindolf dogbert2: no 14:03
14:03 wamba left
rindolf dogbert2: it is projecteuler.net/problem=487 14:06
14:06 scimon left 14:09 scimon joined, gregf_ left, wamba joined
dogbert2 rindolf: interesting problem. I wonder if there are any alternatives to a brute force approach. 14:12
rindolf dogbert2: yes, i came up w one 14:13
El_Che rindolf: maybe your solutions could be canaries for the speed enhancements in rakudo? (like the CSV module?) 14:15
rindolf El_Che: maybe 14:16
El_Che the same solution could be run with different compiler releases 14:17
14:39 pierre left 14:52 zakharyas left 14:56 zakharyas joined
buggable New CPAN upload: DB-Pg-0.3.tar.gz by CTILMES cpan.metacpan.org/authors/id/C/CT/...0.3.tar.gz 15:11
15:18 konsolebox left 15:23 Kaypie joined, Kaiepi left 15:26 khw joined 15:31 konsolebox joined 15:32 zakharyas left 15:33 zakharyas joined, epony left 15:35 zakharyas left 15:37 zakharyas joined 15:38 epony joined 15:41 epony left 15:45 Sgeo left 15:46 Sgeo joined 15:53 skids joined 15:54 Sgeo_ joined 15:55 Kyo91_ joined 15:56 epony joined 15:57 Sgeo left 16:00 pharv joined 16:07 skids left 16:09 sharksoft joined 16:14 comborico1611 joined 16:15 sharksoft left 16:17 sharksoft joined 16:21 robertle left 16:23 Kyo91_ left 16:29 comborico1611 left 16:32 cfa left, xinming joined, xinming left, wamba left 16:34 troys joined 16:39 darutoko left 16:43 wamba joined 16:49 noganex joined 16:52 robertle joined 16:54 japanoise left
Geth doc: 67a578e4d2 | (Will "Coke" Coleda)++ | doc/Type/Str.pod6
fix typo
16:55
doc: 26e28eff86 | (Will "Coke" Coleda)++ | doc/Type/Str.pod6
use more straightforward word

that won't be confused with a Numeric
synopsebot Link: doc.perl6.org/type/Str
17:04 zakharyas left 17:05 vike joined 17:07 zakharyas joined 17:15 domidumont left 17:20 hakonhagland joined 17:24 scimon left 17:27 grumble left 17:31 grumble joined 17:32 xinming joined 17:40 eliasr left 17:41 dakkar left 17:42 skids joined 17:47 scovit left 17:53 itaipu left 17:56 domidumont joined 17:58 wamba left 17:59 bisectable6 left, bisectable6 joined 18:01 hakonhagland left, committable6 left 18:02 committable6 joined 18:05 zakharyas left, zakharyas joined 18:18 zakharyas left 18:26 Kaypie left, Merfont joined 18:32 tt left, tt joined 18:52 comborico1611 joined 19:03 Merfont left, Merfont joined 19:09 athenot_ left 19:10 athenot joined, releasable6 left, releasable6 joined 19:25 wamba joined 19:26 kaare__ joined 19:27 kaare_ left 19:29 Merfont left 19:30 Merfont joined 19:36 zakharyas joined 19:47 Ven`` joined 20:17 Ven`` left 20:19 domidumont left
Geth Pod-To-HTML: JJ++ created pull request #31:
Avoid errors in generated docs
20:27
20:31 espadrine joined 20:52 eliasr joined
Geth Pod-To-HTML: 51d3fa1380 | (Juan Julián Merelo Guervós)++ (committed by Zoffix Znet) | 3 files
Avoid errors in generated docs (#31)

  * Adds precomp everywhere
  * Avoid errors in documentation
  * Comment out debug
20:54
Pod-To-HTML: c713a8e34c | (Zoffix Znet)++ (committed using GitHub Web editor) | .gitignore
Use simpler ignore rule
20:55
Pod-To-HTML: c6050e631a | (Zoffix Znet)++ (committed using GitHub Web editor) | META6.json
Bump version
21:05 japanoise joined 21:07 zakharyas left 21:10 sena_kun left, sena_kun joined 21:11 Merfont left 21:13 Kaiepi joined 21:16 athenot left 21:18 athenot joined 21:21 domidumont joined, domidumont left 21:23 comborico1611 left 21:28 Kaiepi left, Kaiepi joined 21:29 wamba left
Kaiepi i have a nativecall method that takes Pointer[size_t] as an argument, but when i try Pointer[size_t].new($errpos) it just creates a new pointer with $errpos as the address 21:40
how do i create it pointing to $errpos' value?
jnthn A pointer just points to some storage, it's not storage itself 21:48
CArray[size_t].new($errpos) perhaps does what's needed (a pointer to a value and a 1-element heap array are the same in C) 21:49
Kaiepi ah right, i forgot about that 21:58
21:59 wamba joined
Kaiepi CArray[size_t].new($errpos) works 21:59
thanks
22:01 vike left 22:15 MasterDuke joined 22:17 entonian joined, kurahaupo_ joined, skids left 22:19 kurahaupo left 22:21 entonian left 22:23 Ven`` joined 22:24 comborico1611 joined 22:26 sena_kun left 22:39 llfourn left 22:42 vike joined 22:45 pharv left, pharv joined 22:47 pharv left, pharv joined 22:49 pharv left, llfourn joined 22:51 pharv joined 23:02 rindolf left, Ven`` left 23:05 lichtkind_ left 23:07 pharv left 23:10 pharv joined 23:15 comborico1611 left 23:17 lichtkind_ joined 23:19 pharv left, pharv joined 23:21 wamba left 23:31 Sgeo_ left 23:32 Sgeo joined 23:33 kini joined 23:38 robertle left 23:42 Alchemy joined, Alchemy is now known as Guest5566 23:46 pharv left 23:47 pharv joined 23:49 pharv left 23:50 pharv joined, Guest5566 left 23:51 daemon- joined, daemon- is now known as Guest53986 23:55 aindilis` joined, aindilis left