🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
00:07 markong left 00:11 vrurg left 00:17 Kaiepi joined 00:21 Altai-man_ joined, cpan-raku left 00:24 sena_kun left 00:30 cpan-raku joined, cpan-raku left, cpan-raku joined 00:45 vrurg joined
rypervenche So I've been working on moving my current Bash backup script over to Raku and adding some new features to it. I'm currently writing it as a single script and very functionally, but I was thinking of breaking it out into a real Raku module and not having it all cluttered in a single file. 00:53
I also have some resources (like my rsync exclude list and rsync options) that I think would make sense to have in separate files. Does anyone know of any good examples of a good module that I could use as an example? 00:54
Or any ideas of how I might break this up into different parts? I'm not sure if I would be wanting to make classes or simple keep it the way it is, but put parts into different files and simply call them in the main one: gist.github.com/rypervenche/b18cc7...9b479bfe03 00:55
01:09 molaf left 01:22 molaf joined
Voldenet my approach might be wrong, because I'm a oop junkie, but I'd definitely make roles/classes out of this (so, for example mounts-file processor is a class, fsck accepts this class and so on) 01:30
and ofc, I'd get rid of anything that looks like global state, because I dislike having that - I'd rather have complex description of everything in my MAIN file, but again, it's only my preference 01:33
01:37 ensamvarg3 joined
Voldenet m: class Mounts-File { has IO $.path = "/proc/mounts".IO }; say Mounts-File.new.path; say Mounts-file.new(path => "/whatever").path 01:38
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
Mounts-file used at line 1. Did you mean 'Mounts-File'?
Voldenet m: class Mounts-File { has IO $.path = "/proc/mounts".IO }; say Mounts-File.new.path; say Mounts-File.new(path => "/whatever".IO).path 01:39
camelia "/proc/mounts".IO
"/whatever".IO
Voldenet That's very java-like approach tho 01:40
rypervenche Oooh, I'll do that. Thanks for the advice. 01:53
01:55 codesections left 02:02 Manifest0 left 02:03 Manifest0 joined 02:22 sena_kun joined 02:24 Altai-man_ left 02:33 Zero_Dogg left 02:47 Zero_Dogg joined 03:34 guifa left 03:42 kktt joined 04:21 Altai-man_ joined 04:23 sena_kun left 04:30 kktt007 left, kktt007 joined 04:36 vrurg left 04:37 vrurg joined 04:41 vrurg left 04:49 molaf left 04:59 hungryd11 joined 05:03 hungrydonkey left 05:16 vrurg joined 05:29 ufobat joined 05:41 helit left 05:51 kktt left 06:09 guifa joined 06:14 kensanata joined 06:22 sena_kun joined, hungryd11 left 06:23 Altai-man_ left, hungrydonkey joined 06:38 guifa left, hungrydonkey left, wamba joined, hungrydonkey joined 06:43 hungryd76 joined 06:45 hungrydonkey left 06:51 vrurg left 06:52 vrurg joined 06:54 gordonfish left 06:57 vrurg left 07:05 patrickb joined, dolmen joined 07:10 dolmen left, rbt left 07:11 rbt joined 07:24 Sgeo left 07:28 abraxxa joined 07:32 vrurg joined, abraxxa left 07:33 abraxxa joined 07:44 pecastro joined 07:50 cpan-raku left 07:51 dakkar joined 07:52 cpan-raku joined, cpan-raku left, cpan-raku joined 07:53 leont joined
cpan-raku New module released to CPAN! Math::Libgsl::RandomDistribution (0.0.1) by 03FRITH 08:13
08:19 oddp joined 08:21 Altai-man_ joined 08:24 sena_kun left 08:40 vrurg left 08:41 vrurg joined 08:44 vrurg left 08:52 rindolf joined, pilmihilmi joined
pilmihilmi I'm poking around in NQP and wanted to ask weather maybe the Precedence Parser of NQP can be implemented in Raku Grammar or weather the constructs used are NQP lowlevel specific? 08:54
I'm talking about this code: github.com/Raku/nqp/blob/master/sr...r.nqp#L384 08:55
moritz pilmihilmi: I don't think there's any magic in there that would prohibit a raku-level reimplementation 08:56
pilmihilmi: in fact, for my book I've implemented a simple precedence parser (only infixes, IIRC) in raku 08:59
(chapter "Case Studies" of www.apress.com/us/book/9781484232279) 09:01
pilmihilmi moritz: That sounds promising. But for instance cursor_start_cur() and $termcur.MATCH(), what type of raku grammar primitives could I use to implement these? The code also sets the pos of the match. I'm not really fluent in raku but it seems readonly property etc... 09:06
jnthn pilmihilmi: I don't think you'd want to translit it that directly; a bunch of what you see in there is optimization based on knowing internals. 09:09
When I've done OPP I've declared proto tokens for infix/prefix/postfix/term, written a rule like rule EXPR { <termish> [<infix> <termish>]* }, with token termish { <prefix>* <term> <postfix>* }, and then done the precedence sorting in an action method. 09:12
(My factoring was a bit different. In operators I did `make Foo::Infix::Add`, for example, and had a `prec` method on that class, for the precedence sorting, and then made a new instance of that type for the AST node in EXPR) 09:13
09:18 rbt left, rbt joined, vrurg joined 09:19 vrurg left, vrurg joined
pilmihilmi jnthn: moving precedence sorting to the action is a good hint. One thing I wonder still is weather the kind of dynamic parsing (try and backtrack like (I only sense it but am not really fluent in raku)) in the Precedence Parser of NQP is not really possible with raku? Is the NQP grammar exposing some internal/mechanisms that are closed in raku? It seems the "cursor" concept and calling "MATCH" seems NQP-only? 09:21
moritz pilmihilmi: an OPP shouldn't make the grammar backtrack 09:23
pilmihilmi jnthn: I'm trying to understand how the code is working because the grammar building on it is so exceptionally small and nice to read...
moritz pilmihilmi: I'd recommend you start with the examples in my book, they have a simple explanation using Raku code only 09:24
it only handles infixes, but contains some hints on how to expand it to other operator types and associativity and so on 09:25
jnthn pilmihilmi: MATCH is something that's called for you provided you're writing stuff as a token/rule rather; those calls are really it "pretending" to be the regex engine 'cus it's written out as a method
pilmihilmi moritz: Is Apress books distributed as pdf or do I need to intsall some proprietery program in linux? 09:30
moritz pilmihilmi: if you buy through apress, you get a watermarked (with your name) but DRM-free PDF 09:33
I believe you also get an .epub copy, but I'm not entirely certain
09:39 kktt007 left 09:41 kktt007 joined 09:45 markong joined 09:52 ensamvarg3 left 09:54 kensanata left
pilmihilmi moritz: currently stuck in payment limbo, but asking Stringer Customer Service now... 09:58
jnthn: May I aske weather there is some resources that describe the internals of the grammar system of raku, something like a raku-grammar-guts ? 10:00
jnthn I'm not aware of one. 10:04
(I figured it out by reading the implementation. Or perhaps by writing a few parts of it. :)) 10:06
10:07 Petr37 joined, Petr37_ joined 10:08 pilmihilmi left, rindolf left, oddp left, patrickb left 10:09 m0ltar_ left, Noisytoot left, xinming left, aluaces left, kybr left, vike left 10:10 pilmihilmi joined, rindolf joined, oddp joined, patrickb joined, m0ltar_ joined, Noisytoot joined, xinming joined, aluaces joined, kybr joined, vike joined
Petr37_ nice day)) where i can find simple module example? 10:10
10:11 Petr37 left 10:12 [Coke] left, [Coke] joined, [Coke] left, [Coke] joined
lizmat .tell Petr37_ modules.raku.org/dist/Today:cpan:ELIZABETH 10:13
tellable6 lizmat, I'll pass your message to Petr37_
10:13 Petr37 joined
lizmat modules.raku.org/dist/Today:cpan:ELIZABETH # Petr37_ 10:13
modules.raku.org/dist/Today:cpan:ELIZABETH # Petr37
10:14 MilkmanDan left 10:15 MilkmanDan joined 10:16 Petr37_ left
Petr37 lizmat, thanks! all i need)) 10:18
all models open source?
10:22 sena_kun joined
dakkar Petr37: there's a LICENSE file that contains the Artistic License, so yes ☺ 10:22
lizmat yeah, I'd say everything on modules.raku.org is open source in one form or another :-) 10:23
10:23 Altai-man_ left 10:25 kensanata joined 10:26 JJMerelo joined
JJMerelo m: print "Hello" | "Goodbye" 10:26
camelia HelloGoodbye
JJMerelo m: put "Hello" | "Goodbye" 10:28
camelia Hello
Goodbye
Petr37 interesting... what about compiled (bytecode) modules? 10:29
without source?
dakkar I'm pretty sure there aren't any on modules.raku.org 10:30
Geth_ advent: 832514df46 | (Tom Browder)++ (committed using GitHub Web editor) | raku-advent-2020/authors.md
remove tbrowder
10:31
Petr37 thanks 10:32
lizmat Petr37: that would really be up to packagers
10:33 aborazmeh joined, aborazmeh left, aborazmeh joined
Petr37 lizmat, ok) 10:35
10:37 JJMerelo left 10:40 JJMerelo joined
JJMerelo m: printf( "%.2d", ⅓ | ¼ | ¾ ) 10:41
camelia 000000
JJMerelo m: printf( "%.2f", ⅓ | ¼ | ¾ )
camelia 0.330.250.75
JJMerelo m: printf( "%.2f ", ⅓ | ¼ | ¾ )
camelia 0.33 0.25 0.75
Geth_ doc/master: 4 commits pushed by (JJ Merelo)++ 10:44
JJMerelo Not clear from above because it's in the body of the message, but the 6.d documentation issue is now closed 10:47
holyghost I'm doing some scheme, java tokenizers, streams, collection actors. It's something different for pm.org
10:50 molaf joined
Geth_ doc: 61f469a19d | (JJ Merelo)++ | doc/Type/independent-routines.pod6
Minor corrections to put
10:57
linkable6 Link: docs.raku.org/type/independent-routines
11:02 Petr37 left
JJMerelo notable6: weekly the 6.d spec has been totally documented github.com/Raku/doc/issues/2632 11:03
notable6 JJMerelo, Noted! (weekly)
11:05 pilmihilmi left
Geth_ doc: a11a097157 | (JJ Merelo)++ | META6.json
Bumps up META version
11:05
11:06 travis-ci joined, travis-ci left
JJMerelo So there's a new release of the documentation, FWIW 11:13
oddp Slick! Thanks for the continuous work! 11:17
11:26 vrurg left, MasterDuke left 11:27 vrurg joined 11:31 vrurg left
[ptc] JJMerelo++ 11:40
holyghost nice work, JJ 11:44
11:46 molaf left, pilmihil` joined
pilmihil` moritz: Got the pdf now. Nice book, thanks. 11:46
12:02 vrurg joined, vrurg left 12:03 vrurg joined
cpan-raku New module released to CPAN! Hash2Class (0.0.2) by 03ELIZABETH 12:13
12:21 Altai-man_ joined 12:23 sena_kun left
lizmat JJMerelo++ 12:24
12:32 dolmen joined 12:39 wamba left 12:42 pilmihil` left 12:56 Benett left, Benett joined 13:03 vrurg left, sena_kun joined, vrurg joined 13:04 dataangel left 13:05 Altai-man_ left 13:07 vrurg left 13:09 aborazmeh left 13:10 molaf joined, sena_kun left 13:11 vrurg joined, sena_kun joined 13:21 rbt left
vrurg . 13:21
13:21 rbt joined 13:26 wamba joined 13:33 gordonfish joined 13:55 fling left 13:59 aluaces left 14:08 dolmen left 14:12 fling joined 14:18 codesections joined 14:21 Altai-man_ joined 14:22 patrickb71 joined 14:23 sena_kun left
[Coke] did a git pull --rebase, reconfig/build, still getting /Volumes/BUKKIT/Users/coke/p6/bin/nqp-m version 2020.06-9-gdb0c1088f is outdated, 2020.06-19-g3e928af0b expected. 14:24
14:24 dolmen joined
[Coke] (using the installed version and not the version we're currently building) 14:24
14:24 patrickb left 14:26 fling left
patrickb71 Coke, do you build nqp yourself or do you let the rakudo Configure.pl script do that for you? 14:27
[Coke] I let config.pl do it 14:28
I just did an rm ./nqp and am trying again, JIC
(if this works, guessing we need to update the NQP revision ref.) 14:29
(I also tend to include --force-rebuild)
14:31 sena_kun joined
patrickb71 Coke: I'm not entirely sure how exactly you do the build. Given you already had rakudo and nqp installed and then try to rebuild rakudo (irrespective of you deleting the `rakudo/nqp` folder) and *not* passing the `--gen-nqp` option is expected to result in the error you posted. 14:31
[Coke] /opt/local/bin/perl5.28 Configure.pl "--prefix=/Volumes/BUKKIT/Users/coke/p6/" "--gen-nqp" "--gen-moar" "--backend=moar" "--moar-option=--debug" "--force-rebuild" "--force-rebuild" $* 14:32
running that inside a long standing 'rakudo' clone. 14:33
patrickb71 Hm. I think that should work.
[Coke] (not sure why --force-rebuild is in there 2x)
looks like removing the nqp folder fixed it - guessing that we're missing an nqp commit that addressed something? 14:34
holyghost [Cokde] : you better build it cleanly if you can
[Coke] Yes, as I said, removing the nqp folder (which forces it to latest) avoided the issue. 14:36
14:37 sena_kun left
vrurg [Coke]: --force-build is there because this is what you used last time when ran Config.pl 14:38
[Coke] yes, didn't realize it wasn't de-duping. 14:39
patrickb71 vrurg: github.com/rakudo/rakudo/blob/mast...do.pm#L664 14:40
Does that line mean that once an nqp is checked out it won't change the checked out version?
[Coke] oh, that makes it look like force-rebuild is having kind of the opposite effect of what I expected.
[Coke] drops it from his default build. 14:42
holyghost good point 14:43
vrurg patrickb71: only when --force-rebuild is used. Because the option is mostly for development when one needs to test the exact combination of commits. 14:45
patrickb71 OK. Then it's clear why it behaved the way it did. 14:46
[Coke] Might be nice to change the force-rebuild help to indicate that (test currently checked out versions) as opposed to the negative phrasing currently there. 14:47
Thanks for the explanation, though, much clearer now
14:53 OpenZen joined
vrurg [Coke]: Agree. Hope I remember to do it later today when get some time. 14:55
holyghost you better dump the tarball explode, before you continue 14:57
14:58 kktt007 left 14:59 kktt007 joined 15:03 aluaces joined, aluaces is now known as alberto, alberto is now known as Guest30507 15:08 kktt007 left, fling joined, kktt007 joined 15:13 skids joined, yangzq50 joined 15:16 MilkmanDan left 15:21 molaf left 15:24 guifa joined 15:27 kktt007 left, kktt007 joined 15:31 gordonfish left 15:33 vrurg left 15:35 MilkmanDan joined
codesections are any `$=` variables other than `$=pod` currently implemented? I get `pod variable $=Foo not yet implemented. Sorry` when attempting to access any others, as described in the docs ( docs.raku.org/language/variables#The_=_twigil ) 15:36
15:36 vrurg joined 15:38 Guest30507 is now known as aluaces 15:47 gordonfish joined
guifa codesections: no. If you use =AUTHOR foo for instance, and then later say say $=AUTHOR, you get “Pod variable $=AUTHOR not yet implemented. Sorry.” 15:50
pod got the least attention for a while, but there are now people working on it so yay.
15:52 vrurg left 15:54 patrickb71 left
kawaii SmokeMachine: hello, I had some beginner questions for using Red, if you have time to help? :) 15:56
16:00 Sgeo joined 16:05 guifa_ joined 16:06 guifa left, guifa_ is now known as guifa
codesections :guifa Thanks. I'm hoping to be able to help with that work, though I probably need to learn a bit more about Raku and a lot more about Rakudo & NQP) before I can be of much help 16:12
guifa Yeah, I think we’ve hit the point where people are starting to look at long-term stuff more and more — where in-code documentation plays a huge role — and so the same usability kinks/quirks that early Raku went through we now to get to go through :-) 16:16
codesections :guifa "we’ve hit the point where people are starting to look at long-term stuff more and more"… unlike the last 20 years of Raku's development as a 100-year language, where everyone was focused on the short-term stuff :D 16:21
guifa haha
I meant long-term coding projects
As opposed to short-lived scripts / etc
codesections yeah, and it's a fair enough point. Just struck me as funny :) 16:22
16:23 Tirifto joined 16:24 Altai-man_ left
guifa Lately I’ve been playing around with doing more and more literate styles of documentation 16:26
16:26 wamba left
codesections Yeah, Pod6 really seems like it'd be a great fit for that style 16:26
guifa Which of course is what I feel like pod most lends itself towards, but I also wonder then how the bestw ays of presenting that on a user-facing side. I’m sure for comma it could have an code-“reading” style where the pod is rendered appropriately without the code, but it’s the creation of, e.g., a website documenting things that makes me most think about stuff 16:28
JJMerelo guifa: cool! 16:30
16:30 vrurg joined
guifa that’s why a link to a code object (me and ShimmerFairy were talking about it the other day) would be awesome, because right now, all of the awesome rakudocs are entirely separate from the code (speaking of, jjmerelo++) in order to enable the links 16:33
codesections Yeah, I've been thinking along vaguely similar lines. In my ideal world, `#|` declarator blocks could be used to extract more API-level docs, while the main Pod blocks could give a more "literate" feel for the code. And both could be automatically viewable online as HTML or locally (via man? info? as plain text?). But that's getting pretty far ahead 16:34
16:34 hungryd76 left
JJMerelo That's cool 16:35
codesections (Poking around with these sorts of ideas was what led me to realize that `#|` can't currently be used to document variables. But I opened an issue: github.com/rakudo/rakudo/issues/3804 16:36
)
JJMerelo For the time being, you need to explicitly mix code and documentation. doc renderers just extract the declaration part...
SmokeMachine kawaii: how can I help you? 16:37
JJMerelo codesections could you also please show the AST for that piece of code? I don't remember exactly how to do that, it's something like raku --ASt
Let me check
kawaii SmokeMachine: If I want to create a table with a combined primary key in Postgres, can I just use `is serial` on two items instead of `is column`? :) 16:38
16:39 dolmen left
JJMerelo codesections no, raku --target=optimize docs.raku.org/language/faq#Is_ther...f_the_AST? 16:39
SmokeMachine kawaii: yes, but `is serial` mean id + auto-increment, you probably want 2 `is id` instead
JJMerelo So you save your program to a file, and run that through raku --target=optimize, and it prints the AST so that we know why the pod is not assigned to the right declaration. 16:40
kawaii SmokeMachine: ah yes, I understand, I will try that now, thanks :)
SmokeMachine kawaii: like here: github.com/FCO/Red/blob/master/doc...rimary-key
16:40 dakkar left
codesections JJMerelo: Aha, I didn't understand what you were asking for. Will do! 16:41
kawaii SmokeMachine: I missed that, there is so much Red documentation it's hard to find specific things :)
JJMerelo codesections comments (and then pod6 sections) are part of the AST, so what way we know where they are and check if there's an arror
you can also use target=ast
SmokeMachine kawaii: that page is new... I really need some help to organise the documentation... 16:42
kawaii SmokeMachine: instead of using `has DateTime`, what can I use to get `timestamptz`, which is postgres-specific 'timestamp WITH timezone'? :)
SmokeMachine kawaii: you can use `is column{ :type<timestamptz> }` if I'm not remembering it wrong... let me take a look 16:43
16:44 defaultxr left, defaultxr joined 16:45 defaultxr left, defaultxr joined
kawaii SmokeMachine: I'll try like this `as DateTime $.last-updated is column{ :type<timestamptz> }` :) 16:45
16:46 JJMerelo left
SmokeMachine kawaii: yes, it should work... if it doesn't, please let me know 16:47
kawaii SmokeMachine: I think this error is unrelated, but I'm new to the lib and unsure :) www.irccloud.com/pastebin/6gtCMxno/
16:48 wamba joined
kawaii L17 is `Reputation.^create-table: :if-not-exists;` 16:48
SmokeMachine kawaii: sorry... I'll have to add that...
kawaii SmokeMachine: otherwise my script works fine if I just use the regular DateTime :) thanks for your help! 16:50
SmokeMachine: I note that Red has created column names using _ instead of - (which is totally fine in postgres if you wrap it in quotes i.e. `"user-id"`) is there a way to override this behaviour yet? :) 16:52
16:52 ufobat left
SmokeMachine kawaii: it seems I've forgot the default... :) 16:54
fixing it...
kawaii: not yet... 16:55
kawaii SmokeMachine: great, I'm going afk for 1hr or so, but feel free to ping me if there is stuff to test :)
I really love Red so far, even from making my first table :D
16:58 aluaces left
SmokeMachine :) 17:00
kawaii: that should be working now... 17:05
holyghost I've written some more jav actor objects in scheme, I'm writing a prologian parser for expanding delimiters in tokenizers 17:06
*java
and also a theorem prover for it
it endures though while parsing the delimiter 17:07
cpan-raku New module released to CPAN! Red (0.1.19) by 03FCO 17:08
holyghost The meaning is to caalculate the delimiter spces and so on 17:09
*spaces
17:10 Xliff joined
Xliff Holaaa.... 17:10
m: my rule mode { (<[ugo]>) (<[+-]>) (<[rwxstST]>) }; sub change ($mode where * ~~ &mode) { say $/.gist }; change('ug+rx') 17:11
camelia Constraint type check failed in binding to parameter '$mode'; expected anonymous constraint to be met but got Str ("ug+rx")
in sub change at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: my rule mode { (<[ugo]>) (<[+-]>) (<[rwxstST]>) }; sub change ( $mode where * ~~ &mode() ) { say $/.gist }; change('ug+rx')
camelia Too few positionals passed; expected 1 argument but got 0
in regex mode at <tmp> line 1
in sub change at <tmp> line 1
in block <unit> at <tmp> line 1
holyghost It's inside an utilities lib for scheme (the prolog and theorem prover system)
Xliff m: my rule mode { (<[ugo]>) (<[+-]>) (<[rwxstST]>) }; sub change ( $mode where * ~~ /<mode>/ ) { say $/.gist }; change('ug+rx')
camelia Constraint type check failed in binding to parameter '$mode'; expected anonymous constraint to be met but got Str ("ug+rx")
in sub change at <tmp> line 1
in block <unit> at <tmp> line 1
holyghost lol Xliff
Xliff m: my rule mode { (<[ugo]>) (<[+-]>) (<[rwxstST]>) }; sub change ( Str $mode where * ~~ /<mode>/ ) { say $/.gist }; change('ug+rx')
camelia Constraint type check failed in binding to parameter '$mode'; expected anonymous constraint to be met but got Str ("ug+rx")
in sub change at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: my rule mode { (<[ugo]>) (<[+-]>) (<[rwxstST]>) }; sub change ( Str $mode where *.match(/<mode>/) ) { say $/.gist }; change('ug+rx') 17:12
camelia Constraint type check failed in binding to parameter '$mode'; expected anonymous constraint to be met but got Str ("ug+rx")
in sub change at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: my rule mode { (<[ugo]>) (<[+-]>) (<[rwxstST]>) }; sub change ( $mode where *.match(/<mode>/) ) { say $/.gist }; change('ug+rx')
camelia Constraint type check failed in binding to parameter '$mode'; expected anonymous constraint to be met but got Str ("ug+rx")
in sub change at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff :(
m: my rule mode { (<[ugo]>) (<[+-]>) (<[rwxstST]>) }; sub change ( $mode where { .match(/<mode>/) } ) { say $/.gist }; change('ug+rx')
camelia Constraint type check failed in binding to parameter '$mode'; expected anonymous constraint to be met but got Str ("ug+rx")
in sub change at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: my rule mode { (<[ugo]>) (<[+-]>) (<[rwxstST]>) }; say 'ug+rx' ~~ &mode 17:13
camelia Nil
Xliff m: my rule mode { (<[ugo]>) (<[+-]>) (<[rwxstST]>) }; say 'ug+rx' ~~ &mode.gist
camelia False
Xliff m: my token mode { (<[ugo]>) (<[+-]>) (<[rwxstST]>) }; say 'ug+rx' ~~ &mode.gist
camelia False
Xliff m: my token mode { (<[ugo]>) (<[+-]>) (<[rwxstST]>) }; say 'ug+rx' ~~ &mode
camelia 「g+r」
0 => 「g」
1 => 「+」
2 => 「r」
Xliff m: my rule token { (<[ugo]>) (<[+-]>) (<[rwxstST]>) }; sub change ( $mode where { .match(/<mode>/) } ) { say $/.gist }; change('ug+rx')
camelia No such method 'mode' for invocant of type 'Match'. Did you mean any
of these: 'codes', 'made', 'make', 'none'?
in sub change at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: my token mode { (<[ugo]>) (<[+-]>) (<[rwxstST]>) }; sub change ( $mode where * ~~ &mode() ) { say $/.gist }; change('ug+rx')
camelia Too few positionals passed; expected 1 argument but got 0
in regex mode at <tmp> line 1
in sub change at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: my token mode { (<[ugo]>) (<[+-]>) (<[rwxstST]>) }; sub change ( $mode where * ~~ &mode ) { say $/.gist }; change('ug+rx') 17:14
camelia 「g+r」
0 => 「g」
1 => 「+」
2 => 「r」
17:19 melezhik joined
melezhik Hi! Does rakudo work on Mac OS? 17:19
lizmat melezhik: yes 17:20
melezhik what is the best way to install Rakudo on Mac?
lizmat I have no idea, I do a git clone and then build
but then again, I also have XCode installed
melezhik yeah, is it possible install with user, without root access?
providing that xcode is here 17:21
lizmat works for me :-)
guifa Building from source is also probably best right now. Current versions of macOS are starting to get insane about permissions for running non-code-signed software
17:22 aluaces joined, molaf joined 17:24 rbt left, rbt joined
holyghost melezhik : it does not go on powerpc mcs 17:24
*macs
17:25 melezhik left
Zero_Dogg How does rakudo-js actually work? Is it a transpiler or does it actually bundle an asm.js or similar build of rakudo? 17:33
kawaii SmokeMachine: tested, working, thank you so much! 17:36
[Coke] rakudo targets nqp - rakudo.js has a JS backend for NQP 17:37
17:37 Xliff left
[Coke] easiest way to use it is to install the NPM package. 17:37
SmokeMachine kawaii: \o/ 17:38
kawaii: would you mind to do me a favor?
kawaii SmokeMachine: I can certainly try? :) 17:39
holyghost js is cool
SmokeMachine kawaii: could you, please, create an issue to make it possible to change the table name?
[Coke] er, phrasing was weird there: NQP has a JS backend. (it also has a moarvm backend - the default, and a jvm backend)
kawaii SmokeMachine: I was just about to ask if you'd like me to do that :)
SmokeMachine kawaii: I mean a way to set the rule for the table name creation 17:40
:)
kawaii Yep, doing it now!
SmokeMachine kawaii: thank you very much
[Coke] .seen pmurias 17:41
tellable6 [Coke], I saw pmurias 2020-06-13T14:07:49Z in #raku: <pmurias> hi, I moved to Warsaw last Wednesday, any Raku folk living in the city?
17:41 patrickb joined
[Coke] .ask pmurias do you have directions on how to generate an updated npm module? Want to make sure we keep up to date on the rakudo.js versions if possible. 17:42
tellable6 [Coke], I'll pass your message to pmurias
kawaii SmokeMachine: 439 :) 17:43
17:45 pilne left
kawaii SmokeMachine: does Red have any regards to schema versioning? i.e. a future version of my program adds/removes or changes a column - is there logic in Red to handle this? 17:45
holyghost I'm going to continue on my scheme prolog parser 17:48
timotimo Zero_Dogg: it doesn't use anything like asm.js at the moment 17:59
SmokeMachine kawaii: not yet... but there is a long discussion about that... 18:00
kawaii: please, give me your opinions about that: github.com/FCO/Red/issues/15 18:01
18:06 MasterDuke joined, [Coke] left
SmokeMachine kawaii: and I've made some experimentation on that: github.com/FCO/Red/blob/master/lib/Red.pm6#L47 18:08
kawaii SmokeMachine: I asked my colleague who is far more experienced to comment on it, and he has :) 18:16
Zero_Dogg timotimo: so it pretty much runs an interpreter in the browser, then? 18:17
timotimo it translates nqp and raku code to javascript code 18:20
18:22 bocaneri left, sena_kun joined
vrurg .ask Xliff try PM me when available. 18:22
tellable6 vrurg, I'll pass your message to Xliff
18:24 xinming left
Zero_Dogg timotimo: okay, what I'm trying to figure out, is the overhead of translation *in browser* or at compile time locally when building the app? 18:25
18:26 xinming joined
SmokeMachine kawaii: thanks! 18:28
18:38 [Coke] joined
holyghost 19h o'clock, done coding, booze time ! 18:50
*20 o'clock :-) 18:53
18:55 sena_kun1 joined 18:56 sena_kun1 left, yangzq50 left, domm left
timotimo Zero_Dogg: rakudo has support for pre-compilation, i don't know how it behaves in the nqp backend, but there was something about precompiling stuff so that the test suite runs faster, so there is something somewhere 19:00
Geth_ ecosystem: 8d8d000b64 | thundergnat++ (committed using GitHub Web editor) | META.list
Add Gray::Code::RBC to the ecosystem

