🦋 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.
justsomeguy Is it possible to compile a raku program to a statically linked executable? 02:16
baboo say so '"="' ~~ / \" ~ \" <( '=' )> /; # Output: Falsesay so '"="' ~~ / \" <( '=' )> \" /; # Output: True 03:15
evalable6 False
JJMerelo releasable6: status 06:39
releasable6 JJMerelo, Next release in ≈17 days and ≈12 hours. There are no known blockers. Changelog for this release was not started yet
JJMerelo, Details: gist.github.com/d20b3ebd724a0cf6b8...a8556f1fc9
SmokeMachine Hi! Good morning! I was thinking. Is it possible to make an assignment return something different from what was assigned? Something like: `my $new-immutable-data-structure = $immutable-data-structure.some-field = $new-value;` 09:10
lizmat if $immutable-data-structure.some-field is a Proxy, you can have the FETCH return anything 09:12
m: my $a := Proxy.new( FETCH => { 42 }, STORE => -> $,$ { } ); say $a = 666' 09:13
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 032 }, STORE => -> $,$ { } ); say $a = 6667⏏5'
expecting any of:
infix
infix stopper
postfix
statement end…
lizmat m: my $a := Proxy.new( FETCH => { 42 }, STORE => -> $,$ { } ); say $a = 666
camelia 42
SmokeMachine lizmat: that makes sense, thanks 09:18
SmokeMachine lizmat: it seems to not work... :( www.irccloud.com/pastebin/sHSXlm2x/ 09:44
m: www.irccloud.com/pastebin/raw/sHSXlm2x
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3https:7⏏5//www.irccloud.com/pastebin/raw/sHSXlm2x
expecting any of:
colon pair
SmokeMachine camelia: help 09:45
camelia SmokeMachine: Usage: <(rakudo-moar|prof-m|nqp-js|p5-to-p6|star-m|nqp-jvm|rakudo-jvm|nqp-moarvm|debug-cat|nqp-m|rakudo|rj|sm|rm|r-m|m|p6|j|r-jvm|r-j|master|nqp-q|nqp|nqp-mvm|perl6|p56|r|star)(?^::\s(?!OUTPUT)) $perl6_program>
MasterDuke e: www.irccloud.com/pastebin/raw/sHSXlm2x
evalable6 MasterDuke, Successfully fetched the code from the provided URL
(exit code 1) No such method 'some-field' for invocant of type 'Int'
in block <unit> at /tmp/Q7oM6Ycscz line 14
SmokeMachine MasterDuke: thanks
MasterDuke np
SmokeMachine MasterDuke: any suggestion? ^^ 09:46
jnthn SmokeMachine: You need binding, not assignment 09:47
tellable6 2020-06-02T22:16:30Z #raku-dev <AlexDaniel> jnthn colabti.org/irclogger/irclogger_lo...-06-02#l93
SmokeMachine jnthn: the Proxy? 09:48
jnthn Yes
Assignment is always "put into the container on the left" 09:49
So it does FETCH on the Proxy and assigns it into the Scalar container on the left
thus your Proxy is already gone
jnthn Same reason as if you do `my %h = set <a b c>` then %h is a Hash, and you'd need to bind to have it be a Set 09:50
SmokeMachine jnthn: makes sense 09:51
jnthn AlexDaniel: Ooh, wow. I guess my best suggestion on cutting down output is to only report the most receent bissect result. Most of the time we're looking for a recent regression.
AlexDaniel: The rest could go in a gist.
AlexDaniel jnthn: oh, okay. I'll keep it this way for now, if people complain I'll do that to make the output smaller. 09:52
jnthn: very often there's just one change, so I hope usually the output will be the same 09:53
but we'll see how it goes
SmokeMachine jnthn: this hangs... :( www.irccloud.com/pastebin/2ASZxhQo/ 09:54
lizmat m: class A { has $.foo is built(:bind) is rw = Proxy.new( FETCH => { 42 }, STORE => -> $,$ { } ) }; dd A.new.foo = 666 # SmokeMachine
camelia 42
SmokeMachine e: www.irccloud.com/pastebin/raw/2ASZxhQo
evalable6 SmokeMachine, Successfully fetched the code from the provided URL
(signal SIGHUP) «timed out after 10 seconds»
SmokeMachine lizmat: thanks! I didn't know `is built(:bind)` what there already. but I remember of reading about it (but I'm not sure if I remember what I've read about that). Thanks! 09:56
jnthn SmokeMachine: Don't write a `method` for FETCH
SmokeMachine: It will try to decont the invocant for self
Which will in turn call FETCH, and thus infinitely recurse 09:57
SmokeMachine jnthn: how should I access `$!last-return` otherwise?
lizmat jnthn: or write an explicit invocant, right? method foo(\SELF:) ??
jnthn lizmat: nope, that doesn't stop binding into `self`, I don't think
It ain't gonna help you access $!last-return anyway, 'cus self would be the Proxy 09:58
lizmat ah, indeed
jnthn You'll just have it by closure semantics, I think?
lizmat yeah, -> $, $value { } should work
SmokeMachine no luck: www.irccloud.com/pastebin/LINH7g9T/ 11:23
SmokeMachine e: www.irccloud.com/pastebin/raw/LINH7g9T 11:23
evalable6 SmokeMachine, Successfully fetched the code from the provided URL
(exit code 1) No such method 'some-field' for invocant of type 'Int'
in block <unit> at /tmp/_6Rx57jt2k line 14
SmokeMachine sorry, my bad 11:24
now it seems to work www.irccloud.com/pastebin/idzFo8NL/ 11:26
e: www.irccloud.com/pastebin/raw/idzFo8NL
evalable6 SmokeMachine, Successfully fetched the code from the provided URL
13
42
13
42
lizmat that's what I'm seeing as well :-) 11:27
SmokeMachine but that "data structure" isn't really immutable, right? it's mutating `$!last-return`... 11:28
lizmat indeed... and tbh, I don't really see the point on what you're achieving here.... 11:32
feels to me there is really a design issue that is getting fixed in a very complicated way :-) 11:33
SmokeMachine lizmat: I'm just trying to study functional data structures 11:34
SmokeMachine lizmat: and trying to figure out what would be good a syntax to use them 11:39
tbrowder found it i think... 12:30
Geth doc: 584013a945 | (Luis F. Uceta)++ | doc/Language/101-basics.pod6
Revise 'Raku by example 101' page

  * Organize the page such that h1 headers introduce a few lines of code
