00:05 TEttinger left
Sgeo_ m: sub plusminus($x) returns Junction { $x|-$x; }; say plusminus(1|2); 00:15
yoleaux 31 Jul 2015 09:35Z <Ven> Sgeo_: you might be interested in timo's github.com/timo/adt , btw. The only thing missing is the ability to do multi dispatch based on that
camelia rakudo-moar 5d9306: OUTPUT«any(any(1, -1), any(2, -2))␤»
psch .tell ab5tract i'm unsure what classloading bit you're refering to. classloading happens for interop and "normal" runtime in different ways (BootJavaInterop.java and LibraryLoader.java respectively)
yoleaux 30 Jul 2015 15:23Z <ab6tract> psch: any clues on what might be borking module loading from non-SDK modules which also happen to be in CLASSPATH?
30 Jul 2015 16:05Z <ab6tract> psch: the module loader code for NQP... is there no native-Java way to find a class? can't we just s/::/./ and load the class? I know that CLASSPATH issues are notoriously common in Java, but still...
31 Jul 2015 16:20Z <ab5tract_> psch: what do you think of this approach to class loading? github.com/clojure/clojure/blob/41...oader.java
31 Jul 2015 16:22Z <ab5tract_> psch: I'm quite keen to help, but want to make sure there isn't some other consideration that made you eschew ClassLoader stuff entirely
psch: I'll pass your message to ab5tract.
Sgeo_ What 00:16
psch .tell ab5tract nqp commit d03863352f07a05fa68892997e417b62452cb34e simplifed the former significantly, and i suspect something similar should be possible for LibraryLoader.java too, but i haven't been able to dig in yet
yoleaux psch: I'll pass your message to ab5tract.
Sgeo_ m: sub plusminus($x) { $x|-$x; }; say plusminus(1|2);
camelia rakudo-moar 5d9306: OUTPUT«any(any(1, -1), any(2, -2))␤»
Sgeo_ Aww would have been hilarious if return got executed twice 00:17
psch .tell ab5tract as for non-jdk interop, you usually need to supply :jar<$jarfile> to the use statement
yoleaux psch: I'll pass your message to ab5tract.
Sgeo_ I feel like only collapsing junctions into booleans is a limitation of the true power of junctions 00:18
psch ponders the intent behind "hilarious" 00:19
.tell ab5tract i'm not excluding the possibility that there might be something borked in CLASSPATH handling either, though, but i've been away from that bit quite a while... 00:20
yoleaux psch: I'll pass your message to ab5tract.
psch Sgeo_: a Junction decides between True and False, that's the two forks of the road it has in front of itself. mind, i'm *not* saying it's the best way to have them, just that it does make sense to me to hav'em like that 00:22
Sgeo_: a prototype exploring different behavior might be appreciated 00:23
00:29 llfourn joined 00:31 gfldex left
vendethiel Sgeo_: what else would you collapse them into that can't be a "for"? 00:32
00:33 llfourn left
Sgeo_ A list or set? 00:34
I'm thinking in analogy with Haskell's list monad 00:37
psch m: say 1|2|3 ~~ 2 00:39
camelia rakudo-moar 5d9306: OUTPUT«any(False, True, False)␤»
psch Sgeo_: Junctions superseed that, don't they?
as in, collapsing a Junction to a Set still gives you a Junction 00:40
Sgeo_ Well, if you're using it to solve problems, you probably want to get a flattened list out... grep doesn't work on junctions does it? 00:41
m: @coins = (5, 25) X+ (5, 25); say (grep @coins: * > 40) 00:42
camelia rakudo-moar 5d9306: OUTPUT«5===SORRY!5=== Error while compiling /tmp/H33vhGWua3␤Variable '@coins' is not declared␤at /tmp/H33vhGWua3:1␤------> 3<BOL>7⏏5@coins = (5, 25) X+ (5, 25); say (grep @␤»
Sgeo_ m:my @coins = (5, 25) X+ (5, 25); say (grep @coins: * > 40)
m: my @coins = (5, 25) X+ (5, 25); say (grep @coins: * > 40)
camelia rakudo-moar 5d9306: OUTPUT«50␤»
Sgeo_ m: my @coins = (5, 25) X+ (5, 25); say (grep @coins: * > 29)
camelia rakudo-moar 5d9306: OUTPUT«30 30 50␤»
vendethiel m: my @coins = (5, 25) X+ (5, 25); say grep @coins: * > 40 #shouldn't need the ()
camelia rakudo-moar 5d9306: OUTPUT«50␤» 00:43
Sgeo_ Can that be expressed using Junctions and normal +?
vendethiel where would junctions be used here?
Sgeo_ After all, a junction is a superposition of values, just like the way these lists are used here
psch m: my @vals = 5|25 + 5|25; say @vals.perl 00:44
camelia rakudo-moar 5d9306: OUTPUT«[any(5, 30, 25)]<>␤»
vendethiel it's a superposition of *possibilities*, imho
psch m: my @vals = (5|25) + (5|25); say @vals.perl
camelia rakudo-moar 5d9306: OUTPUT«[any(any(10, 30), any(30, 50))]<>␤»
vendethiel m: my @v = ^10; say @v.any
camelia rakudo-moar 5d9306: OUTPUT«any(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)␤»
psch yeah, what vendethiel++ said
Junctions aren't values
00:44 captain-adequate left 00:45 mr-foobar joined
psch and i'm aware that the distinction between values and possibilities is... weird 00:45
Sgeo_ Incidentally, why is * an Any?
leont Why would it be anything else?
Sgeo_ It changes the meaning of calls that aren't expecting it, the way Junctions do.. is it because it only does that at compile-time? 00:46
leont It doesn't do weird dispatch things like Junctions
vendethiel Sgeo_: * is a Whatever
psch the question is "why is Whatever below Any in the type hierarchy"?
Sgeo_ vendethiel, what psch said
vendethiel ah, okay :) 00:47
psch the default type for parameters is Any
and we want to be able to curry core functions
ShimmerFairy Sgeo_: I prefer to think of the Any type as being the parent of "Any"thing (Junctions don't count because they're a superposition of things, not a thing itself). 00:48
psch (that's the best reason i can think of at the moment, although there's probably better ones)
Sgeo_ psch, why would Whatever not being below Any hamper that? The currying process shouldn't require sending an actual Whatever to a function
ShimmerFairy, but a literal * in a function call for most functions isn't any thing, it's syntax sugar for a closure 00:49
m: sub f(Any $x) { say "f()"; }; say f(*); 00:50
camelia rakudo-moar 5d9306: OUTPUT«f()␤True␤»
Sgeo_ o.O
m: sub f($x) { say "f()"; }; say f(*);
camelia rakudo-moar 5d9306: OUTPUT«f()␤True␤»
vendethiel isn't sure what's surprising (knowing Whatever <: Any) 00:51
Sgeo_ I thought * was supposed to be syntax sugar for currying, this seems to limit when it can be used
vendethiel * stops at the method call boundary 00:52
leont It is, too
ShimmerFairy If * is used in an expression, it generates a WhateverCode
vendethiel so that a(* + 3) isn't \x => a(x + 3)
..and, like ShimmerFairy just said, if used as a term, it's a WhateverCode object 00:53
(used for stuff like *..*)
leont It's really a "make easy things easy" feature, taken to a new extreme
ShimmerFairy for example, the popular @a[*-1] actually passes a WhateverCode object that the subscripting op gives the size of the array as an argument
vendethiel m: multi infix:<..>(Whatever, Whatever){'vOv'}; multi infix:<..>(Int $a, Int $b){ "$a..$b" }; say 3..4; say *..*
camelia rakudo-moar 5d9306: OUTPUT«3..4␤vOv␤»
Sgeo_ But then f(1, *, 3) doesn't work so that isn't making that easy thing easy 00:54
psch Sgeo_: * is a shorthand for the *type* Whatever, which creeate... what ShimmerFairy++ said
vendethiel Sgeo_: again -- * stops at this level. it doesn't traverse calls.
psch oooh
~~ and * are special
ShimmerFairy m: my @a = 0,1,2,3; say @a[*/2]
camelia rakudo-moar 5d9306: OUTPUT«2␤»
psch because Whatever is special 00:55
ShimmerFairy ^ you can get the center element like that (or close to center for even-sized lists)
vendethiel again -- if * didn't stop at method calls, `a(* + 2)` would be `sub ($VAL) { a($VAL + 2) }` instead of what we currently have
leont Sgeo_: there are plenty of other ways to curry less simple cases
vendethiel s/method //
psch Sgeo_: * is *not* sugar for currying, it's creating a closure
(in my mind those are distinct)
Sgeo_ psch, sorry for inaccurate terminology
vendethiel [02:47] <psch> and we want to be able to curry core functions 00:56
psch because the close can be handled explicitely by the operator
Sgeo_ (On my part I mean)
vendethiel I think it's because of that :P
psch vendethiel: yeah, i seem to have messed up there :)
vendethiel++ # attentiveness
00:56 raiph left
skids Sgeo_: Whatever is Any specifically so you can do that. So you can make intellginet multis with their own Whatever candidates. See doc.perl6.org/type/WhateverCode 00:56
vendethiel I made an example of a multi with a Whatever-only candidate 3 minutes ago :) 00:57
ShimmerFairy m: sub foo(Int $a, Int $b) { $a * $b }; my &double = &foo.assuming(2); say double(4) # Sgeo_, here's how you can have currying in P6
camelia rakudo-moar 5d9306: OUTPUT«8␤»
Sgeo_ COuldn't you make a multi with a Mu Whatever?
vendethiel didn't even know Whatever was Any until now :)
psch shifting Whatever higher in the type hierarchy would probably screw with Junction somehow 00:58
vendethiel m: say Whatever ~~ Any; say Junction ~~ Anym
camelia rakudo-moar 5d9306: OUTPUT«5===SORRY!5=== Error while compiling /tmp/COjTSdyI_y␤Undeclared name:␤ Anym used at line 1. Did you mean 'Any'?␤␤»
vendethiel m: say Whatever ~~ Any; say Junction ~~ Any; # grr
camelia rakudo-moar 5d9306: OUTPUT«True␤False␤»
psch m: my $f = 2 * *|2;
camelia ( no output )
psch m: my $f = 2 * *|2; say $f(2)
camelia rakudo-moar 5d9306: OUTPUT«Cannot find method 'postcircumfix:<( )>'␤ in block <unit> at /tmp/wP7rmrtkEY:1␤␤»
psch m: my $f = 2 * (*|2); say $f(2)
camelia rakudo-moar 5d9306: OUTPUT«Cannot call Numeric(Whatever: ); none of these signatures match:␤ (Mu:U \v: *%_)␤ in block <unit> at /tmp/6ly0_YJsZi:1␤␤»
vendethiel psch: yeah, it very well might
skids Sgeo: Yes but you'd have to explicitly Mu the parameter. 00:59
ShimmerFairy Sgeo_: the way I see it, you need a special reason to have something _not_ inherit from Any. That is, you need a special reason why someone can't use the "Any" type to pick your type up as part of the normal conception of "anything"
psch an Any-thing :)
if you want a Mu-thing you have to ask for it 01:00
Sgeo_ ShimmerFairy, the way I thought it worked seemed a sufficient reason
But it doesn't work that way, ok
psch Sgeo_: i'm still unclear on the way you thought it worked
Sgeo_ vendethiel18> again -- if * didn't stop at method calls, `a(* + 2)` would be `sub ($VAL) { a($VAL + 2) }` instead of what we currently have 01:01
psch Sgeo_: the one thing i distinctly picked up on is * being currying-sugar
Sgeo_ That way
ShimmerFairy Sgeo_: fair enough. The Whatever type is just to make a number of simple things convenient, we still have closures/pointy blocks/etc. for other cases.
vendethiel Sgeo_: it's the same with scala's _, say
(...though scala's has MUCH MORE COMPLEX rules)
ShimmerFairy e.g. what you want for foo(*) is not much more verbose as { foo($^a) } 01:02
psch so, what should < my $f = * + 2; say $f(2) > do instead of what it does..?
i'm a bit lost, i'll admit
ShimmerFairy It's not so much currying as a compact way of giving an expression to something and saying "this part can be Whatever". It allows @a[*-1] to be more expressive than @a[-1] , for example. 01:04
psch actually, i'm getting out of here again. i apparently got hung up on the wrong end of the discussion just now, which is a decent hint for "you're too tired for this stuff" :) 01:05
o/
ShimmerFairy o/
vendethiel Sgeo_: well, it'd be a bit unwieldly then. we'd need some kind of way to "stop it" 01:07
"don't cross THIS call!" - which would look ugly
TimToady so we limit the autopriming to unary and binary operators (counting method calls a funny postfix), and otherwise a function must decide for itself what it'll do with a Whatever argument 01:09
but really, the general case is handled with .assuming if you want partial function application 01:10
vendethiel checks for himself and sees he's speaking at the SPW2015 at 4pm
ShimmerFairy (or wrapping in closures and such if you need to do partial application out of order ☺) 01:11
01:22 beastd left, rmgk_ joined, rmgk is now known as Guest18266, Guest18266 left, rmgk_ is now known as rmgk
dalek ast: 5151900 | skids++ | S06-multi/ (2 files):
Rerun many multisig tests with multisigs wrapped in a capture.

Also, skip the test in by-trait.t even though it is not in
  spectest.data, for curation purposes. Someone will need
to add S06-multi/signature.t to spectest.data in rakudo repo to activate.
01:31
skids So, ironically a few small MMD things work better inside :(|c(...)) than in :(...). 01:32
But if it is to be considered an escape hatch for implicit *%_ there is one critical thing missing.
In that the subsigs are not a key for MMD sorting purposes. 01:33
01:33 TEttinger joined
skids looks for an RT on that. 01:33
b2gills Sgeo_: The Whatever star is used for more than just currying 01:38
m: say (^5).pick(Whatever); say (^5).pick(*) 01:39
camelia rakudo-moar 5d9306: OUTPUT«0 4 2 3 1␤1 0 4 2 3␤»
skids Nope, close with RT#124935 and RT#76486 but needs its own RT. So, sigh, email time. 01:47
01:52 Hor|zon joined 01:57 Hor|zon left 01:58 vendethiel left 02:06 leont left
dalek ast: 4ebfad3 | skids++ | S06-multi/subsignature.t:
Add new RT number to new tests.
02:21
02:30 llfourn joined 02:32 bin_005 joined 02:34 llfourn left 02:43 bin_005 left 02:44 bin_005_s joined 02:48 noganex joined 02:51 noganex_ left 03:20 yqt left 03:25 BenGoldberg left 03:30 kaare_ joined 03:53 Hor|zon joined 03:58 Hor|zon left 04:06 roguelazer joined 04:09 roguelazer left 04:17 ShimmerFairy left 04:31 llfourn joined 04:32 ShimmerFairy joined 04:33 azawawi joined
azawawi hi 04:36
04:37 silug_ left 04:46 roguelazer joined 04:47 gfldex joined 04:50 bin_005_s_x joined, bin_005_s left 04:51 silug_ joined 05:05 bin_005_s_x left, roguelazer left 05:06 bin_005 joined 05:10 virtualsue joined, davido___ joined, virtualsue left 05:12 davido__ left 05:15 azawawi left 05:18 llfourn left 05:22 diana_olhovik_ joined 05:25 ShimmerFairy left 05:30 llfourn joined 05:35 virtualsue joined 05:36 davido__ joined 05:38 davido___ left 05:39 ShimmerFairy joined 05:54 Hor|zon joined 05:59 Hor|zon left 06:00 FROGGS joined, virtualsue left 06:01 skids left
dalek kudo-star-daily: 32d26fa | coke++ | log/ (9 files):
today (automated commit)
06:16
06:28 RabidGravy joined 06:43 AlexDaniel left 06:44 ShimmerFairy left 06:45 llfourn left 06:46 llfourn joined
Woodi hi today :) 06:47
06:52 mr-foobar left
Woodi so, version control systems was lock-based - to modify file VCS locked it and then unlocked when finished. now looks merge and merge conflicts resolution is industry state of the art ;) of course int counters cannot be merged bat structures can, just "diff" them, fine grain locking is not needed :) 06:53
just small and naive point of view :) but maybe something could evolve from it 06:54
06:55 Hor|zon joined
Woodi but probably STM and HTM by Intel tripped on this... 06:55
06:56 ShimmerFairy joined 07:00 Hor|zon left
RabidGravy shudders at the Visual Source Safe flashback 07:01
07:17 darutoko joined
Woodi RabidGravy: what goes wrong ? except unstability... 07:29
RabidGravy it, by default, locks the respository completely while someone has it checked out 07:30
moritz sounds like fun with a team of 5 or so :-) 07:33
(or even with > 1) 07:34
07:36 llfourn left
Woodi moritz: but VSS born as local thing, it support DOS :) 07:39
07:40 virtualsue joined
Woodi anyone can say good word about Team Foundation Server ? compared to git 07:40
RabidGravy yeah, it's basically a shagged up fork of RCS at hart
heart
haven't done any serious windows development for ten years or so 07:41
Woodi RabidGravy: but we still do not have version control thing for plain users with ability tu store blobs like mp3
07:41 virtualsue_ joined
Woodi but maybe mp3 not realy support versions :) 07:42
RabidGravy not really
you need a proper content management system which is aware of the structure of the data to do things like that 07:43
Woodi but I mean some nice database for plain users. maybe directories are too universal, like lists :) 07:44
TEttinger plasticSCM may be better for binary-heavy stuff, but not open source (free I think)
Unity almost always uses binary blobs for projects, and they recommend PlasticSCM for that stuff 07:45
07:45 virtualsue left, virtualsue_ is now known as virtualsue
RabidGravy or a mainframe type OS where all the files are versioned by default 07:45
moritz TEttinger: I've also heard good things about Perforce's ability to handle large files 07:46
never used it, though
Woodi TEttinger: "more than 500k files", git do not support it ? what feature is responsible for that ?
TEttinger I have no clue.
RabidGravy but really, for structured files like music or images e.g. the thing that is managing them needs to understamd the structure, because for example a change in the metadata is different in principle to a change in the actual content 07:47
moritz Woodi: in git, each commit is basically a snapshot of the whole repo (though stored in a compressed format)
Woodi: so that means that with 500k files, meta data size really explodes 07:48
Woodi ah, I need to read sentences completly... plasticSCM claims to be fast
moritz: yes, that too
looks plasticSCM uses relational databases for storage. some git extension could do same thing 07:51
Sgeo_ m: False ~~ True 07:53
camelia rakudo-moar 5d9306: OUTPUT«Potential difficulties:␤ Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* instead␤ at /tmp/7CwQKcKq70:1␤ ------> 3False ~~7⏏5 True␤WARNINGS:␤Useless use of "~" in expressio…»
Sgeo_ m: 1 ~~ Bool 07:54
camelia ( no output )
Sgeo_ m: say 1 ~~ Bool
camelia rakudo-moar 5d9306: OUTPUT«False␤»
Sgeo_ m: say 1|2 ~~ Int
camelia rakudo-moar 5d9306: OUTPUT«any(True, True)␤»
Sgeo_ m: say 1|2 ~~ Mu
camelia rakudo-moar 5d9306: OUTPUT«any(True, True)␤»
Sgeo_ say Junction.ACCEPTS(1|2) 07:55
m: say Junction.ACCEPTS(1|2)
camelia rakudo-moar 5d9306: OUTPUT«True␤»
Sgeo_ Can I private message camelia?
Yay I can!
07:56 Hor|zon joined
moritz you just have to remember to use the 'm:' prefix in private message too 07:57
Sgeo_ m: say &say.signature 07:58
camelia rakudo-moar 5d9306: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rc5EYkiPk3␤Bogus postfix␤at /tmp/rc5EYkiPk3:1␤------> 3say &say.signature7⏏5␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ stat…»
Sgeo_ m: say &say.signature
camelia rakudo-moar 5d9306: OUTPUT«(|)␤»
Sgeo_ So that | somehow means say accepts Mu? 07:59
RabidGravy say is a multi, that's just the proto
Sgeo_ Also I have not the faintest idea how I copy/pasted that character from the other IRC tab
HMm seems like my input was not that character, newline maybe, which got mangled? 08:00
08:00 Hor|zon left
Sgeo_ Maybe I should try to make a Racket lang that supports Junctions natively 08:02
Wouldn't really use it, but could be fun 08:03
m: say map {$_ * 5}, (1|2),(3|4) 08:04
camelia rakudo-moar 5d9306: OUTPUT«any(5, 10) any(15, 20)␤»
Sgeo_ Wouldn't really work in Racket the way I'm envisioning because Racket's native map would not call the function with the special Junction-detection mechanism, so meh 08:05
Racket's mechanism for redefining function application is a bit meh in that sense
I should sleep
08:25 diana_olhovik_ left 08:39 mr-foobar joined
Sgeo_ Perl6 puts an eject symbol into its error messages? 08:50
(Reading some slides and noticed it)
09:02 llfourn joined 09:08 TEttinger left, vendethiel joined
moritz Sgeo_: yes, it does 09:10
m: 1 1
camelia rakudo-moar 5d9306: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XpHvSvA6jp␤Two terms in a row␤at /tmp/XpHvSvA6jp:1␤------> 0317⏏5 1␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ statement modifier␤ sta…»
09:14 Foxcool joined
vendethiel Sgeo_: well, you decide what you want to provide with your Racket #lang, just don't re-export racket/base, right? 09:14
09:16 brrt joined 09:17 ShimmerFairy left
vendethiel (most Racket langs do `(provide (all-from-out racket))`) 09:17
RabidGravy would like to make URI mutatable like the P5 one but really don't know where to start 09:19
09:21 pierrot left
RabidGravy seems wrong hacking around it's inability to change the URI by string manipulation 09:21
09:21 Begi joined
Begi Hey ! I'm coding a little blog engine with Bailaidor. What's the best way to save my news ? 09:23
JSON files in a MongoDB database ?
jdv79 RabidGravy: make the parts rw? 09:24
text files on a filesystem work well i'm told
09:25 pierrot joined
Begi I've already try with text files, it was good.But is is secure ? 09:27
RabidGravy jdv79, yeah, there's the problem - the attributes hold the match objects from the grammar :-\
jdv79 URI needs to be mutable to be useful in a few caes i've used in the past
*cases
RabidGravy Begi, if your filesystem permissions are secure then yes :)
09:27 brrt left
RabidGravy anyway off out to get mrs Gravy 09:27
09:29 Foxcool left, ShimmerFairy joined
moritz Begi: text files are secure, as long as the file names are not user-supplied 09:30
Begi: if they are, you have to some heavy whiteslisting / validation front-up 09:31
09:32 leont joined
jdv79 RabidGravy: they look like Strs to me. 09:32
Begi moritz: Ok thanks. It seems good. i'll test 09:33
09:36 RabidGravy left 09:57 Hor|zon joined, Begi1 joined 10:00 Begi left
nine jdv79: what are those use cases_ 10:01
10:01 telex left, Hor|zon left 10:02 telex joined
jdv79 generating url variants for different envs is one 10:03
generating a set of abs urls with variants for public use 10:04
nine Do they really need to be mutable for that, or would it be enough to be able to easily create new ones based on an existing URI + modifications?
jdv79 well, only one or two parts change so that's basically down to string mangling 10:05
seems kinda lame
i'd rather just loop over some attr sets
plus if each attr validated its part of the grammar on set it'd be cool that way 10:06
or if you could set the attrs instead of the string in the constructor that'd be closer 10:07
but wasting cycles
10:16 ribasushi joined
jdv79 is starting a match "under" TOP possible? 10:17
lets say i want to use IETF::RFC_Grammar::URI::scheme to validate a standalone scheme string? 10:18
jnthn IETF::RFC_Grammar::URI.parse($str, :rule<scheme>)
jdv79 oh, right - TOP is just the default. thanks. 10:19
10:20 Begi2 joined 10:21 Begi1 left
nine Non-deterministic destructors are...a challenge 10:23
jdv79 hmm, just read the docs for URI - i exposing the match obj like that a good idea? 10:24
10:24 estrabd left
nine Is there a way to force a GC run yet? 10:24
jdv79 strikes me as unnecessary tight coupling 10:25
s/i/is
i think i say a nqp op a few days ago in here
nqp::force_gc() maybe 10:33
10:43 abraxxa joined, abraxxa left 10:55 rindolf joined 10:56 bin_005_b joined
jdv79 is there a Maybe? 10:56
i have an attr that seems to want to be a subset of a str or Nil 10:57
timotimo yes, nqp::force_gc(), but it will only force the gc to start, not necessarily a major collection 10:58
10:58 bin_005 left
nine So in other words, it may help but is in no way realiable. 11:01
11:03 laouji joined
timotimo right 11:04
11:07 laouji left
jdv79 so how is /foo an absolute uri? 11:07
i find the URI module disturbing
dalek line-Perl5: eb00360 | (Stefan Seifert)++ | lib/Inline/Perl5.pm6:
Don't destroy P5 objects after the P5 interpreter was shut down

