🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel! Set by lizmat on 25 August 2021. |
|||
00:02
reportable6 left
00:05
reportable6 joined
00:24
patterner_ left
|
|||
[Coke] | are both repos on github? | 00:25 | |
00:27
patterner_ joined
00:33
pjlsergeant left
00:34
pjlsergeant joined
00:40
gfldex_ is now known as gfldex
00:47
dogbert11 left
00:49
dogbert11 joined
|
|||
tbrowder | yes | 00:51 | |
01:03
evalable6 joined
01:32
dogbert11 left,
dogbert11 joined
01:33
squashable6 joined
01:40
dogbert17 joined,
dogbert11 left
01:55
qorg11 left,
qorg11 joined
02:33
dextercd left
02:56
timo joined
03:28
dogbert17 left
03:30
dogbert17 joined
03:53
dogbert11 joined
03:56
dogbert17 left
03:59
dogbert11 left
04:08
dogbert11 joined
04:28
dogbert17 joined
04:30
dogbert11 left
05:24
xinming joined
05:40
andrzejku joined
06:02
reportable6 left
06:05
reportable6 joined
07:05
sourceable6 left,
quotable6 left,
greppable6 left,
committable6 left,
nativecallable6 left,
reportable6 left,
bisectable6 left,
benchable6 left,
squashable6 left,
coverable6 left,
shareable6 left,
notable6 left,
statisfiable6 left,
releasable6 left,
tellable6 left,
unicodable6 left,
bloatable6 left,
evalable6 left,
nativecallable6 joined,
sourceable6 joined
07:06
unicodable6 joined,
squashable6 joined,
benchable6 joined
07:07
committable6 joined,
quotable6 joined,
statisfiable6 joined,
tellable6 joined
07:26
seednode left
07:27
seednode joined
07:36
andrzejku left
07:58
lizmat_ left,
lizmat joined
08:00
Geth joined,
RakuIRCLogger joined
08:05
shareable6 joined
08:07
swaggboi left
08:08
bloatable6 joined
08:19
andrzejku joined
08:21
swaggboi joined
|
|||
andrzejku | hi | 08:35 | |
08:55
dogbert11 joined,
dogbert17 left
09:06
releasable6 joined,
notable6 joined
09:07
coverable6 joined
09:08
bisectable6 joined
09:46
Nicholas joined
|
|||
Nicholas | good *, #raku | 09:46 | |
This seems wrong. What am I misunderstanding? | 09:47 | ||
m: for (0e0) { .say if defined $_ && $_ ~~ /^ "Anything you like here" $/ } | |||
camelia | 0 | ||
Nicholas | I was expecting the regex not to match | ||
m: for (0) { .say if defined $_ && $_ ~~ /^ "Anything you like here" $/ } | |||
camelia | 0 | ||
Nicholas | (That was the original case) | 09:48 | |
09:50
Sgeo_ left
09:54
Oshawott joined
09:58
archenoth left
10:07
greppable6 joined
10:10
andrzejku left
|
|||
lizmat | m: for (0e0) { dd $_ if defined $_ && $_ ~~ /^ "Anything you like here" $/ } | 10:19 | |
camelia | 0e0 | ||
lizmat | m: for (0e0) { dd $_ if defined($_) && $_ ~~ /^ "Anything you like here" $/ } | 10:20 | |
camelia | ( no output ) | ||
lizmat | Nicholas: precedence ? | ||
Nicholas | that's plausible | ||
sjn | m: for (0e0) { .dd if .defined && /^ 0 $/ } | 10:54 | |
camelia | No such method 'dd' for invocant of type 'Num' in block <unit> at <tmp> line 1 |
||
lizmat | sjn: yeah, making .dd a method was a bridge too far :-) | 10:56 | |
sjn | maybe useful if .dd is in a role one can apply? | 10:59 | |
meh. dd is everywhere anyway :) | 11:01 | ||
11:08
evalable6 joined
|
|||
sjn | 11:21 | ||
hm. | 11:22 | ||
12:05
reportable6 joined
12:07
Ergo joined
12:08
Ergo left
|
|||
m6locks | so uhm where does rakubrew install zef? | 12:08 | |
12:09
Ergo444 joined
|
|||
Ergo444 | hello | 12:11 | |
I would like to ask something. | |||
El_Che | hello | 12:14 | |
Ergo444 | Is the channel dead? | ||
I have this subset StrNoQuotes of Str; | 12:15 | ||
El_Che | Ergo444: no, the channel is pretty active | ||
Ergo444 | sub rec(StrNoQuotes s) | ||
but the problem is if I say "hello" ~~ StrNoQuotes, it says true | 12:16 | ||
I would like to make a string with a special type I can recognise it within a sub | 12:17 | ||
if I say sub mysub ($s) | |||
if ($s ~~ StrNoQuotes but it is not good. | |||
because that matches if $s is a normal string | |||
I see no activity now. | 12:18 | ||
El_Che | people are having lunch on a saturday :) | 12:19 | |
stick around, people will pop up | |||
(that reminds me: lunch) | |||
Ergo444 | Only If you are in Euroope. | 12:20 | |
12:51
sm1 joined
|
|||
tbrowder | Ergo444: have you looked into enums? | 13:02 | |
Ergo444 | I can do with roles... I found out | ||
tbrowder | ok, cool | 13:03 | |
and where are you located, not in Europe i assume | |||
Ergo444 | role NoQuotes {} my $s="3+4" but NoQuotes; $s.WHAT --> (Str+{NoQuotes}) | ||
I am in Europe. | 13:04 | ||
tbrowder | ok | ||
did you try single quotes | 13:06 | ||
Ergo444 | For what reason? | ||
tbrowder | dunno, yr result seems it broke up the string | ||
Ergo444 | brokeup? | 13:07 | |
tbrowder | nevermind. can you put it in the repl here (m:) | 13:08 | |
Ergo444 | m: role NoQuotes {} my $s="3+4" but NoQuotes; $s.WHAT | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Strange text after block (missing semicolon or comma?) at <tmp>:1 ------> 3role NoQuotes {}7⏏5 my $s="3+4" but NoQuotes; $s.WHAT expecting any of: infix infix st… |
||
Ergo444 | m: role NoQuotes {}; my $s="3+4" but NoQuotes; $s.WHAT | ||
camelia | ( no output ) | ||
Ergo444 | m: role NoQuotes {}; my $s="3+4" but NoQuotes; say $s.WHAT | 13:09 | |
camelia | (Str+{NoQuotes}) | ||
Ergo444 | m: role NoQuotes {}; my $s="3+4" but NoQuotes; say $s.WHAT, $s~~NoQuotes; | ||
camelia | (Str+{NoQuotes})True | ||
tbrowder | is that what you expect? | 13:11 | |
Ergo444 | yes... | ||
tbrowder | good deal! | ||
td | |||
\o/ touchdown! | 13:12 | ||
Ergo444 | it allows to tag strings with different attributes... and perform different actions on them... relatively easily, depending on what roles they have. | 13:13 | |
tbrowder | i have only used roles a couple of times and they are very useful | ||
13:22
dogbert11 left,
dogbert17 joined
13:40
monkey_ joined
13:49
andrzejku joined
14:27
discord-raku-bot left,
discord-raku-bot joined
14:34
discord-raku-bot left
14:35
discord-raku-bot joined
14:48
sm1 left
14:56
dextercd joined
15:17
[Coke] left
15:21
[Coke] joined
|
|||
SmokeMachine | Hi! Could someone help me? Could someone try to run the tests for github.com/FCO/Test-Describe? it's breaking on GitHub actions, but works on my machine... | 15:35 | |
lizmat | is the problem that you cannot actually see the errors? backtraces ? | 15:36 | |
SmokeMachine | lizmat: the tests are just not passing: github.com/FCO/Test-Describe/runs/...focus=true but I can't reproduce it on my machine... I'd like to know if someone can reproduce it to let me know if that's my machine's problem or GitHub action's problem | 15:38 | |
15:42
phogg` is now known as phogg,
phogg left,
phogg joined
|
|||
lizmat | SmokeMachine: t/04-change.rakutest also fails for me | 15:44 | |
SmokeMachine | lizmat: ok, so that's my machine's problem, thanks! | ||
lizmat | yeah, same error output on MacOS Mojave | 15:46 | |
15:48
dogbert11 joined,
dogbert17 left
|
|||
SmokeMachine | that's so odd... usercontent.irccloud-cdn.com/file/.../image.png | 15:48 | |
16:14
andrzejku left
16:25
getimiskon joined
|
|||
Anton Antonov | "[...] the tests are just not passing: [link] but I can't reproduce it on my machine [...]" -- I think this is known as the "Mad Girlfriend Bug" -- when you see something strange is happening, but your software is telling you everything is fine. | 16:37 | |
16:59
andrzejku joined
|
|||
Skarsnik | Is there something I need to do to have my own operator support Junction? | 17:26 | |
lizmat | Skarsnik: use Mu in your signature | 17:28 | |
tellable6 | lizmat, I'll pass your message to Skarsnik | ||
17:32
Skarsnik joined
|
|||
Skarsnik | Not sure what do you mean? I need to support the Junction type? | 17:33 | |
tellable6 | 2021-11-27T17:28:37Z #raku <lizmat> Skarsnik: use Mu in your signature | ||
Skarsnik | and Positionnal/List arguments are a nightmare >< | 17:34 | |
m: sub infix:<type-eq>(Str:D $type, List:D @foo) {return @foo.join(" ") eq $type}; say "const char" type-eq <piko nyo>; | |||
camelia | Type check failed in binding to parameter '@foo'; expected Positional[List] but got List (("piko", "nyo")) in sub infix:<type-eq> at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
lizmat | "Is there something I need to do to have my own operator support Junction?" was your question, no ? | ||
Skarsnik | (this work in my code, but not here...) | 17:35 | |
Yes, I guess. I kinda expected Raku to run each Junction value to the op | |||
lizmat | I'm not sure I understand what you're trying to achieve, could you elaborate ? | 17:36 | |
Skarsnik | (I am dumb, List:D @foo is a list of list | ||
Hoo I see now | 17:37 | ||
m:sub infix:<type-eq>(Str:D $type, List:D $foo) {return $foo.join(" ") eq $type}; say "const char" type-eq <piko nyo> | <const char> | 17:38 | ||
evalable6 | any(False, (const char)) | ||
lizmat | I would just use @foo or Str:D @foo | 17:39 | |
correction: just @foo :-) | |||
or @foo where .all ~~ Str:D | 17:40 | ||
17:42
discord-raku-bot left
|
|||
Skarsnik | The real operator work on a more complex Type that Str :) Basicly it allow me to transform something like | 17:42 | |
return 'Str' if ($t.ref-type ~~ FundamentalType and $t.ref-type.name eq 'char') || | 17:43 | ||
($t.ref-type ~~ QualifiedType and $t.ref-type.ref-type ~~ FundamentalType and $t.ref-type.ref-type.name eq 'char'); | |||
to : return 'Str' if $t type-eq <Ptr char> | <Ptr const char>; | |||
17:43
discord-raku-bot joined
|
|||
Skarsnik | hm | 17:45 | |
m:multi sub infix:<type-eq>(Str:D $type, List:D $foo) {return $foo.join(" ") eq $type}; multi sub infix:<type-eq>(Str:D $type, Junction $j) {say "junction"; for $j -> $n {$type type-eq $n}} ;say "const char" type-eq <piko nyo> | <const char> | 17:46 | ||
evalable6 | any(False, (const char)) | ||
17:46
jrjsmrtn left
|
|||
Skarsnik | the operator is not "greedy" enought? | 17:46 | |
17:47
jrjsmrtn joined
|
|||
lizmat | for $j ... will **NOT** iterate over the eigenstates of the junction, if that's what you're thinking | 17:50 | |
Skarsnik | it's not even called x) | ||
I guess I need to check like the == operator in Raku x) | 17:53 | ||
There is no definition for Mu or Junction. Is that this that allow to use the operator with junction? trait_mod:<is>(&infix:<==>, :prec($chaining)); | 17:58 | ||
If I put () around the junction this work (without the Junction trait), but it's kinda sad ^^ | 18:02 | ||
18:02
reportable6 left
18:04
reportable6 joined
|
|||
Skarsnik | nativecallable6, int foo(char* piko); | 18:08 | |
nativecallable6 | Skarsnik, and I oop! Backtrace: gist.github.com/b7e192b2eeb5d21041...f54fc0667b | ||
18:34
seednode left,
seednode joined
18:38
synthmeat joined
18:47
Sgeo joined
18:54
seednode left,
seednode joined
19:01
andrzejku left
19:04
japhb left
19:09
japhb joined
19:11
monkey_ left
19:31
andrzejku joined
|
|||
Skarsnik | Noo, I got random segfault now >< Can I do some raku without having weird issue? xD | 19:33 | |
nine | Skarsnik: is it somewhat reproducible? | 19:42 | |
Skarsnik | It's not consistent, so maybe not? Is there a command to run to have a bt? | 19:43 | |
I mean outside running in gdb, I doubt this will be very helpful | 19:44 | ||
Ergo444 | hi all | ||
nine | Well gdb does make these things a lot easier. But rr is even better | 19:45 | |
Ergo444 | is the Javascript and jvm backend working? | ||
Skarsnik | I was expecting more like an argument you gave to raku x) | ||
nine | Skarsnik: does rakudo-gdb-m count? :D | 19:46 | |
Ergo444: jvm somewhat. Don't know about js | |||
Skarsnik | I happen since I added some code that delete stuff in both an array and hash while they are iterated over | 19:47 | |
Ergo444 | are there many commercial users? | ||
Skarsnik | (gdb) bt | 19:48 | |
#0 0x00007fffff19ac28 in MVM_gc_mark_collectable () from /usr/lib/moar/libmoar.so | |||
nine | Ergo444: several are listed on raku.org | ||
Skarsnik | Not really useful, I think there was a command to have the "raku" code? | 19:49 | |
nine | Skarsnik: if it segfaults there, it needs a closer look at VM level. Raku level backtrace won't help | ||
Best course of action is to give instructions on how to reproduce this segfault | 19:50 | ||
Ergo444 | I wonder how fast raku now. | ||
Skarsnik | But I think I remember you could know what instruction was running? | 19:51 | |
nine, well it's a 'big' project (GPTrixie) | |||
nine | Ergo444: faster than it used to be. Whether it's fast enough depends on your use case. In essence, you'll just have to trie it. | ||
Skarsnik | For me it's still too slow compared to other language, but depending on what you are doing it's probably not a big deal | 19:52 | |
nine | Skarsnik: as long as all components are easily installable, that shouldn't be an issue. You can get a Raku backtrace in gdb with: call MVM_dump_backtrace(tc) | 19:53 | |
You're gonna need to compile MoarVM with debug info though | |||
Ergo444 | I tried it three years ago | 19:54 | |
I still use Perl 5 mostly | |||
I must admit the language is very smooth | 19:56 | ||
Skarsnik | perl Configure.pl --gen-moar --moar-option='--optimize=0 --debug=3'--gen-nqp --backends=moar is enought nine ? | 19:57 | |
lizmat | I don't think the --gen-nqp and --backends=moar are needed in that case | ||
timo | it'd be enough to change moarvm's configure options and "make install" only moarvm | 19:59 | |
Skarsnik | let's try ^^ | ||
I don't want to spend too much stuff on that thou. I just wanted to fix GPTrixie to work better with castxml, I have a more interesting project to do after x) | 20:00 | ||
Also not sure if that can be improved but compiling is still kinda slow (could be because of wsl too if there is too much IO) | 20:03 | ||
Compile time of Raku module, not the whole moar/nqp/rakudo | 20:04 | ||
20:06
dogbert17 joined
20:08
dogbert11 left
|
|||
timo | i think there's a way to get stagestats to show recursive timings now in rakudo master | 20:09 | |
Skarsnik | (also this trigger me to see : fatal: not in a git directory x) | 20:14 | |
I work with release | 20:15 | ||
20:17
andrzejku left
|
|||
nine | There have been 113 commits on MoarVM since that release including quite a few bug fixes. I wonder if the bug is actually still there | 20:22 | |
Skarsnik | Reading symbols from /home/skarsnik/raku/bin/rakudo-m... | ||
(No debugging symbols found in /home/skarsnik/raku/bin/rakudo-m) | |||
0x00007fffff12d516 in MVMHash_at_key () from //home/skarsnik/raku/lib/libmoar.so this is more interesting x) | 20:24 | ||
I supect this crash in gist.github.com/Skarsnik/f3adb82dc...697d01838b since I remove entry from the table/hash I am currently iterating | 20:25 | ||
timo | oh, what's your version btw? | 20:32 | |
Skarsnik | 2021.10 | ||
timo | since we've just had a new implementation of hashes a couple months back | ||
Skarsnik | I still don't have debug symbols for moar :( | 20:33 | |
I tried running make distclean && perl Configure.pl --gen-moar --moar-option='--optimize=0 --debug=3'--gen-nqp --backends=moar --prefix=/home/skarsnik/raku/ && make && make install but gdb still give me a "empty" bt | 20:34 | ||
timo | the libmoar.so should have debug symbols, can you "file" it? | 20:35 | |
Skarsnik | /home/skarsnik/raku/lib/libmoar.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=1527b691445b9a3be39cc60f5c9388024e86112f, not stripped | 20:36 | |
timo | ok, so "not stripped" is already a good step forward | 20:37 | |
oh, right, turn off the JIT as well if you want proper C-level backtraces | |||
20:38
monkey_ joined
|
|||
timo | since we don't use the stack pointer / base pointer registers in the way gdb would require for things to go right ... at least that's how i interpret it | 20:38 | |
Skarsnik | I tried objdump --syms /home/skarsnik/raku/lib/libmoar.so | grep debug and this show nothing outside symbols that are called debugsthing (no .debug entry) | 20:40 | |
So I guess this does not compile with symbol x) | 20:41 | ||
timo | yeah, you'll probably want dwarfdump honestly | ||
the dwarf data has boatloads more information than just the publically exported symbols | |||
but dwarfdump doesn't come with typical installations of gcc and such, like "build-essential" | 20:42 | ||
nine | Skarsnik: did you by any chance have gdb still running when you did make install? | 20:43 | |
It may not be able to actually replace the file while it's in use | 20:44 | ||
20:44
monkey_ left,
andrzejku joined
|
|||
Skarsnik | I restarted it, it was even using an old rakudo, the system one I installed a long time ago (package was still called perl6) | 20:45 | |
timo | ooh, that is definitely a thing that happens, despite my best efforts (which were perhaps misguided and we'll perhaps want to actually revert that?) | ||
Skarsnik | I add -g | ||
let's see if that fix it x) | 20:46 | ||
huho fatal: unable to access 'github.com/Raku/nqp.git/': The requested URL returned error: 500 x) | 20:54 | ||
Let's take a shower and eat, then try this later I guess | 20:56 | ||
nine | Github has a major outage | 20:58 | |
www.githubstatus.com/ | |||
japhb | A bit disingenuous to say that webhooks are working if git operations aren't .... | 21:01 | |
.oO( "Well, there are no *errors* occuring ... I mean, there's also no *traffic*, but that's just semantics." ) |
21:02 | ||
tbrowder | lizmat: i should be able to clone yr mi6 repo and force install from it | 21:04 | |
21:11
andrzejku left
|
|||
Skarsnik | just when I rm -fr my raku install xD | 21:20 | |
Voldenet | Is there a mirror for raku repo? | 21:30 | |
21:34
jgaz joined
21:39
jgaz left
21:43
dogbert17 left,
dogbert17 joined
21:49
dogbert11 joined
|
|||
Skarsnik | that a good point x) | 21:51 | |
21:51
dogbert12 joined
21:53
dogbert17 left,
dogbert11 left
|
|||
timo | i mean, with git everybody essentially has a mirror :P | 21:55 | |
Skarsnik | could be nice if release could be build with github down, maybe copy each tagged thing somewhere and have the script use the mirror if regular git fail? | 21:59 | |
ugexe | realistically what does that achieve? almost certainly something you will want to use in the chain will use github | 22:01 | |
Skarsnik | sadly, yes ~~ | 22:06 | |
22:19
Tirifto_ is now known as Tirifto
22:20
qorg11 left
22:44
qorg11 joined
22:45
dogbert17 joined,
dogbert12 left
22:47
dogbert11 joined
22:50
dogbert12 joined,
dogbert17 left
22:52
dogbert11 left
23:12
dogbert12 left
23:13
Ergo444 left
23:47
jmcgnh left
23:58
djerius left,
dextercd left
23:59
djerius joined
|