»ö« 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.
gtodd psch: ... zzz wow I had this dream ... .o0( "Texas hyper doesn't parse correctly in topicalized quoteword associative index" ) 00:05
:-D
psch++ <<==<< hyper knowledgeable about computers ...
00:09 sufrostico left 00:10 cpage_ joined
gtodd psch: >>[=>]>> (.... "inner infix" ?) #rt127965 ... seems like a fish that has swallowed another fish 00:10
skink I honestly read that as inner infish 00:15
TimToady oops, I meant >>[=]>> 00:24
00:26 Jonis left 00:29 Jonis joined
masak pnu_: halp 00:31
pnu_: I have included HTTP::Server::Tiny in my "depends" in my META.info, but my heroku-deployed app still complains "Could not find HTTP::Server::Tiny in [lib paths]" 00:32
00:33 johndau joined
masak (decided to switch from Bailador to HTTP::Server::Tiny because the latter supports supplies-for-SSE, and the conversion wasn't that involved) 00:33
pnu_: when I pushed to heroku, I saw it install HTTP::Server::Tiny and everything. I have the terminal backlog to prove it: gist.github.com/masak/93e7ccc3bb81...558883ed4b 00:38
so why doesn't it work?
'night, #perl6 00:41
Herby_ o/ 00:42
00:42 leont_ left 00:52 wamba joined
skink Xliff, You around? 00:55
01:02 _28_ria left 01:05 PerlJam joined 01:13 molaf left 01:18 Xliff left 01:26 pierre_ joined, molaf joined 01:35 cpage_ left 01:38 Herby_ left 01:47 ilbot3 joined 01:48 skink left 01:50 geekosaur left 01:51 geekosaur joined, ifim`` left 02:01 jjido joined 02:05 pierre_ left, Xliff joined, jjido left 02:07 wamba left
Xliff skink, What's up? 02:18
dalek c: 53e9d61 | (Tom Browder)++ | doc/Language/unicode_texas.pod:
try to widen the 'Texas' column to avoid breaks between chars
02:21
c: 0cd44cb | (Tom Browder)++ | /:
merge
c: acdec90 | (Tom Browder)++ | doc/Language/unicode_texas.pod:
Merge pull request #458 from tbrowder/master

widen 'Texas' column
02:30 kaare_ joined 02:31 noganex joined 02:32 kid51 left, kid511 joined 02:33 noganex_ left 02:37 kid511 left, pierrot left 02:38 pierrot joined 03:02 jjido joined 03:10 pierrot left
MadcapJake how do you write a method for `obj.attr =`? 03:29
geekosaur hm, I think the value of attr has to be a Proxy with FETCH and STORE methods? 03:33
03:34 sue joined
MadcapJake geekosaur: thanks! 03:34
03:35 jjido left
geekosaur wait, there's an easier way. obj.attr is normally an autogenerated getter, the corresponding setter is... (looking) 03:36
PerlJam make your own "is rw" method 03:37
sortiz m: class Foo { has $.foo is rw }; my $obj = Foo.new; $obj.foo = 8; dd $obj;
camelia rakudo-moar b3d816: OUTPUT«Foo $obj = Foo.new(foo => 8)␤»
geekosaur right, just got that
same name but you declare it 'is rw' 03:38
MadcapJake yeah but I want to do something to what is assigned when it's assigned
geekosaur S12:Lvalue_methods
synopsebot6 Link: design.perl6.org/S12.html#Lvalue_methods
geekosaur exactly
the actual attribute variable is a $!name
the $.name is an accessor method
MadcapJake so how do you create that accessor mehtod? 03:39
geekosaur which is normally autogenerated. but you can provide your own method instead and if it's declared 'is rw' then it can receive a value and do something isntead of just assigmning it to the $!thing
just write a method with the same name as the attribute (sans sigil)
MadcapJake and it will work with equals sign?
geekosaur when actually building the class it will skip the autogenerate because you already declared a method with that name 03:40
and yes, with the equals sign is what the 'is rw' trait does
MadcapJake cool and you just do like return-rw ?
03:40 AlexDaniel joined
MadcapJake or is it an argument to the samename mehtod? 03:40
method* xD 03:41
PerlJam m: class C { has $.foo; method foo is rw { $!foo } }; my $x = C.new; $x.foo = 17; say $x.foo;
camelia rakudo-moar b3d816: OUTPUT«17␤»
AlexDaniel is tbrowder here?
yoleaux 21 Apr 2016 19:36Z <teatime> AlexDaniel: grr, missed you... remind me again, I don't want to forget ;)
MadcapJake PerlJam: but how do use the value inside the method?
AlexDaniel because I just woke up and found many weird commits to doc repo… 03:42
geekosaur sounds like you're returning the container to be assigned to, so it is using a Proxy behind the scenes
so maybe you need that proxy object after all if you need to do something else?
or you return a Proxy whose STORE method does the special thing
PerlJam yeah, something like that.
03:42 geekosaur left
AlexDaniel teatime: hey :) 03:43
03:43 geekosaur joined
MadcapJake class A { has $.raw; method raw= ($val) { c_func_set($val) }; method raw { c_func_get() }; } # like this 03:43
yeah I think Proxy will fit here quite well 03:45
dalek c: 4fcf8ef | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/unicode_texas.pod:
Revert "put ascii commas in correct place for lists > 2 elements"

This reverts commit e7fab01b8a88472f27d9c5e91e25e9cc598ba28b.
Not only it introduces extra commas which makes it harder to read, but it also breaks one of the examples.
This is what it was supposed to be:
  $ perl6 -e 'say ‚hello world’' # prints 'hello world'
And this is what this commit did:
  $ perl6 -e 'say ’hello world,' # syntax error
