This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
01:16 Tirifto left 01:31 razetime joined 01:44 Tirifto joined 02:07 razetime left 02:13 razetime joined
thowe man, I love the IO stuff... really makes things easy and takes away the potential for the kinds of errors I've made elsewhere. 02:26
02:30 hexology left
antononcube @thowe Do you have access OpenAI / ChatGPT or PaLM ? 02:42
thowe no
antononcube Ah, pity. If you did, I was going to setup a motivational Raku coach for you, that uses predominantly I/O examples. 02:44
thowe I appreciate the sentiment. I have a lot of books, and I enjoy finding things out. I also enjoy talking to people about this stuff when I can. 02:46
02:47 razetime left
antononcube @thowe Hmm.. I can make a "digital LLM twin" of you, and then make that LLM-twin talk the LLM-Raku-coach. 02:48
thowe I'm not sure what that means, but it doesn't sounds like something I want. 02:50
antononcube @thowe Alternatively, I can just generate a "12 steps guide of quitting Perl and using Raku instead", similar to this guide: github.com/antononcube/RakuForPred...-PaLM-2.md
@thowe I understand -- it was a joke. 02:51
thowe I like Perl. I like Mojolicious and DBIx::Class and lots of other things... I also like Raku because it is fun ti learn new things, and I think I may one day like it as much as I like Perl. But the Perl world is full of people like me, who like it for sysadmin stuff and throwing data around in small scripts. 02:55
Raku seems to have a community full of academics and computer scientists... 02:56
well, Perl seemed that way at one time. Maybe not anymore. I guess the entire FOSS world is different... 02:57
antononcube @thowe No, I do not think that. 🙂 But you right in a sense -- the average age of a Raku user is 56. 02:58
thowe ignore me, someone left wine here and I am drinking it
wow. I am actually younger then the average. That seems rare these days. :) 02:59
is there a Raku Data::Dumper thing? 03:05
also, when there are so many JSON modules how does one know which one to use? 03:07
antononcube I think you are asking about this: raku.land/github:nkh/Data::Dump::Tree 03:08
thowe neat, thanks 03:09
03:09 razetime joined
antononcube Sure, good luck! 🙂 There are other similar and/or related modules in raku.land . 03:13
03:36 razetime left 06:39 siavash joined 07:42 siavash left 07:43 siavash joined 08:10 teatwo left 08:12 teatime joined 08:16 teatwo joined 08:17 teatwo left, teatwo joined 08:19 teatime left 09:14 razetime joined 09:17 razetime left
Nahita >>> 4 .. * 4..Inf >>> 4 ... * (...) >>> * .. 4 -Inf..4 >>> * ... 4 No such method 'succ' for invocant of type 'Whatever'. Did you mean 'sum'? hi should this be expected? 11:15
lakmatiol IMO yes, ... constructs a sequence, and a sequence must have a starting point 11:16
the error could be better 11:17
Nahita are you the same lakmatiol in the Python server? 11:18
>>> -Inf ... 4 (-Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf 11:19
-Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf ...)
why does a sequence have a concrete starting point
lakmatiol yes
snonux that's the end of the universe!
lakmatiol that is how raku chose to define a sequence. A potentially infinite, order-aware, iterable, collection. And for something to be iterable, it must start somewhere 11:21
ah, this is a fun one. -Inf.succ is -Inf (which does mostly make sense), so this is a sequence of -Inf.succ up to 4, in other words, an infinite sequence of -Inf. 11:22
Nahita i expect the same thing for * ... 4
m: * ... 4 11:24
Raku eval Exit code: 1 Potential difficulties: Useless use of ... in sink context at /home/glot/main.raku:1 ------> * ...⏏ 4 No such method 'succ' for invocant of type 'Whatever'. Did you mean 'sum'? in block <unit> at main.raku line 1
Nahita i have 2021.04 so in case changed
lakmatiol well, * is not -Inf
Nahita really? 11:25
actually i rather you not interact with me, if possible
teatwo tf 11:26
Nahita what does "tf" mean 11:30
tensorflow?
nemokosch tf indeed 11:33
this may or may not have been a social anomaly we were lucky to witness here 11:38
anyway, WhateverStar is overloaded in all ad-hoc ways to mimic one sensible behavior in a situation 11:39
what it does is never "obvious" or how to put it 11:40
it's always custom behavior
m: say -Inf .. 'Z' 11:41
Raku eval Exit code: 1 Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏Z' (indicated by ⏏) in block <unit> at main.raku line 1
nemokosch makes sense that it made no sense, right? 11:42
m: say * .. 'Z'
Raku eval -Inf.."Z"
nemokosch now I exploited that * is apparently simply special-cased as a range starting point
created an issue for it 11:57
12:49 siavash left
Nahita nemothing: you are a social anomaly, you are lucky to face ridicilously tolerant moderation, you get fed with aggression and snarkness and disrespectfulness, so, PLEASE, please ignore me and don't reply to my questions 12:54
nemokosch I don't know why you think you know me but please mind your own business, it seems that there would be some. 12:56
vendethiel Huh 13:36
librasteve thowe: fwiw raku has the dd command perl equivalent built in ... 13:38
m: my Int @a = [^10]; dd @a; 13:39
Raku eval Array[Int @a = Array[Int].new(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
librasteve ddt is even nicer esp for hash of array type things ... but you have to zef install Data::Dump::Tree 13:40
nahita: i agree that the moderation here is overly lax - sadly when irc mods request action from the discord mods they are not given due weight 13:47
previously I have found this chat quite toxic and I would like to see the situation improve ... perhaps we need to place the same individuals as mods for both the irc and discord ends of the bridge (I do not know how the discord mods are "elected") 13:49
in the meantime, I would ask everyone to follow Camelia's advice and be nice to one another 13:51
please
nemokosch ironically, more strict moderation would have definitely intervened at that message 13:59
anyway, this is supposedly a beginner-friendly channel. I don't know why "don't talk to me, even if your response could be useful both to me AND others" belongs here, or why any sort of personal drama belongs here in the first place 14:02
librasteve 👉 when you point a finger, remember that there are four fingers pointing back at you 14:07
thowe librasteve: I didn't understand your comment about dd at first as I was thinking about the dd tool on *nix. Then I realized you meant data dump. didn't know that was there. 14:24
nemokosch quite an ironic proverb isn't it
thowe librasteve: I don't see dd in the Raku docs. 14:25
oh, nm, I found it... dd is a common string ;) 14:27
nemokosch sometimes the google search option (at the bottom) is more helpful
antononcube @nemokosch You realize that mentioning the search thing at the bottom thing is toxic, right? 15:11
nemokosch this would require an advisor system 16:07
antononcube Yeah, I have to resume my work on the "CoC compliance classifier" or, at least, publish its current design and observations of using it. 16:16
lucs snonux: "that's the end of the universe!" You might like this :-) : media.discordapp.net/attachments/1...grafik.png 17:29
librasteve purely for fun, take any response you get from chat gpt and then add can you paraphrase this in rakulang stylee 19:52
20:15 tea3po joined 20:18 teatwo left
scullucs Le monsieur y'est pas content 😠 gist.github.com/lucs/5a256eda6eff6...4d09a7d223 21:21
nemokosch have you checked the Rakudo issues and if so, did you report it? 21:24
scullucs I will do that, right. 21:25
librasteve seems like a genuine issue to me (ie IO tests checking the target and not the origin) 21:26
nemokosch can very well be a VM (as in runtime) issue 21:27
librasteve should @scullucs file in github.com/rakudo/rakudo/issues or in github.com/MoarVM/MoarVM/issues do you think? 21:31
scullucs @librasteve Quite possibly related problem: gist.github.com/lucs/a6e2b728fb5a9...52a2654201 21:32
nemokosch I think Rakudo should be fine. It has a higher probability that it catches someone's attention for starters 21:33
scullucs I'll report both in the same issue, in Rakudo, then. 21:34
librasteve cool 21:35
scullucs sigh .IO.resolve doesn't remove the ".." levels. 22:53
nemokosch it does for me 22:54
are you sure there isn't something funny with your file system?
scullucs Yeah, sorry, it does. 22:55
I'm tripping up with resolve and symlinks. 22:56
My actual problem: if I want to "resolve" the "..", .IO.resolve indeed does it, but what was a symlink path is now resolved to its target file. 22:57
I want to resolve the "..", but don't replace it by the target file. 22:58
So there it is.
No problem I said, I'll compare the inodes.
And that is screwed up too 😦
So I'll have to "resolve" the ".." with some string manipulation, LTA. 22:59
github.com/rakudo/rakudo/issues/5345 23:00
gfldex m: '/a/../a/b//c/d/./5/x.pl'..split('/').rotor(2 => -1, :partial).map( -> [$cur, $next = ''] { put [$cur, $next]; ($next eq '..' or $cur eq '.'|'..'|'') ?? Empty !! $cur }).join('/').say; 23:40
camelia ===SORRY!=== Error while compiling <tmp>
Calling split(Str) will never work with signature of the proto ($, $, |)
at <tmp>:1
------> '/a/../a/b//c/d/./5/x.pl'..⏏split('/').rotor(2 => -1, :partial).map(
gfldex m: '/a/../a/b//c/d/./5/x.pl'.split('/').rotor(2 => -1, :partial).map( -> [$cur, $next = ''] { put [$cur, $next]; ($next eq '..' or $cur eq '.'|'..'|'') ?? Empty !! $cur }).join('/').say;
camelia a
a ..
.. a
a b
b
c
c d
d .
. 5
5 x.pl
x.pl
a/b/c/d/5/x.pl
gfldex m: '/a/../a/b//c/d/./5/x.pl'.split('/').rotor(2 => -1, :partial).map( -> [$cur, $next = ''] { ($next eq '..' or $cur eq '.'|'..'|'') ?? Empty !! $cur }).join('/').say;
camelia a/b/c/d/5/x.pl
gfldex @scullucs this ^^^ is my golfed version of stringwise resolve. 23:41
nemokosch the question is also the scope of the task. this wouldn't work with a bare '..', for example 23:45
Bigger problem: it can't go upwards twice in a row 23:52
m: '/foo/bar/../..'.split('/').rotor(2 => -1, :partial).map( -> [$cur, $next = ''] { ($next eq '..' or $cur eq '.'|'..'|'') ?? Empty !! $cur }).join('/').say;
Raku eval foo