🦋 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:07 reportable6 left 00:09 reportable6 joined
Curiosa Parsing asm with raku should be straightforward, What is really difficult is to make an opcode table 00:12
Since x64 is really a mess
00:15 Curiosa left, Curiosa joined
moon-child yes, it is 00:17
I spend around 1.2k lines of code in my implementation, and I still don't do some stuff 00:18
(no avx512, mmx, or x87)
Curiosa Wow, congrats! 00:19
moon-child and that's not counting the instruction tables themselves, which are a similar size, nor the label logic
Curiosa Are you open sourcing it?
moon-child once it is complete enough to be useful to somebody 00:20
Curiosa You could leave something like avx512 out , if anyone will need they will provide
moon-child my goal is to provide a complete representation of x86 machine code, providing all potentially useful interpretations of all byte sequences 00:21
(i.e. disassembler is the interesting part, but still have to represent all the same things) 00:22
if you just want an assembler, those are a dime a dozen
Curiosa I think Rakudo still misses a native assembler 00:25
00:26 Curiosa left, Curiosa joined
Curiosa One could write a c compiler once he has an assembler 00:27
moon-child my assembler is not written in raku. So it is a moot point
if you want to write a c compiler, I suggest emitting textual assembly and targeting gas or nasm
making a native assembler is an interesting and worthwhile project, but it is certainly not necessary
Curiosa Nothing is necessary in modern computing 00:31
moon-child sure. I think that's a bit of a reductionist argument though. Gcc still pipes to gas 00:32
Curiosa I think that in terms of interoperability with C, C++ got it right. 00:34
And everyone else (a part Objective C) wrong
Sauf the language that are written in C 00:35
And Raku is not one of them
moon-child sure. You imply that interoperability in c is more important than other language characteristics. I do not agree with that
if you want to use c++, use c++
Curiosa No, I imply that Raku doesn’t express its potentia 00:36
Because of the fact that it’s written in Raku and doesn’t compile c 00:37
Imagine having to rewrite everything in Raku, and then having to follow every single new version and development happening in C only to keep being compatible 00:39
That’s what languages as D, Rust, Go, do it 00:40
In Perl, python you just need to recompile
There are other flaws in Raku, such as the reinvented wheels to parallel compilation 00:41
Make files are a thing from quite long 00:42
By the way, artificial intelligence will eventually be able to solve the halting problem in like 99.999% of software, and there will be no more intelligible programming languages 00:45
Esoren o_O 00:46
Curiosa moon-child said complete representation of x86 machine code 00:47
Seems like Turing proved this impossible 00:48
But ai gurus will solve this statistically I’m sure about that
moon-child I exclude the possibility of runtime code generation
otherwise it is possible
00:50 Curiosa left 00:54 evalable6 joined 01:00 monkey_ left 01:01 andinus left 01:04 Xliff joined
Xliff \ 01:04
\o
What's the best way to get the method OBJECT of a method? 01:05
class a { method AA { } }; A.^lookup('AA').gist.say
m: class a { method AA { } }; A.^lookup('AA').gist.say
camelia ===SORRY!=== Error while compiling <tmp>
Undeclared name:
A used at line 1. Did you mean 'a'?
Xliff m: class a { method AA { } }; a.^lookup('AA').gist.say
camelia AA
Xliff ^ Like the above, but without the .^lookup
class a { method AA { } }; a.AA.METHOD.gist.say 01:06
evalable6 Nil
Xliff class a { method AA { } }; a.AA.^name.say
evalable6 Nil
Xliff class a { method AA { } }; a.AA.^name.say # a.AA is still a METHOD CALL
evalable6 Nil
Xliff Was hoping it would work like lexical vars....
mmy $a = 01:07
m: my $a = 0; $a.VAR.name.say
camelia $a
Esoren I don't know much beyond what I've read in the docs, but I have read this:  docs.raku.org/language/packages#Cl...ber_lookup 01:18
Xliff Yes, but that uses .^lookup, which is what I want to avoid. 01:19
Esoren No other way is suggested 01:20
Xliff Yes. I was hoping that was no longer true. :)
01:34 qorg11 left 01:35 qorg11 joined 01:43 dextercd left 01:45 hasrthur joined 01:49 hasrthur left
guifa Xliff: you have to use HOW methods to get methods 01:52
Xliff Well, piffule. .^lookup is expensive. It shouldn't be expensive to lookup methods. 01:55
guifa perhaps find_method is a bit faster, I haven't measured, and I've never been super clear on which stuff is Raku and which is Rakudo specific for that stuff 01:56
Xliff class a { method AA { } }; a.^lookup( 02:22
class a { method AA { } }; a.^lookup('AA') for 10000; say now - INIT now; a.^find_method('aa'); say now - INIT.now 02:23
m: class a { method AA { } }; a.^lookup('AA') for 10000; say now - INIT now; a.^find_method('aa'); say now - INIT.now
camelia ===SORRY!=== Error while compiling <tmp>
Whitespace required after keyword 'INIT'
at <tmp>:1
------> ow; a.^find_method('aa'); say now - INIT⏏.now
Xliff m: class a { method AA { } }; a.^lookup('AA') for 10000; say now - INIT now; a.^find_method('aa'); say now - INIT now
camelia 0.00070379
0.003005477
Xliff So... ^lookup is faster. 02:30
japhb Xliff: Several problems there: 1. You're using `INIT now` as your start time and then doing two different measurements, 2. You're measuring times short enough that background interrupts or other task switches can affect the results, 3. Always looking up the same method means you're measuring the efficiency of caching that method, 4. You're doing sufficiently different numbers of iterations that you're 02:48
measuring steady state in one case, and first-run performance in the other.
02:49 linkable6 left, evalable6 left 02:50 evalable6 joined 03:50 coverable6 left, nativecallable6 left, sourceable6 left, shareable6 left, bloatable6 left, quotable6 left, squashable6 left, evalable6 left, notable6 left, reportable6 left, unicodable6 left, bisectable6 left, tellable6 left, statisfiable6 left, releasable6 left, benchable6 left, greppable6 left, committable6 left 03:51 sourceable6 joined, benchable6 joined, squashable6 joined, releasable6 joined, tellable6 joined 03:52 nativecallable6 joined, statisfiable6 joined 04:12 Colt joined 04:50 coverable6 joined 04:51 reportable6 joined, Esoren left 04:52 greppable6 joined 04:53 committable6 joined, quotable6 joined, bloatable6 joined 05:48 justsomeguy joined 05:50 linkable6 joined, notable6 joined 05:52 unicodable6 joined, evalable6 joined 05:53 bisectable6 joined 06:05 justsomeguy left 06:08 reportable6 left 06:47 archenoth left 06:52 shareable6 joined 07:01 djerius left 07:03 djerius joined 07:10 reportable6 joined 07:19 seednode99 left 07:20 seednode99 joined
Geth ecosystem/alabamenhu-patch-2: 4c0223b885 | L'Alabameñu++ (committed using GitHub Web editor) | META.list
Update META.list

Add new Timezones::ZoneInfo module to ecosystem (required for new DateTime::Timezones module)
07:52
ecosystem: alabamenhu++ created pull request #602:
Update META.list
guifa lizmat ^^ took a few more hours but it's finally there (yay for writing good test files, found some odd time zone names that I hadn't anticipated handling differently). Now on to learning RakuAST ^^ 07:56
^_^ I meant
Geth ecosystem: 4c0223b885 | L'Alabameñu++ (committed using GitHub Web editor) | META.list
Update META.list

