🦋 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
teatwo left,
bartolin joined,
sdfgsdfg left,
Tirifto left,
bartolin left,
leont left,
Scotteh left
00:01
timo joined,
lizmat joined
00:02
Tirifto joined,
sdfgsdfg joined
00:05
mst joined
00:10
Woodi joined,
sjn joined
00:28
buildable6 left,
buildable6 joined
00:32
buildable6 left,
buildable6 joined
00:37
buildable6 left,
buildable6 joined
00:41
buildable6 left,
buildable6 joined
|
|||
Geth | ¦ problem-solving: coke self-assigned How to report an issue related to the Rakudo webpages? github.com/Raku/problem-solving/issues/397 | 00:46 | |
01:28
buildable6 left
01:30
buildable6 joined
01:34
constxqt joined
01:47
golu8 joined
01:59
golu8 is now known as golu,
golu is now known as golu8,
golu8 left
02:01
edr left
02:30
buildable6 left
02:32
buildable6 joined
03:32
dbonnafo joined,
buildable6 left
03:34
hythm joined
03:37
dbonnafo left
04:48
hythm left
04:57
stanrifkin_ joined
05:00
stanrifkin left
05:28
CIAvash joined
05:46
Aedil left
05:57
golu joined
06:10
stanrifkin_ left
06:13
golu left
06:40
Aedil joined
06:41
dbonnafo joined
06:51
dbonnafo left,
dbonnafo joined
07:17
golu8888 joined
07:18
golu8888 left,
golu8888 joined,
golu8888 left,
golu8888 joined
07:19
golu joined,
golu left
07:29
CIAvash left
08:48
AssCrackBandit left,
golu8888 left
08:49
golu8888 joined
09:05
jpn joined
09:19
sena_kun joined
09:27
jpn left
09:31
golu8888 left
09:33
jpn joined
10:21
jpn left
11:17
Sgeo left
11:43
tea3po joined
11:47
teatwo left
12:22
jpn joined
12:25
Xliff left,
Xliff joined
12:27
jpn left
12:28
lichtkind joined
13:06
golu joined
13:08
Guest69 joined
13:10
Guest69 left
13:13
jpn joined
13:18
jpn left
|
|||
tbrowder__ | question for macos users: can i, a debian user, rely on user home, bash, path settings, system file tree (including /etc) being available on macos after the proper raku and zef are installed? | 13:22 | |
13:44
AssCrackBandit joined
|
|||
ab5tract_ | bash is very old on macOS, for one. | 13:52 | |
AFAIK, You can more or less rely on those things existing, yes. Regarding what things do in `/etc`, I’m not sure you can rely on a one-to-one mapping of expectations from linux WRT service configuration | 13:55 | ||
So.. kinda? | 13:56 | ||
tonyo | tbrowder__: most of the config stuff is in a different location depending on how the user got it in the first place. brew places that stuff away from the system, compiling and installing would be somewhere different by default (for the most part) | 14:01 | |
what are you expecting in /etc? | |||
golu | Hello I am learning Perl5, in your opinion I should learn raku first or keep learning Perl5? | 14:22 | |
ab5tract_ | Right, brew keeps a tree in `/opt/homebrew` | 14:41 | |
tbrowder__ | golu: imho definitely raku | ||
ab5tract_: so /opt/homebrew/raku....? | 14:42 | ||
ref /etc/profile; /etc/environment; /etc/skel for starters | 14:43 | ||
golu | tbrowder_: what is imho ? | ||
tbrowder__ | in my humble opnion | 14:44 | |
my story: i suffered with perl 5 for years, raku is the perl improvement i always wanted | 14:47 | ||
and better than i ever expected | |||
golu | I see | 14:50 | |
14:51
jpn joined
|
|||
golu | tbrowder__: Which things you did not like in Perl5? | 14:53 | |
ab5tract_ | tbrowder__: no, /opt/homebrew/etc, /opt/homebrew/share, /opt/homebrew/lib, /opt/homebrew/include, etc | ||
But there is no guarantee that a user will have installed raku view brew | 14:54 | ||
Some will have used rakubrew, others ??? | 14:55 | ||
tonyo | ^^ | 15:04 | |
what are you trying to achieve tbrowder__ ? this might help us help you | |||
15:07
golu left
15:08
golu joined
|
|||
tbrowder__ | i'm working on a module to (1) download and install the latest release of the rakudo binary download and (2) set the system files necessary to use the adduser function so a new user has a fully capable raku system available with no further setup needed on his or her part | 15:11 | |
i can do that on debian and probably most linux systems, but some /etc details may vary a bit. same with macos | 15:12 | ||
but the module would need full testing on non-debian hosts (maybe vms could be used for most linux varieties) | 15:15 | ||
ab5tract_ | Where are you installing the binary? | ||
tbrowder__ | under /opt/rakudo (/opt/rakudo/bin ... etc.) | 15:16 | |
ab5tract_ | ok | 15:17 | |
I don’t think ‘adduser’ is a real thing on macos | 15:18 | ||
tbrowder__ | how about useradd (lower level) | ||
ab5tract_ | nope | ||
tbrowder__ | hm, how do you add a new user? or is macos not designed for multi-user? | 15:19 | |
ab5tract_ | Not in “root’s” $PATH anyway (sudo adduser; “command not found”) | ||
tbrowder__:you do that by using the system settings | 15:20 | ||
tbrowder__ | sorry, stupid question | ||
can you do that remotely by cli? | |||
ab5tract_ | not sure | ||
tbrowder__ | hm github workflows does it somehow | 15:21 | |
maybe not, just used su or sudo | |||
golu | apple.stackexchange.com/questions/...e-in-macos | 15:22 | |
tbrowder__ | great link, thanks! | 15:25 | |
i think i just need to get a mac and experiment. bugging ppl here is a bit of a nuisance for others | 15:27 | ||
ugexe | fwiw if any software created a new user on my Mac I’d probably be a bit annoyed | 15:35 | |
Don’t let that stop you, I’m just pointing out as a user I would not prefer new users being created | 15:36 | ||
golu | What is fwiw ? | 15:46 | |
coleman | An abbreviation: "For what it's worth" | 16:00 | |
16:20
golu left,
suman joined
16:22
golu joined
16:23
golu left
|
|||
suman | How can I get the indices of the elements of a sorted array in initial unsorted array? For example my @a =[12,5,13,8,8]; say @a.sort # [5,8,8,12,13]. I need to get [1,3,4,0,2] | 16:32 | |
m: my @a =[12,5,13,8,8]; say @a.sort | |||
camelia | (5 8 8 12 13) | ||
lizmat | suman: as of 2023.08, sort has a :k named arg | 16:40 | |
my @a =[12,5,13,8,8]; say @a.sort(:k) | |||
m: my @a =[12,5,13,8,8]; say @a.sort(:k) | |||
camelia | (1 3 4 0 2) | ||
suman | Fantastic thank you. Exactly what I wanted: Rakuish way. | 16:41 | |
m: my @a =[12,5,13,8,8]; my @b = [3,40,5,6,9]; say @a.sort(:k).map: {@b[$_]} | 16:45 | ||
camelia | (40 6 9 3 5) | ||
suman | Can it be improved? | 16:46 | |
lizmat | suman: in what way? | 16:49 | |
@b[@a.sort(:k)] ?? | 16:50 | ||
suman | lizmat: Yes. That would be faster I guess. | 16:52 | |
m: my @a =[12,5,13,8,8]; my @b = [3,40,5,6,9];say @b[@a.sort(:k)] | |||
camelia | (40 6 9 3 5) | ||
suman | lizmat: If I want both @a.sort and @a.sort(:k) in a single pass, is it possible? | 16:57 | |
lizmat | no, not at the moment... | 16:58 | |
it would basically do @a.sort(:k).map: { $_ => @a[$_] } under the hood | 16:59 | ||
actually | |||
m: my @a =[12,5,13,8,8]; my @b = [3,40,5,6,9]; say @b[@a.sort(:k)]:p | 17:00 | ||
camelia | (1 => 40 3 => 6 4 => 9 0 => 3 2 => 5) | ||
lizmat | suman: like that? ^^ | ||
suman | lizmat: I need to pass sorted array @a.sort and @b[@a.sort(:k)] to a function. So I was thinking if it can be done in the same pass. Otherwise I have to call sort twice. | 17:07 | |
lizmat | ah... weird you'd have to pass both... | 17:09 | |
17:09
jgaz joined
|
|||
lizmat | my @c = @a.sort(:k); @a[@c], @b[@c] ? | 17:09 | |
suman | lizmat: Yes. That would be better. | 17:11 | |
lizmat | my int @c = @a.sort(:k); @a[@c], @b[@c] for speed | 17:14 | |
(possibly) | |||
suman | lizmat: Definitely was looking for speed. Thank you. | 17:17 | |
lizmat | hmmmm I wonder whether postcircumfix [] has int @ candidates | 17:18 | |
it probably should have | |||
suman: if using native int indices doesn't make it faster, you should probably make an issue about it | 17:23 | ||
suman | lizmat: Yes I got speedup. Down to 14 secs from 20. | 17:28 | |
lizmat | nice | ||
17:29
guifa left
|
|||
suman | lizmat: I asked in SO also but did not get good reply. While converting Raku Array to CArray before passing to C like: my $first = CArray[num64].new(@data1>>.Num); | 17:40 | |
my $second = CArray[num64].new(@data2>>.Num). Is this right? | |||
Is there a better way? | |||
17:40
lizmat_ joined
17:44
lizmat left,
lizmat_ left,
lizmat joined
|
|||
tonyo | tbrowder__: another way to go about it is to inspect the path and pick some obvious one. OSX's default path (regardless of shell) include /usr/local/bin (same as any linux i'm familiar with) and that's your safest bet if you want system wide binaries | 17:45 | |
17:50
TieUpYourCamel joined
17:54
bigdata joined,
bigdata left
|
|||
tbrowder__ | good idea. if nothing else, my mod will ease selecting the download. | 18:20 | |
18:29
suman left
19:17
jpn left
19:33
jpn joined
19:40
jpn left
19:53
jpn joined
20:01
jpn left
20:16
jpn joined
20:21
jpn left
|
|||
librasteve | suman: why not go @data1>>.num64 in your example? | 20:50 | |
20:58
Sgeo joined
21:11
jpn joined
21:16
jpn left
|
|||
suman: i have answered your SO (in the negative, I'm afraid) | 21:18 | ||
21:54
jpn joined
22:00
jpn left
22:08
buildable6 joined
22:13
jpn joined
22:17
jpn left
|
|||
Geth | raku.org: e382e35315 | (Will Coleda)++ | 2 files Remove link to old Gabor vids |
22:30 | |
22:42
lichtkind left
23:08
buildable6 left
23:09
buildable6 joined
23:14
jpn joined
23:19
jpn left
23:21
dbonnafo left,
dbonnafo joined
23:32
lichtkind joined
|
|||
Geth | raku.org: ad24728249 | (Will Coleda)++ | source/resources/index.html Reorg sections, use same style from other pages |
23:34 | |
23:45
constxqt left,
teatwo joined
23:49
tea3po left
23:50
teatwo left,
teatwo joined
23:51
teatwo left,
teatwo joined,
sena_kun left
23:52
teatwo left,
teatwo joined
23:54
constxd left
23:56
constxd joined
|