🦋 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.
tbrowder i found this while implementing a frac function for a PR 00:01
i'm filing a rakudo issue unless someone can say it's ok 00:02
lucs That looks absolutely wrong :) 00:04
Unless it's parsed as -(1.5e0.abs) ? 00:06
00:27 mowcat left, mowcat joined
tbrowder issue #4242 has been filed 00:28
raydiak that's my guess, postfix method call is probably tighter precedence, so you can say e.g. "-obj.attr" or so 00:29
tbrowder that may be. i haven't so far found where that's handled in the rakudo code. your thought sounds good 00:30
raydiak I'd personally hope the whole thing with the negative would be parsed as a single term, though. hopefully someone more knowledgable will chime in
tbrowder i am really surprised that the Int worked 00:31
raydiak m: say -(1.5e0.Int) 00:32
camelia -1
raydiak m: say (-1.5e0).Int
camelia -1
tbrowder m: say (-1.5e0).abs 00:39
camelia 1.5
tbrowder the way i found the error was copying some tests from the "sign" function which used the same syntax but with the ".sign" method and that did work 00:41
raydiak m: say -1.5e0.sign
camelia -1
moon-child wonders if we need a low-precedence versio of ., a la and/&& and or/||
that's -(1.5e0.sign)
completely consistent 00:42
raydiak okay now that is a bit unsettling...
oh, right
I guess the only real problem is that the - should probably be part of the numeric term, not an operator, at least you'd think... 00:43
moon-child apl uses ¯ for negative literals and - as a negation function 00:44
00:48 monkey__ joined
raydiak I'm hoping someone is just going to pop up and declare it to be a parsing bug. I could be remembering wrong, but I thought we even had a test for this in roast forever ago... 00:49
tbrowder there are LOTS of tests and i haven't yet tried to find any specific tests for the situation. it needs someone more aware of the numerics 00:51
moon-child dump.t has a number of tests with things like (-128).raku (rather than -128.raku) 00:53
raydiak m: say 1/2.Int # Rats have the same problem 00:57
camelia 0.5
raydiak pretty sure negatives and rationals were supposed to be terms, last I knew
moon-child that creates problems, though. 5-6 is two terms juxtaposed, whereas 5 - 6 is a subtraction 00:58
(though there is the same problem with kebab-cased identifiers) 00:59
01:00 vike left
raydiak ttiar is not valid raku unless i'm mistaken, so only one is a valid parse. backtracking is how the grammar works, no? 01:00
moon-child ttiar? 01:01
grammar uses backtracking yeah
raydiak two terms in a row 01:03
design.raku.org/S99.html#TTIAR 01:04
moon-child ahh. yes; it's just surprising behaviour imo
01:07 pecastro left
raydiak the current behavior surprises me more, but perhaps that means more about me than raku :) 01:13
01:26 kst joined
raydiak m: say -42 .abs 01:43
camelia 42
raydiak I found this discussed in logs from 2015. the current behavior is known and intended. 01:44
moon-child that is ...
there's also this fwiw 01:45
m: say .abs given 42
camelia 42
moon-child m: say .abs given -42
camelia 42
raydiak m: say <-42>.abs 01:46
camelia 42
01:49 irced joined
tbrowder ok, thnx, i'll regroup, close the issue, and press on. thanks all for helping me. bye 01:51
01:52 monkey__ left
raydiak yw, good luck 01:52
01:55 monkey__ joined
codesections out of curiosity, raydiak, do you have a link to the 2015 discussion? I'm curious about the logic 01:56
02:11 Doc_Holliwood left
raydiak codesections: just from my own logs: gist.github.com/raydiak/47f754ca4b...bd79d60d56 02:15
02:15 wamba joined 02:17 mowcat left
codesections raydiak++ ty 02:19
raydiak of course, you're welcome
I don't see anything particularly conclusive there that makes me feel swayed other than the overloading issue. mostly just shows that it was known and discussed by core devs years ago. didn't see anything else pertinent further down, the conversation just moves on to other things 02:21
rir_ lizmat, The Exceptional Road was the next I intended to explore. I'll keep Noise and Discipline in mind as I go. 02:23
02:27 kvw_5 joined 02:30 kvw_5_ left
codesections yeah, agreed re: nothing all that definitive. I like moon-child's idea of steal borrowing APL's ¯ syntax for negative numbers, though 02:38
02:41 _jrjsmrtn joined 02:42 __jrjsmrtn__ left
raydiak easy enough to do from your own code if you want, I guess is the conclusion of that conversation 02:57
03:17 wamba left 03:50 lizmat_ joined, monkey__ left 03:51 vrurg_ joined 03:52 [dpk] joined 03:53 gfldex_ joined, tobs` joined 03:54 Some-body_ joined 03:55 KotH_ joined, [Coke]_ joined, [Coke]_ left, [Coke]_ joined, nichfury joined, timlegge_ joined 03:58 jmcgnh_ joined, Maylay joined, webstran- joined, Ekho left 03:59 parabolize left, [Coke] left, gfldex left, vrurg left, timlegge left, lizmat left, telex left, jmcgnh left, mendel left, KotH left, avar left, cgfbee left, Voldenet left, mniip left, tobs left, lnx left, DarthGandalf left, webstrand left, Maylay_ left, hvxgr_ left, a6502 left, dpk left, nicholatian left, Some-body_ is now known as DarthGandalf, [dpk] is now known as dpk, tobs` is now known as tobs, Ekho joined, webstran- is now known as webstrand, a6502 joined, hvxgr joined 04:00 avar joined, avar left, avar joined, jmcgnh_ is now known as jmcgnh, Voldenet joined, Voldenet left, Voldenet joined, jmcgnh is now known as jmcgnh_ 04:01 jmcgnh_ is now known as jmcgnh, xkr47 left, mniip joined 04:02 telex joined, cgfbee joined 04:05 parabolize joined 04:10 lnx joined, mendel joined, aluaces left 04:18 vrurg_ is now known as vrurg 04:35 wamba joined 04:46 irced left 04:59 kaiwulf left 05:33 vike joined 05:45 brtastic joined 06:05 rindolf joined 06:07 jmerelo joined 06:12 Doc_Holliwood joined 06:23 orinthe8 joined 06:25 orinthe left, orinthe8 is now known as orinthe 06:28 aluaces joined 07:02 Sgeo left 07:27 Doc_Holliwood left 07:28 KotH_ is now known as KotH 08:02 irced joined 08:05 domidumont joined 08:08 parabolize left 08:13 pecastro joined 08:17 abraxxa joined 08:21 abraxxa left 08:22 abraxxa joined 08:23 Doc_Holliwood joined 08:42 dakkar joined 09:00 irced left 09:01 Altai-man_ left 09:09 sena_kun joined 09:29 irced joined 09:36 lizmat_ is now known as lizmat
lizmat clickbaits and another Rakudo Weekly News hits the Net: rakudoweekly.blog/2021/03/08/2021-...ated-star/ 09:36
09:38 Doc_Holliwould joined, Doc_Holliwood left 09:44 leah2 left
jmerelo lizmat++ 09:46
09:46 leah2 joined
jmerelo You probably know it already, but we weren't funded for this round of Google Summer of Code 09:46
lizmat no I didn't :-( 09:47
perhaps next year as The Raku Foundation :-)
10:03 irced left 10:08 plvicente joined 10:13 Doc_Holliwould left 11:00 plvicente left
Geth Raku-Steering-Council/main: 7f08895a14 | (Elizabeth Mattijsen)++ | minutes/20210306.md
The minutes of RSC meeting on 6 March 2021
Raku-Steering-Council/main: 89b6b476c1 | (Elizabeth Mattijsen)++ | minutes/20210306.md
Better markdown for minutes
11:12 wamba left
jmerelo lizmat++ 11:13
lizmat hmm... I just realized I forgot to mention who attended
11:15 PimDaniel joined
PimDaniel \o 11:15
tyil o/
Geth Raku-Steering-Council/main: f4c246d80b | (Elizabeth Mattijsen)++ | minutes/20210306.md
Mention who was in attendance

