»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by masak on 12 May 2015. |
|||
00:00
BenGoldberg joined
00:02
cognominal left
00:04
leont left
|
|||
dalek | kudo-star-daily: 2aa91d2 | coke++ | log/ (8 files): today (automated commit) |
00:04 | |
00:05
aborazmeh joined,
aborazmeh left,
aborazmeh joined
00:11
ShimmerFairy left
00:12
n0tjack joined
00:22
n0tjack left
00:25
ShimmerFairy joined
00:36
Skarsnik left
00:39
laouji left
00:40
laouji joined
00:41
laouji left,
laouji joined
00:46
Zoffix joined
00:50
tokuhiro_ joined
|
|||
tokuhiro_ | how do i pass parameters by reference with nativecall? | 00:52 | |
i want to write code like python's byref docs.python.org/2/library/ctypes.h...-reference | 00:53 | ||
psch | tokuhiro_: a thing that used to work is passing an Array[CPointer] | 00:54 | |
00:55
rangerprice left
|
|||
psch | tokuhiro_: but i wouldn't bet on me being up to date on current practices | 00:55 | |
ugexe | CArray[OpaquePointer] | 00:57 | |
psch | .tell FROGGS your patch and the result makes me thing the jvm build is due to some oversight in the Binder, though i haven't found a place to place a BP to gain more insight, just fyi | ||
yoleaux | psch: I'll pass your message to FROGGS. | ||
psch | ugexe++: right, that was probably it, thanks | ||
tokuhiro_ | thanks. i'll try it | 00:58 | |
01:00
lizmat joined
01:04
lizmat left
01:15
n0tjack joined
01:23
n0tjack left
01:24
aborazmeh left
|
|||
labster | m: my $t1 = now; for ^1000 { <1/65536>.perl }; $t1 = now - $t1; my $t2 = now; for ^1000 { <1/65537>.perl }; $t2 = now - $t2; say "<1/65537> is {sprintf("%.2f", $t1/$t2)} times faster than <1/65536>"; | 01:38 | |
camelia | rakudo-moar 16d366: OUTPUT«<1/65537> is 16.32 times faster than <1/65536>» | ||
timotimo | m: say <1/65536>.perl; say <1/65537>.perl | 01:43 | |
camelia | rakudo-moar 16d366: OUTPUT«0.000015<1/65537>» | ||
timotimo | wow, is our algorithm to turn it into a decimal really that bad? | 01:44 | |
labster | yeah, it's pretty awful. It's looping on $!denominator %% 2 | ||
timotimo | oh | 01:45 | |
so it's basically O(number of 1 bits in denom)? | |||
labster | Yes. But then after all of that work, Rational.Str doesn't know how to handle it anyway. | ||
timotimo | right, it fails to find something good | 01:46 | |
and finding out it'd not work does the maximum amount of work first | |||
perhaps we can count the number of bits set up front and decide based on that that we'd end up bailing out anyway? | |||
labster | no, it finds out it will work incorrectly | ||
I'm tempted to try with base 10 instead of 2 and 5, it might actually work. | 01:48 | ||
timotimo | er, right | ||
labster | Mainly because Rational.Str rounds at min($denominator.chars + 1, 6) | 01:49 | |
er, max(). Not written like that anyway | 01:50 | ||
timotimo | i'm not familiar with the code, actually, so i was just hoping i could inspire you to build something %) | 01:51 | |
but you already had that in mind | |||
labster | I'm inspired to build, just don't know what to build :P | 01:55 | |
timotimo | are you "limited" to the rat-to-string thing in this desire/inspiration? | 01:56 | |
02:03
noganex_ joined
02:05
dayangkun joined
02:08
FROGGS joined
02:19
FROGGS left
02:22
AlexDaniel left
02:28
lea joined
02:31
ab5tract_ joined
|
|||
labster | timotimo: I think my imagination is less limited after dinner | 02:32 | |
timotimo is very late for bedtime :| | 02:33 | ||
02:35
yqt left
02:36
ab5tract_ left
|
|||
dalek | ecs: 653f803 | skids++ | S32-setting-library/Containers.pod: Adjust some prototypes to post-GLR implementation state. Also, write better natural-language descriptions of some methods, since the pseudocode had gone stale anyway. Remove map(*) as it was removed during GLR. Grammar and whitespace cleanups Still much work to do on S32, and sub-style slurpies have yet to be changed. |
02:41 | |
TimToady --> airport & | 02:48 | ||
02:58
n0tjack joined
03:03
n0tjack left
03:04
kaare_ joined
03:07
dayangkun left
03:12
dayangkun joined
03:42
n0tjack joined
03:47
n0tjack left
03:50
laouji left
04:29
khw left
04:35
FROGGS joined
04:38
laouji joined
|
|||
moritz | .oO( TimToady returns an airport ) |
04:44 | |
good morning * | 04:45 | ||
04:45
FROGGS left
04:51
BenGoldberg left
04:52
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
FROGGS joined
04:53
xinming left
04:54
xinming joined
|
|||
tadzik | g'morning moritz | 04:57 | |
yoleaux | 7 Sep 2015 22:18Z <mohij> tadzik: I'm more or less done with putting *env functionality into rakudobrew. Most commands work including local, global and shell switching. | ||
7 Sep 2015 22:19Z <mohij> tadzik: I have only tested on linux so far. Will do some Windows testing soon. What do you think about merging? | |||
7 Sep 2015 22:20Z <mohij> tadzik: Tradeoff: Slight startup time decrease because the shims are perl and not bash anymore. | |||
04:58
diana_olhovik_ joined,
laouji left
04:59
laouji joined
|
|||
tadzik | .tell mohij I'd be delighted :) Can you send me a PR? | 05:01 | |
yoleaux | tadzik: I'll pass your message to mohij. | ||
tadzik | thanks yolo | ||
FROGGS[mobile] | tadzik: there is also a message by moritz in the clogs | 05:03 | |
05:03
diana_olhovik___ joined
|
|||
tadzik | oh | 05:04 | |
05:04
diana_olhovik_ left
|
|||
tadzik | FROGGS[mobile]: I don't see it | 05:06 | |
FROGGS[mobile] | something about rakudobrew | ||
moritz | unlikely | 05:07 | |
FROGGS | tadzik: ups, wasnt moritz: irclog.perlgeek.de/perl6/2015-09-07#i_11181969 | ||
yoleaux | 00:57Z <psch> FROGGS: your patch and the result makes me thing the jvm build is due to some oversight in the Binder, though i haven't found a place to place a BP to gain more insight, just fyi | ||
FROGGS | tadzik: and now I also see that mohij did send it again properly | ||
sorry, still being asleep obviously | 05:08 | ||
.tell psch thanks for the hint... now I just need to figure out what that means :o) | |||
yoleaux | FROGGS: I'll pass your message to psch. | ||
05:11
diana_olhovik___ left
|
|||
moritz | iirc jnthn++ fixed some binder things in JVM | 05:13 | |
ShimmerFairy | Yeah, I last saw jnthn mention that his JVM hacking should make finding the build issue less scary now for others, or something to that effect :) | 05:22 | |
05:29
quester joined,
quester left,
quester joined,
[Sno] joined
|
|||
quester | m: my @a="i i", "j j"; my @b = @a, "k k", "l l", "m m"; say @b.perl | 05:31 | |
camelia | rakudo-moar 16d366: OUTPUT«[["i i", "j j"], "k k", "l l", "m m"]» | ||
quester | m: my @a="i i", "j j"; my @b = | @a, "k k", "l l", "m m"; say @b.perl | ||
camelia | rakudo-moar 16d366: OUTPUT«["i i", "j j", "k k", "l l", "m m"]» | ||
quester | I'm fairly impressed... I have about 180 lines of perl6 code written six months ago for $work, and the only thing that the GLR broke was the declaration of a list of keywords. Kudos to everyone involved, jnthn++ in particular. | 05:35 | |
Oh, and TimToady++ of course. | 05:36 | ||
tadzik | yay, another production perl 6 :) | 05:40 | |
05:42
dayangkun left
05:43
dayangkun joined
05:44
dayangkun left
05:45
dayangkun joined,
dayangkun left
05:47
dayangkun joined
05:49
n0tjack joined
05:51
domidumont joined
05:53
laouji left,
n0tjack left
05:55
domidumont left
05:56
domidumont joined
05:58
laouji joined,
laouji left
05:59
laouji joined
06:14
araujo left
06:15
araujo joined
06:16
araujo left
06:17
araujo joined
06:18
CQ joined
06:24
FROGGS left
|
|||
tadzik | gist.github.com/anonymous/c1b0012f2dd4d3e4ca0e | 06:24 | |
...huh? | |||
the :in(True) is the offender | |||
for some reason | 06:25 | ||
FROGGS[mobile] | tadzik: what should it do instead? block for input? | 06:35 | |
06:46
laouji left
|
|||
tadzik | FROGGS[mobile]: I guess so | 06:46 | |
not bail out would be a good start :) | |||
06:46
laouji joined
|
|||
tadzik | I mean, it's a minimized test case from a code that launches dmenu, writes to its input and reads from its output | 06:47 | |
this is the simplest I could come up with that reacts the same way | |||
06:48
FROGGS joined
06:49
rurban joined,
Ven joined
|
|||
FROGGS | tadzik: that script does not fail for me | 06:50 | |
06:51
FROGGS[mobile] left
06:56
leont joined
06:59
laouji left
07:00
laouji joined
07:10
ab5tract_ joined
07:12
leont left
07:18
rurban left,
Loren joined
|
|||
masak | morning, #perl6 | 07:19 | |
FROGGS | morning masak | ||
Loren | morning & afternoon. | 07:20 | |
07:20
darutoko joined
|
|||
masak | Loren: afternoon, Loren of .cn | 07:21 | |
Loren | haha.. | ||
m: class Line { has $!value; method get-value() { return $!value; } } my Line $line; say $line.perl; say $line.get-value(); | 07:24 | ||
camelia | rakudo-moar 16d366: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yvjh0B5AsvStrange text after block (missing semicolon or comma?)at /tmp/yvjh0B5Asv:1------> 3method get-value() { return $!value; } }7⏏5 my Line $line; say $line.perl; say $lin expecting an…» | ||
Loren | why '$line' can access $!value ? In my perl6 it print 'Cannot look up attributes in a type object'. | 07:27 | |
FROGGS | m: class Line { has $!value; method get-value() { return $!value; } }; my Line $line; say $line.perl; say $line.get-value(); | ||
camelia | rakudo-moar 16d366: OUTPUT«LineCannot look up attributes in a type object in method get-value at /tmp/IcjD82gF79:1 in block <unit> at /tmp/IcjD82gF79:1» | ||
FROGGS | m: class Line { has $!value; method get-value() { return $!value; } }; my Line $line; say $line.perl; say try $line.get-value(); say try $line.new.get-value(); | 07:28 | |
camelia | rakudo-moar 16d366: OUTPUT«LineNil(Any)» | ||
FROGGS | Loren: attributes are to be used with class instances, so you need to instantiate first | ||
Loren | so the 'prototype-based OO programming' is not support now ? | 07:29 | |
moritz | you can have class attributes too | 07:30 | |
FROGGS | m: class Line { my $value; method get-value() { return $value; } } my Line $line; say $line.perl; say $line.get-value(); | 07:31 | |
camelia | rakudo-moar 16d366: OUTPUT«5===SORRY!5=== Error while compiling /tmp/exnwBEQ45HStrange text after block (missing semicolon or comma?)at /tmp/exnwBEQ45H:1------> 3 method get-value() { return $value; } }7⏏5 my Line $line; say $line.perl; say $lin expecting an…» | ||
FROGGS | m: class Line { my $value; method get-value() { return $value; } }; my Line $line; say $line.perl; say $line.get-value(); | ||
camelia | rakudo-moar 16d366: OUTPUT«Line(Any)» | ||
FROGGS | m: class Line { my $value = 42; method get-value() { return $value; } }; my Line $line; say $line.perl; say $line.get-value(); | ||
camelia | rakudo-moar 16d366: OUTPUT«Line42» | ||
moritz | Loren: there's not much support for prototype-based programming in Perl 6; but the meta object protocol is powerful enough that you could well implement it on your own | ||
Loren | camelia, thks | ||
07:32
ab5tract_ left
|
|||
Loren | moritz, thks, now i know. | 07:32 | |
07:33
zakharyas joined
|
|||
moritz hasn't the slightest idea why people would favor prototype-based OO | 07:35 | ||
07:36
Sqirrel left,
Sqirrel_ joined
|
|||
Loren | It seems like better than 'class-based'. | 07:36 | |
ShimmerFairy | moritz: I'm looking now, and I'm not sure I get what it even is. | 07:37 | |
masak | ShimmerFairy: may I recommend Steve Yegge's blog post on the matter? | 07:38 | |
moritz | Loren: better in what way? | ||
ShimmerFairy | masak: sure :) | ||
masak | moritz: it's not clear to me where protoype-based OO shines. I can use it, but it feels neither better nor worse than class inheritance. | ||
moritz | masak: my impression was that most JS OO patterns revolve around emulating class-based OO | 07:39 | |
masak | only about half of them. | ||
moritz: nowadays when I write stuff in JavaScript, I tend to favor things like Object.extend when creating objects. kind of leaning towards mixins. | |||
ShimmerFairy | masak: from what I've seen so far, Perl 6 makes the issues supposedly solved by prototype-based OO a non-issue (but to be fair I'm not sure I get it yet) | ||
moritz | ... and about another quarter evolve around the absence of block scoping | 07:40 | |
Loren | moritz, May be less coding work | ||
moritz | Loren: I haven't seen any evidence (or even examples) that support this claim | ||
masak | ShimmerFairy: steve-yegge.blogspot.se/2008/10/uni...ttern.html | 07:41 | |
moritz: no, I meant that about half of the JS code I see that uses OO, seems to want to first build an insulation layer of class-based OO on top of the prototype system. | 07:42 | ||
moritz: I take it to be mostly an unwillingness to adapt to prototype-based OO, and a belief that class-based OO works better for what they want to do. | |||
07:43
skids left
|
|||
moritz | masak: I think there's a real lack of educational material on how to design software with prototype-based OO | 07:43 | |
masak | and while I personally don't have an urge to layer class-based OO on top of what JS already has, I can kind of sympathise with the instinct to put something familiar in place of something unfamiliar. | ||
moritz: yes, that's part of why I like Yegge's post. | 07:44 | ||
it's definitely a different mode of thinking. in many cases, things get slightly easier. | |||
ShimmerFairy | "it's not especially well liked as an academic topic. This is because OO design has no real mathematical foundation to support it" oh no. the horror. save me. aaah. | ||
masak | but (as @getify points out), the really treacherous thing is that class inheritance is fundamentally based on *copying* whereas prototype OO is fundamentally based on *linking*. | 07:45 | |
Loren | it's very convenient in sometimes | ||
masak | ShimmerFairy: I could imagine a world where OO had a solid theoretical foundation. I wouldn't mind that. | ||
ShimmerFairy | masak: I'm just pointing out that I don't care for the mathematical view on programming. Knuth's DLX paper was the best thing I found on DLX, but that's in spite of the mathematical notation, and if I ever write about NFAs I'll stay clear from the utterly useless mathematical definition and jargon :) | 07:46 | |
masak | ShimmerFairy: I couldn't disagree more. | ||
it's far too easy to bash theory, not knowing or caring what it has done for computing. | 07:47 | ||
on the other hand, the fact that people can use all the fruits of theoretical work and be *oblivious* is also a kind of strength, I guess. | 07:48 | ||
ShimmerFairy | masak: I know the mathy bits are important, but for someone like me, I know programming through programming, not through math; mathematical notation and jargon when describing computer concepts is more than unhelpful to me. | ||
moritz | masak: I agree with your on the importance of mathematics; I also agree with ShimmerFairy that many theory articles could benefit from less jargon/notation | 07:49 | |
masak | fair enough. | ||
sometimes it seems that some articles introduce jargon/notation for the *authors*, not for the *readers* | 07:50 | ||
it's kind of the same issue as with readable source code | |||
ShimmerFairy | On the subject of NFAs, it's looking at diagrams and reading through walkthroughs of them that helped me get a grip on them, not this "five-tuple" crap :P | ||
07:51
leont joined,
n0tjack joined
|
|||
moritz | ShimmerFairy: a good theory teaches both | 07:53 | |
ShimmerFairy: try writing a sound proof while talking about walking through diagrams... | 07:54 | ||
masak | it's also a matter of what level you're getting in on. a really soft and furry tutorial will help a beginner. the five-tuple crap helps me, because I have a bit of math background already. | ||
ShimmerFairy | moritz: my main problem with mathematically-bent computer articles is that I'm looking up stuff so I know how to code it, and the mathematical view on programming is just about the most unhelpful thing in the world for that goal (for me at least). I need discussion with snippets of code, not with obscure mathematical expressions. | ||
moritz | ShimmerFairy: so you should be looking for cookbooks, not theory articles | 07:55 | |
masak | I agree with moritz that it's probably about most theory being presented badly. | ||
nine | I think, I'll rather read the book the blog post mentioned. Cannot be that much longer anyway. (Hint: if you have trouble with your blog posts becoming too long, don't repeat yourself endlessly and don't write about how your blog posts become too long...) | ||
masak | this is especially clear when reading academics who can write, such as SPJ or Eric Meier. | ||
07:55
n0tjack left
|
|||
ShimmerFairy | moritz: when trying to look up NFAs and DFAs for learning regexes, I only found math-based articles. It seemed like no-one can resist the high-level, computer science stuff :/ | 07:56 | |
[Tux] | test 50000 53.736 53.653 | 07:57 | |
test-t 50000 55.116 55.032 | |||
moritz | ShimmerFairy: have you read "Mastering Regular Expressions" by Friedl? | 07:58 | |
ShimmerFairy | If it's a book, then I surely haven't :) | 07:59 | |
07:59
espadrine joined
|
|||
moritz | well, it's rather good for learning regexes :-) | 07:59 | |
masak | ShimmerFairy: it's a bit like saying "when I tried to learn French, people kept bothering me with details about syntax and grammar :/" | ||
moritz | and yes, it's a book | ||
masak | "I don't want to learn grammar, I just want to learn French!" | ||
ShimmerFairy | masak: well, the issue is that I don't know computer science math at all. I want to learn how regexes work, not the entire foundational base of CS math :) | 08:00 | |
Loren | I don't want to learn En grammar, i just want to learn english. | ||
masak | Loren: :D | ||
Loren | masak, :p | 08:01 | |
masak | well, I wish you both the best of luck. (meant non-ironically.) | ||
nine | masak: the irony is, that you don't actually have to know Grammar to learn a language. I know practically no rules for English grammar, I just happen to have read enough English to get it right intuitively most of the time. | ||
masak | nine: I know, I know. | 08:02 | |
nine | Though I somtimes wish, I knew more :) | ||
masak | of course you can learn a language without ever talking about its grammar. and of course many people do that, every day. | ||
kind of a "learning by attrition". | |||
grondilu | yes but language teacher must justify their job. If people were learning languages as toddlers do, there would be no need for teachers. | 08:03 | |
masak | "grammar" was never a bad word to me. but at some point I realized that it was a bad word for others, kind of like "math", because they didn't see the point of it and it was just random rules to them. | ||
nine | Well knowing the rules can greatly speed up the process. | ||
masak | the reason we talk so much about grammar is that it's an unparalleled way to structure ideas about language and structures. | 08:04 | |
just like math is. | |||
ShimmerFairy | masak: I think I'd like it if CS math was written and talked about in terms of programming languages; I can't help but think traditional mathematical notation/jargon is completely inappropriate for programming :) | ||
TEttinger | ShimmerFairy: ... what's hard about five-tuple? are non-native english speakers expected to know every prefix for triplet, quartet, quintet, sextet, septet, etc.? | ||
ShimmerFairy | TEttinger: it's not the word, but the thing itself (which I couldn't be bothered to find back) | 08:05 | |
TEttinger | tuple? | ||
nine | You can learn a language's grammar by reading hundreds of books and watching TV for thousands of hours, or you can learn it by studying a grammar book. Of course latter is less entertaining, but definitely quicker. | ||
ShimmerFairy | TEttinger: no, the actual 5-tuple that's discussed when it comes to NFA/DFA | 08:06 | |
TEttinger | oh | ||
08:06
lizmat joined,
ab5tract_ joined
|
|||
masak | TEttinger: it's kind of a thing with five entries that completely describe an NFA. | 08:07 | |
ShimmerFairy | "NFAs can be described by this five-tuple" ok yes but what _is_ an NFA, actually? | ||
TEttinger | ahhhh | ||
masak | ShimmerFairy: yes, it sounds to me that you've been starting at the wrong entry level. | ||
reading Wikipedia, perhaps :) | |||
ShimmerFairy | masak: and every other webpage I could find on the subject, yes :) | ||
masak | at this point, you should stop, take stock, and find a better source text. | 08:08 | |
TEttinger | but what _is_ a ShimmerFairy? a collection of molecules? a collection of subatomic particles that make up molecules? magic? | ||
nine | Definitely magic | ||
masak | I would second moritz++' book recommendation. | ||
ShimmerFairy | Yeah, too bad it looks like I'd have to buy the book though :/ (to my non-surprise, my county's library system doesn't have it) | ||
masak | TEttinger: it's a 2-tuple of a fairy, and shimmer. | ||
ShimmerFairy: another sure-fire way to understand regexes is to re-implement a grammar engine in Perl 6. worked for me. | 08:09 | ||
TEttinger | at this point I like to recommend people to sit in on philosophy courses at an early college level and just watch as people either completely don't get it or get their minds blown | ||
nine | ShimmerFairy: the irony is that you throw around words like "allomorphic" which I've never heard in > 20 years of programming and sound very mathy to me ;) | ||
masak | heh | 08:10 | |
ShimmerFairy | nine: to be fair, I didn't come up with the term :P | ||
masak | I'm wary of allomorphic things. not because of the term itself, but what the term *means*. | ||
TEttinger | I'm wary of allosaurs | 08:11 | |
which I assume are allomorphic | |||
masak | almost certainly. | ||
ShimmerFairy | And I do enjoy math quite a bit (I've looked up some statistics so I can calculate if benchmark timing differences are "statistically significant", for example). Just not the CS math. Never got into it, and I don't see how it could help me with my actual coding | ||
TEttinger | ShimmerFairy, yeah, for the most part I'm the same way | 08:12 | |
I enjoy "rediscovering" basic math stuff... since I've done it on math tests for some time :) | |||
08:13
dakkar joined
|
|||
TEttinger | "oh crap what's the formula for x-distance of a point on the unit sphere... uh... pythagoras, I choose you!" | 08:13 | |
ShimmerFairy | masak: funny thing is, I was looking up this stuff to reason about possibly implementing a P6 grammar engine :P (because I'd like to implement an emacs major mode for Perl 6, and I'd like to have a Real Parser™ to figure out P6 files) | ||
masak | ShimmerFairy: it may even help you to study the commit history of GGE. | 08:14 | |
tadzik | FROGGS: huh, very weird | ||
masak | ShimmerFairy: it starts very simply (and test-based) and gets more advanced as it goes. | ||
ShimmerFairy | The main problem with emacs' default facilities, btw, seems to be that there's no (easy?) way to provide context to them. | ||
masak | ShimmerFairy: things like this: github.com/masak/gge/commit/8f5369...f9b691f007 | 08:16 | |
TEttinger | this is about the extent of technical papers that I can follow, and thankfully it's rather computer-not-science-y in terms of the operations it describes: www.pcg-random.org/paper.html | ||
masak | (just an example) | ||
TEttinger | (absolutely great idea for an RNG, btw) | ||
lizmat | commute some further, Basque country, here we come! & | 08:17 | |
08:17
lizmat left
|
|||
ShimmerFairy | masak: I'll be sure to keep the book and GGE in mind whenever I revisit the topic :) | 08:17 | |
masak | :) | ||
ShimmerFairy | Also, emacs' regexps are absolutely horrible, so there's also incentive to write a parser for the kind of regexes that aren't mind-numbing :P | 08:18 | |
08:24
laouji left
|
|||
_itz | magala airport was flooded yesterday with many cancelled flights but we managed to escape | 08:25 | |
tokuhiro_ | how do i call c function has varargs like printf with NativeCall? | 08:26 | |
08:27
abraxxa joined
|
|||
FROGGS | tokuhiro_: you don't (yet) :o( | 08:28 | |
tokuhiro_ | :( | ||
FROGGS | tokuhiro_: but you are welcome to help implementing that | ||
tokuhiro_: the backends we use (dyncall / libffi) support that | 08:29 | ||
tokuhiro_: we just don't make use of that currently | |||
tokuhiro_ | FROGGS: i see | ||
08:31
laouji joined
|
|||
ShimmerFairy | masak: also, that Yegge post is quite long, so I'll have to read it in-between doing other stuff :) . But from what I've seen from everything so far, I can't help but wonder if prototype-based OO would be a fit for implementing an MDL compiler (there was a mention of Lisp, I saw, so maybe) | 08:32 | |
08:37
aborazmeh left
08:39
pmurias joined
|
|||
BooK | just wondering: is there a Perl6 lib for OAUTH yet? | 08:42 | |
ShimmerFairy | Haven't heard of one, but I don't keep track of modules that well :) try modules.perl6.org and see if something's there | 08:43 | |
pmurias | do the CREDITS in nqp get updated? the tests seem to use that file | 08:44 | |
not sure how much can I assume about that file when writing tests? | 08:45 | ||
FROGGS | pmurias: well, we would recognize test failures after updating it... and we really do not touch that file often | ||
I mean, it is three years old now | |||
nine | BooK: or use one of the Perl 5 OAUTH modules | ||
mrf | nine++ # Inline all the things | 08:46 | |
FROGGS | Inline::COBOL /o/ | ||
mrf | NO! | ||
mrf would be happy if he never has to see COBOL again. | 08:47 | ||
FROGGS | :D | 08:48 | |
ShimmerFairy | I wonder if S05 should have an operator precedence table like S03 does (right now I want to know if [a | b || c] means [ [a | b] || c ]) | 08:49 | |
08:49
leont left
08:50
pmurias left
08:51
Ven left
08:52
Ven joined
08:53
laouji left
08:56
Ven left
|
|||
FROGGS | tokuhiro_: fwiw, I'd be happy to work on varargs (with you or alone) after I got C++ support merged after the JVM build is healthy again... | 08:58 | |
08:59
laouji joined
|
|||
labster | Can someone tell me if this commit is a good idea? github.com/labster/rakudo/commit/c...34cd25f794 I'm trying to fix Rat.perl doing too much rounding. | 09:00 | |
m: say <1/128> == <1/128>.perl.EVAL | |||
camelia | rakudo-moar 16d366: OUTPUT«False» | ||
tokuhiro_ | FROGGS: i want to implement it but i don't have knowledge around it :( | 09:02 | |
FROGGS | tokuhiro_: well, that's what collab is for :o) | 09:05 | |
09:06
laouji left
|
|||
tokuhiro_ | :) | 09:06 | |
FROGGS | we can learn it together | ||
09:06
laouji joined
|
|||
tokuhiro_ | yep | 09:06 | |
09:15
pmurias joined
|
|||
dalek | p/js: 7844967 | (Pawel Murias)++ | / (4 files): Implement nqp::setinputlinesep. Test that it works with a input separator consisting of two characters. |
09:17 | |
p/js: 77d3834 | (Pawel Murias)++ | src/vm/js/bin/run_tests: Add passing test 19 to run_tests. |
|||
09:22
abraxxa left,
abraxxa joined
09:25
ab5tract_ left,
ab5tract_ joined
|
|||
ab5tract_ | o/ #perl6 | 09:25 | |
09:26
cognominal joined
|
|||
ab5tract_ | .tell nine I should have clarified further that my "sets are hashes, mmkay" feeling is deeply related to only ever using hashes for sets. This is surely a Perl-ish attitude. Anyway, I totally support efforts to make sets feel more natural to the people who actually have strong opinions about them | 09:28 | |
yoleaux | ab5tract_: I'll pass your message to nine. | ||
pmurias | ab5tract_ \o | 09:34 | |
psch | hi #perl6 o/ | ||
yoleaux | 05:08Z <FROGGS> psch: thanks for the hint... now I just need to figure out what that means :o) | ||
psch | FROGGS: well, the dispatch for postcircumfix:<{ }> seems to hit the candidate in src/core/hash_slice.pm:49, whereas it probably should hit the "is parcel" one in line 12 of the same file | 09:37 | |
09:38
quester left
|
|||
psch | FROGGS: although maybe $tag is to blame after all, i haven't look in that direction | 09:40 | |
FROGGS | psch: $tag or rather @tags is to blame | 09:41 | |
psch: I can potentially explain it in more detail this evening | 09:42 | ||
09:48
TEttinger left
09:50
rmgk left
09:51
rmgk joined
09:54
abraxxa left
|
|||
ab5tract_ | psch: wouldn't the fact that parcel has been removed invalidate the is parcel candidate? | 09:59 | |
10:03
rindolf joined
|
|||
psch | ab5tract_: we still have a parcel trait_mod | 10:03 | |
Parcel has been removed | |||
FROGGS: fair enough, i have a tendency to blame nqp-j in general, because i can't shake the feeling that something in there must be somhow wrong - probably mostly because of its slowness... :) | 10:04 | ||
FROGGS | psch: no, it is not just the slowness... | 10:05 | |
10:11
laouji left
|
|||
jnthn | "is parcel" is the name of the trait that maps to \foo in a sig | 10:14 | |
We probably should rename it at some point :) | |||
But since you always express it as \foo it's not high priority | |||
FROGGS | jnthn: btw, what's your feeling of that line: | 10:15 | |
my int $SIG_ELEM_SLURPY := ($SIG_ELEM_SLURPY_POS +| SIG_ELEM_SLURPY_NAMED +| $SIG_ELEM_SLURPY_LOL); | |||
FROGGS .oO( We need more dollars, dollars, dollars... ) | |||
jnthn | Where is it? :) | ||
FROGGS | BOOTSTRAP.nqp:99 | ||
jnthn | Also, I think it's missing a $ :) | ||
FROGGS | aye :o) | 10:16 | |
jnthn | Curious how little it breaks ;) | ||
10:16
laouji joined
|
|||
jnthn | Maybe we don't need the SIG_ELEM_SLURPY_NAMED in there at all? | 10:16 | |
If nothing's broken I'd just remote that :) | |||
*remove | |||
10:19
rarara joined
|
|||
FROGGS | lunch & | 10:19 | |
JimmyZ | we have method pop(Array:D:) is parcel | 10:20 | |
Does it mean return \foo? | |||
jnthn | Well, means "return exactly what is returned" | 10:21 | |
psch | named params also need the trait. i also agree that renaming might be a good idea, but don't have a suggestion for the new name | ||
jnthn | Aye | ||
Me either | |||
"is raw" is a bit undescriptive | |||
jnthn won't worry about it much for now :) | |||
10:25
xfix joined
|
|||
ShimmerFairy | "is noncont[ainerized]" ? :P | 10:25 | |
JimmyZ | is original :P | ||
jnthn | is not-screwed-with | 10:26 | |
nine | If I had known that there is such a trait, I'd not have had to fix those Pair creation bugs... | 10:27 | |
yoleaux | 09:28Z <ab5tract_> nine: I should have clarified further that my "sets are hashes, mmkay" feeling is deeply related to only ever using hashes for sets. This is surely a Perl-ish attitude. Anyway, I totally support efforts to make sets feel more natural to the people who actually have strong opinions about them | ||
nine | It's probably a good thing that I didn't know then ;) | ||
10:29
abraxxa joined
|
|||
abraxxa | FROGGS: hi! I'm working on DBDish::Oracle again and wonder if there where NativeCall improvements in the last few releases? | 10:30 | |
10:30
virtualsue joined
10:36
andreoss joined
|
|||
dalek | kudo/nom: b6d3180 | jnthn++ | src/core/ (2 files): A couple of exception types for shaped arrays. |
10:37 | |
kudo/nom: 2f06734 | jnthn++ | src/core/Array.pm: Add default shape method for unshaped Array. |
|||
kudo/nom: 1f3372e | jnthn++ | src/core/Array.pm: Take (but currently ignore) shape in Array.new. |
|||
nine | Oh, shaped arrays almost done? | 10:38 | |
10:38
pat_js joined
10:39
dayangkun left
|
|||
jnthn | Well, the VM guts are almost done ;) | 10:39 | |
Working on the Perl 6 level now | |||
10:40
pmurias left
|
|||
nine | Well I usually consider work that's been started as almost done...so jay shaped arrays! And yes, I'm an optimist ;) | 10:40 | |
jnthn | During GLR when I re-did the [;] slicing stuff I did it in a way that makes shaped arrays easier | 10:41 | |
10:41
pmurias joined
|
|||
jnthn | Or paved the way for them | 10:41 | |
So, now to try and write up all the pieces. :) | |||
*wire | |||
nine | Yeah, I had a hunch that it's good that you tackled the slicing parts | 10:42 | |
ab5tract_ | much excitement! | ||
10:44
n0tjack joined
|
|||
baest | jnthn: very nice! | 10:44 | |
10:45
virtualsue left
10:50
n0tjack left
10:51
telex left
10:52
telex joined
|
|||
_itz | ok >GLR has is-lazy .. is there a simple way of doing that with pre GLR code? | 10:55 | |
jnthn | _itz: .infinite may approximate it, though it's different | 10:56 | |
_itz | ok ty | ||
jnthn | perl6-m -e "my @a := Array.new(:shape(5)); @a[5] = 42;" | ||
Index 5 for dimension 1 out of range (must be 0..4) in block <unit> at -e:1 | |||
Progress :) | |||
10:59
brrt joined
|
|||
dalek | p: 64a0872 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/MultiDimArrayInstanceBase.java: Fix off-by-one in error reporting. |
11:00 | |
kudo/nom: cbf85b3 | jnthn++ | src/core/Array.pm: First steps for shaped arrays. No multi-dim indexing support yet, but Array.new(:shape(5)) will now enforce the fixed size. |
11:01 | ||
jnthn | Apparently it's time to eat lunch :) | 11:02 | |
bbiab | |||
11:07
laouji left
11:09
Skarsnik joined
11:10
Loren left
|
|||
psch | m: my $s = (:types, :DEFAULT); my @a = flat "ALL", $s>>.key(); say @a.perl | 11:11 | |
camelia | rakudo-moar cbf85b: OUTPUT«["ALL", "types", "DEFAULT"]» | ||
psch | $ ./perl6-j -e'my $s = (:types, :DEFAULT); my @a = flat "ALL", $s>>.key(); say @a.perl' | ||
["ALL", ("types", "DEFAULT")] | |||
/o\ | |||
TimToady | sitting in Oslo, 4 hour delay... :/ | 11:14 | |
moritz | Oslo is nice. Gardemoen not so much :=) | ||
11:15
Possum joined
11:18
dpk joined
11:23
Sqirrel joined,
Sqirrel_ left
|
|||
dalek | p/js: 52d13fe | (Pawel Murias)++ | / (4 files): Preprocess regex tests (as we can't easily compile them at runtime before the bootstrap). For now pass rx_basic. |
11:26 | |
11:27
Loren joined
|
|||
jnthn | TimToady: Aww :( | 11:28 | |
And Malaga - Oslo can't have been short... | |||
moritz | 4h, maybe? | 11:30 | |
TimToady | a bit more | ||
but we had a headwind | |||
FROGGS | abraxxa: I think there were some improvements... the docs/Changelog will tell | 11:31 | |
oetiker | jnthn did you find the fondue in olten ? | ||
abraxxa | FROGGS: in which repo? I always fail to find the correct one on github | ||
FROGGS | abraxxa: github.com/rakudo/rakudo/blob/nom/.../ChangeLog | 11:32 | |
abraxxa | FROGGS: thanks | ||
jnthn | oetiker: Yes, we did! :) | 11:33 | |
oetiker | \o/ | ||
abraxxa | why does rakudobrew not list 2015.08? | ||
jnthn | oetiker: Thanks for the tip...it was a really rather nice one. :-) | 11:34 | |
oetiker: We managed to get a nice table outside also. | |||
nine | abraxxa: we didn't do a release in August | ||
oetiker | beautiful :-) | ||
jnthn | abraxxa: There was no 2015.08. | ||
abraxxa | jnthn: the rakudo ChangeLog has an entry and I saw the tag | 11:35 | |
so only a rakudo release but no moar release? | |||
jnthn | oetiker: Indeed. :) | ||
11:36
brrt left
|
|||
jnthn | abraxxa: Don't think there was a Rakudo release actually cut/uploaded anywhere either. | 11:36 | |
moritz | abraxxa: there's no rakudo 2015.08 tag | 11:37 | |
abraxxa: changelog yes, because I started the release process | |||
11:37
dustinm` left
|
|||
jnthn | abraxxa: www.nntp.perl.org/group/perl.perl6....11182.html | 11:37 | |
abraxxa | the MoarVM repo has a 2015.08 tag | 11:38 | |
i saw it when rakudobrew updated the git repos | |||
jnthn | I think there maybe was a MoarVM release. | ||
Though not sure the site got updated yet | |||
abraxxa | no problem, thanks | 11:39 | |
jnthn | Seems timotimo++ tagged it | ||
timotimo: Did you by any chance make a Moar 2015.08 tarball? | |||
[Coke] | TEttinger++ | 11:40 | |
11:41
Urchin joined
|
|||
[Coke] | 1,038 RTs | 11:45 | |
(14 GLR tickets still open) | 11:46 | ||
11:47
n0tjack joined
11:49
dustinm` joined
11:51
n0tjack left
11:54
pmurias left
|
|||
TimToady | m: say 0.91723840987192374893723.perl.EVAL | 11:58 | |
camelia | rakudo-moar cbf85b: OUTPUT«===SORRY!===Cannot find method 'compile_time_value'» | ||
[Coke] | jnthn: is updating S07 on your list before the september release? | 12:00 | |
12:00
domidumont left
|
|||
[Coke] | Be nice if we had a place to point to details about the GLR from the changelog. | 12:00 | |
12:00
pmurias joined
12:02
domidumont joined
|
|||
[Coke] | (no pressure, just thought I saw you mention it this weekend) | 12:04 | |
andreoss | m: say 0.9999999999999999999999.perl.EVAL | 12:06 | |
camelia | rakudo-moar cbf85b: OUTPUT«0.1» | ||
moritz | that's bad :( | 12:08 | |
m: say 0.9999999999999999999999.perl | |||
camelia | rakudo-moar cbf85b: OUTPUT«0.10» | ||
moritz | that's very bad :( | ||
m: say 0.9999999999999999999999 | 12:09 | ||
camelia | rakudo-moar cbf85b: OUTPUT«0.10» | ||
moritz | m: say 0.9999999999999999999999 - 0.1 | ||
camelia | rakudo-moar cbf85b: OUTPUT«0.9» | ||
moritz | m: say 0.9999999999999999999999 - 0.9 | ||
camelia | rakudo-moar cbf85b: OUTPUT«0.1» | ||
moritz | m: say 0.9999999999999999999999 - 0.9999 | ||
camelia | rakudo-moar cbf85b: OUTPUT«0.0001» | ||
moritz | m: say 0.0999999999999999 | 12:10 | |
camelia | rakudo-moar cbf85b: OUTPUT«0.0999999999999999» | ||
moritz | m: say 0.09999999999999999999999 | ||
camelia | rakudo-moar cbf85b: OUTPUT«0.1» | ||
moritz | so it's only overflow over the decimal point that results in a bad stringification | ||
TimToady | exceeds 66-bit denominator, I expect | 12:14 | |
[Coke] | r: my Int @a=^3; @a[1]:delete; @a.map:{say .WHAT.perl }; @a[1].WHAT.perl.say | 12:15 | |
camelia | rakudo-jvm cbf85b: OUTPUT«Can't open perl script "/home/camelia/rakudo-inst/bin/eval-client.pl": No such file or directory» | ||
..rakudo-moar cbf85b: OUTPUT«IntAnyIntInt» | |||
moritz | m: say 0.09999999999999999999999.^name | ||
camelia | rakudo-moar cbf85b: OUTPUT«Rat» | ||
ShimmerFairy | m: say :16<0.FFFFFFFFFFFFFFF0>; say :16<0.FFFFFFFFFFFFFFF1> | 12:16 | |
camelia | rakudo-moar cbf85b: OUTPUT«0.999999999999999999130.10» | ||
moritz | TimToady: still a rat | ||
m: say 0.9999999999999999999999.nude | |||
camelia | rakudo-moar cbf85b: OUTPUT«(9999999999999999999999 10000000000000000000000)» | ||
moritz | m: say 0.9999999999999999999999.Str | ||
camelia | rakudo-moar cbf85b: OUTPUT«0.10» | ||
moritz | it's really a bug in Rat.Str | ||
ShimmerFairy | TimToady: unless I'm mistaken, doesn't Rat still have an Int denominator instead of UInt64 in rakudo's implementation? | ||
TimToady | could be | ||
moritz submits rakudobug | 12:17 | ||
unless andreoss++ wants the honor, of course | |||
ShimmerFairy | yeah | ||
TimToady: There is a UInt64 in rakudo, but it's defined as a subset, so I'm not sure changing Rat will actually make it any better than a FatRat atm :) | 12:18 | ||
moritz | ShimmerFairy: it does make it better | ||
ShimmerFairy | how is an Int with an extra constraint better than an Int? (Or better than a UInt64 linked to a sized native type?) | ||
moritz | ShimmerFairy: it avoids quadratic runtime behavior on things like newton's algorithm converting on sqrt(2) | 12:19 | |
ShimmerFairy: it does overflow to Num eventually | |||
m: say (1 / 2**65).^name | |||
camelia | rakudo-moar cbf85b: OUTPUT«Num» | ||
moritz | which prevents runaway numerator and denominator sizes | 12:20 | |
dalek | kudo/nom: b2fea84 | coke++ | docs/ChangeLog: 2015.08 was skipped. |
||
ShimmerFairy | moritz: true, having a sized denominator would help cap the Rat at a particular point, what I meant was that I'm not sure the current UInt64 would provide the kind of performance improvement over FatRat that's talked about | ||
moritz | ShimmerFairy: it's not UInt64 that provides the performance improvement; it's the fallback to Num that does | 12:21 | |
hoelzro | o/ #perl6 | ||
yoleaux | 7 Sep 2015 11:57Z <pmurias> hoelzro: before merging in js into the master branch remember to run the tests for the jvm/moar backends to make sure our improved test suit doesn't uncover any bugs in those | ||
hoelzro | pmurias: will do | ||
ShimmerFairy | moritz: oh. The way the specs talked about it, it always seemed like it was the sized type itself. Either the specs need to be clarified, or I didn't read the right parts closely enough :/ | 12:22 | |
(that is, of what I've seen nowhere in the specs where it mentioned that FatRat was worse in performance did it mention that it was because Rat has a fallback and FatRat doesn't) | 12:24 | ||
12:24
[Sno] left
|
|||
moritz | RT #126016 filed for the Rat.Str bug | 12:25 | |
12:26
brrt joined
|
|||
moritz | ShimmerFairy: perlpunks.de/paste/show/55eed3ed.19dd.15f newton approximation converging on sqrt(2) | 12:26 | |
ShimmerFairy: just run it ones as is, and once with a normal Rat as starting value | |||
maybe with only 12 or 15 iterations instead of 20, if you're impatient :-) | 12:28 | ||
literal | m: %foo<bar><baz><quux> | ||
camelia | rakudo-moar cbf85b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hUvZaeU4ZoVariable '%foo' is not declaredat /tmp/hUvZaeU4Zo:1------> 3<BOL>7⏏5%foo<bar><baz><quux>» | ||
literal | is there a way to invoke rakudo-moar in lax mode here? | ||
12:29
[Sno] joined
|
|||
FROGGS | m: no strict; %foo<bar><baz><quux> | 12:30 | |
camelia | rakudo-moar cbf85b: OUTPUT«X::Multi::NoMatch exception produced no message in block <unit> at /tmp/IXpit3CwEc:1» | ||
literal | I see | ||
psch | m: no strict; $x = 5; say $x | ||
camelia | rakudo-moar cbf85b: OUTPUT«5» | ||
literal | and why doesn't this run? stricter autovivification? | ||
psch | the failure mode for the hash access looks pretty weird | 12:31 | |
m: no strict; %h<foo> = "bar"; say %h.perl | |||
camelia | rakudo-moar cbf85b: OUTPUT«{:foo("bar")}» | ||
psch | m: no strict; %h<foo><baz><quux> = "bar"; say %h.perl | ||
camelia | rakudo-moar cbf85b: OUTPUT«X::Multi::NoMatch exception produced no message in block <unit> at /tmp/UUeJyp5Tg0:1» | ||
FROGGS | m: my %h; %h<foo><baz><quux> = "bar"; say %h.perl | 12:32 | |
camelia | rakudo-moar cbf85b: OUTPUT«{:foo(${:baz(${:quux("bar")})})}» | ||
FROGGS | m: my %h<foo><baz><quux> = "bar"; say %h.perl | ||
camelia | rakudo-moar cbf85b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eS3Q57_kdtShaped variable declarations not yet implemented. Sorry. at /tmp/eS3Q57_kdt:1------> 3my %h<foo>7⏏5<baz><quux> = "bar"; say %h.perl» | ||
FROGGS | m: our %h<foo><baz><quux> = "bar"; say %h.perl | ||
camelia | rakudo-moar cbf85b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PlQlie5e31Shaped variable declarations not yet implemented. Sorry. at /tmp/PlQlie5e31:1------> 3our %h<foo>7⏏5<baz><quux> = "bar"; say %h.perl» | ||
12:33
bbkr_ left
|
|||
abraxxa | doc.perl6.org/language/5to6 doesn't mention Perl 6s' undef equivalent | 12:34 | |
psch | abraxxa: "Since Perl 6 does not allow adding/removing symbols in a lexical scope once it has finished compiling, there is no equivalent to Perl 5's undef &foo;" | 12:35 | |
moritz | m: our %h; say %h.^name | 12:36 | |
camelia | rakudo-moar cbf85b: OUTPUT«Hash» | ||
literal | psch: that's a different thing though | ||
abraxxa | psch: i guess that would remove the sub foo from the symbol table in Perl 5 although I've never (ab)used it | ||
perl6 -e 'my $foo; say $foo.perl;' returns Any | |||
literal | m: @foo[0] | 12:37 | |
camelia | rakudo-moar cbf85b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/y05Z8I4YWxVariable '@foo' is not declaredat /tmp/y05Z8I4YWx:1------> 3<BOL>7⏏5@foo[0]» | ||
andreoss | m: my &foo; say &foo.Perl | ||
camelia | rakudo-moar cbf85b: OUTPUT«Method 'Perl' not found for invocant of class 'Callable' in block <unit> at /tmp/_SG71yxh1x:1» | ||
literal | m: no strict; @foo[0] | ||
camelia | ( no output ) | ||
andreoss | m: my &foo; say &foo.perl | ||
camelia | rakudo-moar cbf85b: OUTPUT«Callable» | ||
literal | m: no strict; @foo[0].perl | ||
camelia | ( no output ) | ||
literal | m: no strict; say @foo[0].perl | 12:38 | |
camelia | rakudo-moar cbf85b: OUTPUT«Mu» | ||
psch | abraxxa: i take that to mean you're wondering about assignment RHS undef? i think Nil does that in p6, but you're right that it's not mentioned | ||
TimToady | m: &sleep.wrap({ die "I'm undefined" }); sleep 3 | ||
camelia | rakudo-moar cbf85b: OUTPUT«I'm undefined in block <unit> at /tmp/AobxTMOX5Q:1» | ||
abraxxa | psch: i have to compare a list of returned database values and need the Perl 6 equivalent of SQL NULL | 12:39 | |
literal | so why is an empty array element 'Mu' and an unassigned scalar is 'Any' ? and where would Nil come in? :P | ||
abraxxa | [ Any, Any, 1 ], works | ||
moritz | m: my @a; @a[3] = 1; say @a[0] | 12:40 | |
camelia | rakudo-moar cbf85b: OUTPUT«(Any)» | ||
moritz | seems to be Any, not Mu | ||
psch | m: no strict; @a[3] = 1; say @a[0] | ||
camelia | rakudo-moar b2fea8: OUTPUT«(Mu)» | ||
literal | I guess it's only Mu when @foo itself was not declared | ||
oh, or not | |||
abraxxa | but isn't that just wrong when used in tests because it would allow any value instead of just undef? | 12:41 | |
moritz | I'd say this is a bug in 'no strict' | ||
abraxxa | and isn't Any the root type and not a value? | ||
moritz | abraxxa: it should test !.defined | ||
abraxxa: types are also values | |||
abraxxa | moritz: github.com/abraxxa/DBIish/blob/mas...#L159-L161 | 12:44 | |
suggestions how to solve this welcome | |||
moritz | abraxxa: uhm, what's the problem there? | 12:48 | |
12:48
n0tjack joined
|
|||
abraxxa | moritz: I have added rows to that table where not all columns have a value | 12:48 | |
e.g. github.com/abraxxa/DBIish/blob/mas...n.pl6#L115 | 12:49 | ||
just fixing the now failing tests | |||
12:50
shinobi-cl joined
|
|||
jdv79 | .tell lizmat why doesn't S22 root a dist archive with the dist+ver like a p5 one? | 12:52 | |
yoleaux | jdv79: I'll pass your message to lizmat. | ||
12:52
n0tjack left
|
|||
jdv79 | FROGGS: do you know if there's a reason for that? | 12:54 | |
most tarballs, p5 and not, usually have a top level dir of the same name as the file itself - at least that i've seen | 12:55 | ||
_itz | is S07-glr-draft.pod still mostly correct? | 13:00 | |
FROGGS | jdv79: I did not think about that yet tbh... | ||
jdv79 | can we just do that then? normally when i tar -zxvf a file i expect it to politely create one dir with all the stuff it spews | 13:01 | |
is one nice feature | |||
_itz | oh it still talks about Parcels | 13:02 | |
_itz looks confused | |||
jdv79 | plus if it was the same as the p5 way there is less friction/confusion - type of stuff | ||
ShimmerFairy | jdv79: what are you talking about, precisely? Does P6 offer a tar-like thing or something? | 13:03 | |
jdv79 | no | ||
perl5 distribution tarballs are of the basename $dist-$ver and they contain one subdir of that same name in which aall else is | 13:04 | ||
the perl6 META6.json detection code at pause is looking for '^META6.json'. this is the problem. | 13:05 | ||
brrt is wondering if anybody made a list of the great-tools-used-in-japan slides | |||
jdv79 | i packaged my dist in the p5 way and the indexer failed | ||
hence why github.com/andk/pause/issues/185 | 13:06 | ||
brrt | slideshare has it: www.slideshare.net/junichiishida/gr...-dont-know | ||
ShimmerFairy | jdv79: is that why your upload failed with that "duplicate package" warning? | 13:07 | |
jdv79 | no, that bug was fixed y'day. | ||
so i got past that issue and this is the new one | |||
i would like some consensus on the dist layout before m PR is applied as it seems to take a decent amount of time to get things done over there | 13:09 | ||
*my | |||
ShimmerFairy | jdv79: cool :) and yeah, that seems like a bug. Does that regex allow the META6.json anywhere in the package? Because that seems like a bad idea, I think I'd prefer "top-level, considering one top directory in the tarfile as the 'real' top-level", or something to that effect | 13:10 | |
jdv79 | right now it pegs it to the top level of the tarball. i would like it to peg it to one subdir down. | 13:11 | |
yeah, I just need liz and/or froggs to weigh in. | 13:12 | ||
ShimmerFairy | jdv79: yeah, I personally wouldn't mind enforcing the common-courtesy tarballs are known for (I very rarely see a .tar.* that doesn't unpack as one directory, and such tarballs are very undesirable, imo) | ||
jdv79 | yup | 13:13 | |
13:14
sufrostico joined
|
|||
ShimmerFairy | btw, I hope the "must specify Perl6/" thing is temporary, since that feels like a bad permanent solution | 13:17 | |
jdv79 | in what way? | 13:20 | |
we could put up a page that does that automatically or hide it behind a tool but cpan using that dir to house p6 content is pretty solid i think | 13:21 | ||
ShimmerFairy | jdv79: not the fact that we're using Perl6, but the fact that I have to manually type it into the "target directory" field | 13:22 | |
13:22
n0tjack joined
|
|||
jdv79 | yeah, next iteration maybe;) | 13:23 | |
pmurias | hoelzro: \o | 13:25 | |
ShimmerFairy | also, does that "can never upload a same-named file, even if deleted" apply to P6 files too? | ||
jdv79: well, next iteration would possibly be a "Yes, this is Perl 6" checkbox :P | |||
13:25
hernanGOA joined
13:26
tokuhiro_ left,
n0tjack left
|
|||
jdv79 | yes and ok | 13:27 | |
psch | vivifying array elements to Any instead of Mu under "no strict" seems to work with specifying Any as a fallback to $*OFTYPE in the container_type_info in $*W.auto_declare_var | 13:31 | |
i'm not sure it's really supposed to be that easy, though | 13:32 | ||
also, RT #124912 has me a bit stumped | |||
as in, i'm unsure if "no strict" propagating into EVAL is really that sensible | 13:33 | ||
OTOH, it's probably less surprising if it did, which is probably reason enough | |||
nine | _itz: that seems to be the closest we've got to GLR documentation: gist.github.com/niner/d5f825c07ce1f7a6f7bb | 13:34 | |
psch | but i think that means teaching HLL::Compiler about "no strict"... | ||
13:34
pmurias left
|
|||
_itz | nine: thanks | 13:40 | |
13:40
CQ left
|
|||
_itz | nine: I was also experimenting with gist.github.com/stmuk/de108fc081e45876d1e4 as a learning tool for myself | 13:41 | |
dalek | ast: 0dc659a | TimToady++ | S03- (3 files): test .is-lazy on xx, .., and ... |
13:43 | |
ast: 14d11da | TimToady++ | S32-num/rat.t: test (1/128).perl.EVAL trips round |
|||
psch | hm, except the container_type_info fix mentioned above makes autodeclared hashes weird | ||
$ ./perl6 -e'no strict; %a<a> = 0; say %a.perl' | |||
(my Any % = :a(0)) | |||
i'm pretty sure that's not right | 13:44 | ||
13:44
CQ joined
|
|||
dalek | kudo/nom: 2d6ee41 | TimToady++ | src/core/Rat (2 files): .base now can take * digits also .base-repeating no longer fails on negatives |
13:46 | |
ShimmerFairy | psch: I'd like to see some spec confirmation before we consider 124912 a bug. (I personally don't think 'no strict' is worth having in the first place, so I'm not inclined to make this work, but that's just me) | 13:47 | |
_itz | github.com/perl6/doc/issues/116 | 13:48 | |
13:48
brrt left
|
|||
psch | ShimmerFairy: design is rather thin regarding anything lax mode, unfortunately | 13:49 | |
ShimmerFairy | psch: because it shouldn't be there in the first place :D . More seriously, I've thought about it a bit today, and I've come to the conclusion that 'no strict' exists in P6 only because P5 had a concept of strictures, so I'm inclined to say "you can't be lazy, there is no lax mode". Perhaps a 6.1 change, if not sooner :) | 13:50 | |
jnthn back | 13:51 | ||
TimToady | m: say 1/128 == (1/128).perl.EVAL | ||
camelia | rakudo-moar b2fea8: OUTPUT«False» | ||
jnthn | [Coke]: Yes, I already re-writing S07 | ||
TimToady | that should fix itself with recompile | 13:52 | |
FROGGS | m: say $*PERL.build-date | 13:53 | |
camelia | rakudo-moar b2fea8: OUTPUT«Method 'build-date' not found for invocant of class 'Perl' in block <unit> at /tmp/6xD7kGQQ_9:1» | ||
FROGGS | m: say $*KERNEL.build-date | ||
camelia | rakudo-moar b2fea8: OUTPUT«Method 'build-date' not found for invocant of class 'Kernel' in block <unit> at /tmp/j2mnt2zN1G:1» | ||
FROGGS | m: say $*COMPILER.build-date | ||
camelia | rakudo-moar b2fea8: OUTPUT«Dynamic variable $*COMPILER not found in block <unit> at /tmp/WlH0s6EESz:1Actually thrown at: in any at src/gen/m-Metamodel.nqp:2869 in block <unit> at /tmp/WlH0s6EESz:1» | ||
psch | ShimmerFairy: but laziness is one of the three virtues! ;) | ||
FROGGS | m: say $*PERL.compiler.build-date | ||
camelia | rakudo-moar b2fea8: OUTPUT«2015-09-08T13:09:28Z» | ||
psch | ShimmerFairy: in seriousness though, i doubt "no strict" will go away, but the interaction between strictness and EVAL is definitely underspecified | 13:56 | |
_itz | s: say (Array).^roles | 13:57 | |
jnthn | s? :) | ||
_itz | star: say (Array).^roles | ||
camelia | star-m 2015.03: OUTPUT«(Positional)» | ||
TimToady | boarding & | 13:58 | |
_itz | m: say (Array).^roles | ||
camelia | rakudo-moar b2fea8: OUTPUT«Method 'iterator' must be implemented by Iterable because it is required by a role in any compose_method_table at src/gen/m-Metamodel.nqp:2666 in any apply at src/gen/m-Metamodel.nqp:2676 in any compose at src/gen/m-Metamodel.nqp:2812 in an…» | ||
jnthn | m: say (Array).^roles.map({.^name}) | ||
camelia | rakudo-moar b2fea8: OUTPUT«(Positional Iterable)» | ||
_itz | m: say (Array).^roles.WHAT | ||
camelia | rakudo-moar b2fea8: OUTPUT«(List)» | ||
13:59
perlawhirl joined
|
|||
ShimmerFairy | psch: like I said, perhaps only in 6.1, but I definitely don't know what the value of lax mode is, so atm I kinda would like to make it go away. :) | 13:59 | |
jnthn | m: say Iterator | ||
camelia | rakudo-moar b2fea8: OUTPUT«Method 'pull-one' must be implemented by Iterator because it is required by a role in any compose_method_table at src/gen/m-Metamodel.nqp:2666 in any apply at src/gen/m-Metamodel.nqp:2676 in any compose at src/gen/m-Metamodel.nqp:2812 in an…» | ||
jnthn | ah | ||
Maybe .gist needs to go in the no-pun list. | |||
[Coke] | "doctor, it hurts when I no strict." | 14:00 | |
psch | ShimmerFairy: right, the value is purely traditional. and considering we have strict -e there's no efficiency argument either... | 14:01 | |
ShimmerFairy | psch: I just came to this conclusion earlier today, so I'm not too strong on it (yet) :P . I am willing to be shown Perl 6 examples that are *greatly* improved by lax mode, however. :) | ||
grondilu rewrote rosettacode.org/wiki/SHA-1#Perl_6 for post-GLR. Basically had to add a few 'flat' here and there. | 14:02 | ||
ShimmerFairy | Like I said, the only reason I can think of it being there in the first place is because Perl 5 had a concept of strictures. :) | ||
14:02
n0tjack joined
|
|||
[Coke] trips over a JSON encoder that isn't encoding chr(18) properly. blah. | 14:03 | ||
ab5tract_ | ShimmerFairy: I appreciated the lax-ness when it was in the repl by default | ||
If there is a strong *technical* reason for removing it, sure. But otherwise, keep it around for dirty one liners | |||
psch | ab5tract_: i read that as an argument for "bring back lax -e", mostly | 14:04 | |
and i agree with that, i think | |||
ab5tract_ | psch: certainly not! | ||
ShimmerFairy | ab5tract_: well, aside from the fact that you have to specify 'no strict' in your one-liner, I'll point out that I never had a problem working under strict mode in one-liners | ||
ab5tract_ | perl6 -d or so | ||
pink_mist | I'd say if you really want it, make it a slang | ||
ShimmerFairy | As a P6-only user, I have _never_ thought to myself "gee, if only I didn't have to type two letters and a space to declare a 'my' variable" | 14:05 | |
ab5tract_ | no need to have it in -e, but it would be nice to have a flag that is lax | ||
pink_mist | seems silly to support two different ways of writing perl6 | ||
dalek | kudo/nom: 7102178 | jnthn++ | src/core/Array.pm: Ban certain operations on shaped arrays. |
||
ab5tract_ | pink_mist: umm... that cat is already out of the bag via TMTOWTDI | ||
psch | and many subs being methods, too | 14:06 | |
ab5tract_ | ShimmerFairy: sure. I see no reason why you're lack of desire should override the desires of others | ||
If it is particularly costly in terms of technical debt -- sure | |||
pink_mist | ab5tract_: I worded that badly; I didn't mean not to support however many ways to write perl, but rather having two separate bases from which to build code | ||
ab5tract_ | pink_mist: I really don't think the split between strict/no strict is that deep though. But I could be wrong | 14:07 | |
ShimmerFairy | ab5tract_: I'm just saying that as someone who has not used P5, (and as someone who used P6 back when there was no lax mode), I've never desired what P5 offers, so I can't help but think other people liking it are just familiar with it. | ||
14:07
andreoss` joined
|
|||
ab5tract_ | ShimmerFairy: 'use strict;' is not there because Perl 5 had strictures... it's there because it *didn't* | 14:07 | |
grondilu | oh, first time I see this one: 'Bus Error' | 14:08 | |
pink_mist | ab5tract_: I'd very much like to see it as a slang though; that way the interpreter wouldn't need to worry about two different ways to parse code | ||
jnthn | pink_mist: The interpreter already doesn't | 14:09 | |
14:09
andreoss left
|
|||
ab5tract_ | ShimmerFairy: that could easily be turned around to you not realizing the utility due to lack of familiarity | 14:09 | |
jnthn | The interpreter has no idea at all about parsing anything execpt its own bytecode format. It couldn't care less if that was made from COBOL or Perl 6. :) | 14:10 | |
ShimmerFairy | ab5tract_: what I meant is that 'Perl 5 having a concept of strictures' meaning that it had a conception of being strict vs. not. Perl 6 doesn't have that same issue, so I see 'no strict' as just a way to keep P5-ers happy | ||
ab5tract_ | You are talking about something that only became default *this year* | ||
jnthn | Pushing "no strict" out to a slang would be a good verfication of slangs, once we get far enough along. | ||
ab5tract_ | and I really don't understand your readiness to reject things just because they make P5 people happy | 14:11 | |
ShimmerFairy | jnthn: would you support the idea of kicking out lax mode in 6.1 or 6.x ? I don't think it's quite appropriate to kick it out of 6.0.0 | ||
14:11
perlawhirl left
|
|||
ab5tract_ | it's frustrating to say the least | 14:11 | |
jnthn | ShimmerFairy: Why kick it anywhere? | ||
psch | kick it into a core slang i say! | ||
ShimmerFairy | ab5tract_: what do you mean by "only became default *this year*" ? Are you talking about P5? | ||
jnthn | ShimmerFairy: It can stay implemented as it is for now | ||
14:12
Ven joined
|
|||
jnthn | ShimmerFairy: Maybe in 6.x when we've got slangs further along we'll kick it out of the core compiler codebase into a module, to decrease code size an iota...but it's a drop in the ocean really. | 14:12 | |
14:12
Sqirrel left
|
|||
ShimmerFairy | jnthn: I'm just arguing that lax mode is pretty useless, from my view. I've yet to hear a good reason for it aside from "P5 had a 'strict' pragma". | 14:12 | |
(which I don't think is a good reason) | |||
jnthn | ShimmerFairy: Then don't use it. | 14:13 | |
ab5tract_ | ShimmerFairy: no, I mean that strict-ness became default for perl6 -e and the repl only this year | ||
jnthn | I thought we already changed -e to be strict recently, leaving about zero places where it's the default. | ||
ShimmerFairy | ab5tract_: before lax mode existed, things were strict everywhere, so that doesn't mean what you're implying it does. | 14:14 | |
ab5tract_ | ..... umm, I'm sorry but I was able to do perl6 -e "@a = rand xx 50" and now I can't | ||
ShimmerFairy | jnthn: we did, and of course I don't use lax mode, I'm just mentioning that I find no reason it exists in P6, much less as a part of CORE :) | 14:15 | |
ab5tract_ | that was just changed recently | ||
Ven | o/, #perl6! | ||
ab5tract_ | and the repl was also changed to lax mode | ||
ShimmerFairy | ab5tract_: I recall there being a time where rakudo didn't have "no strict", so of course things wouldn't be lax anywhere :) | ||
ab5tract_ | ShimmerFairy: I'm sorry but you are really wrong about that | ||
jnthn | It's true, there was a time where we didn't have lax mode. But we have had it for a while. | ||
I suspect multiple years. | |||
psch | 5daa5de7e714908342751decf1d535473d10237e | 14:16 | |
Date: Sun Sep 28 13:22:50 2014 +0200 | |||
is the commit that implemented lax mode | |||
ab5tract_ | NYI is not the same as "not in the language" | ||
dalek | kudo/nom: 27a3699 | jnthn++ | src/core/Array.pm: Simpler elems/eager/is-lazy for shaped Array. |
||
psch | ab5tract_: design docs still state -e as lax | ||
jnthn | psch: Wow, more recent than I thought :) | ||
ShimmerFairy | Yeah, I'm just saying that "lax until this year" doesn't mean what you think it does when lax itself didn't exist until last year. Thus implementation-wise the REPL and -e have always been strict, except for that one time it wasn't for a while :P | 14:17 | |
14:18
laubster joined
|
|||
ab5tract_ | ShimmerFairy: ok, I stand corrected. I also thought it had been around for a lot longer. | 14:19 | |
Regardless, I don't think the test of whether something should be in core or not should come down to whether you personally find an argument for it to be satisfying | |||
14:19
skids joined
|
|||
ab5tract_ | Nor do I think it is fair to any of the P5 people who have been patiently waiting / helping to hear their expectations denigrated | 14:20 | |
jnthn | Indeed, what's in Rakudo core is largely my call. And it's staying. :) | ||
ShimmerFairy | That's why I have to argue my point here instead of just removing it on a whim :) | ||
jnthn | As mentioned, when we have slangs, we can make it one of those (and 'use strict' just pulls in that slang) to decrease core size a bit. | ||
Uh, "no strict" | 14:21 | ||
ShimmerFairy | I just think that 'no strict' means nothing useful to P6 on its own. It only exists because Perl 5 had a use/no strict thingy, and I seriously don't think the concept of being lazy with lax mode would exist otherwise. | ||
jnthn: or 'use lax' :) | |||
psch | "use nostrict" :) | ||
jnthn | Nah, "no" will (by default) be a way to load a pragmatic module too, eventually. | ||
We just don't have our pragmas story straight enough yet, and probably won't this side of 6.christmas. | 14:22 | ||
_itz | "use strict is gay" (old joke) | ||
ShimmerFairy | jnthn: oh, interesting. Will pragmas eventually work like they did in P5? (As in, a funny module?) Or will they be lightly different than modules here in P6? | ||
jnthn | ShimmerFairy: The pragma/module distinction doesn't especially exist so far as I'm concerned. | ||
PerlJam finds it bizarre that "no strict" has generated so much discussion. | 14:23 | ||
jnthn | ShimmerFairy: Grammar::Tracer has lexical effect in the scope you import it into. Is it a module or a pragma? | ||
ShimmerFairy | jnthn: from my years of P6, I think of pragmas as just compiler flags, so I'm unfortunately used to them being very different. If I were more familiar with P5 I probably wouldn't have that distinction so much :P | ||
TimToady | the very attempt to make the distinction indicates only the module system is not yet powerful enough to implement pragmas :) | 14:24 | |
no, not yet boarded-really | |||
ShimmerFairy | I think the big question is what 'no' means in P6 module loading, since I don't think that's been figured out yet. | ||
jnthn | ShimmerFairy: It hasn't, and that's why they're handled differently in the compiler at the moment. | ||
Most such hard-coded things in the compiler with use/no are only that way because it's expedient. | 14:25 | ||
TimToady | m: say 1/128 == (1/128).perl.EVAL | ||
camelia | rakudo-moar 710217: OUTPUT«True» | ||
TimToady | there we go | ||
jnthn | And because we know the whole area is related to macros, quasis, etc. and so we can't do what we want with pragmas until we deal with those issues. | ||
ShimmerFairy | Not to mention that the kinds of changes pragmas are known to make are surely the even more difficult changes to undo :) | 14:26 | |
TimToady | really boarding maybe :) & | 14:27 | |
14:27
tokuhiro_ joined
|
|||
moritz hopes for TimToady it's a boring boarding (and flight) | 14:27 | ||
dalek | kudo/nom: d881420 | jnthn++ | src/core/Array.pm: Implement multi-dim access to Array. |
14:28 | |
jnthn | TimToady: Good luck! | ||
ShimmerFairy: Thankfully, our entire parser arch is designed for forgetting stuff at the exit of a lexical scope | |||
ShimmerFairy | Hm. When pragmas can be implemented as modules, would 'no strict' be some kind of "strict" module that would be able to trickily define itself as adding features upon a "no", or would it be saner for those changes to be brought in by a 'use' statement instead? | 14:29 | |
jnthn: that's good at least :) . Perhaps some of that can be used in making 'no' work (whatever it'll mean), assuming "exit a lexical scope" doesn't automatically cover that somehow. | |||
14:30
Ven left
14:31
tokuhiro_ left
|
|||
jnthn | perl6-m -e "my @arr := Array.new(:shape(3, 3)); @arr[1;1] = 42; say @arr[1;1]" | 14:32 | |
42 | |||
\o/ | |||
And yes | |||
perl6-m -e "my @arr := Array.new(:shape(3, 3)); @arr[1;1] = 42; say @arr[1;3]" | |||
14:32
zoosha joined
|
|||
jnthn | Index 3 for dimension 2 out of range (must be 0..2) in block <unit> at -e:1 | 14:32 | |
ShimmerFairy | jnthn++ # \o/ ever closer! | 14:34 | |
jnthn | I'm getting dangerously close to the point where we have to work out some difficult things. | 14:35 | |
pink_mist | if lax mode is lexical ... is it really even lax mode at all? I mean in perl5, any variable you used undeclared aside of the globals was package scoped afaik | 14:36 | |
jnthn | pink_mist: use strict/no strict are lexical in Perl 5 afaik, yes. | 14:37 | |
pink_mist | hmm, I guess you're right | ||
jnthn | TimToady: If you didn't board yet, can you decide what "my @arr := Array.new(:shape(3, 3)); @arr.map(&say)" does during your flight? ;-) | 14:38 | |
pink_mist | but the variables in a 'no strict' scope need not be | ||
14:41
zakharyas left
|
|||
dalek | kudo/nom: e819dd1 | jnthn++ | src/core/List.pm: Toss commented out code we likely don't want. |
14:41 | |
14:46
Ven joined
|
|||
Tux__ | m: my @a; my %h = :A(1), :B(2); @a.push: %h; @a.perl.say | 14:50 | |
camelia | rakudo-moar d88142: OUTPUT«[:B(2), :A(1)]» | ||
Tux__ | m: my @a; my %h = :A(1), :B(2); @a.push: { %h }; @a.perl.say | ||
camelia | rakudo-moar d88142: OUTPUT«[:A(1), :B(2)]» | ||
jnthn | Has to be $%h or item %h post-GLR | 14:51 | |
Tux__ | what should I push to end up with [{:A(1), :B(2)}] ? | ||
jnthn++ | |||
14:52
khw joined
|
|||
Tux__ is trying to get CSV back on line | 14:56 | ||
Tux__ notes that RT#123888 is fixed | 14:57 | ||
dalek | kudo/nom: 83428be | jnthn++ | src/core/array_slice.pm: Simple cases of :exists/:delete on multi-dim. |
||
jnthn needs to look at CSV to see what the perf regression is down to | |||
If that's what the numbers you've been posting are about, anyways... | |||
|Tux| | oh sure | 14:58 | |
the test suite currently still fails | |||
jnthn | OK | ||
I'll hold off until it works properly again, so I'm profiling correct code. :) | |||
|Tux| | .tell lizmat will you look at Text::CSV/t/15_flags regarding the disappearing method? | 14:59 | |
yoleaux | |Tux|: I'll pass your message to lizmat. | ||
|Tux| | I don't know if I can reach "proper" without help | ||
just got rid of 24+ errors | |||
15:01
andreoss` left
|
|||
Ven | jnthn: why is it postcircumfix:<[; ]> instead of <[ ]> ? | 15:01 | |
is that the dispatch that should be hit for @a[3;4]? | |||
jnthn | Ven: Yes, we decided to distinguish the two forms of slicing syntactically and just call a different candidate. | 15:02 | |
Ven: Uh, different set of candidates | 15:03 | ||
Ven | jnthn: so, there'll be a syntactic difference in my code? Then why check if they're not all integers? | ||
shouldn't this candidate only be called if they're not all multidim? | |||
15:03
domidumont left
|
|||
jnthn | Ven: @foo[*;0] is perfectly allowable, for example | 15:03 | |
Ven: I plan to re-write various things in the optimizer though | |||
Ven | jnthn: but that's multi-dim, right? not all-ints? I guess I don't really understand it :) | ||
jnthn | Ven: The "all ints" check is "can we just go straight off to do an indexing" | 15:04 | |
Ven: Rather than having to pick apart what we have and do clever stuff | |||
Ven | I don't see how that's the case with [*;0], though? The first one is a whatever. | 15:05 | |
abraxxa | how can a CArray[uint8] hold codepoints < 0? | ||
jnthn | Ven: It's not the case, thus why we fall back to the rather more involved MD-ARRAY-SLICE | ||
abraxxa: Um...I'd hope it can't :) | |||
Ven: Rather than just calling AT-POS | 15:06 | ||
|Tux| | jnthn, when you pull T::C, gist.github.com/Tux/7e7d54789ec3d5c9234a | ||
abraxxa | paste.scsys.co.uk/498338 | ||
|Tux| | no need to get a passing test suite to check on performance | 15:07 | |
abraxxa | that's my code | ||
this works for getting the error text of an Oracle exception but fails for column names | |||
15:08
Ven left
|
|||
abraxxa | jnthn: ^^ any idea what I'm doing wrong? The warn @col_name_ary; outputs 40-10854 | 15:09 | |
this is the code which works: github.com/abraxxa/DBIish/blob/mas...e.pm6#L282 | 15:10 | ||
jnthn | abraxxa: Um, don't immediately see it. Somebody who's worked on/used NativeCall more recently may be able to spot it. | 15:11 | |
15:11
Ven joined
|
|||
abraxxa | jnthn: ok, thanks | 15:11 | |
FROGGS: you maybe? | |||
nine: or you? | |||
Ven | jnthn: aaah, thanks :-). | ||
abraxxa | i thought uint8 should be more precise than int8 but it makes no difference regarding the error | 15:12 | |
nine | abraxxa: can you try warn @col_name_ary.perl; just to be sure we interpret the output correctly? | ||
abraxxa | nine: [-104, 25, -119]<> in method fetchrow at /home/abraxxa/perl6/git/DBIish/lib/DBDish/Oracle.pm6:568 | ||
nine | That's different than before? | 15:14 | |
abraxxa | yeah, i guess the order of the columns returned by OCI varies | 15:15 | |
the length returned is in bytes, the encoding should be utf-8 | |||
nine | Just 3 bytes? Do you have an idea which column name this could be? | ||
abraxxa | the query is 'SELECT name, description, quantity, price, quantity*price AS amount FROM nom ORDER BY name' | ||
the length is 4 so it should be name | 15:16 | ||
as the array is 0 based i loop from 0 to 4-1 | |||
nine | So it should rather be for ^$col_name_len; | ||
15:17
pmurias joined
|
|||
nine | ^$col_name_length is already exclusive | 15:17 | |
|Tux| | is "[ 1, 2, "foo", 3 ].iterator" still the correct syntax for post-glr? | ||
abraxxa | exclusive means what? | ||
pmurias | hoelzro: any hard problems stopping the merge or just tuits? | ||
hoelzro | pmurias: both =/ | ||
no tuits for the last 4 or 5 days, but I'm stuck on merging at the point of 18ece1f | 15:18 | ||
15:18
Sqirrel joined
|
|||
nine | abraxxa: exclusive means it will stop _before_ reaching the limit | 15:18 | |
m: use NativeCall; my $c = CArray[uint8].new; $c[0] = 180; say $c[0]; | |||
camelia | rakudo-moar 83428b: OUTPUT«-76» | ||
abraxxa | nine: ok | ||
nine | ^^^ there's your problem | ||
moritz | |Tux|: what do you want to do? | ||
hoelzro | jnthn made a change to NQP that uses an optimization in MoarVM, but I can't seem to figure out how to get nqp-js to compile without reverting that optimization | ||
jnthn | |Tux|: Well, the syntax is fine, but I'm not convinced you'll want to call .iterator post-GLR | ||
nine | uint8 seems to not be unsigned at all | ||
abraxxa | nine: because unsigned are still not implemented correctly and wrap? | 15:19 | |
nine | yep | ||
abraxxa | i wonder why using int8 in the errortext works | ||
nine | I don't think it should be a problem in your case. Using int8 or uint8 just changes the interpretation of the array's contents, not its values. | ||
But why do you decode('ascii') if it's utf-8? | 15:20 | ||
abraxxa | nine: that was just a try | 15:21 | |
because 'name' should be the same in both encodings afaik | |||
nine | But you clearly have code points > 127 in there | ||
abraxxa | the length returned seem to be ok: 4, 11, 8, 5, 6 | 15:22 | |
|Tux| | jnthn, github.com/Tux/CSV/blob/master/lib...SV.pm#L296 and github.com/Tux/CSV/blob/master/lib...SV.pm#L384 | 15:23 | |
15:25
coffee` left,
coffee` joined
|
|||
masak | no release manager for this month... | 15:26 | |
15:27
xfix left
|
|||
pmurias | hoelzro: one possible workaround would be to extract that part into a method and override it in the SerializeOnce role we mix in to inject hacks necessary for cross compilation | 15:27 | |
abraxxa | nine: the returned bytes are always different | ||
hoelzro | pmurias: I tried that, no dice =( | ||
dalek | kudo/nom: 90e4dab | coke++ | docs/release_guide.pod: Claim 2015.09 compiler release |
||
hoelzro | [Coke]++ | 15:28 | |
15:28
tokuhiro_ joined
|
|||
|Tux| | .tell lizmat ignore: I found it «ok (@x[$_], "text") for 1 .. 5, 7, 19;» → «ok (@x[$_], "text") for flat 1 .. 5, 7, 19;» | 15:29 | |
yoleaux | |Tux|: I'll pass your message to lizmat. | ||
pmurias | hoelzro: I'll try to figure out why things still work after that optimalization and maybe I can figure out a better workaround | ||
hoelzro | pmurias: I have an in-progress merge branch on my machine, I can push it up tonight | ||
after that optimization, I think we just need to provide a dummy NQPReentrantLock REPR | 15:30 | ||
and then fix whatever else remains =) | |||
jnthn | |Tux|: Ho, so you're just implementing a method iterator... Where is that being used? Or is it public API? | ||
hoelzro: What was the change? | 15:31 | ||
|Tux| | the iterator in the first url is to enable $object[$index] | ||
Ven | today was a great day. The backlog is full of nice stuff to read & learn :-). | ||
|Tux| | the second is to enable special behaviour for an error class | ||
15:33
tokuhiro_ left,
pmurias left
15:35
muraiki joined
|
|||
dalek | p/js: b015083 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp: Bunch of small regex fixes/features. Fix emitting of string containing horizontal whitespace. Implement enumcharlist. Implement eol, bol, lwb, rwb anchors. Fix bug in quantifiers. |
15:35 | |
15:35
pecastro joined,
pmurias joined
|
|||
Ven | pmurias++ | 15:35 | |
nine | pmurias++ # still a hero | 15:36 | |
|Tux| | jnthn, removing the first would result in «Method 'iterator' must be implemented by CSV::Row because it is required by a role» | ||
jnthn | |Tux|: Yes, because the class "does Iterable" | ||
nine | |Tux|: do you have some is Iterable there? | ||
|Tux| | nine, no is Iterable | 15:37 | |
jnthn | Oh, if it's "is Iterable" it's certainly wanting changing to "does Iterable" | ||
Looks like you already changed that. | |||
|Tux| | yes | ||
abraxxa | what's the difference between my @col_name := CArray[int8].new; and my CArray[int8] @col_name; | 15:39 | |
|Tux| | Method 'error' not found for invocant of class 'X::TypeCheck::Assignment' <= does that ring a bell? | 15:40 | |
pmurias | is it possible to push half merged branches in git? | ||
nine | abraxxa: in the first case you get an initialized object | ||
pmurias: what do you mean by "half merged"? | |||
abraxxa | nine: and in the later? | 15:41 | |
nine | You have a variable that can only hold objects of the specified type | ||
abraxxa | and what does 'initialized' mean? | ||
pmurias | nine: after asking that I figured that would be just merging a part of the commits | ||
s/part/some/ | |||
_itz | github.com/jnthn/test-mock/pull/7 # bump | 15:43 | |
jnthn | _itz: Merged | ||
eiro | /wg #phear.org | ||
oops sorry | 15:44 | ||
abraxxa | nine: I expected a different output from my @col_name := CArray[int8].new; @col_name[$_] = 0 for ^32; warn @col_name.perl; | ||
_itz | ty | ||
eiro | hello btw | ||
15:44
Ven left
|
|||
|Tux| | FYI it surprised me that now [[1,2]] != [[1,2],] | 15:44 | |
15:45
plicease joined
|
|||
jnthn | |Tux|: Yes, that's the thing we often call the "single arg rule" | 15:46 | |
|Tux|: Same rule as for the .push case you had earlier, fwiw | |||
So [$[1,2]] also does that [[1,2],] does | 15:47 | ||
*what | |||
|Tux| | three more flat's fixes 17000 tests :) | 15:54 | |
15:55
yqt joined
|
|||
pink_mist | wow, that's some good value per character of code | 15:59 | |
16:00
CQ left
16:02
Ven joined
|
|||
ugexe | m: sub foo($a) { once &?ROUTINE($a) }; foo(1) | 16:02 | |
camelia | rakudo-moar 90e4da: OUTPUT«Too many positionals passed; expected 0 arguments but got 1 in sub foo at /tmp/EYb1e48m4u:1 in block <unit> at /tmp/EYb1e48m4u:1» | ||
16:04
dha joined
|
|||
|Tux| | «take $from .. $r.value;» → Type check failed in assignment to '@!crange'; expected 'Int' but got 'Range' | 16:06 | |
$r.value can be Inf | |||
timotimo | did i o/ yet? | ||
|Tux| | so I bet flat is out of the question | ||
hi timotimo | |||
timotimo | o/ | ||
you may want to take a Slip | |||
ISTR take now always just takes a single thing, or something like that, and we've got to rely on iteration encountering a Slip there if we want things to flatten out | 16:07 | ||
Ven | \o timotimo :-) | ||
16:07
rindolf left,
pecastro left
|
|||
timotimo | to me, flat is like flattening "into", while Slip is like flattening "out of" | 16:07 | |
|Tux| | so take Slip 1 .. Inf; ? | 16:08 | |
timotimo | Inf? | ||
abraxxa | how do I define a private attribute that gets lazy populated? | ||
timotimo | could actually work | ||
|Tux| | $r.value can be Inf, as I already said | 16:09 | |
timotimo | abraxxa: AFAIK lazy population relies on accessors existing to do the "magic" | ||
right, it can, that's why "flat" is out of the question, right? | |||
but with Slip, it probably can still work | |||
abraxxa | timotimo: so no built-in functionality like Moo's is => 'lazy' sub _build_foo ? | 16:10 | |
|Tux| | what is the syntax? I keep getting errors | ||
jnthn | m: say (|1..Inf).WHAT | ||
camelia | rakudo-moar 90e4da: OUTPUT«(Range)» | ||
jnthn | m: say |(1..Inf).WHAT | ||
camelia | rakudo-moar 90e4da: OUTPUT«(Range)» | ||
jnthn | m: say (|(1..Inf)).WHAT | ||
camelia | rakudo-moar 90e4da: OUTPUT«(Slip)» | ||
jnthn | heh, third time lucky :P | ||
timotimo | abraxxa: we had that built-in for a few days, but it was deemed "for the ecosystem" | 16:11 | |
abraxxa | timotimo: i see | ||
timotimo | in fact, you could go back, find the commit that introduced the change, package that up into a module and put it up on the ecosystem right now | ||
nobody has done that, as far as i know | |||
16:12
rindolf joined
|
|||
abraxxa | but that means that you have to access the private attr always through its accessor? | 16:12 | |
hoelzro | jnthn: something about not using the string heap, and using the compunit's instead | ||
timotimo | abraxxa: direct private attribute access is extremely close "to the metal" | 16:13 | |
_itz | A suggestion for future stars... that 2015-spw-perl6-course.pdf (or similar) replace UsingPerl6-draft.pdf (unmaintained)? | 16:14 | |
masak | _itz: I like that suggestion. | 16:17 | |
Ven | ShimmerFairy: FWIW, my use case for no strict usually stems from -n and -p :) | ||
ShimmerFairy: being able to go -e '%h{$_}++; END { say %h.perl }' or something is great. | |||
16:18
rvchangue joined
|
|||
abraxxa | timotimo: i'd add a method that populates the private attribute if undefined (not sure what's the Perl 6 way to check this) and return it's value and always call the method, never the private attribute directly which will be only used for caching. does that sound sane? | 16:18 | |
timotimo | you can put a state variable into that method | ||
that way putting undefined values into that attribute is also a valid thing | 16:19 | ||
and checking for defined values is just .defined | |||
dha | Which reminds me, I need to look at documenting C<state>.... | ||
abraxxa | timotimo: that sounds safer than the private attr on the class, yes | ||
timotimo | mhm | ||
a thing it does is put data that more or less belongs to the instance "far away" from that instance | 16:20 | ||
16:20
Ven left
|
|||
abraxxa | not much docs on state ;( doc.perl6.org/language/variables#Th...Declarator | 16:20 | |
timotimo | yeah, that's really not much | 16:21 | |
16:21
FROGGS left
|
|||
jnthn | dinner & | 16:24 | |
16:26
spider-mario joined
|
|||
dha | Almost nothing, in fact. | 16:26 | |
And, afaict nothing at all on C<$>. | |||
abraxxa | i want to loop from 1 to .field_count, what is the correct syntax? | 16:27 | |
for 1.. .field_count -> $field_index { ? | |||
dha | (By "almost nothing", I appear to mean "it's mentioned a couple of times in spec with no actual explanation") | ||
|Tux| | jnthn or timotimo if either of you would clone github.com:Tux/CSV and make t/78_fragment.t pass (CSV.pm line 123) I'd be grateful | 16:29 | |
abraxxa | timotimo: Natively typed state variables not yet implemented | ||
|Tux| | I give up | ||
I already made 18000 extra tests pass today. | |||
16:29
ab5tract_ left
|
|||
abraxxa | |Tux|++ | 16:32 | |
16:40
FROGGS joined
|
|||
ugexe | m: sub foo($a?) { once &?ROUTINE() }; foo(1); | 16:41 | |
camelia | rakudo-moar 90e4da: OUTPUT«Memory allocation failed; could not allocate 6144 bytes» | ||
timotimo | abraxxa: you mean for 1 .. $_.filed_count? | 16:44 | |
field* | |||
16:45
pierrot joined
|
|||
abraxxa | timotimo: for 1 .. self.field_count { | 16:47 | |
16:49
Ven joined
|
|||
timotimo | then you need "self." :) | 16:49 | |
abraxxa | timotimo: i've overcome the non-implemented state for native vars by using an Int and storing the ub4 to it: github.com/abraxxa/DBIish/commit/9...936311804c | 16:50 | |
timotimo | ah, state variables with natives is difficult | 16:51 | |
i think state vars internally rely on setting a c-level null to the variable | |||
which for native ints is a valid value (for num i'm not so sure) | |||
16:54
mohij joined
|
|||
[Coke] | dha: I think $ is just a variable with an empty name. | 16:55 | |
m: my $ = 3; say $; | 16:56 | ||
camelia | rakudo-moar 90e4da: OUTPUT«(Any)» | ||
dha | It's supposedly the anonymous state variable. | ||
m: for 1..5 {say $++} | 16:57 | ||
camelia | rakudo-moar 90e4da: OUTPUT«01234» | ||
[Coke] | it can be used with state, but I don't think it's exclusive to state. | ||
right. that's not state there. | |||
dha | Hm. That is not what I've been told, but that may not mean anything. | ||
[Coke] | not all info in #perl6 is equal. :) | 16:58 | |
dha | When I asked "what the heck is C<$>?" TimToady said it was the anonymous state variable. | ||
rindolf | Hi all, sup? | ||
[Coke] | well, timtoady is moar likely to be right about that sort of thing, of course. | 16:59 | |
dha | Right. Hence my assumption that it was true. :-) | ||
timotimo | [Coke]: $ is an anonymous state variable | 17:00 | |
m: sub test() { $++ }; say test for ^5 | |||
camelia | rakudo-moar 90e4da: OUTPUT«01234» | ||
pink_mist | m: for 1..5 { say $++; say $++; } #it's not quite state ... it's ... weird | ||
camelia | rakudo-moar 90e4da: OUTPUT«0011223344» | ||
pink_mist | an anonymous state variable basically | ||
oh, timotimo already said that | 17:01 | ||
timotimo++ | |||
dha | ...and this is why we need documentation. scene. :-) | ||
dha goes off to steal the documentation on C<state> from Perl 5... | 17:03 | ||
[Coke] | timotimo: yes, but I'm saying it works without explicitly declaring "state" | 17:06 | |
Are you saying that referencing $ is the same as "state $" ? | 17:07 | ||
17:07
dbron_ joined
|
|||
dbron_ | .clear | 17:07 | |
timotimo | yes, that's what i'm saying | ||
17:07
pmurias left
|
|||
timotimo | $ is short for "(state $)" | 17:07 | |
17:08
dakkar left
|
|||
dbron_ | At the beginning of the year, Larry intimated we might see a beta 1.0 in Sept .. that still in the cards? | 17:13 | |
17:13
rangerprice joined
|
|||
rangerprice | How can i redirect the output of stderr in a variable ? | 17:14 | |
FROGGS | dbron_: we still try very hard | ||
abraxxa | the C function definition for the pointer to the column name is void *attributep, | ||
ugexe | rangerprice: IO::Capture::Simple | ||
ambs | well, he said something could get out to his birthday in september, yeah | ||
abraxxa | is that NativeCall definition ok? CArray[int8] $attributep, | ||
ambs | and said that about 5 days ago :D | ||
Ven | rangerprice: change the dynamic variable that represents the output | 17:15 | |
ugexe: it's not thread-safe :( | |||
ugexe | right, but he can look at the source and see how | ||
dbron_ | FROGGS: from what I've seen, you guys go beyond "try very hard" to "never sleep" | ||
timotimo | abraxxa: why won't a Str do? is this for null-byte-terminated strings? | ||
dbron_ | FROGGS: but did you mean to say "we will still try very hard [to get a RC out]"? | 17:16 | |
abraxxa | timotimo: return by pointer like the whole OCI | ||
using Str results in a segfault because I guess not enough memory is allocated | |||
timotimo | oh | ||
dha | Re: C<state> - gist.github.com/dha/02f1f41b5f8937c0271e | 17:17 | |
abraxxa | you pass it a pointer to a CArray[int8] and a Carray[ub4] which contains the length in bytes | ||
timotimo | you may want just Pointer instead | 17:18 | |
at least for the CArray[ub4] | |||
abraxxa | that's the part that works ;) | ||
timotimo | right | ||
abraxxa | fetching the error message with docs.oracle.com/database/121/LNOCI/...LNOCI17287 works | ||
timotimo | the thing about CArray is that it needs to know the size in order to work | 17:19 | |
abraxxa | fetching the column name with docs.oracle.com/database/121/LNOCI/...LNOCI17130 doesn't | ||
17:19
rangerprice left
|
|||
abraxxa | OraText *bufp, vs void *attributep, | 17:19 | |
timotimo | i ... don't actually know exactly how we do this | ||
with shaped array declarations, i expect something like casting to a shaped CArray | |||
abraxxa | shaped? | ||
17:19
pat_js left
|
|||
timotimo | to be honest, i'd get a Pointer[int8] and increment it length-of-text times and grab each byte individually into another array or directly into a Uni or something string-ish | 17:20 | |
shaped arrays have the size(s) as part of their type | 17:21 | ||
jnthn is working on that right now | |||
abraxxa | i see | ||
timotimo | 163056 jnthn │ perl6-m -e "my @arr := Array.new(:shape(3, 3)); @arr[1;1] = 42; say @arr[1;3]" | ||
163102 jnthn │ Index 3 for dimension 2 out of range (must be 0..2) in block <unit> at -e:1 | |||
abraxxa | can i allocate a CArray[int8] with n number of elements right now? | 17:22 | |
2015.07.2 | |||
timotimo | well, you can just .new it and assign to the n-1th element | 17:23 | |
abraxxa | i do it with my @col_name := CArray[int8].new; @col_name[$_] = 0 for ^512; | ||
timotimo | no need to set to 0 for the initial ones; i *think* we allocate CArray from zero'd memory blocks | ||
m: use NativeCall; my $arr = CArray | |||
camelia | ( no output ) | ||
timotimo | loops | ||
abraxxa | so that should suffice? @col_name[511] = 0; | ||
timotimo | m: use NativeCall; my $arr = CArray[int8].new; $arr[10] = 0; say $arr | ||
camelia | rakudo-moar 90e4da: OUTPUT«IntTypedCArray[int8].new» | ||
timotimo | huh? | 17:24 | |
m: use NativeCall; my $arr = CArray[int8].new; $arr[0] = 0; say $arr | |||
camelia | rakudo-moar 90e4da: OUTPUT«IntTypedCArray[int8].new» | ||
abraxxa | yeah, I also get that output | ||
timotimo | m: use NativeCall; my $arr = CArray[int8].new; $arr[10] = 0; .say for $arr.list | ||
camelia | rakudo-moar 90e4da: OUTPUT«IntTypedCArray[int8].new» | ||
abraxxa | wasn't able to output its contents using .perl | ||
timotimo | that's a bug, potentially from GLR | ||
star: use NativeCall; my $arr = CArray[int8].new; $arr[10] = 0; .say for $arr.list | |||
camelia | star-m 2015.03: OUTPUT«IntTypedCArray[int8].new()» | ||
timotimo | o_O | ||
star: use NativeCall; my $arr = CArray[int8].new; $arr[10] = 0; .say for $arr | |||
camelia | star-m 2015.03: OUTPUT«IntTypedCArray[int8].new()» | ||
timotimo | star: use NativeCall; my $arr = CArray[int8].new; $arr[10] = 0; $arr[$_].say for ^10; | ||
camelia | star-m 2015.03: OUTPUT«0000000000» | ||
timotimo | star: use NativeCall; my $arr = CArray[int8].new; $arr[10] = 0; $arr[$_].say for ^20; | ||
camelia | star-m 2015.03: OUTPUT«00000000000000000000» | ||
timotimo | star: use NativeCall; my $arr = CArray[int8].new; $arr[10] = 0; $arr[1000 + $_].say for ^100; | 17:25 | |
camelia | star-m 2015.03: OUTPUT«00000000000000000000000000000000000000000000000000000000000000000…» | ||
timotimo | hehe | ||
star: use NativeCall; my $arr = CArray[int8].new; $arr[10] = 0; $arr[1000000 + $_].say for ^100; | |||
camelia | star-m 2015.03: OUTPUT«00000000000000000000000000000000000000000000000000000000000000000…» | ||
timotimo | star: use NativeCall; my $arr = CArray[int8].new; $arr[10] = 0; $arr[10000000000 + $_].say for ^100; | ||
abraxxa | note that I use := | ||
camelia | star-m 2015.03: OUTPUT«00000000000000000000000000000000000000000000000000000000000000000…» | ||
timotimo | yes, but i use $ instead of @ | ||
so this doesn't let us access random memory areas | |||
it probably does a bounds check and returns 0 if it's oob | |||
anyway, i gotta go AFK, do some grocery shopping and cooking | 17:26 | ||
abraxxa | ok, thanks | ||
17:26
Ven left
|
|||
abraxxa | although I didn't graps the difference between $ary = and @ary := | 17:26 | |
timotimo | for one, @foo = ... is list assignment, so you might end up with a list containing the CArray as its only element; if not, it'll likely try to grab the list inside the CArray and put its values into the array | 17:27 | |
with := you replace the array completely | 17:28 | ||
17:28
pierrot left
|
|||
timotimo | m: use NativeCall; my @foo = CArray[int8].new(1, 2, 3); say @foo.WHAT; say @foo[0].WHAT; | 17:28 | |
camelia | rakudo-moar 90e4da: OUTPUT«Default constructor for 'IntTypedCArray[int8]' only takes named arguments in block <unit> at /tmp/Z0Uzrg509X:1» | ||
timotimo | m: use NativeCall; my @foo = CArray[int8].new(); say @foo.WHAT; say @foo[0].WHAT; | ||
camelia | rakudo-moar 90e4da: OUTPUT«(Array)(IntTypedCArray[int8])» | ||
timotimo | there we go | ||
timotimo AFK | |||
abraxxa | why not my CArray[int8] @foo;? | 17:29 | |
m: use NativeCall; my CArray[int8] @foo; say @foo.WHAT; | |||
camelia | rakudo-moar 90e4da: OUTPUT«(Array[IntTypedCArray[int8]])» | ||
abraxxa | unexpected! | ||
isn't CArray a subtype of Array? | 17:30 | ||
17:30
tokuhiro_ joined
|
|||
japhb | m: use NativeCall; my CArray[int8] $foo; say $foo.WHAT; | 17:32 | |
camelia | rakudo-moar 90e4da: OUTPUT«(IntTypedCArray[int8])» | ||
japhb | abraxxa: ^^ | ||
abraxxa | ah, typo, thanks! | 17:33 | |
japhb | abraxxa: You declared an array of CArrays. | ||
abraxxa | so @ instead of $ is nothing else as wrapping the type in Array[]? | ||
japhb | Well, it vivifies to one. But really the @ twigil is a constraint. | 17:34 | |
17:34
tokuhiro_ left
|
|||
[Coke] | m: my ($,$a,$) = 1,2,3; say $a; # timotimo - even here? | 17:34 | |
camelia | rakudo-moar 90e4da: OUTPUT«2» | ||
japhb | abraxxa: And 'my Bar @foo' declares that you want an array-like thing containing Bar elements | 17:35 | |
m: my @foo = 1, 2, 3; say @foo.^roles; | |||
camelia | rakudo-moar 90e4da: OUTPUT«Method 'iterator' must be implemented by Iterable because it is required by a role in any compose_method_table at src/gen/m-Metamodel.nqp:2666 in any apply at src/gen/m-Metamodel.nqp:2676 in any compose at src/gen/m-Metamodel.nqp:2812 in an…» | ||
japhb | m: my @foo = 1, 2, 3; say @foo.^roles>>.name; | ||
camelia | rakudo-moar 90e4da: OUTPUT«Method 'name' not found for invocant of class 'Positional' in block <unit> at /tmp/sroFYNmsWB:1» | ||
japhb | m: my @foo = 1, 2, 3; say @foo.^roles>>.^name; | 17:36 | |
camelia | rakudo-moar 90e4da: OUTPUT«List» | ||
japhb | hmmm | ||
skaji | Hi, I have a question about types. | ||
japhb | Either there is still some fixup to do in the metamodel post-GLR, or my metamodel skills have become very out of date. | ||
skaji | perl6 -e 'sub test(Positional) { say "called" } my $f = gather for ^5 { take }; test($f)' | 17:37 | |
prints "called". | |||
But $f is of type Seq, and Seq ~~ Positional is False. Why does test($f) dispatch test(Positional) subroutine? | |||
17:38
Ven joined
|
|||
timotimo | coke, have a look at the --target=ast to find out | 17:39 | |
skaji | m: sub test(Positional) { say "called" }; my $f = gather for ^5 { take }; test($f); | ||
camelia | rakudo-moar 90e4da: OUTPUT«called» | ||
dha | Could someone take a quick look at this and let me know if it's good enough to slot into the docs (documentation for C<for>)? | 17:41 | |
gist.github.com/dha/d8ab9b8cf852d358bfaf | |||
skids | There's something wrong with MMD in that respect I think, I had to work around similar issues when doing slice = sequence code. | 17:42 | |
And others have noted something funny going on but no golfs or bisects yet. | |||
(wrt test(Positional)) | 17:43 | ||
m: sub test(Positional) { say "called" }; my $f = gather for ^5 { take }; $f.WHAT.say; say $f ~~ Positional; test($f); | 17:44 | ||
camelia | rakudo-moar 90e4da: OUTPUT«(Seq)Falsecalled» | 17:45 | |
17:45
yqt left
|
|||
skids | m: sub test(Positional $a) { $a.WHAT.say; say "called" }; my $f = gather for ^5 { take }; $f.WHAT.say; say $f ~~ Positional; test($f); | 17:46 | |
camelia | rakudo-moar 90e4da: OUTPUT«(Seq)False(List)called» | ||
skids | m: sub test(Positional \a) { a.WHAT.say; say "called" }; my $f = gather for ^5 { take }; $f.WHAT.say; say $f ~~ Positional; test($f); | ||
camelia | rakudo-moar 90e4da: OUTPUT«(Seq)False(List)called» | ||
FROGGS | dbron_: I say that we attempt it, but tbh I doubt we will have a RC ready in time... | ||
_itz | japhb: see scrollback from a few hrs back | 17:48 | |
re: metamodel | |||
colomon has managed to once again forget how to .grep all strings that DON’T match a regex. | 17:50 | ||
FROGGS | m: say <foo bar baz quux>.grep(* !~ /a/) | 17:51 | |
camelia | rakudo-moar 90e4da: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cjpruPyvSKUnsupported use of !~ to do negated pattern matching; in Perl 6 please use !~~at /tmp/cjpruPyvSK:1------> 3say <foo bar baz quux>.grep(* !~ 7⏏5/a/)» | ||
FROGGS | m: say <foo bar baz quux>.grep(* !~~ /a/) | ||
camelia | rakudo-moar 90e4da: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CwdZxoaqi6Variable '&infix:<!~~>' is not declaredat /tmp/CwdZxoaqi6:1------> 3say <foo bar baz quux>.grep(* 7⏏5!~~ /a/)» | ||
FROGGS | m: say <foo bar baz quux>.grep({$_ !~~ /a/}) | ||
camelia | rakudo-moar 90e4da: OUTPUT«(foo quux)» | ||
FROGGS | colomon: ^^ | ||
colomon | FROGGS++ | ||
colomon was just about to try that. it always seems too long, somehow…. | |||
m: say <foo bar baz quux>.grep(* !~~ /a/) | 17:52 | ||
camelia | rakudo-moar 90e4da: OUTPUT«5===SORRY!5=== Error while compiling /tmp/aE6reeski3Variable '&infix:<!~~>' is not declaredat /tmp/aE6reeski3:1------> 3say <foo bar baz quux>.grep(* 7⏏5!~~ /a/)» | ||
colomon | ah, FROGGS++ again | ||
skids | (* ~~ /a/).WHAT.say; (* !~~ /a/).WHAT.say | 17:53 | |
m: (* ~~ /a/).WHAT.say; (* !~~ /a/).WHAT.say | |||
camelia | rakudo-moar 90e4da: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IlsFSTLp3gVariable '&infix:<!~~>' is not declaredat /tmp/IlsFSTLp3g:1------> 3(* ~~ /a/).WHAT.say; (* 7⏏5!~~ /a/).WHAT.say» | ||
skids | m: (* ~~ /a/).WHAT.say; | ||
camelia | rakudo-moar 90e4da: OUTPUT«(WhateverCode)» | ||
abraxxa | is there any difference between Pointer and Pointer[void]? | 17:54 | |
FROGGS | abraxxa: no | ||
abraxxa | FROGGS: i guessed so, thanks | ||
what's the reason to support the later and even document it? | 17:55 | ||
FROGGS | the reason to support Pointer[void]? it just happened to work so we can disallow using the value of a void pointer directly... and it is more explicit which can be nice | 17:56 | |
abraxxa | ok | 17:57 | |
skaji | skids: Thanks. Is Seq actually composed by Positional? | ||
skids | m: my $a = Int; Array[$a].new().perl.say # that would be a reason though it likely won't work for Pointer/natives yet. | ||
camelia | rakudo-moar 90e4da: OUTPUT«Array[Int].new()» | ||
abraxxa | OCI seems to fill the memory the pointer points to with something, at least it's 0 before and crap after the call | ||
abraxxa wants proper unsigned native types | 17:59 | ||
dha | Are there currently improper ones? | ||
abraxxa | dha: they are typed ones | ||
skids | skaji: Seq is specifically not Positional IIRC, but it does allow postcircumfix:<[]>, which was not until recently, and before that only Positional did that, so maybe something got a little haywired. | 18:00 | |
dha | Ah. | ||
abraxxa | say; results in Unhandled exception: Cannot unbox a type object instead of printing a linefeed | ||
an exception occuring inside a for loop prints the line number of the for loop beginning | 18:02 | ||
japhb | _itz: thank you for the Metamodel issues pointer | 18:03 | |
.ask jnthn What did you mean by "Maybe .gist needs to go in the no-pun list."? | |||
yoleaux | japhb: I'll pass your message to jnthn. | ||
18:04
Ven left
|
|||
skids | skaji: I think the problem is that :(Positional) does the same thing that :(@a) does, actually, and manages to turn the Seq into a list, because... MAGIC! | 18:06 | |
m: sub test(\a where Positional) { a.WHAT.say; say "called" }; my $f = gather for ^5 { take }; $f.WHAT.say; say $f ~~ Positional; test($f); | 18:07 | ||
camelia | rakudo-moar 90e4da: OUTPUT«(Seq)FalseConstraint type check failed for parameter 'a' in sub test at /tmp/QDGsWprplx:1 in block <unit> at /tmp/QDGsWprplx:1» | ||
skids | But, I've seen that also fail to work, specifically on invocants. | 18:08 | |
18:09
leont joined
|
|||
skaji | Oh, sub test(\a where Positional) failed! | 18:09 | |
18:11
telex left
|
|||
FROGGS | the jvm build is fun somehow: | 18:11 | |
$ ./perl6-j -e 'enum Foo <foo bar baz>' | |||
===SORRY!=== | |||
Method 'role_typecheck_list' not found for invocant of class 'NQPClassHOW' | |||
18:12
sjn_phone_ joined,
espadrine left,
telex joined
|
|||
abraxxa | i give up, it just doesn't work | 18:13 | |
FROGGS | :/ | ||
abraxxa | i can get the data type, the column name length but just not the column name itself | 18:16 | |
18:17
tokuhiro_ joined
|
|||
FROGGS | abraxxa: can you show me the code? | 18:18 | |
abraxxa | FROGGS: github.com/abraxxa/DBIish/blob/mas...e.pm6#L558 | 18:19 | |
i've pushed what I have so far | |||
18:19
sjn_phone_ left
|
|||
skaji | skids: I understand Positional type checking is a little weird now. Thanks a lot! | 18:19 | |
skids | skaji: yes that's a workaround, but it may break if you try it on invocants. I haven't got a handle on what is going on there yet. | 18:20 | |
np | |||
18:22
tokuhiro_ left
|
|||
skids | skaji: do note that 'where constraint' clauses are definition-order-dependent and have a diffent place in the MMD pecking order. | 18:22 | |
18:22
dbron_ left
|
|||
FROGGS | abraxxa: why do you pass it a CArray[int8]? | 18:24 | |
skaji | m: sub test($ where Positional) {}; sub test(Positional) {}; | 18:28 | |
camelia | rakudo-moar 90e4da: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HVpEXUmM3KRedeclaration of routine testat /tmp/HVpEXUmM3K:1------> 3 Positional) {}; sub test(Positional) {}7⏏5; expecting any of: horizontal whitespace» | ||
timotimo returns | |||
18:29
ab5tract_ joined
|
|||
ab5tract_ | |Tux|: Impressive :D | 18:30 | |
timotimo | dha: is "use the arrow" with precedent in the docs? if not, i'd rather have it refered to as "a pointy block" | ||
ab5tract_ | But that sounds quite frustrating :) | ||
skids | m: multi sub test($ where Positional) {}; multi sub test(Positional) {}; | 18:31 | |
camelia | ( no output ) | ||
dha | timotimo - I can certainly do that. Although I think pointy blocks remain undocumented. | ||
skaji | skids: oh, sorry. | ||
timotimo | dha: also, it would probably have been better to use the "edit" function rather than write a comment, because it does strange things with C<for> and @foo in comments | ||
ab5tract_ realizes that Convos++ does not currently demarcate between "cached stuff from hours ago" and "right now" | 18:32 | ||
timotimo | and the thing about "lazily by default" sounds strange | ||
dha | Yeah, I didn't notice that at first. | ||
timotimo | so in the comment it now reads "The C Loop" | 18:33 | |
we also have a c-style loop, so that's very confusing at first glance :D | |||
abraxxa | FROGGS: i need to get the bytes for a utf-8 encoded text, the length in bytes is returned in the var after that | ||
dha | FWIW, "lazily by default" comes from existing docs. specifically, 5to6.pod | ||
timotimo | mhm | 18:34 | |
dha | timotimo - will look to fix that in the gist. thanks. | ||
timotimo | let me have a closer look | ||
hm | |||
it's kinda weird to write ti like that, because perl5 doesn't really have the same kind of "lazy list" that perl6 does | 18:35 | ||
dha | Well, that's the point, isn't it? That it's *now* lazy, so you would use C<for> instead of C<while> | ||
timotimo | also, while lines() would just run once | 18:36 | |
FROGGS | abraxxa: hmmm, I'd try passing it a CArray[Pointer[Str]], and then 'say @col_name[0].deref' | ||
timotimo | m: while lines() { say "boing" } | ||
camelia | rakudo-moar 90e4da: OUTPUT«boingboingboingboingboingboingboingboingboingboingboingboingboingboingboingboingboingboingboingboing» | ||
timotimo | actually, seems like no. | ||
m: while lines() -> $_ { say $_.elems } | |||
camelia | rakudo-moar 90e4da: OUTPUT«20eof requires an object with REPR MVMOSHandle in block <unit> at /tmp/0Suy4Ariam:1» | ||
18:36
mprelude joined
|
|||
timotimo | whoops | 18:36 | |
FROGGS | :D | ||
timotimo | m: lines(); lines(); | ||
camelia | rakudo-moar 90e4da: OUTPUT«eof requires an object with REPR MVMOSHandle in block <unit> at /tmp/RTZmsoJDfC:1» | ||
FROGGS | timotimo++ | ||
timotimo | that's the golf, it seems | ||
of course lines() without doing anything to it (like say "boing") won't actually eat any of the lines | 18:37 | ||
abraxxa | FROGGS: trying | ||
timotimo | this may be another place where ARGFILES isn't sufficiently like a regular file handle | ||
FROGGS | abraxxa: note that the param just need to be CArray[Pointer] | 18:38 | |
dha | Granted, I took the code examples from 5to6.pod, so if they're wrong there, they'll be wrong in my doc. :-/ | ||
abraxxa | FROGGS: still my favorite exception: Unhandled exception: Cannot unbox a type object | 18:39 | |
FROGGS | abraxxa: did you @col_name[0].=new? | 18:41 | |
abraxxa | FROGGS: @col_name[0] = Pointer[Str]; | ||
FROGGS | abraxxa: no | ||
abraxxa: you need an instance, not a type object | |||
abraxxa | my @col_name := CArray[Pointer[Str]].new; | 18:42 | |
FROGGS | almost | ||
m: use NativeCall; my CArray[Pointer[Str]] @col_name; @col_name[0].=new; | |||
camelia | ( no output ) | 18:43 | |
FROGGS | m: use NativeCall; my CArray[Pointer[Str]] @col_name; @col_name[0].=new; say @col_name | ||
camelia | rakudo-moar 90e4da: OUTPUT«[TypedCArray[Pointer].new]» | ||
FROGGS | m: use NativeCall; my CArray[Pointer[Str]] @col_name; @col_name[0].=new; say @col_name[0] | ||
camelia | rakudo-moar 90e4da: OUTPUT«TypedCArray[Pointer].new» | ||
FROGGS | m: use NativeCall; my CArray[Pointer[Str]] @col_name; @col_name[0].=new; say @col_name[0].deref | ||
camelia | rakudo-moar 90e4da: OUTPUT«Method 'deref' not found for invocant of class 'TypedCArray[Pointer]' in block <unit> at /tmp/iSS9MUMGrz:1» | ||
FROGGS | m: use NativeCall; my CArray[Pointer[Str]] @col_name; @col_name[0] = Pointer[Str].new; say @col_name[0].deref | ||
camelia | rakudo-moar 90e4da: OUTPUT«Type check failed in assignment to '@col_name'; expected 'TypedCArray[Pointer]' but got 'Pointer' in block <unit> at /tmp/TK8AeLoT1Y:1» | ||
FROGGS | m: use NativeCall; my CArray[Pointer] @col_name; @col_name[0] = Pointer[Str].new; say @col_name[0].deref | ||
camelia | rakudo-moar 90e4da: OUTPUT«Type check failed in assignment to '@col_name'; expected 'TypedCArray[Pointer]' but got 'Pointer' in block <unit> at /tmp/usknrEhTH6:1» | ||
FROGGS | hmpf | 18:44 | |
18:44
rurban joined
|
|||
FROGGS | m: use NativeCall; my CArray[Pointer] $col_name.=new; $col_name[0] = Pointer[Str].new; say $col_name[0].deref | 18:44 | |
camelia | rakudo-moar 90e4da: OUTPUT«(Str)» | ||
FROGGS | abraxxa: I'd do that and get rid of the @-sigils | 18:45 | |
abraxxa | FROGGS: gladly! | ||
FROGGS | psch: araund? | 18:46 | |
around* | |||
abraxxa | cannot unbox... | ||
FROGGS | abraxxa: can you push? | ||
18:46
yqt joined
18:47
domidumont joined
|
|||
masak | wow, this is nice: ttp://okmij.org/ftp/Perl/Scheme-in-Perl.txt | 18:47 | |
masak wishes mvuets were on this channel so he would pass it on | |||
18:48
vendethiel joined
|
|||
pink_mist hands masak a missing 'h' | 18:48 | ||
FROGGS | pink_mist: nono, that's French | ||
'ttp | |||
pink_mist | d'oh lala | ||
masak | ah, 'm sorry | 18:49 | |
okmij.org/ftp/Perl/Scheme-in-Perl.txt | |||
18:50
rurban left
|
|||
abraxxa | FROGGS: a missing ; lead to the error | 18:50 | |
FROGGS | ohh | ||
psch | FROGGS: semi-around, yeah | 18:52 | |
FROGGS: i have some room to pay attention, though :) | |||
abraxxa | FROGGS: after the call say $col_name[0].deref; triggers Internal error: unhandled target type | ||
in sub nativecast at lib/NativeCall.pm:433 | |||
in method deref at lib/NativeCall.pm:102 | |||
FROGGS | psch: what would you do here? $ ./perl6-j -e 'enum Foo <foo bar baz>' | ||
===SORRY!=== | |||
Method 'role_typecheck_list' not found for invocant of class 'NQPClassHOW' | |||
abraxxa: can you push? | 18:53 | ||
psch | FROGGS: uh... probably look who calls that method on a NQPClassHOW and why that should or shouldn't happen... :) | 18:54 | |
FROGGS | hmpf | ||
:o) | |||
abraxxa | FROGGS: pushed | 18:55 | |
psch | FROGGS: i'm really confused by 376d7273bb344ec63ec1469846e4ef63fce45f57, fwiw | ||
FROGGS: the check for SIG_ELEM_SLURPY_POS seems logically reversed to the equiv spot in BOOTSTRAP.nqp | |||
FROGGS: but turning it around gives a StackOverflowError... | |||
Metamodel/BOOTSTRAP.nqp:724 is what i'm comparing it to | 18:56 | ||
abraxxa | FROGGS: that's how the pointer is passed in C: (dvoid**) &col_name | 18:57 | |
18:57
xfix joined,
xfix left,
xfix joined
|
|||
FROGGS | abraxxa: yes, that would fit... though I cant explain the error you get | 18:58 | |
psch: hmmmm, interesting | |||
psch | FROGGS: Binder hunches! :P | 18:59 | |
abraxxa | FROGGS: i guess what is missing is the encoding so it can decode from Buf to Str | ||
FROGGS | abraxxa: no, the error message indicates that it does not know what Str is, which is weird in many ways | 19:00 | |
abraxxa | comes from sub nativecast in NativeCall.pm | 19:01 | |
FROGGS: i also tried Str is rw but that results in a segfault, i guess because no memory is reserved | 19:04 | ||
FROGGS | abraxxa: can you just print $col_name[0]? | ||
abraxxa | FROGGS: Pointer<0x8a99178> | 19:06 | |
why use a CArray[Pointer[Str]] and not Pointer[Pointer[Str]]? | 19:07 | ||
FROGGS | abraxxa: and now print: nativecase(Str, $col_name[0]) | 19:08 | |
abraxxa: dunno... might also "work" (for some definition of work, since it doesnt work yet) | |||
abraxxa | UNBELIEVEABLE!!! | ||
the column names | |||
FROGGS | \o/ | 19:09 | |
abraxxa | how does it know how to decode? | ||
FROGGS | abraxxa: it defaults to utf8 | ||
abraxxa: but you can apply a trait called 'is encoded' or so | |||
abraxxa | can it be set explicitly? | ||
ämount works too ;) | 19:10 | ||
FROGGS | and btw, 'Str is rw' won't give you a char** AFAIK, so that's why you get a segfault there | ||
:o) | |||
19:11
zakharyas joined
|
|||
FROGGS | psch: I turned it around and build it now... | 19:11 | |
psch: it survived the setting... | |||
19:11
rurban joined
|
|||
FROGGS | psch: but that would certainly explain the failure modes I see | 19:12 | |
psch | FROGGS: nom and with your patch both threw StackOverflowError in Pod::To::Text iirc | ||
FROGGS | psch: sadly not... :o( I can build it, but it fails as usual | ||
abraxxa | FROGGS: i don't get why we need two pointers here, can you explain that please? | 19:13 | |
psch | huh? | ||
FROGGS | psch: I'm able to build Pod::To::Text fwiw | ||
abraxxa | FROGGS: and why doesn't it require the length that's passed back as well? | ||
psch | FROGGS: and it's still bailing with the same un-flat @tags? | 19:14 | |
FROGGS | abraxxa: you allocate a piece of mem to let the function store a value there, right? and it will store a char* | ||
abraxxa: so you end up having a char** | |||
abraxxa | char* is an array of chars? | ||
where one char is one byte, not one character? | 19:15 | ||
19:15
rurban left
|
|||
FROGGS | psch: ohh! that fixes the flat() bug it seems! | 19:15 | |
abraxxa: aye, given that C does not know what a character is | 19:16 | ||
dha | So, you've flat()tened that bug? | ||
dha hides | |||
FROGGS | :D | 19:17 | |
psch | FROGGS: curious. as mentioned, for me it ran into StackOverflowErrors... but i guess your gist from yesterday isn't up-to-date with your current working state | 19:18 | |
FROGGS | psch: I was able to work around the unflat @tags by changing 'flat a, b' to 'a, |b' | ||
aye | |||
19:25
domidumont left
19:31
thou joined
|
|||
abraxxa | FROGGS: and what i had before was just a char*? | 19:34 | |
and the values where memory addresses? | 19:35 | ||
or parts of one memory address | |||
[Tux] | which operation returns a (.....).Seq ? | 19:36 | |
abraxxa | FROGGS: does that declaration make a difference? CArray[Pointer[Str]] $attributep is encoded('utf8'), | ||
pink_mist | thought utf8 was already the default | 19:38 | |
19:38
cognominal left
|
|||
abraxxa | it is but OCI also allows UTF-16 and if that's what I need to use for whatever reason I'd like to find all places where I have to change the encoding | 19:38 | |
FROGGS | abraxxa: before you got the char* back split across 8 slots of the CArray[int8] most likely | 19:39 | |
abraxxa: yes, I think that signature is correct | 19:40 | ||
abraxxa | and how does it know the length? null terminated? | ||
FROGGS | psch: do you want to push your gotcha? | ||
psch: it really solved the flat() bug | |||
abraxxa: aye | |||
nine | Seqs dispatching on Positional is intentional | 19:41 | |
[Tux] | «return [ @in.map (-> @r { $%( @h Z=> @r ) }) ];» used to return [[< a b c>], [1,2,3], ...] but after GLR returns [[<a b c>], ([1,2,3],...).Seq] | ||
nine | Same as assigning Seq to Positional doing the right thing | ||
[Tux] | is that intentional? | ||
nine | m: my @a = <a b c>; my @b = 1, 2, 3; say (@a Z=> @b).perl; | 19:43 | |
camelia | rakudo-moar 90e4da: OUTPUT«(:a(1), :b(2), :c(3)).Seq» | ||
psch | FROGGS: it didn't seem to fix anything when applied to nom HEAD, so feel free to group it with your other fixes | ||
nine | m: my @a = <a b c>; my @b = 1, 2, 3; say ($%(@a Z=> @b)).perl; | ||
camelia | rakudo-moar 90e4da: OUTPUT«{:a(1), :b(2), :c(3)}» | ||
jnthn | skaji: We simultaneously wanted to be clear about what are consumable produces of values and also allow a sub foo(@x) { } to be called on something like foo(@a.grep(...)). Seq itself can't be sanely Positional because you only get one shot at the values. | 19:44 | |
yoleaux | 18:03Z <japhb> jnthn: What did you mean by "Maybe .gist needs to go in the no-pun list."? | ||
FROGGS | psch: k, will do | ||
jnthn | skaji: So we notice the types didn't match, and then fail over to binding the result of Seq.list; this actually memoizes the list it returns too | ||
skaji: We actually have a role (PositionalBindFailover) that marks out Seq and HyperSeq as the types that have this behavior. | 19:45 | ||
.tell japhb Normally if you call a method on a role then we pun it into a class and call the method on the pun; there's a small list of exceptions. | 19:46 | ||
yoleaux | jnthn: I'll pass your message to japhb. | ||
jnthn | |Tux|: .map returns a Seq after GLR | 19:47 | |
[Tux] | just add .list at the end or something like that? | ||
skids | jnthn: down the road are we likely to be able to (/will we want to) discriminate between (Positional $foo) and (@foo) for PositionalBindFailover? | 19:48 | |
mohij | Is there a dynamic variable telling the exact version of perl6 (the thing perl6 -v reports)? | 19:49 | |
yoleaux | 05:01Z <tadzik> mohij: I'd be delighted :) Can you send me a PR? | ||
timotimo | m: say $*VM.version | 19:50 | |
camelia | rakudo-moar 90e4da: OUTPUT«v2015.7.108.g.7.e.9.f.29.e» | ||
FROGGS | m: say $*PERL.compiler.version | ||
camelia | rakudo-moar 90e4da: OUTPUT«v2015.7.1.768.g.90.e.4.dab» | ||
jnthn | [Tux]: If you actually want a List, yes | ||
FROGGS | mohij: ^^ | ||
timotimo | oh, right, VM.version is the moarvm version | ||
jnthn | skids: We don't at the moment; I don't see a strong reason to | ||
[Tux] | .list still leaves in the () | ||
nine | skids: if you add a candidate that takes a PositionalBindFailover, it will probably bind more strongly than Positional | ||
FROGGS | [Tux]: then you perhaps want .Slip | 19:51 | |
skids | nine: that was my only reason to want to, so if that works... but isn't it just a role too? | ||
mohij | Thanks! | ||
FROGGS | psch: damn, now I get the StackOverflowError too :o( | ||
skids | nine: OIC, I'll try that sometime. | 19:52 | |
FROGGS | psch: but rerunning that single line made it pass -.- | ||
jnthn | Generally you just want to take Iterable :) | ||
nine | m: multi sub foo(PositionalBindFailover $a) { say "Seq"; }; multi sub foo(Positional $a) { say "Array"; }; foo((1,2,3).map({$_})); | ||
camelia | rakudo-moar 90e4da: OUTPUT«Ambiguous call to 'foo'; these signatures all match::(PositionalBindFailover $a):(Positional $a) in block <unit> at /tmp/j9f8xBJ2lc:1» | ||
nine | Funny. Locally this works | 19:53 | |
[Tux] | This Seq has already been iterated, and its values consumed | 19:54 | |
nine | Oh, I don't have the dispatcher fix yet | ||
skids | jnthn: not when choosing an implementation that differs based on whether "user expects it to be memoized anyway." | ||
dalek | kudo/UnbreakJVMBuildFactory: 7315a8a | FROGGS++ | src/core/Variable.pm: flatten export trait list, like we do for Routines |
||
mohij | .tell tadzik PR is out. Windows testing now... | ||
yoleaux | mohij: I'll pass your message to tadzik. | ||
dalek | kudo/UnbreakJVMBuildFactory: 1c313d2 | FROGGS++ | src/core/Inc.pm: box -I string, we'll .split it later |
19:55 | |
mohij | Poll for Windows users: How do you develop and deploy Perl6 on Windows? What would your ideal develop/deploy workflow look like? | 19:56 | |
dalek | kudo/UnbreakJVMBuildFactory: 91b7725 | FROGGS++ | src/vm/jvm/runtime/org/perl6/rakudo/Binder.java: psch++, align JVM's slurp/slurp-flat code to moar's |
||
FROGGS | mohij: I dunno... deploy an msi? | 19:57 | |
mohij | how would you update? Do you need more than one version installed? | ||
jnthn | skids: Do you have a concrete use case? | 19:58 | |
mohij | *version of perl6 | ||
FROGGS | mohij: more than one version of rakudo? usually not | ||
mohij: upgrade would mean to run a newer msi, hopefully it would not replace my panda state, so I could rebootstrap | |||
jnthn | skids: My gut feeling is trying to deal with something other than Iterable or Positional is kinda odd | ||
e.g. you typically want to iterate over the thing *or* index into the thing | 19:59 | ||
psch | FROGGS: hm, the SOE was consistent for me, no matter if called from make or manually via the CLI... | ||
FROGGS | psch: it was the first time I'd seen it | ||
psch | i had played with raising Xss to ridiculous values, but that just kept eating memory... | ||
FROGGS: maybe your other changes push it somewhere less deterministic... :/ | 20:00 | ||
FROGGS | psch: yeah, I had quite some more say statements... and the SO appeared after removing them | ||
skids | m: perl6 -e 'multi sub a (Iterable $a) { 42.say; a($a.list) }; multi sub a (@a) { 43.say }; multi sub a ($scalar) { 44.say }; a((1,2,2,3).grep(2));' | 20:03 | |
camelia | rakudo-moar 90e4da: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Yy9GNwTZ0xTwo terms in a rowat /tmp/Yy9GNwTZ0x:1------> 3perl6 -e7⏏5 'multi sub a (Iterable $a) { 42.say; a( expecting any of: infix infix stopper postfix …» | ||
skids | m: perl6 -e 'multi sub a (PositionalBindFailover $a) { 42.say; a($a.list) }; multi sub a (@a) { 43.say }; multi sub a ($scalar) { 44.say }; a((1,2,2,3).grep(2));' | ||
camelia | rakudo-moar 90e4da: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CgiHw7FzINTwo terms in a rowat /tmp/CgiHw7FzIN:1------> 3perl6 -e7⏏5 'multi sub a (PositionalBindFailover $a expecting any of: infix infix stopper postfix …» | ||
skids | oops. | ||
m: multi sub a (PositionalBindFailover $a) { 42.say; a($a.list) }; multi sub a (@a) { 43.say }; multi sub a ($scalar) { 44.say }; a((1,2,2,3).grep(2)); # this one works | |||
camelia | rakudo-moar 90e4da: OUTPUT«Ambiguous call to 'a'; these signatures all match::(PositionalBindFailover $a):(@a) in block <unit> at /tmp/4Pq2IrL1r2:1» | ||
skids | m: multi sub a (Iterable $a) { 42.say; a($a.list) }; multi sub a (@a) { 43.say }; multi sub a ($scalar) { 44.say }; a((1,2,2,3).grep(2)); | 20:04 | |
camelia | rakudo-moar 90e4da: OUTPUT«X::Multi::Ambiguous exception produced no message in block <unit> at /tmp/R0LkU1wES6:1» | ||
skids | So, nine++ | ||
FROGGS | psch: I recompiled the setting and there is still no SOE | ||
psch | FROGGS: during Pod::To::Text is where i saw it usually | 20:05 | |
FROGGS | psch: and it also seems like the next-in-split-hack isnt needed anymore | ||
psch | FROGGS: as in, only there, actually | ||
FROGGS | psch: aye, it compiled P2T and exploded in NativeCall | ||
20:05
dha left
|
|||
skids | Oh weird, that frst one worked locally. I must be behind. | 20:06 | |
abraxxa | is there an int64 or is long or longlong what i need? | ||
20:07
darutoko left
|
|||
FROGGS | abraxxa: depends... what *do* you need? there are all of them | 20:07 | |
abraxxa | signed bytes 8 | ||
FROGGS | m: use NativeCall; say int64 | 20:08 | |
camelia | rakudo-moar 90e4da: OUTPUT«(int64)» | ||
FROGGS | m: say int64 | ||
camelia | rakudo-moar 90e4da: OUTPUT«(int64)» | ||
FROGGS | abraxxa: long and longlong are variable in size | ||
abraxxa | the oratypes.h file says: ifdef __LP64__ define orasb8 signed long else define orasb8 signed long long | ||
20:09
dha joined
|
|||
nine | So you want int64 | 20:09 | |
abraxxa | nine: thanks. can you document it please? | ||
labster | m: say (98/99).base(10, 1) | ||
camelia | rakudo-moar 90e4da: OUTPUT«010.0» | ||
20:10
rindolf left
20:11
zakharyas left
|
|||
dalek | c: da7dc52 | FROGGS++ | lib/Language/nativecall.pod: mention int64, abraxxa++ |
20:12 | |
FROGGS | abraxxa / nine: done | ||
abraxxa | dalek++ | 20:13 | |
oh, dalek seems to be a bot | |||
FROGGS++ | |||
mohij | .botsnack | ||
yoleaux | :D | ||
FROGGS | aye, dalek reports commits to github | 20:14 | |
moritz | .humansnack | ||
those pesky, unreliable and unresponsive humans... :-) | 20:15 | ||
mohij | .oO(send-me-a-beer-license) |
||
nine | :D | ||
FROGGS | :D | 20:16 | |
[Tux] | t/90_csv.t .. ok | ||
All tests successful | |||
almost there | |||
skids | nine,jnthn: So that PositionalBindFailover trick worked on 16d366a2 and stopped working sometime thereafter. FWIW. | ||
FROGGS | nice | ||
jnthn | skids: You sure? 9fdaf03b0a4 is the one I'd have expected to change it, when I fixed the multi-dispatcher. | 20:17 | |
skids checks. | |||
jnthn | Positional and PositionalBindFailover are going to conflict | ||
They have no relationship and so are equally narrow | |||
20:18
tokuhiro_ joined
|
|||
skids | Oh, I never build that merge, so it must have been earler. | 20:19 | |
jnthn goes to rest & | |||
skids | 13f829c then | ||
20:20
zoosha left
20:21
zoosha joined
20:22
tokuhiro_ left
|
|||
FROGGS | jnthn: rest well | 20:22 | |
[Tux] | tux.nl/Files/20150908222424.png | 20:24 | |
20:24
cognominal joined
|
|||
[Tux] | rest later | 20:24 | |
skids should maybe try re-multifying the postcircumfix:<[]> stuff post-MMD changes. | 20:27 | ||
ab5tract_ | github.com/ab5tract/Terminal-Print...1729f4bd88 | 20:28 | |
[Tux] | test 50000 54.734 54.647 | 20:29 | |
test-t 50000 54.701 54.614 | |||
ab5tract_ | ^^ This commit reminded me of the days where I would figure out some kind of unexpected, list related solution and then post it here. The response was always "this will hopefully be better after the GLR" | ||
20:30
Loren left
|
|||
ab5tract_ | It's nice that it's a memory, and even nicer that our hopes were well-founded! | 20:31 | |
nine | Now we just have to get performance to where it should be :) | 20:32 | |
ab5tract_ | nine: Text::CSV is a good canary for that, but give t/basics.t a spin in Terminal::Print and we have another good candidate for "something that could use speeding up" | 20:33 | |
tadzik | computer, messages | ||
yoleaux | 19:54Z <mohij> tadzik: PR is out. Windows testing now... | ||
tadzik | mohij: how's it going? :) | ||
20:34
popl joined
|
|||
popl | congrats on the release everyone | 20:34 | |
ab5tract_ | there is a @colors.pick in there that is quite costly, but even without it .. well, it's a visual representation of some gains we can make :) | ||
mohij | Fine. :-) Hacking rakudobrew lifts the mood quite some. It's a nice thing hacking on. | ||
tadzik | I'm glad to hear that :) | 20:35 | |
smash | .tell TimToady more interesting combinations tweag.github.io/HaskellR/ | 20:36 | |
yoleaux | smash: I'll pass your message to TimToady. | ||
timotimo | popl: what, a release? | 20:37 | |
mohij | Do you know whether rakudo has something like local::lib built in? Can panda install to a (different) local folder? | ||
masak | popl: not quite there yet ;) | 20:38 | |
popl | Well, in October apparently. | ||
tadzik | mohij: yeah, panda respects DESTDIR iirc | 20:39 | |
popl | timotimo: perl6releasetalk.ticketleap.com/per...lk/details is what I am referring to. | ||
*to what I am referring | |||
tadzik | mohij: I'm actually curious if anyone ever used that feature though :) | ||
except myself for testing | |||
mohij | halfway to a carton on perl6, yay \o/ | ||
masak | popl: that talk is in October. the release is still scheduled (?) for Christmas. | 20:41 | |
...but feel free to have a peek at Perl 6 before that! :D | |||
popl | okay then, I retract my congratulations | ||
timotimo | ah | ||
popl | better? :P | ||
timotimo | no worse feeling in the world than being wrongly congratulated!! | 20:42 | |
popl | apparently | ||
leont | Install destinations is something that will need more attention AFAIK (though I haven't looked at it in detail recently) | 20:43 | |
ugexe | they exist already | ||
timotimo | is there a good reason against giving CArray a "new" candidate that takes values and constructs itself from them? | ||
ugexe | CompUnitRepo::Local::Installation.new($dist-dir) | 20:44 | |
20:44
espadrine joined
20:45
popl left
|
|||
timotimo | m: Buf[int64].new(123456).gist.say | 20:46 | |
camelia | rakudo-moar 90e4da: OUTPUT«Buf[int64]:0x<1e240>» | ||
timotimo | ah, nice. | ||
ab5tract_ | timotimo: Maybe we've been waiting on shaped arrays for it? | ||
ugexe | i use it to test install/uninstall without touching rakudos default module locations | ||
timotimo | very unlikely | 20:47 | |
masak | 'night, #perl6 | ||
timotimo | m: Buf[num].new(123456).gist.say | ||
camelia | rakudo-moar 90e4da: OUTPUT«MVMArray: bindpos expected num register in any at src/gen/m-Metamodel.nqp:1679 in block <unit> at /tmp/tR_jBDGgeb:1» | ||
timotimo | m: Buf[num].new(123456e0).gist.say | ||
camelia | rakudo-moar 90e4da: OUTPUT«This type cannot unbox to a native integer in any at src/gen/m-Metamodel.nqp:1679 in block <unit> at /tmp/NbsSm2n0Ag:1» | ||
timotimo | interesting | ||
buf expects to contain only inty things, but doesn't complain early when being created with nums | |||
though we have num arrays | 20:48 | ||
m: say 15.5e0.fmt("%02x").say | |||
camelia | rakudo-moar 90e4da: OUTPUT«0fTrue» | ||
timotimo | m: 15.5e0.fmt("%02x").say | ||
camelia | rakudo-moar 90e4da: OUTPUT«0f» | ||
timotimo | m: 15.5e4.fmt("%02x").say | ||
camelia | rakudo-moar 90e4da: OUTPUT«25d78» | ||
timotimo | that's not so happy, eh | ||
m: 15.5e4.fmt("%f").say | 20:49 | ||
camelia | rakudo-moar 90e4da: OUTPUT«155000.000000» | ||
skids wonders if a convenience for "make a GC-safe buf from the CArray and length parameters coming back from this nativecall" would be awesome, or just end up ugly. | |||
timotimo | m: 15.5e4.fmt("%s").say | ||
camelia | rakudo-moar 90e4da: OUTPUT«155000» | ||
japhb | timotimo: Buf is notionally serialized data ready for writing to the wire. Perhaps it doesn't support non-integers because floating point doesn't have a well-standardized wire format? Or maybe it's just a NYI. | ||
yoleaux | 19:46Z <jnthn> japhb: Normally if you call a method on a role then we pun it into a class and call the method on the pun; there's a small list of exceptions. | ||
japhb | Ah | 20:50 | |
timotimo | japhb: i agree it's a language design question | ||
japhb still wonders why given all the imperfect standards people *have* been willing to make, that we haven't just standardized on IEEE floating point bit patterns as the default standard for floating point on the wire | 20:52 | ||
timotimo | i didn't know we hadn't, tbh | ||
japhb | Aside from endian concerns (which are there for two's-complement integers anyway), it's basically about as "de facto standard" as you get. | ||
timotimo | oh, yeah, endianness | 20:53 | |
japhb | timotimo: All sorts of standards assume silly things like taking the IEEE data, unioning it with an appropriate int, and then serializing that. | 20:54 | |
20:54
Ven joined
|
|||
japhb | Or going "screw it, we're just going to output scientific notation in ASCII" | 20:54 | |
timotimo | m) | 20:55 | |
japhb | (Although oddly, it turns out that scientific notation in ASCII + gzip can compare well with IEEE bit patterns for file size on real-world inputs) | 20:56 | |
(The Collada 3D interchange format does this, FWIW. Arrays of floating point are just space-separated ASCII, and then it's assumed you gzip the file.) | 20:57 | ||
timotimo | oh, interesting | 20:59 | |
21:00
kaare_ left,
kaare_ joined
|
|||
timotimo | perl6 -e 'use NativeCall; my $buf = CArray[int8].new; $buf[5] = 10; $buf.gist.say' | 21:03 | |
IntTypedCArray[int8]:0x<00 00 00 00 00 0a> | 21:04 | ||
21:04
skids left
|
|||
timotimo | (this also makes .elems and .list work) | 21:04 | |
i hope people are OK with these change | 21:05 | ||
changes | |||
21:05
[Sno] left
21:07
kaare_ left,
[Sno] joined
21:08
rurban joined
|
|||
timotimo | and a .new that you can pass values to | 21:09 | |
21:09
rurban left
21:10
xfix left
21:12
FROGGS left
|
|||
timotimo | perl6 -e 'use NativeCall; my $buf = CArray[int8].new(1, 2, 3, 4); $buf.perl.say' | 21:12 | |
IntTypedCArray[int8].new(1, 2, 3, 4) | |||
^- just like this | |||
21:14
FROGGS joined
|
|||
dalek | kudo/nom: 10dcbad | timotimo++ | / (2 files): give CArray more methods you'd expect from arrayish things .gist and .perl for int and num, .elems and .list and also a method new that noms values into the CArray. comes with tests. |
21:17 | |
timotimo | abraxxa: ^ you may like this | ||
abraxxa | timotimo: looking | 21:18 | |
(comes with tests)++ | |||
timotimo | :) | ||
abraxxa | timotimo: i wonder why you tested 4 out of the 5 array elements ;) | 21:19 | |
timotimo | that's ... a secret! | ||
abraxxa | my number 1 wish is to improve the 'Unhandled exception: Cannot unbox a type object' error message to point at a line number | ||
21:19
TEttinger joined
|
|||
timotimo | oh | 21:20 | |
can you give me a golf for that? | |||
psch | .tell FROGGS fwiw, the SOE golfs to 'unit class Foo; sub foo is export { }' | ||
yoleaux | psch: I'll pass your message to FROGGS. | ||
abraxxa | timotimo: the most boring car ever? | 21:21 | |
psch | .tell FROGGS and the "unit" isn't even needed | ||
yoleaux | psch: I'll pass your message to FROGGS. | ||
timotimo | is golf that boring? | ||
i think golf is a good car | |||
i did my driver's license training in a golf, then a passat. both good cars | 21:22 | ||
abraxxa | good !~ boring | ||
timotimo | ah | 21:23 | |
of course | |||
psch | m: sub f { say &?ROUTINE.name }; f | ||
camelia | rakudo-moar 90e4da: OUTPUT«f» | ||
psch | m: sub f { say &?ROUTINE }; f | ||
camelia | rakudo-moar 90e4da: OUTPUT«sub f () { #`(Sub|61128792) ... }» | ||
abraxxa | not that i think that Golf is a good car... | ||
timotimo: an undeclared variable lead to the 'Unhandled exception: Cannot unbox a type object' error | 21:24 | ||
labster | Golf is the minimum viable car? | 21:25 | |
21:25
nowan_ is now known as nowan
|
|||
abraxxa | m: die "undeclared var $var"; | 21:25 | |
camelia | rakudo-moar 90e4da: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Gs9lSmyBJTVariable '$var' is not declaredat /tmp/Gs9lSmyBJT:1------> 3die "undeclared var 7⏏5$var";» | ||
abraxxa | m: use NativeCall; die "undeclared var $var"; | ||
camelia | rakudo-moar 90e4da: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UELAXa3noFVariable '$var' is not declaredat /tmp/UELAXa3noF:1------> 3use NativeCall; die "undeclared var 7⏏5$var";» | ||
21:26
audy joined,
TEttinger left
|
|||
labster | m: no strict; die "undeclared var $var"; | 21:26 | |
camelia | rakudo-moar 90e4da: OUTPUT«Use of uninitialized value $var of type Any in string context in block <unit> at /tmp/jaGnXolcx2:1undeclared var  in block <unit> at /tmp/jaGnXolcx2:1» | ||
shinobi-cl | Hi all | 21:27 | |
labster | hi shinobi-cl | ||
abraxxa | is there a syntax to say if $var == 'A' or 'B' { ? | 21:28 | |
21:28
TEttinger joined
|
|||
shinobi-cl | i have a small module i want to upload, that allows to have an array and reference it by rows and columns. Also allows to use headers for the columns instead of numbers. And it is static. You can search on the columns, and generate an indes (basically, a hash of arrays) . What do you think on naming it "Data::StaticTable" ? Too generic maybe? | 21:28 | |
colomon | abraxxa: you mean like if $var == 1 | 2 { ? | 21:29 | |
or possibly if $var eq ‘A’ | ‘B’ { ? | |||
abraxxa | colomon: if that works, yes | ||
i tried: elsif $dty == (SQLT_INT, SQLT_NUM) { | |||
those are constants | |||
seems to work | 21:30 | ||
colomon | m: my $a = 10; if $a == 9 | 10 | 11 { say “yup”; }; | ||
camelia | rakudo-moar 90e4da: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nZAjT0ljdZBogus statementat /tmp/nZAjT0ljdZ:1------> 3my $a = 10;7⏏5 if $a == 9 | 10 | 11 { say “yup”; }; expecting any of: prefix term» | ||
21:30
muraiki left
|
|||
colomon | Not sure why camelia doesn’t like that, but except for the quotes around yup it is correct. :) | 21:31 | |
pink_mist | the ctrl+h character might be the reason | ||
abraxxa | can i define a variable without a type and change the type later? | 21:32 | |
psch | m: say “yup”; | 21:33 | |
camelia | rakudo-moar 90e4da: OUTPUT«yup» | ||
pink_mist | colomon: that is, you embedded a literal backspace character in your line | ||
21:33
Ven left
|
|||
leont | Fun fact: until very recently dollar control-character was a valid variable in perl 5. Not a feature to steal ;-) | 21:36 | |
vendethiel remembers leont talking to people about this at APW14, and our eyes getting bigger and bigger *g* | 21:37 | ||
TEttinger | the unicode byte order marker, aka zero-width space, is a valid identifier part in java and a valid identifier in clojure and scala | ||
I strongly suspect it would need to be valid in JVM perl at least | 21:38 | ||
psch | TEttinger: why? | 21:39 | |
TEttinger | because there would be JVM names you couldn't call otherwise in perl6 | ||
is there a way to eval on the jvm perl6 instead of moarvm with camelia? | 21:40 | ||
psch | TEttinger: i'd say you'd just have to call them with the quoted method name syntax | ||
TEttinger: jvm is broken currently, didn't quite survive the glr merge i think | |||
TEttinger | ah | 21:41 | |
psch | TEttinger: it also depends on whether java introspection (and indy) properly reproduce the zero-width space | ||
TEttinger | m: say "y\ufeffay" | ||
camelia | rakudo-moar 10dcba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fICSnk6VdyUnrecognized backslash sequence: '\u'at /tmp/fICSnk6Vdy:1------> 3say "y\7⏏5ufeffay" expecting any of: argument list double quotes term» | ||
psch | TEttinger: if they don't we don't get it while building the name, if they do... i'm not actually sure what happens then :) | ||
TEttinger | what... is the unicode 4-hex-digit escape in perl6? | 21:42 | |
psch | m: say "y\x[feff]ay" | ||
camelia | rakudo-moar 10dcba: OUTPUT«yay» | ||
TEttinger | m: my $yay = 10; say $yay; | 21:43 | |
camelia | rakudo-moar 10dcba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/suoI05cxznBogus postfixat /tmp/suoI05cxzn:1------> 3my $y7⏏5ay = 10; say $yay; expecting any of: constraint infix infix stopper postfix …» | ||
psch | m: say "y\c[ZERO WIDTH SPACE]ay" | ||
camelia | rakudo-moar 10dcba: OUTPUT«yay» | ||
TEttinger | it appears to be invalid in moarvm | ||
psch | TEttinger: i don't think the BOM is the zero width space, though | ||
TEttinger | unfortunately, it is a whole mess of unicode history | 21:44 | |
psch | m: say chr "\c[ZERO WIDTH SPACE]" | ||
camelia | rakudo-moar 10dcba: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏' (indicated by ⏏) in block <unit> at /tmp/Ycyy_f6mxZ:1Actually thrown at: in block <unit> at /tmp/Ycyy_f6mxZ:1» | ||
psch | ehh, how was that | ||
m: say unival "\c[ZERO WIDTH SPACE]" | |||
camelia | rakudo-moar 10dcba: OUTPUT«NaN» | ||
psch | m: say ord "\c[ZERO WIDTH SPACE]" | ||
camelia | rakudo-moar 10dcba: OUTPUT«8203» | ||
psch | m: say (ord "\c[ZERO WIDTH SPACE]").base(16) | ||
camelia | rakudo-moar 10dcba: OUTPUT«200B» | ||
TEttinger | www.fileformat.info/info/unicode/ch.../index.htm | 21:46 | |
m: say ord "\c[ZERO WIDTH NO-BREAK SPACE]" | 21:47 | ||
camelia | rakudo-moar 10dcba: OUTPUT«65279» | ||
psch | ah, no-break | ||
21:48
n0tjack left
|
|||
TEttinger | and it's in an arabic presentation forms block, of all things | 21:48 | |
timotimo | abraxxa: can you give me a test case that leads to that error? | ||
m: my int $foo = Int | 21:49 | ||
camelia | rakudo-moar 10dcba: OUTPUT«Cannot unbox a type object in block <unit> at /tmp/srIZT25vKA:1» | ||
timotimo | like that? that has a line number to go with it | ||
21:50
rangerprice joined
|
|||
rangerprice | How can i redirect the stderr stream to stdout ? | 21:51 | |
timotimo | you can my $*ERR = $*OUT | ||
moritz | $*ERR = $*OUT | ||
colomon | pink_mist: I assure you it was not intentional; indeed, I wouldn’t know how to do it if I wanted to. | 21:54 | |
21:54
rurban joined
|
|||
pink_mist | colomon: I'm not surprised; the only reason I went into so much detail is because a lot of irc clients won't even show you it happened; take a look at the irclog linked in the topic for example; you can't see that it's there at all in that ... but it's right before the 'if' | 21:55 | |
colomon: which is also where camelia reported the error | |||
abraxxa | timotimo: didn't find out what causes it, but if you edit DBIish you can force it easiliy | 21:57 | |
i've pushed all i've done today to my repo | 22:00 | ||
timotimo: it happens for example if you remove the ; in line 688 in lib/DBDish/Oracle.pm6 | |||
timotimo | abraxxa: something i just remembered, you could also have a native int "is rw" parameter for the size that the call fills in for you | 22:02 | |
abraxxa | i'm done for today, bye! | ||
timotimo | gnite abraxxa! | 22:03 | |
22:03
Possum left
|
|||
rangerprice | And if i want to redirect the stderr to a variable, how i can do ? | 22:03 | |
abraxxa | timotimo: yeah, that should work too! | ||
22:04
rurban1 joined
|
|||
abraxxa | timotimo: also good night and thanks! | 22:04 | |
22:04
abraxxa left
22:05
rurban left,
rurban1 left
22:06
rurban joined
|
|||
japhb | rangerprice: ISTR there is an IO::String module available via panda (or zef, I suppose) | 22:06 | |
22:09
cognominal left
22:11
dha left
22:12
laubster left
|
|||
psch | .tell FROGGS the mentioned golf calls sink from EXPORT_SYMBOL, goes through a bunch of pull-, push-, and reify- methods and then ends in a new, new, bless, BUILDALL loop... | 22:13 | |
yoleaux | psch: I'll pass your message to FROGGS. | ||
22:14
dha joined
22:16
FROGGS left,
hernanGOA left
22:20
tokuhiro_ joined,
FROGGS joined
22:22
nightfrog joined
22:24
tokuhiro_ left
22:25
lolisa joined
22:33
espadrine left
22:40
rurban left,
mohij left
|
|||
thou | is 'use v6' deprecated now? | 22:50 | |
Trying to understand why i got a pull request removing that from files | |||
gfldex | r: use v6; | ||
camelia | ( no output ) | ||
..rakudo-jvm 10dcba: OUTPUT«Can't open perl script "/home/camelia/rakudo-inst/bin/eval-client.pl": No such file or directory» | |||
ShimmerFairy | thou: it's not deprecated or discouraged; I'd like to see this PR, sounds interesting | 22:54 | |
thou | github.com/softmoth/p6-Template-Mu...he/pull/11 | ||
ugexe | rakudobrew doesn't seem to work on OSX anymore | 22:55 | |
thou | mj41 is Michal Jurosz | ||
ShimmerFairy | thou: I'd change those C<v6;> lines to C<use v6;> (just my preference, and it's also a use statement vs. Version object in sink context), but aside from that I'd reject the PR, esp. without a rationale given. | 22:56 | |
labster | didn't 'v6;' previously mean "no strict;" and does it still? | 22:58 | |
23:00
leont left
|
|||
thou | labster, I think you're right. I can't seem to find that in the synopses though. | 23:00 | |
23:01
vendethiel left
|
|||
ugexe | v6 used to turn strict on (when it was not default for -e for example) | 23:01 | |
timotimo | i think it still means that | ||
m: v6; $x = 10 | |||
camelia | rakudo-moar 10dcba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/EhZz3isSlGVariable '$x' is not declaredat /tmp/EhZz3isSlG:1------> 3v6; 7⏏5$x = 10» | ||
timotimo | apparently it doesn't any more | ||
ugexe | maybe it was `use v6` only then | 23:02 | |
probably remembering -Mv6 | |||
ShimmerFairy | thou: I definitely recall something about v6 being in sink context but not getting warned about that, or something :) | 23:03 | |
23:05
bbkr_ joined
|
|||
thou | Yeah. I can't find any reference to bald 'v6;' on design.perl6.org now; I'll reject that pull request but update all to 'use v6;' | 23:06 | |
ShimmerFairy | I'm surprised to not see the bare 'v6' mentioned anymore, but it does make sense that we wouldn't want that to be magical :) | ||
rangerprice | Do you know a generic approach to see what shell execute the command inside the backstick (``) ? | ||
23:07
skids joined,
bbkr left
|
|||
thou | rangerprice: Does 'set -x' do what you want? | 23:07 | |
maybe I misunderstood your question... | 23:08 | ||
rangerprice | I would like to know what shell execute the `command` | 23:09 | |
pink_mist | presumably the shell in your /etc/passwd file if on *nix | 23:10 | |
maybe? | |||
geekosaur | you can test that easily enough with something like perl6 -e '`ps -fp$$`.say', Id' think | 23:11 | |
I'd also think /bin/sh but... | |||
hm, might need to escape the $s | |||
geekosaur should update rakudo on this machine at some point >.> | 23:12 | ||
ShimmerFairy | I don't think we even have backticks | ||
nope, you'd have to do qx`...` if you really wanted to use backticks in P6 :) | |||
rangerprice | Is backstick more efficient than exec() or system() ? | 23:13 | |
ugexe | m: say %*ENV<SHELL> | ||
camelia | rakudo-moar 10dcba: OUTPUT«/bin/bash» | ||
japhb built all just before the glr merge, and is afraid to rebuild his main perl6 tree until the ecosystem fallout dies down, lest he break it and be sad | |||
geekosaur | less, I'd expect, since it connects to a pipe and captures output | ||
japhb | rangerprice: backtick is for capturing stdout. | ||
rangerprice | i didn't yet learn perl 6, actually i'm on perl 5 ! | 23:14 | |
geekosaur | using `` as a shorthand for "system" is an old perl5ish code smell | ||
japhb | rangerprice: I answered for Perl 5, because I guessed as much. :-) | ||
ShimmerFairy | japhb: interesting, I'm in pre-glr because the allomorphs branch I've been working on started before the merge. It's not by choice that I don't have GLR yet :P | ||
pink_mist | rangerprice: you might want #perl then, not #perl6 ... | ||
japhb | ShimmerFairy: Yeah, understood. Looking forward to getting the allomorphs in the main tree, that'll be one of my really old wishes come to fruition. | 23:15 | |
rangerprice | pink_mist: oh thank ! but i will also stay here, after all, i'm a great lambda camel | 23:16 | |
japhb | rangerprice: Pugs devotee? | ||
ShimmerFairy | japhb: I "just" need to change how I do val() at compile-time (last time I tried I got too annoyed with one problem that cropped up), and then I'd definitely merge it in. I could merge it in now, in fact, it's just not handling compile-time val() in a DRY way | ||
japhb | nod, saw something about using World lookup to get the setting version of val() in the backlog | 23:17 | |
ShimmerFairy | japhb: if you didn't catch the recent commits (I pushed the branch a while back), I did put back in your original code, which did improve things by a couple seconds :) | ||
rangerprice | japhb: yes | ||
23:18
rangerprice left
|
|||
ShimmerFairy | (And doing that showed me that val()'s implementation wasn't the issue with the slowdown anymore, just the sheer number of calls to val() that happen) | 23:18 | |
23:19
rangerprice joined
23:23
ab5tract_ left
|
|||
ShimmerFairy | Also something that's come up is whether certain <>/«» lists, like %hash<subscripts>, should have :v done on them like everything else, or if :v should only be done in places where you as the user could coerce resulting values | 23:23 | |
(if the latter, then you'd need %hash{<subscripts>} to get val processing on a <>/«» list, because there you could do stuff like %hash{<subscripts 42>».Numeric}) | 23:25 | ||
Certainly something I'd like TimToady's opinion on, I think it might be a nicer way than the mostly-implied "<>/«» does :v everywhere all the time" :) | 23:28 | ||
japhb | ShimmerFairy: Thank you for putting my code back, I appreciate that. I wonder how much my original tuning has rotted over the years. | ||
ShimmerFairy | japhb: keep in mind that my original code ran my one sorting benchmark to 90s on average, so the "couple seconds less" is after I did a bunch of optimizing changes to my version :) | 23:29 | |
japhb | ShimmerFairy: I do think it's sane to say that hash subscripting (and perhaps all places that <> is pretty clearly just syntactic sugar) does not deserve :v without a couple extra characters of effort. | ||
ShimmerFairy | japhb: and when I put it in, I only changed your code enough to work in val() (of course), and made \i required on NaN\i and Inf\i :) | 23:30 | |
japhb: there are some tests that fail because your code is more permissive on "slash rationals", but I haven't done anything about that (fixing neither tests nor code) pending some sort of decision on that | 23:31 | ||
japhb | A decent change. I hadn't bothered, mostly based on "until someone cares one way or the other, don't force the decision" | ||
ShimmerFairy | The \i required was just to fix some tests I had un-TODOd back when my version was still in place, and I figured making \i required was better than re-TODOing (and it was a simple enough change, so no big deal) :P | ||
japhb | The slash rational code was intentionally permissive (I happen to like that, because I like .Numeric and constant folding to produce the same value if possible), but it's more preference than requirement | 23:32 | |
It just seems easier to explain that way. | |||
japhb attempted to think ahead to not causing jnthn, masak, et al. pain in their classes. :-) | 23:33 | ||
ShimmerFairy | japhb: I personally wouldn't mind if the only limit was "only one slash in a slash rational", like we only allow one point in a point rational :) | ||
And if for some reason we wanted val() to handle "<1/2>", then we'd want that to be as restrictive as actual <1/2> in code, so that's where the more restrictive view could go :P | 23:36 | ||
japhb | nodnod | 23:37 | |
23:39
Urchin left
23:41
lolisa left
23:43
spider-mario left
|
|||
ShimmerFairy | japhb: in terms of tuning, I wonder how much unboxing might contribute to that; you have a lot of literal numbers in your version, which are mostly likely read as Ints by the parser at first, which then have to be unboxed for the nqp::ops. If that is contributing greatly to it, I'm not sure how that could be fixed, though :( | 23:46 | |
japhb | Hmmm. Back in The Old Days(tm) ISTR it used to be that literal numbers directly used as nqp::op arguments where just handled directly, no box/unbox. But it may be that that was only an optimization which we may not do anymore. :-/ | 23:52 | |
Might be worth looking at the --target=optimize on that. | |||
23:53
mprelude left
|
|||
japhb | And as for how to work around that, we could create some scoped native constants and use them that way, I suppose. Seems like we ought to fix the optimizer though, if indeed it broke. | 23:54 | |
ShimmerFairy | japhb: wouldn't know, that's just my naive guess based on what I know of parsing, which isn't everything :) . It may very well still be optimized for nqp:: calls (and perhaps any parameter marked as a native type, who knows?) | ||
japhb | rangerprice: Ah, missed your response amongst the val() discussion. Glad to see there are still Pugs herders about, I still have a soft spot for it. :-) | 23:55 | |
geekosaur still wants to poke at it for real someday | 23:56 | ||
geekosaur still keeps getting butt kicked by it >.> | |||
ShimmerFairy | japhb: just checked perl6 -Mnqp --target=optimize -e 'say nqp::add_i(42, 0)' , and I see Int WVals just like in --target=ast :( | ||
japhb imagines that a brain dump from au++ might result in melting the surrounding brains | |||
ShimmerFairy: Aww, dang | |||
That would certainly explain less than awesome performance. | 23:57 | ||
(well, at least contribute to it) | |||
ShimmerFairy | japhb: more precisely, Wants with a WVal(Int) and a IVal(42) | ||
japhb: my naive "implict unboxing will be happening" guess is why I didn't bother switching to less-readable codepoint numbers in my version. I figured implied unbox_s couldn't be much worse than implied unbox_i :P | 23:58 | ||
23:59
rmgk left
|