»ö« 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.
kyclark Sorry, one more question. How do I print Unicode if I have something like “U+26FA"? 00:01
“say” just prints that literally.
timotimo you want either \x26fa or chr(0x26fa) 00:02
and of course there's also \c[SOME LETTER WITH SOME ACCENT OR SOMETHING]
AlexDaniel u: U+26FA 00:06
unicodable6 AlexDaniel, U+26FA TENT [So] (⛺)
raiph m: put "\c[%]" # LTA error message; I thought it was complaining about the '\c'; plan to RT if not already RT'd 00:06
camelia 5===SORRY!5=== Error while compiling <tmp>
Unrecognized \c character
at <tmp>:1
------> 3put "\c[7⏏5%]" # LTA error message; I thought it wa
expecting any of:
argument list
double quotes
term
AlexDaniel m: say “\c[TENT]” 00:07
camelia
AlexDaniel raiph: I don't think there's an RT for that
AlexDaniel raiph: mostly because it's hard for me to see any problem here :) 00:07
but LTA is LTA, if you think that it is 00:08
raiph m: put "\c[U+26FA]" # I started with a guess ("I seem to recall a \c[...] thing; lemme try that") 00:09
camelia 5===SORRY!5=== Error while compiling <tmp>
Unrecognized character name [U+26FA]
at <tmp>:1
------> 3put "\c[U+26FA7⏏5]" # I started with a guess ("I seem to
raiph One more time... 00:11
m: put "\c[“U+26FA"]" # I started with a guess ("I seem to recall a \c[...] thing; lemme try that")
camelia 5===SORRY!5=== Error while compiling <tmp>
Unrecognized \c character
at <tmp>:1
------> 3put "\c[7⏏5“U+26FA"]" # I started with a guess ("I
expecting any of:
argument list
double quotes
term
raiph but yeah, too marginal, not RT worthy 00:13
raiph AlexDaniel: thx 00:13
AlexDaniel u: star
unicodable6 AlexDaniel, U+066D ARABIC FIVE POINTED STAR [Po] (٭)
AlexDaniel, U+06DE ARABIC START OF RUB EL HIZB [So] (۞)
unicodable6 AlexDaniel, 63 characters in total: gist.github.com/c14acb047bbb675d22...4aaccb2fc2 00:13
Geth ecosystem: 49113f4144 | (Rob Hoelz)++ | META.list
Remove Native::Resources from ecosystem

