»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:00 AlexDaniel joined
AlexDaniel m: say ‘l​̦’.uninames 00:00
camelia rakudo-moar 855de7: OUTPUT«(LATIN SMALL LETTER L ZERO WIDTH SPACE COMBINING COMMA BELOW)␤»
00:00 themonkeybob11 left
AlexDaniel m: .say for ‘l​̦’.uninames 00:00
camelia rakudo-moar 855de7: OUTPUT«LATIN SMALL LETTER L␤ZERO WIDTH SPACE␤COMBINING COMMA BELOW␤»
AlexDaniel right, so there is a zero width space, hmm 00:01
star: .say for ‘l​̦’.uninames
camelia star-m 2015.09: OUTPUT«LATIN SMALL LETTER L␤ZERO WIDTH SPACE␤»
tweakism AlexDaniel: plane 1 which you included has some stuff. plane 2 does too but it's all CJK so irrelevant for me. 3-13 are completely empty. 15 and 16 are PUA, so not interesting if you're looking at e.g. char names.
AlexDaniel: so, 0x1ffff was pretty perfect. 00:02
AlexDaniel tweakism: :)
tweakism: once perl 6 gets much faster I'm sure there would be no problem grepping through everything :)
tweakism oh, 14 has the variation selectors :)
AlexDaniel though it would be much better if somebody made a module that would do proper lookups 00:03
tweakism that does not look like latin small letter l to me
AlexDaniel tweakism: * is a whatever star 00:04
tweakism: and .NFD is just a method call on it
m: say <2 5 8>.map(* + 2) 00:05
camelia rakudo-moar 855de7: OUTPUT«(4 7 10)␤»
tweakism heh that is so cool
AlexDaniel m: say <2 5 8>.map(*.succ)
camelia rakudo-moar 855de7: OUTPUT«(3 6 9)␤»
AlexDaniel m: say <2 5 8>.map(*.pred)
camelia rakudo-moar 855de7: OUTPUT«(1 4 7)␤»
AlexDaniel you can also write it like this if you want
m: say <2 5 8>.map({$_.pred})
camelia rakudo-moar 855de7: OUTPUT«(1 4 7)␤»
AlexDaniel m: say <2 5 8>.map({.pred}) # but this is a bit shorter 00:06
camelia rakudo-moar 855de7: OUTPUT«(1 4 7)␤»
00:06 firstdayonthejob left
tweakism ha, if you call a method on nothing does it use $_ ? 00:06
AlexDaniel m: say <2 5 8>».pred # but this is a bit shorter
camelia rakudo-moar 855de7: OUTPUT«(1 4 7)␤»
AlexDaniel tweakism: yeah
00:07 azawawi joined
azawawi hi 00:07
good & early morning #perl6 :)
sortiz: ping
AlexDaniel tweakism: it kinda solves the problem of Perl 5 where some functions work on $_ by default (which is great) but most things are doing that inconsistently (which is bad)
00:08 themonkeybob11 joined
tweakism that's the kind of feature people don't like 00:08
and it's sad
'cause they can be as explicit as they like in code they want to release
AlexDaniel tweakism: dot is very explicit :) 00:09
tweakism and still have that available for a one-liner in the shell or editor
AlexDaniel it is just short
tweakism but I guess if the syntax exists people will use it, so you have to know it regardless
00:09 spider-mario left, LGD joined
AlexDaniel m: .say for <2 5 8>; for <2 5 8> -> $curInt { say $curInt } 00:10
camelia rakudo-moar 855de7: OUTPUT«2␤5␤8␤2␤5␤8␤»
AlexDaniel If I was going to pick one that is the most readable, hmm… I think that I'd go with the first one :) 00:11
tweakism I was just talking about $_
AlexDaniel m: $_.say for <2 5 8>; for <2 5 8> -> $curInt { say $curInt }
camelia rakudo-moar 855de7: OUTPUT«2␤5␤8␤2␤5␤8␤»
00:13 jjido left 00:14 jjido joined, themonke1bob11 joined 00:15 themonkeybob11 left 00:18 jjido left
azawawi any better shorter form than `say sprintf("%s", some-str)`... like printf in c but with newline? 00:23
timotimo there's also .fmt which might sometimes help
00:24 themonke1bob11 left
AlexDaniel azawawi: you mean that including \n in the pattern is too annoying? 00:25
azawawi no i mean say sprintf part is annoying
timotimo oh, i think he wants a combined say and format-string
azawawi in Java for example we can System.out.format(...)
AlexDaniel azawawi: why not use printf then?
timotimo m: printf("%s", "heyo") 00:26
camelia rakudo-moar 855de7: OUTPUT«heyo»
timotimo i didn't even know that %)
AlexDaniel O_o
azawawi me too 00:27
aha!
doc.perl6.org/routine/sprintf
timotimo but you didn't even try :)
azawawi doc.perl6.org/routine/printf # 404!
timotimo well, i'll be damned
azawawi timotimo: i read documentation :)
AlexDaniel azawawi: fair enough
azawawi: github.com/perl6/doc/issues/407 done, I fixed it. 00:29
if submitting a bug report counts as a fix :D
(it doesn't) 00:30
azawawi hehe
azawawi clones perl6 doc repo :) 00:31
AlexDaniel hmm, it looks like nobody is working on docs consistently 00:32
that's why it has 68 open issues, I guess
AlexDaniel looks at azawawi 00:33
azawawi AlexDaniel: i just wrote `is memoized`... Maybe `is TODO` is needed :) 00:35
AlexDaniel azawawi: ( ͡° ͜ʖ ͡°)
azawawi doc.perl6.org/routine/is%20pure # now back to the thing that spawned the sprintf/printf discussion :) 00:36
i recall yesterday that sortiz was asking whether `is memoized` should mean also `is pure`
by default that is 00:37
Hotkeys did the 'is cached' trait change to 'is memoized'?
AlexDaniel I didn't get it as well
azawawi fyi, `is memoized` is like `is cached` but with cache size, cache eviction controls
Hotkeys ah
azawawi Hotkeys: github.com/azawawi/perl6-memoize
AlexDaniel can't we add that to 「is cached」? Hmm… 00:38
or why would one use 「is cached」 when he can use 「is memoized」?
azawawi AlexDaniel: `is cached` is marked as experimental
AlexDaniel besides one being built-in and another one not
it was marked as experimental just because it was a bit buggy 00:39
azawawi i looked at `is pure` and i dont understand "Marks a subroutine as pure, that is, it asserts that for the same input"
Hotkeys if the subroutine doesn't access anything outside the function it's pure 00:40
essentially
AlexDaniel azawawi: en.wikipedia.org/wiki/Pure_function
azawawi the assertion part im not seeing so far. Is that intented or am i missing something or do i need morning coffee? :)
AlexDaniel ah 00:41
does it even have any effect right now? 00:42
I've always thought that it is kinda NYI
I mean “This is a hint to the compiler” part
azawawi well im not seeing it so far after trying it... i remember jnthn saying it is not doing that yesterday
00:43 tardisx left
azawawi irclog.perlgeek.de/perl6/2016-03-02#i_12129251 00:43
"...is pure doesn't actually check anything", jnthn
00:43 tardisx joined
AlexDaniel right, because you decide that it is pure 00:44
… even if it is not :)
azawawi so if it doesnt check anything... what's the purpose of `is pure`
AlexDaniel azawawi: faster code
azawawi explain im not following
Hotkeys basically
the compiler can precalculate the function into a constant 00:45
if it has all the arguments at compile time
is pure tells the compiler that the function only needs its input variables for whatever it's doing
and the function doesn't have any side effects 00:46
AlexDaniel m: sub foo is pure { $^a + $^b }; say foo(2,10) # replace this
camelia rakudo-moar 855de7: OUTPUT«12␤»
AlexDaniel m: say 12 # with this
camelia rakudo-moar 855de7: OUTPUT«12␤»
azawawi cool... then where is the assertion part? 00:48
AlexDaniel
.oO( in the docs… )
azawawi "Marks a subroutine as pure, that is, it asserts that for the same input...", doc.perl6.org/routine/is%20pure
AlexDaniel azawawi: feel free to rephrase it 00:49
azawawi so it asserts on the docs, not on compile time and neither runtime? :)
doc time :)
tweakism it's just the dictionary-definition of assert, rather than what a coder thinks when they hear assert()
to assert something is to claim it is true 00:50
to state it as fact
AlexDaniel tweakism: still it has to be changed :)
if one got it wrong then another thousand will do the same
azawawi it is misleading though
00:51 perlpilot_ joined
tweakism *shrug* 00:51
to assert, v., doesn't mean
'cause to fail if it isn't true'
azawawi tweakism: because the Perl 6 audience are programmers, so assert = ASSERT :)
AlexDaniel Hotkeys: I wonder if doing 「sleep ∞」 will freeze the compilation process :) 00:52
azawawi tweakism: i have spent like 5 min trying to make it trigger an assertion based on the documentation
Hotkeys AlexDaniel: *shrug*
AlexDaniel m: sleep ∞ 00:53
Hotkeys When I read 'assert' I read it normally
tweakism Hotkeys: define normally
camelia rakudo-moar 855de7: OUTPUT«(timeout)»
Hotkeys Which is why I didn't understand the confusion
tweakism: er
AlexDaniel m: sleep NaN
camelia ( no output )
Hotkeys in the non-programming sense
AlexDaniel m: sleep -∞ 00:54
camelia ( no output )
00:54 perlpilot left
azawawi but it is interesting that i can add an `is memoized(:pure)` for debugging reasons 00:54
AlexDaniel
.oO( your definition of “normally” is wrong )
Hotkeys shh 00:55
tweakism I started to ask, if it occurred to you that the compiler couldn't possibly ever verify "or the same input, it will always produce the same output without any additional side effects", but I suppose it could for some functions.
00:55 Celelibi left
AlexDaniel tweakism: once we manage to get AI into Perl 6 sure we could do that… :) 00:56
azawawi given im already caching results in `is memoized`, I can disable cache hits to verify a routine's pure-ness to check for unpure routines
Hotkeys I feel like if you mark a function 'is cached/memoized' you're also implying that it's pure anyway 00:57
azawawi Hotkeys: but im not asserting 00:58
Hotkeys: or failing on different results given infinite cache limits
AlexDaniel Hotkeys: *shrug* why are you so sure? :)
Hotkeys Because if it uses the cached results that's effectively returning the same output for a given input each time 00:59
right?
AlexDaniel Hotkeys: but does it mean that you can do that in compile time? 01:00
azawawi reads en.wikipedia.org/wiki/Pure_functio..._functions
tweakism Hotkeys: I dunno, can cached entries be expired ever?
partly_ Found bug in usage generation here github.com/rakudo/rakudo/blob/bb29...ain.pm#L73 01:01
this fails if you have a sub f(\foo) {}
AlexDaniel tweakism: I think that the idea of “is cached” was that yeah, if e.g. the cache is too large
partly_ it will echo <oo> instead of foo
Hotkeys Actually I suppose a memoized function can't be a pure function really 01:02
because memoization requires side effects
AlexDaniel so you shouldn't rely on compiler that it will call it only once
01:02 Celelibi joined
partly_ sorry L79 01:03
azawawi AlexDaniel: `is memoized(:cache_size(10), :strategy("LRU"))` is already implemented but not as efficient as needed on the cache eviction part
tweakism I probably don't understand the context, but it seems weird to me to give is-memoized as a compiler hint, vs. a directive to the compiler to memoize.
01:03 BenGoldberg joined
Hotkeys is cached in its basest form is just a wrapper on a function that caches the values 01:04
I assume in practice it's more exciting than that
but I don't think it's a compiler hint
AlexDaniel I am pretty sure it was supposed to be a compiler hint
tweakism Hotkeys: so then, the function can be pure, but the wrapped version is memoized (and impure), right? :) 01:05
Hotkeys seems right
tweakism and even if memoized can't imply pure, pure should definitely imply memoizable :) 01:06
Hotkeys right 01:07
tweakism but I'll stop now 'cause I'm far out of my league.
BenGoldberg If the original function was pure, the memoized/wrapped version will *seem* pure, since the only side effect is that the value is stored in a cache, which is an effect which should be mostly invisible.
Hotkeys mhm
sortiz Hi 01:09
Hotkeys it doesn't really make sense for the underlying function to be impure though wrt side effects
because they'd only get called once 01:10
AlexDaniel m: say ‘me’ ZZZ ‘bed’
camelia rakudo-moar 855de7: OUTPUT«((((me bed))))␤»
Hotkeys m: use experimental :cached; sub foo is cached { say $^a; return $a*2; }; say foo(3); say foo(3);
camelia rakudo-moar 855de7: OUTPUT«3␤6␤6␤»
AlexDaniel o/
Hotkeys so I guess maybe if you only wanted side effects one time
azawawi BenGoldberg: true but if we disable cache hits optimization and check cache hits vs real results for f(x), we can verify `is memoized(:pure)` as a debugging aid given no cache limit like `is cached`
sortiz: Hi. I am following up on our previous discussion on `is pure` 01:12
sortiz My argument was: 'is pure' is an assertion given _to_ the compiler.
01:13 tardisx left
azawawi sortiz: an assertion that causes a warning or a failure or nothing? 01:13
sortiz And the implementations of 'is memoized' (and 'is cached' btw) guaranty (by definition) the 'pureness' of the function.
01:14 themonkeybob11 joined 01:15 AlexDaniel left
azawawi sortiz: that i would have to disagree with your once a cache eviction strategy is in place with a cache limit in `is memoized` 01:15
01:15 jjido joined
sortiz 'assertion' in this context is only a hint to the compiler that the code can be optimized, for example in-lining as a constant the result of a previous invocation with the same arguments. 01:15
azawawi sortiz: given infinite cache, definitely
sortiz: ok cool. got it :) 01:16
skids In other words you can tell Perl 6 that your function is pure. If you are wrong, you cannot blame Perl 6 for doing strange things with it.
sortiz Exactly.
If you say: sub foo($a) ( rand * $a ) is 'pure'; you are lying!! 01:18
01:19 themonkeybob11 left
BenGoldberg m: sub fibo(Int $n) is 'pure' { return 1 if $n <= 1; return fibo($n-2) + fibo($n-1) }; print fibo(3); 01:19
camelia rakudo-moar 855de7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RdIk0QuLuF␤Invalid name␤at /tmp/RdIk0QuLuF:1␤------> 3sub fibo(Int $n) is7⏏5 'pure' { return 1 if $n <= 1; return fi␤»
BenGoldberg m: sub fibo(Int $n) is pure { return 1 if $n <= 1; return fibo($n-2) + fibo($n-1) }; print fibo(3);
camelia rakudo-moar 855de7: OUTPUT«3»
Hotkeys m: sub foo is pure { rand * $^a }; say foo(1); sleep 3; say foo(1);
camelia rakudo-moar 855de7: OUTPUT«0.043510238412021␤0.966698664738955␤»
Hotkeys smart
01:19 Actualeyes joined
Hotkeys it knows 01:19
BenGoldberg No, it just doesn't do anything with "is pure", yet. It's not implemented, except for the fact that it doesn't produce an error. 01:20
azawawi sortiz: please take a look at this irclog.perlgeek.de/perl6/2016-03-04#i_12135535
Hotkeys BenGoldberg: o 01:21
01:23 yeahnoob joined 01:24 Timbus left 01:25 Timbus joined
sortiz Its clear that the compiler can't check (in the general case) the pureness of a function, eventually the compiler can be able to detect _some_ pure functions. 01:31
azawawi sortiz: e.g. random(), time()... 01:32
01:32 tardisx joined, grondilu joined
azawawi sortiz: so basically it is a placeholder atm for future impure function warnings 01:33
sortiz: s/function/routine/
sortiz azawawi, yes. And I expect that nobody uses 'is memoize' in functions known to be impure :) Can't make sense. 01:35
azawawi sortiz: so how does one imply that a trait does another trait? :) 01:37
TimToady m: sub foo is pure { rand * $^a }; say foo(1) for 1..5; 01:38
camelia rakudo-moar 855de7: OUTPUT«0.359642720821363␤0.359642720821363␤0.359642720821363␤0.359642720821363␤0.359642720821363␤»
skids missed the distinction between "is memoized" and "is cached" 01:39
azawawi skids: github.com/azawawi/perl6-memoize/b...llo.pl6#L8 01:40
skids: cache limits, cache eviction, debugging :) 01:41
skids Ah. Module space. OK.
sortiz I think that your trait can check that the function is already marked with 'is pure' and, if not, apply it. 01:42
skids It would make sense to use an impure function if you are utilizing the caching behavior for side effects.
azawawi skids: That's the thing I was worried about when I started the discussion. I am sorry for not being clear about the context :)
01:43 tardisx left
TimToady m: sub foo is pure { rand * $^a }; foo(1) 01:43
camelia rakudo-moar 855de7: OUTPUT«WARNINGS for /tmp/O6l2SrqXJ1:␤Useless use of "foo(1)" in expression "foo(1)" in sink context (line 1)␤»
TimToady constant folding and warnings are the two primary uses of 'pure' currently 01:44
sortiz skids, Give me an example of side effects caused by the caching. It is the caching that, in the last instance, turns your impure function into a pure one. 01:45
tweakism I think is just meant, the effect of inserting a record into the cache. which while technically a side-effect, could/should probably be ignored. 01:46
TimToady .o(caching has the side effects of using less electricity but more memory)
tweakism or, I think what skids meant, is using the caching behavior to ensure that any side effects only happen on the first invocation. 01:47
which seems like a terrible abuse :)
skids Assumig a LRU cache eviction strategy was known to be the case, you could use the caching to implement per-value flow control, for example.
01:49 jjido left
skids tweakism: that or happen less often than the value happens the more common the value is, assuming eviction. 01:49
sortiz Can be, but in the first place the term 'memoize' has already a well defined semantic, outside cache strategies. 01:50
azawawi sortiz: so basically in my module, if `is memoized(:cache_size(Inf))` (i.e. no cache limit) then `is pure` should be added to the given Routine
sortiz IMO, yes.
azawawi sortiz: consider it done :) 01:51
sortiz++
skids I can see the benefit of not cutting across the grain naming-wise.
(versus dominant industry nomenclature) 01:52
But... that strikes me as magical.
Or... which routine is "is pure" being added to, the product or the wrapped? 01:53
01:54 maybekoo2 joined
sortiz In this case, the product, thought. 01:57
azawawi skids: good question. i think the wrapped
01:59 tardisx joined
sortiz The calls will be to the wrapper, so to be useful, it must be marked. 02:00
02:02 cdg left, molaf_ joined
azawawi cool, printf is impure given its stdout changes 02:03
02:06 molaf left
Hotkeys but how can the wrapper be pure? 02:10
memoization is inherently impure
BenGoldberg So what's wrong with a little white lie? 02:13
sortiz Hotkeys, On the contrary, memoization turns a may-be impure function into a pure one. 02:14
Hotkeys right
but the memoization itself is impure
sortiz Why?
Hotkeys side effects
tweakism (maybe memoized should imply pure-ish, i.e., pure excepting the memoization cache effects, and pure should imply memoizeable, so the norm be to see the wrapper be only memoized, and the inner be only pure. because especially if you use it the way skids suggests, it's no longer really a mere technicality, memoization does modify global state.)
Hotkeys it caches the results, no?
I agree that memoization implies the underlying function is pure(-ish?) 02:15
but the wrapper itself isn't
tweakism and, does is-memoized forbid side-effects?
BenGoldberg Technically, memoizing creats an impure function, since that wrapper modifies the cache.
Hotkeys ++
tweakism 'cause if not, how can you call a function that has a side-effect the first time it's called, but not the 2nd time it's called with the same arguments, pure?
Hotkeys a function with side-effects isn't pure anyway 02:16
so you wouldn't :p
timotimo the cache is hidden inside the wrapper, though. so it's not a side effect
tweakism oh, fair enough, this only concerns functions already marked pure
timotimo you can't measure the effect on the cache :P
BenGoldberg But as long as noone can introspect, and observe that cache, then it behaves similarly enough to an actually pure function, that we can pretend that it is one for all intents and purposes. Including adding the 'is pure' trait. Yes, that trait is a little white lie, but it's a harmless/useful lie.
skids maybe there should be two differently named traits for different semantics.
sortiz A function with side-effects isn't a "function" in the first place!
geekosaur .oO { did I wander into #haskell by mistake? } 02:17
tweakism lol, meaning clear from context.
Hotkeys you're not wrong sortiz but I disapprove :p
geekosaur: lol 02:18
sortiz The problem is that 'pureness' is only defined for functions, no routines. 02:20
Hotkeys .oO { the solution here is to just have a new 'routine_declarator:<fun>' } 02:21
02:21 partly__ joined
timotimo a function cannot have side-effects, though 02:22
a function is a mapping from one set of values to another
where every entry in the first set has a corresponding value in the other
sortiz timotimo, thanks.
timotimo and what value is mapped to is exactly defined by what is on the other side
a "function with a side-effect" is just putting the world into the arguments 02:23
and here we are in haskell land
Hotkeys lol
timotimo because that's what they use monads for
BenGoldberg That's not a bad idea.... a declarator, 'fun', which behaves much like 'sub' but with an automatic 'is pure'
Hotkeys right
timotimo but "is pure" does almost nothing at the moment. why are we talking about this?
BenGoldberg shrugs.
Hotkeys shrugs 02:24
BenGoldberg For the 'fun' of it?
Hotkeys AHAHAHAHAHA
HAHA
:)
sortiz -Ofun
timotimo i want to be allowed to mark a function "pure" but do as many side-effects as i want in it
why should i change up my whole darn program just because i want to log when/how often/in what order/... my "pure" function is called in?
BenGoldberg Then you'll have to pass in a world object, and return a modified world! 02:25
skids
.oO(Programming languages cease to map to mathematics precisely at the border with the real world)
Hotkeys lol
02:25 partly_ left
timotimo that's only fine if i'm allowed to have that world object stored in a global variable 02:25
no f'ing way am i going to change the signature of every darn function upwards of the function on the stack
geekosaur next stop, unsafePerformIO
timotimo if you consider a function pure and it does side-effects that somehow break your expectations of the program, that's DIHWIDT to me 02:26
perl6 isn't in the business of formally proving stuff about whole programs. you'd have to build a slang for that
that's my potentially wrong and unpopular opinion on the matter :)
s/potentially/probably/
geekosaur well, in theory 'is pure' could enable a bunch of optimizations that are likely to be extremely brittle in the face of side effects 02:27
so we have to not even consider those optimizations now
timotimo wrong, IMO 02:28
if you mark something "is pure", you'll get exactly what you ask for
geekosaur and your logging will likely happen exactly once
timotimo it's not about "force this to have no side effects", it's about "i don't care about the side-effects it has" 02:29
Hotkeys I think if you decide to put side effects in your pure function that's all on you
++
perhaps if the compiler detected side effects it could warn you
geekosaur and you're right back where you started because that logging every call you wanted won't work 02:30
sortiz Hotkeys, "pureness" is defined in terms of inputs and outputs only, not side-effects. 02:32
timotimo geekosaur: i'd just drop "is pure"
Hotkeys "A pure function is a function where the return value is only determined by its input values, without observable side effects."
timotimo goes to bed 02:33
sortiz "observable", no "nonexistent"
geekosaur if that is the definiton used then you might get away with it. but optimization opportunities are lost unless you are clever
the reason Haskell's Debug.Trace.trace has to be embedded into an expression the way it is isn't just syntax; the resulting data dependency ensures the compiler doesn't simply remove it since it can't be doing anything 02:34
02:35 kid51 left
skids It isn't necessarily the case that the Perl 6 "is pure" trait follows that definition precisely. Words mean slightly different things in different languages. 02:36
For example, even in the purest functional programs, a pure function is allowed to vary the number of CPU cycles it uses even with the same input. (true FP must be realtime FP mwhahaha) 02:37
sortiz And the quantum state of electrons involved, sure ;-) 02:39
02:40 themonkeybob11 joined 02:45 ilbot3 left, jjido joined 02:46 themonkeybob11 left 02:47 ilbot3 joined
Hotkeys pure functions contribute to entropy 02:54
inescapable side effect
skids Well -- running them does. It's actually not a silly point though about runtime. You can't analyze the interaction of two haskell programs over a protocol the same way you can analyze a single haskell program. 02:55
03:02 aindilis joined
azawawi so after looking at github.com/perl6/doc/issues/407 , I realized that doc.perl6.org/language/5to6-perlfunc is not indexed at all 03:14
is that intended or was not implemented in the first place? 03:16
03:18 telex left 03:19 jjido left
skids Hrm. It might deserve special treatment. e.g. you wouldn't want any P5 functions showing up under the Routines tab. I don't know what's lumped into "indexed" right now. 03:21
azawawi they should be indexed under here doc.perl6.org/routine-sub.html, right? 03:22
03:23 telex joined
skids I would not think so, they aren't "Perl 6 Sub Routines" 03:23
azawawi so a new category for "5to6" ? 03:25
skids Can they be invisible except for search? 03:26
azawawi yeah ofcourse, i will find a way for that :) 03:27
skids Just politics-wise we shouldn't be offering things that will ruin perl 5 doc search engine results.
(on other search engines)
azawawi politics :) 03:28
03:30 telex left
skids
.oO(trump tax refund: form 1099-T enter the number of a bank account to which you have deposited at least $40, we promise we'll wire your refund there.)
03:31
ugexe hmm they never need to ask for my bank account when i dont have a refund 03:33
they seem to uncover them pretty fast then
03:35 labster left, labster joined 03:38 maybekoo2 left
BenGoldberg p56: print STDERR "foo"; 03:38
camelia p5-to-p6 : OUTPUT«# Do not edit this file - Generated by Perlito5 9.017␤␤print('foo')␤»
BenGoldberg p56: STDERR->print("foo");
camelia p5-to-p6 : OUTPUT«# Do not edit this file - Generated by Perlito5 9.017␤␤STDERR.print('foo')␤»
BenGoldberg m: say *STDOUT 03:39
camelia rakudo-moar 855de7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/of5YGwK2rB␤Missing infix inside S␤at /tmp/of5YGwK2rB:1␤------> 3say *S7⏏5TDOUT␤ expecting any of:␤ infix␤ infix stopper␤»
BenGoldberg m: say *OUT
camelia rakudo-moar 855de7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UG5OQGWxEH␤Two terms in a row␤at /tmp/UG5OQGWxEH:1␤------> 3say *7⏏5OUT␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ statement …»
BenGoldberg m: say $*OUT
camelia rakudo-moar 855de7: OUTPUT«IO::Handle<<STDOUT>>(opened, at octet 0)␤»
BenGoldberg m: $*OUT.printf("%s", "foo")
camelia rakudo-moar 855de7: OUTPUT«Method 'printf' not found for invocant of class 'IO::Handle'␤ in block <unit> at /tmp/HZ0oDuB6oG line 1␤␤»
BenGoldberg m: printf("%s", "foo") 03:40
camelia rakudo-moar 855de7: OUTPUT«foo»
BenGoldberg wonders why there's a bare 'printf' sub, but no 'printf' io handle method.
03:47 vendethiel joined 03:48 Upasaka left 03:50 noganex joined 03:52 Upasaka joined 03:54 noganex_ left 03:56 telex joined
skids aybe it would be confusing to have both IO.printf and Str.printf combined with the invocant=first-arg tradition and the fact that the first arg of C's printf is the pattern, and the C function that does have an IO first arg is named fprintf. 03:57
Those would be my theories at least. 03:58
04:04 cpage__ left, cpage__ joined 04:09 vendethiel left 04:10 MadcapJake joined 04:15 jjido joined 04:16 BenGoldberg left 04:21 skids left 04:25 ggoebel17 joined 04:26 ggoebel16 left 04:27 mattp_ left, mattp__ joined, _perlpilot_ joined, Cabanossi left, jferrero_ left, jferrero joined 04:28 perlpilot_ left, prammer left, pdcawley_ joined, pdcawley left 04:29 bakedb_ joined, tardisx left 04:30 bakedb left 04:31 Cabanossi joined 04:32 gypsydav15 left, gypsydave5 joined 04:35 tardisx joined 04:44 ranguard_ left, ranguard joined 04:50 jjido left 04:57 wamba left 05:03 molaf_ left 05:05 tardisx left 05:15 TreyHarris left 05:18 Sgeo_ joined 05:20 Sgeo left 05:24 Upasaka left 05:28 Upasaka joined, tardisx joined 05:32 labster left 05:33 adu joined 05:41 Cabanossi left
[Coke] yawns. 05:43
05:44 Cabanossi joined 05:45 jjido joined
azawawi yawns 05:53
azawawi waits for travis-ci.org/perl6/doc/builds/113581791 to finish :) 05:54
how often is doc.perl6.org built? (i.e. cron job settings) 05:56
[Coke] */5 06:00
but it's super slow.
adu <3 Perl6 06:01
azawawi cool thanks 06:04
[Coke]: what do you think of github.com/perl6/doc/pull/408? Feedback is more than welcome :)
06:05 travis-ci joined
azawawi [Coke]: im waiting for travis CI to OK the PR :) 06:05
travis-ci Doc build passed. Ahmad M. Zawawi 'Add 5to6-perlfunc functions to index under a hidden category. This fixes #407'
travis-ci.org/azawawi/doc/builds/113581306 github.com/azawawi/doc/compare/997...5a78a2bc4e
06:05 travis-ci left 06:07 travis-ci joined
travis-ci Doc build passed. Ahmad M. Zawawi 'Ignore .precomp' 06:07
travis-ci.org/azawawi/doc/builds/113581462 github.com/azawawi/doc/compare/475...06f323a33a
06:07 travis-ci left
[Coke] azawawi: no opinion without seeing it in action. 06:08
azawawi basically it will show p5to6-func items under category "p5to6-func" when using search... no new category was added 06:09
06:10 themonkeybob11 joined
dalek c: 475a78a | azawawi++ | htmlify.p6:
Add 5to6-perlfunc functions to index under a hidden category. This fixes #407
06:12
c: a406f32 | azawawi++ | .gitignore:
Ignore .precomp
c: 7b7d42d | azawawi++ | / (2 files):
Merge pull request #408 from azawawi/master

