🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
rypervenche Is the ":my" supposed to be a "my" on docs.raku.org/language/grammars#Dy...n_grammars ? 00:41
leont No 00:45
That's how you declare a variable inside a rule
Without the colon it would match text, instead of being code
rypervenche Ah ok. 00:49
leont It's not very common to encounter, I just happen to know because YAMLish very much depends on the feature 00:58
Altreus I've asked a similar question before but - I have classes that need to know about each other, so that I can correctly use multi dispatch based on type. Is there a way of doing this without making an empty role for them both to consume, or empty parent class or something like that? 10:06
I was hoping I could somehow declare the existence of the type while remaining agnostic about the implementation of it 10:09
lizmat m: class A { ... }; class B is A { }; class A { } 10:28
camelia 5===SORRY!5=== Error while compiling <tmp>
'B' cannot inherit from 'A' because 'A' isn't composed yet (maybe it is stubbed)
at <tmp>:1
lizmat hmm
m: class A { ... }; class B { method b() { A.new } }; class A { }
camelia ( no output )
lizmat that works, as long as it's in the same compunit
Altreus ^^ 10:29
Altreus it's not :) 10:31
one class per file! ish
m: class A { ... }; class B { method b(A $a) { } }; class A { } 10:33
camelia ( no output )
Altreus mm
Also I'm quite enamoured with the 'unit' keyword :)
saves excess indentation 10:34
Ulti github.com/replit/polygott/pull/67 anyone familiar with rakudo-pkg and can leave me a comment? 10:55
lizmat El_Che ^^ ? 11:01
Altreus: then roles are your thing, I think :-) 11:02
Altreus c'est la vie
lizmat it's the reason the setting is compiled as a single humongous source-file 11:04
fwiw, I've suggested generalizing that concept in a problem-solving ticket 11:05
github.com/Raku/problem-solving/issues/143 11:06
moritz Hi all 12:18
I have a native sub declared as
sub py_bytearray_from_py(Pointer) is native($pyhelper) returns Pointer { ... }
when I try to call it, I get Cannot locate symbol '(null)' in native library '(null)'
any idea why it might try to call '(null)'? 12:19
moritz (and the is native($pyhelper) works for other functions) 12:24
huh, it turns out this is a problem with error reporting. The symbol didn't exist in the C library, and the error message simply sucks 12:25
El_Che Ulti, lizmat: I answered on the ticket 13:23
benlittle Hello! Are there any existing projects for auto-completion in raku? Similar to what jedi is for python. 16:10
timotimo Comma has rathor competent completion 16:12
benlittle Isn't comma closed source?
timotimo at the moment, yes
benlittle
But at least it's a start 16:13
What's the base grammar for the rakudo compiler? If I wanted to build a lexer, I imagine I should subclass from that. 16:24
timotimo the rakudo parser and one for autocompletion have different goals 16:46
one wants to reject wrong programs, the other wants to recover from mistakes, since there'll be a place where the user is currently editing
El_Che benlittle: the community comma edition is free as in beer 16:47
(I need yet to find a bar with free beer, but that's an other topic) 16:48
benlittle My only concern with closed source is that I want to understand the workings of the language better. That's also why I asked about the rakudo parser, as no matter what I do, I will need to have an idea of what the parser is actually doing with any given snippet of code. 16:56
Ulti El_Che: are you nxadm on GH? 16:57
I'm the other guy \o.
sorry if it came across as attacking rakudo-pkg I just wanted confirmation its repl.it not updating rather than you 16:58
glot.io has the same problem 16:59
it freezes everything from the last time the config was touched
which is quite unfortunate
El_Che Ulti: o/ 17:02
Ulti: I didn't feel attacked, I thought you were misinformed and added my two cents :)
Altreus I have a %constructor with a key 'roles' with an array in it. %constructor<roles>.say gives [506956809471262731 506956997543985222] 17:45
And it's used to construct an object whose class has @.roles
Class.new(|%constructor)
And now @.roles is [[506956809471262731 506956997543985222]]
Why did it get considered to be a single value, and not an array going into an array container? 17:46
What don't I know? :)
Altreus home time 17:48
japhb m: dd (1,2,3); dd [1,2,3] 18:41
camelia (1, 2, 3)
Array element = [1, 2, 3]
japhb m: say (1,2,3).raku; say [1,2,3].raku 18:42
camelia (1, 2, 3)
[1, 2, 3]
japhb Altreus: ^^ the [] one is itemized
m: say (1,2,3).WHAT; say [1,2,3].WHAT 18:43
camelia (List)
(Array)
japhb m: say ($(1,2,3)).WHAT; say ($[1,2,3]).WHAT 18:44
camelia (List)
(Array)
japhb Hmmmph, perhaps I was thinking back in the old days.
dertyhgtrfrde pleae 19:12
please
What is the correct extension for a raku file ?
please help
please
When I create a ruby file I have the icon with the superb jewell 19:13
but when I create a raku file I don't have the icon with the butterfly
dertyhgtrfrde please HELP 19:14
AlexDaniel`
dertyhgtrfrde cpan-raku please 19:14
rypervenche uhhh 19:18
dertyhgtrfrde plaese 19:21
I have try ".pl6"
".rk"
none of these are able to display the butterfly
dertyhgtrfrde Altai-man_ please 19:23
Altai-man_ dertyhgtrfrde, .raku or .p6?
dertyhgtrfrde I still don't have the butterfly 19:24
even with ".raku"
Altai-man_ dertyhgtrfrde, where do you want to see it? 19:33
dertyhgtrfrde the icon on my file 19:33
should I have a butterfly
Exactly like the icon of a Ruby file have a ruby 19:34
Altai-man_ dertyhgtrfrde, what system do you use? I am not sure there should be any icon anywhere, except you are using Comma IDE.
dertyhgtrfrde Linux with Debian 19:34
If this not butterfly, I will not be happy 19:35
Altai-man_ dertyhgtrfrde, can you show a screenshot? 19:36
dertyhgtrfrde I will not
rypervenche dertyhgtrfrde: I'm assuming that your file manager does not have an icon for Raku yet. 19:37
dertyhgtrfrde Do you have a butterfly ?
rypervenche what should I do ?
Altai-man_ dertyhgtrfrde, I am not sure we'll be able to help without knowing which program do you even use to display your files.
rypervenche dertyhgtrfrde: You could request that it get added upstream. I'm assuming you are seeing this in your file manager. If so, which one are you using? 19:38
What OS are you using and what version?
Also, you need to be patient. People here are volunteers and are not always available to answer questions right away. There is no need to spam "please", someone will respond when they are available to. 19:39
dertyhgtrfrde thunar 19:40
mst solution: stop caring about the icon, focus on learning the language 19:41
rypervenche I think that might be a GTK icon theme that handles that. I could be wrong there. 19:42
mst dertyhgtrfrde: this is not a raku problem and you should ask your distro's IRC channel for help instead.
rypervenche Yeah, your distro's channel will be able to help you find where to request its addition.
dertyhgtrfrde mst I could not program if there is not icon 19:43
It's not even an option
ok I will ask the distro 19:44
thanks
mst you can program whether there is an icon or not.
rypervenche dertyhgtrfrde: Even if you get it added upstream, it won't be available on your distro for at least one version upgrade. So unless you add it yourself, with that attitude you won't be coding in Raku.
mst you run 'raku myfile.rk' in the shell
mst dertyhgtrfrde: so no, that simply isn't true. 19:45
dertyhgtrfrde mst I think you don't understand
mst dertyhgtrfrde: you do not need an icon to program.
that is not true./
rypervenche By the way, .raku is the chosen extension for Raku files.
dertyhgtrfrde mst You are a genius
mst rypervenche: ah, sorry, my mistake 19:46
dertyhgtrfrde: you ran your file?
dertyhgtrfrde when I say I need the icon it's becaue
because I don't like when there is no icon
rypervenche Oooh, I think I see. Have you been running your scripts simply by double-clicking on them?
mst well, learn enough about your distro to install an icon then, I guess 19:47
my linux installs don't have icons for anything
dertyhgtrfrde the fact is that the script should be ported on a lot of distro
rypervenche Same, although I used to use Faenza icons when I used graphical file managers. 19:48
dertyhgtrfrde: What distro and version are you using?
dertyhgtrfrde it is not only for my computer, my distro
El_Che rypervenche: download an icon, right click on the file, change the icon on the basic tab, on the "open with" tab change the executable to raku
rypervenche dertyhgtrfrde: El_Che's message is for you. 19:49
El_Che sorry :)
dertyhgtrfrde Thanks
Hope a lot of distro will add an icon soon 19:50
rypervenche dertyhgtrfrde: They likely won't unless someone requests them. If we knew what distro you were using and therefore what icon theme, we could look into seeing how to get it added.
El_Che I see that .py and .p6 get an icon 19:52
El_Che .p6 gets a cartoonish camel head :) 19:52
it means if you used the .p6 extension for now, you'll have your icon 19:53
distro's will catch up soon
dertyhgtrfrde: in case you want to report so people packaging stuff notice, you can post it here: github.com/Raku/problem-solving/issues 19:56
Doc_Holliwood Watching the german workshop videos. Man I relly wanted to be there.
El_Che Doc_Holliwood: url us? 19:57
Doc_Holliwood Who's that charming british man who looks like young Montgomery Scott?
www.video.uni-erlangen.de/course/id/891
El_Che thc 19:59
c
x
dertyhgtrfrde Is it true someone is creating "Raku On Rails" ? 20:01
El_Che There is Cro 20:02
dertyhgtrfrde it is broken 20:03
El_Che is it?
dertyhgtrfrde YES 20:05
El_Che dertyhgtrfrde: the developers are on this channel, they will interested to hear where and in github issues with your problems 20:06
dertyhgtrfrde El_Che are you the developper ? 20:09
sena_kun dertyhgtrfrde, I'm one of them and probably can try to help if details given. 20:10
El_Che dertyhgtrfrde: no, but I have been helped before by the cro devs here 20:11
ctilmes1 Cro is awesome, devs are very helpful and responsive to issues reported through proper channels 20:16
dertyhgtrfrde sena_kun Hi. I am very sorry 20:18
I am here to troll
I though every body understood that
but it's seem not
sena_kun dertyhgtrfrde, (((( so trolled
dertyhgtrfrde I have never try Cro 20:19
even one second
So I can't tell you it is broken are not 20:20
or *
Is it true he is a spy ? 20:22
rypervenche It's nice to see fresh videos about Raku. Watching them now. :) Also looking forward to Jonathan's once he's feeling better. 20:26
dertyhgtrfrde Do you feer coronavirus ? 20:27
El_Che mst++ 20:30
mst El_Che: trout.me.uk/foom.jpg
El_Che foom is that a new p5 OO framework? :P 20:30
tadzik that'd be Moof 20:31
El_Che tadzik++ 20:34
mst I'm currently using Mu 20:38
El_Che I think Mu is using you 20:42
mst where software is concerned, that's often a muut point 20:55
El_Che software is hard 21:06
patrickb o/ 21:19
patrickb I just watched the replay of the GPW2020 Raku Q&A session. The last question was about how to package a Raku app on Windows so someone that has no Raku installed can use it. 21:22
regreg patrickb, was there a reasonable asnwer to that question? i'm interested too 21:26
patrickb Since no one mentioned it I'd like to point out that the relocatable precompiled rakudo releases that are available since a while can be used to create bundles that will run on someone elses machine. These packages contain zef and modules installed with that bundled zef are also part of the bundle then.
So I'd say that's a really simple way to create bundles. 21:28
regreg: The answers that were given in the talk were a last years google summer of code project that worked on creating actual executable binaries for raku programs (it's not production ready yet and only works on linux) and the recommendation to use Docker. 21:29
regreg i'm on windows 21:30
using wsl
regreg but i want to implement my game engine AI in raku 21:30
patrickb regreg: Sounds interesting! 21:32
regreg i actually have 2 projects, a stock market game and a civilization-like game
patrickb regreg: As advertised above, have a look at the precompiled release archives on rakudo.org They should run out of the box on Windows and can be used as the base for a raku program bundle. 21:33
regreg: Is the source code available somewhere to have a look? 21:34
regreg $ rakudo --version
This is Rakudo version 2020.01 built on MoarVM version 2020.01.1
implementing Perl 6.d.
no, it's a commercial game 21:35
indie game
if we hang around i might give you a license once i finish it :)
which might take about 1 year or so
patrickb lizmat, nine, moritz: ^ See above for another approach to packaging raku apps on Windows.
regreg this is the output from my windows installation of rakudo 21:36
in git bash
mingw
patrickb regreg: I'm not much into gaming (any more), more interested in the inner workings of the games nowadays. But thanks for the offer! :-) 21:37
tadzik regreg: sounds interesting, keep us updated :) 21:40
regreg i'm using raku mostly because of multimethods, i don't like using lisp syntax anymore 21:41