🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku Set by ChanServ on 14 October 2019. |
|||
00:13
mowcat left
00:21
lucs_ is now known as lucs
00:30
wamba left,
gnufr33dom left
00:32
gnufr33dom joined
00:40
shan left
00:54
cydf left
01:09
pecastro left
01:23
xelxebar_ joined
01:24
xelxebar left
01:51
mithaldu_ left,
gnufr33dom left
01:52
Grinnz left
01:53
mithaldu_ joined,
Grinnz joined
01:55
gabiruh joined
02:04
MasterDuke left
02:17
kvw_5_ joined
02:21
kvw_5 left
02:30
JRaspass joined
|
|||
neshpion | how come `get` behaves differently in a heredoc using `raku <<-"EOF"\n<script>\nEOF` vs in a .raku file running as `raku script.raku` ? termbin.com/z9sw | 02:31 | |
cj | hey folks | 03:06 | |
is cromedome about? | |||
I have a 20-core 32-gig k8s system to offer for the CI integration bot | 03:08 | ||
or possibly Patrick Böker | |||
raku-bridge | <勉人> Whats the difference between my/our/has? | 03:11 | |
cj | my and our are generally for scoping variables to a namespace | 03:12 | |
has tells you whether a namespace has a symbol in it, I think | |||
raku-bridge | <勉人> Uhhh… | ||
<勉人> Not sure what that mean | |||
cj | my $foo = x; (within the current namespace, we create a variable called $foo and assign it a value) | 03:13 | |
that $foo can only be referenced from within the current namespace. | |||
brass | neshpion: If I had to guess, it's because a heredoc is treated as stdin, which messes up `get` | ||
cj | with `package lala; our $foo = x;` the current namespace can manipulate the variable, but you can also refer to it as $lala::foo from code outside the current namespace | 03:14 | |
brass | When you call a file with `raku <file>`, you're telling it to interpret that file, but leaving stdin connected to the terminal | ||
neshpion | oh so then it must automatically be eating its own heredoc as the input to `get`, and then it hits `$name` which is undefined and throws the error | 03:15 | |
brass | That would be my guess | ||
Heredocs are fed as stdin to the called program | 03:16 | ||
neshpion: Actually now that I think about it, I bet raku waits for the end of the heredoc before compiling the program and running it, so by the time it reaches the `get`, stdin is already closed and it returns Nil | 03:24 | ||
neshpion | that makes more sense | 03:25 | |
and then i try to read $name in a `say` line | |||
which is NiL | |||
03:26
JRaspass left
|
|||
raku-bridge | <勉人> Thank you cj | 04:24 | |
04:28
japhb joined
|
|||
cj | sure thing. I would google for `raku namespace our` | 05:04 | |
docs.raku.org/language/packages | 05:05 | ||
05:12
brtastic joined
05:13
rindolf joined
05:20
japhb left
05:22
japhb joined
05:31
parabolize left
05:58
neshpion left
06:02
shan joined
06:36
gnufr33dom joined
06:38
brtastic left,
brtastic joined
07:31
wamba joined
07:40
jmerelo joined
07:55
wamba left
08:14
Garbanzo left
|
|||
jmerelo | We're going to try and submit another application to Google Summer of Code this year github.com/perl-foundation-outreac...2021-ideas In this phase, we need project ideas people are willing to mentor. Submit yours (through PR) there. | 08:35 | |
08:50
MasterDuke joined
09:23
kini left,
krkini joined
09:28
xelxebar_ left,
xelxebar joined
09:45
sjm_uk joined
09:58
PimDaniel joined
|
|||
PimDaniel | what this complains "multi method sequence256(uint8 $color, uint8 $bgcolor,Bool :$str=False) {" with: | 09:59 | |
Lexical with name '$color' has a different type in this frame | |||
this multi is alone | |||
10:00
shan left
|
|||
PimDaniel | \° | 10:00 | |
10:05
hazim joined
|
|||
hazim | Hello, i like to ask if someone successfully install Cro, it cant compile. | 10:07 | |
PimDaniel | hazim: May i help you? what is the compile error? | 10:10 | |
But I do not know Cro, so may be i'm not the best one to help you. | 10:11 | ||
hazim | thanks PimDaniel, it is from cro.services/ | 10:12 | |
PimDaniel | what is Cro? | ||
:hazim thank's! i'm watching... | 10:13 | ||
hazim | it cant install, | 10:14 | |
10:15
wamba joined
|
|||
PimDaniel | hum : interesting | 10:16 | |
How it can't install? Have you a log trace? | 10:17 | ||
Hooo yes : this is zef managed, i'm not very used to it! | 10:19 | ||
hazim | i copy the output | 10:20 | |
in method build at /home/hazim/.zef/store/p6-digest-sha1-native.git/e34d468341a572a7c089d672429cf88d21e07734/Build.pm line 14 | |||
[Digest::SHA1::Native] in block <unit> at -e line 1 | |||
===> Building [FAIL]: Digest::SHA1::Native:ver<0.04> | |||
Aborting due to build failure: Digest::SHA1::Native:ver<0.04> (use --force-build to override) | |||
i use fedora 33 it should install, | 10:21 | ||
thanks for help and your time PimDaniel | |||
PimDaniel | Is it heavy? I'll try on my Linux. | ||
Do you know zef? | |||
hazim | yes it is heavy, zef no i just use the command as it is | 10:22 | |
PimDaniel | It seams that it's a Native part that did not compile but you should have possibility to get more precise log. | 10:23 | |
A kinda library did not compile. | |||
10:23
shan joined
|
|||
PimDaniel | on Libraries it's often un unresove dependency. | 10:24 | |
I'm on Debian 10. | |||
hazim | yes i think it is un unresove dependency i will try ubuntu or debian | 10:25 | |
10:28
hazim left
|
|||
jmerelo | .tell hazim that fails from time to time. You can try and install it by hand in advance. | 10:29 | |
tellable6 | jmerelo, I'll pass your message to hazim | ||
jmerelo | PimDaniel: cro is a net services framework, including microservices. It's very cool. | ||
PimDaniel | :jmerelo very interesting! | 10:30 | |
jmerelo | PimDaniel: can you repeat again the question you made at 10:59? A bit of context doo? | ||
lizmat | yeah, that looks like a bug | 10:33 | |
elcaro | PimDaniel: from what I can tell it's hitting this Exception in NQP-land | ||
github.com/Raku/nqp/blob/a2435ee1f...tx.js#L405 | |||
PimDaniel | YES: Try to make a CLASS A and into this class a method with one int8 try to use it with a number in the caller, next change that method to multi | ||
elcaro | probably best to raise a GitHub issue on Rakudo repo with a code snippet that reproduces the issue | 10:34 | |
PimDaniel | I mean a method with an int8 parameter, then after, change it to multi it does not recognize type., then change multi to Int , it does. | ||
No problem i'll do it. | 10:35 | ||
.tell hazim i tried to install cro and i got theses erreurs => /usr/bin/ld : ne peut trouver -ltommath /usr/bin/ld : ne peut trouver -latomic_ops | 10:36 | ||
tellable6 | PimDaniel, I'll pass your message to hazim | ||
PimDaniel | .tell hazim but theses are easy to resolve has you may know, but you can may be check if you have theses libraries anyway. | 10:38 | |
tellable6 | PimDaniel, I'll pass your message to hazim | ||
PimDaniel | clear | ||
oh sorry | |||
I prepare my piece of code | 10:39 | ||
10:42
pecastro joined,
MasterDuke left
10:47
MasterDuke joined
10:49
Sgeo left
11:06
JRaspass joined
|
|||
jmerelo | PimDaniel: those seem to be MoarVM dependencies. Also, if that's Fedora, the second one might be indeed a problem with Raku | 11:15 | |
11:20
sjm_uk left
|
|||
PimDaniel | :jmerelo i did not go futher for now. | 11:21 | |
Not sure i want to install it on my machine for now. | |||
I wonder if what i try to describe is a bug. | |||
when i say 42 what type is it? | 11:22 | ||
What is Num compare to Int? | 11:23 | ||
jmerelo | PimDaniel: Num is any kind of number | 11:24 | |
PimDaniel | :jmerelo , OK! | ||
jmerelo | PimDaniel: Int is, well, an integer | ||
PimDaniel | If i want to convert to a smaller type : eg uint6 how to i make it? | 11:25 | |
There's no conversion method , no? | 11:26 | ||
Not for this type AFAIK. | 11:27 | ||
re '42.uint16.say' => No such method 'uint16' for invocant of type 'Int'. | 11:28 | ||
This seams to pose problem for multi methods , and maybe subs. | 11:31 | ||
jmerelo | uint16 is a native type, which is always "boxed" into a "normal" type. So no, there's no conversion method. docs.raku.org/language/nativetypes...try-uint16 They are mainly for nativecall functions. | 11:32 | |
PimDaniel | If i didn't paste code yet it's because i'm wondering and testing since 1 hour, but i'll post anyway. | 11:34 | |
11:34
jmerelo left
11:50
cydf joined
|
|||
elcaro | PimDaniel: just to clarify, Num is not any number... it's Raku's floating point type | 11:53 | |
PimDaniel | elcaro: hoo hoo ! | ||
elcaro | if you want a function to accepts any numeric valua, use Numeric (or Real if you don't need to support Complex numbers) | ||
PimDaniel | Okay Okay : good to know! | 11:54 | |
but i'll post my code soon anyway. | |||
elcaro | secondly re native types... I think in my limited NativeCall experience, your public facing function can have foo(Int $x)... which can pass to your native function bar(int32 $x), and it will work | 11:55 | |
unless your Int is too big, in which case... you have to validate that yourself in the outer function | |||
PimDaniel | Yes, i watched that! | ||
But it should work and control proper type i think! | 11:56 | ||
Or it's a type problem or it's a signature problem which is linked anyway. | |||
I do not say it's a bug, but i need to publish just to see. | 11:58 | ||
elcaro | You could also create a subset: subset Int8 of Int where * ~~ -128..127; foo(Int8 $x) { bar($x) } | ||
11:58
RobRaku joined
11:59
aborazmeh joined
|
|||
PimDaniel | yes but this is a workaround. | 11:59 | |
12:03
aborazmeh left
12:19
JRaspass left
12:23
raku-bridge left,
raku-bridge joined
12:37
wamba left
|
|||
PimDaniel | Well in fact: i made a sutile error: to avoid method|sub many(uint8 $a,uint8 $b, Bool :$str=False) the ':' here is no use and produces bad behavior. | 12:44 | |
Now it just does not work with constant litterals which is correct since thez are considered Int. | |||
12:52
|oLa| left
|
|||
PimDaniel | and for this case, the subset is a solution. | 12:55 | |
12:59
Black_Ribbon left
13:16
sjm_uk joined
13:39
hazim joined
13:40
hazim left
13:49
gnufr33dom left
13:57
one_time_lurker joined
13:59
one_time_lurker left
14:09
MasterDuke left
14:14
sjm_uk left
14:22
sjm_uk joined
14:36
krkini left
14:38
kini joined
14:56
marcusr joined
|
|||
raku-bridge | <ionsolo> hello I'm stuck with some concepts, for example what does bless? | 15:09 | |
<ionsolo> I already read the docs about but i need some explanation more easy for this 😭 | 15:11 | ||
El_Che | ionsolo: skip it | 15:13 | |
ionsolo: for now | |||
15:14
MasterDuke joined
|
|||
El_Che | iosolo: it's a low level object construction method, generally not needed on regular code where raku's high-level OO shines | 15:14 | |
15:19
aborazmeh joined,
aborazmeh left
15:21
aborazmeh joined
15:28
aborazmeh left
15:32
marcusr left,
marcusr joined
15:39
parabolize joined
|
|||
raku-bridge | <ionsolo> OK, thanks!! | 15:42 | |
<ionsolo> but what is the high level counterpart? a declaration itself? | 15:44 | ||
<ionsolo> the case that bless is named 'bless' doesn't help to see what's does haha | 15:46 | ||
15:52
marcusr left
15:54
marcusr joined
15:57
marcusr left
|
|||
PimDaniel | raku-bridge: bless create the instance. But note that whell you build a constructor, you overload the default one. | 15:57 | |
15:58
marcusr joined
|
|||
PimDaniel | .tell raku-bridge bless also assign constructor scope variables or any values to class parameters. | 16:00 | |
tellable6 | PimDaniel, I'll pass your message to raku-bridge | ||
16:02
PimDaniel left
16:03
JRaspass joined
16:07
b2gills joined
16:15
grayrider joined
16:41
sjm_uk left,
JRaspass left
16:42
wamba joined
16:43
wamba left
16:49
jmerelo joined
17:00
kaiwulf left
17:14
wamba joined
17:16
wamba left
|
|||
raku-bridge | <ionsolo> @PimDaniel sorry my internet has a terribly intermitance these days, thanks | 17:16 | |
17:17
wamba joined
17:22
neshpion joined
17:30
wamba left,
wamba1 joined
17:40
sjm_uk joined
17:45
guifa joined
|
|||
guifa | o/ | 17:47 | |
18:16
raku-bridge left
18:35
Garbanzo joined
18:43
MasterDuke left
18:50
gnufr33dom joined
18:53
shlomif joined,
rindolf left
18:54
shlomif is now known as rindolf
|
|||
pilne | shalom rindolf! how are you? | 18:55 | |
rindolf | pilne: i'm fine - worked on www.shlomifish.org/humour/Queen-Padme-Tales/ (uses p5 though - not raku) | 18:59 | |
19:01
sjm_uk left
19:03
tejr left
19:04
tejr joined
19:05
xelxebar left
19:10
xelxebar joined
19:19
JRaspass joined
19:32
notlizmat joined
19:33
Sgeo joined,
notlizmat left
|
|||
pilne | ahhh, your freecell solver is in p5 too? | 19:38 | |
19:40
MasterDuke joined
19:51
jmerelo left
20:23
rindolf left
20:24
wamba1 left
20:28
__jrjsmrtn__ left
20:32
__jrjsmrtn__ joined
20:36
xelxebar_ joined
20:37
xelxebar left
21:02
cooper joined
21:20
kst joined
21:33
mowcat joined
|
|||
guifa | Is there a reason double underscores are verbotten in numbers? | 21:37 | |
21:37
aborazmeh joined,
aborazmeh left,
patrickb joined
|
|||
tonyo | so people don't write 5___________________________________________0 ? | 21:39 | |
so we don't get made fun of pythoners twitter.com/oynoto/status/1354511375981133824 ?? | |||
guifa | tonyo: I guess, but in this case I have some hex numbers I wanted to align, and while I can do it with 0s, underscores would have given a lot less visual clutter | 21:42 | |
Just semed weird, it’s not like a double could be interpreted as anything else | 21:43 | ||
tonyo | i hear ya. i don't see any real reason not to. if someone wants to do something like that 5_...0 thing then .. who really cares | 21:47 | |
guifa | Now the abuse I had to work hard to avoid was using a Unicode/emoji symbol instead of the word “skeleton” in my subs that have skeleton in them :-) | 21:55 | |
21:58
dataangel joined
22:00
asymptotically left,
asymptotically joined
22:46
patrickb left
22:48
sxmx joined
22:49
brtastic left
22:58
neshpion left
23:15
MasterDuke left
23:17
kaiwulf joined
23:20
mowcat left
23:24
guifa left
|