»ö« 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.
MasterDuke lucs: should be if you run as ./perl6 there. otherwise you might need make install also 00:00
lucs 'make install' seems appropriate, yeah. 00:01
Xliff m: my role A { method bless { say "hi"; nextsame; }; method a { say "Role"; }; }; class B does A { method a { say "Class"; }; }; my $a = B.new but role { method a { self.B::a }; }; 00:04
evalable6 hi
Xliff m: my role A { method bless { say "hi"; callsame; }; method a { say "Role"; }; }; class B does A { method a { say "Class"; }; }; my $a = B.new but role { method a { self.B::a }; };
evalable6 hi
lucs MasterDuke: Looking good, thanks. 00:05
MasterDuke np
Xliff m: my role A { method bless { say "hi"; my $o = self.CREATE.BUILDALL(Empty, %attrinit); $o; }; method a { say "Role"; }; }; class B does A { method a { say "Class"; }; }; my $a = B.new but role { method a { self.B::a }; }; 00:06
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/LihXMND_9H
Variabl…
Xliff, Full output: gist.github.com/b8b8a37f49b9347932...e7e24ab336
Xliff m: my role A { method bless(*%attrinit) { say "hi"; my $o = self.CREATE.BUILDALL(Empty, %attrinit); $o; }; method a { say "Role"; }; }; class B does A { method a { say "Class"; }; }; my $a = B.new but role { method a { self.B::a }; };
evalable6 hi
Xliff m: my role A { method a { say "Role"; }; }; class B does A { method a { say "Class"; }; }; my $a = B.new but role { method a { self.B::a }; }; 00:07
evalable6
Xliff m: my role A { method bless { say "hi"; my $o = self.CREATE.BUILDALL(Empty, %attrinit); $o; }; method a { say "Role"; }; }; class B does A { method a { say "Class"; }; }; my $a = B.new but role { method a { self.B::a }; }; $a.a
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/Tfr3h0czeB
Variabl…
Xliff, Full output: gist.github.com/48e6a575606d1b35d6...4453ae13d4
Xliff m: my role A { method bless(*%attrinit) { say "hi"; my $o = self.CREATE.BUILDALL(Empty, %attrinit); $o; }; method a { say "Role"; }; }; class B does A { method a { say "Class"; }; }; my $a = B.new but role { method a { self.B::a }; }; $a.a
evalable6 hi
Class
00:08
Xliff /o\
m: my role A { method bless(*%attrinit) { say self.^name; my $o = self.CREATE.BUILDALL(Empty, %attrinit); $o; }; method a { say "Role"; }; }; class B does A { method a { say "Class"; }; }; my $a = B.new but role { method a { self.B::a }; }; class C is B { }; C.new.a 00:10
evalable6 B
C
Class
Xliff m: my role A { method bless(*%attrinit) { my $c = $++; say "{ $c }: { self.^name }"; my $o = self.CREATE.BUILDALL(Empty, %attrinit); $o; }; method a { say "Role"; }; }; class B does A { method a { say "Class"; }; }; my $a = B.new but role { method a { self.B::a }; }; class C is B { }; C.new.a 00:11
evalable6 0: B
1: C
Class
Xliff Yep. Still need macros. 00:13
00:15 patrickb left 00:24 Actualeyes left 00:38 zachk left 00:39 fatguy left 00:41 kurahaupo joined 00:47 Manifest0 left 00:54 Manifest0 joined, w_richard_w joined 00:55 Celelibi_ joined, Celelibi left
Juerd MasterDuke: Yes, I keep trying the same thing over and over indeed (mqtt regex test) 00:55
00:56 yurii joined
Juerd MasterDuke: Hoping at some point it'll magically be fast :) 00:56
00:56 Celelibi_ is now known as Celelibi, simcop2387_ joined 00:57 cibs_ joined 00:58 broquain1 joined 01:01 exodist_ joined 01:02 reu_ joined, yuriii left, reu left, ribasushi left, Exodist left, broquaint left, simcop2387 left, cibs left, exodist_ is now known as Exodist, simcop2387_ is now known as simcop2387 01:06 ribasushi joined 01:07 MasterDuke left 01:09 MasterDuke joined, MasterDuke left, MasterDuke joined
MasterDuke Juerd: any rought idea of when it most recently got slower? 01:09
*rough
01:20 mowcat left 01:36 zacts left 01:37 Manifest0 left
Juerd MasterDuke: Not really. I haven't tried in a while 01:43
01:45 Manifest0 joined 01:46 netrino left
MasterDuke Juerd: github.com/rakudo/rakudo/commit/1c...fba874a8cd 01:47
on AlexDaniel++'s server, 5s before, >7.5s after
Juerd: github.com/rakudo/rakudo/issues/2849 01:52
AlexDaniel kawaii: by the way, please bother MasterDuke if you need help with whateverables :) 01:55
as I won't be here this weekend
Juerd MasterDuke: Wow, you found that quickly! :) 01:59
AlexDaniel Juerd: pssst, the bot did all the work
MasterDuke "luckily" it was a big enough performance difference that it was relatively straightforward to bisect 02:01
AlexDaniel yeah, if someone wants to break something, please break it good :)
02:03 Manifest0 left
Juerd lol 02:04
In any case, thanks for looking into it and creating the report :)
02:04 Manifest0 joined
MasterDuke np 02:10
02:14 zacts joined 02:31 random_yanek left 02:33 random_yanek joined, random_yanek left 02:35 random_yanek joined 02:38 zacts left, alnk_ joined 02:39 ctilmes_ left, alnk left 02:41 alnk_ is now known as alnk 02:45 ctilmes_ joined
guifa <3 buts 02:49
02:51 ctilmes_ left 03:04 adu left
guifa The framework I’m working on says developers should be able to pass a DateTime, but potentially could pass some formatting arguments but together with the DateTime. They end up having to create an shell class to encapsulate both the DateTime and the format 03:04
Perl6 solution? $date but with-args( week => ‘long’, … ) 03:05
03:06 Cabanoss- left
guifa with-args calls a sub that returns a formatting class that can be matched with ~~ DateTimeFormatter, but everything else ignores it 03:06
MasterDuke yeah, just tacking stuff onto an existing thing can be fun 03:08
03:12 Cabanossi joined
guifa I mean that’s fun but the cleanliness of it is really nice 03:17
Cf the Javascript
ctx.format('today', {day: Intl.MessageDateTimeArgument(new Date(), {weekday: 'long'})})
localized(‘today’, :day(DateTime.now but with-args(:weekday<long>))) 03:18
03:24 Xliff left 03:26 zacts joined 04:18 sloob left
AndroidKitKat arrays in perl6 arent printed with commas like they are in python, are they? 04:18
kybr
04:18 kurahaupo is now known as HermionyKrabb 04:19 HermionyKrabb is now known as kurahaupo 04:24 Manifest0 left 04:30 Manifest0 joined 04:57 Manifest0 left 05:02 Manifest0 joined 05:14 domidumont joined 05:19 Manifest0 left 05:26 Manifest0 joined 05:27 eseyman joined
tyil AndroidKitKat: you mean if you'd do something like `say @array`? 05:30
m: my @foo = < a b c d e >; say @foo; 05:31
evalable6 [a b c d e]
05:35 sauvin joined 05:51 yurii left 05:54 w_richard_w left 06:04 dakkar joined
guifa AndroidKitKa Also, if you really wanted to, you could override the Array’s .gist method so they’d print with commas. But not generally advised 06:15
kurahaupo It's been a long time since I hung out here, but isn't there a .code method to get something that should be re-runnable? 06:17
m: my @array = < v w x y z >; @array.code.say
evalable6 (exit code 1) No such method 'code' for invocant of type 'Array'. Did you mean any of these?
clone
codes
comb
conj

