🦋 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.
ab5tract Nemokosch: great question. it's also weird that the bisect says it didn't work all the way back to 2015, but I remember using this library since then 00:00
maybe I always installed it via `--force-test`
00:00 reportable6 left
Nemokosch can't fully rule that out either :D 00:00
ab5tract nope, definitely not :) 00:01
ciao for now \o 00:02
lizmat sleep as well&
Nemokosch see you next time
00:02 reportable6 joined 00:03 ab5tract left 00:11 bpalmer joined 00:31 epony left
Nemokosch bisectable6: sub demo(-->int32) { 42 }; say Bool(demo()); 01:00
bisectable6 Nemokosch, Will bisect the whole range automagically because no endpoints were provided, hang tight
Nemokosch, Output on all releases: gist.github.com/31c97beb36dcd8ae0c...65094ccc16
Nemokosch, Bisecting by exit code (old=2021.10 new=2021.12). Old exit code: 0
Nemokosch I swear... 01:01
bisectable6 Nemokosch, bisect log: gist.github.com/65e8a90a5f4dc00317...4eb3e9393a
Nemokosch, (2021-10-25) github.com/rakudo/rakudo/commit/6b...8018c3e095
Nemokosch, Bisecting by exit code (old=2017.01 new=2017.02). Old exit code: 1
Nemokosch, bisect log: gist.github.com/fb6d27828f56ef88c6...5d00f3730e
Nemokosch, (2017-01-31) github.com/rakudo/rakudo/commit/f8...e4bac50dca
Nemokosch, Output on all releases and bisected commits: gist.github.com/e05663acbe520d71fb...3cabe17bb7 01:02
01:23 jjido left
Nemokosch m: my str $foo = '1asd'; my int $bar = $foo; dd $foo, $bar; 01:26
camelia "1asd"
1
Nemokosch bisect6: my str $foo = '1asd'; my int $bar = $foo; dd $foo, $bar;
bisectable6 Nemokosch, Will bisect the whole range automagically because no endpoints were provided, hang tight
Nemokosch, ¦6c (66 commits): «"1asd"␤1␤» 01:27
Nemokosch, Nothing to bisect!
01:28 razetime joined
Nemokosch am: my int $bar = '1asd' 01:29
oops
m: my int $bar = '1asd'
camelia This type cannot unbox to a native integer: P6opaque, Str
in block <unit> at <tmp> line 1
Nemokosch am: my str $foo = '1asd'; my int $bar; $bar = $foo; dd $foo, $bar; 01:32
bruh
m: my str $foo = '1asd'; my int $bar; $bar = $foo; dd $foo, $bar;
camelia "1asd"
1
01:32 Nemokosch left 01:38 Homer_Simpson left 01:57 Kaipei left 02:01 opoku joined 02:08 jpn joined 02:13 jpn left 02:29 ab5tract joined 02:39 ab5tract left, epony joined 02:40 ab5tract joined
Xliff Nemokosch: That output looks right. Now I am wondering why the message "Applying key..." or "Applying value" are not showing up. 02:51
tellable6 Xliff, I'll pass your message to Nemokosch
03:24 opoku left 03:36 ab5tract left 03:37 ab5tract joined 03:48 ab5tract left, ab5tract joined 03:54 ab5tract left 03:55 ab5tract joined 04:00 ab5tract left 04:56 jpn joined 05:01 jpn left 05:35 Homer_Simpson joined 06:00 reportable6 left 06:01 reportable6 joined 06:14 kjp left 06:17 kjp joined 06:34 epony left
Homer_Simpson . 06:35
can raku be used as a purley procedural language 06:39
pureley* 06:40
Xliff Homer_Simpson: With some work, it can con you into believing it is a procedural language. 06:45
But if you really want procedural, you're better off with Perl.
You can't get away from objects with Raku
Homer_Simpson i tried perl
it cant index single characters 06:46
even raku requires some trickery to do that
Xliff You mean something like "Hello"[1] == "e"? 06:47
Homer_Simpson sub x ($s, $i, &y ) { $s.substr(0,$i) ~ y($s.comb[$i]) ~ $s.substr($i+1) }; my $a="pass";say $a.&x( 3, {.succ} ); 06:48
evalable6 past
Homer_Simpson index and increment etc 06:49
Xliff m: my $a = "Hello"; $a.substr-rw(4, 1) = 't'; $a.say;
camelia Hellt
Xliff m: my $a = "Hello"; $a.substr-rw(4, 1).succ; $a.say
camelia Hello
Xliff m: my $a = "Hello"; $a.substr-rw(4, 1) = $a.substr(4).succ; $a.say
camelia Hellp
Xliff A lot less work. 06:50
If you really want Str to act like that.
You would have to use OO.
role StrIndex { method AT-POS (\k) { self.substr-rw(k, 1) }; my $a = 'Hello' but StrIndex; $a[3].say; $a[3] .= succ; $a.say 06:51
m: role StrIndex { method AT-POS (\k) { self.substr-rw(k, 1) }; my $a = 'Hello' but StrIndex; $a[3].say; $a[3] .= succ; $a.say
camelia ===SORRY!=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> rIndex; $a[3].say; $a[3] .= succ; $a.say⏏<EOL>
expecting any of:
statement end
statement modifier
statement modifier loo…
Xliff role StrIndex { method AT-POS (\k) { self.substr-rw(k, 1) } };; my $a = 'Hello' but StrIndex; $a[3].say; $a[3] .= succ; $a.say
m: role StrIndex { method AT-POS (\k) { self.substr-rw(k, 1) } };; my $a = 'Hello' but StrIndex; $a[3].say; $a[3] .= succ; $a.say 06:52
camelia l
Cannot modify an immutable Str (l)
in block <unit> at <tmp> line 1
Xliff Hmmm
role StrIndex { method AT-POS (\k) is rw { Proxy.new: FETCH => -> $ { self.substr(k) }, STORE => -> $, \v { self.substr-rw(k, 1) := v }; }; my $a = 'Hello' but StrIndex; $a[3].say; $a[3] .= succ; $a.say 06:53
m: role StrIndex { method AT-POS (\k) is rw { Proxy.new: FETCH => -> $ { self.substr(k) }, STORE => -> $, \v { self.substr-rw(k, 1) := v }; }; my $a = 'Hello' but StrIndex; $a[3].say; $a[3] .= succ; $a.say
camelia ===SORRY!=== Error while compiling <tmp>
Cannot use bind operator with this left-hand side
at <tmp>:1
------> => -> $, \v { self.substr-rw(k, 1) := v ⏏}; }; my $a = 'Hello' but StrIndex; $a[
Xliff m: role StrIndex { method AT-POS (\k) is rw { Proxy.new: FETCH => -> $ { self.substr(k) }, STORE => -> $, \v { self.substr-rw(k, 1) = v }; }; my $a = 'Hello' but StrIndex; $a[3].say; $a[3] .= succ; $a.say
camelia ===SORRY!=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> rIndex; $a[3].say; $a[3] .= succ; $a.say⏏<EOL>
expecting any of:
statement end
statement modifier
statement modifier loo…
Xliff m: role StrIndex { method AT-POS (\k) is rw { Proxy.new: FETCH => -> $ { self.substr(k) }, STORE => -> $, \v { self.substr-rw(k, 1) = v }; }; }; my $a = 'Hello' but StrIndex; $a[3].say; $a[3] .= succ; $a.say 06:54
camelia lo
Cannot modify an immutable Str+{StrIndex} (Hello)
in block at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff :(
m: role StrIndex { method AT-POS (\k) is rw { Proxy.new: FETCH => -> $ { self.substr(k) }, STORE => -> $, \v { self.substr-rw(k, 1) = v }; }; }; my $a = 'Hello' but StrIndex; $a[3].say; $a[3] = $a[3].succ; $a.say
camelia lo
Cannot modify an immutable Str+{StrIndex} (Hello)
in block at <tmp> line 1
in block <unit> at <tmp> line 1
lo
Cannot modify an immutable Str+{StrIndex} (Hello)
in block at <tmp> line 1
in block <unit> at <tmp> line 1
06:55
Xliff m: role StrIndex { method AT-POS (\k) is rw { Proxy.new: FETCH => -> $ { self.substr(k) }, STORE => -> $, \v { self.substr-rw(k, 1) = v }; }; }; my $a = 'Hello' but StrIndex; $a[3].say;
camelia lo
Xliff m: role StrIndex { method AT-POS (\k) is rw { Proxy.new: FETCH => -> $ { self.substr(k, 1) }, STORE => -> $, \v { self.substr-rw(k, 1) = v }; }; }; my $a = 'Hello' but StrIndex; $a[3].say;
camelia l
Xliff m: role StrIndex { method AT-POS (\k) is rw { Proxy.new: FETCH => -> $ { self.substr(k, 1) }, STORE => -> $, \v { self.substr-rw(k, 1) = v }; }; }; my $a = 'Hello' but StrIndex; $a[3].say; $a[3] .= succ; $a.say;
camelia l
Cannot modify an immutable Str+{StrIndex} (Hello)
in block at <tmp> line 1
in block <unit> at <tmp> line 1
jaguart damn - I had my fingers crossed, for that to work :) 06:56
Xliff Heh.
m: role StrIndex { method AT-POS (\k) is rw { self.substr-rw(k, 1) }; }; my $a = 'Hello' but StrIndex; $a[3].say; 06:57
camelia l
Xliff m: role StrIndex { method AT-POS (\k) is rw { self.substr-rw(k, 1) }; }; my $a = 'Hello' but StrIndex; $a[3].say; $a[3] .= succ; $a.say
camelia l
Cannot modify an immutable Str+{StrIndex} (Hello)
in block <unit> at <tmp> line 1
Xliff Yeah. substr-rw can't mutate a substr-rw
m: role StrIndex { method AT-POS (\k) { self.substr-rw(k, 1) }; }; my $a = 'Hello' but StrIndex; $a[3].say; $a[3] .= succ; $a.say 06:58
camelia l
Cannot modify an immutable Str (l)
in block <unit> at <tmp> line 1
Xliff m: role StrIndex { method AT-POS (\k) is raw { self.substr-rw(k, 1) }; }; my $a = 'Hello' but StrIndex; $a[3].say; $a[3] .= succ; $a.say
camelia l
Cannot modify an immutable Str+{StrIndex} (Hello)
in block <unit> at <tmp> line 1
Homer_Simpson nah this is too much for me to understand
Xliff Well.. .sorry about that. Good luck 06:59
The only other thing that might work is to have a StringIsh that wraps an @array which contains the .comb of its string. 07:00
And a .Str that joins the @array
Homer_Simpson wouldnt it be easier to have a function that converts a string into an array of uint8 and vice versa
Xliff .comb does that, except it's chars not uint8 07:01
m: "Hello".comb.say'
camelia ===SORRY!=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> "Hello".comb.say⏏'
expecting any of:
infix
infix stopper
statement end
statement modifier
state…
Xliff m: "Hello".comb.say
camelia (H e l l o)
Homer_Simpson there is no char in raku
Xliff m: my $a = "Hello".comb; $a[3] .= succ; $a.gist.say
camelia Cannot modify an immutable Str (l)
in block <unit> at <tmp> line 1
Xliff m: my $a = "Hello".comb; $a[3] = $a[3].succ; $a.gist.say 07:02
camelia Cannot modify an immutable Str (l)
in block <unit> at <tmp> line 1
Xliff m: my @a = "Hello".comb; @a[3] = @a[3].succ; $a.gist.say
camelia ===SORRY!=== Error while compiling <tmp>
Variable '$a' is not declared. Did you mean '@a'?
at <tmp>:1
------> @a = "Hello".comb; @a[3] = @a[3].succ; ⏏$a.gist.say
Xliff m: my @a = "Hello".comb; @a[3] = @a[3].succ; @a.gist.say
camelia [H e l m o]
Homer_Simpson at least you can increment a uint8
Xliff Well that worked.
m: my $a = "Hello".comb.Array; $a[3] = $a[3].succ; $a.gist.say
camelia [H e l m o]
Homer_Simpson ok
how about converting helmo to elmo 07:03
Xliff Gotta be array, not Seq for mutability.
Homer_Simpson I see
07:03 epony joined
Xliff m: my $a = "Hello".comb.Array; $a[3] = $a[3].succ; $a.gist.say; $a.skip(1).gist.say 07:03
camelia [H e l m o]
(e l m o)
Homer_Simpson is this actually modifying $a though 07:04
Xliff No. The .skip does not.
m: my $a = "Hello".comb.Array; $a[3] = $a[3].succ; $a.gist.say; $a[0]:delete; $a.gist.say 07:05
camelia [H e l m o]
[(Any) e l m o]
Xliff m: my $a = "Hello".comb.Array; $a[3] = $a[3].succ; $a.gist.say; $a.splice(0, 1); $a.gist.say
camelia [H e l m o]
[e l m o]
Homer_Simpson i see
Xliff So if you then wanted to use it in a string... you'd have to add a Str method to it. 07:06
m: role StrLike { method Str { self.join }; my $a = "Hello".comb.Array but StrLike; $a[3] = $a[3].succ; $a.gist.say; $a.splice(0, 1); $a.say
camelia ===SORRY!=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> cc; $a.gist.say; $a.splice(0, 1); $a.say⏏<EOL>
expecting any of:
statement end
statement modifier
statement modifier loo…
Xliff m: role StrLike { method Str { self.join }; }; my $a = "Hello".comb.Array but StrLike; $a[3] = $a[3].succ; $a.gist.say; $a.splice(0, 1); $a.say
camelia [H e l m o]
[e l m o]
Xliff m: role StrLike { method Str { self.join }; }; my $a = "Hello".comb.Array but StrLike; $a[3] = $a[3].succ; $a.gist.say; $a.splice(0, 1); "$a".say
camelia [H e l m o]
elmo
Xliff So if inside double quotes or prefixed with "~" it will join everything back together. 07:07
jaguart you could also make the gist return self.Str 07:08
Xliff jaguart++
jaguart wonder what .say for $a.flat does? 07:09
ie in iterable context :) 07:10
CIAvash Homer_Simpson: `my &inc_str = {$_ … *}; say inc_str('abc'.comb[1])[5]; # g` 07:44
m: my &inc_str = {$_ … *}; say inc_str('abc'.comb[1])[5]; # g
camelia g
Homer_Simpson wtf 08:00
bow is that automatically abc
oh wait youre passing a string literal to it 08:01
I'm (slighty) concerened about performance
08:03 linkable6 left, evalable6 left 08:06 linkable6 joined, evalable6 joined
Xliff m: my &inc_str = {$_ … *}; say inc_str('abc'.comb[1])[32] 08:13
camelia ah
08:48 Sgeo left 08:53 jjido joined 09:12 jjido left 09:30 samebchase left 09:31 jjido joined, samebchase joined 09:39 Kaipei joined 09:42 jjido left 09:47 sena_kun joined 09:50 avar left 09:59 avar joined 10:00 jjido joined 10:04 razetime left 10:05 jjido left 10:11 jjido joined 10:14 Homer_Simpson left
Nemokosch leont: if I understood you right, you found a fix for that Net::Postgres problem. Could you please upload a version with a fixup? 10:31
10:31 jpn joined 11:15 jpn left 11:33 jpn joined 11:52 jjido left 12:00 reportable6 left 12:01 reportable6 joined 12:41 simcop2387 left, perlbot left 12:53 simcop2387 joined 12:54 jgaz joined 12:55 perlbot joined 12:57 jpn left 13:00 jpn joined 13:05 jpn left 13:06 jjido joined 13:23 QhpAptyj9hj0RQwM joined, razetime joined 13:24 jpn joined 13:32 jpn left 13:40 jpn joined
leont Nemokosch: Just released a new Protocol::Postgres 13:45
tellable6 leont, I'll pass your message to Nemokosch
leont tonyo: when I run fez it dd's «Array @handlers = [Fez::Util::Tar.new]» 13:57
14:20 ab5tract joined 14:22 ab5tract left 14:23 ab5tract joined, jjido left 15:09 Homer_Simpson joined 15:28 Sgeo joined 15:43 derpydoo joined 15:51 razetime left 15:52 TieUpYourCamel left 15:54 jpn left 16:03 simcop2387 left 16:04 perlbot left 16:05 TieUpYourCamel joined 16:06 simcop2387 joined 16:09 perlbot joined 16:14 jpn joined, Averna joined 16:22 Averna left 16:23 Averna joined 16:35 Averna left 16:36 Averna joined
tonyo leont: d'oh 17:01
will fix
17:02 jpn left
tonyo leont: a force install of v39 should fix it 17:08
leont How do I do that if «zef upgrade --force fez» doesn't do the trick? git checkout? 17:13
17:14 jgaz left 17:22 melezhik joined
ugexe i'd think just `zef install fez:ver<39>` should be sufficient 17:23
(in other words: there isn't much point of the `zef upgrade ...` command vs `zef install ...`) 17:24
because `upgrade` doesn't remove the older version
17:24 melezhik left
ugexe i think even just `zef install fez` should install the new version 17:26
17:28 melezhik joined
melezhik .seen pheix 17:29
tellable6 melezhik, I saw pheix 2020-06-29T11:50:00Z in #raku: <pheix> Hi, friends! Just noticied that download link for Star Bundle 20.01 sources (linux&mac) is returning 404 (((( rakudo.org/latest/star/src
17:34 melezhik left 17:49 Homer_Simpson left 18:00 reportable6 left 18:01 reportable6 joined 18:04 Geth left, Geth joined 18:12 jgaz joined 18:17 discord-raku-bot left 18:18 discord-raku-bot joined 18:36 discord-raku-bot left, discord-raku-bot joined 18:37 Maylay left 18:40 discord-raku-bot left, discord-raku-bot joined
[Coke] nqp: my $x; my $y; ($x, $y) := (1,1); 18:41
camelia First child of a 'bind' op must be a QAST::Var, got QAST::Op
at NQP::src/vm/moar/QAST/QASTOperationsMAST.nqp:1881 (/home/camelia/rakudo-m-inst-2/share/nqp/lib/QAST.moarvm:)
from NQP::src/vm/moar/QAST/QASTOperationsMAST.nqp:96 (/home/camelia/rakudo-m-in…
[Coke] LHF: verify these items are still an issue with moarvm: github.com/Raku/nqp/issues/87 18:42
(original report from 2013 & parrot)
18:45 Maylay joined 18:55 Maylay left 19:04 Maylay joined 19:06 CodeTortoise joined
leont ugexe: it took a --force, but now it works 19:07
ugexe im not sure why that would be needed though. the version was bumped, so it shouldnt need to be force installed over an existing installation 19:08
in other words: force should only be needed if the version wasn't bumped, i.e. reinstalling the old version 19:12
19:16 n1to joined
ugexe yeah, i just did `zef install "fez:ver<38>" && zef install "fez:ver<39>"` and it worked 19:21
if i then `zef uninstall "fez:ver<39>"` and do `zef upgrade "fez"` it installs v39 19:23
19:25 ab5tract left, jjido joined, ab5tract joined 19:30 n1to left, guifa joined 19:31 guifa left 19:32 Maylay left 19:33 Maylay joined 19:39 Averna left 19:40 Averna joined 19:41 Averna left 19:42 Averna joined 19:44 Maylay left 19:45 Maylay joined 20:11 hythm left 20:34 ab5tract left 20:35 ab5tract joined 20:41 QhpAptyj9hj0RQwM left 20:46 thundergnat joined
thundergnat m: gist.github.com/thundergnat/c2d57e...cc9d361120 20:46
camelia Highest supported Unicode version: 13.0
All supported Unicode versions:
1.1 2.0 2.1 3.0 3.1 3.2 4.0 4.1 5.0 5.1 5.2 6.0 6.1 6.2 6.3 7.0 8.0 9.0 10.0 11.0 12.0 12.1 13.0
20:54 AlexDaniel joined
AlexDaniel c: HEAD say 42 20:54
committable6 AlexDaniel, ¦HEAD(d52342e): «42␤»
AlexDaniel u: ∞
unicodable6 AlexDaniel, U+221E INFINITY [Sm] (∞)
AlexDaniel all good with the bots? I haven't checked in a month or so… 20:55
they seem to just work
lizmat Geth occasionally hickups... but that's a local router conkout issue 20:56
afk&
AlexDaniel yep and that's not mine '=D
.seen AlexDaniel 20:57
tellable6 AlexDaniel, I saw AlexDaniel 2023-01-05T20:56:46Z in #raku: <AlexDaniel> yep and that's not mine '=D
AlexDaniel alrighty
Nemokosch what's up? 20:58
AlexDaniel I'm doing great if that's what you mean :) Life is a bit unusual but everything is nice 21:00
Nemokosch what makes life unusual? 😄 21:04
21:14 Guest89 joined
AlexDaniel I started doing a lot of dancing. I'm still not sure why. It is mainly bachata, and I dance like 6 times a week. 21:26
well, 6 days of the week
Our entire team got downsized at work, so I'm not working for now. That's somewhat unusual too :) 21:27
Nemokosch woah, now that's cooler than touching grass o.O 21:29
21:33 ab5tract left 21:34 ab5tract joined
AlexDaniel I guess it is, haha, yes :) 21:37
21:47 sena_kun left 21:48 sena_kun joined 21:52 Kaipei left, Kaipei joined
Nemokosch Anyways, happy new year, boss 😎 22:08
22:08 jgaz left 22:21 ab5tract left 22:26 sena_kun left 22:31 thundergnat left 23:12 Homer_Simpson joined 23:33 derpydoo left 23:58 jjido left