We run the default_perl5 object's DESTROY method unconditionally in the END. If after that the GC runs, it may DESTROY wrapped Perl 5 objects. If we try to decrement their reference count, we're in no-mans-land and may encounter undesireable effects like segfaults. So don't do that.
11:07 laouji joined
Woodi jdv79: it is not relative, "base" or something :) 11:15
also it's not URI at al ?
jdv79 yeah, i guess i'm mixing up uri and url 11:16
11:19 xinming_ joined
jdv79 $!is_absolute = ?($!path || $.scheme); # seems odd 11:19
11:20 xinming left
jdv79 Woodi: the rfc seems a bit muddled about it actually 11:23
i think my intuituion is correct 11:24
there seems to be 3 forms of a uri relative reference; one of which is what i thought
in any case i believe URI is incorrect 11:25
11:25 Begi2 left 11:28 Hor|zon joined 11:33 Hor|zon left
dalek line-Perl5: 7cc2793 | (Stefan Seifert)++ | / (2 files):
Support passing named arguments to P6 class methods from P5

Named arguments can now be passed to Perl 6 class methods (e.g. constructors) using the v6::named function:
v6::invoke('MyClass', 'new', v6::named foo => 'bar', bar => 'baz');
All arguments before v6::named are considered positional:
v6::invoke('MyClass', 'do', "pos1", 2, "pos3", v6::named foo => 'bar');
11:40
nine If someone has an idea for something shorter than v6::named, yet as descriptive, I'm all ears.
11:41 diana_olhovik joined
jdv79 what is the p6 equiv of Moose's trigger on attr? 11:43
11:49 virtualsue left 11:51 virtualsue joined
jdv79 .tell RabidGravy maybe something like gist.github.com/jdv/73275880d42c7b952892 but still needs trigger mechanism to maintain other state. not to mention the module seems messy in general. 11:51
yoleaux jdv79: I'll pass your message to RabidGravy.
jdv79 i'm guessing a trigger is just a custom accessor that wraps and does its extra things 11:53
is there a way to get a more helpful type check failure error? 12:14
jnthn What makes you consider the one you got unhelpful? 12:15
They normally come with type got, type expected, what operation was going on, and where it happened...so if it's missing one of those something's up. 12:16
12:16 TimToady left 12:18 TimToady joined 12:19 laouji left
jdv79 yeah, i guess its ok. i'm just used to Moose where its overridable 12:22
if you want to tweak it its nice
12:23 bin_005_b left 12:29 Hor|zon joined 12:32 geekosaur left 12:33 geekosaur joined, Hor|zon left 12:34 laouji joined
jnthn jdv79: We could probably work out a nice API for doing that in Perl 6 12:50
12:51 laouji left, laouji joined
mst huh, is the doc.perl6.org/language/5to6 thing about unspace still a thing? 12:56
lining up multiple method calls vertically isn't allowed?
timotimo yeah, you need to put a \ before, because .foo is treated as "$_.foo" instead
mst so what's the idiomatic way to split method call chains over multiple lines? 12:57
leont I'm sure that's just a slang away :-p
timotimo sure, i think Tuxic does it like that 12:58
mst: put a \ at the end of the previous line
just like it's shown in the example in 5to6
mst huh 13:04
that's ... going to take some getting used to, I suspect
13:06 RabidGravy joined
mst or at least it's going to require me convincing my brain that actually perl6 is a Tcl dialect 13:07
jnthn m: given "foo" { say .uc } # for anyone wondering why it's not entirely trivial to "just allow whitespace before ." 13:09
camelia rakudo-moar 5d9306: OUTPUT«FOO␤»
mst jnthn: yeah, timotimo mentioned that and, honestly, I assumed it wasn't trivial by the fact that you hadn't done it already 13:10
since I'm sure I'm far from the first person to go 'wha?'
btw, we have a user over on irc.perl.org wondering: since most of the modules shipped with rakudo are .pm as an extension and don't have v6 13:11
how exactly is synhi supposed to know it's perl6 code rather than perl5 ?
sjn would love to see a "perl6-lint" or somesuch easily-available tool that could be used to hint about "Kwalitee" like issues like that. 13:13
jnthn mst: There are other heuristics (starts with a "module" declaration), but we probably need to do a better job of encouraging folks to do one of the two options you mentioned... Originally "the module starts with package without a block" was in the design docs as a sure-fire "this is Perl 5", but I suspect anything other than an extension or explicit v6 mention is fragile in the light of continued Perl 5 evolution. 13:16
13:18 brrt joined
mst right, I have at least one project where the .pm files mostly start with 'class Foo {' 13:18
admittedly, that's me using lib::with::preamble to inject Moops implicitly via App::MyPerl
which is hardly a central use of perl5
13:19 rindolf left
jnthn Aye, but if p5-mop gets done and gets in, it might make class Foo { ... } a regular thing in Perl 5 too 13:19
Anyway, I'm fine with making sure the things in lib/ in Rakudo (all 4 or so of them...) get fixed up to have one of the two 13:20
13:21 brrt left
mst I think trying to convince everybody to use pm6 is probably the best bet 13:21
since in both languages a single use statement can pretty much replace the compiler
albeit in the case of perl6 that was more intentional than the ways I do it in perl5 ;)
RabidGravy no quite sure why "use v6" isn't enough 13:22
yoleaux 11:51Z <jdv79> RabidGravy: maybe something like gist.github.com/jdv/73275880d42c7b952892 but still needs trigger mechanism to maintain other state. not to mention the module seems messy in general.
mst RabidGravy: from my POV, "because it's much easier to spot one file with the wrong extension in a directory than one file where you forgot the use line" 13:24
13:24 leont left
mst make it easy for people to do the wrong thing without noticing, and all of them will 13:24
and it should be considered our fault, not theirs, that that happens
jdv79 jnthn: yeah, i worded that poorly - meant "supply a type check failure error" 13:27
RabidGravy jdv79, I think in the first instance I'm going to make a local sub-class that does just enough and think about the rest of URI later 13:29
13:30 Hor|zon joined
jdv79 how about .p6m and .p6l? never seen those used for anything else before. 13:30
nine jdv79: what's wrong with .pm6? 13:31
jdv79 RabidGravy: i logged a bug on URI. from my limited contact a valiant effort but seems buggy and messy.
the internet says other things use it
plus it doesn't read well - Perl Module 6 vs Perl 6 Module 13:32
13:32 vendethiel left
nine .pm6 seems to be used by Adobe Pagemaker 6. A product that's been superseeded by a newer version and a product line that's been cancelled more than a decade ago. 13:33
mst .pl is also used by prolog, and I don't really seem to run into any trouble with that being a source of confusion
jdv79 that's true 13:34
mst with the exception of #prolog where my personal mental parser has to do the try-catch-wtf-reparse dance occasionally
13:34 Hor|zon left
jdv79 in any case a diff ext wrt to Perls would be a nice hint 13:34
13:39 vendethiel joined
ribasushi mmm there is the practical aspect of stat() not being cheap at all 13:43
when a user says `use X`
is rakudo expected to look for .pm6 *and* .pm ? 13:44
having this nailed down before 1.0 seems wise...
RabidGravy currently it does yes
moritz just like p5 looks for both .pm and .pmc files
ribasushi moritz: yes, which is deemed a massive mistake by all involved at this point :/ 13:45
nine In fact, rakudo looks for .moarvm files as well
ribasushi: I guess .pmc is out of favor not because of stat costs but because of the pretty useless precompilation support itself. 13:46
moritz ribasushi: but note that looking into directories is only a fallback; normally installed modules are indexed in some sort of registry
jnthn away for a bit 13:47
mst moritz: which is interesting because historically that's how Tcl always did it but more recently they've been moving to a .tm style that's much more like perl5's @INC
I wonder if anybody's gone and discussed why they're doing that with them 13:48
13:48 khw joined
moritz mst: not that I'm aware of 13:48
mst I feel like that might be an idea, for the purposes of successfully making different mistakes :)
moritz aye
though we'd still need a concept for mapping non-ASCII modules names, :auth and :ver to file names 13:49
nine Argh...now I finally got bit by Inline::Perl5 always calling P5 functions in array context.
mst I'm not honestly making any comment on how best to solve the problem space
I'm commenting they seem to be coming back the other way, so it's probably worth finding out why and trying to avoid that 13:50
moritz yes, I understood that
mst your "though we'd still need a concept" seemed to suggest you thought I was saying 'therefore, go back to @INC style' 13:51
nine: if it's DBIC, we already added _rs versions of everything because TT does that :D
nine mst: I know, and it is DBIC, indeed. However, I'm currently playing around with extending a Result class with Perl 6 while keeping this transparent for the application. The latter shouldn't notice that it's dealing with a P6 object now. 13:53
mst ah 13:54
nine And it may actually be possible to fix this, at least for method calls that are just piped through P6 space
13:54 FROGGS_ joined 13:58 FROGGS left 14:00 llfourn left 14:04 mr-foobar left 14:05 Begi2 joined 14:07 skids joined, laouji left 14:11 laouji joined 14:13 lucasb joined 14:21 virtualsue left 14:25 virtualsue joined 14:28 rindolf joined 14:46 kaare_ left 14:49 FatalNIX left, FatalNIX joined
lucasb m: sub f(| ($x)) { $x+1 }; f 14:52
camelia rakudo-moar 5d9306: OUTPUT«(signal SEGV)»