🦋 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:03 sena_kun joined 00:04 Altai-man_ left 00:19 lainon joined 00:26 AlexDaniel left 00:57 lainon left 01:03 oneeggeach joined, oneeggeach left 01:06 rir joined 01:14 rir left 01:18 Merfont left 01:20 holyghost left 01:27 oddp left 01:50 aleksb joined, aleksb left 01:51 aleksb joined 01:59 molaf left 02:01 Altai-man_ joined 02:04 sena_kun left 02:11 molaf joined 02:17 Xliff left 02:20 PavelB joined 02:22 rbt left 02:23 rbt joined 02:24 Cabanossi left 02:26 Cabanossi joined
codesections earlier, lizmat said that sending a file to the raku REPL would support multiline blocks better if the editor saved the text as a temp file (instead of essentially pasting it in). That made sense, and I've seen similar approaches in other languages/REPLs. However, unless I'm missing something, it looks like the temporary-file approach won't work either, because the REPL can't currently load a file 02:42
into the global namespace (only import Modules). Is that correct?
(Of course, that's a great design decision for the language as a whole, even if it makes setting up a REPL-driven workflow quite a bit more difficult) 02:43
(I'm basing my conclusion that the REPL can't load a non-module file on stackoverflow.com/questions/501199...epl-usage, combined with my inability to get it to do so. But that answer is a couple years old, and I'd love to learn that it's out of date now) 02:48
03:15 holyghost joined 03:35 stoned75 left 03:37 stoned75 joined 03:46 dolmen joined
rjbs Hey, I just found a crazy bug with rakudobrew and it seems so weird, but maybe (a) nobody uses rakudobrew anymore or (b) I am just an idiot. 03:53
03:53 notandinus left
rjbs If I initialize rakudobrew in my zshrc *after* plenv, then rakudobrew seems to put the path to the current perl shim into my PATH, which breaks using "plenv shell" subsequently. 03:54
If I put initialize rakudobrew *first*, it's fine. ???
03:54 zacts joined, team\andinus joined
rjbs Bleh, I see. rakubrew now, which wants me to do a curl pipe. 03:55
03:56 team\andinus is now known as notandinus 03:59 Merfont joined 04:02 sena_kun joined 04:04 Altai-man_ left
aleksb hi, if I want to create local modifications to a zef package (e.g. to fix a bug) for use in my own projects, what is the easiest way? 04:27
04:30 PavelB left
samebchase- aleksb: You can clone the repository, make modifications and do a zef install from inside that repository, and it will install it for you locally. 04:35
Let me find the exact syntax
aleksb: I think you can cd to the repository and do a plain `zef install`. 04:37
aleksb: Sorry it is `zef install .` Notice the dot 04:38
aleksb: I got it from github.com/MARTIMM/mongo-perl6-dri...-630363249 04:40
aleksb I had to do `zef install . --force-install` to override the official version (which was already installed) but it works 04:46
thank you!
05:16 xinming_ left, xinming_ joined 05:17 hungrydonkey left, hungrydonkey joined 05:26 dolmen left 05:31 OpenZen left 05:35 holyghost left 05:36 softmoth left 05:46 brtastic joined 05:48 dev joined
dev hi 05:49
05:49 dev left 05:52 bocaneri joined 06:01 Altai-man_ joined 06:04 stoned75 left, sena_kun left 06:06 wamba joined 06:07 rindolf joined 06:15 stoned75 joined 06:19 molaf left 06:26 MasterDuke joined 06:33 go|dfish joined 06:43 dolmen joined 06:48 aleksb left 06:50 ensamvarg3 joined 07:09 holyghost joined
holyghost A nice project for someone, make allegro library raku bindings (allegro.cc liballeg.org) 07:12
It's a giftware licensed game library 07:14
written in C, there's also a iphone system for it 07:18
I might write an extension for it, an adaptive systems library for game AI and statistics 07:23
e.g. for RTS games 07:24
07:29 ab5tract joined
ab5tract m: sub infix:</>(&f, *@a) is tighter(&infix:<+>) { reduce &f, @a }; say &[~] / <w e x> 07:29
camelia wex
ab5tract m: sub infix:</>(&f, *@a) is tighter(&infix:<+>) { reduce &f, @a }; say &infix:<+> / 5, 6, 7 07:30
camelia 567
ab5tract m: sub infix:</>(&f, *@a) is tighter(&infix:<+>) { reduce &f, @a }; dd &[~] / <w e x>
camelia "wex"
ab5tract m: sub infix:</>(&f, *@a) is tighter(&infix:<+>) { reduce &f, @a }; dd &infix:<+> / 5, 6, 7
camelia 5
ab5tract what am I doing wrong? :(
07:31 dolmen left, hungrydonkey left
ab5tract m: dd reduce &infix:<+>, 5, 6, 7 07:32
camelia 18
07:44 abraxxa left, abraxxa joined 07:46 holyghost left 07:51 dolmen joined 07:58 skids left 08:02 sena_kun joined 08:04 Altai-man_ left 08:10 pecastro joined 08:14 sarna joined 08:29 xinming_ left 08:30 xinming_ joined
ab5tract lizmat: any ideas? ^ 08:56
09:07 oddp joined 09:08 finanalyst joined
moritz there's already an infix /; I don't think you can redefine the precedence of an existing operator 09:08
also, for your code to work you'de have to give it a looser prec than infix:<,> 09:09
09:09 molaf joined
ab5tract moritz local definitions override core 09:10
moritz m: sub infix:<RED>(&f, @*a) is looser(&infix<,>) { reduce &f, @a }; say &infix:<+> RED 10, 11, 12
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
infix used at line 1. Did you mean 'indir', 'index'?
moritz m: sub infix:<RED>(&f, @*a) is looser(&infix<,>) { reduce &f, @a }; say &[+] RED 10, 11, 12
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
infix used at line 1. Did you mean 'index', 'indir'?
ab5tract m: sub infix:<+>($a, $b) { say "computer says no" }; "x" + "y"
camelia computer says no
moritz ab5tract: I know, but that example doesn't redefine the *precedence* of an existing op 09:11
m: sub infix:<RED>(&f, @*a) is looser(&infix:<,>) { reduce &f, @a }; say &[+] RED 10, 11, 12
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '@a' is not declared
at <tmp>:1
------> 3@*a) is looser(&infix:<,>) { reduce &f, 7⏏5@a }; say &[+] RED 10, 11, 12
ab5tract why would the new definition not also have its precedence applied
moritz m: sub infix:<RED>(&f, *@a) is looser(&infix:<,>) { reduce &f, @a }; say &[+] RED 10, 11, 12
camelia 33
ab5tract anwyay i think you maybe missed that the first example using `
`~` works as expected 09:12
but using infix + does not
moritz ab5tract: because that would need to remove an existing operator from a language you're deriving
but the example above with a new symbol works
m: sub infix:<RED>(&f, *@a) is looser(&infix:<,>) { reduce &f, @a }; say &[+] RED 10, 11, 12
camelia 33
moritz m: sub infix:<RED>(&f, *@a) is looser(&infix:<,>) { reduce &f, @a }; say &[~] RED 10, 11, 12 09:13
camelia 101112
09:14 hungrydonkey joined
ab5tract m: > sub infix:<+>(Str $a, Str $b) { say "no ints allowed" }; say 5 + 5 09:14
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix > instead.
at <tmp>:1
------> 3>7⏏5 sub infix:<+>(Str $a, Str $b) { say "no
ab5tract I don't see how preceddence can really matter here because local definitions override any core 09:15
moritz that's what I've been trying to explain
there are two parts to an infix:<something> definition
1) if the symbol doesn't exist already, add it to the parser 09:16
2) install it in the lexical pad, call it
if you override an existing operator, only 2) happens
but you need 1) to change the precedence of an operator 09:17
ab5tract I'm still not convinced
moritz then show me an example where a local override changed the precedence of an existing operator 09:18
ab5tract Behavior of my redefinition of `infix:</>` according to different precedence changes behavior
it doesn't do the *right* thing 09:19
but it doesn't do *no* thing
moritz m: sub infix:<+>($a, $b) is tighter(&infix:<~>) { "[$a + $b]" }; say 3 ~ 4 + 5
camelia 3[4 + 5]
ab5tract m: sub infix:</>(&f, *@a) is looser(&infix:<,>) { reduce &f, @a }; dd &infix:<+> / 5, 6, 7 09:20
camelia 5
moritz m: sub infix:<+>($a, $b) is looser(&infix:<~>) { "[$a + $b]" }; say 3 ~ 4 + 5
camelia 3[4 + 5]
ab5tract ok I see it now
sorry for the confusion
moritz happens, it can be a confusing topic :D 09:21
ab5tract that's also a bit disappointing and unexpected relative to the general behavior of local redefinitions :(
moritz also, I consider it a bug that rakudo doesn't even give an error message regarding ignoring the precedence specfication
ab5tract LTA for certain
moritz (one could also argue that it's a bug that you cannot redefine the precedence, but I wouldn't even know how to approach fixing it) 09:22
09:24 hungrydonkey left, hungrydonkey joined
ab5tract I'm busy otherwise I would be tempted to do a deep dive into CORE-settings to understand the hows and whys of it 09:25
09:27 hungrydonkey left 09:28 hungryd39 joined 09:29 holyghost joined 09:32 hungryd39 left
ab5tract moritz: would it perhaps be possible to have a special form of braid that has a more aggressive override strategy, leaving in place all CORE definitions that have not been overridden but otherwise always adding it to the parser regardless of any existing definitions? 09:34
moritz ab5tract: I don't know the current parser deep enough to answer that 09:35
ab5tract erm, sorry, that came out a bit confusing. "adding it" <-- "it" meaning any definition gets both steps 1 & 2
moritz: me either.. Lucky for us, it sounds like in a little while here we will have a new and improved parser to learn. 09:36
Laziness wins again! :)
09:40 wamba left
jnthn The grammar changes very little, however. 09:40
ab5tract moritz thanks for your help. I've updated this here with this new knowlede: www.reddit.com/r/rakulang/comments...r/fws8u3s/ 09:41
09:42 molaf left, pmurias97 joined, pmurias97 left
ab5tract jnthn: can you elaborate? the grammar of CORE-settings? the grammar of setting up a cascading braid like I described above? the grammar of the braid grammars? 09:43
help me I'm drowning!
jnthn I guess you're referring to the RakuAST changes, and I mean that the parser itself will parse in the same way, it's what we build from it that will changes. 09:44
So don't expect much parsing wise to get magically fixed :)
Some semantic things probably will :) 09:45
ab5tract Oh, I meant that it sounds like the way slangs / braids are defined relative to the parser will likely look radically different after RakuAST 09:49
keep in mind I have zero clue how you crazy core devs manage any of that at the moment!
moritz only the part that translates the parse tree into an AST will look different
the parser itself won't
09:50 MasterDuke left
ab5tract "the part that translates" == there are more than one, no? isn't each braid going to do this differently? 09:51
moritz no, they just look up the symbols in different scopes 09:52
but the code is the same
ab5tract jnthn I guess for practical purposes, I guess I am most curious about an answer to my question: would it enable -- or change the implementation of -- addition of a mechanism to specify that you want to completely override global definitions including precedence in your local scope. 09:53
that seems like something that braids do naturally but braiding is not something we get to do ourselves outside of the ill-defined slang, correct?
09:56 kensanata joined
jnthn ab5tract: I think that issue is orthogonal. 09:59
09:59 lichtkind joined
jnthn Clearly the semantics today of ignoring the requested precedence are LTA, though. 10:00
Maybe we should allow changing precedence or an existing operator, but only if you declare a `proto` (and so hide all existing candidates, that assumed a different precedence)
10:01 Altai-man_ joined
ab5tract yeah, this is the only kind of thing I had in mind 10:04
some simple signal to say "please install in the parser in place of whatever may already be there"
10:04 sena_kun left
ab5tract could be handy too if user space ever grows too wild with new conflicting operator definitions? 10:04
assuming that it is the case that the first definition to the parser gets the precedence for user defined operators well 10:06
10:08 JJMerelo joined
ab5tract *as well 10:11
10:14 holyghost left 10:16 wamba joined, yuplushi joined 10:17 Black_Ribbon left 10:30 ab5tract left 10:40 ab5tract joined 10:41 dolmen left 10:50 MasterDuke joined 11:01 JJMerelo left 11:06 JJMerelo joined
JJMerelo I was kicked off... 11:07
Altai-man_ go ahead, please. You have my email, right?
Altai-man_ JJMerelo, hm, not really. :( Can you PM it to me, please? 11:09
11:09 Manifest0 left 11:17 sarna left 11:18 dolmen joined 11:20 sarna joined, holyghost joined 11:21 ab5tract left 11:22 jvverde_ joined 11:54 holyghost left 12:02 sena_kun joined 12:04 Altai-man_ left
lizmat breaking news on CNN: hand-sanitizer and fireworks don't mix :-) 12:05
.oO( But it'd make a great "will it blend" episode... )
lizmat :-) 12:11
jnthn The hand sanitizer at my local microbrewery smells like something tasty to drink. I don't plan to try, but...
El_Che jnthn: git push first 12:12
12:31 hungrydonkey joined 12:33 cgfbee joined 12:37 wamba left 12:45 hungrydonkey left, hungrydonkey joined 12:50 hungrydonkey left 12:58 hungrydonkey joined 13:12 Manifest0 joined 13:18 hungrydonkey left 13:19 hungrydonkey joined 13:25 JJMerelo left 13:32 hungryd4 joined, hungrydonkey left 13:35 dolmen left 13:36 Manifest0 left 13:40 hungryd4 left 13:41 hungrydonkey joined, Manifest0 joined 13:43 hungrydonkey left, hungrydonkey joined, grumble joined 13:49 wamba joined 13:50 hungrydonkey left, hungrydonkey joined 14:01 dolmen joined 14:02 Altai-man_ joined 14:04 holyghost joined, sena_kun left 14:20 lichtkind left 14:21 vike1 left 14:27 sarna left 14:30 lichtkind joined, vike joined 14:37 lichtkind left, holyghost left 14:39 lichtkind joined, wamba left 14:40 lichtkind left 14:42 lichtkind joined
jjatria Is there a search URL that can be used with the Raku docs, as in to use with DuckDuckGo bangs (duckduckgo.com/newbang) or browser custom search thingies? 14:43
DuckDuckGo has `!perl` which uses the perldoc site
14:44 lichtkind left
Altai-man_ jjatria, duckduckgo.com/newbang <- ? :) 14:45
14:45 lichtkind joined 14:46 brtastic left
jjatria Yeah, my message had that same URL. But that form wants a search URL 14:46
Does the Raku docs site have one that can be used for that sort of thing?
Altai-man_ ooh, I see what you mean. I don't think there is one. 14:47
jjatria It would be neat to be able to search with `!raku`
Altai-man_ Because website is static and there are all kinds of problems with search caused by that.
14:50 lichtkind left
codesections Would it be against the spirit of duckduckgo bangs to have it redirect to duckduckgo.com/?q=site%3Adocs.raku.org ? (i.e., just a site search of the docs website) 14:57
that's what happens if you search for a term on the website that doesn't match an existing page
(well, a google site search, but still)
14:58 OpenZen joined 15:04 zacts left 15:07 kensanata left 15:09 hungrydonkey left
jjatria codesections: Ha! I guess it's worth a try. Bangs an always be updated later, if we ever get a proper search URL 15:11
15:12 hungrydonkey joined
codesections er, rather duckduckgo.com/?q=site%3Adocs.raku.org+ 15:17
15:25 marcusr left, bdju left 15:26 bdju joined 15:28 marcusr joined 15:36 kensanata joined 15:41 hungryd56 joined 15:43 hungrydonkey left 15:49 hungryd56 left 15:50 hungrydonkey joined 15:52 hungryd5 joined
jjatria Welp, submitted. Let's see what happens 15:55
15:55 hungrydonkey left 15:58 Black_Ribbon joined 16:02 hungryd5 left 16:03 sena_kun joined 16:05 Altai-man_ left 16:12 xinming_ left 16:14 xinming_ joined 16:27 brtastic joined 16:49 wamba joined 16:51 stoned75 left 16:52 stoned75 joined 16:55 AlexDaniel joined, AlexDaniel left, AlexDaniel joined 17:05 cpan-raku left 17:06 cpan-raku joined, cpan-raku left, cpan-raku joined 17:14 dolmen left 17:35 ensamvarg3 left 17:40 rindolf left 17:48 brtastic left, yuplushi left 17:50 rindolf joined 17:55 erdic joined, telex joined 17:58 rindolf left 18:02 Altai-man_ joined 18:03 rindolf joined 18:04 sena_kun left 18:06 Xliff joined
codesections I'm attempting to get a Raku debugger set up, and could use a bit of help interpreting the error message I'm getting: 18:06
$ zef install --/test App::MoarVM::Debug
===> Searching for: App::MoarVM::Debug
===> Searching for missing dependencies: MoarVM::Remote
===> Searching for missing dependencies: Data::MessagePack
===> Fetching [FAIL]: Data::MessagePack:ver<0.1.2> from [email@hidden.address]
Aborting due to fetch failure: Data::MessagePack:ver<0.1.2> (use --force-fetch to override)
(this is after following the directions in the README at github.com/edumentab/p6-app-moarvm-debug ) 18:07
18:08 satori__ left
lizmat timotimo ^^ 18:09
Xliff codesections: You may want to alert the maintainer for ata::MessagePack
codesections: In the meantime, you can install from git by hand. 18:10
codesections (As an aside, am I correct that App::MoarVM::Debug is the debugger I should be installing as a new user? I started from the docs page (docs.raku.org/programs/01-debugging), which referred me to github.com/jnthn/rakudo-debugger, but that page indicates (I think) that it's been deprecated in favor of MoarVM::Remote)
Xliff git clone [email@hidden.address] cd Perl6-Data-MessagePack; zef install . 18:11
codesections: Actually, you may want to look into Comma. commaide.com/
codesections Xliff, thanks. What is the error I'd be alerting the Data::MessagePack maintainer to? Is it a version mismatch? 18:12
Xliff Paste exactly what you get from zef 18:13
codesections The text I pasted was the full msg 18:14
18:14 vrurg_ joined, reach_satori joined
Xliff Then paste everything from the "Fetching [FAIL]". If you wait a second, I might be able to get you a better message. 18:14
Ah. It's not a URL 18:15
He may be better served to use the following for source-url in META6.json: github.com/pierre-vigier/Perl6-Dat...gePack.git 18:16
codesections re: Comma – does it offer a standalone debugger or just a full IDE/editor? If it's the latter, is it worth switching? I'm pretty happy with my Emacs setup and feel some reluctance to switch to a non-FOSS editor. But I'd be willing to do so for compelling enough benefits 18:18
18:19 softmoth joined
Altai-man_ codesections, full IDE/editor, no separation. But means for debugging are open, so you can look at something like github.com/edumentab/p6-app-moarvm-debug and integrate it into whatever or write your own frontend. 18:20
I think emacs folks would be truly thankful. :) 18:21
re fetching failure above: just clone it an zef install . 18:22
codesections > so you can look at something like github.com/edumentab/p6-app-moarvm-debug
right, that's what I started with (and the README I was following) :) 18:23
18:23 sjm_uk left
Altai-man_ is bad for not backlogging 18:23
codesections ha :) 18:25
> re fetching failure above: just clone it an `zef install .`
18:25 sjm_uk joined
codesections yeah, that seems like the right solution. I'd like to understand the error msg, though 18:26
and insight into what it means/what the fetching error was based on this msg: 18:27
$ zef install --/test App::MoarVM::Debug
===> Searching for: App::MoarVM::Debug
===> Searching for missing dependencies: MoarVM::Remote
===> Searching for missing dependencies: Data::MessagePack
===> Fetching [FAIL]: Data::MessagePack:ver<0.1.2> from [email@hidden.address]
Aborting due to fetch failure: Data::MessagePack:ver<0.1.2> (use --force-fetch to override)
(rerunning the install command with --debug is noisier but doesn't seem more helpful. If anyone would like to see that msg, I'm happy to post it but otherwise I'll hold off to avoid spamming the channel) 18:30
(er, more than I already am, anyway) 18:31
18:34 reach_satori left 18:35 rbt left, rbt joined 18:41 reach_satori joined, hungrydonkey joined, Guest311 joined
codesections Oh, I see. The url in the META6.json file incorrectly uses `git@github.com:` instead of `github.com`. Looks like Altai-man_ has had a PR out fixing that error since September, github.com/pierre-vigier/Perl6-Dat...ck/pull/17 18:46
18:53 wamba left 18:54 lichtkind joined 18:58 wamba joined 19:03 go|dfish left 19:14 hungrydonkey left 19:17 go|dfish joined
timotimo i'm not sure why fetching messagepack would afil like that? 19:30
if you're able to fetch lots of things from github 19:31
codesections I think I figured out what the issue could be. If I `git clone` from the github.com/$URL address, I clone the repo. If I `git clone` from the [email@hidden.address] address, I'm *prompted to unlock my SSH key* and clone the repo 19:34
I'm guessing that zef can't handle that case?
timotimo d'oh 19:35
Xliff Auto-convert the [email@hidden.address] instances into https: ?? 19:38
vrurg_ Xliff: unless I oversee a hidden problem I like the idea. 19:43
[email@hidden.address] is a huge pain in the ...
19:44 vrurg_ is now known as vrurg 19:46 cpan-raku left, cpan-raku joined, cpan-raku left, cpan-raku joined
codesections do y'all think it's worth opening an issue on the zef repo over this? I'm happy to do so, if that'd be helpful 19:50
19:57 xinming_ left, xinming_ joined 20:00 finanalyst left 20:02 sena_kun joined 20:05 Altai-man_ left 20:09 webb joined, webb left 20:12 aborazmeh joined, aborazmeh left, aborazmeh joined, OpenZen left, OpenZen joined 20:14 softmoth left, softmoth joined
timotimo hm, does the thing come from the meta json file or from the ecosystem meta list? 20:17
probably the former 20:18
an issue could be for tracking "what distros still have the wrong kind of url" in the ecosystem and/or an issue in zef for looking for a flag or env var you can pass to git to prevent a password unlock request or so 20:19
20:19 cpage joined
codesections The issue opened against Data::MessagePack (and the PR) suggested it came from Data::MessagePack's META6.json file (which did, indeed, have a git@ url) 20:19
20:26 kensanata left
cpan-raku New module released to CPAN! DBIish::Pool (1.0.1) by 03RBT 20:39
20:41 kensanata joined 20:44 hungrydonkey joined 20:55 wamba left 21:02 hungrydonkey left
Xliff vrurg: I may just look into submitting a PR for zef. 21:08
21:16 leont_ left 21:23 molaf joined 21:38 finanalyst joined 22:02 Altai-man_ joined 22:04 softmoth left, sena_kun left 22:07 MilkmanDan left 22:09 MilkmanDan joined 22:12 xinming_ left 22:13 xinming_ joined 22:29 finanalyst left 22:30 aborazmeh left
codesections Update on the source-url issue discussed earlier: the zef issue I opened has been closed with the following comment: 22:31
It’s not up to zef to enforce ecosystem policy like what source-url is allowed. For all I know users have configured their own fetcher that actually uses that uri format. There is no blessed format, and any format can be made to work then rough configuration and code. And because there are many possible fetchers how could it possibly report “set your ssh key” when that plug-in cannot know a
later plug-in might actually understand that uri? Admittedly it’s possible but it’s a lot of work to fix a problem that stems from elsewhere.
It’s not up to zef to tell the user about errors the author made (wrong source-url) — that is for authoring tools or ecosystem prechecks. Zef will never tell you e.g. “hey your META6.json is wrong“ because it isn’t an authoring tool.
22:31 samebchase joined
codesections (source: github.com/ugexe/zef/issues/359) 22:31
Xliff Hrm 22:33
codesections So, I guess the solution that leaves is updating docs.raku.org/language/modules to clearly state that distribution authors should use https URLs for the `source-url` field 22:34
Xliff codesections: Added a comment to your bug.
22:41 rindolf left 22:48 kensanata left 22:49 lichtkind left 23:19 sftp left 23:22 sftp joined 23:28 pecastro left 23:41 hungrydonkey joined 23:50 Cabanossi left 23:57 Cabanossi joined