»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋 Set by Zoffix on 25 July 2018. |
|||
Xliff installs smem | 00:00 | ||
00:01
oodani joined
|
|||
Xliff | Ah! Python. | 00:02 | |
00:02
p6bannerbot sets mode: +v oodani
|
|||
timotimo | m: X::NYI.^name.say | 00:02 | |
camelia | X::NYI | ||
timotimo | m: X::NYI.WHAT.Str.say | 00:03 | |
camelia | Use of uninitialized value of type X::NYI in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in block <unit> at <tmp> line 1 |
||
timotimo | oh, right | ||
.WHAT will always give you an empty string + a warning | |||
TreyHarris | m: try { say +"a"; CATCH { .WHAT.say } } | ||
camelia | (Numeric) Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏) in block <unit> at <tmp> line 1 |
||
TreyHarris | m: try { say +"a"; CATCH { .^name.say } } | 00:04 | |
camelia | X::Str::Numeric Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏) in block <unit> at <tmp> line 1 |
||
00:09
DarthGandalf joined,
p6bannerbot sets mode: +v DarthGandalf
|
|||
TreyHarris | Oh, I see... it was nothing complicated, just that .WHAT's stringification strips out namespaces. Like | 00:10 | |
00:10
Khisanth left
|
|||
TreyHarris | m: say X::AdHoc.WHAT, X::AdHoc.^name | 00:10 | |
camelia | (AdHoc)X::AdHoc | ||
timotimo | well, say uses .gist | ||
but eq and ne will use .Str | |||
m: say buf8.^name | |||
camelia | Buf[uint8] | ||
timotimo | mhm | 00:11 | |
TreyHarris | m: so 42.WHAT == 2.WHAT | 00:12 | |
camelia | WARNINGS for <tmp>: Useless use of "so " in expression "so 42.WHAT ==" in sink context (line 1) Invocant of method 'Bridge' must be an object instance of type 'Int', not a type object of type 'Int'. Did you forget a '.new'? in block <unit> at… |
||
timotimo | that will try to .Numeric before comparing | 00:13 | |
TreyHarris | m: so 42.WHAT eq 2.WHAT | ||
camelia | WARNINGS for <tmp>: Useless use of "so " in expression "so 42.WHAT eq" in sink context (line 1) Use of uninitialized value of type Int in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.… |
||
timotimo | you would want === here | ||
TreyHarris | m: so 42.WHAT === 2.WHAT | ||
camelia | WARNINGS for <tmp>: Useless use of "so " in expression "so 42.WHAT ===" in sink context (line 1) |
||
TreyHarris | m: say (42.WHAT === 2.WHAT) | ||
camelia | True | ||
TreyHarris | gotcha | ||
and I learned about `Bridge` in messing with this, so that's fun :-D | 00:14 | ||
the temperature example in the docs is clever | 00:15 | ||
00:19
rindolf left
00:20
lichtkind joined
00:21
p6bannerbot sets mode: +v lichtkind
00:23
Khisanth joined
00:24
p6bannerbot sets mode: +v Khisanth
00:30
jme` joined
00:31
p6bannerbot sets mode: +v jme`
00:39
w_richard_w joined,
p6bannerbot sets mode: +v w_richard_w
|
|||
zachk | do I need to install any system dependencies for the Digest package? zef is taking forever on it | 00:45 | |
timotimo | Digest seems to be a pure perl6 implementation of the algorithms | 00:46 | |
so it might just be that it's slow in its tests? | |||
zachk | yea I do believe I passed in a some sort of test option as cro.services suggested, so that has zef run tests and can seriously slow it down? | 00:56 | |
timotimo | that's probably the "don't run tests" flag actually | ||
--/tests, right? | |||
01:03
mowcat left
|
|||
TreyHarris | Isn't there hyper syntax for rewriting `Foo.decode('literal'.encode)` so that it can go in `'literal'.encode` then `Foo.decode` order? I'm blanking | 01:11 | |
timotimo | i'm not sure it works with methods actually | 01:12 | |
with subs i can imagine | |||
TreyHarris | Yeah | ||
timotimo | m: say 'literal'.encode ==> Foo.decode | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Only routine calls or variables that can '.push' may appear on either side of feed operators. at <tmp>:1 ------> 3say 'literal'.encode ==> Foo7⏏5.decode |
||
timotimo | m: say 'literal'.encode andthen Foo.decode($_) | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared name: Foo used at line 1 |
||
timotimo | er, yeah | ||
m: class Foo { method decode { "12345" } }; say "literal".encode andthen Foo.decode($_) | 01:13 | ||
camelia | utf8:0x<6C 69 74 65 72 61 6C> Too many positionals passed; expected 1 argument but got 2 in method decode at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
timotimo | m: class Foo { method decode($input) { "12345" ~ $input } }; "literal".encode andthen say Foo.decode($_) | ||
camelia | 12345literal | ||
timotimo | m: class Foo { method decode($input) { "12345" ~ $input.perl } }; "literal".encode andthen say Foo.decode($_) | ||
camelia | 12345utf8.new(108,105,116,101,114,97,108) | ||
TreyHarris | right | ||
timotimo | ^- only works if the return value is truthy | 01:14 | |
m: "literal".encode.&({ $_.perl.say }) | |||
camelia | utf8.new(108,105,116,101,114,97,108) | ||
timotimo | you can put an arbitrary block in there with this syntax | ||
TreyHarris | but once you have to literally use $_ the chain-i-ness of the construct starts to become less visible anyway | ||
01:15
ToddAndMargo joined,
p6bannerbot sets mode: +v ToddAndMargo
|
|||
timotimo | true that | 01:15 | |
i mean you can also "given" | |||
jnthn | You don't have to literally use it there, though. YOu can just write .perl.say :) | ||
ToddAndMargo | Hi All, I need to convert the value in a hash to a string. Here is my latest attempt: | ||
p6 'my $x = "acme"; my Str $y; my %Vendors = ( acme => ContactName => "Larry" ); $y= %Vendors<ContactName>.Str; say $y;' | |||
TreyHarris | jnthn: but `... andthen .Foo.decode` doesn't work | 01:16 | |
timotimo | m: my $x = "acme"; my Str $y; my %Vendors = ( acme => ContactName => "Larry" ); $y= %Vendors<ContactName>.Str; say $y;' | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse expression in single quotes; couldn't find final "'" (corresponding starter was at line 1) at <tmp>:1 ------> 3 $y= %Vendors<ContactName>.Str; say $y;'7⏏5<EOL> expecting … |
||
timotimo | m: my $x = "acme"; my Str $y; my %Vendors = ( acme => ContactName => "Larry" ); $y= %Vendors<ContactName>.Str; say $y; | ||
camelia | Use of uninitialized value of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in block <unit> at <tmp> line 1 |
||
timotimo | ToddAndMargo: you've put a Pair object as the value for the "acme" key in the %Vendors hash | 01:17 | |
m: my $x = "acme"; my Str $y; my %Vendors = ( acme => ContactName => "Larry" ); dd %Vendors | |||
camelia | Hash %Vendors = {:acme(:ContactName("Larry"))} | ||
zachk | timotimo, yes | ||
timotimo | the only key you could to use to get anything out of this hash would be "acme" | ||
ToddAndMargo | I need to get the value into $y | ||
jnthn | TreyHarris: Ah, I see the original question now. :) Indeed. | ||
ToddAndMargo | a typo on my part! # p6 'my $x = "acme"; my Str $y; my %Vendors = ( acme => ContactName => "Larry" ); $y= %Vendors<acme>.Str; say $y;' ContactNameLarry | 01:18 | |
timotimo | ToddAndMargo: is it intentional to have the hash set up to have a literal pair object in the hash? | ||
ToddAndMargo | It is shortened from | 01:19 | |
p6 'my $x = "acme"; my %Vendors = ( acme => { ContactName => "Larry", AccountNo => 1234 } ); say %Vendors{$x}<ContactName> ~ "\t" ~ %Vendors{$x}<AccountNo>;' Larry1234 | |||
I did not clean it up very well | |||
timotimo | may be a good idea to not shorten it in a way that changes the meaning as much :) | ||
ToddAndMargo | This the prginal offending line: $AccountNumber = ( %Vendors{ $VendorName }<AccountNo> ).Str; | 01:20 | |
Type Str does not support associative indexing. | 01:21 | ||
timotimo | what's in $VendorName? | ||
well, that's probably not the problem | |||
TreyHarris | It all comes down to an aesthetic dissatisfaction with the final line of the `augment` docs: "(In this case, the better solution would be to use a function)." Counter: "yes, but the method call preserves the left-to-right chaining, grumble grumble..." | 01:22 | |
timotimo | i think the error may actually be in a different line | ||
ToddAndMargo | line 47 : sub InitPartsStr( Str $Manager, Str $AccountNo ){ | ||
$AccountManager = ( %Vendors{ $VendorName }<ContactName> ).Str; $AccountNumber = ( %Vendors{ $VendorName }<AccountNo> ).Str; # PrintGreen( "VendorName = <$VendorName>\tAccountManager = <$AccountManager>\tAccountNumber = <$AccountNumber>\n" ); # exit; InitPartsStr( $AccountManager, $AccountNumber ); | 01:23 | ||
my Str $VendorName; my Str $AccountManager; my Str $AccountNumber; | 01:24 | ||
Xliff | m: "TOP".eq('aaa').say | ||
camelia | No such method 'eq' for invocant of type 'Str'. Did you mean 'Seq'? in block <unit> at <tmp> line 1 |
||
Xliff | m: "TOP".eqv('aaa').say | ||
camelia | No such method 'eqv' for invocant of type 'Str' in block <unit> at <tmp> line 1 |
||
ToddAndMargo | now this is working, so I have a typo somewhere it locate: # p6 'my $x = "acme"; my %Vendors = ( acme => { ContactName => "Larry", AccountNo => 1234 } ); my Str $y = %Vendors{$x}<ContactName>.Str; say $y;' Larry | 01:28 | |
I will go a hunting. | |||
01:29
lichtkind left
|
|||
timotimo | y'all want to see the TAS block of awesome games done quick? | 01:35 | |
because it started 5 minutes ago | 01:36 | ||
twitch.tv/gamesdonequick | |||
MasterDuke | TAS? | ||
timotimo | tool assisted speedrun | ||
basically "what if you play a game, but instead of having to react, you can press as many buttons as you want with as much precision as you want" | 01:37 | ||
right now they're showing "super mario bros 1, but what if you had a portal gun like in the game Portal" | |||
MasterDuke | ah, i was just reading about the 7m NetHack ascension earlier today | 01:38 | |
zachk | 7m? | 01:39 | |
timotimo | that's wicked fast | ||
01:39
w_richard_w left
|
|||
zachk | oh 7 minutes | 01:40 | |
MasterDuke | and apparently the first 6m was spent getting the PRNG to the right configuration | ||
timotimo | nice | 01:41 | |
01:42
cfa left
|
|||
Xliff | OK, that was crazy. | 01:44 | |
12 minutes! :-O | |||
timotimo | yeah | 01:45 | |
01:49
Kaiepi left
|
|||
ToddAndMargo | figured it out. I had to remove the variable from teh line and seperate it with ~: $PartsStr = "Hi " ~ $Manager ~ ",<br><br>" ~ | 01:52 | |
timotimo | ah | 01:53 | |
you probably had it attempt to parse that as $Manager<br><br> | |||
i.e. try to access the "br" key in the $Manager variable | |||
ToddAndMargo | Such is life in the html lane! Thank you all lfor the help and moral support | 01:57 | |
timotimo | NP | 01:58 | |
glad to get some easy to solve problems for a change, haha | |||
(just easier because of my experience) | |||
Xliff | timotimo: github.com/Xliff/p6-VisualGrammar/...205801.png | 02:00 | |
02:00
pukku joined,
p6bannerbot sets mode: +v pukku
|
|||
timotimo | beautiful! | 02:01 | |
Xliff | :) | ||
pukku | quick question -- if I want to parse HTML, what module do I use? None of the options searching for HTML on modules.perl6.org seem to be what I'm looking for, and I don't think the page is going to be valid XML... | 02:02 | |
02:02
sena_kun left
|
|||
AlexDaniel | pukku: Gumbo ? | 02:02 | |
MasterDuke | isn't there a Dom::Tiny? | 02:03 | |
timotimo | yeah | ||
i was just about to grab that | |||
modules.perl6.org isn't very happy right now? | |||
github.com/zostay/p6-DOM-Tiny | 02:04 | ||
MasterDuke | was just working for me | ||
AlexDaniel | pukku: Gumbo currently has this bug: github.com/Skarsnik/perl6-gumbo/issues/5 | 02:05 | |
pukku: so depending on the amount of pages you want to parse in one go, maybe it's not the right solution for you… | |||
pukku | Thanks! I think that DOM::Tiny is what I'm looking for, but I'll check out Gumbo | ||
Ah; I'm only going to look at one page, I think, but maybe I'll see if DOM::Tiny works. | 02:07 | ||
Thanks! | |||
timotimo | github.com/zostay/p6-DOM-Tiny/issues/15 | 02:08 | |
pukku | I was literally just about to create that issue. :-) | ||
Thanks muchly! See you later... | 02:10 | ||
02:10
pukku left
|
|||
timotimo | o/ | 02:10 | |
Xliff | timotimo: Installation instructions up at github.com/Xliff/p6-VisualGrammar/ if you are interested in playing around with it. | 02:14 | |
Sorry about the complexity. :/ | |||
Would be interested to know what you think about it so far... in your copious free time. :D | 02:15 | ||
(Would be interested to know your --stagestats for that last invocation!) | 02:16 | ||
02:24
ToddAndMargo left
02:28
zachk left
|
|||
b2gills | TreyHarris: `.WHAT` is absolutely nothing like `.^name`. `.WHAT` gives you a reference to the type. `.^name` gives a string that matches what you called the type. | 02:32 | |
m: my $a = anon class Foo {}; my $b = anon class Foo {}; say 'Do they have the same name? ',$a.^name eqv $b.^name; say 'Are they the same?', $a.WHAT eqv $b.WHAT | |||
camelia | Do they have the same name? True Are they the same?False |
||
02:43
matiaslina joined
02:44
p6bannerbot sets mode: +v matiaslina
02:48
lizmat left
03:07
Kaiepi joined
|
|||
Kaiepi | is there an equivalent to node's process.nextTick in perl 6? | 03:07 | |
rather than having to do something like Promise.in(0.00001).then({ ... }) | 03:08 | ||
timotimo | the .thens of promises are already scheduled on the scheduler i think? | ||
m: await start { say "before"; Promise.resolved(1).then({ say "in the then" }); say "after" }; say "after everything" | 03:09 | ||
camelia | before An operation first awaited: in block <unit> at <tmp> line 1 Died with the exception: No such method 'resolved' for invocant of type 'Promise' in block at <tmp> line 1 |
||
timotimo | m: await start { say "before"; Promise.kept(1).then({ say "in the then" }); say "after" }; say "after everything" | ||
camelia | before after in the then after everything |
||
Kaiepi | $*SCHEDULER.cue was what i was looking for | 03:12 | |
Xliff | Kaiepi: Can you show me how you are using that? | 03:22 | |
03:25
leont left
03:26
Sgeo__ left
03:27
Kaiepi left,
Kaiepi joined
03:28
p6bannerbot sets mode: +v Kaiepi
|
|||
Kaiepi | Xliff, hastebin.com/abihimufec.rb | 03:29 | |
this is a chat bot | |||
Xliff | Cheers! | ||
Kaiepi | it can't send the message immediately since it breaks the connection | ||
03:31
Kaypie joined
|
|||
Kaiepi | but if i use $*SCHEDULER.cue, it works | 03:31 | |
03:31
Kaiepi left
|
|||
Xliff | Ah! So you cue without any time which means it will non-block and run as soon as it can. | 03:32 | |
03:32
p6bannerbot sets mode: +v Kaypie
|
|||
Xliff | I've only used it as a replacement for setTimeout | 03:32 | |
03:34
ferreira left
03:36
wmoxam joined,
p6bannerbot sets mode: +v wmoxam
03:51
kent\n left
03:52
kent\n joined,
p6bannerbot sets mode: +v kent\n
04:28
Cabanoss- joined
04:29
p6bannerbot sets mode: +v Cabanoss-
04:31
Cabanossi left
04:42
matiaslina left
05:06
WqZtM52a joined,
p6bannerbot sets mode: +v WqZtM52a
05:14
WqZtM52a is now known as daemon
05:26
undersightable6 left,
quotable6 left,
quotable6 joined,
undersightable6 joined,
MasterDuke left
05:27
p6bannerbot sets mode: +v quotable6,
p6bannerbot sets mode: +v undersightable6
05:50
ChoHag left
06:22
vrurg left
06:42
vrurg joined,
vrurg left
06:44
daotoad joined
06:45
p6bannerbot sets mode: +v daotoad
06:55
daotoad left
07:02
daotoad joined
07:03
p6bannerbot sets mode: +v daotoad
07:10
dncefan left
07:13
dncefan joined
07:14
p6bannerbot sets mode: +v dncefan
07:17
holyghost joined
07:18
p6bannerbot sets mode: +v holyghost
07:29
dncefan left
07:33
dncefan joined
07:34
p6bannerbot sets mode: +v dncefan
07:37
jmerelo joined
07:38
p6bannerbot sets mode: +v jmerelo
07:42
reportable6 left,
coverable6 left
07:43
coverable6 joined,
reportable6 joined,
p6bannerbot sets mode: +v coverable6,
p6bannerbot sets mode: +v reportable6
07:56
satori__ left
08:08
irdr left
|
|||
pony | m: grammar L { rule TOP { <exp>+ }; rule exp { <var> }; token var { <[a..z]> } }; say L.parse: 'xx' | 08:15 | |
camelia | Nil | ||
pony | why doesn't that match? 'x x' does. | ||
08:19
sauvin joined,
p6bannerbot sets mode: +v sauvin
08:28
satori__ joined
08:29
p6bannerbot sets mode: +v satori__
08:32
daotoad left
08:33
satori__ left
08:47
coverable6 left,
reportable6 left
08:48
reportable6 joined,
coverable6 joined,
p6bannerbot sets mode: +v reportable6,
p6bannerbot sets mode: +v coverable6
|
|||
pony | oicy | 08:52 | |
i neeeded a regex | |||
jmerelo | pony: shouldn't you have whitespace somewhere? | 09:03 | |
pony | yeah that too | 09:04 | |
jmerelo | m: grammar L { rule TOP { <exp>+ % ' ' }; rule exp { <var> }; token var { <[a..z]> } }; say L.parse: 'x x' | 09:05 | |
camelia | Nil | ||
jmerelo | m: grammar L { rule TOP { <exp>+ % \s+ }; rule exp { <var> }; token var { <[a..z]> } }; say L.parse: 'x x' | ||
09:05
telex left
|
|||
camelia | Nil | 09:05 | |
jmerelo | m: grammar L { rule TOP { <exp>+ % <ws> }; rule exp { <var> }; token var { <[a..z]> } }; say L.parse: 'x x' | 09:06 | |
camelia | 「x x」 exp => 「x 」 var => 「x」 ws => 「」 exp => 「x」 var => 「x」 |
||
jmerelo | pony: ^^^ | ||
09:07
telex joined
|
|||
pony | m: grammar L { rule TOP { <exp>+ % <ws> }; rule exp { <var> }; token var { <[a..z]> } }; say L.parse: 'xx' | 09:07 | |
camelia | Nil | ||
09:07
p6bannerbot sets mode: +v telex
|
|||
pony | m: grammar L { regex TOP { <exp>+ % <ws> }; rule exp { <var> }; token var { <[a..z]> } }; say L.parse: 'xx' | 09:08 | |
camelia | Nil | ||
pony | m: grammar L { regex TOP { <exp>+ % <ws> }; regex exp { <var> }; token var { <[a..z]> } }; say L.parse: 'xx' | ||
camelia | Nil | ||
pony | grump | ||
09:10
rindolf joined,
p6bannerbot sets mode: +v rindolf
09:11
daotoad joined
|
|||
Geth | doc: 8a7b0a0e59 | (JJ Merelo)++ | doc/Language/syntax.pod6 Adds Boolean literals, closes #2552 |
09:11 | |
synopsebot | Link: doc.perl6.org/language/syntax | ||
jmerelo | pony: <ws> is whitespace; if you want to process every x separately no need to do that | ||
pony | m: grammar L { regex TOP { <exp>+ }; regex exp { <var> }; token var { <[a..z]> } }; say L.parse: 'xx' | ||
camelia | 「xx」 exp => 「x」 var => 「x」 exp => 「x」 var => 「x」 |
||
09:11
p6bannerbot sets mode: +v daotoad
|
|||
jmerelo | m: grammar L { rule TOP { <exp>+ }; token exp { <var> }; token var { <[a..z]> } }; say L.parse: 'xx' | 09:12 | |
camelia | 「xx」 exp => 「x」 var => 「x」 exp => 「x」 var => 「x」 |
||
pony | o | ||
09:15
daotoad left
|
|||
pony | it just doesn't work if exp is a rule | 09:15 | |
but i thought rules just add optional whi... oh, backtracking | 09:16 | ||
Geth | doc: 23fb530399 | (JJ Merelo)++ | doc/Type/Str.pod6 Includes new form of contains Also clarifies haystack metaphor. @lizmat changed this very recently, it's likely that it's not really done that way in the current version, but it matches roast, and over all, it closes #2334. Thanks! |
09:19 | |
synopsebot | Link: doc.perl6.org/type/Str | ||
09:24
irdr joined
09:25
p6bannerbot sets mode: +v irdr
09:29
w17t left
|
|||
Geth | doc: e60d9ebe32 | (JJ Merelo)++ | doc/Type/Str.pod6 Minor changes and elimination of definitions |
09:29 | |
synopsebot | Link: doc.perl6.org/type/Str | ||
09:31
w17t joined,
p6bannerbot sets mode: +v w17t
09:34
robertle joined
09:35
p6bannerbot sets mode: +v robertle
09:50
satori__ joined,
p6bannerbot sets mode: +v satori__
09:54
Cabanoss- left
09:55
satori__ left,
Cabanossi joined,
p6bannerbot sets mode: +v Cabanossi
09:57
satori__ joined,
p6bannerbot sets mode: +v satori__
10:06
Kaypie left,
Merfont joined
10:07
p6bannerbot sets mode: +v Merfont
|
|||
atacama_ | \wc | 10:08 | |
10:10
atacama_ left
10:14
pmurias joined,
p6bannerbot sets mode: +v pmurias
10:16
i1nfusion left
10:17
i1nfusion joined,
w17t left
10:18
p6bannerbot sets mode: +v i1nfusion
10:31
w17t joined,
p6bannerbot sets mode: +v w17t,
domidumont joined
10:32
p6bannerbot sets mode: +v domidumont,
marmor joined,
sca joined
10:33
p6bannerbot sets mode: +v marmor,
p6bannerbot sets mode: +v sca
10:36
pecastro joined
10:37
p6bannerbot sets mode: +v pecastro
10:39
andrzejku_ joined
10:40
p6bannerbot sets mode: +v andrzejku_
10:41
remi_ness joined,
p6bannerbot sets mode: +v remi_ness
10:47
pmurias left,
pmurias joined,
p6bannerbot sets mode: +v pmurias
10:49
natrys joined
10:50
p6bannerbot sets mode: +v natrys
10:53
satori__ left,
satori__ joined
10:54
p6bannerbot sets mode: +v satori__
10:59
satori__ left
11:28
jmerelo left
|
|||
scovit | Hello, separating implementation from declaration is what allows many languages out there to avoid circular dependencies. In perl6 I often end up having very big source files to avoid them | 11:35 | |
I think that it could be that I am issing somethinf from the logic of doing things right in this language | |||
is there a way, for instance, to separate funcitions that need a class declaration from the class that need those functions? | 11:37 | ||
11:37
satori__ joined
11:38
p6bannerbot sets mode: +v satori__
11:40
kylese joined,
p6bannerbot sets mode: +v kylese
|
|||
scovit | I am checking out what people do in C#, where similarly circular dependencies are considered an indication of bad design | 11:49 | |
robertle | scovit: there is also some interesting work in C++ by John Lakos, "levelization" might find you some starting points | 11:51 | |
I do wonder however whether a circular dependency is an equally bad thing in all languages, it might be less of an issue for perl 6 than it is for c++... | 11:52 | ||
I would still think that they make it hard for the human reading this as well | |||
andrzejku_ | hi | 11:56 | |
By default, split omits the matches, and returns a list of only those parts of the string that did not match. | |||
camelia, for (split(/ \s+ /, " 52 comb")) { say $_ } | 11:57 | ||
m: for (split(/ \s+ /, " 52 comb")) { say $_ } | |||
camelia | 52 comb |
||
andrzejku_ | m: for (split(/ \s /, " 52 comb")) { say $_ } | 11:58 | |
camelia | 52 comb |
||
andrzejku_ | emm strange | ||
m: for (split(/ \s /, "52 comb")) { say $_ } | |||
camelia | 52 comb |
||
andrzejku_ | oh now | ||
the first white space | |||
is a separate item | |||
looked like it is not splitted | |||
why so? | |||
12:02
Some-body_ joined,
p6bannerbot sets mode: +v Some-body_,
satori__ left
12:03
DarthGandalf left,
Some-body_ is now known as DarthGandalf
12:08
lizmat joined,
p6bannerbot sets mode: +v lizmat
12:11
sena_kun joined
12:12
p6bannerbot sets mode: +v sena_kun
12:29
Stamm joined,
p6bannerbot sets mode: +v Stamm
12:30
Stamm left
12:48
lucasb joined,
p6bannerbot sets mode: +v lucasb,
satori__ joined
12:49
p6bannerbot sets mode: +v satori__
|
|||
timotimo | andrzejku_: there's an empty string in front of the first whitespace in your string :) | 12:52 | |
if you join it back together and there's nothing there, then it wouldn't be the same any more | |||
tbrowder | hi, #perl6 | ||
sena_kun | o/ | 12:53 | |
tbrowder | m:my $n; {loop (my $n =0;$n<2;++$n){say $n} | 12:54 | |
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/Xu8ZdSDpQM Whitesp… |
||
tbrowder, Full output: gist.github.com/c0093e771f7b08ef73...a5c80197b5 | |||
sena_kun | m: loop (my $n = 0; $n < 2; ++$n) {say $n} | 12:55 | |
camelia | 0 1 |
||
tbrowder | :sena_kun good am! just fumbled an experiment...trying again | 12:57 | |
m: my $n; { loop (my $n = 0; $n < 2; ++$n) { say $n}} | 12:58 | ||
camelia | 0 1 |
||
sena_kun | didn't know what was meant yet still typed in some code rudely, so continue, please. :) | ||
tbrowder | notice i enclosed the entrire loop in a free block. why couldn’t p6 always impliciltly (i.e., invisibly) do that for all loops? | 12:59 | |
*implicitly | 13:00 | ||
jnthn | tbrowder: Because we have extremely clear and consistent variable scoping rules. | ||
tbrowder: Also because `loop` isn't really idiomatic Perl 6 anyway; one can always write it as `for ^2 -> $n { }` and have no such issues | 13:01 | ||
In fact, we have things like `if foo() -> $x { }` to avoid needing to do `if my $x = foo() { }` | 13:02 | ||
13:02
zakharyas joined
|
|||
jnthn | So it's simply not worth breaking extremely consistent rules for a construct that is rarely needed. | 13:02 | |
tbrowder | i appreciate that, but how would that special case be so bad? just like p5’s “foreach my $n...” | ||
13:03
p6bannerbot sets mode: +v zakharyas
|
|||
jnthn | It's unclear to the reader what the scope of that is unless they know the rules very well. The Perl 6 design tries to avoid lists of special cases to remember. All you have to remember in Perl 6 is "curly braces equal scope" | 13:04 | |
tbrowder | jnthn: ok, thnx | 13:09 | |
13:14
andrzejku_ left
13:26
w17t left,
w17t joined,
p6bannerbot sets mode: +v w17t
13:27
w17t left
14:27
evalable6 left
14:29
evalable6 joined
14:30
leont joined,
p6bannerbot sets mode: +v evalable6,
p6bannerbot sets mode: +v leont
14:37
kst left
14:45
zakharyas left
15:00
Ven`` joined
15:01
p6bannerbot sets mode: +v Ven``,
SyrupThinker left
|
|||
Ven`` | m: sub add($a, $b, :$add) { say $add ?? $a + $b !! $a * $b }; say add.assuming(:add)(1, 2); | 15:02 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Calling add() will never work with declared signature ($a, $b, :$add) at <tmp>:1 ------> 3{ say $add ?? $a + $b !! $a * $b }; say 7⏏5add.assuming(:add)(1, 2); |
||
Ven`` | m: sub add($a, $b, :$add) { say $add ?? $a + $b !! $a * $b }; say &add.assuming(:add)(1, 2); | ||
camelia | 3 True |
||
Ven`` | m: sub add($a, $b, :$add) { say $add ?? $a + $b !! $a * $b }; say &add.assuming(1, :add)(2); | 15:03 | |
camelia | 3 True |
||
15:03
SyrupThinker joined,
p6bannerbot sets mode: +v SyrupThinker
|
|||
Ven`` | m: sub add($a, $b, :$add) { say $add ?? $a + $b !! $a * $b }; add(1, *, :add)(2); | 15:04 | |
camelia | Cannot resolve caller Numeric(Whatever:D: ); none of these signatures match: (Mu:U \v: *%_) in sub add at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
15:04
lizmat left
15:05
kingofhell joined,
p6bannerbot sets mode: +v kingofhell
15:08
Ven`` left
15:16
kingofhell left
15:18
w17t joined,
p6bannerbot sets mode: +v w17t
15:24
tobs joined,
p6bannerbot sets mode: +v tobs
|
|||
Geth | doc: d59d752fac | cfa++ | doc/Type/Match.pod6 Fix link to Match make from made (closes #2555). |
15:24 | |
synopsebot | Link: doc.perl6.org/type/Match | ||
lucs | docs.perl6.org down :( | 15:30 | |
15:31
wi15ht joined,
p6bannerbot sets mode: +v wi15ht
15:34
w17t left
15:35
wi15ht left
15:36
w17t joined,
p6bannerbot sets mode: +v w17t,
vrurg joined
15:37
p6bannerbot sets mode: +v vrurg
|
|||
lucasb | seems all *.perl6.org isn't working, no? | 15:46 | |
El_Che | ^---- moritz | 15:48 | |
15:48
tobs left
15:49
sno joined
15:50
p6bannerbot sets mode: +v sno,
tobs joined,
p6bannerbot sets mode: +v tobs
15:56
w17t left
|
|||
moritz | rebooting... | 15:57 | |
El_Che | moritz: thx! | ||
moritz | ... and back up again | ||
lucs | Fixed. Thanks moritz! | ||
16:15
natrys left
16:33
molaf joined
16:34
p6bannerbot sets mode: +v molaf
16:46
mowcat joined
16:47
p6bannerbot sets mode: +v mowcat
17:11
ExtraCrispy joined,
p6bannerbot sets mode: +v ExtraCrispy
17:25
zakharyas joined
17:26
p6bannerbot sets mode: +v zakharyas
17:32
ferreira joined
17:33
p6bannerbot sets mode: +v ferreira
17:44
w17t joined,
p6bannerbot sets mode: +v w17t
|
|||
Xliff | m: say 1.HOW | 17:58 | |
camelia | Perl6::Metamodel::ClassHOW.new | ||
Xliff | m: say grammar.HOW | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Whitespace required after keyword 'grammar' at <tmp>:1 ------> 3say grammar7⏏5.HOW |
||
17:58
marmor left
|
|||
Xliff | m: say grammar T { }; say T.HOW | 17:58 | |
camelia | (T) Perl6::Metamodel::GrammarHOW.new |
||
17:59
w17t left,
w17t joined,
p6bannerbot sets mode: +v w17t
18:02
lichtkind joined
18:03
p6bannerbot sets mode: +v lichtkind
18:04
molaf left
18:07
lucasb left
|
|||
b2gills | m: say Grammar.HOW | 18:26 | |
camelia | Perl6::Metamodel::ClassHOW.new | ||
18:28
Bob joined,
p6bannerbot sets mode: +v Bob
18:39
zakharyas left
|
|||
Xliff | Is there a way to assign delegation at run-time? | 18:43 | |
Or at the very least to specify that you want to delegate all of class B's methods via class A. | 18:44 | ||
18:46
i1nfusion left
18:47
i1nfusion joined
18:48
p6bannerbot sets mode: +v i1nfusion
18:53
satori__ left
18:54
Ven`` joined
18:55
p6bannerbot sets mode: +v Ven``
|
|||
timotimo | i mean, you can create a role fresh for that class that has every method the class has + every method B has and have forwarder methods | 18:57 | |
Xliff | Yeah, but what I am trying to avoid is to have a handles statement that is really long. | 18:58 | |
Your role idea is one thing I thought of, but it would be easier to just loop over B.^methods and write wrappers, yes? | |||
This is just a thought excercise, btw. I am also trying to figure out a way to determine where grammars fail, so I can put that in p6-VisualGrammar. ;) | 18:59 | ||
TreyHarris | b2gills: I understood the type difference; that's why I corrected myself to ask when .WHAT's stringification *should* differ from .^name (aside from the parens). | 19:04 | |
I wasn't asking about the converse | |||
timotimo | Xliff: have you considered adapting what the grammar debugger does to your program? | 19:13 | |
it's the only approach i can think of for having a finer grain than method-call-like parts | 19:14 | ||
Geth | ecosystem: 121bad3642 | (Jonathan Stowe)++ | META.list Remove first batch to CPAN |
19:15 | |
timotimo | by putting in more stuff in there, maybe the analyzer could be made wise to things like different kinds of repetition operators | 19:17 | |
19:17
reach_satori joined
19:18
p6bannerbot sets mode: +v reach_satori
|
|||
tbrowder | jnthn: ref loops, i think all my loops are used where i was transforming old p5 code to p6 as a first for fastest functionality before final cleanup—i’ll go back and see if i can eliminate them | 19:20 | |
Xliff | timotimo: Yes. Analysing that is what I was working on, today. | 19:28 | |
I think I have a way of pulling trace information from grammars, based on Grammar::Tracer | |||
timotimo | that's the coarse grained info about calling into different tokens and such, right? | 19:31 | |
Xliff | Yes | ||
Grammar::Debugger will take a LOT longer to work through. | |||
timotimo | that's fair | 19:32 | |
i'm thinking maybe it should insert a dynamic variable at the very start of everything it parses and a bunch of blocks (marked "declarative") that update it with what's at that point in the grammar, and maybe a whole listing of that regex/whatever | 19:33 | ||
also, until now i don't think we have any tools to introspect the NFA that is generated for tokens and such | |||
that could be A Thing in your program :) | |||
Xliff | Yes, but first I need to learn what an NFA thing is! :) | 19:34 | |
I've seen it mentioned in the code. | |||
timotimo | heh | ||
en.wikipedia.org/wiki/Nondetermini...xample.svg | |||
Xliff | OH! Weren't these in your book? | 19:35 | |
19:35
zachk joined
|
|||
timotimo | imagine it starts at s0 and reads characters from the string | 19:35 | |
i haven't made a book ... yet :P | |||
Xliff | Oh. | ||
Nevermind. | |||
Yes. :P to me. | |||
19:35
zachk left,
zachk joined,
p6bannerbot sets mode: +v zachk
|
|||
Xliff | Can I :P myself? Yesssss. Yes, I can. | 19:35 | |
timotimo | all you need is a mirror | 19:36 | |
Xliff | That's very true. | 19:37 | |
Need to find something that can give a good, non-recursive dump of a Match object. | |||
timotimo | does DDT struggle with recursiveness? also, how do you make a recursive match object? | 19:38 | |
19:38
zakharyas joined
|
|||
Xliff | DDT does not, but it also has a hard time with Match objects. | 19:39 | |
19:39
p6bannerbot sets mode: +v zakharyas,
dncefan left,
dncefan joined
|
|||
Xliff | And I'm not making the match object. I'm just collecting the results at each stage. | 19:40 | |
timotimo | it does have a special mode to handle match objects better | ||
Xliff | Oh really? I will need to look that up. | ||
19:40
p6bannerbot sets mode: +v dncefan
19:41
Kaiepi joined,
Merfont left
19:42
p6bannerbot sets mode: +v Kaiepi
19:43
molaf joined
19:44
p6bannerbot sets mode: +v molaf,
domidumont left
19:47
leont left
19:49
molaf left
19:51
mowcat left
19:56
xinming joined
19:57
p6bannerbot sets mode: +v xinming
19:59
xinimng left
|
|||
zachk | can I run perl6 on arm? | 20:07 | |
20:08
Kaiepi left
20:11
Kaiepi joined
20:12
p6bannerbot sets mode: +v Kaiepi
|
|||
TreyHarris | zachk: Googling, it looks like two years ago there were people running Perl6 on raspbian | 20:12 | |
Not sure about more recently | |||
er, I should have said "running Rakudo" | |||
zachk | does perl6 still run on parrot at all? | 20:13 | |
TreyHarris | Dunno, but Rakudo uses MoarVM | ||
Ven`` | zachk: no | 20:14 | |
TreyHarris | zachk: if you don't have an ARM machine to try it on (like if you were considering a purchase based on this), I could try compiling it on my Pi | ||
Ven`` | I know FROGGS wanted, when parrot was removed, to bring it back at some point, but it was nto done that I know of. It's a pretty damn huge project... | 20:15 | |
zachk | its not a must have, but thank you for the offer, gonna try on an android device maybe latter today after I get one | ||
Ven`` | with its own vm + jvm + js backend, it's pretty amazing already | ||
TreyHarris | zachk: github.com/termux/termux-packages/issues/1324 | 20:16 | |
It compiles on termux but there's no package for it | |||
...so hopefully your phone doesn't throttle too much when plugged in since that compile's gonna take quite awhile :-D | 20:17 | ||
checkinstall runs on termux, so if you decide to do it, make a package and share ;-) | 20:18 | ||
b2gills | zachk: It was determined that it would be easier to start the Parrot backend support from scratch rather than try to fix what was already there. | 20:20 | |
The JVM, MoarVM, and JS backends are implemented fairly similarly, but the Parrot backend was vastly different. | 20:21 | ||
20:57
aeruder joined,
p6bannerbot sets mode: +v aeruder
21:04
lichtkind left
21:13
kylese left
21:17
lizmat joined,
p6bannerbot sets mode: +v lizmat
21:18
remi_ness left
|
|||
Geth | doc: 92da032131 | cfa++ | doc/Language/variables.pod6 Link $*KERNEL to Kernel (closes #2556). |
21:29 | |
synopsebot | Link: doc.perl6.org/language/variables | ||
21:32
zakharyas left
21:33
zakharyas joined
21:34
p6bannerbot sets mode: +v zakharyas
21:38
dct joined,
p6bannerbot sets mode: +v dct
|
|||
Kaiepi | is there a way to await the database becoming unlocked for DBIish? | 21:43 | |
21:50
pmurias left
21:52
molaf joined
21:53
w17t left,
p6bannerbot sets mode: +v molaf,
dct left
21:56
pmurias joined,
p6bannerbot sets mode: +v pmurias
|
|||
pmurias | b2gills: I'm not sure if the Parrot backend was more different then the JS one | 21:57 | |
b2gills: I would say the real reason the Parrot backend was dropped is that Parrot reviving was considered very unlikely | 21:58 | ||
b2gills: I guess it was more different in terms of the interface it was offering Rakudo | 22:00 | ||
lizmat | pmurias: rakudo contained a lot of optimized PIR at the time of the Great List Refactor | 22:03 | |
there was really nobody around anymore with the willingness to port that to the GLR semantics | 22:04 | ||
so it was a maintenance burden for a backed that did not see any meaningful development anymore at that time | |||
removing it also fixed some issues | 22:05 | ||
e.g., parsing would come to a crawl if *any* non ASCII character code was found in the code | |||
this was particularly annoying for the setting: the last time I tried to use unicode in the setting on parrot | 22:06 | ||
I killed the parsing after 15 minutes | 22:07 | ||
pmurias | I just remember a ton of parrot specific code being deleted all over the place ;) | 22:08 | |
moritz | that was a pleasure to do alright :) | 22:09 | |
lizmat | afk again& | 22:12 | |
AlexDaniel | pmurias: hello! Please consider changelogging rakudo-js changes here github.com/rakudo/rakudo/wiki/ChangeLog-Draft | 22:13 | |
pmurias: previously all of the js-related changes were put into one line like “rakudo-js progress” or the like, but I think they deserve a bit more :) | |||
pmurias | AlexDaniel: I'll think what to put there tommorow ;) (too sleepy right now) | 22:15 | |
AlexDaniel | sure! | 22:16 | |
pmurias: thank you! | |||
releasable6: status | |||
releasable6 | AlexDaniel, Next release in ≈6 days and ≈20 hours. 4 blockers. 103 out of 204 commits logged | ||
AlexDaniel, Details: gist.github.com/ea0a77928def1affcc...f158afa8fa | |||
22:21
daotoad joined
|
|||
Geth | doc: fe72b23039 | cfa++ | 46 files Rewrite broken /type links as /routine. |
22:21 | |
22:22
p6bannerbot sets mode: +v daotoad
22:29
dncefan left,
dncefan joined
22:30
p6bannerbot sets mode: +v dncefan
22:35
Xliff left
|
|||
sena_kun | I can do `use Foo <A B C>`, but cannot something like `my @a = <A B C>; #'[ pseudocode --> ] use Foo @a`? | 22:49 | |
22:49
zakharyas left
|
|||
timotimo | at the very least it has to be compile-time-known values | 22:51 | |
sena_kun | roger... | 22:52 | |
22:55
Khisanth left,
cpage left
22:56
pecastro left
22:58
cpage joined
22:59
cpage left
23:05
pmurias left
23:06
Grauwolf joined,
p6bannerbot sets mode: +v Grauwolf
23:09
daotoad left,
SCHAPiE joined,
p6bannerbot sets mode: +v SCHAPiE
23:14
Khisanth joined
23:15
p6bannerbot sets mode: +v Khisanth
23:20
Kaiepi left
23:21
Kaiepi joined,
rindolf left,
p6bannerbot sets mode: +v Kaiepi
23:26
Grauwolf left
23:27
MilkmanDan left
23:29
MilkmanDan joined,
p6bannerbot sets mode: +v MilkmanDan
23:34
Kaypie joined,
Kaiepi left,
p6bannerbot sets mode: +v Kaypie
23:37
revdiablo joined,
p6bannerbot sets mode: +v revdiablo
|