»ö« 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! | Rakudo Star Released!
Set by diakopter on 6 September 2010.
masonkramer Hmm, in order to build this new new(), I feel like I have to reference attributes symbolically 00:03
nopaste.snit.ch/23657 # now what? 00:04
00:04 patspam joined
colomon can you give some examples of how to use your Node.new? 00:08
masonkramer At this point, I am trying to simply recreate Mu.new 00:09
colomon that's what I was wondering.
masonkramer Well, I plan to add more stuff in after that 00:10
the more stuff part is easy though
colomon Is it the BUILD which is the problem?
masonkramer BUILD is bugged, apparently
colomon rakudo: class F { has @.things; has @.build_things; }; say F.new(:things<1 2 3>).perl 00:11
p6eval rakudo 2632af: OUTPUT«F.new(things => ["1", "2", "3"], build_things => [])␤»
masonkramer hmm? 00:12
colomon is there a reason you're using BUILD instead of a custom F.new?
masonkramer BUILD would have been exactly what I wanted, if it worked
however right now, I am trying to build a custom Node.new 00:13
that recreates Mu.new(), then does more stuff afterwards
I can't figure out how to set private attrs when all I have is a slurped hash of Pairs
lichtkind good night 00:14
masonkramer good night :)
colomon self.bless(*, %attrs); maybe?
or self.bless(*, !%attrs); 00:15
?
sorear ooh, jnthn is getting busy, so must I
colomon admits he has always considered new to be deep magic
sorear (heat wave </3)
masonkramer self.bless(*, !%attrs) doesn't do it 00:16
00:16 lichtkind left
colomon rakudo: class A { has $.id; multi method new(*%attrs) { self.bless(*,%attrs) }; }; say A.new(:id(10)).perl 00:17
p6eval rakudo 2632af: OUTPUT«A.new(id => Any)␤»
sorear should surely be |%attrs
!%attrs is logical NOT
colomon sorear++
rakudo: class A { has $.id; multi method new(*%attrs) { self.bless(*,|%attrs) }; }; say A.new(:id(10)).perl 00:18
masonkramer that did it
p6eval rakudo 2632af: OUTPUT«A.new(id => 10)␤»
colomon sorry about that, I'm fuzzy with a cold at the moment.
masonkramer which synopsis is |% in? 00:19
jnthn self.bless(*, *%attrs);
er
|%attrs
sorry
:-)
masonkramer: S06 I'd guess
It's just flattening.
colomon masonkramer: I dunno, I've only seen |@ used before, but it seemed a logical analogue
jnthn sorear: Heat wave in late September? Ouch!
masonkramer thanks guys 00:21
I'm off for the night, happy to get to this stopping point
:)
colomon masonkramer++
jnthn masonkramer: night o/ 00:24
Mmm...Weissbier++
plobsing good idea. 00:26
00:27 xabbu42 joined 00:45 patspam left 00:51 Italian_Plumber joined 00:55 QinGW joined 00:59 risou joined 01:00 QinGW1 joined 01:02 QinGW left
jnthn Time for a little sleep. :-) 01:07
01:10 redicaps joined 01:11 redicaps left 01:12 xabbu42 left 01:33 Italian_Plumber left 01:58 patspam joined, patspam left 02:00 LaVolta joined 02:11 miso_soup joined 02:26 ggoebel left 02:29 wolfman2000 joined
wolfman2000 Evening. I've been getting a lot of emails about GitHub's Perl 6 book. Just wanted to make sure things were going well with it. 02:29
02:44 kid51 joined 02:45 kid51 left
masonkramer what 02:53
what's the difference between \ and |? They both seem to be producing Captures
02:55 miso_soup left
masonkramer Meh, I think I need to understand Parcels, Captures, and Pairs if I want to get any further....tomorrow then 02:59
Captures seem to transport non-flat data in the same capacity that references do so in p5 03:01
I guess I really just don't understand Parcels at this point 03:02
if (1, (2, (3,4))) flattens, what's the point of Parcels now?
03:02 gottreu joined
colomon rakudo: "2abcd" ~~ / (\d+) (. ** { $0 }) /; say ~$1 03:07
p6eval rakudo 2632af: OUTPUT«abcd␤»
colomon rakudo: "2abcd" ~~ / (\d+) (. ** { +$0 }) /; say ~$1
p6eval rakudo 2632af: OUTPUT«abcd␤»
03:07 masonkramer left, masonkramer joined 03:09 risou left, risou joined 03:14 risou left 03:16 meppel joined 03:19 meppl left 03:26 wolfman2000_ joined 03:28 wolfman2000 left, wolfman2000_ is now known as wolfman2000 03:37 nymacro joined 03:49 DemoFreak left 03:50 petdance joined 03:55 wolfman2000_ joined 03:57 DemoFreak joined 03:58 wolfman2000 left, wolfman2000_ is now known as wolfman2000
TimToady masonkramer: you don't know that (1, (2, (3,4))) will flatten till you know what context it is bound to. if it's an argument list, there are only two arguments there, the 1, and everything else, for insatnce 03:59
04:06 envi^home joined 04:08 envi^home is now known as envi 04:12 meppel left
araujo ideone.com/B1cnv 04:17
twisted example ... just added vargs let :P
sorear masonkramer: \(arglist) produces a Capture of the arglist; it's an expression 04:27
masonkramer: |foo is not an expression (mostly); it's magic syntax which causes foo to be coerced to Capture *and used as multiple arguments* 04:28
rakudo: sub foo($x,$y,$z) { say $x }; my $c = \(1,2,3); foo($c)
p6eval rakudo 2632af: OUTPUT«Not enough positional parameters passed; got 1 but expected 3␤ in 'foo' at line 1:/tmp/qIIQtrkbrH␤ in main program body at line 22:/tmp/qIIQtrkbrH␤»
sorear rakudo: sub foo($x,$y,$z) { say $x }; my $c = \(1,2,3); foo(|$c)
p6eval rakudo 2632af: OUTPUT«1␤»
gottreu rakudo: my $a = List.new(4,(3,(5,2))); $a.elems.say; $a.sort.elems.say; $a.sort.WHAT.say; 04:37
p6eval rakudo 2632af: OUTPUT«2␤4␤Parcel()␤» 04:38
gottreu my $a = List.new(4,(3,(5,2))); $a.perl.say; $a.elems.say; $a.sort.perl.say; $a.sort.elems.say; 04:40
rakudo: my $a = List.new(4,(3,(5,2))); $a.perl.say; $a.elems.say; $a.sort.perl.say; $a.sort.elems.say;
p6eval rakudo 2632af: OUTPUT«(4, (3, (5, 2)))␤2␤((3, (5, 2)), 4)␤4␤» 04:41
04:43 wolfman2000 left
gottreu rakudo: my $a = List.new(4,(3,(5,2))); $a.perl.say; $a.reverse.reverse.perl.say; 04:48
p6eval rakudo 2632af: OUTPUT«(4, (3, (5, 2)))␤(4, 2, 5, 3)␤»
gottreu rakudo: my $a = List.new(4,(3,(5,2))); $a.perl.say; $a.reverse.perl.say; $a.reverse.reverse.perl.say; 04:53
p6eval rakudo 2632af: OUTPUT«(4, (3, (5, 2)))␤((3, (5, 2)), 4)␤(4, 2, 5, 3)␤»
gottreu The Parcelization confuses me. Is this the desired behaviour?
04:59 plobsing left 05:08 leprevost_ joined, leprevost_ left 05:09 leprevost_ joined 05:12 leprevost_ left, [Sec] joined, leprevost_ joined 05:13 leprevost_ left 05:50 LaVolta left 05:53 Guest23195 joined 05:55 LaVolta joined 06:07 LaVolta left 06:09 grew left, grew joined 06:11 kjeldahl joined 06:15 zulon joined 06:20 mfollett left 06:23 schpey joined 06:28 kjeldahl left, gottreu left 06:29 petdance left 06:34 icwiener joined 06:48 kjeldahl joined 06:59 wamba joined 07:04 wamba left 07:07 wamba joined 07:31 Ross joined, Ross left, Ross joined 07:49 justatheory left
moritz_ good morning 08:14
bobkare Good morning. I just tried out rakudo* last night and saw just how little I/O is implemented. Has it gotten further in trunk? 08:21
nymacro there are lots of things which still need to be extended/implemented/fixed 08:22
moritz_ bobkare: yes, the next release willi contain methods for retrieving access time, modify time etc. 08:23
bobkare Hm, how about sysopen or some other way to specify O_EXCL? That's what I'm really waiting for 08:24
moritz_ not yet; but you're welcome to give it a shot, we'll surely accept patches 08:25
bobkare Hm, not really sure where I'd start. Does parrot support it, or would it involve hacking on that too? 08:27
moritz_ I don't know; you'd need to read the parrot docs to find out
araujo morning moritz_! 08:31
bobkare doesn't seem like it. I don't think I have enough time to play with p6 right now to try tackling that. Maybe I'll try writing a Path implementation instead 08:32
araujo wonders what would be a good symbol to represent function invocation 08:38
moritz_ depends on how functional your language is 08:39
haskell uses no special character at all
many languages use parens
08:42 xabbu42 joined
sorear handling of TTIAR makes for an interesting survey of notations 08:43
Haskell - application
conventional math - multiplication
araujo ideone.com/ODpfA
sorear Awk - string concatenation
araujo moritz_, ^
sorear Forth and its spinoffs - sequencing
moritz_ Mathematica - multiplication
08:44 nymacro left
dalek ok: 8134ba9 | moritz++ | src/classes-and-objects.pod:
mention .defined, and that type objects are undefined
08:50
ok: 0c3f670 | moritz++ | src/multi-dispatch.pod:
fix inaccuracy introduced in 3ae798c9
bobkare Um, S32/IO says new() takes Stringy Path and Str @PathElements, but then clarifies that those are mutually exclusive. Isn't that just about a perfect usage of multimethods? 08:54
dalek kudo: 704698f | moritz++ | src/Perl6/BacktracePrinter.pm:
use backtrace_line for warnings

