»ö« 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.
woolfy stmuk_: Picture on Perl 6 Facebook group that sported you and Sue has been removed from the group, and replaced by a picture of the three country point at Perl. 00:14
yoleaux 6 Nov 2018 16:51Z <CIAvash> woolfy: thinking back, "pretending" was a strong word, sorry for using it.
woolfy stmuk_:
stmuk_: please feel free to check on it: www.facebook.com/groups/perl6/
El_Che just had a look 00:22
damn, not getting facebook any time soon
such an annoying format
timotimo how can people live with sacrificing about a third of their screen real estate to a big white box? 00:23
woolfy Feel free to delete the picture and replace it by something of your own liking. 00:40
Xliff It's Tuesday, Election Day here in the US. 02:24
And I am steadfastly trying to ignore the coverage.
Kinda hard, tho...
So I'm sipping a Cognac and Coke and listening to music. 02:25
Can someone tell me the best way to pass a function to a C-Callback?
method some_meth (&some_func (Type1, Type2, Type3)) seems like it should work, but doesn't. 02:26
lookatme_q It should work, what error you get ? 02:34
Xliff lookatme_q: Cannot unpack or Capture `&sort-func`. To create a Capture, add parentheses: \(...) 03:10
lookatme_q Xliff, Oh, that's the sub signature error, the correct syntax is &some_func:(Type1 ... 03:46
I am not sure what's the `&some_func (Type1 ...` is 03:47
what
Xliff Well, now I get "Constraint type check failed in binding to parameter '&sort_func'; expected anonymous constraint to be met but got -> $a, $b --> int32 {... 04:19
"
Xliff All I really want is a signature that can take either of these: "$a.pass_func(-> $a, $b --> gint { ... })" OR "sub func($a, $b --> gint) { ... }; $a.pass_func(&func)" and pass that to a C function. 04:20
pass_func, in this case is a method. 04:21
m: my $a = -> $aa, $bb --> gint { 1; }; say $a.WHAT 04:29
camelia 5===SORRY!5=== Error while compiling <tmp>
Type 'gint' is not declared. Did you mean any of these?
Int
int
UInt
uint