Add 5to6-perlfunc functions to search index
06:16 idiosyncrat_ left 06:18 khw left 06:19 jjido left 06:24 themonkeybob11 left 06:25 themonkeybob11 joined 06:30 themonke1bob11 joined 06:31 bjz joined, themonkeybob11 left 06:36 themonke1bob11 left
azawawi [Coke]: it is now working :) 06:36
[Coke]: refresh :)
doc.perl6.org/language/5to6-perlfunc.html#printf 06:37
06:38 bjz left 06:42 themonkeybob11 joined 06:50 Sgeo__ joined 06:53 Sgeo_ left 06:54 tharkun left 06:55 jjido joined 06:56 bjz joined 06:58 adu left 07:00 tharkun joined 07:02 vendethiel joined 07:04 sjoshi joined 07:15 domidumont joined 07:18 tardisx left 07:20 domidumont left, domidumont joined 07:23 bjz_ joined 07:25 bjz left 07:30 nakiro joined 07:35 firstdayonthejob joined 07:39 gfldex joined
sortiz azawawi, Still there? 07:39
azawawi sortiz: yup 07:41
sortiz Thought that the function to mark is, indeed, the wrapper. 07:43
07:44 labster joined
azawawi cool 07:45
sortiz Via your trait is applied at compile time, so any call in the source to the original function, should be compiled instead as a call to your wrapper. 07:46
s/Via/ie. 07:47
07:48 vendethiel left
azawawi sortiz: to tell you the truth, im surprised of the amount of active #perl6 discussion on `is pure` we had today :) 07:48
sortiz And those calls are the candidates to the possibles optimizations, so, is the wrapper the one to mark.
Jeje 07:49
dalek c: 268bb23 | azawawi++ | htmlify.p6:
Simplify 5to6-perlfunc url
c: 8384e5a | azawawi++ | / (2 files):
Merge LLForn precompilation speedup
c: e0099d0 | azawawi++ | / (2 files):
Merge pull request #409 from azawawi/master

