01:22
stanrifkin left
06:39
Some-body_ joined,
DarthGandalf left
06:42
Some-body_ is now known as DarthGandalf
|
|||
lizmat | ah., ok... eh | 07:34 | |
it's the short version of "format" | |||
a 6.e feature | |||
guess it needs docs :-( | 07:35 | ||
ab5tract | habere-et-disper: ^^^ | 07:57 | |
08:03
dakkar joined
08:04
ACfromTX left
08:17
ACfromTX joined
|
|||
disbot2 | <jubilatious1_98524> > it's the short version of "format" | 08:53 | |
<jubilatious1_98524> Not sure I've seen this issue on Github? Thx. | |||
09:01
ACfromTX left
09:14
ACfromTX joined
|
|||
ab5tract | Which issue are you referring to? (#toomanyissues) | 10:07 | |
disbot2 | <jubilatious1_98524> There's a discussion about adding o adverb (or not) , on Github? | 14:08 | |
lizmat | the adverb already exists | 14:16 | |
with RAKUDO_RAKUAST=1: raku -e 'use v6.*; say q:o/%s/(42)' | 14:17 | ||
42 | |||
alternately: raku -e 'use v6.*; say q:format/%s/(42) | |||
it returns a Callable for the given sprintf format string | 14:18 | ||
ds7832 | In the docs section on Callable containers, it says that: "The sigil & is required when declaring the container and has to be omitted when executing the Callable." I wonder about the "has to be omitted" part: At least simple tests with Rakudo work just fine even if the sigil is present: | 15:14 | |
raku -e 'my &block = -> { say "executed"; }; &block();' | |||
Will things go wrong with the sigil other cases? Or could the "has to be omitted" be changed to "should" or "can be omitted"? | 15:15 | ||
docs.raku.org/language/containers#...containers | |||
Blocks with an argument like in the example do also work just as well when called with the sigil there. | 15:16 | ||
raku -e 'my &callable = -> $nu { say "$nu is ", $nu ~~ Int ?? "whole" !! "not whole" }; &callable(4); &callable(5);' | 15:18 | ||
SmokeMachine | m: my &callable = &say; callable 42 | 15:33 | |
camelia | 42 | ||
ds7832 | I see, this way of calling fails with a sigil. | 15:48 | |
m: my &callable = &say; &callable 42 | |||
camelia | ===SORRY!=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> my &callable = &say; &callable<HERE> 42 expecting any of: infix infix stopper statement end statement modifier … |
||
disbot2 | <jubilatious1_98524> @lizmat > the adverb already exists | 16:18 | |
<jubilatious1_98524> ^^ What does the o adverb do? Can I see the Github issue where the community discussed adding an o adverb, please? | 16:19 | ||
ab5tract | The name of the adverb is :format | 16:30 | |
:o is the shorthand for that adverb | |||
lizmat++ just demonstrated what the :format adverb does | 16:31 | ||
ds7832: the parser has no way to know you are trying to call &callable there | 16:35 | ||
18:34 <ab5tract> m: my &callable = &say; &callable(42) | |||
m: my &callable = &say; &callable(42) | |||
camelia | 42 | ||
16:42
dakkar left
|
|||
ab5tract | The & sigil is so that you can “hold” the routine and use it in term context. The parser couldn’t parse ‘&foo = &bar’ as an assignment if ‘&foo &bar’ meant ‘call &foo with parameter &bar’ | 16:56 | |
ds7832 | Yeah, for `&callable 42` to work would have seemed pretty far-fetched. | 17:08 | |
librasteve_ | rakudoweekly.blog/2025/09/29/2025-...f-control/ | 17:54 | |
20:36
habere-et-disper joined
|
|||
habere-et-disper | m: use L10N; say L10N.info-for-translation-key("adverb-q-o"); | 21:24 | |
camelia | ===SORRY!=== Error while compiling <tmp> Could not find L10N in: /home/camelia/.raku /home/camelia/rakudo-m-inst-2/share/perl6/site /home/camelia/rakudo-m-inst-2/share/perl6/vendor /home/camelia/rakudo-m-inst-2/share/perl6/co… |
||
22:06
habere-et-disper left
23:00
arkiuat joined
|
|||
arkiuat | why are sleep, sleep-timer, and sleep-until implemented in class Date? Why not Dateish or DateTime or Instant? Date seems like the least appropriate of these three classes and one role | 23:01 |