»ö« 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
replore left
00:01
gbacon left
00:02
pnu left
|
|||
dalek | ecs: 6b021ee | larry++ | S03-operators.pod: Take a first quack at defining "duck mapping" In which we bias unary hypers toward a shallow interpretation if the node in question responds to the operator, for a strict definition of "responds to" not including Cool coercions. |
00:03 | |
ecs: fa5e087 | larry++ | S12-objects.pod: Merge branch 'master' of github.com:perl6/specs |
|||
00:04
pnu joined
|
|||
TimToady | oh, good grief, what happened to my edits? | 00:08 | |
diakopter | I see stuff in the first url | ||
[Coke] | rakudo: for 1, 2, 3 { sub foo {}; .say } | ||
p6eval | rakudo 38907e: OUTPUT«Too many positional parameters passed; got 1 but expected 0 in block <anon> at /tmp/smwPX3cVYX:1 in method reify at src/gen/CORE.setting:3752 in method reify at src/gen/CORE.setting:3657 in method reify at src/gen/CORE.setting:3657 in method gimme at src/… | ||
TimToady | any git experts know an easy way to get 6b021ee merged back in? | 00:10 | |
and what I did wrong? | |||
[Coke] | I blame emacs. | 00:11 | |
(sorry, I'm usually asking the git questions here. ;) | |||
rakudo: for 1, 2, 3 -> { sub foo {}; .say } | |||
p6eval | rakudo 38907e: OUTPUT«Too many positional parameters passed; got 1 but expected 0 in block <anon> at /tmp/7n6PMmUEgH:1 in method reify at src/gen/CORE.setting:3752 in method reify at src/gen/CORE.setting:3657 in method reify at src/gen/CORE.setting:3657 in method gimme at src/… | ||
TimToady | I did a 'git pull' like it said, and then a push, and it blows away my version | 00:12 | |
diakopter | TimToady: I see your edits in S03 | ||
TimToady | oh, that would explain it :) | ||
[Coke] | I typically do "git pull --rebase" to avoid any mergy bits. | ||
TimToady feels more than unusually stupid right now... | 00:13 | ||
diakopter | oh, now I see what you are asking, I think | ||
00:13
soh_cah_toa joined
|
|||
ingy | I got make and make install working for pugs now | 00:13 | |
TimToady | diakopter: the git issue was just a PEBCAK | ||
too many other things on my mind... | 00:14 | ||
00:15
Chillance left
|
|||
ingy | pugs: say 3 | 00:15 | |
p6eval | pugs: OUTPUT«3» | ||
[Coke] | ZOMG IT'S ALIVE! | 00:16 | |
ingy | not my doing... | ||
maybe it never died afterall | |||
[Coke] | rakudo: class A {}; class B {}; subset C of A & B; say C ~~ A;say C ~~ B | 00:17 | |
p6eval | rakudo 38907e: OUTPUT«Type check failed in assignment to '$v'; expected 'Mu' but got 'C' in method REIFY at src/gen/CORE.setting:4391 in method reify at src/gen/CORE.setting:3657 in method reify at src/gen/CORE.setting:3657 in method gimme at src/gen/CORE.setting:4015 in metho… | ||
ingy | masak: I'm ready to start PugsClub™ when you are | 00:18 | |
[Coke] | rakudo: my $a = 1; sub foo() { my $a = 2; our sub bar($x where $a) { say $x } }; bar(1); bar(2) | 00:20 | |
p6eval | rakudo 38907e: OUTPUT«Could not find sub &bar in block <anon> at /tmp/XCB2X1q5A9:1 in <anon> at /tmp/XCB2X1q5A9:1» | ||
[Coke] | rakudo: sub foo() { my $a = 2; our sub bar($x where $a) { say $x } }; bar(2); | ||
p6eval | rakudo 38907e: OUTPUT«Could not find sub &bar in block <anon> at /tmp/hSS1YJsEDY:1 in <anon> at /tmp/hSS1YJsEDY:1» | ||
[Coke] | rakudo: { &^c("$^a, $^b") }.("morning", "perl6ers", &say) | 00:21 | |
p6eval | rakudo 38907e: OUTPUT«morning, perl6ers» | ||
[Coke] | rakudo: say "\xFDD0" | ||
p6eval | rakudo 38907e: OUTPUT«===SORRY!===Invalid character for UTF-8 encoding» | ||
[Coke] | rakudo: say "\xFFFD" | 00:22 | |
p6eval | rakudo 38907e: OUTPUT«�» | ||
[Coke] | rakudo: say "\xFFFE" | ||
p6eval | rakudo 38907e: OUTPUT«===SORRY!===Invalid character for UTF-8 encoding» | ||
[Coke] | see lue? | ||
aloha, seen lue? | 00:23 | ||
aloha | [Coke]: lue was last seen in #perl6 2 days 2 hours ago saying "use Grammar; and use Actions;". | ||
00:26
donri left
00:31
pnu left
00:32
pnu joined
|
|||
[Coke] | nom: say [+]<264 456 7 -72> | 00:34 | |
p6eval | nom 38907e: OUTPUT«655» | ||
00:38
pnu left,
pnu joined
00:39
the-golem joined
|
|||
[Coke] | oh look, someone just has to close out 5 more tickets to get us to 650! | 00:47 | |
cognominal | I have not yet read TimToady prose but I expect it to answer my concern about recursive dwim mapping. To get something like [1,[2,3]] mapped using * * 2 into [2,[4,6]] | 00:55 | |
[Coke] | rakudo: my %h; sub h { say "srsly wtf" }; enum Foo %h; | ||
p6eval | rakudo 38907e: OUTPUT«Could not find sub &Foo in block <anon> at /tmp/P0SEYNmvr_:1 in <anon> at /tmp/P0SEYNmvr_:1» | ||
cognominal | I need a serious read of S03 to start with. | 00:56 | |
[Coke] | rakudo: role Maybe[::T] { role Just[T] {} }; say Maybe[Int].new() | ||
p6eval | rakudo 38907e: OUTPUT«Maybe<-8106445831223374807>» | ||
[Coke] | rakudo: role A { class B {} } | 00:57 | |
p6eval | rakudo 38907e: ( no output ) | ||
[Coke] | rakudo: our sub xyz($abc) { say $abc.WHAT; } xyz(1); say "alive" | 01:01 | |
p6eval | rakudo 38907e: OUTPUT«Int()alive» | ||
[Coke] | rakudo: our sub xyz($x) { say $x }xyz 3 | ||
p6eval | rakudo 38907e: OUTPUT«3» | ||
[Coke] | rakudo: our sub xyz($x) { say $x }xyz 3 | ||
p6eval | rakudo 38907e: OUTPUT«3» | ||
[Coke] | whoops. | ||
ingy | pugs: say "seen audreyt" | 01:03 | |
p6eval | pugs: OUTPUT«seen audreyt» | ||
ingy | awww | ||
diakopter | ingy: YAML::XS needs Test::More to install, but cpan doesn't try to install Test::More as a dependency | 01:04 | |
ingy | diakopter: Perl 4? | ||
diakopter | erm | ||
the-golem | Hello. I just finished setting up an ilbot to log a couple of my channels. However, the process to set up the web interface has me completely buggered. Can anyone help me out? | ||
[Coke] | rakudo: sub a( %h?) { say %h.HOW }; a(); | ||
p6eval | rakudo 38907e: OUTPUT«Method 'gist' not found for invocant of class 'Perl6::Metamodel::ClassHOW' in sub say at src/gen/CORE.setting:4957 in sub a at /tmp/W657PMmq2T:1 in block <anon> at /tmp/W657PMmq2T:1 in <anon> at /tmp/W657PMmq2T:1» | ||
diakopter | ingy: perl 5.12.4 on fedora 15 | 01:05 | |
ingy | diakopter: j/k. I thought Test::More was core for forever | ||
how could you be missing it on 5.12? | 01:06 | ||
[Coke] | ingy: since 5.6.2 | ||
diakopter | fedora must not include it in the distro perl | 01:07 | |
[Coke] | diakopter: a broken system perl? | ||
[Coke] too slow. | |||
diakopter | although actually I had the same problem on cygwin last week | ||
ingy | sounds like a bigger prob than YAML::XS | ||
[Coke] | rakudo: sub foo($x where 1 --> Int) {} | 01:08 | |
p6eval | rakudo 38907e: OUTPUT«===SORRY!===Missing block at line 1, near ") {}"» | ||
[Coke] | std: sub foo($x where 1 --> Int) {} | ||
p6eval | std 580b69a: OUTPUT«Potential difficulties: $x is declared but not used at /tmp/dS2AwKhGYy line 1:------> sub foo(⏏$x where 1 --> Int) {}ok 00:01 122m» | ||
ingy | yaml::xs requires 5.8.1 btw | ||
should be my problem, but I'd be glad to help | 01:09 | ||
maybe ask on #toolchain | |||
er | |||
diakopter | on magnet? | ||
ingy | shouldn't be my problem... | ||
aye | |||
[Coke] | rakudo: sub twigil:<@> {}; | 01:10 | |
p6eval | rakudo 38907e: ( no output ) | ||
[Coke] | rakudo: sub twigil:<@> {}; say "alive!" | ||
p6eval | rakudo 38907e: OUTPUT«alive!» | ||
ingy | diakopter: I don't declare core deps. maybe I need to :\ | 01:11 | |
[Coke] | ingy: probably safest. | ||
rakudo: say :16<10> | 01:12 | ||
p6eval | rakudo 38907e: OUTPUT«16» | ||
[Coke] | rakudo: say :16<10>.WHAT | ||
p6eval | rakudo 38907e: OUTPUT«Num()» | ||
[Coke] | should that be an Int() and not a Num() ? | ||
rakudo: :16<10> === 0x10 | 01:13 | ||
p6eval | rakudo 38907e: ( no output ) | ||
[Coke] | rakudo: say( :16<10> === 0x10 ) | ||
p6eval | rakudo 38907e: OUTPUT«Bool::False» | ||
[Coke] | (That's RT#77034 if you have an opinion) | 01:14 | |
rakudo: Any.substr(0, 1) | 01:15 | ||
p6eval | rakudo 38907e: OUTPUT«Method 'substr' not found for invocant of class 'Any' in block <anon> at /tmp/vrf7tHkzbo:1 in <anon> at /tmp/vrf7tHkzbo:1» | ||
[Coke] | rakudo: substr(Any, 0, 1) | ||
p6eval | rakudo 38907e: OUTPUT«Method 'substr' not found for invocant of class 'Any' in sub substr at src/gen/CORE.setting:1601 in block <anon> at /tmp/RxkC_OtZn2:1 in <anon> at /tmp/RxkC_OtZn2:1» | ||
[Coke] | nom: say [+]<262 458 7 -75> | 01:17 | |
p6eval | nom 38907e: OUTPUT«652» | ||
[Coke] | rakudo: class Forest { class Frog { method speak { say "ribbit ribbit" } }; has Frog $.frog; method new() { my Frog $frog .= new; self.bless(*, :$frog) } }; Forest.new.say; | 01:19 | |
p6eval | rakudo 38907e: OUTPUT«Forest<3317213220548048558>» | ||
[Coke] | rakudo: multi sub f(0) {}; multi sub f($n) { say $n; callwith($n - 1) }; f(3) | ||
p6eval | rakudo 38907e: OUTPUT«3» | ||
ingy | trivia question: Why is #perl6 on freenode? | ||
[Coke] | nom: say [+]<262 458 7 -77> | 01:21 | |
p6eval | nom 38907e: OUTPUT«650» | ||
[Coke] | \o/ | ||
zzz | 01:22 | ||
ingy | trivia answer: #perl6 is on freenode, because that is where ingy first /join'd it :) | ||
o/ [Coke] | |||
01:28
bluescreen10 left
|
|||
colomon | ingy++ | 01:42 | |
01:43
Josh4all joined,
whiteknight left
01:44
Josh4all left
01:55
plobsing joined
|
|||
ingy | colomon: can you add ingydotnet to perl6 org in github? | 02:12 | |
please | 02:13 | ||
colomon | ingy: I don't know if I can or not. | 02:14 | |
I don't think I can. Looks like jnthn, moritz, pmichaud, sorear, and TimToady are the ones with admin rights. | 02:15 | ||
02:15
am0c joined
|
|||
colomon | sorry | 02:15 | |
ingy | jnthn, moritz, pmichaud, sorear, and TimToady: ^^ :) | 02:16 | |
jnthn, moritz, pmichaud, sorear, and TimToady: I'm pretty sure I mailed in my release form way back when.... | |||
colomon | ingy: what projects do you want to be able to change? I think you only need a release form for rakudo itself... | 02:18 | |
sorear | i've added ingydotnet to perl6 | 02:19 | |
colomon | sorear++ | 02:20 | |
ingy | sorear++ | 02:21 | |
colomon | sorear: I'm still stumped by the TreeViewColumn constructor. | ||
my $renderer = CellRendererText.new; | 02:22 | ||
my $column = TreeViewColumn.new($title, $renderer); | |||
ingy | au told me to fork pugs into that organization | ||
sorear | colomon: what is $title? | ||
colomon | sorear: for <Tune Snippet Comment>.kv -> $i, $title | 02:23 | |
sorear | niecza: say <Tune Snippet Comment>.kv.perl # I have my doubts this will work at all | ||
p6eval | niecza v10-40-ga57ed3d: OUTPUT«(0, "Tune", 1, "Snippet", 2, "Comment").list» | ||
02:23
tyatpi joined
|
|||
sorear | ....ok apparently it does. | 02:24 | |
colomon | I just added say $title.WHAT; and it says GatherIterator() | ||
which seems not worky | |||
sorear | ... | ||
that shouldn' | 02:25 | ||
that shouldn't even be possible. | |||
colomon | that certainly seems to be the root of my current problem, whatever it is. | ||
ingy | perl6 org now has a member with 200+ repos! ;) | ||
I just noticed I had 201 | |||
sorear | niecza: for <Tune Snippet Comment>.kv -> $i, $title { say $title.WHAT } | ||
p6eval | niecza v10-40-ga57ed3d: OUTPUT«Potential difficulties: $i is declared but not used at /tmp/iWGnZPq2Sd line 1:------> for <Tune Snippet Comment>.kv -> ⏏$i, $title { say $title.WHAT }GatherIterator()» | ||
sorear | ingy: want me to add gitpan as a collaborator? :D | ||
ingy puts his daily trash on github.... | |||
sorear | niecza: for <Tune Snippet Comment>.kv -> $i, $title { say $title } | ||
ingy | haha | ||
p6eval | niecza v10-40-ga57ed3d: OUTPUT«Potential difficulties: $i is declared but not used at /tmp/FLkyLTPSg7 line 1:------> for <Tune Snippet Comment>.kv -> ⏏$i, $title { say $title }GatherIterator.new(...)» | ||
sorear | double wonky | 02:26 | |
02:26
am0c left
|
|||
ingy | sorear: can I have permission to create a new repo in the org? | 02:31 | |
sorear: maybe easier to just fork github.com/audreyt/Pugs.hs for me | |||
02:34
colomon_ joined,
colomon left,
colomon_ is now known as colomon
|
|||
sorear | ingy: I don't know | 02:34 | |
colomon | niecza: for <Tune Snippet Comment>.kv -> $i, $title { say $i } | 02:35 | |
p6eval | niecza v10-40-ga57ed3d: OUTPUT«Potential difficulties: $title is declared but not used at /tmp/Rs93HdW1jX line 1:------> for <Tune Snippet Comment>.kv -> $i, ⏏$title { say $i }0» | ||
ingy | sorear: you don't know what? | ||
colomon | niecza: my @a = <Tune Snippet Comment>; for @a.kv -> $i, $title { say $title.WHAT } | 02:36 | |
p6eval | niecza v10-40-ga57ed3d: OUTPUT«Potential difficulties: $i is declared but not used at /tmp/ZVA07cwl4F line 1:------> <Tune Snippet Comment>; for @a.kv -> ⏏$i, $title { say $title.WHAT }Str()Str()Str()» | ||
sorear | ingy: what permissions are required to create repos | ||
niecza: for [<Tune Snippet Comment>].kv -> $i, $title { say $title.WHAT } | |||
p6eval | niecza v10-40-ga57ed3d: OUTPUT«Potential difficulties: $i is declared but not used at /tmp/2BgxkCsPH3 line 1:------> for [<Tune Snippet Comment>].kv -> ⏏$i, $title { say $title.WHAT }Str()Str()Str()» | ||
ingy | can you just fork that repo, sorear? | ||
colomon | sorear: using @titles.kv got me around my issue. odd bug, though... | 02:37 | |
sorear | ingy: I forked the repo and gave perl6 access | 02:38 | |
02:40
aindilis left,
aindilis joined
02:41
khisanth_ joined
02:42
Khisanth left
02:43
am0c joined
02:47
tyatpi left
|
|||
colomon | sorear: Success! www.harmonyware.com/pictures/gtk-treeview.png | 02:48 | |
02:48
bluescreen10 joined
|
|||
sorear | \o/ | 02:51 | |
ingy | how do we make pugs commits show up here? | ||
thx btw sorear | 02:52 | ||
araujo | colomon, using perl6? | ||
colomon | araujo: yup. niecza. | ||
araujo | colomon++ | ||
colomon | should be sorear++, he's been a huge help. (Not to mention his creating niecza, of course.) | ||
ingy installs niecza for fun... | |||
araujo | sorear++ | 02:53 | |
colomon | source code is at www.harmonyware.com/pictures/gtk-treeview.png | 02:55 | |
02:55
preflex left,
preflex_ joined
|
|||
colomon | it's still messy, I started with the shell of another perl6 Gtk script and have just kept hacking away at it | 02:55 | |
02:55
preflex_ is now known as preflex
|
|||
colomon | afk # bedtime | 02:56 | |
sorear | bye | 03:00 | |
03:07
the-golem left
|
|||
ingy | sorear: time mono run/Niecza.exe -e '6**7**7' | 03:10 | |
less than 3 times lower than ruby :) | |||
19 secs on niecza, 7 on ruby | |||
not bad | 03:11 | ||
sorear | ingy: try again | 03:13 | |
ingy | um, can I say something first | ||
sorear | the first time you run niecza it has to compile the setting | ||
sadly | |||
you may say something | |||
ingy | pugs.... 0m0.163s | 03:14 | |
03:14
khisanth_ is now known as Khisanth
|
|||
ingy | holy shit | 03:14 | |
sorear | pugs++ | ||
ingy | I use 6**7**7 as a general benchmark with ruby and others | ||
sorear | oh | 03:15 | |
ingy | used to use 6**6**6 but things are faster these days | ||
sorear | I misread that as 6*7*7 | ||
so I thought 19s could only be explained as first-run startup time | |||
anyways, pugs is going to be the fastest for that one because it's using GMP | 03:16 | ||
ingy | ingy@thinkingy:~/src/niecza$ time pugs -e 'say 6**7**7'|wc 1 1 640843 | ||
real0m0.867s | |||
640K digits | |||
the 19 sec niecza time was after a couple runs | 03:17 | ||
sorear | ingy: this is what Schönhage-Strassen multiplication looks like! | ||
written in assembly by people who actually know how the Intel instruction scheduler works | 03:18 | ||
ingy | :D | 03:19 | |
just read up on GMP | |||
sorear | niecza is using Rodrigo Kumpera's C# bignum library. Which is optimized for being fairly small and doesn't even support Karatsuba | ||
ingy | is that built into haskell? | ||
sorear | it's built into the Glasgow Haskell Compiler | ||
ingy | yeah, sorry, meant ghc | ||
sorear: you mean The Glorious Glasgow Haskell Compilation System ;0 | 03:20 | ||
it's not a compiler, man. it's a COMPILATION SYSTEM | 03:21 | ||
sorear | yes, ghc is more than a compiler. it also includes runtime libraries and an REPL. | 03:22 | |
ingy is gonna try to get pugs working against the modern test suite. | 03:24 | ||
masak++ (you hear me? :) | |||
sorear: can niecza use GMP? | 03:25 | ||
one time I tried 6**7**7 with ruby on my native machine and on a VM | 03:27 | ||
03:27
envi_ joined
|
|||
ingy | the VM was over 4 times faster | 03:27 | |
it turned out the VM was 64bit, and native OS was 32 | |||
so the 19sec time is on 32 bit, sorear | 03:28 | ||
I wonder how fast pugs is on 64 | |||
sorear | faster, I'm sure | 03:31 | |
ingy: niecza cannot use gmp | |||
ingy | sorear: | ||
ingy@thinkingy:~/src/niecza$ time pugs -e 'say 8**8**8' | |||
Inf | |||
oops | |||
looks like something is wrong | 03:33 | ||
03:34
soh_cah_toa left
03:55
tewk joined
03:58
tewk left
04:00
tewk joined
04:06
replore_ joined
04:13
satyavvd joined
04:17
bluescreen10 left
04:23
daniel-s joined
04:27
drbean left
04:30
drbean joined
04:32
am0c left
|
|||
dalek | ecza/serialize: b1088dc | sorear++ | lib/ (3 files): implement serialization for SubInfo, LAD, LexInfo |
04:35 | |
04:36
icwiener left
04:50
am0c joined
04:51
Reaganomicon left
04:52
Reaganomicon joined
05:13
replore_ left,
yath left,
_sri left,
dukeleto left,
_ilbot left,
jdhore left,
tty234_ left,
spacebat_ left,
imarcusthis left,
arnsholt left,
jesk left,
lumi_ left,
Helios left
05:14
replore_ joined,
yath joined,
_sri joined,
dukeleto joined,
_ilbot joined,
jdhore joined,
tty234_ joined,
spacebat_ joined,
imarcusthis joined,
arnsholt joined,
jesk joined,
lumi_ joined,
Helios joined,
tty234_ left
05:15
tty234 joined
05:18
drbean left,
SHODAN joined
05:24
drbean joined
05:29
lue left
05:33
sftp_ joined,
sftp left
|
|||
moritz | hugme: add ingydotnet to perl6 | 05:43 | |
05:43
hugme left
05:46
hugme joined,
ChanServ sets mode: +v hugme
|
|||
moritz | phenny: tell soh_cah_toa that source_url in raw.github.com/soh-cah-toa/p6-dige.../META.info points to the old repo name (without the p6- prefix) | 05:55 | |
phenny | moritz: I'll pass that on when soh_cah_toa is around. | ||
05:58
Khisanth left
06:01
dual joined
06:02
GlitchMr joined
06:10
ggoebel left
06:12
ggoebel joined
06:23
kaleem joined
|
|||
dalek | ecza/serialize: d91ecdf | sorear++ | lib/ (5 files): Serialization for objects of type Rat, FatRat, Complex, BigInteger, Int32, Double, String, P6any[], Variable[], VarDeque, VarHash |
06:24 | |
sorear wonders to what extent Frame objects should be freezable | 06:32 | ||
if they are freezable, it should be in a way that doesn't chase CALLER, me thinks | |||
o/ GlitchMr | 06:33 | ||
moritz | so when you return from one, it's to your new caller? | 06:34 | |
sorear | I don't know | ||
the use case is constant @foo = 1, 3, 5 ... *; | 06:35 | ||
that creates a List which wraps a GatherIterator which wraps a Frame | |||
but I don't want it saving a copy of the compiler by chasing up the call tree :D | |||
I'm too tired to be certain atm | |||
sorear sleep | 06:39 | ||
dalek | ecza/serialize: ab35238 | sorear++ | lib/ (3 files): Tidy up STable fields a bit, add TiedVariable serialize |
06:40 | |
06:50
am0c left
06:57
the-golem joined
|
|||
the-golem | Moritz, my friend :-) | 06:57 | |
moritz: If you've the time, I could use some assistance in getting the front-end to ilbot working | 07:01 | ||
i've been dumbing my way through it for a while, and i'm just about at my wit's end. It's likely something brainless that my dull wits cannot grasp | 07:03 | ||
07:03
grondilu joined
|
|||
grondilu | perl6: say ?(0|1 == 0&1); say ?(0&1 == 0|1) | 07:05 | |
p6eval | pugs: OUTPUT«11» | ||
..rakudo 38907e: OUTPUT«Bool::FalseBool::True» | |||
..niecza v10-40-ga57ed3d: OUTPUT«Bool::TrueBool::True» | |||
grondilu | amazing stuff. The '==' operator is not commutative with junctions. Just as it would be in quantum mechanics :) | 07:06 | |
but only according to rakudo | |||
tadzik | b: say ?(0|1 == 0&1); say ?(0&1 == 0|1) | 07:07 | |
p6eval | b 1b7dd1: OUTPUT«Bool::TrueBool::True» | ||
07:07
am0c joined
|
|||
tadzik | seems NYI in the new rakudo | 07:07 | |
grondilu | what's b: ? | 07:08 | |
rakudo say ?(0|1 == 0&1), ?(0&1 == 0|1) | 07:09 | ||
rakudo: say ?(0|1 == 0&1), ?(0&1 == 0|1) | |||
p6eval | rakudo 38907e: OUTPUT«Bool::FalseBool::True» | ||
masak | mroing, #perl6 | ||
grondilu | I think rakudo's behavior is better. Much more interesting anyway. | ||
But it gives a left associativity to operators that normaly should be chained, and not left associatives. | 07:12 | ||
07:13
baest joined
|
|||
masak | 0|1 == 0&1 means any(0,1) == all(0,1) means all(any(0,1) == 0, any(0,1) == 1) means all(any(0 == 0, 1 == 0), any(0 == 1, 1 == 1)) | 07:13 | |
which is true, AFAICS. | 07:14 | ||
masak submits rakuodbug | |||
tadzik | lol, masak | ||
masak | rakudobug* | ||
tadzik | good morning | ||
masak | :) | ||
seems I showed up just in time :P | |||
grondilu: commutativity should hold with junctions in Perl 6. | 07:15 | ||
grondilu | I disagree. | ||
It should not. | |||
masak | I may be wrong on this. it would be easier to work from an example. | ||
but given the ways junctions are evaluated, it feels like commutativity still holds. | 07:17 | ||
grondilu | 0|1 is always equal to any boolean. 0&1 is always not equal to a boolean. Thus, there is a conflict between 0&1 and 0|1 and there is some kind of incertitude principle. It nicely emerges from rakudo as the result of == depends of the order of the arguments. | 07:18 | |
As a result we get non-commutativity, just as in QM. I think it's great. | 07:19 | ||
07:19
GlitchMr left
|
|||
masak | sure, but you seem to be ignoring the order of evaluation described in S09. | 07:19 | |
with it in mind, there is no conflict, and no incertitude. | 07:20 | ||
grondilu | oh. I need to read this. Sorry. | ||
masak | S09:996 | 07:21 | |
07:22
mberends joined
|
|||
masak | mberends! \o/ | 07:22 | |
grondilu | is 996 a line number? | ||
(I get to a notice about autoindex when I get there) | |||
mberends | \o/ masak, $customer.network allows IRC :) | 07:23 | |
mberends backlogs | 07:24 | ||
masak | perl6: say Array ~~ Cool | 07:26 | |
p6eval | rakudo 38907e, niecza v10-40-ga57ed3d: OUTPUT«Bool::True» | ||
..pugs: OUTPUT«*** No such subroutine: "&Cool" at /tmp/nrhmKBFeq8 line 1, column 5 - line 2, column 1» | |||
masak | grondilu: "The results of these separate calls..." | 07:27 | |
the duck mapping looks cool, but I'm a little concerned about the violence it perpetrates on ordinary MMD. | 07:30 | ||
grondilu | MMD? | 07:31 | |
seriously it's a bit more than a duck mapping. Again, 0|1 is always true with any boolean, and 0&1 is always false. So == should not priviledge any False or True result when being applied to 0|1 and 0&1 in the same time. | 07:33 | ||
07:34
drbean left
|
|||
masak | my duck mapping comment wasn't related to our junctions discussion. | 07:34 | |
but it seems you either didn't read S09:996, didn't understand it, or don't agree that it should work that way. | 07:35 | ||
07:35
domidumont left
|
|||
grondilu | Ok ok. I need to read S09 indeed. | 07:35 | |
07:35
grondilu left
07:41
drbean joined
07:43
sftp_ left
|
|||
moritz | TimToady: in your latest specs patch, + $node.foo // $node.list: { .».foo } | 07:45 | |
should that be $node.map: ... or so? | 07:46 | ||
I don't think .list takes a closure argument | |||
masak | moritz++ | ||
masak frowns at rt.perl.org/rt3/Ticket/Display.html?id=78232 | 07:48 | ||
moritz | rakudo: for 1, 2, 3 { sub foo {}; .say }; say "alive" | 07:49 | |
p6eval | rakudo 38907e: OUTPUT«Too many positional parameters passed; got 1 but expected 0 in block <anon> at /tmp/cicnSsXJMb:1 in method reify at src/gen/CORE.setting:3752 in method reify at src/gen/CORE.setting:3657 in method reify at src/gen/CORE.setting:3657 in method gimme at src/… | ||
moritz | rakudo: for 1, 2, 3 { .say }; say "alive" | ||
p6eval | rakudo 38907e: OUTPUT«123alive» | ||
masak | oh, and moritz, you didn't provide enough steps-to-reproduce on rt.perl.org/rt3/Ticket/Display.html?id=76692 , it seems. | 07:50 | |
rt.perl.org/rt3/Ticket/Display.html?id=73344 needs reformulating because 'our' subs don't work that way anymore. | 07:52 | ||
(not addressing moritz++ with that one, but the general public) | 07:53 | ||
not sure the same behaviour can be had with the new 'our' sub semantics. | |||
rakudo: { &^c("$^a, $^b") }.("morning", "perl6ers", &say) | |||
p6eval | rakudo 38907e: OUTPUT«morning, perl6ers» | 07:54 | |
masak | \o/ | ||
moritz | masak: just return sub bar from sub foo | ||
masak | moritz++: I'll try that | ||
rakudo: my $a = 1; sub foo { my $a = 2; sub bar($x where $a) { say "called with $x" }; &bar }; foo()(2); foo()(1) | 07:55 | ||
p6eval | rakudo 38907e: OUTPUT«called with 2Constraint type check failed for parameter '$x' in sub bar at /tmp/MRp2dEpxLI:1 in block <anon> at /tmp/MRp2dEpxLI:1 in <anon> at /tmp/MRp2dEpxLI:1» | ||
moritz | rakudo: my $a = 1; sub foo() { my $a = 2; sub bar($x where $a) { say $x } }; my &bar := foo; bar(1) | ||
p6eval | rakudo 38907e: OUTPUT«Constraint type check failed for parameter '$x' in sub bar at /tmp/Ob_vsJ7vrl:1 in block <anon> at /tmp/Ob_vsJ7vrl:1 in <anon> at /tmp/Ob_vsJ7vrl:1» | 07:56 | |
moritz | rakudo: my $a = 1; sub foo() { my $a = 2; sub bar($x where $a) { say $x } }; my &bar := foo; bar(1) | ||
p6eval | rakudo 38907e: OUTPUT«Constraint type check failed for parameter '$x' in sub bar at /tmp/9fraezIidG:1 in block <anon> at /tmp/9fraezIidG:1 in <anon> at /tmp/9fraezIidG:1» | ||
masak | rakudo: my $a = 1; sub foo { my $a = 2; our sub bar($x where $a) { say "called with $x" }; &bar }; foo()(2); foo()(1) | ||
p6eval | rakudo 38907e: OUTPUT«called with 2Constraint type check failed for parameter '$x' in sub bar at /tmp/7MnZBwhjCT:1 in block <anon> at /tmp/7MnZBwhjCT:1 in <anon> at /tmp/7MnZBwhjCT:1» | ||
masak | all indications point to it working nowadays. | 07:57 | |
masak adds that to the ticket | |||
moritz | huh? | ||
masak | no? | ||
moritz | my example failed with 2 | ||
masak | oh! | ||
masak looks again | |||
moritz | nom: my $a = 1; sub f($ where $a) { }; f 1 | ||
p6eval | nom 38907e: ( no output ) | ||
moritz | nom: my $a = 1; sub f($ where $a) { }; f 2 | ||
p6eval | nom 38907e: OUTPUT«Constraint type check failed for parameter '(null)' in sub f at /tmp/VqsIIv0Mvb:1 in block <anon> at /tmp/VqsIIv0Mvb:1 in <anon> at /tmp/VqsIIv0Mvb:1» | ||
moritz | so in general it works | ||
masak | please run the failing one again. | 07:58 | |
I don't see it above; it's so messy. | |||
moritz | rakudo: my $a = 1; sub foo() { my $a = 2; sub bar($x where $a) { say $x } }; my &bar := foo; bar(2) | ||
07:58
koban joined
|
|||
p6eval | rakudo 38907e: OUTPUT«2» | 07:58 | |
moritz | oh | ||
masak | right. | ||
moritz | maybe it was the mess :-) | ||
rakudo: my $a = 1; sub foo() { my $a = 2; sub bar($x where $a) { say $x } }; my &bar := foo; bar(1) | |||
p6eval | rakudo 38907e: OUTPUT«Constraint type check failed for parameter '$x' in sub bar at /tmp/u9nPOhDfn6:1 in block <anon> at /tmp/u9nPOhDfn6:1 in <anon> at /tmp/u9nPOhDfn6:1» | ||
masak | so it works. | ||
moritz | aye | ||
07:59
domidumont joined
|
|||
masak | I think rt.perl.org/rt3/Ticket/Display.html?id=67942 can be closed, but it's the requestor's (moritz) call. | 08:04 | |
moritz | I still think it's wrong | 08:05 | |
we shouldn't reparse a declarator as a listop when the parse later on goes wrong | 08:06 | ||
masak | agreed. | 08:07 | |
but it's a NPMCA ticket, and the NPMCA is gone. | |||
moritz | std: my %h; enum Foo %h; | ||
p6eval | std 580b69a: OUTPUT«===SORRY!===Illegal redeclaration of symbol 'Foo' (see line 1) at /tmp/pcfy2Yu9ky line 1:------> my %h; enum Foo⏏ %h;Undeclared routine: 'h' used at line 1Check failedFAILED 00:01 122m» | ||
moritz | ok, we can close it, and file a new one :-) | ||
and a std ticket to TimToady too | |||
masak | I don't like saying "something else is still wrong" about a ticket without changing the stated expectations. | ||
it makes it hard for RT robots like [Coke] and me to reason about tickets. | 08:08 | ||
moritz | you're an RT robot? :-) | ||
masak | you didn't know? :-) | ||
I'm the ticket-producing kind. | 08:09 | ||
dalek | ast: c0c24ab | moritz++ | S02-types/subset.t: tests for RT #73344, where-constraint picked up the wrong outer lexical in rakudo |
08:17 | |
moritz | TimToady: again re latest spec patch, either you simply that there is a Hash.map which returns a Hash (and of which I don't know anything), or that .deepmap turns hashes into lists | 08:20 | |
masak | imply* | 08:26 | |
moritz | correct | 08:27 | |
masak | turning hashes into lists sounds more like the Perl I know. | 08:31 | |
by the way, I'm having a Perl 6 day today. | 08:36 | ||
I have two goals: blog a bit, and hack on the macros branch. | |||
moritz wanted to blog about the three-way balancing act of the smartmatch operator, and that it's certainly at least one too much | 08:38 | ||
masak | I can see you pulling off such a blog post well. | 08:40 | |
ooc, what are the three ways? | |||
moritz | 1) the actual smart matching 2) topicalization 3) invoking regexes | 08:41 | |
note that 'abc' ~~ m:g/./ does not fit into the "does the $lhs match the $rhs?" type of question | |||
(because a boolean answer doesn't need :g) | 08:42 | ||
masak | the topicalization bit is fairly new, innit? | 08:43 | |
ISTR it was introduced in discussions during YAPC::EU 2010. | |||
moritz | like, 2 years or so? | ||
no, before | |||
masak | oh, ok. | ||
moritz | I remember discussing some fallout of that decision at YAPC::EU 2010 though | 08:44 | |
masak | oh! that was it. | 08:45 | |
yes, please make such a blog post. | |||
I'll try to write one about macros. | |||
08:48
Khisanth joined
08:49
dakkar joined
08:53
wtw joined
09:03
wk joined
|
|||
masak | ooh! there could be twigil macros! | 09:19 | |
09:28
orafu left,
orafu joined
09:42
Mowah_ joined,
drbean left
09:44
mattp_ left,
mattp_ joined
|
|||
dalek | kudo/nom: e0cc816 | masak++ | NOMMAP.markdown: [NOMMAP.markdown] typography fixes |
09:48 | |
09:49
drbean joined
|
|||
masak | TimToady: re panic: I don't actually think I've panicked for real so far. most of my complaints and kvetches stem either from a genuine appreciation and caring for the Perl 6 project, or from wanting to focus more on coding and less on arbitrary official release ceremonies. | 09:55 | |
if what I am doing counts as panic, I want to point out that I'm not finished with my first and only one yet :P | 09:59 | ||
moritz: fwiw, I've totally come around to TimToady's view that "I want a thunky parameter" means you want a macro but maybe don't know it yet. | 10:01 | ||
moritz | masak: well, I actively don't want a macro, because I wouldn't know how to evaluate the AST that the macro places for me in the parameters | 10:02 | |
masak | the 'is ast' trait won't fly, I think, since a routine either is a macro or isn't. marking up some of the params and not others doesn't make much sense. | ||
moritz | masak: I don't want to deal with that complexity. I just want a thunk that I can invoke | ||
masak | moritz: we probably need an AST evaluate at some point. | 10:03 | |
s/evaluate/evaluate function/ | |||
`leave` happening at unwinding time, not at throw time -- does that mean that the CATCH block has "magic" access to lexicals in the block that threw the exception? | 10:14 | ||
i.e. is the "effective" lexical scope disconnected from the "textual" lexical scope in the CATCH block until the unwind happens? | 10:16 | ||
and if so, how does the CATCH block have access to its own declared lexicals? | |||
mls_ | lexical lookup has nothing to do with call frames | 10:17 | |
(hi perl6) | |||
masak | oh, true. | ||
yeah, I'm mixing up lexpads and call frames. | |||
my bad :) | |||
so what does it mean, in effect, that the call stack isn't unwound at the point of the CATCH? | 10:18 | ||
moritz | that LEAVE hasn't happened yet | ||
and that you might resume | |||
mls_ | well, you have access with the callframe() function | ||
niecza: { warn() ; CONTROL { default {} } } | 10:23 | ||
p6eval | niecza v10-40-ga57ed3d: OUTPUT«Unhandled Exception: No value for parameter $str in CORE warn at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE warn @ 0)  at /tmp/rFYiqWnBJv line 1 (MAIN C1_ANON @ 2)  at /tmp/rFYiqWnBJv line 1 (MAIN mainline @ 1)  at /home/p6eval/niecza/lib/C… | ||
mls_ | niecza: { warn("foo") ; CONTROL { default {} } } | ||
p6eval | niecza v10-40-ga57ed3d: ( no output ) | ||
mls_ | niecza: { LEAVE { warn("foo") } ; CONTROL { default {} } } | 10:24 | |
p6eval | niecza v10-40-ga57ed3d: ( no output ) | ||
10:24
ab5tract joined
|
|||
mls_ | niecza: { LEAVE { warn("foo") ; warn("bar") }; warn("hello") } | 10:25 | |
p6eval | niecza v10-40-ga57ed3d: OUTPUT«hello at /home/p6eval/niecza/lib/CORE.setting line 613 (CORE warn @ 2)  at /tmp/74b5BBg9I3 line 1 (MAIN C1_ANON @ 2)  at /tmp/74b5BBg9I3 line 1 (MAIN mainline @ 1)  at /home/p6eval/niecza/lib/CORE.setting line 2133 (CORE C1024_ANON @ 2)  at /home… | ||
mls_ | niecza: { LEAVE { warn("foo") ; warn("bar") } } | ||
p6eval | niecza v10-40-ga57ed3d: OUTPUT«foo at /home/p6eval/niecza/lib/CORE.setting line 613 (CORE warn @ 2)  at /tmp/whyRLnCvEv line 1 (MAIN C2_ANON @ 2)  at line 0 (ExitRunloop @ 0)  at /tmp/whyRLnCvEv line 0 (MAIN C1_ANON @ 0)  at /tmp/whyRLnCvEv line 1 (MAIN mainline @ 1)  at /h… | ||
snarkyboojum | dude - these errors are so dense :D | 10:27 | |
that was supposed to be quoted, but c'est la vie | 10:28 | ||
masak | snarkyboojum! \o/ | 10:31 | |
snarkyboojum | masak: dude! o/ | ||
masak | Excellent. | 10:33 | |
snarkyboojum | masak: did your macros grant idea get off the ground eh? | ||
masak | snarkyboojum: well, I'm working on D1 and it's going fine. haven't heard back from TPF yet. | 10:34 | |
snarkyboojum | masak: ah - awesome :) | 10:36 | |
10:38
fhelmberger_ left
|
|||
masak | snarkyboojum: if you want to try macros right now, 'git checkout macros' in the rakudo repository. | 10:41 | |
snarkyboojum | masak: it's well beyond me, but it sounds fun :) | ||
masak | snarkyboojum: well, using them is something anyone can do. | 10:46 | |
snarkyboojum: macro foo { say "OH HAI" }; say 1; foo; # OH HAI\n1\n | |||
hm, but that would probably result in an error. it needs an empty quasi at the end. | |||
snarkyboojum: macro foo { say "OH HAI"; quasi {} }; say 1; foo; # OH HAI\n1\n | 10:47 | ||
snarkyboojum feels compelled to make some macrocosmic response :) | 10:49 | ||
masak | but you see what's happening there. syntactically it's just a subroutine, except it gets called when the parser finds it, not when the runtime finds it. | 10:50 | |
snarkyboojum | so it's like you're extending the parser or the parse phase? | 10:53 | |
masak | yes, I guess. | 10:54 | |
a macro is a parse-time subroutine. | |||
and the return value of the macro (the quasi block) gets re-incorporated into the code and compiled, too. | |||
snarkyboojum | what's to stop you extending the parse phase into something unparseable? | ||
masak | the fact that you have to obey normal syntactical rules inside the quasi block. | 10:55 | |
well, normal to a first approximation ;) | |||
you're allowed to have "holes" with bits of AST parameters in the quasi block, similar to how you can interpolate variables into qq strings in Perl. | 10:56 | ||
macro add($a, $b) { quasi { {{{$a}}} + {{{$b}}} } } # $a and $b contain bits of Perl 6 code | |||
so anywhere the parser saw 'add(40, 2)' it'd replace it by '40 + 2'. | 10:57 | ||
snarkyboojum | so you have to follow normal syntactic rules which are defined by the parser/grammar, which you're extending via macros? :D | ||
masak | yup :) | ||
snarkyboojum | that sounds like circular fun to me | ||
masak | you've put your finger on a delicate point there. | ||
it's technically possible to call a macro from within itself. | 10:58 | ||
there's actually two cases there. recursing in the macro but outside of the quasi, and recursing inside the quasi. | |||
the latter case is prefectly fine, as long as you bottom out. | |||
the former case -- I'm not sure it's wise, or even technically possible. | |||
problem is, at that point, the compiler is still trying to come to grips with the macro definition. and then it calls itself. not good. | 10:59 | ||
snarkyboojum | it seems that the parser would need to know ahead of time what is syntactically OK and what isn't, but you can extend what that is, so how does the parser know? | 11:00 | |
masak | oh, that works just like with sub calls and operators. | 11:02 | |
there are defaults. | |||
the spec has a bit of wording on that. | 11:03 | ||
if you go 'foo 1, 2, 3, 4, 5', the parser assumes that &foo is a listop, even if it hasn't seen the declaration of &foo yet. | |||
snarkyboojum | but you can change the meaning of a listop in a macro? | 11:04 | |
11:04
drbean left
11:10
drbean joined
|
|||
masak | well, yeah. macros are all about changing the meaning. | 11:11 | |
but so are subs, only in a different phase of the program. | 11:12 | ||
11:12
replore_ left
|
|||
snarkyboojum | subs change meaning? in a different phase? | 11:15 | |
masak | a sub, in a very real sense, is something that transforms a subcall into a return value. | 11:16 | |
snarkyboojum | subs change meaning during runtime, but macros change meaning when you're building the semantics of a program? | ||
masak | yes! \o/ | ||
achievent unlocked! | |||
snarkyboojum | so you can have macros which change the semantics of subs :D | 11:17 | |
masak | sure. | ||
snarkyboojum | but you can't transform a runtime thing into a macro thing? :D | 11:18 | |
11:20
fhelmberger joined
11:21
Alias_ joined
11:23
the-golem left
11:25
jaldhar_ is now known as jaldhar
|
|||
masak | snarkyboojum: not sure what you mean by that. it sounds like it would fly in the face of causality. | 11:26 | |
moritz | you could inject macros into an eval(), which compiles at run time again | ||
masak | right, but most of the program will already have been parsed at that time. | 11:27 | |
snarkyboojum | I guess I'm wondering if a macro can cause a program to be reparsed? | ||
masak | not as far as I know. | 11:28 | |
snarkyboojum | that would seem to make things interesting | ||
:) | |||
[Coke] | nom:say 723-77 | 11:30 | |
rakudo: class Foo does Positional[::T] {}; say Foo ~~ Positional | 11:32 | ||
p6eval | rakudo e0cc81: OUTPUT«===SORRY!===Could not locate compile-time value for symbol T» | ||
[Coke] | (RT #68134) - is that still the right way to write that? | ||
masak | think so. | 11:33 | |
[Coke] | rakudo: my $a = Multi.new; $a.push(sub (1,2,3) { }); $a.push(sub (1,2) { }); say join ", ", $a.candidates | ||
p6eval | rakudo e0cc81: OUTPUT«Could not find sub &Multi in block <anon> at /tmp/6TeqtEsvyz:1 in <anon> at /tmp/6TeqtEsvyz:1» | ||
[Coke] commutes | 11:34 | ||
masak | [Coke]: that one has fossilized. there's no Multi type any more. | 11:35 | |
moritz | nom: proto sub foo($) { }; say &foo.WHAT | 11:36 | |
p6eval | nom e0cc81: OUTPUT«Sub()» | ||
11:37
Psyche^ joined
11:39
satyavvd left
|
|||
flussence | yay, I just got to rewrite something using event-sourcing at $dayjob and a bunch of bugs disappeared | 11:40 | |
11:40
Patterner left,
Psyche^ is now known as Patterner
|
|||
moritz | nice | 11:41 | |
masak | flussence: woot! | 11:43 | |
flussence | masak++ # teaching us magic tricks :) | 11:44 | |
masak | it's been almost a year, and I'm still stoked on the idea of event sourcing. :) | ||
11:45
benabik joined
|
|||
flussence | the funny thing is, our main dataset vaguely resembles that already. It's just this one little bit that got it horribly wrong | 11:45 | |
masak | flussence: did I mention that github.com/masak/farm is event-sourced? | 11:46 | |
flussence | I think you did :) | ||
really cool stuff now that I've figured out how to do it | 11:47 | ||
masak | :D | ||
errand & | |||
dalek | kudo/nom: 3fd3534 | moritz++ | t/spectest.data: run mro.t |
11:56 | |
snarkyboojum | "Macros may return either a string to be reparsed, or a syntax tree that needs no further parsing." | 11:58 | |
does that mean macros can cause a program to be reparsed, or am I reading that wrong? | 11:59 | ||
moritz | only the returned string is reparsed | ||
and it's reparsed at compile time, because macros are run at compile time | 12:00 | ||
snarkyboojum | "returned string"? | 12:01 | |
returned from the macro | |||
isn't a program a big-arse macro? :D | |||
benabik | No. The programmer is a macro (no comment on size of arse), and the compiler parses the string returned by them. | 12:03 | |
snarkyboojum | benabik: so by definition, the compiler parses programmers.. I like it | 12:04 | |
12:06
HarryS left
|
|||
benabik | snarkyboojum: They say what languages you know/use affects the way you think. ;-) | 12:10 | |
12:10
ab5tract left
|
|||
snarkyboojum | benabik: linguistic relativity? :D | 12:12 | |
12:12
HarryS joined
|
|||
snarkyboojum | i.e. the sapir-whorf hypothesis? | 12:12 | |
benabik | Knew there was some fancy name for it. Yes, although programming languages probably have a smaller effect. :-) | 12:14 | |
dalek | ast: dbcee47 | moritz++ | S12-methods/defer-call.t: test for RT #69756 |
12:16 | |
snarkyboojum | programming languages being a subset of human languages perhaps ;) | ||
benabik | Programming languages having a smaller problem domain than human language. Most people don't try to program their everyday life. | 12:17 | |
12:23
ab5tract joined
|
|||
snarkyboojum | benabik - a completely different abstraction imo :) | 12:24 | |
12:39
replore joined
12:48
m6locks left
12:59
grondilu joined
13:01
am0c left
13:09
BudiantoWang joined
|
|||
moritz | blogs.perl.org/users/rafael_garcia-...uture.html | 13:13 | |
13:16
GlitchMr joined
|
|||
PerlJam | I see your link and raise you www.modernperlbooks.com/mt/2011/10/...ption.html | 13:26 | |
13:31
im2ee joined
|
|||
im2ee | Hello | 13:35 | |
tadzik | hello im2ee | ||
colomon | sorear, mberends: Having trouble figuring out how to wire up my "button toggled" callback to the CellRendererToggle object. Any notions? | 13:37 | |
13:39
Trashlord left
|
|||
dalek | gs.hs: f5d5f76 | (Ingy dot Net)++ | Pugs/Makefile: make clean |
13:39 | |
gs.hs: 9a11832 | (Ingy dot Net)++ | Pugs/Makefile: Makefile basics builds pugs by default. runs cabal configure when needed. support 'make install' |
|||
gs.hs: b1c99f1 | (Ingy dot Net)++ | Pugs/Makefile: Account for all .hs sources |
|||
moritz | (that was the "Test hook" button) | 13:40 | |
13:42
envi_ left
|
|||
ingy | moritz++ | 13:42 | |
13:46
envi_ joined
13:49
SHODAN left
13:55
koban left
|
|||
mls_ | aloha: seen jnthn | 13:58 | |
aloha | mls_: jnthn was last seen in #perl6 1 days 2 hours ago saying "(Due to the gradual typing.)". | ||
13:59
Trashlord joined
|
|||
moritz | irclog.perlgeek.de/phasers/2011-10-05#i_4526983 | 13:59 | |
14:01
kaleem left
|
|||
mls_ | thanks moritz (I need him to look at my exceptions/enter/leave commits) | 14:02 | |
moritz | mls_: try to tell him via phenny | 14:03 | |
phenny: tell mls_ like this | |||
phenny | moritz: I'll pass that on when mls_ is around. | ||
mls_ | I know phenny. But we probably need to do some live chat about design decisions | 14:05 | |
phenny | mls_: 14:03Z <moritz> tell mls_ like this | ||
moritz | ok | 14:06 | |
14:07
Exodist_ is now known as Exodist
|
|||
moritz tests the branch | 14:07 | ||
14:18
wtw left
14:19
domidumont left,
ggoebel left,
yath left,
_sri left,
dukeleto left,
_ilbot left,
jdhore left,
spacebat_ left,
imarcusthis left,
arnsholt left,
jesk left,
lumi_ left,
Helios left
14:20
_sri joined
|
|||
moritz | that does feel nice | 14:23 | |
throwing exception in a CATCH handler, and it's not re-caught | |||
14:23
jesk joined
|
|||
moritz | working ENTER and LEAVE | 14:23 | |
mls_++ | |||
mls_ | I'm not sure about the enter/leave implementation, though. It's currently done with no special parrot patches. | 14:24 | |
14:24
domidumont joined,
ggoebel joined,
yath joined,
dukeleto joined,
_ilbot joined,
jdhore joined,
spacebat_ joined,
imarcusthis joined,
arnsholt joined,
lumi_ joined,
Helios joined
|
|||
mls_ | It might turn out that we need to do it in a different way, e.g. for language interop | 14:24 | |
moritz | wow, I can even put a CATCH block inside a CATCH block to catch the exception from the outer CATCH :-) | 14:25 | |
14:25
risou_awy is now known as risou
|
|||
mls_ | also exceptions in LEAVE blocks need some tinkering | 14:25 | |
benabik | mls_: If patching parrot makes things cleaner, it's not impossible. :-) #parrot is always interested in how we can make things better. | 14:27 | |
That said, if it works without it, then who cares? ;-) | |||
mls_ | thanks. But we first need to know what we need from parrot. | ||
benabik | Clear goals always helps. :-) | 14:28 | |
mls_ | ;) | ||
grondilu | I tried once to write a perl6 CGI with no success. I get a Method 'exists' not found for invocant of class 'Hash' | ||
moritz | benabik: I think mls_ even has a commit bit for parrot these days | ||
grondilu: I remember seeing a ticket about that. I think it's closed in nom | 14:29 | ||
nom: say %*ENV.exists('HOME') | |||
p6eval | nom 3fd353: OUTPUT«Bool::True» | ||
moritz | nom: say %*ENV.exists('NOTTHERE') | ||
p6eval | nom 3fd353: OUTPUT«Bool::False» | ||
moritz | looks better, eh? :-) | ||
grondilu doesn't know what 'nom' is | |||
moritz | b: say %*ENV.exists('NOTTHERE') | ||
p6eval | b 1b7dd1: OUTPUT«Bool::False» | ||
moritz | grondilu: it's the current development branch of rakudo | ||
grondilu | ok | 14:30 | |
moritz | if you use the branch or the 2011.09 release of rakudo, that's what you get | ||
grondilu | my version is '2011.09-69-g3fd3534' | 14:31 | |
that's not 'nom', is it? | |||
moritz | that's nom. | 14:32 | |
grondilu | Well, I still get the 'exists' error :-/ | 14:33 | |
PerlJam | grondilu: show the code that gives the error | ||
grondilu | hang on | ||
moritz | mls_: a few tests fail in your branch, but I guess many spectests are bogus or outdated when it comes to exceptions | ||
14:34
pmurias joined
|
|||
mls_ | yes, I think four or five fail | 14:34 | |
moritz | for example the last one in try.t is bogus, it never marks $! as handled, nor does it smartmatch successfully against $_ | 14:35 | |
pmurias | sorear: how can i see the serialisation branch? | ||
grondilu | it's nested in a bash script as this is the only way I could see the error message: pastebin.com/NhyGCMRJ | ||
mls_ | yes, it needs a default { ... } | ||
pmurias | git branch only shows master? | ||
grondilu | it's just a perl6 -e ';' and it works fine outside of CGI | ||
moritz | pmurias: 'git branch' only shows local branches by default. Try git branch -a for more | ||
grondilu: wow, that's scary | 14:36 | ||
PerlJam | maybe something with %*ENV? | ||
moritz | yes, but what? | ||
PerlJam | that it's not there? :) | ||
grondilu | there is probable a CGI env var that perl6 doesn't like. | ||
moritz | grondilu: could you please change that to perl6 --ll-exception -e ';' | ||
yes, I suspect so | 14:37 | ||
grondilu: and tell us what output that produces | |||
grondilu | oh my god | ||
hang on | |||
pmurias | moritz: so how do i switch to a branch? | ||
moritz | pmurias: git checkout otherbranch | 14:38 | |
grondilu | pastebin.com/qayiZBxB | ||
moritz | grondilu: thanks | ||
grondilu | I'm using thttpd under Debian if this is of any help | 14:39 | |
pmurias | moritz: works | 14:40 | |
moritz: thanks | |||
colomon | sorear, mberends: Aha! add_Toggled is the key. of course, now I need to make my DoneToggled sub actually work. But that will come after exercise. | 14:41 | |
moritz | that backtrace is ... weird | ||
while loading the setting, a concatenation triggers an undef warning (thats' the 'note', line 4) | 14:42 | ||
sorear | good * #perl6 | ||
moritz | which seemingly dies while trying to look up the $*ERR variable | 14:43 | |
colomon | sorear: oooo, good to see you | ||
moritz | o/ sorear | ||
colomon | sorear: decided to try one more thing before exercising. public bool GetIterFromString (out TreeIter iter, string path_string); -- is it possible to get the out iter there? | 14:44 | |
grondilu | anyway how is it possible that perl6 doesn't find a method 'exists' for a 'Hash' class?? | ||
PerlJam | At first blush I though that was a parrot error btw. | ||
moritz | grondilu: there's a parrot Hash which doesn't have an exists method | ||
sorear | grondilu: either Hash.exists doesn't exist, or it's not the 'Hash' you think it is | 14:45 | |
moritz | nom: pir::new__PS('Hash').exists('foo') | ||
p6eval | nom 3fd353: OUTPUT«Method 'exists' not found for invocant of class 'Hash' in block <anon> at /tmp/vTbVojSoSY:1 in <anon> at /tmp/vTbVojSoSY:1» | ||
moritz | nom: Hash.new.exists('foo') | ||
p6eval | nom 3fd353: ( no output ) | ||
colomon | I thought Hash.exists was obsolete? | ||
sorear | colomon: it is, but that's beside the point | ||
moritz | so, the question is, why does GLOBAL.WHO or PROCESS.WHO end up being a parrot hash? | ||
colomon: we still use it in rakudo until we can parse the :exists adverb | 14:46 | ||
PerlJam | not enough boxing | ||
moritz | nom: say GLOBAL.WHO | ||
p6eval | nom 3fd353: OUTPUT«().hash» | ||
moritz | nom: say PROCESS.WHO | ||
sorear | colomon: what's the trouble with getting the out iter? it should Just Work, although you'll need to preset the variable to TreeIter to make MMD work | ||
p6eval | nom 3fd353: OUTPUT«("\$IN" => IO<7868443299104802926>, "\$OUT" => IO<7868443299104231782>, "\$ERR" => IO<7868443299112620663>, "\$TZ" => $*TZ, "\@ARGS" => [], "\$ARGFILES" => ArgFiles<7868443299111605347>, "\%ENV" => {"PERLBREW_VERSION" => "0.12", "USER" => "p6eval", "MAIL" => "/var/mai… | ||
moritz | PerlJam: if it were that simple, one of the above lines would fail | 14:47 | |
pmurias | sorear: hi | 14:48 | |
colomon | sorear: Ah, I didn't know. Hmmm... how to preset the variable to TreeIter.... | ||
mls_ | Hey, I can reproduce it: env - ./perl6 -e ';' | ||
PerlJam | mls++ | 14:49 | |
grondilu | mls++ indeed | ||
grondilu will try to remember about the env command :) | 14:50 | ||
sorear | colomon: my $x = TreeIter; | ||
colomon | sorear: that doesn't work | ||
(error message in a moment) | 14:51 | ||
mls_ | it's triggered by a missing $HOME | ||
14:51
sftp joined
|
|||
colomon | sorear: gist.github.com/1278289 | 14:51 | |
grondilu | indeed: env - HOME=foo /usr/local/bin/perl6 -e ';' | ||
does not crash | |||
mls_ | so it's line 30 in src/core/terms.pm | 14:53 | |
grondilu | so I guess a quick fix would be to setup my HOME in my CGI shebang, right? | ||
mls_ | yes, just set it to / | ||
moritz | though we really shouldn't die that way | 14:54 | |
I'll come up with a fix | |||
sorear | colomon: interesting, it looks like an actual bug | ||
mls_ | yeah, we just need a // '' | ||
sorear | colomon: does it work with my $x = Any; ? | ||
moritz | mls_: no, we shouldn't set up that path if neither of HOME/HOMEDRIVE is set | ||
mls_ | yes, you're right of course | 14:55 | |
colomon | sorear: nope, then it doesn't even dispatch | ||
if it will help, I can push my broken code to github | |||
grondilu | oh #!HOME=/ /usr/local/bin/perl6 is not reckognized as shebang :-( | ||
moritz | just do an | ||
export HOME=/ | |||
in you shell wrapper | 14:56 | ||
or do you want to get rid of it? | |||
maybe | |||
/usr/bin/env HOME=/ perl6 | |||
or so | |||
grondilu | yes I got rid of the shell wrapper | ||
sorear | colomon: github.com/sorear/niecza/issues/66 | ||
grondilu | thus the shebang pb | ||
moritz tests a patch | 14:57 | ||
colomon | sorear: ah, that does seem to golf it nicely. :) | ||
pushed my version anyway. now for exercise. sorear++ | |||
grondilu | I guess I should put a sh shebang, and an HOME=/ exec perl6 just after | 14:58 | |
or something like that | |||
sorear | colomon: oh! TreeIter is a value type. | ||
colomon: try my $x = TreeIter.default; or TreeIter.Zero; | 14:59 | ||
colomon | sorear: oh, right, that's why I was trying to figure out how to m... oo | ||
15:00
sftp_ joined
|
|||
colomon | sorear: TreeIter.default gets me the same dispatch fail as Any did | 15:00 | |
15:00
dukeleto- joined
|
|||
colomon | ditto for .Zero | 15:00 | |
15:00
sftp left,
dukeleto left,
imarcusthis left
15:01
dukeleto- is now known as dukeleto
|
|||
sorear | colomon: stupid question do you have a good String argument? | 15:01 | |
colomon | sorear: not in the least. sorear++ | 15:02 | |
I thought I'd be getting a string argument when my callback was called, but instead it's a CLR::Gtk::ToggledArgs | |||
pmurias | sorear: hi | ||
15:03
spacebat joined
|
|||
pmurias | sorear: i'll be giving a presentation for uni about niecza ;) | 15:03 | |
colomon | sorear: well, that makes the callback not crash. it doesn't quite work properly yet, but that's a post-exercise mission. sorear++ | 15:04 | |
15:05
baest left,
imarcusthis joined,
jdhore left,
spacebat_ left,
Helios left
15:07
Helios joined
|
|||
moritz | pmurias: so what will you tell them? | 15:07 | |
15:07
jdhore joined
|
|||
pmurias | moritz: not yet sure | 15:08 | |
moritz | what's the context of the talk? compiler construction? or "talk about your favorite open source project" ? | 15:09 | |
pmurias | moritz: "advanced .net techniques" | 15:11 | |
moritz: so i suppose it should be a gentle Perl 6 introduction | 15:12 | ||
15:15
pmurias_ joined
|
|||
masak | did anyone submit a rakudobug about $HOME? | 15:16 | |
15:17
pmurias left,
pmurias_ is now known as pmurias
|
|||
pmurias | moritz: what thing in Perl 6 would be interesting to non Perl programmers? | 15:18 | |
15:24
z-b is now known as zb
|
|||
sorear leaves | 15:24 | ||
15:31
grondilu left
|
|||
masak | pmurias: grammars, I think. niecza is good at that. | 15:36 | |
pmurias: also, somewhat more nebulously, the sliding scale between extreme expressiveness/brevity and large-scale structure formation that Perl 6 is on. | 15:37 | ||
"from scripts to applications", that kind of thing. | |||
are they programmers-but-not-Perl6-programmers, or non-Perl-programmers-and-maybe-not-programmers-at-all? :) | 15:38 | ||
s/6// | |||
15:39
BudiantoWang left
|
|||
colomon | sorear: any tips on dealing with CLR::System::Boolean | 15:42 | |
? | 15:43 | ||
15:45
simcop2387 left,
simcop2387 joined,
simcop2387 left,
simcop2387 joined
15:47
kaare_ joined
|
|||
pmurias | masak: they are fellow computer science students | 15:47 | |
masak: so a lot of them don't qualify as programmers | |||
masak | CS people, hm. | 15:49 | |
sounds like gradual typing could interest them. things like where clauses, subtypes, roles... | |||
TimToady | tell 'em it's Lisp done right :) | ||
masak | felher: I'm in the midst of backlogging, saw you asking about type synonym declarations. | ||
rakudo: constant Relative := Int; say Relative.WHAT | |||
p6eval | rakudo 3fd353: OUTPUT«===SORRY!===Malformed constant at line 1, near ":= Int; sa"» | 15:50 | |
15:50
simcop2387 left
|
|||
masak | rakudo: constant Relative = Int; say Relative.WHAT | 15:50 | |
p6eval | rakudo 3fd353: OUTPUT«Int()» | ||
masak | constant := should be allowed, right? | ||
I mean, that's basically what happens, even if I write '=' :) | |||
moritz: thanks for the link with parsing blog posts. will peruse as time permits. | 15:51 | ||
dalek | ecs: f798397 | larry++ | S03-operators.pod: braino spotted by moritz++ |
||
15:53
simcop2387 joined
15:57
KyleHa joined
|
|||
cognominal | I am not sure I understand $node.foo // $node.map: { .».foo } | 15:59 | |
if .foo is not defined for a list invocant, how can one call it? | 16:00 | ||
TimToady | well, perhaps it's a .?foo there | ||
and it's also assuming the .map attempts to return an object resembling the type of $node, which plain .map might not actually do | 16:01 | ||
16:02
KyleHa left,
KyleHa1 joined
|
|||
tadzik | pmurias: will there be streaming or so>? | 16:03 | |
16:03
KyleHa1 left
|
|||
pmurias | tadzik: no | 16:03 | |
cognominal | may I have a commit bit on github perl6? | ||
pmurias | tadzik: we have so called seminar classes, where everyone who signed up has to give a talk on a given topic | 16:04 | |
tadzik: usually on something he has no idea about | |||
tadzik | interesting | ||
pmurias | most of the seminars end up horrible | 16:05 | |
dalek | ecs: 694d6ef | larry++ | S03-operators.pod: clarify unary hyper semantics for cognominal++ |
16:06 | |
ingy | seen fglock | 16:08 | |
aloha | fglock was last seen in #perl6 154 days 19 hours ago leaving the channel. | ||
ingy | what became of fglock? | ||
pmurias | ingy: he can't use the irc channel anymore | 16:09 | |
ingy | he lost his fingers? | ||
or he was a bad boy? | |||
pmurias | got a job at booking? | ||
ingy: heh | 16:10 | ||
ingy | booking disallows irc? | ||
pmurias | dunno | ||
TimToady | I didn't think slavery was allowed in the Netherlands... | ||
ingy is lost | |||
pmurias | ingy: he visits the channel occasionally | 16:11 | |
ingy | ok | ||
pmurias | very rarely | ||
ingy | I want to visit his couch | ||
if he and his couch are in Buenos Aires | |||
TimToady pictures fglock as a psychiatrist... | 16:12 | ||
ingy | haha | ||
talk about your childhood, Ingy | |||
TimToady | doubtless a retired Nazi... | ||
pmurias | ingy: fglock is still hacking on mp6, which is quite similiar to your acmeish stuff | 16:13 | |
ingy: a small p6 subset and loads of backends | |||
ingy | wow, thx | ||
I had no idea | |||
now it's a must | |||
TimToady | now we just have to compile real Perl 6 down to mp6 :) | 16:14 | |
pmurias considered that option before | |||
TimToady | I will bet there will be...impedance mismatches... | 16:15 | |
cognominal | ingy, I noted you can't do without your laptop. At your age you should be able to spend time away from that transitional object :) | ||
TimToady | cognominal: y'know, some of us can't see the fine print anymore | 16:16 | |
ingy | TimToady: impedance challenges | ||
TimToady must admit he just got a smartphone though | |||
but it's really hard to type fast on a smartphone | |||
ingy | cognominal: I am only tied to $laptop | ||
specific one is not important | 16:17 | ||
TimToady | it's a common noun, not a proper noun :) | ||
ingy | I worked had on that during the last year. | ||
although I do like touching a thinkpad | 16:18 | ||
cognominal | ingy, so I am worse than you because I am tied to $laptop.MacBooK :) | ||
ingy | I have a macbook still, somewhere. it runs ubuntu | ||
TimToady | far be it from me to criticize another (dead) man's cult | 16:19 | |
ingy | like every other throwaway laptop i have | ||
TimToady: I'll gladly do it for you :) | |||
cognominal | a MacBooK being a bif financial investment easily become an emotional one | 16:20 | |
*big | |||
16:20
mberends left
|
|||
ingy | I used mac for 10 years. I decided to try not using it for a weekend last PPW, and never used it again | 16:21 | |
TimToady | .oO(funny how "okay" means 'yes' but "that's okay" means 'no'...) |
||
ingy | TimToady: that's ok | ||
flussence screwed up the rootfs on my good netbook yesterday, been stuck on an eee701 today. feels pretty weird going back to such a tiny keyboard... | |||
TimToady | .oO(except when it doesn't...) |
||
ingy | that's okay by me | 16:22 | |
TimToady | masak: I don't know how you get commutativity out of what S09 says; it's specifically designed to work like English, which is not commutative in that spot | 16:36 | |
so use of junctions within a chained comparison is likely a DIHWIDT | 16:37 | ||
well, a single junction is fine, but two different adjacent terms with junctions is asking for it | 16:38 | ||
so 1 < $all < 10 is fine | 16:41 | ||
[Coke] | IWBNI if aloha linked to the logs. | 16:45 | |
(when reporting "seen") | |||
16:45
GlitchMr left
16:50
daniel-s left
|
|||
TimToady | masak: re macros and ASTs, we don't have to require all the params to be ASTs; anything that's not declared AST could be autoevaluated to a normal value with the AST eval function proposed, and a macro param declared as a thunk could certainly auto-compile to a Callable | 16:50 | |
and macros are rare enough that I don't feel like defaulting params to ASTs makes much sense huffmanly speaking | 16:51 | ||
we could go so far as to say that macros must be explicitly typed | 16:52 | ||
TimToady waits with bated breath to see which of masak's hot buttons that pushes, the one that likes clean semantics, or the one that dislikes arbitrary restrictions :) | 16:54 | ||
16:54
plobsing left
16:56
plobsing joined,
GlitchMr joined
|
|||
TimToady | the difference between a macro and an immediate sub is that the macro knows it's feeding the parser, and the immediate sub doesn't | 16:58 | |
which is maybe not much difference if you're returning an AST, but a profound difference if you're returning a Str | 16:59 | ||
16:59
sftp_ left
|
|||
TimToady | the 'macro' declarator biases Str to be reparsed, while the 'sub' declarator would presumably work like a constant fold | 17:00 | |
17:00
donri joined
|
|||
TimToady | or maybe we call them both 'macro', but distinguish two types of return string, Str vs CodeStr or some such | 17:01 | |
then the declarative weight would not be on the 'macro' but on the --> CodeStr | |||
--> DirtyMacroString :) | 17:02 | ||
we can discourage text macros if we like :) | |||
masak | no buttons pushed so far over here. | ||
I'm just glad you're thinking about macros ;) | 17:03 | ||
TimToady | that's because I'm supposed to be thinking about 5 other things instead | ||
masak | I must confess I kinda like the 'macro' keyword. I think it's a keeper. | ||
TimToady | it means 'immediate', basically | ||
I think everything else can be declaratively controlled with types | 17:04 | ||
masak | and yes, maybe we do need a way to declare sub params as AST-ish, or macro params as non-AST-ish. | ||
we definitely need ways to convert between "values" and ASTs. | |||
also, note that my grant proposal explicitly leaves out text macros. I have no idea where to even start with those, and I'd be glad if someone else decided to tackle them. ;) | 17:05 | ||
they don't interest me that much, frankly. | |||
TimToady | they're pretty trivial, except for the tricky bits :) | 17:06 | |
17:06
mberends joined
|
|||
masak | I realize textual macros are a "safety valve", just like BEGIN and eval are, when the language falls short and something radical is needed. | 17:06 | |
TimToady | they need a mechanism for diverting the parser to look at them, and a mechanism for reporting error messages not inaccurately | 17:07 | |
other than that, they're conceptually simple, if unhygienic | |||
masak | even clean macros probably need to report an error in a sort of before/after manner. | 17:08 | |
17:08
dakkar left,
ab5tract left
|
|||
masak | I speculated about that in one of my YAPC::EU gists. | 17:08 | |
TimToady | for that you can treat them almost as a separate callframe | ||
17:09
sftp joined
|
|||
TimToady | and give a micro traceback | 17:09 | |
s/micro/delimited/ | 17:10 | ||
not much point in giving a traceback of the whole recursive descent when the user is unlikely to be interested... | |||
though that would be an interesting debug option | |||
(for grammars) | 17:11 | ||
17:11
Trashlord left
|
|||
masak | I don't get how applying a macro can be seen as a separate callframe. | 17:11 | |
I meant something like this: macro add($a, $b) { quasi { {{{$a}}} + {{{$b}}} } }; add(40, foo()) | 17:12 | ||
17:12
Trashlord joined
|
|||
masak | something wrong happens when calling foo(). error shows both '40 + foo()' and 'add(40, foo()' | 17:13 | |
colomon | sorear, mberends: I've actually got the toggle updating the model now, but the view doesn't change. Seems like I need some sort of redraw command, but I haven't been able to find it yet... | ||
masak | TimToady: it will be increasingly important to do that as more layers of macros are applied on some bit of code. | 17:15 | |
TimToady: cf C++'s incomprehensible template error messages. | |||
mberends | colomon: try $drawingarea.QueueDraw; or $drawingarea.QueueDrawArea(0,0,$windowSizeX,$windowSizeY); # fsvo $drawingarea | ||
TimToady | masak: sure, and this probably coincides with my wish to see long, well-formatted error messages dumped to html or some such for later browsing | 17:17 | |
colomon | mberends: doesn't blow up when I do that, but it doesn't change, either. | 17:18 | |
TimToady | generally, if we have a place to put such messages, we should just put a short message to the screen that says where the full traceback/parse/rewrite can be viewed | ||
colomon | mberends: actually, now I wonder if I set it up incorrectly | ||
masak | TimToady: yes, I like the sound of that. no idea about the specifics, though :) | 17:19 | |
TimToady | we need a concept of STDERRDIR or some such :) | ||
masak | TimToady: since it's disruptive, it needs to be pulled of extra well not to make people reject it outright. | ||
colomon | mberends: bingo! I needed to say the toggle was active. | ||
TimToady | I think people dislike terminal spews enough that just fixing that will be somewhat disruptive | 17:20 | |
mberends | colomon: you can sprinkle 'say' statements in your code to ... \o/ | ||
17:20
aindilis left
|
|||
TimToady | and as soon as you don't have to worry about spew, you could keep a complete cockpit recorder of information, as long as it's well structured | 17:20 | |
17:21
kaleem joined
|
|||
TimToady | 'course, the Unixoids will just say, that's what 2>file does | 17:22 | |
but that neglects the "well structured" aspect | |||
17:23
Trashlord left
|
|||
TimToady | btw, I believe one of the Apocalypses speculated about recursive macros requiring lazy parsing semantics or some such | 17:25 | |
"there will be an AST here, but I don't know what it is yet" | |||
part of the macro's BEGIN semantics are to apply itself recursively when it can | 17:26 | ||
17:26
Trashlord joined
|
|||
TimToady | oh, the other thing that's different between text macros and AST is that a text macro always stays in the same parse state before reparsing, while an AST macro has to know what the next state is (via term:, infix: etc.) | 17:27 | |
but I think that's specced somewhere | 17:28 | ||
or apo'd | |||
17:36
Trashlord left
|
|||
TimToady | my backlogging turned into far to much frontlogging today... | 17:40 | |
*too | |||
sjohnson | :3 | 17:45 | |
masak | frontlogg'd! | 17:56 | |
18:01
PacoLinux_ left
|
|||
dalek | osystem: 53fd42a | (Timothy Totten)++ | META.list: Added MIME::Types, used by WWW::App for basic mime-type detection. |
18:04 | |
18:10
supernovus joined
|
|||
supernovus | Any news on grammars/regex progress in nom? Getting the JSON::Tiny and Exemel libraries working again would be awesome, but both rely heavily on grammars. :( | 18:13 | |
[Coke] | still waiting on pmichaud, I believe. | 18:14 | |
felher | masak: Thnx for your answer to type-synonyms. :) This is a very nice way to create real synonyms. I wanted to use them in multiple dispatch, though. Like two classes, that are exactly the same, just have different names. :) | 18:23 | |
masak | felher: so... you want them to be different? | 18:27 | |
rakudo: class Relative { has Int $.cargo }; say Relative.new(:cargo(42)).cargo | 18:28 | ||
p6eval | rakudo 3fd353: OUTPUT«42» | ||
18:28
risou is now known as risou_awy
18:29
GlitchMr left
18:30
envi_ left
18:31
kaleem left
18:33
pyrimidine joined
|
|||
masak | felher: either composition (above) or subclassing would do what you want. | 18:39 | |
rakudo: class Relative is Int {}; multi foo(Int) { say "Int" }; multi foo(Relative) { say "Relative" }; foo(42); foo(Relative) | 18:40 | ||
p6eval | rakudo 3fd353: OUTPUT«IntRelative» | ||
felher | masak: Yeah, i tried that first, with the following Problem: pastebin.com/3mjiK4uE | 18:41 | |
masak: how do i get values into that subclass? | 18:42 | ||
18:42
wamba joined
|
|||
felher | masak: i guess the solution is pretty easy, i'm just blind :) | 18:42 | |
masak | not sure it's possible, actually. | 18:43 | |
felher is very happy he isn't _that_ blind :) | |||
masak | rakudo: role Relative {}; multi foo(Int) { say "Int" }; multi foo(Relative) { say "Relative" }; foo(42); foo(42 but Relative) | 18:44 | |
p6eval | rakudo 3fd353: OUTPUT«IntAmbiguous dispatch to multi 'foo'. Ambiguous candidates had signatures::(Int):(Relative) in sub foo at /tmp/Lnr6tVGfvO:1 in block <anon> at /tmp/Lnr6tVGfvO:1 in <anon> at /tmp/Lnr6tVGfvO:1» | ||
masak | rakudo: role Relative {}; multi foo(Int) { say "Int" }; multi foo(Int $ where Relative) { say "Relative" }; foo(42); foo(42 but Relative) | ||
p6eval | rakudo 3fd353: OUTPUT«IntRelative» | ||
masak | felher: that works. | ||
felher | masak: hm, nice, that solution works for me. Big thanks :) | 18:46 | |
masak++ | |||
masak | \o/ | 18:47 | |
PerlJam | Isn't that what subsets are for? | 18:49 | |
japhb | ingy, ping | 18:50 | |
18:50
supernovus left
|
|||
masak | subsets would tie in the MMD. | 18:50 | |
hm, maybe not. | |||
but I got the feeling that in felher's example, the types aren't distinct in any other way than that felher say they are. | 18:51 | ||
that's a typical Value Object pattern to me. | |||
says* | |||
PerlJam | masak: they have different names, ergo they're distinct ;) | 18:52 | |
masak | well, since subtypes basically carve out values from their nominal type, that's not enough. | ||
rakudo: subset FunkyInt of Int; multi foo(Int) {}; multi foo(FunkyInt) {}; foo(42) | 18:53 | ||
p6eval | rakudo 3fd353: ( no output ) | ||
PerlJam | Is there a manual way to affect who wins in the event of a tie in MMD? | ||
masak | rakudo: subset FunkyInt of Int; multi foo(Int) {}; multi foo(FunkyInt) { say "FunkyInt" }; foo(42) | ||
p6eval | rakudo 3fd353: OUTPUT«FunkyInt» | ||
masak | oh right, subsets are narrower. | 18:54 | |
so foo(Int) will never get called. | |||
ooh, we could detect such things statically as well! \o/ | |||
PerlJam: yes, there's 'is default'. | |||
PerlJam: I would consider using it to be a fairly strong code smell. | 18:55 | ||
felher | masak: that value-object: c2.com/cgi/wiki?ValueObject ? | ||
masak | felher: aye. | ||
PerlJam | masak: I meant something more ... detailed than than. But you're right .. code smell. | ||
masak | felher: Probability is a good example. one could just use a Num. but using Probability makes it clear what kind of value one is dealing with. | 18:56 | |
felher: and you could put nice methods on the role too, like .combinedWith(Probability $b) which calculates the product of self and $b | 18:57 | ||
typically, a domain model has some value objects and some entity objects. | 18:58 | ||
c2.com calls entity objects "business objects" or "reference objects". | |||
felher | masak: yeah, thats (object value) exactly what i wanted. It just had to work in multiple dispatch. I wanted 'one' jump method. Not jump-relative and jump-absolut, because the jump-value would carry the information with it anyway :). | 19:01 | |
masak | oh, then you can do 'given $value { when Relative { ... }; when Absolute { ... } }' | 19:02 | |
if you need to, I mean. | |||
'given/when' is sort of the dual of MMD, by the way ;) | |||
felher | masak: yes, if i needed to. :) It's en.wikipedia.org/wiki/Double_dispatch, isn't it? | 19:03 | |
masak | ummmmm | 19:04 | |
felher | masak: oh, well, no, it isn't :) i mixed something up :) | ||
masak | "Double Dispatch" is one of those concept I've never really learned because the languages I've used so far haven't been brain-damaged enough to need it :P | ||
concepts* | |||
std: multi foo() is default {}; multi foo() is default {} | 19:07 | ||
p6eval | std 580b69a: OUTPUT«ok 00:01 120m» | ||
PerlJam | they're *all* default. | ||
masak | TimToady: is it allowed for more-than-one multi variant in the same scope to have 'is default'? | ||
masak guesses "yes" | |||
either way it doesn't affect the compiler's ability to detect ties at compile time. | 19:08 | ||
felher | masak: :). Well, in the end i wanted to be able to write my @jumps = (30 but relative, 20 but absolute, ... ); for @jumps { $m.jump($_) }. Which only works well with multiple dispatch :) (or given/when - but thats not 'well' ) | ||
PerlJam | my @jumps = (30 but meters, 20 but feet, ... ); # Would you do that too? | 19:09 | |
masak | nice! | 19:11 | |
rakudo: role Length {}; role Meters is Length {}; role Feet is Length {}; my @jumps = 30 but Meters, 20 but Feet; multi jump($x where Meters) { say "$x meters" }; multi jump($x where Feet) { say "$x feet" }; jump($_) for @jumps | 19:13 | ||
p6eval | rakudo 3fd353: OUTPUT«P6opaque only supports type changes where the MRO of the original type is a suffix of the MRO of the new type in mixin at src/gen/Metamodel.pm:918 in sub infix:<but> at src/gen/CORE.setting:7376 in block <anon> at /tmp/PlYluHQIBN:1 in <anon> at /tmp/PlYluHQ… | ||
masak | hm. | ||
felher | PerlJam: in principle. Why not? | ||
masak | rakudo: role Length {}; role Meters does Length {}; role Feet does Length {}; my @jumps = 30 but Meters, 20 but Feet; multi jump($x where Meters) { say "$x meters" }; multi jump($x where Feet) { say "$x feet" }; jump($_) for @jumps | ||
p6eval | rakudo 3fd353: OUTPUT«30 meters20 feet» | ||
masak | \o/ | ||
felher, PerlJam: you're both doing superstitious parentheses on array initialization, by the way. I'm guessing you're both good at Perl 5. ;) | 19:16 | ||
PerlJam | aye ... I'm coding in perl 5 right now ... hard to context switch. :) | 19:17 | |
felher | masak: thanks for pointing that out. I forget about it all the time :) | ||
masak | PerlJam: at $client, I do a lot of Perl 5. I'm considering putting a piggy bank on the desk and put a krona in for every p6ism I don't catch before compiling my program. ;) | 19:18 | |
PerlJam: had I done that from the start in Feb, I'd probably be up to about 30 SEK now. | |||
there's probably another 25 SEK or so in p6isms that I caught before compilation by reviewing my own diffs ;) | 19:19 | ||
but given how much code I write in both languages, I don't consider 55 SEK to be much at all. I usually find it quite easy to context-switch. | 19:22 | ||
19:22
benabik left,
benabik joined
|
|||
PerlJam | sometimes it's easy, but when my brain is working p5 problems, it doesn't quickly generate p6isms. | 19:23 | |
masak | we probably come at it from different default directions. | 19:24 | |
I'm a Perl 6 developer, occasionally working in Perl 5. | |||
PerlJam | aye, and I'm the other way around basically :) | ||
masak | my Perl 5 is often some kind of pidgin Perl 6. | 19:25 | |
19:25
zb left,
zb joined
|
|||
masak | I'm guessing it's loads easier to automatically translate to Perl 6 than most other people's Perl 5 code. | 19:25 | |
flussence | Mu.pm:132 is causing me much grief right now :( | 19:28 | |
flussence changes it to a die locally just to try and get a stacktrace | 19:30 | ||
ingy | hi japhb | 19:36 | |
masak | oh right. macros. | 19:50 | |
20:00
benabik_ joined
20:04
Alias_ left,
Alias_ joined
20:06
wooden joined,
wooden left,
wooden joined,
alvis left
20:14
soh_cah_toa joined
20:19
alvis joined
|
|||
moritz | oh hai | 20:26 | |
masak | moritz! \o/ | 20:27 | |
20:28
espadrine joined
20:47
kaare_ left
|
|||
colomon | sorear: any easy way to get today's date in niecza? | 20:48 | |
masak | niecza: say time | 20:53 | |
p6eval | niecza v10-40-ga57ed3d: OUTPUT«1318366385.55574» | ||
masak | I declare it possible, if not easy ;) | ||
colomon | masak++ | ||
I could actually work with that, I think, in a pinch | |||
masak | well, DateTime in Rakudo should be a good guide. | ||
colomon: maybe you'll end up implementing DateTime and Date in Niecza :) | 20:54 | ||
colomon | I'd really rather not. I'm just looking for a simple way to get the calendar day. :) | ||
masak 's interest is piqued | 20:55 | ||
colomon | now that I have 90% of a UI for my current project, getting the date is the last major conceptual hurdle | ||
masak | rakudo: say DateTime.now.day-of-week | ||
p6eval | rakudo 3fd353: OUTPUT«2» | ||
masak | rakudo: say (DateTime.now.get-daycount + 2) % 7 + 1 | 20:56 | |
p6eval | rakudo 3fd353: OUTPUT«2» | ||
colomon | masak: not day of the week, I mean like 2011-10-06 | 20:57 | |
masak | oh. | ||
well, have a look at ymd-from-daycount in Temporal.pm | 20:58 | ||
20:58
skangas left
|
|||
colomon | it's mostly for temporal sorting, so the time above would work, but it wouldn't be very human user friendly | 20:58 | |
colomon dances, as he just got The Dragons of Babel in the mail as a late birthday present | 20:59 | ||
im2ee | Good night! Dobranoc o/ | ||
masak | 'branoc, im2ee! | ||
diakopter | colomon: ./run/Niecza.exe -e 'say CLR::("System.DateTime").Now.Day;' | ||
masak | colomon: happy belated birthday! | ||
diakopter | colomon: msdn.microsoft.com/en-us/library/sy...etime.aspx for the other struct members | 21:00 | |
masak | diakopter++ # pragmatism | ||
21:00
im2ee left
|
|||
mberends | perl-sharp strikes again! | 21:00 | |
colomon | diakopter++ # that'll do, for sure | 21:01 | |
[Coke] needs a webdev minion, if anyone is job hunting. ;) | 21:03 | ||
diakopter | perlesque: my $now = System::DateTime.Now; say $now.Day; say $now.Month; say $now.Year | ||
p6eval | perlesque: OUTPUT«11102011» | ||
diakopter | colomon: you can experiment with a similar CLR interop using perlesque | ||
perlesque isn't locked down in p6eval though :) | 21:04 | ||
s/though// | 21:05 | ||
colomon | niecza: say 5.fmt("%02d") | 21:07 | |
p6eval | niecza v10-40-ga57ed3d: OUTPUT«Unhandled Exception: Unable to resolve method fmt in class Int at /tmp/aGGkGlxJXv line 1 (MAIN mainline @ 1)  at /home/p6eval/niecza/lib/CORE.setting line 2133 (CORE C1024_ANON @ 2)  at /home/p6eval/niecza/lib/CORE.setting line 2134 (CORE module-COR… | ||
colomon | oh | ||
niecza: say sprintf("%02d", 5) | |||
p6eval | niecza v10-40-ga57ed3d: OUTPUT«05» | ||
21:09
packetknife joined
|
|||
ingy | packetknife is a great nick | 21:19 | |
masak | especially if you're Swiss. | 21:20 | |
21:22
s1n1 left
21:25
PacoLinux_ joined
21:26
localhost joined
21:28
benabik_ left
21:29
ponbiki left,
ponbiki joined
|
|||
packetknife | ingy: Thanks.. no, sorry, not Swiss though masak. ;-) | 21:30 | |
masak | dang :) | ||
dalek | kudo/macros: 991ade7 | masak++ | src/Perl6/Actions.pm: decontainerize quasi AST before attr lookup Many nqp ops will decontainerize for you, but getattr is not one of them. Occasionally the quasiquote would be hidden inside a container layer and the getattr would fail. This is now fixed. |
21:33 | |
masak | I invite people to play around with the macros branch and give feedback. | 21:34 | |
the coding bit of D1 is now complete, to the best of my knowledge. | 21:36 | ||
next up is a bit of spectest coverage and a blog post or two. | |||
diakopter | masak: are there spectests for macros yet? | 21:37 | |
masak | not by me. | 21:39 | |
there are a few, but they're old and not very decisive :) | |||
dalek | gs.hs/bigexp: 2866550 | (Ingy dot Net)++ | Pugs/src/Pugs/Prim/Numeric.hs: Make this per au instuctions: 00:11 <au> I see. it can be fixed in Pugs/Prim/Numeric.hs 00:11 <au> in op2Exp to do a (^) instead of a (^^) if the right hand side is non-negative |
||
masak | I have quite a few ideas on what to test. | ||
whoa, a Pugs commit :) | |||
ingy | :D | ||
masak | ingy++ | 21:40 | |
ingy | masak++ | ||
21:40
y3llow_ joined,
y3llow left,
pothos left,
pothos_ joined
|
|||
masak | thanks, though I have no idea why you're giving me karma... :P | 21:41 | |
21:41
y3llow_ is now known as y3llow
|
|||
ingy | masak: let's try to get pugs testing against current stuff | 21:41 | |
masak: for getting me into pugs | |||
pugs++ | |||
21:42
pothos_ is now known as pothos
|
|||
ingy | masak: I got make and make install working | 21:42 | |
so I think we are set to begin PugsClub™ | |||
masak | oh wow | 21:43 | |
I haven't gotten that far yet. | |||
ingy | moritz: can you make the irc bot use current pugs master | ||
masak | ingy: were the instructions au pointed to enough to get make working? | ||
ingy | I worked with au to get it going | 21:44 | |
masak | PugsClub™ \o/ | ||
ingy | pull the latest from github.com/perl6/Pugs.hs | ||
masak | oki | ||
ingy | on debian is trivial | ||
like 2 or 3 steps | |||
masak | I'm on Ubuntu, so it should be trivial-ish. | 21:45 | |
ingy | me too. it is trivial | ||
i'm on natty | |||
masak | ok, I checked out Pugs.hs | 21:46 | |
what's next? | 21:47 | ||
21:47
huf left
21:49
benabik left,
localhost left
|
|||
dalek | gs.hs: 565cdac | (Ingy dot Net)++ | HACKING: Add hacking instructions. |
21:52 | |
ingy | masak: ^^ | ||
:D | |||
masak | \o/ | ||
mberends, [Coke]: ^^ | |||
ingy: hm, it won't actually be 'cd Pugs' unless you rename the Pugs.hs directory... | 21:53 | ||
ingy | where's my umlöt? :\ | ||
masak: no. inside Pugs.hs | |||
Pugs.hs/Pugs | |||
masak | oh. | 21:54 | |
ingy | I assumed you were in there. but yeah that's confusing | ||
I might add a top level Makefile at some point | |||
sudo make -C Pugs install | 21:55 | ||
mberends gets Pugscited | |||
21:55
Mowah_ left
|
|||
masak | this all coincides with me going to bed. I think I'll have to do the INSTALL stuff tomorrow. | 21:55 | |
yeah. $dayjob. it interferes with my work. :P | 21:56 | ||
anyway, ingy++! | |||
colomon | hmmm.... is it open $filename, :w, :a ? | 21:58 | |
masak | :a implies :w, methinks. | 22:01 | |
but I've yet to see an implementation that supports :a | |||
well, this is my stop. 'night, #perl6. | 22:04 | ||
I hope to get to blogging and Pugs tomorrow. | 22:05 | ||
22:09
Woodi left
22:11
molaf left,
Woodi joined
22:12
dual left
22:13
huf joined
22:20
pmurias left
|
|||
colomon | sorear: ping? | 22:24 | |
22:26
packetknife left,
replore left
|
|||
colomon | sorear: I need to modify twriter_open to call the StreamWriter constructor which takes a string and a bool, so that I can properly handle open :a. I'm really not clear on the syntax to do that, and I've got to run to preschool open house in a moment, so massive experimenting is not practical. Danke. | 22:27 | |
diakopter | perlesque: my $wr = System::IO::StreamWriter.new("hihi", true); $wr.Write("blah"); $wr.Close(); # colomon I know this doesn't help you but I'm just experimenting | 22:33 | |
p6eval | perlesque: ( no output ) | ||
tadzik | map -> $n { ((-1) ** $n * $x ** (2 * $n)) / [*] 1..(2 * $n) }, 0..* # taylor series for cosine | 22:49 | |
gotta love infinite series | 22:50 | ||
22:56
aloha left
|
|||
tadzik | down to 42 characters: map {(-1)**$_*$x**(2*$_)/[*]1..2*$_},0..* | 22:56 | |
22:58
aloha joined
|
|||
tadzik | shame that map (-1)****$x**(2**)/[*]1..(2 * *), 0..* caused a parsefail :) | 22:59 | |
23:04
ZapZ_ joined
23:07
soh_cah_toa left
23:10
whiteknight joined
|
|||
tadzik | perl6: my @a = 1, 2, 3, 4; @a».++ | 23:11 | |
p6eval | pugs: OUTPUT«decodeUTF8': bad data: '\187'» | ||
..rakudo 3fd353: OUTPUT«Nominal type check failed for parameter '$op'; expected Any but got Mu instead in sub METAOP_HYPER_POSTFIX at src/gen/CORE.setting:7657 in block <anon> at /tmp/NIbBlYzLZh:1 in <anon> at /tmp/NIbBlYzLZh:1» | |||
..niecza v10-40-ga57ed3d: ( no output ) | |||
tadzik | I suppose rakudo's error message could've been better | 23:12 | |
23:20
supernovus joined
|
|||
supernovus | Just a quick question, is there a way to determine if a scalar contains an object instance or a type? My basic desire is method load ($something) { my $object = $something; if is_type($something) { $object = $type.new; } ... # so something with $object } | 23:23 | |
tadzik | .defined? | ||
nom: $_ = ($^n.defined ?? $^n !! $^n.new); say .(5), .(Int) | 23:25 | ||
p6eval | nom 3fd353: OUTPUT«===SORRY!===Cannot use placeholder parameter $^n in the mainline at line 1, near ".defined ?"» | ||
tadzik | nom: $_ = { $^n.defined ?? $^n !! $^n.new }; say .(5), .(Int) | ||
p6eval | nom 3fd353: OUTPUT«50» | ||
supernovus | tadzik: Thanks! That will work great :-) | 23:28 | |
tadzik | I'm glad :) | ||
23:31
benabik joined
|
|||
supernovus | Although I have to use ng to do it, I'm refactoring my Flower library into a much cleaner and more extendable codebase. So instead of being just a TAL/METAL implementation, it will be an XML Application Language Toolkit (with a TAL/METAL implementation included as an example XML Application Language...) | 23:32 | |
23:45
yves_ left
|
|||
tadzik | huh | 23:46 | |
23:46
wamba left
|