»ö« 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.
Geth ¦ problem-solving: AlexDaniel assigned to jnthn Issue What can and what cannot be changed in 6.c-errata? github.com/perl6/problem-solving/issues/62 00:48
devz3ro have a perl6 newbie question, anyone have a minute? I'm sure it's simple 02:05
vrurg devz3ro: if you're still here... 02:19
yoleaux 14 Jul 2019 08:12Z <SmokeMachine> vrurg: isn't Sparrow6 a replacement for puppet, ansible and stuff like that? pulp is much simpler! and about Red, no problem... take your time!
14 Jul 2019 08:15Z <SmokeMachine> vrurg: thanks!
devz3ro currently using - my @lines = 'list.txt'.IO.lines; 02:31
the list.txt is a file of strings 02:32
devz3ro I'm trying to grep out some text in the list - for @lines -> $line { if $line.grep(/fox/) { put $line; } } 02:35
this works
what i'm trying to do is print out the next member of the array that follows that match 02:36
someone pasted the answer before, but I don't think I asked it correctly, it only worked with integers 02:37
vrurg First of all, you do eager reading here. I.e. you fetch all your lines into memory at once by assigning to an array. With $file.IO.lines.grep: /fox/ you'd have lazy fetching. 02:40
Another thing: you apply .grep to a scalar $line. This is a perfomance loss because $line gets converted into a list first – .grep is a sequence method. 02:41
devz3ro so if I have something like this 02:42
my @lines = <the quick brown fox jumps over the lazy dog>;
how do I print out a match of "fox" but also "jumps"
without knowing what "jumps" is 02:43
vrurg I'm trying to work out a working solution. Actually, what you need is .keys method applied to the output of .grep applied to .lines. .keys will provide you with indicies. 02:44
But that's just a start point. Because for a lazy sequence which you get it would be tricky. 02:45
I have another approach in mind by need to check if it works.
devz3ro well this might make things easier
cause in this text file I have, I *think* I can create hashes, just not sure how to do it for everything 02:46
because every 2 lines should be paired
vrurg What if two sequential lines match? 02:49
You get the first and the following, then the second and the following? I.e. second match appears twice? 02:50
devz3ro in my case they won't ever
first line has text, second has a url, third has text, fourth has a url 02:54
and so on, alternating
for a lot of lines :) 02:55
that's why I was relying on grep to match the line, but I need to grab the line immediately following which has the url that's paired with the match
vrurg Too late, I'm making stupid mistakes. But basically your pipeline shoud be .lines.kv.grep( { what you need } ) 02:57
.kv gives you index => line Pair. 02:58
devz3ro so back to this example
my @lines = <the quick brown fox jumps over the lazy dog>;
how can I pair them 02:59
vrurg Oops. because it's .pairs, not .kv
devz3ro or how could I print out "the quick" then "brown fox" ..
vrurg my @l = "revision.p6".IO.lines; @l.pairs.grep( { .value ~~ /"==="/ } ).map( { @l[.key, .key + 1].join("\n") } ).join("\n").say 03:01
That's it. It's drops lazyness, but does what you need.
You can move on from this point. Unfortunately, I need to go. 03:02
devz3ro will check, thanks for your time 03:03
vrurg welcome! :) 03:04
o/
vrurg devz3ro: I've what was wrong wuth my solution for lazy sequence from lines. 03:11
"revision.p6".IO.lines.pairs.grep( { state $last = False; my $p = $last; $last = .value ~~ /"==="/; $p || $last } ).values».say
It still could be optimized, but it demonstrates the principle. 03:12
devz3ro is there anyway to loop this? 03:13
with prompt being the grep
I can probably figure that out 03:14
this at least gets me started, thanks again
vrurg welcome and now I'm certainly away! :) 03:15
sisar I see that the docs.perl6.org uses the word 'routine' and 'method' interchangeably. Are they in fact the exact same thing? 03:56
sisar Oh, and also the words 'function' and 'subroutine'. Can someone please clarify them for me ? 04:24
uzl sisar: From what I understand, a routine is an umbrella term for both subroutines and methods. 04:25
sisar And function? 04:26
uzl Yeah, subroutines (subs for short) are the equivalent of functions in other programming languages
sisar: A method could be considered a subroutine that knows the class it belongs to. However, Perl 6 makes this distinction more apparent, in relation to plain subs, by using the `method` keyword. 04:28
sisar ok, that kinda makes sense. 04:29
sisar thanks ! 04:29
uzl sisar: No problem!
sisar Do you think it makes sense to ave this as an FAQ ? Is this confusion a common one ? 04:30
*have
uzl sisar: If you look at docs.perl6.org/language/functions, there's a short discussion about the use of the terms 'routine'. 04:33
sisar uzl: ah ! Thanks! 04:34
uzl sisar: So playing with Perl 6? Having fun?! 04:35
sisar I used to play with it quite a few year ago. Trying to pick up again, since I've forgotten most of it. And those were my undergrad days. Now that I'm a more experienced programmer, I think i can appreciate it better. 04:37
And yes, I'm having fun! :-)
uzl Oh, great! The documentation will certainly be useful to help you remember stuff. Make sure to raise an issue (github.com/perl6/doc) should something in there be unclear or sound wacky ;). 04:40
m: class A { has $.meth; submethod TWEAK { $!meth = &self::do }; method do { 'do' } }; A.new 04:41
camelia ( no output )
uzl m: class A { has $.meth; submethod TWEAK { $!meth = &self::do }; method do { 'do' } }; A.new.meth
camelia ( no output )
uzl m: class A { has $.meth; submethod TWEAK { $!meth = &self::do }; method do { 'do' } }; A.new.meth() 04:42
camelia ( no output )
uzl m: class A { has $.meth; submethod TWEAK { $!meth = &self::do }; method do { 'do' } }; A.new.meth().put
camelia Use of uninitialized value of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.