Add a reflected binary code Gray code encode / decode module
See github.com/thundergnat/Gray-Code-RBC
19:04
19:08 xinming left 19:13 xinming joined 19:14 molaf left 19:16 fling left
lizmat github.com/Raku/RSC/blob/main/anno...0200720.md # Raku Community to elect Raku Steering Council 19:28
holyghost I'm a supporter !
liz for president 19:29
and holly in the steering council !
19:31 xinming left 19:33 xinming joined
holyghost great idea 19:33
I am just a package writer though, end user :-)
good for JJ and liz 19:34
and moritz 19:36
the only ones I know :-)
I hope there's severl elections so we don't have a BDFL 19:40
*several
*electees 19:41
19:43 dataangel joined
holyghost lizmat : it stays a council right ? There's no dictator ? 19:44
lizmat It's all in github.com/Raku/RSC/blob/main/pape...il_Code.md 19:45
19:50 Black_Ribbon joined, xinming left
holyghost thx lizmat 19:52
I hope there's not too much flux 19:53
status-quo s if it were
*as
stable people, stable raku
maybe have some arch-overlords to delegate things also 19:54
19:54 xinming joined
holyghost ex-members 19:54
then wtching out for big changes as code can detoriate
*watching
that's all
cracker vs. hacker, holy wars, such things 19:55
thing is, I do support the candidtes, good choice for themselves 19:59
*candidates
19:59 MilkmanDan left
holyghost good input, good output 20:00
20:01 xinming left 20:03 xinming joined 20:06 Altai-man_ joined
holyghost So there's 7! (faculty) relations ... 20:06
which is better thn council of 13 (13!) :-) 20:07
*than a
stupid 'a' key
modular systems are all right FWIW 20:09
20:09 sena_kun left 20:10 cpan-raku left, xinming left 20:11 xinming joined, cpan-raku joined, cpan-raku left, cpan-raku joined, patrickb left
holyghost We're doing all right now, so a status-quo should be there 20:11
There is lots of output of perl6/rku
good talks on irc, and so on 20:12
*perl6/raku
a predictive MILESTONES file would be in order, for example, so people can add to it on the whole, as everything goes 20:13
the project leader of worldforge.org and inkscape.or told me that, back in the day
*inkscape.org
if you put something forward like that, everyone can contribute to its needs, today, tomorrow etc. 20:14
20:15 kensanata left
lizmat that will be something for when the RSC is actually elected 20:17
holyghost ok
a steering council should have its supporters, that's all
lizmat it should indeed 20:18
holyghost from here to there 20:19
20:21 wamba left 20:22 sena_kun joined 20:25 aborazmeh joined, aborazmeh left, aborazmeh joined
holyghost ok, I'm going to listen to some music 20:30
20:42 sena_kun left
oddp thanks a lot for yet another weekly edition! 20:43
20:44 kensanata joined
guifa lizmat++ 20:45
20:45 skids left
lizmat oddp guifa thank you 20:45
20:49 Tirifto left 20:56 molaf joined
guifa ponders what to do next in Intl 20:57
emoji annotations or spelled-out numbers
Altreus apparently "The use of `.result` in a `whenever` block is blocking." ... I assume this applies to `await` as well. Given that, how do I ensure I inspect the result of a promise (in order to get any errors) but without blocking the whenever? 20:59
or the react
holyghost guifa : SFY 21:00
Altreus oh do I just do whenever $promise inside the existing whenever?
Asking questions is a great way to suddenly realise the answer!
Altai-man_ Altreus, if you want to inspect result of a promise _eventually_, use .then.
If you are working with react|supply whenever -> yes, can just add another one on top. 21:01
lizmat Altreus: I'd say that's it, yes
Altreus okay, and what if I don't want to do anything on success? Is it bad form to have an empty whenever?
If I use the then form I have to get its result so at least there's something in it, but it seems unnecessary just to have words in the block 21:03
Altai-man_ lizmat, very cool weekly! Out of curiosity, no release mention? I kinda thought you kept it back a bit to add that.
lizmat no, I kept it back to get the election announcement in, because I was working on that as well at the same time 21:04
Altai-man_ I see, okie.
lizmat next week a proper announcement in RWN, with maybe a R* as well :-)
Altai-man_ While releasing I thought with me on board we probably had more "a week after" announcements than "in time" ones, so maybe people are used to it anyway. :> 21:05
lizmat in any case, now that the release is out again, I will be committing to master again :-)
Altai-man_ lizmat, please do! Also PR queue is growing and all that.
lizmat next weeks title: "Almost on time"
21:07 rindolf left 21:08 kensanata left 21:22 orinthe joined 21:24 dyske joined, dyske left 21:25 dyske joined, dyske left 21:26 dyske joined, dyske left 21:36 markoong joined 21:37 markong left
SmokeMachine m: role R {}; R.^add_method: "bla", -> {} # how can I add a method into a role? 21:40
camelia No such method 'add_method' for invocant of type
'Perl6::Metamodel::ParametricRoleGroupHOW'. Did you mean 'find_method'?
in block <unit> at <tmp> line 1
SmokeMachine m: role :: {}.^add_method: "bla", -> {} # and why does this work? 21:42
camelia ( no output )
SmokeMachine m: role :: {}.HOW
camelia ( no output )
SmokeMachine m: say role :: {}.HOW
camelia Perl6::Metamodel::ParametricRoleHOW.new
Altreus any kind advice on whether an empty whenever is idiomatically acceptable? :) 21:46
21:48 guifa left
lizmat what are you trying to achieve with it ? 21:58
all action as a side affect of the promise / etc
?
22:07 sena_kun joined 22:08 Altai-man_ left
SmokeMachine m: role R {}; R.^candidates.head.^add_method: "bla", -> {} 22:11
camelia ( no output )
22:20 maggotbrain left 22:21 maggotbrain joined 22:23 Petr37 joined
jnthn Altreus: Yes, if you're using the subscription to prevent termination of the enclosing `supply` or `react` for some reason, for example 22:24
SmokeMachine: A role declaration evaluates to the parametric role itself, but the name is a role group (for all roles with the same shortname); it's like a proto with multi candidates. 22:26
SmokeMachine: Also, .^add_method ao a composed role is risky in that roles are immutable (not to mention you won't get to close over the type variables)
s/ao/on/
22:27 markong joined, markoong left 22:30 dolmen joined
SmokeMachine jnthn: thanks 22:34
cpan-raku New module released to CPAN! JSON::Fast (0.13) by 03TIMOTIMO
timotimo ^- welcome to fast-town 22:35
jnthn SmokeMachine: What's your use case btw? I may be able to suggest something
SmokeMachine I'm adding a experimental code on Red. 22:36
like this: github.com/FCO/Red/blob/master/lib/Red.pm6#L47
but I have 3 classes that does a role that has methods that if it .^can a method, it does the experimental feature, otherwise it does the original feature 22:38
jnthn: ^ 22:39
jnthn Ah, but there' you're adding a role to a class, not a method to a role?
SmokeMachine on the new feature I'm working on it is a method on a role... 22:40
timotimo i imagine you can put a ^parameterize method somewhere that might add an extra role with that experimental feature in it
SmokeMachine www.irccloud.com/pastebin/jFOdWv8s/jnthn%3A
jnthn Yes, but even if you add a method to the role, it's absolutely not gonig to be propagated to any class that has already composed the role 22:41
That's what I meant by roles being immutable. 22:42
SmokeMachine yes, I got it... 22:43
any suggestion of hoe doing that?
www.irccloud.com/pastebin/odKB22Rz...20is%2Fwas
jnthn I wish I had ideas in spades, but alas... 22:44
I guess the problem is about the scope of this too
Is `experimental` meant to make these effects global? 22:45
SmokeMachine yes
at least for now
another option I thought was: if its using experimental, uses one role, and use a different role otherwise 22:46
jnthn Dunno, do you know all the classes that do the role? If so just add it to each of them. I mean, experimental things either go away or become none-experimental, so maybe beauty doesn't matter
That or just have a package Red::Experimental and set $Red::Experimental::Feature = True; or some such and then check the variable
SmokeMachine that makes sense... 22:47
jnthn Not everything has to be done with types :)
SmokeMachine and I have a list of all types... I can grep which uses that role...
23:04 dolmen left
SmokeMachine jnthn: ended up with: github.com/FCO/Red/blob/master/lib/Red.pm6#L48 23:21
jnthn: thank you!
jnthn Maybe .^compose after adding the methods? 23:23
SmokeMachine sure!
(but seems to be working...) 23:24
jnthn sleep time for me; 'night o/
SmokeMachine I'm fixing that! Thank you jnthn 23:25
23:31 aborazmeh left 23:35 pecastro left
cpan-raku New module released to CPAN! Red (0.1.20) by 03FCO 23:51
23:56 leont left