»ö« 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. |
|||
00:05
ryn1x joined,
p6bannerbot sets mode: +v ryn1x
00:09
ryn1x left
|
|||
timotimo | you want to have something like $my-instance.attribute-name($value-it-should-get)? | 00:10 | |
00:11
ryn1x joined
00:12
p6bannerbot sets mode: +v ryn1x
00:24
beeman left
|
|||
jdv79 | kinda | 00:25 | |
more like $instance.rando_meth($val_for_baz_attr) and the sig of the rando_meth handles binding that to $!baz | 00:26 | ||
similar to the common BUILD pattern where a named arg is bound directly to a attr | 00:27 | ||
00:29
beeman joined,
p6bannerbot sets mode: +v beeman
|
|||
timotimo | ah | 00:29 | |
yeah, all you need is to give it the right name and just not put a : in front | |||
i think that ought to do it | |||
00:30
Kaiepi left
00:43
MasterDuke joined,
p6bannerbot sets mode: +v MasterDuke,
MasterDuke left,
MasterDuke joined,
herbert.freenode.net sets mode: +v MasterDuke,
p6bannerbot sets mode: +v MasterDuke
|
|||
jdv79 | what's the right name if its a positional passed as a literal | 00:44 | |
timotimo | i'm not sure i understand? | 00:45 | |
m: class Test { has $.attribute; method sets-the-attr($!attribute) { say "set it!"; say $.attribute } }; Test.new.sets-the-attr(1) | |||
camelia | set it! 1 |
||
jdv79 | ah. got it. | 00:46 | |
thanks | |||
timotimo | YW | 00:47 | |
00:52
cydf left
01:07
Kaiepi joined,
p6bannerbot sets mode: +v Kaiepi
01:15
kurahaupo left
01:16
kurahaupo joined,
p6bannerbot sets mode: +v kurahaupo
|
|||
jdv79 | lets say i have an array attr (@.baz) and i want to slip in a hash for the constructor args. is there a way to get %args<baz> to slip in properly? | 01:35 | |
timotimo | hm, normally signature application is "binding", not sure if @-sigiled parameters do things differently | 01:36 | |
jdv79 | it looks like it ends up as the first elem in the attr array | 01:37 | |
aka $!baz has [[1,2,3]] | |||
rather @!baz | 01:38 | ||
if i make the attr a scalar it doesn't double it up like so | |||
timotimo | perhaps it does do assignment semantics, but your array has a scalar container around it? | 01:39 | |
jdv79 | i believe it does | ||
01:42
holyghost joined
|
|||
timotimo | in that case it would appear you can't just have it like that | 01:42 | |
01:43
p6bannerbot sets mode: +v holyghost
|
|||
jdv79 | m: class Foo { has @.a; method b (:@!a) {} }; my @foo = 1,2,3; my %args = :a(@foo); my $f = Foo.new(|%args); $f.say | 01:45 | |
camelia | Foo.new(a => [[1, 2, 3],]) | ||
01:46
molaf left
|
|||
jdv79 | so if to be able to slip constructor args the class can't use anything but scalar attrs | 01:47 | |
m: class Foo { has @.a; method b (:@!a) {} }; my @foo = 1,2,3; my %args = :a(@foo); my $f = Foo.new(|%args,:a(@foo)); $f.say | 01:48 | ||
camelia | Foo.new(a => [1, 2, 3]) | ||
jdv79 | that's unfortunate | ||
i thought this was a case were a slip would workk | 01:49 | ||
timotimo | slip only works if something is there to iterate, apparently this doesn't have that | 01:54 | |
SmokeMachine | How can I get the path of a module’s file programaticaly? | 01:55 | |
jdv79 | seems maybe inconsistent that its possible to have it work as expected without slipping the method args in and not when the slipping. | 01:56 | |
jnthn: is that on purpose and/or necessary? | 01:57 | ||
timotimo | oh, sorry, i should have said that slipping arguments will unpack lists to become positional args or named args depending on positional vs associative or something | 02:00 | |
maybe also iterable | |||
02:03
finanalyst joined
02:04
p6bannerbot sets mode: +v finanalyst
02:13
hph^ joined
02:14
p6bannerbot sets mode: +v hph^
|
|||
holyghost | hello | 02:27 | |
I'm back to work in a few hours | 02:29 | ||
sacomo | hi all | 02:54 | |
02:57
newbie23 joined
|
|||
sacomo | is there a way to interpolate a string regex, e.g. my $r = "'some part' \\s (\\d+) \\s 'more string' (\\w+)", into a regex for match? $str ~~ / $r / | 02:57 | |
02:58
p6bannerbot sets mode: +v newbie23
|
|||
buggable | New CPAN upload: AI-Agent-Music-0.2.4.tar.gz by HOLYGHOST cpan.metacpan.org/authors/id/H/HO/...2.4.tar.gz | 03:02 | |
New CPAN upload: Bayes-Learn-0.1.10.tar.gz by HOLYGHOST modules.perl6.org/dist/Bayes::Learn...:HOLYGHOST | |||
lookatme_q | sacomo, EVAL ?? | 03:06 | |
or /<$r>/ | 03:07 | ||
m: my $r = "'some part' \\s (\\d+) \\s 'more string' (\\w+)"; say "some part 123 more string foo" ~~ /<$r>/ | 03:08 | ||
camelia | Nil | ||
lookatme_q | m: my $r = "'some part' \\s (\\d+) \\s 'more string' (\\w+)"; say "some part 123 more stringfoo" ~~ /<$r>/ | 03:09 | |
camelia | 「some part 123 more stringfoo」 | ||
lookatme_q | ^^ sacomo | ||
m: my $r = "'some part' \\s (\\d+) \\s 'more string' (\\w+)"; say "some part 123 more stringfoo" ~~ /<$r>/; say $/ | |||
camelia | 「some part 123 more stringfoo」 「some part 123 more stringfoo」 |
||
buggable | New CPAN upload: AI-Agent-0.2.3.tar.gz by HOLYGHOST modules.perl6.org/dist/AI::Agent:cpan:HOLYGHOST | 03:12 | |
sacomo | lookatme_q: thanks. but I think that is only returning orig... | 03:15 | |
03:16
ufobat_ joined
03:17
p6bannerbot sets mode: +v ufobat_
03:20
ufobat left
|
|||
buggable | New CPAN upload: Bayes-Learn-0.1.11.tar.gz by HOLYGHOST modules.perl6.org/dist/Bayes::Learn...:HOLYGHOST | 03:32 | |
holyghost | Bayes::Learn is on github, github.com/theholyghost2 | ||
It should be debugged | |||
If anyone wants to make a pulle request, it's nice code to read and learn from | 03:33 | ||
s/pulle/pull | |||
lookatme_q | sacomo, what do you mean ?? | 03:42 | |
m: my $r = "'some part' \\s (\\d+) \\s 'more string' (\\w+)"; "some part 123 more stringfoo" ~~ /(<$r>)/; say $/ | |||
camelia | 「some part 123 more stringfoo」 0 => 「some part 123 more stringfoo」 |
||
lookatme_q | It matched obviously | ||
03:43
Guest79068 joined
|
|||
sacomo | yeah, that matched... what I am trying to do is grab the captures also, for example: | 03:44 | |
m: say "some part 123 more" ~~ /'some part ' (\d+) ' more'/ | |||
camelia | 「some part 123 more」 0 => 「123」 |
||
03:44
p6bannerbot sets mode: +v Guest79068
|
|||
lookatme_q | sacomo, IDK why it not captured | 03:46 | |
03:48
Guest79068 left
|
|||
sacomo | hmm | 03:51 | |
lookatme_q | sacomo, but EVAL should work | 03:53 | |
sacomo | yeah, ok thanks | 03:54 | |
03:55
khisanth_ left
04:07
w_richard_w joined
04:08
p6bannerbot sets mode: +v w_richard_w,
khisanth_ joined,
Itaipu left
04:09
p6bannerbot sets mode: +v khisanth_,
Itaipu joined
04:10
p6bannerbot sets mode: +v Itaipu
04:12
Cabanossi left
04:13
Cabanossi joined
04:14
p6bannerbot sets mode: +v Cabanossi
|
|||
buggable | New CPAN upload: IO-Glob-0.6.tar.gz by HANENKAMP modules.perl6.org/dist/IO::Glob:cpan:HANENKAMP | 04:22 | |
Geth | ecosystem: ccworld1000++ created pull request #417: add GtkPlus [On the way] |
04:30 | |
holyghost | I've made some music from remixed from a frined of mine : here's the 2 sampled sounds : | 04:34 | |
www.mediafire.com/file/yg9evcxqgocs...1.mp3/file | |||
www.mediafire.com/file/k71a94bc1xqq...4.mp3/file | |||
It's industrial | |||
I have programmed a simple sample recognizer with the use of Matrixes to interpolate | 04:36 | ||
you just enlarge the 8-bit sample with a matrix, they'll come when Mathx::Matrix exists | |||
Further on we might have Game::Markov::Sound | 04:37 | ||
future music | 04:38 | ||
buggable | New CPAN upload: HTTP-Request-Supply-0.1.2.tar.gz by HANENKAMP cpan.metacpan.org/authors/id/H/HA/...1.2.tar.gz | 04:42 | |
holyghost | ok, AI-Agent and AI-Agent-Music compile, I need tests | 04:52 | |
next is Bayes::Learn then Game::Markov | 04:53 | ||
buggable | New CPAN upload: Path-Router-0.2.tar.gz by HANENKAMP cpan.metacpan.org/authors/id/H/HA/...0.2.tar.gz | 05:02 | |
05:05
Itaipu left
05:09
Itaipu joined
05:10
p6bannerbot sets mode: +v Itaipu
05:12
ryn1x left
|
|||
ZzZombo | New release? Yes! | 05:14 | |
"panda-sub which pointed user to zef now removed" -- looks like a typo. I'd fix it myself, but WTF Github, I can't? | 05:21 | ||
holyghost | There's Mathx::Matrix on github.com/theholyghost2 | 05:32 | |
a start with VectorN, MatrixNM | |||
05:34
kurahaupo_ joined
05:35
p6bannerbot sets mode: +v kurahaupo_
05:37
vrurg left
05:38
vrurg joined,
kurahaupo left
05:39
p6bannerbot sets mode: +v vrurg,
hdch left
|
|||
holyghost | If you want to make a non-initialzed nested list, maybe it would be handy to nest while pushing or setting | 05:52 | |
05:53
kurahaupo_ left
|
|||
holyghost | m: Class A { has @!l; sub set($y,$value) { push(@!l[$y] = $value; } } | 05:53 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> You cannot declare attribute '@!l' here; maybe you'd like a class or a role? at <tmp>:1 ------> 3Class A { has @!l7⏏5; sub set($y,$value) { push(@!l[$y] = $v expecting any of: … |
||
05:54
kurahaupo joined,
p6bannerbot sets mode: +v kurahaupo
|
|||
holyghost | m: Class A { has @!l; sub set($y,$value) { push(@!l[$y], $value); } } | 05:56 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> You cannot declare attribute '@!l' here; maybe you'd like a class or a role? at <tmp>:1 ------> 3Class A { has @!l7⏏5; sub set($y,$value) { push(@!l[$y], $va expecting any of: … |
||
05:58
lizmat left
|
|||
holyghost | It's not Lisp or smalltalk anyway :-) | 05:59 | |
In C++ you have to use reserve | 06:01 | ||
buggable | New CPAN upload: DOM-Tiny-0.5.1.tar.gz by HANENKAMP modules.perl6.org/dist/DOM::Tiny:cpan:HANENKAMP | 06:02 | |
holyghost | e.g. in the vector STL class | ||
#include <vector> | |||
.tell jmerelo I have a module ready on github (Mathx-Matrix), I won't upload to CPAN before I have tests so you never have to worry anymore | 06:05 | ||
yoleaux | holyghost: I'll pass your message to jmerelo. | ||
holyghost | .tell My apologies for broken CPAN modules (with time) | ||
yoleaux | holyghost: I'll pass your message to My. | ||
06:06
Summertime left
|
|||
kurahaupo | holyghost: tell whom? | 06:06 | |
holyghost | .tell jmerelo My apologies for broken CPAN modules (within time) | 06:07 | |
yoleaux | holyghost: I'll pass your message to jmerelo. | ||
holyghost | kurahaupo: thanks | ||
06:07
Summertime joined,
p6bannerbot sets mode: +v Summertime
|
|||
Geth | doc: e2130a225e | (JJ Merelo)++ | doc/Type/Any.pod6 Adds better example for Any.roll Eliminates the class example, and adds pointers. Refs #1731 |
06:09 | |
synopsebot | Link: doc.perl6.org/type/Any | ||
Geth | doc: 54ea17ee87 | (JJ Merelo)++ | doc/Type/Any.pod6 Adds better example for Any.pick using Ranges Eliminates the class example too; refs #1731 |
||
doc: d6548d0919 | (JJ Merelo)++ | doc/Type/Any.pod6 Improves descripton of prepend |
|||
06:12
jmerelo joined
06:13
p6bannerbot sets mode: +v jmerelo,
kurahaupo_ joined
|
|||
jmerelo | O/ | 06:13 | |
yoleaux | 11 Nov 2018 15:04Z <SmokeMachine> jmerelo: if you have some time could you please comment? (it's far from complete yet) gist.github.com/FCO/33be94f5ecfab7...etsanta-md | ||
06:05Z <holyghost> jmerelo: I have a module ready on github (Mathx-Matrix), I won't upload to CPAN before I have tests so you never have to worry anymore | |||
06:07Z <holyghost> jmerelo: My apologies for broken CPAN modules (within time) | |||
06:14
p6bannerbot sets mode: +v kurahaupo_
|
|||
jmerelo | .tell SmokeMachine to please make a PR for the day you want too. I'll try to take a look today. | 06:15 | |
yoleaux | jmerelo: I'll pass your message to SmokeMachine. | ||
06:16
kurahaupo_ left,
kurahaupo left
06:23
kurahaupo joined
06:24
p6bannerbot sets mode: +v kurahaupo
|
|||
holyghost | jmerelo: If you want to take a look at AI::Agent in the future, it compiles | 06:25 | |
jmerelo: so does AI::Agent::Music | 06:26 | ||
jmerelo | holyghost: does it have tests? | ||
holyghost | not yet | ||
jmerelo | holyghost: I think I'll pass, then. | 06:27 | |
holyghost | ok | ||
jmerelo: It's a base class anyway, I need to write a parser for agent-agent talk | 06:28 | ||
especially the music agent system | |||
You can or cannot use it | |||
jmerelo | holyghost: you say base class as if base classes didn't need tests... Everything needs a test | 06:29 | |
holyghost | jmerelo: I know now | 06:30 | |
holyghost reads docs.perl6.org/language/testing | 06:32 | ||
06:35
vike1 left
06:38
shadowpaste left
06:40
nebuchadnezzar left,
shadowpaste joined,
nebuchad` joined,
p6bannerbot sets mode: +v shadowpaste
06:41
p6bannerbot sets mode: +v nebuchad`
06:50
vike1 joined
06:51
p6bannerbot sets mode: +v vike1
06:52
nebuchad` is now known as nebuchadnezzar
|
|||
holyghost | what's wrong with this ? pastebin.com/GiaY6Q1L | 06:53 | |
prove --exec perl6 -r t -I lib/ | 06:54 | ||
t/make-agent.t .. ===SORRY!=== Error while compiling /home/erana/perl6/AI-Agent/t/make-agent.t | |||
Undeclared name: | |||
Agent used at line 15 | |||
Confused | 06:56 | ||
at /home/erana/perl6/AI-Agent/t/make-agent.t:15 | |||
------> my $ag = AI:Agent:⏏:Agent.new(0); | |||
jmerelo | holyghost: double :: between AI and Agent | 06:57 | |
holyghost | t/make-agent.t .. Could not find symbol '&Agent' | 06:58 | |
06:58
lizmat joined,
p6bannerbot sets mode: +v lizmat
|
|||
holyghost | ^-- double | 06:58 | |
jmerelo | holyghost: because you need to get the syntax right. See above. | ||
you are writing AI:Agent, it should be AI::Agent | 06:59 | ||
holyghost | pastebin.com/PTtHUw90 | ||
$ prove --exec perl6 -r t -I lib/ | |||
t/make-agent.t .. Could not find symbol '&Agent' | |||
in block <unit> at t/make-agent.t line 15 | |||
jmerelo | holyghost: it would be better if you read the documents. | 07:00 | |
holyghost: use lib is for declaring paths to lib, not to use an actual lib | |||
holyghost: in that code, you're not even running a test. You need to actually use some test routine like "ok" or "is" | 07:01 | ||
holyghost: you should read thoroughly some Perl 6 book. | 07:02 | ||
holyghost | ok | ||
jmerelo | jmerelo: please start with the test documentation you've pointed to above. If you don't understand anything, please ask here or in StackOverflow or in both places | 07:06 | |
holyghost | Default constructor for 'AI::Agent::Agent' only takes named arguments | 07:07 | |
jmerelo | holyghost: default constructor for all classes do | 07:08 | |
holyghost | What's a named argument ? | ||
moritz | m: sub f(:$x) { say $x }; f x => 42; | 07:09 | |
camelia | 42 | ||
jmerelo | holyghost: ... and that is why you need to read some book and/or documentation and/or both | ||
holyghost: docs.perl6.org/type/Signature#inde...d_argument | |||
holyghost | t/make-agent.t .. Dubious, test returned 255 (wstat 65280, 0xff00) | 07:15 | |
Failed 1/1 subtests | |||
I got it cornered | 07:16 | ||
now the ok system | |||
in an hour | |||
jmerelo: thanks for the help, I only have the beastie book | |||
So it just fails when not returning 1; | 07:17 | ||
jmerelo: pastebin.com/9MSSYBCc | 07:19 | ||
07:19
domidumont joined
|
|||
holyghost | Needs the test system further on | 07:19 | |
07:20
p6bannerbot sets mode: +v domidumont
|
|||
holyghost | t/make-agent.t .. ok | 07:24 | |
All tests successful. | |||
jmerelo: I've got my first test :-) | 07:25 | ||
07:39
robertle joined
|
|||
holyghost | jmerelo: I uploaded with the main test for a n Agent dispatch to CPAN | 07:39 | |
07:39
jmerelo left,
p6bannerbot sets mode: +v robertle
|
|||
buggable | New CPAN upload: AI-Agent-0.2.4.tar.gz by HOLYGHOST modules.perl6.org/dist/AI::Agent:cpan:HOLYGHOST | 07:42 | |
holyghost | ^-- this should give you a subclass for dispatchable messages to agents | 07:43 | |
07:44
xinming left
07:46
xinming joined,
p6bannerbot sets mode: +v xinming
07:51
kdr22 left
08:00
abraxxa joined
08:01
p6bannerbot sets mode: +v abraxxa
08:02
w_richard_w left
08:05
kdr22 joined
08:06
p6bannerbot sets mode: +v kdr22
08:12
yqt joined
08:13
p6bannerbot sets mode: +v yqt
08:17
Itaipu left
08:22
rindolf joined
08:23
Itaipu joined,
p6bannerbot sets mode: +v rindolf
08:24
p6bannerbot sets mode: +v Itaipu,
zakharyas joined
08:25
p6bannerbot sets mode: +v zakharyas
08:30
kensanata joined,
p6bannerbot sets mode: +v kensanata
|
|||
holyghost | What's wrong with the apply of arguments, they are stationary : pastebin.com/DLG80QYs | 08:32 | |
I need some kind of binding | 08:35 | ||
08:37
dalek left
08:43
dakkar joined
08:44
sena_kun joined,
p6bannerbot sets mode: +v dakkar
08:45
p6bannerbot sets mode: +v sena_kun
08:46
kdr22 left
08:47
kdr22 joined,
Itaipu left
08:48
p6bannerbot sets mode: +v kdr22
08:52
Itaipu joined
08:53
p6bannerbot sets mode: +v Itaipu
08:57
kdr22 left,
kdr22 joined
08:58
p6bannerbot sets mode: +v kdr22
08:59
parv joined
09:00
p6bannerbot sets mode: +v parv
09:01
fatguy joined,
p6bannerbot sets mode: +v fatguy
09:03
cydf joined
09:04
p6bannerbot sets mode: +v cydf
09:15
rindolf left
09:19
Itaipu left
09:21
rindolf joined
09:22
p6bannerbot sets mode: +v rindolf
09:23
Itaipu joined
09:24
p6bannerbot sets mode: +v Itaipu,
dogbert11 left
09:34
fatguy left
|
|||
buggable | New CPAN upload: AI-Agent-0.2.5.tar.gz by HOLYGHOST modules.perl6.org/dist/AI::Agent:cpan:HOLYGHOST | 09:42 | |
09:42
Freeaqingme1 joined,
Freeaqingme1 left
09:47
tobs` joined
|
|||
holyghost | .tell jmerelo I have HashedAgent and Agent tested, you can use the ask routines. If you want to try SFY | 09:47 | |
yoleaux | holyghost: I'll pass your message to jmerelo. | ||
09:48
p6bannerbot sets mode: +v tobs`,
kerframil joined,
p6bannerbot sets mode: +v kerframil
10:05
hamhu3_ joined
10:06
p6bannerbot sets mode: +v hamhu3_
10:07
hamhu3 left
10:09
Itaipu left
10:11
Itaipu joined
|
|||
buggable | New CPAN upload: Mathx-Stat-0.1.14.tar.gz by HOLYGHOST modules.perl6.org/dist/Mathx::Stat:...:HOLYGHOST | 10:12 | |
10:12
p6bannerbot sets mode: +v Itaipu
|
|||
holyghost | ok, enough work, I am going to grab a beer | 10:20 | |
10:21
Sound joined,
p6bannerbot sets mode: +v Sound
|
|||
holyghost | Mathx::Stat has 2 tests, but I need to configure the outcome of the "ok"'s | 10:21 | |
I am getting there , slowly | |||
jmerelo, lizmat : Hope you like the new github modules | |||
s/new/updated | 10:27 | ||
lizmat | and now for something completely different: jnthn.net/all-the-czech-railways/#2018 | ||
holyghost | jnthn, lizmat: I like the beer mentioning | 10:29 | |
10:30
rindolf left
|
|||
holyghost | <-- old fart, linux this month | 10:31 | |
elder | |||
I don't remember, I joined linux in november 1998 with 7 debian floppies | 10:32 | ||
I burned them myself with rawrite.exe in win 98 | 10:34 | ||
root.bin/root.flp for example | 10:36 | ||
10:39
fatguy joined,
p6bannerbot sets mode: +v fatguy
|
|||
fatguy | when i .parse grammar with action to a class, looks like it also pass non matched string to the method since i got 'Use of Nil in string context' , how to avoid ? | 10:40 | |
code pastebin.com/dR9b2pe6 | 10:41 | ||
10:42
ChoHag left
|
|||
sena_kun | fatguy, can you also provide `sar30` file? at least partly, at the point where warnings are present. | 10:43 | |
10:46
rindolf joined,
p6bannerbot sets mode: +v rindolf
|
|||
fatguy | +sena_kun: ufile.io/6yhae | 10:51 | |
10:51
Sound left
10:56
domidumont left
|
|||
sena_kun | well, the thing is, as stated, in lines 25 and 26. when I did a simple `say $/` before those lines, I saw that not every parsed structure has `PM|AM` present. `$/[$UnknownThing]` evaluates to Nil, and when you try to `Nil eq "foo"`, it warns you that Nil is used in string context. | 10:56 | |
to avoid that, you may want to use something like `if $/{3}:exists && $/[3] eq 'AM';`. It's the first thing that comes from my mind, but it's ugly. :) | |||
personally, I would create a new token, like `token am-or-pm { 'AM' | 'PM' }`, and then used it as `<am-or-pm>` instead of `('AM')`. then in action method you can do like `with $<am-or-pm> { make self.foo($/) }`. } | 10:58 | ||
*instead of `AM` and `PM` notes, of course, without parens | 10:59 | ||
fatguy, ^ | |||
10:59
ChoHag joined
11:00
p6bannerbot sets mode: +v ChoHag
|
|||
sena_kun | or, rather, `with $<am-or-pm> { if } | 11:01 | |
ugh | |||
*when `PM` { foo }; when 'AM' { bar } | 11:02 | ||
fatguy | +sena_kun: thanks for your advise, let me try it :) | 11:05 | |
sena_kun | fatguy, you are welcome! | ||
holyghost | lizmat: I really like the railway link :-) | 11:07 | |
11:08
finanalyst left
11:23
nwellnhof joined,
p6bannerbot sets mode: +v nwellnhof
|
|||
nwellnhof | p6: say <0>.comb | 11:23 | |
camelia | (0) | ||
nwellnhof | OK, this was fixed: github.com/rakudo/rakudo/issues/2010 | 11:24 | |
11:24
nwellnhof left
|
|||
holyghost | jnthn: thanks for relieving on chezch railways :-) | 11:36 | |
jnthn | :) | ||
holyghost | really like the winter photos | 11:40 | |
I'm in since "de snoezige snowijt", a strip from Vandersteen | 11:41 | ||
about 30 years ago | |||
It was about "Flip, het winterkonkje" | |||
Flip, the winter king, a bird | 11:42 | ||
El_Che | holyghost: are you from .be? | ||
holyghost | yes | ||
11:42
pecastro joined
|
|||
holyghost | The Netherlands | 11:42 | |
lizmat | .be is not the Netherlands ? | 11:43 | |
holyghost | it was :-) | ||
El_Che | not since we threw William I over the border :) | ||
11:43
p6bannerbot sets mode: +v pecastro
|
|||
holyghost | we ventured with some on with some musketeers on foot | 11:43 | |
I don't remember the name | 11:44 | ||
split off in 1930 | |||
s/19/18 | |||
anyway, I'm a Belgian, Flemish in Brussels | 11:45 | ||
not a Walloon :-) | |||
lizmat | holyghost: then maybe you should join El_Che for a Brussels.pm meeting :-) | ||
El_Che | I used to live close to Vandersteen :) | ||
holyghost | You're bruxelles.pm.org, El_Che ? | 11:46 | |
El_Che | no, but I know them and sometimes I drop by | ||
holyghost | ok, I work for them | ||
I get some 100s of euros each time I release a package | 11:47 | ||
I'm not a system hacker | |||
El_Che: you're from Antwerp ? | 11:48 | ||
El_Che | yes | ||
holyghost | I cannot CTCP you | ||
nazi-town in Belgium :-) | 11:49 | ||
I work for Alexandre | |||
I wanted to go to a meeting decades ago, also to Munich YAPC | |||
I'll join a meeting once but I need more time to code really | 11:50 | ||
I'm not a meeting fellow | 11:51 | ||
gnoll statutes :-) | |||
glad to know where you're from | 11:52 | ||
I have a music/graphics codirector in Antwerp | |||
for my band "Lost Momentum" | 11:53 | ||
lizmat: there's 2 links up above | 11:54 | ||
www.mediafire.com/file/k71a94bc1xqq...4.mp3/file | |||
That's my latest music with her | 11:55 | ||
El_Che: It's a rework from the group "Implant", they're Belgian | |||
Rage is one of their songs | 11:56 | ||
I tried to mix with Juno reactor, but it isn't easy | |||
It's simple but I work on it from time to time in the weekend | 11:58 | ||
As I said I'm going to write some perl6 sound modules | |||
that's something a reverse engineer can parse :-) | |||
lizmat: It's not metal, I'm sorry :-) | 12:01 | ||
Anyway, El_Che I'm engoying a Chimay Blue | 12:02 | ||
if you like that beer, it's brussels one | |||
El_Che | sorry, somewhat absent, wat working at some code for work | 12:03 | |
holyghost | ok, nm | ||
lizmat | holyghost: also distracted... and it's woolfy who's very much into metal | 12:07 | |
lizmat is more of a prog rock person | |||
12:07
Itaipu left
|
|||
holyghost | woolfy ? | 12:07 | |
12:07
kudzo__ joined
|
|||
holyghost | lizmat: sure | 12:08 | |
12:08
p6bannerbot sets mode: +v kudzo__
|
|||
holyghost | lizmat: I like new wave which a friend of mine has delivered me | 12:08 | |
lizmat: Covenant for example, it's not funny however | 12:09 | ||
12:09
Itaipu joined
|
|||
holyghost | lizmat: I prolly cannot talk to woolfy about Metallica, the black album | 12:09 | |
12:09
p6bannerbot sets mode: +v Itaipu
|
|||
holyghost | lizmat: I also love "the matrix" film sounds | 12:10 | |
woolfy : see above for good metal from Keanu Reeves | |||
12:11
kudzo_ left
12:18
finanalyst joined
12:19
p6bannerbot sets mode: +v finanalyst
|
|||
holyghost | lizmat: Is woolfy older than 30 ? else I'll tell him some good sounds | 12:21 | |
lizmat | one good and one bad assumption :-) | 12:22 | |
holyghost | lizmat: If he's young I'd like to tell him about new wave, terefrom | 12:23 | |
12:23
domidumont joined
|
|||
El_Che | colder... | 12:23 | |
:) | |||
holyghost | s/terefrom/therefrom | ||
lizmat | two bad assumptions :-) | ||
12:24
p6bannerbot sets mode: +v domidumont
|
|||
holyghost | .tell woolfy we need to talk about music, new wave and metal | 12:24 | |
yoleaux | holyghost: I'll pass your message to woolfy. | ||
holyghost | so there :-) | ||
lizmat | I'll check what the old girl can do for you :-) | ||
holyghost | girl ? | ||
woolfy is a girl ? | 12:25 | ||
El_Che | warmer | ||
holyghost | lol | ||
old women make me fry :-) | |||
El_Che | and now she'll hit you | ||
holyghost | anyway, I'll tell her about Covenant, Sepultura and Industrial/Dark wave | 12:26 | |
12:26
woolfy joined
|
|||
holyghost | hello | 12:26 | |
Can you see this backlog ? | |||
no because I don't run BitchX :-) | 12:27 | ||
El_Che | there are logs | ||
holyghost | woolfy : check the backlog | ||
woolfy: we need to talk, kibologist | 12:28 | ||
Chaos A.D. | |||
El_Che | holyghost: it sounds you're 40+ | ||
I remember seeing them around that time | 12:29 | ||
holyghost | El_Che: yes | ||
Back in the day I used a 28.8k modem | |||
external | |||
in 1995 a simple winsoft modem | |||
El_Che | 14.4 internal :) | ||
holyghost | coolness | 12:30 | |
I'm 41 | |||
years old | |||
Kaiepi | o/ | ||
holyghost | hi | ||
Kaiepi: tell us your secrets :-) | 12:31 | ||
Kaiepi | well i'm 22 and a hs dropout | ||
got my ged though | |||
SmokeMachine | . | 12:32 | |
yoleaux | 06:15Z <jmerelo> SmokeMachine: to please make a PR for the day you want too. I'll try to take a look today. | ||
holyghost | Kaiepi: ged == ? | ||
Kaiepi | equivalent to a hs diploma | ||
holyghost | ok | ||
SmokeMachine | .tell jmerelo sorry, I didn't get it... PR for what? | 12:33 | |
yoleaux | SmokeMachine: I'll pass your message to jmerelo. | ||
holyghost | I graduated in 2015, Ph.D in physics and Computer Science | ||
in 2002 Mr. CS | |||
Kaiepi | nice | ||
i plan on going to uni for cs once i get my shit together | |||
holyghost | sure | ||
Better read some books then :-) | 12:34 | ||
Kaiepi | got mental health issues and addictions i need to get sorted out first | ||
what sort of books? | |||
holyghost | the wizard book. the dragon book | ||
(TNHD hacker dict) | |||
Kaiepi | ah sicp | 12:35 | |
holyghost | coolness, I got one there :-) | ||
Kaiepi | dragon book being Compilers: Principles, Techniques, and Tools? | ||
sena_kun | yes | 12:36 | |
holyghost | yacc and lex | ||
the wizard book, scheme meta-evals | 12:37 | ||
and an intro to scheme | |||
You can then program emacs somewhat :-) | |||
12:38
woolfy left,
titsuki left
|
|||
Kaiepi | i'm a vim guy | 12:39 | |
12:39
finanalyst left
|
|||
holyghost | me too, elvis and BSD vi | 12:39 | |
Kaiepi: anyway take care to grep book in TNHD | 12:40 | ||
it's not stupid, old yes, but good for UNIX->Linux | 12:41 | ||
s/UNIX/UNIX</ | |||
holyghost misses woolfy | 12:43 | ||
I thought I could talk about music, with my sounds, I need remixers :-) | |||
lizmat | holyghost: if you want to talk about music, this is probably not the right channel | 12:44 | |
Kaiepi | tnhd? | ||
12:45
zakharyas left
|
|||
holyghost | Kaiepi: The New Hacker Dictionary | 12:47 | |
lizmat: ok | |||
Kaiepi: if you need help for C++, I'm here | |||
Kaiepi: To tell secrets: Effective C, More Effective ++, Effective STL should you get started also C++faqs online | 12:49 | ||
Kaiepi | ah | ||
holyghost | lizmat: I like meta-chat, but music prolly isn't the right channel | ||
Kaiepi: so you need those books :-) | 12:50 | ||
lizmat: unless I meta-magic it into a package with a remix :-) | |||
12:50
Itaipu left
|
|||
holyghost | lizmat: See above for sound software from me | 12:51 | |
12:51
Itaipu joined
|
|||
holyghost | Kaiepi: I don't like amazon but you can get them 2nd hand for 5$ or so | 12:52 | |
12:52
p6bannerbot sets mode: +v Itaipu
12:56
fatguy left
13:21
haukex joined
13:22
p6bannerbot sets mode: +v haukex
13:29
finanalyst joined,
p6bannerbot sets mode: +v finanalyst
13:36
damaxi joined,
damaxi is now known as andrzejku,
p6bannerbot sets mode: +v andrzejku
|
|||
andrzejku | someone saw araraloren here? | 13:41 | |
araraloren are you there? | |||
/!seen araraloren | |||
!seen araraloren | |||
timotimo | .seen araraloren | 13:42 | |
yoleaux | I saw araraloren 4 Nov 2018 16:06Z in #perl6: <araraloren> Zoffix okay, thanks :) | ||
El_Che | .seen araraloren | ||
yoleaux | I saw araraloren 4 Nov 2018 16:06Z in #perl6: <araraloren> Zoffix okay, thanks :) | ||
andrzejku | :( | ||
I miss my friend | |||
.seen loren | |||
yoleaux | I saw loren 8 Jul 2016 13:51Z in #perl6: <loren> e, ^_^ .. haha don't mind | ||
13:45
jmerelo joined
13:46
p6bannerbot sets mode: +v jmerelo
|
|||
jmerelo | O/ | 13:47 | |
yoleaux | 09:47Z <holyghost> jmerelo: I have HashedAgent and Agent tested, you can use the ask routines. If you want to try SFY | ||
12:33Z <SmokeMachine> jmerelo: sorry, I didn't get it... PR for what? | |||
jmerelo | .tell SmokeMachine I see you did it already. Great! | 13:49 | |
yoleaux | jmerelo: I'll pass your message to SmokeMachine. | ||
SmokeMachine | . | ||
yoleaux | 13:49Z <jmerelo> SmokeMachine: I see you did it already. Great! | ||
SmokeMachine | jmerelo: :( | ||
jmerelo: :) | |||
sorry, wrong key... | |||
jmerelo | SmokeMachine: hi! | ||
SmokeMachine | jmerelo: hi! :) | 13:50 | |
jmerelo | We could be like that the whole day... | ||
SmokeMachine | :) | ||
jmerelo | I'll take a look at the article. Did someone add you to the WordPress blog? | 13:51 | |
SmokeMachine | jmerelo: that's not my first perl6 advent calendar post... | ||
jmerelo | SmokeMachine: ah, great, so you're in already | ||
SmokeMachine | jmerelo: this was my first one: perl6advent.wordpress.com/2016/12/...e-testing/ | 13:52 | |
jmerelo | .tell holyghost great to see you're advancing, but while these tests exist, they don't really test all functionality and what $ag is supposed to do. You should check for the return value, change of state or something. | ||
yoleaux | jmerelo: I'll pass your message to holyghost. | ||
jmerelo | SmokeMachine: I remember that one. Very interesting. Didn't remember it was yours, though... | 13:53 | |
13:54
sjoshi joined
|
|||
SmokeMachine | thanks | 13:54 | |
13:55
p6bannerbot sets mode: +v sjoshi
13:56
scimon joined
13:57
p6bannerbot sets mode: +v scimon
|
|||
holyghost | jmerelo: I'm here | 13:58 | |
yoleaux | 13:52Z <jmerelo> holyghost: great to see you're advancing, but while these tests exist, they don't really test all functionality and what $ag is supposed to do. You should check for the return value, change of state or something. | ||
holyghost | jmerelo: I'll extend test functionality | 13:59 | |
I almost fell asleep | |||
jmerelo | holyghost: would it be possible that you refrain from uploading new versions to CPAN while your tests are not completed? | 14:00 | |
holyghost | no if I comprehend | ||
cpan and github are synced | |||
I was working on Mathx::Stat tests (2) | 14:01 | ||
anyway, the base class dipatch of the Agent.pm6 works | |||
s/dipatch/dispatch | |||
jmerelo | holyghost: how come? You have to specifically upload to cpan. That's what I do, at least. New version, make dist, upload to CPAN. | ||
holyghost | eco: AI::Agent | 14:02 | |
buggable | holyghost, Failed to decode result JSON: | ||
jmerelo | holyghost: works as in it's thoroughly tested in any aspect and I also provide an example so that people can use it? | ||
holyghost | jmerelo: works in the meaning, | ||
with an example yes in t/make-agent.t | 14:03 | ||
it's a superclass however, which I might need to extend to test | |||
timotimo | yes, definitely | ||
holyghost | That's what AI-Agent-Music is used in | ||
jmerelo | holyghost: that's not an example, it's a test, it just tests that it does not crash, it does not test for actual state change or for the actual functionality | 14:04 | |
timotimo | you can write tests that look like code you'd expect your users to write | ||
plus a bunch of verification code that everything does what you expect | |||
holyghost | sure, I'll have to extend then | ||
jmerelo | timotimo: from my point of view, tests in many cases can be used as examples, if they clearly express intent beyond the syntax. That's not the case here. | ||
holyghost | with my excuses, I wrote a simple test _script_, I might want tot use OOP for it | 14:05 | |
s/tot/to | |||
jmerelo | timotimo: "my $ag = AI::Agent::Agent.new( x => 0 );" does not say what x is for, or what kind of values it can take, or anything. The other test uses a dummy message, with an empty %optargs, and is also OK. You are none the wiser about what that object is supposed to do. | 14:06 | |
holyghost: it's also customary to have the base class with the same name as the module. In your case, it would probably be the best to create an lib/AI/Agent.pm6 which would hold the base class (which if I understand is now in AI::Agent::Agent) | 14:07 | ||
holyghost | jmerelo: note my $msg = "ask about"; | 14:08 | |
jmerelo: it's not an empty message 2nd time | |||
Ulti | if I want to find all the substrings that match a given grammar is there a nice way to do that? | 14:09 | |
14:09
jmerelo left
|
|||
Ulti | parse is like the entire string is going to match TOP rather than looking for all the matches within like a regex | 14:09 | |
sena_kun | Ulti, with overlapping substrings possible? | 14:10 | |
Ulti | preferably not but I'd take that | ||
jnthn | Ulti: Probably $str.match(/<TheGrammar::TOP>/, :g) does it | ||
sena_kun | well, I don't know about overlapping ones(well, except for bruteforce char-by-char), but, oh, I'm late. :) | ||
Ulti | ok so thats like taking TOP out as a regex | 14:11 | |
14:11
holyghost left
|
|||
jnthn | and I think pass :ov to get overlapping ones if you did want them | 14:11 | |
Ulti | thanks | 14:12 | |
14:19
holyghost joined
14:20
p6bannerbot sets mode: +v holyghost
|
|||
holyghost | timotimo: you would like me to write a full test (OO) for the AI::Agent::Agent class ? | 14:24 | |
to interleave | 14:25 | ||
timotimo | sorry, i'm too busy with other stuff to write the tests for you | 14:27 | |
holyghost | ok | ||
timotimo | but i imagine you would have a "class TestAgent is AI::Agent::Agent { ... }" implement some methods, and then do some stuff with it and see if what it did matches with what it was supposed to do | 14:28 | |
holyghost | timotimo: with all due respect those are overridden methods | 14:29 | |
timotimo: the sole keyword as a message to self.dispatch is "ask about" | |||
timotimo: which answers the correct string | 14:30 | ||
to dispatch an agent I would have 2 agents which just return a &self.ask_agentmethod, which means it has to parse the dispatched agent | 14:31 | ||
timotimo | OK, then the tests could also be "try creating a class that doesn't re-implement all necessary methods and make sure that it throws an exception" | ||
holyghost | that's not the point of AI::Agent::Agent, it is a base class for the parsing stuff | ||
timotimo: that's already in | 14:32 | ||
the 2 tests | |||
timotimo | OK | ||
holyghost | else you just call a method on an instance which constructs nicely in t/ | ||
timotimo | i'm not the best at testing code, either | ||
holyghost | it's not my kind of thing also | 14:33 | |
timotimo | but for every piece of code you have in the module, you should try to find a way to test that it does what you hope | ||
holyghost | that's ok except parsing other agents return a &$agent.dispatch | 14:34 | |
that's incomputable in a test | |||
where dispatch is the double dispatched agent's dispatch method | |||
with an ok syntax | 14:35 | ||
it's a ref | |||
scalar vs. ref | |||
14:36
kerframil left
|
|||
holyghost | anyway, the dispatch proc works, so there shouldn't be much of a problem anymore | 14:37 | |
dispatch of "ask about" | 14:38 | ||
message | |||
14:38
pmurias joined,
p6bannerbot sets mode: +v pmurias
|
|||
holyghost | dispatch of message "agent" gives &$agent.dispatch | 14:39 | |
that's all the base class does | |||
So I'm half right :-) | |||
pmurias: check out AI::Agent, my 1st 2 tests | 14:40 | ||
14:42
Itaipu left
14:43
broquaint left,
broquaint joined
14:44
p6bannerbot sets mode: +v broquaint
|
|||
holyghost | hail to broquaint | 14:44 | |
14:46
Itaipu joined
14:47
p6bannerbot sets mode: +v Itaipu
|
|||
holyghost | lizmat: hail to Itaipu ! | 14:52 | |
14:53
reportable6 left,
reportable6 joined
|
|||
holyghost | woolfy: hail to Itaipu ! | 14:53 | |
14:53
p6bannerbot sets mode: +v reportable6
|
|||
holyghost | Oh, they're not online :-) | 14:55 | |
14:55
undersightable6 left,
undersightable6 joined
14:56
p6bannerbot sets mode: +v undersightable6
14:58
kurahaupo left,
kurahaupo joined
14:59
p6bannerbot sets mode: +v kurahaupo
15:02
zakharyas joined
|
|||
holyghost | hail to zakharyas | 15:02 | |
15:03
p6bannerbot sets mode: +v zakharyas
|
|||
holyghost | hello, what you've been up to zakharyas ? | 15:05 | |
I remember that zakharyas was the name of an elder necrarch, zakharyas the everliving. An vampire | 15:07 | ||
jdv79 | anyone know about this?: nopaste.xyz/?285372ce79885ca5#Y8Bo...jmxj9Ae6I= | 15:09 | |
15:13
sergot left,
dalek joined,
ChanServ sets mode: +v dalek
15:14
Geth_ joined,
synopsebot_ joined,
p6lert_ joined,
ChanServ sets mode: +v Geth_,
ChanServ sets mode: +v synopsebot_,
synopsebot left,
Geth left,
p6bannerbot sets mode: +v dalek,
p6bannerbot sets mode: +v synopsebot_,
p6bannerbot sets mode: +v p6lert_
15:15
parv left,
p6lert left,
SourceBaby left
|
|||
Geth_ | whateverable: 6216854099 | (Aleks-Daniel Jakimenko-Aleksejev)++ | xbin/Undersightable.p6 Remove 6lang.party It's no longer a thing |
15:15 | |
jdv79 | .tell jnthn i'm not sure who else to ask - nopaste.xyz/?285372ce79885ca5#Y8Bo...jmxj9Ae6I= | 15:17 | |
yoleaux | jdv79: I'll pass your message to jnthn. | ||
15:18
Sgeo__ joined
15:19
p6bannerbot sets mode: +v Sgeo__
15:20
Sgeo_ left
|
|||
holyghost | jdv79: if you paste in pastebin.com I might be of some help | 15:21 | |
I don't parse upper SSL | |||
lizmat | m: dd my %args = :a([1,2,3]) # jdv79 | 15:22 | |
camelia | Hash %args = {:a($[1, 2, 3])} | ||
lizmat | when you put the array into the hash, it gets itemized | ||
because the Array object is put into a container | 15:23 | ||
because a Hash is mutable | |||
m: my %args is Map = a => [1,2,3] | |||
camelia | ( no output ) | ||
lizmat | m: dd my %args is Map = a => [1,2,3] | 15:24 | |
camelia | Map.new((:a([1, 2, 3]))) | ||
jdv79 | i realize that. my question is is there a way to get around that in this case. | ||
lizmat | a Map doesn't have that issue | ||
m: class C { has @.a }; my @foo = 1,2,3; my %args is Map = :a(@foo); my $c = C.new(|%args); $c.say | |||
camelia | C.new(a => [1, 2, 3]) | ||
15:25
Manifest1 joined,
p6bannerbot sets mode: +v Manifest1
|
|||
holyghost | m: class C { has @.a; }; my bar (%args) { } my @foo = 1,2,3; my %args is Map = :a(@foo); my $c = C.new(bar(|%args)); $c.say | 15:29 | |
camelia | 5===SORRY!5=== Type 'bar' is not declared at <tmp>:1 ------> 3class C { has @.a; }; my bar7⏏5 (%args) { } my @foo = 1,2,3; my %args i Malformed my at <tmp>:1 ------> 3class C { has @.a; }; my7⏏5 bar (%args) { } my @foo = 1… |
||
jdv79 | lizmat: ah. i see it now. its buried in the Signatures doc page | ||
holyghost | m: class C { has @.a; }; my bar (%args) { } my @foo = 1,2,3; my %args is Map = :a(@foo); my $c = C.new(C.bar(|%args)); $c.say | 15:30 | |
camelia | 5===SORRY!5=== Type 'bar' is not declared at <tmp>:1 ------> 3class C { has @.a; }; my bar7⏏5 (%args) { } my @foo = 1,2,3; my %args i Malformed my at <tmp>:1 ------> 3class C { has @.a; }; my7⏏5 bar (%args) { } my @foo = 1… |
||
holyghost | lizmat: is they're a wat to apply sub bar to %args ? | ||
s/wat/way | |||
to be honest, I'm looking for simple "apply" routine | 15:31 | ||
jdv79 | oof. maybe that shoudl be on the Slip page too. idk. doc'ing such a "deep" lang seems hard. | ||
15:31
Itaipu left,
pmurias left
|
|||
jdv79 | thanks | 15:31 | |
lizmat | jdv79: yw | 15:32 | |
15:32
Itaipu joined
|
|||
lizmat | holyghost: perhaps start by making "bar" a method and making sure the number of opening curlies matches the number of closing curlies? | 15:32 | |
15:33
p6bannerbot sets mode: +v Itaipu
|
|||
holyghost | m: class C { has @.a; }; my bar (%args) { }; my @foo = 1,2,3; my %args is Map = :a(@foo); my $c = C.new(C.bar(|%args)); $c.say | 15:34 | |
camelia | 5===SORRY!5=== Type 'bar' is not declared at <tmp>:1 ------> 3class C { has @.a; }; my bar7⏏5 (%args) { }; my @foo = 1,2,3; my %args Malformed my at <tmp>:1 ------> 3class C { has @.a; }; my7⏏5 bar (%args) { }; my @foo = … |
||
holyghost | m: class C { has @.a; my bar (%args) { }; }; my @foo = 1,2,3; my %args is Map = :a(@foo); my $c = C.new(C.bar(|%args)); $c.say | 15:35 | |
camelia | 5===SORRY!5=== Type 'bar' is not declared at <tmp>:1 ------> 3class C { has @.a; my bar7⏏5 (%args) { }; }; my @foo = 1,2,3; my %a Malformed my at <tmp>:1 ------> 3class C { has @.a; my7⏏5 bar (%args) { }; }; my @foo = … |
||
holyghost | m: class C { has @.a; method bar (%args) { }; }; my @foo = 1,2,3; my %args is Map = :a(@foo); my $c = C.new(C.bar(|%args)); $c.say | ||
camelia | Too few positionals passed; expected 2 arguments but got 1 in method bar at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
holyghost | lizmat: ^-- | 15:36 | |
I've solved it with a : | 15:38 | ||
method dispatch($message, %optargs) { | |||
unless $!done { | |||
self.dispatch($message, %optargs) for %!dependencies; | |||
$!done = True; | |||
} | |||
} | |||
lizmat: same thing | |||
method BUILD() { | |||
self.add-dependency(&self.ask); | |||
self.add-dependency(&self.agent); | |||
} | |||
method add-dependency($dependency) { | |||
%.dependencies{$dependency.name => $dependency}; | |||
} | |||
sorry about the flood, just showing | 15:39 | ||
El_Che | holyghost: use a paste service | 15:40 | |
holyghost | I'm sorry | ||
lizmat | holyghost: the "bar" method expects an Associative. You're flattening the hash in the call to named parameters. dispatch will fail, because you don't pass a hash as a positional | ||
either don't slip the hash in the call, or make the parameter of "bar" a slurpy hash | |||
holyghost | pastebin.com/YaP9wAQT | 15:41 | |
jnthn | .tell jdv79 Do `%foo<a> := @foo` when building the thing to not have the Scalar containers in the first place, or `|%h.Map` to get rid of them | 15:42 | |
yoleaux | 15:17Z <jdv79> jnthn: i'm not sure who else to ask - nopaste.xyz/?285372ce79885ca5#Y8Bo...jmxj9Ae6I= | ||
jnthn: I'll pass your message to jdv79. | |||
scimon | Hey all | ||
lizmat | scimon o/ | 15:43 | |
timotimo | holyghost: i don't think "&self.ask" is what you think it is | ||
greetings scimon | |||
lizmat continues working on the P6W | |||
holyghost | timotimo: I should know my refs | 15:45 | |
it dispatches in method dispatch correctly | |||
timotimo | you know that perl6 doesn't have refs any more, right? | ||
holyghost | method refs should work ? | 15:46 | |
timotimo | not like you wrote in your code | ||
did you ever try to see if %.dependencies contains what you expected? | 15:47 | ||
in that code, i mean? | |||
holyghost | eco: AI::Agent | ||
buggable | holyghost, AI::Agent 'AI network Agent system, Music Link Agent': cpan.metacpan.org/authors/id/H/HO/H...2.4.tar.gz 1 other matching results: modules.perl6.org/s/AI%3A%3AAgent | ||
holyghost | ^-- check those tests | 15:48 | |
oh AI-Agent has disappeared | |||
maybe try zef AI::Agent | |||
s/zef/zef install | 15:49 | ||
the tests of AI-Agent work | |||
jdv79 | jnthn: thanks! | 15:50 | |
yoleaux | 15:42Z <jnthn> jdv79: Do `%foo<a> := @foo` when building the thing to not have the Scalar containers in the first place, or `|%h.Map` to get rid of them | ||
timotimo | holyghost: how can you be sure it does anything at all? | 15:51 | |
holyghost | timotimo: This is my test file: pastebin.com/Pi8JKurh | 15:52 | |
timotimo | that's what i'm looking at right now | 15:53 | |
what do you make of the 8 warnings it outputs? | 15:54 | ||
holyghost | It passes 2 tests on mu machine | ||
s/mu/my | |||
timotimo: nothing because of the ok $hag.dispatch ... | |||
timotimo | ? | ||
holyghost | it returns the correct value, AI::Agent::HashedAgent should be used as a superclass as I mentioned before | 15:55 | |
it dispatches a correct $msg | |||
timotimo | how do you know? | 15:56 | |
holyghost | you can then call it by AI::Agent::HashedAgent.ask | ||
15:56
cydf left
|
|||
timotimo | the tests don't seem to test HashedAgent.ask at all, though? | 15:57 | |
holyghost | timotimo: pastebin.com/DXusjsAG | ||
timotimo | i think you're misunderstanding what "ok" does | 15:58 | |
holyghost | timotimo: no because it has not been superclassed | ||
timotimo | ok is a passed test if the result is true-ish | ||
and the text after that is what it shall output as the "name" of the test | |||
see what happens when you change the text after the "ok $ag.dispatch($msg, %optargs)" line | |||
holyghost | $ag and $hag are different instances | 16:00 | |
timotimo | yeah | ||
holyghost | so is the ok return value | ||
timotimo | try it with both | ||
16:00
kurahaupo left,
domidumont left
|
|||
holyghost | my $num-tests = 2; | 16:00 | |
16:00
kurahaupo joined
|
|||
timotimo | i have another suggestion | 16:01 | |
16:01
kurahaupo left
|
|||
timotimo | try what happens when you dispatch the same message a second time on the same instance | 16:01 | |
16:01
kurahaupo joined
|
|||
timotimo | with a second test that looks just the same | 16:01 | |
and adjust the $num-tests to 3, of course | |||
you will find that the second time you dispatch the same message it will fail | |||
buggable | New CPAN upload: Template-Anti-0.5.2.tar.gz by HANENKAMP modules.perl6.org/dist/Template::An...:HANENKAMP | 16:02 | |
16:02
p6bannerbot sets mode: +v kurahaupo
|
|||
timotimo | it's because your test tests whether the return value of the dispatch method is truthy | 16:02 | |
a method without an explicit "return" will return the value of the last statement in it | |||
16:02
jast left
|
|||
timotimo | the last statement in your dispatch method is the "unless" block, which does the same thing: it returns the value of its last statement inside, which is $!done = True. the result of that is True, so dispatch returns True the first time. the second time the unless block doesn't run and the return value is Nil | 16:03 | |
16:04
troys joined
|
|||
holyghost | ok | 16:04 | |
timotimo | and i'll tell you right now, the dependencies attribute does not have in it what you expect, you should check it, perhaps in the BUILD submethod (please make it a submethod) | ||
16:04
p6bannerbot sets mode: +v troys,
jast joined
16:05
jmerelo joined,
p6bannerbot sets mode: +v jast
16:06
p6bannerbot sets mode: +v jmerelo
|
|||
timotimo | perhaps dd it for more clarity than you get when you just "say" it | 16:06 | |
AFK | |||
16:09
Itaipu left
16:12
Itaipu joined,
ExtraCrispy joined,
p6bannerbot sets mode: +v ExtraCrispy,
p6bannerbot sets mode: +v Itaipu
|
|||
holyghost | timotimo: thx, I need to redesign my hash | 16:13 | |
timotimo | oh, another thing: "zef test" will not output your test's output, so you can more easily miss stuff, like debug output. i recommend running the tests with "perl6 -I lib t/foo.t" instead so you can see everything | ||
i see the docs have nothing about methodrefs | 16:14 | ||
but methodrefs don't exist in the same way as they did in perl5 | 16:15 | ||
holyghost | timotimo: ? | ||
timotimo | you either use a little curly block as a closure over self, or you get the method from the object with .^find_method("methodname") | ||
jmerelo | timotimo: well, refs in general. | ||
timotimo | jmerelo: refs don't exist, but methodrefs exist even less | 16:16 | |
they don't-exist very strongly | |||
they un-exist to a higher degree than simply not being there | |||
jmerelo | timotimo: they don't++ exist | ||
timotimo: they don't even meta-exist | |||
timotimo | they (exist := -Inf) | ||
jmerelo lols | 16:17 | ||
holyghost | +1 | ||
haukex | Hi all! Thought you might be interested: webperl.zero-g.net/perl6.html | ||
timotimo | AFK | ||
holyghost | jmerelo: so method refs are unofficial ? | ||
coolness, I'll look it up later on, method refs as timotimo says should be basic perl6 | 16:18 | ||
as in C++ STL | 16:19 | ||
jmerelo | holyghost: you can simply, if you use the correct syntax, store a callable that calls an object method in a container. But the whole pointer/reference thing does not exist in Perl 6 | ||
holyghost | jmerelo: by usinng @!dependencies ? | 16:21 | |
the above is simply offensive | |||
jmerelo | holyghost: not exactly. Let's just say you can do it. | ||
holyghost | that's a cored system AFAIK | 16:22 | |
anyway, I just wanted a hash of methods | |||
not an array :-| | 16:23 | ||
smalltalk uses a dictionary for class methods | 16:24 | ||
16:24
Itaipu left,
cydf joined
|
|||
holyghost | anyway, I'll have to redesign | 16:24 | |
16:24
Itaipu joined
16:25
p6bannerbot sets mode: +v cydf
|
|||
holyghost | jmerelo: with all due respect, AI::Agent::Agent is usable | 16:25 | |
not AI::Agent::HashedAgent | |||
16:25
p6bannerbot sets mode: +v Itaipu
|
|||
jmerelo | holyghost: I'm not saying otherwise | 16:25 | |
holyghost | np | 16:26 | |
jmerelo | What I'm saying is that it's costumary to have the main class in a module to have the same name as the module. | ||
holyghost | ok | ||
jmerelo | You have no AI::Agent actual class, nor an AI/Agent.pm6 file which includes documentation and somesuch | ||
Please not I'm not saying that it's usable either. Just that if you want to build a module, that's the usual thing. | 16:27 | ||
16:27
pmurias joined,
p6bannerbot sets mode: +v pmurias,
vike1 left
|
|||
holyghost | I will take a look at it tomorrow, it's 5:29 pm here, I've started coding since 3am | 16:27 | |
jmerelo | If people install an X::Y, they will want to do an use X::Y to use it, not an X::Y::Y (or whatever). | ||
pmurias | haukex: super cool :) | 16:28 | |
exit | |||
16:28
pmurias left
16:29
pmurias joined,
p6bannerbot sets mode: +v pmurias,
TimToady left,
TimToady joined,
tolkien.freenode.net sets mode: +v TimToady,
p6bannerbot sets mode: +v TimToady
|
|||
haukex | pmurias: oh, hi! Rakudo.js is super cool ;-) I just sent you an email a second ago | 16:30 | |
16:31
andrzejku left
|
|||
pmurias | haukex: I have heard of webperl recently, I was even thinking how interop between the too should work | 16:32 | |
jmerelo | Hi, TimToady :-) | 16:33 | |
haukex | pmurias: I already gave that a try :-) github.com/haukex/webperl/blob/mas...test6.html | ||
TimToady is officially back from vacation, but completely trashed due to helping SoCal family deal with wildfire evacuations (nothing of ours burnt down, thankfully), and now I get to breathe all the smoke in NorCal, so it's gonna be a while before I'm back in sync enough to act like a BDFL...and maybe that's a good thing :) | |||
yoleaux | 7 Nov 2018 12:07Z <Zoffix> TimToady: please respond to github.com/perl6/user-experience/issues/33 | ||
holyghost | TimToady: wb | 16:34 | |
jmerelo | TimToady: you've literally been in hell and back... | ||
haukex | pmurias: I'll be AFK for dinner now, hopefully back later | 16:35 | |
El_Che | TimToady: there priorities in life. It's good you know yours. I hope you and your family and friends are well. | ||
holyghost is AFK | |||
16:41
vike1 joined
16:42
p6bannerbot sets mode: +v vike1
|
|||
timotimo | haukex: oooh nice | 16:49 | |
so, can someone explain to me why this happens: | 16:50 | ||
m: class test { method a { say &self } }; test.a | |||
camelia | Nil | ||
timotimo | we generate an ifnull for the lexical &self, and if it's null we return Nil | 16:51 | |
16:51
zakharyas left
|
|||
timotimo | but for other names it doesn't do that | 16:51 | |
m: class test { method a { say &foobar } }; test.a | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: foobar used at line 1 |
||
timotimo | unsurprisingly | ||
greppable6: &self | |||
greppable6 | timotimo, Found nothing! | ||
16:52
reportable6 left,
reportable6 joined
|
|||
timotimo | i don't seem to find any mention of "&self" in the spec tests | 16:52 | |
16:52
p6bannerbot sets mode: +v reportable6
16:53
lucasb joined
16:54
p6bannerbot sets mode: +v lucasb
|
|||
SmokeMachine | m: my \bla = 1; say &bla | 16:55 | |
camelia | Nil | ||
SmokeMachine | timotimo: that's it? ^^ | ||
m: class test { method a(\foobar:) { say &foobar } }; test.a | 16:56 | ||
camelia | Nil | ||
holyghost | timotimo, jmerelo : $!done stays True while reloading HashedAgent.dispatch, so 2 tests do not fail | 16:57 | |
SmokeMachine | timotimo: isnt & "working" with any sigilless var? | ||
lizmat is glad to hear TimToady is ok | 16:58 | ||
timotimo | weird, because the lexical lookup is still for &bla in that case | 16:59 | |
pmurias | rakudo.js update: blogs.perl.org/users/pawel_murias/2...tests.html | 17:01 | |
timotimo | can't read that right now because the cat is expecting to get fed and is standing in front of my screen | 17:02 | |
pmurias: "exciting" instead of "exiting" in the last line :) | |||
pmurias++ | 17:03 | ||
lucasb | github.com/haukex/webperl/blob/mas...js#L31-L41 | ||
^^ Raku =^.^= | |||
17:05
scotticles joined
17:06
p6bannerbot sets mode: +v scotticles
|
|||
scotticles | currently looking at learning perl6, wanting to do some web stuff is Cro the best option to build on? | 17:06 | |
17:06
Itaipu left
|
|||
Geth_ | doc: a8a25c0e42 | Coke++ | doc/Type/Any.pod6 Statements need to end with ; |
17:06 | |
synopsebot_ | Link: doc.perl6.org/type/Any | ||
jmerelo | scotticles: probably. Best of luck, and come back here if you need help | ||
MasterDuke | scotticles: there's also #cro | 17:07 | |
timotimo | cro is pretty good, though it doesn't yet bring its own templating and such (there is something experimental in a repo called cro-webapp, though) | 17:08 | |
scotticles | ah ok, thanks, also is DBI still best to use the p5 include to handle databases or is there something for perl6 | ||
sena_kun | scotticles, it may be. but don't assume Cro is web-framework like django/dancer/etc, it is more of microsevice building tool(with nice modules built for HTTP), so things like database access and templating are not out of the box. | ||
timotimo | Db::Pg or what it's called if you have a postgres database | ||
otherwise DBIish will do what you need | |||
DBIish also does postgres | 17:09 | ||
but DB::Pg does it better | |||
jmerelo | scotticles: there's DBIish, which includes several databases, and they there's RED, an ORM by SmokeMachine which gives you a high-level interface | ||
scotticles | yeah i should use postgres for this project, its been on my todo list for a long time of learning it vs using mysql | ||
thanks this will get me going | |||
kensanata | I've been using Cro with Template::Mustache and that worked very well. | ||
17:10
Itaipu joined
17:11
sjoshi left,
finanalyst left,
p6bannerbot sets mode: +v Itaipu
|
|||
SmokeMachine | scotticles: if you'd like to use a ORM, I think Red is a good choose: github.com/FCO/Red | 17:11 | |
jmerelo | SmokeMachine: :-) see above ^^^ | 17:12 | |
SmokeMachine | jmerelo: I saw it! thanks! :) | ||
jmerelo | SmokeMachine++ | ||
scotticles | havn't considered an ORM , so used to writing sql. But i'll look into Red, might as well. | 17:13 | |
SmokeMachine | jmerelo: sorry being boring you.... but had you had time to see the current version of the post? | 17:14 | |
timotimo | i've got a project right now where i use cro + sqlite in the backend and react.js in the frontend | ||
the one thing i wish would be better is compile times whenever i update the component that currently has all the database queries in it | 17:15 | ||
i might build a middleware of some kind that lets me edit the queries in the browser and re-run if i don't like the results :D | |||
SmokeMachine | timotimo: why dont you try to use Red? | 17:16 | |
timotimo | because i mostly just pull stuff out of the DB and pass it on as json :) | ||
jmerelo | SmokeMachine: I have a deadline for a conference today, and I'm really busy with a couple of papers... Check out my GH activity. | ||
Plus classes... | |||
17:16
Itaipu left,
rindolf left
|
|||
timotimo | in the future i may even let sqlite generate the json directly in some cases | 17:16 | |
SmokeMachine | jmerelo: sorry... | 17:17 | |
timotimo | but i'd be interested to hear from you if you can see much benefit that RED could give based on my code | ||
i'll give you a link | |||
17:17
Itaipu joined
|
|||
SmokeMachine | timotimo: :) | 17:18 | |
timotimo | github.com/timo/moarperf/blob/mast...b.pm6#L123 - for example | ||
17:18
p6bannerbot sets mode: +v Itaipu
|
|||
pmurias | timotimo: thanks for spoting the typo ;) | 17:19 | |
SmokeMachine | timotimo: yes... I dont think Red can help you yet... but it will in the near future! :) | 17:20 | |
timotimo | wow, how? | 17:21 | |
SmokeMachine | timotimo: there are some of your queries that could be beneficied by Red... the simpler ones... | 17:24 | |
timotimo | right | 17:25 | |
do you happen to have any experience with sqlite and recursive queries? :) | |||
SmokeMachine | timotimo: for example: www.irccloud.com/pastebin/BqTbD7SO/ | ||
timotimo | actually, i'm done with that particular can of worms | 17:26 | |
and i won't revisit that any time soon :D | |||
SmokeMachine | timotimo: if calls where a Red model, could be written as: `Calls.^all.grep(*.id == $id).map: { .id, .parent, .routine }` | 17:27 | |
17:27
domidumont joined
|
|||
timotimo | does that build an efficient sql query? | 17:28 | |
SmokeMachine | yes, the same you wrote... | ||
17:28
p6bannerbot sets mode: +v domidumont
|
|||
timotimo | cool | 17:28 | |
gotta look at the implementation at some point :) | |||
17:29
sjoshi joined,
dakkar left,
p6bannerbot sets mode: +v sjoshi
17:30
scimon left
|
|||
SmokeMachine | timotimo: take a look at this sample: github.com/FCO/Red/wiki/Features-Sample | 17:30 | |
timotimo | does it break down if you have something like .map: { .id, (.parent if .id > 10), .routine }, too? | ||
SmokeMachine | timotimo: currently yes... | 17:31 | |
timotimo | then i have a clue how you might have implemented that :D | ||
SmokeMachine | :) | ||
timotimo: would you like to guess? | 17:32 | ||
timotimo | you first pass an "information collector" object to the block that map gets | 17:33 | |
to find out what columns are asked for | |||
SmokeMachine | that's it... | ||
timotimo | i might have done the same thing | ||
SmokeMachine | not only to .map... | ||
timotimo | right | ||
and you probably have implementations of &infix:<==> and friends, too | 17:34 | ||
SmokeMachine | timotimo: thats it! | ||
timotimo | you could even support user-provided infix operators with sql's custom functions :D | ||
SmokeMachine | timotimo: github.com/FCO/Red/blob/master/lib...rators.pm6 | ||
timotimo | but that reaches into "terribly clever" territory | 17:35 | |
SmokeMachine | timotimo: what do you mean with "terribly clever"? | 17:36 | |
timotimo: I have a lot to do with Red yet... but i think its going to become very good to use... | 17:37 | ||
timotimo | are you considering exhaustively mapping the decision states of such grep and map functions? since you already know all comparisons and computations that happen | 17:39 | |
tobs` | Can I tell List.reduce to be "right-associative" somehow? As in I want <a b c>.reduce(&f) to compute f(a, f(b, c)) instead of f(f(a, b), c). | ||
timotimo | m: say &infix:<**>.assoc | ||
camelia | No such method 'assoc' for invocant of type 'Sub+{is-pure}+{Precedence}' in block <unit> at <tmp> line 1 |
||
jmerelo | tobs`: using reverse? | ||
timotimo | m: say &infix:<**>.^assoc | ||
camelia | No such method 'assoc' for invocant of type 'Perl6::Metamodel::ClassHOW' in block <unit> at <tmp> line 1 |
||
timotimo | how does assoc, hmm. | ||
m: say &infix:<**>.^methods | |||
camelia | (prec is-pure soft <anon> yada <anon> <anon> <anon> perl <anon> wrap <anon> <anon> <anon> <anon> <anon> onlystar multi <anon> <anon> gist leave package <anon> <anon> cando candidates <anon> unwrap <anon> BUILDALL set_why <anon> has-phasers fire_phaser… | ||
timotimo | m: say &infix:<**>.prec | ||
camelia | {assoc => right, prec => w=} | ||
timotimo | ah, of course | 17:40 | |
SmokeMachine | timotimo: sorry, I didnt understand... what? | ||
timotimo | m: sub f($a, $b) is assoc<right> { say "<$a, $b>"; $a ~ $b }; <a b c d>.reduce(&f) | ||
camelia | <c, d> <b, cd> <a, bcd> |
||
timotimo | tobs`: is that it? | ||
SmokeMachine: in my example with .parent if .id > 10 | 17:41 | ||
jmerelo | timotimo: cool | ||
timotimo | you could hook it up to return true the first and false the second time | ||
tobs` | heh, cool timotimo++ | ||
timotimo | that way it would find that sometimes .parent can be found | ||
SmokeMachine | timotimo: I dont know how to solve that yet... but I was thinking in a slang... | ||
timotimo: currently I only run it once... | 17:42 | ||
tobs` | jmerelo: good thought, but my f is not commutative, so it'd be a double reverse List.reverse.reduce({ f($^b, $^a) }) | ||
SmokeMachine | but I think thats a good idea... | ||
tobs` | m: <a b c d>.reverse.reduce({ $^b ~ $^a }).say | 17:43 | |
camelia | abcd | ||
tobs` | m: <a b c d>.reverse.reduce({ say $^b ~ $^a }) | ||
camelia | cd bTrue aTrue |
||
timotimo | m: <a b c d>.reverse.reduce( &[R~] ) | ||
camelia | ( no output ) | ||
timotimo | m: <a b c d>.reverse.reduce( &[R~] ).say | ||
camelia | abcd | ||
timotimo | m: <a b c d>.reverse.reduce( [R~] ).say | ||
camelia | Cannot resolve caller reduce(Seq: Str); none of these signatures match: (Any:U: &, *%_ --> Nil) (Any:D: &with, *%_) in block <unit> at <tmp> line 1 |
||
timotimo | m: <a b c d>.reverse.reduce( &[~] ).say | ||
camelia | dcba | ||
SmokeMachine | timotimo: but had you liked how Red is writen? | 17:44 | |
timotimo | reversing operators is built-in to perl6 :) ): | ||
:) :) | |||
SmokeMachine: have not looked deep enough, but i think it's cool | |||
obviously that might change if i encounter some problems with that approach in real-life usage | |||
SmokeMachine | :) | 17:45 | |
timotimo: Now I see! i can get that .id.Bool was called and call the clousure again... | 17:54 | ||
17:56
kurahaupo_ joined
|
|||
timotimo | well, really the result of .id > 10 will have .Bool called on it, but yeah, that's exactly it | 17:57 | |
17:57
p6bannerbot sets mode: +v kurahaupo_,
kurahaupo left
17:58
kurahaupo_ left,
rindolf joined,
kurahaupo joined
17:59
p6bannerbot sets mode: +v rindolf,
p6bannerbot sets mode: +v kurahaupo
18:02
robertle left
18:05
haukex left
|
|||
jmerelo | 6 days without a Perl 6 question in StackOverflow... stackoverflow.com/questions/tagged/perl6 | 18:09 | |
I should start again the campaign to (also) ask your questions in SO... | |||
18:09
haukex joined
18:10
p6bannerbot sets mode: +v haukex
|
|||
SmokeMachine | timotimo: yes... the result is a Red::AST... so... | 18:10 | |
jmerelo: maybe it means that the docs are getting "too" good... :P | 18:11 | ||
jmerelo | SmokeMachine: he. I wish | ||
SmokeMachine | just joking... | 18:12 | |
18:13
kurahaupo left
|
|||
tobs` | m: use Test; is-deeply set(1, |set(1)), Set(1, |Set(1)) | 18:13 | |
camelia | not ok 1 - # Failed test at <tmp> line 1 # expected: Set.new(1) # got: Set.new(1 => Bool::True,1) |
||
18:13
kurahaupo joined
|
|||
lizmat | m: dd (1,2).Set.Slip | 18:13 | |
camelia | slip(2 => Bool::True, 1 => Bool::True) | ||
18:14
p6bannerbot sets mode: +v kurahaupo
|
|||
lizmat | m: dd Set(1).Slip | 18:14 | |
camelia | slip(1 => Bool::True,) | ||
lizmat | m: dd set(1).Slip | 18:15 | |
camelia | slip(1 => Bool::True,) | ||
tobs` | m: dd Set.new(1, |Set.new(1)) | ||
camelia | Set.new(1 => Bool::True,1) | ||
tobs` | m: dd Set(1, |Set(1)) | ||
camelia | Set.new(1) | ||
18:15
kurahaupo left
18:16
kurahaupo joined
|
|||
tobs` | so, the documentation is correct in saying set() is just Set.new(), but I don't understand the different behaviour with slip | 18:16 | |
lizmat | m: dd Set(1).Slip | ||
camelia | slip(1 => Bool::True,) | ||
18:16
kurahaupo left,
kurahaupo joined
|
|||
lizmat | ah, I think I know what it is | 18:16 | |
m: dd (1 => True).Set | |||
camelia | Set.new(1) | ||
18:17
p6bannerbot sets mode: +v kurahaupo
|
|||
lizmat | m: dd Set.new(1, 1=> True) | 18:18 | |
camelia | Set.new(1 => Bool::True,1) | ||
lizmat | Set.new attempts to be smart on how it setifies its parameters | ||
m: dd Set.new(1, 2 1=> True) | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse expression in argument list; couldn't find final ')' (corresponding starter was at line 1) at <tmp>:1 ------> 3dd Set.new(1, 27⏏5 1=> True) expecting any of: in… |
||
lizmat | m: dd Set.new(1, 2, 1=> True) | ||
camelia | Set.new(1,2,1 => Bool::True) | ||
lizmat | actually, set() is | ||
m: dd set(1, 2, 1=> True) | |||
camelia | Set.new(1,1 => Bool::True,2) | ||
lizmat | hmmm | 18:19 | |
tobs` | you mean Set() is? | ||
lizmat | ok, clearly I'm too dim atm | ||
tobs` | m: dd Set(1, 2, 1 => True) | ||
camelia | Set.new(2,1) | ||
lizmat | right, that one | ||
m: dd Set(1, 2, 3, 1 => True) | |||
camelia | Set.new(3,2,1) | ||
lizmat | m: dd Set(2, 3, 1 => False) | 18:20 | |
camelia | Set.new(3,2) | ||
lizmat | m: dd Set(2, 3, 1 => True) | ||
camelia | Set.new(1,3,2) | ||
lizmat goes back to working on the P6W | |||
tobs` | thanks lizmat | ||
18:20
holyghost left
|
|||
tobs` | it's even right there in the documentation of the Set() routine ._. | 18:21 | |
18:21
holyghost joined,
scotticles left
|
|||
tobs` | when you think you found an undocumented corner case... | 18:21 | |
18:22
p6bannerbot sets mode: +v holyghost,
Itaipu left
18:23
Itaipu joined
18:24
p6bannerbot sets mode: +v Itaipu,
sauvin left
18:28
lucasb left
18:29
damaxi joined
18:30
p6bannerbot sets mode: +v damaxi
18:35
Itaipu left,
Itaipu joined
18:36
p6bannerbot sets mode: +v Itaipu
18:37
kdr23 joined
18:38
p6bannerbot sets mode: +v kdr23
18:39
Itaipu left
18:40
kdr22 left
18:41
Itaipu joined,
p6bannerbot sets mode: +v Itaipu
18:45
damaxi is now known as andrzejku
18:51
Itaipu left
18:55
noganex_ left
18:56
noganex joined
18:57
haukex left,
p6bannerbot sets mode: +v noganex
18:58
ryn1x joined
18:59
p6bannerbot sets mode: +v ryn1x,
ryn1x left
19:00
ryn1x joined
19:01
p6bannerbot sets mode: +v ryn1x
19:14
tobs` left
19:26
Mithaldu left
19:27
Mithaldu joined,
kensanata left
19:28
p6bannerbot sets mode: +v Mithaldu
19:36
ryn1x left
19:37
molaf joined
19:38
p6bannerbot sets mode: +v molaf
19:41
domidumont left
19:43
natrys joined
19:44
p6bannerbot sets mode: +v natrys
19:49
pmurias left
20:04
sjoshi left
20:17
jmerelo left
20:18
yqt left
|
|||
SmokeMachine | why is ACCEPTS the oposite? I men: | 20:22 | |
m: my $a = 42 but role :: { method ACCEPTS(|c) { say "called { c }"; True } }; given $a { when "b" {}} | |||
camelia | ( no output ) | ||
SmokeMachine | m: my $a = 42 but role :: { method ACCEPTS(|c) { say "called { c }"; True } }; given "b" { when $a {}} | ||
camelia | called b | ||
SmokeMachine | that means: if I want to do something when my object is used on a given/when, I cant... I have to change every other class to insert another ACCEPTS candidate (ok, I can only change Any...) | 20:24 | |
tobs | SmokeMachine: in a given-when, you're trying to see if the topic falls into any of the when categories, via smartmatch | 20:25 | |
gfldex | m: my $a = 42 but role :: { method ACCEPTS(|c) { say "called { c }"; True } }; $_ = "b"; when $a {} | ||
camelia | called b | ||
tobs | I think it makes sense to ask the *categories* if they accept the topic | ||
I mean, that's not an explanation, but evidence that it makes sense to some :) | 20:26 | ||
SmokeMachine | the gfldex makes sense... | ||
but it makes more dificult what I want to do... :( | 20:27 | ||
gfldex | this is the rare case where i make sense :) | ||
SmokeMachine: what do you want to do? | |||
SmokeMachine | tobs: that makes sense... | 20:28 | |
gfldex: try to find whats happening inside a Callable... | 20:29 | ||
gfldex: as I was talking with timotimo (colabti.org/irclogger/irclogger_lo...-12#l1102) but I was thinking how I could do that for given/when... | 20:31 | ||
m: use MONKEY-TYPING; role R {}; augment class Any { multi method ACCEPTS(R $a) { say "called {self} $a"; True } }; Any.^compose; given R.new { when "b" {}} # :( | 20:37 | ||
camelia | ( no output ) | ||
masak | moritz: does writing/modifying grammars ever stop feeling like an exercise in Spooky Action at a Distance? | 20:42 | |
(asking for a friend, who just busted his grammar *again*) | |||
good news: my anonymous friend just found the problem -- it was a stray bit of whitespace in a `rule` | 20:47 | ||
jnthn | masak: I'm not moritz, but I dunno if I ever really felt like that... :) | 20:50 | |
20:50
Sound joined,
p6bannerbot sets mode: +v Sound,
kst joined
20:51
p6bannerbot sets mode: +v kst
|
|||
jnthn | masak: I mean, sure, a change I do might regress a test I wasn't expecting it to at some point along the way, but it doesn't spook me more than that happening in non-grammar code would :) | 20:51 | |
20:54
newbie23 left
20:55
newbie23 joined,
p6bannerbot sets mode: +v newbie23
21:10
rindolf left
21:16
rindolf joined
21:17
p6bannerbot sets mode: +v rindolf
|
|||
moritz | masak: kinda, yes | 21:18 | |
SmokeMachine | where CX::Next is handled? | 21:23 | |
better question: how can I create a sub that accepts next? | 21:25 | ||
is that possible? | 21:34 | ||
moritz | m: sub f(&g) { g(); CONTROL { when CX::Next { say "next caught" } } }; f sub { next } | 21:36 | |
camelia | next caught | ||
moritz | SmokeMachine: ^^ like that? | ||
SmokeMachine | moritz: thanks! I didnt know CONTROL... I was trying with CATCH! | ||
moritz | SmokeMachine: my pleasure | 21:37 | |
SmokeMachine | CX::Next isnt resumable? | 21:39 | |
is there a way to resume it? | |||
moritz | m: sub f(&g) { g(); CONTROL { when CX::Next { say "next caught"; .resume } } }; f sub { next; say "after next" } | ||
camelia | next caught This exception is not resumable in block at <tmp> line 1 in sub at <tmp> line 1 in sub f at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
21:44
kensanata joined,
p6bannerbot sets mode: +v kensanata
|
|||
kensanata | Quick question before I go to bed. I just finished building rakudo star 2018.10. Strangely, 2018.6 ended up as "/home/alex/rakudo/install/bin//perl6" according to "which perl6" and I can find 2018.10 as "rakudo/bin/perl6" -- how did this happen? Did I miss a step somewhere or was the default changed? | 21:47 | |
kensanata changes ~/.bashrc and stops wondering | 21:48 | ||
gfldex | lizmat: have you considered to write a how-has-Perl 6-grown-in-the-last-12-months-post for the advent calendar? | 21:49 | |
kensanata cries as all the zef stuff breaks... | |||
gfldex | lizmat: I'm asking because I need the numbers of new modules until xmass 2018 for a post I might write. :) | 21:50 | |
21:51
dct joined,
p6bannerbot sets mode: +v dct
|
|||
lizmat | gfldex:I haven't :-) | 21:51 | |
gfldex | lizmat: please tell me when you reconsider | ||
lizmat | I will | 21:52 | |
sena_kun | I am thinking about writing a post, but I have never made one(except literature, but that's another deal) and cannot really think of topic. I know stuff about Cro, a lot about Comma and am building some ASN.1 library right now. I wonder if something can hit the bar. | 21:56 | |
ugh, s/hit the bar/be useful and meaningful enough/ | 21:59 | ||
SmokeMachine | Oh! talking about Comma! jnthn, sena_kun I am mentioning Comma on my perl6 advent calendar post, is it OK? Not finished yet, but if you want to know how/why its being mentioned: gist.github.com/FCO/33be94f5ecfab7...etsanta-md (if you'd like to comment too, that OK :) ) | 22:00 | |
*that's OK | 22:01 | ||
lizmat | and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2018/11/12/...st-diwali/ | 22:02 | |
sena_kun | not sure about jnthn, but you have my Seal of Approval. :) Don't see any harm in such mention. | ||
lizmat | moritz: p6weekly.wordpress.com/2018/11/12/...st-diwali/ | 22:03 | |
notable6: weekly reset | |||
notable6 | lizmat, Moved existing notes to “weekly_2018-11-12T22:03:38Z” | ||
timotimo | \o/ | 22:08 | |
lizmat++ | |||
22:08
kensanata left
|
|||
sena_kun | lizmat++ | 22:08 | |
timotimo | lizmat: did last squashathon's winner get a prize? | 22:09 | |
22:10
leont joined
|
|||
lizmat | well, I know the nick of the winner | 22:11 | |
I don't have an address yet to send Camelia to | |||
22:11
p6bannerbot sets mode: +v leont
|
|||
moritz | lizmat++ | 22:14 | |
22:14
newbie23 left
22:15
newbie joined
22:16
p6bannerbot sets mode: +v newbie
|
|||
jdv79 | lizmat: did you do anything on the one arg rule/itemization/etc... in your articles? | 22:16 | |
22:16
dct left
|
|||
jdv79 | i don't see it | 22:16 | |
and do you plan to? | |||
lizmat | you mean the opensource.com articles ? | ||
jdv79 | yeah. i thought there'd be a bit in the containers artile but i don't see it | ||
22:17
newbie left
22:18
newbie joined
22:19
p6bannerbot sets mode: +v newbie,
andrzejku left
|
|||
lizmat | it's not really about containers, but about signatures / parameters | 22:19 | |
jdv79 | cool p6w though. its getting quite long. | ||
lizmat | tell me about it | ||
jdv79 | yeah, that's true. | ||
lizmat goes off for some R&R | |||
22:19
newbie left
22:20
newbie joined,
p6bannerbot sets mode: +v newbie
22:30
sena_kun left
|
|||
jnthn | SmokeMachine: Yeah, find by me, though we don't tend to write it fully capitalized (e.g. just Comma). It's named after a type of butterfly, rather than being an acronym. :) | 22:33 | |
*fine by me | |||
SmokeMachine | jnthn: fixing it... | ||
22:52
ryn1x joined,
p6bannerbot sets mode: +v ryn1x
23:02
lucasb joined,
natrys left,
p6bannerbot sets mode: +v lucasb
23:05
comborico1611 joined
23:06
p6bannerbot sets mode: +v comborico1611,
ryn1x left
23:08
rindolf left
23:11
ryn1x joined
23:12
p6bannerbot sets mode: +v ryn1x
23:16
pecastro left
23:19
Sound left
23:30
jast left
|
|||
lucasb | so, 'my Foo @a' is an Array that does Positional[Foo], right? | 23:38 | |
23:38
jast joined
|
|||
lucasb | and 'my Foo %h' is a Hash that does Associative[Foo], ok? :) | 23:38 | |
but... | 23:39 | ||
23:39
p6bannerbot sets mode: +v jast
|
|||
lucasb | 'my Foo $x' isn't a Scalar that does Itemable[Foo] | 23:39 | |
Scalar is a class. I mean "Itemable" for whatever the "missing" role was supposed to be named :) | 23:40 | ||
IOW, did this design lost an opportunity to have some symmetry between Scalars, Positionals and Associatives? | |||
it shows in this case: | 23:41 | ||
m: constant Foo = 42; my Foo @x # ok, error, nonsense code | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Can not parameterize Array with 42 at <tmp>:1 ------> 032; my Foo @x # ok, error, nonsense code7⏏5<EOL> expecting any of: constraint |
||
lucasb | m: constant Foo = 42; my Foo $x | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable definition of type Int (implicit : by pragma) requires an initializer at <tmp>:1 ------> 3constant Foo = 42; my Foo $x7⏏5<EOL> expecting any of: constraint |
||
23:42
ryn1x left
|
|||
lucasb | if a Scalar was a parameterizable Itemable[::T], then it would have the same error as arrays, "Cannot parameterize Scalar with 42" | 23:43 | |
23:46
comborico1611 left
|
|||
lucasb | "constant Foo = 42; my Foo $x" doesn't make sense, but let's follow what the error message says. it requires an initializer, so let's give it one: | 23:51 | |
m: constant Foo = 42; my Foo $x = Any | |||
camelia | Type check failed in assignment to $x; expected Int but got Any (Any) in block <unit> at <tmp> line 1 |
||
lucasb | expects Int... | ||
m: constant Foo = 42; my Foo $x = Int | |||
camelia | Type check failed in assignment to $x; expected 42 but got Int in block <unit> at <tmp> line 1 |
||
lucasb | ok, it changed its mind, wants 42 now :) | 23:52 | |
m: constant Foo = 42; my Foo $x = 42 | |||
camelia | Type check failed in assignment to $x; expected type 42 cannot be itself (perhaps Nil was assigned to a :D which had no default?) in block <unit> at <tmp> line 1 |
||
lucasb | m: constant Foo = 42; my Foo $x = 21+21 | ||
camelia | Type check failed in assignment to $x; expected 42 but got 42 in block <unit> at <tmp> line 1 |
||
23:57
lucasb left
23:59
Pllll joined,
p6bannerbot sets mode: +v Pllll
|