🦋 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:09
asymptotically left
00:10
asymptotically joined
00:41
Doc_Holliwould left
00:42
Doc_Holliwood joined
01:04
pecastro left
01:19
lizmat left
01:44
JRaspass left
01:51
lizmat joined,
gnufr33dom joined
01:52
Doc_Holliwould joined,
Doc_Holliwood left
02:02
MasterDuke left
02:31
lizmat_ joined
02:33
lizmat left
02:37
Doc_Holliwood joined,
Doc_Holliwould left
02:42
kvw_5_ joined
02:45
kvw_5 left
02:56
Doc_Holliwood left
02:59
xinming_ left
03:01
aindilis joined
03:19
leont left
03:23
rindolf joined
03:28
Doc_Holliwood joined
03:35
marcusr_ left
03:36
marcusr joined,
mowcat left
04:02
Doc_Holliwood left
04:08
Doc_Holliwood joined
04:42
frej00 joined
04:43
Doc_Holliwood left
05:16
parabolize left
05:19
marcusr left
05:20
marcusr joined,
vike left
05:23
vike joined
|
|||
frej00 | howdy, how set in stone is the current pod6 object representation? I'm working on a module that generates man (mdoc) pages and am running into some difficulties that could be made much easier by a better $=pod data structure | 05:28 | |
06:17
silug left
06:18
silug joined
06:35
Garbanzo left
06:42
_jrjsmrtn left,
__jrjsmrtn__ joined
06:55
xinming_ joined
06:59
ufobat_ joined
|
|||
El_Che | jj: ==^ | 07:02 | |
07:10
wamba joined
07:45
aluaces left,
aluaces joined
07:53
jmerelo joined
|
|||
jmerelo | Guadec call for participation is open discourse.gnome.org/t/guadec-2021-...-open/5640 Although it's got Gnome in its name, it would be great to have some Raku talks there. | 07:53 | |
08:08
rir_ left,
domidumont joined
08:09
rir joined
08:50
Doc_Holliwood joined
08:53
patrickb joined,
sena_kun joined
09:00
wamba left,
wamba joined
09:04
Sgeo left,
pecastro joined
09:41
eseyman_ is now known as eseyman
09:56
JRaspass joined
09:59
grumble left
10:03
grumble joined
|
|||
gfldex | m: use experimental :macros; macro want-succeed-handlers { quasi { CONTROL { when CX::Succeed { say 'seen succeed' } } } }; given 'a' { succeed; want-succeed-handlers; }; | 10:26 | |
camelia | succeed without when clause in block <unit> at <tmp> line 1 |
||
gfldex | I'm trying to inject a CONTROL handler using a macro. The macro is called, the code is injected. Still no catching. Any pointers are very welcome. | ||
This would be the final pice to custom given/when constructs. | 10:28 | ||
10:29
lizmat_ is now known as lizmat
|
|||
codesections | gfldex: there's not any way to do this with `will` instead of a macro, is there? docs.raku.org/language/phasers#ind...will_trait | 10:46 | |
(probably not, but I thought I'd ask) | 10:47 | ||
10:55
gnufr33dom left
11:01
DiffieHellman joined,
DiffieHellman left
11:04
DiffieHellman joined
|
|||
gfldex | codesections: not directly but I might be able to learn something by reading the code of that trait. | 11:21 | |
11:42
berber44 left
11:48
JRaspass left
11:55
Doc_Holliwood left
11:57
epony left
12:02
julia joined
12:03
julia is now known as Guest10602
12:06
sjn__ is now known as sjn
|
|||
Guest10602 | p6: say "abc".split("")[1] | 12:08 | |
camelia | a | ||
12:13
Guest10602 left
12:21
DarthGandalf left
12:23
epony joined
12:36
Guest48804 is now known as masak
12:39
abraxxa joined,
aindilis` joined
12:40
aindilis left
12:43
abraxxa left
12:45
abraxxa joined
13:07
Black_Ribbon left,
lucasb joined
13:08
leont joined
13:12
kaiwulf left
13:13
DarthGandalf joined
13:19
frej00 left
13:32
ufobat_ left,
julia joined
13:33
julia is now known as Guest6897
13:39
Guest6897 left
13:41
bdju left
13:42
bdju joined
13:44
mowcat joined
13:45
lizmat left
13:55
jmerelo left
13:58
Sgeo joined
14:05
mowcat left
14:17
berber44 joined
14:25
wamba left
14:42
QhpAptyj9hj0RQwM joined
|
|||
QhpAptyj9hj0RQwM | masak: Hey masak, let me know if that PR on alma is missing anything :) | 14:50 | |
14:51
hmmmmmmmmmm joined
14:52
hmmmmmmmmmm left
|
|||
masak | QhpAptyj9hj0RQwM: thanks for reminding me. I'll merge it now; it looked good last time I reviewed it | 14:56 | |
still need to handle the Travis/actions thing, but that's not really related to your PR :) | 14:57 | ||
...merged. | 14:59 | ||
15:02
Doc_Holliwood joined
15:11
brtastic1 joined
15:14
dataangel joined
|
|||
QhpAptyj9hj0RQwM | masak: Awesome, ty. <3 I'll submit the next PR when I finish updating the object names. | 15:15 | |
masak | I'm going to look favorably to changes that get us off deprecated names. I might be conservative about other changes, though :) | 15:19 | |
15:19
gnufr33dom joined
15:27
parabolize joined
15:34
QhpAptyj9hj0RQwM left
15:35
QhpAptyj9hj0RQwM joined
15:59
brtastic1 left
16:01
gnufr33dom left
16:40
abraxxa left
17:00
lizmat joined
17:02
mowcat joined
17:09
brtastic joined
17:15
PimDaniel joined
|
|||
PimDaniel | I \o | 17:16 | |
m6locks | helo frens | ||
PimDaniel | Is there an elegant way to return some values "A la carte" ? Let's say a sub that has returns a result but we want to potentially get some intermediate results. | 17:17 | |
I mean other than a hash? or may we return Positionals? | 17:18 | ||
I's like Pink Floys here! :) :). | 17:19 | ||
Is there anybody OUT THERE? | 17:20 | ||
codesections | People are around; IRC isn't really an instant medium | ||
I'm not sure I understand your question | 17:21 | ||
PimDaniel | No problem. | ||
PimDaniel codesections : Just make a sub that returns many things. | |||
Many results. | 17:22 | ||
but a practical way to get the thing you want to. | |||
codesections | m: sub f() { my @positional = <1 2 2 2 8>; #`(do stuff) @positional}; say f()[1] | 17:23 | |
camelia | 2 | ||
codesections | like that? ^^^ | ||
PimDaniel | what is ^^^? | ||
codesections | oh, sorry – those are arrows pointing at the line above | 17:24 | |
m6locks | heh | ||
PimDaniel | Yes why not! | 17:25 | |
lizmat | PimDaniel: remember: everything in Raku is an object | ||
*and* a sub can only ever return 1 single value | |||
m: sub a() { return 1,2,3 }; say $a | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$a' is not declared. Did you mean '&a'? at <tmp>:1 ------> 3sub a() { return 1,2,3 }; say 7⏏5$a |
||
lizmat | m: sub a() { return 1,2,3 }; say a | 17:26 | |
camelia | (1 2 3) | ||
lizmat | you might say: but there it returned multiple values? | ||
nope: it returned *one* List object with 3 values | |||
PimDaniel Thank's lizmat ok but this could be sufficient for me. | 17:27 | ||
A list containing the infinite is heaven too mutch for me. | |||
lizmat | that would just be lazy :-) | 17:28 | |
PimDaniel | Lazy is fine for me. | ||
Okaiiiiy! | 17:29 | ||
Thank's to you codesections and lizmat. Merci beaucoup. Bonne Soirée! | |||
codesections | unrelated question/idle curiosity: does anyone know how Raku came to be one of the only languages where you can *actually* index into a String in O(1) time **and** one of the few languages where you can't index into Strings (syntactically) | 17:30 | |
? | |||
lizmat | not sure, I think because Perl doesn't allow you either ? | ||
codesections | Both of those make sense, but I've always found the combo suprising | ||
lizmat | note, you can index into codepoints... | 17:31 | |
PimDaniel | Hum :/ interested question.When i'll be tall may be i'll understand it. | ||
codesections | ah, yeah, I bet it is from Perl. I should probably pick up some Perl basics one day... | 17:32 | |
lizmat | m: say "foobar".encode[2,3,4] | ||
camelia | (111 98 97) | ||
lizmat | codesections: otherwise modules.raku.org/dist/Pythonic::Str may be a thing for you | ||
codesections | I mean, &substr takes an index, so it's not a problem | 17:33 | |
lizmat | m: say "foobar".substr(2..4) | 17:34 | |
camelia | oba | ||
lizmat | it even takes ranges :-) | ||
codesections | We just have so _much_ context-sensitive syntax that I've always wondered why we don't have that | ||
indeed it does | |||
17:38
PimDaniel left
17:39
aindilis` left
17:40
aindilis joined,
domidumont left
17:41
wamba joined,
rindolf left
18:08
mowcat left
18:19
domidumont joined
18:20
domidumont left
18:48
rindolf joined
18:57
xinming_ left
18:59
xinming_ joined
19:04
Bucciarati left,
literal left,
Discipulus joined
19:14
xinming_ left,
xinming_ joined
19:20
wamba left
19:22
brtastic left
|
|||
leont | codesections: If you add subscripting syntax people will also expect the rest of positional logic | 19:34 | |
And once strings are positional, other things get complicated (e.g. iteration) | |||
listification is probably a better example | 19:35 | ||
codesections | leont: what do you have in mind? We already can iterate with $str.comb; I guess I was imagining a similar api | 19:36 | |
19:37
avar joined,
avar left,
avar joined
19:46
QhpAptyj9hj0RQwM left
|
|||
codesections | m: my str $s = "foobar"; { $s.substr(1..2); say "method: " ~now - INIT now }; { substr($s, 1..2); say "sub: " ~now -INIT now} | 19:59 | |
camelia | method: 0.0007747 sub: 0.001629 |
||
codesections | my understanding was that method calls on native types caused auto-boxing and were much slower than using the sub form | 20:00 | |
(I got that from tpm-perf.perl6.party/#/32) | 20:01 | ||
but the method form is faster ^^^^. Is that just an exception, or is the auto-boxing thing no longer good advice? | 20:02 | ||
oh | 20:05 | ||
m: my str $s = "foobar"; { $s.substr(1..2); say "method: " ~now - ENTER now }; { substr($s, 1..2); say "sub: " ~now -ENTER now} | 20:06 | ||
camelia | method: 0.0007236 sub: 0.0000606 |
||
codesections | nvm | ||
20:10
xinming_ left
20:11
xinming_ joined
|
|||
parabolize | codesections: iterating the results of a string method is much safer than the string it self. If you can iterate the string directly people will iterate the string in a list when intending to iterate the list producing strange behavior. Its a very common problem for new programmers in python | 20:24 | |
20:33
neshpion joined
20:34
timeless_ is now known as timeless
20:38
xinming_ left
|
|||
leont | Yeah, that parabolize said | 20:38 | |
20:38
xinming_ joined
|
|||
leont | «for i in string» versus «for i in string,», basically | 20:38 | |
codesections | hmm, but we already deal with that via the single argument rule | 20:40 | |
for arrays, I mean | |||
20:53
kaiwulf joined
21:08
clarjon1 left
21:20
MasterDuke joined
|
|||
moon-child | leont: what's wrong with propositional logic? ;o | 21:53 | |
21:55
sortiz joined
21:57
Black_Ribbon joined
|
|||
sortiz | \o #raku | 21:57 | |
codesections | o/ | ||
sortiz | m: gist.github.com/salortiz/73a92a158...9c0df24db6 | 21:58 | |
codesections, for you ^^^ | 21:59 | ||
codesections | ha, very clever :) | ||
camelia | ( no output ) | 22:00 | |
MasterDuke | e: gist.github.com/salortiz/73a92a158...os.rakumod | 22:01 | |
evalable6 | MasterDuke, Successfully fetched the code from the provided URL | ||
("e", "m", "o") G i v e t h e m s o m e r o p e ("Give them some rope",) |
|||
sortiz | MasterDuke++ | 22:02 | |
22:05
rindolf left
22:16
patrickb left
22:33
Discipulus left
22:45
mowcat joined
22:51
xinming_ left
22:52
xinming_ joined
22:57
dogbert11 left
22:58
dogbert11 joined
22:59
dogbert17 joined
23:03
dogbert11 left
23:05
dogbert17 left
23:07
dogbert11 joined
23:10
DiffieHellman left
23:13
leont left
23:25
Doc_Holliwood left
23:33
DiffieHellman joined
23:41
JRaspass joined
|