🦋 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.
patrickb librasteve: I've long wanted to have some analytics for raku.org, docs.raku.org and rakudo.org. I have ideas of how to proceed but it's not made it to the top of my to-do list yet. I believe getting insight into what options people (don't) like can help here. 08:43
librasteve: I do hope your cleanup work will work out. (In the past I quickly started hitting walls as everyone's favorite option needs to be represented and prioritized either by putting it at the top or better put directly on raku.org above the link to rakudo.org. :-P) 08:48
El_Che_ librasteve: commented on #98 10:19
tbrowder__ hi, i'm working on a 12:27
Calendar module that will provide some customizable options. I am considering a config file using one of TOML, YAML, Hjson, or something similar. my personal choice is either Hjson os TOML. Hjson is a really clean user interface and code reading it converts it to std JSON. any prefs should be entered as an issue at <github.com/tbrowder/Calendar> 12:33
antononcube @tbrowder At this point I have made two calendar modules — both have smaller scope than what you try to do. Hence are fairly lightweight. 13:55
The customization of the second calendar module, “Markup::Calendar” is done via named arguments: “style”, “tooltip”, and “hyperlink”. 13:57
I did not consider using special format files, like, TOML or YAML. But I consider using JSON. (I decided not to.) 13:58
As I mentioned before, I want to make calendars quickly in a Markdown files or Jupyter notebook environments. 14:00
I have not heard about Hjson until few days ago. (Because of the package submitted by T. Akiyama.) 14:06
Xliff \o 17:01
tellable6 2024-01-31T12:44:00Z #raku <ab5tract> Xliff: you can also use `Terminal::Print::Input` ... it should probably have been it's own module
2024-01-31T15:20:43Z #raku <[Coke]> xliff: did 'brew install libgdata'. Do you need full names? I thought raku was smart about that.
2024-01-31T15:21:47Z #raku <[Coke]> xliff: os is 14.1.2 which is "Sonoma", I think.
2024-01-31T15:25:39Z #raku <[Coke]> xliff: names: gist.github.com/coke/a1512fde67908...a98a18b3b8
2024-02-07T13:44:07Z #raku <tbrowder__> Xliff got yr prs, thnx
Xliff Coke: Thanks. I need to release JSON-GLib before I can release GData, though.
Want to do that in the next couple of weeks. 17:02
m: class A { has $!b; has $!c; has $!d; method ^attributes { callsame.reverse }; }; A.^attributes.gist.say' 17:03
camelia ===SORRY!=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> ame.reverse }; }; A.^attributes.gist.say⏏'
expecting any of:
infix
infix stopper
statement end
statement …
Xliff m: class A { has $!b; has $!c; has $!d; method ^attributes { callsame.reverse }; }; A.^attributes.gist.say 17:04
camelia Too many positionals passed; expected 1 argument but got 2
in method attributes at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: class A { has $!b; has $!c; has $!d; method ^attributes { callwith(::?CLASS).reverse }; }; A.^attributes.gist.say
camelia Too many positionals passed; expected 1 argument but got 2
in method attributes at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: class A { has $!b; has $!c; has $!d; method ^attributes { callwith(::?CLASS.HOW).reverse }; }; A.^attributes.gist.say 17:05
camelia Too many positionals passed; expected 1 argument but got 2
in method attributes at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff Huh. Can you override a MOP call like this?
lizmat yes 17:06
under the hood it mixes in the method into a new HOW, afaik
Xliff So what am I missing? 17:07
Is there an example out there on the intrawebs?
lizmat a positional parameter in your ^attributes method?
m: class A { has $!b; has $!c; has $!d; method ^attributes($) { callwith(::?CLASS.HOW).reverse }; }; A.^attributes.gist.say 17:08
camelia (Nil)
Xliff m: class A { has $!b; has $!c; has $!d; method ^attributes($) { callwith(::?CLASS).reverse }; }; A.^attributes.gist.say
camelia (Nil)
Xliff m: class A { has $!b; has $!c; has $!d; method ^attributes($) { callwith(::?CLASS.HOW).reverse }; }; A.^attributes.gist.say 17:09
camelia (Nil)
Xliff m: class A { has $!b; has $!c; has $!d; method ^attributes ($) { ":P" }; }; A.^attributes.gist.say
camelia :P
Xliff Hrmph... OK, that's one part.
m: class A { has $!b; has $!c; has $!d; method ^attributes ($) { callsame(self.HOW) }; }; A.^attributes.gist.say
camelia Too many positionals passed; expected 0 arguments but got 1
in method attributes at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: class A { has $!b; has $!c; has $!d; method ^attributes ($) { callsame }; }; A.^attributes.gist.say 17:10
camelia Nil
lizmat yeah, I would be surprised if that would work...
Xliff Do I need to write my own HOW for a class? 17:11
lizmat you probably need to save the original HOW in a constant, and use that in the call
m: class A { has $!b; has $!c; has $!d; my constant how = $?CLASS.HOW; method ^attributes ($) { how.attributes(how) }; }; A.^attributes.gist.say 17:12
Xliff OK. Will experiment and share if I get it working.
camelia MoarVM panic: Memory allocation failed; could not allocate 131072 bytes
lizmat heh
Xliff d'oh
lizmat m: class A { has $!b; has $!c; has $!d; my constant how = $?CLASS.HOW; method ^attributes ($) { how.attributes(self) }; }; A.^attributes.gist.say
camelia MoarVM panic: Memory allocation failed; could not allocate 131072 bytes 17:13
lizmat something like that :-)
Xliff Yeah. OK. Will try and look into that one.
I think I'll start with figuring out how to write my own HOW for that particular class.
lizmat m: class A { has $!b; has $!c; has $!d; my constant how = $?CLASS.HOW; method ^attributes ($obj) { how.attributes($obj) }; }; A.^attributes.gist.say 17:14
you can always subclass ClassHOW
camelia MoarVM panic: Memory allocation failed; could not allocate 524288 bytes
Xliff lizmat: That's what I'm thinking about.
m: class A { has $!b; has $!c; has $!d; my constant how = ::?CLASS.HOW; method ^attributes ($obj) { how.attributes($obj) }; }; A.^attributes.gist.say
camelia MoarVM panic: Memory allocation failed; could not allocate 524288 bytes 17:15
Xliff I'm thinking it's calling itself.
the "10 goto 10" problem.
m: class A { ... }; class A { has $!b; has $!c; has $!d; my constant how = ::?CLASS.HOW; method ^attributes ($obj) { how.attributes(A) }; }; A.^attributes.gist.say 17:16
camelia MoarVM panic: Memory allocation failed; could not allocate 131072 bytes
Xliff m: class A { ... }; class A { has $!b; has $!c; has $!d; my constant how = ::?CLASS.HOW; method ^attributes ($obj) { callwith(A) }; }; A.^attributes.gist.say 17:17
camelia Nil
Xliff Yeah, I think this has confused the internals. A.^attributes is calling A.^attributes not how.attributes.
At least that's the behavior I'm seeing. 17:18
OK. Will work around. Thanks lizmat++
lizmat yw
tbrowder__ antononcube: i filed an issue with the Hjson module author for a bad link. the official Hjson site is now at hjson.github.io 17:30
it really is a clean scheme for a config file
antononcube Great thanks! 17:31
tbrowder__ yw 17:32
bscan Just sharing here. Now that CommaIDE development has been discontinued, I've been making more updates to the Raku Navigator Language Server. LSP is great and allows collaboration across vscode users, emacs, neovim, etc. If anyone wants to help, let me know! Updates shown here: www.reddit.com/r/rakulang/comments...r_updates/ 18:12
lizmat bscan++ 18:14
librasteve tbrowder: I am having a good experience with YAMLish. I found that TOML is too simplistic to adapt to my needs - encoding a unit object. JSON is very line noisy. YAML had the expressive power and readability for me. And YAMLish is very easy to adapt via a custom Schema. 19:04
bscan ++ 19:05
tbrowder__ librasteve: thnx 19:25
El_Che_ bscan: do you know of a intellij plugin for using that raku lang servicer 19:31
librasteve yep --- its up above in this thread somewhere 19:33
El_Che_ ok, nice, will have a look soonish 19:34
librasteve JetBrains (via github.com/ballerina-platform/lsp4intellij for example)
this is just from a general search but seems to do the job 19:35
fwiw I think that JetBrains Intellij is in catch up mode here and that LSP is likely to become a core feature (rather than plugin mediated) 21:53
bscan Agreed. JetBrains Fleet is built from the ground up to be more focused on remote development, with native LSP support. 22:20
El_Che_ I tried fleet 23:12
disliked it like I dislike VS Code