»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:04 mcmillhj left 00:09 mcmillhj joined 00:12 scott joined
scott when does || differ from //? 00:12
00:12 tushar joined, scott is now known as Guest73996 00:14 itaipu joined, mcmillhj left
avuserow_ m: say 0 // -1; say 0 || -1; say Int // -1; # scott: // prints the left side if it's defined, || requires it to be true 00:19
camelia rakudo-moar fc3160: OUTPUT«0␤-1␤-1␤»
avuserow_ Guest73996: ^^
00:24 avuserow_ is now known as avuserow, cbk_ left 00:26 mcmillhj joined 00:31 mcmillhj left, cbk_ joined 00:39 canopus left, perlawhirl joined 00:41 mcmillhj joined, ribasushi left 00:42 zoosha joined 00:45 jonadab joined, luis` joined 00:46 mcmillhj left 00:47 f3ew joined, ribasushi joined 00:48 canopus joined, pierre_ joined 00:49 cgfbee left 00:50 cgfbee joined 00:51 cbk1090 joined, Guest73996 left, Guest73996 joined, Guest73996 left, Guest73996 joined, Guest73996 is now known as scott
scott avuserow_: thanks! 00:52
my mistake was only checking cases where the LHS is undefined, not where it's defined but falsey 00:53
00:57 mcmillhj joined 00:58 canopus left 01:01 mcmillhj left 01:03 canopus joined 01:15 mcmillhj joined 01:21 mcmillhj left 01:30 cbk_ left, cbk1090 left 01:31 mcmillhj joined 01:34 tushar left 01:35 _slade_ joined 01:37 mcmillhj left, perlawhirl left 01:44 Matthew[m] joined 01:46 cognominal joined 01:47 ilbot3 joined, mcmillhj joined 01:48 Matias[m] joined 01:53 mcmillhj left 01:55 ilmari[m] joined 01:58 mcmillhj joined 01:59 pierre_ left 02:02 pierre_ joined 02:03 itaipu left, mcmillhj left 02:04 beatdown left 02:05 nbrown joined 02:08 noganex joined 02:14 nbrown left 02:15 user9 left, cognominal left, mcmillhj joined 02:17 cdg joined 02:18 perlawhirl joined 02:20 cdg left, Guest87807 is now known as ponbiki, mcmillhj left 02:21 cdg joined 02:24 cognominal joined 02:29 mcmillhj joined 02:34 mcmillhj left 02:41 pierre_ left 02:42 mcmillhj joined, Joeperl joined 02:43 Joeperl left 02:46 mcmillhj left, pierre_ joined 02:51 pierre_ left 02:53 pierre_ joined 02:56 cognominal left 03:05 obfusk_ joined 03:08 mcmillhj joined 03:13 mcmillhj left 03:25 aries_liuxueyang left 03:26 aries_liuxueyang joined 03:30 kurahaupo joined 03:33 labster left 03:35 cdg left, cdg joined 03:36 kurahaupo_ joined, dayangkun joined 03:37 mcmillhj joined, dayangkun left, dayangkun joined, kurahaupo` joined 03:39 dayangkun left, kurahaupo left 03:41 mcmillhj left, dayangkun joined, kurahaupo_ left 03:43 kurahaupo` left 03:58 cdg_ joined 04:00 cdg left 04:09 dayangkun left, nebuchadnezzar joined 04:18 ka joined, pierre_ left 04:20 BenGoldberg left 04:24 mcmillhj joined 04:27 pierre_ joined, zakharyas joined 04:29 mcmillhj left, khw left 04:31 pierre_ left 04:32 holyghost joined 04:35 skids left 04:36 mcmillhj joined 04:40 mcmillhj left 04:52 cdg_ left, cdg joined 04:55 labster joined 05:00 Cabanossi left 05:03 Khisanth left 05:04 Cabanossi joined 05:06 rgrinberg left 05:07 mcmillhj joined 05:12 mcmillhj left 05:17 dayangkun joined 05:18 cdg left 05:23 Khisanth joined 05:28 pierre_ joined 05:32 pierre_ left 05:33 AlexDaniel left 05:34 pierre_ joined 05:46 wamba joined 05:49 domidumont joined 05:51 domidumont left 05:52 cognominal joined, domidumont joined 06:06 vv joined 06:09 mcmillhj joined 06:11 vv left 06:14 mcmillhj left 06:16 cognominal left 06:22 bjz joined, bjz left 06:29 darutoko joined 06:30 salva joined 06:33 mcmillhj joined 06:34 firstdayonthejob joined 06:36 RabidGravy joined 06:37 mcmillhj left 06:40 bjz joined
perlawhirl bisectable6: dd ((1,2,3),(4,5,6)).map(&join) 06:43
bisect: old=2015.10 ((1,2,3),(4,5,6)).map(&join).say 06:44
ok bisectable is not around 06:45
m: my @a = ((1,2,3),(4,5,6)); say @a.map(&join); say @a.map(*.join); # <-- is this a bug? &join should work, right?
camelia rakudo-moar fc3160: OUTPUT«( )␤(123 456)␤» 06:46
perlawhirl confirmed it's the same in 2015.09, so it's not a regression 06:48
06:49 mcmillhj joined 06:52 nadim joined 06:53 woolfy left 06:54 mcmillhj left 06:57 woolfy joined
TimToady not a bug, I think, since function join has a first arg saying what to join with, and that's all you're supplying 06:57
so it joins nothing together with '1 2 3'
07:01 xinming joined 07:03 ka left 07:04 mcmillhj joined
perlawhirl right, so only method form has a default $separator... got it 07:05
07:07 bjz left 07:09 mcmillhj left 07:10 aries_liuxueyang left 07:11 aries_liuxueyang joined 07:15 dayangkun left, ka joined 07:16 dayangkun joined 07:27 pecastro left 07:28 labster left 07:31 labster joined 07:37 perlawhirl left
masak good morning, #perl6 07:44
RabidGravy marning
El_Che Hi Dr. Nick^W^Wmasak 07:46
arnsholt Good morning, from a SSH and bash on Windows (without cygwin \o/)
The new WSL thingy is pretty neat
07:47 firstdayonthejob left
stmuk_ and it even tells Microsoft what you typed! 07:49
El_Che arnsholt: is the terminal emulator ok?
arnsholt El_Che: It renders text =)
And it can be full-screened (unlike the old cmd one)
moritz does it support ANSI control sequences? 07:50
curses programs?
arnsholt No problems with irssi AFAICT, nor vim
I haven't tested either extensively yet, but so far so good
Even renders the UTF-8 Camelia in the /topic fine 07:51
moritz that's all < 255 codepoints
anyway, that does sound decent
07:52 mcmillhj joined, _slade_ left 07:54 g4 joined, g4 left, g4 joined 07:57 mcmillhj left, pierre_ left 08:01 user9 joined 08:05 ocbtec joined, Matias[m] left, scott left, tadzik left, ilmari[m] left, Matthew[m] left, M-Illandan left, dayangkun left 08:06 dakkar joined 08:08 mcmillhj joined
El_Che arnsholt: when on Windows and I don't have the time to install a LInux VM, I use ssh on cygwin. A lot better than it used to be 08:08
08:09 pierre_ joined 08:13 mcmillhj left 08:16 telex joined
arnsholt El_Che: Yeah, it's been a long time since I used cygwin TBH 08:16
Except the occasional use with the git bash 08:17
08:17 ilmari[m] joined 08:26 CIAvash joined 08:27 dayangkun joined 08:43 mcmillhj joined 08:46 bjz joined, larion joined, larion left, larion joined 08:47 mcmillhj left 08:59 ilmari[m] left 09:07 eliasr joined 09:11 cognominal joined 09:19 pierre_ left 09:27 ilmari[m] joined 09:28 pierre_ joined 09:31 mcmillhj joined 09:32 pierre_ left 09:34 pierre_ joined 09:35 cognominal left 09:36 mcmillhj left 09:37 bjz left 09:39 rindolf joined 09:42 TEttinger left 09:43 mcmillhj joined 09:46 gregf_ joined 09:48 mcmillhj left 09:49 bjz joined 10:00 zakharyas left, zakharyas joined 10:05 zakharyas left 10:14 ka left 10:26 pierre_ left 10:28 dayangkun left 10:30 llfourn joined, kaare_ joined 10:48 ka joined 10:50 labster left 11:01 wamba left 11:05 obfusk_ left, obfusk joined 11:06 wamba joined
RabidGravy Oooh the HTTP header returned by github is longer than 2048 bytes, hence LWP::Simple crapping out when it tries to parse the response 11:07
11:09 mcmillhj joined
dalek c: 3a2609a | (Tom Browder)++ | doc/Type/Signature.pod6:
fix typo
11:11
timotimo RabidGravy: ouch, bad idea to have such a hard limit in there 11:13
11:14 mcmillhj left
RabidGravy indeed, just looking at the best way to fix it 11:15
11:16 frankD2 joined, frankD2 left
timotimo turn it up to 4196, clearly! :) :) 11:16
arnsholt 4196 bytes should be anough for everyone! \o/ 11:17
timotimo clearly with brötli compression that'll be much less of an issue! 11:18
RabidGravy eugh, just seen a PHP gig a mile away 11:37
anyway, just fixed that by getting more blob until there's some header
11:43 pierre_ joined
masak lol, I blogg'd! strangelyconsistent.org/blog/the-cu...aring-test 11:43
11:46 pierre_ left 11:48 Dunearhp joined 11:50 cognominal joined 11:52 skids joined 11:55 mcmillhj joined
dalek osystem: 41f52c8 | (Kamil Kułaga)++ | META.list:
removing lacuna-cookbook

The library is useless since 1 October 2016 (the game Lacuna Expanse gets shutdown)
11:56
11:57 CIAvash left 12:00 mcmillhj left
Dunearhp How do I build rakudo so that moar has debugging symbols? 12:02
12:03 skids left
Dunearhp I'm trying to get a useful core dump backtrace for moar 12:05
hackedNODE Dunearhp: cd nqp/MoarVM; perl Configure.pl --debug=3 --prefix=../../install/bin/; make; make install; cd ../..
(that's from rakudo's checkout 12:06
The Configure.pl also takes --help that lists all of the options
12:06 kurahaupo joined
hackedNODE ) 12:06
RabidGravy there appears to be something wrong with rakudo.org 12:10
oh, not anymore 12:11
it's hit in the tests of LWP::Simple and was taking a long time and then 500ing 12:12
Dunearhp thanks. forgot to set the prefix 12:16
hackedNODE m: $?TABSTOP 12:22
camelia rakudo-moar c01fc3: OUTPUT«WARNINGS for <tmp>:␤Useless use of $?TABSTOP in sink context (line 1)␤»
hackedNODE m: say $?TABSTOP
camelia rakudo-moar c01fc3: OUTPUT«8␤»
hackedNODE TIL that's a thing :P
"How many spaces is a tab in a heredoc or virtual margin"
Clearly that's a bug! It should be 4 :P
12:25 bioduds joined
bioduds hello all :) 12:25
hackedNODE \o 12:26
12:27 ufobat left
masak hackedNODE: 4 is the "new standard", what I see most Python programs etc be written in. 8 is the old convention, and what tabs do in terminal emulators etc. 12:31
tab characters, I mean.
sjn thought for a second masak was talking about π 12:32
12:32 atacama joined
masak well, if π is 4 then you're either in a space with positive curvature, or in Indiana. 12:32
sjn fortunally, the next sentence fixed that impression. :)
hackedNODE m: say 2×π == τ 12:33
camelia rakudo-moar c01fc3: OUTPUT«True␤»
masak hackedNODE: generally not a good idea to use exact equality on floaty things, though.
hackedNODE m: say 2×π ≅ τ
camelia rakudo-moar c01fc3: OUTPUT«True␤» 12:34
hackedNODE m: say ୨×π ≅ τ
camelia rakudo-moar c01fc3: OUTPUT«True␤»
hackedNODE :D
12:34 ufobat joined 12:35 itaipu joined
sjn thinks perl6 should have the option to warn when confusing homographs are used 12:37
hackedNODE strongly disagrees 12:38
sjn rly?
why?
bioduds I got the server calls to work! what was happening is that I was using asynchronous calls
hackedNODE Options to warn means extra processing and slower language. And what's the usefulness of that warning?
bioduds so they gave results before they were actually ready 12:39
:)
sjn m: say ୨ == 9;
camelia rakudo-moar c01fc3: OUTPUT«False␤»
bioduds now, I got a synchronous method and it is working greatly
moritz warnings are the worst of the both worlds; ideally either a construct is illegal, or legal
hackedNODE sjn: and? That's not a real program
12:39 user9 left
moritz if, as the language designer, you can't decide which way it is, you neither generate a proper error, nor is the feature really usuable due to the warnings 12:40
hackedNODE nods
sjn moritz: fair enough. I was more thinking of the optionality being important 12:41
12:42 itaipu left
sjn something one can turn on as get an answer to "is this sane in $some_certain_aspect?" 12:42
moritz use ascii;
sjn mm
12:43 user9 joined, Actualeyes left
sjn hackedNODE: maybe I'm a little paranoid these days, but I'm thinking that if someone wants to introduce horrible bugs that are really difficult to spot, then homonyms can be used for that 12:44
m: say 2.1 + 0.୨
camelia rakudo-moar c01fc3: OUTPUT«2.3␤»
hackedNODE sjn: I'd say paranoid is right. I don't need homonyms to introduce bugs on purpose. I can just write shitty code. 12:45
Why would someone write the above on purpose?
12:45 user9 left
sjn has lately been working in the financial sector, where code reviews and such are mandatory 12:45
hackedNODE: disgruntled employees?
sadly, they exist
hackedNODE And that's the best they can think of? :) 12:46
hackedNODE would go for perl6.party/post/Anguish--Invisible...Data-Theft
sjn hey, it's the tiny subtle bugs that can hurt a lot
they still have to pass a code review, right?
hackedNODE If I ran a shop and found out a someone added that for no good reason, they'd be fired on the spot. 12:47
12:47 user9 joined
sjn hackedNODE: yeah, I agree 12:47
still, the damage can happen
and a well placed bug like that can cost a lot, especially in a financial setting
hackedNODE Seems an awfully hypothetical scenario to warrant an introduction of a warning. Especially since you have to look not just for ୨, but for its use in close proximity with other digits
sjn hackedNODE: nah, a "use ascii" test would be sufficient 12:48
the warning idea I get is a bad idea
hackedNODE for English-centric countries that write programs with no intentions of internationalizing them... I guess
sjn but having the possibility to check for bugs like that, would still be interesting in some settings
hackedNODE I'm sure there's a grep incantation that can do it :P 12:49
hackedNODE &'
sjn how would one programatically check for something like that?
perlpilot "Oh, here's a bit of code that looks like it does what I want; I'll just cut and paste ..." Oops. :-)
12:49 robertle joined 12:50 wamba left 12:52 mcmillhj joined 12:57 user9 left
melezhik Hi! 12:57
yoleaux 15 Sep 2016 00:09Z <Zoffix> melezhik: your attempt to gather captures may be hindered with what I think is a bug: irclog.perlgeek.de/perl6/2016-09-15#i_13212176
12:57 user9 joined
melezhik have not spoken here for awhile )) 12:57
hackedNODE that wasn't a bug actually. 12:58
melezhik yolexaus - I guess I have finished a complete working code, at least for me
it is here - github.com/melezhik/outhentix-dsl/...#L274-L282 12:59
this is exactly what I needed, thanks to Zoffix and others for help! 13:00
so as for me, I am completely satisfied with answers I got ... and I have my working code, I also gained some Perl6 / regex knowledges by the road ... yeah 13:02
13:02 domidumont left 13:03 domidumont joined
melezhik I have a different question concerning Perl6 objects and code eval ... 13:03
13:04 bjz left 13:05 bjz joined, canopus left
melezhik if it possible to eval a Perl6 code "in a context" of object; let me provide a useful example first ... 13:06
class Foo { method !hello { say "hello" } }; my $foo = Foo.new; 13:08
and I want to eval "self!hello" for instance $foo;
I know such a things are possible in ruby 13:09
RabidGravy is there a way of getting the modules for a single author that I have missed?
melezhik so this is my question ... - if it possible to eval a Perl6 code "in a context" of object; 13:10
13:10 cdg joined
RabidGravy melezhik, if I understand correctly, no 13:10
moritz melezhik: in Perl 6, you'd use the MOP for that
melezhik: my $method = $foo.^privat_method_table(){'hello}; $method($foo) 13:11
something along those lines
melezhik moritz: thanks, will try ... do you know any doc links on Perl6 MOP ? 13:12
RabidGravy or even "$foo.$method"
13:12 rgrinberg joined
RabidGravy $foo.$method() rather 13:12
moritz melezhik: docs.perl6.org/language/mop
and in docs.perl6.org/type.html search for Metamodel 13:13
melezhik actually, I need not only a private method invocation, it was just an example, I want to eval a piece of Perl6 code, given by string and eval it "as if it would executed inside obect's class'
13:13 canopus joined
moritz melezhik: why? 13:13
that's a very ruby-ish approach, not a very perlish approach :-) 13:14
melezhik moritz: sure, this is why I said I saw it in ruby
"why" ... good question, let me think abit to answer you 13:15
moritz it might be possible with augment class TheClass { EVAL "string here }, but using the MOP is likely cleaner and more robust 13:16
melezhik to answer on why - , let me try ... in simple words . Well end user _interact _with some DSL ( not Perl6 code ) which make it possible to eval some Perl6 code, but I want to eval this code a "context" of some existed instance, not just a main program 13:18
gfldex m: use MONKEY-SEE-NO-EVAL; class A { has $.a }; my $a = A.new: :a(42); ($a but role :: { method eval ($c) { EVAL $c } }).eval('say $a'); 13:19
camelia rakudo-moar f6524e: OUTPUT«A.new(a => 42)␤»
gfldex melezhik: ^^^ there you go
melezhik gfldex: thanks ...
gfldex m: use MONKEY-SEE-NO-EVAL; class A { has $.a }; my $a = A.new: :a(42); ($a but role :: { method eval ($c) { EVAL $c; self } }).eval('say $a');
camelia rakudo-moar f6524e: OUTPUT«A.new(a => 42)␤»
gfldex maybe better to return self 13:20
not sure what happens if you mutate inside eval, but with a returned self you can assign back to $a
13:21 sammers left
gfldex also Perl 6++ 13:21
melezhik if your approach could be generalized on evaling ANY perl6 code?
gfldex ANY Perl 6 code is to bit a target for me to comprehend 13:22
RabidGravy what have I been doing with Perl 6 in the last year or so?
gfldex s/bit/big/ 13:23
melezhik gfldex: probably I had my question wrong, sorry, I will take a look at your example ... thanks ...
13:24 carbonscott joined, carbonscott left 13:25 wamba joined 13:29 perlawhirl joined
gfldex m: use MONKEY-SEE-NO-EVAL; class A { has $!a; method set-a($a){$!a = $a} }; my $a = A.new.set-a(42); ($a but role :: { method eval ($c) { EVAL $c; self } }).eval('say $!a'); 13:29
camelia rakudo-moar f6524e: OUTPUT«P6opaque: no such attribute '$!a' in type Int+{<anon|72521424>} when trying to get a value␤ in block <unit> at EVAL_0 line 1␤ in method eval at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
13:30 tadzik joined, Matias[m] joined, M-Illandan joined, Guest80831 joined, Matthew[m] joined
melezhik gfldex: your way works for me, a quick question, does "($a but role :: { method eval ($c) { EVAL $c; self } })" redefine eval method for the _copy_ of $a instance? so that eval work "in context" of instance? 13:39
I have read this - docs.perl6.org/routine/but 13:40
psch m: my $a = 1; my $b = $a but "foo"; say $a.WHAT; say $b.WHAT 13:43
camelia rakudo-moar f6524e: OUTPUT«(Int)␤(Int+{<anon|67245152>})␤»
moritz it says it copies the object before modifying it, no?
melezhik moritz: if you ask me, I think so, I just say HOW I understand a gfldex: 's code so that I could understand it completely , not just "copy and paste " it ... 13:45
13:46 skids joined 13:48 Actualeyes joined
psch melezhik: well, the example uses the $a with mixin as invocant of a method 13:48
m: sub f { "foo" }; say (&f()).substr(1) # essentially like this vOv 13:49
camelia rakudo-moar f6524e: OUTPUT«oo␤»
jkramer What's the most efficient way in P6 to read from one file descriptor and write to another (ie. read a file and write to a socket)? Is there support for sendfile(2) or something?
I particularly want to avoid a buffer in between
13:54 eliasr left 13:59 pmurias joined
hackedNODE shell 'cat foo > bar' XD 14:00
pmurias sjn: re "how would one programatically check for something like that", I would imagine 'use mandatory-company-coding-standard' should ban such things 14:01
hackedNODE jkramer: sendfile is standard C lib, right? Just use it via NativeCAll
RabidGravy $out.spurt: $in.slurp-rest; 14:02
hackedNODE RabidGravy: and that won't have a buffer in between? 14:03
pmurias sjn: I can't really imagine a good reason to use anything besides ascii 0-9 in number literals 14:04
RabidGravy I'm sure it has in there somewhere
hackedNODE m: use NativeCall; sub sendfile (int32, int32, size_t, size_t --> size_t) is native {};
camelia ( no output )
14:05 dj_goku joined
hackedNODE jkramer: ^ something or other. and you can use .native-descriptor on opened file handles to get the desc riptiors to give to the sub 14:05
14:16 sammers joined, robertle left 14:22 acrussell joined 14:27 ka left 14:29 ka joined 14:32 khw joined
jkramer hackedNODE: The second arg should be a pointer. Will try with NativeCall, never used that before 14:38
hackedNODE jkramer, there's likely a way to do pointers too (/me isn't familiar with NativeCall). The docs are here: docs.perl6.org/language/nativecall 14:41
jkramer There's Pointer thing, but I don't really need that functionality. I guess I can just pass Nil and it'll translate it to NULL? 14:43
hackedNODE I think so 14:44
14:45 mcmillhj left
moritz if the signature of the nativecall sub has a type constraint, you can pass a type object of that type to generate a NULL pointer 14:48
so if it's a sub foo(Str) is nativecall(...), calling it with foo(Str) (instead of foo("some string")) passes a NULL pointer
14:50 mcmillhj joined 14:54 tushar joined
jkramer Thanks, already got it working, just making it pretty now. You think there's an interest for IO::SendFile? 14:55
14:55 sufrostico left
skids m: my $p = Promise.new; my $v = $p.vow; $v.WHAT.say; say so $v ~~ Promise::Vow; 14:57
camelia rakudo-moar 5f9103: OUTPUT«(Vow)␤Could not find symbol '&Vow'␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
skids m: my $p = Promise.new; my $v = $p.vow; $v.WHAT.say;
camelia rakudo-moar 5f9103: OUTPUT«(Vow)␤»
skids m: my $p = Promise.new; my $v = $p.vow; $v.WHAT.say; say so $v ~~ Vow; 14:58
camelia rakudo-moar 5f9103: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤ Vow used at line 1␤␤»
hackedNODE m: my $p = Promise.new; my $v = $p.vow; $v.^name.say
camelia rakudo-moar 5f9103: OUTPUT«Promise::Vow␤»
skids Yeah, that's what I did, but...
hmm.
hackedNODE Probably just not exported 14:59
s: Promise, 'vow'
skids m: my $p = Promise.new; my $v = $p.vow; my $p2 = Promise.new; my $v2 = $p2.vow; say so $v ~~ $v2.WHAT;
camelia rakudo-moar 5f9103: OUTPUT«True␤»
skids \o/
Now at least it's not an "eq"
hackedNODE huh, found a weird bug 15:03
oh... s/weird//; 15:04
moritz s/bug/feature/; # :-)
hackedNODE nah, infinihang
m: my $p = Promise.new; my $v = $p.vow; say $p ~~ Planned
camelia rakudo-moar 5f9103: OUTPUT«(timeout)»
hackedNODE s: Planned, 'ACCEPTS' 15:05
jnthn Planned is just an enum member
hackedNODE I see the robots are on strike..
jnthn But it shouldn't time out
moritz you want $s.status or so, right?
hackedNODE Right
moritz m: say Promise.^methods(:local)
camelia rakudo-moar 5f9103: OUTPUT«(BUILD vow keep break result cause then start in at anyof allof Supply Str Numeric Bool scheduler status)␤»
jnthn Right, but why on earth would that hang?
moritz good question 15:06
jnthn m: my $p = Promise.new; say $p ~~ Planned
m: say Promise.new ~~ Planned
moritz m: say Promise ~~ Planned
moritz predicts at least two timeouts
hackedNODE m: enum Foo <bar ber>; my $p = Promise.new; say $p ~~ ber
jnthn poor bot :)
hackedNODE :) 15:07
hackedNODE & lunch
15:07 robertle joined
camelia rakudo-moar 5f9103: OUTPUT«(timeout)» 15:07
rakudo-moar 5f9103: OUTPUT«Invocant requires an instance of type Promise, but a type object was passed. Did you forget a .new?␤ in block <unit> at <tmp> line 1␤␤»
rakudo-moar 5f9103: OUTPUT«(timeout)»
jnthn m: say Promise.new == Planned
m: say Promise.new == 42
camelia rakudo-moar 5f9103: OUTPUT«(timeout)» 15:08
jnthn m: say Supply.new == 42
camelia rakudo-moar 5f9103: OUTPUT«Cannot directly create a Supply. You might want:␤ - To use a Supplier in order to get a live supply␤ - To use Supply.on-demand to create an on-demand supply␤ - To create a Supply using a supply block␤ in block <unit> at <tmp> line 1␤␤»
jnthn m: say Supply.from-list(1..10) == 42
camelia rakudo-moar 5f9103: OUTPUT«Cannot resolve caller Numeric(Supply: ); none of these signatures match:␤ (Mu:U \v: *%_)␤ in block <unit> at <tmp> line 1␤␤»
jnthn Why on earth doesn't Promise say that when =='d?
RabidGravy boo 15:09
moritz method Numeric(Promise:D:) { self.result.Numeric }
from class Promise
jnthn omfg
# experimental
method Str(Promise:D:) { self.result.Str }
method Numeric(Promise:D:) { self.result.Numeric }
Yeah, the experiment failed
moritz and I guess smart-matching against a numeric enum numifies?
jnthn Yup 15:10
*sigh*
15:10 sammers left
jnthn Will spectest with them gone 15:10
And then toss them
Well, commit
Already tossed 'em locally :)
15:15 g4 left
robertle is there something like FindBin in perl6? 15:16
ilmari m: say $*PROGRAM 15:17
camelia rakudo-moar 5f9103: OUTPUT«"<tmp>".IO␤»
15:17 ZoffixMobile joined
ZoffixMobile huggable, FindBin 15:17
huggable ZoffixMobile, use lib $*PROGRAM.dirname.IO.parent.child("lib").Str; # finds lib/ for scripts in bin/ or t/
15:17 ka left
ZoffixMobile robertle, ^ 15:18
robertle awesome
thanks
ugexe should should .parent instead of .dirname
otherwise you lose the volume on windows
ZoffixMobile oh
robertle windows my ass ;) 15:19
but will do anyway!
nine VM::platform-library-name uses dirname
jnthn hackedNODE: Will you RT or add a "doesn't hang" test for those? 15:20
15:21 andrzejku joined, sammers joined
ZoffixMobile jnthn, I'm traveling for the next ~1 hour but can do that then :) 15:21
jnthn Cool :) 15:22
Will push provided it passes spectest
ugexe nine: i fixed that with some other stuff in an unmerged PR github.com/rakudo/rakudo/pull/730/...2eefc15L56
nine ugexe: oh, should have a look at it then 15:24
ugexe nine: the PR was not mergable because it changes VM.platform-library-name's interface to always return IO::Path instead of IO::path when given a relative path argument and Str when given an absolute path argument
which is all i really wanted to fix, but that meant changing stuff in lib/NativeCall.pm6:guess_library_name too which is a mess 15:26
nine oh yes, both are not prime examples of good engineering 15:27
jnthn ZoffixMobile: Pushed.
ZoffixMobile cool
15:28 mcmillhj left
ugexe `perl6 -MInline::Perl5 -e 'my $db = class :: { use DBIx::Class::Schema::Loader:from<Perl5>; also is DBIx::Class::Schema::Loader; }.connect("dbi:SQLite:dbname=db/development.db"); say $db.resultset("Sessions").first.id` # I like that I can do this without writing any Perl5 at all 15:33
15:33 darutoko- joined
timotimo you don't even have to -MInline::Perl5 for that 15:34
the :from<Perl5> pulls it in for you
ugexe ah cool
15:34 mcmillhj joined, Actualeyes left 15:36 darutoko left 15:37 darutoko joined
jkramer I made this: gist.github.com/jkramer/273e56bb24...4d786dc306 15:37
15:38 darutoko- left
ilmari ugexe: do you need the class :: { ... also is } dance? can't you just do: use DBICSL:from<Perl5>; DBICSL.connect(..)? 15:40
15:42 AlexDaniel joined
AlexDaniel m: say ‘🦋’.uniname 15:42
camelia rakudo-moar 2673ca: OUTPUT«BUTTERFLY␤»
AlexDaniel \o/
ugexe ilmari: correct - although im actually using additional sugar in there 15:44
nine ugexe: I always just do perl6 -e 'use DBIx::Class::Schema::Loader:from<Perl5>; DBIx::Class::Schema::Loader.connect("dbi:SQLite:dbname=db/development.db"); ...'
jkramer Is this a good idea or rather terrible? IO:D $input where *.can('native-descriptor') 15:49
timotimo it won't give a very good error message if it fails
but otherwise it's probably fine
jkramer Problem is I want to support IO::handle and IO::Socket and they don't inherit from a common class as it seems 15:50
timotimo ah
15:50 robertle left, domidumont left
skids m: my $a = Channel.new; start react { whenever $a { $_.say; $_.poll.say } }; sleep 0.1; $a.send($_) for 1..10; sleep 0.3 15:50
camelia rakudo-moar 2673ca: OUTPUT«1␤2␤Unhandled exception in code scheduled on thread 4␤Access denied to keep/break this Promise; already vowed␤ in any at /home/camelia/rakudo-m-inst-1/share/perl6/runtime/CORE.setting.moarvm line 1␤ in block at <tmp> line 1␤ in any at /ho…»
jkramer Aaargh goddamn it, IO::Socket::Async doesn't have .native-descriptor as it seems :( 15:52
Hmm, although it does IO::Socket
Ok might still work :)
jnthn skids: I think the .poll there is the issue; $_ is a value sent on the channel, not the channel. 15:54
skids ergh.
jnthn skids: I think the concurrent failure in different threads is then causing it to try and .break the react Promise twice...
(There's an RT about a similar race) 15:55
skids And I thought I had golfedthat correctly.
oops.
Back to hole 4
jkramer According to the docs IO::Socket::Async does IO::Socket just like IO::Socket::INET, however IO::Socket::INET does have .native-descriptor from IO::Socket while *::Async doesn't 15:56
15:58 dgl is now known as dg 16:04 acrussell left, Ven_ joined 16:05 MilkmanDan joined 16:10 Ven_ left, Ven_ joined 16:17 ZoffixMobile left, SourceBaby joined 16:18 Undercover joined
hackedNODE s: IO::Socket::Async, 'native-descriptor' 16:18
SourceBaby hackedNODE, Something's wrong: ␤ERR: Type check failed in binding to &code; expected Callable but got Nil (Nil)␤ in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤ in block <unit> at -e line 6␤␤
hackedNODE s: IO::Socket::INET, 'native-descriptor'
SourceBaby hackedNODE, Sauce is at github.com/rakudo/rakudo/blob/5f91...ket.pm#L93
16:20 itaipu joined 16:21 dakkar left
dalek c: 02bb8dd | (Zoffix Znet)++ | doc/Type/IO/Socket/Async.pod6:
IO::Socket::Async doesn't IO::Socket
16:23
hackedNODE jkramer: it never did. The docs were wrong. 16:24
dalek href="https://perl6.org:">perl6.org: 82aaa1f | (Angelo Compagnucci)++ | source/index.html:
move perl.org link on homepage

Fixes #49
16:25
href="https://perl6.org:">perl6.org: 2ec6600 | (Zoffix Znet)++ | source/index.html:
Merge pull request #54 from angeloc/master

move perl.org link on homepage
timotimo i imagine synopsebot6 could learn to recognize dalek .* repositoryname .* Fixes #\d+ 16:26
hackedNODE and it could avoid giving a link to RT when the link is already present, when it was *just* mentioned, or when the same ticket is mentioned twice :) 16:27
#12345 #12345
timotimo *shrugs* :)
hackedNODE :)
timotimo you know, i can't actually program. i can just harass people who can into doing my bidding
jkramer hackedNODE: That's sad, is there a reason for that or was it just forgotten or something? 16:31
s: IO::Socket::Async 16:32
SourceBaby jkramer, Something's wrong: ␤ERR: Cannot resolve caller sourcery(IO::Socket::Async); none of these signatures match:␤ ($thing, Str:D $method, Capture $c)␤ ($thing, Str:D $method)␤ (&code)␤ (&code, Capture $c)␤ in block <unit> at -e line 6␤␤
jkramer Hmm, how does this work? I was looking for the IO::Socket::Async source earlier :)
Anyway found it 16:33
hackedNODE jkramer: I'm unsure. I see as opposed to the role, it uses async nqp ops, so maybe there is a reason. But the very first commit for it did not have a `does` so the docs were wrong
Why are so many people ask how the bot works but never bother to ask the bot for help? :) 16:34
s/are/do/;
SourceBaby: help
SourceBaby hackedNODE, Use s: trigger with args to give to sourcery sub. e.g. s: Int, 'base'. See modules.perl6.org/dist/CoreHackers::Sourcery
jkramer s: IO::Socket::Async, 'new' 16:35
SourceBaby jkramer, Sauce is at github.com/rakudo/rakudo/blob/2673...sync.pm#L7
jkramer \o/
hackedNODE that will rarely work, as you'd usually get the Mu's new
In fact, it would've failed as recently as 24 hours ago :) 16:36
jkramer :D
16:37 araujo joined 16:38 itaipu left 16:39 itaipu joined
hackedNODE timotimo: so where's the sauce? I can do the bidding 16:39
geekosaur synopsebot6, help 16:40
hmf
timotimo that could also be implemented ;)
it just lives on hack 16:41
geekosaur well, that was actually at least half a response to [28 16:34:11] <hackedNODE> Why are so many people ask how the bot works but never bother to ask the bot for help? :)
timotimo i think there's a git repository; it might not have some changes upstream that i made perhaps?
geekosaur :p
jkramer Hmm, I augmented .native-descriptor into IO::Socket::Async but it still doesn't match where *.can('native-descriptor')
hackedNODE geekosaur: I've tried help with it :P 16:42
timotimo github.com/tadzik/synopsebot - we're using synopsebot.p6 for synopsebot6
gist.github.com/timo/58996f10e6334...6b510b8fc2 - this is the local diff i have on top of that
hackedNODE jkramer: it's .^can 16:43
timotimo yes we .^can
hackedNODE hm... what's .can tho?
Actually both work 16:44
timotimo it cans things
hackedNODE m: use MONKEY-TYPING; augment class IO::Socket::Async { method native-descriptor {} }; say IO::Socket::Async.can('native-descriptor')
camelia rakudo-moar 2673ca: OUTPUT«(native-descriptor)␤»
hackedNODE m: use MONKEY-TYPING; augment class IO::Socket::Async { method native-descriptor {} }; say IO::Socket::Async^.can('native-descriptor')
camelia rakudo-moar 2673ca: OUTPUT«one((Async), ())␤»
hackedNODE heh
m: use MONKEY-TYPING; augment class IO::Socket::Async { method native-descriptor {} }; say IO::Socket::Async.^can('native-descriptor') 16:45
camelia rakudo-moar 2673ca: OUTPUT«(native-descriptor)␤»
timotimo hackedNODE: why does 9 x pi =~= tau? :(
tau is about 6 and 9 x pi is like 999 16:46
oh, that's not an x, it's a multiplication
hackedNODE timotimo: it's not 9; it's ୨ 16:47
timotimo ok. and that is what now? :)
.u ୨
yoleaux U+0B68 ORIYA DIGIT TWO [Nd] (୨)
hackedNODE :)
timotimo oh for fucks sake :) :) :)
unicode screwed us over majorly there
16:47 itaipu left
timotimo i thought look-alikes were only for phishing 16:48
16:48 itaipu joined 16:49 CIAvash joined
sjn google "homograph attack" for some interesting reading 16:49
timotimo yeah :S
sjn and translate that to code o_O
timotimo m: say uniprop "½" 16:50
camelia rakudo-moar 2673ca: OUTPUT«No␤»
jkramer hackedNODE: Thanks for the pointer, gotta check it out tomorrow. I just broke everything and want to gome home :) 16:52
16:52 madosan joined
ilmari m: say ୨×π == τ 16:52
camelia rakudo-moar 2673ca: OUTPUT«True␤»
madosan I'm using bailador and using the template thing 16:53
why doesn't " template 'template.tmpl',{ titles => @titles } " work?
sjn m: say $account = 10_000; say $account * 0.୨୨; # pay 1% transaction fee 16:56
camelia rakudo-moar 2673ca: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$account' is not declared␤at <tmp>:1␤------> 3say 7⏏5$account = 10_000; say $account * 0.୨୨; ␤»
sjn m: my $account = 10_000; say $account * 0.୨୨; # pay 1% transaction fee
camelia rakudo-moar 2673ca: OUTPUT«2200␤»
sjn there
psch uhm, .99 is 1%?
even assuming the misreading stands 16:57
sjn homograph attack
psch right but 50% is half, is .5
timotimo that calculates "the rest you guys have" i suppose
psch ohh
16:57 a3r0 joined
psch yeah, okay, that makes sense 16:57
"we turn the balance into 99% because deduce 1%" 16:58
sjn now that one would of course be noticed pretty quickly
psch .u ୨
yoleaux U+0B68 ORIYA DIGIT TWO [Nd] (୨)
bioduds P6DB is coming...
ilmari m: say 1୨3
camelia rakudo-moar 2673ca: OUTPUT«123␤»
timotimo the what now?
16:59 sufrostico joined
ilmari is it wise to allow mixing scripts in a single numeric literal? 16:59
sjn ilmari: good question :)
ufobat madosan, what do you mean with "it doesn't work?"
psch m: say ²1
camelia rakudo-moar 2673ca: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say ²7⏏051␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ statement modifier␤ s…»
psch eh, superscript is extra weird
16:59 acrussell joined
ilmari m: say ¹² 16:59
madosan I try to iterate through the array after I pass it, and the values don't match
camelia rakudo-moar 2673ca: OUTPUT«1␤»
ilmari m: say ²³ 17:00
camelia rakudo-moar 2673ca: OUTPUT«8␤»
sjn m: say ¹+²
camelia rakudo-moar 2673ca: OUTPUT«3␤»
ilmari .u ³
yoleaux U+00B3 SUPERSCRIPT THREE [No] (³)
ufobat madosan: Bailador just passed your things to Template::Mojo 17:01
madosan it now says "Method 'map' not found for invocant of class 'Mu'"
ufobat template() calls Bailador::App.template -> Bailador::Template.render which is probably Bailador::Template::Mojo -> github.com/ufobat/Bailador/blob/ma...Mojo.pm#L9 17:02
fyi: github.com/ufobat/Bailador#templates 17:03
bioduds wow, this works fine!! return (10..100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000).pick.fmt( '%x' ); 17:04
incredible
timotimo and that surprises you ... why? :) 17:05
we're not php, you know ;) ;)
bioduds ;)
correct!!!
sjn m: (10..100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000).pick.fmt( '%x' ) 17:06
camelia ( no output )
ufobat madosan, just a guess, maybe its becaue you pass a { key => @array} to the template and your first line in the template assumes just the @array, just a thought
sjn m: say (10..100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000).pick.fmt( '%x' )
camelia rakudo-moar 2673ca: OUTPUT«2a93a60b35fc72e125e4b028780c84e71451c0dc2b212bc57d891d77754f932ec000037a067374a6821751421518␤»
madosan I've fixed it now, thanks ufobat, I should have just done template 'template.tmpl', @array; 17:07
bioduds this here was an overflow: return (10..10**1000**1000).pick.fmt( '%x' );
timotimo that's a big number :) 17:08
ufobat welcome :) 17:09
dalek c: 5ac359a | (Tom Browder)++ | doc/Type/Signature.pod6:
add example of a trait with a where clause
17:10
c: 7de9973 | (Tom Browder)++ | doc/Type/Signature.pod6:
Merge pull request #920 from tbrowder/sig-example

