»ö« 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.
vrurg If I have a parent/child relations between two classes in separate files and need to specify parent type in a child method signature – how can I do it without causing circular dependencies in modules? 01:49
k-man why does 7.5.numerator work, but 7.5e-3.numerator does not ? 04:11
sjn k-man: bexayse 7.5 is a Rat, and 7.5e-3 is a Num, and .numerator is only available in Rats 04:17
r: sat 7.5e-3.Rat.numerator
r: say 7.5e-3.Rat.numerator
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
sat used at line 1. Did you mean 'set', 'say'?
5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
sat used at line 1. Did you mean 'say', 'set'?
3
sjn (sorry about the typos) 04:18
r: say (7.5e-3).Rat.nude 04:19
k-man sjn, ah i see
camelia (3 400)
sjn r: say (7.5e-3).nude
camelia Method 'nude' not found for invocant of class 'Num'
in block <unit> at <tmp> line 1
No such method 'nude' for invocant of type 'Num'. Did you mean any of these?
none
note

in block <unit> at <tmp> line 1
sjn m: say (7.5e-3).WHAT 04:20
camelia (Num)
sjn m: say (7.5).WHAT
camelia (Rat)
k-man thanks sjn 04:23
k-man i'm working through Learning Perl 6, and one of the questions was "What is 7.297351e-3 as a fraction 04:24
"
sjn r: say 7.297351e-3.Rat.nude 04:25
camelia (27 3700)
k-man r: say 7.297351e-3.Rat.perl 04:26
camelia <27/3700>
k-man i found that way too
sjn wonders if there's a complete type inheritance graph somewhere on docs.perl6.org 04:29
Hm. looks like docs.perl6.org/type/Cool#Type_Graph shows a lot 04:36
k-man: if you expand that, you'll see that Num doesn't inherit from Rat 04:37
k-man i see, interesting 04:38
lookatme_q k-man, Num is IEEE754 floating point number 04:56
nine timotimo: nah, I just like In Flames ;) 06:08
reario helo 06:31
jmerelo reario: hi! 06:33
yoleaux 10 Oct 2018 18:45Z <uzl> jmerelo: They're welcome to take a look at it. uzluisf.gitlab.io/piensaperl6/ <- gitlab page which also has a link to the repo.
jmerelo .tell uzl received, thanks!
yoleaux jmerelo: I'll pass your message to uzl.
Geth doc: c9620835f2 | (JJ Merelo)++ | 2 files
Some reflow and corrections
06:35
doc: 1e61135372 | (JJ Merelo)++ | doc/Language/py-nutshell.pod6
Adds example for input

