»ö« 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.
cpan-p6 New module released to CPAN! ORM::ActiveRecord (0.0.2) by 03GDONALD 00:04
vrurg m: $a = 1; $a ,= 2; $a.perl.say 00:10
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/tFbwUbOOwA
Variable '$a' is not declared
at /tmp/tFbwUbOOwA:1
------> 03<BOL>08⏏04$a = 1; $a ,= 2; $a.perl.say
vrurg m: my $a = 1; $a ,= 2; $a.perl.say
evalable6 (my \List_94780069600176 = $(List_94780069600176, 2))
vrurg Very, very strange...
timotimo it just doesn't flatten automatically for you 00:16
m: my $a = 1; $a = $a, 2; say $a.perl 00:17
evalable6 WARNINGS for /tmp/2OtngIMtEJ:
1
Useless use of constant integer 2 in sink context (lines 1, 1)
timotimo m: my $a = 1; $a = ($a, 2); say $a.perl
evalable6 (my \List_93876663334736 = $(List_93876663334736, 2))
timotimo m: my $a = 1; $a = flat($a, 2); say $a.perl
evalable6 $((my \List_94568668927840 = ($(List_94568668927840.Seq), 2)).Seq)
timotimo also not like that, lol
m: my $a = 1; $a = flat($a<>, 2); say $a.perl
evalable6 $((1, 2).Seq)
Xliff github.com/Xliff/p6-GTK-CoreTemps 00:18
Now I just need to figure out how to properly align the f'ing labels...
vrurg timotimo: Actually, it comes from R#1205. 00:19
synopsebot R#1205 [open]: github.com/rakudo/rakudo/issues/1205 [junctions] Compound junction-assignement operators cause a hang
vrurg m: my $a = 1; $a &= 2; $a.gist.say
evalable6 (signal SIGHUP) «timed out after 10 seconds»
vrurg ^ like this...
timotimo it gives you an infinite recursion, yeah 00:20
m: my $a = 1; $a = $a<> & 2; $a.gist.say
evalable6 all(1, 2)
timotimo if you don't decont, the scalar sticks around, and gets stuff assigned into it
which is the scalar itself, and the 2
not sure if NOTABUG 00:21
vrurg timotimo: it's rather a bug. But it must be carefully considered. Perhaps, would have to be fixed for each type in its own way. 00:25
timotimo should metaop_assign put a decont in there always? 00:26
you could try that and run a full spectest
vrurg sounds reasonable. deconting would have to be done by Actions in QAST due to later optimization. 00:27
timotimo hm? 00:29
vrurg METAOP_ASSIGN call gets optimized away 00:30
timotimo oh, yeah, sometimes i guess 00:30
irced .tell Elronnd dpaste.com/30NR3QS 00:31
tellable6 irced, I'll pass your message to Elronnd
irced i am subclassing an Int and adding a role but after I construct my object i can't use the assignment operator = without changing the type. that is, my $a = dividend_t.new(0); # ^dividend_t; $a = 11; #^int 00:38
i guess i have to be explicit everytime and do a = dividend_t.new(11) 00:39
timotimo assignment to a scalar will replace the contents, if you want it to be different, you have to replace the scalar witha proxy
irced so by proxy you mean what i just did?
timotimo i don't see a proxy 00:40
irced searches the room for a proxy.
irced looks under the couch cushion that he's sleeping on.
timotimo but i wouldn't say it's the right way to go, though
irced finds a proxy in the docs. 00:41
ok, thanks for your tip timotimo!
irced i understand objects such as literal constants better after the discussion. 00:45
irced puts literal constants in quotes retroactively. 00:48
i'll just work with the language defaults as suggested 00:49
Elronnd irced: yes. But that's nto a very common pattern in c 01:28
tellable6 2019-09-13T00:31:54Z #perl6 <irced> Elronnd dpaste.com/30NR3QS
Elronnd largely because it doesn't have closures
irced Elronnd: ok
Elronnd: thanks for your feedback.
Elronnd I mean, it's used sometimes, but generally not for that kind of thing 01:29
if I were writing a c++ or d wrapper, though, I would totes make it throw an exception (which is basically the same thing)
irced well subclassing Int opened a whole can a worms, seems like just as in c++, std types should be wrapped 04:12
irced impales a worm on a hook and casts a line. 04:14
tadzik media.tenor.co/images/486aaf8e5231...c33f82/raw 08:17
cpan-p6 New module released to CPAN! LibXML (0.0.7) by 03WARRINGD 08:34
cpan-p6 New module released to CPAN! ORM::ActiveRecord (0.0.3) by 03GDONALD 12:07
Geth doc: 4a46515f62 | Coke++ | doc/Language/about.pod6
mark code type
13:34
doc: d777695aaa | Coke++ | doc/Language/nativecall.pod6
Allow example to compile
synopsebot Link: doc.perl6.org/language/about
Link: doc.perl6.org/language/nativecall
[Coke] doc build failed on "make test", except it's working fine here. weird. Restarted the travis build 13:57
[Coke] build failed on t/02-tests-valid.t again, but this time on a different file. 14:09
# f uninitialized value $repo-id of type Any in string context.
HoboWithAShotgun How do I tell comma not to insert spaces before open curlies? 14:48
Every time i type { at the beginning of a line the darn thing puts a number of spaces in front of it, and never the right amount 14:49
I disabled most of the smart keys, yet it is still doing it 14:50
Xliff \o 14:51
HoboWithAShotgun greets Xliff with a girdle of flowers and a bowl of lukewarm goat milk 14:53
lizmat takes inspiration from that and goes for a cuppa 14:54
Xliff github.com/Xliff/p6-GTK-CoreTemps 15:24
Xliff Does someone know how to get core temp data without going through another process like sensors? 15:39
Elronnd Xliff: probably something in /proc. I would check out the source to sensors 15:52
Xliff Elronnd: Yeah. I was going to do that as a last resort. That's a LOT of code. 16:06
And all I can get out of Google is that there are thermal_sensor? items in /sys
Nothing that seems to enumerate the temperaturs by actual cpu.
HoboWithAShotgun That doesn't seem to be trivial in vanilla C under Windows either. 16:11
Xliff HoboWithAShotgun: Key words: "Under" and "Windows". :) 16:14
Elronnd Xliff: there is /sys/devices/virtual/thermal/thermal_zone*/temp
I think those are millidegrees C 16:15
HoboWithAShotgun No, the keyword is "vanilla c". It's trivial using WMI
HoboWithAShotgun Having access to .NET / mono from Perl6 natively, THAT would be a killer feature 16:15
SmokeMachine Shouldn't have a `preferences` here? I'm also trying `Cmd + ,` and nothing happens... usercontent.irccloud-cdn.com/file/.../image.png 16:28
the problem may be my Mac... but idk 16:29
Xliff Elronnd: Yes, but that's just one zone of two on my chip.
Elronnd Xliff: ahh, idk then 16:29
Xliff I have 20 cores. 16:30
Elronnd HoboWithAShotgun: I believe there was an experimental .net compiler. Probably not on par with rakudo though
Xliff That's 10 CPU temps that I need.
Elronnd: Thanks for the suggestions, tho!
OK. New topic. I have libraries that I am distributing with my module. How do I reference those in rakudo? 16:31
%?RESOURCES<path-to-lib>?
HoboWithAShotgun Elronnd: Yes, I know. Shame that didn't work out. But still, you can access .NET from vanilla C via P/Invoke. 16:37
Xliff Does perl6 support sending a false flag with "sub MAIN (:$verbose = True) {}" 16:38
HoboWithAShotgun So in theory it should be possible to write some kind of interface layer.
Xliff Or do you need "--verbose=0"?
lizmat HoboWithAShotgun: github.com/sorear/niecza
Xliff I thought yyou could do "--no-verbose" for false.
HoboWithAShotgun lizmat: No activity since 6 years. Also, what I mean is a bridge from rakudo to .NET, not some other compiler. 16:42
lizmat HoboWithAShotgun: ah, ok... please do! :-)
HoboWithAShotgun I'd be happy to do the gruntwork.
Xliff I could help with the NativeCall stuff.
HoboWithAShotgun But coming up with a concept is over my head, sadly.
Xliff o 16:43
lizmat perhaps pmurias and jnthn could give you pointers
Elronnd HoboWithAShotgun: looks like 3 years actually, but yeah 16:45
Elronnd HoboWithAShotgun: I might start by looking at the jvm compiler 16:45
Voldenet I dislike design choice that led to using ~ for string concatenation 16:55
On windows, when using polish keymap, it requires typing in shift + ` + space 16:56
so to comfortably use it, one has to use english keymap, which is suboptimal
AlexDaniel Voldenet: fix your keyboard layout then 17:02
it's not like keyboard layouts are unchangeable…
like, I can type these 「」 right away, no compose sequences required 17:03
sure enough anybody can improve their layout to have ~ too
Xliff m: my @a = <a b c d e f>; my ($k, $v) = @locals.kv.rotor(2).grep({ .[2] eq 'd' ).flat.say 18:02
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/U7QEw5KC6z
Missing…
Xliff, Full output: gist.github.com/b8df1f8566e89612da...84292132f4
Xliff m: my @a = <a b c d e f>; my ($k, $v) = @locals.kv.rotor(2).grep({ .[2] eq 'd' }).flat.say 18:02
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/3KaGPpkpf8
Variabl…
Xliff, Full output: gist.github.com/499a56cd2867f00003...d83ba118bf
Xliff m: my @a = <a b c d e f>; my ($k, $v) = @a.kv.rotor(2).grep({ .[2] eq 'd' }).flat.say 18:03
evalable6 Use of Nil in string context
()
in block at /tmp/MQiEx9VBw3 line 1
Use of Nil in string…
Xliff, Full output: gist.github.com/92f0b8083dfebae1d2...e63467f777
Xliff m: my @a = <a b c d e f>; my ($k, $v) = @a.kv.rotor(2).grep({ .[1] eq 'd' }).flat.say
evalable6 (3 d)
Demos[m] can I donwload the documentation to my local machine 18:04
like in the repl I say `IO::Path.WHY` and get "no documentation available" 18:05
patrickb .tell Xliff I forgot to tell you all of the complete tech stack I used to connect to MSSQL: DBIish, DBDish::ODBC, UnixODBC and FreeTDS. 18:07
tellable6 patrickb, I'll pass your message to Xliff
timotimo yes you can. however, the .WHY on most things will not give you the docs even then 18:07
patrickb .tell Xliff Why PreparedStatements don't work. ODBC requires to pass the *DB* column types of parameters when creating (or using?) a prepared statement. One can use `DescribeParam()` to determine that type (DBDish::ODBC uses that). FreeTDS does not support `DescribeParam()` and will not add support in the foreseeable future. One could work around 18:08
that by guessing the DB column types based on the type of the passed values. A Python ODBC implementation (I think it was pyODBC I was looking at) does. It's actually faster that way as the extra roundtrip of `DescribeParam()` is not needed.
tellable6 patrickb, I'll pass your message to Xliff
2019-09-09T19:42:28Z #perl6 <sortiz> patrickb I merge your PR, sorry for the delay.
2019-09-09T20:44:29Z #perl6-dev <Xliff> patrickb Thanks for the information. I was hoping it would be as simple as mapping to the right routine.
patrickb .tell Xliff Other drivers might actually support DescribeParam() and Just Work™ 18:09
tellable6 patrickb, I'll pass your message to Xliff
patrickb is back to vacationing 18:10
AlexDaniel` Demos: not really 18:18
AlexDaniel rba: can you update github.com/perl6/problem-solving/issues/68 so that each resource has a list of people who maintain it? 18:20
rba: because I still have no fucking clue
mscha m: say ৪ + 3; # :-)
evalable6 7
AlexDaniel rba: for example, who should I bother to bring this link back up? docs.perl6.org/perl6.xhtml
u: ৪ 18:21
unicodable6 AlexDaniel, U+09EA BENGALI DIGIT FOUR [Nd] (৪)
rba AlexDaniel: where is this link come from?
AlexDaniel rba: my memory 18:22
timotimo it's linked to on the front page of the docs site
rba AlexDaniel: html without x 18:24
Yet unreachable 18:25
rba docs.perl6.org is still on the tmp server 18:25
rba unreachable links is something we need to take care of 18:27
Geth problem-solving/path-to-raku: 90b8d0c7e7 | (Elizabeth Mattijsen)++ | solutions/language/PATH-TO-RAKU.md
Rephrase the Social Media paragraph
18:51
Geth problem-solving/path-to-raku: 43a1c6d6af | (Elizabeth Mattijsen)++ | solutions/language/PATH-TO-RAKU.md
Move the extensions discussion to a separate issue / PR
18:56
Geth problem-solving/path-to-raku: 6e7e625e53 | (Elizabeth Mattijsen)++ | solutions/language/PATH-TO-RAKU.md
Use the #rakulang hash tag, please
18:59
Xliff .tell patrickb Thanks for the additional info! I'll keep that in mind. 19:08
tellable6 Xliff, I'll pass your message to patrickb
Xliff m: my @a = <a b c d e f>; my ($k, $v) = @a.kv.rotor(2).grep({ .[1] eq 'd' }).flat.say; @a .= splice($k, 0); @a.say 19:25
evalable6 (3 d)
[]
tellable6 2019-09-13T18:07:28Z #perl6 <patrickb> Xliff I forgot to tell you all of the complete tech stack I used to connect to MSSQL: DBIish, DBDish::ODBC, UnixODBC and FreeTDS.
2019-09-13T18:09:34Z #perl6 <patrickb> Xliff Other drivers might actually support DescribeParam() and Just Work™
gist.github.com/31b7853f5972459470...875d961aaf
Xliff m: my @a = <a b c d e f>; my ($k, $v) = @a.kv.rotor(2).grep({ .[1] eq 'd' }).flat.say; @a.splice($k, 0); @a.say 19:26
evalable6 (3 d)
[a b c d e f]
Xliff m: my @a = <a b c d e f>; my ($k, $v) = @a.kv.rotor(2).grep({ .[1] eq 'd' }).flat.say; @a.splice($k, 0).sau 19:27
evalable6 (exit code 1) (3 d)
No such method 'sau' for invocant of type 'Array'. Did you mean 'say'?
in block <unit> at /tmp/ZMs2pJDrAZ line 1
Xliff m: my @a = <a b c d e f>; my ($k, $v) = @a.kv.rotor(2).grep({ .[1] eq 'd' }).flat.say; @a.splice($k, 0).say
evalable6 (3 d)
[]
Xliff m: my @a = <a b c d e f>; my ($k, $v) = @a.kv.rotor(2).grep({ .[1] eq 'd' }).flat; @a.splice($k, 0).say 19:27
evalable6 []
Xliff m: my @a = <a b c d e f>; my ($k, $v) = @a.kv.rotor(2).grep({ .[1] eq 'd' }).flat; $k.say; @a.splice($k, 0).say
evalable6 3
[]
Xliff m: my @a = <a b c d e f>; my ($k, $v) = @a.kv.rotor(2).grep({ .[1] eq 'd' }).flat; $k.say; @a.splice($k, 0, ()).say
evalable6 3
[]
Xliff m: my @a = <a b c d e f>; my ($k, $v) = @a.kv.rotor(2).grep({ .[1] eq 'd' }).flat; $k.say; @a.splice($k, 1).say
evalable6 3
[d]
Xliff m: my @a = <a b c d e f>; my ($k, $v) = @a.kv.rotor(2).grep({ .[1] eq 'd' }).flat; $k.say; @a .= splice($k, 1); @a.say 19:28
evalable6 3
[d]
Xliff m: my @a = <a b c d e f>; my ($k, $v) = @a.kv.rotor(2).grep({ .[1] eq 'd' }).flat; $k.say; @a.splice($k, 1); @a.say 19:28
evalable6 3
[a b c e f]
Xliff m: my @a = <a b c d e f>; my ($k, $v) = @a.kv.rotor(2).grep({ .[1] eq 'd' }).flat; $k.say; @a.splice($k, 0, 'dd'); @a.say 19:29
evalable6 3
[a b c dd d e f]
Xliff m: my @a = (<a b c>, <b c> <D <E F> G>); @a.say 19:39
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/qTMkwLjQiO
Two ter…
Xliff, Full output: gist.github.com/ee63c55ff3b01f4dd8...b89d17e3ce
Xliff m: my ($a, $b, $c, $d) = ^4; my @a = ( ($a, ($b, $c), $d, ($a, ($c, ($b, $a)))) ) 19:40
evalable6
Xliff m: my ($a, $b, $c, $d) = ^4; my @a = ( ($a, ($b, $c), $d, ($a, ($c, ($b, $a)))) ); @a.say
evalable6 [0 (1 2) 3 (0 (2 (1 0)))]
Xliff m: my ($a, $b, $c, $d) = ^4; my @a = ( ($a, ($b, $c), $d, ($a, ($c, ($b, $a)))) ); @a.flat.say
evalable6 (0 (1 2) 3 (0 (2 (1 0))))
Xliff Is there a deepflat? 19:41
Xliff m: sub deepflat ($a) { $a ~~ Array $a.deepflat !! $a }; my ($a, $b, $c, $d) = ^4; my @a = ( ($a, ($b, $c), $d, ($a, ($c, ($b, $a)))) ); $a.&deepflat.say 19:42
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/IZ_TtOdARF
Two ter…
Xliff, Full output: gist.github.com/fb438f0430a54b1d33...7b81f78f94
Xliff m: sub deepflat ($a) { $a ~~ Array ?? $a.deepflat !! $a }; my ($a, $b, $c, $d) = ^4; my @a = ( ($a, ($b, $c), $d, ($a, ($c, ($b, $a)))) ); $a.&deepflat.say
evalable6 0
Xliff m: sub deepflat ($a) { $a ~~ Array ?? $a.&deepflat !! $a }; my ($a, $b, $c, $d) = ^4; my @a = ( ($a, ($b, $c), $d, ($a, ($c, ($b, $a)))) ); $a.&deepflat.say 19:43
evalable6 0
Xliff m: sub deepflat ($a) { $a ~~ Array ?? $a.map( *.deepflat ) !! $a }; my ($a, $b, $c, $d) = ^4; my @a = ( ($a, ($b, $c), $d, ($a, ($c, ($b, $a)))) ); $a.&deepflat.say 19:44
evalable6 0
Xliff m: sub deepflat ($a) { $a ~~ Array ?? $a.map( *.&deepflat ) !! $a }; my ($a, $b, $c, $d) = ^4; my @a = ( ($a, ($b, $c), $d, ($a, ($c, ($b, $a)))) ); $a.&deepflat.say
evalable6 0
Xliff m: sub deepflat ($a) { $a ~~ Array ?? $a.map( *.&deepflat ).flat !! $a }; my ($a, $b, $c, $d) = ^4; my @a = ( ($a, ($b, $c), $d, ($a, ($c, ($b, $a)))) ); $a.&deepflat.say 19:45
evalable6 0
Xliff m: sub deepflat (@a) { @a.map({ $_ ~~ Array .&deepflat !! $a }).flat }; my ($a, $b, $c, $d) = ^4; my @a = ( ($a, ($b, $c), $d, ($a, ($c, ($b, $a)))) ); $a.&deepflat.say 19:46
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/uLj08AVxJG
Malform…
Xliff, Full output: gist.github.com/769672e9062136c4fa...b5f98cc5f8
Xliff m: sub deepflat (@a) { @a.map({ $_ ~~ Array ?? .&deepflat !! $a }).flat }; my ($a, $b, $c, $d) = ^4; my @a = ( ($a, ($b, $c), $d, ($a, ($c, ($b, $a)))) ); $a.&deepflat.say
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/sP36U6fdkS
Variabl…
Xliff, Full output: gist.github.com/ffcd726cb8f42ea691...8f2a2865a7
Xliff m: sub deepflat (@a) { @a.map({ $_ ~~ Array ?? .&deepflat !! $_ }).flat }; my ($a, $b, $c, $d) = ^4; my @a = ( ($a, ($b, $c), $d, ($a, ($c, ($b, $a)))) ); $a.&deepflat.say 19:47
evalable6 (exit code 1) Type check failed in binding to parameter '@a'; expected Positional but got Int (0)
in sub deepflat at /tmp/dm3QQhzZoE line 1
in block <unit> at /tmp/dm3QQhzZoE line 1
Xliff m: my ($a, $b, $c, $d) = ^4; my @a = ( ($a, ($b, $c), $d, ($a, ($c, ($b, $a)))) ); @a.deepflat.say 19:48
evalable6 (exit code 1) No such method 'deepflat' for invocant of type 'Array'
in block <unit> at /tmp/dW2UgDspjl line 1
Xliff \o/ -- 280Kloc of Perl6 code! 20:53
MasterDuke impressive 20:56
Xliff :> 20:57
Thanks, MasterDuke
docs.google.com/spreadsheets/d/12j...=365670324 21:00
drive.google.com/file/d/12j1Dy6zIc...sp=sharing