that way we get the file name and current sub name appear in warnings
08:55
ok: a20b738 | moritz++ | src/multi-dispatch.pod:
[multis] be more concrete in an example
08:56
sorear bobkare: I recommend NOT trying to implement I/O as specced 08:59
it's a joke
implement something actually useful, then we'll change the spec to reflect reality 09:00
moritz_ like dir() :-)
phenny: ask jnthn if the rock/paper/scissors example in the book can actually work as is, with enum elements as types; do they really count as nominal types? 09:01
phenny moritz_: I'll pass that on when jnthn is around.
bobkare Bah, I'll go fix some food and then write that piece of actual work I've been pushing for weeks now, instead of trying to invent a new I/O system 09:05
09:07 patrickas joined
patrickas o/ 09:07
moritz_ \o
09:08 nymacro joined
moritz_ looks for a good place in the book to insert a simple subchapter about basic introspecton 09:08
things like .WHAT and .perl
patrickas hasn't yet read TheBook and kinda feels guilty about it 09:10
moritz_ no need to feel guilty 09:12
patrickas unfeels guilt! :-) 09:14
moritz_ would love to have such a convenient mechansim to get rid of the guilty feeling :-) 09:15
nymacro Alcohol helps 09:17
moritz_ Alcohol helps temporarily, but generally worsens the situation
patrickas When I start feeling guilty ... I stop feeling guilty and be awesome instead. True Story! 09:18
nymacro That was the most inspirational story I've ever heard! 09:19
moritz_ that explains MAIN sub and the serie^Wsequence operator
patrickas oh the series op has been renamed ? 09:20
moritz_ yes 09:21
because in math, "series" are accumulated values
series = [\+] sequence
09:21 patrickas_ joined
moritz_ so ... corresponds to sequence 09:21
patrickas_ i have been away for far too long :-( 09:22
day job has kinda caught up with me so less time for rakudo too... Guilt creeping ... no no ... more awesomeness!
09:25 patrickas left
moritz_ contributing to an open source project is always an opportunity, never an obligation 09:26
nymacro but it always gives you a sense of satisfaction contributing to something which will be useful to someone 09:28
09:29 patrickas joined
patrickas *fjh!@# wireless router! 09:30
09:31 patrickas_ left 09:35 tadzik joined
snarkyboojum do people know that try.rakudo.org doesn't appear to be responding? 09:37
09:37 patrickas left
tadzik poke ash_ 09:39
09:40 patrickas joined
patrickas I think I just successfully used aluminum foil and an old mouspad to boost the wifi signal :-) 09:42
nymacro hi-five! 09:43
Rakudo doesn't have sockets yet? 09:45
LoRe nymacro: it hasn't non blocking sockets yet 09:46
nymacro LoRe: cheers 09:47
patrickas rakudo: my @s := 1,1,{ $^a + 1, $^b * 2 }...*; @s[^5].perl.say
p6eval rakudo 2632af: OUTPUT«(1, 1, (2, 2), (2, 4), (3, 4))␤»
patrickas maybe I should work on that next!
tadzik rakudo: my @s := 1,1,{ $^a + 1, $^b * 2 }...*; @s[^10].perl.say # hrm 09:50
p6eval rakudo 2632af: OUTPUT«(1, 1, (2, 2), (2, 4), (3, 4), (3, 4), (3, 4), (3, 4), (3, 4), (3, 4))␤»
sorear twisted pair ftw. 09:51
10:05 patrickas left 10:08 QinGW1 left
sorear complexity of the niecza/mm code generator is starting to get out of control :( 10:16
not helping matters is that it's not going to factor easily 10:17
10:31 cogno joined 10:44 lichtkind joined
lichtkind mberends: OHAI 10:45
10:45 cogno left 10:47 risou joined
nymacro hoi hoi 10:47
mberends lichtkind: ohai, brb, just fixing something to eat 10:49
10:49 zulon left
lichtkind nymacro: ahoj 10:49
10:50 zulon joined 10:53 cogno joined
dalek ecza/mm: be34de8 | sorear++ | src/ (2 files):
[mm] more static pad generation
10:55
ecza/mm: 1ff5f22 | sorear++ | / (5 files):
[mm] Prototype static pad construction
10:56 cogno_ joined 10:57 cogno left 11:17 ggoebel joined
colomon akudo: "2abcd" ~~ / (\d+) (. ** { +$0 }) /; say ~$1 11:22
11:23 Italian_Plumber joined 11:25 cogno_ left
colomon rakudo: "2abcd" ~~ / (\d+) (. ** { +$0 }) /; say ~$1 11:25
p6eval rakudo 704698: OUTPUT«abcd␤»
colomon Am I correct in thinking that should be just "ab"? 11:26
moritz_ yes; ** { } is basically NYI 11:36
it basically parses as ** <separator>, where <separator> is the zero-width match that { } use 11:37
s/use/produce/
11:42 cogno joined
lichtkind colomon: got my mail? 11:46
colomon lichtkind: nope. 11:47
lichtkind colomon: excuse me i mixed it up with coleda (will)
moritz_ that's [Coke]
colomon lichtkind: no worries
lichtkind moritz_: yes 11:48
colomon looks at github commits for the first time in a few days. moritz_++ 11:49
11:50 icwiener_ joined
moritz_ rakudo: say now.WHAT 11:51
p6eval rakudo 704698: OUTPUT«Instant()␤»
11:52 schpey left, cogno left
moritz_ rakudo: say now.^attributes[0].^methods.join(', ') 11:52
p6eval rakudo 704698: OUTPUT«Method 'methods' not found for invocant of class ''␤ in main program body at line 22:/tmp/hO51KAhEkn␤»
11:53 icwiener left
dalek kudo: d7ebff5 | moritz++ | src/core/Attribute.pm:
make Attribute stringify to the attribute name
11:57
tadzik method has-accessor() { $!has_accessor ?? True !! False } 11:59
couldn't it be just a public accessor?
12:00 dcript joined 12:01 dcript left 12:02 meppl joined
dalek ok: 1dc6f0b | moritz++ | src/classes-and-objects.pod:
[oo] a section on introspection
12:03
moritz_ unless it needs compatiblity with p6object or so
12:07 torehaug joined 12:13 schpey joined
dalek ok: 5c98231 | moritz++ | lib/book.sty:
add pdonelan++ and jkeenan++ to the contributors; both have contributed helpful bug reports
12:16
ok: 898f538 | jest++ | README:
Added info about required texlive-font-util Ubuntu package.
12:21 masak joined
masak oh hai, #perl6! 12:21
rakudo: class F { has @.things; has @.build_things; submethod BUILD { @!build_things = <A B C> } }; say F.new(:things<1 2 3>).perl 12:22
p6eval rakudo 704698: OUTPUT«F.new(things => [], build_things => ["A", "B", "C"])␤»
masak <jnthn> Damm...that's a Rakudo bug. :/
and a long known one. 12:23
A12 has something to say about the desired behavior. hold on.
'In any event, the assignment of default attribute values happens automatically. For any attribute that is not otherwise initialized, the attribute declaration's "build" property is evaluated and the resulting value copied in to the newly created attribute slot. This happens logically at the end of the BUILD block, so we avoid running initialization closures unnecessarily. This implicit initialization is based not on whether the 12:24
attribute is undefined, but on whether it was initialized earlier in BUILD. (Otherwise we could never explicitly create an attribute with an undefined value.)'
don't know whether that still applies, but it sounds sane. 12:29
it naturally raises the question "How?" (as in "How is an unassigned undefined value distinguished from an assigned undefined value?")
mberends lichtkind: rehai 12:33
masak also, is the distinction hidden, or introspectable? 12:34
sorear: I like your idea about the survey of uses for TTIAR. it could also be seen as a comprehensive history of the juxtaposition operator :P 12:39
masonkramer: I still maintain that BUILD will most likely be sufficient for you, and that the one NYI part of it can be worked around more easily than reinventing either BUILD or .new manually. 12:42
jnthn o/
phenny jnthn: 09:01Z <moritz_> ask jnthn if the rock/paper/scissors example in the book can actually work as is, with enum elements as types; do they really count as nominal types?
masonkramer good morning 12:43
jnthn phenny: tell moritz_ the elements don't really, no
phenny jnthn: I'll pass that on when moritz_ is around.
moritz_ so we should use classes instead?
phenny moritz_: 12:43Z <jnthn> tell moritz_ the elements don't really, no
jnthn Whenever I show this example at a conference I do it with classes because it makes life so much easier.
And sub-typing relationships are obvious.
moritz_ classes it is then 12:44
jnthn +1
masak +1 12:50
12:52 Trashlord left
masonkramer masak: This is what I came up with last night: nopaste.snit.ch/23679 12:53
masak lookz
masonkramer the hard part of this is that my initializer needs to set read only attributes, and so more_stuff
masak masonkramer: and if you just put 'self.more_stuff' in a BUILD submethod, and don't declare your own .new method, what do you miss? 12:54
dalek ok: f5277d3 | moritz++ | src/multi-dispatch.pod:
[multi] switch rock/paper/scissors to classes

The enum elements don't act as proper nominal types, and break the example.
12:55
12:55 Trashlord joined
masak masonkramer: seems to me you're unnecessarily defining your own .new 12:55
masonkramer masak: here's my golf
rakudo: class F { has @.things; has @.build_things; submethod BUILD { @!build_things = <A B C> } }; say F.new(:things<1 2 3>).perl
p6eval rakudo 704698: OUTPUT«F.new(things => [], build_things => ["A", "B", "C"])␤»
masonkramer @.things should contain [1, 2, 3] 12:56
moritz_ yes, known bug
masak masonkramer: it will, if you define the signature to BUILD correctly.
masonkramer: look:
rakudo: class A { has $.x; submethod BUILD(:$!x) { self.more_stuff }; method more_stuff { say "OH HAI" } }; say A.new(:x(42)).x
p6eval rakudo 704698: OUTPUT«OH HAI␤42␤»
masak masonkramer: that does everything you want.
12:57 am0c^ joined
masonkramer ( working through that ... ) 12:58
dalek ok: e32eb8f | moritz++ | src/multi-dispatch.pod:
remove superfluous semicolons
13:01
masonkramer masak: so the signature should include a pair for each named attr that I want to be set in the default way? 13:04
jnthn s/pair/named attributive parameter/
.oO( that's a mouthful... )
13:05
masak masonkramer: yes. consider that the workaround.
when attr initialization works correctly, those won't be needed. but your code will still work.
masonkramer Thanks, I'm going with it 13:06
13:08 Mowah joined
masak oh, oh! news from the Druid front. I've spent the last month or so prototyping Druid computer players in Perl 5. I'm now confident that I'll be able to produce a competitive Perl 6 computer player for Druid. 13:13
jnthn \o/ 13:14
masak it's a captivating process, getting insights about abstractions, and then implementing them enough to get the next insight :) 13:15
it's also exhausting.
13:17 Patterner left 13:19 Psyche^ joined, Psyche^ is now known as Patterner
masonkramer would fixing BUILD be a reasonable entry-level Rakudo project, or not? 13:24
masak masonkramer: see my musings and problematizing at irclog.perlgeek.de/perl6/2010-09-26#i_2865826 13:25
13:35 ash_ left 13:39 Italian_Plumber left
moritz_ does druid work with current rakudo? (as opposed to alpha) 13:41
13:42 plobsing joined, tadzik left
masak nope. 13:45
I'd like to be able to say that I'm working on it, but that's true only in the loosest sense of the term.
13:45 schpey left 13:49 miso_soup joined
colomon masak: do you have any feel for what the issues are? 13:51
masak yes. currently blocking on old model not working under new Rakudo, and tuits to convert it to a model that does. 13:52
more to the point, old Druid has a base class with regex members, suffering from at least two regressions making them not work.
the two that I can remember right now are (1) can't call an our-scoped rule from a rule, and (2) when working around (1), can't make a proper hierarchy of matches. 13:53
colomon hmmm 13:55
13:56 tadzik joined 13:58 satyavvd joined 14:00 satyavvd_ joined 14:02 satyavvd left, satyavvd_ is now known as satyavvd 14:03 dual left
masak I'm sure there are ways to solve it; my brain is just stuck in the old design, and would need to shift gears a bit to remake Druid. 14:05
14:08 supernovus joined, patspam joined, patspam left
supernovus It seems the server hosting perl6.org (feather?) is down. 14:09
phenny supernovus: 22 Sep 20:16Z <tadzik> tell supernovus HashConfig's missing deps.proto
supernovus tadzik: added deps.proto to HashConfig 14:11
dalek odel: e576843 | jnthn++ | dotnet/compiler/Actions.pm:
Set up $?CLASS variable so we can always find the type object for the current class, which we'll need for attribute lookups.
14:14
masak fwiw, proto treats no deps.proto and an empty one equivalently. 14:15
14:17 JimmyZ joined
supernovus masak: That's good to know. In this case, HashConfig depended upon json (since I made that the default serialization format) but I forgot to add json as a dependency. 14:18
Does pls still use deps.proto? I seem to recall seeing a bit of code that scanned for 'use' lines. 14:19
14:20 hugme joined, ChanServ sets mode: +v hugme
dalek odel: 159250a | jnthn++ | dotnet/runtime/Metamodel/Representations/P6opaque.cs:
Need to actually store the number of slots so we do allocations properly. D'oh.
14:20
odel: 1ea7ed6 | jnthn++ | dotnet/runtime/Runtime/Ops.cs:
Fix some naming thinkos and make bind_attr[_with_hint] a little more convenient for the code generator.
odel: c7ab6ac | jnthn++ | dotnet/compiler/PAST2DNSTCompiler.pm:
Implement basic attribute get/bind by starting to fill out the handler for PAST::Var nodes with attribute scope.
14:22 risou left, wurens joined 14:23 aloha left, risou joined 14:25 aloha joined
wurens where can i download perl 6? 14:27
nymacro rakudo.org 14:28
moritz_ wurens: rakudo.org/how-to-get-rakudo
rakudo is a Perl 6 compiler
nymacro moritz_ is always on the ball
wurens github.com/rakudo/star/downloads
is it?
moritz_ yes
wurens why doesn't just name it perl 6? 14:29
moritz_ wurens: for the same reason that there's not "C", but gcc, msvc, icc etc.
and no "fortran", but a gnu fortran compiler, intel fortran compiler etc. 14:30
in all three cases there's the distinction between language and compiler
JimmyZ rakudo builds a perl6.exe on windows :) 14:32
wurens so, rakudo will be quite different from perl 5? 14:34
moritz_ it already is quite different from perl 5
supernovus Rakudo already is quite different from perl 5 :-)
14:36 wolfman2000 joined
supernovus All Perl 6 implementations will be quite different from Perl 5. In my opinion Perl 6 and Perl 5 are two completely different languages, which both happen to be members of the Perl family, and share a common heritage and culture. 14:36
wolfman2000 supernovus: Speaking of implementations...it's time I put Perl6 on my MacBook Pro again. I forgot the usual order of how to do things: do I just need Rakudo, or are there other parts? 14:38
wurens I wonder whether modules for Perl 5 can be used by Rakudo?
wolfman2000 wurens: I believe I saw something that can allow some Perl5 modules to work 14:39
I don't recall what though: that was months ago
moritz_ wurens: they can, through blizkost (the parrot <-> perl 5 bridge). It's rather fragile though, and it needs more work
supernovus wurens: There are ports of several Perl 5 modules into Perl 6. As for using Perl 5 modules directly in Perl 6, there is a project called Blizkost, which I believe in included in Rakudo Star, but it's not entirely complete yet, and not all modules work.
Grimnir_ I'm really impressed with Perl6. I have mostly just read a little and i'm reading the perl advent from last december, but it's so cool. It seems it has all the stuff I like from Perl 5, and then it has loads of niceness Perl 5 (and often other languages) don't have
supernovus ah, moritz_ beat me to it :-)
moritz_ Grimnir_: well said; that pretty much summarizes my view of Perl 6 too :-) 14:40
supernovus wolfman2000: If you get the Rakudo Star distribution, it comes with the pre-requisites and a few bundled libraries too.
wolfman2000 supernovus: Will it matter if I use one of the release builds or the github source? 14:41
Grimnir_ I just want to applaud the Perl6 developers with the great work :)
moritz_ thanks :-)
Grimnir_ moritz_: I rarely see so many really nice features in languages
I so much look forward to a stable feature complete compiler
wolfman2000 Grimnir_: I personally like putting parameter requirements in the sub definition 14:42
As well as defining new types
or at least new operators
Grimnir_ :)
wolfman2000 We can now use ≤ and ≥ as intended! MWA HA HA HA!
supernovus wolfman2000: If you want the github source, you can use '--generate-parrot' when running the configure script and it will download parrot for you. That's what I do when building from git (usually on a daily basis)
Grimnir_ I haven't really done anything in Perl6 besides a few tests from reading about it, but I guess I should do some more stuff 14:43
wolfman2000: yeah, that's a nice thing
wolfman2000 supernovus: Forgot that parrot has to be generated...but good to know.
Grimnir_ I have a question regarding the compile process. when I write a perl6 program and compile it the way I normally do with perl 5, it first compiles it to bytecode, right? And then the bytecode gets interpreted, right? 14:44
wurens well, I don't know how to solve the gcc version problem when i install one of my software. The gcc version is too old for that software, how can i solve that? ps. I don't have the root permission
wolfman2000 Grimnir_: Umm...this may be silly here...but there is no configure script in the github
So how can I configure and then make?
Grimnir_ wolfman2000: what do you mean? 14:45
wolfman2000 github.com/rakudo/star There is a makefile, but no configure
moritz_ Grimnir_: it's really the compiler's choice. Rakudo compiles to bytecode first
wolfman2000: if you want to install rakudo star, use a tarball from the download tab on github 14:46
Grimnir_ moritz_: so performance-wise I guess it must perform a lot better than Perl 5?
wolfman2000 ...huh? Found it...wonder why it's in skel
moritz_ Grimnir_: it's much worse than perl 5 at the moment; but we're working on it
wolfman2000 moritz_: Anything wrong with using the source?
Grimnir_ moritz_: heh, ok, but eventually it will become much faster :)
moritz_ wolfman2000: it's the source for building a distribution, not the distribution itself
wolfman2000: if you want to compiler from source, take the compiler directly (and not a distribution) 14:47
Grimnir_ how do I compile a perl6 script to bytecode and then later run the bytecode program?
wolfman2000 ah
moritz_ Grimnir_: currently perl6 --target=pir script.pl > script.pir 14:49
then parrot -o script.pbc script.pir
the .pbc file is a byte code file
Grimnir_ ok, nice
moritz_ and then pbc_to_exe script.pbc script 14:50
the result is an elf binary on linux, and an .exe on windows
(but it just loads parrot and the pbc file and runs it, so it's a bit of a cheat) 14:51
Grimnir_ I get an error when I try to run the bytecode file 14:52
moritz_ care to tell which error? 14:53
Raynes Does rakudo have threads yet? 14:54
Grimnir_ pastie.org/1182543
moritz_ no
Raynes Damn. ;|
Grimnir_ it does do some of the script, but then it writes some strange stuff 14:55
Raynes: patience :)
moritz_ Grimnir_: the error is caused from die() within the script
Grimnir_: it expects two command line arguments, which you didn't supply
Grimnir_ yeah, but I also get the error, when I supply the two arguments 14:56
oh, 2 secs...
no
pastie.org/1182543 14:57
moritz_ does it work if you run the original script with the perl6 executable? 14:58
Grimnir_ yes
moritz_ maybe argument handling is broken in one of the steps...
indeed 14:59
Grimnir_ do I have to run the pbc file in a certain way with rakudo?
moritz_ submits rakudobug
tadzik supernovus: @deps.proto, it does
moritz_ Grimnir_: no 15:00
tadzik scanning for deps is done by ufo (or nowadays, Module::Build) to figure out compilation oerder
moritz_ it's a bug in rakudo; as soon as you compile to PIR, the command line arguments come up empty
Grimnir_ ah, ok
moritz_ Grimnir_: you see, we can use every bit of testing :-) 15:02
supernovus tadzik: Good to know. By the way, where would I find Module::Build?
moritz_ that bug wasn't known before
Grimnir_ moritz_: nice :)
I'm off. keep up the good work :) 15:04
moritz_ Grimnir_++
colomon does it make sense to define new methods for a role? 15:07
15:07 masonkramer left, masonkramer joined
moritz_ what do you mean? 15:08
masak supernovus: pls doesn't yet, but should, scan deps.proto.
supernovus I can't find Module::Build (at least a perl6 version) anywhere. I've seen a few people mention it as a replacement for ufo, but it's not in the projects.list file, and I can't find a blog post about it. :( 15:09
colomon moritz_: I'm working at ABC again, trying to define a note duration role.
and I'm trying to figure out how to initialize the duration's length attribute.
I wrote two new methods without thinking about it, then said -- Wait, how do I call them? 15:10
I've only ever done abstract roles in the past, I think.
moritz_ is the length supplied by the user?
if yes, just let the standard constructor handle it
if not, mix in your custom BUILD submethod 15:11
(ie write it in the role)
bbl
colomon danke
I clearly need more thought on this. 15:12
perhaps I should start a blog post on it. :)
moritz_ $ ./perl6 -e 'say Any + 3' 15:13
Use of uninitialized value in numeric context in <anon> at line 1
3
15:13 wurens left
moritz_ notice the sensible line number :-) 15:13
colomon noticed. :) 15:16
15:16 dual joined
moritz_ it'll regress one test 15:17
which uses lives_ok { } and produces that warning inside 15:18
and since try { } catches warnings now, it looks like it fails 15:19
supernovus nm, I found Module::Build
moritz_ where? 15:20
supernovus github.com/tadzik/perl6-Module-Tools
15:21 petdance joined
moritz_ thanks 15:21
wolfman2000 alright, going through the rakudo tests to see if anything went bust
...and spectest isn't happening. svn: Server sent unexpected return value (403 Forbidden) in response to OPTIONS request for 'svn.pugscode.org/pugs/t/spec' 15:22
moritz_ wolfman2000: rm -rf t/spec/
and then try again
pugs svn is no more.
wolfman2000 still does it, even after removing the directory. I suspect the spectest lives somewhere else and the makefile needs to be configured to the new location 15:23
moritz_ wolfman2000: is that a new rakudo?
from source?
wolfman2000 latest binary version
2010.08
moritz_ wonders why it fetches stuff from svn 15:24
wolfman2000: try
git clone git://github.com/perl6/roast.git t/spec
wolfman2000 it cloned alright
want me to make spectest again?
moritz_ no need; the tests have moved on, the compiler not 15:25
(which is why we usually include a snapshot of the test suite, and don't download the latest from svn)
some will hang if you try... no fun involved
15:25 PhatEddy joined
wolfman2000 well, Perl6 is installed...now I just have to recall where 15:26
moritz_ reading > recalling 15:27
wolfman2000 found it
PhatEddy Am I the only one doing smolder reports on Win32? Is anyone else having trouble with git integration in the Makefile on Win32? 15:29
moritz_ wouldn't be surprising 15:30
the makefile uses backticks, which won't work on windows :/
15:33 JimmyZ left
dalek ast: 48f7ecf | moritz++ | S03-operators/range.t:
[range.t] fudge a test that my next rakudo commit will break
15:36
15:36 petdance left
supernovus tadzik: you committed a cardinal sin! Inside mbuild there is a line that says #!/usr/bin/perl6 instead of #!/usr/bin/env perl6 15:38
dalek p-rx/nom: c51bdac | jnthn++ | src/NQP/Actions.pm:
Refactor package setup to keep up with the latest JnthnNQP changes. Gives $?CLASS. Really want that to be lexical at some point, but can't do that in Parrot - yet.
15:39
15:40 FurnaceBoy joined 15:42 Limbic_Region joined
PhatEddy moritz_: I just had luck taking the "curl -F ...." command with backticks and running it with sh --login -c "curl -F ...". It seems to have posted to smolder correctly. 15:43
tadzik supernovus: oh, my bad 15:46
maybe that's why it suc*&$!
supernovus tadzik: btw, neutro works great, I let it install perl6-Module-Tools for me, and it worked perfectly :-)
tadzik nice :)
supernovus: gitpushed, thanks 15:47
supernovus tadzik: No prob. I know I've done the same thing. :-)
15:51 wolfman2000_ joined, Trashlord left 15:54 am0c^ left 15:55 wolfman2000 left, wolfman2000_ is now known as wolfman2000
dalek kudo: 08dc36c | moritz++ | src/Perl6/BacktracePrinter.pm:
walk up to the first non-setting line when printing warnings
15:55
kudo: 8584a4f | moritz++ | src/core/Any.pm:
make "Use of uninitialized value in numeric context" a proper warning