Fix #334
sortiz I'm surprised also. I thought no one would remember the subject. 07:50
07:52 jjido left 07:55 tmch joined
sortiz Moreover, once wrapped, the original function will be called only by yours trait code, so better leave the original alone. 07:55
And if originally marked, the better, for your trait semantic safety. :) 07:56
08:02 RabidGravy joined
sortiz I'm leaving, CY. 08:05
RabidGravy toodles
sortiz o/
08:05 sortiz left 08:08 cpage__ left
RabidGravy so yesterday you may remember I was worried that somehow a native binding that used sockets couldn't interoperate with perl6 sockets in the same process? 08:08
08:11 darutoko joined
RabidGravy I just looked at the code of libshout and the culprit is actually the sync() function, that does a select(1, NULL, NULL, NULL, &sleeper); which is going to block the whole process every time 08:12
so not at all async friendly
08:12 zakharyas joined 08:14 themonkeybob11 left
nine_ The whole process or the whole thread? 08:14
08:15 themonkeybob11 joined 08:18 zpmorgan left 08:19 ely-se joined
RabidGravy I'm pretty certain the whole process (it pre-dates any notion of threads,) but there's only really one way to find out - FIGHT!!! er, wait, make a test 08:20
08:26 aindilis left 08:30 sno left 08:31 firstdayonthejob left 08:32 zhi joined
RabidGravy Hmm well my, albeit rudimentary test using, select and Supply.interval seems to suggest other than my original assertion 08:37
08:41 cpage_ joined
RabidGravy and the select seems to be waiting *forever* 08:42
moritz RabidGravy: did you wait forever to verify?
RabidGravy no, I had intended ten seconds 08:43
08:44 aindilis joined
RabidGravy oh wait, select has 5 arguments not four 08:45
and with the correct arguments it does sleep for ten
08:46 jjido joined
partly__ So i want to patch a bug in rakudo. gen-usage does remove sigil the first character in \foo parameter, because it has no sigil. The patch is trivial, but to i also need to extend Roast to check for this case? 08:47
moritz partly__: that would be a very good idea, yes 08:48
partly__ in general i caught myself reimplementing the gen-usage function (aka copy/paste) because there is no way to access it or is there? 08:49
08:49 fireartist joined
moritz you can call USAGE() 08:50
m: sub MAIN($x?) { say USAGE() } 08:51
camelia rakudo-moar 855de7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pq7Cal1vbo␤Undeclared name:␤ USAGE used at line 1␤␤»
moritz hrmp
partly__ moritz, I want to call USAGE(My::Module)
moritz m: sub MAIN($x?) { say $?USAGE }
camelia rakudo-moar 855de7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/A7wn0vOPCi␤Variable '$?USAGE' is not declared␤at /tmp/A7wn0vOPCi:1␤------> 3sub MAIN($x?) { say 7⏏5$?USAGE }␤»
partly__ My bigest issue with USAGE is that it's hardcoded to the current file and the MAIN methods. 08:52
moritz heh, from src/core/Main.pm
# TODO:
# * $?USAGE
# * Create $?USAGE at compile time
# * Make $?USAGE available globally
08:52 pdcawley_ left
partly__ also $?USAGE does not exist 08:52
08:52 pdcawley joined
moritz partly__: maybe the better API would be to expose it as &MAIN.usage or so 08:52
partly__: since it doesn't seem to work now, we're not bound to immplement that API that was originally envisioned 08:53
DrForr While we're on the subject of twigiled variables, where are $*FOO variables documented?
partly__ moritz: but I thought the language is specfied, no breaking changes?
DrForr ('$*' in the search box produced no hits.)
08:54 zhi left
partly__ S28? 08:54
DrForr (Parenthetically, tracking search terms that fail to return might help.)
partly__ S28 -> Named Variables
DrForr Thanks.
moritz partly__: the real specification is the test suite
partly__: the design docs are more guidance and explanation
partly__ moritz: ic 08:55
Is there a build in way to tell rakudo during `make spectest` to use not the upstream Roast repo but a custom one? Or how do the developers use it? 08:57
hmm i could just edit the make file 08:59
moritz or simply check out a different branch in t/spectest 09:00
tweakism ok, I *just* got that the butterfly is named /Camelia/ 09:01
nine_ :) 09:02
jdv79 what is there to get about it? 09:03
nine_ the camel reference 09:04
09:05 rntz left
partly__ I really would prefer to outsource the whole gen-usage function to an own module, which can be tested separately and just called by rakudo/src/core/Main.pm . Currently the main-usage.t spec is calling a perl6 interpreter and interpreting the string output to Stdout github.com/perl6/roast/blob/47943a...in-usage.t 09:07
Thats cumbersone.
Or am I complicating things?
jdv79 there are no refs in p6 09:10
09:12 maybekoo2 joined
RabidGravy DrForr, they should be in language/variables - if that isn't complete then it should be fixed, the s28 has things that don't exist and misses some things 09:13
DrForr Oh, they are there. I just meant mostly that typing '$*' into the search box didn't match anything. 09:15
RabidGravy "dynamic variables"
DrForr I understand, but people will also come at this from "$*? What the heck is *that*..." and type '$*' into the search box, rather than automatically knowing that it's a dynamic variable. 09:17
RabidGravy anyway having looked at the libshout source code in detail, a) I wish I hadn't and b) it's really simple (modulo some of the insane indirection involved) 09:18
DrForr Incidentally I've solved the handler issues I was working on, I'm going to restore the code to the main app over the weekend so I can make some progress on creating sessions and such. 09:19
RabidGravy I think there is something in the way that the search terms are derived that allows a mapping from '$*' -> 'dynamic variables' or whatever so it would work but that's a web thing and y'know .... 09:20
DrForr And yes, $*SESSION is what I need, looking at the page. 09:22
09:22 bartolin joined, aindilis left 09:36 yeahnoob left
Ulti pyrimidine: oh thats really great news! There is someone else here at Sanger who is playing with Perl 6, does it have to be a student? 09:36
09:47 torbjorn left 09:49 domidumont left 09:50 jjido left, domidumont joined 09:51 rntz joined 09:55 nakiro left 09:56 zakharyas left 09:57 AlexDaniel joined, zakharyas joined 09:58 maybekoo2 left, nakiro joined 10:04 ely-se left
AlexDaniel azawawi: here? 10:06
10:10 ely-se joined, espadrine joined
AlexDaniel azawawi: ah okay, I've left a comment on github.com/perl6/doc/issues/407 10:12
10:14 torbjorn joined 10:18 maybekoo2 joined
partly__ PR to rakudo/rakudo and perl6/roast are out. Enough good deeds for today, now back to working on world domination 10:22
moritz partly__++ 10:25
10:28 jjido joined 10:31 jjido left 10:32 abraxxa joined 10:33 jjido joined, jjido left 10:34 jjido joined, jjido left 10:35 Skarsnik joined
Skarsnik Hello 10:35
RabidGravy er
erp
10:36 virtualsue joined 10:42 jjido joined 10:43 RabidGravy left 10:44 jjido left 10:48 rindolf joined 10:50 bioexpress joined 10:56 lizmat joined 10:57 ely-se left
bioexpress Hi! In the NativeCall-module I've found 'use nqp;'. Does there exist somewhere a 'nqp.pm6' module? 10:58
dalek kudo/nom: 676ad66 | lizmat++ | src/core/Parameter.pm:
Add (cheap) Parameter.usage-name

Inspired by PR #720 by kalkin++
11:01
jnthn bioexpress: No, it's handled specially by the compiler 11:02
lizmat bioexpress: only virtually, internally it only sets a flag to allow you to use nqp:: opts
jnthn bioexpress: It means that nqp:: ops can be used
(Which is the VM abstraction layer)
lizmat bioexpress: some documentation exists at github.com/perl6/nqp/blob/master/d...s.markdown 11:05
dalek kudo/nom: 7bdebae | lizmat++ | src/core/Main.pm:
Alternate fix for PR #720, kalkin++
11:07
bioexpress lizmat: Thx! 11:09
jnthn: Thx!
11:11 jjido joined, bioexpress left
lizmat partly__++ 11:11
dalek ast: 39d9936 | (Bahtiar `kalkin-` Gadimov)++ | S06-other/main-usage.t:
Auto-generated USAGE handles sigilles parameters
11:12
ast: 3a1ef78 | lizmat++ | S06-other/main-usage.t:
Merge pull request #107 from kalkin/usage-sigilles