It's deprecated
00:26
timotimo oooh hoelzro is here! 00:27
:)
hoelzro o/ 00:31
blame Zoffix and samcv for filing PRs against modules and forcing me to do work ;)
samcv clicking one button ;P :? heh 00:32
hoelzro haha, yes
although I'm going to look into that Linenoise multibyte stuff this weekend
samcv oh that issue. yeah
will love you so much if you get that working! 00:33
that's the only reason Readline is better than the linenoise one, becuase of the utf-8 support
hoelzro I'll do what I can!
samcv and since it's in Star, you'll be a 🌟 if you can do it!
thank you :)
hoelzro I started on it last April (ugh so long ago), but I decided "oh hey, maybe I'll just write a pure Perl line editor"
that way lies madness
and demotivation to work on Perl 6 stuff 00:34
samcv heh
timotimo hoelzro: we're putting a cflag into moarvm to make sure our linux-based devs don't break the msvc build, but stuff like LibraryMake will take the CFLAGS and run with 'em for any random code out there 00:35
we need a way to fix this
also, wanna kick the parrot code path out? :D
hoelzro "make sure our linux-based devs don't break the msvc build" - haha, that *never* happens... 00:36
;)
timotimo: kick out as in remove it? 00:37
timotimo well, we have at least the one thing that keeps us from committing obviously broken stuff
yeah
we haven't had rakudo supporting parrot for a long while
hoelzro right
I need to get back up to speed
I've been thinking about contributing again
timotimo neato
samcv timotimo, why do will still not have Appveyor for MoarVM? 00:39
need to bug jnthn to add/authorize it or what? 00:40
timotimo right, jnthn will have to push the magic button
poohman_ m: say "test"; 01:30
camelia test
poohman m: say " test"; 01:43
camelia test
AlexDaniel m: say ‘test test test!’ 01:58
camelia test test test!
skids m: my $a = "H"; say $a [R~]= "T"; $a.say; $a [R~]= "W"; $a.say 02:00
camelia Potential difficulties:
Useless use of [R~]= in sink context
at <tmp>:1
------> 3 $a = "H"; say $a [R~]= "T"; $a.say; $a 7⏏5[R~]= "W"; $a.say
TH
TH
WTH
skids useless useless use. :)
skids looks for prexisting RT. 02:01
skids made RT#131251 02:14
raschipi #131251
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131251
BenGoldberg m: use experimental :macros; macro infix:<plus>($a, $b) { return quasi { {{{$a}}} + {{{$b}}} } }; say 2 plus 3; 02:16
camelia WARNINGS for <tmp>:
Useless use of constant integer 2 in sink context (line 1)
Useless use of constant integer 3 in sink context (line 1)
5
BenGoldberg skids, Think it's related? 02:17
skids I'd be more inclined to think it has something to do with something not figuring out it's an assignment op, as it complains about the operator not operands. 02:26
(And probably macro "bugs" are premature given that whole area is likely to be overhauled before making it out of experimental) 02:27
not that roast tests are ever premature. 02:28
Eddward Anyone seen an error like this when building star? pastebin.com/BGmHhVfh 02:45
oh. I'm an idiot. Nevermind. 02:48
lookatme :) 02:51
skids Mr. Meeseeks? 03:08
azawawi Good morning 05:42
pasteboard.co/26lEVUa0L.png # Perl 6 ASCii Art 3D Cube , Sine/Cosine waves and kitchen sink example in all-in-one screenshot :) 05:43
github.com/azawawi/perl6-terminal-...r/examples # :) 05:44
Feedback welcomed
lookatme m: sub f(*%args) { dd %args; }; try { f(1 => 2, 3 => 4); CATCH { default { "FAIL!!".note; } } }; f(f => 5, z => 6); 06:29
camelia FAIL!!
{:f(5), :z(6)}
lookatme Why first call with `1 => 2, 3 => 4` failed ? --?
samcv lookatme, because (1 => 2, 3 => 4) is two pairs 06:31
samcv m: say (1 => 2, 3 => 4).WHAT 06:31
camelia (List)
samcv m: sub f(*%args) { dd *%args; }; try { f(1 => 2, 3 => 4); CATCH { default { "FAIL!!".note; } } }; f(f => 5, z => 6); 06:32
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
args used at line 1
lookatme m: say (f => 5, z => 6).WHAT
camelia (List)
samcv hmm see you have *%blah 06:32
samcv m: sub f(*%args) { dd %args; }; try { f({1 => 2, 3 => 4}); CATCH { default { "FAIL!!".note; } } }; f(f => 5, z => 6); 06:32
camelia FAIL!!
{:f(5), :z(6)}
samcv hmm sec lemme look closer 06:33
at first thought you didn't use *%args
lookatme em
What should i use ?
lookatme m: sub f(%arg) { say %arg.WHAT; dd %arg; }; f(1 => 2); f(f => 5); 06:35
camelia (Pair)
1 => 2
Too few positionals passed; expected 1 argument but got 0
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
samcv hmm ok so that wasn't the reason but
since f(f => 5, z => 6) is a list of paris too 06:36
gonna try something out hold on
lookatme m: sub f(%arg) { say %arg.WHAT; dd %arg; }; f(f => 5); 06:37
camelia Too few positionals passed; expected 1 argument but got 0
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
lookatme But on my rakudo, it's work fine 06:38
This is Rakudo version 2017.03 built on MoarVM version 2017.03
Let me try again. 06:39
samcv m: my $b = f => 5, z => 6;
camelia WARNINGS for <tmp>:
Useless use of "z => 6" in sink context (lines 1, 1)
samcv ok there is the problem lookatme
m: my $b = 'f' => 5, 'z' => 6;
camelia WARNINGS for <tmp>:
Useless use of "=>" in expression "'z' => 6" in sink context (line 1)
lookatme m: sub f(%arg) { say %arg.WHAT; dd %arg; }; f(1 => 5); 06:40
camelia (Pair)
1 => 5
samcv m: my $b = {'f' => 5, 'z' => 6};
camelia ( no output )
samcv sub f(*%args) { say %args; }; f(:what, :is, :this(4), :hi(10)) 06:41
m: sub f(*%args) { say %args; }; f(:what, :is, :this(4), :hi(10))
camelia {hi => 10, is => True, this => 4, what => True}
samcv m: sub f(*%args) { dd %args; }; f(:what, :is, :this(4), :hi(10))
camelia {:hi(10), :is, :this(4), :what}
samcv m: sub f(*%args) { dd %args; }; try { f |(1 => 2, 3 => 4); CATCH { default { "FAIL!!".note; } } }; f(f => 5, z => 6); 06:42
camelia FAIL!!
{:f(5), :z(6)}
lookatme m: dd \(f => 5); dd \(1 => 5);
camelia \(:f(5))
\(1 => 5)
lookatme What's difference from `:f(5)` and `1 => 5` 06:43
lookatme s/from/between/ 06:43
samcv lookatme, well if you want to pass a list of pairs you should use *@array 06:45
the *%blah is slurpy parameters not a slurpy list
it suprised me a bit too this different functionality but it makes some sense. *%args is supposed to be parameters, and parameters are usually written :foo('bar') notation when you give it to a sub 06:46
so it gives it as different args and not as a list
if that makse sense
this => 'that', foo => 'bar # is a List of pairs
the other one is more than one argument
lookatme Em, When should I use *%args ? 06:47
samcv if you accept arguments
that you want put in a hash
lookatme What argument ?
samcv i use one in one of my modules lemme show you 06:48
github.com/samcv/IRC-TextColor/blo...m6#L68-L76
and see the pod comment above the function 06:49
also lets you have any arguments you want 06:50
lookatme So I call that fun like this `ircstyle('...', | %irc-styles)` ?? 06:51
Is this right ?
samcv no 06:52
well maybe you can i haven't tried
but
ircstyle('text', :bold, :green) # usually called like that
lookatme I think it's ok.
samcv which gives you %hash = 'bold' => True, 'green' => True
lookatme But I think `ircstyle('text', :bold, :green)` and `ircstyle('text', bold => True, green => True)` is equal .. 06:53
samcv bisectable6, m: sub f(*%args) { dd %args; }; try { f(1 => 2, 3 => 4); CATCH { default { "FAIL!!".note; } } }; f(f => 5, z => 6)
bisectable6 samcv, On both starting points (old=2015.12 new=f4cbdb6) the exit code is 0 and the output is identical as well
samcv, Output on both points: «FAIL!!␤{:f(5), :z(6)}»
lookatme Maybe I dont' get your point . 06:54
samcv hmm
m: sub f(Str $s, *%args) { dd %args; }; try { f('string', 1 => 2, 3 => 4); CATCH { default { "FAIL!!".note; } } }; f('string', f => 5, z => 6)
camelia FAIL!!
{:f(5), :z(6)}
samcv oh i get it! 06:55
lookatme I just expect `f(1 => 2, 3 => 4)` is working with that signature
samcv ok. here you go
lookatme, you can't have arguments that are numbers!
finally clicked in my mind
lookatme Oh ?why ..
samcv you can't have a variable named $8 or whatever 06:56
lookatme Em.
samcv sub f ( $8, $3) that's what it's like
and you can't have that
becuse it's passed as arguments to the function (passed as NAMED arguments)
that is
have you learned about named arguments lookatme ? 06:57
lookatme Yeah, I know that.
samcv m: sub f (:$foo, :$bar) { say $foo, say $bar}; f(:foo('hi'), :bar('no'))
camelia no
hiTrue
lookatme It can be write like name => value, :name(value)
samcv so the first thing in the pair is the name of the named argument 06:58
it doesn't pass as an actual pair
lookatme Oh, I got it !
samcv yeah it confused me too for a while! hah
lookatme It's a big trap..
samcv heh
well when you %*args it assumes they're all named
samcv since that's what it's for. if you did some other variable that wasn't named then you'd probably be fine 06:59
lookatme I use `%args` before, it all work fine, so I confused ...
samcv m: sub f ($a, $b) { dd $a; dd $b }; f(this=>'that', here=>'there')
camelia Too few positionals passed; expected 2 arguments but got 0
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
lookatme m: sub f(Str $s, *%args) { dd %args; }; try { f('string', |(1 => 2, 3 => 4)); CATCH { default { "FAIL!!".note; } } }; f('string', f => 5, z => 6)
camelia FAIL!!
{:f(5), :z(6)}
samcv m: sub f ($a, $b) { dd $a; dd $b }; f((this=>'that'), (here=>'there')) 07:00
camelia Pair $a = :this("that")
Pair $b = :here("there")
samcv lookatme, with how many pairs? 07:01
lookatme m: sub f(Str $s, *%args) { dd %args; }; try { f('string', |(1 => 2), |(3 => 4)); CATCH { default { "FAIL!!".note; } } }; f('string', f => 5, z => 6)
camelia {"1" => 2, "3" => 4}
{:f(5), :z(6)}
samcv you can do this:
m: sub f (%args) { dd %args}; f ({a => 'b', b=>'c'})
camelia Hash % = {:a("b"), :b("c")}
lookatme samcv, I just play with that 07:02
samcv yeah, use { } around the pairs so it acts as a hash
in most cases you *don't* want *%hash. but *@args is pretty easy to use
and just lets you use as many arguments you want
samcv but yeah, be careful with lists of things vs arguments 07:03
since f('a', 'b') is two arguments but f(('a','b')) is one etc
lookatme `|(1 => 2)` work fine.
samcv yeah it sems so
i had tried to do that before but i guess i did it wrong :|
lookatme Em, should be careful..
samcv let me see what i did wrong 07:04
samcv ah i did this: 07:04
m: sub f(*%args) { dd %args; }; try { f |(1 => 2, 3 => 4); CATCH { default { "FAIL!!".note; } } }; f(f => 5, z => 6);
camelia FAIL!!
{:f(5), :z(6)}
lookatme I use it for `method new`, so I can dont' care about what passed
samcv put the | in front of both
lookatme, you are making a custom method new? 07:05
lookatme Em, you can do what you want in that custom new
samcv curious about your reasons. i've never had to do that myself. i've used TWEAK though, because it's a lot easier. and let perl 6 handle the args
have you heard about TWEAK?
lookatme No. 07:06
samcv it's really nice!
docs.perl6.org/language/objects#in...ntry-TWEAK
lookatme Oh, I will check that 07:06
samcv much safer because it doesn't override any perl6 constructor methods :)
i think we got it like start of thsi year
oh november of 2016 actually it was added 07:07
lookatme Is *rakudo* will pass all arguments to TWEAK ? 07:08
samcv uhm no
lookatme I mean you can initialize private attribute.
samcv so you setup your variables with 'has'
and pass those to 'new'
then in TWEAK you do what you want with those variables
and "get the object ready" and do whatever work or initialize what variables you want 07:09
samcv if you make your own new you don't get the built in initialization of passed arguments -> private variables 07:10
but you may/may not want that, i'm not sure what you're doing :-)
lookatme Em, you are right 07:11
samcv i like to just pass them in with the default .new, and then do all the actions i need in TWEAK. though i haven't needed to have arbitrary arguments before
lookatme I should do something practice about `TWEAK` 07:12
samcv even if it doesn't fix this exact thing you're trying to do, it will surely be very useful in the future
lookatme Em, override new actually not a good idea.
Em, it could be 07:13
And, samcv thanks for your help. 07:14
samcv no problem!
lookatme samcv, Great, TWEAK received all named arguments 07:19
m: class H { submethod TWEAK(|c) { dd c; }; }; H.new(a => 3, b => 3, fa => 4); 07:20
camelia \(:a(3), :b(3), :fa(4))
samcv oh it did :) good to know 07:29
awesome! we both learned things :)
Geth Swapped META.info → META6.json in 2 dists in github.com/perl6/ecosystem/commit/8a48a6381c 09:59
garas how does it works with zef? can it download any older version of a module? 11:44
where does one finds the list of versions?
not from the tags on github, apparently 11:49
garas m: my $f; class B { has $!a; }; my $c= B.new: :$f; dd $c; # What is this thing really doing? 12:02
camelia B $c = B.new
garas m: class B { has $a; }; my $c= B.new: "cest", "nimporte", "qua"; dd $c; 12:07
camelia Default constructor for 'B' only takes named arguments
in block <unit> at <tmp> line 1
garas m: class B { }; my $c= B.new: :a("cest"), :b("nimporte"), :c("qua"); dd $c;
camelia B $c = B.new
jnthn :$f just means :f($f) 12:09
The default new just passes the named arguments into the default construction process. That in turn makes them available to each class in the inheritance chain to use. 12:10
The default BUILD semantics are to see if there are any public attributes (those declared $.foo) and if there's an argument with name foo, then populate the attribute with that value. 12:11
Since your class doesn't declare any custom construction logic nor have any public attributes, then the named arguments being passed go unused. 12:12
garas passing unuseful arguments seems like a really associal behaviour 12:16
the person which is trying to understand the code will try to figure out what in fact is nothing 12:17
jnthn Well, yes, I'm not sure why anybody would pass knowingly unused arguments. :-) 12:22
nadim morning, how does one say things on STDERR? 12:23
MasterDuke_ note() is one way 12:24
Woodi_ hi #perl6 :)
we don't use luajit anymore ? there is new version available. but cannot found it in 3rdparty/ 12:25
nadim MasterDuke_: thanks
Woodi_: yo!
Woodi_ hi nadim :)
MasterDuke_ Woodi_: i think MoarVM just uses a library from luajit, dynasm maybe? 12:27
jnthn Yes, dynasm 12:28
Which is a build time dependency rather than a runtime one
Woodi_ right, it's in 12:29
jnthn And I believe what we have is actually a dynasm fork
That adds dynamic register selection
Woodi_ just luajit changelog looked strange to me :) like: some strange bugs was fixed :) 12:30
jnthn Once a VM gets to a certain point, most of the bugs left to fix are strange ones :-) 12:30
'cus the boring ones were already shaken out
Woodi_ jnthn: still cannot accept that, even it's pretty logical :) 12:31
Woodi_ "just start from Hallo World and proceed with caution" seems so simple :) 12:32
Dijkstra wrote two things: 1. programing is for smarter ppls; but also 2. abstraction should make things better understendable :) 12:34
Woodi_ and gov's around the clock trying to craft more programmers ;) 12:35
[Coke] ff 12:37
pmurias jnthn: speaking of boring VM stuff have you seen my coerce_s_n PR? ;) 12:49
yoleaux 2 May 2017 16:10Z <Zoffix> pmurias: I was wrong. The .Str/.Stringy/.gist/.perl on Baggies is supposed to be ordered (RT#131244), but the fix will be in Rakudo, so I don't think any chances to JS backend to handle this are needed.
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131244
jnthn pmurias: Saw it's there; didn't get chance to review it just yet :( 12:53
Will get to it shortly, I'm almost caught up with stuff :)
eater Woodi_: who is Dijkstra en.wikipedia.org/wiki/Dijkstra 12:55
found him .-. 12:56
MasterDuke_ nadim: also $*ERR.say() 12:59
Woodi_ eater: he is proverbial ultimate programmer :) 13:00
btw. it's crazy ! Knuth was designing algoritms on the beach ! ;) 13:01
araraloren oh, ultimate ..
pmurias Woodi_: wasn't he more of a computer scientist rather than a programmer? 13:02
eater ^ 13:03
Woodi_ pmurias: IMO no. before MS Dos there was not many clean computer scientists
uh, *DOS :) 13:04
eater clean?
Woodi_ but i should not say about things older then me without proper history books :)
raschipi TimToady: Do you think? "There wasn't a clear distinction between Computer Scientists and Programmers before microcomputer programming environments" 13:07
Woodi_: Is my reformulation correct? 13:09
garas jnthn what is the rationale in not explicitly pass the parameters passed to the BUILDs of classes higher in hierarchy
?
raschipi Woodi_: Because there was BASIC before MS-DOS
Woodi_ raschipi: if you want 0-1 answer pleas note, that I sayd "not many" :) but for sure before PC's there was much less clean programmers becouse c.s. are usually programmers too. 13:13
btw. is it incredibly important I'm 100% correct with sentences ? :) tell me better wersion 13:14
raschipi Well, I didn't pretend my formulation wasn't fuzzy too.
timotimo huh. i'd say a computer scientist who programs is less clean than one who doesn't 13:16
though i would call it "pure", rather than "clean"
Woodi_ timotimo: it's the same 13:17
jnthn garas: I'm not sure I understand what you're asking; what would be explicitly passed where?
BUILD is called automatically by BUILDALL, which is the thing that calls BUILD/TWEAK methods from the top down 13:18
garas m: class A { has $.a; }; class B is A { has $.b; }; my $i = B.new: :a(2); dd $i # :a(2) is passed not explicitly to A 13:26
camelia B $i = B.new(b => Any, a => 2)
garas I'm used to C++, it is difficult to understand the logic behind all this 13:27
m: class A { has $.a; }; class B is A { has $.b; }; my $i = B.new: :c(3); dd $i # :c(3) is just junk 13:28
camelia B $i = B.new(b => Any, a => Any)
raschipi garas: docs.perl6.org/language/objects#in...ntry-TWEAK 13:29
garas Imagine I am a programmer, I open lib/B.pm and I search for a; I find nothing.. What am I supposed to do? 13:30
raschipi garas: imagine those were C structs instead of objects. 13:31
wamba m: say -2.polymod: 3, 3,
camelia -3
jnthn In general, methods in Perl 6 will happily accept and discard unrecognized named arguments. 13:32
raschipi You may find this architecture in poor taste, but P6 won't stop anyone from doing it.
wamba m: say -2.polymod: 3,
camelia -2
jnthn For the sake of allowing inheritance to be useful
wamba m: say -2.polymod: 3, 3, 3
camelia -4
jnthn (Presuming that many cases of inheritance will end up calling to to the base class using callsame() or similar)
garas jnthn raschipi : the problem, from the user point of view, is to understand where a given parameter will be useful 13:33
since they can end up anywhere in the hierarchy
raschipi That should be in the docs :) 13:34
jnthn Well, that's one argument. The other one is that if you specify it at the point of construction then you tightly couple the instantiation to the implementation structure. 13:35
Which would in turn frustrate refactoring later
Especially when wanting to pull parts of classes out in to roles, which is relatively common
timotimo really, perl6 should have taken the object model from hq9++, that way it'd be easiest for the user 13:36
raschipi Yes, HQ9++ objects just work. 13:38
timotimo no surprises when you have one of those 13:41
MasterDuke_ i'd never heard of hq9+ before, i google it and find there's a Parrot implementation ( bschmalhofer.github.io/hq9plus/ ) 13:45
pmurias garas: hopefully our IDE/editor support and/or doc tools will show you what uses a given named argument 13:48
garas Thanks, I understood how it works 13:51
azawawi hi :) 14:58
timotimo: ping 14:59
timotimo hey azawawi
azawawi timotimo: pasteboard.co/26lEVUa0L.png # Perl 6 ASCii Art 3D Cube , Sine/Cosine waves and kitchen sink example in all-in-one screenshot :)
timotimo pretty cool 15:01
azawawi timotimo: need to figure out the bitmap dithering part. Found an interesting link github.com/algernon/cake-is-a-lie/...is-a-lie.c 15:03
timotimo: imlib2 + libcaca 15:04
timotimo: any progress on libsixel?
timotimo no progress since we last spoke 15:05
raschipi azawawi: Did you get a rount tuit for Camelia? 15:06
moritz azawawi++ 15:08
azawawi raschipi: no i was actually busy eating grape leaves :) 15:16
moritz: thx 15:17
raschipi Something I always do with grape leaves is to infuse them into liqueur. 15:21
azawawi github.com/mrhdias/perl6-Imlib2/pulls # Anyone know if the maintainer of this excellent library is active or not? 15:23
TreyHarris azawawi: you can go to the user's page to see a graph of activity. Looks like from github.com/mrhdias he's been inactive since late February. 15:27
s/late/mid
hoelzro ooc, how did I get banned from #perl6-release? 15:31
azawawi TreyHarris: thx 15:32
jaush hi. i just downloaded "rakudo-star-2017.04.1-x86_64 (JIT).msi" - after installation, trying to run perl6.bat from cmd.exe, i get the error "The application was unable to start correctly (0xc000007b). Click OK to close the application." 15:41
then, additional errors from the crash report - where do i sent those? should i paste them here? rakudo 2017.01 works without issue on this machine. 15:42
timotimo please use some on-line pasting service for the additional data 15:43
jaush certainly: pastebin.com/chDjkpN3 15:44
timotimo wow, that is spectacularly unhelpful 15:45
jaush is that directed toward me? what else would you like - i don't do windows native app programming
timotimo nah, it's a complaint about microsoft making all their stuff useless
jaush i'm not opposed to installing a debugger and running it under that if you can point me at some instructions 15:46
timotimo i don't do windows programming either :( 15:47
gfldex i will test it in a clean VM
timotimo there have been reports that strawberry perl has to be installed to satisfy some kind of dependency 15:48
but that supposedly comes with a "couldn't find blahblah.dll" message
not this appcrash thing
jnthn That error code looks vaguely familiar. A quick google suggests that it can indicate a 32-bit vs 64-bit mess-up (like a 64-bit executable tries to load a 32-bit DLL), which is probably where I've seen it from.
I should add "familiar from elsewhere", not "familiar from trying to use this MSI" :) 15:49
jaush fwiw, here's the crash when launched under windbg.exe (not 100% sure the command-line arguments have the same semantics as they do from the .bat): pastebin.com/qJHxTT0D 16:01
with the "Debug child processes also" option checked 16:02
here's one where i actually hit "Go" on the debugger and get the same exception (i have no idea what i'm doing ;)): pastebin.com/uqf39YvR 16:04
TreyHarris Is there an easy way to strip POD from example block code? 16:07
jaush if i rename C:\Program Files (x86)\GNU\GnuPG\pub\libgcc_s_sjlj-1.dll moar complains it doesn't exist, rather than crashing... 16:08
timotimo oh lord 16:09
so maybe installing strawberry perl will help, because then you'll also have a 64bit version of that?
jaush 2017.01 worked fine - if 2017.04 added a new .dll dependency, shouldn't that be part of the installer/install process? 16:21
TreyHarris m: try { die X::TypeCheck::Binding::Parameter.new(); CATCH { say "inside"; if (.can('resumable') && .resumable) { .resume } }}; say "outside"; 16:22
camelia inside
This representation (VMException) does not support associative access (for type BOOTException)
in block at <tmp> line 1
in block <unit> at <tmp> line 1
TreyHarris ^^ why? And how, then, can I do this check? 16:22
sorry 16:23
m: try { die X::TypeCheck::Binding::Parameter.new(); CATCH { default { say "inside"; if (.can('resumable') && .resumable) { .resume } }}}; say "outside"; 16:24
camelia inside
This representation (VMException) does not support associative access (for type BOOTException)
in block at <tmp> line 1
in block <unit> at <tmp> line 1
TreyHarris m: try { die X::TypeCheck::Binding::Parameter.new(); CATCH { default { say "inside"; .resume }}}; say "outside";
camelia inside
outside
TreyHarris it *is* resumable... I just can't check whether it is in an exception. (At the REPL if I create but do not throw an X::TypeCheck::Binding::Parameter, I can check it. Just not inside a handler.) 16:26
Granted this is not a generally useful (or wise) thing to do, but it is useful for test cases. 16:27
Perl6Noob m: try { die X::TypeCheck::Binding::Parameter.new(); CATCH { default { say "inside"; if (.^can("resumable")) { .resume } }}}; say "outside"; 16:29
camelia inside
outside
Perl6Noob That's just a bug with .resumable method
github.com/rakudo/rakudo/blob/nom/...ion.pm#L75 16:30
Perl6Noob m: use nqp; try { die X::TypeCheck::Binding::Parameter.new(); CATCH { default { dd nqp::getattr(nqp::decont($_), Exception, '$!ex').^name}}}; 16:31
camelia "BOOTException"
TreyHarris try { die X::TypeCheck::Binding::Parameter.new(); CATCH { default { say "inside"; if (.^can('resumable') && .resumable) { .resume } }}}; say "outside"; 16:32
m: try { die X::TypeCheck::Binding::Parameter.new(); CATCH { default { say "inside"; if (.^can('resumable') && .resumable) { .resume } }}}; say "outside";
camelia inside
This representation (VMException) does not support associative access (for type BOOTException)
in block at <tmp> line 1
in block <unit> at <tmp> line 1
jnthn Yowser, that resumable method looks like a fossil from the Parrot days
Perl6Noob m: use nqp; warn 42; CONTROL { default { dd nqp::getattr(nqp::decont($_), Exception, '$!ex').^name} }
camelia "BOOTException"
TreyHarris Perl6Noob: ^^ .^resumable would be incorrect.
Perl6Noob jnthn: what should it be? 16:33
jnthn Probably we should just toss it
Perl6Noob Ah
jnthn Well, there's not currently a way to ask
But resuming any old exeption is not likely to go well
Perl6Noob TreyHarris: $foo.^bar is just a shortcut for $foo.HOW.bar($foo) and .can is just an alias for .^can
jnthn Those thrown from a low level in the VM simply cannot be 16:34
And those that in theory can be at a high level aren't liable to do anything sensible :)
mst jnthn: suddenly reminded of my sysadmin girlfriend getting very angry when a developer asked her how to resume from jgdb
*kgdb
gfldex install of Rakudo on a clean win10 VM leads to this: s11.postimg.org/kqre91w83/Virtual_..._32_31.png
jnthn (Like, the code guarded by the exception throw is probably in most cases going to crash and burn really hard :-)) 16:35
Perl6Noob gfldex: known and is fixed by installing Strawberry Perl. I believe stmuk was also working on an update to remove telemeh to prevent that error
TreyHarris Here's my issue: I've been trying to fix the docs for the FETCH/STORE confusion we were discussing yesterday. But I'm running into places where there are exceptions I can resume and ones I can't. I'd like to try to include only examples that can run start-to-completion, not with trailing lines that can never run. I don't intend to put this 'resumable' business into the docs example, but having it would
facilitate discovering what I can include in examples so they will run start-to-finish.
Perl6Noob jaush: yeah, it's a known glitch that new DLL is needed. 16:35
jaush Perl6Noob: for 2017.04? 16:36
TreyHarris s/never run/never run, unless the very failure to run to completion is being illustrated/
Perl6Noob jaush: yeah
jaush Perl6Noob: if known, then why was the installer released without the appropriate .dll? 16:37
TreyHarris Let me gist an example so you'll see.
Perl6Noob jaush: hehe, I meant it's known the release is busted. The bug wasn't identified in the pre-release testing, presumably because the test enviornment had Strawberry Perl already installed
jaush: the fix is coming up ( per irclog.perlgeek.de/perl6-dev/2017-...i_14527813 ). I don't see a tag in rakudo star, so presumably this hasn't been done yet. 16:38
stmuk foo 16:40
jaush Perl6Noob: well i'm not exactly chuffed - the first iteration of the 2017.04 .msi had a hardcoded path to the packager's homedir, then was removed from the website, and now the revision is still published, despite it being known that it has an error 16:41
Perl6Noob jaush: yeah, we should pitchfork the release manager :P
jaush: but the entire 2017.04 release cycle has been a nightmare with many issues and we're currently reviewing and improving our procedures 16:42
jaush: there's a post for it: perl6.party/post/The-Failure-Point-of-a-Release
jaush Perl6Noob: give us the option of a single statically-linked binary ;) 16:43
Perl6Noob Would be neat.
TreyHarris gist.github.com/a7001bf7f52cf64a6a...e35a23a047 16:44
timotimo jaush: we didn't realize we added a dependency
we definitely didn't intend to add a dependency 16:45
Perl6Noob jnthn: there's a single 6.c-errata indirect test that'd block removal of .resumable. Should it be amended? github.com/perl6/roast/blob/master...isc.t#L795
stmuk I've a report R* doesn't build on Arm too :)
but looking at windows now
timotimo stmuk: crap, is that telemeh, too?
jnthn Perl6Noob: I think it can be, eys
*yes
Perl6Noob Cool. 16:46
stmuk timotimo: maybe or a dodgy gcc (which has been a problem in the past)
stmuk at least I have an excuse to use my PI3 in a C64 case now :) 16:46
TreyHarris Is the argument that .resumable cannot be made to work, therefore it should be removed? Or that .resumable is a bad idea and should be removed? If the latter, how do I solve the problem in my gist above?
Perl6Noob TreyHarris: from what I understand, the argument is most exceptions can't be resumed anyway, so it'll be removed in about 5 minutes... 16:47
TreyHarris Then shouldn't .resume be removed as well?
stmuk how do I do ldd on windows?
jnthn TreyHarris: The only exceptions that should be resumed are types of exception that are documented as being sensible to resume, and only thrown in cases where it's sensible to resume them. 16:48
Perl6Noob TreyHarris: I think you can .resume warnings
jnthn No, if you toss .resume then warnings will be fatal :P
CX::Warn is one such exception, CX::Take is another
Perl6Noob m: warn "meow"; say "mew"; CONTROL { default { say "resuming"; .resume } }
camelia resuming
mew
TreyHarris Why isn't .resumable useful, then? 16:49
jnthn Well, the problem is what is it going to mean?
There's a difference between "can this exception theoretically be resumed" (which we can know) or "can this exception be sensible resumed" (which, in general, we can't, but people could override it in their one Exception subclasses I guess) 16:50
*their own
TreyHarris That doesn't seem like an argument; you can override anything, and many possible overrides can be overridden in ways that require other overrides to have behavior that's liskov-consistent. (See many operator overrides.) 16:52
TreyHarris Document that if you override in a way that changes resumability you need to override the return of .resumable too 16:53
Perl6Noob TreyHarris: to play the devil's advocate: .resumable isn't part of Perl 6 language, doesn't work, and isn't even documented, so it's strange for you to argue against its removal :P 16:55
Where did you hear about it anyway? 16:56
jnthn To be clear, I'm not arguing against there being a resumable method *at all*, I'm saying there's no reason to keep the current one that only ever just dies rather than does something useful
And pointing out that the semantics of such a method are open to discussion
My feeling at the moment is that it should probably mean "is this exception intended to be resumed", and we make .resume actually first test .resumable 16:57
mst and if one can implement resumable in perl5 - see Worlogog::Incident - without VM help
maybe it's better trialed that way
jnthn Then we implement method resumable() { True } in CX::Warn, CX::Take, etc.
TreyHarris Perl6Noob: I got that weird associative error when I tried to '.can('resume')', initially thinking that's how to check for resumability', and because I couldn't get the name of the exception being thrown because control was out of my hands, I searched the rakudo source, and thus found resumable 16:58
jnthn mst: In Perl 6 it's a pretty soft feature in so far as exception handlers run in the dynamic context of the exception, so effectively it's just a return.
Perl6Noob m: try { die X::TypeCheck::Binding::Parameter.new(); CATCH { say "inside"; if (.can('resume') ) { .resume } }}; say "outside";
camelia inside
outside
Perl6Noob TreyHarris: can you repro it? Because the associate exception is due to .resumable not .can('resume'), as far as I can see ATM 16:59
jnthn mst: The problem is that I keep seeing people try to resume arbitrary exceptions.
mst jnthn: sure. just, in perl5 we did it in user space, so maybe try that for a bit *then* consider pushing it into VM space, was my thought
mst shrugs 16:59
jnthn mst: It already is in VM space :)
We're using it for CX::Warn
mst yes. but ... oh never mind
you know what I was pointing at
TreyHarris Perl6Noob: ah, no, you're right. oh, I see from scrollback what I did: I tried .can('resume') on both resumable and un-resumable exceptions, saw it was defined for both, searched the docs for "resumable", found it mentioned as something you could interrogate but no examples, so then went to rakudo source. 17:01
(I was actually searching for the word "resumable" in the exception string, but I still haven't figured out where that comes from; it's not in the rakudo source AFAICT.) 17:02
jnthn Maybe the presence of .resume on every exception type, but that throws, is smelly and we should have a Resumable roll. Then .can('resume') actually woulda done the right thing. :) 17:03
(or that may throw)
jnthn And then we can have Resumable (perhaps Exception::Resumable is better huffmanized) as the thing to test against 17:04
Meaning `when Exception::Resumable { }` would work
Maybe X::Resumable is more appropriate given we have X::Comp as the role done by all compiler exceptions. 17:05
TreyHarris I just acked my entire perl6 tree and can't find the pattern 'not resumable'. So it must be in a file ack considers cruft or it's hiding somewhere clever or 'not' and 'resumable' are not in a single string literal....
TreyHarris jnthn: I like that. But can you tell me where the text rakudo is printing ("This exception is not resumable") comes from? It's driving me a bit batty a.t.m. 17:06
jnthn TreyHarris: I suspect that's a MoarVM error
moritz TreyHarris: in MoarVM, src/core/exceptions.c
TreyHarris ohhh, I have moarvm sibling to my perl6 tree. *sigh*
sorry.
jnthn So, my provisional suggestion would be: introduce role X::Resumable that carries the resume() method. Constrain it so it can only be used on subclasses of Exception. Make CX::Warn, CX::Take and CX::Emit do the role. Spectest, see what the fallout is, if any. 17:07
TreyHarris jnthn++ very elegant. 17:08
in the meantime, I'll just use Test and use eval-lives-ok to figure out my docfixes for Proxy.
Perl6Noob Well great! I went to make a PR to remove Exception.resumable but some guy zoffixznet beat me to it!! 17:21
THIS IS THE WORST DAY EVER!
geekosaur well, that answered ny question fo whether I'd recognize zoffix without the usual clue >.> 17:39
Zoffix Perl6Noo, too slow lulz! 17:52
geekosaur: so what was the answer? 17:53
Zoffix What's the usual clue? 17:53
perl6.party hostname?
There ain't no party like a perl6.party \o/ /o/ |o| \o\ perl6.party/about 17:54
azawawi raschipi: ping 17:55
geekosaur yep 17:56
azawawi raschipi: Per special request, Camelia in ASCii Art via Terminal::Caca pasteboard.co/2iPW0JLsy.png :) 17:56
raschipi azawawi: Awesome. 18:02
azawawi raschipi: need to generalize the code a bit and then you can use any ppm file (maybe later other formats) 18:06
TreyHarris Where's camelia's source? Any chance it could stringify and output a trailing expression in sink context a la the REPL? 18:07
TreyHarris ah, it's perl6/evalbot 18:11
Zoffix TreyHarris: no, we want it the way it currently is, so it complains about in-sink-context 18:19
TreyHarris Zoffix: ahh, makes sense. 18:21
raiph SO question: "Is it safe, to share an array between threads?" My answer: stackoverflow.com/a/43790809/1077672 Comments, good or bad, or a better answer, are more than welcome... 19:27
raiph .tell hoelzro mebbe irclog.perlgeek.de/perl6-release/2017-04-26 19:32
yoleaux raiph: I'll pass your message to hoelzro.
hoelzro ahhhh thanks raiph 19:33
yoleaux 19:32Z <raiph> hoelzro: mebbe irclog.perlgeek.de/perl6-release/2017-04-26
hoelzro I thought my IRC client was acting up again! 19:34
raiph :) 19:35
stmuk pl6anet.org/drop/rakudo-star-2017.0...0(JIT).msi 19:58
anyone able to test that on windows? (moving aside any strawberry perl directory 19:59
gfldex stmuk: I will in a clean VM. 20:00
stmuk great 20:02
gfldex stmuk: works 20:03
stmuk Thank $diety 20:04
alphah No such method 'gist' for invocant of type 'NQPMu'. I get this error when trying to print hash property of an object. (The has is created from grammar match, there is token triggers that error, if that token did not match I don't get the error) 20:09
any hints can help me troubleshoot this issue? I can share the repo as well if needed. 20:10
lizmat NQPMu is a Mu value from NQP land. This most likely means that the hash key you're trying to inspect, does not exist 20:13
mscha stmuk: works for me too 20:14
alphah lizmat: makes sense, probably the grammar does not match so the hash was not created at all. 20:15
gfldex stmuk: does the win64 installer run `zef update`? 20:16
raschipi The error is LTA, though.
stmuk gfldex: I don't think it does .. it needs a lot more attention TBH 20:17
thanks testers 20:18
gfldex stmuk: to bad nobody likes windows :->
stmuk I haven't even paid for it :)
gfldex stmuk: Test::META seams to be outdated (or buffy). As a result any module depending on it fails to install. 20:21
raschipi Nos the New version (10 S), won't be able to run our programs. 20:23
Geth perl6.org: 9f939b8163 | (Steve Mynott)++ | source/downloads/index.html
doc current win64 version, mention possible ARM issues
20:25
gfldex stmuk: it's Test::META itself 20:25
stmuk Star doesn't ship with Test::META 20:28
gfldex given how many modules use it already it may make sense to add it 20:28
TreyHarris eco: Test::META 20:38
oh, I thought there was a bot for that 20:39
geekosaur buggable: eco Test::META 20:56
buggable geekosaur, Test::META 'Test a distributions META file': github.com/jonathanstowe/Test-META
TreyHarris I found it; I was confused b/c I thought you did 'zef install Test-META', not "zef install Test::META" 20:57
ingy how do I get a list of the files in a dir and then read them one at a time? 21:10
when dir is a string pathname
alphah hi, I found the bug on my code regarding this error I posted earlier: No such method 'gist' for invocant of type 'NQPMu'. and thought to let you know about it: 21:11
jnthn ingy: Something like `for dir($dir-name) -> $file { my $content = $.slurp; ... }` 21:11
alphah as I mentioned that I get the bug when specific token match, this token is the only one I have defined as proto token {*}, I chnaged it to normal type to match only one value,, the error disappeared 21:12
lizmat docs.perl6.org/routine/dir 21:12
TreyHarris ingy: ==jnthn except $file.slurp, or remove the '-> $file' and make it '.slurp' 21:15
jnthn oops, I meant $file.slurp 21:17
Sorry, tired :)
raiph thx everyone. awesome SO answers. :) 21:25
samcv alphah, can you show me the code that has the bug? 21:52
alphah samacv: sure, one second 21:54
alphah s/samacv/samcv/ 21:55
Zoffix ingy: dir($your-dir).grep(*.r) { .slurp } use .slurp: :bin if you want content in binary mode
ingy: .grep(*.f & *.r) 21:56
stupid junctions 22:01
alphah samcv: this is the repo, Development branch), last commit fixed the issue in my code. github.com/alphah77/galaxy/tree/development (I'll explain more below because I can't make a small program to show the bug, it will take a while I guess)
Zoffix ingy: third time's the charm, it's actually .grep({.r & .f}) to filter out just files and files you can read
alphah basically the error appears if I'm using .ast on a token defined with proto token {8}, ,,, if I changed the token to be "toek token-name { 'x86_64' } , it worked fine, 22:03
alphah samcv: I run the program as: "./bin/galaxy.p6 camelia-0.7-x86_64" to get the error... "./bin/galaxy.p6 camelia-0.7" will not show the error because "token core" will not match.... 22:04
samcv so this commit fixed the bug? 22:05
github.com/alphah77/galaxy/commit/...20ce4f04d8
alphah yes It fixed the bug, it's a workaround, but I'm still thinking that there is abug in token defined with "proto token { * } 22:07
samcv hmm none that i know of. so the proto token bug still exists in the most recent commit though? 22:08
i the NQPMu error the same one caused by proto?
alphah sorry for the confusion Engilish is not my first language), no it's fixed in last commit ,, but I used work around, instead of calling .ast I directly called .Str on the tokens. 22:09
and what I mean it's a bug,, because (in my code) .ast worked on all token except the one defined with proto token { * } 22:10
samcv hmm i don't have /etc/galaxy/laws so i can't run it
hm
alphah there bin/laws in the code.... can run as bin/galaxy.p6 laws bin/laws camelia-0.7-x86_64 22:11
samcv ah ok no method gist for invocant NQPMu 22:13
i see this
alphah yup. now if changed $<star-core> from proto token {*},, defintion to token <star-core { '-x86_64' }, the error will disappear 22:14
github.com/alphah77/galaxy/blob/94...ws.pm#L122 22:18
samcv yeah i'm looking 22:22
alphah Thanks
samcv alphah, well i got it to print out $u.physics 22:38
samcv alphah, this is one commit back gist.github.com/samcv/f9fccd25fff5...1bcf23efdb in development branch 22:39
samcv so star => core/tag/form are the ones that have the problem 22:39
alphah_ samcv: if i understand correctly, this means $<star-core> does not match and i need to review my grammar again? 22:50
samcv possibly
alphah_ Alright, thanks for your time. 22:53
samcv lemme 22:53
samcv alphah_, here's the code gist.github.com/5744ddcbb51cabd9e1...f6591a6d7b 22:59
use this and that should help you debug it easier since you can see exactly which parts are not matching 23:00
alphah_ Checking....
I will read about NQP more to get an idea... earlier i was using Grammar::Debugger to track regex, but after updated to latest when use Grammar::Debuger it crashes 23:04
samcv yeah 23:05
alphah_, that file works for you righ?
i just made a pull with the branch i'm working on
i reverted that NQPMu commit and it has the code i showed you in the gist
alphah_ Will try a few im not at near compiter at the moment 23:06
samcv ah ok
alphah_ Nice
samcv but yeah it seems those tokens are just not matching i think 23:20