in block <unit> at /tmp/TDG6ZDegHJ line 1
guifa what do you mean by re-runnable? 06:18
do you mean map?
kurahaupo compilable source code
guifa ah like
kurahaupo (For people who want commas in their lists) 06:19
guifa: do you have a suggestion?
I would try some stuff until I found a workable version, but evalable6 doesn't like to converse by pm 06:20
06:21 w_richard_w joined
guifa p6: use MONKEY-TYPING; augment class Array { method gist(::?CLASS:D:) { '[' ~ self[*].join(', ') ~ ']' } }; my @a = 1..25; say @a; 06:24
evalable6 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]
guifa That outputs every single item, but you might want to set a cap, and possibly show an ellipsis (just change the code in the gist method)
06:25 Possum left, Possum joined, cpan-p6 left 06:26 cpan-p6 joined, cpan-p6 left, cpan-p6 joined
guifa That just overrides the .gist (for .say), but doesn’t override the string coercion method, but you can adjust that as well by adding a method Str { … } in that augment. But by aware that you lose the ability to have precompiled code in general when using monkey typing 06:26
06:33 jmerelo joined 06:49 domidumont left 06:51 ufobat__ joined 06:54 Xliff joined
Xliff \o 06:54
06:55 ufobat_ left
AlexDaniel r: say 42 06:55
perlbot AlexDaniel: 42␤
AlexDaniel kurahaupo: you can use perlbot too
06:56 sena_kun joined 06:57 sena_kun left 07:01 domidumont joined
Xliff Are there any docs on NativeCall's Pointer class? 07:05
07:05 Manifest0 left
Xliff No. The NativeCall page is not that document. I've looked. 07:05
There are references to Pointer.new, but the arguments to that method are not documented. 07:06
Geth doc: 10db477454 | (JJ Merelo)++ | doc/Type/CallFrame.pod6
Reflow, eliminates `level`