Auto-generated USAGE handles sigilles parameters
11:20 aindilis joined
partly__ So how does this work with the "Perl 6" specs? lizmat just added a Parameter.usage-name() is this Rakudo implementation only, or will it be available to Perl 6d? 11:23
11:23 asan13 left
lizmat partly__: it's an addition to an existing class 11:23
one that could be considered internal, actually
psch +1 11:24
lizmat the onus on its usage is with the developer
partly__ lizmat: but what if i want to depend on it? If i'm doing a framework which does introspection magic?
11:24 Relsak joined
lizmat partly__: please check out jnthn's blog post about it: 6guts.wordpress.com/2016/02/09/a-f...atibility/ 11:25
partly__ lizmat: ok
11:25 azawawi left 11:26 bjz_ left
jnthn partly__: In summary: you can't officially depend on it (and we're not committed to support it) until it's covered in tests that make up a future Perl 6 release. 11:27
partly__ jnthn: so Parameter is not a Part of Perl 6c, it might be a part of 6d if some one bothers to write tests? 11:28
or at least Parameter.usage-name()
DrForr The Parameter class works, at least what's derived from Signatures. 11:29
11:30 Actualeyes left
llfourn partly__: I think that's roughly a good summary. I wonder if this shouldn't be called "sigiless-name"? 11:31
TEttinger nigel. 11:32
11:33 Actualeyes joined
llfourn ( and add it to variables as well? ) 11:33
11:33 bjz joined
llfourn $name.VAR.sigiless-name.say # name 11:34
jnthn partly__: Parameter is in 6.c, just that particular method that was just added isn't part of 6.c
partly__ Hmm i see that S30 is missing and I do not see any Parameter class tests in roast, how far does the spec currently cover the stdlibrary?
jnthn It's quite possible it's rather under-tested... 11:35
(Parameter)
Otherwise coverage varies; we know it's not as much as it wants to be.
partly__ jnthn: so theoretically if there would exists another VM for Perl6, it would support v6.c but it can be missing the whole Parameter class? 11:36
11:37 maybekoo2 left
llfourn I'm pretty sure parameters are tested somewhere.... 11:37
partly__ (because 6.c is only what the tests are)
llfourn I mean at least signature introspecting right..right?
moritz S06-signature/introspection.t: ok ?(all(@l >>~~>> Parameter)), 'And all items are Parameters';
DrForr Prancer uses it.
11:38 virtualsue left
llfourn >>~~>> # that is quite a conjunction of operators 11:38
moritz and that test file also tests the methods type, rw, copy, raw, slurpy, optional, invocant, named 11:39
named_names and name
and .perl
11:39 lizmat left 11:40 virtualsue joined
partly__ Ahh thanks moritz 11:40
llfourn so, why not just do all(@l) ~~ Parameter isn't it the same thing? 11:41
or all(|@l) ? 11:42
m: my @l = <one two three>; say all(@l) ~~ Str # actually | seems not be needed 11:43
camelia rakudo-moar 7bdeba: OUTPUT«True␤»
llfourn m: my @l = <one two three>; say ?(all(@ >>~~>> Str)) 11:44
camelia rakudo-moar 7bdeba: OUTPUT«True␤»
11:46 kaare__ joined, jjido left 11:47 jjido joined
llfourn m: my @l = <one two three>; say [&&] @l >>~~>> Str # in any case the junction there is silly IMO 11:47
camelia rakudo-moar 7bdeba: OUTPUT«True␤»
psch m: my @l = <one two three>; say all(@l>>.&[~~](Str)) # /o\ 11:49
camelia rakudo-moar 7bdeba: OUTPUT«all(True, True, True)␤»
psch oh, right, that needs the prefix:<?>
llfourn psch: you need [&&]
psch m: my @l = <one two three>; say ?all(@l>>.&[~~](Str)) # /o\
camelia rakudo-moar 7bdeba: OUTPUT«True␤»
psch nah, that was my intention :) 11:50
llfourn: in any case, you're right. the test as-is is a bit over the top
llfourn m: my @l = <one two three>; say ?all(@l>>.&[~~](Int))
camelia rakudo-moar 7bdeba: OUTPUT«False␤»
llfourn ah right I see what you did there :)
psch m: say "1".&[&[&&]] 11:51
camelia rakudo-moar 7bdeba: OUTPUT«Invocant requires a type object of type Array, but an object instance was passed. Did you forget a 'multi'?␤ in block <unit> at /tmp/QQdLLwU7IH line 1␤␤»
psch m: say [1,2,3].&[&[&&]] 11:52
camelia rakudo-moar 7bdeba: OUTPUT«Invocant requires a type object of type Array, but an object instance was passed. Did you forget a 'multi'?␤ in block <unit> at /tmp/UYtBRDiUS5 line 1␤␤»
11:52 nowan_ joined
llfourn doesn't know what psch is trying to do or what that error is about 11:52
psch m: say 1 &[&&] 1
camelia rakudo-moar 7bdeba: OUTPUT«all(1, 1)␤»
psch is just poking things
11:53 tmch left
psch that's really one of the things about prefixifying infixes (and the other way around) that i get stuck on 11:53
m: say 1 &[&&] 1 # this
camelia rakudo-moar 7bdeba: OUTPUT«all(1, 1)␤»
llfourn I'm not even sure what that is doing 11:54
m: say 1 && 1 # is it the same?
camelia rakudo-moar 7bdeba: OUTPUT«1␤»
psch & as metaop from infix:<&> which is an and Junction
llfourn oh
now I understand 11:55
11:55 labster left
jnthn I...don't think that meta-ops at all? :) 11:55
psch m: say 1 &[~] 2
camelia rakudo-moar 7bdeba: OUTPUT«all(1, 2)␤»
llfourn that's pretty crazy
psch uh
jnthn m: say 1 & [~] 2
camelia rakudo-moar 7bdeba: OUTPUT«all(1, 2)␤»
psch right, it doesn't metaop...
jnthn m: say 1 & [~] 2, 3
camelia rakudo-moar 7bdeba: OUTPUT«all(1, 23)␤»
jnthn :)
psch that's just even worse :(
11:55 nowan left
jnthn It's unsurprising, no? 11:55
After an infix we look for a term. 11:56
And [~] 2, 3 is a perfectly fine term.
(Reduction with ~)
11:56 ely-se joined
psch yeah, it's just the bit i get confused about with infixifying and prefixifying 11:57
but that helps, i think
as in, "don't put the & outside of the brackets, it's all()" or something 11:58
i think i can remember that
hah, "that's all()" probably works better :)
m: say 1 &[&all] 2, 3
camelia rakudo-moar 7bdeba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BMxxnOiK02␤Two terms in a row␤at /tmp/BMxxnOiK02:1␤------> 3say 1 &[&all]7⏏5 2, 3␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ …»
llfourn m: say &[~]("a","b"); say "a" &[~] "b" # totes not the same
camelia rakudo-moar 7bdeba: OUTPUT«ab␤all(a, b)␤»
jnthn Nope 12:00
12:04 TEttinger left
psch m: sub f($, $) { "ok" }; say 1 [&[[&f]]] 2 # i'm just a bit sad this doesn't work 12:07
camelia rakudo-moar 7bdeba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/z21XYbnOAX␤Unable to parse expression in bracketed infix; couldn't find final ']' ␤at /tmp/z21XYbnOAX:1␤------> 3sub f($, $) { "ok" }; say 1 [&7⏏5[[&f]]] 2 # i'm just a bit sad this does␤»
psch but it's silly anyway, so i can deal
hm, i guess it wouldn't really make sense to work anyway, would it
llfourn wouldn't make sense to me :D 12:08
(for any definition of work)
psch m: sub f($,$) { "ok" }; say f 1, 2; say 1 [&f] 2; say [[&f]] 1, 2
camelia rakudo-moar 7bdeba: OUTPUT«ok␤ok␤ok␤»
psch but &[[&f]] isn't the infix form of the reduce form 12:09
err, [&[[&f]]] i mean
llfourn [&f] # this makes an infix?
psch yeah
m: say 1 [&infix:<+>] 2
camelia rakudo-moar 7bdeba: OUTPUT«3␤»
llfourn heh cool. 12:10
jnthn m: 'hello' [&say] 'world' 12:12
camelia rakudo-moar 7bdeba: OUTPUT«helloworld␤»
jnthn :P
psch m: say infix:<Z+>
camelia rakudo-moar 7bdeba: OUTPUT«(...)␤»
psch m: say prefix:<[+]> 12:13
camelia rakudo-moar 7bdeba: OUTPUT«0␤»
psch m: say &prefix:<[+]>
camelia rakudo-moar 7bdeba: OUTPUT«sub prefix:<[+]> (| is raw) { #`(Sub|72580688) ... }␤»
llfourn m: (<hello world).&[~].say
camelia rakudo-moar 7bdeba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jwYABM1ukg␤Unable to parse expression in quote words; couldn't find final '>'␤ ␤at /tmp/jwYABM1ukg:1␤------> 3(<hello world).&[~].say7⏏5<EOL>␤ expecting any of:␤ quote words…»
psch m: say 1 [&prefix:<[+]>] 2
camelia rakudo-moar 7bdeba: OUTPUT«3␤»
psch so we do install the reduce form, but can't parse it because... reasons vOv 12:14
llfourn m: <hello world>.&[~].say
camelia rakudo-moar 7bdeba: OUTPUT«hello world␤»
AlexDaniel what are you trying to do? :) 12:17
psch AlexDaniel: i was trying to make an infix of a reduce form of an infix form of a sub
AlexDaniel :o 12:18
psch :P
AlexDaniel m: :o
camelia rakudo-moar 7bdeba: OUTPUT«WARNINGS for /tmp/3W7qVe7STP:␤Useless use of ":o" in sink context (line 1)␤»
AlexDaniel m: :o .say
camelia rakudo-moar 7bdeba: OUTPUT«o => True␤»
AlexDaniel m: ∞ 12:19
camelia ( no output )
AlexDaniel TimToady: why no warning here? ↑
12:20 kid51 joined
llfourn you can't sink infinity 12:22
m: Inf
camelia ( no output )
psch m: ()
camelia rakudo-moar 7bdeba: OUTPUT«WARNINGS for /tmp/05UZhSdoyB:␤Useless use of () in sink context (line 1)␤»
psch m: Nil
camelia ( no output )
12:27 bjz left 12:28 bjz joined
AlexDaniel m: NaN 12:30
camelia ( no output )
AlexDaniel llfourn: it sinks just fine :)
llfourn m: 12:33
m: ∞.sink
camelia ( no output )
llfourn you're right
maybe it's because ∞ represents the number of turtles holding up the world and turtles are fine when they sink. 12:34
sjn I wonder if those same turtles also float :) 12:41
is that rational thing to wonder about? 12:42
12:42 cpage joined
llfourn sjn: no we don't have float in p6 we call them Num 12:42
sjn feels Num thinking about these things 12:43
12:45 morgane joined, kid51 left
morgane hi all! 12:46
do you know if there is a mailing list for volunteer translators? 12:47
llfourn morgane: there is no mailing list specifically for that
moritz at least not for Perl 6 translators :-)
though people tend to be helpful on the general mailing lists
morgane: or do you want to volunteer translations?
morgane thanks! 12:48
12:48 tmch joined
morgane yep 12:48
llfourn morgane: what are you looking at translating?
moritz morgane: which language(s)?
morgane Im using perl5 and I would like to start with perl6, and as I am a professionnal translator I would love to learn by helping translating the documentation 12:49
French
sjn nice!
moritz hm, perl6intro.com/ already has a French translation; was that you?
morgane nope!
llfourn some parts of docs.perl6.org may not be good enough to translate...yet 12:50
moritz morgane: we tend to be open to translations, we just don't have much infrastructure to support them
morgane well, I don't know that much about Web translation (I never lead such project by myself to be honest), but I do know how to translate all kind of local files (.chm and stuff), does perl6 comes with some of them? 12:53
or is there only online documentation? 12:54
DrForr morgane: I've done quite a few translation projects myself.
morgane coz I guess the infrastructure is only an issue for Web files
Hi DrForr, what did you translate? 12:55
DrForr turnitin.com, moonfruit.com, some of booking.com, ticketmaster.com...
12:56 sufrostico joined, azawawi joined
azawawi hi 12:56
rudi_s I want to iterate over all components of a path (e.g. path is "/a/b/c/d" and I want to get "/a", "/a/b", "/a/b/c", "/a/b/c/d"). At the moment I'm using splitdir and then for 1..^@x.elems { catdir(@x[0..$_]) .. } - is there a shorter/better way?
sjn hey, is there a way to introspect deep into things? (e.g. if I create a constant $c = 42; I can later introspect $c and see that it is actually a constant) 12:57
azawawi how do I find whether a routine is DEPRECATED or not at runtime?
that is check for DEPRECATED 12:58
sjn ETOOMANYQUESTIONS 12:59
DrForr m: $c.^WHAT
camelia rakudo-moar 7bdeba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mzEsVJkw7U␤Cannot use .^ on a non-identifier method call␤at /tmp/mzEsVJkw7U:1␤------> 3$c.^WHAT7⏏5<EOL>␤ expecting any of:␤ method arguments␤»
DrForr m: $c.WHAT 13:00
camelia rakudo-moar 7bdeba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FzRCY0lKqj␤Variable '$c' is not declared␤at /tmp/FzRCY0lKqj:1␤------> 3<BOL>7⏏5$c.WHAT␤»
DrForr m: constant c = 32; say c.WHAT
camelia rakudo-moar 7bdeba: OUTPUT«(Int)␤»
llfourn sjn: you can't really 13:02
sjn :-\ 13:03
moritz m: constant $c = 42; say $c.VAR
camelia rakudo-moar 7bdeba: OUTPUT«42␤»
moritz m: constant $c = 42; say $c.VAR.readonly
camelia rakudo-moar 7bdeba: OUTPUT«Method 'readonly' not found for invocant of class 'Int'␤ in block <unit> at /tmp/HB55xja3pZ line 1␤␤»
llfourn A constant is not really a thing. It's just a variable that is ro and happens to be readonly.
moritz m: constant $c = 42; say $c.VAR.^methods
camelia rakudo-moar 7bdeba: OUTPUT«(Int Num Rat FatRat abs Bridge chr sqrt base polymod expmod is-prime floor ceiling round lsb msb narrow Range sign sin tan cotan acosech conj atan2 cosec pred asec acotan cosh acos acosec sech unpolar log10 atanh log exp acosh truncate sinh tanh acotanh Re…»
moritz m: constant $c = 42; say $c.VAR.^name 13:04
camelia rakudo-moar 7bdeba: OUTPUT«Int␤»
moritz m: my $c = 42; say $c.VAR.^name
camelia rakudo-moar 7bdeba: OUTPUT«Scalar␤»
moritz that's a difference
llfourn what moritz is showing gives you a good guess though
moritz for a variable to be writable, it must be container
sjn eeh
moritz m: constant $c = 42; $c := 23; say $c
camelia rakudo-moar 7bdeba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JBYdPVOqoa␤Cannot use bind operator with this left-hand side␤at /tmp/JBYdPVOqoa:1␤------> 3constant $c = 42; $c := 237⏏5; say $c␤»
llfourn m: my $a := "derp"; say $a.VAR.^name; # but this looks like a constant too 13:05
camelia rakudo-moar 7bdeba: OUTPUT«Str␤»
moritz llfourn: the constant part is the absence of Scalar, not the actual type in there
llfourn moritz: right but the non-constant my $a := has the absence of Scalar? 13:06
but it is not ro I suppose
well it is actually :S 13:07
but I guess your last one would work with my $a, and not constant 13:08
m: my $a := "foo"; $a = "bar";
camelia rakudo-moar 7bdeba: OUTPUT«Cannot assign to an immutable value␤ in block <unit> at /tmp/AR2pbqGgBg line 1␤␤»
llfourn m: my $a := "foo"; $a := "bar"; 13:09
camelia ( no output )
moritz the only thing you can't easily test if you can re-bind
well, you can always test if you can re-bind to itself
llfourn m: constant $a = "foo"; $a := "bar" #yep
camelia rakudo-moar 7bdeba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VrzRnPEyuW␤Cannot use bind operator with this left-hand side␤at /tmp/VrzRnPEyuW:1␤------> 3constant $a = "foo"; $a := "bar" #yep7⏏5<EOL>␤»
moritz try { $a := $a }
won't work for constants though, because it's caught at compile time
use EVAL :-) 13:10
llfourn moritz++ # there is a way to test if something is a constant -- it's just not very nice!
psch m: my &catdir = $*SPEC.^find_method('catdir').assuming($*SPEC); say [\[&catdir]] ($*SPEC.splitdir: "/a/b/c/d/".IO)
camelia rakudo-moar 7bdeba: OUTPUT«( /a /a/b /a/b/c /a/b/c/d /a/b/c/d)␤»
psch well, the catdir/splitdir usage there is rather pretty, but i don't see a way to get that without the .assuming... vOv
rudi_s: ^^^
moritz m: say IO::Spect.catdir('a', 'b') 13:11
camelia rakudo-moar 7bdeba: OUTPUT«Could not find symbol '&Spect'␤ in block <unit> at /tmp/oy4F6E7jmY line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/oy4F6E7jmY line 1␤␤»
moritz m: say IO::Spec.catdir('a', 'b')
camelia rakudo-moar 7bdeba: OUTPUT«Method 'catdir' not found for invocant of class 'IO::Spec'␤ in block <unit> at /tmp/PyxYzvSdgj line 1␤␤»
moritz m: say IO::Spec::Unix.catdir('a', 'b') 13:12
camelia rakudo-moar 7bdeba: OUTPUT«a/b␤»
psch hm, not sure why it has the last twice, fwiw :/
m: say [\+] 1,2,3
camelia rakudo-moar 7bdeba: OUTPUT«(1 3 6)␤»
moritz m: say $*SPEC::Unix.catdir('a', 'b')
camelia rakudo-moar 7bdeba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IQ5NoXuLgG␤Dynamic variables cannot have package-like names, like $*SPEC::Unix␤at /tmp/IQ5NoXuLgG:1␤------> 3say $*SPEC::Unix7⏏5.catdir('a', 'b')␤»
moritz m: say $*SPEC.catdir('a', 'b') 13:13
camelia rakudo-moar 7bdeba: OUTPUT«a/b␤»
moritz psch: ^^ use $*SPEC as invocant
psch moritz: well, rudi_s' question was "all subpaths of a given path, e.g. '/a', '/a/b', '/a/b/c'"
partly__ where can i learn more about the perl6 -c error format? I see that rakudo/src/Perl6/Compiler.nqp has a method syntaxcheck(), but its very very short
psch moritz: and stuffing $*SPEC.catdir into triangle reduce doesn't work 13:14
dalek c: fb32bd0 | azawawi++ | htmlify.p6:
Fix #407 again with less duplication
c: 9d5c0c7 | azawawi++ | htmlify.p6:
Merge pull request #410 from azawawi/master