that might be further discussed by subheaders. This way the examples are self-container to their own section (and subsections).
  * Remove meta-commentary from the sample code. Instead, leave it for the
   discussion text.
  * Index terms more clearly.
12:34
linkable6 Link: docs.raku.org/language/101-basics
doc: d4e059947e | (Luis F. Uceta)++ | doc/Language/101-basics.pod6
Make changes as requested
doc: 1896846e02 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/101-basics.pod6
Merge pull request #3457 from uzluisf/master

Revise 'Raku by example 101' page
cpan-raku New module released to CPAN! Sparrowdo (0.1.8) by 03MELEZHIK 12:37
New module released to CPAN! Tomty (0.0.11) by 03MELEZHIK
Geth ecosystem: khalidelboray++ created pull request #499:
Cmark
13:01
elcaro huh 13:03
I need to do similar to perls `pack('d*', $num)` and found that neither the experimental pack feature nor p5pack module supported 'f' or 'd' 13:07
turns out that - given a Buf - 'f*' is just `.write-num32(0, $float)` and '*d' is `.write-num64(0, $float)` !
lizmat elcaro: patches for P5pack are welcome :-) 13:08
elcaro I spent the last hour learning how nums are packed into bits for nothing :D
thanks, liz i'll try to get around to it. should also be mentioned in pack docs, too, i suppose
Geth doc: 75cbce7079 | Coke++ | doc/Language/101-basics.pod6
fix example compilations
13:25
linkable6 Link: docs.raku.org/language/101-basics
Geth ecosystem: khalidelboray++ created pull request #500:
Cmark , travis tests passing
13:39
ecosystem: 064f73f3e4 | (Khalid Mohamed Elborey)++ (committed using GitHub Web editor) | META.list
Cmark , travis tests passing
13:52
ecosystem: 7c3620e549 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | META.list
Merge pull request #500 from khalidelboray/patch-2