I guess Stefan *did* make it to the meeting, although it was towards the end of the meeting :-)
PimDaniel When we write ' my @a = @b" @b is not cloned into @a? I suppose @a acts like a pointer, no? Or i must write @a := @b? 11:17
11:17 wamba joined
tyil PimDaniel: what is the output you're seeing, and what is the output you're expecting? 11:18
PimDaniel tyil : This is just general question. I do no speek of output for now. 11:19
tyil ah
PimDaniel I just want to understand.
tyil m: my @b = < a b c >; my @a = @b; @b[0] = 'd'; say @a; say @b; 11:20
camelia [a b c]
[d b c]
tyil after assigning @b to @a, and then altering @b, the changes don't show up in @a
m: my @b = < a b c >; my @a := @b; @b[0] = 'd'; say @a; say @b;
camelia [d b c]
[d b c]
PimDaniel Yes tyil, i know this. 11:21
So the response is := for attrib if i want @a is address of @b. 11:22
But now, my question is what happens if your object is copied from a sub or method? 11:23
11:24 plvicente joined
PimDaniel method mysub { my @b = <a b c d e f g h>; @!a = @b; } @!a is a class parameter!! will @!a still exist after leaving the method? 11:25
tyil if your class contains a `has @.a`, yes 11:26
PimDaniel @.a or @!a, no ?
tyil both should work, yes 11:28
PimDaniel I suppose the Perl5 principe remains that until a reference is attached to an object the object not destroyed.
Which is not the case in C langage with pointers. 11:29
tyil I'm not sure about that, maybe a core dev will read this and come with an answer to that
lizmat @!a indicates the actual attribute
@.a indicates the *accessor* to the attribute 11:30
if there is one
if you have specified an attribute like @!a, there is no accessor
PimDaniel Ok thank's tyil, so i must change some of my assignements.
lizmat m: class A { has $!foo }; dd A.new.foo
camelia No such method 'foo' for invocant of type 'A'
in block <unit> at <tmp> line 1
lizmat m: class A { has $.foo }; dd A.new.foo 11:31
camelia Any
PimDaniel yes lizmat : this is clear for me.
lizmat also: as long as an object exists, its attributes will exists as well 11:32
PimDaniel but @.a is the accessor AND the attribute of course. This is a powerfull trick to avoid to write accessors.
lizmat PimDaniel: it even goes further. $.foo is just short for self.fee 11:36
PimDaniel: it even goes further. $.foo is just short for self.foo
11:36 aluaces left
lizmat m: class A { method bar { "bar" }; method foo { $.bar } }; ; say A.foo 11:37
camelia bar
lizmat m: class A { method bar { "bar" }; method foo { self.bar } }; ; say A.foo
camelia bar
PimDaniel lizmat i'v read that $.foo create the methods accessors: foo{ return $!foo } and getter foo($x) {$foo = $x}. 11:39
lizmat you mean setter ? 11:40
the latter is incorrect
PimDaniel setter
yes i know
and getter foo($x) {$!foo = $x} 11:41
lizmat if you say: has $.foo, it basically creates a method foo() { $!foo }
this decontainerizes the $!attribute, so it is a right value
if you say: has $.foo is rw, then it basically creates: method foo() { return-rw $!foo } 11:42
PimDaniel Hum OK i see!
lizmat so then it returns the container, and in Perl speak: you have an l-value sub
PimDaniel Ok i see this is more subtil that i thought. 11:44
lucs kj
PimDaniel but it is very intelligent.
May be those who wrote that were not supids.
lizmat :-) it took a while, though :-) 11:45
PimDaniel Yes!
tyil you can't rush art
tadzik unless it's speedpainting 11:46
PimDaniel I'm confident Raku will win!
It's better than many langages for many things. I like python because it is simple but i prefer Raku because it is powerfull and has many possibilities. 11:47
tyil better is relative 11:48
if speed is your goal, you're gonna have a hard time competing with C ;D
PimDaniel tyil i've yet watch this. 11:49
lizmat tyil: that's only processing speed :-)
tyil lizmat: true
PimDaniel remenber The begining of PHP. :))))). Memory heap etc... 11:50
tyil (I don't use Raku for it's runtime performance anyway, but the performance boost it gives to the developer, which would be me)
if it takes me mere seconds to write (or reason) about my code, compared to minutes (or hours) in another lang, I see that as a big win :D 11:51
PimDaniel Yes of course : performance is not all.
lizmat I dropped PHP at 1.9b5 or something like that, after I spent 3 days trying to figure out why it didn't work, and it turned out to be a syntax error that it didn't catch
tyil I have php 7.3 and 7.4 installed this very moment 11:52
lizmat I did keep using PHP in production until mod_perl came around, but that PHP was generated by a Perl script :-)
PimDaniel In fact i hate PHP.
I really prefer Python but PHP is one of the fastest. 11:53
because you speak of speed.
tyil if you're doing web applications, php is one of the faster choices, indeed
PimDaniel I used PHP recently to write a small program: horror!
tyil (and I personally prefer php > python as well) 11:54
if only because the community is more helpful in my experience
PimDaniel i use PHP CLI.
tyil and python can't even make it's main promise of "one way to do a thing" true in its own stdlib
there's a handful of methods to format a string now, and in my not so humble opinion, they all suck :p 11:55
PimDaniel I like python because things are simple.
tyil I wish I could agree 11:56
PimDaniel back later. 12:00
12:00 PimDaniel left
El_Che isn't web applications a JS thing nowadays? 12:06
tyil El_Che: nothing is a JS thing if it were up to me 12:10
12:18 xinming_ left 12:19 xinming_ joined 12:28 gabiruh left 12:33 aluaces joined 12:39 db48x joined, db48x left, db48x joined 12:40 mowcat joined 12:43 gabiruh joined 12:49 linkable6 left 12:50 linkable6 joined 12:53 plvicente left
codesections sadly, it doesn't appear to be up to you, judging by, e.g., the number of electron apps/js-heavy websites out there these days 12:53
tyil very sadly indeed 12:54
13:04 plvicente joined 13:11 dakkar left 13:19 wamba left 13:26 plvicente left
leont Electron apps are a terrible idea from the user's perspective, but great from a corporate one 13:26
SmokeMachine vrurg: Hi! just to let you know that I've answered your issue on Red (github.com/FCO/Red/issues/472). I hope that's what you needed. I'd really like to have more people testing `has-one`. I don't think that should be experimental, but only with more people trying that I'll be able to make it a normal feature.
13:28 xinming_ left 13:30 xinming_ joined 13:36 plvicente joined
tbrowder .ask jmerelo jj, tweak has disappeared from the docs again 13:38
tellable6 tbrowder, I'll pass your message to jmerelo
13:40 Black_Ribbon left 13:52 jmerelo left 14:00 xinming_ left 14:02 xinming_ joined, plvicente left 14:08 xinming_ left 14:10 xinming_ joined
kawaii good afternoon o/ 14:11
14:11 rir left
lizmat kawaii o/ 14:12
14:22 plvicente joined 14:48 aluaces left 15:07 Sgeo joined
El_Che tyil: I was working on a small react js app as a client for a rest service (for people that don't know how to use curl) without knowing much JS or react. It was OK, no scars so far 15:13
tyil I generally oppose js requirements on websites, seeing as js is the de-facto way to get malware over the web 15:14
not allowing js in your browser is by far the best thing you can do to boost your online security
El_Che not allowing JS is the best way not to be able to use sites nowadays 15:19
tyil most websites aren't ones that I want to use anyway 15:20
El_Che a future of wasm wakes you up at night, right? :)
tyil but opening up a massive security hole just to propogate terrible development practices sounds like a bad idea anyway
not sure what value that wasm comment has
El_Che wasm would make web dev more obvious because you can do it in your lang of choice instead of js 15:21
tyil I am aware
but your snarky comment isn't helping you convince anyone of your viewpoint 15:22
El_Che you missed or don't appreciate sarcasm, but it's OK 15:23
(what you certainly missed is that I am not trying to convince anyone)
tyil brushing off a failed attempt of a witty comment as sarcasm is cute, but not worth anything 15:24
SmokeMachine El_Che: if you don't know much of JS, maybe next time you could think of using something like this: github.com/FCO/MemoizedDOM/blob/ma...do/App.pm6 (I'm just kidding)
tyil I hope you have a good day getting upset at other people having differing viewpoints
I'll go check out a different buffer for now
SmokeMachine El_Che: I'm kidding, but that works!!! fco.github.io/MemoizedDOM/todo6.html 15:25
El_Che upset?
we're on a different frequence, I think, as I am not upset
15:27 mowcat left
El_Che SmokeMachine: is it a kind of wasm or a transpiler to JS? 15:29
it runs on github pages, so it generates JS?
SmokeMachine neither... it's Rakudo.js running on webperl (github.com/FCO/MemoizedDOM/tree/ma...o-webperl) 15:30
El_Che: try opening the source code... usercontent.irccloud-cdn.com/file/.../image.png 15:31
El_Che SmokeMachine: wow, nice 15:33
SmokeMachine :)
El_Che I didn't know you could do that 15:34
it's raku code in the html
SmokeMachine yes, it is :) 15:35
15:35 kaiwulf joined
SmokeMachine that's why it takes so long loading... :) 15:35
I really think it would be cool to improve that 15:36
(probably not very useful, but very cool) 15:37
15:37 plvicente left 15:40 xinming_ left
SmokeMachine El_Che: And I like the MemoizedDOM solution as well... I still need to do a html slang for that, as I've done for this: github.com/FCO/p6-react 15:41
15:42 xinming_ joined
El_Che SmokeMachine: is it a experiment and can you use it to build webpages? 15:46
15:46 rindolf left 15:48 rindolf joined
SmokeMachine El_Che: that todo app uses this(webperl.zero-g.net/perl6.html) but it can also be transpiled. and both MemoizedDOM and p6-react I've done to see if that was possible... I still plan to improve them. but all the merit to running is from Rakudo.js and not mine 15:50
15:50 parabolize joined 15:55 masak left, mst left, mst joined 15:56 masak joined, sergot_ left, masak is now known as Guest43420, sergot joined 16:07 rakunoob joined, rakunoob left 16:10 brtastic left, aluaces joined 16:25 brtastic joined 16:41 plvicente joined, brtastic left 16:44 wamba joined 16:46 brtastic joined 16:50 brtastic left 17:11 plvicente left 17:16 [Coke]_ is now known as [Coke] 17:31 timlegge_ is now known as timlegge 17:38 patrickb joined 17:39 plvicente joined 17:49 jmerelo joined 17:51 plvicente left 17:54 aluaces left 18:13 kaiwulf left 18:20 aborazmeh joined 18:24 aluaces joined 18:31 wamba left 18:39 aborazmeh left 18:40 vrurg left 18:48 jmerelo left 18:53 vrurg joined 18:57 clarjon1 joined 18:58 vrurg left 19:16 domidumont left 19:29 MasterDuke joined 19:36 aborazmeh joined 19:37 abraxxa left 19:38 Kaiepi left 19:40 Kaiepi joined 19:45 wamba joined 19:57 plvicente joined 19:59 wamba left 20:01 aborazmeh left, aborazmeh joined, kaiwulf joined 20:09 plvicente left 20:13 plvicente joined 20:17 vrurg joined 20:18 vrurg_ joined 20:22 vrurg left 20:24 plvicente left 20:25 aborazmeh left, vrurg joined, vrurg_ left 20:30 cpage_ joined 20:32 cpage left, cpage_ is now known as cpage 20:33 vrurg_ joined 20:36 vrurg left, vrurg_ left 20:37 vrurg joined 20:42 patrickb left 20:52 vrurg left 20:55 xinming_ left 20:57 xinming_ joined 20:58 vrurg joined 20:59 aborazmeh joined 21:00 vrurg left 21:03 plvicente joined 21:07 mowcat joined 21:12 vike left 21:13 Kaiepi left 21:14 plvicente left 21:15 Kaiepi joined 21:17 moon-child left, hvxgr left 21:25 hvxgr_ joined 21:32 rindolf left 21:35 moon-child joined 21:37 hvxgr_ left 21:39 brtastic joined 21:40 moon-child left 21:42 hvxgr_ joined 21:45 moon-child joined 21:49 moon-child left, hvxgr_ left 22:06 moon-child joined, vike joined, mowcat left 22:10 Kaiepi left 22:11 Kaiepi joined 22:14 brtastic left, moon-child left 22:30 hvxgr_ joined 22:36 sena_kun left 22:49 hvxgr_ left 22:57 tealecloud left 22:58 guifa2 joined
guifa2 vrurg: so after finally upgrading my dev machine to a post-COERCE one… I realized that Role() sadly doesn't work because the role has to punned and any stubbed methods cause it to bomb. Not sure if there's a way around that 23:00
tellable6 guifa2, I'll pass your message to vrurg
23:01 dogbert11 joined 23:04 dogbert17 left 23:17 moon-child joined 23:21 moon-child left 23:58 vrurg joined