Fix #407 again with less duplication
rudi_s psch: Thanks. Without the trailing / it only gets returned once.
psch rudi_s: oh. right, that makes sense i suppose 13:15
13:17 sjoshi left
moritz psch: you can use the .reduce method on List, no? 13:18
azawawi how do I get the list of traits on a routine?
moritz m: say <a b c d>.reduce: -> |c { $*SPEC.catdir(|c) } 13:19
camelia rakudo-moar 7bdeba: OUTPUT«a/b/c/d␤»
moritz m: say <a b c d>.reduce: -> |c { $*SPEC.catdir(|c) }, :triangle
camelia rakudo-moar 7bdeba: OUTPUT«a/b/c/d␤»
moritz ... except that it doesn't do triangle... :/
psch yeah, that's what i grep'd just now 13:20
moritz azawawi: not all, but most traits work by mixing in a role into the routine object
azawawi: so you can get a list of roles with &routine.^roles and use that for some guess work
azawawi: but, traits don't even have to leave traces on the routine itself
you could a sub foo is url('/foo/:name') { ... } and only use that to register the subroutine in a dispatcher, not modify the sub itself 13:21
azawawi cool 13:22
13:22 wamba joined 13:25 virtualsue left
morgane DrForr: (about translation projets) what kind of process did you follow? was there a request available somewhere? 13:25
13:27 tmch left
DrForr No, these were usually ~6-month projects, not really something you just make a pull request for. 13:30
morgane ok, so you just asked for the web source files? or? 13:33
DrForr It's not that simple. 13:36
morgane what do you mean? 13:37
DrForr Not as simple as tweaking templates. 13:38
azawawi moritz: got it github.com/rakudo/rakudo/blob/nom/...ts.pm#L326 ... thanks :)
DrForr morgane: I was working with 30 languages, including issues with traditional and simplified Chinese, and some Thai issues. 13:40
13:41 _perlpilot_ is now known as perlpilot
morgane wouh yes, for those languages I can imagine, even French accented letters are sometimes hard to insert. 13:42
13:43 abraxxa left
AlexDaniel azawawi: I am still not convinced that printf issue is solved :) 13:43
DrForr And French punctuation rules and...
13:44 RabidGravy joined
azawawi doc.perl6.org/language/5to6-perlfunc#printf 13:44
AlexDaniel: come on :) 13:45
AlexDaniel azawawi: yeah I see. But are you sure that printf should not have a dedicated page?
azawawi AlexDaniel: atm not a lot of documentation is in p5to6-func to begin with...
AlexDaniel doc.perl6.org/routine/printf is a scary 404 right now, so…
and I don't think that the reader should know or care about perl5 to read the docs about printf 13:46
azawawi AlexDaniel: the reason that i didnt do it is that it is a p5to6 function ... not a routine
AlexDaniel: anyway... a page is better than 404s :) 13:47
psch m: say &printf.isa(Routine)
camelia rakudo-moar 7bdeba: OUTPUT«True␤»
AlexDaniel azawawi: what is a “p5to6 function”?
azawawi AlexDaniel: doc.perl6.org/language/5to6-perlfunc#DESCRIPTION 13:48
psch so doc.perl6.org/routine/abs should 404 too?
AlexDaniel “I will not be explaining the functions in detail. This document is an attempt to guide you from the functions in Perl 5's perlfunc document to their equivalents in Perl 6. For full documentation on the Perl 6 functions, please see the Perl 6 documentation.”
please see the Perl 6 documentation on printf! Oh wait, there's none 13:49
DrForr Then help fix it?
AlexDaniel DrForr: I kinda did. By creating an issue :) 13:50
azawawi AlexDaniel: at least printf et al are now documented... not like before :) 13:51
13:51 Psyche^ joined
AlexDaniel azawawi: yea that's good. And it is really cool that 5to6 is now searchable 13:51
azawawi++ 13:52
but I think that I have to reopen it… :)
azawawi thinks "baby steps" :)
AlexDaniel: hehe
13:55 Psyche^_ left
rudi_s Is there a nicely-formatted output for .perl available like the old Data::Dumper? 13:55
AlexDaniel m: dd [∞, 2², <a b c>] 13:56
camelia rakudo-moar 7bdeba: OUTPUT«[Inf, 4, ("a", "b", "c")]␤»
AlexDaniel rudi_s: like this?
Juerd I think rudi_s might mean: with indentation
psch D::D adds line breaks and indentation, which i don't think we have
perlpilot I don't know if I'd call Data::Dumper output "nicely-formatted" :)
Skarsnik Data::Dump module x) 13:57
rudi_s AlexDaniel: Yeah, what Juerd said.
Well, lets call it better readable for more than one line of output.
AlexDaniel modules.perl6.org/#q=data%3A%3Ad
with colors! Wooohooo!
rudi_s Oh, nice.
AlexDaniel I like how it says “here you go, dude” in readme 13:58
13:59 awwaiid joined
perlpilot I haven't checked, but it would be nice if one of those dumpers did object inspection like P5's Data::Printer 14:00
Skarsnik It does 14:01
perlpilot Ah, Data::Dump++ 14:02
tony-o++
14:11 TreyHarris joined 14:15 awwaiid left, cdg_ joined 14:23 telex left 14:24 Amnez777 left 14:35 Relsak left
nine 12 minute mark and I still have to cover all precompilation issues and available repository implementations... 14:36
14:36 morgane left 14:37 molaf joined 14:39 Amnez777 joined 14:44 rntz left, rntz joined 14:45 skids joined
dalek kudo/repl6: 3155d15 | hoelzro++ | src/Perl6/Compiler.nqp:
REPL6: Allow the REPL to signal multi-line mode via kwargs