03:56
c: f2a9e0d | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/unicode_texas.pod:
Correct 𝑒 character
04:02
AlexDaniel good morning everyone o/ 04:04
04:04 Cabanossi left 04:08 Cabanossi joined, sue left
MadcapJake why does proxy's FETCH get called 7 times when I only access it once? 04:16
actually it's 4 for the first access 04:18
m: class N { method text { return Proxy.new: FETCH => method () { say 'fetch: ', ++$ }, STORE => method ($new) { say "$new: ", ++$ } } }; N.text; N.text = 'blah'; 04:31
camelia rakudo-moar b3d816: OUTPUT«fetch: 1␤fetch: 2␤fetch: 3␤fetch: 4␤fetch: 5␤blah: 1␤»
04:32 jjido joined
MadcapJake Looks like this is a known bug 😕 RT #126520 04:38
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=126520
04:50 cpage_ joined 04:51 khw left 05:00 sivoais left, sivoais joined
moritz MadcapJake: because the compiler needs to do some type checking etc. 05:04
I don't consider it a bug; there are no guarantuees on the number of fetches
05:06 jjido left
AlexDaniel m: say “hello \x[abcdef]” 05:16
camelia rakudo-moar b3d816: OUTPUT«Error encoding UTF-8 string: could not encode codepoint 11259375␤ in block <unit> at /tmp/9O54s2ngQo line 1␤␤»
05:17 grassass joined
AlexDaniel m: say “\x[DD05DCA0]” 05:17
camelia rakudo-moar b3d816: OUTPUT«===SORRY!===␤chr codepoint cannot be negative␤»
05:17 pierrot joined
AlexDaniel m: say chr 0xDD05DCA0 05:19
camelia rakudo-moar b3d816: OUTPUT«chr codepoint cannot be negative␤ in block <unit> at /tmp/yV8BTeCqjT line 1␤␤»
AlexDaniel m: say chr 59999999999999999 05:20
camelia rakudo-moar b3d816: OUTPUT«chr codepoint cannot be negative␤ in block <unit> at /tmp/iuvpBB52qE line 1␤␤»
AlexDaniel ah, okay, that's an old thing 05:21
05:22 xiaomiao left
teatime AlexDaniel: Ahoy. 05:23
AlexDaniel :)
05:25 sortiz left
teatime So, didn't you mention one day that U+0027 APOSTROPHE « ' » and not U+2019 RIGHT SINGLE QUOTATION MARK « ’ » is the correct character to use for the apostrophe in e.g. sentences like "I'm going to my mom's house.", 05:27
05:28 xiaomiao joined
teatime and I said something about Unicode's character names being wrong often enough that I don't consider them authoritative [for purposes of determining the character's appropriateness for some specific semantic use]? 05:28
It's funny, a couple of days ago, and completely by chance/accident, I happened to notice that one of the character browsers had a note on U+2019 indicating the opposite, 05:30
and it turns out, that's part of the Unicode standard, since 2.1: www.unicode.org/reports/tr8/tr8-3.h...s%20Errata 05:32
AlexDaniel teatime: huh… 05:34
teatime so yeah, I guess the answer to "well, what would be authoritative, then?" would probably have to be, "The entire Unicode standard, taken as a whole." The thing neither of us thought of in the original convo, is that the spec can say anything, even that a character named "RIGHT-FACING BLUE COW ICON" should generally appear red. ;) 05:35
05:35 CIAvash joined
AlexDaniel :/ 05:35
teatime heh, you seem sad. 05:36
AlexDaniel teatime: I don't know what to say now
why don't they just introduce another apostrophe character then
teatime I don't think they're allowed to rename characters, anymore, either. I beleive they did early on, but at some point promised to never do so in later versions. So it can't even be fixed :)
LOL would that help?
AlexDaniel “For historical reasons, U+0027 is a particularly overloaded character” … “so let's overload right single quotation mark!”
teatime heh. 05:37
05:37 xiaomiao left
AlexDaniel teatime: no, character names are not allowed to change 05:37
teatime I suppose I can see the way in which you feel another one would help,
05:37 kurahaupo_ joined
teatime but I think Unicode specifically tries to not encode semantics, so perhaps it would not really be proper to include separate right-single-quote and apostrophe characters 05:38
if those are understood to always appear identically.
AlexDaniel I don't agree that they should appear identically
teatime but, then again, maybe that's not really a fair assumption. 05:39
yeah.
I didn't state that they should, it was a conditional expression :)
05:39 xiaomiao joined
AlexDaniel teatime: but you're right, it makes me sad a little bit 05:39
teatime I can't remember any specific instances, but this is not the first run-in I've had with flat-wrong character names.
so, yeah, don't trust them :)
unicode is complicated and inconsistent, but overall I am impressed with the which it is not-broken considering the scope of the problem it attempts to solve. 05:40
05:40 kurahaupo left
teatime er, * "with the degree to which it is not-broken" 05:40
AlexDaniel teatime: thank you for your finding
.u ʼ 05:41
yoleaux U+02BC MODIFIER LETTER APOSTROPHE [Lm] (ʼ)
teatime also, heh, there's a proposal in to add superscript latin lower-case letter "q", so that we can finally have all 26 of them :) 05:42
AlexDaniel: that is different again, though.
AlexDaniel: read the 'Apostrophe' section of www.unicode.org/versions/Unicode6.2.0/ch06.pdf
05:42 kurahaupo_ left
teatime (which updates the other link) 05:42
(on page 15 of that 25-page PDF) 05:43
05:43 sillytime joined 05:45 dolmen joined
teatime AlexDaniel: A font can display an "embellished"/asymmetrical U+0027, and also have LEFT and RIGHT single-quotes, though, too... the drawback there would be not having the simple/typewriter-style ' character available, and text that uses ' as single-quotes would render weird. the rendering of ' could be a OpenType/whatever font option/configurable :) but that has its own drawbacks / places it doesn't help. 05:47
so I am pretty sure I agree with you that there should be another character added, giving you two viable options: Use U+2019 and U+____ to represent right-quote and apostrophe, or use U+0027 in both instances. 05:48
AlexDaniel yeah, that would be convenient
m: my $xʼ = 25; say $xʼ 05:49
camelia rakudo-moar b3d816: OUTPUT«25␤»
teatime eww, don't use it as a "prime" mark. 05:50
it doesn't even look like one :)
AlexDaniel m: my $ʼ = 25; say $ʼ
camelia rakudo-moar b3d816: OUTPUT«25␤»
teatime er.. actually
nm.
(on the actually. still true on the prime thing.)
AlexDaniel .u ʹ
yoleaux U+02B9 MODIFIER LETTER PRIME [Lm] (ʹ)
AlexDaniel m: say $xʹ = 42; say $xʹ
camelia rakudo-moar b3d816: OUTPUT«5===SORRY!5=== Error while compiling /tmp/o6gVy1lww5␤Variable '$xʹ' is not declared␤at /tmp/o6gVy1lww5:1␤------> 3say 7⏏5$xʹ = 42; say $xʹ␤»
teatime eww!
oh, you didn't say my. 05:51
*phew*
AlexDaniel m: my $xʹ = 42; say $xʹ
camelia rakudo-moar b3d816: OUTPUT«42␤»
AlexDaniel right :)
teatime heh, I see, you used U+2bc
U+2019 wouldn't work, I assume, being a string-introducer.
AlexDaniel sure 05:52
MadcapJake moritz: well a Proxy FETCH is definitely not the place for a nativecall function :P
moritz MadcapJake: if it's a pure function you're calling, why not? 05:53
MadcapJake yeah it's just locating some data and returning it
teatime AlexDaniel: also this guy's argument may entertain you, if (like me) you are odd enough to be amused by such things: tedclancy.wordpress.com/2015/06/03...ery-wrong/ 05:54
06:02 jjido joined
AlexDaniel m: dd “Don't stop the music”.words 06:04
camelia rakudo-moar b3d816: OUTPUT«("Don't", "stop", "the", "music").Seq␤»
AlexDaniel m: dd “Don’t stop the music”.words
camelia rakudo-moar b3d816: OUTPUT«("Don’t", "stop", "the", "music").Seq␤»
06:04 firstdayonthejob joined
MadcapJake HTML::MyHTML v0.3.0 released: a decent chunk of sugary wrapping has been added, check out readme & eg/ for details (eg/raw is nativecall interface) github.com/MadcapJake/p6-MyHTML 06:07
AlexDaniel teatime: so .words does not follow UAX #29 06:09
MadcapJake teatime: the guy loses me at the French thing, that's the EXACT same concept as the "do not" contraction. anglocentrism at its finest 06:10
teatime MadcapJake: eh, I tend to agree with you, but if we're right then it's just a mis-understanding on his part, no need to go calling names :) but I'm probably becoming oversensitive to these names, heh. 06:13
AlexDaniel teatime: yea, that guy makes a good point. Pf is Pf, “Common bloody sense” indeed.
“LOOK AT IT. RIGHT THERE, IT SAYS APOSTROPHE.” :D 06:14
MadcapJake well he totes out some words in French like he knows it! He seems to specifically know that those are contractions but perhaps not, it's definitely not clear if he is aware :P
teatime MadcapJake: are you sure you're not reading someone else's comment on this guy's post?
I think he replied to it, but I didn't think there was any discussion of French in the article proper.
too lazy to go look lol.
MadcapJake Parenthesiszed paragraph last of the second section
teatime omg now I have to. 06:15
MadcapJake first comment is interesting, apparently French has contractions with apostrophes and also weird non-contraction contractiony words :xD 06:17
teatime also, "L'Homme" is maybe a different kind of thing than anything we have in English... since, can't you automatically do that with any noun? 06:18
I can't think of any English contractions etc. where there's something like that you can tack onto arbitrary words.
MadcapJake true, only vowel (and h) words
moritz only with those that are proncouned with a vowel at the start 06:19
TEttinger y'see?
teatime ok.
TEttinger y'know?
MadcapJake g'night! ;)
TEttinger not arbitrary but could work for vowels?
err, verbs
teatime TEttinger: I can't really do "y'should" for "you should"
TEttinger y'could
teatime I'm not buying this lol.
TEttinger hehe 06:20
it's closer than anything else I can think of, but yeah not arbitrary
teatime the closest thing I can think of is 's to indicate plurality for stuff that doesn't do so irregularly... and that's not the same kind of thing /at all/ 06:21
MadcapJake y'all is highly used in Southern US
teatime lol not plurality
possesion
having said that, "Box's" should not be two words, right?
MadcapJake have you ever seen a "they'd've"? :) 06:22
TEttinger y'all'd've
MadcapJake TEttinger: lol
en.wikipedia.org/wiki/Wikipedia:Li...ntractions
TEttinger I love the weird parts of languages
teatime so yeah... while it seems like we need a ’ that won't break words, at the same time, ' is supposed to break words, so those not behaving consistently would be weird more often I think
MadcapJake: Yeah, I type that kind of stuff a lot in IRC.
MadcapJake lol => somebody'dn't've 06:23
AlexDaniel amn’t – oh noes…
MadcapJake lol! => 'sup
teatime MadcapJake: I have no idea what that last one means.
TEttinger they’lln’t’ve
MadcapJake somebody'dn't've == "somebody would not have" (according to wikipedia)
they'lln't've == "they will not have" 06:24
teatime but the funny part about things like "wouldn't've", is people say these things out-loud all the time, but if they ever happen to try to think how to type it, it's like, wtf, how do you type that, and if you manage to come up with "wouldn't've", it looks so wrong.
but you say it all the time.
TEttinger woah, y’all’ll’ven’t
MadcapJake TEttinger: yeah just saw that one! lol
teatime TEttinger: I don't know what that would mean either, but "y'all'll" seems fine. 06:25
TEttinger you all will have not
AlexDaniel But the funniest ones are probably ’tis and ’twas
MadcapJake teatime: I agree! we usually just end up spelling it out because it looks way more informal on paper than it did when we said it :P
teatime TEttinger: like, I could figure that much out, but I could never imagine anyone saying that.
TEttinger yes, agreed
teatime AlexDaniel: how come funny?
TEttinger but there may be regions where that may be common. Mitch Hedberg had a standup bit about this 06:26
teatime I think Wikipedia might be full of crap on this topic.
MadcapJake o'clock has totally taken over "of the clock" that sounds ridiculous to me :)
teatime TEttinger: I live in a "y'all" place.
TEttinger Here in the South, you say y'all. you drop the 'ou'. So I tried doing that, I went to a diner and I ordered some s'p. Like, I'm in the s'th and I want some s'p! 06:27
teatime should add [citation needed]'s
06:27 astj joined
MadcapJake teatime: the whole page is marked "needs cleanup" :D 06:27
teatime TEttinger: yes, I've head it.
TEttinger h'rd
just do what arabic and hebrew do, if it ain't word o' god, it don't need no vowels 06:28
teatime an actually interesting thing, is the distinction between "y'all" and "all y'all"
TEttinger yes.
MadcapJake lol let's just skip words and move onto a unicode-based heiroglyhic system ;)
TEttinger emoji!
teatime TEttinger: heh, amusing... the jews kindof do the opposite
MadcapJake hieroglyphic* 06:29
teatime you're not supposed to write down God's name, so they dropped the vowels and made it YHWH... and now no one is sure what the vowels actually were.
TEttinger I know the Tetragrammaton is called that because it's the 4 consonants in hebrew, approx. YHWH, with no vowels
heh
and in hebrew school they always wrote g-d before you learned hebrew
teatime lol. 06:30
If there is a god, there's no way he cares about something that trivial (imo).
TEttinger I think I spent my first and last session in hebrew school protesting the concept of an omnipotent omniscient benevolent being that according to the blackboard we must fear
which is sorta at odds with the benevolence
teatime heh. 06:31
TEttinger it would have been nice to know hebrew though
06:31 nige1 joined 06:32 rurban joined, jjido left, jjido joined
TEttinger I'm marginally proficient in Spanish at least. and my knowledge of French is primarily from speaking to a few French speakers who tell me, repeatedly, that learning from a medieval-themed JRPG is not a practical way to pick up knowledge of modern French :) 06:33
teatime lol
06:33 remmie2 left
TEttinger French is HARD 06:33
teatime I can probably manage "where is the bathroom" and "take me to the Arch du Triumphe" (which I no doubt mis-spelled.) 06:34
06:34 remmie joined
TEttinger there's all the relatively consistent language rules, but a lot of them are overlapping when you start to pronounce them 06:34
there's the classic example of 4 separate words pronounced identically
teatime I bet English is harder :)
TEttinger spelled differently, different silent letters
French does have a lot of colloquial rules though that are more involved than common english colloquialism 06:35
like from what I understand you can elide more than just Le to L', there's other sounds too
and not necessarily formally specified ones 06:36
teatime heh, I'm kindof surprised that it's not a thing for Americans to feel superior because English is hard and they don't have a problem with it. 06:37
TEttinger also there's confusingly many more languages than French spoken within the bounds of continental europe France, not even considering territories. my brother visited Po, which I may be misspelling, but they have one of a few living whistled languages there
06:37 RabidGravy joined
TEttinger English is only hard because it's designed by committee 06:37
teatime I guess either because people are terrible at English, or because it's hard to feel proud of English's difficulty since that really is just a demonstration of English's inferiority to some other languages :) 06:38
you mean, not designed at all.
06:38 jack_rabbit left
TEttinger same difference :) 06:38
teatime French is designed by committee, I think...
TEttinger not the same scale of committee :) English pulls together danish/german/other roots, French and Latin formal terms, we borrow and generally mangle any words for new things encountered... there are lots of good examples of this in America 06:40
teatime or at least, it's designed, and by committees. but I guess 'designed by committee' is more a comment about the quality of a design, and doesn't necessarily apply to everything that was literally designed by a committee.
TEttinger where someone didn't know the name for a place, asked a random native american who may not even have been from there what it was called, and the name sticks even if it means "how should I know?" 06:41
teatime TEttinger: what I meant is that there is such a thing as objectively correct French.
TEttinger oh yes
true
teatime l'Academie Francaise or whatever
I'm terrible. 06:42
Académie française
TEttinger then again, the earliest German word for avocado was mangled badly and hilariously. 06:43
Durch eine volksetymologische Umbenennung wurde daraus in älterem Spanisch Avocado („Advokat“, heute abogado)
they trace it back to Avocado, which is a mixed up Spanish version of Nahuatl word aguacate, getting mistaken for Abogado, spanish for lawyer 06:44
teatime I saw a pretty funny flowchart about "how to name animals in German" 06:45
TEttinger ah, english has it right 06:46
Because the word avogato sounded like "advocate", several languages reinterpreted it to have that meaning. French uses avocat, which also means lawyer, and "advocate"-forms of the word appear in several Germanic languages, such as the (now obsolete) German Advogato-Birne, the old Danish advokat-pære (today it is called "avocado") and the Dutch advocaatpeer.[16]
teatime www.babbel.com/en/magazine/funny-a...-in-german
teatime lols @ avocado and lawyer being the same word.
TEttinger I remember googling ye olde internet for info on zwergameisenbar, since the english results were zilch for silky anteater 06:47
teatime I also noticed one time that the section of some teapot instructions titled "How to use your teapot", had a one-word title in the German translation 06:48
TEttinger that's wonderful, teatime 06:49
teatime If English was like that, I could totally make up shit like Teapotusageinstructions
I also love how turkey in German is "threatening chicken" 06:50
if you've ever been around turkeys and chickens, you know how accurate that is
(chickens are docile, turkeys are aggressive and will fuck you up.)
moritz teatime: huh?
turkey is Truthahn
and I don't think Trut has anything to do with threatening, does it? 06:51
teatime hrm, perhaps the internet lied to me.
moritz en.wiktionary.org/wiki/Truthahn
teatime yeah it's apparently not at all a definite fact.
moritz "The first element probably imitative of the turkey's cry to its young, but Kluge and some others alternatively suggest Middle Low German drōten ‎(“threaten”) in reference to the turkey's threatening cry" 06:52
seems there is support for both sides :-)
teatime but I am sad, that was a funny one, but I never looked at the actual word.
06:52 astj left
TEttinger www.youtube.com/watch?v=Hx4UN_OdOTs I do like these lil' creatures 06:52
teatime and since you pointed it out it's not funny now.
I still have washbear, though.
TEttinger the word for this is something like soft ant bear
teatime lol I've caught myself calling them washbears in English w/o realizing what I was doing, and people are like wtf is a washbear 06:53
TEttinger oh, little ant bear
I call em trash pandas
teatime this is also slightly amusing i.stack.imgur.com/TnUP4.jpg 06:54
TEttinger that is an odd one 06:55
teatime have you ever seen the thing where you give a raccoon sugar cubes or cotton candy 06:56
it's really mean but also kindof hilarious
(they're called washbears in lot of languages because they have an instinct/compulsion to wash their food before eating it.) 06:59
TEttinger oh yes 07:00
teatime heh, in French they're wash-rats... that's more accurate. 07:01
TEttinger I think there's probably a bunch of reasons why they wash their hands or food. if you imagine having a huge whiskery mustache like them, it might be hard to effectively drink water quickly. think of how slowly cats drink water, close relatives
dunking food in water gets you water easily
also they eat lots of animals that live in rivers, crayfish etc 07:02
one of my relatives had a pet raccoon that they later trained to be wild
they showed it how to fish and break eggs
teatime heh there's interesting physics or something in the way cats drink water... I read an article about it once w/ some high-speed video of the lapping in action.
TEttinger: I wasn't making a statement on whether it was a good or bad habit... only that there's some humor value in it if you give them dissolvable food. 07:03
TEttinger but they could tell after many years that little gamine had come back to visit because she broke an egg like a person, cracked on a hard surface, instead of the normal raccoon way, biting a hole in the top and slurping like a soda can
oh yes, it is hilarious how they get so confused 07:04
teatime ... and, if the bit about "y'all" didn't make you think I was deep in redneck-land, this will: one of my relatives had a pet bobcat. and they trained it to use the toilet.
TEttinger nice.
teatime bobcats are *not* a breed of domestic cat.
TEttinger I scared off a bobcat that was facing off against my neighbor's housecat
I have seen them, they're bigger than my dog
and way stronger it looked
I had an advantage though: I was inside with a million-candle-power spotlight 07:05
teatime yeah I don't think I would want to tangle w/ one... at all...
TEttinger the bobcat saw the heavens light up, thought "aliens again? not today, grays!" and bailed
teatime they're not exactly panthers but I still don't think it'd be a fun time. 07:06
TEttinger simon, our neighbor's cat, has miraculously survived being an outdoor cat in an area with multiple raccoons living one house away, coyotes roaming the neighborhood, and the occasional bobcat 07:07
he's also annoying as hell, taunted our dogs for years when we had a chasey dog
chasssenhund 07:08
07:10 jjido left 07:11 aries_liuxueyang left 07:13 wamba joined, aries_liuxueyang joined 07:19 jjido joined 07:30 domidumont joined 07:34 domidumont left 07:35 domidumont joined
RabidGravy quick survey, if you put a synopsis in your module's POD what pod markupdo you use? For example I tend to do: 07:41
=head1 SYNOPSIS\n\n=begin code\n.....\n=end code\n 07:42
07:43 cognominal left 07:49 leont_ joined
tadzik I literally always look at how some other module does it and do it exactly the same way :D 07:50
07:50 nige1 left
RabidGravy :) 07:50
It's just I have an idea for a module that tests that what's in the synopsis at least compiles 07:55
and of course it will need to find the synopsis :)
08:02 leont_ left 08:07 johndau left, ocbtec joined
ufobat oh cool idea! 08:12
i'd like to have the same for "whatever is in the examples directory" if there is any 08:13
08:15 rindolf joined, darutoko joined 08:16 dolmen left 08:18 pierre_ joined
RabidGravy that's entirely doable 08:25
08:32 _mg_ joined
RabidGravy harr! 08:34
anyway off out to the seaside, see y'all later
08:39 lizmat joined 08:41 kerframil left
tadzik nine: Actually, I do have a question. How do I reliably check if a Dist is installed already? I'm using github.com/tadzik/Module-Toolkit/b...kit.pm#L24 now, the first part feels right but doesn't detect ufo for some reason, so I also have the second part as a fallback, which is the code that decides whether to die with "XXX already installed", but then it doesn't trigger for File::Find in some 08:45
cases. The combination works, but doesn't really feel right
08:47 vendethiel joined
masak good antenoon, #perl6 09:00
tadzik masak! \o/ 09:04
09:06 CIAvash left 09:07 leont_ joined
lizmat masak tadzik o/ 09:13
moritz masak tadzik lizmat \o/ 09:22
lizmat moritz o/
09:22 dolmen joined
tadzik moritz lizmat! \o/ 09:22
vendethiel \o/ hi y'all 09:23
tadzik vendethiel! \o/ 09:32
timotimo oh hey ven 09:34
09:39 lizmat left, TEttinger left, leont_ left 09:40 lizmat joined, leont_ joined, rindolf left 09:41 _mg_ left 09:44 pierre_ left 09:46 pierre_ joined 09:47 wamba left 09:50 jjido left 09:51 jjido joined 09:54 CIAvash joined 09:55 leont_ left, jjido left 09:59 pierre_ left
tadzik "Internal error: zeroed target thread ID in work pass" --does that sound familiar? 10:06
to make it better, it doesn't happen every time :)
10:08 leont_ joined 10:11 firstdayonthejob left 10:14 sb_0091 joined
sb_0091 What's the best book to learn about Perl 6 ? 10:14
10:18 jjido joined
lizmat perl6intro.com no up-to-date books yet :-( 10:19
also available en Francais and auf Deutsch 10:20
tadzik perl6.org/documentation/ is the best place to start looking :)
masak moritz tadzik lizmat vendethiel timotimo \o/
vendethiel o/
10:21 leont_ left
sb_0091 hmmm.. tx 10:21
Is it worth learning perl 5 or directly go to perl 6. 10:22
I sort of started learning perl 5 sometime ago.
Should I leave that ... and start with perl 6 directly ?
tadzik perl5 is not a required learning for learning perl 6 10:23
if you want to learn perl6, learn perl6 :)
sb_0091 ok :)
tadzik but knowing perl 5 is a value in itself, I'd say
rudi_s sb_0091: IMHO depends on your use scenario. If you want to use perl as system administrator, then also learn perl 5. Otherwise what tadzik said.
tadzik it's still a very good language, and in many cases I'd either pick it over perl 6 or use it from within perl 6 10:24
sb_0091 ah ..tx all... so perl 5 is still going to be valuable in the future... from what i understand ...
rudi_s I think so, yes.
masak oh yes
tadzik perl 5 has a habit of being incapable of dying, yes :)
masak and why should it 10:25
Perl 5 and Perl 6 are, in a sense, both competing to supersede Perl 5.
(but it's friendly competition, like between teams who value the results more than the win) 10:26
pnu_: a little closer to the core of the problem. I can `heroku run bash` and write a one-liner to `use DBIish` and it works. the same with `use HTTP::Server::Tiny` doesn't 10:27
pnu_: is this related to what gets installed as part of Rakudo Star?
I feel I have a dearth of tools with which I can investigate further 10:28
pnu_ masak: yes.. i can reproduce the issue. I think it's related to absolute paths (of perl6 module repos) vs. the dynamic runtime path during heroku build. I'm just checking if I can fix the issue. 10:29
10:29 jjido left
masak pnu_++ 10:30
this is a blocker for me at the moment, so I appreciate it
10:33 leont_ joined
masak (yes, I'm abandoning Bailador for the moment, because transitioning to HTTP::Server::Tiny came with close to no cost, and the latter can do SSE using `supply`, which is wicked cool and which is the #1 user requirement) 10:35
well, server push is; not SSE using `supply` :)
lizmat .tell marcusramberg looks like 48cc6b5 fixes your problem (RT #127968) 10:37
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127968
yoleaux lizmat: I'll pass your message to marcusramberg.
10:39 dolmen left, sb_0091 left
masak pnu_: the strange thing is that I see it being installed during heroku push. (and HTTP::Parser, IO::Blob, HTTP::Tinyish which it depends on) 10:40
I can't see where it's installing them, though
10:42 pierre_ joined
pnu_ Yes; it's installing to /app/... paths (the repo paths set at compile time) instead of $BUILDDIR/... paths. Every build is happening in a dynamic directory somewhere under /tmp. Asking panda to use specific path was a bit tricky, at least earlier. 10:44
timotimo 35.74user 2.96system 1:17.09elapsed 50%CPU (0avgtext+0avgdata 238364maxresident)k
tadzik the more MAIN I use the more convinced I am that I just want a good, ol' getopt :(
timotimo ^- when i run the sleep sort code that was reported yesterday
AlexDaniel Am I the only one who is annoyed by copy-pastes from IRC in bug reports? 10:46
timotimo i do that often, copy-pasting from irc to bug reports
i usually remove timestamps, though, to make the lines shorter
and remove lines in the middle that have nothing to do with the bug
tadzik you are the first to mention it, I think, so: possibly :)
tomboy64 AlexDaniel: +1 10:47
AlexDaniel I do understand that it is much easier to just copy some discussion, but damn it is hard to read
masak AlexDaniel: not annoyed by it, but (unless my heavy editing helps) probably the chief contributor to your woes 10:48
AlexDaniel masak: surprisingly I don't read your bug reports very often
masak AlexDaniel: here's an example from yesterday: rt.perl.org/Ticket/Display.html?id=127945
bartolin actually, I like masak's bug reports with (edited) irc logs. seems to be a good trade off to me. 10:49
masak yes, that's what I've always felt too
which is why I'm interested to hear a possibly opposing view 10:50
lizmat will remove timestamps in the future 10:52
bartolin masak: btw, do you use a editor macro/sed command/whatever for your editing that you would share?
lizmat I already remove lines that are not part of the discussion at hand
masak bartolin: nope, but I could certainly write one for my process if there's interest
masak .oO( "I don't talk about my process" -- Felicia Day ) 10:54
AlexDaniel it is just very hard to comprehend. I have no idea why. Maybe if there were proper visual aids (colors?) it'd be more pleasant to my eyes. What about attaching a link to irclog.perlgeek.de/ so that at least people can take a look at colored version?
bartolin well, maybe I should just write one for myself :-)
10:55 dolmen joined
masak AlexDaniel: the idea though with including the text is to make the issue self-contained. I usually inline pastes and gists too for that reason. 10:55
AlexDaniel masak: I understand, I meant a link in addition to the copy-pasted thing
masak AlexDaniel: I always figured if people want the IRC logs, they can easily search for user/keyword, and it would be less net work than the net work of me including the URL every time
AlexDaniel :/ 10:56
masak I see my job as grabbing everything from the IRC logs so that conferring them shouldn't be necessary
AlexDaniel dunno, maybe it's just me then
masak if you want a color-coder, maybe whip one up in JavaScript 10:57
deploy it as a bookmarklet on the RT page
lizmat I propose we put in a link to the start of a conversation *and* remove timestamps and unwanted lines in the bug report 10:58
bartolin hmm, adding a link just above the inlined conversation would do no harm, IMHO. I'll try to write a small helper script for that
tadzik FROGGS: ping 11:09
FROGGS: I want to talk about Panda::Bundler in some near future :)
I like the capitalization of github.com/tadzik/panda/blob/maste...da.pm#L114 :D 11:12
"You don't seem to have a SHELL. A *SHELL* Harold, what are you doing with your life!?"
11:13 rindolf joined 11:17 CIAvash left 11:20 mr-foobar left 11:26 k-man joined, telex left 11:28 telex joined
dogbert2 o/ #perl6 11:31
lizmat dogbert2 o/ 11:32
dogbert2 trying to cook up some documentation for the 'unpolar' method, please take a look at gist.github.com/dogbert17/dcb38d42...bf622d01e1 and break it to pieces :-) 11:33
moritz tadzik: www.flickr.com/photos/jj_perl/2598...398548526/ you look quite angry with the world (or just the code) here :-)
dogbert2 lizmat: hello
moritz dogbert2: s/method from/method form/
dalek c: 6747a6b | (Tom Browder)++ | doc/Language/unicode_texas.pod:
one more try at widening 'Texas' column
c: b6dec19 | (Tom Browder)++ | doc/Language/unicode_texas.pod:
one more try at widening 'Texas' column
c: c665d77 | (Tom Browder)++ | doc/Language/unicode_texas.pod:
oops, ascii 'e' got munged, added it back
c: ef2e369 | (Tom Browder)++ | doc/Language/unicode_texas.pod:
use correct command to begin a table
c: 334c406 | (Tom Browder)++ | doc/Language/unicode_texas.pod:
Merge pull request #459 from tbrowder/master