Since there are differences between Python 2 and 3, I just use here the most similar to Perl 6, which is Python 3 (and say so). Adds examples for usage in Python and Perl 6. Also reanchors. Refs #2355
synopsebot Link: doc.perl6.org/language/py-nutshell
reario e 06:44
lookatme_q hi 07:13
masak lookatme_q: \o 08:06
lookatme_q o/ 08:25
scimon Morning all 09:23
lizmat scimon o/
reario quit 10:13
masak reario: so sorry to see you go 10:35
masak dances
lizmat wonders what that is about 10:36
masak from my side, not much :)
reario: what you want to type is `/quit`, with a slash at the beginning
MitarashiDango[m I stumbled upon some weirdness with &?ROUTINE and &?BLOCK when using control flow in a subroutine. If I use loop in a sub, &?ROUTINE should refer to the sub, shouldn't it? Because &?BLOCK does instead 10:40
But inside a for block &?ROUTINE does in fact refer to the sub 10:41
masak m: sub foo { say &?ROUTINE }
camelia ( no output )
masak m: sub foo { say &?ROUTINE }; foo
camelia &foo
masak m: sub foo { loop { say &?ROUTINE; last } }; foo
camelia -> { #`(Block|67791376) ... }
masak I'd call that a bug
lizmat yup, genuwine 10:42
jnthn Oops. Yes. 10:42
yoleaux 09:33Z <lizmat> jnthn: is there a way during compilation that we're compiling inside an EVAL ?
09:33Z <lizmat> jnthn: *to find out
10:07Z <lizmat> jnthn: fixed by adding an my $*INSIDE-EVAL inside sub EVAL and checking that
jnthn lizmat: Why did you want to know that? :) 10:42
lizmat he... refactoring MAIN handling
we will also need that if / when we decide to precompile scripts, btw 10:43
timotimo ah, so that when you EVAL something that has sub MAIN it shouldn't run the things?
lizmat yup
MitarashiDango[m I'll open an issue on github in a bit if one doesn't exist already
masak MitarashiDango[m: +1 10:44
erana I finished the statisitics package inside my markov strategy kit 11:11
I'll put it on github next week
masak nice
erana thnx
it's light and small, just needs conditional probabilities 11:12
For now it's incorporated in another package but it'll do 11:13
it should be someting like ai::markov::statisitics I believe
erana s/be/become 11:14
erana It's based on distributions in a population, so it should not become a general statisticsc package such as Math::Statistics SFY later on 11:18
so it can use evolution with genetic algorithms and more
It's not multi-variate however 11:20
but you have variance, expectance, covariance, correlation, very small as I said 11:21
erana Then again, it's for games so it can evolve distributionpopulations 11:37
I'll put in a Game::AI tag or something
The formulas are somewhat looser than the real math to gain momentum at load and runtime in perl6 games 11:38
tobs` m: anon sub { state %e = .antipairs with { :1st }; say %e }(); anon sub { state %e = do .antipairs with { :1st }; say %e }() 11:44
camelia {}
{1 => st}
tobs` is my understanding correct that `with` being a statement modifier swallows the `state` in that statement? 11:44
tobs` m: anon sub { state %e = { :1st }.antipairs; say %e }() # I know about this way of doing it, but was surprised by the first one leaving %e empty 11:46
camelia {1 => st}
holyghost I posted the statistics package for next week on perlmonks, CUFP 12:22
scovit Hello, I have a Perl 6 question, let's say that I matched a string with such a simple pattern: m/^\s* [ (<float>) <.ws> ]+ $/ 12:57
where my regex float { <[+-]>?\d*'.'\d+[e<[+-]>?\d+]? }
it is very simple, but results in quite a complex $/ object 12:58
how do I get to the matched (<float>)s ?
moritz first, remove the ()
<float> already captures
scovit didn't know that, ok 12:59
moritz and then just iterate: for $<float> -> $f { ... }
jnthn That's probably why it looked complex :-)
moritz I might be biased, but I'd recommend smile.amazon.com/dp/1484232275/ :-)
masak moritz++ # biased in exactly the right way 13:00
scovit moritz, great, your for cycle works! 13:02
is there a more sugarish way to take $<float> and get an array of strings out of it? 13:03
moritz $<float>».Str
evalable6 Use of Nil in string context
in block <unit> at /tmp/0oUT9zW2UZ line 1
moritz evalable6: shut up, I wasn't talking to you :) 13:04
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/Uzxs6xOhW8
Precedi…
moritz, Full output: gist.github.com/80347471033dfd74a7...e20d4a2111
moritz or even ~«$<float>, but I'd consider that exaggerated
scovit mortiz it works! 13:05
I cannot get the non-unicode version to work tough
the Texas version
moritz $<float>>>.Str
evalable6 Use of Nil in string context
in block <unit> at /tmp/Y03O0wYRPm line 1
jnthn ~<<$<float>
moritz it's just ugly 13:06
jnthn Actually with the texas version I prefer the prefix ~ 'cus then you don't have two different kinds of > against each other :)
scovit yep I will avoid the ugly one :)
moritz $<float>.map(*.Str) # timtowtdi 13:06
evalable6 Use of Nil in string context
in whatevercode at /tmp/PR_xEin8aQ line 1
scovit thank you all! 13:07
lizmat twitter.com/JohnDCook/status/10503...2555891717 # something someone might want to respond to 14:06
El_Che lizmat: done 14:15
lizmat El_Che++ 14:16
holyghost I finished the multi-variate probability class, Bayes, P(A or B) and P(A and B) and P(A|B) and P(X) :-) 14:51
holyghost The package is almost ready to post 14:51
araraloren holyghost cool 14:57
holyghost bbl 15:57
scimon Right. Heading to LPM. 16:27
timotimo good luck with the talk, scimon :) 16:28
tony-o hmm, getting 'make: *** No rule to make target `js-install', needed by `install'. Stop.' when making with js backend 18:03
when `make install` with js backend
timotimo that sounds like Configure.pl didn't work right 18:04
tony-o i just did a pull and it got some new stuff from yesterday, we'll see what happenes. if y'all didn't exp that then i'll dig around and try to figure out what happened 18:13
[Coke] tony-o: what version of node? I got that, but it vanished after an upgrade to node 10.x 18:22
... sorry, no. I got a very similar error with js-clean, my bad. 18:23
tony-o i'm on 10.5 18:24
maybe i should get 10.12
Geth doc: bf57d08b14 | (JJ Merelo)++ | 2 files
Reindex confusing ws page
18:38
doc: 39aed8de99 | (JJ Merelo)++ | 2 files
Reindexing Python stuff with category "Python"

This closes #2355. It so happens you didn't need to special-code a new category; as a matter of fact, there's a simple (if obscure) way of doing it, which I have used. Also correcting some accidental indexing somewhere else.
pmurias tony-o: install doesn't work yet 18:43
tony-o: on the js backend
bobbyJim Working thru brian's Learning Perl6. I'm finding Perl6 to feel quite natural so far. 19:21
moritz that's good to hear :-) 19:22
buggable New CPAN upload: Sparrowdo-VSTS-YAML-Angular-Build-0.0.5.tar.gz by MELEZHIK cpan.metacpan.org/authors/id/M/ME/...0.5.tar.gz
bobbyJim Is there a forum for brainstorming about Perl6? Uses, targets, applications, conquer-the-world matters? 19:23
El_Che ((o)) 19:24
here :)
bobbyJim I don't know if it is proper to clutter this channel with that chatter?
channel clutter chatter 19:25
El_Che this channel is the most generic one
there is also #moarvm and #perl6-dev
bobbyJim mmmm yes those are targetted 19:26
I was listening to a speaker extolling Node at a meetup, and all I could think about was " 19:27
Perl could do this better
"
El_Che Not everything, but it will 19:28
Demos[m] yeah like the biggest draw for node is that it's pretty fast consiering the language. Perl6 has a lot more headroom on this front 19:29
robertle I thought the biggest draw of node was that you can do frontend and backend work in the same lang, which is really cool 19:30
...so how is the JS backend again? ;)
Demos[m] I kinda don't understand that draw 19:31
but *shrug*
robertle I guess it depends a bit on what your backend language is, but not everything fits well into one head at a time together with javascript 19:32
geekosaur yeh, easier tot hink about interactions in one langauge instead of two 19:33
bobbyJim The JS backend is easier to develop than Java. For example, ORM is easy. Even Node evangelists know that it's not the full solution, but it seems quite good for responsive front-end development, and I admit its ORM mapping is handy.
geekosaur esp. snce your'e vulnerable to idiosyncratic differences in handling of json, yaml, ...
bobbyJim Yes, you need a one-source standard. I think V8/Google is Node's standard, but these things are moving targets, so... 19:34
Demos[m] one thing is that if you're compiling a language to JS the JS backend actually has to be good and a large portion of the ecosystem needs to support it 19:40
nim has this problem. the js backend is good, but much of the ecosystem doesn't work on it 19:41
robertle because some packages don't work and the transitive dependencies wreck the rest? or some othger reason? 19:42
Demos[m] well it's a systems language, so plenty of packages make FFI calls to C 19:43
and load DSOs and whatnot
also the memory and threading model is different on JS as opposed to the C target
pmurias Demos[m]: why is making FFI calls a problem? 20:04
ahh, you mean in the browser 20:05
holyghost I just found a game named gnomesquest4 in my backup directory from 2007, I forgot I wrote 44000 lines init. It's C++ 20:17
I thought I lost it, now I can hack on :-) 20:18
I am a Roberta Williams fan, hence the name 20:19
Demos[m] yeah no reason to compile for the js target serverside 20:22
but that bad boy on source control! STAT!
Demos[m] what's the type signature for functions and closures 20:31
like if I want a parameter that accepts boolean returning functions
remol hi, can someone tell me what is raduko.js please ? can i run perl6 code in a website ? 20:35
pmurias remol: it's the js backend for rakudo (the Perl 6 compiler) 20:40
remol so if i include it in my webpage 20:41
i can write in perl instead of js ?
pmurias yes, you can turn your perl 6 into js code that can run on your webpage 20:42
pmurias it's not ready for serious use yet 20:42
remol jesus its cool 20:43
remol i thought about this, would it be wise for somebody to code a browser that actually interpret perl code instead of JS ??µ 20:43
holyghost remol: See perlyroids, which was a game that used that with a IE perl plugin 20:44
I think it was from Adobe quite some time ago 20:45
remol yes its cool
holyghost 2003 AFAIK 20:47
pmurias holyghost: rewrite the game in Perl 6 ;) 21:07
El_Che Travis also suports windows: blog.travis-ci.com/2018-10-11-wind...ly-release 21:23
birdrock Hi there - I've been here off and on, wondering what Perl6 could do better than my current toolset. I think it may be able to do RESTful web services better than SpringBoot -- less code and more power. 22:11
Oh, I forgot about Bailador! ;/ 22:18
jnthn birdrock: There's also cro.services/ 22:19
ufobat___ cro!! 22:21
timotimo croo is good 22:24
birdrock Sweet! Thanks for that. 22:25
birdrock Does it have a "magnon" runtime option? :) 22:27
birdrock I wish we had a Perl6-to-JS transpiler...... 22:28
hmmmm
rouking Are there any optimizations on string concatenation with `~`? 22:46
I was reading blog.matatu.org/markatu and he seems to be using ~ quite heavily 22:47
jnthn On MoarVM at least, it uses a strand structure so it doesn't have to really copy all the pieces eagerly (or at least, so long as there isn't Unicode combining things that prevent such an optimization) 22:54
jnthn join will typically be faster for such things, though 22:55