🦋 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.
Xliff Can you redirect $*ERR to a file? 05:53
antononcube @Xliff Yes. my $filename = 'error.log'; my $*ERR = open $filename, :w; # Example usage try { die "This is an error"; CATCH { default { $*ERR.say: .^name, ': ', .Str; } } } $*ERR.close; 07:21
dutchie which of Readline, Linenoise, or Terminal::LineEditor is best for a reasonable repl experience on Linux these days? 07:36
dutchie rlwraps for now
Xliff Thanks, @antoncube 07:45
Xliff my @a; start react whenever @a -> $l { $l.say }; Promise.in(2).then: { @a.push: "a" }; Promise.in(4).then: { @a.push: "b" }; sleep 6; 08:38
m: my @a; start react whenever @a -> $l { $l.say }; Promise.in(2).then: { @a.push: "a" }; Promise.in(4).then: { @a.push: "b" }; sleep 6;
camelia ( no output )
Xliff Why does my whever block not trigger?
lizmat because @a is not an Awaitable ? 09:36
timo m: my @a = <foo bar baz>; say "starting"; start react whenever @a -> $l { $l.say }; say "after start react"; Promise.in(2).then: { @a.push: "a" }; Promise.in(4).then: { @a.push: "b" }; sleep 6; 11:09
camelia starting
after start react
foo
bar
baz
timo well, the say gets executed faster than the start has time to react (haha, pun)
but since it's a regular array there's no synchronisation that it would offer. it just goes through the array producing the result from everything in it if it's Awaitable, or the thing itself if it's not 11:10
you probably want a Channel instead of @a, otherwise you would have to busy-loop or otherwise signal from one thread to the other that a new item is available 11:11
librasteve my expectation is that BST (British Summer Time) matches GMT/UTC during the winter and then adjusts ±1 hour in spring and autumn. Is this undertsanding correct? And also correct for EDT vs EST and so on? 13:42
Xliff timo: Thanks. 13:43
timo huh, is combinations broken? 13:49
lizmat que?
timo wait, combinations is without-putting-back? 13:50
lizmat not sure what you expect ?
code?
timo m: .say for ("a".."c").combinations(2)>>.join("") 13:51
camelia ab
ac
bc
timo i guess what i want is [X] ("a".."c") xx 2 13:52
m: .say for [X~] ("a".."c") xx 2
camelia aa
ab
ac
ba
bb
bc
ca
cb
cc
lizmat m: .say for ("a".."c").permutations(2)>>.join("") 13:53
camelia Cannot resolve caller permutations(List:D: Int:D); none of these signatures matches:
(List $:: *%_ --> Seq:D)
in block <unit> at <tmp> line 1
lizmat hmmm
timo permutations is always of the full list
that's by definition, but we could offer the "other thing" for convenience
lizmat combinations would never combine a elem with itself
timo right, i was being a silly little dumb-dumb 13:54
oooh it also only outputs them "sorted", no reorderings 13:56
so it outputs a list of sets, technically 13:57
lizmat mathematically speaking, yes
m: dd $_ for ("a".."c").combinations(2) 13:58
camelia ("a", "b")
("a", "c")
("b", "c")
lizmat in the implementation, they're lists
antononcube @ab5tract This project is entirely done via comma-2.0(-beta): github.com/antononcube/Raku-Math-SparseMatrix 19:53
Some far I have seen only minor problem with executable scripts settings. (Basically, a wrongly named Raku SDK might shown and picked.) 19:55
ab5tract antononcube: nice! yeah, there are some lingering issues with the SDK stuff 20:44
to make a long story short, Comma would specify a Raku SDK where only a JDK should be specified
considering the revision of IntelliJ and the goal of standalone, this was a perfectly good choice 20:45
but getting out of the grips of that is both under-documented and still under-way
antononcube 👍 21:06
[Coke] ab5tract++ timo++ 23:21