another attempt to widen 'Texas' column
dogbert2 moritz: thx
moritz dogbert2: also, you should mention which argument is the magnitude and which one is the angle 11:34
dogbert2 moritz: will fix
moritz: gist has been updated 11:38
11:40 kid51 joined 11:43 jjido joined 11:44 CIAvash joined, lizmat left 11:45 lizmat joined, astj joined 11:46 pierre_ left
timotimo dogbert2: it's ironic that "unpolar" was too unpopular so far to be documented :P 11:48
tadzik moritz: I love that picture though :) 11:49
dogbert2 timotimo: :)
timotimo tadzik is such a good-looking fella
dogbert2 Let's hope that htmlify.p6 works today instead of crashing with a double free memory corruption 11:51
timotimo ugh
moritz dogbert2: do you think it would help to upgrade the build to a newer rakudo? 11:52
tadzik I also had "funny" errors today 11:53
dalek c: f099e1e | (Siavash Askari Nasr)++ | doc/Language/testing.pod:
Fix typo
tadzik and not reproducible :(
dogbert2 I'm trying to use the 'latest' once a day a do .rakudobrew build moar. To be fair it has only crashed once the other day
it looked like: *** Error in `/home/dogbert/.rakudobrew/​moar-nom/install/bin/moar': double free or corruption (!prev): 0x14a53f88 ***
timotimo sadly the number there doesn't help us since it's not reproducible 11:55
dogbert2 maybe I should try a valgrind, it'll take forever though 11:56
dalek c: f77f223 | (Tom Browder)++ | doc/Language/unicode_texas.pod:
attempt to use Perl 6 pod for unicode and non-breaking words
c: ee05ce5 | (Tom Browder)++ | doc/Language/unicode_texas.pod:
Merge pull request #460 from tbrowder/master

use Perl 6 pod codes for unicode and non-breaking words
timotimo yes, valgrind will take forever 11:57
but the output will be highly helpful
would you like to use "rakuodbrew triple nom master master" for it? that'll give you a newer nqp and a newer moar. not sure how much newer, though
after the weekend, jnthn will be putting in a lot more (partially concurrency-related) GC bugfixes 11:58
so if the process will take on the order of days, we could postpone that
or maybe those fixes will shuffle things around sufficiently to merely hide your crash 11:59
dogbert2 I'll do another build moar so I have the same version as Camelia, then I'll watch some tv while valgrind does its job
Something else seems to be going on atm, I now get: ===SORRY!=== Error while compiling /home/dogbert/repos/doc/doc/Language/unicode_texas.pod 12:01
timotimo does it say what's going wrong there?
dogbert2 Expected "=end pod" to terminate "=begin pod"; found "=end table" instead.
timotimo ah 12:02
dogbert2 guess someone else is fixing docs at the same time
timotimo right, the widening of the table has just been merged
12:02 travis-ci joined
travis-ci Doc build failed. Siavash Askari Nasr 'Fix typo' 12:02
travis-ci.org/perl6/doc/builds/125210310 github.com/perl6/doc/compare/334c4...99e1ee2446
12:02 travis-ci left
timotimo that's the dalek messages we just got a few minutes ago 12:03
dogbert2 yeah, better wait until the problems are fixed I guess
then I'll add the unpolar stuff followed by valgrind 12:05
AlexDaniel crazy stuff happening in docs repo again!
12:06 travis-ci joined
travis-ci Doc build failed. Tom Browder 'Merge pull request #460 from tbrowder/master 12:06
travis-ci.org/perl6/doc/builds/125210799 github.com/perl6/doc/compare/f099e...05ce51e1a7
12:06 travis-ci left
AlexDaniel travis agrees 12:07
timotimo yup
12:10 lizmat_ joined 12:12 lizmat left
CIAvash this seems to be the problem: github.com/perl6/doc/pull/459/files 12:16
"begin table" was changed to table but "end table"" wasn't removed 12:17
12:17 lizmat_ is now known as lizmat
timotimo aha! 12:18
well, that'd be easy to fix
AlexDaniel
.oO( yeah just revert it )
oops, I mean, what would be the right ending tag?
CIAvash design.perl6.org/S26.html#Tables 12:19
AlexDaniel ah, nothing. Cool!
CIAvash apparantly it doesn't need one
12:26 jjido left
CIAvash Should I remove "=end table" and push a new commit? 12:26
AlexDaniel CIAvash: sure. Perhaps also try building it 12:27
12:28 dolmen left
timotimo it should be enough to "perl6 --doc lib/foo/bar.pod" to figure out if it works 12:29
i mean doc/Language/Texas_blah.pod
pnu_ masak: now the buildpack should work as expected; just push again. BTW, I noticed HTTP::Server::Tiny binds by default to 127.0.0.1, so you'd want to specify host 0.0.0.0 for binding to any interface. 12:30
dalek c: c0bfcb2 | (Siavash Askari Nasr)++ | doc/Language/unicode_texas.pod:
Remove `=end table`
12:34 wamba joined 12:41 rindolf left
ufobat is there a perl6 PSGI Specification? i know that there is a PSGI module.. 12:42
dalek c: 2111887 | (Jan-Olof Hendig)++ | doc/Type/Cool.pod:
Added documentation for unpolar
12:45
12:47 travis-ci joined
travis-ci Doc build passed. Siavash Askari Nasr 'Remove `=end table`' 12:47
travis-ci.org/perl6/doc/builds/125214316 github.com/perl6/doc/compare/ee05c...bfcb226a73
12:47 travis-ci left 12:48 jjido joined
CIAvash doc.perl6.org/language/unicode_texas 12:55
12:56 smls joined
CIAvash some tags are being literally printed 12:56
E<0x1d452>, S<!(elem)>, I<(empty set)>
smls Does $promise.then(&code) schedule the code on the thread-pool like Promise.start ?
AlexDaniel CIAvash: I also have no idea why 𝑒 was changed to something else, given that π and τ are written as is 12:57
CIAvash yeah
ufobat i've found it! github.com/zostay/P6SGI 12:59
13:02 travis-ci joined
travis-ci Doc build passed. Jan-Olof Hendig 'Added documentation for unpolar' 13:02
travis-ci.org/perl6/doc/builds/125216076 github.com/perl6/doc/compare/c0bfc...11887018df
13:02 travis-ci left 13:04 wamba left 13:07 smls left
ufobat masak, do you miss bailador for your SSE thing? cause i think is might be quite easy to run bailador on HTTP::Server::Tiny, so you can work with channels or supplys in your body 13:16
13:37 dolmen joined, kurahaupo joined, kurahaupo left 13:39 X-Scale joined
ufobat zostay++ 13:42
tadzik I'm slightly amused that we have HTTP::Tinyish but not HTTP::Tiny :P
ufobat tadzik, is there a reason that bailador is tied to closly to HTTP::Server::Simple?
s/to/so/
tadzik ufobat: none, really
just that when I wrote it there was nothing else 13:43
so I didn't bother to make it switchable :P
15 files changed, 344 insertions(+), 1043 deletions(-)
aww yiss (:} 13:44
ufobat i am thinking of a method to-psgi-app, so it could run on different servers
tadzik, okay :) thanks
tadzik github.com/tadzik/panda/tree/mtk contains a massive rework of panda, testing is quite welcome, though I won't recommend actually installing it (it will overwrite existing panda that many things rely on)
ufobat: that sounds quite sensible, yes
13:46 domidumont left, Yary joined
Yary Hello. Starting on the "perl6fix" tutorial series, playing with .^ methods, and wondering about... 13:47
rakudo: say (Complex.^methods.sort: *gist leg *gist)[^6]
camelia rakudo-moar 5a1416: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Two terms in a row␤at /tmp/tmpfile:1␤------> 3say (Complex.^methods.sort: *7⏏5gist leg *gist)[^6]␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ …»
Yary that wasn't the question... one sec.... 13:48
rakudo: say (Complex.^methods.sort: *.gist cmp *.gist)[^6]
camelia rakudo-moar 5a1416: OUTPUT«(ACCEPTS Bool Complex DUMP Int Num)␤»
Yary Hmm in my Rakudo the first two methods are <anon><anon> 13:49
and I was wondering what those anonymous methods were, and how/why one would make public anonymous methods in the first place. But maybe it was a bug that's now fixed.
13:50 domidumont joined
moritz Yary: they typically come from some kind of bootstrapping 13:53
13:55 domidumont left 14:01 hankache joined 14:10 smls joined
smls I'm experiencing a weird problem with sprintf in combination with multi-threading. 14:11
m: say sprintf q[ %1$s %2$s ], 42, 50 14:12
camelia rakudo-moar 5a1416: OUTPUT« 42 50 ␤»
smls I use an sprintf format that specifies all parameters using explicit positional indices like ^^
And it works fine in a single thread, but when I do it deep inside a multi-threaded program, it sometimes(not most of the time!) fails with "Your printf-style directives specify 0 arguments, but 2 arguments were supplied". 14:13
Is it possible that Rakudo's &sprintf is not properly threadsafe? 14:14
14:15 tharkun left
smls m: await do for ^100 { start { sprintf q[%1$s %2$s], 5, 42 } } 14:16
camelia rakudo-moar 5a1416: OUTPUT«Memory allocation failed; could not allocate 15168 bytes␤»
14:16 tharkun joined
smls ^^ golfed code that demonstartes the problem (when run locally) 14:16
14:18 cdg joined
smls m: for (^100).race(batch=>1) { sprintf q[%1$s %2$s], 5, 42 }' 14:18
camelia rakudo-moar 5a1416: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ouR_dcQ8hM␤Strange text after block (missing semicolon or comma?)␤at /tmp/ouR_dcQ8hM:1␤------> 3atch=>1) { sprintf q[%1$s %2$s], 5, 42 }7⏏5'␤»
smls m: for (^100).race(batch=>1) { sprintf q[%1$s %2$s], 5, 42 } 14:19
camelia rakudo-moar 5a1416: OUTPUT«Your printf-style directives specify 0 arguments, but 2 arguments were supplied␤ in any at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line 1␤ in any panic at /home/camelia/rakudo-m-inst-2/share/nqp/lib/NQPHLL.moarvm line 1…»
smls ^^ Camelia-friendly version
14:21 rindolf joined
MadcapJake mornin' Sixians! 14:23
MadcapJake hears the crickets 14:25
smls waves
Yary hi hi hi hi hi hi 14:26
hankache Hello #perl6
MadcapJake crickets fade into a cacophony of Sixianity!
Saturday morning breakfast is the best 14:28
MadcapJake is making scrambled eggs and fried potatoes :)
14:32 wamba joined
moritz 's stomach wouldn't be up to fried potatoes right now 14:35
14:38 khw joined
jnthn has an AirFryer, which approximates frying certain kinds of stuff pretty well 14:39
14:41 Util joined
jnthn smls: That looks like some kind of bug, yes...RT it if you didn't already 14:41
14:42 leont_ left
smls jnthn: rting it now. 14:42
14:42 Yary left
moritz jnthn: interesting, I didn't know air fryers were a thing 14:42
jnthn did breadcrumbed black pudding in his last week :) 14:43
14:49 mr-foobar joined 14:50 leont joined, hankache left
Xliff I thought "Air fryer" was just another word for "convection oven" 14:50
'morning, #perl6
AlexDaniel smls: it would be interesting to see this without .race 14:51
smls AlexDaniel: Same thing happens with await .. start 14:52
It's just that Camelia doesn't seem to like too many threads being scheduled at once :P
AlexDaniel m: await (start { sprintf q[%1$s %2$s], 5, 42 } for ^100) 14:53
camelia rakudo-moar 5a1416: OUTPUT«Could not spawn thread: errorcode -11␤»
AlexDaniel m: await (start { sprintf q[%1$s %2$s], 5, 42 } for ^15)
camelia rakudo-moar 5a1416: OUTPUT«Memory allocation failed; could not allocate 15168 bytes␤»
AlexDaniel but yeah, that ↑ “works” locally 14:54
how many threads it can handle?
m: await (start { sprintf q[%1$s %2$s], 5, 42 } for ^8)
camelia rakudo-moar 5a1416: OUTPUT«Your printf-style directives specify 0 arguments, but 2 arguments were supplied␤ in block <unit> at /tmp/aO39eyg0lo line 1␤␤»
AlexDaniel there we go
smls: what a weird looking thing! I love it 14:56
14:57 leont left, p6_nb joined 14:58 kurahaupo joined, p6_nb left 15:01 rindolf left 15:02 wamba left
tadzik hah, I managed to make use of MAIN and still have getopt semantics to some extent: gist.github.com/tadzik/66923e10847...e0b68a5c33 :P 15:02
it feels like sacrificing good perl6 practices, but doesn't make me any less satisfied
15:05 rindolf joined
MadcapJake Xliff: I think the difference is that an air fryer has a fan 15:09
15:09 Actualeyes joined
dalek osystem: 27eed0e | tadzik++ | META.list:
Add Getopt::Type
15:11
masak pnu_: cool! thanks -- will try now 15:14
pnu_: works now! thank you again :D 15:19
15:25 leont joined 15:29 firstdayonthejob joined 15:37 _mg_ joined 15:44 firstdayonthejob left 15:46 firstdayonthejob joined, jjido left 15:49 Emeric joined
moritz tadzik++ # README.md that's both valid markdown and Perl 6 15:53
though not too hard if you constrain yourself to headlines and Perl 6 code :-)
tadzik yeah :) 15:54
15:54 jjido joined
MadcapJake moritz, tadzik where is this "mark6" you speak of? ;) 15:55
tadzik github.com/tadzik/Getopt-Type/blob.../README.md :)
bartolin my attempt for a script to inline irc discussions in bug reports: github.com/usev6/dump-irc-logs/blo...ircdump.p6 16:01
comments, PR, etc. welcome :-) if it seems useful it could go somewhere in the perl6 repo as well 16:02
^^ masak
16:06 wamba joined 16:17 sjoshi joined
nine_ tadzik: is there any reason your is-installed restricts itself to the site and home repos? Also it does not even succeed in that because .resolve forwards the request to the rest of the chain just like .need does 16:30
tadzik nine_: no, restricting it was not the intention 16:32
nine_ tadzik: just use $*REPO.resolve then
tadzik ah, much better :) thanks 16:33
I'll see if that fixes the ufo problem
nine_ Also to answer your original question: we really need a .is-installed($dist-id) or .is-installed($dist) more than a .resolve. I just realized that only after I added .resolve and tried to use it for an is-installed check in panda. 16:34
tadzik I surely wouldn't mind it
nine_ But before adding to the API, github.com/rakudo/rakudo/pull/729 really needs some well deserved serious attention. Please have a look at it :) 16:35
tadzik has a look at it 16:37
nine_ ugexe++ has put a lot of thought into design aspects that I more or less skipped in order to get working code out there sooner. 16:38
16:43 hankache joined 16:46 grondilu left, _mg_ left, nige1 joined 16:47 grondilu joined 16:51 Emeric left 16:58 hankache left 16:59 astj left
MadcapJake what would you say is the best/most-representative replacement for a Pythonic generator? 17:01
s/you/y'all/ :)
arnsholt gather/take
tadzik ye
timotimo yeah, only gather/take or something with threads will give you the "coroutine" semantics where the code in the generator will stop until the next value is asked for 17:02
MadcapJake gather/take doesn't really fit with the iterator-style though, don't ya think?
llfourn eh doesn't anything with a lazy Seq work like that? 17:05
17:05 jjido left
timotimo ah, yes 17:06
MadcapJake sure a lazy seq would work for some cases but Pythonic generators are typically functions, you can't really do a lazy Seq as a function can you?
timotimo but you don't get to write your code linearly with the option of it being interrupted somewhere in the middle
MadcapJake right
maybe gather/take does fit the best (in the sense that typically generators in python are used in a `for ... in ... :` construct) 17:08
but I wonder if there's some way to represent the `next` python generator pattern
timotimo next?
i'm not aware of that 17:09
MadcapJake timotimo: you can use `next` to "unpause" a generator until the next value
timotimo so, like shifting a value off?
llfourn m: .say for (0,1,*+* ... *)[^5] # there's also this
camelia rakudo-moar 6d21e8: OUTPUT«0␤1␤1␤2␤3␤»
MadcapJake llfourn: right but I'm thinking of larger generator patterns that are functional rather than array-oriented 17:10
llfourn MadcapJake: I see 17:11
timotimo if you want things to be a bit more like a generator that'll give one value after the other, i recommend you just keep shifting off the beginning
MadcapJake timotimo: can you elaborate?
timotimo well, every time you shift, you get the next value, basically
MadcapJake heh 17:12
I'm thinking that maybe a state variable could be a decent representation
Another option is the Iterable role 17:13
or rather Iterator? not really clear on how to utilize these
ah yes Iterator has a pull-one method that is basically Python's `next` 17:14
17:16 salv0 joined 17:17 shadowpaste left, shadowpaste joined
MadcapJake Supplier.emit/Supply.tap could be made to fit too. 17:20
llfourn MadcapJake: isn't that a different idea?
ie event callbacks are not generators 17:21
jnthn Supplies are the categorical dual of iterators
You *can* implement the Iterator interface in Perl 6 17:22
But the first resort is gather/take
mst jnthn: oh, hey, I was discussing something faintly mental with lizmat in the bar last night
MadcapJake the only quibble with gather/take (don't get me wrong, it's one of my favorites) is that you can't do a "next" pattern with it 17:23
mst can I somehow get an on_read_ready type event rather than just the read results that the current fh supply produces?
timotimo MadcapJake: i still don't get what you mean by that, tbh
llfourn MadcapJake: what do you mean?
MadcapJake jnthn: what do you mean by "categorical dual"
mst wants to be able to do a callback into perl5 code that expects to do the sysread() itself
jnthn mst: heh, I was going to say "but should it actually read the data into a buffer for you to read later", to which the answer I guess is "no" :) 17:24
mst right :)
mst said 'faintly mental' advisedly
llfourn MadcapJake: isn't .shift just the same as next
MadcapJake llfourn: oh that's what was meant by shift earlier! didn't realize this was a thing :P 17:25
jnthn mst: I'm pretty sure the answer is "no" because we're building atop of libuv's async reading APIs and so far as I remember those just stream you the data as it's available, rather than separating the two out.
MadcapJake i thought shift was wrt arrays
llfourn MadcapJake: no I just realised you can't shift a seq
hmmm
MadcapJake oh ok
jnthn mst: There may be some way to cheat there
But that's the first...uh...blocker...I can think of :)
MadcapJake so yeah next is like "take this generator and execute the code until the next yield, then store the frame and move back to the scope where next was called"
jnthn MadcapJake: That's how iterating a Seq produced by a gather/take works. 17:26
17:26 rurban left
llfourn m: my $a = (^5).map: { $_ + 1}; say $a.iterator.pull-one # as you said you can do this but there must be a better way 17:26
camelia rakudo-moar 6d21e8: OUTPUT«1␤»
mst jnthn: I think I might need a poll handle rather than a stream handle
MadcapJake jnthn: but is there a way to make gather/take "functional" so-to-speak?
jnthn m: my @a := gather { say 'here'; take 1; say 'and here'; take 2; }; for @a { .say; say 'in loop'; } 17:27
camelia rakudo-moar 6d21e8: OUTPUT«here␤and here␤Type check failed in binding; expected Positional but got Seq ((1, 2).Seq)␤ in block <unit> at /tmp/lHx41_i5RJ line 1␤␤»
mst jnthn: ... or cheat with a scalar filehandle on the perl5 side
jnthn oops
m: my \a := gather { say 'here'; take 1; say 'and here'; take 2; }; for @a { .say; say 'in loop'; }
camelia rakudo-moar 6d21e8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rzhWC5kkhC␤Variable '@a' is not declared␤at /tmp/rzhWC5kkhC:1␤------> 3 take 1; say 'and here'; take 2; }; for 7⏏5@a { .say; say 'in loop'; }␤»
jnthn m: my \a := gather { say 'here'; take 1; say 'and here'; take 2; }; for a { .say; say 'in loop'; }
camelia rakudo-moar 6d21e8: OUTPUT«here␤1␤in loop␤and here␤2␤in loop␤»
timotimo MadcapJake: oh, you didn't realize i meant the shift method; okay!
that explains your confusion as well as mine
arnsholt MadcapJake: My understanding of "categorical dual" (which is admittedly quite limited) is basically that two things are dual if you take the one and turn it inside out, you get the second one
jnthn MadcapJake: What do you mean by "functional" in this case?
mst jnthn: but then I'd end up accumulating all the data in ram and oh gods hmm
arnsholt Like push parsing vs. pull parsing 17:28
mst oh, of course, I can use a tied handle
... dear gods this is going to be hilarious
jnthn m: my \a := gather { say 'here'; take 1; say 'and here'; take 2; }; my $i = a.iterator; say $i.pull-one; say $i.pull-one; 17:29
camelia rakudo-moar 6d21e8: OUTPUT«here␤1␤and here␤2␤»
jnthn That's the "lower level" way to consume it
MadcapJake jnthn: I mean something like `sub foo is generator { ... ; take 1; ... ; take 2; }; next(&foo); #={1} foo.next; #={2}`
mst jnthn: am I right that what you're saying is "what you get is always a stream handle" ?
jnthn Categorical dual: weird math for "if you swap the input type with the return type everywhere, what do you get?" 17:30
MadcapJake jnthn: oh that's neat didn't know you could do that!
llfourn MadcapJake: in your mind, can foo have arguments?
llfourn starting to get confused about the concept of generators
ufobat is there a way that a child class "provides" a value for a required attribute of a parent class? example: class P { has $.p is required}; class C is P {submethod BUILD{$.p = "set" }}; C.new'
MadcapJake llfourn: pythonic generators can 17:31
jnthn mst: Pretty much.
llfourn MadcapJake: interesting..
17:32 jjido joined
mst jnthn: what happens if I want to slow the sender down? pause the supply? 17:32
MadcapJake llfourn: a state variable would probably be the path-of-least-resistance to doing a pythonic generator as you would just mutate the state variable and return what you need to return
llfourn MadcapJake: yeah I can see what you mean
jnthn mst: We haven't incorporated a back-pressure model yet, so yeah, you'd need to establish your own back-channel 17:33
mst: There is a .throttle method to help with that.
mst: Eventually I want to steal with Rx back-preasure bits, but they were still in flux back when I stole most of the other ideas there for supplies :)
mst heh, fair enough 17:34
jnthn So I figured I'd wait for others to figure out how not to do it ;)
(I think they're happy with it now. I should check.)
arnsholt llfourn: The gather itself doesn't take arguments. But you can provide something that does with "sub foo($arg) { gather { ... } }". That make more sense?
MadcapJake arnsholt: would that really work though? each time you call the function it would be a different gather/take construct 17:35
maybe if you store the gather in a state variable :)
llfourn right it wouldn't be a single iterator?
arnsholt MadcapJake: Yeah, the foo wouldn't be a coroutine of course 17:36
It's return value would be what you're interested in
MadcapJake arnsholt: ah yeah that's fine but not really pythonic :P
llfourn in any case we have plenty of ways of defining lazy seqs... but lazy seqs where each iteration takes arguments is kinda odd to me 17:37
not even sure I want it :P
arnsholt Well, this isn't Python either =)
17:37 dolmen left
arnsholt (And TBH, I think gather/take is better than Python's generators) 17:37
MadcapJake arnsholt: yeah! thank god! but I just brought up the topic in terms of what would be the best representation of a pythonic generator 17:38
llfourn ES6 has them now too: developer.mozilla.org/en-US/docs/W...tors/yield
MadcapJake yep function* 17:39
llfourn I've used them in the context of promises where they are useful -- but for that we have await
timotimo FWIW, there's take-rw
MadcapJake the javascript "co" package is very popular
timotimo so you can give your consumer a container that they then can modify
llfourn m: (gather for ^5 { take-rw $_ }).map({ $_ += 1 }).perl.say 17:40
camelia rakudo-moar 6d21e8: OUTPUT«Cannot assign to an immutable value␤ in block <unit> at /tmp/nAOXscAql8 line 1␤␤»
llfourn m: (gather for ^5 -> $_ is copy { take-rw $_ }).map({ $_ += 1 }).perl.say 17:41
camelia rakudo-moar 6d21e8: OUTPUT«Cannot assign to an immutable value␤ in block <unit> at /tmp/gd9YlMCEu4 line 1␤␤»
MadcapJake the parentheses makes it a seq, iiuc
timotimo m: gather for ^5 -> { take-rw my $temp = $_ }).map({ $_ += 1 }).perl.say 17:42
camelia rakudo-moar 6d21e8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Oapotdztid␤Unexpected closing bracket␤at /tmp/Oapotdztid:1␤------> 3ther for ^5 -> { take-rw my $temp = $_ }7⏏5).map({ $_ += 1 }).perl.say␤»
timotimo m: (gather for ^5 -> { take-rw my $temp = $_ }).map({ $_ += 1 }).perl.say 17:43
camelia rakudo-moar 6d21e8: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤ in code at /tmp/cZWlZnhPYQ line 1␤ in block <unit> at /tmp/cZWlZnhPYQ line 1␤␤»
timotimo m: (gather for ^5 -> $_ { take-rw my $temp = $_ }).map({ $_ += 1 }).perl.say
camelia rakudo-moar 6d21e8: OUTPUT«Cannot assign to an immutable value␤ in block <unit> at /tmp/vXKCZluHBz line 1␤␤»
timotimo m: (gather for ^5 -> $_ { take-rw my $temp = $_ }).map(-> $_ is rw{ $_ += 1 }).perl.say
camelia rakudo-moar 6d21e8: OUTPUT«5===SORRY!5===␤Trait 'is rw' needs whitespace before block␤at /tmp/BFSpN_Djwo:1␤------> 3$temp = $_ }).map(-> $_ is rw{ $_ += 1 }7⏏5).perl.say␤Missing block (apparently claimed by 'is rw')␤at /tmp/BFSpN_Djwo:1␤------> 3$temp = $_ }).…»
timotimo m: (gather for ^5 -> $_ { take-rw my $temp = $_ }).map(-> $_ is rw { $_ += 1 }).perl.say
camelia rakudo-moar 6d21e8: OUTPUT«Parameter '$_' expected a writable container, but got Int value␤ in block <unit> at /tmp/WkoG0R4BnC line 1␤␤»
timotimo that one was missing
m: (gather for ^5 -> $_ { take-rw my $temp = $_ }).map(-> $_ is raw { $_ += 1 }).perl.say
camelia rakudo-moar 6d21e8: OUTPUT«Cannot assign to an immutable value␤ in block <unit> at /tmp/4pm6fBiroA line 1␤␤»
timotimo huh.
something about that isn't right, eh?
llfourn it seems to me that lazy iterators are so much a part of p6 you don't need magic syntax to have a function that returns them. 17:44
MadcapJake m: my \a = gather for ^5 -> $_ { take-rw my $temp = $_ }; a.map(-> $_ is rw { $_ += 1 }).perl.say
camelia rakudo-moar 6d21e8: OUTPUT«Parameter '$_' expected a writable container, but got Int value␤ in block <unit> at /tmp/YCxOEJ75Z2 line 1␤␤»
MadcapJake m: my \a = gather for ^5 -> $_ { take-rw $_ }; a.map(* += 1).perl.say 17:45
camelia rakudo-moar 6d21e8: OUTPUT«Cannot assign to a readonly variable or a value␤ in block <unit> at /tmp/ZzWqbBy1Fx line 1␤␤»
timotimo m: my \a = gather for ^5 -> $_ { my $temp = $_; take-rw $temp }; a.map(-> $a is raw { $a += 1 }).perl.say
camelia rakudo-moar 6d21e8: OUTPUT«Cannot assign to an immutable value␤ in block <unit> at /tmp/WfzwOJLgyX line 1␤␤»
timotimo m: my \a = gather for ^5 -> $_ { my $temp = $_; take-rw $temp }; a.map(sub test($a is raw) { $a += 1 }).perl.say
camelia rakudo-moar 6d21e8: OUTPUT«Cannot assign to an immutable value␤ in sub test at /tmp/ZCafH0dWwv line 1␤ in block <unit> at /tmp/ZCafH0dWwv line 1␤␤»
timotimo m: my \a = gather for ^5 -> $_ { my $temp = $_; take-rw $temp }; a.map(sub test($a is raw) { say $a.VAR.perl; $a += 1 }).perl.say 17:46
camelia rakudo-moar 6d21e8: OUTPUT«0␤Cannot assign to an immutable value␤ in sub test at /tmp/d2UCwOWo5i line 1␤ in block <unit> at /tmp/d2UCwOWo5i line 1␤␤»
timotimo m: my \a = gather for ^5 -> $_ { my $temp = $_; take-rw $temp }; a.map(sub test($a is raw) { say $a.VAR.name; $a += 1 }).perl.say
camelia rakudo-moar 6d21e8: OUTPUT«Method 'name' not found for invocant of class 'Int'␤ in sub test at /tmp/FPSNlaRqeQ line 1␤ in block <unit> at /tmp/FPSNlaRqeQ line 1␤␤»
timotimo seems like map deconts somewhere along the way?
llfourn seems so
is there any tests for take-rw 17:47
timotimo m: my \a = gather for ^5 -> $_ { my $temp = $_; take-rw $temp }; my \thing := a.shift; thing += 1; say thing;
camelia rakudo-moar 6d21e8: OUTPUT«Method 'shift' not found for invocant of class 'Seq'␤ in block <unit> at /tmp/WXM5JGYT4t line 1␤␤»
tadzik nine: re is-installed, any idea if I have any better alternative for github.com/tadzik/Module-Toolkit/b...kit.pm#L34 inspecting each repo I can think of?
timotimo m: my \a = gather for ^5 -> $_ { my $temp = $_; take-rw $temp }; my \thing := a.pull-one(); thing += 1; say thing;
camelia rakudo-moar 6d21e8: OUTPUT«Method 'pull-one' not found for invocant of class 'Seq'␤ in block <unit> at /tmp/LoQdY4WY40 line 1␤␤»
timotimo ah, pull-one is a method on the iterator inside the Seq 17:48
17:49 lizmat left
tadzik nine: looking at RepositoryRegistry I don't see anything like "get me all of them" 17:49
timotimo m: my \a = gather for ^5 -> $_ { my $temp = $_; take-rw $temp; say "gave in $_, but got back $temp" }; my \thing := a.lazy.list(); thing.shift() += 1; say thing.shift();
camelia rakudo-moar 6d21e8: OUTPUT«Cannot call 'shift' on an immutable 'List'␤ in block <unit> at /tmp/YWlcKLqfze line 1␤␤»
17:50 lizmat joined
llfourn m: $*REPO.repo-chain.perl.say 17:50
camelia rakudo-moar 6d21e8: OUTPUT«(CompUnit::Repository::Installation.new("/home/camelia/.perl6"), CompUnit::Repository::Installation.new("/home/camelia/rakudo-m-inst-2/share/perl6/site"), CompUnit::Repository::Installation.new("/home/camelia/rakudo-m-inst-2/share/perl6/vendor"), CompUnit:…»
timotimo so no, not "shift"
MadcapJake is a gather/take lazy?
timotimo aye
tadzik ah!
llfourn MadcapJake: yes, so is map usually. And you can even assign them to variables which I don't think you can do in python?
17:51 lizmat left
timotimo m: my \a = gather for ^5 -> $_ { my $temp = $_; take-rw $temp; say "gave in $_, but got back $temp" }; my \thing := a.lazy.list; thing[0] += 1; say thing[1]; 17:51
camelia rakudo-moar 6d21e8: OUTPUT«gave in 0, but got back 1␤1␤»
timotimo m: my \a = gather for ^5 -> $_ { my $temp = $_; take-rw $temp; say "gave in $_, but got back $temp" }; my \thing := a.lazy.list; thing[0] += 1; thing[1] += 5; thing[2] += 9000; say thing[3]
camelia rakudo-moar 6d21e8: OUTPUT«gave in 0, but got back 1␤gave in 1, but got back 6␤gave in 2, but got back 9002␤3␤»
17:52 lizmat joined
timotimo MadcapJake: ^ 17:52
17:52 leont left
llfourn (actually you can so nvm that) 17:52
17:52 rurban joined
timotimo "so is map", no, so is the opposite of not! :P 17:52
17:52 rurban left 17:53 leont joined
llfourn timotimo: wait so it's not? 17:53
or is this a .so joke
lizmat I think it's so so
MadcapJake xD
llfourn :S
MadcapJake in movable type what is the difference between tags and keywords? (writing up a post on this and I've never used movable type) 17:54
oi, tags, keywords, categories oh my!
17:55 skink joined
timotimo it's a so-so joke, yes 17:57
llfourn ah so 18:00
18:02 rurban joined
mst ponders telling a UDP joke but worries that people might not get it 18:03
MadcapJake lol 18:04
nine_ tadzik: that's really something for a new API. You must not make assumptions about the on disk layout of repositories. They can and will change. 18:06
El_Che mst: people may also silently ignore it :) 18:07
tadzik nine: well, I should not make assumptions but I also prefer a temporary solution to a todo item :) 18:09
I ended up grepping repo-chain for ::Installation
as for the latter part, well, I'm ready to chase CUR when it changes
18:09 cpage_ left
tadzik but I want something that works now 18:09
El_Che qa pics by jj_perl: www.flickr.com/photos/jj_perl/sets...7398548526 18:16
18:18 leont left, leont joined, grondilu left
dalek osystem: 44b081c | tadzik++ | META.list:
Add App::redpanda
18:23
ufobat m: class P { has $.p is required}; class C is P {method new(*%attr) {%attr<p> = 1; self.bless: %attr}}; say C.new.perl;
camelia rakudo-moar 6d21e8: OUTPUT«The attribute '$!p' is required, but you did not provide a value for it.␤ in method new at /tmp/BXHy6IKtp9 line 1␤ in block <unit> at /tmp/BXHy6IKtp9 line 1␤␤»
timotimo so, uh, what exactly is redpanda good for again?
tadzik installing stuff
ufobat m: perl6 -e 'class P { has $.p is required}; class C is P {method new(*%attr) { self.bless: p=> 1, %attr}}; say C.new.perl;
camelia rakudo-moar 6d21e8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ifMGw28LzS␤Two terms in a row␤at /tmp/ifMGw28LzS:1␤------> 3perl6 -e7⏏5 'class P { has $.p is required}; class ␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ …»
18:23 leont left
MadcapJake tadzik: why choose redpanda over panda? 18:23
ufobat m: class P { has $.p is required}; class C is P {method new(*%attr) { self.bless: p=> 1, %attr}}; say C.new.perl; 18:24
camelia rakudo-moar 6d21e8: OUTPUT«C.new(p => 1)␤»
timotimo ufobat: that won't work without flattening for %attr
ufobat why isnt my 1st not working?
18:24 leont joined
timotimo you're now giving %attr as a positional argument to bless 18:24
ufobat Ah!
tadzik MadcapJake: similar reasons why you'd chose cpanminus over cpan. Plus you get to stresstest TAP::Harness and a few other dogfoods we have
timotimo in the first one, too, ufobat
ufobat yeah the 2nd works, but is still wrong ;-) 18:25
thank you!!
got it!
timotimo good :)
raydiak good morning, #perl6 18:26
timotimo "morning"? ;)
nine_ tadzik: .resolve does not find ufo because ufo does have an empty 'provides'. .files would find it when you look for 'bin/ufo'
timotimo how are you doing, raydiak? long time no see
raydiak still 11:30 here :)
timotimo have you been keeping pray-in-perl6 updated to run on newer and newer rakudos, per chance? 18:27
raydiak hiya timo. I'm hanging in there. been through some moving and stuff, don't have internet access much right now. how are you?
I wish...started looking at Pray again last night, hope to have it cleaned up for an interview on tuesday 18:28
tadzik nine: right. I keep thinking that scripts have a space in the META somewhere along with everything else
they're the odd one out that get somehow, magically chosen to be worthy of installing too
timotimo i'm all right; not getting much productive output these days, unfortunately
nine_ tadzik: I think ugexe's pull request is making progress in that regard, isn't it? 18:29
18:29 leont left
raydiak timotimo: and my website, and my resume, and and and...though what I really wanna get back to is math::symbolic...and I ought to make sure inline::lua works too 18:29
timotimo: so what kind of unproductive output have you been up to then? :)
timotimo well, i'm trying to help make moarvm better 18:30
18:30 nige1 left
timotimo and i've been adding tiny amounts of stuff to SDL2 bindings 18:30
18:30 leont joined
raydiak ah, nice 18:31
timotimo i've written a very simple particle system in perl6 and i'm trying to get stuff into moar (and the rest of the things) so that it gets faster
tadzik nine: it assumes they'll be kept in "files", along with what is now in "resources", aiui
timotimo it's really horrendously slow when written in pure perl6, but with the appropriate amount of nqp:: ops everywhere, it gets drastically faster
raydiak timotimo: oh, exciting...particle systems are fun to play with. may I see? 18:32
timotimo sure
ugexe resources are still stored in the resources meta6 key until mangled. `files` contains a list of Str (the name-path is the actual unmangled path) or a Pair (original-name-path -> mangled-name-path) 18:34
timotimo github.com/timo/SDL2_raw-p6/tree/v...cle_system - this is the branch that has the extra files messily spread into the main directory 18:35
18:35 dolmen joined 18:36 sjoshi left
raydiak timotimo: wow, it...actually runs pretty well here 18:41
Xliff timotimo, How do you read this: "my @timings = (@times[* div 50], @times[* div 4], @times[* div 2], @times[* * 3 div 4], @times[* - * div 100]);
"
I am sooo not up on * and how it behaves in different contexts.
* div x: List of all indexes in the array that are integer divisible by x? 18:42
But "* - * div 100" ??? O_o
MadcapJake * in array subscript is $_.elems, iirc
skink * is usually some variant of $_ yeah 18:43
Xliff So "$_.elems - $_.elems div 100"
MadcapJake Xliff: that last one doesn't fit my perception though :P
Xliff Exactly!
m: @a = (^100); for @a.kv -> $i, $v { @a[$i] = $i }; say @a[* - * div 50]; 18:45
camelia rakudo-moar 6d21e8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CFWCT85hrO␤Variable '@a' is not declared␤at /tmp/CFWCT85hrO:1␤------> 3<BOL>7⏏5@a = (^100); for @a.kv -> $i, $v { @a[$i␤»
Xliff m: my @a = (^100); for @a.kv -> $i, $v { @a[$i] = $i }; say @a[* - * div 50];
camelia rakudo-moar 6d21e8: OUTPUT«98␤»
Xliff So I guess $_.elems is right
Nifty! 18:46
MadcapJake m: sub infix:<sayall> { $^a.say; $^b.say }; my @a = $++ xx 10; @a[* sayall *] 18:47
camelia rakudo-moar 6d21e8: OUTPUT«10␤10␤»
skink Now that's some idiomatic code right there... 18:48
MadcapJake hehe, it's highly 6y 18:50
18:50 zakharyas joined 18:51 leont left
skink Xliff, Cross-compiling Windows libs and testing with appveyor has proven... vexing 18:52
Are you busy?
18:54 lizmat left 18:55 X-Scale left 18:56 dolmen left
leedo_ i'm building rakudo on ubuntu on windows with gcc :) (with the new windows linux subsystem) 18:57
skink That's cheating :D 18:58
leedo_ aw close! it can't load moar.so for some reason "cannot enable excutable stack as shared object requries" 19:02
19:02 hankache joined
ugexe someone else had problems installing to windows linux subsystem last week i believe 19:05
geekosaur the executable stack thing is known, I believe 19:06
(and occurs on actual Linux depending on various system settings / distribution defaults) 19:07
leedo_ yeah I was just looking into SELinux stuff that might be related 19:10
skink This Makefile generates $lib.{a,dll,dll.a} 19:12
Xliff skink, not really. What's up?
skink Do I _just_ need to DLL?
the*
Xliff Well...kinda busy. Kinda not. :/
geekosaur ubuntu doesn't normally use selinux, it uses apparmor
Xliff skink: FWIW, anything labelled .dll.a is an oxymoron and should be ignored. It is either .a, or .dll. 19:13
geekosaur not on windows
skink Xliff, This generates all three
Xliff The only reason I can think of for a .dll.a is if your library is shared, but its dependencies are compiled in statically.
geekosaur linking is more efficient if you have an "import library" which is a static library representing the dll entry points
I would expect that to be the .dll.a 19:14
Xliff geekosaur, but would the .dll.a be considered a shared lib?
skink This is for NativeCall
Xliff, github.com/P-H-C/phc-winner-argon2...160406.zip
geekosaur Xliff, itself it is static but it causes calls into the DLL to be compiled in
and its use, while not mandatory, lets the linker do a more optimal job of managing the calls into the DLL 19:15
(and as a result calls into the DLL are faster at runtime, than if the calls into the DLL are generated from the DLL itself at link time) 19:16
Xliff skink, are you trying to wrap this for p6? (Assuming yes, just want confirmation) 19:17
geekosaur Unix COFF/ECOFF does the same thing; when ELF was introduced there was a fair bit of grumbling about the performance of calls into ELF shared objects vs. COFF (admittedly not all of this was due to import libraries) 19:18
skink Bundling it with Crypt::Argon2 so Windows users don't need to compile (and I therefore don't have to figure out calling to VS or whatever)
I modified the makefile so that it's always using the MINGW profile, replaced -march=native with -msse2, and am using mingw for the cc and ar 19:19
19:19 grondilu joined 19:23 Emeric joined 19:24 rindolf left 19:29 wamba left 19:31 hankache left
geekosaur anyway for NativeCall you would only need the .dll 19:34
raydiak m: class { has Int @.a }.new: |%(a => ^3)
camelia rakudo-moar 6d21e8: OUTPUT«Type check failed in assignment to @!a; expected Int but got Range (^3)␤ in block <unit> at /tmp/n7EOOv8v4s line 1␤␤»
raydiak ^ what am I doing wrong?
geekosaur NativeCall has little choice but to use the slower method
raydiak m: class { has Int @.a }.new: a => ^3
camelia ( no output )
skink Alrighty 19:35
grondilu m: : class { has Int @.a }.new: |%(a => |^3)
camelia rakudo-moar 6d21e8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NLw0K4ZiXY␤Bogus statement␤at /tmp/NLw0K4ZiXY:1␤------> 3:7⏏5 class { has Int @.a }.new: |%(a => |^3)␤ expecting any of:␤ colon pair␤»
timotimo raydiak: define "runs well" :) 19:36
grondilu m: : class { has Int @.a }.new: |%(a => @(^3))
camelia rakudo-moar 6d21e8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jQWkLqkmmq␤Bogus statement␤at /tmp/jQWkLqkmmq:1␤------> 3:7⏏5 class { has Int @.a }.new: |%(a => @(^3␤ expecting any of:␤ colon pair␤»
grondilu *
skink Also I noticed that native(%?RESOURCES<name>.Str) looks for libname on *nix and just name on Windows
Which makes META perhaps a bit tricky?
raydiak timotimo: well, _normal runs more or less smoothly. probably 30 fps or so. but then I saw that was the one with all the nqp:: you were talkin about :) 19:37
timotimo ah, yes
also, that's the only one that has the key binding for spacebar d)
:)
raydiak that's pretty fun :) 19:38
timotimo how "well" does examples/particles.p6 run? 19:39
on my machine particles_normal.p6 gets 86 fps median
90 fps top, 45 fps bottom
raydiak frames per second: 20.8141 7.2330 6.6493 6.2013 5.7448 timings: 0.0480 0.1383 0.1504 0.1613 0.1741 19:40
skink geekosaur, Would you have a suggestion for the cleanest way to bundling the dll, since NativeCall looks for it without the prefix for Windows and with for *nix? 19:41
If that question even made sense...
raydiak and for _normal: frames per second: 28.5040 26.3078 24.5820 19.9478 14.9127 timings: 0.0351 0.0380 0.0407 0.0501 0.0671
ugexe skink: if you build your libraries into resources/libraries and put it under meta resource section as "resources" : { "libraries/libname_no_ext" } then it will get installed such that `%?RESOURCES<libraries><libname_no_ext>` give you the path that was actually used
19:42 jjido left
timotimo got it a bit faster 19:42
geekosaur not really. this is kind of a cultural thing; software ported from unix often has the lib- prefix, native Windows DLLs don't, so there is no one right solution
ugexe skink: github.com/niner/Inline-Perl5/blob...A.info#L15 <- this will be referenced as %?RESOURCE<libraries><p5helper> but point at p5helper.so on linux or p5helper.dll on windows (or something like that) 19:43
timotimo this last change got me 5 more fps at the low end
raydiak I'll give it a shot
skink You mean libp5helper.so on Linux? 19:44
ugexe m: $*VM.platform-library-name("/home/p5helper".IO).say
camelia rakudo-moar 6d21e8: OUTPUT«/home/libp5helper.so␤»
skink So yes :)
Is that a special case for libraries/?
ugexe the point being you reference it as the name, not the actual path with extension
yes its special for libraries
skink Aright, thanks 19:45
raydiak timotimo: yep picked up about 2 fps here 19:46
ufobat is there a better way to do this? class P { has $.p is required is rw}; class C is P {method c {say "c"}; method new(*%attr) {my $obj = self.bless: p => 1, |%attr; $obj.p = $obj.^method_table<c>.assuming($obj); return $obj }}; say C.new.perl; 19:47
timotimo that's not a lot :)
teatime is curious about why this is seems to be an infinite Seq: 1..."a"
timotimo ufobat: i don't know why you're accessing the method table like that; i'd probably .^find_method instead 19:48
raydiak timotimo: percentage-wise, it's a larger gain than you saw on your machine though
teatime (discovered as a side-effect of trying to do this): say $_ for 0x2500...^0x2580».chr
timotimo because ... will keep increasing the 1 by 1 until it reaches "a", which it won't
ugexe ufobat: maybe i misunderstand, but what about a parameterized role? 19:49
ufobat timotimo, didnt know find_method :) thanks
ugexe, how would a role help me? 19:50
Xliff skink: Sorry. Was busy with family coding help (aaaieee!) but am free now. Do you want me to test this?
timotimo raydiak: if you have any ideas how to improve it further, do tell :)
Xliff <- still bummed about Prince.
skink Xliff, I'll be pushing changes in just a bit
Xliff kk
raydiak hmmm...
19:52 Relsak joined
geekosaur family *coding* help? sounds like a couple circles of hell deeper than the usual family computer help... 19:52
timotimo raydiak: i'm now replacing additions, subtractions, multiplications and divisions with the nqp:: family of ops on nums 19:54
thus throwing out intermediate boxed results
raydiak timotimo: idk how much you'd gain, but you could precalc 2*pi 19:55
skink Xliff, pushed
Xliff geekosaur, For now it's simple CPP..... 19:56
I hope it stays that way.
skink: this Crypt::BRandom?
skink Crypt::Argon2
timotimo 134.5363 131.2566 128.4233 120.4291 65.9274 19:57
yeah, i replaced 2e0 * pi with tau
Xliff skink: Lemme clone.
timotimo check the latest code :) 19:58
skink Is there a Tau constant?
in P6
geekosaur m: tau.say
camelia rakudo-moar 6d21e8: OUTPUT«6.28318530717959␤»
raydiak timo: yep, that was a noticeable gain...37.3026 35.1676 33.4261 28.8199 15.7423 19:59
timotimo check out what the raw_timings_unsorted.txt look like :D 20:00
and then go back a few commits, put the code back in that outputs that file and check the pattern again
grondilu isn't the optimizer supposed to optimize things like 2*pi?
timotimo yeah
Xliff skink: oooh...it's our favorite! 20:02
===> Testing: Crypt::Argon2:ver('0.1.0'):auth('Shawn Kinkade')
Cannot locate native library 'D:\SVN\Github\p6-crypt-argon2\resources\libraries\argon2.dll': error 0xc1
in method setup at D:\SVN\Github\rakudobrew\moar-nom\install\share\perl6\sources\24DD121B5B4774C04A7084827BFAD92199756E03 line 266
I just tried "zef install ." inside the root dir for p6-crypt-argon2. 20:03
Xliff is now playing: Prince - HARDROCKLOVER
skink Same as it has been
Xliff m: say τ 20:04
camelia rakudo-moar 6d21e8: OUTPUT«6.28318530717959␤»
Xliff rakudo++
raydiak timotimo: okay, done
Xliff Does rakudo grok a symbol for the speed of light? "c" I think would be too ambiguous. 20:05
m: say c
camelia rakudo-moar 6d21e8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jQnOf69CEP␤Undeclared routine:␤ c used at line 1␤␤»
Xliff Thought so.
skink Xliff, Do you have VS installed?
timotimo raydiak: the dips should be far more frequent in earlier versions, eh? 20:06
psch .u speed of light
yoleaux 22 Apr 2016 22:48Z <TimToady> psch: #127965 is not a bug because LTM and one-pass parsing
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127965
yoleaux No characters found
20:06 Ven joined
psch .tell TimToady yeah, i saw the response in my emails. LTM totally slipped my mind 20:06
yoleaux psch: I'll pass your message to TimToady.
raydiak timotimo: yep, it does look that way
psch also, what the hell unicode
three different apostrophes but no symbol for the speed of light?! *snrk* 20:07
Xliff skink: Yes
timotimo raydiak: those are garbage collector pauses
raydiak ah ha
Xliff .u LIGHT
yoleaux U+0FC1 TIBETAN CANTILLATION SIGN LIGHT BEAT [So] (࿁)
U+23BE DENTISTRY SYMBOL LIGHT VERTICAL AND TOP RIGHT [So] (⎾)
U+23BF DENTISTRY SYMBOL LIGHT VERTICAL AND BOTTOM RIGHT [So] (⎿)
geekosaur m: 𝒄.say
camelia rakudo-moar 6d21e8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SOnqVhWmyc␤Undeclared routine:␤ 𝒄 used at line 1␤␤»
geekosaur aw 20:08
20:08 darutoko left
Xliff Nice try geekosaur. 20:08
psch m: say uniname '𝒄'
camelia rakudo-moar 6d21e8: OUTPUT«MATHEMATICAL BOLD ITALIC SMALL C␤»
Xliff .u 𝒄
yoleaux U+1D484 MATHEMATICAL BOLD ITALIC SMALL C [Ll] (𝒄)
timotimo raydiak: my profile of the whole thing now tells me i'm spending 20% of time inside method Int
psch well, that probably belongs into Physics::Constants, anyway
!&@programmers ~~ @physicists # if you will 20:09
...actually, make that !~~
skink Xliff, That zip I linked earlier has all its VS project files in order, afaik. Would it be too much to ask to build that and see if the resulting dll works?
'Cause if it doesn't, we'd have a completely different problem on our hands :) 20:10
20:10 jjido joined
psch .oO( or not, i don't really care to make the joke *that* correct right now... ) 20:10
timotimo m: use nqp; say nqp::coerce_ni(50e3)
camelia rakudo-moar 6d21e8: OUTPUT«===SORRY!===␤No registered operation handler for 'coerce_ni'␤»
timotimo m: use nqp; say nqp::coerce_in(50e3) 20:11
camelia rakudo-moar 6d21e8: OUTPUT«===SORRY!===␤No registered operation handler for 'coerce_in'␤»
timotimo m: use nqp; say my int $foo = 50e3.int
camelia rakudo-moar 6d21e8: OUTPUT«Method 'int' not found for invocant of class 'Num'␤ in block <unit> at /tmp/wY2M26rISm line 1␤␤»
timotimo m: use nqp; say my int $foo = 50e3.Int
camelia rakudo-moar 6d21e8: OUTPUT«50000␤»
20:11 _mg_ joined
timotimo how do i turn a num into an int without going through Int? :( 20:11
raydiak would a bitop do it? 20:13
timotimo i expect it'd asplode when not given an int, huh?
raydiak in many other languages it'll just truncate to an int 20:14
it's a performance trick in, e.g. JS
timotimo m: use nqp; say nqp::or_i(30e0, 0)
camelia rakudo-moar 6d21e8: OUTPUT«===SORRY!===␤No registered operation handler for 'or_i'␤»
timotimo m: use nqp; say nqp::bitor(30e0, 0)
camelia rakudo-moar 6d21e8: OUTPUT«===SORRY!===␤No registered operation handler for 'bitor'␤»
timotimo how do we ...
m: use nqp; say nqp::bitor_i(30e0, 0)
camelia rakudo-moar 6d21e8: OUTPUT«This type cannot unbox to a native integer␤ in block <unit> at /tmp/o5xOT5RGKn line 1␤␤»
timotimo that's what i expect every bitop would give me 20:15
raydiak m: say 1.2 +| 0
camelia rakudo-moar 6d21e8: OUTPUT«1␤»
timotimo that's a rat! you're cheating :)
raydiak what makes that work? some slow perl code I guess? 20:16
m: say 12e3 +| 0
camelia rakudo-moar 6d21e8: OUTPUT«12000␤»
timotimo yeah :P
it probably goes through .Int
i'll try and see what the profile says
raydiak m: say (12e3 +| 0).perl
camelia rakudo-moar 6d21e8: OUTPUT«12000␤»
skink +| 0 is how int works in asm.js
colomon going through Int is the only way bitwise or makes sense, no?
timotimo colomon: well, our wish is to get a num into an int 20:17
now i'm spending 31% of time inside +|
raydiak not a win :P 20:18
timotimo and, for some reason, another 15% in a different +|
and an additional 8% of time inside Int
well, Int went down from 20% to 8%, so ... yay? :P
raydiak heh
colomon presumably one +| converts arguments to Int and the other actually calculates +| 20:19
timotimo maybe it'll be faster if i nativecast, going via a Pointer :D
you're right, colomon
colomon you want to get at the bits of a num? 20:20
timotimo no
i want to truncate the fractional part and get the integer portion of the num
colomon floor?
timotimo yeah, except nqp::floor_n returns another num
colomon it’s actually a num, not a Num?
timotimo it's a num, yes 20:21
i get it via an atpos_n, and multiply it by 10 with a mul_n
m: use nqp; say nqp::floor_i(123.456e0)
camelia rakudo-moar 6d21e8: OUTPUT«===SORRY!===␤No registered operation handler for 'floor_i'␤»
timotimo m: use nqp; my int $result = nqp::floor_n(123.456e0)
camelia ( no output )
timotimo m: use nqp; my int $result = nqp::floor_n(123.456e0); say $result 20:22
camelia rakudo-moar 6d21e8: OUTPUT«123␤»
timotimo oh, huh?
colomon m: use nqp; my int $result = 123.456e0; say $result
camelia rakudo-moar 6d21e8: OUTPUT«This type cannot unbox to a native integer␤ in block <unit> at /tmp/aFJ12adXoh line 1␤␤»
timotimo now i get the "cannot unbox" error
colomon m: use nqp; my int $result = nqp::floor_n(123.456e0); say $result 20:23
camelia rakudo-moar 6d21e8: OUTPUT«123␤»
grondilu if I mix an object with a role, it's kind of hard to get the "pure" object back. For instance with an integer I did not find anything but 0+$myint
timotimo m: use nqp; my num $in = rand; my int $result = nqp::floor_n(nqp::mul_n($in, 100)); say $result
camelia rakudo-moar 6d21e8: OUTPUT«This type cannot unbox to a native number␤ in block <unit> at /tmp/y5Z4h2L325 line 1␤␤»
timotimo i think the optimizer might have worbled the num into an int for us there
grondilu (aka Perl5's "venus operator")
timotimo grondilu: you can use "but" and put the original object into the object with an extra role :) 20:24
colomon timotimo: you need nqp::fromnum_I maybe?
grondilu m: role A { my $origin }; say (1 but A).origin ~~ A 20:25
camelia rakudo-moar 6d21e8: OUTPUT«Method 'origin' not found for invocant of class 'Int+{A}'␤ in block <unit> at /tmp/vaohd25z5b line 1␤␤»
grondilu m: role A { has $.origin }; say (1 but A).origin ~~ A
camelia rakudo-moar 6d21e8: OUTPUT«False␤»
grondilu nice
timotimo colomon: well, that gives me an Int, but i'd relly love to have an int directly
i.e. no gc allocation at all
grondilu wait no
m: role A { has $.origin }; say (1 but A[1]).origin ~~ A
camelia rakudo-moar 6d21e8: OUTPUT«No appropriate parametric role variant available for 'A'␤ in any specialize at gen/moar/m-Metamodel.nqp line 2614␤ in any specialize at gen/moar/m-Metamodel.nqp line 2212␤ in any compose at gen/moar/m-Metamodel.nqp line 2993␤ in any generate_mi…»
grondilu m: role A { has $.origin }; say (1 but A(1)).origin ~~ A 20:26
camelia rakudo-moar 6d21e8: OUTPUT«False␤»
colomon timotimo: good point, no sign of a fromnum_i
20:26 kaare_ left
timotimo we could probably just make coerce_ni available to rakudo via the QASTOperations or what it's called 20:26
seems like fromnum_I isn't any faster than .Int on the thing
grondilu meh I think I'll stick with the venus operator. 20:27
timotimo grondilu: well, you're not actually giving it the original object via the A 20:28
masak just found github.com/rakudo/rakudo/blob/6d21...pm#L18-L24 , and is pondering... :)
timotimo hah 20:29
masak jnthn: should it say "the Iterable role"?
I'm not even checking `git blame` to confirm jnthn++ wrote that ;) 20:30
raydiak m: class { has Int @.a }.new: |%(a => ^3) # so this is a bug, correct? any suggestions how to work around it? this is Pray's current blocker, can't load scene files 20:31
camelia rakudo-moar 6d21e8: OUTPUT«Type check failed in assignment to @!a; expected Int but got Range (^3)␤ in block <unit> at /tmp/MYNDSz1ePb line 1␤␤»
timotimo you won't get a Positional[Int] unless you explicitly create one 20:32
20:32 CIAvash left
colomon timotimo: making coerce_ni available seems like a decent idea... 20:32
timotimo so even if you flatten out the range it won't go in
raydiak m: class { has Int @.a }.new: a => ^3 # works fine tho
camelia ( no output )
timotimo oh! 20:33
right, hash flattening might do that :|
masak jnthn: oh! yes! it *is* related to the duality! :D
jnthn: see, the Tappable gets dependency injected, right?
jnthn masak: Curiously, I think the comment is right :)
Xliff skink, I'll try to get that working. Ping me in a couple of hours to remind me. Things have busied up here rather quickly.
jnthn masak: Because, yes, duality :P
masak and that dependency injection only happens with... right
so, yeah :P
raydiak timotimo: that doesn't make any sense to me...if it does to you, then...what is going on there? 20:34
jnthn masak: I think I actually wrote that comment as Iterable first, then looked at what I had and was like "wait..." :)
masak jnthn: but line 18 says "the Iterator role"... and Iterator is a class, no? 20:35
jnthn: and Tappable would be the dual of Iterable, no?
jnthn m: say Iterable.HOW.^name
camelia rakudo-moar 6d21e8: OUTPUT«Perl6::Metamodel::ParametricRoleGroupHOW␤»
jnthn m: say Iterator.HOW.^name
camelia rakudo-moar 6d21e8: OUTPUT«Perl6::Metamodel::ParametricRoleGroupHOW␤»
timotimo raydiak: i suppose a hash is a collection of containers, just like an array?
masak hm.
ok, I see your point. 20:36
timotimo m: my %args; %args<a> := ^3; class { has Int @.a }.new: |%args
camelia ( no output )
timotimo raydiak: ^
jnthn masak: Oh, I think I can give a high-level explanation
masak: When you have a Seq you have already taken the iterator that you'll work through
masak: When you have a Supply, you've got something you can tap to start a flow of values
raydiak timotimo: uh, hmm... 20:37
jnthn masak: That's probably part of the reference direction duality, that lets us trace-GC away iterables, but need an explicit .close on a tap.
masak aye 20:38
...and that bit's connected to "who says when we're done" (consumer vs producer)
jnthn aye
timotimo jnthn: do we want to expose "turn this num into a 64bit int for me and i don't care if it goes wrong" to users at all?
i.e. what (int)some_float would do in C
jnthn The more beer I sip, the more this CT stuff makes sense :P 20:39
timotimo tbh, i don't know what C will do when that float overflows the 64bit int
jnthn timotimo: Probably "whatever the CPU does" :P
masak jnthn: I'm pretty sure at this point I'm going to write a CT book
jnthn Nice! 20:40
masak jnthn: I have a question about supplies. I have an app.pl with all the server code for my game. I want a Supply to &emit whenever the server registers a move. different moves are on different code paths. 20:41
skink ugexe, Part of the reason I was trying to figure out cross-compilation was to make it easy to keep the bundled OpenSSL libs up-to-date
masak jnthn: how do I create this Supply? I just learned by reading Rakudo source that a Supply is not created directly.
jnthn: is there prior art I can look at somewhere? (guessing t/spec)
jnthn: conceptually, I want a "funnel" that I can "stuff new moves into" from wherever in the code. 20:42
jnthn masak: You have a few choices when it comes to "create a supply" 20:43
timotimo jnthn: what kind of peg would "do what the cpu would do" hang off of? a Num method? (but then i'd have to go through that instead of directly from native num to native int, sigh)
jnthn Though the one it sounds like you want is a Supplier
masak ah, yes. good.
jnthn masak: Supplier is generally good for "live" supplies, where things tap into a stream of values and all get the same stream of values 20:44
So, pub/sub essentially
masak ah, yes. I see how Supplier works.
it has an .emit method
great. got it. 20:45
jnthn Yeah. Typically you keep the supplier part to yourself, and expose the Supply you get from it
Then you can be certain of the scope of your emissions
masak *nod*
I dimly recall the Supplier bit being a late-ish addition
but it does make sense
skink Oh, would ya look at that... OpenSSL has an explicit cross compile configure option 20:46
jnthn Yeah, we de-tangled some concepts :)
Apparently the Czech beer and a couple of years insight lead to better design than Croatian beer and conference driven development :P
20:47 pomJ joined
masak ok, so I create a Supplier, and then I get my Supply from it by doing $supplier.Supply 20:48
jnthn Yeah 20:49
masak are there any drawbacks in my case to creating *one* Supply, and then just giving it to anyone who hits my URL? 20:50
compared to creating a fresh one for each request, I mean
raydiak timotimo++ I'm still somewhat confused, but that fixed it, so tyvm :)
timotimo when you wrote a => ^3, it created a Scalar for you
when you used := instead, it bypassed that 20:51
jnthn I've a few times done something like has $!foo-sup = Supplier.new; has $.foo = $!foo-sup.Supply`^H
^HNo, you don't need to create a fresh one per request.
masak cool. that's what I thought. 20:53
jnthn There *is* a distinction, but it's very rare you need to care.
raydiak timotimo: guess I never entirely caught up to the GLR; thanks for highlighting some things I obviously need to study up on again 20:54
jnthn (Each time you call Supply, you get something that is individually protocol-sanatized.)
timotimo raydiak: wanna guess my framerate with coerce_ni? 20:55
jnthn You only need to care if you're planning to .done or .quit, and then want to .emit again afterwards.
20:56 Ven left
raydiak timotimo: you were at...134 when we left off? I'd guess...150? 20:56
ufobat good night :)
colomon timotimo: I’m eager to hear
20:56 Ven joined
timotimo 278.6172 269.3318 259.4361 250.9756 114.7239 20:56
raydiak well THAT helped!
colomon timotimo++
timotimo m: say "there were { 3214 / 568 } frames between consecutive gc runs" 20:57
camelia rakudo-moar 6d21e8: OUTPUT«there were 5.658451 frames between consecutive gc runs␤»
timotimo GC time is at 9.99%
grondilu I feel out of the loop here. What are you guys talking about with your framerates and stuff?
20:57 ocbtec left
jnthn grondilu: Apparently they're trying to get the most out of their loops too ;) 20:58
timotimo yeah, i've built a particle system
masak jnthn: why would I ever want to .emit after a .done or .quit?
timotimo by making the code extremely ugly (as in: put in nqp:: ops for every single operator) i got it to be crazy fast, in comparison
grondilu: github.com/timo/SDL2_raw-p6/blob/v..._normal.p6 - there you go 20:59
grondilu loop { @people }; $grondilu :P
jnthn masak: For example if you had something that could crash and recover, but things downstream should explicitly handle that condition also
20:59 Emeric left
raydiak grondilu: heh out of the loop? I'm still trying to catch up to the GLR :) 21:00
jnthn timotimo: Interesting would be to look side-by-side at those transforms and figure out how to make you not need to do them :)
grondilu do you guys manage to do some graphis stuff with video framerates? If so, that's pretty cool. 21:01
timotimo well, i looked at some of our operators and we're boxing a whole lot of objects all over the place
jnthn timotimo: yeah, and spesh doesn't do box elimination yet :)
timotimo yup
and the / operator in particular seemed pretty expensive, even though i mostly used constants on the RHS, which were decidedly non-zero
my innermost loopy thingie still allocates a bunch of Int objects :\ 21:03
m: say "allocating { 14487855 / 2416 } Int objects per frame, which is { 14487855 / 7248000 } per particle" 21:04
camelia rakudo-moar 6d21e8: OUTPUT«allocating 5996.628725 Int objects per frame, which is 1.9988762 per particle␤»
grondilu m: role A[Int $n] { has @.c[$n] }; say class :: does A[1] {}.new; 21:05
camelia rakudo-moar 6d21e8: OUTPUT«Type check failed in binding shape; expected Any but got VMNull (?)␤ in code at /tmp/kwKAV2rTKl line 1␤ in block <unit> at /tmp/kwKAV2rTKl line 1␤␤»
jnthn haha 21:08
VMNull (?) 21:09
timotimo i somehow managed to get the inner block of the update method to not be jitted any more
jnthn Even Rakudo is like "wtf am I even doing" there :P
grondilu: I *think* what you want to do there is reasonable. I don't immediately know how hard it'd be to make it work. 21:10
21:12 jjido left, rurban left
timotimo oh wow, it looks like the inner block got inlined now 21:12
jnthn "Once everything's inlined, you've won" - some JVM JIT guy 21:15
timotimo why the hell does the profiler claim the update method isn't called in jitted mode? in the jitlog i see it compile successfully
oh, it has a few jitted entries. not many, though 21:16
21:17 Ven left
grondilu jnthn: good to know. 21:18
timotimo 257 jitted calls, 8154 spesh'd calls ... !?! 21:20
jnthn: did i mention we're really bad at inlining native operators? 21:21
jnthn timotimo: That in theory should happen mostly statically... 21:23
timotimo do you remember i told you about the trouble with nativerefs?
we're taking nativerefs everywhere and the inliner is like " a what ref? " and bails out
jnthn Yes, I know that. 21:24
timotimo i tried to fix it and ran against a wall :|
jnthn Spesh never got taught about native refs
timotimo oh, this is about the static optimizer, though
it prevents the inlining at the QAST level already
jnthn ah
.oO( Implementing Perl 6 is all about running into a...yeah, we already did this one )
21:25
But yeah, spesh and the static optimizer are both on my "stuff to give a good looking through" list.
timotimo yeah, that's a rather long list, sadly 21:26
jnthn Yeah.
timotimo i wish i'd've had more success with the static optimizer there
in order to make spesh aware of native refs, i'll probably have to artificially create a frame that uses them
similar to how i implemented lexicalref vs lexical in the QAST compiler some time ago 21:27
21:27 zakharyas left
timotimo i recall using the spesh log to figure out what bytecode i made it emit back then :D 21:28
21:29 zakharyas joined 21:33 RabidGravy left
masak yay! I've now got the game emitting SSE when I make moves on the board! :D 21:34
21:34 pomJ left
skink timotimo, stmuk: So it turns out, cross-compiling OpenSSL is really easy 21:35
timotimo do SSE instructions make it much faster to play? :P
skink: oh!
skink This goes back to our convo on... the 10th
masak tomorrow: writing the (simple) JavaScript code that updates the board whenever it gets a server event
21:35 zakharyas left
masak (and then seeing how all the assumptions I made with the code today were too naive and simplistic) :P 21:35
21:35 leont joined
masak timotimo: yes, they do, in fact. 21:36
timotimo: 'cus you don't have to hit F5 a lot :P
timotimo :D
skink timotimo, It ships with a config/make profile specifically for mingw64, so all you have to do is...
masak 'night, #perl6
skink CROSS_COMPILE="x86_64-w64-mingw32-" ./Configure mingw64 no-asm shared; make depend; make
timotimo damn, that's nice
21:37 zakharyas joined
skink I forked the the Perl6 bindings and pushed dlls for the latest stable release (1.0.2g) 21:37
Just need someone to test that and I'd PR 21:38
timotimo a pull-request is also a good place to accrue comments and reviews and such
though it'd be cool if github had a preconfigured label or something that you can put on a PR to specify "don't merge this yet" 21:39
skink Well I'm going to include instructions to reproduce them with the PR
I guess I'll do that now then 21:40
timotimo cool cool 21:41
grondilu why can't roles have 'our' attributes? 21:42
m: role { our $value } 21:44
camelia rakudo-moar 6d21e8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sVWp6IFlD1␤Cannot declare our-scoped variable inside of a role␤(the scope inside of a role is generic, so there is no unambiguous␤package to install the symbol in)␤at /tmp/sVWp6IFlD1:1␤------> 3role …»
grondilu ok, good error message.
m: role A[$classattrib] { method classattrib { $classattrib } }; say A[pi].classattrib 21:47
camelia rakudo-moar 6d21e8: OUTPUT«3.14159265358979␤»
grondilu ^I guess I could do that.
skink timotimo, Submitted, if you were interested 21:48
grondilu m: role A[$attrib] {}; say A[pi].new ~~ A[pi]; 21:49
camelia rakudo-moar 6d21e8: OUTPUT«True␤»
timotimo annoyingly i can't test it for lack of windows
grondilu m: role A[$attrib] {}; say A[pi].new ~~ A[tau];
camelia rakudo-moar 6d21e8: OUTPUT«False␤»
21:50 _mg_ left 21:53 dalek left 21:54 dalek joined, ChanServ sets mode: +v dalek 21:56 cognominal joined 21:57 zakharyas left
raydiak m: say 1e-4 ** 1e2 21:59
camelia rakudo-moar 6d21e8: OUTPUT«Numeric underflow␤ in block <unit> at /tmp/CTHbRLMinR line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/CTHbRLMinR line 1␤␤»
raydiak m: say 1e-400 22:01
camelia rakudo-moar 6d21e8: OUTPUT«0␤»
raydiak ^^^ I'm assuming I need to handle that with a try/CATCH...???... 22:02
I'd much rather just get an approximation to zero than a Failure. Any other way to accomplish that? 22:03
grondilu m: my $foo = "bar"; say "$foo:[]"; 22:04
camelia rakudo-moar 6d21e8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/A8thSUhbzX␤Variable '$foo:<>' is not declared␤at /tmp/A8thSUhbzX:1␤------> 3my $foo = "bar"; say "7⏏5$foo:[]";␤»
grondilu m: my $foo = "bar"; say "$foo:";
camelia rakudo-moar 6d21e8: OUTPUT«bar:␤»
grondilu how comes $foo:<> is a valid variable name? 22:05
22:09 TEttinger joined
MadcapJake grondilu: that's how custom operators/terms are named 22:11
m: &infix:<+>(1, 2).say
camelia rakudo-moar 6d21e8: OUTPUT«3␤»
grondilu ok, I came up to this conclusion as well but I'm still surprised as "foo" is neither "infix", "prefix" or whatev 22:14
22:16 Yary joined
geekosaur no, but <> is a postcircumfix method 22:16
timotimo but :<> isn't 22:17
geekosaur so it can be used as thing.<>(thing) (normal method call) or as thing<thing> (postcircumfix)
ah, right, misread
timotimo :)
geekosaur but : is a namespacer, and I guess there's no check for valid namespaces 22:18
like infix: etc.
22:20 Yary left
raydiak it's ALIVE... *ahem*, I mean Pray runs again :) 22:30
timotimo excellent!
does it feel any faster?
22:30 leont left
raydiak not much, but I suspect there is vast room for optimization 22:31
timotimo in rakudo you have the chance to make something extremely slow down with one simple mistake :) 22:32
raydiak heh true
more cycles wasted created/destroying objects than doing actual math if I had to guess
timotimo can very well be that 22:33
22:38 rindolf joined 22:39 Herby_ joined
Herby_ Afternoon, everyone! 22:39
o/
skink o/
raydiak \o Herby_
timotimo raydiak: you think you could run a --profile with one of your test codes? 22:40
grondilu: did you see the pull requests you have in grondilu/openssl? 22:41
raydiak timotimo: I can totally do that. is the profiler more perfomant than it used to be? my problem with that in the past was that even a tiny simple rendering produced a profile so large that I couldn't load it without crashing my browser or something iirc 22:42
timotimo grondilu: also, what differentiates your SSL module from sergots?
22:42 cognominal left
timotimo raydiak: it got a tiny bit better at outputting less 22:42
grondilu timotimo: mine has a shorter name (almost seriously) 22:43
raydiak timotimo: I guess we'll find out, then
grondilu also the interface is different. 22:44
timotimo grondilu: looks like yours is only for digests, whereas sergot's is usable for all we need for IO::Socket::SSL
grondilu true
timotimo it'd be nice if the "description" field in the META.info said that out loud
grondilu it is said in the README. I was leaving room for further improvements. 22:45
22:46 lizmat joined
timotimo well, the contents of the description field are shown on modules.perl6.org, so ... :) 22:49
grondilu fine, I'll add a note. 22:51
timotimo thank you kindly :)
does anything speak against contributing your digest support to sergot's module?
grondilu I suspect it's incompatible due to differences in interfaces 22:52
raydiak timotimo: still doesn't work on my cheap laptop, but maybe your more powerful box can do better... cyberuniverses.com/pray/profile.html 22:53
skink Do panda/zef handle git submodules? 22:54
dalek osystem: 44f6d06 | (Zoffix Znet)++ | META.list:
Add Audio::MIDI::Note to the ecosystem

