š¦ 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. |
|||
01:31
kylese left,
kylese joined
02:15
kylese left
02:16
kylese joined
02:27
fredJ joined
02:41
fredJ left
02:59
Sgeo_ joined
03:02
Sgeo left
04:27
xinming left
04:52
oodani left,
oodani joined
05:01
jrjsmrtn left,
jrjsmrtn_ joined
05:30
Sgeo_ left
06:14
jrjsmrtn_ left
06:15
jpn joined
06:36
jpn left
07:09
jpn joined
07:26
avuserow_ left
07:27
avuserow_ joined
07:49
wayland76 joined
07:55
sena_kun joined
08:40
thaewrapt left
08:51
thaewrapt joined
08:57
thaewrapt left
09:07
thaewrapt joined,
jpn left
09:26
thaewrapt left
09:38
thaewrapt joined
09:43
thaewrapt left
09:54
thaewrapt joined
09:59
thaewrapt left
10:00
jpn joined,
thaewrapt joined
10:05
thaewrapt left
10:16
thaewrapt joined
10:21
thaewrapt left
10:31
thaewrapt joined
10:36
thaewrapt left
10:47
thaewrapt joined
10:52
thaewrapt left
|
|||
tbrowder | antononcube: interesting. nw florida is compressed to 2 places out of the whole graph. what are the factors creating the path nodes? | 10:58 | |
iām essentially at the pensacola node. used to live between pācola and tallahassee | 11:01 | ||
11:02
thaewrapt joined
|
|||
tbrowder | line between cdt an edt timezones runs between pācola and tallahassee | 11:02 | |
antononcube | @tbrowder Well, my problem is that I cannot figure out yet a good way to plot graphs with vertex coordinates. I can only plot graphs using 4-5 different forces. (Like spring or electric force.) | 11:06 | |
This graph (tree) is only between FL cities with more than 50,000 citizens. | 11:07 | ||
11:10
thaewrapt left
|
|||
tbrowder | try distance x population? | 11:11 | |
and f(lat long) | 11:12 | ||
traveling salesman? | 11:16 | ||
11:20
thaewrapt joined
11:23
wlhn joined
11:57
sena_kun left
12:10
jpn left
|
|||
antononcube | Well, the graph in the image is "minimal spanning tree" based on distances between cities. It is "initialization heuristic" for traveling salesman. | 12:25 | |
Distances between vertexes can be used to influence the graph layout. So, yeah, I have to verify that can be specified. | 12:26 | ||
@tbrowder I forgot about the automatic graph distances -- thanks for remining me. | 12:28 | ||
12:33
jpn joined
|
|||
tbrowder | glad i could help, been fumbling here a bit w/ macos, but itās working well. my QueryOs helps a lot in differentiating test needs between the 3 os types. dipping toes into choco, too | 12:48 | |
really wanna encourage 3-os testing and showing 3 badges to highlight what works to noobs. a gray badge to anyone is offputting imho | 12:51 | ||
antononcube | How about red badge? | 12:52 | |
And, yes, I try to but the badges for my "heavier" packages with lots of dependencies. | 12:53 | ||
Just put badges in the README of "Graph" -- good idea. | 13:08 | ||
And as usual "Win64" fails. | 13:09 | ||
ugexe | over the years i've changed my opinion on badges that they are pointless for good software. developers should not be releasing broken software to their main branch to begin with, and their software should work on all OS to begin with. If a developer writes software that explicitly doesn't work for e.g. windows they certainly should not want a red broken badge showing up, so the badge doesn't work as | 13:18 | |
a marker for what OS it is intended to work on either | |||
so as a developer looking to use software if i ever see a red testing badge on a repo i'll probably not use it nor look into using it again in the near future, assuming that it is not a finished product | 13:19 | ||
Further, github already shows red Xs and green checkmarks for your CI actions which are redundant against the badges | |||
arguably badges can make your distribution worse. consider that for badges to work they have to link to an external resource. the code you release with fez comes with a readme linking to that resource, but sometime in the future that resource is deleted or the url changes etc. now your released readme has a perma-broken image in it | 13:25 | ||
i agree noobs like badges for some reason though. i know i did, although I don't know why in the present | 13:27 | ||
13:36
jpn left
|
|||
antononcube | For me, badges are mostly "marketing." And I agree -- broken software should not be released. But in GitHub it is fine to have half-baked commits, so for me badges there are fine. | 13:38 | |
13:53
jpn joined
|
|||
tbrowder | but marketing is important iif we want to grow number of raku users, and too many devs are windows ppl, so windows green test badges are important | 14:19 | |
14:26
soverysour joined,
soverysour left,
soverysour joined
14:34
soverysour left
|
|||
tbrowder | btw, just found why linux āfindā¦ā wasnāt working on mac. because of brew using sym links i had to add ā-Lā at the beginning: āfind -L /opt ā¦ā and i found the files i installed andneeded on mac for testing. | 14:42 | |
works for brew-installed pkgs | 14:46 | ||
antononcube | āļø | 14:51 | |
14:57
Sgeo joined
14:58
thaewrapt left
15:03
Sgeo left
|
|||
tbrowder | ugexe: where do you see the checkmarks for OS on github? | 15:09 | |
the default ones? | |||
antononcube | @tbrowder See the "Actions" tab in a relevant GitHub repository. For example: github.com/antononcube/Raku-Graph/actions | 15:12 | |
tbrowder | ugexe: ah, ok, i see your point, but my point is a noob raku person is going to search on raku.land, and the links there lead to the repo where the badges can be seen without checking another botton | 15:15 | |
*button | |||
15:16
soverysour joined
|
|||
tbrowder | i should always say early on in the readme to file an issue if it doesn't work on *your* os | 15:16 | |
and that's why i want to publish that recent push to the community modules | 15:18 | ||
15:19
Chanakan left
15:21
Sgeo joined,
soverysour left
|
|||
tbrowder | 'course now one can probably ask siri: "on github show me all raku repos that have green action status for windows" | 15:21 | |
ugexe | i would argue it is not the users job to tell an author they commit broken code. the author can just push their changes up as PRs and wait for them to turn green. or if they insist on merging into their main branch to check the checkmarks | ||
tbrowder | in yr arg who is the 'author' and who is the 'user' in my case? | 15:23 | |
of the community modules | |||
ugexe | as for seeing them on raku.land, my point about external resources / links still stands - once those urls change / go away, those readmes are broken forever | ||
if you are committing code you are the author in this scenario | 15:24 | ||
15:24
soverysour joined
|
|||
_grenzo | To help new module authors wouldn't it be a good idea to provide a starting point/documentation for setting up github actions to test on linux, mac, and windows? | 15:24 | |
tbrowder | i don't understand why you save the links might change | 15:25 | |
ugexe | because i've seen it happen | ||
tbrowder | _grenzo: yes for sure, that's what i'm pushing for, but no traction | ||
ugexe | travis-ci deleting old builds so those links to specific commits no longer exist. renaming the repo to not contain Perl6 in the name which causes some CI platform to not properly generate badge images for the old name | 15:26 | |
i think most people are willing to test on three platforms, but i think maintaining 3 seperate CI build files to do that is offputting some. Myself and others probably prefer using a single CI build file and to use a build matrix, but then you can't have a seperate badge for each OS (which I personally prefer) | 15:27 | ||
tbrowder | but nick, what do you see casing it? for community modules in particular? repo rename? author change? (jj takes over my github acc't when i pass)...got to go for a while | 15:28 | |
*causing | |||
ugexe | i mentioned travis-ci deleting old builds specifically | ||
we do not know what CI platforms will do in the future. but we have evidence that some act in ways that break these type of things | 15:29 | ||
roguerakudev | I think there might be some overzealous optimization happening in actions classes for grammars | 15:31 | |
ugexe | imgur.com/CpspiyO | ||
in this image you can see a red X next to the commit message "Add github action". you can then click that to see the modal showing the build status on various OS | |||
i imagine the github API allows access to those, which means raku.land could leverage those build statuses instead of having to explicitly include external images in readme | 15:33 | ||
roguerakudev | consider this actions class and the associated error: pastebin.com/S4LeQgkJ | ||
15:33
[Coke] left
|
|||
same result with or without .clone, same result if I assign into the variable first then mutate in another statement | 15:34 | ||
however, the same thing works fine if I use the grammar without the actions class, then pull the data out of $/ manually the REPL | 15:35 | ||
in the REPL* | |||
15:35
[Coke] joined,
kst`` joined
|
|||
this is on Rakudo 2024.05 | 15:38 | ||
for reference, this is the grammar: pastebin.com/e7pqfY8j | 15:39 | ||
15:39
kst left
|
|||
ugexe | my $escaped = S:g/ \\ \' /'/ given $<contents>.Str.clone; | 15:41 | |
evalable6 | Use of Nil in string context in block <unit> at /tmp/V3iJ8LY0TJ line 1 |
||
ugexe | what does this do? | ||
you're doing an inline search and replace but assigning what exactly to $escaped? | |||
my guess is the search and replace is occurring on $/, which you can probably test by changing the signature to ($/ is rw) | 15:42 | ||
roguerakudev | shouldn't it operate on $_ which is set by given? my $e = S:g/ \\ \' /'/ given "abc\'def\'ghi" works as expected | 15:43 | |
but anyway it's capital-S substitution, which shouldn't actually try to mutate $_ | 15:45 | ||
or whatever it's operating on | |||
15:45
jpn left
|
|||
is rw yields a different error, "Parameter '$/' expects a writable container (variable) as an argument, but got 'ļ½¢'two three'ļ½£ contents => ļ½¢two threeļ½£' (Tokenizer) as a value without a container." | 15:47 | ||
input being "one 'two three'" | |||
ugexe | in some regard i imagine $/ has to act like a regex version of $_ given in regex we can write e.g. .<foo> instead of $/.<foo> explicitly | ||
i'm not arguing the behavior is correct mind you | 15:49 | ||
roguerakudev | yeah, I could see something like that being the issue | ||
but splitting it into two lines yields the same error, e.g. my $escaped = $<contents>.Str; $escaped ~~ s:g/ \\ \' /'/; | 15:50 | ||
where we're being really explicit about what should be acted on, namely $escaped | 15:51 | ||
ugexe | might be worth trying to create a one liner that reproduces this you can post in here so others can probe it and iterate quickly | 16:07 | |
lizmat | yeah, golfing is good | ||
roguerakudev | I've been unable to reproduce it outside of an actions class for an actual grammar | 16:08 | |
ugexe | so create a 1 line example that creates a grammar and action class, and then uses it to get that error | 16:09 | |
roguerakudev | I'll see if the same happens with a plain method that takes $/ | ||
sub foo($/) { return S:g/ \\ \' /'/ given $<contents>; }; "'ab\'cd'" ~~ /\'$<contents>=.*\'/; foo $/; | 16:11 | ||
this reproduces it - I have to use backtricks or Discord will gobble backslashes weirdly | |||
ugexe | m: grammar Foo { token TOP { $<contents>=(.) } }; class FooActions { method TOP($/) { my $e = S:g/1/x/ given $<contents>.Str } }; say Foo.parse("1", actions => FooActions) | 16:12 | |
camelia | Cannot assign to a readonly variable or a value in method TOP at <tmp> line 1 in regex TOP at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
roguerakudev | backticks* | 16:13 | |
ugexe | m: grammar Foo { token TOP { $<contents>=(.) } }; class FooActions { method TOP($/ is rw) { my $e = S:g/1/x/ given $<contents>.Str } }; say Foo.parse("1", actions => FooActions) | ||
camelia | Parameter '$/' expects a writable container (variable) as an argument, but got 'ļ½¢1ļ½£ contents => ļ½¢1ļ½£' (Foo) as a value without a container. in method TOP at <tmp> line 1 in regex TOP at <tmp> line 1 in block <unit> at <tmp> line 1ā¦ |
||
ugexe | that one is with a $/ is rw | ||
roguerakudev | yeah, and that's the same error I got as well | ||
ugexe | m: grammar Foo { token TOP { $<contents>=(.) } }; class FooActions { method TOP($/ is copy) { my $e = S:g/1/x/ given $<contents>.Str } }; say Foo.parse("1", actions => FooActions) | 16:14 | |
camelia | ļ½¢1ļ½£ contents => ļ½¢1ļ½£ |
||
ugexe | that one is $/ is copy | ||
16:28
soverysour left
|
|||
roguerakudev | Very strange... something about the substitution operation turns $/ from a Match into a List | 16:32 | |
sub foo($/ is copy) { say $/.WHAT; my $e = S:g/ \ \' /'/ given $<contents>; say $/.WHAT; make $e; }; "'ab'cd'" ~~ /'$<contents>=.*'/; foo $/; | |||
dang it, backslashes got gobbled | |||
m: sub foo($/ is copy) { say $/.WHAT; my $e = S:g/ \\ \' /'/ given $<contents>; say $/.WHAT; make $e; }; "'ab\'cd'" ~~ /'$<contents>=.*'/; foo $/; | 16:33 | ||
evalable6 | (exit code 1) (Any) Use of uninitialized value ā¦ |
||
Raku eval | Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Cannot use variable $e in declaration to initialize itself at /home/glot/main.raku:1 ------> / given $<contents>; say $/.WHAT; make $āe; }; "'ab\\'cd'" ~~ /'$<contents>=.*'/; expecting any of: method arguments term | ||
evalable6 | roguerakudev, Full output: gist.github.com/1bc9e53a4b389898f2...30bd040ec6 | ||
roguerakudev | Well, that's not what I'm getting in my REPL | ||
I get (Match)ā¤(List)ā¤The make function expects $/ to contain a Match, but it contains List | 16:35 | ||
16:47
soverysour joined
|
|||
tbrowder | ugexe: ref yr ci comment: i don't think we'll have that problem with GitHub workflows, reading GitHub's docs (hard as it is), they seem to be aiming for regimented API's, but their docs are hard for me to read (too much segmented into tiny explanations). i do like a more linear cookbook recipe approach. ( i got a lot of mileage from the Perl Cookbook) . but i appreciate your views. you and lizmat and tonyo and many others are in | 16:57 | |
the major leagues, and the rest of us are lucky to have you on our favorite programming team š | |||
17:10
swaggboi left
17:21
swaggboi joined
18:15
soverysour left
18:41
xinming joined
18:49
sena_kun joined
19:02
jpn joined
19:10
jpn left
19:20
jpn joined
19:29
jpn left
19:31
jpn joined
19:39
jpn left
20:07
dmvrtx left,
dmvrtx joined,
wayland76 left,
dmvrtx left,
dmvrtx joined
20:11
wayland76 joined
21:11
thaewrapt joined
|
|||
tbrowder | i have a font file that āencguessā defines as UTF-32BE. but raku docs only show up to UTF16BE. is there any way to handle that with slurp? | 21:56 | |
22:04
sena_kun left
22:13
Maylay joined
|
|||
tbrowder | ah, iconvā¦ | 22:26 |