in block <unit> at <tmp> line 1
uzl It seems nobody is around. I'll have to leave this question here lest I forget tomorrow. 04:45
Is it possible to assign methods to variables and pass them around as arguments inside the class akin to subroutines? I know there are accessible by either self. or self! inside other methods but I'm wondering I can pass a method's code object as an argument to another method. 04:46
uzl goes away. 04:48
Xliff \o 05:14
m: say "a9873fd1" ~~ /<[0..9a..f]> ** {8, 17}$/ 05:15
camelia 「d1」
Xliff m: say "a9873fd1" ~~ /<[0..9a..f]> ** 8$/
camelia 「a9873fd1」
Xliff m: say "a9873fd1" ~~ /<[0..9a..f]> ** 17$/
camelia Nil
Xliff m: say "a9873fd1" ~~ /<[0..9a..f]> ** 8,17$/
camelia 5===SORRY!5===
Unrecognized regex metacharacter , (must be quoted to match literally)
at <tmp>:1
------> 3say "a9873fd1" ~~ /<[0..9a..f]> ** 87⏏5,17$/
Unable to parse regex; couldn't find final '/'
at <tmp>:1
------> 3say "a9873…
05:16
Xliff m: say "a9873fd1" ~~ /<[0..9a..f]> ** {8,17}$/
camelia 「d1」
Xliff How do I match 8 OR 17 chars?
m: say "a9873fd1" ~~ /<[0..9a..f]> ** [8,17]$/
camelia 5===SORRY!5=== Error while compiling <tmp>
Quantifier quantifies nothing
at <tmp>:1
------> 3say "a9873fd1" ~~ /<[0..9a..f]> **7⏏5 [8,17]$/
Xliff m: say "a9873fd1" ~~ /<[0..9a..f]> ** 8 | <[0..9a..f]> ** 17]$/
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse regex; couldn't find final '/'
at <tmp>:1
------> 3 /<[0..9a..f]> ** 8 | <[0..9a..f]> ** 177⏏5]$/
expecting any of:
infix stopper
Xliff m: say "a9873fd1" ~~ /[ <[0..9a..f]> ** 8 | <[0..9a..f]> ** 17 ] $/ 05:17
camelia 「a9873fd1」
Xliff ^^ That seems to take too many characters. Is there a shorter way?
Xliff m: say "a9873fd1" ~~ /[ <xdigit> ** 8 | <xdigit> ** 17 ] $/ 05:21
camelia 「a9873fd1」
xdigit => 「a」
xdigit => 「9」
xdigit => 「8」
xdigit => 「7」
xdigit => 「3」
xdigit => 「f」
xdigit => 「d」
xdigit => 「1」
Xliff m: "a9873fd1" ~~ /[ <xdigit> ** 8 | <xdigit> ** 17 ] $/; $/.Str.say 05:22
camelia a9873fd1
Xliff m: "a9873fd1" ~~ /[ <xdigit> ** 8 | <xdigit> ** 17 ] $/; $/.say
camelia 「a9873fd1」
xdigit => 「a」
xdigit => 「9」
xdigit => 「8」
xdigit => 「7」
xdigit => 「3」
xdigit => 「f」
xdigit => 「d」
xdigit => 「1」
Xliff m: "a9873fd1" ~~ /[ <xdigit> ** 8 | <xdigit> ** 17 ] $/; $/.Str.say
camelia a9873fd1
Xliff m: "a9873fd1" ~~ /(0[ <xdigit> ** 8 | <xdigit> ** 17 ]) $/; $/say 05:23
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3<xdigit> ** 8 | <xdigit> ** 17 ]) $/; $/7⏏5say
expecting any of:
infix
infix stopper
statement end
statemen…
Xliff m: "a9873fd1" ~~ /(0[ <xdigit> ** 8 | <xdigit> ** 17 ]) $/; $/.say
camelia Nil
Xliff m: "a9873fd1" ~~ /( [ <xdigit> ** 8 | <xdigit> ** 17 ]) $/; $/.say
camelia 「a9873fd1」
0 => 「a9873fd1」
xdigit => 「a」
xdigit => 「9」
xdigit => 「8」
xdigit => 「7」
xdigit => 「3」
xdigit => 「f」
xdigit => 「d」
xdigit => 「1」
Xliff :/
¯\_(ツ)_/¯
tadzik woot, lizmat keynote \o/ 05:42
foldr Is it possible to give Zef a list of packages and have it create an archive with those packages and all their dependencies in it? 09:31
lizmat not afaik, but ugexe might know 09:32
foldr I'm looking for a nice way to deploy a Perl 6 app to a server without running Zef on the server (I want all the dependencies to be inside my app's .deb file). 09:33
moritz foldr: docker is the simplest way to do that 09:35
foldr Oh no, nightmares. 09:36
Ok, I'll figure something out.
I think I'll just configure Zef to put the packages in a local directory and then ship that with my app. 09:37
moritz if you writing something similar to dh-virtualenv for Perl 6, that would be very awesome :D
foldr If I find the time I'll write a Nixpkgs thing for Perl 6 packages.
Been on my todo list for a while but it's a lot of work. 09:39
El_Che foldr: do you have root? 09:40
foldr Yeah, otherwise I couldn't run apt-get install. 09:47
El_Che I ask because rakudo is not yet relocable 09:48
foldr Oh, I'll run it in a chroot anyway, with systemd RootDirectory.
El_Che install rakudo-pkg on a staging server, install the needed modules as root in /opt/rakudo-pkg using the included zef and tar /opt/rakudo-pkg 09:49
moritz didn't somebody make moarvm relocatble?
foldr I build Rakudo with Nix so the path will be in /nix/store.
El_Che ok, you need to build with that path then 09:49
foldr My .deb file will contain a minimal file system and the Nix store, and I run it with systemd RootDirectory setting which sets up a chroot. :)
El_Che (if you want to include the runtime there instead of sysmtewide) 09:50
foldr: no experience with nix so far, more into containers in integration for my apps
moritz: I think lizmat posted something about it, but I don't know rakudo supports it yet
lizmat .ask jmerelo will the rendered chinese documentation also be linked from docs.perl6.org ? 09:51
yoleaux lizmat: I'll pass your message to jmerelo.
foldr El_Che: when you say install the packages with zef into /opt/rakudo-pkg, where would zef get the packages from?
foldr If it gets them from GitHub or CPAN then that'd be a problem because I can't deploy when those are down or the package has been deleted. 09:52
Which is why I'd like to have them inside my package when doing a release (failing release is better than failing deploy). 09:53
What I think would work is: the release script calls zef install, with zef configured to store the packages in some specific temporary directory. Then, the release script copies them into the to-be-released archive, together with Rakudo and my own code. 09:54
lizmat weekly: blogs.perl.org/users/ovid/2019/07/t...-riga.html 09:55
notable6 lizmat, Noted!
foldr Thanks for the help, I'll give this a try and see how far I can get :) 09:57
The --contained flag may be helpful as well.
El_Che foldr: I was thinking installing in /opt/rakudo-pkg but the provided root zef and create a new deb from /opt/rakudo-pkg. If you want to compile the runtime yourself, it can be off course an other dir 09:59
zef will get the packages from the internet on your staging machine, not on the target host 10:01
you can even remove zef from the dir at package time
foldr Is /opt/rakudo-pkg some special directory? 10:02
Ah, I see: github.com/nxadm/rakudo-pkg
El_Che no, the one that I picked up for compiling rakudo 10:03
the point is that /opt/rakudo-pkg is selfcontained
all the deps are there 10:04
and the only extra package is zef, which is configured to install in /opt/rakudo-pkg
foldr But what about packages from modules.perl6.org?
El_Che (root zef, there is also a user zef install script to install libs in your home)
El_Che /opt/rakudo-pkg/bin/zef install blah 10:04
it will download from there 10:05
foldr Will it put those modules in /opt/rakudo-pkg too?
El_Che yes
foldr Ah thanks, makes sense.
El_Che the recommended way is a user zef, for most use cases
but the zef is there for global installs like your use case 10:06
foldr Well I don't want a global installation of Rakudo on my server, because globals are the root of all evil. But since I'm in a chroot I can just put /opt/rakudo-pkg inside the chroot. :) 10:09
El_Che yeah, it's not ideal for now. Things will get easier
I'll re-evaluate stuff once rakudo is relocatable. 10:10
for now the usecase I had in my mind was: regular system (os packages), docker (os packages) and build from source for everything else 10:11
foldr I'm basically doing Docker except without Docker and with systemd RootDirectory. :D 10:11
nine El_Che: it's possible to build a relocatable rakudo
El_Che nine: that wonderful news 10:12
's
nine In fact I think that's even the default nowadays. There's a --no-relocatable Configure.pl flag 10:14
nine moritz: I wonder what the need for virtual env is with Perl 6? Considering that we can install multiple versions of a distribution. 10:14
El_Che nine: I'll experiment with it 10:15
moritz nine: isolation 10:17
nine: if I install several applications on one system, I don't want this to mask a missing depencency, for example
El_Che I would use this soundtrack: www.youtube.com/watch?v=7Mz5AEgE24o 10:18
moritz: I would prefer a system where an app is packaged with all its dependencies, and why not, the runtie 10:19
runtime
moritz that's basically what dh-virtualenv does (all libraries, though not the runtime) 10:20
El_Che well, without the complexity of an extra system
no magic variables or links
just like a jar or go binary (if runtime included)
most *env and *brew system I came across are more of a development thing and not a deployment strategy 10:21
foldr If your app can run in a chroot then relocatability is not an issue. 10:23
El_Che yeah, but that doesn't solve the dependency problem. Deploying a jar or go binary is a bless. Deploying python or perl 5 and I want to stab in my own eyes 10:24
foldr But if it's not, and not being able to relocate, then the trick is simple: use content-addressable storage.
El_Che foldr: the world moved to containers. Drop app, run it. No extra configs needed/desired 10:25
foldr Yeah that works too, I haven't found a container solution without nightmares.
El_Che foldr: I am not saying it's the best, but those are the expectation of people deploying your code
foldr I'm not touching Docker with a ten foot pole anymore, I've learned my lesson. 10:26
El_Che we've been running containers for ages, without trouble
foldr: use podman
foldr But chroot always worked, so I use that. :)
El_Che foldr: if you can get it automated on scale, sure
tadzik foldr: hehe, what happened? 10:27
(with the lesson)
El_Che (we build images with buildah, and run machines with devs with podman as Docker runtime. Evaluating podman for the Nomad cluster) 10:29
foldr tadzik: disk filling up with old images, containers not starting, containers not connecting to each other, data being deleted that shouldn't be, and so on. I'm sure there are solutions to these problems, but my favorite solution is to just avoid it altogether. 10:30
El_Che There is considerable investment to get it right
foldr Whereas really the only isolation I want is the file system.
El_Che we simplified the network and firewalling setup by using ipv6
images are on a artifact server not on the hosts running the container 10:31
so, yes, there is overhead work involved
tadzik foldr: nodnod. To be fair, sounds like some of the problems you describe could be attributed to the misuse of docker and friends, but I do agree that docker is a bit tricky to get right and doesn't make the right thing very obvious 10:32
not sure if/what is better than that, docker is the only real experience that I havei
El_Che lots of infra required to get it right: load balancer, CI, git repos to tricker img building and deployment, orchestrator, shared storage (if needed), firewalling 10:34
and I am probably forgetting the half
artefact repository for images
tadzik well, you don't neceserilly need all of this, fwiw
I run a teamspeak server in a docker and it needed none of that :) 10:35
El_Che security scanner for images (<--- this is nice)
tadzik: of course, not. I run my home infra on containers and I don't have all that :)
tadzik :)
El_Che I meant for work-like-setups
tadzik my experience doesn't reach far enough for anything inter-host
patrickb El_Che, nine: The flag was renamed from --no-relocatable to --relocatable and rakudo defaults to building non-relocatable to not break the loads of edge cases that the relocatable build can not accomodate for. 10:36
tadzik mostly just boils down to "let's slap this into a docker so it's less annoying"
El_Che well, in my experience is better to handle inter container/inter host traffic through the load balancer
patrickb: thx for the info. Relocable allows to create macos images and linux tar.gz. For the packages itself is it less relevant, I think 10:37
although it would be cool to copy the runtime from the system when packaging an app 10:38
patrickb: are this edge cases known? I can't think of one. 10:41
nine patrickb: ah, yes, that fits better with my memory. Tures out I haven't updated rakudo on my laptop for quite a while 10:52
El_Che: yes, they appeared during the phase when relocatability was the default
bbkr hi. will 2019.07 be relased this week? 11:09
El_Che releasable6: status 11:10
releasable6 El_Che, Next release will happen when it's ready. R6 is down. At least 1 blocker. 666 out of 714 commits logged
El_Che, Details: gist.github.com/fe6fe0769d4bda7342...ef141e144f
El_Che bbkr: it looks it's getting very close
bbkr yay, IO::Socket::Async memory leaks fixes incoming :) 11:12
tyil :o
hype
tyil I have a sub in a module in which I use LogP6, and in the module I call get-logger("s").warn("warning"). if I call the sub, however, I see no output at all, and the docs aren't very clear to me as to why this is 11:14
anyone here who is well versed in LogP6? :p 11:16
foldr How does Perl 6 know what to set $?DISTRIBUTION to? Does it derive the path from PATH6LIB? 11:36
I couldn't find any docs on distribution/resources. 11:37
Although docs.perl6.org/language/modules mentions distributions and file system layouts. 11:38
patrickb El_Che: An example would be building Moar, NQP and Rakudo in separate prefixes. 11:40
Or OpenBSD where relocatability is currently not supported.
foldr It seems like it derives the path to the distribution either from the compunit's path or from PERL6LIB. 11:51
foldr Obviously from the former, yeah. Because PERL6LIB can consist of much more than that. :P 11:52
foldr p6: my &postfix:«->@*» = { .List }; say [1, 2, 3]->@* 12:35
camelia (1 2 3)
ugexe foldr: each CompUnit::Repository sets it however they know how 12:42
when you do -I . instead of -I lib and there is a META6.json file then the meta6.json data is used
with -I lib (which isn't pointing at a META6.json file) it must be derived as you noted 12:43
with installed modules it does a variant of the former 12:45
foldr Ah. I should write a META6.json file. 12:46
foldr Oh that's really nice, mapping from package names to file names. 12:50
Configuration over Convention :) 12:51
foldr I wonder why provides entries must include lib/ but resources entries must not include resources/. 12:59
uzl Hello! So I've a quite specific question about the MAIN sub. 13:20
I've put it: github.com/uzluisf/question-main 13:21
patrickb lizmat: ^ That might be one for you. 13:22
lizmat weird way to ask a question, but will mention it in the P6W :-) 13:23
uzl This is another question: colabti.org/irclogger/irclogger_lo...07-15#l140
lizmat: Yeah, I could've done here but irc isn't the best for long-ish question 13:24
uzl Would SO be a better alternative? 13:24
lizmat uzl: there is also StackOverflow
yes
both questions are prime SO candidates :-) 13:25
uzl lizmat: I'll do that then.
lizmat uzl++ 13:26
timotimo wiki.gnome.org/Projects/Clutter/Apocalypses - is the apocalypse/exegesis/synopsis thing actually common? i first saw it for perl6
patrickb timotimo: I'm pretty sure it's a Larry invention. 13:28
timotimo: And I can't imagine the clutter guys accidentally came up with the same scheme, so I suspect they copied from p6. 13:29
timotimo cool
moritz and larry stole it from the bible 13:30
masak .oO( thou shalt not steal [except concepts and digital information, which is basically copying, so it's fine] ) 14:21
El_Che "Every artist is a cannibal/every poet is a thief/all kill for inspiration/and then sing about the grief." (U2, The Fly) 14:24
:)
foldr Poets are very good at obscuring their crimes. 14:34
El_Che foldr: you should meet more Perl 6 programmers 14:35
(who said something about bodies in the closet! Shut up!) 14:36
ugexe foldr: because modules don't have to go into lib/ (although lots of tooling naively expects this) 14:43
resources do have to go into a specific subdir because items under resources/libraries get special naming applied (foo -> libfoo.so) 14:44
ugexe it is also so a CompUnit::Repository can know where resources are located 14:45
ugexe when you do -I $some-dir-without-meta6 CompUnit::RepositoryFileSystem assumes resources is in $some-dir-without-meta6.parent.child('resources') 14:46
foldr ugexe++ thanks! 14:53
lizmat weekly: dev.to/antoniogamiz/work-report-week-7-4dna 14:57
notable6 lizmat, Noted!
antoniogamiz noisegul: thanks for the reporting! 15:05
antoniogamiz s/reporting/report 15:06
noisegul antoniogamiz: Hey no problem, I'm actually unsure whether I was missing something there, so it's more like a question/report, depending on the situation. 15:13
antoniogamiz noisegul: I have already published a new version that should be installed correctly 15:20
at least in the CI environment it is installed without problems
noisegul antoniogamiz: will take a look at it right away :) 15:21
TreyHarris .tell tbrowder No, I'm an idiot (or rather, used a new Git interface I wasn't used to for a thing I don't do often--which is much the same as idiocy, anyway), and for the past year I thought I was pushing to origin when I was pushing to my private fork--nobody dropped any issues for the past year so I didn't notice. I'm trying to unspool them into stuff that can be reviewed easily. Give me a week 15:43
yoleaux 14 Jul 2019 23:40Z <tbrowder> TreyHarris: ^^^?
TreyHarris: I'll pass your message to tbrowder.
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2019/07/15/...mentation/ 15:59
tbrowder TreyHarris: thnx, no rush, just checking! 16:07
yoleaux 15:43Z <TreyHarris> tbrowder: No, I'm an idiot (or rather, used a new Git interface I wasn't used to for a thing I don't do often--which is much the same as idiocy, anyway), and for the past year I thought I was pushing to origin when I was pushing to my private fork--nobody dropped any issues for the past year so I didn't notice. I'm trying to unspool them into stuff that can be reviewed easily. Give me a week
pamplemousse lizmat++ #p6weekly 17:19
Geth ¦ problem-solving: AlexDaniel assigned to jnthn Issue Should `without` allow chaining? github.com/perl6/problem-solving/issues/63 17:53
Geth ¦ problem-solving: AlexDaniel self-assigned [WIP] Decluttering of the language and other things github.com/perl6/problem-solving/issues/64 18:05
tyil matiaslina: thanks for the responses on github, I'll continue with playing around tomorrow :) 18:44
matiaslina you're welcome tyil :) 18:51
just ping me if something comes up or leave an issue
tyil will most certainly do ^_^
if youre interested, I made Matrix::Bot using your Matrix::Client as a base for it (friends asked me to make a Matrix bot instead of an IRC bot) 18:52
matiaslina already seen that on the weekly 18:54
super cool!
matiaslina I can drop some tips tonight if you want 18:55
noisegul Are there Rakudo (not Rakudo Star) release builds for Windows currently? 18:56
tyil matiaslina: would be much appreciated, I dont know Matrix as well as I do IRC :p 18:58
matiaslina Will do then ^^ 19:00
I'm trying to keep the docs/ updated with descriptions and examples
or in the examples/ directory 19:01
so anyone can have some sort of guide :p 19:02
tyil for now I'm already happy there's a module at all, so I don't first have to read through the entire API spec to make one :p 19:13
AlexDaniel tyil: oooooooooooooooooh 19:20
tyil: niiiiiiice
tyil: how similar is it to IRC::Client ? 19:21
tyil I'm taking a lot of inspiration from it, making it plugin-based and using multi-subs for handling events
AlexDaniel noisegul: no, but this is likely to change a bit later this year
tyil I have the tiniest of working prototypes 19:22
gitlab.com/tyil/sjon/blob/master/l...on.pm6#L13
AlexDaniel` test
AlexDaniel :S
the bridge is still very slow
tyil matrix.org is very slow
AlexDaniel or maybe that, yeah
tyil their room told me I shouldn't make use of their api at all because its already overloaded 19:23
(instead of just telling me where their docs are on their request limits)
noisegul AlexDaniel: alright, thanks
AlexDaniel well… is it possible to run your own bridge, or something? 19:24
tyil I don't intend to take on the technical debt of setting up matrix
and then maintaining it
AlexDaniel yeah
I run my own homeserver but maintaining bridges and stuff I don't want to do… 19:25
tyil besides, there's also some technical issues that I would like to see resolved before considering it
such as their current inability to trash old logs
I'm not sure if they understand not everybody is going to rent an enterprise cluster just to chat
matiaslina AlexDaniel: you can run your own bridges, but the IRC bridge on matrix.org works great for me, so I don't have the need 19:31
AlexDaniel` well, have you noticed how slow it is? 19:32
also there was a longstanding bug when some messages were simply not shown
I think it was related to special characters in nicknames, and that was recently fixed
but omg that bug was there for a loooooong time
matiaslina lol, didn't even check what is the difference on matrix and on irssi 19:34
I dont use irc that much :p
but yeah, there was some time when the bridge was super buggy
TreyHarris Does anyone here happen to know what on GitHub the little box badges on comment lines like "Member", "Owner", etc. are called? "badge" means something else to GitHub. (I know what they're for, I'm looking for wmhat they're called so I can find docs and APIs.) 19:41
Xliff <bbkr> yay, IO::Socket::Async memory leaks fixes incoming :) 19:45
bbkr: Where did you hear that?
ugexe TreyHarris: its something like Organizational Context 19:48
TreyHarris ugexe: Hmm... I was specifically wondering if the Sponsor button could result in a vanity badge for participants in comment lists or commit lists like "Member" and "Owner", but if it's a "context" I'm guessing not 19:49
ugexe thats what it was called in some UI component I used. or rather OrganizationalSomeComponentContext 19:51
veesh is there a recursion limit in perl6? 20:50
timotimo yeah, your RAM 20:55
veesh lol 20:57
it doesn't seem to eat up my ram as fast as I thought it would
learning about ackermann functions
timotimo could be because it's slow :( 20:59
the more frames on the stack, the more the GC has to do, but it shouldn't be that bad 21:00
patrickb vrurg: Do you think you can find some time this week to have another look at the Mac spaces in path problem? 21:07
veesh timotimo: it seems to run pretty fast, I'll check how slow this sort of thing is meant to be 21:10
i'm memoizing, so i think it doesn't get so bad
at least in terms of stack frames
masak oooh! Ackermann function :D 21:11
masak I have a real memory about that from my... well, not childhood really, but early formative years 21:12
I grew up with Turbo BASIC (honk if you did, too)
veesh i grew up with gamemaker 5.... 21:13
i feel young
masak in the standard distribution of Turbo BASIC, there was a file called ACKERMAN.BAS
El_Che isn't .BAS basic? 21:15
masak it is.
El_Che ah, lol
I read "Turbo Pascal"
masak I just downloaded a copy. it has detailed instructions for how to run it.
Xliff Is there a perl6 equivalent to the command: "openssl rsautl -decrypt -inkey $keyFile"?
El_Che I need to stop fast reading stuff
ugexe my first program was in the tile-based workflow programming language in the ps1 game Carnage Heart
masak my version, as I reacall it, just had the exclamation "ACKERMANN!"
I was very confused
to me as a 12-ish-year-old, the rest of the code was just random math. not sure I even paid attention to the weird recursion in the middle. 21:16
El_Che I only remember GORILLAS.BAS
masak that's QBasic/QuickBasic
Xliff masak: *honk*
masak El_Che: this was before that
Xliff: <3
Xliff Ahhh... Delphi and .PAS 21:17
Xliff What was that.... eventually it all became Borland, right? 21:17
masak El_Che: I did do some Turbo Pascal too, though. TP was *fast*. both in compilation and in the compiled machine code.
ugexe Borland C++ Builder was good
masak Xliff: Borland made Turbo BASIC.
I still have the manuals at home. massive nostalgia value. 21:18
Xliff masak: Right. They also created Delphi and Turbo Pascal.
masak right.
El_Che Lazarus was the name on linux later on, I think
masak and Anders Hejlsberg is hiding in there somewhere.
Xliff Got my first real programming job working in Delphi.
ugexe the VCL was great for bangin out windows apps 21:19
masak looking at ACKERMAN.BAS now, it's pretty clear to me they were using it as a benchmark and not much else
Xliff masak: Where are you looking at to see ACKERMAN.BAS? 21:20
masak maybe also for checking correctness (since they would've known the correct answer to `FNack%(3,6)`)
Xliff: I googled "ACKERMAN.BAS Turbo Basic" and got a hit on some .ua FTP site 21:21
Xliff Oh, nice! 21:22
.oO( So why am I getting Bas Ackermann? )
masak Turbo BASIC was _very_ formative for me 21:23
looking back, I must've written hundreds of small programs/games/whatever
and somewhere even picked up patterns and good-ish habits 21:24
I will forever keep hoping that Dijkstra was wrong about BASIC forever corrupting programmers beyong repair... :P
beyond*
Xliff LOL
masak also interesting from a Perl perspective: Turbo BASIC had sigils, but it put them at the end 21:25
I will just note that while I was a BASIC programmer, I never much cared about the sigils. I guess they felt like excessive type annotations to me at the time 21:26
it was definitely possible to just code without them
Xliff Wow! It was less than 30 lines!
masak yeah. I mean, it's fairly readable. BASIC is an Algol, after all.
"END IF". boy, does that take me back. 21:27
these days, I spell that `}` :P
Xliff Yes. Nice nostalgia hit, but I will keep my Perl6. :P
And that's one less EC2 action down. I think I'm in the 60's now. 21:28
64
That's out of.... lots.
masak oh! interesting tidbit related to that: I believe Dylan got that one right. in Dylan, you can write either `end`, or `end module airport` (repeating the opener) 21:29
meanwhile, in bash: `fi`, `esac` -- a relic from Algol68 21:30
in many ways we're very much similar to what Algol60 gave us, syntactically. in other ways not... :) 21:33
masak re "I will keep my Perl 6" -- yes, of course 21:42
I feel the biggest difference between the BASICs and Pascals back then, even C implementations; and the modern-ish dynamic languages of today: Perl, Python, Ruby, etc -- is that dynamic allocation became a lot more natural and a lot less "ritualistic" 21:43
when the "stigma" of allocation goes away, one is much more likely to allocate something dynamically
think about JavaScripdt: just by writing `{}`, you've dynamically allocated a new object on the heap. you hardly felt it. 21:44
significantly, I meet junior programmers daily these days who simply don't consider that cost. to them, a dynamic allocation is no worse than a static one. 21:45
Xliff m: (15..30).Str.say 21:47
camelia 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Xliff Crap. I was hoping to get just the min/max value from that. :/
m: (15..30).min.say 21:51
camelia 15
timotimo m: (15..30).gist.say
camelia 15..30
Xliff m: (015..030).min.say 21:52
camelia Potential difficulties:
Leading 0 has no meaning. If you meant to create an octal number, use '0o' prefix; like, '0o15'. If you meant to create a string, please add quotation marks.
at <tmp>:1
------> 3(0157⏏5..030).min.say
Xliff :(
m: (15.. 30).min.say
camelia 15
wildtrees if .* on m:ex// is matching too much, how do I exclude matching a few characters from .* ? 21:59
sena_kun .*?
or do you want something else? 22:00
can you provide an example?
m: say 'asdf' ~~ m/.*/; 22:01
camelia 「asdf」
sena_kun m: say 'asdf' ~~ m/<-[f]>/;
camelia 「a」
sena_kun m: say 'asdf' ~~ m/<-[f]>*/;
camelia 「asd」
sena_kun ^ everything but 'f'
wildtrees sena_kun, yea that is working nicely now, thanks 22:03
timotimo pays no respects
sena_kun m: enum A <One Two>; say A('One'); 22:20
camelia (A)
sena_kun what is DWIM here?
m: enum A <One Two>; say A(A.enums<One>); # hmmm 22:22
camelia One
ugexe m: enum A <One Two>; say +A::Two
camelia 1
SmokeMachine m: use Pod::To::Markdown; use MONKEY-SEE-NO-EVAL; say EVAL "=head bla\n$=pod"
camelia ===SORRY!===
Could not find Pod::To::Markdown at line 1 in:
inst#/home/camelia/.perl6
inst#/home/camelia/rakudo-m-inst-2/share/perl6/site
inst#/home/camelia/rakudo-m-inst-2/share/perl6/vendor
inst#/home/camelia/rakudo-m-inst-…
SmokeMachine m: use Pod::To::HTML; use MONKEY-SEE-NO-EVAL; say EVAL "=head bla\n$=pod" 22:23
camelia ===SORRY!===
Could not find Pod::To::HTML at line 1 in:
inst#/home/camelia/.perl6
inst#/home/camelia/rakudo-m-inst-2/share/perl6/site
inst#/home/camelia/rakudo-m-inst-2/share/perl6/vendor
inst#/home/camelia/rakudo-m-inst-2/sh…
Xliff How can you set and export and env variable in Perl6? 22:51
vrurg .tell patrickb Can't promise, but I think it will be possible. 23:04
yoleaux vrurg: I'll pass your message to patrickb.
timotimo Xliff: you just put it into the env hash, doesn't that work?
Xliff No. 23:07
I had to add it to the command line invocation, or my code wouldn 23:08
*wouldn't work
ugexe m: %*ENV<FOO> = 42; say qx/echo $FOO/ 23:10
camelia 42
Xliff Hmm.... 23:13
OK. I will circle back, later.
ugexe++
.oO( But when I tried it... it didn't work... )
23:14
github.com/Xliff/p6-Amazon-AWS-EC2...d6c1ea0714
ugexe are you spawning a process through nativecall?
Xliff No.
235,193 lines of Perl6 code in the last 13 months. :) \o/ 23:15
timotimo haha, what's with the 30 empty lines at the end of META6.json 23:23
Xliff timotimo: LOL. Somehow those keep getting added when I run the dependencies script. That script the files to META6.json, automatically. 23:24
Thought I had fixed that. :P
Plus... META6.json is not counted in code line counts. :)
HAH! Think I found it. 23:27
Xliff timotimo: github.com/Xliff/p6-GtkPlus/commit...fab1f12ed5 23:32
timotimo :) 23:32
SmokeMachine Hi guys! is there a better way to do this? github.com/FCO/pulp/blob/master/li...rkdown.pm6 23:46
it's working, and it's README.md was created with this... but is there a better way to do that?
timotimo have you had a look how mi6 does it? 23:47
SmokeMachine timotimo: no, I haven't! good idea! thank you very much!
timotimo: it seems to be almost the same (or am I loosing something?) github.com/skaji/mi6/blob/master/l...6.pm6#L137 23:49
timotimo well, that's a good sign :) 23:50
SmokeMachine timotimo: but it uses the file name (that I can't, because Im using "memory files"...)
s/memory/virtual/
timotimo: :) 23:51
timotimo: thank you for you help! :)
vrurg: Hi! was I wrong? wasn't sparrowdo a puppet alternative? 23:52
vrurg SmokeMachine: No. My point was only to consider if it worth spending llimited resources on something what is already implemented. The key word is 'limited' here. :) 23:53
Yet, anyway: you wanted to implement it and the result is very elegant, to my view! 23:54
SmokeMachine vrurg: :) thanks... I'm having to use gulp at work, so what the best way to understand it than writing my own gulp? :P 23:55
s/what/what's/