Cmark , travis tests passing
melezhik Yet another proposal of Sparrowdo/Raku as configuration management tool on reddit devops - www.reddit.com/r/devops/comments/g...dium=web2x 15:52
please vote it up if you like
El_Che had anyone know of the exitence of xml-rpc raku libs ? 16:17
ctilmes jdv79: JSON::simd here: github.com/CurtTilmes/raku-jsonsimd 16:18
jdv79: Should be on CPAN soon
Still refining build/install process for the libraries -- hopefully it will install everywhere. Interested in feedback from Windows folks especially.
El_Che ctilmes: pardom my ignorance, is it compatible with xml-rpc? 16:25
melezhik @ct 16:26
El_Che I go some example generic perl5 code to reach a service, and I would like to use raku for that
melezhik ctilmes I've RakuDist for it - rakudist.raku.org/sparky/report/debian/176 16:27
ctilmes El_Che: Not sure what you are asking? It reads/parses JSON into Raku data structures. Not sure what that would have to do with xml-rpc. 16:30
El_Che ctilmes: ah ok, you weren't responding to me question. Sorry, I just misunderstood 17:20
ctilmes np 17:21
jdv79 odd that OpenSSL doens't like to install on ubuntu 17:24
melezhik jdv79 I've played with OpenSSL installations on varios Linux and I'd say it does not install anywhere 17:26
I'll will share some RakuDist builds later
I've run it for Ubuntu - rakudist.raku.org/sparky/report/ubuntu/177 17:28
melezhik well, OpenSSL succeeds on Ubuntu - rakudist.raku.org/sparky/report/ubuntu/177 17:31
and here is my ssl system packages for Ubuntu, just in case - github.com/melezhik/RakuDist/blob/...rowfile#L7 17:32
so you could see final configuration
jdv79 ctilmes: remarkable how similar the from-json case timing is between ::Fast and ::simd 17:40
wonder where efforts to speed that up would focus best
i just tested on a random set of 50 json files ranging size from around 100k to 200k or so 17:42
ctilmes jdv79: Did you play with the :delay option? That's where I saw the huge improvements. 17:57
cpan-raku New module released to CPAN! IRC::Client::Plugin::DiceRolls (0.1.0) by 03TYIL 18:00
New module released to CPAN! CSS (0.0.5) by 03WARRINGD 18:10
jdv79 ctilmes: not yet. i saw the "(almost)" bit and didn't delve in yet
jdv79 are the differences fully known? 18:11
jdv79 looks about 30x faster - nice 18:13
ctilmes For the 'almost', the only difference I've found is when you ask the object for its name -- otherwise they should act identically to arrays/hashes -- if you find a way in which they don't, let me know. 18:14
jdv79 i just ran $d.deepmap... and it borks on teh delayed one and not on the from-json one 18:15
i'll try to dig into it later i guess
ctilmes also the JSON path stuff -- You can do $object<foo/bar/2/this> and it will jump right to the right result 18:16
jdv79 cool 18:19
jdv79 ctilmes: thanks! its covers some cases of mine. but i still someimtes have to iterate the whole thing. 19:23
cpan-raku New module released to CPAN! Sparrow6 (0.0.22) by 03MELEZHIK 22:34
Geth problem-solving: 7fbe6dcb1f | (Patrick Böker)++ | solutions/language/Windows-process-argument-quoting.md
Solution for #20: Windows process argument quoting
23:07
problem-solving: cc185d8187 | (Patrick Böker)++ | solutions/language/Windows-process-argument-quoting.md
Correct a typo
problem-solving: dd5529c625 | (Jonathan Worthington)++ (committed using GitHub Web editor) | solutions/language/Windows-process-argument-quoting.md
Merge pull request #178 from patrickbkr/problem-solving20

Solution for #20: Windows process argument quoting