»ö« 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.
00:11 pecastro left
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)"
00:18 MidCheck joined 00:21 lucasb left
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
00:24 zacts left, zacts joined
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
00:30 zachk left 00:33 cpan-p6 left 00:36 ayerhart_ left 00:38 ayerhart joined 00:39 cpan-p6 joined 00:47 john_parr_ is now known as john_parr 00:49 w_richard_w joined 00:50 drclaw joined 00:53 zacts left 00:54 irced joined
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
01:05 cpan-p6 left 01:07 cpan-p6 joined 01:20 cpan-p6 left 01:21 cpan-p6 joined 01:22 kst joined 01:44 ctilmes joined
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
01:47 cpan-p6 left, epony left 01:48 cpan-p6 joined
ctilmes m: use Test; isa-ok Buf.new, 'Buf' 01:48
camelia ok 1 - The object is-a '"Buf"'
ctilmes This works
01:49 ctilmes left
SmokeMachine does any one know why this could happen? github.com/FCO/Red/pull/130 02:01
02:01 cpan-p6 left, cpan-p6 joined 02:02 netrino left
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?
02:10 epony joined 02:15 cpan-p6 left, cpan-p6 joined 02:17 molaf left
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
02:27 isomorphismes left
SmokeMachine timotimo: yes, I’m mixing up... 02:28
02:30 molaf joined
SmokeMachine timotimo: github.com/FCO/Red/pull/130/files#...c1db653R26 02:30
timotimo: but it only happens on this test...
02:33 cpan-p6 left 02:34 cpan-p6 joined 02:37 MidCheck left 02:38 pistacchio joined 02:42 pistacchio left 02:52 vike left 02:53 cpan-p6 left 02:54 cpan-p6 joined
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
03:10 vike joined 03:12 cpan-p6 left
drclaw { say ((1...10).race.map({ sleep 0.5;$_ +1 })); say (now - ENTER now )} takes around 5 seconds. so not in parallel 03:12
03:12 cpan-p6 joined
drclaw with default degree => 4 it should take about 4 times less time 03:18
03:22 ugexe joined
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
03:31 cpan-p6 left
ugexe or higher 03:31
drclaw ahh batch size... hah hah 03:32
03:33 cpan-p6 joined
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
03:45 irced left 03:54 leont left 04:00 cpan-p6 left
Kaiepi how do i make a supply with a mutable timeout between emissions? 04:07
04:08 cpan-p6 joined
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
04:22 cpan-p6 left
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
04:28 cpan-p6 joined
Kaiepi ok that doesn't work 04:28
04:41 drclaw left 04:45 Cabanoss- joined 04:46 Cabanossi left, Cabanoss- is now known as Cabanossi
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
04:50 uzl joined
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>
04:52 cpan-p6 left, cpan-p6 joined
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
04:55 pistacchio joined
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
04:59 pistacchio left
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
05:07 cpan-p6 left 05:08 uzl left, cpan-p6 joined
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
05:20 zacts joined, zacts left, zacts joined 05:21 cpan-p6 left 05:26 cpan-p6 joined 05:32 sortiz left 05:36 ayerhart left 05:37 ayerhart_ joined 05:40 cpan-p6 left 05:42 cpan-p6 joined 05:45 sauvin joined 05:49 vike left 05:55 cpan-p6 left, cpan-p6 joined 06:21 cpan-p6 left, cpan-p6 joined 06:40 molaf left 06:47 cpan-p6 left, cpan-p6 joined 06:56 kst` joined 06:58 kst left 07:00 pistacchio joined 07:01 cpan-p6 left, cpan-p6 joined 07:03 Miron joined, Miron is now known as Guest46044 07:05 Guest46044 left 07:14 zacts left 07:20 cpan-p6 left 07:22 cpan-p6 joined 07:26 MidCheck joined 07:31 sena_kun joined 07:33 AlexDaniel joined 07:40 cpan-p6 left 07:43 cpan-p6 joined 07:52 rindolf joined 07:56 cpan-p6 left 07:57 cpan-p6 joined 08:03 pistacchio left 08:13 pecastro joined 08:15 cpan-p6 left 08:19 cpan-p6 joined 08:28 zacts joined 08:33 cpan-p6 left, cpan-p6 joined, reach_satori_ left 08:45 araraloren joined 08:49 cpan-p6 left, cpan-p6 joined
cpan-p6 New module released to CPAN! pack6 (0.1) by 03ALOREN 08:50
09:01 reach_satori joined 09:03 cpan-p6 left, cpan-p6 joined 09:24 robertle joined 09:27 zzx02 joined 09:28 zzx02 left 09:29 cpan-p6 left, cpan-p6 joined 09:34 zacts left 09:38 nekomune left, nekomune joined 09:46 Black_Ribbon left 09:48 Cabanossi left 09:49 hphhphhphhph left 09:53 drclaw joined 09:54 Cabanossi joined 09:56 cpan-p6 left, cpan-p6 joined 10:06 leont joined 10:11 cpan-p6 left, cpan-p6 joined, w_richard_w left 10:15 andrzejku_ joined, andrzejku_ left 10:16 pistacchio joined, andrzejku left, andrzejku joined 10:17 ExtraCrispy left 10:20 pistacchio left 10:23 leont left 10:25 cpan-p6 left, cpan-p6 joined 10:38 ravenousmoose joined 10:45 zacts joined 10:46 zacts left
tbrowder SmokeMachine: are you actively here? 10:48
10:48 cpan-p6 left 10:49 cpan-p6 joined 10:50 netrino joined 10:51 ExtraCrispy joined 11:04 ravenousmoose left 11:05 cpan-p6 left, cpan-p6 joined 11:19 cpan-p6 left, cpan-p6 joined
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
11:35 MidCheck left
SmokeMachine tbrowder: I don't mind at all 11:38
tbrowder okay, coming at you... 11:39
11:43 andrew joined
andrew hi 11:43
11:45 cpan-p6 left 11:46 cpan-p6 joined 11:50 wbn left
tbrowder SmokeMachine: PR has been submitted 11:55
11:59 MidCheck joined 12:00 cpan-p6 left, cpan-p6 joined
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
12:08 antoniogamiz joined
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
12:27 cpan-p6 left 12:28 cpan-p6 joined 12:30 bobby left
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
12:41 cpan-p6 left 12:42 cpan-p6 joined
SmokeMachine tbrowder: www.irccloud.com/pastebin/UEQhLcij/ 12:42
12:43 bobby joined
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
12:50 Kaiepi left 12:51 bobby left 12:52 Kaiepi joined 12:54 bobby joined 12:55 cpan-p6 left 12:56 cpan-p6 joined
SmokeMachine tbrowder: yes... 12:56
tbrowder: I've sent you a review on your PR... 12:57
tbrowder ok, thnks
13:00 drclaw left 13:04 Kaiepi left 13:07 Kaiepi joined
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
13:16 Kaiepi left 13:17 Kaiepi joined 13:18 cpan-p6 left, cpan-p6 joined
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
13:24 kylese joined
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: /\/\/\/\\\\/\\\\\\\/\\\\\\\/\\\\\\\/\\\\\\\\\\\\\\\\\\\\\\//\/\/\/\\\/\/\\////\\////\\\///\\////\\\///\\////\\\///\\////\\\///\\\///\\\///\\\///\\////\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\////\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\////\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\////\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\
13:34 andrzejku left 13:37 lucasb joined, Kaiepi left, Kaiepi joined
andrew what's up, yall 13:38
13:42 cpan-p6 left
AlexDaniel o/ 13:43
andrew: maybe you'll like code-golf.io/
13:43 clarkema joined
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
13:56 kylese left 13:58 antoniogamiz left
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
14:04 cpan-p6 joined 14:05 MidCheck left 14:07 andrew left 14:14 leont joined 14:18 pistacchio joined 14:19 andrzejku joined
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"
14:22 cpan-p6 left 14:23 pistacchio left
tbrowder ":id($key)" 14:23
14:23 cpan-p6 joined
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
14:26 nekomune left 14:28 nekomune joined
SmokeMachine .^load($key) 14:29
14:29 kurahaupo_ left
sena_kun never mind me, no regression 14:32
14:39 Rudy_ joined 14:42 Kaiepi left, cpan-p6 left 14:45 Kaiepi joined 14:48 Kaiepi left 14:51 MidCheck joined 14:53 cpan-p6 joined
tbrowder SmokeMachine: having success using grep...back in a while 14:55
14:55 Rudy_ left 15:00 mowcat joined, mowcat left 15:12 antoniogamiz joined 15:13 leont left 15:25 Kaiepi joined 15:32 Demos[m] left, AlexDaniel` left, MitarashiDango[m left, Seance[m] left, mack[m] left, Matthew[m] left, tyil[m]1 left, lance_w[m] left, Garland_g[m] left, tyil[m] left 15:36 irdr_ left 15:37 irdr joined 15:41 cpan-p6 left 15:42 AlexDaniel` joined, cpan-p6 joined
cpan-p6 New module released to CPAN! Algorithm-LibSVM (0.0.4) by 03TITSUKI 15:42
15:45 Sgeo_ joined 15:48 lance_w[m] joined, tyil[m]1 joined, Matthew[m]1 joined, Demos[m] joined, MatrixTravelerbo joined, tyil[m] joined 15:49 Seance[m] joined, mack[m] joined, Garland_g[m] joined, MitarashiDango[m joined, Sgeo left 15:56 andrew joined
andrew hello there guys, andrew here 15:56
antoniogamiz o/ 15:57
15:58 cpan-p6 left, cpan-p6 joined
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
16:03 antoniogamiz left 16:07 netrino_ joined 16:08 netrino left
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
16:20 sena_kun left 16:21 cpan-p6 left 16:22 cpan-p6 joined
moritz
.oO( smoking sandwich )
16:25
16:26 andrew left 16:29 reach_satori left
SmokeMachine tbrowder: I’ve answered :) 16:33
16:35 cpan-p6 left, pistacchio joined 16:36 cpan-p6 joined 16:40 pistacchio left 16:50 cpan-p6 left, araraloren left, cpan-p6 joined 16:52 domidumont joined 16:57 antoniogamiz joined 16:59 zacts joined 17:01 rudy_ joined 17:04 rudy_ left
Geth doc: cba54ed4cd | (JJ Merelo)++ | doc/Programs/03-environment-variables.pod6
Some reflow

And actually improving description of variable. This closes #1799
17:14
17:15 cpan-p6 left 17:16 cpan-p6 joined 17:18 leont joined 17:22 vrurg left 17:24 leont left
antoniogamiz the only way to compute derivatives is using Math::Model 17:29
17:29 cpan-p6 left, cpan-p6 joined 17:40 sena_kun joined 17:43 natrys joined 17:56 cpan-p6 left 18:00 cpan-p6 joined 18:17 antoniogamiz left, cpan-p6 left, cpan-p6 joined, AlexDaniel left 18:18 AlexDaniel joined
moritz Math::Model actually integrates, using Math::RungeKutta 18:22
(numerically, that is)
18:24 leont joined 18:27 zacts left 18:28 vrurg joined 18:31 leont left 18:34 vrurg left 18:38 vrurg joined 18:42 cpan-p6 left, cpan-p6 joined 18:52 pistacchio joined 18:58 pistacchio left 19:07 cpan-p6 left, xi- left 19:09 cpan-p6 joined 19:12 xi- joined 19:20 zachk joined, MidCheck left 19:21 zachk left, zachk joined 19:23 cpan-p6 left, cpan-p6 joined 19:29 Brilpikk3wyn joined 19:36 kylese joined, cpan-p6 left 19:37 hankache joined, cpan-p6 joined
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
19:50 cpan-p6 left 19:56 cpan-p6 joined 20:05 uzl joined
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.
20:09 lembark joined
lembark Q: Is there a Perl6 equivalent to Devel::Size (metacpan.org/pod/Devel::Size)? 20:09
20:10 cpan-p6 left
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
20:10 cpan-p6 joined
lembark I can't see any way to extract it directly from Perl6 (which doesn't mean I'm not missing someting). 20:12
20:12 ExtraCrispy left 20:16 lucasb left
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
20:19 kylese left
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
20:24 cpan-p6 left, cpan-p6 joined
tbrowder hm, maybe my model package files are not correct. can you show one of them, please? 20:26
20:26 hankache left
SmokeMachine tbrowder: have you seen the diff? 👆 20:28
20:29 uzl left
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
20:46 cpan-p6 left
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
20:46 cpan-p6 joined
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
20:51 Brilpikk3wyn_1 joined 20:52 Brilpikk3wyn_1 left
lembark What would it take to properly describe a single object in Perl6? 20:52
20:53 Brilpikk3wyn left
lembark \help 20:58
21:00 Black_Ribbon joined
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 :-|
21:03 cpan-p6 left
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
21:10 hankache joined
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: ^
21:12 kst` left 21:13 kst joined
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
21:15 natrys left 21:21 netrino joined 21:23 netrino_ left 21:26 leah2 left 21:32 domidumont left 21:40 agentzh left 21:42 agentzh joined, agentzh left, agentzh joined, leah2 joined
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++
21:55 sena_kun left
hankache .tell stmuk_ thanks mate. 21:55
yoleaux hankache: I'll pass your message to stmuk_.
21:58 kurahaupo joined 22:03 andrzejku left
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
22:17 hankache_ joined 22:18 lembark left 22:20 Skarsnik joined, hankache left 22:23 zachk left 22:24 zachk joined 22:25 zachk left, zachk joined 22:26 adu_ joined, hankache_ left 22:27 hankache joined, zachk left, zachk joined 22:29 adu_ is now known as adu 22:30 cpan-p6 joined
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
22:36 vrurg left
Xliff Ah. Thanks. 22:39
22:43 cpan-p6 left 22:44 cpan-p6 joined 22:46 clarkema left
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
22:56 pistacchio joined 22:57 cpan-p6 left, cpan-p6 joined
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 :)
23:00 pistacchio left 23:05 leah2 left 23:09 leah2 joined 23:11 cpan-p6 left 23:13 cpan-p6 joined
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
23:23 rindolf left 23:24 kurahaupo left 23:28 kurahaupo joined
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…
23:34 zachk left
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
23:36 zacts joined, zacts left 23:37 cpan-p6 left, cpan-p6 joined
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
23:43 Skarsnik left
gfldex and SocketListenerTappable is private :( 23:43
23:44 aborazmeh joined, aborazmeh left, aborazmeh joined
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: ^^
23:49 cpan-p6 left
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
23:50 cpan-p6 joined
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
23:53 hankache left
Xliff Sure 23:53
23:55 kurahaupo left 23:58 wbn joined