This regresses one test that produces such a warning in a lives_ok block, because currently try { } catches warnings too, although it shouldn't.
16:02 wolfman2000 left 16:03 satyavvd left 16:04 zulon left
torehaug for just checking that the syntax in a script is ok I could use STD::parse() right? or does it run the code? 16:05
16:05 wolfman2000 joined
tadzik how about perl6 -c foo.pl? 16:06
torehaug hm, would like the awsome(tm) error messages from STD for perl5-like stuff 16:07
16:09 masonkramer left
supernovus Have a good day #perl6! 16:09
tadzik supernovus: wait wait
supernovus tadzik: ok 16:10
tadzik just a question, on what platform were you using neutro?
supernovus At the moment, Ubuntu Linux. I also have some Debian servers and a Windows laptop. I haven't tried it on Windows yet.
tadzik I'm looking forward to a windowseer trying it out
alright, have a good day then : 16:11
:)
supernovus you too
16:11 supernovus left
tadzik hmm, I feel like fixing advent calendar 16:12
dalek p-rx/nom: 57ae6b3 | jnthn++ | src/NQP/Actions.pm:
Copy/port code from JnthnNQP to make the attribute initialization calls.
16:13
p-rx/nom: a4e3a15 | jnthn++ | src/ops/nqp.ops:
Add various boxing/unboxing ops that work directly with the REPR API. They pretty much match what's in 6model on .Net/JVM (so can easily have them all behind an nqp::foo in the future).
jdv79 jnthn: nice post. i didn't know there were 2 MOPs. 16:14
tadzik which post
jdv79 i think on 9/20
6guts
tadzik ah, I think I read that 16:15
jdv79 its old. the week consumed me. just catching up.
jnthn jdv79: Glad you enjoyed it. :-) 16:17
16:18 justatheory joined 16:19 Italian_Plumber joined
tadzik moritz_: ping 16:20
perl6advent.wordpress.com/2009/12/2...d-actions/ grep for "Print the question", why exactly do we need to .flat the $match<question>? 16:21
moritz_ tadzik: pong
because $match<question> is a scalar
tadzik a Match? 16:22
moritz_: ↑ 16:24
no, it says Array(). Hrm
moritz_ rakudo: my @a = 1, 2, 3; .say for @a 16:25
16:25 Trashlord joined
p6eval rakudo d7ebff: OUTPUT«1␤2␤3␤» 16:25
moritz_ rakudo: my $a = [1, 2, 3]; .say for $a 16:26
p6eval rakudo d7ebff: OUTPUT«1 2 3␤»
moritz_ @a is an array, $a is a scalar holding an array
tadzik hmm. The fact that it's kept inside a scalar matters?
I see
moritz_ yes
tadzik „We need to use .flat, because $match<question> is an array held in a scalar object.” -- sounds ok? 16:27
moritz_ yes
masak s/object/container/
tadzik right 16:28
...am I the only one with a habit to press the escape key after editing a form on the web page?
masak :)
moritz_ tadzik: not at all 16:29
wolfman2000 ...wow...I forgot that I contribtued to last year's calendar
PhatEddy I just remembered the other problem with git integration on win32. If you put msys git on you path nothing builds with mingw32-make because the shell is wrong.
masak wolfman2000! \o/
PhatEddy Anyone using any git on win32 besides msys? 16:30
wolfman2000 PhatEddy: I've used git before on Windows...though I think that installation was somewhat messed up
dalek p-rx/nom: 66087dc | jnthn++ | src/metamodel/knowhow_bootstrapper.c:
Implement add_attribute in KnowHOW's HOW.
16:31
PhatEddy I am getting it to work I just change commands to something like "C:\Program Files\Git\bin\sh.exe" --login -c "git pull". Anyone with a better clean answer? 16:32
Is there an svn mirror? 16:33
Util PhatEddy: I was going to suggest that sh.exe technique 16:37
We could make finding GIT's location part of Configure.pl, and $(GIT) a `make` variable with the sh.exe technique. 16:39
Hmmm. Could we create a git.bat in the existing path, and just use that, without messing with Configure and Makefile? 16:40
tadzik wklej.org/id/393792/ can someone take a look? It becomes weird at the end
PhatEddy I think there is also a way of forcing mingw32-make to use cmd.exe as its shell - still looking for that though ... 16:41
dalek p-rx/nom: 47cdd79 | jnthn++ | src/metamodel/knowhow_bootstrapper.c:
Add first close enough for now cut of introspection of attributes, parents (never any) and methods for knowhows.
16:42
PhatEddy Util: think I found it with "shell=cmd" in the make file 16:44
tadzik hey, grammar masters! 16:46
16:50 Sarten-X joined
tadzik perl6.org/ -- how about changing u4x link for the link to Book? 16:50
masak the book would certainly be more informative at this point. 16:52
16:52 ash_ joined
tadzik gitpushed 16:53
masak: ideas about this grammar madness of mine? 16:54
I'm trying to fix the advent calendar
masak tadzik: sorry, haven't been following along closely.
tadzik wklej.org/id/393792/
look at the very end
masak ok.
dalek href="https://perl6.org:">perl6.org: d97c5eb | tadzik++ | source/index.html:
Changed the main page u4x link to link to the Book
16:55
masak tadzik: that does seem strange.
hm.
tadzik indeed
masak I wouldn't expect to get Question that way, though. 16:56
16:56 risou left
masak not through positional indexing. 16:56
I'd get it through .ast
tadzik my @questions = Question::Grammar.parse($text, :actions($actions)).ast;
16:56 risou joined
masak hm. 16:56
tadzik is there a need to call .ast even inside?
masak think so. 16:57
moritz_ tadzik: my @question = flat Question::Grammar.parse(...).ast
16:57 risou left
tadzik moritz_: why the need for that? 16:57
16:57 risou joined
tadzik I don't remember such issues with Config::INI 16:57
what is more, flat doesn't help
moritz_ tadzik: I don't say there's a need, just that you could try it
tadzik nah, same thing
16:59 molaf joined
moritz_ @questions has one elem 16:59
tadzik yep
moritz_ hm, .flat at the end seems to help
tadzik a list. Which contains a list, blah blah
yeah, helps. Any idea why does it go that way? 17:00
moritz_ not really
tadzik damn. I don't feel like "dunno why, but this works" in the Advent Calendar 17:01
17:02 risou left
moritz_ probably because $/.ast is also a scalar 17:02
dalek p-rx/nom: 9cf3f34 | jnthn++ | src/pmc/rakudoobject.pmc:
Make get_attr_keyed and set_attr_keyed v-table methods forward to the representation (will see how long we can get away with not implementing get_attr_str and set_attr_str, which just don't fit Perl 6 and are a real pain under the new meta-model).
17:05
17:08 miso_soup left 17:10 nymacro left
moritz_ book quesiton: any objection to swapping the position of the OO and the multi chapter? 17:10
ie make OO come before multis? 17:11
you need to know about inheritance to actually understand narrowness
jnthn moritz_: Hmm. Then I guess we can cover multi-methods in the multi chapter not the OO one.
moritz_: Yeah, you do.
Plus OO is really quite fundemental in Perl 6.
moritz_ iirc there's no multi method coverage at all
jnthn ah, OK
Anyway, my initial reaction is to do OO first.
masak for me it doesn't matter, so I say go for it. 17:13
moritz_ afk, walk; then chapter reordering 17:14
jnthn Hmm, a walk isn't a bad idea... 17:15
17:15 colomon left
dalek p-rx/nom: 7f42787 | jnthn++ | build/PARROT_REVISION:
Bump PARROT_REVISION to get 2-kid form of PAST::Var attribute nodes.
17:17
p-rx/nom: d01f705 | jnthn++ | src/NQP/Actions.pm:
For attribute lookups using the new meta-model, also need to provide $?CLASS.
tadzik yay, finished fighting with wordpress. Perl6advent Grammar chapter is now up-to-date and working 17:22
17:31 mfollett joined 17:43 justatheory left
moritz_ tadzik++ 17:49
tadzik the Book chapter still ahead
dalek ok: ba5aef7 | moritz++ | Makefile:
move chapters: OO now comes before multi dispatch

To understand narrowness you need inheritance / sub types
17:51
wolfman2000 how's the book coming along?
masak tadzik++
17:52 xinming left
moritz_ wolfman2000: I've been working on it a lot today 17:53
17:53 xinming joined
moritz_ jnthn: I'd appreciated it if you could look over my recent commits to the backtrace printer, and confirm that it's the right direction 17:54
17:56 justatheory joined 17:58 ZadYree joined
ZadYree perl6: $foo = [sub {say "BAR"}, sub {say "BAZ"}]; for($foo){$_->()}; 18:00
18:00 petdance joined
p6eval rakudo 8584a4: OUTPUT«===SORRY!===␤Unsupported use of ->(), ->{} or ->[] as postfix dereferencer; in Perl 6 please use .(), .[] or .{} to deref, or whitespace to delimit a pointy block at line 22, near ")};"␤» 18:00
..pugs: OUTPUT«*** ␤ Unexpected " ="␤ expecting "::"␤ Variable "$foo" requires predeclaration or explicit package name␤ at /tmp/8E04s0F1Ne line 1, column 5␤»
moritz_ rakudo++ # good error message
ZadYree ok
tadzik karma rakudo
aloha rakudo has karma of 1.
tadzik :)
ZadYree where would be the error?
moritz_ did you read the error message? 18:01
wolfman2000 perl6: $foo = [sub {say "BAR"}, sub {say "BAZ"}]; for($foo){$_.()}
ZadYree i kinda sis
p6eval rakudo 8584a4: OUTPUT«===SORRY!===␤Missing block at line 22, near ""␤»
..pugs: OUTPUT«*** ␤ Unexpected " ="␤ expecting "::"␤ Variable "$foo" requires predeclaration or explicit package name␤ at /tmp/MqG4Ow9_Yk line 1, column 5␤»
ZadYree did
wolfman2000 ...did I miss something?
18:01 justatheory left
moritz_ for($foo) is a sub call 18:01
masak some_word(...) is always a sub call. 18:02
moritz_ rakudo: my @foo = sub { say "BAR" }, sub { say "BAZ" }; for @foo { .() }
p6eval rakudo 8584a4: OUTPUT«BAR␤BAZ␤»
masak also, $foo, being a scalar, wouldn't auto-flatten.
only @foo (as moritz_++ just showed), or $foo.list
tadzik or $foo.flat? 18:03
moritz_ rakudo: .say for [1, 2].list 18:05
p6eval rakudo 8584a4: OUTPUT«1␤2␤»
moritz_ rakudo: .say for [1, 2].flat
p6eval rakudo 8584a4: OUTPUT«1␤2␤»
moritz_ works both
wolfman2000 then what's the difference?
18:05 Limbic_Region left
flussence rakudo: [1, [2, 3]].list.perl.say; [1, [2, 3]].flat.perl.say; 18:06
p6eval rakudo 8584a4: OUTPUT«[1, [2, 3]]␤[1, [2, 3]]␤»
flussence shrugs
moritz_ .perl always assumes scalar context
so it's not a good tool to show the difference, if one exists
jnthn moritz_: The patch looks sane. 18:07
moritz_ rakudo: say (1, (2, 3)).list.perl
p6eval rakudo 8584a4: OUTPUT«(1, (2, 3))␤»
moritz_ rakudo: say (1, (2, 3)).flat.perl
p6eval rakudo 8584a4: OUTPUT«(1, 2, 3)␤»
moritz_ that's the difference.
jnthn moritz_: It probably doesn't handle all the frames being mysteriously in CORE.setting sanely though
flussence seems like there might be a use for a Data::Dumper in perl6 then...?
jnthn moritz_: Though that shouldn't really happen. But if it does, then the patch here probably makes a NPMCA. 18:08
(becasue $i will be beyond the end of the array)
That nit aside, it's fine. 18:09
masak &
jnthn ponders noms 18:10
moritz_ jnthn: I thought about it, and couldn't find an example of where that might happen
jnthn No, it really, really shouldn't. :-) 18:11
moritz_ rakudo: sub MAIN() { warn "foo" }
p6eval rakudo 8584a4: OUTPUT«foo in 'MAIN' at line 22:/tmp/HMCjs3_Enk␤»
moritz_ jnthn: also I do think that I don't walk off past the end of the array
it will just give a senseless line, from deep inside the setting
jnthn The termination conditions is $i < +@backtrace, which means that if that is what causes it to terminate it'll do @backtrace[$i] where $i == +@backtrace and thus one past the end. 18:13
moritz_ oh, right
I'll fix that 18:14
jnthn moritz_++
jnthn goes to sort out food
moritz_ goes to dig in food
wolfman2000 should get food given he may be hungry soon 18:15
araujo just got working a 'for' operator over sequences.. and .. he should go and eat and then sleep .... 18:25
~> for [ { :a :b + a b } { :n * n n } ] { :f for [ 1 2 3 4 5 6 ] f } 18:26
< < 3 7 11 > < 1 4 9 16 25 36 > >
~>
as an example
18:35 wamba left
dalek kudo: 0421d3e | moritz++ | src/Perl6/BacktracePrinter.pm:
fix potential offby1 error noticed by jnthn++
18:52
18:52 kjeldahl left 18:54 rgrau` joined 19:02 envi left 19:06 kjeldahl joined 19:08 jedai left 19:10 fod joined, jedai joined 19:26 petdance left 19:28 ash_ left 19:48 molaf left 19:53 rindolf joined
rindolf Hi all. 19:53
tadzik hi rindolf
rindolf moritz_: you have a typo here - perlgeek.de/blog-en/perl-5-to-6/14-....writeback - -hackers=Larry,Damian should probably be --hackers according to the spec.
tadzik: hi. 19:54
Isn't -name equivalent to -n -a -m -e?
Or -n=ame
?
moritz_ --hackers is right
moritz_ fixes 19:55
flussence odd, in a "perl6 test.pl -name -q" with a sub MAIN(:$n, :$name, :$q), none of the params are set 20:03
moritz_ :$q should work
flussence it works when I use --q ... 20:04
sorear good * #perl6
flussence as far as I can tell, single-hyphen options just aren't working for me... 20:06
should they be?
diakopter sorear: howdy
tadzik flussence: should, but don't. Known bug I think 20:08
flussence oh, k 20:09
sorear diakopter: hi
20:14 ash_ joined 20:17 PhatEddy left
tadzik ash_: try.rakudo.org is dead :( 20:17
ash_ on it 20:18
oh
server got shutdown :-(
its back up 20:19
20:20 Chillance joined
moritz_ maybe install an @reboot cron job? 20:21
ash_ alright, i think i know enough bash to do that :-x 20:27
20:28 mfollett left 20:32 supernovus joined
masak wow! a non-p6er says the right thing in response to a Perl6/DNF joke on Twitter! twitter.com/paulhenrich/status/25619909832 20:32
supernovus tadzik: ping
tadzik supernovus: pong
masak that's gotta be a first.
Twitter is learning... :)
flussence 3 weeks from now, Twitter becomes self aware... 20:33
masak turns up the dramatic music
tadzik supernovus: ha, 1:0 for me! 20:34
supernovus I was looking at the code for Module::Install, and was thinking, currently it takes into account 'lib' for .pm and .pir files, and 'bin' for anything else. I'm assuming 'ufo' has the same behavior. There should be an agreed-upon folder for 'shared resources' such as config files, templates, etc. Heck 'share' would work for me. It should get copied into $HOME/.perl6 as well.
tadzik sounds sane 20:35
masak supernovus: could you give a use case?
I'm reluctant to just nod at such suggestions without strong use cases.
tadzik but well, what would go there what cannot be put into POD docs? 20:36
masak I can't think of anything in any of my projects that'd count as a "shared resource".
moritz_ data tables
for example if you write a module that recognizes languages by heuristics 20:37
masak put them in lib/
supernovus masak: I'm my use case, I'm going to have a script that can generate skeleton projects, based on templates. So for instance, if you typed 'ww6 new site' it would find the template called 'site' and create a skeleton app for you.
masak supernovus: and the template is a shared resource in this case? 20:39
20:39 colomon joined
tadzik hmm. We could just copy everything in lib/, not just module files 20:39
supernovus masak: Well, I think 'shared' is a bad term then. As actually in this case, the template files would be specific to the 'ww6' script which would use them to generate skeleton apps. 20:40
ash_ rakudo: my $*a = 2; { my $*a = 3; say $*a }; say $*a;
masak tadzik: that might actually be more robust, yes.
p6eval rakudo 8584a4: OUTPUT«3␤2␤»
supernovus tadzik: maybe copying everything from lib would work, in which case I could just include a 'lib/Webtoo/Resources' folder and put templates and stuff in it. 20:41
masak tadzik: but it doesn't guarantee that data files will be found by scripts or modules.
ash_ neat bug
someone open a p6 repl
type: my $*a = 3; <enter>
then: say $*a;
anyone seen that one before? 20:42
supernovus Then I could also make a library method that looks through @*INC to find the 'Webtoo/Resources' folder, so that eventually system installs will work as well.
moritz_ not me
@*INC is not a concept to be relied on in the long term future
ash_ does it crash for anyone else?
moritz_ yes
tadzik Contextual $*a not found
ash_ should i report that? 20:43
moritz_ yep
supernovus Hmm, no @*INC long-term... crap. Okay, I have no idea what to use for a location-independent place to store data :(
20:43 torehaug left 20:44 dju left
tadzik pureperl? :) 20:44
supernovus I could again use the dark magic of eval("use $modulename") to load Webtoo::Resources::site when you type ww6 new site... and have the dynamically loaded module spit out the plain text for the template, but that seems even more hackish than having a dedicated place to put resources in $HOME/.perl6 :-P 20:46
tadzik how does Perl 5 work with this?
moritz_ +1 to a dedicated place
20:48 kjeldahl left
supernovus Perl 5 has so many different directories that it sticks stuff, and each "vendor" version introduces distro-specific folders too. 20:48
ash_ anyone know how i could go about tracking down the repl bug? 20:49
diakopter use a step-through debugger?
moritz_ 1) do magic; 2) fix the bug; 3) profit!
moritz_ has no idea
tadzik sleepytime, see you folks 20:50
20:50 tadzik left
supernovus The folder should be a combination between the '/usr/share' and '/var' concepts from *nix systems. A place to store potentially variable non-executable configuration files and resources for applications. 20:50
Juerd Configuration belongs in /etc 20:51
moritz_ mutable and immutable data should be separated
ash_ rakudo: say 1.so 20:52
20:52 mberends left
p6eval rakudo 8584a4: OUTPUT«Bool::True␤» 20:52
ash_ does that mean bug # 77454 is fixed?
Juerd Mutable data can be further separated: some data should never be changed by anything but the program, some data can be changed externally
plobsing and for user application data, you need to follow the xdg settings
ash_ [TODO] Implement .so in Rakudo
moritz_ ash_: yes 20:53
ash_ cool, (i can't close tickets, just browsing them)
20:53 colomon_ joined, colomon left, colomon_ is now known as colomon
moritz_ closed, thanks 20:54
supernovus So, that would mean a 'share' (immutable resources), 'var' (mutable by application) and 'etc' (mutable by user) type model. Which is starting to get fairly complex for a simple installer. Maybe have them all inside a 'app' or 'usr' folder so things don't get quite as messy in $HOME/.perl6 ? 20:56
flussence what about standards.freedesktop.org/basedir-s...atest.html ? 20:58
moritz_ is all in favour of using well established standards, if the exist, and cover our needs 20:59
moritz_ -> sleep
supernovus flussence: I have no problems with that. As long as it would work on Windows builds as well. I haven't used Rakudo on Windows, so I'm not sure how it works, but we want to ensure cross-platform compatibility. 21:00
flussence hm
I think Windows has equivalent standard dirs...
diakopter erm 21:01
sortakinda
supernovus But is it something that a library like Module::Install can access easily? Right now it uses %*ENV<home>/.perl6/ as the location for 'lib' and 'bin' folders, regardless of platform. 21:02
plobsing port File::HomeDir to perl 6?
supernovus err, %*ENV<HOME> sorry, needs to be all capitals there :-) 21:03
diakopter windows doesn't have that
flussence windows calls it %userprofile% or something like that IIRC
diakopter first, windows envvars aren't case-sensitive
yes 21:04
there are also these:
supernovus Ah, well, that may explain why tadzik was asking if any Windows users had tried mbuild yet. I should see what 'ufo' does, or does it work on Windows either?
diakopter these may help.... some seem to correlate to var,share,bin ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\mwilson\AppData\Roaming CommonProgramFiles=C:\Program Files\Common Files LOCALAPPDATA=C:\Users\mwilson\AppData\Local ProgramData=C:\ProgramData ProgramFiles=C:\Program Files PUBLIC=C:\Users\Public 21:06
defaults on win7, btw
supernovus diakopter: thanks! 21:07
plobsing looking at File::HomeDir::Win32, it looks like windows keeps those settings in the registry 21:09
diakopter the env vars are created from the registry, yeah 21:10
21:10 jjore joined 21:12 Mowah left
supernovus phenny: tell tadzik I'll port File::HomeDir, File::HomeDir::Win32 and File::BaseDir into a new Perl 6 library, then if agreed we could make Module::Install use it to find the appropriate folders for mutable and immutable resources. 21:13
phenny supernovus: I'll pass that on when tadzik is around.
plobsing where is .so spec'd? 21:14
sorear I'd check the ELF docs
masak zzz 21:15
supernovus masak: If we had a library that supported the XDG standards on *nix and the Windows standard locations on Windows, would that be an acceptable choice for you?
21:15 masak left
sorear but it's more of a convention than anything else 21:15
supernovus nm
sorear Module::Install is being ported to Perl 6? :(
supernovus masak abandoned ship before I got my question out
plobsing sorear: not what I meant. the Perl 6 method.
21:15 lue joined
supernovus sorear: Module::Install in this case is not the same as the Perl 5 library. It's part of tadzik's Module-Tools which includes Module::Build, Module::Test and Module::Install. It works more like 'ufo' than the Perl 5 library, and has it's own command 'mbuild' so you just type 'mbuild && mbuild test && mbuild install'. It has no dependencies on GNU make and doesn't require a Makefile (it uses logic based on 'ufo') 21:17
github.com/tadzik/perl6-Module-Tools 21:20
21:21 Italian_Plumber left
plobsing rakudo: my $x = False but True; say $x; say !$x 21:24
p6eval rakudo 0421d3: OUTPUT«Bool::False␤Bool::False␤»
flussence now that's just nasty :P
plobsing rakudo: my $x = False but True; if $x { say $x } 21:25
p6eval rakudo 0421d3: ( no output )
supernovus have a good day #perl6 :-)
21:26 supernovus left 21:27 tadzik joined
tadzik hates insomnia 21:27
phenny tadzik: 21:13Z <supernovus> tell tadzik I'll port File::HomeDir, File::HomeDir::Win32 and File::BaseDir into a new Perl 6 library, then if agreed we could make Module::Install use it to find the appropriate folders for mutable and immutable resources.
tadzik oh hai phenny
phenny: tell supernovus we could put them in File::Tools and then Module::Install would make use of 'em, it depends on File::Tools anyway 21:28
phenny tadzik: I'll pass that on when supernovus is around.
21:29 rindolf left, DemoFreak left 21:30 petdance joined 21:40 icwiener_ left 21:53 Guest23195 left
dalek ecza/mm: d391770 | sorear++ | src/CSharpBackend.pm:
[mm] implement lexical access
21:58
ecza/mm: a69c7ac | sorear++ | src/C (3 files):
[mm] implement code output

  [mm] can now run simple programs, \o/.
p-rx/nom: 914e08d | jnthn++ | src/metamodel/reprs/P6opaque.c:
Implement attribute slot allocations. Same algorithm as used in the .Net version.
22:01
22:02 petdance left, petdance joined 22:04 masonkramer joined 22:05 xabbu42 left 22:06 rgrau` left
sorear still doesn't have settings or variables working, but at least Q:CgOp { (rnull (rawscall Console.WriteLine (s "Hello, world"))) } works 22:11
diakopter :)
22:15 risou joined
dalek p-rx/nom: ad12be1 | jnthn++ | src/metamodel/reprs/P6opaque.c:
Implement the slot-storage, non-optimized case of attribute lookups in P6opaque. Enough to get us working attributes in KnowHOW, and in a position to start working on ClassHOW. \o/
22:19
p-rx/nom: 1ca4411 | jnthn++ | src/metamodel/reprs/P6opaque.c:
Oops, left debugging code in.
jnthn This probably also means I don't have to write too much more C for a while. :-) 22:20
diakopter jnthn: what do you get to write? :) 22:27
jnthn NQP ;) 22:28
Thinking about it, I probably have to return to do some more ickle bits in C in not so long though.
diakopter ickle?
jnthn little :-)
Britt-slang. :-)
diakopter wonders what language
oh
jnthn wonders which dialect he got that one from... 22:29
tadzik . o O ( what language... C, NQP or BritishEnglish? )
diakopter jnthn: fyi I'm writing a new edition of perlesque.. one written expressly to compile a strongly-typed-inferred edition of STD's parsetree of [itself and a P6 port of Cursor]. a very small subset of a strongly-typed p5 (or javascript without javascript objects, if you like), really. 22:32
jnthn diakopter: Interesting. What will it target? 22:33
diakopter CIL, same as perlesque 22:34
.. so that STD can run in the CLR 22:35
jnthn Nice.
diakopter partly as an efficiency experiment b/c I'm morbidly curious..
and partly b/c that'll bootstrap the front-end... so what remains would be a runtime to write, in perlesque 22:36
which you can think of as strongly-typed nqp (note the lack of -rx) :) 22:37
jnthn For writing a Perl 6 runtime in "Perl 6", I think a strongly typed subset is the way to go.
diakopter AGREES (SHOUTING INTENDED FULLY)
:D 22:38
tadzik pun indented
diakopter heh
jnthn lol
diakopter STD & Cursor are basically strongly-typed already 22:39
just implied.
jnthn Do you aim to infer it from them as they are today rather than use an annotated version? 22:40
diakopter with some good heuristics or perhaps some helpful comments (:D) in the source, perlesque can infer correctly
jnthn :-)
Apparently if I show up at $place-i'm-consulting early enough there's free breakfast noms. It feels like a trap, but I figure I gotta try it at least once. :-) 22:41
jnthn gets some rest
diakopter also remaining to write would be the viv equivalent, in the strongly-typed-subset
jnthn *nod*
diakopter will rely on sorear for that. 22:42
sorear has lots of practice writing that piece
jnthn diakopter: Well, if you can make it work, it'll certainly be interesting. Plus we stand to learn a good bit about Perl 6 type inference from it.
diakopter I dunno. I think std is quite simple in that usage. 22:43
we'll see.
jnthn: rest well
jnthn Thanks. Night all
22:44 am0c^ joined
diakopter gets all manic again about the next new plan and fails to conceal excitement as usual. 22:45
22:46 Amadiro joined
diakopter my previous plans relied on me actually *understanding* Cursor.pm, whereas now I just need to make a version of it that STD can parse into something mildly intelligible 22:46
22:48 petdance left 22:50 Ross left 22:57 DemoFreak joined 23:15 tadzik left 23:16 mavrc joined 23:26 DemoFreak left 23:31 petdance joined 23:35 PZt left 23:36 PZt joined 23:40 hugme left
ash_ rakudo: say 1.so, 1.defined 23:40
p6eval rakudo 0421d3: OUTPUT«Bool::TrueBool::True␤»
23:58 pythonian4000 joined