add example of a trait with a where clause
bioduds yep
huuuuuuuuge
17:15 madosan left 17:16 FROGGS joined
hackedNODE bioduds: that's not the impressive part of that code 17:18
m: say sum 10..10¹¹¹
camelia rakudo-moar 2673ca: OUTPUT«500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000499999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999955␤» 17:19
hackedNODE Try that in some other languages.... say Perl 5 :)
timotimo that's just because it's special-cased :P
hackedNODE sshhh! It's our corporate secret! :)
bioduds 10¹¹¹ this works? I thought only squared worked 17:20
cool
hackedNODE nah, all of them work
ilmari s: Range, 'sum'
SourceBaby ilmari, Sauce is at github.com/rakudo/rakudo/blob/2673...ge.pm#L607
bioduds that is never happening in any other language
math done right is what they're saying and I can see the reason 17:21
timotimo matlab
bioduds 0.1 + 0.2 = 0.3 in matlab?
timotimo probably 17:22
timotimo doesn't own a matlab
timotimo bbl
bioduds how do I write this 10¹¹¹ in my IDE?? 17:23
hackedNODE bioduds: I have it bound to a button on my Perl 6 keyboard at home and on this box, I can just use a compose sequence: Compose, ^1
timotimo docs.perl6.org/language/unicode_entry
vcv in vim, i type Ctrl+K, 1, 1 in insert mode 17:24
timotimo cool, i didn't notice we've got a webchat link on doc.perl6.org
that's good
17:24 CIAvash left 17:27 TEttinger joined 17:33 andrzejku left 17:34 domidumont joined 17:36 CIAvash joined 17:40 andrzejku joined 17:42 itaipu left 17:43 itaipu joined
gfldex bioduds: if you like oneliners this might help gfldex.wordpress.com/2016/08/31/on...ingertips/ 17:43
17:53 eliasr joined
bioduds gfldex : love oneliners :) who doesn't?? thansk 17:54
17:56 Ven_ left 17:59 spider-mario joined 18:01 Ven_ joined 18:03 Guest80831 left, Guest80831 joined, Guest80831 left, Guest80831 joined, Guest80831 is now known as scott 18:07 saki joined, darutoko- joined, darutoko- left 18:08 Ven_ left 18:10 MilkmanDan left 18:11 darutoko left 18:15 MilkmanDan joined
skids Ah. Now this is interesting: 18:18
m: my $w = Channel.new; start react { whenever $w { $_.say; while $w.poll -> $f { "polled $f".say; }; } }; sleep 0.1; $w.send($_) for 42..50; sleep 0.4; 18:19
camelia rakudo-moar 2a1605: OUTPUT«42␤polled 43␤polled 44␤polled 45␤polled 46␤polled 47␤48␤polled 49␤polled 50␤»
skids m: my $w = Channel.new; start react { whenever $w { $_.say; while $w.poll -> $f { "polled $f".say; }; } }; $w.send($_) for 42..50; sleep 0.4;
camelia rakudo-moar 2a1605: OUTPUT«42␤43␤44␤45␤46␤47␤48␤49␤50␤»
skids If the channel is pushed before the thread starts, poll always returns Nil.
18:20 ocbtec left 18:21 Ven_ joined
skids m: my $w = Channel.new; start react { whenever $w { $_.say; while $w.poll -> $f { "polled $f".say; }; } }; $w.send(41); sleep 0.1; $w.send($_) for 42..50; sleep 0.4; 18:21
camelia rakudo-moar 2a1605: OUTPUT«41␤42␤polled 43␤polled 44␤polled 45␤polled 46␤47␤48␤49␤polled 50␤»
18:21 Ven_ left
skids Or, it does until somethingh sends on the channel post-thread-start. 18:22
18:24 labster joined
hackedNODE s: Channel.new, 'poll' 18:25
SourceBaby hackedNODE, Sauce is at github.com/rakudo/rakudo/blob/2a16...nel.pm#L71
skids Yeah that'll go down to VM level no doubt. 18:26
jnthn A channel is just backed by a concurrent queue.
hackedNODE Looks fine to me, TBH.
You sleep, so .poll returns, but then you send a whole bunch of data, so the poll has a chance to fetch it 18:27
jnthn It's not much to do with poll and everything to do with Channel.Supply :)
skids m: my $w = Channel.new; start react { whenever $w { $_.say; while $w.poll -> $f { "polled $f".say; }; } }; $w.send($_) for 1..10; sleep 0.1; $w.send($_) for 42..50; sleep 0.4; 18:28
camelia rakudo-moar 2a1605: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤42␤polled 43␤polled 44␤polled 45␤46␤polled 47␤48␤49␤50␤»
skids The whenever is obviously seeing the data sent before it got run, but the poll does not.
hackedNODE It does. 18:29
jnthn Yeah, that's likely
kyclark lpaste.net/231540
I'm getting "Too many positionals passed; expected 1 argument but got 2000"
So I don't understand how to pass an array to a sub
I'm saying "writer(@seqs);" 18:30
hackedNODE You have a race condition there. When you receive a value in your channel, you attempt to immediately poll it for more data (which returns Nil if there's no data), so if you don't send more fast enough the .poll returns, and then it's up to the next whenever to trigger another poll
kyclark And my sub is "sub writer (@seqs)"
skids hackedNODE: That's the intended behavior, yes.
kyclark Hmm, I'm using @seqs two times -- maybe that's a problem? 18:31
psch kyclark: what's the full error message?
hackedNODE kyclark: what's the full error message?
jnthn Well, it's also a bit more sutble than that I think. whenever is push-based rather than pull-based. When there are existing values in the channel, then we queue them up for processing with the "whenever"
hackedNODE psch: you owe me a coke
kyclark Full error:
Too many positionals passed; expected 1 argument but got 2000
in sub writer at /home/u20/kyclark/bin/fasplit.pl6 line 16
gfldex m: my @a = 1,2,3; sub f($b){}; f $@a;
camelia ( no output )
kyclark in sub MAIN at /home/u20/kyclark/bin/fasplit.pl6 line 23
in block <unit> at /home/u20/kyclark/bin/fasplit.pl6 line 3
psch hackedNODE: i'm first locally, sooo..?
hackedNODE heh
18:31 CIAvash left, acrussell left
psch hackedNODE: i'm *also* first on the clog :) 18:31
kyclark: that's curious indeed, it does seem to point directly at your &writer 18:32
m: sub f(@a) { say "got @a[]" }; f [1,2,3]
camelia rakudo-moar 2a1605: OUTPUT«got 1 2 3␤»
18:32 cdg left
hackedNODE kyclark: what's your perl6 -v ? 18:33
kyclark This is Rakudo version 2016.08.1 built on MoarVM version 2016.08
Changing the use of @seqs doesn't make a difference. I also tried having "sub writer(*@seqs)" to be slurpy, but the same error 18:34
hackedNODE kyclark: I suspect you're running the wrong file or you forgot to save or something like that. I don't see a problem with that program.
skids jnthn: Maybe the whenever is "laying claim" to the values before poll can get at them?
hackedNODE :/ 18:35
jnthn skids: Very likely, yes
kyclark Hmm, I realized that I wasn't opening my out file with :w, so I fixed that and now it runs. 18:36
18:36 tushar left
psch that's a really weird error though 18:36
perlpilot kyclark: sure you don't have writer(|@seqs) somewhere? 18:37
kyclark Positive.
hackedNODE m: m: my $w = Channel.new; start react { sleep 1; whenever $w { say "IN"; .say; say "HERE"; while $w.poll -> $f { "polled $f".say; }; }; say "OUT" }; $w.send($_) for 1..10; sleep 0.1; $w.send($_) for 42..50; sleep 1.4;
camelia rakudo-moar 2a1605: OUTPUT«OUT␤IN␤1␤HERE␤IN␤2␤HERE␤IN␤3␤HERE␤IN␤4␤HERE␤IN␤5␤HERE␤IN␤6␤HERE␤IN␤7␤HERE␤IN␤8␤HERE␤IN␤9␤HERE␤IN␤10␤HERE␤IN␤42␤HERE␤IN␤43␤HERE␤IN␤44␤HERE␤IN␤45␤HERE␤IN␤46␤HERE␤IN…»
hackedNODE skids: ^ weird that it prints "OUT" which is at the end of a whenever, even though that same block has two other prints in it :S 18:38
kyclark: can you rakudobug that?
kyclark New version that works: lpaste.net/231540
hackedNODE huggable: rakudobug
huggable hackedNODE, [email@hidden.address] or use perl6 query on rt.perl.org ; see github.com/rakudo/rakudo/#reporting-bugs
kyclark hackedNODE, sure, but what do I say? 18:39
jnthn hackedNODE: You put it after the whenever block. And a whenever is non-blocking 18:40
hackedNODE jnthn: oh damn :) I meant to put it after the while {}
jnthn :-)
18:41 Ven_ joined
hackedNODE kyclark: that you got a weird error. If the issue was that the handle wasn't in :w mode, then it sould complain about that and not say you have 2000 arguments wrong 18:41
kyclark: preferable with a small test case that reproduces the issue. So we can fix this
kyclark Roger that.
jnthn $ ./perl6-m -e "open('foo').print([1,2,3])" 18:46
Too many positionals passed; expected 1 argument but got 2
18:46 acrussell joined
psch yeah, that's what i thought 18:46
jnthn And fine with :w 18:47
psch .print on a non-w handle can't deal with more than the invocant
hackedNODE But the code shown is "$out.print(@seqs.join("\n"));"
hackedNODE knew that was a lie!
timotimo that's kind of LTA :)
psch because MMD or something vOv
jnthn Oh, no
Because failure
*Failure
the open returns a Failure
psch ohh
jnthn And we inherit a print 18:48
timotimo yeah
hackedNODE heh
jnthn m: print Failure.new
camelia rakudo-moar 2a1605: OUTPUT«Failed␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
timotimo that's pretty problematic in general
jnthn m: Failure.new.print
camelia rakudo-moar 2a1605: OUTPUT«Failed␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
jnthn m: Failure.new.print(1)
camelia rakudo-moar 2a1605: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in block <unit> at <tmp> line 1␤␤»
timotimo i hear it was speculated that any method on Failure was supposed to just pass on the same Failure
hackedNODE m: sub { fail }.print: 1
camelia rakudo-moar 2a1605: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in block <unit> at <tmp> line 1␤␤»
hackedNODE m: class LOL {}.print: 1
camelia rakudo-moar 2a1605: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in block <unit> at <tmp> line 1␤␤»
psch well that's different 18:49
...i think?
FROGGS we need a FALLBACK?
psch maybe not, actually
18:50 girafe joined
jnthn I think .print on any old class just being a call that expects no args is fine 18:54
18:54 Ven_ left
jnthn But on Failure, rather less so 18:54
Similar for .say
The best bet is probably to just implement print/say in Failure and have 'em blow up 18:55
hackedNODE Well, it's kinda anything, really.
m: Failure.new.native-descriptor
camelia rakudo-moar 2a1605: OUTPUT«Failed␤␤Actually thrown at:␤ in any at gen/moar/m-Metamodel.nqp line 3090␤ in block <unit> at <tmp> line 1␤␤»
hackedNODE Oh, it has to be one of the inherited ones
jnthn No, that one is fine 'cus we hit FALLBACK
Right
And some of the inerited ones are just fine
.can is sensible enough, for example 18:56
hackedNODE Is there a difference between .can and .^can?
m: Any, 'can'
camelia rakudo-moar 2a1605: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant string "can" in sink context (lines 1, 1)␤»
hackedNODE s: Any, 'can'
SourceBaby hackedNODE, Sauce is at github.com/rakudo/rakudo/blob/2a16...Mu.pm#L607
hackedNODE s: Any, '^can'
SourceBaby hackedNODE, Something's wrong: ␤ERR: Type check failed in binding to &code; expected Callable but got Nil (Nil)␤ in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤ in block <unit> at -e line 6␤␤
hackedNODE s: Any.HOW, 'can' 18:57
SourceBaby hackedNODE, Something's wrong: ␤ERR: X::Multi::NoMatch exception produced no message␤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤ in block <unit> at -e line 6␤␤
hackedNODE :(
Ah, OK. No difference: github.com/rakudo/rakudo/blob/2a16...Mu.pm#L608
18:58 itaipu_ joined 19:01 itaipu left, Ven_ joined 19:09 Ven_ left 19:14 maybekoo2 joined 19:21 Ven_ joined 19:22 Ven_ left 19:23 andrzejku left 19:24 domidumont left 19:31 andrzejku joined 19:32 patrickz joined 19:36 andrzejku left 19:41 Ven_ joined
dalek href="https://perl6.org:">perl6.org: 80c5081 | (Angelo Compagnucci)++ | source/index.html:
Spurious Horizontal Scroll on Mobile

  * Header and main rows should be into a container fluid
Fixes: #51
19:41
href="https://perl6.org:">perl6.org: 3794cdf | (Angelo Compagnucci)++ | source/index.html:
Spurious Horizontal Scroll on Mobile

  * Fix indentation
Fixes: #51
href="https://perl6.org:">perl6.org: c41b70b | (Zoffix Znet)++ | source/index.html:
Merge pull request #55 from angeloc/master

Spurious Horizontal Scroll on Mobile
19:48 wamba left 19:54 Ven_ left 19:55 FROGGS left 19:57 andrzejku joined
andrzejku hello :) 19:58
20:00 Ven_ joined 20:09 Ven_ left
harmil_wk Heya andrzejku 20:15
20:19 acrussell left 20:21 Ven_ joined 20:22 Ven_ left 20:40 Ven_ joined 20:42 labster left 20:44 cdg joined 20:47 cdg left 20:48 cdg joined, andrzejku left 20:50 Ven_ left 20:51 itaipu_ left 20:55 infina left 20:56 Ven_ joined 21:08 skids left 21:15 rindolf left, go|dfish left 21:18 mcmillhj left, Ven_ left 21:23 ccakes joined 21:28 go|dfish joined 21:31 kaare_ left 21:37 pmurias left 21:39 perlawhirl left 21:56 rgrinberg left 22:01 kurahaupo left, labster joined 22:10 ccakes left 22:15 mcmillhj joined 22:20 mcmillhj left 22:22 RabidGravy left 22:31 patrickz left 22:35 cyphase joined, bjz left 22:36 cyphase left, cyphase joined 22:38 ccakes joined 22:39 krakan left, cyphase left 22:40 cyphase joined, cyphase left, cyphase joined 22:43 ccakes left 22:49 girafe left 22:54 skids joined, johnjohn101 joined
johnjohn101 hi perl6 22:55
gfldex m: say "ohai johnjohn101!"
camelia rakudo-moar ed0ced: OUTPUT«ohai johnjohn101!␤»
johnjohn101 what ever happened to perl 6 on .net? did that project die? 22:56
gfldex the fellow who made it happen lost the spare time to continue
johnjohn101 oh
maybe someone will pick it up one day 22:58
i still need to mess with native calls. seems very interesting 23:01
23:01 bjz joined 23:02 ccakes joined 23:03 mcmillhj joined 23:05 BenGoldberg joined 23:08 mcmillhj left 23:18 maybekoo2 left 23:21 bjz left 23:24 johnjohn101 left 23:25 cyphase left
dalek c: 1f30c68 | gfldex++ | doc/Type/Signature.pod6:
clarify what arguments are defined in what where-clause
23:27
23:29 mcmillhj joined, _slade_ joined 23:31 cyphase joined 23:33 labster left 23:34 mcmillhj left 23:36 tushar joined
dalek c: f80d7e5 | gfldex++ | doc/Type/Callable.pod6:
doc CALL-ME
23:40
tushar How can I specify a type of an array which I pass as signature to a method? How can I do "method (Int :@array!) { code.. }"? 23:41
Is it even possible?
I tried it but experienced an error. 23:42
23:42 cdg left
gfldex m: sub f(Int @a){ dd @a }; my Int @b = Array[Int].new(1,2,3); f @b; 23:42
camelia rakudo-moar ed0ced: OUTPUT«Array[Int] @b = Array[Int].new(1, 2, 3)␤»
tushar m: class abc { method xyz (Int :@a!) { @a.say; }}; my $new = abc.new(); $new.xyz(a => [1..5]);
camelia rakudo-moar ed0ced: OUTPUT«Type check failed in binding to @a; expected Positional[Int] but got Array ($[1, 2, 3, 4, 5])␤ in method xyz at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
gfldex ^^^ tushar
the type constraint is on the @-sigiled argument (container) not on the elements of that container 23:43
m: sub f(Int @a){ dd @a }; my Int @b = Array[Int].new(1,2,3); @b.push(4); f @b;
camelia rakudo-moar ed0ced: OUTPUT«Array[Int] @b = Array[Int].new(1, 2, 3, 4)␤»
gfldex m: sub f(Int @a){ dd @a }; my Int @b = Array[Int].new(1,2,3); @b.push(4.4); f @b;
camelia rakudo-moar ed0ced: OUTPUT«Type check failed in assignment to @b; expected Int but got Rat (4.4)␤ in block <unit> at <tmp> line 1␤␤»
tushar gfldex: thanks. 23:44
gfldex any .push/.append etc is type checked against .of tho
m: sub f(Int @a){ dd @a }; my Int @b = Array[Int].new(1,2,3); say @b.of
camelia rakudo-moar ed0ced: OUTPUT«(Int)␤»
23:44 mcmillhj joined
gfldex tushar: the type constraint is not what you want in many cases 23:45
tushar hmmm..
gfldex m: sub f(+@a where { .all ~~ Int}){}; f(1,2,3)
camelia ( no output )
gfldex m: sub f(+@a where { .all ~~ Int}){}; f(1,2,3,4.4)
camelia rakudo-moar ed0ced: OUTPUT«Constraint type check failed for parameter '@a'␤ in sub f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
gfldex the type constraint on the container may speed things up in the future 23:46
tushar gfldex: thanks for the explanation. 23:48
23:49 cyphase left 23:50 mcmillhj left 23:53 cyphase joined
gfldex m: sub f(Array[Int](Array)){} 23:55
camelia ( no output )
gfldex m: sub f(Array[Int](Array)){}; f [1,2,3] 23:56
camelia rakudo-moar ed0ced: OUTPUT«No such method 'Array[Int]' for invocant of type 'Array'␤ in sub f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
23:56 mcmillhj joined
gfldex m: class C { method Array[Int] {} } 23:56
camelia rakudo-moar ed0ced: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3class C { method Array7⏏5[Int] {} }␤»
23:58 krakan joined