And some general cleanup as an initiation for #2719
07:09
synopsebot Link: doc.perl6.org/type/CallFrame
jmerelo Xliff: please add an issue 07:10
07:12 Manifest0 joined
Xliff jmerelo: OK. 07:15
Is it possible to assign a value to self in BUILD?
Oh... wait... overthinking 07:16
masak m: class C { has $!a; submethod BUILD { $!a = "OH HAI" }; method foo { say $.a } }; C.new.foo 07:23
evalable6 (exit code 1) No such method 'a' for invocant of type 'C'
in method foo at /tmp/NHS08zl7IR line 1
in block <unit> at /tmp/NHS08zl7IR line 1
masak oh, right 07:24
m: class C { has $!a; submethod BUILD { $!a = "OH HAI" }; method foo { say $!a } }; C.new.foo
evalable6 OH HAI
masak Xliff: yes, possible :)
07:24 rindolf joined
Geth doc: 098a505f83 | (JJ Merelo)++ | doc/Type/CallFrame.pod6
Reflow and adapts definitions, refs #2719
07:25
synopsebot Link: doc.perl6.org/type/CallFrame
jmerelo Monthly questions in StackOverflow with the perl tag: data.stackexchange.com/stackoverfl...0977#graph 07:32
Wait, that's not what I wanted, but I'm not sure about how to save a query... 07:34
Anyway, baseline is it's been declining since 2013 and is now at 1/3 of its peak, ~ 300 questions month. Same query on Ruby looks pretty much the same, but peak was in 2015 and is now ~1000 questions/month 07:35
07:36 zacts left
jmerelo perl6 has been (very) slowly increasing to ~ 30 questions/month. There have been as many questions on Perl 6 ever as Ruby gets in a month or Perl in 3 months. 07:36
As a consolation, emerging languages such as Idris or Agda have about half the questions perl6 has :-) 07:37
tobs m: say <a b c d e>.perl # kurahaupo: .code was close 07:44
evalable6 ("a", "b", "c", "d", "e")
07:45 Xliff left 07:51 patrickb joined 07:52 zakharyas joined 08:03 ravenousmoose_ joined 08:05 ravenousmoose left
kawaii morning o/ 08:05
jmerelo: perhaps I should ask all my questions on stackoverflow from now on instead of here, to boost the numbers ;) 08:07
jmerelo kawaii: you can do both :-)
kawaii: questions and answers are better indexed in SO, as a matter of fact. It's almost impossible to get an answer straight out of the IRC logs. 08:08
08:08 wahnwitz joined
wahnwitz hello again :) I have a problem with DB::Pg .. when calling an database action the psql server runs out of connection 08:13
relevant code is here: pastebin.com/TkSK5igv
jmerelo wahnwitz: why are you connecting every time you do a query? Use $pg as an instance variable, and reuse it every tine you do an addDomain 08:14
wahnwitz: you are opening lots of connections and not closing them; you probably need only one. Plus you are doing it using race, theoretically in parallel... 08:15
wahnwitz i see 08:16
08:16 zacts joined
jmerelo wahnwitz: even if you are doing it concurrently, a database should be able to handle concurrent connections. 08:17
wahnwitz mhm.. ok i can open an connection on "new" and use this connector as an argument?
yes it can but backlock is full after a while :)
jmerelo wahnwitz: you are also accessing $db concurrently (via race). Two threads might be fighting for it. 08:18
wahnwitz: right, using a single connection is probably better 08:19
wahnwitz ahh, yes...i was trying to reduce concurrency with batch=>1 assuming there is concurrency in this loop :D 08:20
jmerelo If you want to do it as fast as possible, use channels. Make the loop write to a channel and "start" several threads, every one with their own connection.
wahnwitz: IO.lines is not concurrent. race is.
I don't think race is giving you anything here. But if you eliminate it you're going to get too many connections anyway since you're opening one every line of the file. 08:22
wahnwitz yes
so i would call "connect" together with a new like here? docs.perl6.org/language/objects#Cl...ce_methods 08:23
jmerelo baseline is: too many connections can be eliminated by reusing a single connection. If you want concurrency, you have to redesign the program using a channel and concurrent routines using "start".
wahnwitz i would prefer a single connection for now :D 08:24
jmerelo wahnwitz: like in the pizza example, yes. $!connect would be an instance variable. You would create a single instance of that.
wahnwitz: you might want to consider also Red, the ORM in perl6. In the long run, it's going to save you a lot of SQL writing...
wahnwitz need to learn the basics first ;) 08:26
jmerelo wahnwitz: sure :-)
wahnwitz i dont dig it.. $connect would be a "connector" (in old perlish) so it would the return value from my connect function 08:31
thi swould be $c = Database.new.connect(); .. the second call then $ret = $c.addDomain($c, "sdsad"); .. 08:34
jmerelo wahnwitz: right
wahnwitz my $db = Database.new.connect; Database.addDomain($db, $_, $tld, $id); mhm... 08:41
jmerelo wahnwitz: you don't need to use a class method (Database.addDomain). You don't even need to use $db as an external variable or object. The connection can be an instance variable. 08:42
wahnwitz: above, it would be $db.addDomain( $_, $tld, $id) rather. addDomain is a method of the $db object.
wahnwitz yes 08:43
08:43 eliasr joined 08:45 aborazmeh joined, aborazmeh left, aborazmeh joined
masak I'm trying to make my (007) test suite platform-independent. what would you folks use instead of shelling out to `diff` and `md5sum`? 08:47
jmerelo masak: I wouldn't? 08:48
masak I found github.com/cosimo/perl6-digest-md5 already, so maybe the `md5sum` part is answered already
jmerelo: yes, but. I need to diff and md5sum things :) 08:49
at least I'm pretty sure I do
jmerelo masak: there's no perl6 diff?
masak: so you get to have at least perl6, right?
08:49 zacts left
masak yes 08:49
I found two modules that return an integer distance between strings 08:50
but the neat thing I get from `diff` the command is that it tells me about the string differences
jmerelo masak: can you have git? It can give you a pretty good diff.
masak hmm
I'd need to at least `git add` things that I don't want to keep -- it feels a bit invasive
08:51 w_richard_w left
jmerelo masak: you can create a repo in /tmp... or you can use porcelain 08:51
masak: I mean, plumbing.
masak it feels somehow like I'm building a bigger `git` Jenga tower where my small `diff` Jenga tower used to stand
jmerelo masak: there's git diff-files 08:52
timotimo masak: i often use git diff --no-index
masak hm, I guess I could port metacpan.org/pod/Algorithm::Diff to Perl 6...
jmerelo masak: that would definitely be nice.
timotimo i mean, we do have Algorithm::Diff on modules.p6.o 08:53
08:53 vrurg left
masak oh, how about that 08:53
no, license, though 08:54
no license*
timotimo ah, damn
jmerelo masak: you can also use git diff --color-words outside a repo. For some reason.
stackoverflow.com/questions/563731...repository 08:55
masak: as timotimo says, --no-index works too
patrickb masak: You could ask takadonet for a license. It's presumably not his intention to keep the module license-less. 09:00
09:03 ravenousmoose_ left 09:11 Manifest0 left
kawaii So something has been playing on my mind for a few days now 09:15
the pronunciation of 'sake'? (i.e. sakefile)
09:16 Manifest0 joined
jmerelo kawaii: if it's like the drink, I think it's closer to shah-kéh 09:20
kawaii Yes that's what I was hoping for 09:21
perhaps AlexDaniel can put my mind at ease
09:34 ravenousmoose_ joined
kawaii jmerelo: stackoverflow.com/questions/557432...ck-routine 09:40
there, posted one :)
a simple issue I need help architecting
09:41 gregf_ joined
jmerelo kawaii: answered :-) 09:46
timotimo i kind of wish we had more explicit RNG access
currently we only have random state in the ThreadContext, and we can write to it
but we can't, for instance, save away the state and restore it back later
kawaii jmerelo: thank you for such an elegant solution :)
timotimo or have independent RNGs without making additional threads 09:47
and of course when tasks get re-scheduled onto different worker threads, the RNG sequence changes, too, which could be annoying for some use cases
jmerelo kawaii: it's what I use for my evolutionary algorithms :-)
patrickb kawaii: Have you seen my PRs to openapi-schema-validate 09:48
kawaii patrickb: I hadn't, link? :)
patrickb Kawaii: github.com/croservices/openapi-sch...ate/pull/4 09:50
and No 5
10:09 Manifest0 left 10:16 Manifest0 joined 10:22 domidumont left 10:38 Manifest0 left 10:45 ctilmes_ joined 10:46 Manifest0 joined 10:49 ctilmes_ left 10:50 ctilmes_ joined
ctilmes_ wahnwitz: At the end of your query() command, call .value just to make sure the result is retrieved and the handle is returned, even if you ignore it 10:51
query('...', ...).value 10:52
wahnwitz thx for support - now its working as expected :) 10:54
10:56 ctilmes_ left 11:04 wahnwitz left 11:17 netrino joined 11:23 domidumont joined 11:26 jmerelo left 11:30 aborazmeh left 11:36 Manifest0 left 11:37 zakharyas left 11:41 Manifest0 joined 11:55 Manifest0 left 12:01 Manifest0 joined
tadzik patrickb: oh hi :) 12:05
patrickb Hi there! o/
tadzik patrickb: I wanted to talk about your rakudobrew changes, I'll be a bit distracted now but wanted to let you know that I haven't forgotten :)
12:06 ravenousmoose joined
patrickb tadzik: Thanks! 12:06
tadzik I'm still not sure why the breaking changes were necessary and what problem are they fixing; I think I asked before but I've forgotten the answer :/
Could you remind me? :)
12:06 ravenousmoose_ left
patrickb Mostly it's cleanup of the and simplification of the directory layout. 12:07
tadzik ah, I remember now; there could've been name colissions, right? 12:08
patrickb One thing it fixes: It's now possible to register external rakudo builds and give them a name. With the versions now in a separate folder the names are guaranteed not to conflict with the other files in ~/.rakudobrew
tadzik right, that makes sense 12:09
patrickb It's not exactly common you would name a version `shims` or `bin` or so, but still possible.
tadzik right, better safe than sorry
and rakudobrew has had its share of both :P
there was this thing where someone symlinked rakudobrew to /usr/bin 12:10
but rakudobrew has a habit of thinking of its bin as its own
patrickb I know. I messed up and mst cleaned the mess up after me.
tadzik so it was happy to rm * between installations or something
oh it was your story! :)
patrickb It was.
tadzik sorry for that :)
rakudobrew was originally intended as something I wrote for myself, published because why not and not accepting bug reports :P 12:11
patrickb We all fail. Important thing is to learn from it...
tadzik it's grown a bit beyond that
I
I'm happy to have you onboard improving it then :)
12:11 ravenousmoose left
tadzik patrickb: alright, so is there an instruction somewhere for the changes required, or is it necessary to do a full reinstall? 12:12
would it be feasible to have some kind of migration option?
patrickb I find rakudobrew quite essential when doing serious work in perl6. Because perl6 still happens to have bugs often. Then being able to quickly switch between the version that works and the latest is important. 12:13
tadzik: Rakudobrew itself will notify the user. 12:14
github.com/patzim/rakudobrew/blob/...dobrew#L18 see here
It's not exactly extensive but says what needs to be done. 12:15
Migration is not possible, because rakudo is not relocatable up until now. Moving the installations breaks them.
tadzik nod nod 12:16
I'm a bit worried that users, who are used to being able to update rakudobrew with no problems will now update it and see a message saying "Well, it's broken now, go delete everything you have before you continue your work" 12:17
so I'd like there to at least be an option to roll it back to some (git tagged probably) backwards compatible version 12:18
patrickb tadzik: The alternative I see is creating a separate repo and continue there.
Ah! That's a nice idea.
tadzik so we can have a git tag called 'rakudobrew-legacy' or 'v1' or whatever, and the message can say "run this and that command to rollback your update to the old version" 12:19
patrickb "If you don't want to reinstall and just keep the previous rakudobrew version, do `cd <path_to_rakudobrew> && git checkout old_rakudobrew`"
tadzik yeah, exactly 12:20
patrickb That's nice. I think we should go that route.
tadzik but yeah, the non-relocatability of rakudos makes migration impossible I suppose
12:20 rindolf left
tadzik but that's not a reason to not move forward :) I'm happy for these improvements 12:20
I'll try it tomorrow somewhen and see if I still mostly understand it :P 12:21
12:21 dakkar left
patrickb I'll put this downgrade message in (in the evening when I find time). 12:22
12:22 netrino left
patrickb tadzik: I didn't change much, only added features. So you should feel quite at home. I am quite fond of the autocomplete though... 12:23
tadzik aww yiss, that does sound nice
12:23 rindolf joined
tadzik but I think I see some modularization and cleanup, which is also welcome :) 12:23
12:23 ravenousmoose joined
patrickb I'm very open for feedback on that. I've not done much larger scale perl5 before. Might be I did some stupid things there. 12:25
daxim what's in .ws by default? 12:27
12:30 sena_kun joined
sena_kun finally got a plush Camelia 12:31
kawaii is very jealous of sena_kun
12:32 dakkar joined
daxim I got gifted one as a baby toy 12:32
sena_kun I'll take some photo this evening, now comes a delayed work shift due to a visit to my dentist... (dunno if still a jealously description :P)
lizmat is glad it finally arrived :-) 12:36
sena_kun \o/
jnthn daxim: <!ww> \s* 12:38
lizmat just found a segfault in Perl 5 using sprintf, while the Perl 6 equivalent is ok :-)
lizmat also sent a perlbug
12:40 kurahaupo left
daxim thanks, ww explains why .ws works different between two words versus between word and non-word 12:40
12:41 Black_Ribbon left 12:43 mowcat joined 12:54 ravenousmoose left 13:05 ravenousmoose joined 13:16 domidumont1 joined 13:20 domidumont left 13:22 vrurg joined 13:28 mowcat left 13:33 ravenousmoose left 13:34 ravenousmoose joined
cpan-p6 New module released to CPAN! JSON::Marshal (0.0.18) by 03JSTOWE 13:37
13:42 lizmat left 13:49 fdutra joined, MasterDuke left
cpan-p6 New module released to CPAN! JSON::Class (0.0.13) by 03JSTOWE 13:52
13:54 zakharyas joined 14:01 kurahaupo joined 14:04 patrickb left 14:05 ravenousmoose_ joined 14:08 ravenousmoose left 14:11 ravenousmoose_ left 14:21 netrino joined 14:31 domidumont joined 14:34 domidumont1 left 14:42 zakharyas left 14:43 zakharyas joined 14:48 lucasb joined 15:02 ravenousmoose_ joined 15:07 random_yanek left 15:08 random_yanek joined, random_yanek left 15:09 domidumont left 15:12 atweedie joined 15:15 random_yanek joined, atweedie left 15:16 fdutra left 15:18 jmerelo joined
daxim github.com/Microsoft/BosqueLanguage # look how vigorously we're buffing the turd that is javascript 15:19
japhb daxim: I'm not sure I would call that buffing. 15:21
daxim then come up with a word worth circlejerking over 15:22
tadzik so that's typescript v2?
daxim ts wasn't ML enough 15:24
15:29 ctilmes_ joined 15:30 ctilmes left
jmerelo I like the name, though. 15:37
15:41 ctilmes joined, ctilmes_ left
Geth doc: 6c8f2a56a3 | (JJ Merelo)++ | html/robots.txt
Adds robots.txt to exclude dir, closes #2720
15:47
15:48 dakkar left 15:51 [Sno] left 15:54 [Sno] joined 16:02 [Sno] left 16:13 eliasr left
kawaii jmerelo: I've posted another question on StackOverflow if you've time to give me another suggestion :) 16:16
sena_kun kawaii, don't you want a conversion code for feet&inch? 16:21
or I don't see it, then never mind 16:22
m: my %a = { a => 5 } * 5;
evalable6 (exit code 1) Odd number of elements found where hash initializer expected:
Only saw: 5
in block <unit> at /tmp/WqbcCc9XQD line 1
kawaii sena_kun: I'm already storing an 'average' value for both the imperial and metric heights, what I want to do is take both values and add/remove 10% for my final generated pokemon :)
sena_kun kawaii, I mean, you cannot do "6"5'" * 10, because, well, it is a string of unknown format for Perl 6. Unless you are converting feet&inch to a proper unit, multiply and then convert it back 16:23
16:23 Black_Ribbon joined
kawaii oh wait you're right 16:23
I completely forgot about that
how silly of me 16:24
sena_kun m: my %a = { a => 5 }.map({.key => $_.value * 5}); say %a;
evalable6 {a => 25}
sena_kun and you want something like this
kawaii thank you! but yes you are right, I need to convert the feet and inches into a number before doing this
and then back into a string somehow I guess...
or just.... not use imperial at all
16:25 atweedie joined
sena_kun well, I don't think there are some issues with conversion if you want that 16:25
16:26 lizmat joined
sena_kun just noting that it won't work && multiplying on a hash won't work too. :) 16:26
kawaii yes yes I realise I've been looking at this wrong now :)
16:31 zakharyas left
guifa jmarelo: I’ve thought about starting to post my questions on SO. I think I’ll start doing that, even if I ultimately get an answer here more quickly 16:36
16:37 [Sno] joined
guifa jmerelo: (I dunno why I keep typing jmarelo) 16:37
sena_kun .oO ( Mahler ) 16:39
16:40 kurahaupo left
jmerelo guifa: great! You can do both.. Even if you get an answer here, it's better to get it indexed there 16:40
16:40 cpan-p6 left, kurahaupo joined, cpan-p6 joined, cpan-p6 left, cpan-p6 joined
jmerelo kawaii: checked it out. Check out raiph's answer, but I think that you might want to work only with hash values, not with the whole hash. But sena_kun has already told you that... 16:41
sena_kun: you can also answer in StackOverflow :-)
guifa: lots of people are checking SO often, including Raiph. You get excellent questions there :-) 16:42
guifa: and answers...
kawaii sena_kun: yes like jmerelo said I can mark your answer as correct if you post it there :) 16:43
sena_kun let me see... 16:44
jmerelo kawaii senakun: thanks!
guifa I’ve been keeping an eye out for questions I can answer but normally get ninja'd
jmerelo guifa: right, that's true... But you can still add finer points, complement them or, of course, vote them up 16:46
16:49 powerbit left 16:50 vrurg left 16:51 vrurg joined, zachk joined 16:52 zachk left 16:53 zachk joined
sena_kun done 16:54
16:55 zachk left, zachk joined 16:56 joy_ left, joy_ joined
sena_kun a-a-and Comma 2019.4 is released. \o/ 17:04
jmerelo sena_kun++ 17:09
(for both)
17:09 [Sno] left 17:15 lizmat left 17:17 gregf_ left 17:19 go|dfish joined
sena_kun weekly: twitter.com/koto_san_kana/status/1...1730656256 17:44
notable6 sena_kun, Noted!
sena_kun not sure if suitable, but still
jmerelo sena_kun: of course it is! 17:46
sena_kun: even more so since it's your 34th tweet :-) 17:47
sena_kun well, twitter isn't really my thing, so I prefer to avoid using it unless it is a very special case for me. ;-) 17:48
17:48 lizmat joined
sena_kun .oO ( or when I am replying to Japanese tweets about Perl 6, that's fun too ) 17:49
jmerelo sena_kun: exactly my point. Very special :-) 17:50
17:53 [Sno] joined 17:57 hythm_ joined
hythm_ hello, If I have Game Class, which has Player object and Board object, Game asks Player what are the coordinates, Player responds, then game checks Board for the coords and the result either Hit or Miss. How can forward the result back to Player?  so that Player uses the result to set the new coords.  I have created code sample below to explain more what i want to do. 17:57
gist.github.com/hythm7/ac73cdb5e83...fbe8603ceb
jmerelo hythm_: it's probably better if you also use StackOverflow for this 17:58
hythm_: but let's give it a try.
hythm_ can do, but was worried it will be flagged as open question in SO 17:59
jmerelo hythm_: Player does not seem to have any way of being told the result of firing, correct? You don't even store the places it's fired. 18:00
hythm_: we don't do that in Perl 6.
hythm_: In this case you need to rethink the design of Player in terms of what it needs to know and do. If it's going to receive feedback on fires, it needs to store them and there should be a way to refer to them. 18:01
hythm_ alright, will add to SO as well.
jmerelo hythm_: it will probably need to store the cell coordinates where it's hit or not, if it wants to proceed with the game.
hythm_ yes but player does not interact directly with board, its via the game object, so to store the result in player, i need to forward it to player first 18:04
jmerelo hythm_: it will need to have its very own copy of Board. How is it going to decide where to shoot, then? 18:05
hythm_ it knows about the dimension of the board only 10 x 10, and choose from that 18:07
sena_kun hythm_, my gut feeling is that the interaction is likely to be harder than your initial approach is 18:08
hythm_ Im writing SO question and adding the full project link as well
sena_kun you likely want to have a bi-directional relation between Player and Server, so player sends an event "Done X", server processes it and sends an event "Board has changed to state Y, diff is Z", and the player updates its state 18:09
of course, Server and Player might start with dfferent states, for example, for player all items are "Unknown", and the server knows for sure if an item is a target or not, but that's details
but even with turn based games, you still want to have such communication channel 18:10
hythm_ that makes sense sena_kun, any links to server/client communication in perl 6? 18:11
sena_kun hythm_, you mean with network or?
hythm_ not necessarily, i mean something helps with turn based games 18:12
sena_kun for network see IO::Socket::Async docs... that's probably not what you want
hythm_, I'll try to play with it later, I think, and maybe it'll result in a gist. ;-) 18:13
hythm_ thanks :)
18:17 powerbit joined 18:18 kurahaupo left, kurahaupo joined
hythm_ posted SO question stackoverflow.com/questions/557517...en-objects 18:21
18:28 [Sno] left 18:30 sauvin left
samcv jmerelo, so i got a response for one of my students. the assignment i gave them. so that's great news. so i should have a willing student :) 18:31
jmerelo samcv: that's great! 18:32
samcv: please star/want to mentor/comment on that one, so that we take it into account when requesting slots.
samcv ok 18:34
jmerelo, i had him code an encoder that goes from gb2312 codepoint to the proper bytes. so doesn't need a lookup table, but shows that they actually are willing to dive into the details of the format 18:36
so very happy i got that email!
jmerelo samcv: me too... We have at least a few good candidates :-)
samcv jmerelo, okay i have updated it so i have set "want to mentor" for just the person who submitted the code 18:44
jmerelo samcv: I'll see if we have to update the number of slots too...
18:50 [Sno] joined 18:57 jmerelo left 19:04 [Sno] left 19:05 lizmat left
sena_kun hythm_, I am having a gist, now writing it as a SO answer... 19:13
hythm_ thank you sena_kun 19:15
19:15 zakharyas joined 19:21 hythm_ left 19:23 zakharyas left 19:38 lucasb left
sena_kun done 19:38
XD 19:41
I knew it
19:44 lizmat joined 19:54 lizmat left 19:55 random_yanek left 19:56 random_yanek joined, random_yanek left 19:59 random_yanek joined, random_yanek left 20:09 Manifest0 left, random_yanek joined 20:13 ChoHag left
kawaii `reached end of string when looking for something` 20:14
:thinking
20:14 Xliff joined
Xliff \o 20:14
m: multi sub(@a) { say 'Pos'; }; multi sub($a) { say 'NP'; }; my $a = [1, 2, 3, 4]; a($a) 20:15
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/1wS5MjyzwS
Undeclared routine:
a used at line 1
20:15 Manifest0 joined
Xliff m: multi sub a(@a) { say 'Pos'; }; multi sub a($a) { say 'NP'; }; my $a = [1, 2, 3, 4]; a($a) 20:15
evalable6 Pos
20:16 AlexDaniel left
timotimo greppable6: reached end of string when looking for 20:17
greppable6 timotimo, 1 line, 1 module: gist.github.com/f8ac8404451a3e139c...738c700945
timotimo i knew i saw that line somewhere before ...
kawaii: you need anything?
kawaii timotimo: I... probably but... I don't know what
I'll make a gist... 20:18
timotimo sorry about the error message not being very good; the backtrace should be more helpful actually 20:19
20:20 molaf joined
kawaii timotimo: gist.github.com/kawaii/495c3b8b35c...de14375580 20:21
timotimo huh 20:22
kawaii at a glance, I have no idea where the fault in my code lies
timotimo the line numbers don't match up exactly with the latest code on github, hold on 20:23
ok, so the first "thing" it's trying to parse is the outermost thing
and it immediately reaches the end of the string, apparently 20:24
could it be you need to subscript the row with [0] or .first to get "an actual string"?
kawaii timotimo: I added the extra method you can't see to the gist, might help a little more
20:24 ctilmes_ joined
kawaii and you might be right 20:24
let me try that now
20:24 squashable6 left
timotimo although from-json should be calling .Str on what it gets 20:25
kawaii yeah... that didn't help... hmmmm
timotimo can you output what you pass to from-json with dd or .perl.say?
20:26 ctilmes left
sena_kun kawaii, ping? 20:26
kawaii trying that now 🤔
`dd my %height = from-json($query.row);` gives me nothing extra to my output :/ 20:27
20:27 squashable6 joined
sena_kun kawaii, never mind... 20:28
20:32 sena_kun left
timotimo nah, i meant more like dd (my $rowvalue = $query.row); from-json($rowvalue) 20:32
20:33 sena_kun joined
kawaii ah right! 20:35
20:43 ctilmes joined, ctilmes_ left
kawaii timotimo: `Hash %heights = {}` 20:45
ah, it's.... empty
20:48 netrino_ joined 20:50 netrino left, [Sno] joined 21:08 molaf left 21:10 hythm_ joined
hythm_ .tell sena_kun thank you for the detailed answer on SO, just finished reading and thats exactly what i was looking for. I need to read a little bit more on 'Channel', 'Supply','react' to have better understanding 21:29
yoleaux hythm_: I'll pass your message to sena_kun.
sena_kun .
yoleaux 21:29Z <hythm_> sena_kun: thank you for the detailed answer on SO, just finished reading and thats exactly what i was looking for. I need to read a little bit more on 'Channel', 'Supply','react' to have better understanding
sena_kun hythm_, yes, I suspected that some things might need some further explanation, but didn't want to expand the long enough post. you are welcome to ask questions if any. :) 21:30
glad that the answer was helpful. \o/
21:31 Manifest0 left 21:32 |Sno| joined
sena_kun hythm_, also, if you want to do more complex things(when there are more than 2 objects), you want to look at some other approaches, because this one grows quickly: for 2 classes you need 2 channels, but for three classes you suddenly want 6, and for four classes with N x M interation you need 12 channels... 21:33
21:34 kaare_ joined
sena_kun so it is an approach that scales horribly, but is pretty suitable for the simple case of two classes. 21:34
21:35 [Sno] left
hythm_ its definitely helpful and is very clear, im sure I will have more questions when I start implementing this on my code, amd it will be more complicated (two players for instance, need to support more than one event (fire, move, sink)... but yes that's very good starting point for me 21:35
21:35 Manifest0 joined
hythm_ yes, once i get a good grasp this approach, i will look into different ones, 21:40
sena_kun +1 for going gradually with it 21:42
good luck!
22:11 skids joined 22:12 lizmat joined, sena_kun left 22:19 zachk left 22:20 hythm_ left
AndroidKitKat Dumb question, is there any place I can buy a decal of Camelia for my laptop 22:32
I see it on red bubble but if that money doesn't support the original artist or the language I don't want buy it 22:35
timotimo AndroidKitKat: if postage isn't too expensive from there, liz and wendy have a lot of them in the netherlands 22:36
AndroidKitKat Link? 22:37
kawaii I'd be interested in buying some decals (and a plush) too fwiw
AndroidKitKat I don't mind paying a few bucks to get it shipped to the United Stats
22:37 random_yanek left
timotimo hm, i know that squashathon "winners" get camelia plushes sent to them, i'm not sure if they are actually for sale? 22:38
AndroidKitKat Well if anyone has more information please let me know 22:43
timotimo most devs are stationed in europe, so you've visited us at a pretty sleepy hour 22:45
i'm going to bed now, seeya! o/ 22:46
22:49 random_yanek joined 23:07 kurahaupo left, kurahaupo joined 23:33 stigo left 23:36 rindolf left 23:44 vrurg left, vrurg joined
kawaii So now I have `Odd number of elements found where hash initializer expected: Only saw: 2.0`... but that's exactly what I want 23:51