»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:00 dorlamm left 00:36 icwiener left
dalek kudo/nom: 89f13aa | jnthn++ | src/ (2 files):
A little cleanup and a step closer with multi-methods. Some tricky problems to go.
00:37
kudo/nom: 0e5faf7 | jnthn++ | src/binder/multidispatch.c:
Fix an inverted set of checks in the narrowness analysis for multi-dispatch. With this, instantiating the proto in subclasses and adding their candidates to it works and dispatches correctly, though only in the pre-compiled case (need to fix the fixup, a la nqp, though not so nasty).
kudo/nom: d17aca6 | jnthn++ | / (5 files):
Refactor handling of how we locate the candidate list for a dispatcher to be a bit more dynamic.
jnthn huh, above two are inverted... 00:51
anyway, sleep &
dalek kudo/nom: bbc5b0d | jnthn++ | / (2 files):
Expand on nommap, add another piece of LHF.
00:52
00:54 mtk left 00:57 spinclad joined 01:01 mtk joined 01:17 Chillance left 01:21 nymacro joined
dalek ecza: d3f8dc6 | sorear++ | lib/Kernel.cs:
Fix NIECZA_TRACE_LOAD for evals
01:24
ecza: 9cf99ec | sorear++ | src/ (2 files):
NAM generation for subset & enum
01:27 pernatiy joined 01:33 s1n joined 01:35 whiteknight left 01:52 donri left 02:02 nymacro left 02:16 PhatEddy left 02:19 nymacro joined
sorear Is "self := self.CREATE;" legal in a new method? 02:39
erm, I think that should be self.CREATE(*) 02:40
02:42 envi joined 02:50 noganex joined
dalek ecza: 2c90936 | sorear++ | lib/CORE.setting:
Fix EnumMap construction
02:51
02:52 noganex_ left
TimToady I don't see how self := self.CREATE can possibly work on a scalar variable, since $x.new will deref to the type object in $x 03:11
it might just possibly work on array or hash vars
but then why would you do it if there's already an Array or Hash object? 03:12
03:12 masonkramer joined
TimToady or are you just wanting to change what 'self' means in the method? 03:13
that seems a bit...odd...
I'm not sure I'd go as far as to say it's antisocial though... 03:15
more like a way to do a tail-recursive graft of a real method onto the end of the constructor 03:16
and it's not like you're changing the type of self, you're just changing its definedness 03:18
one could make a feature of it and say that self.bless always reifies self in place, I suppose 03:19
seems a bit restrictive though 03:21
so we should probably leave the capability optional, if we allow it
use/abuse cases are welcome 03:22
sorear yeah, grafting a real method
TimToady it could be a common idiom 03:23
03:23 daniel-s joined
TimToady I'm trying to think of a downside 03:23
sorear I was doing self := self.CREATE; $!x = 1; $!y = 2; self
basically
my Mu.new doesn't allow creation-time assignment to private attributes 03:24
which is increasingly seeming like a mistake
03:24 Su-Shee_ joined
TimToady well...CREATE is supposed to be separate from bless 03:24
and in the standard formulation it's bless that initializes in a proper derived order 03:25
I suppose I can imagine an object that can't be allocated separately to initialization, though I'd tend to incorporate creation into initialization in that case, not the other way around 03:26
daniel-s moritz, why does it matter what order a multi subroutine comes in? 03:27
03:27 Su-Shee left
daniel-s I'm looking at the changes to the perl book from yesterday 03:27
github.com/perl6/book/commit/8ebeb...69893a69b0
TimToady daniel-s: see S12:1146 03:28
sorear TimToady: niecza's CREATE/bless factoring is known to be bogus... I'm looking at new
niecza: class A { has $.b; method show() { say $!b } }; A.new(b => 3).show 03:29
p6eval niecza v6-60-g2c90936: OUTPUT«3␤»
sorear niecza: class A { has $!b; method show() { say $!b } }; A.new(b => 3).show
p6eval niecza v6-60-g2c90936: OUTPUT«Any()␤»
TimToady that seems close to what is specced 03:30
$!b is not part of the public API
the main problem is we don't have a mechanism to point out unused parameters 03:31
sorear is there a spec-appproved way to create an A (2nd case) with a specific value of $!b?
mberends sorear: if your let me know where Mono 2.6.7 went wrong in Niecza, I might look for a workaround (subject to your review)
sorear mberends: scroll up to moritz.*«auld» and you'll find a one-line test case 03:32
mberends :)
TimToady sorear: sure, submethod BUILD ($!b) {} is supposed to make b settable 03:33
it's only the implicit build that doesn't make $!b available 03:34
sorear I thought BUILD could only have named arguments
TimToady S12:826
sorear wait, that's completely beside the point
TimToady it has named arguments
the question is whether we retract the named param change
named-to-positional change
daniel-s TimToady, so if two sets of parameters are the same and both are constrained, it's the order in which they appear in the .pl file? 03:35
TimToady or do we force people to write (:$!b)
"the order in which they are declared"
they may not be in the same file
the inter-file ordering is perhaps not right yet though 03:36
03:36 hudnix left
daniel-s ok, so the compiler doesn't look at how narrow the constrain is? 03:36
TimToady there are use cases for either before or after
daniel-s: that's more or less a halting problem
03:37 tokuhirom joined
TimToady I suppose the current formulation of doing used constraints before our own constraints (assume the use happens before our defs) is okay 03:42
since we can force our constraints into an earlier rank with a judicious use of a slightly tighter nominal check 03:43
or we can not import the other constraints till further down, I guess 03:44
otoh, one could argue that if you're adding to the constrained cases of another file, you probably want to override them, which argues to put imported candidates later 03:45
otgh, one could also be wanting to add a better generic case at the end, so it's kind of a wash 03:46
the thing to optimize for is probably the thing that's easiest to explain
and order of import/declaration is pretty easy to explain 03:47
TimToady thinks about a rule that says only twigil'd positional parameters can be set with named args, then allow $:foo to be a positional that can be named; woudl be hard to keep $:foo and :$bar straight though... 03:50
I dunno, one of the original rationales for proto was to regularize the naming of positionals, so it seems to me if we want to leave the positional names out of the API, there's some way with proto foo ($,$, :$opt), and let the multis pick their own hidden names for positionals 03:53
but the point of proto foo ($x,$y,:opt) was that foo(:x(1), :y(2)) could turn into foo(1,2) at compile time, at least for functions 03:55
so I don't buy the performance argument much
only the API argument, and maybe ($,$) addresses that 03:56
I suppose there's something to be said for requiring :$!foo in BUILD to keep people from thinking there's some way to set them positionally 03:58
but that's a lot of mandatory punctuation
04:01 wamba joined 04:07 tokuhirom left 04:08 tokuhirom joined
yath hmmmmm. 04:13
yath has an understanding problem. i can use [<=] to check the order of values. so 1 <= 2 <= 3 gives True, 1 >= 2 <= 3 gives false
1 >= 2 otoh is False and False <= 3 is true 04:14
(1 >= 2) <= 3 is True also 04:15
why does a chained comparison behave different?
mberends I don't get your False <= 3. It's 2 <= 3. Chained comparisons are special. 04:17
yath rakudo: say 1 >= 2 <= 3; say (1 >= 2) <= 3;
p6eval rakudo 048573: OUTPUT«Bool::False␤Bool::True␤»
yath the latter evaluates to False <= 3 04:18
but what's so special about the former?
mberends I think 1 >= 2 <= 3 DWIMs as (1>=2) && (2<=3)
yath seems so. was just wondering why :) 04:19
TimToady it's magic 04:20
mberends to enable a kind of SQL BETWEEN emulation
TimToady we don't try to fake it the way, say, Icon fakes it
we just say "that's what it means"
yath mberends: i know it's dwimmy and i have no problem at all with it :) i was just wondering how this is implemented 04:21
TimToady: Icon?
TimToady another language
yath hm.
mberends yath: liek TimToady++ said, it's implemented by magic ;)
TimToady it's implemented by recognizing the particular precedence level, and just forcing it to mean that
how the implementation does it is not the concern of the user, as long as the semantics are consistent 04:22
yath okay, just found O('%chaining') in Grammar.pm
so nothing i should care about. thanks :)
TimToady which includes the stipulation that side effects happen only once
you can care about it, esp if you're implementing it :)
yath first i should learn the user-visible parts of perl6 :) 04:23
mberends
.oO( hopefully the test suite verifies once-only side effects )
TimToady mberends: doesn't look like it, offhand 04:30
mberends meh, I can imagine how it should look. There is a round tuit for that not far off. 04:32
TimToady looks like it belongs in S03-operators/relational.t 04:33
I'll let you do it, if you want to.
mberends ok, thanks. will do :)
04:34 satyavvd joined, satyavvd left, satyavvd joined
TimToady ah, looks like it *might* be tested in short-circuit.t 04:35
but it seems to be testing for something else
mberends then at a minimum, I'll clarify the matter in some comments
TimToady it might catch the error for what it thinks is a different reason 04:36
thanks
sorear perl6: say(1) == say(2) == say(3) 04:42
p6eval pugs, rakudo 048573, niecza v6-60-g2c90936: OUTPUT«1␤2␤3␤»
sorear huh. I thought that was broken in niecza
yath: learning the user-visible parts of pero 6 first is probably a mistake 04:43
for me, learning a language is like making a building. you have to start from the bottom and work up, the other way around is impossible
yath sorear: i'm actually trying to understand basics of the language first before figuring out how they are implemented :) 04:44
sorear: i tried understanding how rakudo works a couple of times with no result
in perl5 terms: it makes to sense looking at what an HV* looks like if i don't even know what a hash is 04:46
mberends TimToady: I believe short-circuit.t test 70 (chained comparison short-circuit: not re-evaluating middle) does verify once-only side effects completely. 04:56
sorear yath: I'm not entirely sure what you mean by that last one 04:57
04:58 koban` joined 05:00 [particle] left 05:02 wamba left, [particle] joined
yath sorear: i mean that i should understand the perl6 language first before looking at how features are implemented. if i don't know how grammars work it doesn't make much sense to look at the perl6 grammar also. 05:05
05:06 birdwindupbird joined
sorear yes and no 05:06
trying to understand the Perl 6 grammar syntax without first understanding recursive parser theory seems a bad idea to me 05:07
05:07 tomaw left 05:10 [particle]1 joined, [particle] left 05:31 _jaldhar_ left 05:32 koban` left
yath err, sorry. s/how grammars work/how the perl6 rule syntax is/ 05:34
sorear yeah, there's a bit of a chicken and egg problem there 05:35
yath see. so i'm trying to write some perl6 code first :)
sorear TimToady has made the language definition metacircular in such a way that it cannot be effectively parsed except with itself, or a subset of itself that includes the grammars 05:36
yath by the way, why does Array have a .chars method? i couldn't find it either rakudo or parrot, does it get stringified automagically? 05:37
sorear yes
rakudo: say [1, 2, 3].chars 05:38
p6eval rakudo 048573: OUTPUT«5␤»
yath does that apply to any object?
sorear rakudo: say [1, 2, 3].Str
p6eval rakudo 048573: OUTPUT«1 2 3␤»
sorear no, only objects that inherit from Cool
rakudo: say [1, 2, 3].^parents
p6eval rakudo 048573: OUTPUT«List()Iterable()Cool()Any()Mu()␤»
yath ah
thanks!
sorear niecza: say [1, 2, 3] ~~ Cool # can't remember if this is done correctly
p6eval niecza v6-60-g2c90936: OUTPUT«Bool::True␤»
yath is Cool just cool or does that stand for something? 05:39
05:42 kaare_ joined 05:44 _jaldhar_ joined
TimToady hmm, I was thinking Array would have its own .chars that avoided stringifying... 05:45
dalek ecza: 11cd2ab | sorear++ | / (3 files):
NAMOutput/CLRBackend parsing for enums and subsets. First draft of full support
sorear yath: it's just cool
yath ah okay :)
TimToady er, it has a backronym
./S02-bits.pod: Cool Perl 6 Convenient OO Loopbacks 05:46
yath common object oriented.. lazyness?
ah
:)
TimToady and you do already know something about parsers because you have one in your head :) 05:47
05:52 wtw joined 05:54 jaldhar joined 05:55 _jaldhar_ left
sorear rakudo: enum Foo (:a("b")); say Foo::a; 06:02
p6eval rakudo 048573: OUTPUT«b␤»
06:04 jaldhar left, jaldhar joined
sorear TimToady: how does S12:1743 apply to string valued enums? 06:04
TimToady the table seems a bit off in that regard; I think .Stringy and ~ should probably produce the .value stringified 06:09
.Str should probably stay abstract like it is
sorear doesn't understand the difference between Str and Stringy 06:10
TimToady but Foo ~ Bar should concat the values of two string-valued enums, I imagine
Stringy is for coercion when you want to continue to process as a normal string; Str is last-ditch forced string coercion for human understandability, so even Junctions stringify under Str 06:11
whereas Junctions autothread under Stringy
rakudo: say (1 | 2) 06:12
p6eval rakudo 048573: OUTPUT«any(1, 2)␤»
06:12 wamba joined
TimToady rakudo: say "a" ~ (1 | 2) 06:12
p6eval rakudo 048573: OUTPUT«any("a1", "a2")␤»
TimToady you see the difference there
rakudo: say True 06:13
p6eval rakudo 048573: OUTPUT«Bool::True␤»
TimToady rakudo: say ~True 06:14
p6eval rakudo 048573: OUTPUT«Bool::True␤»
TimToady that one should probably be 1, if we want strings to work consistently
s/strings/string-valued enums/
06:15 Su-Shee_ is now known as Su-Shee
TimToady otherwise .value is the only way to get a string out of an enum that supposed represents a string, which is kinda nutty 06:15
or we make a different table for string-valued enums than for numeric ones 06:16
could argue that the latter is more what people expect 06:17
sorear &infix:<~> never sees junctions anyway 06:20
TimToady rakudo: (1|2).say 06:22
p6eval rakudo 048573: OUTPUT«any(1, 2)␤»
TimToady that one doesn't autothread either
I think I'll just make an asymmetry for ~ and .Stringy depending on whether it's numeric/stringy 06:23
dalek ecs: 21b2cd9 | larry++ | S12-objects.pod:
.Stringy produces key only on numeric enums
06:25
06:27 jaldhar left, jaldhar joined 06:34 ascott_tainer joined
sorear Is .Str the same as .perl on junctions? 06:35
06:35 wamba left
TimToady seems about right 06:38
06:40 fhelmberger joined
sorear wonders if Day.enums should really be Day.^enums 06:40
I guess .Str and .Stringy on Str-type enums should have the effect of stripping enumness and making a vanilla Str 06:42
sorear checks out how rakudo-ng does enums 06:43
TimToady as the spec currently stands, .Str produces the full name, but .Stringy produces the .value on stringy enums 06:45
rakudo likely follows the old spec there 06:46
sorear in an expression our enum Foo < Bar Baz Quux >; are the unqualified aliasesBar, Bar, Quux installed in OUR:: or just MY::? 06:47
06:47 jaldhar left
TimToady I think they follow along into the OUR:: 06:47
since the main point of an enum is to define the individual bits 06:48
moritz daniel-s: re order of multis in the book: it doesn't actually matter in this case, it was just for the sake of consistency with the earlier example
TimToady it's a convenient way to define a set of constants
rakudo: enum PO2 (<zero one two three four five six seven eight> Z 1,2,4...*); say +PO2::eight 06:56
p6eval rakudo 048573: OUTPUT«16␤»
TimToady that seems wrongish
oh wait
rakudo: enum PO2 (<zero one two three four five six seven eight> Z=> 1,2,4...*); say +PO2::eight 06:57
p6eval rakudo 048573: OUTPUT«256␤»
TimToady that's better
sorear PO2...? 06:59
TimToady powers of 2
just testing the idiom for naming bits in a word 07:00
sorear yeahhh
that won't work in niecza for a while
:)
TimToady you're so lazy :) 07:01
sorear 'tis been almost a year and still no BEGIN
of course I'm lazy. I'm an ex-Haskell programmer.
TimToady is eager...
moritz sorear: just construct a program where everything but the BEGIN blocks run in an eval :-)
sorear hah. :) 07:02
TimToady there you go
.oO(the piece of cake is a lie...)
but to the first approximation, moritz++ speaks truth 07:03
sorear crumples up the EnumHOW stuff, which is increasingly making no sense, and decides to have enum A < B C > just be syntactic sugar for class A is IntBasedEnum { method enums() { constant = enum < B C > }; constant B = A(0); constant C = A(1) }; constant B = A::B; constant C = A::C 07:05
yath hm 07:06
what is the difference between Num and Numeric?
sorear Numeric is a role 07:07
TimToady Num is a specific type (C's double)
yath ah
thanks
TimToady but a boxed double, whereas num is unboxed
so Numeric is stuff that applies to both Rat and Num 07:08
sorear wonders if there is a direct etymological connection between Num and NV
and Int and Complex and FatRat
07:09 nsh joined
TimToady I dunno about etymological connect, but there's definitely a neural connection :) 07:10
speaking of neural connections, I'd better disconnect some of mine for a few hours, so I don't disconnect any while driving tomorrow. 07:11
zzz &
07:13 mj41 joined 07:16 _twitch joined 07:35 daniel-s left 07:39 koban` joined 07:40 MayDaniel joined 07:44 MayDaniel left 07:52 daniel-s joined 07:53 tomaw_ joined 07:58 daniel-s left 08:12 tomaw_ is now known as tomaw__ 08:14 tomaw__ is now known as tomaw 08:17 amkrankruleuen joined
yath mhm 08:20
rakudo: my %foo = foo => bar, bar => baz; %foo.values»
p6eval rakudo 048573: OUTPUT«===SORRY!===␤Confused at line 22, near "%foo.value"␤»
sorear values must be quoted 08:21
yath err, yes
rakudo: my %foo = foo => "bar", bar => "baz"; %foo.values»
p6eval rakudo 048573: OUTPUT«===SORRY!===␤Confused at line 22, near "%foo.value"␤»
yath why at %foo.value and not at %foo.value_s_?
sorear because it truncates
it gives you a fixed context near the syntax error 08:22
you have an extraneous »
yath yeah, i know. was just wondering why is stops at .value
but truncating explains that, thanks
rakudo: my %foo = foo => "bar", bar => "baz"; %foo.bar» # works like expected :) 08:23
p6eval rakudo 048573: OUTPUT«===SORRY!===␤Confused at line 22, near "%foo.bar\x{bb} "␤»
08:31 jaldhar joined
cxreg wow, lots of action in nom the last few days 08:34
08:35 dakkar joined
dalek ecza: 1e5cc31 | sorear++ | / (6 files):
Reimplement enums as sugar for a class and constants. Mostly working but MRO issues.
08:35
tadzik yeah, pretty much
we have passing tests ;)
08:39 Reaganomicon left 08:41 mtk left
sorear my C3 MRO calculator is acting broken 08:43
08:45 icwiener joined 08:49 jaldhar left, mtk joined
dalek ecza: b9ff148 | sorear++ | src/Metamodel.pm6:
Fix C3 MRO handling
09:02
ecza: 8391b5c | sorear++ | src/niecza:
Inadequate attempt to enable string enums
moritz www.benjamincoe.com/post/6234388028...actices-of yay for monkey-patching 09:14
09:17 donri joined 09:26 pernatiy left
dalek ecza: 9dd105a | sorear++ | lib/ (3 files):
Implement subset declarations
09:27
09:27 masak joined
masak morning, #perl6. 09:27
sorear hi masak. 09:28
jnthn morning, #perl6 09:30
std: class Foo { }; class Bar trusts Foo { } 09:31
p6eval std c843201: OUTPUT«===SORRY!===␤Unable to parse class definition at /tmp/2uSXCNjM5G line 1:␤------> class Foo { }; class Bar ⏏trusts Foo { }␤ expecting trait␤Parse failed␤FAILED 00:01 112m␤»
masak 'trusts' only occurs inside of a class body, right? 09:32
jnthn TimToady: ^ Please can we just make trusts into a normal trait_mod? Today it seems to be the "odd one out" for no good reason.
tadzik std: class Foo { }; class Bar trusts { }
p6eval std c843201: OUTPUT«===SORRY!===␤Unable to parse class definition at /tmp/NLGGjvJPca line 1:␤------> class Foo { }; class Bar ⏏trusts { }␤ expecting trait␤Parse failed␤FAILED 00:01 112m␤»
tadzik whoops
std: class Foo { }; class Bar { trusts Foo; }
p6eval std c843201: OUTPUT«ok 00:01 112m␤»
tadzik weird indeed
jnthn TimToady: I'll still be possible in the class body with "also trusts". Anyway, this makes it easier to set up mutually trusting classes at stub time.
And it's just more consistent :) 09:33
sorear niecza: enum Reg < AX BX CX DX SI DI BP SP >; my $reg = BP; $reg++; $reg++; say $reg.perl
p6eval niecza v6-65-g9dd105a: OUTPUT«Reg::SP␤»
jnthn er :)
sorear shows off the latest feature to jnthn 09:34
jnthn oh, I mis-read it
sorear: Nice
sorear: How's it factored?
sorear: That is, what actually *is* an enum in Niecza?
niecza: enum Reg < AX BX CX DX SI DI BP SP >; say BX.WHAT 09:35
p6eval niecza v6-65-g9dd105a: OUTPUT«Reg()␤»
09:35 daniel-s joined
jnthn niecza: enum Reg < AX BX CX DX SI DI BP SP >; Reg BX.WHAT 09:35
p6eval niecza v6-65-g9dd105a: OUTPUT«===SORRY!===␤␤Any()Confused at /tmp/FZdQW5EuT1 line 1:␤------> um Reg < AX BX CX DX SI DI BP SP >; Reg ⏏BX.WHAT␤␤Parse failed␤␤»
jnthn gah
sorear that declaration creates class Reg is IntBasedEnum is Int { method enums() { ... } } and a bunch of constants
jnthn niecza: enum Reg < AX BX CX DX SI DI BP SP >; say Reg.WHAT
p6eval niecza v6-65-g9dd105a: OUTPUT«Reg()␤»
sorear most of the methods are implemented in IntBasedEnum or CommonEnum 09:36
jnthn OK
masak sorear++ # enums!
sorear NUM NUM NUM
masak :) 09:37
sorear unfortunately my latest change to subsets somehow broke stub packages 09:38
jnthn niecza: enum Reg < AX BX CX DX SI DI BP SP >; say BX.Int 09:39
p6eval niecza v6-65-g9dd105a: OUTPUT«Reg::BX␤»
jnthn niecza: enum Reg < AX BX CX DX SI DI BP SP >; say BX.Int + 42 09:40
p6eval niecza v6-65-g9dd105a: OUTPUT«43␤»
sorear method Int() { self } # seemed like a good definition at the time
masak :)
jnthn niecza: enum Reg < AX BX CX DX SI DI BP SP >; say Reg(3) 09:41
p6eval niecza v6-65-g9dd105a: OUTPUT«Reg()␤»
09:41 masak left
sorear niecza: enum Reg < AX BX CX DX SI DI BP SP >; say Reg.(3) # I wonder 09:41
p6eval niecza v6-65-g9dd105a: OUTPUT«Reg::DX␤»
moritz niecza: enum Reg < AX BX CX DX SI DI BP SP >; say BX.Int ~~ Int
p6eval niecza v6-65-g9dd105a: OUTPUT«Bool::True␤»
moritz so, technically it's correct :-)
sorear there's some STD brokenness with parsing a simple typename immediately followed by a postcircumfix
moritz niecza: enum Reg < AX BX CX DX SI DI BP SP >; say BX.Int + 0 09:42
p6eval niecza v6-65-g9dd105a: OUTPUT«1␤»
moritz niecza: enum Reg < AX BX CX DX SI DI BP SP >; say SP.Int + 0
p6eval niecza v6-65-g9dd105a: OUTPUT«7␤»
sorear erm. those values are in the wrong order, it should be AX CX DX BX
or maybe it was ADCB
moritz nqp: say(0_0_1) 09:46
p6eval nqp: OUTPUT«(timeout)» 09:47
moritz nqp: say(0_01)
p6eval nqp: OUTPUT«(timeout)»
dalek ecza: 58de2de | sorear++ | lib/C (2 files):
Fix package stubs, all tests pass again
sorear now I have met my goals for today
sorear sleeps
jnthn sleep well 09:48
moritz: oh...
moritz: nqp and Rakdo share the same parsing and string -> integer code... 09:49
moritz nqp: say(HLL::Actions::string_to_int('1_2', 10))
p6eval nqp: OUTPUT«Null PMC access in invoke()␤current instr.: '_block11' pc 48 ((file unknown):29)␤»
moritz nqp: use HLL; say(HLL::Actions::string_to_int('1_2', 10))
p6eval nqp: OUTPUT«Incompatible versions of `core_ops' oplib. Found 3.3.0 but loaded 3.4.0␤current instr.: 'nqp;ModuleLoader;_block210' pc 2286 (src/stage2/gen/module_loader.pir:821)␤»
jnthn wtf.
nqp: use NQPHLL; say(HLL::Actions::string_to_int('1_2', 10))
p6eval nqp: OUTPUT«(timeout)»
jnthn Yeah, it's that one.
moritz ah, I see the bug
jnthn yay :) 09:50
moritz while $i < $len { my $char := ...; next if $char eq '_';
in that case it never increments $i
jnthn oops!
dalek p: 2aa210a | moritz++ | / (2 files):
fix and test _ in integer literals
09:54
09:54 kboga joined
moritz loves it that the after changing the setting, the rebuild doesn't need to make a new perl6 binary 09:55
jnthn moritz: :)
moritz: Something is busted on Win32 that means it keeps rebuilding everything, every time.
moritz jnthn: :( 09:56
jnthn: caused by 131a2966330086d992ac0ed2f762a5e4ec4eb216 ?
jnthn moritz: Don't think it's anything new 09:57
Seems to be something to do with $(DYNEXT_TARGET): $(DYNPMC) $(DYNOPS) 09:58
yeah, it re-triggers that rule eveyr time. HMm. 10:00
If I remove $(DYNPMC) $(DYNOPS) the issue goes away. 10:02
moritz but then you don't have the dependency anymore :/ 10:03
jnthn Right, but one of those must be to blame...
ah, keeping $(DYNPMC) is fine too. So $(DYNOPS) must trigger too easily.
huh, $(DYNOPS) never seems to appear on the left hand side of a : 10:04
moritz jnthn: its expanded version appears 10:07
Makefile.in line 380
jnthn yeah
moritz $(OPS_DIR)/$(OPS)$(LOAD_EXT): ...
jnthn tries replacing the expanded version with $(DYNOPS) just to see
nope, no difference :( 10:09
moritz you should commit that particular bit anyway
jnthn yeah, will do 10:10
but gah, what's causing this
jnthn is veyr confused 10:12
Remove $(DYNOPS) from $(DYNEXT_TARGET) rule and the problem goes away. Put it back and remove all dependencies from $(DYNOPS) and I have the issue.
moritz does $(DYNOPS) expand to a single file name? 10:13
jnthn DYNOPS = \ $(OPS_DIR)\$(OPS)$(LOAD_EXT) 10:14
oh, why is it over two lines...
Nope, changing that doesn't help either 10:16
The expansion of that looks correct.
dalek kudo/nom: 4de98ed | moritz++ | src/CORE.setting/ (3 files):
implement all conversions from/to {Str,Num,Int}
kudo/nom: 6c2cf70 | moritz++ | LHF.markdown:
remove done items from LHF
jnthn moritz: pir::repr_box_int__PIP(pir::repr_unbox_num__NP(self), Int); 10:18
Can now be
pir::perl6_box_int__PI(pir::repr_unbox_num__NP(self)); 10:19
Which is faster.
(perl6_box_str and perl6_box_num also exist)
I updated operators.pm with those but missed the coercy ones.
moritz jnthn: ah, I was wondering about the difference, but used whatever was present in the file I edited
10:20 Reaganomicon joined
jnthn moritz: Both will work, it's just a speed difference. 10:21
moritz jnthn: will fix (if I remember after lunch :-)
10:29 mj41 left
dalek kudo/nom: a1a96b1 | moritz++ | / (2 files):
implement Num versions of most math ops. Some brave soul needs to write tests...
10:32
jnthn I suspect spectest has some :) 10:33
jdhore1 So I just submitted a patch (of sorts) to upstream Git...I expect to be sobbing quietly from all the insults soon :( 10:34
10:34 Chillance joined 10:37 ascott_tainer left 10:38 amkrankruleuen left 10:39 amkrankruleuen joined 10:40 PhatEddy joined
PhatEddy rakudo: class A { method h {say 'hello'} }; my A $x.= new; my $y = $x.can('h'); say $y.perl 10:42
p6eval rakudo 048573: OUTPUT«Method 'perl' not found for invocant of class 'P6Invocation'␤ in main program body at line 22:/tmp/4j9X_k_95E␤»
PhatEddy should be like this maybe 10:43
rakudo: sub a {say 'hello'}; my $x = &a; say $x.perl;
p6eval rakudo 048573: OUTPUT«{ ... }␤»
dalek kudo/nom: 6c9a4d3 | jnthn++ | build/Makefile.in:
A couple of Makefile tweaks while trying to figure out why $(DYNOPS) triggers every time.
10:48
10:50 masak joined 10:56 mj41 joined
yath is * _always_ Whatever? 11:03
11:03 jaldhar joined
yath or are there corner cases? 11:03
masak there are corner cases. 11:04
sometimes it's multiplication :P
yath besides that ;)
masak well, in regexes, it's a quantifier...
it's also a twigil.
yath specifically, is bless(*, ...) equivalent to bless(Whatever.new, ...)? 11:05
jnthn Yes
yath s/bless/self.$&/
masak aye.
jnthn It's Whatever there
yath hmm
okay. thanks
jnthn Well
I hope it's an instance of Whatever there
masak basically, Whatever is understood by a number of builtins in Perl 6.
jnthn Otherwise we're gonna have a hell of a time trying to instantiate a Whatever... :)
masak and they do The Appropriate Thing when they see it.
jnthn oh, no, it may just work anyway :) 11:06
yath jnthn: of course. just thought in that case it might be self or so.
masak rakudo: my $mult = * * *; say $mult(4, 5)
p6eval rakudo 048573: OUTPUT«20␤»
yath masak: wtf? how does that parse?
masak yath: humans get more confused than parsers, that's all.
yath: it flips back and forth between expecting a term and expecting an op. 11:07
nothing magical.
yath masak: i understand the _intent_, but not how the parser works this way :)
masak see above :)
yath yes, but.. what is $foo(bar)?
ah, * * * is implictly a block 11:08
confusing
masak ah, yes. 11:09
* * * translates to { $^a * $^b }
which means -> $a, $b { $a * $b }
which could be seen as a (lesser) anonymous sub.
yath anway, think i'll have to push some karma on masak++, jnthn++, TimToady++, mberends++, moritz++ and sorear++ (in no specific order) for helping me trying to understand perl6 11:10
:)
11:10 daniel-s_ joined
masak we're glad you're here. keep at it :) 11:10
jnthn Dang, the whatever stuff doesn't work in nom yet.
yath whee. and 'my $x = -> { say $x }' is like 'my $x = sub { say $_[0] } 11:12
' in perl5
that's crazy :-)
err.
forget that.
whee. and 'my $x = -> $y { say $y }' is like 'my $x = sub { say $_[0] }' in perl5 :)
11:13 daniel-s left
yath still, one dumb question: why do i need the colon at @foo.sort: -> ...? 11:14
does .foo: bar translate to .foo(bar)? 11:15
jnthn yath: It's just another way to write the arg list
You could use @foo.sort(-> ...) too
yath yep, that works too.
jnthn I don't personally find the colon form all that pretty :)
Though some like it. :)
yath hmm 11:19
rakudo: class a { method y (@*args) { say @*args } }; my $x = a.new; $x.y: "foo" 11:20
p6eval rakudo 048573: OUTPUT«Nominal type check failed for parameter '@*args'; expected Positional but got Str instead␤ in 'a::y' at line 22:/tmp/QA5HOJz2n6␤ in main program body at line 22:/tmp/QA5HOJz2n6␤»
yath what is wrong with that?
or does the colon form only work with one parameter? 11:21
jnthn yath: Did you mean *@args (slurpy)?
yath oh. yes.
11:21 MayDaniel joined
yath ah 11:21
but why does 11:22
rakudo: class a { method y (@*args) { say @*args } }; my $x = a.new; $x.y(<foo bar>)
p6eval rakudo 048573: OUTPUT«foobar␤»
yath work then?
11:22 Mowah joined
jnthn rakudo: say <foo bar> ~~ Positional 11:23
p6eval rakudo 048573: OUTPUT«Bool::True␤»
jnthn rakudo: say <foo bar>.WHAT
p6eval rakudo 048573: OUTPUT«Parcel()␤»
jnthn That's why :)
yath hmm... 11:24
jnthn <foo bar> isn't a string, it's a parcel of strings
And those can bind to @-sigil things
yath yeah, of course
but what is the * twigil for?
11:27 MayDaniel left
jnthn Dynamic scoping 11:28
$foo # look in the lexical scope
$*foo # look in the dynamic scope (e.g. walk the call chain)
yath hm, does that make sense in prototypes? 11:29
at least in their declaration?
jnthn I don't especially see the relation there 11:31
The default IO handles are examples of dynamically scoped things.
yath well, i have written - by accident - method foo (@*bar)
jnthn Oh, I thought you meant prototype objects :)
Yes, they make sense 11:32
It just means that the parameter is dynamically scoped
yath nah, i'm still coming from perl5 :P
ah
so $foo and $*foo are actually different things?
jnthn You could write a sub execute_with_different_stdout($*OUT, $code) { $code() }
And call it execute_with_different_stdout($my_file_handle, { ... }) 11:33
yath and what does $code do? reference to $*OUT or to $OUT?
jnthn I just passed it a closure
yath yes, but if it does anyting with "OUT" - would it use $*OUT or $OUT?
jnthn $foo and $*foo are both variable accesses
But it's how they're looked up that differs 11:34
yath hmm, i can't express myself today %-)
jnthn rakudo: my $a = 42; my $*b = 100; sub foo() { say $a; say $*b; }; sub bar() { my $*b = 69 }; foo(); bar(); 11:35
p6eval rakudo 048573: OUTPUT«42␤100␤»
jnthn oops
rakudo: my $a = 42; my $*b = 100; sub foo() { say $a; say $*b; }; sub bar() { my $*b = 69; foo() }; foo(); bar();
p6eval rakudo 048573: OUTPUT«42␤100␤42␤69␤»
yath what i meant is: do $foo and $*foo point to the same object?
jnthn rakudo: my $a = 42; my $*b = 100; sub foo() { say $a; say $*b; }; sub bar() { my $*b = 69; my $a = "foo never sees this"; foo() }; foo(); bar();
p6eval rakudo 048573: OUTPUT«42␤100␤42␤69␤»
jnthn yath: In general, no 11:36
yath: They may
11:36 stepnem joined
jnthn But really you're saying what sort of lookup you want 11:36
See example I worte. In taht one, the $a in foo is always the varaible in its outer scope. For for $*b in bar we declared a new one, then call foo. And it sees the most recently one in the call stack. 11:37
yath jnthn: so $foo and $*foo are actually as differet as $foo and @foo are?
jnthn rakudo: sub foo($*x) { say $x; say $*x; }; foo(42)
p6eval rakudo 048573: OUTPUT«===SORRY!===␤Symbol '$x' not predeclared in foo (/tmp/MRLDS6wkPC:22)␤»
jnthn Seems so :)
yath ah okay. could have tried that myself :P 11:38
thanks, jnthn++!
moritz rakudo: our $x = 3; say my $*x
p6eval rakudo 048573: OUTPUT«Any()␤»
11:41 timbunce joined 11:44 wamba joined 11:45 satyavvd left
daniel-s_ moritz, in the perl6 book, does everything have to be in american spelling 11:46
ie: color, favorite, etc.
moritz daniel-s_: it should be consistent 11:47
masak US spelling is more or less the default in the programming world. 11:51
I live in Europe, where reaching for a Commonwealth spelling might be more... immediate. 11:52
TiMBuS we have a team of translators working tirelessly to convert this to book british english
masak :D
TiMBuS some of the meaning might be lost in translation
masak in fact, I get slightly confused when I see code with british spelling in the variable names. mathw++'s Form is like that. 11:53
jnthn :P
masak it's a great module with some real promise. but every time I look at it, I go "huh?" :)
jnthn British English is the correct way, but America is bigger. :P
moritz it's like Perl and PHP :-)
jnthn :D
TiMBuS s/\.\n/, 'innit?/g 11:54
masak is reminded of meta.wikimedia.org/wiki/Guerilla_sp..._campaigns 11:55
dalek p: 3fc9a23 | jonathan++ | src/ops/nqp.ops:
Soften type_check a little in the face of non-6model types. Unbreaks colonpair logic in Rakudo's Actions.pm.
jnthn Darn, taht commit message was misleading 11:56
non-6model *values*
:)
masak this channel is too small for people with non-6model values! :P
jnthn :P 11:57
masak I mean, I'm all for separation of repr and state, but...
jnthn masak: lolbut repr and state are one and the same 11:58
:P
masak oh noes
I knew it!
anyway, I'm against all kind of softening in the face of those non-6model types... ;) 11:59
wow, the mileage of this commit comment is impressive :P
jnthn :P 12:00
OK, lunch time...then I sort out :U and :D so we can have ACCEPTS back.
And other such stuff.
dalek kudo/nom: 752cf6c | jnthn++ | src/ (2 files):
Handle fixing up of code objects that get cloned during compile time, e.g. for proto instantiation. Aside from proto generation, that seems to get multi-method dispatch working.
masak the more I look at :U pretending that it's a smiley, the more it looks like a duck. 12:01
moritz but :D stands for duck, no? 12:04
masak I thought it stood for 'donut'. 12:07
moritz "dunnot use this" 12:08
masak "dunnot" goes well with the "cannot" spelling we standardized on :P 12:10
12:12 wknight8111 joined 12:16 mtk left, daniel-s_ is now known as daniel-s
daniel-s why is it that in this example, I still need to fully qualify a method if I import it from a package 12:17
pastebin.ca/2075520
say md5_hex("hi"); #doesn't work
masak because the .md5_hex method isn't exported. 12:20
in fact -- and I think it's been up for discussion before -- it's unclear why Digest::MD5 is a class and not just a module. 12:21
12:21 molaf joined
masak it doesn't have any state. nothing happens if you instantiate it. there wouldn't be any special benefit of subclassing it. 12:22
moritz it's just overengineering
flussence_ in the original perl5 version, you can instantiate an object and feed it data in chunks. Maybe it was intended to do that at some point 12:23
tadzik hello 12:26
moritz \o/ it's tadzik 12:27
flussence_ oh hai, I was just about to bug you about something :)
moritz don't implant bug in my gsoc student! :-)
colomon nom build process seems messed up for me? 12:28
flussence_ I just updated panda (mine was wayyy out of date), and it seems it hasn't installed Shell::Command which it needs, probably other stuff too.
tadzik I knew it's panda :)
colomon Configuring NQP ...
perl Configure.pl --parrot-config=../parrot_install/bin/parrot_config
Option parrot-config does not take an argument
tadzik flussence_: oh, let me look into that
flussence_: yeah, the deps are broken. LHF if you want it :)
12:29 mtk joined
moritz colomon: did you call nom's configure with --gen-nqp? 12:29
colomon moritz: yes
but I didn't make realclean first
moritz it's and odd error 12:30
tadzik were ops implemented for every separate type in master too, or we're doing that in nom for perf reasons?
moritz rakudo: say (1+1).perl 12:31
p6eval rakudo 048573: OUTPUT«2␤»
moritz rakudo: say (1+1).WHAT
p6eval rakudo 048573: OUTPUT«Int()␤»
moritz I guess it either did smart coercion, or had its own variant
12:32 pernatiy joined
colomon tadzik: math ops? 12:32
flussence_ huh, it looks like the deps were all there, it just broke because File::Tools was outdated on my end. 12:33
colomon tadzik: they should be implemented for every separate type.
moritz: I'm kind of worried that if I blow everything away, the pcre bug will be harder to work around with the new --gen-nqp option. 12:34
tadzik colomon: I see 12:37
dalek ok: 4ed4419 | moritz++ | src/ (11 files):
[src] start to properly cross-link sections
tadzik flussence_: no, no
File::Tools is now deprecated in favor of Shell::Command
...I think : 12:38
:)
flussence_ but Shell::Command is *in* File::Tools.
tadzik oh, ok :)
crap, I don't remember my own modules
moritz rakudo: say 2 % 1.1
p6eval rakudo 048573: OUTPUT«0.9␤» 12:39
tadzik flussence_: yeah, updating modules is tricky since we're not versioning them
maybe panda needs a 'bigupdate' target which blindly updates all the installed modules
or just those with no git repo updates
12:40 wamba left 12:41 PhatEddy left
flussence_ (I was going to suggest "use gentoo's dependency syntax", but that's insane :) 12:42
tadzik :) 12:48
## More basic math ops
See t/00-parrot/02-op-math.t and operators.pm. Add enough to make that
jnthn ...? :) 12:50
moritz c&p gone RONG?
12:50 Moukeddar joined
tadzik ...what was that 12:50
Moukeddar Hello :)
tadzik bad middle mouse key, bad 12:51
hi Moukeddar
tadzik gets on gsoctrack
Moukeddar how are you doing?
moritz hacking!
tadzik hack hack 12:52
masak hey Moukeddar
Moukeddar hey , my hero
how is it today?
dalek kudo/nom: 85cebb8 | moritz++ | src/CORE.setting/ (2 files):
replace repr_box with perl6_box ops
kudo/nom: a6180c8 | moritz++ | src/CORE.setting/operators.pm:
implement Num % Num
masak Moukeddar: it's too warm. I can't think. :)
masak brings out the rain dance equipment
jnthn wants an appartment with air con.
Moukeddar lol , you should try 45􏿽xB0C
moritz jnthn: btw the rest of t/00-parrot/01-literals.t depends on say() with more than one argument
jnthn moritz: Yeah 12:54
moritz SLURP!
jnthn moritz: Can't ahve that until we have slurpies, which mean arrays
Moukeddar your brain will shutdown
jnthn masak: I'm going to get rich and then buy a summer house in Kiruna :P
tadzik a car termometer said it's 30 C today, I thought it was joking. It was not
flussence_
.oO( my office picked a good time to close for a week )
Moukeddar well, you gotta test the heat 12:55
masak Moukeddar: yes, I guess I should be happy, relatively speaking. :)
jnthn masak: oh, wtf...still too far south. It's 23°C there!
Moukeddar brb , lunch
masak jnthn: arrrgh! even Kiruna can't be trusted?
jnthn masak: No! O.O
tadzik my mentors? 12:56
jnthn Rrejkjavik looks rather more comfortable at present. :)
tadzik S26 doesn't say anything about Comment blocks being anything special, so I assume their insides must be a valid Pod insides, no?
I thought inside the comment block whatever works, but seems that what code blocks are
my point: there can't be no invalid pod in comment blocks 12:57
moritz tadzik: I'd agree: comment blocks are ignored except for finding their end
ie they don't produce any Pod AST
masak hm. is there anything supporting that view in S26? 12:59
tadzik so they're parsed exactly like code blocks, whatever works until =end?
All Pod blocks are intrinsically Perl 6 comments, but 13:00
D<Pod comments|Pod comment> are comments that Pod renderers ignore too.
renderers. But parsers?
moritz masak: just common sense :-)
tadzik The spec doesn't say
I suppose yes
but that said, there has to be a special kind of delimited comment, paragraph comment and abbreviated comment 13:01
masak tadzik: the part you quoted is goodenuf for me. 13:02
not sure S26 makes a real distinction between Pod parsers and Pod renderers.
arnsholt Doesn't S26 say that comments should be available through the POD API? 13:03
tadzik yes
moritz ah, so there might be a need for a Pod::Comment block or so
tadzik yeah, that's fine. The thing that bothers me is that it needs special grammar rules 13:04
arnsholt So they pretty much have to be just like other blocks, modulo the special magic that their rendering method has to be a noop
moritz comments do, in generaly
tadzik three of them. raw-delimited, raw-paragraph, raw-abbreviated
that's the repr, yes 13:05
...no :)
or, whatever
they're quite similar to =END block 13:06
13:09 stepnem left
arnsholt Also, I'm rather looking forward to working with Pod6 13:10
13:11 stepnem joined
tadzik you can do that now :) 13:13
well, it parses
arnsholt =D 13:14
tadzik passes more spectests than master :) 13:15
13:15 gbacon joined 13:16 [particle] joined
tadzik I wonder if parsing comments can be done w/o backtracking 13:16
moritz why not?
tadzik I suppose much <!before> magic will do
moritz <start> .*? <stopper>
ok, strictly speaking .*? is backtracking
tadzik yeah
13:17 [particle]1 left
tadzik survey: inspecting a Pod6::Comment object, would you expect the content to be line-splitted? 13:22
moritz no
arnsholt I'll answer with another question: Can I expect the contents of a normal block to be so?
tadzik checks the tests 13:23
nope, it's paragraph-splitted then
13:24 Moukeddar left 13:26 koban` left
tadzik the thing is Pod6::Block.content is an array of elems, so in case of Code/Comment only the 1st element will be set 13:26
13:28 wamba joined
masak maybe it shouldn't always be an array? 13:31
tadzik the content of a block is usually a bunch of other pod nodes 13:32
slavik TimToady: I know this channel is not for it, but is there like a quick guide on optimizing perl5 code for faster execution? I finally wrapped my head around the lexicographic permutation generation, and was wondering if there are any perl5 tricks I can use to make code run faster.
masak slavik: perldoc perlperf? 13:34
13:35 JimmyZ joined
slavik masak: will take a look 13:35
masak these days I just assume that there's a perldoc section for my problem at hand. there usually is :P 13:36
moritz Algorithm::Permute, Algorithm::Loops
slavik GAH!!!!!!!!!
masak hah, opening quote of perldoc perlperf: "Do Not Engage in Useless Activity" :P 13:37
13:40 Moukeddar joined, envi left
masak Moukeddar: have you seen my recent blog posts, about learning Perl 6 from the start? 13:41
13:45 envi joined
tadzik the girl who has to write an irc bot in Perl 6 coud make use of that 13:45
Moukeddar no masak 13:46
give me the link please
masak strangelyconsistent.org/blog/list-of-posts
31 May and on.
13:47 wamba left
colomon just tried a nom build from scratch, still seems borked for me 13:47
masak tries, too
jnthn colomon: How's it broke? 13:48
Moukeddar btw , activestate is the one building binaries for windows?
it doesn't have perl6
masak Moukeddar: that's right. but there are Windows binaries for Rakudo. 13:49
colomon jnthn: gist.github.com/1010296
Moukeddar what's rakudo star?
PerlJam Moukeddar: a large, bright burst of light followed by butterflies 13:51
masak Moukeddar: it's a distribution of Rakudo with a couple of modules included.
Moukeddar the nicest desciption evar:p 13:52
jnthn colomon: Ah...I think pmichaud diddled with NQP's Configure and I didn't try re-configuring since then... :)
masak yeah, it'll be hard to top "Star" as a name :)
jnthn colomon: It may be fallout from those changes.
masak "Rakudo Octothorpe"...
PerlJam The commercial version will be called "Rakudo $" of course :) 13:53
masak :D 13:54
13:54 PacoLinux joined
Moukeddar lol 13:54
jnthn
.oO( And the smoker's version will be called "Rakudo |"... )
13:55
PerlJam jnthn: or perhaps "Rakudo #|"
(but it all depends on what you're smoking)
Su-Shee and _I_ can wear a "Rakudo Starlet" shirt ;) 13:56
Moukeddar starlet?
PerlJam Moukeddar: Su-Shee just likes to think we're in Hollywood 13:57
Su-Shee PerlJam: now don't shatter my dreams and hopes.. ;)
Moukeddar oh yeah , selling with the body
Su-Shee also, all americans are in hollywood, I've seen it on tv.
Moukeddar hehehe 13:58
PerlJam Su-Shee: That's why the San Andreas fault is so unstable; too many people standing on it.
Su-Shee PerlJam: ah. of course. that explains it.
Moukeddar masak, i changed your blog sample from "'sauna" to "sauce" , better that way 13:59
colomon jnthn: ah, third times the charm
Moukeddar L.A was invaded by aliens
"if $had-enough eq "yes"" 14:00
it is expressive 14:01
so ,my in perl is like dim in vb and let in F# right? 14:02
PerlJam Moukeddar: sort of.
masak Moukeddar: both declare things, yes. 14:03
Moukeddar: but in VB, you can use variables without 'dim', IIRC.
Moukeddar shiny stuff attract me :p
yes you can declare without dim
masak well, you can use without declaring. 14:04
you can't in Perl 6.
jnthn colomon: What did it need to make it work?
Moukeddar and i guess it's a good thing
colomon jnthn: a really fresh start
jnthn colomon: ah, ok :)
masak Moukeddar: for the reason I explained in the post, yes. :)
Moukeddar and also (1 .. 100).roll 14:05
colomon jnthn: what happened before is, I made a .... oh, crap, hold on. I think the time it worked I built master instead of nom.
Moukeddar it picks a random digit , right ?
colomon jnthn: well, I'm trying again, we'll see what happens this time.
masak Moukeddar: a random number between 1 and 100, yes :)
colomon ERRTOOMANYSTEPS
Moukeddar shiny , it's kinda like LINQ , just more compact
jnthn colomon: I think the idea is that you'll just do --gen-nqp in Rakudo and it'll sort out Parrot for you. 14:06
colomon jnthn: that definitely didn't work for me
masak rakudo: say (1 .. 100).roll(10).perl
p6eval rakudo 048573: OUTPUT«(49, 59, 64, 48, 73, 66, 99, 95, 64, 8)␤»
Moukeddar nice 14:07
masak Moukeddar: there's also .pick(10) that takes 10 but never takes the same more than once.
Moukeddar rakudo: say "Hello World".roll(5).perl
p6eval rakudo 048573: OUTPUT«("Hello World", "Hello World", "Hello World", "Hello World", "Hello World")␤»
masak Moukeddar: strings aren't lists :) 14:08
rakudo: say "Hello World".comb.roll(5).perl
p6eval rakudo 048573: OUTPUT«("W", "d", "l", "o", "d")␤»
Moukeddar aren't they more line an array of chars?
masak nope.
colomon jnthn: arrrrrrrrrrrrrrrgh!
jnthn colomon: :(
Moukeddar but in other languages they are
PerlJam Moukeddar: strings are too complicated to be just an array of chars
colomon jnthn: okay, once more with feeling
Moukeddar right , right 14:09
jnthn colomon: Here's what I suspect you'll have to do at the moment. Build an NQP with --gen-parrot. make install it. Then point Rakudo's --parrot-config=... at the Parrot NQP build.
masak jnthn: oh! I'm also getting an error building nom!
jnthn colomon: Ore maybe build them all separately.
14:09 PacoLinux left
jnthn masak: oh noes! 14:09
masak: Co je to?
Moukeddar there's no way to get intellisense for perl ,right ? 14:10
masak jnthn: from what you just wrote, it's the same problem.
14:10 PacoLinux joined
masak Moukeddar: not that I know of. but Padre (the editor) has surprised me before. 14:10
14:10 hudnix joined
Su-Shee I often sense intelli in perl... ;) (what's intellisense?!) 14:11
Moukeddar heheh,
14:12 masonkramer left
Moukeddar it's the dark magic 14:12
the voodoo of coders
Su-Shee "aha". 14:13
PerlJam Moukeddar: I guess that explains why I don't know what it is either ... I'm a programmer, not a coder.
masak Su-Shee: it's tab completion for type names, attribute names, and method names.
Moukeddar another symantic pittfall 14:14
masak usually not with the Tab key, though :)
PerlJam vim has something like that.
Moukeddar what's a coder ?
Su-Shee ah. a feature I utterly hate.
Moukeddar and what's a programmer?
Su-Shee PerlJam: yes, with ctrl-p
masak Intellisense is one of those features you get hooked on, and then you can't program with editors that don't have it :P 14:15
PerlJam Moukeddar: Any definition I give you would just be made up by me right now. :)
Moukeddar make sense then :p
JimmyZ Good evening
Moukeddar masak, it's like crack
masak Moukeddar: a coder is someone who writes things that a decoder will read. duh :P
Su-Shee masak: unless you type pretty well and pretty fast then it plainly gets in the way.
Moukeddar there's no going back
14:15 xinming joined
PerlJam Su-Shee: ding! 14:15
Su-Shee PerlJam: I won something? :)
masak Su-Shee: I've seen good implementations and bad implementations of it. just like with most other things. 14:16
Moukeddar with big fat visual studio 10 , it'll definitely get in your way
masak JimmyZ: 你好!
jnthn masak: Hey, I can program with and without intellisense. :)
Su-Shee muhaha. ok, yes. ;) me too :) 14:17
Moukeddar Super Coders
colomon jnthn: confirmed that it breaks with a clean checkout
Su-Shee Moukeddar: you realize that plenty of people don't even know windows and their programming stuff? ;)
jnthn It's kinda nice to have because I don't have to bother learning the .Net class libraries. :)
Moukeddar Su-Shee, i do realize that , 14:18
well the BCL is kinda like the perl modules and ruby packages
you'll have to
benabik Is `sub func(\$a)` normal Perl 6 or something special in Rakudo/NQP? Closest thing I see in the spec is `\|$a` to grab the raw arguments Parcel. 14:19
jnthn benabik: It's spec 14:21
benabik: NQP doesn't have it. nom has it in Rakudo, and master has it also. 14:22
dalek kudo/nom: 351dd72 | jnthn++ | src/Perl6/ (2 files):
Pass along :U and :D constraints so they're represented in the parameter object.
kudo/nom: 00677d3 | jnthn++ | src/ (2 files):
Add flags to represent definedness/undefinedness constraints.
kudo/nom: dc11240 | jnthn++ | src/binder/bind. (2 files):
Teach binder about :U and :D.
kudo/nom: b747c6a | jnthn++ | src/binder/multidispatch. (2 files):
Teach multi-dispatcher about :U and :D, so we can now do multi-dispatch based on them.
benabik jnthn: It is a large spec, so I'll buy that I missed it. From context (recent nom commit), I'm guessing it grabs a non-containered value?
jnthn benabik: No. It says "bind whatever you get passed directly"
benabik: If it's a container you'll be able to assign to it. If it's not a container, you won't. 14:23
benabik: It turns out that in Rakudo it's the fastest way to accept parameters.
So we use it for various built-ins. 14:24
Generally, CORE.setting will do anything that's reasonable to perform decently, even if we'd not encourage people to do it in their everyday code.
benabik jnthn: Skips creating new variables and such, so is faster? Interesting.
jnthn benabik: Yes.
benabik jnthn++ # Taking time to answer random questions 14:25
14:25 wtw left
JimmyZ masak: 您好 14:31
masak now feels he shoulda 您'd JimmyZ too :) 14:33
mathw masak: I am not changing my spelling for you :P 14:34
what I should do is actually do some work on Form at some point
I keep saying that
masak mathw: I'm not asking you to change the spelling. :)
mathw: in fact, if more people used UK spellings, the surprise factor would be smaller.
mathw :) 14:35
Well the simple thing is that there are too many Americans
and too many non-Americans who've learned English from American teachers
and they're ALL WRONG :P
masak I dunno about that, there seem to be lots of Commonwealth peeps out there too.
mathw I know English spelling is crazy, but why have two forms of crazy?
hah well there are a load of variants for the Commonwealth countries too 14:36
masak I think it's far too late for the "why two forms of crazy" question.
mathw yes
but it's not too late for me to masak++ you for your awesome tutorial blog posts
it's a fantastically no-nonsense approach to programming tutorial 14:37
I love it
masak thanks! :)
mathw I love how Perl 6-y it is too
6-y is the new sexy :)
masak happy
14:37 kboga left
masak it's actually less work than the November blog posts, because I don't have to code before I blog. 14:38
mathw vi skribis bone (I think?) 14:39
masak dankon :)
mathw and you're doing it in a second language too
masak oh right. I am :P
mathw damned people with their fluency in multiple languages mumble mumble :)
masak jnthn did correct a typo I had made, though: s/swoop up/scoop up/ the results 14:40
jnthn++
mathw heh that's actually a nice image
swoop up the results :)
masak like an eagle, swooping up a mouse :P
mathw yes 14:41
masak anyway, I'm glad I'm back to blogging. I'm also glad I refrained from doing a clichéd "it's been a long time since I last blug" blog post. 14:42
mathw :)
good for you
14:43 mkramer joined
tadzik most of the 2/3 of Week #3 done :) 14:44
moritz wonders if we had a too liberal schedule for tadzik++ :-)
tadzik I was peeking at masak's :) 14:45
14:45 daniel-s left
tadzik now indentation-based code blocks are quite tricky 14:45
14:46 PhatEddy joined, Moukeddar left
tadzik also, tables 14:47
14:47 Moukeddar joined
tadzik but the psychological bareer is broken, if I count right :) 14:47
masak tadzik++ # keep up the good work, don't mind the schedule so much :) 14:48
mathw tadzik: what are you doing?
PhatEddy rakudo: my $a; eval $a.WHO 14:49
p6eval rakudo 048573: OUTPUT«Null PMC access in invoke()␤ in 'eval' at line 1213:CORE.setting␤ in 'eval' at line 1213:CORE.setting␤ in main program body at line 22:/tmp/dPvhCT3k6G␤»
PhatEddy rakudo: my $a; say $a.WHO ~ 'after' 14:50
p6eval rakudo 048573: OUTPUT«No applicable candidates found to dispatch to for 'infix:<~>'. Available candidates are:␤:(Any $x = { ... })␤:(Any $a, Any $b)␤␤ in main program body at line 22:/tmp/f0nlWgcfJL␤»
PhatEddy Hopefully I check RT better/harder this time ... 14:52
masak rakudo: my $a; say $a.WHO.PARROT 14:54
p6eval rakudo 048573: OUTPUT«Method 'PARROT' not found for invocant of class 'Any'␤ in main program body at line 22:/tmp/mjFBTn_NC5␤»
masak rakudo: say Any.PARROT
p6eval rakudo 048573: OUTPUT«␤»
14:54 Moukeddar left
masak PhatEddy: you're onto something here. 14:54
PhatEddy: this one I haven't seen before...
rakudo: say (my $a).WHO
p6eval rakudo 048573: OUTPUT«Any␤»
moritz don't submit any bugs related to .PARROT
it's not spec
masak nodnod 14:55
but see above -- something's going on here.
rakudo: say Any.chars
p6eval rakudo 048573: OUTPUT«Method 'chars' not found for invocant of class ''␤ in main program body at line 22:/tmp/RGV_hDNNHR␤»
masak rakudo: say Any ~ ""
p6eval rakudo 048573: OUTPUT«Any()␤»
masak rakudo: say (my $a).WHO ~ ""
p6eval rakudo 048573: OUTPUT«No applicable candidates found to dispatch to for 'infix:<~>'. Available candidates are:␤:(Any $x = { ... })␤:(Any $a, Any $b)␤␤ in main program body at line 22:/tmp/ntNtFyrsov␤»
masak moritz: how would you explain that? 14:56
moritz masak: with Mu
tadzik mathw: just pushed code blocks and comment blocks
moritz masak: or non-p6 types
rakudo: say (my $a).WHO ~~ Mu
p6eval rakudo 048573: OUTPUT«Bool::True␤»
moritz rakudo: say pir::typeof (my $a).WHO
jnthn masak: .WHO doesn't behave very in current Rakudo
p6eval rakudo 048573: OUTPUT«NameSpace␤»
tadzik masak: I wouldn't mind having twice or thrice active schedule I have if I didn't have all the university crap on my head
moritz right, it's a parrot-level type 14:57
tadzik 4 exams on friday, 2 of them deadly
jnthn rakudo: say (my $a).WHO.WHAT
p6eval rakudo 048573: OUTPUT«Method 'WHAT' not found for invocant of class 'Any'␤ in main program body at line 22:/tmp/lS9vi8OFvo␤»
PhatEddy rakudo: class A{}; my A $a .= new; eval $a.WHO 14:58
p6eval rakudo 048573: OUTPUT«Null PMC access in invoke()␤ in 'eval' at line 1213:CORE.setting␤ in 'eval' at line 1213:CORE.setting␤ in main program body at line 22:/tmp/BfB1bYJ9_N␤»
JimmyZ nopaste?
14:59 acrussell joined
PhatEddy rakudo: class A{}; my A $a .= new; say $a.WHO 14:59
p6eval rakudo 048573: OUTPUT«A␤»
PhatEddy rakudo: class A{}; my A $a .= new; say $a.WHO ~ ''
p6eval rakudo 048573: OUTPUT«No applicable candidates found to dispatch to for 'infix:<~>'. Available candidates are:␤:(Any $x = { ... })␤:(Any $a, Any $b)␤␤ in main program body at line 22:/tmp/6WQHZMJuVx␤»
JimmyZ masak: which one is a bug ? gist.github.com/1010409 15:00
masak looks 15:01
JimmyZ: my guess is that Rakudo simply doesn't recognize the last form yet.
15:02 wknight8111 left
PhatEddy Unless I hear back differently will file who problems with RT ... 15:02
masak PhatEddy: sure, go ahead.
JimmyZ wonders what's the difference between : $a and :$a 15:04
moritz the \ and a space 15:05
JimmyZ std: sub foo ( \:$a ) { ... }
p6eval std c843201: OUTPUT«===SORRY!===␤Malformed parameter at /tmp/xxG0Z27Wqo line 1:␤------> sub foo ( ⏏\:$a ) { ... }␤ expecting any of:␤ name␤ parameter␤ routine_def␤ signature␤Parse failed␤FAILED 00:01 113m␤»
JimmyZ std: sub foo ( \ :$a ) { ... } 15:06
p6eval std c843201: OUTPUT«ok 00:01 114m␤»
JimmyZ masak: I am not sure is that rakudo simply doesn't recognize the last form
masak: i updated gist.github.com/1010409 15:09
jnthn By the way, in nom: 15:12
> say (my $a).WHO.WHAT
Stash()
dalek kudo/nom: 3561701 | jnthn++ | src/ (2 files):
Turns out we need to derive_dispatcher a bit earlier in the bootstrap, at least for now.
15:14
kudo/nom: 39768a2 | jnthn++ | build/Makefile.in:
Some notes on ordering of setting files.
kudo/nom: 75bf1b6 | jnthn++ | src/CORE.setting/ (4 files):
Mu.ACCEPTS, Mu.Str, update various other Str methods. 'say $foo.WHAT' now works.
15:15 awwaiid joined
masak JimmyZ: those signatures might mean something, but I'm having difficulty understanding what. 15:16
JimmyZ masak: me too.
masak JimmyZ: that makes it hard for me to pick out any bug or mismatch among all of those signatures :) 15:17
JimmyZ masak: hehe
moritz wonders if that backslash+space thing is actually and unspace
or accidentally parsed as one 15:18
jnthn std: sub foo(:) { }
p6eval std c843201: OUTPUT«===SORRY!===␤Malformed parameter at /tmp/9t_a1SC6vD line 1:␤------> sub foo(:⏏) { }␤ expecting any of:␤ formal parameter␤ named_param␤Parse failed␤FAILED 00:01 113m␤»
jnthn std: sub foo( : ) { }
p6eval std c843201: OUTPUT«ok 00:01 113m␤»
JimmyZ me is not sure whether is an unspace or not.
jnthn (difference between : \$a and \ :$a) my guess is that the first is the invocant colon and a positional is-parcel param, the second is an is-parcel named parameter. 15:19
JimmyZ rakudo: my $a = 1; say $a = $a\ ++; say $a; 15:20
p6eval rakudo 048573: OUTPUT«1␤1␤»
15:21 MayDaniel joined
TimToady you can't rely on order of side effects, so either 1 1 or 1 2 are "correct" 15:21
maybe even 2 2
maybe not 15:22
moritz "here be dragons"
moritz links that sentence in perlsyn
JimmyZ rakudo: my $a = 1; say $a = ++$a; say $a; 15:23
p6eval rakudo 048573: OUTPUT«2␤2␤»
JimmyZ that 2 2
sorear good * #perl6 15:24
TimToady I think that one has to be 2 2
masak sorear! \o/
PerlJam would expect something with a 2 in the second position either way
1 1 would be too weird
JimmyZ rakudo: sub foo ( : \$a ) { say $a }; foo(3); 15:25
p6eval rakudo 048573: OUTPUT«Lexical 'self' not found␤ in 'foo' at line 1:/tmp/Fit8qLeo4K␤ in main program body at line 22:/tmp/Fit8qLeo4K␤»
sorear o/ masak
moritz niecza: my $a = 1; say $a = ++$a; say $a;
p6eval niecza v6-66-g58de2de: OUTPUT«2␤2␤»
jnthn JimmyZ: Ah, that confirms it.
JimmyZ: It's parsed as the invocant colon.
TimToady that's what I'd expect 15:26
jnthn TimToady: Yeah, works for me too :) 15:27
Though error is a bit LTA.
TimToady not as LTA as STD's :)
JimmyZ doesn't know what vocant means :( 15:28
s/vocant/invocant/
TimToady related to "vocal"
"something you call"
moritz JimmyZ: an invocant is the object that you call a method on
PerlJam JimmyZ: invocant -> invoke
TimToady we made up the word for one of the Camel books 15:29
moritz JimmyZ: so in $a.b the inocant is $a
TimToady so you won't find it in a dictionary
sorear rakudo: my %h; say %h.^parents
p6eval rakudo 048573: OUTPUT«EnumMap()Iterable()Cool()Any()Mu()␤»
mathw TimToady: did you? Wow. I use it all the time.
sorear rakudo: my $e = enum < ook! ook. ook? >; say $e.WHAT 15:30
p6eval rakudo 048573: OUTPUT«EnumMap()␤»
PerlJam TimToady: it's in the wiktionary! en.wiktionary.org/wiki/invocant :)
masak JimmyZ: 'invocant' = 呼叫的事
TimToady niecza: sub foo ( : \$a ) { say $a }; foo(3);
p6eval niecza v6-66-g58de2de: OUTPUT«3␤»
masak JimmyZ: or something like that :)
TimToady that's...wrongish
tadzik jnthn: shouldn't make realclean remove CORE.Setting.pbc? 15:31
TimToady niecza: sub foo ( $: \$a ) { say $a }; foo(3);
p6eval niecza v6-66-g58de2de: OUTPUT«Unhandled exception: No value for parameter \$a in MAIN foo␤ at /tmp/cXVDsP1JAC line 0 (MAIN foo @ 0) ␤ at /tmp/cXVDsP1JAC line 1 (MAIN mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1664 (CORE C758_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting
..line 1665 (CO…
TimToady sorear: invocant : should probably imply $ to the left
jnthn tadzik: yes 15:32
sorear TimToady: does STD parse the former case as having an invocant colon?
TimToady sorear: I believe so
tadzik jnthn: fixing
sorear niecza doesn't currently process arg separators at all except in method_def
jnthn Rakudo has them handled in signature 15:33
TimToady possibly STD can detect a bogus : now
dalek ast: c4cf773 | sorear++ | S12-enums/anonymous.t:
Make the fifth test in S12-enums/anonymous.t test what it looks like it was supposed to test
TimToady since we added the self-awareness 15:34
JimmyZ thanks for explaination
TimToady some of our explanations might even be correct :)
15:35 jaldhar left
sorear rakudo: enum Day <Sun>; say ~Sun 15:35
p6eval rakudo 048573: OUTPUT«0␤»
JimmyZ thought rakudo master doesn't support enum since ng refactor 15:37
15:37 nymacro left
tadzik rakudo: my $a = 5; $a.WHAT.say 15:37
p6eval rakudo 048573: OUTPUT«Int()␤»
tadzik rakudo: my $a = 5; $a.WHAT.WHAT.say
p6eval rakudo 048573: OUTPUT«Int()␤» 15:38
jnthn awww, master had some cute theories :)
tadzik nom has them too :)
jnthn I suspect it has a different answer to that.
tadzik > my $a = 5; $a.WHAT.WHAT.say
Int()
sorear niecza: enum roman (i => 1);
p6eval niecza v6-66-g58de2de: OUTPUT«===SORRY!===␤␤Compile time expression is insufficiently trivial at /tmp/kE4036I5au line 1:␤------> enum roman (i => 1)⏏;␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 469 (CORE die @ 2) ␤
..at /home/p6eva…
jnthn tadzik: oh!
tadzik: Yeah, that one is right 15:39
tadzik: I was thinking .HOW.WHAT.
Though I may have fixed that in master anyway
tadzik dunno
wasn't there some case in which .WHAT.say wasn't working?
I think there's a bug about this
sorear I'm having to fix/remove a few/ spectests with dated assumptions
jnthn sorear: The enum spec has been through several itreations 15:41
sorear: Rakudo has gone through various attempts at supporting it
dalek kudo/nom: a9e3910 | tadzik++ | build/Makefile.in:
[Makefile] clean CORE.setting.pbc
jnthn sorear: Until I got fed up and decided it was somebody else's problem to figure out. :)
Then masak++ had a go :)
masak I didn't get terribly far, tbh. 15:42
moritz and then I tried to make enums work in the setting
masak quickly ran into problems that jnthn is fixing now in nom. 15:43
moritz and that was... horrible
masak it's good to know we're pushing our limits, at least :P
TimToady it's not entirely clear that the enum spec is sane yet 15:46
.oO(as if the rest of the spec is sane...)
15:47 Patterner left
sorear TimToady: What is the default scope of an enum declaration? 15:49
TimToady should be the same as constant
which we've gone back and forth on... :/ 15:50
jnthn thought "our" was the latest
TimToady probably
it's not like you care if someone else tries and fails to change your constants :)
it's also not clear the Foo::Bar is visible if Bar is lexical inside Foo 15:51
*that
dalek kudo/nom: 5c4a5f6 | jnthn++ | src/Perl6/Metamodel/ (2 files):
Default parent type is Any if none is specified.
kudo/nom: d311e5a | jnthn++ | .gitignore:
Update .gitignore so status is clean.
kudo/nom: 842ee25 | jnthn++ | NOMMAP.markdown:
Update nommap.
jnthn TimToady: I decided "no" on that one. :) 15:52
sorear niecza sorries if you try to define my any-declator Foo::Bar
jnthn TimToady: Oh, wait,
TimToady: Actually multi-part mys...what sorear said
multi-part ours are OK
nqp: class Foo::Bar { }
p6eval nqp: ( no output )
jnthn nqp: my class Foo::Bar { }
p6eval nqp: OUTPUT«A my scoped package cannot have a multi-part name yet at line 1, near " { }"␤current instr.: 'nqp;HLL;Grammar;panic' pc 26397 (src/stage2/gen/NQPHLL.pir:7039)␤»
jnthn heh, yet :)
"Maybe we'll find a way to make it work" 15:53
TimToady no, I mean package Foo { my constant Bar = 42; }; say Foo::Bar
jnthn Oh, in that case, no.
TimToady no colon in the declaration
jnthn Right
15:53 jevin joined
jnthn In that case I'm certain Foo::Bar is not visible. 15:53
TimToady but we might allow Foo::Bar access to lexicals that are exported but not imported
jnthn I don't follow...example? 15:54
moritz module Foo { sub bar is export { } }; Foo::bar 15:55
jnthn Ah
TimToady yeah, that
jnthn Presumably you'd get the "is export" trait to deal with that installation?
TimToady std: package Foo { my constant foo is export = 42 }; Foo::foo
p6eval std c843201: OUTPUT«===SORRY!===␤Undeclared name:␤ 'Foo::foo' used at line 1␤Check failed␤FAILED 00:01 115m␤»
jnthn TimToady: tbh, I'd really rather we don't make export magically our-scope things. 15:56
TimToady which STD apparently doesn't like (yet-ish)
masak I think having enums be our-scoped by default makes sense. classes and roles and grammars and subtypes are our-scoped.
15:56 Psyche^ joined, Psyche^ is now known as Patterner
jnthn TimToady: Provided we our-scope constants and enums by default, there's really no need, imo. 15:56
dalek kudo/nom: 8b86542 | moritz++ | build/Makefile.in:
[build] declare missing dep on metamodel sources
15:57
TimToady so my...is export is requiring all access to be via import, I guess...
jnthn TimToady: Yes, that's what I'd figured.
TimToady is probably okay, given our current set of 'our' defaulters
would be problematic if Bool::True was bogus :) 15:58
sorear TimToady: is STD right to parse Day(2) and Day.(2) completely differently?
jnthn Well, it's in the setting, so export doesn't really come into it :)
TimToady we have inline imports 15:59
jnthn ah, did you mean the general case rather than Bool specifically?
TimToady sorear: it's probably a design smell
jnthn: yes
jnthn TimToady: ah, ok
Then I understand. :) 16:00
dalek ast: 758acfb | sorear++ | S12-enums/basic.t:
Twiddle basic enum tests to numify where needed, fudge for niecza
TimToady sorear: but I suppose it depends on *how* it parses them differently
dalek ecza: ea84744 | sorear++ | / (3 files):
Minor enum fixes, two new passing test files
16:01
sorear niecza: enum Day <Sun Mon Tue Wed Thu Fri Sat>; say Day(3); say Day.(3); # I blame STD for this, but haven't investigated too deeply yet 16:03
p6eval niecza v6-66-g58de2de: OUTPUT«Day()␤Day::Wed␤»
TimToady the first is forcing a function call syntax, the second is a postcircumfix
so the second requires Day to be Callable, while the first has to recognize that Day is a type, and not treat it like an ordinary function, in some sense or other 16:04
but I think it comes out to the same .() call either way
jnthn me afk for a bit 16:06
heh 16:07
jnthn afk for a bit
JimmyZ tries to sleep
TimToady STD does attach an argument list in the case of Day(3), so it ought to be recognizable as a form of coercion 16:08
we do have to recognize a null coercion .() as a no-op somewhere though 16:09
niecza: enum Day <Sun Mon Tue Wed Thu Fri Sat>; say Day(3); say Day.()
p6eval niecza v6-66-g58de2de: OUTPUT«Day()␤Unhandled exception: No value for parameter $key in CORE CommonEnum.postcircumfix:<( )>␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE CommonEnum.postcircumfix:<( )> @ 0) ␤ at /tmp/nfiILG9Dug line 1 (MAIN mainline @ 3) ␤ at
../home/p6eval/niecza/lib/CORE.setting line …
TimToady there probably
sorear hmm... it looks like STD produces exactly the same parse tree for Foo::[2] and Foo::{2}
wait, no 16:10
TimToady rakudo: say (1000000000 .. 2000000000).roll 16:18
p6eval rakudo 048573: OUTPUT«1088995434␤»
TimToady \o/
perl6: say (1000000000 .. 2000000000).pick 16:23
p6eval niecza v6-66-g58de2de: OUTPUT«Unhandled exception: Unable to resolve method pick in class Range␤ at /tmp/9oEsHEjdiJ line 1 (MAIN mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1664 (CORE C758_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1665 (CORE module-CORE @ 56) ␤
..at /home/p6eva…
..pugs: OUTPUT«pugs: out of memory (requested 1048576 bytes)␤»
..rakudo 048573: OUTPUT«1434985450␤»
TimToady pugs--
rakudo++
でも。。。 16:25
rakudo: say (1000000000 .. 2000000000).pick(2) 16:26
p6eval rakudo 048573: OUTPUT«(timeout)»
TimToady wonders if we could recognize that situation and just do an anti-cache
seems like it would be fairly trivial to recognize that the arg to pick is much smaller than the range in question 16:27
and then it comes down to the relative overhead of doing it either way 16:28
sorear I wonder why pugs requested exactly 1 MiB
TimToady rakudo: say (1..2000).pick(2)
p6eval rakudo 048573: OUTPUT«1745625␤»
TimToady even that might be faster with an anti-cache 16:29
16:29 mtk left
TimToady I think ghc and/or pugs caps requests somewhere 16:29
I've seen that number many times
"One meg should be enough for anyone..." 16:30
sorear I think an anti-cache is always better, it's O(n log n)
erm
no, it's O(n) filtering behavior, which requires rerolls sometimes
unless it were done ISAM-style 16:31
muahahaha!
now that you meantion ghc, I remember that ghc uses 1MiB superblocks
all memory for small GCable objects is allocated in 1MiB increments 16:32
benabik sorear: With a sorted tree anti-cache, couldn't it filter in O(log n)? So @a.pick($n) would be O(m log n) (m = +@a)
sorear pugs is probably using some variation on a 2-3-4 tree to store the cache
16:33 wamba joined
benabik sorear: No, re-rolls. You're right. May still be efficient for n << m as TimToady said. (Probably n < sqrt(m) due to birthday paradox) 16:33
PerlJam wonders what a "sorted tree anti-cache" is exactly. 16:34
TimToady an anti-memoizer: "If we saw this already, *don't* return it"
not exactly an anti-memoizer though, since that's based on argument matching 16:35
I think the birthday paradox doesn't hurt you much even > sqrt(m)
not till you fill up enough to reroll the majority of the time 16:36
benabik After sqrt(m), you'd be re-rolling about half the time. Less than optimal.
TimToady 'course, memory requirments for a billion table entries is not cheap either... 16:37
benabik True, balance of cost of re-roll vs cost of creating intermediate lists.
TimToady even my bit @seen[1000000000] is pretty big
16:37 pjcj_ joined, mtk joined
TimToady but for numbers approaching large you probably could use a bitmap, or just do a Knuth shuffle 16:39
actually, a truncated Knuth shuffle can get you pretty good results for any intermediate m
assuming you can make the mutable structure to hold it 16:40
doesn't help much with picking 3 out of a billion though
16:41 pjcj left 16:42 pjcj_ is now known as pjcj 16:45 mj41 left 16:48 _twitch left
sorear benabik: no, you reroll half the time at m/2 16:48
benabik: what the birthday paradox says is that the *first* reroll is expected around sqrt(m) 16:49
benabik sorear: ... Guh, you're right. Trying to pay attention to too many things at once.
sorear TimToady: I beleive a truncated Knuth shuffle is what Rakudo uses now
for Niecza's pick I think I'm going to use an anticache up to m/2 then switch over to Knuth 16:50
16:50 ymasory joined
TimToady has to hit the road now, probably offline till evening 16:54
16:55 birdwindupbird left 16:56 JimmyZ left
sorear phenny: tell TimToady S12-enum/basic.t:89 is dubious. Shouldn't that be a call to the enum (as a coercer?) 16:56
phenny sorear: I'll pass that on when TimToady is around.
16:58 wknight8111 joined
dalek ecza: 4cbecb9 | sorear++ | src/niecza:
Improve handling of term:name and term:ident, supporting Day(2), Foo::bar
16:58
sorear o/ wknight8111 16:59
wknight8111 hello sorear
17:02 pernatiy left, frettled_ joined 17:03 frettled_ left, frettled joined 17:12 kaare_ left 17:14 molaf left
sorear huh. 17:19
there seem to be *no* tests in roast dedicated to "our sub"
masak spectests: expect to find missing tests :) 17:24
17:25 dakkar left
moritz sorear: probably because 'our' used to be the default 17:26
17:28 dukeleto joined 17:32 MayDaniel left
dalek ecza: b3631e9 | sorear++ | / (3 files):
Implement "our sub"
17:32
ecza: 9bedd6b | sorear++ | test (2 files):
Merge tests
17:34
sorear btw, niecza just passed 1000 non-roast tests 17:41
masak nice! 17:43
how many roast tests?
sorear not so easy to count.
2000ish
moritz probably has the most recent number 17:44
17:44 pyrimidine joined
moritz only if I rerun :-) 17:44
17:46 orafu joined
masak 2000's about what I expected at this point. sorear++ 17:48
frettled From what I read, niecza is a really, really nice part of the Perl 6 ecosystem, so I'll join in on sorear++ 17:49
I think it's moritz's blog that I'm reading the most about that in. 17:50
17:50 pernatiy joined
colomon I suspect a week's intense effort could push that north of 10,000 passing spec tests. (Not counting trig...) 17:52
sorear frettled: I think only colomon++ has been blogging about it 17:59
bleh... almost all of roast's subset tests are MMD-related 18:07
18:12 kcwu joined
moritz sorear: meh, spectest on niecza broken 18:22
Undeclared routines: 'lives_ok' used at line 37,40 'plan' used at line 5 18:23
so, 0 passing spectests :-)
sorear \o/ 18:26
pmichaud good afternoon, #perl6 18:27
sorear good afternoon, pmichaud.
masak good afternoon, pm/ 18:28
dalek ecza: 9671a2d | sorear++ | src/niecza:
Fix sub exporting (moritz)
18:31
sorear ow. 18:34
any(1..5) # 671 µs
18:34 mj41 joined 18:36 icwiener left
jnthn o/ pmichaud 18:39
sorear by comparison 18:40
1|2|3|4|5 # 7.98µs
any(1,2,3,4,5) # 16.4µs 18:41
jnthn pmichaud: Some reported build issues, though I suspect mostly out of things being in a state of flux (e.g. Rakudo not using the new stuff in nqp yet)
18:47 envi left, Phreak joined 18:48 fhelmberger left 18:49 Chillance left 18:50 Chillance joined
masak sorear: so... iterators are slow, is that it? 19:05
sorear masak: RangeIterator is a lot slower than it could be, yeah 19:06
but it's written in a high-level style and relies on infix:<cmp>, which is not fast itself at the moment
frettled sorear: brilliant, I don't even know who I'm paying attention to. Hah. :D 19:09
moritz sorear: importing still borked 19:10
sorear moritz: importing was never borked, it was actually exporting I borked, which means that your obj/Test.nam is miscompiled 19:14
19:18 birdwindupbird joined
moritz sorear: deleting that fixes it 19:19
nqp: say(pir::ord("ab")) 19:22
p6eval nqp: OUTPUT«97␤»
moritz sorear: t/spec/S32-num/pi.t aborts prematurely 19:23
colomon frettled: good thing I only blog for the fame. ;) 19:25
frettled colomon: hee-hee :D Well done, anyway :D 19:31
dalek kudo/nom: d2a8a97 | moritz++ | / (2 files):
implement Cool.bytes and .ord
19:32
jnthn omgz, all nom eaten! 19:35
er, all *LHF* nom :) 19:36
dalek ecza: 945867e | sorear++ | / (7 files):
mergeback augments
19:42
19:43 Phreak left
sorear rakudo: say pi() 19:43
p6eval rakudo 048573: OUTPUT«Could not find sub &pi␤ in main program body at line 22:/tmp/HBYWO6fMrH␤»
sorear pugs: say pi()
p6eval pugs: OUTPUT«3.141592653589793␤»
sorear is pi() correct Perl6 anymore? 19:44
PerlJam What's a slicel?
moritz iirc only term:pi is correct
sorear moritz: mind if I kill the tests for pi()?
well, invert :)
moritz sorear: do whatever you deem correct 19:45
dalek ast: 3c40f3a | sorear++ | S32-num/pi.t:
[S32-num/pi.t] pi() is no longer valid
19:46
sorear was that the only failing file?
moritz yes
around 2.3k passes
(including skips) 19:47
sorear :/
why does it count skips?
moritz dunno
sorear is my Test using the wrong syntax, I wonde
dalek kudo/nom: 80a9810 | moritz++ | src/CORE.setting/Int.pm:
Int.chr
kudo/nom: 52a6917 | moritz++ | src/CORE.setting/Cool.pm:
Cool.flip
moritz nope, general TAP::Harness "feature"
perl6: say 42.1.log 19:48
p6eval niecza v6-71-g9671a2d: OUTPUT«Unhandled exception: Unable to resolve method log in class Rat␤ at /tmp/cAf14UFD_Z line 1 (MAIN mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1664 (CORE C758_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1665 (CORE module-CORE @ 56) ␤ at
../home/p6eval/n…
..pugs: OUTPUT«3.7400477406883357␤»
..rakudo 048573: OUTPUT«3.74004774068834␤»
moritz perl6: say 42.1.ln
p6eval niecza v6-71-g9671a2d: OUTPUT«Unhandled exception: Unable to resolve method ln in class Rat␤ at /tmp/TwT1lJVPqr line 1 (MAIN mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1664 (CORE C758_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1665 (CORE module-CORE @ 56) ␤ at
../home/p6eval/ni…
..pugs: OUTPUT«*** No such method in class Rat: "&ln"␤ at /tmp/5dtN7LDp1H line 1, column 5 - line 2, column 1␤»
..rakudo 048573: OUTPUT«3.74004774068834␤»
moritz perl6: say 42.1.log(10) 19:53
p6eval pugs: OUTPUT«*** No compatible multi variant found: "&log"␤ at /tmp/NCUcQ2gnWv line 1, column 5 - line 2, column 1␤»
..niecza v6-71-g9671a2d: OUTPUT«Unhandled exception: Unable to resolve method log in class Rat␤ at /tmp/PamdjqgRqI line 1 (MAIN mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1664 (CORE C758_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1665 (CORE module-CORE @ 56) ␤ at
../home/p6eval/n…
..rakudo 048573: OUTPUT«1.62428209583567␤»
19:57 icwiener joined
dalek ecza: 24b29e4 | sorear++ | / (3 files):
Remove EACH junction type, which only existed on a misunderstanding
19:58
kudo/nom: a240642 | moritz++ | src/CORE.setting/Num.pm:
Num.sqrt and .log
20:01 bharat1 joined
jnthn pmichaud: ping 20:02
NQP configure is totally busted on Win32. :/ 20:04
ah 20:05
--with-parrot at least works
20:07 bharat1 left 20:09 cognominal left 20:10 cognominal joined 20:14 xinming left, xinming joined 20:15 Mowah left
jnthn pmichaud: Turns out it's not so busted, once I figured out how to work it. It's just --gen-parrot that doesn't work on Win32. 20:16
20:17 wamba left
sorear I'm suprised 20:21
even without fancy optimizations, junctions are pretty competitive with other looping constructs
?( 3 == any(1,2,3,4,5) ) is twice as fast as ?( grep 3, 1,2,3,4,5 ) in niecza currently 20:22
masak \o/
dalek kudo/nom: 4ab94e9 | jnthn++ | build/gen_nqp.pl:
Quick hack that should fix --gen-nqp, so --gen-parrot --gen-nqp should work again (maybe... :-))
20:24
p: c9a6dba | jonathan++ | / (4 files):
Add an Uninstantiable representation, whihc is useful for types that you can't instantiate.
jnthn Spelling is useful too...
colomon jnthn++ 20:25
jnthn karma for spelling wrong? :)
aloha for spelling wrong? :) has karma of 0.
jnthn ...
sorear pre-populating a hash with keys for 1,2,3,4,5 and then doing %hash{3}, is, however, 4x faster than the junction 20:26
if the values are <a b c d e>, then the hash is 40x faster than the junction
not that the junction is slower; it just seems that 90% of the cost of %hash{3} is incurred in System.Int32.ToString() 20:27
dalek ecza: 31e91e9 | sorear++ | / (6 files):
Add a makejunction primitive
20:30 wknight8111 left 20:33 parcs left 20:39 birdwindupbird left 20:44 thou left, thou joined
dalek ecza: 1019d95 | sorear++ | / (3 files):
Minor junction optimizations (use indexed slot access, short-circuity collapse)
20:46
21:09 timbunce left 21:10 masak left 21:14 masak joined 21:16 timbunce joined 21:28 dorlamm joined 21:32 icwiener left 21:33 Eevee left
dalek ecza: bec71af | sorear++ | / (2 files):
Avoid inferior runloops for autothreading only subs
21:35
ecza: 47239f7 | sorear++ | lib/Kernel.cs:
Avoid inferior runloops on unknown-method autothreading
21:36 Eevee joined
masak blog post! 21:42
strangelyconsistent.org/blog/june-6...ng-strings
21:42 Trashlord left
tadzik my assembly project is slower when using registers than when using memory 21:43
benabik masak: There's a &mash; in there. I assume you wanted &mdash;
tadzik things are getting irrational
masak benabik: thanks, fixing.
21:44 Trashlord joined
sorear tadzik: what kind of assembly? 21:44
masak tadzik: why waste your time optimizing by hand? computers are better at it than we are by now... :)
tadzik sorear: x86 21:45
masak: that's what THEY expect me to do :)
mberends tadzik: might a debugger be interfering with the timing?
tadzik I have 5 variables on stack in my code. I noticed ebx is unused, so I moved one of the most used vars to ebx. Things slowed down by 25% on 200 runs
mberends: I'm not running under a debugger
unless -g is the issue, but I doubt it 21:46
21:46 Psyche^ joined 21:47 Patterner left, Psyche^ is now known as Patterner
masak I think I'll skip this month's Yapsi release :/ 21:47
focus on the next one instead.
'night, #perl6.
tadzik masak: night
21:47 masak left
sorear tadzik: x86 is very sensitive to assembly layout issues, loop alignment and whatnot 21:50
tadzik sorear: I didn't reorganize the stack after this, I just not use my [ebp-20] anymore, may that impact this? 21:51
I guess not, but everything here has dozens of side-effects. After I finish this, I'm writing haskell only
sorear tadzik: you changed the low-order bits of every subsequent instruction in your program, right?
tadzik oh, so the instructions have a different size and everything is moved? 21:52
sorear yes
sorear is done messing with junctions for now
next I think I'll mess with new/CREATE/bless/BUILDALL/BUILD 21:53
21:55 TiMBuS joined 21:56 sivoais joined, ymasory left 22:05 timbunce left
jnthn I blug: 6guts.wordpress.com/2011/06/06/the-...-marathon/ 22:06
pyrimidine jnthn++ 22:08
nice post!
tadzik The :U and :D type-modifiers
smiley-syntax
pyrimidine just need :P now 22:09
tadzik Probably-defined 22:11
jnthn :)
tadzik :O – obviously defined
:F – F*** knows :) 22:12
it even looks similar
oh, I'm pushing it 22:13
mberends :Q - Schrödinger's cat defined
tadzik quantum variables
rakudo: my $a = any(Mu, Any); say $a.defined 22:14
p6eval rakudo 048573: OUTPUT«Bool::True␤»
tadzik ...how can you tell, rakudo?
mberends tadzik: try again, the answer might change ;)
jnthn I suspect you're asking the junction if *it's* defined there :)
tadzik shh!
sorear phenny: tell masak Your blog is spamming planet perl6 with duplicated posts 22:15
phenny sorear: I'll pass that on when masak is around.
tadzik rakudo: class Cat { has $.alive }; my $a = any(Cat.new(alive => 1), Cat.new(alive => 0)); say $a.alive 22:16
p6eval rakudo 048573: OUTPUT«any(1, 0)␤»
tadzik clever
mberends jnthn: in yr blog post, s/could/called/ 22:17
sorear niecza: class Cat { has $.alive }; my $a = any(Cat.new(alive => 1), Cat.new(alive => 0)); say $a.alive
p6eval niecza v6-75-g1019d95: OUTPUT«Unhandled exception: Nominal type check failed for scalar store; got Junction, needed Any or subtype␤ at /tmp/mTbkaGYqd9 line 1 (MAIN mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1658 (CORE C754_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting
..line 1659 (CORE …
sorear oh
niecza: class Cat { has $.alive }; my Mu $a = any(Cat.new(alive => 1), Cat.new(alive => 0)); say $a.alive
22:17 mj41 left
p6eval niecza v6-75-g1019d95: OUTPUT«Junction()<instance>␤» 22:17
jnthn mberends: thanks 22:19
22:24 dorlamm left
jnthn sleep & 22:37
felher masak++, jnthn++, for blogging. :) 22:43
22:46 cognominal_ joined 22:49 cognominal left 22:55 spq1 joined
tadzik I keep reading "hacking marathon" as "morning hackathon" 23:00
sleep as well &
23:07 Ali_h_ joined 23:10 Ali_h left 23:41 jaldhar joined 23:43 Ali_h_ is now known as Ali_h 23:58 ymasory joined