🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel! Set by lizmat on 6 September 2022. |
|||
00:00
reportable6 left,
reportable6 joined
00:30
bigdata joined
00:31
bigdata left
00:36
habere-et-disper left
|
|||
ugexe | tbrowder__: maybe run again with --update flag to force it to redownload the ecosystem json files | 01:09 | |
tellable6 | 2023-08-17T23:18:56Z #raku <tbrowder__> ugexe ^^^ any questions or suggestions? | ||
ugexe | or just run zef update | ||
01:11
razetime joined
01:16
razetime left
|
|||
tbrowder__ | nothing works yet. what is the best way to nuke my current zef and start with a clean slate? | 01:36 | |
could anything in ~/.raku be affecting it? | 01:37 | ||
tonyo | zef nuke | ||
tbrowder__ | my problem is no installed zef that works. can i, in zef rep, do: raku -I. bin/zef nuke"? | 01:40 | |
yay!!!! it saw drastic, but zef is working again! thanks, tony-o and ugexe! | 01:44 | ||
*was | 01:45 | ||
nite all | |||
01:58
Zen43 joined
02:12
ProperNoun left
02:18
ProperNoun joined
03:07
Zen43 left
03:08
tea3po left,
tea3po joined
03:13
pierrot left
03:37
pierrot joined
|
|||
tonyo | tbrowder__++ | 04:30 | |
04:37
linkable6 left,
evalable6 left
04:38
evalable6 joined
04:40
linkable6 joined
05:40
bloatable6 left,
quotable6 left,
committable6 left,
notable6 left,
benchable6 left,
tellable6 left,
reportable6 left,
unicodable6 left,
linkable6 left,
coverable6 left,
sourceable6 left,
squashable6 left,
releasable6 left,
greppable6 left,
statisfiable6 left,
evalable6 left,
shareable6 left,
nativecallable6 left
05:41
statisfiable6 joined,
linkable6 joined,
sourceable6 joined,
tellable6 joined,
benchable6 joined
05:42
evalable6 joined,
bloatable6 joined,
coverable6 joined,
quotable6 joined,
releasable6 joined,
unicodable6 joined,
shareable6 joined
05:43
greppable6 joined,
nativecallable6 joined,
reportable6 joined,
notable6 joined,
committable6 joined
05:44
squashable6 joined
06:00
reportable6 left,
reportable6 joined
07:00
evalable6 left,
greppable6 left,
reportable6 left,
squashable6 left,
notable6 left,
coverable6 left,
sourceable6 left,
committable6 left,
bloatable6 left,
tellable6 left,
linkable6 left,
statisfiable6 left,
benchable6 left,
quotable6 left,
nativecallable6 left,
shareable6 left,
releasable6 left,
unicodable6 left
07:01
coverable6 joined,
reportable6 joined,
nativecallable6 joined,
squashable6 joined,
tellable6 joined,
unicodable6 joined,
bloatable6 joined,
evalable6 joined,
linkable6 joined
07:02
shareable6 joined,
benchable6 joined,
releasable6 joined,
statisfiable6 joined,
notable6 joined
07:03
greppable6 joined,
quotable6 joined,
committable6 joined,
sourceable6 joined
07:20
jpn joined
07:25
jpn left
07:36
jpn joined
07:42
jpn left
08:07
jpn joined
08:09
sena_kun joined
08:11
jpn left
08:16
tea3po left,
tea3po joined
08:20
PipStuart left
08:27
Sgeo left
08:30
teatwo joined
08:32
abraxxa joined
08:33
tea3po left
|
|||
lizmat | moritz I wonder: is there a performance reason to use "rule" over a "token" ? | 08:59 | |
reason I'm asking: in the Raku grammar I'm seeing many rules that could be tokens and then can be made better readable | 09:03 | ||
09:31
sena_kun left
09:40
wayland joined,
wayland is now known as wayland76
09:42
habere-et-disper joined
09:43
jpn joined
|
|||
wayland76 | Hi all. I have a Dockerfile which uses a raku image, and tries to install fez. The install of fez fails. Dockerfile and output at gist.github.com/wayland/6ea78e9cb2...6bf4571e74 | 09:48 | |
Any thoughts as to whether there's anything I can do at my end to fix it? | |||
09:50
jpn left
|
|||
lizmat | wayland76: have you tried adding "--exclude="z"" ? | 09:56 | |
or install libz ? | |||
RUN zef install fez --exclude="z" | 09:57 | ||
wayland76 | Oh! I haven't. OK, sounds like the basic problem is that I'm using a minimalist distro? :) | ||
Btw, the key thing no-one mentioned in our discussion last week was that it's possible to use the new grammar now by going "use experimental :rakuast;" -- just for future reference next time someone has a question like mine :) . | 09:59 | ||
10:00
habere-et-disper left
|
|||
wayland76 | Ended up adding zlib-dev and curl, and it worked. Thanks lizmat! :) | 10:11 | |
lizmat | wayland76: that is actually incorrect | 10:22 | |
use experimental :rakuast | 10:23 | ||
only exposes the RakuAST classes | |||
if you want code to be evaluated in a script, you must set RAKUDO_RAKUAST=1 before running raku | |||
wayland76 | Good to know; thanks! | 10:24 | |
lizmat | if you want to evaluate code in a string with the Raku grammar, you can call the .AST method on the string | ||
m: say Q|say "hello world"|.AST | |||
camelia | RakuAST::StatementList.new( RakuAST::Statement::Expression.new( expression => RakuAST::Call::Name.new( name => RakuAST::Name.from-identifier("say"), args => RakuAST::ArgList.new( RakuAST::QuotedString.new( … |
||
lizmat | m: say Q|say "hello world"|.AST.EVAL | ||
camelia | hello world True |
||
wayland76 | Thanks! | 10:25 | |
10:37
jpn joined
10:42
jpn left
|
|||
wayland76 | Question: Is there a plan to make operators work on the Supply objects (or something similar) so that we can join them together like chaining processes together in bash? | 10:46 | |
lizmat | could you gist an example / pseudocode ? | 11:01 | |
11:05
jpn joined
11:11
jpn left
|
|||
wayland76 | lizmat: Best I've got now is something like gist.github.com/wayland/826ba0604e...178bc35795 | 11:12 | |
lizmat | isn't that basically a react / whenever setup ? | ||
wayland76 | The idea is that the $machine= statement links everything together, and then the $machine.run sets it in an endless loop, where the various different supplies or whatever (read websocket, parse json, grep in the json for the word furniture, push into database) can run in parallel | 11:13 | |
lizmat | that reads as a react whenever $web-socket { parse-json.grep(furniture).insert } to me ? | 11:15 | |
11:28
cm left,
cm joined
|
|||
wayland76 | From a simple processing POV, yes, but conceptually, not what I was after (and my example and possibly explanation are at fault here). The grep was an external process (and the point was the external process, not the actual grep -- the actual grep was a dumb idea). The points I'm trying to make, though, are a) we can have a network of explicitly independent modules that process data and pass to the next, and b) we can chain them together with operators. | 11:29 | |
What I was trying to achieve was more like having each "whenever" clause emit something from a supply, and then adding another whenever clause to read the next supply. However, I'm not keen on the amount of code involved, and would like to have a simple way to chain things together, but have them run in parallel. | |||
lizmat | I *think* you should be able to create a react with multiple whenevers each handling a separate stage, with one stage emitting onto the next | 11:33 | |
wayland76 | Oh, agreed, it's entirely possible. | ||
lizmat | however, only one whenever runs at any time, so there goes your parallell excution idea | ||
*execution | |||
wayland76 | I just wanted to simplify the whole thing with operators. | ||
Oh, right. | |||
lizmat | now, feeds are supposed to parallelize, but they don't yet, afaik | 11:34 | |
docs.raku.org/language/operators#infix_==%3E | 11:35 | ||
wayland76 | I'm happy if things *don't* parallelise yet, I just want to set things up for when they do :) . | ||
Also, if only one whenever can happen at a time, why is it on the concurrency page? :p | 11:36 | ||
lizmat | jnthn probably would have some ideas about that, because of Cro | ||
from the whenever doc: | 11:37 | ||
> Please note that one should keep the code inside the whenever as small as possible, as only one whenever block will be executed at any time. One can use a start block inside the whenever block to run longer running code. | |||
so: | 11:38 | ||
wayland76 | Sounds sensible. My idea of chaining multiple whatevers with Supply.emit would enhance that :p | ||
lizmat | react whenever $socket { start { jsonify.grep.insert } } | ||
wayland76 | Is there somewhere I should take the idea to get it in front of jnthn? | 11:39 | |
lizmat | good question :-) atm he's still on vacation afaik | 11:49 | |
wayland76 | Hmm. If only one whenever runs at a time, then I should probably emphasise that that's why I want to use Supply-based objects (instead of react/whenever), so that they can indeed be run in parallel. | ||
Oh, right! I'm in Australia, so that possibility hadn't even occurred to me. | 11:50 | ||
And, as an extra bonus, I want each of these items based on a Supply to actually have /two/ supplies -- one for data going "downstream" (the default direction), and one for data going "upstream". This would be particularly useful for eg. a stream with a CSV encoder/decoder (?modem :p ), which would convert CSV to data one direction, and data to CSV the other direction. | 11:53 | ||
12:00
reportable6 left
12:01
PipStuart joined
12:03
reportable6 joined
12:17
habere-et-disper joined
12:23
habere-et-disper left
12:25
ProperNoun left
12:38
ProperNoun joined
|
|||
wayland76 | One more question: Would it be possible to add a method to Str (yes) with a name consisting of one Unicode symbol? I'm specifically looking at something like "CSV".⇺ | 13:17 | |
13:38
linkable6 left,
evalable6 left,
evalable6 joined
13:39
linkable6 joined
|
|||
wayland76 | Hmm. It appears not. Must start with a letter or underscore. Oh well. | 13:46 | |
13:47
abraxxa left
13:50
MasterDuke left
|
|||
wayland76 | On the plus side, I think I've figured out how to do my entire Slang as operators, and two extra functions on Str. | 13:54 | |
13:55
jfrent left
13:56
Sgeo joined
14:34
discord-raku-bot joined
|
|||
lucs | Test | 14:36 | |
scullucs | test | 14:37 | |
lucs | wayland76: Actually, the problem with '⇺' is that Raku identifiers must be composed only with characters of one of the Letter categories (Ll, Lm, Lo,Lt, Lu), but U-21FA has Unicode category "Math Symbol (Sm)". | 14:45 | |
14:55
Vyrus left
14:56
Vyrus joined
15:03
abraxxa-home joined
|
|||
gfldex | m: Str.^add_method('⇺', method LAWDVS (|) { say 'well…'; }); Str.^can('⇺').say; "Yes, but should you?"."⇺"(); | 15:10 | |
camelia | Potential difficulties: Useless declaration of a has-scoped method in mainline (did you mean 'my method LAWDVS'?) at <tmp>:1 ------> Str.^add_method('⇺', method⏏ LAWDVS (|) { say 'well…'; }); Str.^can( (LAWDVS) well… |
||
gfldex | m: Str.^add_method('⇺', my method LAWDVS (|) { say 'well…'; }); Str.^can('⇺').say; "Yes, but should you?"."⇺"(); | ||
camelia | (LAWDVS) well… |
||
gfldex | wayland76: ^^^ | ||
lucs | gfldex: Are you saying that a non-letter identifier can work? | 15:11 | |
gfldex | Not without a proper slang. | ||
lucs | Ah, okay. Too complicated for me :) | ||
(well, not that complicated, but still) | 15:12 | ||
(thinking out loud) So yeah, here's it's not used as an identifier, but that mechanism allows using an arbitrary string. | 15:14 | ||
15:57
abraxxa-home left
16:07
teatime joined
16:10
teatwo left
|
|||
tbrowder__ | another zef question: is it expected in some cases when installing a module with a long and complicated dependency chain for it to fail partway but eventually work for, say, “zef install ComplicatedModule?” | 16:20 | |
i think there is a zef option to install each module as it is successfully tested. | 16:21 | ||
ugexe | if a long dependency chain installation fails, then it likely means one of those dependencies is not configured properly i.e. something isn't declaring a dependency it should but some other dependency does declare it, so after installing some dependencies the broken one "works" | 16:48 | |
whatever module it is failing on explicitly is probably the one that isn't configured properly | |||
you can use --serial for zef to install them after each is tested, but really the broken module should be fixed | 16:49 | ||
tbrowder__ | agree, thanks | 17:02 | |
17:10
linkable6 left,
evalable6 left
17:11
linkable6 joined,
evalable6 joined
|
|||
librasteve | oh - yes ... glad you have replaced my bad answer ... TIL | 17:27 | |
17:35
sena_kun joined
18:00
reportable6 left,
reportable6 joined
18:29
kst left
18:36
kst joined
18:54
jpn joined
19:12
jpn left
19:17
jpn joined
19:25
codesections joined
|
|||
tbrowder__ | can some kind person with a moment to spare running linux (preferably debian) on an AMD mb try to "zef install Font::FreeType" (you'll have to have system dev libs for libfreetype and fontforge installed). my problem is the only debian host i have (out of 4 ) that's not capable of installing the module is my "new" AMD box. unless i have some other hardware problem, i want to eliminate the amd part. thanks so much. | 19:39 | |
19:39
jpn left
|
|||
tbrowder__ | i'm running latest raku on all with all system updates good. | 19:40 | |
never mind, i just heard from the author (David Warring in Australia): he's running Deb 12 on an AMD. thanks anyway. | 20:08 | ||
20:14
Sgeo_ joined
20:15
perlbot left,
Sgeo left,
simcop2387 left
20:16
teatwo joined
20:18
teatwo left
20:19
teatwo joined,
teatime left
20:20
teatwo left,
teatwo joined
20:52
teatwo left
20:53
teatwo joined
20:55
teatwo left,
teatwo joined
21:17
bigdata joined
21:22
jpn joined,
wayland76 left,
wayland joined
21:27
jpn left
|
|||
tonyo | tbrowder__: installed fine for me on dual xeons | 21:38 | |
and opensuse | |||
ope misread what you needed | 21:39 | ||
su.shi | when you interpolate a regex into a match, are capture groups not meant to be kept? | 21:44 | |
as in, I have the code my $re = /(.*?)\n/; my $str = "hello\nthere"; my $test = $str ~~ m/^<$re>/; say $test; but the match that is returned does not capture 'hello' | 21:45 | ||
ugexe | m: my $re = /(.*?)\n/; my $str = "hello\nthere"; my $test = $str ~~ m/^<$re>/; say $test; | 21:46 | |
camelia | 「hello 」 |
||
ugexe | i copy pasted your code | 21:47 | |
su.shi | is there a way to preserve the capturing group? | 21:48 | |
ugexe | m: my $re = /(.*?)\n/; my $str = "hello\nthere"; my $test = $str ~~ m/^$<foo>=<$re>/; say $test | 21:50 | |
camelia | 「hello 」 foo => 「hello 」 0 => 「hello」 |
||
ugexe | for some reason it'll show up if you name it 🤷 | ||
tbrowder__ | tonyo: thank you. | ||
su.shi | say's very odd | ||
maybe it's a bug? | |||
ugexe | it might just be a bug of the gist output of Match | 21:53 | |
nemokosch | well, it's definitely not available indexed | 21:58 | |
22:27
linkable6 left,
evalable6 left
22:28
linkable6 joined
22:30
evalable6 joined
22:31
wayland is now known as wayland76
|
|||
wayland76 | lucs: Yes, I was vaguely aware of the other reason ⇺ couldn't be an identifier as well, but at this point, I've just made it a prefix operator in my module, and I think that'll work (though at this point, I only have Pod, not code). | 22:36 | |
22:36
sena_kun left
|
|||
wayland76 | glfdex: Interesting! | 22:37 | |
Hi! Just noticed the text in the Operators documentation: "for the precedence levels marked with ¹, there are no operator subroutines with that precedence level (usually because the operators at that precedence level are special-cased by the compiler). This means that you cannot access that precedence level when setting the precedence of custom operators.". Now to my question: Can I still add to a Sequencer (feed) operator, so that it works on my | 22:44 | ||
objects? | |||
nemokosch | what do you mean "add to"? do you want to overload it? | 22:46 | |
wayland76 | Yes! That's the word! How could I forget? | 22:47 | |
nemokosch | I'm a bit concerned that it's just syntax | 22:49 | |
wayland76 | nemokosch: What's the "it" to which you refer in your sentence? | 22:52 | |
nemokosch | the feed operator | ||
I didn't know there was also ==>> | 22:54 | ||
it's "not yet implemented. Sorry" 😄 | 22:55 | ||
wonder what it would do | |||
wayland76 | Well, I've just conceptually created (ie. written Pod for) 5 different kinds of feed operators (where the regular ==> and <== only count as one of the types), so I can see lots of possibilities :) | 22:58 | |
nemokosch | I have seen funky things from people around here but I think without monkeypatching the parser itself, you won't get to overload ==> and <== | 22:59 | |
they are special-cased in the parsing process | |||
wayland76 | A pity. Oh well. | 23:00 | |
23:13
habere-et-disper joined
|