🦋 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:40 Manifest0 left 01:03 mort left 01:13 jpn joined 01:22 jpn left 01:39 jpn joined 01:44 jpn left 01:50 festerdam joined
festerdam Hi! 01:50
I find Raku's support for the localization of the language interesting, but how would it deal with right-to-left written languages like arabic or hebrew? I imagine it would cause problems in terms of readability of the code. 01:53
guifa Readability in this case would be an issue of the code editing application, rather than of Raku itself 02:02
02:04 wlhn left, wlhn joined
guifa Basically, Raku will read along the character stream (this is an oversimplification, but should give you the right idea) 02:04
say it gets the lien of code 02:05
$ד = $ג + 6; # foo 02:07
hrm
that doesn't show up right in IRC chat 02:08
anyways, notice that it compiles fine 02:10
or rather, is read okay
m: $ד = $ג + 6; # foo
camelia ===SORRY!=== Error while compiling <tmp>
Variable '$ד' is not declared. Perhaps you forgot a 'sub' if this was
intended to be part of a signature?
at <tmp>:1
------> <BOL>⏏$ד = $ג + 6; # foo
festerdam I see, thanks! Yeah Emacs displays code written in yiddish just fine (if I don't switch between languages in between). And I guess any problems Raku could have with the RLM character are trivial to solve. Thanks! 02:16
guifa just figured out how to fix the one thing that most annoyed him in DateTime::React 02:23
Used to be you'd have to say `whenever day-shifts() { ...do something... }`
02:23 hulk joined
guifa those parentheses bothered me massively 02:23
Just changed `sub day-shifts { ... }` to `sub term:<day-shifts> { ... }` and PROFIT 02:24
02:24 kylese left 03:15 hulk left, kylese joined 03:48 epony left 03:58 jpn joined
Xliff_ ugexe: I agree in that what I am looking for is an IO::Handle and not an IO::Path. That's why I just used "IO" 03:58
Does that mean I can get a .slurp from a Distribution::Resource? That handles one use case. 03:59
Now what about in the "is native()" use case? Can that just take a Distribution::Resource by itself?
And I 04:00
am still wondering why it is verboten for an end user to know where a Distribution::Resource resides on disk 04:01
Especially in the cases where you are distributing editable resources like CSS files.
04:02 jpn left 04:41 Xliff left, Xliff__ left, Xliff_ left 05:02 festerdam left 05:59 avuserow left 06:00 avuserow joined 06:37 jpn joined 06:46 dano left 07:07 epony joined 07:36 dano joined, abraxxa joined 08:04 wlhn left 08:06 wlhn joined 08:13 samebchase joined 08:21 mort joined 08:23 CIAvash joined 08:33 CIAvash left, CIAvash joined 08:51 Manifest0 joined
_grenzo zef question. I'm working on an app that depends on DB::Pg. I'm developing on a Mac, and would like it to run on a Mac as well as linux and windows. When I installed DB::Pg I kept getting an error Failed to resolve some missing dependencies (use e.g. --exclude="pq" to skip). I downloaded the module and removed the `ver<5>' from the pq native dependency and it installed and worked. But now I'm trying to package it up 08:56
and release to github and anyone trying to install on a Mac will have the same problem.
I'm planning to offer a pull request to the author, but He doesn't seem to be active. 08:57
08:57 dakkar joined
is there a way to override that version or do I need to just document the problem and tell the users to install DB::Pg themselves using the hack I used? 08:58
09:21 jpn left 09:24 jpn joined 09:26 Sgeo left 09:41 sena_kun joined 09:58 CIAvash left 10:04 epony left 10:14 sena_kun left 10:15 patrickb joined 10:16 atweedie joined, clarkema_ joined 11:51 wlhn left 11:52 wlhn joined 12:25 jpn left, jpn joined 12:28 xinming left 12:30 jpn left, xinming joined
tbrowder__ antononcube: rereading the LLM critique in the COLD morning light tell me it looks very good. it reminds me of my favorite old high school English teacher, "Ma" Hughes. 12:32
and looking at the shot of your mac doing the work is very helpful. thanks so much 12:36
lizmat festerdam: do I see a yiddish localization on the horizon ? 12:39
tellable6 lizmat, I'll pass your message to festerdam
13:29 mtj left
antononcube @tbrowder Thanks! I am glad it was helpful. 13:32
ugexe Xliff_: again, a distribution is immutable. needing to edit things you might include doesn't mean %?RESOURCES is how to do that, and as librasteve pointed out one method is copying files from %?RESOURCES at build time to a known location you control, and using that known location inside your code. 13:36
tellable6 ugexe, I'll pass your message to Xliff_
ugexe Xliff_: but yes, you can slurp a resource, and you can use a resource directly in a is native
tellable6 ugexe, I'll pass your message to Xliff_
13:36 epony joined 13:49 festerdam joined 13:52 dano left
antononcube @tbrowder See the last section of this Jupypter notebook: github.com/antononcube/RakuForPred...ples.ipynb 14:16
14:37 jpn joined 15:55 dano joined 16:48 Some-body_ joined 16:49 DarthGandalf left 16:51 Some-body_ is now known as DarthGandalf 16:56 DarthGandalf left 17:07 DarthGandalf joined
Geth Raku-Steering-Council/main: 05d9fcfa7f | (Richard Hainsworth)++ (committed using GitHub Web editor) | 2 files
Rename 20230117.md to 20240117.md
17:26
17:37 dakkar left 18:07 abraxxa left 18:09 dano left
librasteve yeah - I also ned native path as in 18:25
constant $n-path = ?%*ENV<DEVMODE> ?? "$devt-dir/dan/target/debug/dan" !! %?RESOURCES<libraries/dan>; sub se_new_bool(Str, CArray[bool], CArray[bool], size_t) returns SeriesC is native($n-path) { * }
need 18:26
18:49 sena_kun joined
[Coke] fast way to see how many times a literal string appears in a file? 19:25
($haystack ~~ m:g/$needle/).elems fine? 19:27
antononcube cat <file-name> | grep -o <word> | wc -l 19:30
19:30 dano joined
@Coke I think you have to say / <$needle>/ , but that is probably "optional." 19:31
19:32 abraxxa-home joined 19:34 dano left
[Coke] I have it as a literal. 19:37
antononcube: needs to run on windows, so I'm doing it in raku
Seems fast enough now that I've restricted the # of files to process. Thanks 19:38
librasteve App::Rak maybe? 19:39
[Coke] Overkill, esp. if I have to get a license approved. 19:49
Good suggestion, though for something in the wild.
ugexe i'd probably do something more like `const $dev-path = $*HOME.add('.myapp'); sub isNativeForMyapp { my $resource-name = "foobar"; my $path = $dev-path.add($resource-name); if not $path.exists { $path.spurt(%?RESOURCES{$resource-name}.slurp(); }; return $lib }; sub needs-naitve-lib is native(&isNativeForMyapp) { ... }` 19:50
Nahita another attempt: raku -e'say lines.map(*.indices("literal").elems).sum' a.txt b.txt might be faster than regex but not sure if considerably faster 19:51
19:58 dano joined, dano left 20:00 dano joined
librasteve ugexe: yep that's v helpful - tx! 20:04
20:09 jpn left 20:20 jpn joined 20:26 jpn left 20:31 jpn joined 21:18 jpn left 21:57 jpn joined 22:09 jjido joined 22:17 sena_kun left 23:21 abraxxa-home left 23:26 festerdam left 23:27 jpn left 23:32 jjido left