Add new Timezones::ZoneInfo module to ecosystem (required for new DateTime::Timezones module)
08:18
ecosystem: 368c15e54e | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Merge pull request #602 from Raku/alabamenhu-patch-2

Update META.list
08:20 linkable6 left, evalable6 left 08:32 gugod left 09:10 lichtkind joined 09:21 hasrthur joined 09:23 evalable6 joined 10:10 Sgeo left 10:23 linkable6 joined 10:43 squashable6 left 10:44 squashable6 joined 11:16 frost joined 11:29 hasrthur left 11:31 gugod joined
Xliff Has anyone looked at Advent #24? 11:48
It begs for RakuAST. Until then, is there a writeup for the current QAST setup? How would run execute a QAST tree? 11:49
11:57 frost left 12:06 frost joined 12:08 reportable6 left 12:10 reportable6 joined 12:41 dextercd joined 13:21 frost left 13:23 frost joined 13:29 hasrthur joined 13:33 hasrthur left 13:39 tejr left
MasterDuke Xliff: github.com/Raku/nqp/blob/master/do...t.markdown 13:49
13:58 lichtkind_ joined 14:00 lichtkind left 14:06 lostsoul joined 14:19 lostsoul left 14:24 hasrthur joined
Xliff MasterDuke: replit.com/@Xliff/advcent-24-2021#main.raku 14:43
15:08 frost left 15:22 epony left 15:33 Xliff left 15:54 epony joined 16:07 hihihi joined 16:08 hihihi left
guifa Xliff have you started working with RakuAST yet? 16:21
Also… does anyone know how to throw a custom warning? I can't quite seem to get it right 16:23
m: class Foo is CX::Warn { ; }; warn Foo; CONTROL { when Foo { say "captured foo" } default { say "got a ", .WHAT.say } } 16:24
camelia ===SORRY!=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> ONTROL { when Foo { say "captured foo" }⏏ default { say "got a ", .WHAT.say } }
Anton Antonov @guifa Meaning, not just using `warn` or `note`?
guifa m: class Foo is CX::Warn { ; }; warn Foo; CONTROL { when Foo { say "captured foo" }; default { say "got a ", .WHAT.say } }
camelia (Warn)
got a True
guifa m: class Foo is CX::Warn { ; }; Foo.new.throw; CONTROL { when Foo { say "captured foo" } default { say "didn't capture" } } 16:26
camelia ===SORRY!=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> ONTROL { when Foo { say "captured foo" }⏏ default { say "didn't capture" } }
guifa m: class Foo is CX::Warn { ; }; Foo.new.throw; CONTROL { when Foo { say "captured foo" }; default { say "didn't capture" } }
camelia captured foo
guifa ^^ that one works BUT
m: class Foo is CX::Warn { ; }; Foo.new.throw;
camelia control exception without handler
in block <unit> at <tmp> line 1
guifa ^^ this ends up dying because there's no CONTROL, but that's not how a normal warn works
16:39 razetime joined 17:09 razetime left
gfldex guifa: costum control exceptions are not well supported by Rakudo. 17:20
see: github.com/rakudo/rakudo/issues/4227 17:23
18:03 Skarsnik__ joined 18:06 Skarsnik_ left 18:08 reportable6 left 18:09 reportable6 joined 18:58 sena_kun left, sena_kun joined 19:04 Sgeo joined 19:53 hasrthur left 19:58 thundergnat joined
thundergnat Anton Antonov: rosettacode.org/wiki/Finite_state_machine#Raku was contributed / written by rosettacode user smls. I do not know his IRL name and wouldn't dox him if I did. 19:59
He does have a github repository under the same user name, but it hasn't been active for some time. 20:02
In general all code on Rosetta code is under the GNU Free Documentation License. Refer to rosettacode.org/wiki/Rosetta_Code:Copyrights for specific guidance. 20:03
I have written a lot of Raku entries for Rosettacode (probably around 600-800) but that specific one was not by me. 20:04
20:34 jjido joined 21:03 jjido left
gfldex thundergnat: that is no reason not to blaim you :-> 21:06
smls hasn't been around for quite some time
thundergnat Well, you'll just have to get in line... :-)
gfldex @Anton Antonov#7232 you can find smls' e-mail (and may others) in github.com/rakudo/rakudo/blob/master/CREDITS 21:10
21:10 ptc left
gfldex That file is basically The Public Phone Book For Awesome Individuals. 21:11
21:31 jjido joined 21:40 hasrthur joined 21:41 jjido left 21:48 squashable6 left 22:03 jjido joined 22:14 jjido left 22:19 sena_kun left 22:21 sena_kun joined 22:25 sena_kun left
[Coke] .seen smls 22:26
tellable6 [Coke], I saw smls 2018-07-01T15:48:02Z in #perl6: <smls> lizmat: Heh, good point.
[Coke] it's been a while, aye.
22:26 sena_kun joined
guifa whoa, Comma IDE now shows like a little icon for projects based off of the first capital letter or two. Is there anyway to customize that? 22:48
22:49 squashable6 joined
guifa whoa, I'm getting segmentation faults when I tried installing a module on a different machine. What's the best way to track down those errors? 23:19
23:46 lichtkind_ left
guifa well, I tracked it down, but it's weird, I can't seem to golf it. Theoretically, this should be the golf 23:59
my $MAX = 8; class Foo { has int64 @.bar[$MAX] }; my int64 @bar[$MAX]; Foo.new: :@bar
m: my $MAX = 8; class Foo { has int64 @.bar[$MAX] }; my int64 @bar[$MAX]; Foo.new: :@bar
camelia ( no output )