»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
timotimo tries out the threading thingies :D 00:15
00:17 telex_ is now known as telex
diakopter . 00:32
\/\/\/\/\/\/\/\/\/
timotimo aaw, the thread pool is too small, sleep sort won't work :(
diakopter jnthn: 00:34
00:43 mtk left 00:47 mtk joined 00:53 hypolin joined 00:56 hypolin left, hypolin joined, hypolin left 01:07 Guest64136 left 01:08 bonsaikitten joined, bonsaikitten left, bonsaikitten joined 01:10 btyler joined 01:16 preflex left 01:18 preflex joined, ChanServ sets mode: +v preflex 01:26 konundra joined
JimmyZ \o/, sorear++, jnthn++ # for promise and the future 01:31
01:40 kingbeast left 01:42 konundra left 01:46 abnorman left 01:49 BenGoldberg left 01:53 BenGoldberg joined
[Coke] Fixed the fudging issue, i think. 01:59
dalek rl6-roast-data: 4406c92 | coke++ | bin/rakudo.sh:
use the right fudge parameter
02:24 fridim_ joined 02:34 baest_ joined 02:37 jlaire_ joined, pjcj_ joined, szbalint_ joined, Woodi_ joined, Hor|zon_ joined 02:38 Lorn joined 02:42 bruges joined, cognominal left 02:43 fridim_ left, pjcj left, ivan`` left, Lorn_ left, jlaire left, szbalint left 02:46 ivan`` joined 02:49 konundra joined 02:50 djanatyn joined, fridim_ joined 02:52 takesako______ joined
sorear good * #perl6 03:00
03:00 Ben_Goldberg joined
diakopter sorear: hi 03:01
03:01 BenGoldberg left
sorear hi diakopter 03:02
diakopter sorear: I started up all the things on feather3 in a screen session
03:02 BenGoldberg joined 03:05 Ben_Goldberg left 03:25 SmokeMac_ left 03:32 odoacre_ left 03:39 SamuraiJack_ joined 04:04 rom1504_ is now known as rom1504 04:17 jlaire_ is now known as jlaire 04:26 kaleem joined 04:39 kaleem left 04:40 fridim_ left 04:41 apejens_ is now known as apejens 04:55 BenGoldberg left 05:00 birdwindupbird joined
sorear diakopter: cool 05:14
thanks
05:22 abnorman joined 05:43 domidumont joined 06:01 domidumont left, domidumont joined 06:06 FROGGS joined, daxim joined
FROGGS o/ 06:07
sorear o/
06:16 dmol joined, btyler left
FROGGS jnthn++ # demo.pl 06:23
06:23 domidumont left 06:26 daniel-s joined
sorear jnthn++ # pretty use of interop 06:26
06:29 sjn_ is now known as sjn 06:30 _daniel-s__ left 06:36 daxim left 06:37 domidumont joined 06:38 daxim joined 06:42 kaleem joined 06:46 odoacre joined
tadzik where's demo.pl? :) 07:17
moritz tadzik: gist.github.com/jnthn/5971100 07:28
jnthn++ # threads!
07:31 crab2313 joined
tadzik aww, yiss :) 07:31
07:34 brrt joined 07:37 sqirrel joined
tadzik I love happy signatures. method run (Thread:D:) 07:37
(LoL:D)
std: sub foo(LoL:D) {} 07:38
camelia std 85cf51d: OUTPUT«ok 00:00 44m␤»
moritz
.oO( just for the lol:Ds )
tadzik timotimo: re sleep sort, you can declare your own $*SCHEDULER with a different max-threads, no 07:41
?
07:42 woolfy joined 07:47 SamuraiJack__ joined 07:51 SamuraiJack_ left, hoelzro_ is now known as hoelzro
dalek rlito: b1a510b | (Flavio S. Glock)++ | t5-bug/40-indirect-object.t:
Perlito5 - indirect-object tests
08:01
FROGGS ohh cool 08:12
08:28 kingbeast joined, abnorman left 08:46 kingbeast left 08:53 crab2313 left 09:11 berekuk joined 09:19 nyuszika7h_ is now known as nyuszika7h
jnthn morning, #perl6 09:31
Yes, you can just set $*SCHEDULER to something you prefer :)
wtf is sleepsort... :)
oh
lol!
tadzik :D 09:32
the only sort running in O(n)
09:33 dakkar joined
moritz wonders if the scheduler is actually linear 09:33
jnthn The "scheduler" is a blocking concurrent queue 09:34
The workers try to read the next thing, and block until something is there.
09:34 domidumont left 09:53 gdey joined
JimmyZ wants promise/deliver 09:56
jnthn JimmyZ: Definition of "deliver"? 10:01
jnthn wonders which existing language/library JimmyZ is thinking of...
JimmyZ jnthn: clojure language 10:02
dalek rlito: d0d393f | (Flavio S. Glock)++ | t5-bug/40-indirect-object.t:
Perlito5 - indirect-object tests
JimmyZ deliver is really useful :P
jnthn looks up which thing deliver is the clojure name for :) 10:03
JimmyZ and there is a 'future' too, FYI
jnthn JimmyZ: It looks like a way to create a promise that needs an argument, then supply that argument later on? 10:05
oh, no
Just a away to create one and then set its result
10:06 domidumont joined 10:07 colomon joined
jnthn Hm. Clojure's future seems rather closer to what async/Promise is doing. 10:07
The terminology is different in all the languages, it seems :P 10:10
10:14 mstefanko left 10:18 colomon left, colomon joined 10:20 mstefanko joined
colomon jnthn: gist.github.com/colomon/5974310 # or anyone else who might know how to make NQP work for me here. 10:23
10:23 fhelmberger joined
jnthn colomon: NQP and Rakudo have different types for things, so going by .WHAT will not work out so well 10:27
colomon: I think the best way is to have Rakudo configure sprintf with its types
colomon jnthn: … I sort of understand those words, but have absolutely no idea how to do that ... 10:29
jnthn Provide an nqp::sprintfconf(...) or something like this
That's set up in the same way sprintf is
10:30 domidumont left 10:31 domidumont joined
colomon a parallel sprintf command that somehow knows about rakudo, or a way of setting up normal nqp::sprintf to recognize rakudo (or whatever) types? 10:33
jnthn The latter is what I was thinking 10:36
thus the "conf"
colomon is there an example of something like that in there now that I could cargo cult? 10:37
because I have no idea how to make nqp call rakudo 10:38
jnthn You don't do that!
You expose an op that *Rakudo* uses to configure sprintf.
Perhaps in BOOTSTRAP, where it has Int etc. to hand.
colomon right, I understood that. 10:39
but you really need to be able to call .Int. too. 10:40
err, extra period there.
jnthn If you have an object passed in from Rakudo, it'll have a .Int method that you can call, though? 10:41
colomon rn: printf("%d", 34902940294502/3)
camelia niecza v24-86-g39ab531: OUTPUT«11634313431500»
..rakudo b19f72: OUTPUT«-752973364»
colomon … well, niecza does that right. :)
rn: say 34902940294502/3
camelia rakudo b19f72, niecza v24-86-g39ab531: OUTPUT«11634313431500.666667␤»
colomon …. err, sort of right
jnthn
.oO( not floorlessly... )
10:42
colomon rn: printf("%d", (34902940294502/3).num)
camelia rakudo b19f72: OUTPUT«No such method 'num' for invocant of type 'Rat'␤ in block at /tmp/vD819q29su:1␤␤»
..niecza v24-86-g39ab531: OUTPUT«Unhandled exception: Unable to resolve method num in type Rat␤ at /tmp/7xqo_QOykx line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4579 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4580 (module-CORE @ 576) ␤ at /home/p6…
colomon rn: printf("%d", (34902940294502/3).Num)
camelia niecza v24-86-g39ab531: OUTPUT«11634313431500»
..rakudo b19f72: OUTPUT«-752973364»
colomon well, right to a first approximation
anyway 10:43
I'm still pretty sure I can see the shape of how to handle it if you pass in an object 10:44
like
1) sprintf detects that it's a rakudo object
2) call the conf object's intify method on the object passed to sprintf 10:45
3) that method is required to return a NQP bigint 10:46
4) profit
but I don't know how to actually do #1 or #2. (I"m assuming I can easily figure out #3.)
colomon needs to get back to the cabin to start cooking AM noms
11:01 colomon left
JimmyZ jnthn: yes, I think jakudo/async is same as clojure/future, and jakudo/promise is a bit different from clojure/promise(I mean the sugar) 11:10
maybe I'm wrong :P
11:21 kaleem left 11:24 Stygia joined 11:25 ssutch left 11:28 konundra left 11:51 skids left 11:57 lizmat left 12:04 lizmat joined 12:08 domidumont left, domidumont1 joined 12:19 kaleem joined
dalek rlito: f04ddf9 | (Flavio S. Glock)++ | t5-bug/40-indirect-object.t:
Perlito5 - indirect-object tests; cleanup
12:26
12:27 SmokeMachine joined 12:31 cognominal joined 12:33 btyler joined 12:40 konundra joined 12:41 domidumont1 left 12:42 notjack joined 12:54 ajr joined, ajr is now known as Guest9011 12:55 Guest9011 is now known as ajr_
notjack what's the most up-to-date site for user reference materials? Like if I want to look up what functions are built in, log/max, etc 12:56
(the perl6 web cloud is a bit, er, nebulous)
timotimo perlcabal.org/syn/ - this is a good point, imo 12:58
doc.perl6.org/ - this is also okay
moritz doc.perl6.org is mostly up to date, but incomplete
doc.perl6.org is user centric, perlcabal.org/syn/ is meant as a reference to the compiler writers 12:59
notjack user-centric is what I'm looking for
thanks 13:00
moritz and of course you can always ask here 13:01
we try to make up for less-than-awesome documentation by being awesome in answering questsions here :-)
13:02 adu joined
notjack I'm just trying to get my head around the basics 13:03
particularly the cool new stuff
meta- and hyper-operators
I'm focused on those in particular because I'm coming from an array-programming world, and implicit looping will make the transition to p6 much more comfortable for me 13:04
so far, I can do a bunch of cool little things in isolating. Having some trouble gluing things together syntactically.
13:04 robinsmidsrod joined
timotimo you may very well find the advent calender interesting: perl6advent.wordpress.com 13:04
it has all kinds of cool things in it :) 13:05
notjack yes, thanks I have seen that, and it's useful!
here's an example of what I'd like to do.
13:05 pmurias joined
pmurias how do I add directories to nqp search path? 13:05
notjack Given a list of integers and a radix, find out the minimum number of digits in the radix R it would take to express the largest value in the list L 13:06
well, the largest absolute value
moritz r: say [max] (42, -18, 8)>>.abs>>.base(16)>>.chars 13:07
camelia rakudo b19f72: OUTPUT«2␤»
moritz or
notjack the algo is something like: increment (floor ( log(radix, max(1,max-of-list(absolute-value-of-each(list))))
ah, it's that .>> get gets me
that always gets me 13:08
moritz r: say [max] (42, -18, 8)>>.abs>>.log(16)>>.floor
camelia rakudo b19f72: OUTPUT«1␤»
moritz I guess it should really be ceiling, not floor
you can't expression 42 as a single-digit hex char
notjack no, you want the floor of the log
this is calculating the # chars using logarithms, not by actual formatting each number
1+log(16,[max] 1,[max] (43,56,78)>>.abs) 13:09
1+floor log(16,[max] 1,[max] (43,56,78)>>.abs) 13:10
13:10 stevan_ left
moritz ah, 1 + floor 13:10
timotimo >>.something is basically equivalent to .map(*.something); once you see that similarity it's easy to understand
13:10 ajr_ left
moritz but beware, >>.something descends into recursive structures in rakudo 13:11
(it's not supposed to, but it still follows an old specification)
timotimo right, that's a bit of a problematic discrepancy between the specs and implementation
notjack how do you declar a variable an array of Int - is it simply Int @array ?
moritz my Int @array; 13:12
notjack ok, let me go have a little chat with camelia
13:12 domidumont joined
notjack see if I can get past my own blinders 13:12
timotimo perl6/doc:lib/*.pod is all pod6?
pmurias --help in nqp does not include the options which are not in HLL::Compiler
13:12 ajr_ joined
moritz timotimo: yes 13:12
timotimo sweet. i'll look into a strangeness that happens at least in the classtut 13:13
notjack oh, one more
how can I make a sub with a parameter that is a strictly positive Int?
timotimo perhaps it's by spec, but the code example contains empty lines inside an indented block and those get cut into multiple pieces that are then all dedented
r: sub foo(Int $a where *>=0) { say "yay" }; foo(5); foo(-5); 13:14
camelia rakudo b19f72: OUTPUT«yay␤Constraint type check failed for parameter '$a'␤ in sub foo at /tmp/HGL1B1qCDb:1␤ in block at /tmp/HGL1B1qCDb:1␤␤»
moritz notjack: sub f(Int:D $x where $x > 0) { } 13:15
timotimo :D is a nice touch
notjack what's :D?
does it mean I can reference later in the declaration by name? 13:16
timotimo no, it means "the passed argument must be defined"
r: sub f(Int:D $x) { say "yup" }; my Int $a; f($a); 13:17
camelia rakudo b19f72: OUTPUT«Parameter '$x' requires an instance, but a type object was passed␤ in sub f at /tmp/9PHIMfVEzS:1␤ in block at /tmp/9PHIMfVEzS:1␤␤»
timotimo r: sub f(Int $x) { say "yup" }; my Int $a; f($a);
camelia rakudo b19f72: OUTPUT«yup␤»
timotimo ("instance" vs "type object" is our "defined" vs "undefined", basically)
notjack r: sub f(Int:D $x where $x>0) { say "woo";} sub g(Int $x where $x>=0) { say "yeah";} my $xx; f($xx); 13:18
camelia rakudo b19f72: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/B29ZYGjokM:1␤------> ub f(Int:D $x where $x>0) { say "woo";} ⏏sub g(Int $x where $x>=0) { say "yeah";}␤ expecting any of:␤ postfix␤ statement end␤ statement modifie…
notjack but if you hae the parameter constraint $x >= 0 anyway, doesn't that imply that $x must be defined?
r: say (undef) >= 0;
camelia rakudo b19f72: OUTPUT«===SORRY!===␤Unsupported use of undef as a value; in Perl 6 please use something more specific:␤ Any (the "whatever" type object),␤ an undefined type object such as Int,␤ :!defined as a matcher,␤ Any:U as a type constraint,␤ Nil as the
..absence of …
notjack r: my $x; say $x >= 0; 13:19
camelia rakudo b19f72: OUTPUT«use of uninitialized value of type Any in numeric context in block at /tmp/VOjFGcsHtf:1␤␤True␤»
13:19 adu left, sqirrel left
timotimo right, that only warns 13:19
JimmyZ r: sub f(Int $x where > 0) { say "yup" }; my Int $a; f($a);
camelia rakudo b19f72: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix > instead␤at /tmp/3RYfPz_B5T:1␤------> sub f(Int $x where >⏏ 0) { say "yup" }; my Int $a; f($a);␤»
timotimo you need a * or $x there 13:20
pmurias git branch fix-help;git checkout fix-help;vim ...;git commit -a;git push won't break master?
JimmyZ r: sub f(Int $x where $x > 0) { say "yup" }; my Int $a; f($a);
camelia rakudo b19f72: OUTPUT«Parameter '' requires an instance, but a type object was passed␤ in method Bridge at src/gen/CORE.setting:3562␤ in sub infix:<>> at src/gen/CORE.setting:3490␤ in sub infix:<>> at src/gen/CORE.setting:3340␤ in sub f at /tmp/RSujJD9_FI:1␤ in block at /tmp/RSujJ…
timotimo pmurias: if you git checkout -b fix-help, you don't need the extra git branch command
notjack r: sub f(Int:D @list, Int:D $x = 10 where $x >0) {say "So man rules! $x"}; f([1,2,3]); 13:21
camelia rakudo b19f72: OUTPUT«===SORRY!===␤Missing block␤at /tmp/fl6GsaQZNr:1␤------> sub f(Int:D @list, Int:D $x = 10 ⏏where $x >0) {say "So man rules! $x"}; f␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-infix␤»…
timotimo if you want to be extra-extra sure, you can git push origin fix-help, so that master will not be touched no matter your configuration
notjack r: sub f(Int:D @list, Int:D $x = 10 where $x >0) {say "So man rules! $x";} f([1,2,3]);
camelia rakudo b19f72: OUTPUT«===SORRY!===␤Missing block␤at /tmp/DUlcdBxB12:1␤------> sub f(Int:D @list, Int:D $x = 10 ⏏where $x >0) {say "So man rules! $x";} f␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-infix␤»…
13:22 bluescreen10 joined, btyler left
dalek p/fix-help: d5989ea | (Pawel Murias)++ | src/HLL/Compiler.nqp:
Fix --help in nqp.
13:23
pmurias This shouldn't break anything, put I don't want to break rakudo once again so I'm commiting in a branch 13:25
13:26 PacoAir joined 13:27 grondilu joined
grondilu phys.org/news/2013-07-ordinary-language.html 13:27
notjack how can I combine constraint type checks with default values in a function declaration?
grondilu mentioned Perl 6 here ^
notjack I can't get sub f(Int $x=10 where $x>0) {...} to work
timotimo you can do this: 13:28
notjack what I want to say is the default radix is 10 if you don't supply one, but if you do supply one, it must be strictly positive
13:28 skids joined
timotimo r: subset Radix of Int where * > 0; sub f(Radix $x=10) { say $x }; f(5); f(); f(0); 13:28
camelia rakudo b19f72: OUTPUT«5␤10␤Constraint type check failed for parameter '$x'␤ in sub f at /tmp/jR4ph2M2mI:1␤ in block at /tmp/jR4ph2M2mI:1␤␤»
pmurias jnthn: I pushed a fix for nqp -h in a branch 13:30
notjack hmm
I'd prefer not to have a proliferation of throw-away types wandering around 13:31
but I guess I can add "number of digits required" as a function on the type
which is kinda useful - flip the question around
timotimo what do you mean?
you can of course add a check inside the function itself, too 13:32
notjack you defined a new type, Radix, in order to enforce a constraint on a single parameter to a single function
of course
timotimo i'm pretty sure subset types are very cheap
13:32 ajr_ left
FROGGS r: sub f(Int $x where $x>0 = 10) {...} 13:32
camelia rakudo b19f72: ( no output )
notjack but it's nicer to have it in the type signature
FROGGS r: sub f(Int $x where $x>0 = 10) { say $x }; f(-1)
notjack it's not about expense, it's about hygenie
camelia rakudo b19f72: OUTPUT«Constraint type check failed for parameter '$x'␤ in sub f at /tmp/5yTE8VvBxK:1␤ in block at /tmp/5yTE8VvBxK:1␤␤»
13:32 kaare__ joined
timotimo oh, that's the answer? 13:32
FROGGS r: sub f(Int $x where $x>0 = 10) { say $x }; f(1) 13:33
camelia rakudo b19f72: OUTPUT«1␤»
FROGGS r: sub f(Int $x where $x>0 = 10) { say $x }; f()
camelia rakudo b19f72: OUTPUT«10␤»
FROGGS notjack: ^^
notjack ah, loverly
timotimo that was surprisingly easy >_>
notjack thank you!
FROGGS traits come first
masak is surprised that works without a block
FROGGS (like $x is copy = 24)
13:33 ajr_ joined
timotimo i would also have thought the = would be swallowed up by the constraint 13:34
notjack the REPL in rakudo* is surprisingly effective
FROGGS bu an assignment in a trait doesnt make much sense
timotimo i've seen much better repls tbh :(
masak std: my $a; $a > 0 = 10 13:37
camelia std 85cf51d: OUTPUT«ok 00:00 43m␤»
notjack I'm used to disdaining most REPLs 13:39
because the one I'm used to is awesome
but R*'s is reasonable
(which is why I'm surprised)
timotimo you should try using Rakudo::Debugger as a repl then; especially for regex and grammar matching ;) 13:40
notjack I'll give it a shot 13:41
Nominal type check failed for parameter '@vals'; expected Positional but got Arr
what does that mean?
13:41 btyler joined
timotimo can you paste some code? 13:41
moritz notjack: are you using typed arrays?
notjack sub f(Int @vals, Int:D $radix where $radix>0 = 10) { say "Radix: $radix"; }; f([1,2,3], 12); 13:42
yes, an array of Int
r: sub f(Int @vals, Int:D $radix where $radix>0 = 10) { say "Radix: $radix"; }; f([1,2,3], 12);
camelia rakudo b19f72: OUTPUT«Nominal type check failed for parameter '@vals'; expected Positional but got Array instead␤ in sub f at /tmp/Ypo4M24zzj:1␤ in block at /tmp/Ypo4M24zzj:1␤␤»
masak notjack: typed arrays have to be declared. 13:43
moritz notjack: you pass in Array, but your parameter is declared as Array[Int]
masak notjack: the array literal [1,2,3] can never be of type Array of Int.
moritz the error message isn't great, admittedly
masak it sucks. 13:44
I'm learning about something called intrinsic types right now. intrinsic types would let [1,2,3] be an Array of Int. but the whole field is still very young and unexplored.
notjack hmm 13:45
it would be inconvenient to force the users of my sub to use named arrays all the time
I'll just take the Int part off
timotimo huh, i think i made a regression for Pod::To::HTML that makes X formattingcodes no longer work properly?! 13:46
notjack unless there's some kind of magic where I can say @vals>>.>0 or something
timotimo investigates
notjack no, nevermind that
timotimo no, that would be .grep { $_ > 0 }
r: say (-5...5).grep * > 0
camelia rakudo b19f72: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix > instead␤at /tmp/IhmYbRLadx:1␤------> say (-5...5).grep * >⏏ 0␤»
timotimo r: say (-5...5).grep(* > 0)
camelia rakudo b19f72: OUTPUT«1 2 3 4 5␤»
notjack yeah, but it still wouldn't work if the array contained a string or something
[0,1,"three"] 13:47
timotimo oh, you meant to assert that?
notjack yeah
timotimo r: say all(-5...5) > 0
camelia rakudo b19f72: OUTPUT«all(False, False, False, False, False, False, True, True, True, True, True)␤»
notjack in the function signature
timotimo r: say so all(-5...5) > 0
camelia rakudo b19f72: OUTPUT«False␤»
notjack as in sub f(@vals where all (vals) isInteger) 13:48
timotimo r: sub f(@vals where { all(@_) > 0 }) { say "happy!" }; f((1, 2, 3)); f((0, 1, 2))
moritz notjack: another complication is that arrays can be infinite (and lazy), so you can't simply check all elements at function call time
camelia rakudo b19f72: OUTPUT«happy!␤happy!␤»
timotimo oops
r: sub f(@vals where { all(@vals) > 0 }) { say "happy!" }; f((1, 2, 3)); f((0, 1, 2))
camelia rakudo b19f72: OUTPUT«happy!␤Constraint type check failed for parameter '@vals'␤ in sub f at /tmp/hRUz5Itlvb:1␤ in block at /tmp/hRUz5Itlvb:1␤␤»
timotimo there you go
no need for the curlies any more, too
notjack so that I can have the effect of Int @vals without the declared-arrays-only drawback
moritz: ah, that makes sense
wait, then, if one of my parameters is a lazy list and I need to scan the whole list to return a value, when does my function return? 13:49
masak r: sub f(@vals where { all(@vals) ~~ Int }) { say "they're all Ints!" }; f [1, 2, 3, 4]
camelia rakudo b19f72: OUTPUT«Constraint type check failed for parameter '@vals'␤ in sub f at /tmp/C4EUJbZpDV:1␤ in block at /tmp/C4EUJbZpDV:1␤␤»
notjack say I just want the [max] of the list, that's what my function does. iif someone calls myFunc(lazyList), when does it actually return control to him?
masak hmm. 13:50
notjack: when the list runs out.
notjack: you can't know the max until the list runs out.
notjack dangerous.
masak life is dangerous.
programming is a subset of life. :)
(a strict subset, even) 13:51
notjack I'm expecting to come across "here there be dragons" in the documentation any moment
masak r: say [max] 1..*
camelia rakudo b19f72: OUTPUT«-Inf␤»
masak er.
moritz wtf.
masak submits rakudobug
FROGGS hehe
moritz r: say [max] 1..Inf
camelia rakudo b19f72: OUTPUT«-Inf␤»
notjack r: say [max] Inf, Inf;
camelia rakudo b19f72: OUTPUT«Inf␤»
masak .oO( so freakin' huge it's actually negative )
notjack r: say [max] Inf, -Inf; 13:52
camelia rakudo b19f72: OUTPUT«Inf␤»
masak r: say [max] 1, 5, 10, Inf 13:53
camelia rakudo b19f72: OUTPUT«Inf␤»
masak r: say [max] 42..^Inf
camelia rakudo b19f72: OUTPUT«-Inf␤»
masak r: say [max] (1..*).list
camelia rakudo b19f72: OUTPUT«-Inf␤»
FROGGS r: say 42 cmp Inf 13:54
camelia rakudo b19f72: OUTPUT«Increase␤»
timotimo aaw come on! there never was support for X<...> tags?
how did the classtut get rendered in the official version? :|
moritz with Pod::PseudoPod 13:55
timotimo is that a perl5 module?
notjack r:sub f(@vals where all(@vals) ~~ Int, Int:D $radix where $radix>0 = 10) { say "Radix: $radix"; }; f([1,2,3]);
FROGGS moritz / masak: should L75 and L84 be swapped? github.com/rakudo/rakudo/blob/nom/...Any.pm#L84 13:56
notjack r: sub f(@vals where all(@vals) ~~ Int, Int:D $radix where $radix>0 = 10) { say "Radix: $radix"; }; f([1,2,3]);
camelia rakudo b19f72: OUTPUT«Constraint type check failed for parameter '@vals'␤ in sub f at /tmp/Vy1LF8PUwK:1␤ in block at /tmp/Vy1LF8PUwK:1␤␤»
notjack why did the type check fail?
r: 1 ~~ Int
camelia rakudo b19f72: ( no output )
notjack r: say 1 ~~ Int
camelia rakudo b19f72: OUTPUT«True␤»
notjack r: say 2 ~~ Int
camelia rakudo b19f72: OUTPUT«True␤»
notjack r: say 3 ~~ Int
camelia rakudo b19f72: OUTPUT«True␤»
notjack r: say all([1,2,3) ~~ Int 13:57
camelia rakudo b19f72: OUTPUT«===SORRY!===␤Unable to parse expression in array composer; couldn't find final ']'␤at /tmp/ZbrF_Dok8D:1␤------> say all([1,2,3⏏) ~~ Int␤ expecting any of:␤ postfix␤ statement end␤ statement modifier␤ …
notjack r: say all([1,2,3]) ~~ Int
camelia rakudo b19f72: OUTPUT«False␤»
notjack WTF?
r: say any([1,2,3]) ~~ Int
camelia rakudo b19f72: OUTPUT«False␤»
timotimo i know why
masak r: say all(1, 2, 3) ~~ Int
timotimo r: say any(1, 2, 3) ~~ Junction
camelia rakudo b19f72: OUTPUT«False␤»
rakudo b19f72: OUTPUT«True␤»
timotimo the any thing smartmatches as a junction 13:58
it does not autothread
masak right.
r: say (1, 2, 3) >>~~>> Int
camelia rakudo b19f72: OUTPUT«True True True␤»
masak r: say all (1, 2, 3) >>~~>> Int
timotimo that's better
camelia rakudo b19f72: OUTPUT«all(True, True, True)␤»
masak r: say so all (1, 2, 3) >>~~>> Int
camelia rakudo b19f72: OUTPUT«True␤»
notjack "so"? 13:59
masak opposite of "not".
timotimo so, the synopsis on pod6 says that X<class> is supposed to be rendered as "class" and add an index entry; mind if i replace all the X<stuff> in the classtut with X<|stuff>, so that they get zero-width-rendered and implement that in Pod::To::HTML?
masak timotimo: sounds good. 14:00
timotimo (not only the classtut, though)
FROGGS notjack: it is the low precedence form of prefix ?, like 'not' is for !
timotimo is still a bit bitter about how hard it seems to make formattingcodes work in tables and code blocks
FROGGS r: say ?0
camelia rakudo b19f72: OUTPUT«False␤»
14:01 rindolf joined
notjack I just like that you got the right answer because of your "say so" 14:01
14:01 Stygia left
moritz faq.perl6.org/#so 14:01
timotimo heh :D
Error executing process: Cannot allocate memory - o_O 14:02
when trying to create the typegraph
moritz :/
timotimo well, it's not that important; i just want to fix the markup for now 14:03
masak hm... I'd like to extend that FAQ with a sentence saying that "so" is the opposite of "not". it's a nice donkey bridge which deserves to be in there. 14:04
masak finds the source 14:05
timotimo "is not!" - "is so!"
notjack where would I look in the docs to learn about function signature syntax/
moritz doc.perl6.org/type/Signature#Signature+Literals
notjack thanks!
timotimo hm, would a X<foo|bar> be properly rendered as foo<a name="bar">? 14:06
dalek q: d725657 | (Carl Mäsak)++ | answers.md:
[answers.md] 'so' is the opposite of 'not'
14:07
timotimo htmlify.pl goes up to 5gb ram usage here 14:08
that can't be right, can it?
masak timotimo: you still need to close <a name="..."> elements. 14:09
timotimo oh, of course, so <a name="..."/>
masak no no no
timotimo ...no?
masak it's likely HTML 4.01, not XHTML
timotimo that's fair
masak <a name="bar">foo</a>
timotimo actually:
<!doctype html>
masak then still not :)
timotimo that's for something very specific, isn't it? 14:10
masak hold on, I'll get you the appropriate SO answer :)
timotimo: it's for HTML5.
moritz <span id="bar>foo</span> ?
timotimo oke. and html5 doesn't have /> any more?
masak timotimo: read the topmost answer to stackoverflow.com/questions/3558119...d-in-html5
timotimo great, thanks! 14:11
masak tl;dr: <a name="bar" /> is syntactic HTML5, but the '/' *does not mean self-closing tag*.
it doesn't and it never did in any version of (non-X) HTML.
timotimo thanks for clearing that up! 14:12
i think i've been doing that wrong for some time now
masak no problem :)
timotimo meanwhile, the htmlify.pl process has reached 6.6gb of ram
masak is currently authoring a 3-day HTML5 course for $dayjob
timotimo i'm pretty sure it's keeping something around that it really shouldn't
moritz it never took 6gb on my machine 14:13
(since the machines I ran it on typically only had 4gb ram :-) 14:14
timotimo luckily, i also have 10gb of swap space available! 14:15
hm, well, definition registry seems to keep around a whole lot of pod ... 14:17
moritz but not *that* much 14:18
timotimo (7.4gb of ram used)
moritz are you using rakudo-jvm?
timotimo no, this is parrot
i'm not even sure i could run htmlify on rakudo-jvm
masak moritz: re 'span id', yes, that's how I'd do it, methinks.
timotimo masak: didn't realize you could use spans as link targets like that. cool.
masak moritz: somewhere along the way I got the impression that id attributes are preferred to 'a name' anchors.
14:19 Stygia joined
masak timotimo: with the exception of a very small set of elements (like <title>), *all* HTML elements accept an 'id' attribute. 14:19
timotimo they accept an id attribute of course, but i didn't realize all of them would work like link targets
i thought that was what <a id...> was for 14:20
er, actually i thought you used <a name=...> for that
masak you do.
I think <a name="..."></a> is the older mechanism and 'id' attributes the newer one.
they have slightly different semantics because the <a>...</a> wraps around something, whereas the 'id' sits directly on an element. 14:21
timotimo html changes so fast ...
masak yes, but this is an old change :)
timotimo yeah. i haven't been keeping up ;) 14:22
14:22 domidumont left
timotimo aaw, i wasn't there to see how much ram the process was taking up when it got to trying to create the graphviz file 14:22
masak oh, in HTML5 the <a name> construct is invalid. 14:23
I didn't know that.
14:23 domidumont joined
masak at least according to stackoverflow.com/questions/484719/...name-or-id -- but that comment is from 2009. 14:23
14:26 stevan_ joined
timotimo pod::to::html complains *very* often about being asked to dedent 8, but the shortest indent being 0 while creating the definition reference parts at the end; i wonder what that's all about 14:26
moritz interpolating a variable into a heredoc 14:27
timotimo is it something i should try to fix?
moritz yes 14:29
(it's a bit non-trivial) 14:30
timotimo mhm :|
first i'll make sure that output pod blocks are parsed preformatted..ly
14:31 stevan_ left
timotimo but that probably requires changes in rakudo itself 14:31
masak yes, that should be fixed. 14:32
there's an RT ticket about that.
rt.perl.org/rt3/Ticket/Display.html?id=117603 14:33
14:35 stevan_ joined
timotimo i'm not thoroughly sure how to understand that. is that only for interpolations that only have spaces to the left of them? if there's more spaces than the 'virtual left margin' will all the new lines of that interpolation be indented as well? 14:36
masak (I've always liked that discussion. it's such a clear example of tormenting the developer to benefit the end user.)
notjack multi ndr(@vals where so all(@vals) >>~~>> Int, Int:D $radix where $radix>0=10) {1+floor log((1 max [max] @vals>>.abs), $radix)}; multi ndr(Int:D $val, Int:D $radix where $radix>0=10) {ndr([$val], $radix)}; say ndr(257,16);
timotimo so if the line reads foo {bar} baz, surely there should be no denting of the in or out kind
if the line reads " {foo}" and foo evaluates to something with newlines in them, it should indent the following lines to match with the left curly? 14:37
notjack in the above, I would like to modify the scalar version of the multi such that if it's not supplied a $radix, it calls the one-parameter vetrsion of the array-flavored multi
masak timotimo: the termintor sets the indent level. everything's de-indented based on that. but it's *textual*, so the contents of interpolated variables shouldn't be de-indented.
timotimo: only the text in the source code should be de-indented; I guess that's the short answer.
notjack (i.e. let the "primary" flavor determine all defaults, rather than repeat them)
timotimo oh 14:38
masak notjack: you don't need the 'so' if you're in a where clause. the where clause is only interested in the boolean value anyway.
timotimo interesting. so basically "de-dent the code before any interpolation happens" should be the right way to do it, no?
masak timotimo: right.
timotimo why isn't that easy? :)
masak timotimo: which (as jnthn suggests) means you have to de-indent at the AST level.
which means*
er, no. un-fix that typo :)
notjack masak: I thought the "so" coalesced the [true,true,true] to true in this case 14:39
timotimo so, it would happen in an action method?
notjack: that's what "all" does
er, no
so all(true, true, true) will be turned into true
notjack got it
masak notjack: 'where' will collapse the junction for you; no need for 'so'
timotimo so [true, true, true, true] will *also* be turned into true, but that's because a list of things is true
r: say so [False, False, False] 14:40
camelia rakudo b19f72: OUTPUT«True␤»
masak notjack: your example is a bit too long for me to take it in easily. :/
notjack: maybe if you had a shorter toy example, I could be of assistance.
notjack sure 14:41
multi f(@arry, $x='default') {...}; multi f($scalar, $x='default') {f([$scalar],$x);} say f(12); 14:43
what I would like is to not repeat the $x='default' bit, while still allowing the scalar version of the multi to be called with the $x parameter
masak hm. 14:44
notjack I don't want to have ot keep the defaults of the two flavors in sync
if you see what I mean - I want the "primary" definition to control defaults
masak define a constant.
use it instead of the string 'default' in both places.
r: constant x_default = 'default'; say x_default
camelia rakudo b19f72: OUTPUT«default␤»
notjack Can I ask "hey, was $x actually passed in by the user this time, or defaulted?" 14:45
14:46 grondilu left
moritz no 14:46
PerlJam notjack: why?
timotimo what, there are no tests for heredocs? have i gone mad?
notjack because notationally, I'd like to have one primary method signature, and all other polymorphic variations just deal with deviations from that primary signature 14:47
moritz timotimo: S02-literals/quoting.t has some
timotimo notjack: in that case, you may want to create a proto that does its own dispatching
(dispatch with "nextsame" in that case)
notjack multi f(big fancy signature); multi f("hey, I'm the same as the fancy f, except my first param is a scalar, not an array")
timotimo why didn't my code search tool find the test? probably skips .t by default or something crazy like that? 14:48
notjack ctrl+f proto didn't find anything in doc.perl6.org
moritz timotimo: git grep ':to\b' # worked for me 14:49
timotimo i'm using ag, so i should probably stop doing that
PerlJam timotimo: You should be using ack :) 14:50
notjack wow, there's a lot of coolness in here too 14:51
including a literal 'cool'
found a reference to 'proto' under 'multiness'
14:53 cognominal left
timotimo mind if i rip out the heredoc tests from S02-literals/quoting.t and put them into S02-literals/heredocs.t and add a bunch of tests 14:53
?
14:53 cognominal joined
moritz please do 14:54
notjack ah, S06 14:55
masak interesting on the philosophy of 'for' loops: lwn.net/Articles/557073/
timotimo i'm getting two strange failures in S02-literals/quoting.t; is @two_lines, ("$hello\n", "world\n") turns out to "expect" 'howdy\n world\n"; does that " " before world come from the is function turning the list into a string separated by a space? 14:58
and if so, why do i get that failure, but it's not in roast-data?
moritz yes, is() compares by string 15:00
and is the test TODOed, maybe?
or TODO-fudged
timotimo oh!
yes, but it doesn't get fudged correctly. i must be missing the rakudo.parrot fudge operator fix 15:01
ah! i need to re-run Configure.pl to get that 15:02
[Coke] that was from a while ago, no? 15:04
(I just fixed my daily test runs, but those use test_summary, which is special.)
timotimo yes, it was
as said, configure.pl needs to be re-run to get the change into t/fudgeandrun 15:05
mathw_ masak: very interesting article 15:07
15:07 mathw_ is now known as mathw 15:09 broquain1 is now known as broquaint
timotimo if i interpolate "Hello\n World" into a heredoc, the four spaces before the World should be verbatim in the result, is that correct? 15:10
JimmyZ yes, I think 15:13
timotimo good
i see now why it's hairy :D 15:15
15:15 domidumont left
timotimo but i think i can make it work. i think i'll take a bit of relax-and-inspiration time on the balcony :3 15:15
masak timotimo++ 15:18
timotimo (the moment i wrote that, a big cloud moved in front of the sun :( ) 15:19
masak JimmyZ is correct. de-indent things from interpolated variables is exactly what a by-spec heredoc *shouldn't* do (and what Rakudo currently does).
mathw r: my $a = 3; if $a == 3|4 { say "wibble"; } 15:20
camelia rakudo b19f72: OUTPUT«wibble␤»
15:21 stevan__ joined, FROGGS left
timotimo should be a case of just splitting up the infix:<~> calls, checking which parts of them come after a newline and dedenting these constants by the $amount 15:21
cognominal can someone makes sense of the problem showed by that gist? gist.github.com/cognominal/5976412
"calling .parse in a TOP action causes problems" 15:22
15:24 stevan_ left 15:27 brrt left
cognominal will be back within 6 hours and reading the backlog about my gist. 15:31
masak cognominal: my guess: calling .parse in an action method resets $/
notjack I'm starting to wrap my head around proto, but I still can't see how to use it to abstract out repeated paramters
without actually declaring those parameters in each multi
15:32 stevan__ left, sjohnson1 is now known as sjohnson
cognominal masak: that would be why the indirect call does not cauuse problem 15:32
15:32 sjohnson left, sjohnson joined
cognominal I think that would explain also my other problems not shown in my gist. 15:33
thx masak
notjack ... but now I see that while I have to declare the params, I can keep the param _constraints_ just n the proto 15:34
which is nice
15:37 bluescreen10 left 15:39 bluescreen10 joined, kaleem left
cognominal masak: that does not seem to be the (only) problem. Wrapping the inner parse in a do {} to protect $/ does not help. 15:41
notjack ok, so if | means "flatten into an argument list", it can also flatten slurpy params
but positional params have to come before slurpy
so how can I define a signature that says "any positional parameters at all, followed by a positional parameter named $a, followed by any other parameters (named, optional, slurpy, whatever)" 15:42
?
basically I want to declare a proto that manages multis whos name is ndr and whose final positional parameter is $radix
cognominal afk&
masak why would a 'do {}' protect $/ ? 15:43
cognominal because it introduces a scope and a new $/ 15:44
15:45 Stygia left
masak today's autopun spotting: twitter.com/SnoozeInBrief/status/3...5279881216 15:45
[Coke] r: my $/ = "hi"; do { say $/};
camelia rakudo b19f72: OUTPUT«Potential difficulties:␤ Redeclaration of symbol $/␤ at /tmp/dTjbuNEwxx:1␤ ------> my $/ ⏏= "hi"; do { say $/};␤hi␤»
[Coke] r: $/ = "hi"; do { say $/};
camelia rakudo b19f72: OUTPUT«hi␤»
15:47 grondilu joined
masak r: $/ = "1"; do { $/ = "2" }; say $/ 15:47
camelia rakudo b19f72: OUTPUT«2␤»
grondilu r: $_ = "01"; tr/01/10/; .say 15:48
camelia rakudo b19f72: OUTPUT«===SORRY!===␤Bogus statement␤at /tmp/VWigbsdbc9:1␤------> $_ = "01"; tr/01/10/⏏; .say␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-infix␤ prefix or term␤ prefix or meta-prefix␤O…
grondilu n: $_ = "01"; tr/01/10/; .say
camelia niecza v24-86-g39ab531: OUTPUT«===SORRY!===␤␤Action method quote:tr not yet implemented at /tmp/v_ddSFZH3B line 1:␤------> $_ = "01"; tr/01/10/⏏; .say␤␤Unhandled exception: Unable to resolve method statement_level in type Any␤ at /home/p6eval/niecza…
timotimo enh, if infix:<~> were list precedence, the trim heredoc part would be so much simpler :| 15:49
grondilu n: $_ = "01"; .=trans(01 => '10'); .say
notjack I'm almost there
camelia niecza v24-86-g39ab531: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6; please use 0o1 if you mean that at /tmp/J5zc36ujUj line 1:␤------> $_ = "01"; .=trans(01⏏ => '10'); .say␤␤01␤»
grondilu rn: $_ = "01"; .=trans('01' => '10'); .say
camelia rakudo b19f72, niecza v24-86-g39ab531: OUTPUT«10␤»
timotimo wow, whoops. that shouldn't happen, right?
cognominal r: my $a = 1; do { my $a = 2 }; say $a; 15:50
camelia rakudo b19f72: OUTPUT«1␤»
notjack r: proto ndr(Any, Int:D $r where $r>0 = 10) {*}; multi ndr(@vals, $r){...}; multi($val,$r){ndr [$val],$r}; ndr(234,5); #works, and constraint on $r is carried through
camelia rakudo b19f72: OUTPUT«===SORRY!===␤Variable '$val' is not declared␤at /tmp/oXoySRBHpz:1␤------> }; multi ndr(@vals, $r){...}; multi($val⏏,$r){ndr [$val],$r}; ndr(234,5); #works␤ expecting any of:␤ postfix␤»
cognominal really afk now &
notjack now, how can I allow for any number of positional parameters preceding $r (such that $r is always the last positional paramters) 15:51
masak timotimo: S03 says infix:<~> is list associative. 15:52
X Concatenation ~
X list infix:<!>($a; $b; $c)
notjack does silence mean that "that's not possible"?
masak notjack: no, that's not how IRC works. :) 15:53
notjack I find it does, usually ;) 15:54
masak notjack: but yes, that's not possible.
variadic parameters must come after positional parameters.
(otherwise parameter matching would have to do backtracking)
notjack that makes sense - I guess what I'm looking for is a trick like | that just means "the positional parameters"
and a corresponding trick that means "just the variadic parameters" 15:55
15:55 FROGGS joined
notjack so I could do proto foo(<all positional parameters, Int $r, <all variadic parameters>( 15:55
essentially, enforce constraints at the end of the positional parameters
[Coke] why do you need a proto for this? 15:56
(multiple multis is insufficient?)
notjack someone suggested earlier that that's the best way to maintain parameter constraints for all multis in a single, central place 15:57
this is what I have now:
TimToady I believe a capture will distinguish @ elements from % elements
yoleaux 10 Jul 2013 18:18Z <diakopter> TimToady: Uni? plz?
timotimo masak: yes, it is list associative. but not in rakudo ;)
but my new plan will be invariant under wether infix:<~> is list or whatever associative
15:58 fhelmberger left
masak :) 15:58
15:59 benabik joined
notjack Here's where I am now, and what I'm trying to get to pastebin.com/A6T02qpb 15:59
diakopter notjack: I think a slurpy has to be the last thing only 16:01
notjack diakopter: that makes sense - I'm not worried about slurpies.
diakopter: what I want is a proto that will govern any multis which match the signature where Int $radix is the last _positional_ parameter 16:02
diakopter I know; I understod. :) a slurpy is what you'd have to use to get a variable number of args
TimToady well, protos usually are written in terms of captures, not slurpies 16:03
and I repeat: I believe a capture will distinguish @ elements from % elements
16:03 daxim left
diakopter how would that look? 16:03
TimToady so your proto could introspect the @ part 16:04
sub foo(|c) { say +@(c) }; foo <a b c>, :y, :z 16:05
nr: sub foo(|c) { say +@(c) }; foo <a b c>, :y, :z
camelia rakudo b19f72, niecza v24-86-g39ab531: OUTPUT«1␤»
TimToady hmm
nr: sub foo(|c) { say +@(c) }; foo 1,2,3, :y, :z 16:06
camelia rakudo b19f72, niecza v24-86-g39ab531: OUTPUT«3␤»
diakopter nr: sub foo(|c) { say +@(c) }; foo |<a b c>, :y, :z
camelia rakudo b19f72, niecza v24-86-g39ab531: OUTPUT«3␤»
TimToady nr: sub foo(|c) { say +%(c) }; foo 1,2,3, :y, :z 16:07
camelia rakudo b19f72, niecza v24-86-g39ab531: OUTPUT«2␤»
16:07 Stygia joined
notjack TimToady: the goal is to enforce certain constraints on a specific [set of trailing] positional parameters 16:07
so I can't use |, or at least I don't think I can
diakopter why does the Int need to be trailing 16:08
TimToady a proto can enforce anything it likes before dispatching to the multis
it doesn't all have to be in the signature
that's why we have a notation for "put the dispatcher here" 16:09
diakopter notjack: can you put the radix at the beginning? 16:10
TimToady nr: sub foo(|c where c[*-1] > 0) { say "here" }; foo 1,2,3, :y, :z
camelia niecza v24-86-g39ab531: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object␤ at Builtins.InvokeSub (Niecza.P6any obj, Niecza.Variable[] pos) [0x00000] in <filename unknown>:0 ␤ at Niecza.Kernel.ToComposable (Niecza.STable arg… 16:11
..rakudo b19f72: OUTPUT«here␤»
TimToady r: sub foo(|c where c[*-1] > 0) { say "here" }; foo 1,2,-3, :y, :z
camelia rakudo b19f72: OUTPUT«Constraint type check failed for parameter 'c'␤ in sub foo at /tmp/W1YzpTosRe:1␤ in block at /tmp/W1YzpTosRe:1␤␤»
notjack diakopter: the idea is that these are the optional parameters 16:13
diakopter: the "knobs" the caller doesn't have to worry about unless he wants to 16:14
diakopter: as opposed to the primary arguments, which should come first
moritz then it might be a good idea to make them named
then they stand out more from the normal arguments
notjack TimToady: that won't work, because might be length 1 16:15
diakopter moritz: I agree; named is better
moritz histogram(1, 2, 3, 4, 42, 2, 0.1) vs. histogram(1, 2, 3, 4, 42, 2, resolution => 0.1)
notjack hmm
it still leaves the same problem though 16:16
no?
diakopter you can provide a default value for nameds
notjack would you mind showing me?
pastebin.com/A6T02qpb 16:17
that's what I have now - how would you change it so the name param, and its constraints, are declared once in the proto
diakopter I don't understand the >0 constraint
notjack the radix must be positive
(for my purposes)
diakopter (what do you want it to do when the last thing is <=0)
notjack I want it to fail
or, not find a matching sub 16:18
(Today has been a great p6 clinic btw - thanks to everybody) 16:21
diakopter n: gist.github.com/diakopter/5976904 16:22
camelia niecza v24-86-g39ab531: OUTPUT«3␤»
TimToady r: proto foo(|c) { die "Radix must be positive" unless c[*-1] > 0; {*} }; multi foo(|c) { c.perl.say }; foo 1,2,3; foo 4
camelia rakudo b19f72: OUTPUT«Capture.new( list => (1, 2, 3).list, hash => EnumMap.new())␤Capture.new( list => (4,).list, hash => EnumMap.new())␤»
TimToady r: proto foo(|c) { die "Radix must be positive" unless c[*-1] > 0; {*} }; multi foo(|c) { c.perl.say }; foo 1,2,-3; foo 4
camelia rakudo b19f72: OUTPUT«Radix must be positive␤ in sub foo at /tmp/cTePnxHDpx:1␤ in block at /tmp/cTePnxHDpx:1␤␤»
diakopter hey yours is too similar to mine :P
16:22 grondilu left
TimToady that's what I was saying, you can write an entire program of validation inside the proto, then dispatch 16:23
you can be as specific as you like in the error messages
diakopter notjack: (see, you can pass a gist url to camelia)
notjack diakopter: thanks
re your gist, yes, I get that I can put conditionals int he bodies of functions 16:24
diakopter n: gist.github.com/diakopter/5976904/...d4926c3092
camelia niecza v24-86-g39ab531: OUTPUT«===SORRY!===␤␤Confused at /tmp/wj99mtRRET line 1:␤------> https⏏://gist.github.com/diakopter/5976904/e4b␤␤Undeclared routine:␤ 'https' used at line 1␤␤Parse failed␤␤»
notjack today, I'm exporing the new ideas in P6
particularly around validation and parameters
TimToady notjack: did you see what I did above in the proto?
notjack TimToady: similar comment 16:25
16:25 Stygia left
notjack TimToady: I want to have the notation declare my intent 16:25
TimToady where is simply a conditional, even if it looks declarational, so there's really no difference 16:26
notjack there is to the reader
(that's why you guys put it in1)
TimToady all it does is guarantee you get a worse error message :)
notjack s/1/!/ 16:27
TimToady: code like c[-1] is brittle and opaque
TimToady r: proto foo(|c where (c[*-1] > 0 || die "Radix must be positive")) {*}; multi foo(|c) { c.perl.say }; foo 1,2,-3; foo 4 16:28
camelia rakudo b19f72: OUTPUT«Radix must be positive␤ in sub foo at /tmp/nKW4TCEY2O:1␤ in block at /tmp/nKW4TCEY2O:1␤␤»
notjack TimToady: and hard to understand from the caller's perspective, if he can even see it
TimToady c[*-1] is how you write "the last element of c"
notjack Int $radix where $radix>0 = 10 says "the last parameter is a radix, it must be positive, it's optional, and if not supplied, defaults to 10" 16:29
TimToady how could it be simpler?
notjack TimToady: it's not "simpler" it's "clearer"
an radix-the-positive-integer-whose-default-is-10 16:30
TimToady I don't think backtracking in signatures is clearer
flussence rn: say (454/1000) ** -1
camelia rakudo b19f72: OUTPUT«Nominal type check failed for parameter 'nu'; expected Int but got Num instead␤ in sub DIVIDE_NUMBERS at src/gen/CORE.setting:8447␤ in sub infix:<**> at src/gen/CORE.setting:8588␤ in sub infix:<**> at src/gen/CORE.setting:3315␤ in block at /tmp/bnIcZcjX89:1␤␤»…
..niecza v24-86-g39ab531: OUTPUT«2.202643␤»
notjack let's say we can live with c[*-1]; how do you default it to 10? 16:31
(which, before you came in, was the motivation behidn using a proto)
16:31 vk joined
TimToady it would take backtracking in signature to allow that in a proto 16:32
*tures 16:33
notjack do protos dispatch based on parameter _name_ matches, or just types?
16:34 BooK joined
TimToady that would depend on whether you're doing named parameters or not 16:34
diakopter well, found a rakudo parser/grammar error
notjack sorry, I meant of positional parameters
TimToady it was once specced that we allow binding of named args to positional parameters, but the implementors rebelled :) 16:35
timotimo what's so bad about a named for the radix, though? maybe make it short, like :r(10)? 16:36
16:37 stevan_ joined
benabik Can't you specify more than one name, so you can have a short :r and long :radix? 16:37
notjack I don't mind using a named radix
what I want is to enforce the constraint centrally
diakopter benabik: ahahahaha parameter names as regexes! yes! :D
notjack so that the 10 (or moral equivalent) is only mewntioned once in the file
timotimo you can do the defaulting in the proto and pass it on as it is to the multis 16:38
16:38 rafl left, rafl joined
timotimo the multis don't have to have the default value in them because the proto will always turn it into a value, given or not 16:38
(that is my intuition)
notjack if I could change the $scalar version of $ndr to say "pass all my parameters to the @array version of ndr, except pass [$var] as the @var parameter of that version", I'd be all set 16:39
TimToady there's something smelly about treating the positionals as variadic and then adding in a radix at the same level
it's really bad api design
notjack timotimo: that's correct - that's what I'm doing now - but it also puts other, undersirable, constraints on the form of the multis
timotimo ah 16:40
if you have a proto, the form fo the multis is not important; you can do the dispatching yourself if you don't use {*}
notjack timotimo: in particular, given the grammer of function signatures, I can't have a proto that says "an unlimited number of positional paramters, followed by one named radix witha d efauilt value of 10"
timotimo: yes, but the idea here is to take advantage of the notation
timotimo mhm
benabik r: sub foo(:b(:$bar)) { say $bar }; foo b => 1 16:41
camelia rakudo b19f72: OUTPUT«1␤»
timotimo can't you destructuring-bind that? i forgot the syntax though because i hardly ever use it
16:41 grondilu joined
notjack I don't really know. This is the first time I've really spent any time with p6 16:41
16:41 konundra left
grondilu How do I test set inclusion? 16:41
16:42 mls_ is now known as mls
timotimo er, wait, why *can't* you have "an unlimited number of positionals followed by one named radix with a default of 10"? 16:42
notjack I'm trying to learn it (which is the real point of this whole exercise)
TimToady thinks the use case for a final weird positional argument is rather weak
notjack try it
TimToady: I'm happy to have it named, too
TimToady: I think foo(blah, blah, blah, radix=>16) is pretty cool
diakopter notjack: I'm confused.. when you're having it be a Positional, when would it ever be the default of 10? (how could it be optional)
TimToady named works fine, and doesn't violate the parallelism of the n-1 positional args
notjack TimToady: but again, I'd like both the constraints on that parameter, and its default, specifired once
timotimo r: proto sub frob(*@args, :$radix=10) { say "i have { +@args } args and here's my $radix" }; frob(1, 2, 3, :radix(99)); frob(1, 2) 16:43
camelia rakudo b19f72: OUTPUT«i have 3 args and here's my 99␤i have 2 args and here's my 10␤»
timotimo there you go
notjack diakopter: what it's the last, and omitted
diakopter but how do you know if it's omitted?
timotimo i think notjack is confusing named and positionals in some way, shape or form
notjack f(hi, stuff, there, 13) vs f(hi, stuff, there)
timotimo: entirely possible 16:44
diakopter notjack: but how can you tell that "there" isn't the radix?
timotimo indeed, that's the basic problem
notjack because I have multis that declare (Sr hi, Int stuff, Str there, Int radix)
timotimo ah, okay, that's different
notjack all my multis end in "Int radix)
timotimo in that case you may want something like:
diakopter in that case, "there" is a Str
so it can be differentiated 16:45
but if it's the same type, it can't
notjack diakopter: there are no multis missing radix
TimToady thinks about subset types with defaults... 16:47
timotimo r: proto sub do-it(*@foo) { my $radix = 10; if @foo[*-1] ~~ Int { $radix = foo.pop } nextwith(*@foo, :$radix) }; multi do-it(Str $a, Str $b, :$radix) { ... }; multi do-it(Str $a, :$radix) { ... };
camelia rakudo b19f72: OUTPUT«===SORRY!===␤Confused␤at /tmp/UsbcD2XGvy:1␤------> f @foo[*-1] ~~ Int { $radix = foo.pop } ⏏nextwith(*@foo, :$radix) }; multi do-it(␤ expecting any of:␤ method arguments␤ postfix␤ statement end␤ st…
timotimo r: proto sub do-it(*@foo) { my $radix = 10; if @foo[*-1] ~~ Int { $radix = foo.pop }; nextwith(*@foo, :$radix) }; multi do-it(Str $a, Str $b, :$radix) { say "two strigns" }; multi do-it(Str $a, :$radix) { say "one string" }; do-it("foo", "bar", 90); do-it("foo", "bar"); do-it("foo", 1000); 16:48
camelia rakudo b19f72: OUTPUT«===SORRY!===␤Unable to parse expression in argument list; couldn't find final ')'␤at /tmp/DaC9DtlOwk:1␤------> ~~ Int { $radix = foo.pop }; nextwith(*⏏@foo, :$radix) }; multi do-it(Str $a, St␤ expecting any of:␤ postf…
dalek q: 7bfcdb9 | (Konrad Borowski)++ | answers.md:
Close </span> tags
16:48 konundra joined
timotimo r: proto sub do-it(*@foo) { my $radix = 10; if @foo[*-1] ~~ Int { $radix = foo.pop }; nextwith(|@foo, :$radix) }; multi do-it(Str $a, Str $b, :$radix) { say "two strigns" }; multi do-it(Str $a, :$radix) { say "one string" }; do-it("foo", "bar", 90); do-it("foo", "bar"); do-it("foo", 1000); 16:48
moritz r: proto a(:$x = 42) { }; multi a(:$x) { $x }; say a(); # just checking
camelia rakudo b19f72: OUTPUT«===SORRY!===␤Undeclared routine:␤ foo used at line 1␤␤»
rakudo b19f72: OUTPUT«Nil␤»
timotimo r: proto sub do-it(*@foo) { my $radix = 10; if @foo[*-1] ~~ Int { $radix = @foo.pop }; nextwith(|@foo, :$radix) }; multi do-it(Str $a, Str $b, :$radix) { say "two strigns" }; multi do-it(Str $a, :$radix) { say "one string" }; do-it("foo", "bar", 90); do-it("foo", "bar"); do-it("foo", 1000); 16:49
camelia rakudo b19f72: OUTPUT«nextwith is not in the dynamic scope of a dispatcher␤ in block at src/gen/CORE.setting:543␤ in sub do-it at /tmp/qOz6_7ZZpY:1␤ in block at /tmp/qOz6_7ZZpY:1␤␤»
timotimo i suppose it should be callwith?
TimToady timotimo: you can't use nextwith to call into the multi dispatcher
timotimo r: proto sub do-it(*@foo) { my $radix = 10; if @foo[*-1] ~~ Int { $radix = @foo.pop }; callwith(|@foo, :$radix) }; multi do-it(Str $a, Str $b, :$radix) { say "two strigns" }; multi do-it(Str $a, :$radix) { say "one string" }; do-it("foo", "bar", 90); do-it("foo", "bar"); do-it("foo", 1000);
camelia rakudo b19f72: OUTPUT«callwith is not in the dynamic scope of a dispatcher␤ in block at src/gen/CORE.setting:537␤ in sub do-it at /tmp/jb1x6w6Xjg:1␤ in block at /tmp/jb1x6w6Xjg:1␤␤»
timotimo how do i do it?
TimToady nextwith/callwith only work *after* you already have a dispatcher
moritz r: constant RADIX = 10; multi ndr($v, :$radix = RADIX) { ... }; multi ndr(*@vals, :$radix = RADIX) { ... }
camelia rakudo b19f72: ( no output ) 16:50
timotimo that does make sense. how do i dispatchwith(...)? ;)
TimToady and {*} starts the dispatcher in question
grondilu n: say <foo>.set ⊂ <foo bar>.set
camelia niecza v24-86-g39ab531: OUTPUT«Unhandled exception: Unable to resolve method set in type Str␤ at /tmp/sEr0x8Z3wn line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4579 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4580 (module-CORE @ 576) ␤ at /home/p6…
grondilu n: say set(<foo>) ⊂ set(<foo bar>)
camelia niecza v24-86-g39ab531: OUTPUT«True␤»
grondilu r: say set(<foo>) ⊂ set(<foo bar>)
camelia rakudo b19f72: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/boTPchcqK1:1␤------> say set(<foo>) ⏏⊂ set(<foo bar>)␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-infix␤ statement end␤ statement modifi…
masak n: say <foo> ⊂ <foo bar>
camelia niecza v24-86-g39ab531: OUTPUT«True␤»
masak grondilu: why make things complicated? :) 16:51
grondilu ok, but how do I do that in rakudo?
TimToady grondilu: what masak++ is trying to say is that most Perl operators are coercive
masak n: say <foo> ⊂ <foo foo foo foo foo foo foo bar foo>
camelia niecza v24-86-g39ab531: OUTPUT«True␤»
masak n: say <foo foo foo foo foo foo foo> ⊂ <foo bar>
camelia niecza v24-86-g39ab531: OUTPUT«True␤»
masak r: say <foo foo foo foo foo foo foo> (<) <foo bar> 16:52
camelia rakudo b19f72: OUTPUT«True␤»
masak grondilu: like that.
grondilu masak++ thanks
TimToady rakudo is still a bit allergic to Unicode operators
grondilu deplores that (<) messes up Vim syntax higlighting 16:53
notjack Ok, I switched to a named param, it looks better
TimToady :D
notjack r: gist.github.com/anonymous/5977186
camelia rakudo b19f72: OUTPUT«3␤»
notjack is there a way to say, in a sub, "pass all my params to this other sub, but change this one first"? 16:54
16:54 ajr_ left
notjack the idea being that passing $radix should be implicit 16:54
timotimo you can, in addition to getting your arguments unpacked for you, get a regular capture object from your signature 16:55
i forgot the signature, though ...
er, syntax
16:55 ajr joined, abnorman joined, ajr is now known as Guest13391
TimToady you can't modify the capture in place, because it's immutable, but you can callwith or nextwith a new set of arguments constructed from the old ones 16:55
16:56 Guest13391 is now known as ajr_
notjack that'll work 16:56
16:56 benabik left
timotimo nqp: if "foo|bar" ~~ /'|'/ { nqp::say($/.prematch); } 16:56
camelia nqp: OUTPUT«Null PMC access in find_method('prematch')␤current instr.: '' pc 132 ((file unknown):160866105) (/tmp/GXt4dljnLm:1)␤»
notjack can I figure that from any docs except the (shiver) synopses?
timotimo the synopses aren't that bad ;)
[Coke] nqp-jvm: if "foo|bar" ~~ /'|'/ { nqp::say($/.prematch); }
camelia nqp-jvm: OUTPUT«Lexical '$/' not found␤ in <anon>␤ in <anon>␤ in eval␤ in evalfiles␤ in command_eval␤ in command_line␤ in MAIN␤ in <anon>␤ in <anon>»
notjack sure, if you've beeen working on them for a decade ;) 16:57
I'm used to being mollycoddled by Perl docs, and that's the way I like it
timotimo hasn't spent so much time in them yet
nqp: my $res := "foo|bar" ~~ /'|'/; nqp::say($res.prematch);
camelia nqp: OUTPUT«Method 'prematch' not found for invocant of class 'NQPMatch'␤current instr.: '' pc 139 ((file unknown):171413503) (/tmp/v2YET8tR70:1)␤»
timotimo mhm.
notjack p6 doesn't want to coddle any of my mollies
TimToady notjack: the synopses are greppable; what more could you want? ;) 16:58
grondilu how do I add an element to a set?
TimToady you don't
sets are immutable too
grondilu ok
TimToady you make new set using, say union 16:59
grondilu k
TimToady or if you want a mutable "set", you use KeySet instead
grondilu union is (+)?
TimToady prolly
grondilu r: say <foo> (+) <bar> 17:00
camelia rakudo b19f72: OUTPUT«bag("foo" => 1, "bar" => 1)␤»
diakopter notjack: I got it
rn: sub ndr(*@vals, Int :$radix is copy where (($radix//=10) > 0)) { 1+floor log (1 max [max] @vals>>.abs), $radix }; say ndr(40,50,60); say ndr(40,50,60,:radix(5)); say ndr(40,50,60, :radix(-1))
camelia niecza v24-86-g39ab531: OUTPUT«2␤3␤Unhandled exception: Constraint type check failed for parameter '$radix' in 'ndr'␤ at /tmp/xtpHLjH_8o line 0 (ndr @ 1) ␤ at /tmp/xtpHLjH_8o line 1 (mainline @ 10) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4579 (ANON @ 3) ␤ at /home/p6eval/niec…
..rakudo b19f72: OUTPUT«2␤3␤Constraint type check failed for parameter '$radix'␤ in sub ndr at /tmp/9Jz7SIBqJO:1␤ in block at /tmp/9Jz7SIBqJO:1␤␤»
grondilu n: say <foo> (+) <bar>
camelia niecza v24-86-g39ab531: OUTPUT«bag("foo" => 1, "bar" => 1)␤»
TimToady hah, it gave you a bag instead of a set
grondilu n: say <foo> (u) <bar>
camelia niecza v24-86-g39ab531: OUTPUT«===SORRY!===␤␤Two terms in a row at /tmp/SkWO0Kf8WM line 1:␤------> say <foo> ⏏(u) <bar>␤␤Parse failed␤␤»
grondilu n: say set(<foo>) (+) set(<bar>)
camelia niecza v24-86-g39ab531: OUTPUT«bag("foo" => 1, "bar" => 1)␤» 17:01
grondilu :/
TimToady n: say 'foo' ∪ 'bar'
camelia niecza v24-86-g39ab531: OUTPUT«set(foo, bar)␤»
TimToady hmm
defaulting to bags loses less info, but seems a bit odd in the expectations department 17:02
grondilu n: say set set(<foo>), set(<bar>)
camelia niecza v24-86-g39ab531: OUTPUT«set(foo, bar)␤»
grondilu that will do
TimToady n: say 'foo'.Set ∪ 'bar'
camelia niecza v24-86-g39ab531: OUTPUT«set(foo, bar)␤»
TimToady n: say 'foo'.Set ∪ 'bar'.Set
camelia niecza v24-86-g39ab531: OUTPUT«set(foo, bar)␤»
TimToady why did yours make a bag instead? 17:03
grondilu I don't know
TimToady n: say set('foo') ∪ set('bar')
camelia niecza v24-86-g39ab531: OUTPUT«set(foo, bar)␤»
17:03 birdwindupbird left
notjack diakopter: ah! //= is ||= 17:03
TimToady n: say set(<foo>) ∪ set(<bar>)
camelia niecza v24-86-g39ab531: OUTPUT«set(foo, bar)␤»
notjack or, I mean, does the assign-unless-default thing 17:04
grondilu TimToady: try (+)
notjack clever
TimToady n: say set(<foo>) (+) set(<bar>)
camelia niecza v24-86-g39ab531: OUTPUT«bag("foo" => 1, "bar" => 1)␤»
TimToady that seems like a bug, one way or another
notjack diakopter: thanks!
grondilu indeed
TimToady a bagbug
notjack sub ndr(*@vals, Int :$radix is copy where (($radix//=10) > 0)) { 1+floor log (1 max [max] 17:05
TimToady now you just need masak++ to extend macros to more than just terms, and you can define a radix-param macro :) 17:06
17:07 dakkar left
timotimo what happened to Int :$radix where $radix > 0 = 10? 17:09
17:09 abnorman left
timotimo hum. indent isn't part of nqp? this is tricky! :| 17:10
masak TimToady: jnthn and I plan to corner you about slangs on this YAPC::EU :) 17:12
TimToady: but if we finish discussing slangs, maybe we can talk some about macros...
I could even do some combination of mulling and spec-writing before that.
mst wtf is a slang when it's at home? 17:14
grondilu r: LOOP: loop { leave LOOP }
camelia rakudo b19f72: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/TertsiYfGX:1␤------> LOOP⏏: loop { leave LOOP }␤ expecting any of:␤ argument list␤ postfix␤ infix stopper␤ infix or meta-infix␤ statement end␤ …
FROGGS labels NYI
grondilu ok 17:15
TimToady and that's not the syntax for leave anyway; did you mean 'last'?
n: LOOP: loop { LOOP.leave(1,2,3) } 17:16
camelia niecza v24-86-g39ab531: OUTPUT«Unhandled exception: Unable to resolve method leave in type Label␤ at /tmp/AAquQPFdos line 1 (ANON @ 2) ␤ at /tmp/AAquQPFdos line 1 (mainline @ 6) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4579 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting …
17:18 ajr_ left
FROGGS <TimToady> and that's not the syntax for leave anyway; did you mean 'last'? <--- I'm missing the "in file <unknown> at line 1" :o) 17:18
TimToady n: loop { &?BLOCK.leave(1,2,3) }
camelia niecza v24-86-g39ab531: OUTPUT«Unhandled exception: Unable to resolve method leave in type Block␤ at /tmp/NJPMwf7abg line 1 (ANON @ 2) ␤ at /tmp/NJPMwf7abg line 1 (mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4579 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting …
TimToady n: loop { leave(1,2,3) }
camelia niecza v24-86-g39ab531: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'leave' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 36) ␤ at /ho…
TimToady ah well
grondilu TimToady: oh yes I meant "last" 17:23
17:28 SamuraiJack__ left
timotimo can i expect a callmethod 'indent' on a Str to be compile-time evaluated? or should i take care of that myself? 17:35
17:35 stevan_ left 17:39 benabik joined
masak PerlJam: my "Fluid Concepts and Creative Analogies" just arrived. \o/ 17:42
diakopter mst: I don't get it. :)
masak: ready for that rakudobug? 17:43
masak diakopter: sure.
diakopter rn: gist.github.com/diakopter/5976904 17:45
camelia niecza v24-86-g39ab531: OUTPUT«2␤»
..rakudo b19f72: OUTPUT«===SORRY!===␤Missing block␤at /tmp/ARXDut2Otq:1␤------> :$radix is copy where ($radix||=10) > 0 ⏏&& True) {␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-infix␤ constraint␤»…
masak looks
diakopter (add parens around the where clause and it parses)
er, the || there should be // 17:46
masak I think 'is copy where' might be in RT already. hold on.
17:46 spider-mario joined
diakopter is copy where is fine 17:46
there's no bug there
adding the is copy enables the //= in both niecza and rakudo, whereas it fails without it 17:47
masak std: sub foo($x where ($x||=10) && True) {}
camelia std 85cf51d: OUTPUT«ok 00:00 48m␤»
masak I'm surprised that parses, but OK.
masak submits rakudobug
diakopter why? it's just a cond_statement (to me)
masak r: sub ndr(*@vals, Int :$radix is copy where ($radix||=10) > 0 && True) {}
camelia rakudo b19f72: OUTPUT«===SORRY!===␤Missing block␤at /tmp/pxpVcFpF1n:1␤------> :$radix is copy where ($radix||=10) > 0 ⏏&& True) {}␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-infix␤ constraint␤»… 17:48
masak r: sub ndr($r where ($r ||= 10) > 0 && 1) {}
camelia rakudo b19f72: OUTPUT«===SORRY!===␤Missing block␤at /tmp/koM7f5ANdz:1␤------> sub ndr($r where ($r ||= 10) > 0 ⏏&& 1) {}␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-infix␤ constraint␤»
diakopter hm, it wants an infix constraint 17:54
17:55 Rotwang joined 17:58 xilo joined
timotimo now has *some* code to do with heredoc trimming 17:59
only time and tests will tell if it's actually sensible at all
flussence so, I "golfed" this line from earlier as best as I can... 18:01
r: say (2/1)**-1
camelia rakudo b19f72: OUTPUT«Nominal type check failed for parameter 'nu'; expected Int but got Num instead␤ in sub DIVIDE_NUMBERS at src/gen/CORE.setting:8447␤ in sub infix:<**> at src/gen/CORE.setting:8588␤ in sub infix:<**> at src/gen/CORE.setting:3315␤ in block at /tmp/GC2BUf8rjJ:1␤␤»…
flussence fun, eh?
I've no idea what's wrong, but it seems to work fine in nqp. 18:02
18:06 benabik left 18:07 vk left
timotimo oh, fun! it seems to work! 18:09
that's unexpected
18:09 ajr joined
timotimo er, oops, not actually true :| 18:09
18:10 ajr is now known as Guest21134, Guest21134 is now known as ajr_ 18:15 SamuraiJack__ joined, ssutch joined 18:21 itz joined 18:22 itz_ left 18:24 SamuraiJack__ left, raiph joined 18:25 SamuraiJack__ joined
timotimo heck yeah, my first working version! :) 18:26
it generates many separate method calls to .indent at the moment, but at least the result is correct, as far as i can see! :)
FROGGS cool 18:27
timotimo++
18:28 perigrin_ is now known as perigrin
timotimo does it seem benign to implement a "dedent" sub just for trim_heredoc? 18:29
18:29 abnorman joined
masak many separate method calls to .indent is a necessity, if I understand the AST fragments thing correctly. 18:32
timotimo well, all of those fragments are actually constant
jnthn Yeah, it probably wants something along those lines.
masak timotimo: right.
timotimo i'd like to not have many methcall ops in there
jnthn There's a postprocess thing somewhere...
timotimo rather, i'd like to do it at compiletime
masak timotimo: you do know that .indent(*) does de-indenting exactly like you need, right?
timotimo ... i can just do that on an nqp string?
nqp: say(" foo bar".indent(-1)) 18:33
camelia nqp: OUTPUT«Method 'indent' not found for invocant of class 'String'␤current instr.: '' pc 50 ((file unknown):166563612) (/tmp/GK05xJvwwK:1)␤»
timotimo well, not quite :)
masak hm, probably not in nqp, no.
jnthn I think we set it up to call the perl 6 one today
timotimo what, today? 18:34
masak but not at compile time, surely.
since the interpolation must happen at runtime in the general case.
timotimo yes, but no actual interpolation results have to have .indent called on them
jnthn Not sure if it does compile time today when the whole thing is literal. Thing it may.
timotimo it does call .indent on $docast.compile_time_value 18:35
but i don't know how to make it work with my boxed string
can i just (nqp::box_s(" foo bar baz", $*W.find_symbol(["Str"]))).indent(-2)?
jnthn Yes.
timotimo surely there must be some trap based on serialisation contexts and such? 18:36
jnthn You need to add the result a a sring constant
*as a
timotimo that's all? spiffy!
18:36 lizmat left
masak architecture++ 18:37
timotimo do i need to pass a String or a Str to $*W.add_string_constant?
jnthn String, I think
timotimo OK
so my call to the indent will be an boxing, a method call and then an unboxing and then adding the string constant?
timotimo runs tests 18:38
jnthn yeah, think that'll work 18:39
timotimo hm, can i ~~ /.../ on a Str or do i have to unbox? 18:41
jnthn May work out anyway
timotimo neato
jnthn The semantics of how it works out are a bit differnet on Parrot and JVM.
timotimo that's unfortunate. i'll test on both platforms just in case. 18:42
jnthn Well, I'm saying it should work on both, just that there are subtleties
But yeha, it is worth trying both
timotimo looks very good so far :)
18:52 lizmat joined 18:53 woolfy1 joined, woolfy left
[Coke] returns from a verrry late lunch. 18:53
timotimo i'll run a spectest just in case ...
18:55 woolfy1 left
timotimo github.com/rakudo/rakudo/pull/176/files - would appreciate a review. running spectests very soon 18:57
18:59 raiph left
notjack what's the equivalent of use strict; use warnings; ? 19:01
[Coke] the default
(you're already running with that, and can't (yet) disable it)
19:03 lizmat_ joined
notjack hmm. 19:03
then any idea why the REPL doesn't know what I'm talking about when I say my Int $i; ?
19:03 raiph joined
FROGGS notjack: example? 19:03
notjack literally it barfs on that statement. 19:04
19:04 lizmat left
TimToady did you already declare $i earlier? 19:04
notjack I'm going to restart the REPL, I may have messed something up.
[Coke] we'd need to see a screen grab.
WFM here with a rakudo built today.
rakudo.parrot, that is. 19:05
notjack it says "unknown type Str, did you mean str?"
or Int when I try Int
19:05 SamuraiJack__ left
notjack hmm, restarting fixed it 19:05
nm
19:08 lizmat_ left
grondilu solved an other problem on Rosalind.info, but once again it was with Perl 5, as Perl 6 was way too slow. Mostly due to slow set operations, I guess. 19:08
grondilu is very much looking forward to a very fast implementation of Perl 6 (maybe with MoarVM??) 19:10
19:11 lizmat joined
notjack s/very fast// 19:14
jnthn does a bit more work on the promises impl :) 19:15
grondilu here is the (slow) code in case you're curious: gist.github.com/grondilu/5978369 19:16
in P5 it was a few seconds (with full data I mean), and in P6 it was over 5 minutes :/
19:17 stevan_ joined
timotimo « » works properly in p6 now? 19:17
i saw some tests that were marked TODO about that 19:18
masak please be more specific.
oh, the quoting construct?
jnthn yeha, that's worked since Nov or so
grondilu r: say join ":", for «'foo bar' 42»
timotimo oke
camelia rakudo b19f72: OUTPUT«===SORRY!===␤Undeclared routine:␤ for used at line 1␤␤»
19:18 ssutch_ joined
grondilu r: say join ":", «'foo bar' 42» 19:18
camelia rakudo b19f72: OUTPUT«foo bar:42␤»
timotimo wow, that my @split = map { ... } should be more readable as a feed, methinks
masak r: my $foo = "b c"; .say for <<a $foo d>>; 19:19
camelia rakudo b19f72: OUTPUT«a␤b␤c␤d␤»
masak \o/
19:19 lizmat left
raiph .tell mst perlcabal.org/syn/S02.html#Slangs 19:20
yoleaux 8 Jul 2013 11:30Z <daxim> raiph: I have no context
raiph: I'll pass your message to mst.
8 Jul 2013 12:52Z <daxim> raiph: promoted to cult leader, eh?
19:20 lestaway joined
timotimo what kind of error should be thrown when a heredoc has incorrect dedentation? 19:20
19:20 x1 joined
timotimo (now that i can reliably figure that out at compile time) 19:21
masak define "incorrect".
timotimo END is more to the right than text inside the heredoc
masak what you just said :)
that would be an excellent message, IMO.
[Coke] timotimo: wouldn't you just try to read the rest of the file?
masak or warning, whatever.
19:21 rom1504_ joined 19:22 sunnavy_ joined
masak read that as "what would you like to read for the rest of your life?" :P 19:22
timotimo i still get the "asked to remove * spaces, but the shortest indent is * spaces" from the .indent call; i don't really know how to turn that warning into a prettier warning, though :(
19:22 nebuchad` joined
masak timotimo: CATCH it and re-throw? 19:22
timotimo or even how to find out if the warning has happened at all
19:22 sftp joined 19:23 scottp_ joined
timotimo i can catch a warning like that? that's useful 19:23
masak r: sub foo { warn "ouch!" }; foo; CATCH { say "warning caught" }
camelia rakudo b19f72: OUTPUT«ouch! in sub foo at /tmp/rrfRMMEdUB:1␤␤»
PerlJam timotimo: maybe you should try the debugger?
masak hm..
timotimo PerlJam: this is at compile time :)
jnthn CONTROL, not CATCH
timotimo and in nqp
PerlJam oh
wait ... nqp has heredocs? 19:24
timotimo no, but the perl6 heredocs are implemented in nqp )
;)
pmurias jnthn: have you seen the fix-help branch? 19:25
19:25 cooper_ joined
timotimo r: sub test { warn "oh no" }; test; CONTROL { say "warning caught!" }; 19:26
camelia rakudo b19f72: OUTPUT«oh no in sub test at /tmp/NxYvxXVeqc:1␤␤»
timotimo r: sub test { warn "oh no" }; try { test; CONTROL { say "warning caught!" }; }
camelia rakudo b19f72: OUTPUT«warning caught!␤oh no in sub test at /tmp/uKSCPhcQBv:1␤␤»
timotimo r: sub test { warn "oh no" }; try { test; CONTROL { default { say "warning caught!" } }; }
camelia rakudo b19f72: OUTPUT«warning caught!␤»
timotimo lovely
r: sub test { warn "asked to remove a crapton of spaces" }; try { test; CONTROL { when /asked to remove/ { say "warning caught!" } }; } 19:28
camelia rakudo b19f72: OUTPUT«asked to remove a crapton of spaces in sub test at /tmp/gfknc9QzGX:1␤␤»
timotimo r: sub test { warn "asked to remove a crapton of spaces" }; try { test; CONTROL { when /asked\ to\ remove/ { say "warning caught!" } }; }
camelia rakudo b19f72: OUTPUT«warning caught!␤»
timotimo r: sub test { warn "asked to remove a crapton of spaces" }; try { test; CONTROL { when /:s asked to remove/ { say "warning caught!" } }; }
camelia rakudo b19f72: OUTPUT«warning caught!␤»
timotimo great
19:29 GlitchMr- joined
raiph notjack: did u mean looking forward to p6.0.0, or to a p6 with less bugs, or a rakudo/mvm with decent spectest coverage, or...? 19:29
19:30 ssutch left 19:31 rom1504 left, nebuchadnezzar left, ruoso left, cooper left, lestaway is now known as lestrrat, nebuchad` is now known as nebuchadnezzar
GlitchMr- * GlitchMr opuścił/a czat (*.net *.split) 19:31
Sounds fun
dalek kudo-js: 209da3b | (Pawel Murias)++ | runtime/reprs.js:
Deserialize repr info for a flattened stable correctly.
kudo-js: 3e37b16 | (Pawel Murias)++ | / (6 files):
Compile a subset of QAST::Node. Add a test for creating a simple QAST::Node
[Coke] getting a HUGE number of failures in the rakudo.jvm run today.
... looks like every file is aborting. bah.
19:31 GlitchMr- is now known as GlitchMr
FROGGS O.o 19:32
pmurias made his commit to nqp in branch, so it's not his fault this time ;)
s/branch/a branch/
19:35 lizmat joined 19:36 ruoso joined 19:37 vk joined
dalek ecs: b669c81 | (Elizabeth Mattijsen)++ | S99-glossary.pod:
Add REPL
19:42
19:44 PacoAir left, imarcusthis- left, snarkyboojum left 20:02 ilogger2 joined, ChanServ sets mode: +v ilogger2
FROGGS ggoebel: I've got a dell with a 90W accu and a 32W accu installed, I can use all cores for hours and hours and hours :o) 20:03
[Coke] at some point, the eval server is dieing.
20:03 rindolf joined
[Coke] well, this sucks. 20:04
FROGGS :/
timotimo shucks :( 20:05
[Coke] I'll see if I can get the daily run cobbled together this evening.
jnthn ggoebel: This one sure hasn't, but it's a 2-3 year old one.
timotimo X<...|...,...> now work in Pod::To::HTML :) 20:07
FSVO "work" ... the class collate the crosslinks, generates <span name="...">...</span> for them, but then does nothing further with it 20:08
FROGGS \o/ yay, we can haz cryptic stuff \o/
ahh, it is about links
err, spans
timotimo crossreference
FROGGS yeah
timotimo most importantly, in the classtut, it won't show up as X<some text!> any more
(but also because i changed these to all read X<|something> rather than X<something> 20:09
20:14 rindolf left, rindolf joined
timotimo tadzik: tell me when you'll have time for some pod hacking next time? i'm thinking it would be beneficial to just merge the pod6-improvements branch into nom for now and later port it to using nibble 20:17
20:17 woolfy joined 20:19 lizmat joined
timotimo at least getting the balanced angle brackets fixes out would make the p6docs' to-html version prettier in many places (they often do C<< something something < > >> and that breaks in the current nom version) 20:19
how unfortunate ... one of the disambiguation pages is called "index.html" m) 20:21
timotimo watches as more and more memory gets pushed into the swap region 20:24
pmurias jnthn: how are attributes read from a KnowHOWREPR? 20:25
masak timotimo++ # X<..|..>
tadzik timotimo: oh, it's not merged? :o 20:26
pmurias jnthn: on parrot
timotimo tadzik: no. but i'd like it if it were ...
what magic makes doc.perl6.org/routine/Int/ work when locally, a Int.html is actually what's getting created? 20:30
er
what magic makes doc.perl6.org/routine/Int work when locally, a Int.html is actually what's getting created?
that's what i meant
[Coke] would imagine it's an apache config setting?
timotimo that's rather unhelpful IMO; what if you want to generate the docs locally? you'd have to serve the files with an actual webserver plus a bit of configuration 20:31
even worse, there's absolute links in the index :|
20:31 sjn left
[Coke] Seems fixable, but I haven't touched it. where's the repo? 20:32
timotimo perl6/doc
ah, it kind of makes sense that they're absolute, given that the url gets generated in Perl6::Documentable, which knows not about the url to the page that's currently being generated 20:33
20:33 sjn joined
timotimo huh, is "/$.kind/$.name" going to work at all without ()? 20:34
masak yes.
the rule is dollar sign *or* postcircumfix.
timotimo or. yeah that makes sense 20:35
so if i want to have $.name.html, would i have to \ that second .?
masak no.
timotimo ah, the dollar-sign-rule only goes "one deep" 20:36
masak but it might be more readable if you do.
timotimo: it's looking for a variable to interpolate.
timotimo in that place it's wrong anyway, i think i'll have to touch url-munge instead
masak timotimo: a variable can never contain a '.' in that place.
timotimo that's sensible, yes
[Coke] arglebargle. something has screwed up my rakudo.parrot install again. seems to happen whenever I use the installed parrot to build a dev rakudo. 20:37
(that I don't then install)
masak gave up having a globally installed Parrot ages ago, for exactly such reasons 20:38
[Coke] needs to remember to document how he manages to screw up the installed perl6 in the future closer to when he's done it.
timotimo the crosslinks in the tutorials is busted :(
gets redirected to /routine/...
20:40 rindolf left
timotimo at least that's not a regression from the official version to my local one 20:40
lue I still install parrot to /usr/local. I just have to remember to do make && make all installable && sudo make install, or else 20:46
20:48 BenGoldberg joined
[Coke] tries p6doc and wishes for word wrapping and bolded C<> references. 20:57
[Coke] again chases the installed panda directory... 20:58
timotimo on the terminal?
that's certainly something i could try to build some time soon. 20:59
dalek p: c81f4d6 | (Solomon Foster)++ | t/jvm/06-sprintf.t:
Add first bigint test for sprintf.
p: 55b72b0 | (Solomon Foster)++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
Make pow_I handle very large powers better.
20:59 colomon joined
dalek kudo/nom: a2f9e0b | (Solomon Foster)++ | src/core/Num.pm:
Special case 1 ** !NaN.

If someone knows how to make this more efficient, it might be a good idea.
20:59
ast: 649d8b2 | (Solomon Foster)++ | S32-num/power.t:
Unfudge tests for rakudo.jvm.
21:00
FROGGS .oO( Moar Efficient(tm) )
[Coke] installed a fresh perl6. with latest panda, run "perl6 bootstrap.pl" - get lots of failures.
... because it assumes that it://github.com/tadzik/perl6-File-Tools.git is a valid git url for me. bother. 21:01
(the https links would probably be safer for folks behind firewalls) 21:03
21:09 colomon left
masak it:// ? 21:13
21:16 nyuszika7h joined
[Coke] missing the g 21:17
(in my cut and paste only)
timotimo i'm working on a bit of code to make the lists in doc.perl6.org multi-columned 21:18
do people very strongly prefer the order to go top to bottom, or would left to right be acceptable ordering, too?
(i want the styling to be undoable, too)
[Coke] you can do that with just CSS, aye? 21:19
timotimo yes
a bit of JS will be required to switch between columned and non-columned 21:20
fortunately, jquery is already in there 21:24
[Coke] Have we thrown in twitter bootstrap yet? 21:25
timotimo haha 21:26
bootstrap is nice, fwiw.
[Coke] mmm, we use it at work quite a bit.
lue would prefer each list be vertical, but no preferences beyond that.
21:31 lizmat left
timotimo bleh, jquery :| 21:31
flussence JS? what's wrong with ol,ul{column-width: 20em}? 21:32
timotimo ... that exists? 21:33
also: JS to toggle the behavior
flussence well it's still browser-prefixed, but it works 21:34
timotimo ah
21:36 sahadev joined
timotimo can't get the column-width things work 21:38
flussence huh, oh well
timotimo it should look like ul { -mox-column-width: 30em; -webkit-column-width: 30em; }?
flussence er
-moz-
timotimo er, yes, that's what i typed
flussence but that should work, assuming it's got enough width to render two 30em-wide columns in the first place... 21:39
timotimo huh.
30em isn't that huge
masak timotimo: first of all, this is a CSS3 property, with not much browser support.
timotimo oh, wow.
curiously, it was indeed to big 21:40
masak timotimo: secondly, you should be using it with the other column properties.
see www.w3.org/TR/css3-multicol/
timotimo thanks
sahadev hello. does the $str.words method (mentioned in perl6advent.wordpress.com/2011/12/2...c-perl-6/) not available any more?
flussence I'd link the mozilla docs site page for it, but their search doesn't work *at all*...
masak r: .say for "foo bar baz".words 21:41
camelia rakudo a2f9e0: OUTPUT«foo␤bar␤baz␤»
flussence r: say 'eggs eggs eggs'.words.perl
camelia rakudo a2f9e0: OUTPUT«("eggs", "eggs", "eggs").list␤»
masak sahadev: yes, it is.
sahadev: why you ask?
sahadev rakudo: "1 2 3 4 5".words
camelia rakudo a2f9e0: ( no output )
sahadev rakudo: "1 2 3 4 5".words.perl
camelia rakudo a2f9e0: ( no output )
sahadev r: "1 2 3 4 5".words.perl 21:42
camelia rakudo a2f9e0: ( no output )
sahadev r: .say for "1 2 3 4 5".words
camelia rakudo a2f9e0: OUTPUT«1␤2␤3␤4␤5␤»
timotimo i wonder why, when i set 4 column, the column-width to auto and the width of the whole ul to 100% only about 60% of the width is used, but text overlaps >:(
sahadev why does it work in the context of for loop, but not as an expression by itself?
flussence timotimo: looks like the column-count takes precedence over DWIM 21:43
timotimo but without width: auto is supposed to be the default and it doesn't work that way either 21:44
flussence oh wait
there's a «body{width:730px}» in there.
timotimo oh! 21:45
thank you for noticing that; that would explain why 100% means that
so column-count: 2 would be the most we can get out of that 21:46
21:47 lizmat joined
grondilu sahadev: the bot does not say anything if you don't ask him to do so. 21:48
r: say "1 2 3 4 5".words
camelia rakudo a2f9e0: OUTPUT«1 2 3 4 5␤»
grondilu r: say "1 2 3 4 5".words.perl # (just to be clear) 21:49
camelia rakudo a2f9e0: OUTPUT«("1", "2", "3", "4", "5").list␤»
grondilu r: say 3 Rxx rand 21:50
camelia rakudo a2f9e0: OUTPUT«0.899653583855496 0.899653583855496 0.899653583855496␤»
grondilu n: say 3 Rxx rand
timotimo i'd like to split off all X:: classes from all the other classes. in favor?
camelia niecza v24-86-g39ab531: OUTPUT«0.17050418545049811 0.17050418545049811 0.17050418545049811␤»
sahadev grondilu: thanks.
lizmat r: my @a=Parcel.new; say @a.WHAT 21:52
camelia rakudo a2f9e0: OUTPUT«elements() not implemented in class 'Mu'␤ in method reify at src/gen/CORE.setting:6027␤ in method gimme at src/gen/CORE.setting:6453␤ in method eager at src/gen/CORE.setting:6432␤ in method STORE at src/gen/CORE.setting:6977␤ in block at /tmp/C9nvYHtip9:1␤␤»…
jnthn r; say Parcel.new
r: say Parcel.new
camelia rakudo a2f9e0: OUTPUT«get_iter() not implemented in class 'Mu'␤ in method gist at src/gen/CORE.setting:5629␤ in method gist at src/gen/CORE.setting:915␤ in sub say at src/gen/CORE.setting:11438␤ in block at /tmp/oNdT8Zphz9:1␤␤»
jnthn I think Parcel is to blame. 21:53
timotimo who can i pester to include 1) my heredoc trimming fixes and 2) my older pod6-improvements branch (which i will PR now)
tadzik timotimo: I see your pull request, I promise to review it tomorrow 21:58
timotimo \o/
tadzik I'll be a stay-at-home tadzik, waiting for my piano to be delivered :)
timotimo oh, a piano!
tadzik yeah, trying to get back to it
I hope that the pile of money I spent on it will at least motivate me to put it to good use :P 21:59
timotimo =)
22:01 konundra joined
timotimo a full run of p6doc takes about 12 minutes on my box :( 22:02
22:02 stevan_ joined 22:03 lizmat left, stevan_ left 22:04 stevan_ joined 22:05 stevan_ left
sahadev how can this be improved? .say for (bag($text.words) ==> sort {$^b.value <=> $^a.value})[^10] # show top 10 words in $text by frequency 22:07
22:12 dmol joined
timotimo you can sort { *.value } 22:13
22:13 lizmat joined
timotimo if you want to invert it, sort by -*.value 22:14
dalek kudo/nom: 8e07625 | (Elizabeth Mattijsen)++ | src/core/Parcel.pm:
Make sure Parcel.new actually works
masak tadzik++ # piano 22:15
I should totally get a piano...
sahadev timotimo: nice 22:16
tadzik I'll tell you if it's fun ;) 22:19
grondilu tadzik: digital or mechanic? (just curious) 22:21
22:23 stevan_ joined
tadzik grondilu: digital and mechanic :) 22:24
if it wasn't digital my neighbours would probably raid my flat
but it's got all those little hammers that just hit electronics rather than strings 22:25
lue
.oO(But with a mechanical piano you could detune it to the point of frustrating all who attempt to play!)
22:28
timotimo you can surely hack an electronic piano to do the same thing 22:30
22:30 BenGoldberg left 22:31 thundergnat joined
lue Sure. (I'd especially expect such a thing from an electronic keyboard *with hammers*.) 22:31
22:33 lizmat left, lizmat joined
timotimo i'd love to improve p6doc to display formatting codes with ansi terminal things, but optional run-time-importation doesn't really seem to work yet :( 22:34
hm, except maybe with eval?
22:35 FROGGS joined
timotimo r: my &colored; say try eval q{ use Term::ANSIColor; &colored }; 22:35
camelia rakudo a2f9e0: OUTPUT«Nil␤»
timotimo star: my &colored; say try eval q{ use Term::ANSIColor; &colored };
camelia star 2013.02: OUTPUT«sub colored(Str $what, Str $how) { ... }␤»
timotimo oh yeah, why didn't i think of that sooner?
oh. tadzik it seems somewhere along the way tables got b0rked or something. i'll investigate 22:38
thundergnat .tell masak When you get a chance, could you take a look at my CSV pull request? 22:39
yoleaux thundergnat: I'll pass your message to masak.
timotimo oh, of course, the commit even says "first (wrong) attempt to parse fcodes in table cells" 22:40
no wonder it's wrong...
but the pull request doesn't contain that commit, so that's good.
dalek c: 83203f5 | (Timo Paulssen)++ | lib/ (3 files):
fix improper code blocks, X<...> formatting codes.
22:44
22:44 BenGoldberg joined 22:47 dmol left 22:49 skids joined
timotimo does controlling wether or not Pod::To::Text should output ansi escape codes via an environment variable seem at all sensible? 22:52
i think it does. 22:53
timotimo mops up things all over the place :| 22:56
apparently S26 generates a twine that has a string as its second element >_> 22:58
yes, i can see what's wrong 23:01
23:05 thundergnat left 23:17 berekuk joined
masak 'night, #perl6 23:22
yoleaux 22:39Z <thundergnat> masak: When you get a chance, could you take a look at my CSV pull request?
masak queues this up for tomorrow :)
timotimo gnite masak :) 23:23
23:32 Ben_Goldberg joined 23:33 BenGoldberg left 23:34 ruoso joined
timotimo fixed and pull request updated, tadzik. things should be fine for your review tomorrow 23:35
23:37 ssutch joined 23:41 ssutch left
timotimo ... wha? it just worked a few seconds ago and now it stopped working? :( 23:48
TimToady once tuned an (analog) electronic piano 23:57
had little tines that vibrate, with lead weights on the end
timotimo was the electric part a bit like an electric guitar?
TimToady you raise the pitch by removing some of the weight
timotimo huh, that's interesting. is that technology still in use? 23:58
TimToady don't remember, but could be
lowering is harder, you have to file the shoulders of the tine
this was more than 40 years ago...
(or add weight) 23:59