Play MIDI notes by replicating sheet music: github.com/zoffixznet/perl6-Audio-MIDI-Note
22:55 astj joined 22:56 astj left
tadzik skink: how would exepect them to be handled? Do you mean "do they clone the git repos and update the submodules afterwards"? 23:00
timotimo raydiak: it's giving me some trouble :) 23:02
raydiak timotimo: I expected as much...thanks for trying though :) 23:03
timotimo yw
also, welcome back :)
raydiak thank you! :)
23:04 dolmen joined
timotimo you were also one of our webdesign-y people, weren't you? 23:04
raydiak anyway, that's what I get...you did ask me to look at improving the profiler two or three times iirc...
timotimo oooh, it came up!
23:04 matiaslina joined
raydiak yep I am one of the web people 23:04
skink tadzik, pulling in all the needed files yeah
timotimo sorting the routines list will be ... painful :)
27.17% (5790.58ms) 23:05
^- this much time is spent inside find_best_dispatchee
raydiak wow, that's just multidispatch? 23:06
timotimo that's when we get unlucky; maybe a "where" in a signature, maybe a multi-dispatch-cache filling up completely before the hot values land in it 23:07
raydiak I'll have to poke around, that'd likely be much easier to fix than all the gc thrash 23:08
timotimo is line 967 in your m-CORE.setting inside the BUILDALL method of Mu? 23:09
that allocates a gigaton of BOOTCode objects, i.e. it takes many, many closures
1,860,628 objects
raydiak not sure, where is m-CORE.setting again? 23:10
timotimo gen/moar/
not in src/
find_best_dispatchee is also responsible for almost 100% of NQPArray allocations (341,970 ones) 23:11
it also allocates almost all BOOTHash objects 23:12
172,016 ones
raydiak yes L967 is in BUILDALL of Mu
timotimo OK
which line is it?
all the iseq_i's are unique, so that's a good anchor 23:13
MadcapJake skink: git clone the repo (that either installs submodules or there's a flag) then panda/zef can install the local folder
raydiak "while nqp::islt_i($i, $count) {" towards the top of BUILDALL
timotimo interesting
23:14 firstdayonthejob left
timotimo the good news is you've only got 97 GC runs and the amount of data that's been kept is rather small each time 'round 23:15
each gc run was taking about 20 - 35 ms, which is much higher than i'm used to, but that could be computer performance
raydiak wonder where all the closures come from, I don't recall passing closures around in this project off the top of my head 23:16
skink MadcapJake, It's git submodule add. I ask because the Python/Perl versions of this module just pointed to the original repo of the C library at a specific revision
timotimo well, it's the buildall method creating the closures, not your code
skink panda/zef would have to git clone --recursive to get everything from submodules, it seems 23:17
timotimo in the future we'll have compiled buildplans. those will work much better
raydiak only 97 GC runs isn't bad, it ran for like 20 or 30 seconds
timotimo now i b0rked the tab the profiler was in 23:18
raydiak heh I'm surprised it took that long :)
timotimo t.h8.lv/raydiak_profile_1.png t.h8.lv/raydiak_profile_allocates_Num.png t.h8.lv/raydiak_profile_allocates_scalar.png t.h8.lv/raydiak_profile_local_deopt.png 23:19
maybe you'll find something in there interesting
raydiak oh sweet, thanks...I almost asked you to do that :)
timotimo i'd be interested to know if you have many (or even any) "where" clauses in parameter lists in your code 23:20
but for now i'll go to bed
take care, butterfly buddies 23:21
raydiak rest well timo \o 23:22
23:22 [TuxCM] joined
raydiak hm, there are two where clauses...both in sensitive places (vector and matrix classes) 23:23
timotimo that seems dangerous for performance
raydiak agreed... 23:24
23:24 _28_ria joined
raydiak I'll get rid of them and see if times improve at all...have an idea or two from the screenshots, too 23:25
23:32 AlexDaniel left 23:40 _28_ria left, _28_ria joined 23:56 tomboy64 left 23:57 tomboy64 joined
grondilu a weird warning: 23:57
Asked to remove 16 spaces, but the shortest indent is 12 spaces in any descend at gen/moar/m-Perl6-Actions.nqp line 473
23:59 lizmat left