This is seriously LTA, but returning the sentinel value doesn't seem to work, probably due to containerization or something. I never really liked the sentinel solution, so I'll be forced to think of a better way to do this overall before I merge back into nom
14:47
kudo/repl6: dcb9738 | hoelzro++ | src/core/REPL.pm:
REPL6: Handle exceptions that trigger multi-line mode
kudo/repl6: e2187cd | hoelzro++ | src/core/REPL.pm:
REPL6: Implement RAKUDO_DISABLE_MULTILINE
14:50 tmch joined 14:56 partly__ is now known as kalkin 14:57 kalkin is now known as kalkin- 15:02 kolikov joined
kolikov Hi perl 6 ! 15:02
moritz hello kolikov 15:03
perlpilot kolikov: greetings!
kolikov morgane, are you still there ?
15:04 sufrostico left
kolikov For morgane: I did part of the french translation of perl6intro , Naoum Hankache is the original initiator of the project; the git is here github.com/hankache/perl6intro 15:10
15:13 sufrostico joined
RabidGravy my brane is really rusty, took me half an hour to get the bits in the right order to pick the stuff out of an MP3 frame header 15:17
moritz has a classical "works in dev" moment 15:18
a web app I'm deploying seems to miss half of its layout in staging, and everything is fine in dev 15:20
nine Forgot to add a file to the repo?
15:20 awwaiid joined
moritz "git status" seems rather clean 15:21
and the last actions were deleting files and reverting local changes, going back to upstream versions
RabidGravy if in doubt blame the deployment script 15:22
or cosmic rays
TimToady AlexDaniel: iirc, ∞ turns too quickly into a special opcode that loses its location information, so I didn't stress about that one
AlexDaniel TimToady: sad 15:23
or maybe not? How useful are these warnings anyway? 15:24
TimToady they are very useful when you screw up precedence
m: my $x = 1, 2;
camelia rakudo-moar 7bdeba: OUTPUT«WARNINGS for /tmp/BpqVrz67s8:␤Useless use of constant integer 2 in sink context (lines 1, 1)␤»
AlexDaniel m: my $x = 1, ∞; 15:25
camelia ( no output )
AlexDaniel right
indeed
TimToady also, correcting most of the internal 'is pure' markings in support of that helped a lot with constant-folding optimization 15:27
moritz m: sub f { my $x = 1, 2; say 42 }; 15:29
camelia rakudo-moar 7bdeba: OUTPUT«WARNINGS for /tmp/iNQn7_HkC8:␤Useless use of constant integer 2 in sink context (lines 1, 1)␤»
TimToady and the useless useless use warnings showed where we weren't correctly propagating wanted/unwanted context down the tree
moritz why (lines 1, 1) ?
TimToady good question 15:30
15:32 fireartist left
TimToady given it used to not report any sink violations inside subroutines, it's an improvement to report too many :) 15:33
15:34 awwaiid left 15:35 awwaiid joined
TimToady m: sub f { my $x = 1, 2+3; say 42 } 15:35
camelia rakudo-moar 7bdeba: OUTPUT«WARNINGS for /tmp/FPrZL4Ts_P:␤Useless use of "+" in expression "2+3" in sink context (line 1)␤»
TimToady appears to only be the "constant" code 15:36
ilmari is "sink" context equivalent to perl5's "void"?
TimToady more or less
AlexDaniel m: sub f { my $x = 1, "test\n" + 5; say 42 } # mmmm! Escaping! 15:37
camelia rakudo-moar 7bdeba: OUTPUT«WARNINGS for /tmp/Lzs1mC4K72:␤Useless use of "+" in expression "\"test\\n\" + 5" in sink context (line 1)␤»
AlexDaniel m: sub f { my $x = 1, “test\n” + 5; say 42 } # that's probably the reason why it is the first time I see escaping in error messages 15:38
camelia rakudo-moar 7bdeba: OUTPUT«WARNINGS for /tmp/iRvJ3Vy0JK:␤Useless use of "+" in expression "“test\\n” + 5" in sink context (line 1)␤»
Hotkeys MARNIN
TimToady that bit of expression widening/reporting code already existed before I got my mits on it 15:39
15:39 awwaiid left
TimToady tends to leave the extra quotes off when the piece of error message is sufficiently different from words that will stand out visually 15:41
TimToady removed a lot of quotes from error messages for that reason in Nov and Dec
( but obviously not that one :) 15:42
TreyHarris Where is ∞ discussed? I'm not finding it in perl6/specs or perl6/docs (except in contexts where it seems to mean things other than you're discussing
TimToady it's just Inf 15:43
but ∞ is one less keystroke if you count the shift :)
m: say ∞ eqv Inf
camelia rakudo-moar 7bdeba: OUTPUT«True␤»
AlexDaniel TreyHarris: here: doc.perl6.org/language/unicode_texas 15:44
15:47 sufrostico left
AlexDaniel .u 𝑒 15:48
yoleaux U+1D452 MATHEMATICAL ITALIC SMALL E [Ll] (𝑒)
nine m: say ∞.perl
camelia rakudo-moar 7bdeba: OUTPUT«Inf␤»
AlexDaniel m: say ∞⁰ 15:49
camelia rakudo-moar 7bdeba: OUTPUT«1␤»
15:49 sufrostico joined
TreyHarris AlexDaniel: no, I got it, I just didn't understand why my $x = 1, 2 generates a warning but my $x = 1, Inf does not, and that seems to be the crux of the higher-level discussion. 15:49
perlpilot m: say ∞ ** ∞; 15:50
camelia rakudo-moar 7bdeba: OUTPUT«Inf␤»
perlpilot :-)
TimToady then you have to look at the higher-level in the conversion to see the reason :)
AlexDaniel m: say 0_0
camelia rakudo-moar 7bdeba: OUTPUT«0␤»
TimToady (meaning about 30 minutes ago up the page) 15:51
15:51 awwaiid joined, sno joined
TreyHarris TimToady: oh, the Inf losing its location information pretty quick comment? That confused me at the time and I went off looking for some special use of the ∞ symbol. Got it now, thanks. 15:52
perlpilot Why are superscript and subscript not modifiers on existing characters in unicode? That seems weird to me.
AlexDaniel m: say \(0_0)/ 1 # more smileys in perl 6 code! 15:53
camelia rakudo-moar 7bdeba: OUTPUT«1␤»
AlexDaniel perlpilot: well, ¹ and ² existed long before everything else
TreyHarris perlpilot: because unicode can't do modifiers to change the relative size of characters, so small versions of characters that mean something different from large versions of characters aren't something that's allowed as something you can express in unicode. otherwise we could do small caps directly without tricks 15:54
AlexDaniel .u ¹²³
yoleaux U+00B2 SUPERSCRIPT TWO [No] (²)
U+00B3 SUPERSCRIPT THREE [No] (³)
U+00B9 SUPERSCRIPT ONE [No] (¹)
AlexDaniel .u ⁴
yoleaux U+2074 SUPERSCRIPT FOUR [No] (⁴)
TreyHarris yes, and also AlexDaniel's historical reasons. The superscript and subscript number block doesn't include those because they were already in the U+00B0 block
AlexDaniel meh, it is even weirder
timotimo rudi_s: it didn't seem like anybody answered your question, but i think triangle reduce would be what you want for the individual parts of the path 15:55
m: say ([\~] <foo bar baz quux>).perl
camelia rakudo-moar 7bdeba: OUTPUT«("foo", "foobar", "foobarbaz", "foobarbazquux").Seq␤»
15:56 awwaiid left
AlexDaniel TreyHarris: better question is why the f… some letters are missing 15:56
timotimo oh, it was answered
15:56 awwaiid joined, notbenh_ joined
AlexDaniel ᵃᵇᶜᵈᵉᶠᵍʰⁱʲᵏˡᵐⁿᵒᵖ WHERE IS Q? ʳˢᵗᵘᵛʷˣʸᶻ 15:57
jnthn Good q...
TreyHarris AlexDaniel: h, k, l, m, n, p, s and t were ones that were needed for IPA as modifiers to represent various environmental contexts for other main sounds. (like tₕ which you probably can't read but is t with an h superscript, is the t in "thali", like you get at Indian restaurants) 15:58
perlpilot It's in Unicode version N > 8 somewhere ;)
TimToady the boundary between plaintext and rendering is ill-defined, and many of the existing Unicode characters were envisioned for one use but not for another potentially valid use 15:59
AlexDaniel but in the end it is still ridiculous that there is no q :/ 16:00
TimToady we're all ridiculous if we look hard enough :)
AlexDaniel true
TreyHarris AlexDaniel: to indicate devoicing with uvularization? I don't think that's physiologically possible ;) 16:01
TimToady well, if languages can have voiceless vowels... :)
otoh, I haven't found a language that uses a triple trill, but I can do one :) 16:02
hoelzro I never really understood how voiceless vowels worked
are they just whispered?
AlexDaniel TreyHarris: to indicate the fullness of one particular alphabet :)
16:02 awwaiid left
hoelzro also does GoodMorning[:perl6]; 16:02
timotimo hey hoelzro 16:03
hoelzro ahoy timotimo!
TimToady we just think of them all as 'h' in English, but they really do sound different, compare 'has' with 'hoop'
16:03 jjido left
TreyHarris TimToady: the unvoiced linguolabial trill is also something anyone can do (and many do do, and even carries semantics!) but is found in no language's phonetics 16:03
TimToady or 'he' with 'hop'
AlexDaniel after all we have this: 𝐚𝐛𝐜𝐝𝐞𝐟𝐠𝐡𝐢𝐣𝐤𝐥𝐦𝐧𝐨𝐩𝐪𝐫𝐬𝐭𝐮𝐯𝐰𝐱𝐲𝐳
timotimo hoelzro: i'm really glad you're working on the multi-line stuff :)
TimToady TreyHarris: I wouldn't be so sure about that 16:04
considering half the world's languages are still basically unstudied
TreyHarris TimToady: True, and it does have a symbol r̼̊ just in case, but it's never been attested.
AlexDaniel m: my $𝐭𝐞𝐬𝐭 = 25; say $𝐭𝐞𝐬𝐭
camelia rakudo-moar 7bdeba: OUTPUT«25␤»
hoelzro timotimo: right now it's just porting it to Perl 6, but it feels *so* good
the code feels so much cleaner to me
AlexDaniel m: my $𝖙𝖊𝖘𝖙 = 25; say $𝖙𝖊𝖘𝖙
camelia rakudo-moar 7bdeba: OUTPUT«25␤»
TimToady afk for a while & 16:05
timotimo understandably :)
hoelzro granted, that might partly be "I did it this way last time, and that was wrong"
I just wish I were working on it more; coursera + language of the month is taking up a lot of time
timotimo it's fine to prioritize self-improvement a bit :) 16:06
16:08 awwaiid joined
hoelzro =) 16:10
on the plus side, I used a *lot* of Perl 6 for this month's language of the month idea
hoelzro .oO( maybe I should just make Perl 6 the language of the month for every month... )
16:11 atweiden joined
atweiden m: my Bool %aoh-seen{Array}; my @path = 'products'; %aoh-seen{$@path}++; %aoh-seen{$@path}++; say %aoh-seen.perl; 16:11
camelia rakudo-moar 7bdeba: OUTPUT«(my Bool %{Array} = (["products"]) => Bool::True)␤»
atweiden m: my Bool %aoh-seen{Array}; for 0..1 { my @path = 'products'; %aoh-seen{$@path}++; }; say %aoh-seen.perl;
camelia rakudo-moar 7bdeba: OUTPUT«(my Bool %{Array} = (["products"]) => Bool::True, (["products"]) => Bool::True)␤»
atweiden is this a bug? 16:12
gtodd1 Inline::R 16:13
moritz atweiden: I don't think so
rudi_s timotimo: I've noticed that I also need to get the remaining part of the path and adapted my current solution. - But thanks.
moritz atweiden: arrays aren't value types
atweiden: so you need to use the same array twice if you want to access the same slot in the hash twice
m: say (my @ = 'products') === (my @ = 'products) 16:14
camelia rakudo-moar 7bdeba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UHr0xuY4z0␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/UHr0xuY4z0:1␤------> 3y @ = 'products') === (my @ = 'products)7⏏5<EOL>␤ expecting any of:␤ sing…»
moritz m: say (my @ = 'products') === (my @ = 'products')
camelia rakudo-moar 7bdeba: OUTPUT«False␤»
ugexe m: my $x = 1..*; Supply.from-list($x).tap: { once { say $x }; } # seems odd to me that $x.map: {.say} iterates the range but .from-list treats $x as a single Range 16:15
camelia rakudo-moar 7bdeba: OUTPUT«1..Inf␤»
ugexe oh duh, i need to wake up. i mean `once { say $_; }` 16:16
Juerd "once" is lousy obfuscation. You should use $++//do instead.
16:17 awwaiid left, awwaiid joined
ugexe its just to keep it from spitting out a bunch of extra results that arent needed in the chat room 16:17
16:17 ely-se left
ugexe if it worked as i thought it would 16:17
atweiden moritz: is another Positional type easier to use?
16:17 telex joined 16:18 khw joined
Juerd m: my $x = 1..*; Supply.from-list(flat $x).tap: *.say; 16:19
camelia rakudo-moar 7bdeba: OUTPUT«1..Inf␤»
atweiden seems grepping with eqv is the only way then to practically use such a hash
Juerd Hmm
ugexe you can do @$x, but still
Juerd m: my $x = 1..*; Supply.from-list(|$x).tap: *.say;
ugexe that will timeout
Juerd That takes long enough :)
jnthn m: my $x = 1..*; for $x { .say }
camelia rakudo-moar 7bdeba: OUTPUT«(timeout)» 16:20
rakudo-moar 7bdeba: OUTPUT«1..Inf␤»
jnthn It's consistent with that.
ugexe because its trying to allocate 1..Inf
jnthn m: my $x = 1..*; for @$x { .say }
16:20 dwarring left
Juerd I probably wouldn't run into this because my instincts say that lists go in @, not $ 16:20
jnthn And .from-list needing @$x also is
camelia rakudo-moar 7bdeba: OUTPUT«(timeout)1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27␤28␤29␤30␤31␤32␤33␤34␤35␤36␤37␤38␤39␤40␤41␤42␤43␤44␤45␤46␤47␤48␤49␤50␤51␤5…»
ugexe i see. my confusion is just from the map/grep example then
$x.map: {.say} 16:21
jnthn Yeah, . is a "dereference" in that sense; you're talking about the thing inside the Scalar container 16:22
Juerd Methods are more likely to coerce types to something more appropriate, in general.
Especially with your own types, you can expect more cooperation from (your own) methods than from language features
atweiden m: my Bool %aoh-seen{Array}; for 0..1 { my @path = 'products'; %aoh-seen{$@path}++; }; say %aoh-seen.perl; say %aoh-seen{$['products']}.perl; 16:23
camelia rakudo-moar 7bdeba: OUTPUT«(my Bool %{Array} = (["products"]) => Bool::True, (["products"]) => Bool::True)␤Bool␤»
16:25 awwaiid left
ugexe i saw that problem on SO 16:26
m: my @p = "products"; my $p2 = ["products"]; say @p eqv $p2; say @p === $p2
camelia rakudo-moar 7bdeba: OUTPUT«True␤False␤»
16:27 jjido joined 16:37 nakiro left
ugexe is there a name for using the proxy pattern to return aggregated results from all the possible proxy end points? or is it just referred to as a proxy pattern that happens to aggregates? 16:38
RabidGravy could do with something snappier if there isn't 16:40
the "Supermarket Sweep Pattern"
16:42 awwaiid joined
ugexe and limit myself to only 4 large hams? 16:43
RabidGravy or go down the booze aisle ang guzzle the lot before you get to the checkout 16:44
timotimo is "supermarket sweep pattern" the thing you use to order items on your shopping list properly? 16:47
RabidGravy today I officially hate software, I got sidetracked wondering why libshout wasn't working in the same process as IO::Socket::Async, looked at the source, thought OooOOOOoh that's really easy to implement in Perl6 ....
... realised I would need to pick the frame info out of the MP3 stream to get the sync right, and now have wound up worrying what to call what has turned into the resulting module 16:48
ugexe timotimo: there is nothing proper about the shopping that took place on supermarket sweep 16:49
unless you live off large hams, bags of coffee, and toothpaste
16:50 cpage_ left 16:51 domidumont left 16:53 jjido left 16:55 jjido joined 16:57 jjido left
Skarsnik RabidGravy, Do you think it came from H::UA error:00000000:lib(0):func(0):reason(0) 17:07
? It crash on a send request
ugexe thats openssl
RabidGravy I'm going with ssl too
Skarsnik than an useful error x) 17:09
ugexe none of the openssl errors really are
Skarsnik hm, I have no idea how to prevent this to happen aside with a try x) 17:11
ugexe try deleting your precomp folders/installs
arnsholt RabidGravy: I suggest Yak::Shave =)
Skarsnik It crash on a request I do every 2 sec and I already send a thousand of it x)
17:12 awwaiid left
RabidGravy arnsholt, if I started down that route there would be Yak::Shave::1 .. Yak::Shave::200 by now 17:13
ugexe i just bumped the version of openssl. an interface change was added yesterday without a version change... dunno if it matters 17:14
17:15 sufrostico left
ugexe i seem to hit precomp problems though when things are required at runtime, so always IO::Socket::SSL, using old precomp files 17:15
deleting all precomp stuff has always fixed it for me 17:16
17:16 domidumont joined
Skarsnik It crash after like 6hours of running 17:17
it's not like it crash on start
ugexe ah
17:17 sufrostico joined 17:18 zpmorgan joined
RabidGravy I can't suggest anything other than look in the openssl code to find where it generates the error and begin instrumenting 17:18
17:18 zakharyas left
RabidGravy if the message is what you got verbatim then I would say that it probably is something that should be guarded and isn't (i.e. it isn't an error at all but got to the error handler because it wasn't stopped from doing so, like the socket returned 0 bytes for perfectly sensible reasons) 17:20
Skarsnik Probably need to catch openssl error in h:ua too? 17:21
RabidGravy not really, special handling for different network drivers would lead to madness 17:22
17:22 sevvie joined
Skarsnik Yes, but it make h::ua crash 17:22
not even throwing an error 17:23
like socket error or something
RabidGravy but the same thing would happen if IO::Socket threw an exception
except I think this is a bug in openssl and should be fixed there 17:24
Skarsnik Yes but I mean I kind of want to have a try {} CATCH X::SocketError ( do something like retry) 17:25
RabidGravy so what exception does the OpenSSL throw? 17:26
Skarsnik No idea, h:ua get going and crash because something ended to be Any, instead of data 17:27
RabidGravy and how does that differ from the exceptions that IO::Socket throws
sorry you're being confusing now, so where did that error you pasted above come from? 17:28
was that just printed and the OpenSSL returns nothing?
then it's still a bug in OpenSSL which should be fixed
Skarsnik Yes, just printed
RabidGravy eugh 17:29
Skarsnik damn, I should not have restarted the script, I lost the trace
17:29 musiKk_ joined, themonkeybob11 left
Skarsnik it crashed on http::response (on one of the new method), that was the only bt perl6 give me, It was after the openssl display 17:32
17:35 themonkeybob11 joined
Skarsnik I will take a look later, brb x) 17:36
RabidGravy In that case the recv in get-response is not returning a Blob, which is a bug in OpenSSL 17:37
17:38 kolikov left 17:55 tmch left
pyrimidine Ulti: it has to be a student, but I think anyone can mentor 18:00
(re: GSoC) 18:01
Ulti: also, not limited to just OBF projects (Bio*). 18:03
18:05 virtualsue joined
perlpilot suddenly wishes Perl5 had a "once" statement prefix 18:06
I just edited a subroutine that used a state var with initialization, but the initialization needed to be slightly more complicated, but not enough that I wanted to stick it in its own sub 18:08
jnthn state var calling lexical sub? 18:09
perlpilot (I could still use "do", but it really feels like a "once" situation)
jnthn With it's init calling, I mean... :)
perlpilot It's just weird how I'm thinking about Perl 5 code these days. 18:10
I used to always grouse about the gyrations that other languages put you through to get things done and now I'm doing the same about Perl 5 because Perl 6 exists :)
SmokeMachine____ Can I create a Jar from a perl6 code? 18:16
perlpilot SmokeMachine____: I have absolutely no knowledge about whether or not you can do this, but my guess would be "no". 18:20
arnsholt Assuming you're one the JVM backend, I think precomp is a JAR 18:21
timotimo yeah, but you can't just java -jar it, i don't think
ugexe truuu 18:22
arnsholt Yeah, you can't
timotimo .o( tu tu ru )
18:23 rntz left 18:24 espadrine left, rntz joined
SmokeMachine____ why not? 18:24
arnsholt It depends on the rest of the NQP and Rakudo code 18:25
18:26 lizmat joined
SmokeMachine____ isn't the NQP running on the JVM too? 18:26
timotimo "depends on" not in the traditional sense of dependency. it's actually depending on "being loaded and invoked" by the other code, if i'm not mistaken
arnsholt I think the code should work if you also load the NQP and Rakudo JARs, but I'm not sure if that'll trigger execution of any mainline code in your precomped stuff
geekosaur I think the point is it is not a self-contained jar, but requires a bunch of other jars comprising perl6, nqp, etc.
arnsholt Exactly. The precomped JAR doesn't actually contain the NQP and Rakudo JARs 18:27
timotimo we can build something that'll add a proper entry point that'll run the contained code
SmokeMachine____ but I could create a class on a jar and use it on a java code?
timotimo you could use it, but that requires a lot of care
it wouldn't behave too much like regular java code
SmokeMachine____ assuming that I would use the NQP and Rakudo jars, how could I generate the jar of my class? 18:31
timotimo you don't get a jar per class, you get a jar per compilation unit 18:32
SmokeMachine____ my intention is only generate a jar of a custom perl6 code and look at the bitecode... 18:33
timotimo ah 18:34
well, then. the --target= argument is for you
together with a -o for the output filename
SmokeMachine____ --target=jar?
timotimo --stagestats gives you a list of what targets are available. i don't know exactly which one is right for you
it's probably "jar", yeah
if you get an error, it's some other stage you need to ask for
18:36 labster joined
SmokeMachine____ thanks! 18:37
18:40 wamba left 18:41 virtualsue left
arnsholt SmokeMachine____: If you're interested in the bytecode generated, you should probably look at the code that generates the bytecode as well. It's mostly NQP code in the NQP repo, but IIRC Rakudo has some additional custom bits as well 18:47
18:49 vendethiel joined 18:50 awwaiid joined 18:53 musiKk_ left, virtualsue joined 18:58 araujo left, araujo joined, cdg_ left
RabidGravy just a sanity check here, in C assuming "header" is uint32 I have "(header >> 20) & 0x0fff;" the equivalent in P6 is "($header +> 20) +& 0x0FFF" right? 19:00
nine I'd say yes
or just $header / 2**20 19:01
or rather $header div 2**20 19:02
19:04 spider-mario joined 19:06 tmtowtdi joined
timotimo "just"? i think bitwise operations are faster on the cpu than division is 19:07
19:08 awwaiid left, awwaiid joined
RabidGravy Hmm, either way I'm getting something different that what I expected 19:08
19:11 lizmat left
nine timotimo: I'm sure they are. Question is if in Perl 6 is is the same. It's 2 operators instead of just one after all. 19:13
timotimo huh? 19:14
you mean the +& is redundant? 19:15
nine It is redundant for a uint32, isn't it?
timotimo i guess so
geekosaur it would be redundant if it were 0xFFFF
19:15 vendethiel left
timotimo thank you for checking :) 19:15
geekosaur hm, technically for 20 bits, yeh 19:18
geekosaur tracking a bit slowly today, should not have had to work that out :( 19:19
wonder if that was copied from pre-ANSI C where right shift could have undefined behavior wrt sign bit regardless of signed/unsigned (that is a compiler on a platform without built-in logical shift right could use the arithmetic one even on unsigned) 19:21
...more likely just cargo cult 19:22
19:22 lizmat joined 19:23 themonkeybob11 left
sjn \o 19:27
sjn found something weird with the now() function
timotimo m: say &now 19:28
camelia rakudo-moar 7bdeba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8yPIKGVHHB␤Undeclared routine:␤ now used at line 1. Did you mean 'not', 'HOW'?␤␤»
timotimo it's not a function :)
m: say now
camelia rakudo-moar 7bdeba: OUTPUT«Instant:1457119725.794821␤»
timotimo it's a term
sjn hehe
fair enough
date +"0 Instant:%s.%N"; perl6 -e'say "1 " ~ now; INIT say "2 " ~ now; say "3 " ~ now ;'; date +"4 Instant:%s.%N"
run this in a sell
shell*
I've tested it on a few computers, and all of them have a weird 4th timestamp 19:29
it's like stepping back in time
19:30 SCHAAP137 joined, lizmat left, vendethiel joined
sjn anyone else here getting a weird output? 19:31
perlpilot weird how?
19:31 AlexDaniel left
sjn the output of date is much more different than I'd expect 19:32
timotimo yeah, it has an extra space there 19:33
here's a tip for you:
m: say now - time
camelia rakudo-moar 7bdeba: OUTPUT«Instant:36.318187␤»
sjn no, don't think about the space
timotimo sorry, missing a space i meant :)
sjn here, the timestamp offered by perl6 is some 36 seconds off 19:34
perlpilot sounds like leap second differences
sjn really?
timotimo yes, that's exactly it
19:35 musiKk_ joined
sjn doesn't perl6 get it's time from the system? 19:35
why would perl6 muck around with that?
timotimo because Instant is monotonous 19:36
moritz Perl 6 offers both civil time and TAI
timotimo huggable: Instant
huggable timotimo, class Instant [Specific moment in time]: doc.perl6.org/type/Instant
timotimo An Instant is a particular moment in time measured in atomic seconds, with fractions. It is not tied to or aware of any epoch.
moritz the idea is that you use Instant when you need to control intervals 19:37
like, you don't want to run your microwave for 31 instead of 30 seconds if there happens to be a leap second during that duration
sjn and it doesn't matter if the Instant is 36 seconds out of sync with the real world?
moritz sjn: it's not out of sync with TAI
sjn: only with UTC 19:38
nine Bottom line: time is complicated
geekosaur sjn, there are regular arguments over whether leap seconds should even exist much less when they should be paid attention to 19:40
azawawi github.com/azawawi/perl6-memoize/b...load.t#L53 # Implicit 'is pure' added to 'is memoized'. sortiz++ 19:41
19:41 themonkeybob11 joined
azawawi github.com/azawawi/perl6-memoize/b...e.pm6#L108 # More documentation of options. Feedback is welcome 19:41
19:44 telex left
sjn oh joy 19:44
19:44 telex joined 19:45 lostinfog joined, lizmat joined
lizmat m: sub a($a,$b) {}; dd &a.signature.params, :($a,$b).params # there's a spectest that thinks these are equal 19:47
camelia rakudo-moar 7bdeba: OUTPUT«($a, $b)␤(Mu $a, Mu $b)␤»
19:48 FROGGS joined 19:49 tmch joined
moritz finally put together the landing page for his book project: deploybook.com/ 19:51
feedback welcome!
19:51 vendethiel left 19:52 lizmat_ joined
gtodd1 does anyone here use "R" for stats ? ... along with PDL of course :-) 19:52
azawawi reads it
gtodd1 sometimes the R "repl" (it's not really just a repl) is so ... nice
19:53 gtodd1 is now known as gtodd
hoelzro gtodd: I use it 19:53
its REPL is pretty nice
esp. the ability to save workspace images
19:53 lizmat left 19:54 lizmat_ is now known as lizmat
lizmat m: sub a($a,$b) {}; dd &a.signature.param[0].type 19:54
camelia rakudo-moar 7bdeba: OUTPUT«Method 'param' not found for invocant of class 'Signature'␤ in block <unit> at /tmp/dzd4NYlLew line 1␤␤»
lizmat m: sub a($a,$b) {}; dd &a.signature.params[0].type
camelia rakudo-moar 7bdeba: OUTPUT«Any␤»
sjn reads about TAI, UTC and UT1
gtodd sometimes I think it's just the saving of work (objects data etc) in .Rdata in per directory per project "images" that I find refreshingly likeable
hoelzro yeah, it's super nice 19:55
gtodd hoelzro: hehe yeah that ... "save current workspace?" -> .Rdata images
19:55 virtualsue left
azawawi moritz: right paragraphs need text justification and text is getting outside of the white box on my firefox browser 19:55
hoelzro when working on R scripts, I'll often "checkpoint" by calling save.image()
so that if something fails shortly thereafter, I can play around with the "bad" idea
gtodd hoelzro: that seems a common workflow pattern 19:56
hoelzro s/idea/data/
19:56 ashevchuk joined
lizmat jnthn: sub a($a) 's sig of Any $a whereas :($a) 's sig is Mu $a 19:56
19:56 musiKk_ left
lizmat jnthn: there's a spectest that assumes the sigs are eqv 19:56
I think either that test is wrong, or building a sig with :($a) is wrongly assuming Mu rather than Any 19:57
sjn useful reading regarding leap seconds, UTC, TAI and UT1 --> www.madore.org/~david/computers/uni...conds.html 19:58
TimToady I would be inclined to think that :($a) would be more like a block signature than a routine signature
lizmat TimToady: so hence the Mu is correct ?
and the test is wrong ?
TimToady that's my leaning, unless someone can think of a good reason to have it the other way 19:59
gtodd hoelzro: other programming languages (Haskell, perl5? and I suppose one day perl6) have some variant of Inline::R because sometimes it's nice to "orchestrate" R in some fashion ... *BUT* it's pretty cool how much the built in parts of perl6 allow you to do things with arrays/matrices etc. (PDL inspired?) out of the box with perl6
lizmat feels right to me...
TimToady the block/routine distinction is in support of junction threading, and I don't see much use for threading :($a) offhand... 20:00
hoelzro gtodd: Inline::R is in my Perl 6 "create me" list
moritz azawawi: could you please give a screenshot?
hoelzro along with like 100 others =P
TimToady gtodd: yes, somewhat inspired by PDL
at least wanting to get close enough that we could extend in the PDL direction 20:01
lizmat ok, so I will assume the test is wrong, correct the test, also correct in 6c-errata and mark as todo there
azawawi moritz: pasteboard.co/21nEyeof.png and pasteboard.co/21nHxTde.png (Firefox on win7 Pro 64-bit) 20:03
TimToady lunch &
gtodd TimToady: good plan :-) ... and if perl6 becomes the master orchestrator of other languages (via Nativecall etc) all those R libraries can join in harmonious cooptation 20:05
erm s/cooptation/cooperation/ 20:06
moritz azawawi: thanks, will take a look 20:10
dalek ast/6.c-errata: 43d3db6 | lizmat++ | S02-names-vars/signature.t:
:() sigs are more like block sigs than sub sigs

