»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
timotimo i'd love a little bit of help with systemd/udev, if anybody would be willing to give me a bit of their time 00:15
i've written a udev rule that gives a particular device an alias, and now "systemctl status -a" shows the device as plugged in about 20 times 00:16
each entry has a "Follow: unit currently follows state of ....device", but looking at these device files with systemctl status gives "Loaded: loaded", "Active: inactive (dead)"
sortiz m: use Test; my @foo = (Failure.new("")); throws-like { @foo[0].sink }, Exception, "Does throw" 00:22
camelia 1..2
ok 1 - code dies
ok 2 - right exception type (Exception)
ok 1 - Does throw
sortiz m: use Test; my @foo = (Failure.new("")); fails-like { @foo[0] }, Exception, "Does fail" 00:28
camelia 1..2
ok 1 - code returned a Failure
1..2
ok 1 - code dies
ok 2 - right exception type (Exception)
ok 2 - Failure threw when sunk
ok 1 - Does fail
irced yawns with great exaggeration. 00:54
c: put 00:55
committable6 irced, I cannot recognize this command. See wiki for some examples: github.com/perl6/whateverable/wiki/Committable
irced m: put
camelia 5===SORRY!5===
Argument to "put" seems to be malformed
at <tmp>:1
------> 3put7⏏5<EOL>
Other potential difficulties:
Function "put" may not be called without arguments (please use () or whitespace to denote arguments, or &put t…
irced m: put out
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
out used at line 1. Did you mean 'put'?
irced camelia: put out
m: say the probability that the sun won't rise tomorrow. 00:56
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed postfix call
at <tmp>:1
------> 3bility that the sun won't rise tomorrow.7⏏5<EOL>
irced dumb robot
ctilmes m: use Test; isa-ok Buf.new, Buf 01:45
camelia not ok 1 - The object is-a 'Buf'
# Failed test 'The object is-a 'Buf''
# at <tmp> line 1
# Actual type: Buf
ctilmes m: use Test; isa-ok Buf.new, Blob
camelia not ok 1 - The object is-a 'Blob'
# Failed test 'The object is-a 'Blob''
# at <tmp> line 1
# Actual type: Buf
ctilmes Is that because Buf is really a role, not a class? 01:46
ctilmes m: use Test; isa-ok Buf.new, 'Buf' 01:48
camelia ok 1 - The object is-a '"Buf"'
ctilmes This works
SmokeMachine does any one know why this could happen? github.com/FCO/Red/pull/130 02:01
timotimo that's probably due to mixin types now having to be marked as such 02:03
and you're trying to mix in something that's not a role perhaps? 02:04
did you try --ll-exception yet?
irced lo timotimo, i had another epiphany. perl6 doesn't need to replace BASH etc, it just needs to interop :-) this is a better epiphany. 02:18
irced climbs a tree, jumps for a vine, and yells like tarzan across as he swings over a canopy of black leopards.
irced slams into a tree and slides down slowly, painting the bark with epithelial tissue and blood stains. 02:20
SmokeMachine timotimo: yes, I’m mixing up... 02:28
SmokeMachine timotimo: github.com/FCO/Red/pull/130/files#...c1db653R26 02:30
timotimo: but it only happens on this test...
drclaw under what conditions do race and hyper methods run in parallel? 03:08
the docs say returns an iterable that is potentially iterated in parallel for both race and hyper 03:09
drclaw { say ((1...10).race.map({ sleep 0.5;$_ +1 })); say (now - ENTER now )} takes around 5 seconds. so not in parallel 03:12
drclaw with default degree => 4 it should take about 4 times less time 03:18
ugexe drclaw: scheduled work doesnt have to take place in a new thread 03:22
m: (1..10).race(:batch<1>).map({ sleep 0.5; say $*THREAD.id }) 03:26
camelia 4
6
7
8
4
6
7
8
4
6
drclaw I get a consant thread id when running that 03:30
ugexe increase 1..10 to 1..100
ugexe or higher 03:31
drclaw ahh batch size... hah hah 03:32
drclaw makes sense. thanks for that 03:33
learning as much as i can about perl6 but sometime I forget the simple stuff! 03:37
irced commits harikari. 03:45
Kaiepi how do i make a supply with a mutable timeout between emissions? 04:07
Kaiepi i tried using Supply.throttle(...).on-close(...) and reassigning the tap from the on-close callback but sometimes i would end up with two taps running at once? 04:08
ugexe use a supply block? 04:15
m: my $s := supply { for 1..5 { emit($_); sleep $_; } }; $s.tap: { say time };
camelia 1552709718
1552709719
1552709721
1552709724
1552709728
ugexe not sure if you can work your timeout logic in such a construct, but if you can i think that should work 04:16
Kaiepi m: my Rat $timeout = 0.1; my Supply $s := supply { for 1..* { emit $_; sleep $timeout; } }; $s := $s.serialize.schedule-on: $*SCHEDULER; my Tap $t = $s.tap({ .say }); sleep 1; $timeout = 0.5; sleep 5; $t.close 04:21
camelia (timeout)1 04:22
Kaiepi m: my Rat $timeout = 0.1; my Supply $s := supply { for 1..100 { emit $_; sleep $timeout; } }; $s := $s.serialize.schedule-on: $*SCHEDULER; my Tap $t = $s.tap({ .say }); sleep 1; $timeout = 0.5; sleep 5; $t.close 04:22
camelia 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Kaiepi m: my Rat $timeout = 0.1; my Supply $s := supply { for 1..100 { emit $_ / $timeout; sleep $timeout; } }; $s := $s.serialize.schedule-on: $*SCHEDULER; my Tap $t = $s.tap({ .say }); sleep 1; $timeout = 0.5; sleep 5; $t.close 04:23
camelia 10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
260
270
280
290
300
310
320
330
340
350
360
370
380
390
400
410
420
430
44…
Kaiepi hm 04:24
m: sub timeout(--> Rat) is raw { my $t = 0.5; Proxy.new(FETCH => method() { $t }, STORE => method ($nt) { $t = $nt }) }; my Rat $timeout = timeout(); my Supply $s := supply { for 1..100 { emit $_ / $timeout; sleep $timeout; } }; $s := $s.serialize.schedule-on: $*SCHEDULER; my Tap $t = $s.tap({ .say }); sleep 2.5; $timeout = 1; sleep 5; $t.close 04:25
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> 3my $t = 0.5; Proxy.new(FETCH => method()7⏏5 { $t }, STORE => metho…
Kaiepi m: sub timeout(--> Rat) is raw { my $t = 0.5; Proxy.new(FETCH => method () { $t }, STORE => method ($nt) { $t = $nt }) }; my Rat $timeout = timeout(); my Supply $s := supply { for 1..100 { emit $_ / $timeout; sleep $timeout; } }; $s := $s.serialize.schedule-on: $*SCHEDULER; my Tap $t = $s.tap({ .say }); sleep 2.5; $timeout = 1; sleep 5; $t.close 04:26
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot assign a literal of type Int (1) to a variable of type Rat. You can declare the variable to be of type Real, or try to coerce the value with 1.Rat or Rat(1), or just write the value as 1.0
at <…
Kaiepi m: sub timeout(--> Rat) is raw { my $t = 0.5; Proxy.new(FETCH => method () { $t }, STORE => method ($nt) { $t = $nt }) }; my Rat $timeout = timeout(); my Supply $s := supply { for 1..100 { emit $_ / $timeout; sleep $timeout; } }; $s := $s.serialize.schedule-on: $*SCHEDULER; my Tap $t = $s.tap({ .say }); sleep 2.5; $timeout = 1.0; sleep 5; $t.close
camelia (timeout)2
Kaiepi m: sub timeout(--> Rat) is raw { my $t = 0.5; Proxy.new(FETCH => method () { $t }, STORE => method ($nt) { $t = $nt }) }; my Rat $timeout = timeout(); my Supply $s := supply { for 1..100 { emit $_ / $timeout; sleep $timeout; } }; $s := $s.serialize.schedule-on: $*SCHEDULER; my Tap $t = $s.tap({ .say }); sleep 1; $timeout = 1.0; sleep 2; $t.close 04:27
camelia (timeout)2
Kaiepi m: sub timeout(--> Rat) is raw { my $t = 0.5; Proxy.new(FETCH => method () { $t }, STORE => method ($nt) { $t = $nt }) }; my Rat $timeout = timeout(); my Supply $s := supply { for 1..10 { emit $_ / $timeout; sleep $timeout; } }; $s := $s.serialize.schedule-on: $*SCHEDULER; my Tap $t = $s.tap({ .say }); sleep 1; $timeout = 1.0; sleep 2; $t.close
camelia 2
4
6
8
10
12
14
16
18
20
Kaiepi ok that doesn't work 04:28
ugexe m: my $state; sub timeout($to?) { $to ?? ($state = $to) !! $state }; my $s := Supply.on-demand(-> $supply { start { for 1..7 { $supply.emit($_); sleep timeout() // 1 } } }); $s.tap({ say time }); sleep 5; timeout(5); sleep 10; 04:49
camelia 1552711792
1552711793
1552711794
1552711795
1552711796
1552711797
1552711802
04:50
uzl m: class B { has $.val; method add($x) { $!val += $x;} }; put B.new(:1val).add(9) 04:51
camelia 10
ugexe m: my $state; sub timeout($to?) { $to ?? ($state = $to) !! $state }; my $s := Supply.on-demand(-> $supply { start { for 1..7 { $supply.emit($_); sleep timeout() // 1 } } }); $s.tap({ say time }); sleep 2; timeout(5); sleep 10;
uzl m: class B { has $.val; method add($x) { $!val += $x;} }; put B.new(:1val).add(9).add(10)
camelia 1552711898
1552711899
1552711900
1552711905
No such method 'add' for invocant of type 'Int'
in block <unit> at <tmp> line 1
ugexe notice how the timeout changes from 1s to 5 s 04:52
uzl m: class B { has $.val; method add($x) { $!val += $x; self} }; put B.new(:1val).add(9).add(10)
camelia B<40463208>
uzl m: class B { has $.val; method add($x) { $!val += $x; self} }; put B.new(:1val).add(9).add(10).val 04:53
camelia 20
uzl Do all methods that can be chained need to return the invocant? If so, I guess this mean I cannot return the invocant object if I want a certain method to return a type, right?! 04:56
uzl m: class B { has $.val; method add($x --> self) { $!val += $x;} }; put B.new(:1val).add(9).add(10).val 05:00
camelia 5===SORRY!5=== Error while compiling <tmp>
Type 'self' is not declared
at <tmp>:1
------> 3ss B { has $.val; method add($x --> self7⏏5) { $!val += $x;} }; put B.new(:1val).ad
ugexe it means you need to design your class to encapsulate your types to allow that 05:10
m: say now.succ.succ.succ
camelia Instant:1552713061.911789
ugexe yet that method has a return type constraint
cpan-p6 New module released to CPAN! pack6 (0.1) by 03ALOREN 08:50
tbrowder SmokeMachine: are you actively here? 10:48
SmokeMachine tbrowder: hi! I’m here! 11:20
tbrowder okay, i have successfully designed red models for my real use case, and i can successfully load all into an in-memory sqlite db. now i have to (1) modify my db load script to check for existence in tables before an insert attempt, (2) split the model definitions into separate packaged into the lib dir (and successfully use them in the load script), and (3) create the query script with queries described in my README.md. I will 11:30
submit the PR after completing 1 and before completing 2 and 3.
i will then work on an update script as a fourth step. 11:32
or, if you don't mind the noise, i can submit the PR and continue as stated. 11:33
SmokeMachine tbrowder: I don't mind at all 11:38
tbrowder okay, coming at you... 11:39
andrew hi 11:43
tbrowder SmokeMachine: PR has been submitted 11:55
andrew i look forward to learning perl 6 soem day 12:03
tbrowder andrew: welcome. are you a p5 user? 12:04
andrew naah 12:05
i was on tho
one*
tbrowder ? 12:06
andrew i used to use p5
but then a power outage happened and i forgot everything about it
tbrowder ah, how was that experience for you?
andrew it was good 12:07
just good, not the best ever
tbrowder well, i think i can promise you will love p6!
andrew i think i will 12:08
araraloren welcom :)
e
andrew i golfed p5 a lot 12:08
tbrowder i'll give you your money back if that doesn't happen
andrew as if p6 costs monie
araraloren haha :D
antoniogamiz andrew: welcome :D 12:09
andrew p5 was my last stint in programming, actually
b4 then i used several languages and "swinged" between them 12:10
antoniogamiz andrew: I started to learn perl6 two weeks ago and it's quite funny, quite different from other languagues I've used
andrew anyway, what's done here
do we just flex on other languages 12:11
if we do, that's dumb
araraloren :? 12:15
andrew waddaweedooheear
tbrowder SmokeMachine: what is the return value for a query (.^load ?) which finds nothing, falsy?
SmokeMachine the model obj type... 12:16
tbrowder andrew: we "chat and chew"
so then i need to check that object's attributes of interest? 12:18
then is there a way to see, in one step, true or false, if a particular row in a table exists? 12:20
andrew i dunno 12:26
tbrowder andrew: sorry, rest of my response was for SmokeMachine 12:36
andrew it's ok 12:37
i was out
SmokeMachine tbrowder: just check the definedness...
tbrowder ok, i get confused, is > 12:38
*is "!defined" a boolean false? or do i need an explicit defined check? 12:40
moritz ! always returns a Bool
m: say Any.defined.^name 12:41
camelia Bool
moritz m: say 1.defined.^name
camelia Bool
moritz m: say (!1.defined).^name
camelia Bool
moritz m: say (!Any.defined).^name
camelia Bool
SmokeMachine tbrowder: www.irccloud.com/pastebin/UEQhLcij/ 12:42
SmokeMachine tbrowder: sorry, I was wrong... `.^load` is returning `Nil` if the row does not exist 12:45
tbrowder thanks, got it
still false, correct?
SmokeMachine tbrowder: yes... 12:46
tbrowder if Person.^load(:key($key)) { # do something...} 12:47
SmokeMachine tbrowder: yes... 12:56
tbrowder: I've sent you a review on your PR... 12:57
tbrowder ok, thnks
andrew i am back 13:11
araraloren :) hi 13:15
andrew on an esoteric language chat, i made an esolang based on the positions on the planets 13:16
you can define your own planets
andrew and i am serious 13:19
araraloren what's that? Sorry I am not English native speaker, can not understand :( 13:20
andrew an esolang is a programming language that is weird 13:21
araraloren oh, a programming language
andrew instead of printing hello world in a cinch, you have to do tons more operations
araraloren hmm, I see
antoniogamiz similar to haskell then xdd 13:22
andrew no
not that
"9!dlroW ,olleH"ck,@ 13:23
this is befunge, an esolang
and this is hello world for ya
andrew you may be saying "andrew you are lying you made this up" 13:24
araraloren oh, sound interesting
andrew but i did not
there's a programming language with one operation 13:25
it's called ///, pronounced slashes
araraloren sound like brainfuck :)
andrew brainfuck has 8 operations 13:26
but /// has one
araraloren okay
tbrowder SmokeMachine: when i added the Person load test above and executed that line i get error like "too few positionals passed, expected 2 got 0" 13:27
SmokeMachine tbrowder: could you show me the code? 13:28
andrew hello world: / world! world!/Hello,/ world! world! world!
tbrowder yes, updating PR in a moment... 13:29
andrew here's a quine with only the two slashes: /\/\/\/\\\\/\\\\\\\/\\\\\\\/\\\\\\\/\\\\\\\\\\\\\\\\\\\\\\//\/\/\/\\\/\/\\////\\////\\\///\\////\\\///\\////\\\///\\////\\\///\\\///\\\///\\\///\\////\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\////\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\////\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\////\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\
andrew what's up, yall 13:38
AlexDaniel o/ 13:43
andrew: maybe you'll like code-golf.io/
andrew i've seen it 13:43
unfortunately, YOU CAN'T VIEW THE SOLUTIONS OF OTHERS 13:44
tbrowder SmokeMachine: I've updated the PR with your suggestions, and added code to check all table entries before create to avoid duplication errors. The code is throwing on line 149 on the Person.^load test. I have to leave for a while, be back in about an hour...
andrew GRRRRRRRRRRRRRRRRRRR
THIS IS A NATIONAL TRAVESTY TO CODERS EVERYWHERE 13:46
SmokeMachine tbrowder: I added a comment there... the problem for this error seems to be the Person table not having a pk... try changing `has Str $.key is column{:unique};` to `has Str $.key is id;` 13:50
tbrowder okay; and i lied, i did not add a grammar because i don't really have the knowedge without a LOT of fumbling with the code. however, i can add it to a new TODO inside or outside the code. 14:02
tbrowder SmokeMachine: after the Person id change, i haven't been able to get a successful losd check line. i've tried: Person.^load(... 14:21
sena_kun is there a way to make travis use specific commit of Rakudo?
because my code is broken on both 2018.12(old bug was fixed) and 2019.03(a regression has happened, it seems), but works in between. 14:22
tbrowder .^load(ARG) with ARG: ":id"
tbrowder ":id($key)" 14:23
tbrowder :key($key) 14:23
$key, {:key($key)} 14:24
:id($key), {:key($key)} 14:25
no success so far...out of ideas... 14:26
SmokeMachine .^load($key) 14:29
sena_kun never mind me, no regression 14:32
tbrowder SmokeMachine: having success using grep...back in a while 14:55
cpan-p6 New module released to CPAN! Algorithm-LibSVM (0.0.4) by 03TITSUKI 15:42
andrew hello there guys, andrew here 15:56
antoniogamiz o/ 15:57
tbrowder SmokeMachine: that doesn't work, may be because of string key, i have a grep wrking instead, PR update coming in a bit.. 15:59
andrew did ya know
perl 6 was only unveiled on christmas 2015
even though it was in the works since 2000 16:00
araraloren yeah, I know it 16:01
tbrowder SmokeMachine: PR updated, load-db.p6 works for me :-D 16:12
andrew there was a 100 million dollar heist in belgium and the smoking gun was a half-eaten salami sandwich 16:15
moritz
.oO( smoking sandwich )
16:25
SmokeMachine tbrowder: I’ve answered :) 16:33
Geth doc: cba54ed4cd | (JJ Merelo)++ | doc/Programs/03-environment-variables.pod6
Some reflow

And actually improving description of variable. This closes #1799
17:14
antoniogamiz the only way to compute derivatives is using Math::Model 17:29
moritz Math::Model actually integrates, using Math::RungeKutta 18:22
(numerically, that is)
hankache hello #perl6 19:37
yoleaux 10 Mar 2019 11:10Z <stmuk_> hankache: that star RC looks great. I just tried it on FreeBSD 11 and it worked fine.
tbrowder hankache: \o/ 19:44
hankache hello tbrowder
clarkema hi hankache 19:46
tbrowder SmokeMachine: i'm not having any luck with moving models to their own packages in a lib dir. i think the non-standard, user-defined string key is causing at least some of the trouble.
hankache hi clarkema
clarkema have you had chance to look at that CSV issue? 19:47
I was hoping to get around to it today, but had to put out some work fires
hankache Not yet. I am hoping tonight though
uzl Hello, #perl6! 20:06
.tell ugexe Can you show with a simple example how it can be done? BTW, I'm referring to this: colabti.org/irclogger/irclogger_lo...03-16#l157 20:08
yoleaux uzl: I'll pass your message to ugexe.
lembark Q: Is there a Perl6 equivalent to Devel::Size (metacpan.org/pod/Devel::Size)? 20:09
lembark About to write a talk on memory manglement in perl6, be nice if I could figure out the size of a variable. 20:10
lembark I can't see any way to extract it directly from Perl6 (which doesn't mean I'm not missing someting). 20:12
tbrowder SmokeMachine: hm, what if i make all the models with the standard id and use my key as a secondary key in a unique column. as long as i keep the two keys in sync for a given model all should work well then, should it not? 20:17
timotimo lembark: you'd mostly need to use the heap snapshot profiler for that purpose 20:22
there's also a little bit in the Telemetry module, but not specific to individual objects, just general stuff
SmokeMachine tbrowder: it worked here for me! 20:23
tbrowder: www.irccloud.com/pastebin/DbaNT9NP/ 20:24
tbrowder hm, maybe my model package files are not correct. can you show one of them, please? 20:26
SmokeMachine tbrowder: have you seen the diff? 👆 20:28
tbrowder yes, but i don't see the separated code outside the script. i named my packages '/lib/Person.pm6', ...; inside all but the Person file i added at the top "module Person {...}", and that is all. 20:32
lucs The HTML produced by 「perl6 --profile -e 'say "Moo"'」 shows no numbers, just template-like strings like 「The profiled code ran for {{TotalTime}}ms」. 20:33
Am I doing something wrong?
timotimo is it loading the angularjs library properly?
lucs No idea :)
timotimo any errors in the inspector? 20:34
lucs Let me see...
timotimo with the "relocateable perl6 binary" branch perhaps going in soon-ish, i should be able to make a moarperf appimage or something 20:35
lembark Would you be willing to work on that at all? 20:36
lucs timotimo: There are indeed errors related to angular. I'll see if I can sort it out.
lembark Catch is that I need to find *some* way to describe profiling object memory in time to write the talk for YAPC :-) 20:37
timotimo you mean functionality to measure the size impact of a particular variable?
lembark Preicise.y.
"Precisely"
timotimo i can describe a very round-about way to do it that'll surely be a very bad idea to actually try
but i won't have something easy up soon
how long is it?
tbrowder i'm using perl6 from 2019.03, and I get this error: 20:39
www.irccloud.com/pastebin/PEz3kt4Q/ 20:40
SmokeMachine tbrowder: oh! of course!!! sorry!
timotimo lembark: but did you try the heap snapshot profiler yet? i'm currently rewriting the data format (again), but the old format of course still works 20:41
lembark Have to give the talk in June.
timotimo that's more time than i thought
thing is, figuring out the right semantics for "how big is this variable" is hard
lembark hmmm... 20:42
Gotta *give* the talk in June.
timotimo right, ideally it'd be finished before you have to give the talk 20:43
lembark Be nice to find a way of figuring out sizes -- however messy -- pretty soon to start testing it.
It'll take me a month or more to write the talk :-)
Seems worth having something similar to Devel::Size floating around for benchmarking in any case. 20:44
SmokeMachine tbrowder: I don't know how, but I've pushed it to your repo...
timotimo how is it supposed to handle shared things?
lembark First pass: size is size, up to the user to not double-count shared. 20:45
lembark Eventually be nice to show shared as a category. 20:46
Q: Where are you (physically)?
timotimo if you just say "oh double-counting shared is fine", you'll be counting a *lot* of shared crap
masak question of taste. if you do `last` in a loop, but after the loop you want to check "did we do `last` in that loop?" -- how would people write it idiomatically? 20:46
lembark first pass will be looking at an object before & after some set of operations.
timotimo just an array full of nulls will have each null object and the STable for the null object and also the WHO, though i don't think it'd have one? and also a WHAT for good measure
BBL 20:47
lembark BBL?
tbrowder SmokeMachine: great, got it, stupid me! 20:48
lucs (Be Back Later, usually)
lembark First pass would be looking at an array with X items, result of push + pop on it, see how the memory footprint changes.
Look at a hash, see how the size changes with a set of insertions.
parse a bunch of things repeatedly, ask what the size of a grammer object looks like. 20:49
stable+who+what sounds like a place to start. Part of the talk would be describing something about P6's memory management itself; anything I can learn about it would be helpful. 20:50
lembark What would it take to properly describe a single object in Perl6? 20:52
lembark \help 20:58
sjn m: say Signature.^methods 21:01
camelia (The 'ForeignCode' class is a Rakudo-specific
implementation detail and has no serviceable parts inside The 'ForeignCode' class is a Rakudo-specific
implementation detail and has no serviceable parts inside The 'ForeignCode' class is a Rakudo-spec…
sjn LTA output :-|
tbrowder SmokeMachine: it works! but that's sneaky and unexpected taking the types off the attributes! 21:03
could we have done the same thing when the models were defined in the main script? 21:04
SmokeMachine Yes 21:05
tbrowder okay, good to know. 21:08
timotimo m: say Signature.^methods>>.name 21:11
camelia (<anon> <anon> <anon> <anon> <anon> Capture arity count params new ACCEPTS perl gist BUILDALL)
timotimo sjn: ^
SmokeMachine tbrowder: that type is declared in another file.. does not exists on that context... that's the reason to exist this alternative syntax... 21:13
tbrowder ok, i believe you! it's WAY over my head...pressing on... 21:14
hankache .seem stmuk 21:52
.seem stmuk_ 21:53
tobs .seen stnuk 21:54
yoleaux I haven't seen stnuk around.
hankache .seen stmuk
yoleaux I saw stmuk 8 Nov 2018 22:20Z in #perl6: <stmuk> I think the meaning of "refrains" has been overloaded!
hankache .seen stmuk_
yoleaux I saw stmuk_ 10 Mar 2019 11:10Z in #perl6: <stmuk_> hankache++
hankache .tell stmuk_ thanks mate. 21:55
yoleaux hankache: I'll pass your message to stmuk_.
Xliff .tell timotimo Could you please look at my PR for cairo-p6 and merge it? Thanks. 22:12
yoleaux Xliff: I'll pass your message to timotimo.
timotimo am i allowed to merge it without looking? :) 22:13
yoleaux 22:12Z <Xliff> timotimo: Could you please look at my PR for cairo-p6 and merge it? Thanks.
timotimo it'll be fine i'm sure 22:14
Xliff timotimo: No. you are allowed to look, silly! :) 22:30
Is there a shortcut for: class A { has $!a; submethod BUILD(:$b) { $!a = $b }; }; 22:31
timotimo i'm not aware of one 22:34
Xliff Ah. Thanks. 22:39
discord6 <Vendethiel> We have :$b and $!b working but not :$!b? :P 22:52
timotimo i don't think it's about that, though? 22:54
discord6 <Vendethiel> can't you rename the variable with :$a($!b) or some? 22:58
timotimo you can
i thought the question was about not having to have the BUILD at all 22:59
discord6 <Vendethiel> I've never 100% understood how that and ";;" worked :)
gfldex how can I get hold of the socket object when I create the socket with /home/dex/projects/perl6/perl6-app-pipe2http/bin/pipe2http 23:20
with IO::Socket::Async.listen
?
Since I can't call IO::Socket::Async.new, there seams to be no way to tell what port it listens on. 23:21
When call with port 0, the OS will chose the port for me … that I can't know‽ 23:22
timotimo it's not documented, but you can ask the object you get 23:33
m: my $listener = IO::Socket::Async.listen(:host("localhost"), :port(0)); say $listener.^methods 23:34
camelia Too few positionals passed; expected 3 or 4 arguments but got 1
in block <unit> at <tmp> line 1
timotimo m: my $listener = IO::Socket::Async.listen("localhost", 0); say $listener.^methods
camelia (new BUILD Capture live serial Tappable tap act on-demand from-list interval serialize sanitize on-close map grep schedule-on start stable delayed do flat merge reduce produce migrate classify categorize Channel Seq Promise wait get-await-handle uniqu…
timotimo m: my $listener = IO::Socket::Async.listen("localhost", 0); say $listener.^methods.reverse 23:34
camelia (BUILDALL Method+{is-nodal}.new Method+{is-nodal}.new Method+{is-nodal}.new Method+{is-nodal}.new share throttle zip-latest zip reverse grab minmax max min skip tail head elems words lines batch squish unique get-await-handle wait Promise Seq Channel …
timotimo blep.
c: my $listener = IO::Socket::Async.listen("localhost", 0); say $listener.^methods 23:35
committable6 timotimo, ¦my: «Cannot find this revision (did you mean “all”?)»
timotimo c: HEAD my $listener = IO::Socket::Async.listen("localhost", 0); say $listener.^methods
committable6 timotimo, gist.github.com/e3f756de875a3b666e...ee0c61db09
timotimo ah, yes
c: my $listener = IO::Socket::Async.listen("localhost", 0).tap({ .say }); say $listener.^methods
committable6 timotimo, ¦my: «Cannot find this revision (did you mean “all”?)»
timotimo c: HEAD my $listener = IO::Socket::Async.listen("localhost", 0).tap({ .say }); say $listener.^methods
committable6 timotimo, ¦HEAD(4ffb408): «(TWEAK new native-descriptor socket-host socket-port BUILDALL close new BUILDALL BUILD)␤»
timotimo there you go
gfldex I call .listen in a whatever statement and I get the Supply instead of the Socket. 23:38
m: react { whenever my $listener = IO::Socket::Async.listen("localhost", 0) -> $conn {}; say $listener.socket-port; } 23:42
camelia A react block:
in block <unit> at <tmp> line 1

Died because of the exception:
No such method 'socket-port' for invocant of type 'Supply'
in block <unit> at <tmp> line 1
gfldex and SocketListenerTappable is private :( 23:43
Xliff m: class A { has $!a; submethod BUILD(:$!a($b)) { }; }; my A $a .= new(b => 3); $a.perl.say 23:48
camelia 5===SORRY!5=== Error while compiling <tmp>
Shape declaration with () is reserved;
please use whitespace if you meant a subsignature for unpacking,
or use the :() form if you meant to add signature info to the function's type
at <tmp>:1…
SmokeMachine Xliff: hi!
Xliff HI!
m: class A { has $!a; submethod BUILD(:$b($!a)) { }; }; my A $a .= new(b => 3); $a.perl.say
camelia 5===SORRY!5=== Error while compiling <tmp>
Shape declaration with () is reserved;
please use whitespace if you meant a subsignature for unpacking,
or use the :() form if you meant to add signature info to the function's type
at <tmp>:1…
SmokeMachine m: class A { has $!a; submethod BUILD(:b($!a)) { }; }; my A $a .= new(b => 3); $a.perl.say 23:49
camelia A.new
Xliff Vendethiel: So.. not working that way
SmokeMachine Xliff: ^^
Xliff m: class A { has $!a; submethod BUILD(:b($!a)) { }; }; my A $a .= new(b => 3); $a.gist.say 23:50
camelia A.new
Xliff m: class A { has $!a; submethod BUILD(:b($!a)) { }; }; my A $a .= new(b => 3); $a.a.say
camelia No such method 'a' for invocant of type 'A'
in block <unit> at <tmp> line 1
Xliff m: class A { has $!a; submethod BUILD(:b($!a)) { }; method a-say { $!a.say }; }; my A $a .= new(b => 3); $a.a-say
camelia 3 23:50
SmokeMachine m: class A { has $!a; submethod BUILD(:b($!a)) { }; method say-a { say $!a }}; my A $a .= new(b => 3); $a.say-a
camelia 3
Xliff SmokeMachine++
SmokeMachine would any one like to give this a look? just to don't let me skip something: github.com/FCO/Red/pull/130 23:53
Xliff Sure 23:53