at <tmp>:1
------> 3my $a = -> $aa, $bb --> gint7⏏5 { 1; }; say $a.WHAT
Xliff m: my $a = -> $aa, $bb --> Int { 1; }; say $a.WHAT
camelia (Block)
Xliff m: my $a = -> $aa, $bb --> Int { 1; }; my $b = sub($a, $b) returns Int { 1; }; say $a.WHAT; say $b.WHAT; 04:30
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot use variable $b in declaration to initialize itself
at <tmp>:1
------> 3a, $bb --> Int { 1; }; my $b = sub($a, $7⏏5b) returns Int { 1; }; say $a.WHAT; say
expecting any of:
Xliff m: my $a = -> $aa, $bb --> Int { 1; }; my $b = sub($aa, $bb) returns Int { 1; }; say $a.WHAT; say $b.WHAT;
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$aa' is not declared
at <tmp>:1
------> 3-> $aa, $bb --> Int { 1; }; my $b = sub(7⏏5$aa, $bb) returns Int { 1; }; say $a.WHA
Xliff m: my $a = -> $aa, $bb --> Int { 1; }; my $b = sub(Int, Int) returns Int { 1; }; say $a.WHAT; say $b.WHAT;
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3bb --> Int { 1; }; my $b = sub(Int, Int)7⏏5 returns Int { 1; }; say $a.WHAT; say $b
expecting any of:
infix
infix stopper
Xliff m: my $a = -> $aa, $bb --> Int { 1; }; my $b = sub(Int, Int --> Int) { 1; }; say $a.WHAT; say $b.WHAT;
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
------> 3$bb --> Int { 1; }; my $b = sub(Int, Int7⏏5 --> Int) { 1; }; say $…
Xliff m: my $a = -> $aa, $bb --> Int { 1; }; my $b = sub (Int, Int --> Int) { 1; }; say $a.WHAT; say $b.WHAT; 04:31
camelia (Block)
(Sub+{Callable[Int]})
Xliff m: sub do-func(&func) { &func($a) }; do-func(-> $a, $b { say $a.flip }); 05:37
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$a' is not declared
at <tmp>:1
------> 3sub do-func(&func) { &func(7⏏5$a) }; do-func(-> $a, $b { say $a.flip }
Xliff m: sub do-func(&func) { my $a = 42; &func($a) }; do-func(-> $a, $b { say $a.flip }); 05:38
camelia Too few positionals passed; expected 2 arguments but got 1
in block <unit> at <tmp> line 1
Xliff m: sub do-func(&func) { my $a = 42; &func($a) }; do-func(-> $a { say $a.flip });
camelia 24
Kaiepi ok, the jvm can run tools/build/install-core-dist but not moar 06:02
holyghost I'll try to arrange AI::Agent on github this week, compilable 06:48
Then later on I'll fix Bayes::Learn and Game::Markov 06:51
I might make an AI::Agent::Nintendo for rom agents. Then have a simple dispatch method for agent classes based on an Actor class 06:53
Kaiepi figured out how to get tools/build/install-core-dist.p6 to run 07:05
i just need to pass -Ilib to it in the makefile
holyghost I've Actor and Agent.pm6 are compilable, I'll post later on 07:16
s/I've/I've got 07:18
AlexDaniel “An official (heh!) spec release of 6.d illustrates Camelia smashed against a wall of marketing.” 08:32
andrewshitov++ # humor :)
El_Che AlexDaniel: in days like this I start to envy programming languages with less controversial names, like Brainfuck 08:35
ok, let's tweet this
scimon Morning all. 08:58
scimon www.youtube.com/watch?v=yt8SrZ_V_50 : A video. On using MAIN with Perl6 mostly. :) 09:24
holyghost I'm going to do a AI::Agent::Embedded for NES and M68k binaries 09:57
Then I can add on
a NES is a embedded system with rom code and so is the M68000 microcode
holyghost It's just a parser within the agent to reverse engineer and stock it 10:01
though AI::Agent is now at 127 lines 10:02
woolfy Claudio Ramirez: "what's with the xeno?", "more drama?" -> check in history, I use that nick when not at home and log in from my mobile. And yes, I love drama. I hate drama. But xenowoolfy as a name is not meant to add drama. My oldest nickname online is Xenolupa, and that was 27 years ago on CompuServe. 10:31
lizmat El_Che: ^^^ 10:38
El_Che woolfy: the drama was about stmuk and facebook 10:47
the 2 questions are unrelated
buggable New CPAN upload: AI-Agent-0.2.1.tar.gz by HOLYGHOST modules.perl6.org/dist/AI::Agent:cpan:HOLYGHOST 11:01
holyghost I've added AI-Agent to github.com/theholyghost2 11:21
Zoffix .tell TimToady please respond to github.com/perl6/user-experience/issues/33 12:07
yoleaux Zoffix: I'll pass your message to TimToady.
buggable New CPAN upload: AI-Agent-Music-0.2.1.tar.gz by HOLYGHOST cpan.metacpan.org/authors/id/H/HO/...2.1.tar.gz 12:11
holyghost I just uploaded AI-Agent-Music to github : github.com/theholyghost2
It needs a parser 12:12
lucasb Taking a look at the Node.js project, it looks like they are very structured with Foundation Board of Directors, Technical Steering Committee, Working Groups, etc. 12:12
holyghost a parser in the sense that it should parser further on on music links and so on 12:12
lucasb I think a little more structure to this project would be a good thing 12:13
lucasb P6 is maturing, attracting people 12:13
holyghost it is :-) 12:14
I'm in for matlab functionality :-)
lucasb But I accept that the core devs maybe want some freedom 12:15
... of action :) 12:16
holyghost eco: AI::Agent::Music 12:17
buggable holyghost, Nothing found
holyghost I'm going to do some parsing tomorrow :-) I might want to turn in natuaral language processing with a grammar 12:21
lucasb I want to open 2 issues to formally request {blog,wiki}.perl6.org websites for this project. Is perl6/user-experience an appropriate place for this? At least someone supports these ideas? 12:25
AlexDaniel lucasb: I think it is a good idea to wait a bit before starting to discuss this stuff 12:26
lucasb: everyone is too emotional right now
lucasb AlexDaniel: agreed, thanks for the advice :) 12:27
lizmat AlexDaniel++
lucasb so much passion
AlexDaniel lucasb: as for the wiki, I think it is needed (there were a couple of cases in the past). Right now stuff ends up here: github.com/rakudo/rakudo/wiki 12:29
lucasb: there's an interesting question as to which wiki engine should be used :)
lucasb MediaWiki, otherwise don't even bother :) 12:30
AlexDaniel lucasb: I mean, surely there are many great ones, but we love dogfooding, right?
lucasb perl 5 had an SocialText wiki, it didn't worked
nobody was familiar with the interface. everybody knows wikipedia
AlexDaniel perl5 also has oddmuse, and there's now oddmuse written in perl 6 github.com/kensanata/oddmuse6 12:31
it's in very early stages, so kinda not ready
lucasb I understand that. (Oddmuse (5) user myself :)
But I still think MediaWiki is the most appropriate one and robust for this situation 12:32
My idea is that only registered users would be able to edit pages. This avoid the spam/vandalism problem, right?
AlexDaniel lucasb: yeah, maybe. I'm not insisting on anything, just listing the options :)
lucasb: I dislike wikis that can't be edited without going through all the hoops to get your account ready… I just end up not contributing at all… 12:34
but it depends on what purposes we want to use it for
maybe using github accounts is possible? Like through OAuth apps or what is it called? I'm not sure
this: www.mediawiki.org/wiki/Extension:OAuth2_Client 12:35
lucasb Well, if you are an P6 enthusiast, you only need to register an account once, and enjoy later. I think it's a good tradeoff to not have to deal with outside people disrupting the wiki 12:38
AlexDaniel yeah, but then we're missing out on microcontributions 12:40
with MediaWiki I'm pretty sure we can have very fine control over privileges and stuff, so that important pages are not disrupted 12:41
lucasb right, maybe it should start open and only get restricted if we face problems
needs an Apache server, PHP/MySQL instance. where would this run? in the p6c hack machine? 12:42
AlexDaniel lucasb: here's a repo that is related: github.com/perl6/infrastructure-doc 12:43
holyghost AFAIK the wikie syntax matters
s/wikie/wiki 12:44
AlexDaniel wonders if this extension is working at all www.mediawiki.org/wiki/Extension:Markdown 12:45
holyghost I meant in your browser 12:45
AlexDaniel holyghost: ? 12:46
AlexDaniel lucasb: perhaps start with a docker image and then we figure out where to run it later :) 12:46
lucasb yes. I rememebered I had already populated an MediaWiki wiki with P6 content. I'll see if I can ressurect it 12:47
holyghost AlexDaniel: The wiki syntax in editing your browser should be straightforward
AlexDaniel holyghost: yeah, but that's the point of that extension 12:48
holyghost AlexDaniel: else you have to go to the help file
lucasb if Mediaw
holyghost FWIW
Don't turn in P6 just for wiki
lucasb if MediaWiki is chosen, then I think we should start with the standard MediaWiki syntax, and add anything later
holyghost You have to manage your users 12:49
AlexDaniel: I cannot lookup the extension here
AlexDaniel lucasb: I… I don't know… can't we try that markdown extension first? 12:50
personally I don't know mediawiki syntax, even though I've been wiki-ing a lot…
that “I don't know” lines up vertically :D 12:51
lucasb: oooh… right, we had a wiki 12:52
I forgot :)
it'd be good to figure out what went wrong with it
holyghost I don't want sf.net syntax
I'd rather be smalltalking on c2.com :-) 12:53
AlexDaniel lucasb: web.archive.org/web/20130521070045...perl6.org/
holyghost c2.com was the 1st wikiwikiweb, they did'nt invent that solo 12:56
lucasb yeah, I think the previous one was running Gitit (in Haskell) 12:57
holyghost lol 12:58
lucasb one more reason we should choose a mainstream engine :)
holyghost :-)
"Choose your syntax" TMOTOWTDI
lucasb although I like the idea of a git-backed wiki for my own personal usage, but not for a big open source project
holyghost true 12:59
To be honest, we need some hackers for the wikiweb imp. 13:01
smite it on a public repo and then we can follow 13:03
As I said, *turn on* your wiki syntax 13:04
I'd be glad to help 13:05
eco: AI::Agent::Music 13:11
buggable holyghost, Nothing found
scimon eco: AI::Agent 13:14
buggable scimon, AI::Agent 'AI network Agent system': cpan.metacpan.org/authors/id/H/HO/H...2.1.tar.gz 1 other matching results: modules.perl6.org/s/AI%3A%3AAgent
scimon holyghost: It looks like it doesn't pull out the sub modules.
holyghost I see 13:15
scimon zef search finds it though. 13:16
holyghost ok
botcherous CPAN parser ?
zef search AI::Agent::Music finds it ? 13:17
I don't know CPAN syntax for submodules of AI::Agent
If zef finds it, with my web address it's ok 13:18
it's the CPAN agent then 13:19
Kaiepi i can't install zef atm 13:22
it just hangs when i try
holyghost ok 13:23
It's a parser issue
cpan serves :-) 13:24
holyghost It's a deliberate syntax with AI-Agent-Music as subclass 13:26
CIAvash 💭 What if TimToady sees the mess and doesn't come back? 😀 13:32
holyghost eco: AI::Agent::Music 13:38
buggable holyghost, Nothing found
holyghost eco: AI::Agent
buggable holyghost, AI::Agent 'AI network Agent system': cpan.metacpan.org/authors/id/H/HO/H...2.1.tar.gz 1 other matching results: modules.perl6.org/s/AI%3A%3AAgent
Geth ecosystem: a4f23fd24e | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
Remove unsupported modules
holyghost ok. zef finds it 13:39
holyghost Kaiepi: you might want to do a fresh install, older versions work on older systems 13:46
it's called POSIX :-) 13:47
scimon (Sorry in a meeting)
lizmat CIAvash: then we'd have to figure out things amongst ourselves 13:49
CIAvash lizmat: I was just joking 🙂 13:50
Kaiepi holyghost problem is i can't do a perfectly fresh install since tools/build/install-core-dist.p6 refuses to run with moar as the backend 13:52
it works with the jvm, but i can't install zef using it because one of the ops zef uses is unsupported 13:53
holyghost Kaiepi: lookup tags like --gen-moar 13:56
bazzaar lizmat: I agree whole-heartedly with your 'ramblings' article, and look forward to reading your perl6 *weekly's*
Kaiepi i've already done that, didn't make any difference 13:59
lizmat bazzaar: thank you for your kind words 14:01
poohman m: say "Hello" 14:55
camelia Hello
poohman m: my Str $contents = '{name: Winfred}{name: Asher}';$contents ~~ s/ '}'\s*'{' / '}' \n '{' /; say $contents;
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in single quotes; couldn't find final "'" (corresponding starter was at line 1)
at <tmp>:1
------> 3'}'\s*'{' / '}' \n '{' /; say $contents;7⏏5<EOL>
expecting …
poohman m: my Str $contents = '{name: Winfred}{name: Asher}';$contents ~~ s/ '}'\s*'{' / \n /; say $contents; 14:56
camelia {name: Winfred
name: Asher}
poohman m: my Str $contents = '{name: Winfred}{name: Asher}';$contents ~~ s/ '}'\s*'{' / '}\n{' /; say $contents; 14:57
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in single quotes; couldn't find final "'" (corresponding starter was at line 1)
at <tmp>:1
------> 3 s/ '}'\s*'{' / '}\n{' /; say $contents;7⏏5<EOL>
expecting …
poohman m: my Str $contents = '{name: Winfred}{name: Asher}';$contents ~~ s/ '}'\s*'{' / "}\n{" /; say $contents;
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in double quotes; couldn't find final '"' (corresponding starter was at line 1)
at <tmp>:1
------> 3 s/ '}'\s*'{' / "}\n{" /; say $contents;7⏏5<EOL>
expecting …
poohman hello everybody - any idea how I can include the braces also in the substitution? 14:58
moritz poohman: try "}\n\{" 15:01
poohman: {...} inside a double-quoted string starts a closure 15:02
poohman m: my Str $contents = '{name: Winfred}{name: Asher}';$contents ~~ s/ '}'\s*'{' / "}\n\{" /; say $contents;
camelia {name: Winfred "}
{" name: Asher}
poohman moritz - thanks - so the second brace made it think that it was a start of a closure?? 15:04
moritz poohman: correct 15:05
m: say "2 * 4 == {2 * 4}"
camelia 2 * 4 == 8
poohman moritz : thanks 15:06
one more question - when reading from files, we do have the lines method where it reads each line one after the other - do we have a possibility to read with user defined delimiters 15:09
\s* instead of \n - for example 15:10
moritz user-defined limiters are possible, but not regexes 15:11
docs.perl6.org/routine/open look for nl-in
SmokeMachine poohman: `words`wouldn't do what you want? 15:12
moritz but you can set it to [' ', "\n"] for example
poohman moritz : thanks - will try nl-in 15:16
Smokemachine : was trying to read Json records one after the other 15:17
lucasb AlexDaniel and others interested in the wiki idea: i.imgur.com/Iuq7VMC.png 15:19
moritz poohman: json can be completely without whitespace between tokens 15:23
Geth ¦ perl6.org: zoffixznet self-unassigned Implement Perl 6 Academy for use as call to action on marketing pieces github.com/perl6/perl6.org/issues/107 15:29
¦ marketing: zoffixznet self-unassigned Material to include in "Perl 6 Starter Kit" github.com/perl6/marketing/issues/14 15:31
poohman moritz : I was using the JSON::Class package and that writes one line after the other - so I am tryng to read it back 15:34
moritz poohman: but then reading line by line is more correct than splitting on any whitespace, no? 15:35
poohman so trying to have one record in one line and then read the each line to feed it to from-json 15:36
moritz that's a pretty common approach, yes 15:46
holyghost eco: AI::Agent 15:56
buggable holyghost, AI::Agent 'AI network Agent system': cpan.metacpan.org/authors/id/H/HO/H...2.1.tar.gz 1 other matching results: modules.perl6.org/s/AI%3A%3AAgent
holyghost eco: AI::Agent::Music
buggable holyghost, Nothing found
holyghost I hope AI::Agent and AI::Agent::Music compiles 15:57
scimon holyghost : Just got Install [FAIL] for AI::Agent:ver<0.1.24>:auth<CPAN:HOLYGHOST>:api<1>: Failed to open file /home/sproctor/.zef/store/AI-Agent-0.1.24.tar.gz/AI-Agent/lib/AI/Learn/NESMusicAgent.pm6 trying to install. 16:03
Have you looked at App::Mi6? It's GREAT module development. 16:06
jmerelo scimon: you got DM'd
Altreus capital S/// is return-a-copy, right? 17:14
timotimo yes 17:15
stmuk_ woolfy: Thanks! I'm hoping things will calm down soon 17:22
El_Che stmuk_: for max 6 months, sure. 17:28
Altreus so I should be able to do $a = $a.lc.trim ~~ S/// 17:29
Correct? :s
El_Che stmuk_: how is star coming along. We've had sole questions last week
timotimo that will not do what you hope for, Altreus 17:30
El_Che some
timotimo it'll take the result of the S/// and smartmatch it against the LHS, though it will set the LHS as the $_ of the RHS
El_Che tablet typing sucks
timotimo so essentially it'll result in False, unless the substitution did nothing in which case it would result in True
Altreus Is that because LHS of ~~ is not a variable? 17:32
not bindable, or some similar concept?
timotimo no, it's because S/// is an operator that immediately does something
Altreus But I thought it did it to the LHS of ~~ 17:33
otherwise surely it can only ever apply to $_
tony-o lizmat++
Altreus which is not true of lowercase s///
tony-o just read the blog
Altreus See 17:36
I told this non-programmer chap that in Perl6 we'd use ~~ instead of the .subst method
But now I'm thinking maybe not
I was like why use a method when there's an operator 17:37
timotimo i notice that i'm confused
i don't have a good explanation for why S/// and s/// behave so differently
Altreus tsuyoki naritai? did I get that right
timotimo paamayim nekudotayim 17:38
Altreus I did PHP for 4 years. You'll have to try harder than that.
timotimo i was not familiar with your term until now 17:39
moritz timotimo: the explanation has to do with smart-matching
timotimo moritz: s/// on its own also operates immediately, doesn't it?
moritz timotimo: it does
timotimo so the ACCEPTS method is called on the result of that, right?
moritz yes 17:40
but s/// can just return True
timotimo oh
moritz and True.ACCEPTS(anything) is always True
timotimo that makes total sense
moritz but S/// just returns the modified string
which is then passed to $lhs.ACCEPTS(...), where it's lost
Altreus total sense to you maybe 17:42
:P
This implies that $_ will be modified if I do $a ~~ s///
timotimo it's true! 17:43
Altreus It seems to me the whole point of doing that is to use $a *instead* of $_
on account of how I also write Perl5
this seems naughty
timotimo that's right
~~ binds $_ for you only in the right-hand-side of itself
so you don't have to my $_ := $a manually
Altreus ah! 17:44
so $a ~~ S/// is actually S'ing $a, but that returns a new $a, which is discarded
Whereas the lowercase s does ... something else, which $a can ACCEPT and thereby modify itself?
timotimo still not quite
let me try to desugar it somewhat
timotimo $a ~~ S/// works a lot like this: my $_ := $a; my $result = S///; return $result.ACCEPTS($a) 17:45
since S/// doesn't touch $_, it has no visible effect to the outside
and the result string will be used as the thing to smart match $a against 17:46
so you want the binding of $_, but not the match behaviour of ~~
that's why rakudo (should?) suggests using "given" instead
Altreus it did do that 17:47
and we followed suit
so the "side-effect" of mutating $_ is actually fine because ~~ gives us a super-local $_ for the purpose
Is .subst an acceptable alternative? 17:48
It seems a bit javascripty but I guess JS can be right sometimes
timotimo subst is an acceptable alternative 17:49
another is S[...] = ...
which is super funky
moritz wait what?
timotimo that doesn't exist? 17:50
m: my $_ = "hello"; my $result = S[ll] = 99; say $result; say $_
camelia Potential difficulties:
Redeclaration of symbol '$_'
at <tmp>:1
------> 3my $_7⏏5 = "hello"; my $result = S[ll] = 99; say
he99o
hello
timotimo m: $_ = "hello"; my $result = S[ll] = 99; say $result; say $_ 17:50
camelia he99o
hello
timotimo m: $_ = "hello"; my $result = S[l] = $++; say $result; say $_
camelia he0lo
hello
timotimo m: $_ = "hello"; my $result = S:g[l] = $++; say $result; say $_ 17:51
camelia he01o
hello
timotimo m: $_ = "hello hello hello"; my $result = S:g[l] = $++; say $result; say $_
camelia he01o he23o he45o
hello hello hello
moritz it just seems very weird to use an *assignment* to trigger a non-destructive substitution
timotimo :D 17:51
i did say it's super funky
Altreus I think I understand more things 17:53
Possibly not S[]
timotimo :D
Altreus unless I just pretend it's Perl5's substr all over again
timotimo how does that work?
do you assign into the result of a substr call to modify a string?
moritz substr($a, $from, $to) = $replacement
Altreus yes
timotimo ah
yeah, we do have substr-rw 17:54
moritz it's even *more* funky than that
Altreus but you can also just provide the replacement as the 4th parameter
moritz S[...], I mean
timotimo yeah, the thing about S[...] = ... is that it thunks the RHS
moritz because with s[...] = ... and the upper-case form, the right-hand side is evaluated for each match
Altreus well the other thing is that you had to set $_
I can do that anyway :P
I could have done that to solve my original question :D
wait hang on, this means that part of what I had was my $_ := $a.lc.trim; 17:55
I feel like there's a better way hiding in here 17:56
timotimo i'm not sure what code you're currently at, and what's bothering you about it
Altreus sorry, I was just thinking that when I did $a.lc.trim ~~ S///, the smartmatch put the trimmed string in $_
Altreus which means even though the expression looks immutable I could have used s/// on it ... which makes me feel like I could have got the mutated string more easily somehow 17:57
timotimo oh 17:57
m: my $a = " HELLO "; $a.lc.trim ~~ s/ll/0/; say $a; 17:58
camelia Cannot modify an immutable Str (hello)
in block <unit> at <tmp> line 1
timotimo you can not use s/// there
it binds to $_ rather than assigning to it
Altreus That's a concept I'm still trying to get installed into firmware 17:59
timotimo binding and first-class lvalues is quite a thing 18:03
mst AlexDaniel: if sigyn eats a bot, you can '/msg sigyn unkline nick' while +o, or you can pok me or other staff in #freenode 18:09
mst heh 18:54
weird connections, 2018 edition: somebody I was talking to from a completely unrelated channel is about to wave at Dan Sugalski from me
[Coke] oh, hi dan. 18:56
tony-o 19:04
Kaiepi finally got zef reinstalled! 19:07
the problem was a segfault in the code i was writing that was silent
mst Crouching Tiger, Hidden Segfault 19:09
pirateFinn mst: Compiling Tiger, Hidden Segfault 19:10
Currently lacking more amusing words that sound like Tiger 19:11
buggable New CPAN upload: LibUUID-0.2.tar.gz by CTILMES cpan.metacpan.org/authors/id/C/CT/...0.2.tar.gz
tadzik timer?
boris bye 19:19
leont Honestly, that ticket is harmful and depressing 19:42
And embarrassing
leont I'm not sure what's going on in people's heads, but IMNSHO closing it until everyone can adult again would be preferable over letting this continue 19:45
jdv79 where's dan 19:50
i went to a parrot talk of his at mit way back in the day. so long ago.
tony-o leont: #33 ? 19:52
lizmat will not be the one closing #33 19:53
El_Che link?
the old perl5 tracker thingie?
tony-o it's issue #33 on the gh rakudo repo
El_Che thx
mst github.com/perl6/user-experience/issues/33
tony-o mst++
El_Che ow 19:54
it looks like a reddit discussion
leont 317 people including me could technically do just that, I just don't quite feel like I have to mandate to do so by myself
mst El_Che: the reddit threads have been much more pleasant tbh.
El_Che yeah, you and stmuk agreeing and all 19:55
it's christmas time already
mst that or the apocalypse
or given the drama llama infestation, possibly the alpacalypse 19:56
tony-o lol
El_Che after 1 too many family come together I kind of wish for the apocalyps
masak this is #perl6, we don't do Apocalypses 19:58
jdv79 what do we do then?
El_Che drama 19:59
mst which day was bingo again? 19:59
El_Che thursday mostly except when it's fajita evening
does php5 era code run unaltered on php7? 20:00
asking for a friend
jdv79 i doubt it
El_Che "damn", she exclaims 20:01
jdv79 got tests? :)
it might be small changes
*only*
mst I've got to admit, that thread basically seenms to be "a bunch of people very clearly need to have a conversation ... but really aren't in a mental state where they can have that conversation constructively currently" 20:02
El_Che it's actually a third party app: cnmonitor.sourceforge.net/
needs php5 according to the doc, but I see sec support end in december for php5
(I could run centos, they will support it for ever :) )
El_Che s/I/she/ :) 20:03
jdv79 i'd just try it
php is a shit storm overall though so good luck
El_Che yeah, I want to move it to a container, but I need to figure how to add support for SAML or OpenID-connect 20:03
probably through a apache module in front 20:04
jdv79 i've never had less fun than when i php 20:05
El_Che jdv79: the time I used php was for calling a perl5 script with an include :) 20:05
jdv79 that sums it up pretty much
El_Che cgi on the cheap
:)
leont I closed it. foregiveness > persmission 20:09
SmokeMachine How can I make my custom sequence, when `my @a = MyCustomSequence.new` make @a be lazy?
Geth ecosystem: shintakezou++ created pull request #415:
Add Xmav::JSON to ecosystem
20:10
leont my @a := MyCustomSequence.new is the easiest way I think 20:11
El_Che Without going into the core issue (I have vent my opinion), one must wonder how silly we must look from the outside
SmokeMachine m: my @a = Seq.new: ^Inf .iterator; say @a.is-lazy # like this, but not with Seq...
camelia True
El_Che s/vent/vented/
mst happily I don't think the outside is really paying attention
SmokeMachine m: my @a = class :: does Sequence { method iterator { ^Inf .iterator } }.new; say @a.is-lazy # like this, but not with Seq... 20:12
camelia False
El_Che mst: you're making it worse :)
mst: luckily for you, p5p seems to be less heated nowadays
AlexDaniel leont++ # emotions are indeed too high 20:14
El_Che I think a cooling period is in order indeed, but ignoring the real problems is not a solution either. Luckily, it does not looks like a people problem to me, even if everyone seems entrenched in his/her position. 20:18
The worst short term outcome is people burning out and leaving
stmuk_ El_Che: wrt to star answer. I put a RC tarball link on the channel several days ago but (rather like 6.d) it was lost in the noise 20:18
El_Che it looks damn close to me
El_Che stmuk_: mea culpa indeed. Sorry for my part of the noise. 20:19
stmuk_ pl6anet.org/drop/rakudo-star-2018.10-RC1.tar.gz
El_Che thx, so we can inform star users asing about it
AlexDaniel yeah, concerns and options should be discussed, but it does not seem to be possible right now
stmuk_ I'll probably firm up and build binaries over the w/e 20:20
SmokeMachine m: my @a = Seq.new: ^Inf .iterator; my @b = class :: does Sequence { method iterator { ^Inf .iterator } }.new; say [@a.is-lazy, @b.is-lazy] 20:20
camelia [True False]
SmokeMachine why @a is las and @b isn't?
stmuk_ (unrelated to current events since it was mentioned earlier in the year this will be my last star release for a while)
AlexDaniel stmuk_++ # thank you for your work 20:21
El_Che stmuk_: I hoped it was a heat of the moment decision and you'd reconsider. Whatever you do, thx for the work
jdv79 mst: except it was (is?) on hackernews 20:23
mst the 6.d release announcement was
jdv79 but meh
mst I've not seen significant attention to the arguments
jdv79 yeah, a handful of comments 20:24
El_Che mst: it's completely gibberish from the ouside, as we don't even agree on the problem how can we get the solution right
El_Che funny how that is a good thing PR wise in this case 20:24
tony-o stmuk_++ 20:26
El_Che stmuk_: do you pass star to a new maintainer? 20:27
leont Yeah the release announcement contained a fair amount of gibberish. A clear case of "we haven't done this before".
It's a long list of titles without explanation. Some are grokkable by themselves, many are not. 20:28
stmuk_ El_Che: I have a nice hat here with a star on it 20:32
El_Che: would suit you sir!
:>
El_Che hehe, I wasn't applying for the job :) 20:33
SmokeMachine m: my @a = Seq.new: ^Inf .iterator; my @b = class :: does Sequence { method is-lazy { True }; method iterator { ^Inf .iterator } }.new; say [@a.is-lazy, @b.is-lazy] 20:39
camelia [True False]
masak m: say "netsplit" 20:54
camelia netsplit
masak m: say "net" ~ "split" 20:54
camelia netsplit
timotimo m: say "net".split() 20:55
camelia Cannot resolve caller split(Str: ); none of these signatures match:
(Str:D: Regex:D $pat, $limit is copy = Inf;; :$v is copy, :$k, :$kv, :$p, :$skip-empty, *%_)
(Str:D: Str(Cool) $match;; :$v is copy, :$k, :$kv, :$p, :$skip-empty, *%_)
timotimo m: say "net".split("")
camelia ( n e t )
jdv79 The Net was from another time
masak m: say "net".comb 20:57
camelia (n e t)
jdv79 what's the diff for in the output? 20:58
timotimo empty string in the front and back
masak split cares about gaps, and there are gaps at the ends 20:59
comb cares about the characters, and there are only three of those
timotimo welcome to the interнет
jdv79 the "gist" output isn't very clear in that case
the .perl version is much more clear 21:00
whatever
masak Python kinda has a point there, defaulting to some variant of .perl
or rather, the REPL always prints the repr() of things, but print an array and all its contents is repr()'d 21:01
jdv79 i get it. such is the gist tradeoff.
timotimo we should perhaps move to using put almost all the time on here
jdv79 but a newbie will be confused
timotimo to hammer it into our branes
m: put "net".split("")
camelia n e t
timotimo that's even worse!
masak heh
jdv79 i can see this being in a faq "did you try .perl?"
masak Perl 6 has way to many was to stringify things 21:02
ways*
jdv79 meh, they are kinda good in specific cases
timotimo oh hey masak
i have a question for you
AlexDaniel branes xD
timotimo since you tend to be quite good at explaining stuff, and know a whole bunch
jdv79 maybe it should switch the stringification method contextually? :)
timotimo what are the DWIMs and WATs of Any's "i'll behave as a list of a single item" behaviour? 21:03
i seem to barely ever stumble upon that in actual code i write
so when someone on twitter exclaimed "omgwtfbbq" i wasn't able to immediately give good examples of the trade-offs involved 21:04
SmokeMachine m: my @a = Seq.new: ^Inf .iterator; my @b = class :: does Sequence { method iterator { ^Inf .iterator } }.new.cache; say [@a.is-lazy, @b.is-lazy] 21:50
camelia [True True]
SmokeMachine shuldn't PositionalBindFailover call `.cache` on `@b = SomeKindOfSequence.new`? 21:51
Xliff help, please? :) gist.github.com/Xliff/eb76df40cca7...ccd1e8e082 22:16
SmokeMachine m: class A does Sequence { method iterator is rw { ^Inf .iterator }; method cache {1, 2, 3} }; my @a = A.new; say @a # should it be a array of a list or just a list? 22:44
camelia [(1 2 3)]
lucasb well, since the heated issue was closed and the weather looks calmer now I plan to submit a issue requesting a wiki, ok? It has nothing to do with naming, so no troubles :) 22:48
done here: github.com/perl6/user-experience/issues/34 22:50
ryn1x Is there a dynamic variable that shows if you are using v6.c from v6.d? 22:52
m: use v6.c; say $*PERL;
camelia Perl 6 (6.c)
ryn1x m: use v6.d; say $*PERL;
camelia Perl 6 (6.d)
ryn1x oh...
maybe it just doesnt work in the REPL... 22:53
SmokeMachine m: class A does Sequence { method iterator is rw { ^Inf .iterator } }; my @a = A.new; say @a # is it expected?
camelia [(...)]
SmokeMachine shouldn't be [...]? 22:54
timotimo i think it needs to be Iterable to be "extracted" into the array 22:58
SmokeMachine that's what I don't want... 23:00
Id like something like Seq...
m: my @a = Seq.new: ^Inf .iterator; say @a[0]
camelia 0
timotimo m: say Seq.^mro 23:01
camelia ((Seq) (Cool) (Any) (Mu))
timotimo m: say Seq.^mro(:all)
camelia Unexpected named argument 'all' passed
in block <unit> at <tmp> line 1
timotimo m: say Seq.^roles
camelia ((Sequence) (PositionalBindFailover) (Iterable))
SmokeMachine PositionalBindFailover makes the trick
timotimo see, Sequence doesn't imply Iterable
SmokeMachine rakudo.party/post/Perl-6-Seqs-Drug...tothecache 23:02
m: say Sequence.does: PositionalBindFailover
camelia True
timotimo assignment isn't binding
the PBF will happen when you pass something to a function or method for example if there's an @-sigiled parameter 23:03
SmokeMachine m: my @a = Seq.new: ^Inf .iterator
camelia ( no output )
SmokeMachine m: my @a := Seq.new: ^Inf .iterator
camelia Type check failed in binding; expected Positional but got Seq (?)
in block <unit> at <tmp> line 1
SmokeMachine timotimo: I think the name is bind, but it works for assignment... ^^ 23:04
timotimo perhaps it only works for the binding we have for signatures
ryn1x Is it possible to `use v6.c` in the repl?
SmokeMachine m: my @a = Seq.new: ^Inf .iterator # timotimo: here its working... 23:05
camelia ( no output )
SmokeMachine timotimo: thanks! 23:07
Xliff help, please? :) gist.github.com/Xliff/eb76df40cca7...ccd1e8e082 23:21
Xliff Nevermind. Figured it out. 23:41
Xliff Post updated with solution -- gist.github.com/Xliff/eb76df40cca7...ccd1e8e082 23:52