As discussed at irclog.perlgeek.de/perl6/2016-03-04#i_12139599
20:11
ast: 27010e5 | lizmat++ | S02-names-vars/signature.t:
:() sigs are more like block sigs than sub sigs

As discussed at irclog.perlgeek.de/perl6/2016-03-04#i_12139599
20:12
20:14 darutoko left 20:17 tharkun left, tharkun joined 20:19 kid51 joined 20:21 kid511 joined 20:24 kid51 left
dalek ast: 70ed68a | lizmat++ | packages/Test/Idempotence.pm:
Add some more diagnostics on failure
20:28
20:28 brrt joined 20:30 azawawi left 20:37 mykhailyk joined 20:39 domidumont left 20:44 Vitrifur left 20:45 vendethiel joined 20:47 cpage_ joined 20:53 bjz left 20:55 sufrostico left 21:01 domidumont joined 21:05 cpage_ left, cpage_ joined 21:07 bjz joined 21:12 musiKk_ joined 21:14 brrt left
dalek kudo/nom: eac1e26 | lizmat++ | src/core/Parameter.pm:
Make Parameter.perl's default more informative

  :($a = 2) became :($a = { ... }) instead before
21:15
21:16 sortiz joined 21:19 cdg joined
sortiz \o #Perl6 21:20
21:21 domidumont left
RabidGravy harr! 21:25
ggoebel17 .seen Tux 21:26
yoleaux I haven't seen Tux around.
moritz ggoebel17: he's called [Tux] here
RabidGravy okay on the third new todo stack of the day. I think stop writing software and make with the beer drinking
lizmat I think [Tux] is on holiday...
.seen [Tux]
yoleaux I saw [Tux] 26 Feb 2016 08:31Z in #perl6: <[Tux]> csv-parser 49.385
ggoebel17 .seen [Tux]
yoleaux I saw [Tux] 26 Feb 2016 08:31Z in #perl6: <[Tux]> csv-parser 49.385
RabidGravy but I did discover that libshout gets the mp3 from parsing totally wrong 21:27
frame
ggoebel17 okay... I've been looking for his regular test run ever since lizmat++ and jnthn++ have been landing all their performance improvements
lizmat pretty sure we'll see one on Monday or thereabouts again 21:28
I can run the test as well, but I get different numbers because of different OS / CPU's and so
21:29 Vitrifur joined, vendethiel left
sortiz Anyone know why in DBIish the 'legacy' $sth.fetchrow method, and relatives, returns all data as Str ? # Even p5 DBI returns numeric values as perl numbers 21:31
mykhailyk So, perl6 is more like Python ? 21:33
perlpilot mykhailyk: that's not a very good troll. You can do better :) 21:34
mykhailyk lol, i am not really trolling, but i believe it may sound like
Skarsnik sortiz, probably because mysql always give a char * 21:36
21:36 sevvie left, cpage_ left
perlpilot perl 6 is more like Perl 5 but with a type system, multiple dispatch, Moose, exceptions, grammars, etc built-in. 21:36
Skarsnik and perl5 has something else that scalar? 21:37
perlpilot And while I can see some minor similarities where Perl 6 and Python would intersect, I wouldn't say it's "like Python" very much :) 21:38
mykhailyk well, i was looking on some p6 code and my first impression was that 21:39
looks pretty similar
perlpilot Sure ... Perl6 can be written in many styles. If you want to forego sigils (for instance), that's possible.
21:45 vendethiel joined
sortiz Skarsnik, Can be. I'm asking 'cus I would like to change that, the actual distinction between .row and .fetchrow don't have any sense. 21:45
Skarsnik I wanted to remove all the fetch* but moritz wanted to keep them
You should look at the discusion in the PR 21:46
perlpilot Skarsnik: +1 to removing them IMHO
sortiz In that respect I agree with Moritz,that facilitates the migration from perl5. 21:47
s/Moritz/ moritz++ 21:48
Anyway, if preserved, fetch* now isn't compatible with anything. 21:54
21:55 skids left
mykhailyk why perl 5 and perl 6 are on different channels? 21:56
21:57 firstdayonthejob joined
mykhailyk i couldn't imagine python 3.x has #python3 channel and python 2.6 on #python2 21:57
21:57 Poroshenko joined
lizmat I guess Perl 5 and Perl 6 are further apart from each other than Python 2 and Python 3 21:58
rudi_s Hi. Can I make a data structure recursively read-only including objects?
perlpilot mykhailyk: pretty sure I mentioned why on #perl ... they are different languages. They share a common ancestry and "spirit", but they are evolving differently.
sortiz Skarsnik, perl5's scalar isn't a type, as a container is like Scalar, but its values are like our Cool, ie, is auto converted from string to number as needed.
mykhailyk hum... Python 2 and Python 3 have some significant differences either, they are on the same channel still 22:00
mst python 3 and 2 are incompatible versions of the same language
perl5 and perl6 are substantially different languages
perlpilot mykhailyk: except that Python 3 tried to remain mostly the same as Python 2 whereas Perl 6 purposefully radically changed from Perl 5. 22:01
mst it's not remotely the same
you're comparing apples to traffic wardens
#perl already explained this to him at length
I'm not sure why he's forcing you to have the same conversation again
mykhailyk sorry i've missed that
sortiz mykhailyk, Python 2 and Python 3 are versions the same language, Perl 5 and Perl 6 are different languages.
mst we said this on #perl :) 22:02
22:02 nowan_ left
mykhailyk okay, but what was the point of giving it the same name ? 22:03
sortiz 'cus "Perl" is more a culture? :-) 22:04
mst basically, an effort to produce an updated version of perl5 was started, called perl6, and then over time it became clear that if we were going to actually improve things a decent amount, the answer was to take the spirit of perl and then design from the ground up 22:05
perlpilot mykhailyk: If you held a page of Perl code at arms length, you would be hard pressed to tell if it was Perl 5 or Perl 6. It's still "Perl". Also ... because Larry said so. :-)
mst basically, it would originally have been more like python 3 - but as python 3 has demonstrated, it isn't actually enough better to make a lot of people upgrade, and has become a bit of a pain
perl6 OTOH went "stuff it" and made a new language in the perl family; the name speaks to its roots, it's now the sixth perl that Larry's invented 22:06
and that's ok :)
jnthn lizmat, TimToady: fwiw, I agree a sig literal wants to have Mu as its default arg type.
mykhailyk this is really confusing a bit 22:07
perlpilot mykhailyk: confusing how?
lizmat jnthn: cool, that means I don't need to revert spectest changes 22:08
mst mykhailyk: we've explained it. we've explained that the origins are basically historical. I'm not sure what else we can do for you.
22:08 atweiden left
ugexe if only more time had been spent bike shedding the name... 22:08
22:09 pdcawley left
mykhailyk i just can't recognize the logic in having a #perl channel for perl 5, and #perl6 channel for perl 6 on freenode 22:10
there wasn't channel for perl 4 right
mst perl5 and perl6 are different languages
they have separate communities with a little overlap
22:10 pdcawley joined
mst therefore they have their own channels 22:10
perlpilot mykhailyk: how about this analogy ... Perl and Ruby are both in the family of dynamic languages, yet we have #perl and #ruby. #perl and #perl6 make exactly the same amount of sense as that. 22:11
RabidGravy well perl4 and perl5 didn't overlap either
lizmat mykhailyk: not everything is entirely logic
22:11 FROGGS left
RabidGravy (though some people persisted in writing perl 4 code in perl 5 well into the 1990s) 22:11
22:12 nowan joined
mst basically, 98% of what's said here isn't of that much interest to the regulars in #perl, and 98% of what's said in #perl isn't of much interest to the regulars in here 22:12
perlpilot RabidGravy: 2000s even.
mst because they're two different languages
RabidGravy true
mst and this is OK
try and avoid imagining extra problems that don't exist - programming is hard enough when you only have to deal with the real ones.
mykhailyk ok i get it now
RabidGravy I just wrote a bit mask subroutine because I hate doing bit masks
dalek kudo/nom: 259624f | lizmat++ | src/core/Any.pm:
Make dd a little more lenient on bare type objects
lizmat RabidGravy: should that need to live in Buf ? 22:13
or Blob?
dalek kudo/nom: 360232a | lizmat++ | src/core/Code.pm:
Make Code.perl a bit more sensical

Was "Code.new" before.
22:16
RabidGravy I dunno really it's like "make a mask for n bits starting at m in a x size integer" and I guess that I make go extract that as an int
22:17 Poroshenko left
RabidGravy I do think that blob or buf or some module in the ecosystem could do with exposing the "make a long from these four bytes" that unpack does though 22:18
as I've just copied them for my code currenty
lucs m: my @a = <a b c>; class Foo { has 「?」 for @a; ⋯ } # How to build the class according to some list?
camelia rakudo-moar eac1e2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yeozqIoEn2␤Malformed has␤at /tmp/yeozqIoEn2:1␤------> 3my @a = <a b c>; class Foo { has7⏏5 「?」 for @a; ⋯ } # How to build the clas␤»
RabidGravy lots of "binary" file with bit fields in them
dalek ast: 4552522 | lizmat++ | integration/advent2009-day20.t:
Fix Parameter.perl test for defaults

Before eac1e26d6342d0d65 , it would always be { ... } even if there was no code as a default. The test assumed this.
22:19
RabidGravy lucs, something like: 22:21
m: my @a = <a b c>; class Foo {}; for @a -> $a { Foo.^add_attribute(Attribute.new(name => $a, type => Str, package => Foo))};
camelia ( no output )
lucs RabidGravy: Aha, thanks, lots of material I can look up in there. 22:22
RabidGravy you could probably do it in the BUILD or something of the class if you want to leave it later, and you'd have to fiddle with the attributes to get accessors and stuff 22:23
dalek ast/6.c-errata: a2ec5a2 | lizmat++ | integration/advent2009-day20.t:
Fix Parameter.perl test for defaults

Marked as todo, as this wouldn't be ok in 2015.12
lucs RabidGravy: Yep, gotcha. 22:25
22:26 Skarsnik left 22:27 vendethiel left
hoelzro you can't specify a literal value for a named argument to make a specific multi candidate, can you? 22:27
ex. proto factorial(:$n) { * }; multi factorial(:n(1)) { 1 }; multi factorial(:$n) { $n * factorial(:n($n - 1)) } 22:28
22:30 cpage_ joined 22:33 TEttinger joined
sortiz m: multi factorial(:$n where $n == 1 ) { 1 }; multi factorial(:$n) { $n * factorial(:n($n - 1)) }; say factorial :5n 22:34
camelia rakudo-moar 360232: OUTPUT«120␤»
sortiz hoelzro, ^^^
hoelzro I figured one could use where
thanks sortiz! 22:35
spider-mario how do I get :sigspace to apply to an interpolated variable?
e.g.:
p6: my $r = 'a b c'; 'a b c' ~~ /:s<$r>/
camelia rakudo-moar 360232: OUTPUT«Potential difficulties:␤ Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)␤ at /home/camelia/EVAL_0:1␤ ------> 3anon regex { a7⏏5 …»
22:40 idiosyncrat_ joined 22:41 jjido joined
sortiz m: my $r = 'a b c'; say 'a b c' ~~ /:s $r / 22:44
camelia rakudo-moar 360232: OUTPUT«「a b c」␤»
sortiz spider-mario, ^^^
spider-mario thanks, but what if $r uses regexp syntax? 22:45
p6: my $r = 'a .* c'; 'a b c' ~~ /:s $r/
camelia ( no output )
spider-mario p6: my $r = 'a .* c'; 'a b c' ~~ /:s<$r>/
camelia ( no output )
spider-mario (why does it say nothing about “potential difficulties” anymore?) 22:46
wait, it seems to work in a repl, now 22:47
what gives?
sortiz m: my $r = /a .* c/; 'a b c' ~~ / $r /
camelia ( no output )
sortiz m: my $r = /a .* c/; say 'a b c' ~~ / $r /
camelia rakudo-moar 360232: OUTPUT«「a b c」␤»
spider-mario p6: my $r = 'a .* c'; say 'a b c' ~~ /:s<$r>/
camelia rakudo-moar 360232: OUTPUT«「a b c」␤»
spider-mario okay, there’s something I don’t fully grasp here, I guess 22:48
why did it say that space was not significant, in the first example?
p6: my $r = 'a b c'; 'a b c' ~~ /:s<$r>/
camelia rakudo-moar 360232: OUTPUT«Potential difficulties:␤ Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)␤ at /home/camelia/EVAL_0:1␤ ------> 3anon regex { a7⏏5 …»
ugexe p6: my $r = 'a b c'; 'a b c' ~~ /:s<{say $r}>/ 22:51
camelia rakudo-moar 360232: OUTPUT«a b c␤a b c␤a b c␤a b c␤a b c␤a b c␤»
ugexe p6: my $r = 'a .* c'; say 'a b c' ~~ /:s<{say $r}>/
camelia rakudo-moar 360232: OUTPUT«a .* c␤a .* c␤a .* c␤a .* c␤a .* c␤a .* c␤Nil␤»
lizmat m: dd :($ where { ... }) eqv :($ where { ... }) # jnthn TimToady: I would posit that this is wrong: it should be False instead 22:52
camelia rakudo-moar 360232: OUTPUT«Bool::True␤»
lizmat as one cannot tell what's inside the code object
m: dd :($ where { 666 }) eqv :($ where { 42 }) # 22:53
camelia rakudo-moar 360232: OUTPUT«Bool::True␤»
lizmat ^^^ wrong :-)
m: dd :($ where * == 666) eqv :($ where * == 42}) #
camelia rakudo-moar 360232: OUTPUT«5===SORRY!5=== Error while compiling /tmp/g0dBLrnk7I␤Malformed parameter␤at /tmp/g0dBLrnk7I:1␤------> 3($ where * == 666) eqv :($ where * == 427⏏5}) #␤ expecting any of:␤ constraint␤»
lizmat m: dd :($ where * == 666) eqv :($ where * == 42) # 22:54
camelia rakudo-moar 360232: OUTPUT«Bool::True␤»
lizmat wrong ^^^
there are 4 tests in S06-signature/introspection.t that depend on this behaviour 22:55
m: dd :(42) eqv :(666) 22:56
camelia rakudo-moar 360232: OUTPUT«Bool::True␤»
23:00 lostinfog left
dalek kudo/nom: 8d0af58 | lizmat++ | src/core/Parameter.pm:
Make sure we emit :($ is raw).perl correctly
23:05
23:07 sufrostico joined 23:08 rindolf left
dalek kudo/nom: 94780d7 | lizmat++ | src/core/Parameter.pm:
Add Parameter:D eqv Parameter:D

For faster, non .perl based checking
23:12
kudo/nom: 2c552d9 | lizmat++ | src/core/Signature.pm:
Rewrite Signature:D eqv Signature:D

  - no longer uses Parameter.perl, but Parameter:D eqv Parameter:D
  - reduces set_multi_sig_comparator to a.signature eqv b.signature
  - makes Buf.^pun 300x faster
lizmat and on that note I wish #perl6 a good night! 23:14
23:14 lizmat left 23:18 _nadim joined
_nadim Good evening all! 23:18
so, what's a !UNIT_MARKER? 23:19
23:19 skids joined, sufrostico left 23:21 sufrostico joined 23:30 jjido left
RabidGravy anyway today I learned that it's better to trust a specification than some implementation thereof 23:31
(again)
23:37 Actualeyes left
RabidGravy the warriors is great movie but I can't be doing with a late night, so toodles peeps 23:41
skids o/ 23:47
23:48 firstdayonthejob left 23:50 RabidGravy left 23:52 tmch left, spider-mario left 23:53 SCHAAP137 left, pdcawley left 23:55 kaare__ left