»ö« 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:13
havenn joined
00:17
sftp left
00:19
spider-mario left
00:31
adu left
00:41
tokuhiro_ joined
00:43
adu joined
00:47
xinming left
00:52
jj123 joined
00:53
xinming joined,
jj123 left
01:06
friendofthefanat joined
|
|||
friendofthefanat | hello | 01:06 | |
01:07
havenn left,
topo`_ is now known as topo`
|
|||
TimToady | most of the interesting people have gone to sleep | 01:08 | |
01:10
sftp joined,
friendofthefanat left
01:11
johnny4shure joined
|
|||
johnny4shure | is that you lewis? | 01:11 | |
#quietfanatic | 01:12 | ||
nvm no its not | |||
TimToady | quietfanatic is his nick | ||
johnny4shure | I know, I checked his IP and its not where it would be if he was who is claims to be | 01:13 | |
TimToady | many of us run screen sessions on long-running servers | ||
johnny4shure | ah | 01:14 | |
TimToady | and the irc "server" is kinda arbitrary anyway | ||
quietfanatic is on appflux, the same server I use, which is, I believe, in Virginia | 01:15 | ||
johnny4shure | ah I see | 01:16 | |
any good perl 5 tutorials? / books? | |||
TimToady | well, I hear the Camel book is pretty good... :-) | 01:17 | |
but it really depends on your learning style | |||
geekosaur | p5 is probably best not discussed here, though | 01:19 | |
johnny4shure | oops sorry guys my bad | ||
TimToady | yah, the folks hang out here are mostly interested in p6, but it's okay | 01:20 | |
we talk about p5 sometimes too :) | |||
geekosaur | (some people here do know p5 fairly well, but not all) | ||
johnny4shure | perl 6 isnt released is it? | 01:21 | |
TimToady | "It's released every month." | ||
johnny4shure | lol | ||
from the man himself | |||
TimToady | no implementation implements the entire spec yet, fershure | ||
johnny4shure | ah | 01:22 | |
TimToady | and none of the implementations quite measure up to p5 in terms of speed | ||
(yet) | |||
but rosettacode.org/wiki/Category:Perl_6 has 481 examples of (mostly) running Perl 6 code | 01:23 | ||
otoh there's no Camel book for it yet | 01:24 | ||
sorear waves to johnny4shure | 01:27 | ||
johnny4shure | Im not sure how to wave back :) | 01:28 | |
sorear | I did /me waves to ... | 01:29 | |
in theory /commands depend on your choice of client, but /me is pretty standard | |||
01:29
cognominal joined
|
|||
sorear | I'm still up, unsure if I count as an interesting person... | 01:31 | |
TimToady | well, I hedged it in any case, like a good engineer | ||
johnny4shure | haha | 01:37 | |
01:37
cognominal left,
cognominal_ joined
|
|||
johnny4shure | is it a mystery when the camel book for perl 6 will grace us with its presence? | 01:38 | |
[Coke] | moritz: you added S03-operators/andthen.t to rakudo's spectest - did you forget to push the test file? | ||
phenny: ask moritz you added S03-operators/andthen.t to rakudo's spectest - did you forget to push the test file? | |||
phenny | [Coke]: I'll pass that on when moritz is around. | ||
TimToady | johnny4shure: well, we just have to write it first | 01:40 | |
johnny4shure | I guess thats true isn't it. | ||
diakopter becomes more interesting | 01:41 | ||
TimToady | diakopter: did the lights go out on all your whales? | 01:42 | |
diakopter | that's tomorrow | ||
TimToady | ah, yes | ||
diakopter | today was Monterey | ||
TimToady | which is pretty much everything except whales | ||
diakopter | it's a nice aquarism | 01:43 | |
aquarium | |||
couldn't find much else to do | |||
johnny4shure | should I start by learning perl 5 or perl 6 | ||
diakopter | johnny4shure: depends what you want to use it for, I guess | 01:44 | |
TimToady | there'r some nice restaurants, and shop that sells all kinds of hot sauce | ||
johnny4shure | web development | ||
TimToady | does it also have to run on your teacher's computer? | ||
johnny4shure | nah | 01:45 | |
just mine :) | |||
Im trying to abandon rails | 01:46 | ||
01:46
cognominal_ left
|
|||
johnny4shure | just cause I've realized it's not the proper tool for any job imho | 01:46 | |
TimToady | there's a web framework for p6 called Bailador, but I don't know what it's state is, and the people who do know are mostly asleep | ||
'course you can always roll your own with Perl | 01:47 | ||
johnny4shure | |||
TimToady | p5 will have many more existing tools on various levels currently, since p6 is still being explored | 01:48 | |
otoh p6 is a nicer language to work with | |||
johnny4shure | I was looking at catalyst | ||
TimToady | that's a common choice, and good for many uses | 01:49 | |
a bit harder to get going in, but probably more flexible than rails | |||
johnny4shure | ive just hit a lot of operating boundaries of rails way too fast | 01:50 | |
TimToady | web frameworkds in p5 do tend to bring out strong opinions in people though, so don't expect everyone to agree with your choice :) | ||
it's not like in ruby where rails is almost completely dominant | 01:52 | ||
01:53
bowtie left
|
|||
johnny4shure | I hate uniformity so I can deal | 01:53 | |
diakopter | I'm confused. how is my single-threaded Java program maxing all four cores | 01:54 | |
johnny4shure | infinite loop? | ||
but that would only max one | 01:55 | ||
so nvm | |||
cotto | very infinite loop | ||
01:55
johnny4shure left
|
|||
TimToady | maybe the optimizer is attempting some autothreading | 01:55 | |
01:55
cognominal_ joined
|
|||
diakopter | that would be seriously *impressive* | 01:55 | |
though how it derived that this algorithm is wait-free and trivially parallelizable, I don't know | 01:56 | ||
TimToady | well, one thread can easily be the GC | ||
and maybe the GC can multithread if if gets tired | 01:57 | ||
diakopter | nm, I found it. I was actually launching 128 threads that were all spinning | ||
TimToady | *ifit | ||
diakopter | forgot to disable this other thing | ||
cotto | I like all of the less likely explanations. | 01:58 | |
TimToady | 1. Write an autothreader for Perl 6. | ||
2. Write a Java-to-Perl 6 translator | 01:59 | ||
3. ??? | |||
4. Profit | |||
02:01
cognominal_ left
|
|||
Timbus | <diakopter> I'm confused. how is my single-threaded Java program maxing all four cores -> <diakopter> nm, I found it. I was actually launching 128 threads | 02:11 | |
my sides | |||
diakopter | :) | ||
02:11
adu left
|
|||
diakopter | well, I thought I had commented out all the threadpool thing | 02:11 | |
but missed some | 02:12 | ||
(I hadn't seen it use all the cores yet) | |||
my statements. the jvm or cpu, it's reordering them. | 02:17 | ||
or both. | |||
sorear | cpus reorder statements all the time | 02:25 | |
and even when they don't, memory models often make it look like they do | |||
cache coherency protocols are seriously funky | |||
02:38
jlaire left,
sizz_ left
02:39
sizz joined
02:43
jlaire joined
02:47
xinming left
02:48
xinming joined
02:52
tokuhiro_ left
|
|||
japhb | I'm reminded of "Variables won't; constants aren't." | 02:53 | |
02:55
tokuhiro_ joined
02:59
tokuhiro_ left
03:07
xdbr_ left
03:09
orafu left
03:10
orafu joined
03:20
REPLeffect joined
03:44
daniel-s_ is now known as daniel-s
03:47
xinming_ joined
03:50
xinming left
03:54
plobsing left
04:02
[particle]1 joined
04:04
[particle] left
|
|||
dalek | rl6-roast-data: d80f178 | coke++ | / (9 files): * rebuild from scratch each time. * use one version of roast * record roast sha1 * avoid div-by-zero error. |
04:08 | |
rl6-roast-data: dd6ac96 | coke++ | bin/niecza.sh: Need a ./perl6 for test_summary. |
|||
rl6-roast-data: 405f649 | coke++ | / (4 files): today (automated commit) |
|||
[Coke] | there. rakudo is up about 1K tests from a month ago. | ||
I've reinstalled the cron job, hopefully we'll get daily runs again. | 04:14 | ||
04:28
jlaire left
|
|||
dalek | ast: a2adec0 | coke++ | integration/weird-errors.t: refudge for niecza |
04:32 | |
04:35
jlaire joined
|
|||
grondilu_ | r: macro f($x) { "{{{$x}}} (just testing macros)" }; say f "ok" | 04:40 | |
p6eval | rakudo 68460c: OUTPUT«f===SORRY!===too few positional arguments: 2 passed, 3 (or more) expected» | 04:41 | |
grondilu_ | * | ||
04:41
grondilu_ left
04:43
grondilu joined
04:47
xinming joined
04:50
xinming_ left
04:57
Chillance left
05:01
topo` left
05:48
xinming_ joined
05:50
xinming left
|
|||
[Coke] | r: macro f($x) { quasi "{{{$x}}} (just testing macros)" } } ; say f "ok" | 05:53 | |
p6eval | rakudo 68460c: OUTPUT«===SORRY!===Missing blockat /tmp/QaW2tPJF8Y:1» | ||
05:54
xinming_ left,
xinming joined
05:55
gootle joined
|
|||
diakopter | r: macro f($x) { quasi { "{{{$x}}} (just testing macros)" } } ; say f "ok" | 05:57 | |
p6eval | rakudo 68460c: OUTPUT«AST<-1403658370> (just testing macros)» | ||
grondilu | shouldn't it output "ok (just testing macros)"? | 06:21 | |
sorear | no | 06:24 | |
the outermost layer of {} delimits code from text | |||
the code which is interpolated is just {{$x}} which is equivalent to $x | |||
r: macro f($x) { quasi { "{{{{$x}}}} (just testing macros)" } } ; say f "ok" | |||
p6eval | rakudo 68460c: OUTPUT«===SORRY!===Error while compiling block : Error while compiling block f: Error while compiling block : Error while compiling block : Unknown QAST node type QAST::Unquoteat /tmp/cM33Hcj2KD:1» | ||
sorear | r: macro f($x) { quasi { {{{$z}}} ~ " (just testing macros)" } } ; say f "ok" | 06:25 | |
p6eval | rakudo 68460c: OUTPUT«===SORRY!===Variable $z is not declaredat /tmp/ZqjmVP9ZWV:1» | ||
sorear | r: macro f($x) { quasi { {{{$x}}} ~ " (just testing macros)" } } ; say f "ok" | ||
p6eval | rakudo 68460c: OUTPUT«ok (just testing macros)» | ||
sorear | phenny: tell masak interpolating unquotes into strings like "foo {{{{$x}}}} bar" breaks messily. diakopter++ | 06:26 | |
phenny | sorear: I'll pass that on when masak is around. | ||
sorear | r: macro f($x) { quasi { for 1..5 { {{{$x}}} } } } ; say f "ok" | ||
p6eval | rakudo 68460c: OUTPUT«===SORRY!===Error while compiling block : Error while compiling block f: Error while compiling block : Error while compiling block : Unknown QAST node type QAST::Unquoteat /tmp/hTSrBKOAU4:1» | ||
sorear | phenny: tell masak update/retraction: it's actually a generic issue with block-wrapping syntaxes and probably something you know about | ||
phenny | sorear: I'll pass that on when masak is around. | ||
grondilu | r: macro infix:<m+>($a, $b) { quasi { ({{{$a}}} + {{{$b}}}) % 13 } }; say [m+] ^10; | 06:29 | |
p6eval | rakudo 68460c: OUTPUT«Type check failed in unquote evaluation; expected AST but got Int in method evaluate_unquotes at src/gen/CORE.setting:10274 in method incarnate at src/gen/CORE.setting:10264 in macro infix:<m+> at /tmp/Px9WO9UEdl:1 in sub at src/gen/CORE.setting:12223 in… | ||
grondilu | can't I use a macro operator with a meta-operator? | 06:30 | |
06:31
tokuhiro_ joined
|
|||
grondilu | (if that makes any sense, which I'm not sure) | 06:31 | |
diakopter | [Coke]++ for that one, actually | 06:33 | |
sorear | grondilu: I don't think so. | ||
macros, because of their ability to look into expressions, subvert the higher-order function system | 06:34 | ||
grondilu | yeah that's what I thought. | ||
sorear | masak et al been talking about allowing macros in HOFs, but silently converting them to subs, along the lines of sub ($x,$y) { $x m+ $y } | 06:35 | |
grondilu | that would be nice | ||
sorear | I'm a little dubious of this, it seems to me that if a macro _can_ usefully be turned into a sub, it _should_ have been a sub to begin with | ||
06:35
tokuhiro_ left
|
|||
sorear | I can't think of a case where it'd be a win to use a macro where a sub would do | 06:36 | |
other than working around stupid optimizers | |||
grondilu | wouldn't a macro be faster? | ||
diakopter | r: print &fff | ||
p6eval | rakudo 68460c: ( no output ) | 06:37 | |
diakopter | O_O | ||
r: print &fff; say 'alive' | |||
p6eval | rakudo 68460c: OUTPUT«alive» | ||
diakopter | r: say (&fff).WHAT; say 'alive' | 06:38 | |
p6eval | rakudo 68460c: OUTPUT«Nilalive» | ||
diakopter | std: say (&fff).WHAT; say 'alive' | ||
p6eval | std 04216b1: OUTPUT«===SORRY!===Undeclared routine: 'fff' used at line 1Check failedFAILED 00:00 45m» | ||
diakopter | that seems new | ||
phenny: tell masak r: print &fff; say 'alive' # no error like std? # also r: say (&fff).WHAT; say 'alive' | 06:39 | ||
phenny | diakopter: I'll pass that on when masak is around. | ||
06:43
adu joined
|
|||
diakopter | r: macro foo { quasi { say macro bar { 55 } } }; say foo | 06:46 | |
p6eval | rakudo 68460c: OUTPUT«===SORRY!===Method 'evaluate_unquotes' not found for invocant of class 'NQPMu'at /tmp/oVJS9KJsJs:1» | ||
diakopter | phenny: tell masak r: macro foo { quasi { say macro bar { 55 } } }; say foo # boom | ||
phenny | diakopter: I'll pass that on when masak is around. | ||
06:51
xinming left
|
|||
sorear | grondilu: if macros are faster than small subs, it means your inliner is broken | 06:52 | |
06:53
xinming joined
|
|||
grondilu | sorear: ok | 06:53 | |
diakopter | phenny: tell masak r: macro foo { die macro bar { 55 } } # different kind of boom | 06:55 | |
phenny | diakopter: I'll pass that on when masak is around. | ||
diakopter | phenny: tell masak r: macro foo { die macro bar { 55 } }; foo # another different kind of boom | ||
phenny | diakopter: I'll pass that on when masak is around. | ||
diakopter | r: macro foo { die macro bar { 55 } }; foo | ||
p6eval | rakudo 68460c: OUTPUT«===SORRY!===Error while compiling block : Error while compiling block foo: Error while compiling op p6typecheckrv: Error while compiling op lexotic: Error while compiling op p6decontrv: Error while compiling op call: Unknown QAST node type NQPMuat /tmp/uKpHj4LjXH… | ||
diakopter | star: macro foo { package bar { } }; foo | 06:58 | |
p6eval | star 2012.10: OUTPUT«===SORRY!===too few positional arguments: 2 passed, 3 (or more) expected» | ||
diakopter | r: macro foo { package bar { } }; foo | 06:59 | |
p6eval | rakudo 68460c: OUTPUT«foo===SORRY!===too few positional arguments: 2 passed, 3 (or more) expected» | ||
diakopter | phenny: tell masak r: macro foo { package bar { } }; foo # weird boom | ||
phenny | diakopter: I'll pass that on when masak is around. | ||
07:03
ingy left,
ingy joined
|
|||
diakopter | r: require lion | 07:06 | |
p6eval | rakudo 68460c: OUTPUT«Could not find lion in any of: /home/p6eval/nom-inst/lib/parrot/4.8.0-devel/languages/perl6/lib, /home/p6eval/nom-inst/lib/parrot/4.8.0-devel/languages/perl6/vendor/lib, /home/p6eval/nom-inst/lib/parrot/4.8.0-devel/languages/perl6/site/lib, /home/p6eval/.perl6/2012… | ||
diakopter | r: say (macro a { }).DUMP | 07:17 | |
p6eval | rakudo 68460c: OUTPUT«(timeout)» | ||
diakopter | I'll time you out | ||
grondilu created rosettacode.org/wiki/Talk:Permutati...l6_version | 07:43 | ||
07:47
xinming_ joined
|
|||
grondilu | ahh it does not work | 07:48 | |
grondilu removed it | 07:49 | ||
07:50
xinming left
07:53
jaldhar left
07:57
tokuhiro_ joined
08:06
l3x joined
08:07
GlitchMr joined
08:11
l3x is now known as l3xer
08:17
SamuraiJack joined
08:21
adu left
08:24
zby_home joined
08:27
domidumont joined
08:48
xinming joined
08:51
xinming_ left,
domidumont left
08:52
domidumont joined
08:59
tokuhiro_ left
09:00
tokuhiro_ joined
09:04
tokuhiro_ left
09:16
kaare_ joined
09:20
l3xer left
09:21
l3xer joined
09:32
orafu left
09:42
kaare_ left
09:44
Patterner left,
Psyche^ joined
09:46
kaare_ joined
09:48
xinming_ joined
09:49
Psyche^ left
09:50
Psyche^ joined,
Psyche^ is now known as Patterner
09:51
xinming left
|
|||
GlitchMr | eval: print "\x{FF5F}\x{FF60}" | 10:04 | |
buubot_backup | GlitchMr: ⦅⦆1 | ||
GlitchMr | eval: print "\x{201c}\x{201d}" | 10:05 | |
buubot_backup | GlitchMr: “”1 | ||
10:16
spider-mario joined
|
|||
GlitchMr | Also: github.com/rakudo/rakudo/blob/nom/...s.pm#L3469 | 10:22 | |
Somehow I doubt this line is intentional | |||
Could it be removed? | |||
10:29
Patterner left,
l3xer left,
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
jnthn | ohhai o/ | 10:44 | |
tadzik | oh hai | 10:45 | |
jnthn | [Coke]++ # fixing the roast data | ||
Rakudo has quietly sneaked past the 24,000 passing tests marker, it seems :) | 10:46 | ||
10:47
xinming_ left
10:48
xinming joined
|
|||
dalek | kudo/nom: 64208d7 | jnthn++ | src/Perl6/Actions.pm: Remove leftover debugging code; GlitchMr++. |
10:49 | |
11:00
sisar joined
11:01
kaare_ left,
leont joined
|
|||
lumi__ | Is there some way to evaluate macro arguments? | 11:03 | |
jnthn | Haven't seen one, though may just be NYI | 11:09 | |
11:09
kaare_ joined
|
|||
jnthn | Well, I mean, there's no "official" way. Of course, there's *a way*. :) | 11:10 | |
r: sub eval_ast($ast) { eval 'macro m() { quasi { {{{$ast}}} } }; m' }; macro foo($a) { say eval_ast($a); $a }; foo 42 | |||
p6eval | rakudo 68460c: OUTPUT«42» | ||
11:29
PacoAir joined
11:36
kaare_ left
11:37
kaare_ joined
11:48
xinming_ joined
11:51
xinming left
11:52
jaffa4 joined
|
|||
jaffa4 | hi | 11:52 | |
What does :? do in regular expression? | 11:53 | ||
jnthn | jaffa4: After a quantifier? It's a backtracking modifier, iirc. | 11:55 | |
Gives you frugal matching | |||
jaffa4 | What is frugal matching? | ||
11:55
MayDaniel joined
|
|||
jnthn | r: say 'aaa' ~~ /\w+/ | 11:55 | |
p6eval | rakudo 64208d: OUTPUT«「aaa」» | ||
jnthn | r: say 'aaa' ~~ /\w+:?/ | ||
p6eval | rakudo 64208d: OUTPUT«「a」» | ||
jnthn | It does the quantifier, but does as few characters as it can, rather than swallowing as many as it can. | 11:56 | |
11:56
chee joined
|
|||
jaffa4 | This is what ? did in Perl 5 | 11:56 | |
jnthn | r: say 'aaa' ~~ /\w+?/ | ||
p6eval | rakudo 64208d: OUTPUT«「a」» | ||
jnthn | And still does in Perl 6 :) | ||
jaffa4 | What difference does : make? | ||
jnthn | Looking at the implementation...none... | 11:59 | |
However, note that : on its own means no backtracking | |||
: is don't backtrack, :? is frugal backtracking, :! is greedy backtracking | 12:00 | ||
jaffa4 | backtracking I understand but what is the difference between greedy backtracking and frugal? | 12:01 | |
jnthn | Greedy = match as much as you can, and if you have to backtrack then try matching less | 12:02 | |
Frugal = match as little as you can, and if you have to backtrack then try matching more | |||
r: say 'abab' ~~ /\w+b/ | |||
p6eval | rakudo 64208d: OUTPUT«「abab」» | 12:03 | |
jnthn | r: say 'abab' ~~ /\w+?b/ | ||
p6eval | rakudo 64208d: OUTPUT«「ab」» | ||
jaffa4 | r: say 'abab' ~~ /\w+!b/ | 12:04 | |
p6eval | rakudo 64208d: OUTPUT«「abab」» | ||
jaffa4 | I guess with ! is the same as without ! | ||
jnthn | In a regex, yes. | 12:05 | |
In a rule or token declaration, the default is ratchet (no backtracking) | |||
jaffa4 | ok, thanks | ||
12:16
bowtie joined
12:21
jerome left
12:34
jerome joined
12:35
Psyche^ joined,
Patterner left,
Psyche^ is now known as Patterner
12:40
mcero joined
12:47
jaldhar joined
12:48
xinming joined
12:51
xinming_ left
12:58
zby_home left
13:00
sisar left
13:09
cognominal joined
13:14
benabik left
13:24
cognominal left
13:28
tokuhiro_ joined
13:31
cognominal joined,
leont left
13:32
tokuhiro_ left
13:33
jaldhar left
13:44
jaldhar joined
|
|||
masak | g'day, #perl6 | 13:45 | |
phenny | masak: 06:26Z <sorear> tell masak interpolating unquotes into strings like "foo {{{{$x}}}} bar" breaks messily. diakopter++ | ||
masak: 06:26Z <sorear> tell masak update/retraction: it's actually a generic issue with block-wrapping syntaxes and probably something you know about | |||
masak: 06:39Z <diakopter> tell masak r: print &fff; say 'alive' # no error like std? # also r: say (&fff).WHAT; say 'alive' | |||
masak: 06:46Z <diakopter> tell masak r: macro foo { quasi { say macro bar { 55 } } }; say foo # boom | |||
Further messages sent privately | |||
masak | as indeed they were. | ||
diakopter++ # stresstesting macros | |||
I will get back to all of these reports after lunch. | 13:46 | ||
diakopter: re defining anything declarational inside a quasi, that's for D4, so that's not expected to work yet. | |||
jnthn | o/ masak | 13:47 | |
13:48
xinming_ joined
13:51
xinming left
13:55
cognominal left
13:57
brrt joined
14:05
cognominal joined
14:17
brrt left
|
|||
cognominal | hi, how to test the type of an object that is not 6model in nqp? | 14:18 | |
jnthn | Don't. | 14:23 | |
Find another way to do what you want that means you don't have to. | |||
14:23
mhasch left
|
|||
jnthn | The rest of Rakudo and NQP have been done without needing to do this... | 14:23 | |
cognominal | hum | 14:24 | |
jnthn | If you must, pir::isa__IPs($foo, 'SixModelObject'). But don't expect your code to be portable. | ||
Note that nqp::istype does not explode if given non-6model objects. | 14:26 | ||
cognominal | ok, so if I want to check if the value is a string, I do a string operation in a C<try>? If it passes, it is a string? | 14:29 | |
jnthn | Er, most things can work as strings. | 14:30 | |
nqp: say(1 ~ 2) | |||
p6eval | nqp: OUTPUT«12» | ||
jnthn | What are you actually trying to do? | ||
cognominal | I am rewriting the code you gave me this summer to generated json from a match | 14:31 | |
it worked only for a few cases | 14:32 | ||
but was a good start :) | |||
jnthn | OK, and where do you hit problems? | 14:33 | |
cognominal | ok, I protect my .isa(Match) and the rest can be treated as a string because I have already treated the list/hash cased. | 14:34 | |
thx | |||
jnthn | Note that nqp::istype($foo, NQPMatch) or so will not need protecting | 14:35 | |
cognominal | nice | 14:36 | |
jnthn | And it'll keep working :) | 14:40 | |
14:41
cognominal left
14:48
xinming joined
14:49
cognominal joined,
cognominal left,
cognominal joined
14:51
xinming_ left
15:06
jaldhar left
15:09
am0c joined
|
|||
masak | cognominal: whatever it is you're doing exactly, you don't seem to be working "with the grain" of Perl 6. | 15:11 | |
r: "foobarbaz" ~~ /foobar/; say $/.substr(3) | 15:12 | ||
p6eval | rakudo 64208d: OUTPUT«bar» | ||
masak | most common objects are Cool, i.e. they will act as Str if you need them to. | ||
15:14
Pleiades` left
|
|||
grondilu | guys, what would you think of this: paste.siduction.org/20121104151335 for rosettacode.org/wiki/Write_language...n_3D_ASCII ? | 15:14 | |
masak looks | 15:15 | ||
aww, I expected source code. | |||
grondilu | oops, I forgot to expand | ||
paste.siduction.org/20121104151608 | 15:16 | ||
15:16
Pleiades` joined
|
|||
masak | most of these language exmples are cool. python's isn't, though. :/ | 15:16 | |
examples* | |||
grondilu: the output looks wrongly formed here. | 15:17 | ||
grondilu | indeed | ||
masak | and I'm still more interested in the source than the output. | 15:18 | |
if the source is just "print this multi-line string literal", I don't think it's a nice solution. | |||
(IMHO) | |||
jaffa4 | r:/(.*?(';'\s*||()<before \x27>||()<before \x22>||<before \/\*>||<before $>||()<before \n>)) / | 15:19 | |
r: /(.*?(';'\s*||()<before \x27>||()<before \x22>||<before \/\*>||<before $>||()<before \n>)) / | |||
p6eval | rakudo 64208d: OUTPUT«===SORRY!===Unrecognized regex metacharacter ) (must be quoted to match literally) at line 2, near "<before \\x"» | ||
jaffa4 | std: /(.*?(';'\s*||()<before \x27>||()<before \x22>||<before \/\*>||<before $>||()<before \n>)) / | 15:20 | |
p6eval | std 04216b1: OUTPUT«===SORRY!===Null pattern not allowed at /tmp/fvdKiUZgEw line 1:------> /(.*?(';'\s*||(⏏)<before \x27>||()<before \x22>||<before expecting any of: quantmod regex atom regex_infix sigmaybeParse failedFAILED 00:00 | ||
..42m»… | |||
15:20
Chillance joined
|
|||
grondilu | masak: I was planning on making a home-made compression of the string literal | 15:21 | |
cognominal | masak: that's nqp, not Perl 6 :) | 15:22 | |
masak | cognominal: I see. yes, nqp does more of explicit coercion, that's true. | 15:23 | |
TimToady: oops! I meant to do 'does'... | 15:26 | ||
I updated gist.github.com/c97c37efa09d0d72ad9e to reflect this fact. | 15:27 | ||
jaffa4 | : "b\x27"~~ /<before \x27>/; | 15:28 | |
How to match \x27 without advancing .pos? | 15:29 | ||
jnthn | Matching it will advance the position, but you can probably capture it. | 15:30 | |
15:30
cognominal left
|
|||
masak | diakopter: the accidental neologism "aquarism" sounds like a bias one might accrue if one works too much with water-dwelling creatures. | 15:31 | |
r: macro f($x) { quasi { "{{{{$x}}}} (just testing macros)" } } ; say f "ok" | 15:34 | ||
p6eval | rakudo 64208d: OUTPUT«===SORRY!===Error while compiling block : Error while compiling block f: Error while compiling block : Error while compiling block : Unknown QAST node type QAST::Unquoteat /tmp/ThGOl8kMre:1» | ||
masak | this one is indeed interesting. | ||
timotimo | masak, be wary of the aquatic supremacist types. they want to subvert (actually submerge) most of humanity | ||
masak | TimToady: would you expect {{{}}} or { {{{}}} } inside a qq string in a quasi? | ||
masak submits rakudobug | |||
timotimo: :P | |||
jnthn | .oO( if you could use different stoppers for the quasis, we can avoid this crazy... :P ) |
15:35 | |
masak: I think the answer is that quasis only have meaning in the MAIN language, so you need to be inside the closure. | 15:36 | ||
masak | I think that's sane, yes. | ||
jnthn | er, please confirm STD actually belives what I just told you :P | ||
masak | because we're essentially doing a post-lexicalizing unquote substitution here, and qq strings are tokens. | 15:37 | |
jnthn | They're not tokens, but the inside of them is a different language. | ||
masak | right. | ||
they're tokens in the sense that they're one "thing" to the optable parser. | 15:38 | ||
but so are parenthetical expressions, so I guess that definition of "token" is not very standard :) | |||
15:38
cognominal joined
|
|||
masak | r: macro f($x) { quasi { for 1..5 { {{{$x}}} } } } ; say f "ok" | 15:39 | |
p6eval | rakudo 64208d: OUTPUT«===SORRY!===Error while compiling block : Error while compiling block f: Error while compiling block : Error while compiling block : Unknown QAST node type QAST::Unquoteat /tmp/xqmqR5HheK:1» | ||
masak | huh? why the heck does that break? it looks perfectly OK to me... | ||
masak submits rakuodbug | 15:40 | ||
jnthn | Lack of delayed declarations? | ||
(a block is a declaration, really) | 15:41 | ||
masak | no, it's failing to find and substitute the unquote. | 15:42 | |
note to everyone about to stumble over early macro bugs: whenever you get the above "Unknown QAST node type QAST::Unquote", it means that you managed to place a {{{}}} in a place where it was not found and substituted. congratulations. it's always a bug, so make sure to report new cases. | 15:43 | ||
jnthn | masak: Ok, well, it's both :) | 15:45 | |
masak | r: print &fff; say (&fff).WHAT; say 'alive' | ||
p6eval | rakudo 64208d: OUTPUT«Nilalive» | ||
masak | I don't know what to think about this one. | ||
jnthn | Unsurprising, I think. | ||
r: print Nil | |||
p6eval | rakudo 64208d: ( no output ) | ||
jnthn | Unless you want the &fff to whine at compile time, which arguably it should. | ||
masak | r: print &foweubtweyrghasrasrt; say (&foweubtweyrghasrasrt).WHAT | 15:46 | |
p6eval | rakudo 64208d: OUTPUT«Nil» | ||
masak | ah. | ||
n: print &foweubtweyrghasrasrt; say (&foweubtweyrghasrasrt).WHAT | |||
p6eval | niecza v22-16-g4c016f5: OUTPUT«===SORRY!===Undeclared routine: 'foweubtweyrghasrasrt' used at line 1,1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1437 (die @ 5)  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_uni… | ||
masak | yes, it should whine, I think. | ||
masak submits rakudobug | |||
diakopter++ | |||
jnthn | Make sure it's not already filed. | ||
masak | ok. | ||
jnthn | I'm sure we've had this discussion before... | ||
It'll need the optimizer to catch it I expect. | 15:47 | ||
dalek | rl6-roast-data: 3276340 | coke++ | .gitignore: Ignore new roast/ dir |
||
jnthn | Can't do the variable path as postdecls are OK | ||
masak | we have rt.perl.org/rt3/Ticket/Display.html?id=107960 which is arguably the same issue. | ||
15:48
xinming_ joined
|
|||
masak | r: macro foo { die macro bar { 55 } }; foo | 15:48 | |
p6eval | rakudo 64208d: OUTPUT«===SORRY!===Error while compiling block : Error while compiling block foo: Error while compiling op p6typecheckrv: Error while compiling op lexotic: Error while compiling op p6decontrv: Error while compiling op call: Unknown QAST node type NQPMuat /tmp/MqNFBXtLcV… | ||
masak submits rakudobug | |||
r: macro foo { die "OH NOES" }; foo | 15:49 | ||
p6eval | rakudo 64208d: OUTPUT«===SORRY!===Method 'SET_FILE_LINE' not found for invocant of class 'X::AdHoc'» | ||
masak | r: macro foo { die }; foo | ||
p6eval | rakudo 64208d: OUTPUT«===SORRY!===Method 'SET_FILE_LINE' not found for invocant of class 'X::AdHoc'» | ||
masak | yeah, that should work. | ||
jnthn | I think that's a general problem, fwiw | ||
(any non-X::Comp exception thrown at compile time, in certain cases) | |||
15:50
whiteknight joined
|
|||
masak | r: macro foo { quasi { die "this works, though!" } }; foo; say "alive" | 15:50 | |
p6eval | rakudo 64208d: OUTPUT«this works, though! in at /tmp/vMPQqM2Njn:1 in block at /tmp/vMPQqM2Njn:1» | ||
masak | \o/ | ||
15:52
xinming left
|
|||
jnthn | yeahbut that's thrown at runtime :) | 15:52 | |
masak | GlitchMr: re irclog.perlgeek.de/perl6/2012-11-04#i_6124794 -- please tell me more about your doubts that that line is "intentional". | 15:53 | |
GlitchMr | It was already fixed | ||
jnthn already removed that line | |||
It was this line: github.com/rakudo/rakudo/commit/64...2b6efcc40b | |||
masak | oh! | 15:54 | |
yes. | |||
GlitchMr++ | |||
masak feels bad for letting that line slip through :) | |||
jnthn | Don't worry, happens to all of us :) | ||
GlitchMr | I've found this line while making Perl 6 changes article | ||
jnthn | Also, I'm always impressed how many times people who aren't Rakudo core devs catch stuff like this. It's really nice having such code review. | 15:55 | |
15:56
grondilu left
|
|||
TimToady | masak: when we switch to ¤ we won't have that problem | 15:56 | |
({{{}}} vs {{{{}}}}) | 15:57 | ||
jnthn | .oO( then our problem will be how the f**k to type ...that thing ) |
15:58 | |
TimToady | it's supposed to be hard :) | ||
but witha compose key it's probably just COMPOSE ox | |||
jnthn | I guess it's not replacing {{{ }}} | ||
TimToady | (is how I typed it) | ||
jnthn | Just additional? | ||
TimToady | well ¤() or some such | 15:59 | |
¤foo for a direct one | |||
¤escape() for something that might be recognized in a string, maybe | |||
some kind of syntax to name the syntactic category that it participates in the alternation of | 16:00 | ||
so the parser knows what to treat it as, and what to expect after it | |||
but I'm not in a hurry to spec that since it gives masak++ a cold grue | 16:01 | ||
(and is not part of his grant) | |||
jnthn would be curious to see it prototyped in STD | |||
TimToady 2 | 16:02 | ||
jnthn | I'd perhaps be less wary of it if I knew how it worked... :) | ||
masak | I would be curious to see it prototyped in spec, too. | ||
TimToady | maybe I can figure it out while we're taking Julian to Disneyland this week | 16:03 | |
masak | it's not that I'm so against it anymore. I just know that there are conceptual problems with things I've seen proposed so far, making them unsuitable as replacements for {{{}}} | ||
TimToady | can you remind me of those when they occur to you? | 16:04 | |
masak | it's in the logs. just search for ¤ :P | 16:05 | |
16:06
plobsing joined
|
|||
TimToady | it's possible, I suppose, that (like your AST types determined by the lexical context), we should be determining the targetted alternation by marking the quasi, not the unquasi | 16:06 | |
masak | but if I recall correctly, something like parsing an operator is problematic because the information about precedence and associativity sits on the operator, which if it's parametric isn't available at parse time. | 16:07 | |
things like that. | |||
TimToady | I suspect that a restriction on parametricity is probably in order there, or you can't parse the role | 16:08 | |
(correctly) | |||
masak | note that I'm not distinguishing between "AST types" in any strict sense. it's more of a difference on the domain level. i.e. macro ASTs can turn out to have originated from quasis or from macro arguments. | ||
TimToady | my bias these days is to try to think of such things as "types" by default, in a loose sense, since it tends to drive the design into a saner direction, even if they don't officially become types | 16:09 | |
masak | it's noticeable in the source code, where things were previously named $quasi_ast, and can now be named $macro_ast, etc. | ||
TimToady | since many of the RFCs can be analyzed as "type failures" | ||
masak | TimToady: nod. | ||
TimToady | here's a funny way to do parametric operator precedence: require the operator to be defined in its own file, and stop the parse as soon as you see the operator, and then complete the parse each time it's instantiated :) | 16:11 | |
but probably we should just make a way to eval something at instantiation time | |||
(and let the result of the eval poke things in where the compiler would have at compile time) | 16:13 | ||
masak | I don't think {{{}}} is powerful enough to do things like 'class {{{$name}}} { ... }' -- which people seem to expect. | ||
same with subs, methods, etc. | |||
there seems to be an expectation that macros do this. I don't think it's at all unreasonable. | |||
TimToady | hence the ¤ proposal, as an escape that is highly unlikely to occur in normal code | 16:14 | |
masak | aye. | ||
TimToady | so it can be special-cased in every lexer | ||
jnthn | walk & | ||
masak | 'class {{{$name}}} { ... }' is interesting, because what is $name? most likely, it'll be a Str. so in a way, it's a text-based macro substitution. | 16:15 | |
(well, an AST containing a Str, I guess) | |||
because 'create-class MyClass;' with MyClass being a bareword won't work. | 16:16 | ||
so it'd have to be 'create-class "MyClass";' | |||
TimToady | you'd really like to have something like a quasi :category<longname> { stuff } to poke in there | ||
[Coke] | alright, got muddle working locally agian... | 16:17 | |
masak | std: Unknown::Longname | ||
p6eval | std 04216b1: OUTPUT«===SORRY!===Undeclared name: 'Unknown::Longname' used at line 1Check failedFAILED 00:00 41m» | ||
masak | TimToady: my point is that if it's not declared at macro invocation time, it won't work. | ||
TimToady: and since the purpose of the macro is to declare it... | |||
16:18
spider-mario left
|
|||
TimToady | that's why macros need to be able to also say "this argument is parsed as :category<longname>" | 16:18 | |
masak | oh, non-textual macros having a hand in how their arguments are parsed? interesting. | 16:19 | |
yes, that would solve a lot of current issues I see. | |||
TimToady | the only alternative is the one-size-fits-all aproach of Lisp | ||
masak | for example how you'd even pass an operator. | ||
TimToady | "the one true syntax" crops up in lots of languages for that reason | 16:20 | |
masak is excited by this last suggestion | |||
TimToady | which last suggestion, forcing everyone to use Lisp? :) | ||
masak | no, being able to specify what category the macro arguments belong to. :) | 16:21 | |
TimToady | well, the parser has to know when to stop parsing any given category, but for an operator this is usually self-limiting by LTM and whatever the longest token implies | 16:22 | |
GlitchMr | Why Lisp? Why not Logo programming language? | ||
TimToady | why not Tcl, which also has the "one true syntax" | ||
masak | as does TECO. | 16:23 | |
oh, was thinking of Trac. | |||
GlitchMr | In Logo, strings, numbers, arrays and code blocks are this same type - strings | ||
TimToady | I remember Tom Christiansen congratulating John Osterhaut for finding a way to force people to put the opening curly on the same line as the condition "as God and Dennis Ritchie intended it" | ||
GlitchMr | (or perhaps they are arrays... not sure, really) | 16:24 | |
masak | in JavaScript, everything is either a double-precision float, a string, or a hash. :) | ||
16:24
leont joined
|
|||
TimToady | but Lisp is the granddaddy of all languages that force you to use a single syntax for every possible AST | 16:25 | |
they perceive this to be a feature | |||
GlitchMr | masak: or undefined or null | ||
or NaN | |||
masak | yes, it's interesting that both Arc and Clojure deviate from this trend. | ||
GlitchMr | (but NaN is float...) | ||
masak | GlitchMr: NaN is a double-precision float. | ||
TimToady | in a sense, Perl 6 is finally inventing M-EXPRs | ||
masak | TimToady: I heard the same meme from jnthn the other day. | 16:26 | |
curious. | |||
GlitchMr | I've once done a language that looks like this - gist.github.com/4012490 | ||
That "almost" looks like Lisp | |||
(that wasn't intended to be used like normal language... it's REALLY slow) | 16:29 | ||
jaffa4 | How to make a reverse for loop? | 16:32 | |
masak | r: for reverse 1, 2, 3 { .say } | ||
p6eval | rakudo 64208d: OUTPUT«321» | ||
jaffa4 | ok | ||
16:35
cognominal left
16:36
cognominal joined
|
|||
GlitchMr | jaffa4: reverse makes iterator so it should be as fast as normal for loop | 16:37 | |
16:37
arkydo joined
|
|||
jaffa4 | good to know | 16:37 | |
masak | most list functions make iterators. | 16:39 | |
GlitchMr | Isn't the general rule - everything makes iterator unless it's sort? | ||
masak | er. | 16:40 | |
I think we need to define terms here if the discussion is to have any meaning. | 16:41 | ||
by "iterator", I assume you mean something gather-like. | |||
many list function have a gather somewhere in them, either directly or indirectly. | 16:42 | ||
map and grep do, but I think Rakudo has some optimization there so it's not really gather. don't remember the details. | |||
16:42
cognominal left
|
|||
masak | r: my @a = map { last when * %% 7; $_ }, 1..10; say @a | 16:43 | |
p6eval | rakudo 64208d: OUTPUT«1 2 3 4 5 6» | ||
masak | sort isn't unique in not returning its results using gather. not even among the list functions. | 16:44 | |
basically anything which needs the whole input before being able to emit its first piece of output will have this property. | 16:45 | ||
and note that sort still *could* return results using an iterator. I just don't think it does. | |||
16:48
xinming joined
16:52
xinming_ left,
cognominal joined
16:54
raiph joined
|
|||
raiph | [Coke]'s spectest passing data mentions numbers for "spec" and "plan". for rakudo, for the last few months, "plan" has been higher than "spec". what's that about? | 16:58 | |
TimToady | yes, sort could be lazy on the last merge | ||
jnthn | What types of iterators things use under the hood is probably best left as an implementation detail :) | ||
raiph: It's about people thinking explicit test plans are too much like hard work. ;) | |||
raiph: Some tests do there stuff and then have "done" at the end. Many have an explicit "plan 42;" | 16:59 | ||
raiph: Those with an explicit plan can be counted into spec as they can be analyzed statically without having to actually run the tests. | 17:00 | ||
masak | it's an interesting data point in a big discussion about being explicit/redundant vs statically analyzing code for its properties. | 17:01 | |
17:03
tokuhiro_ joined
|
|||
jnthn | Personally, I'd find it more intersting to know how many spectests we actually have :P | 17:03 | |
masak | I don't think anyone would contest that. | 17:06 | |
the question is more, how. | |||
jnthn | What if we put the number of tests somewhere in the file, in a way that could be easily regex'd out? :D | 17:07 | |
masak | then we might as well plan it. | 17:08 | |
otherwise the risk is too big that it gets out of sync. | |||
jnthn | masak: You missed the sarcasm :) | ||
masak | yes, I did. | ||
jnthn | (My point being, that's what plan actually gives us, where it's used) | 17:09 | |
masak | probably because I don't fully agree with its premise. | ||
I think it'd be nice to have enough tooling to be able to get by with 'plan *'/'done'. I know we don't have such tooling. | |||
jnthn | I'm not sure we can. | 17:10 | |
What if the is/ok etc are in a loop? | |||
I guess I just don't find twiddling a number at the top of a test file painful, so fail to see the motivation for plan */done. | 17:11 | ||
doy | why is running the test suite a problem? | 17:13 | |
jaffa4 | How would you count number of matches in a string of regular expression? | ||
jnthn | doy: Because some test files don't actually run yet. | ||
raiph | is the "spec" number the total of explicit "plan"s and the "plan" number (closer to) the actual number of spec tests? | 17:14 | |
(ie I'm confused. :) | |||
jnthn | raiph: The plan number is the number of planned tests from files that ran. | ||
The spec number is adding up the explicit plans for all files. | |||
doy | jnthn: that could be fixed by explicit skip counts, couldn't it? | 17:15 | |
raiph | jnthn: thanks. that makes sense. any idea what the "spec" number is? :) | ||
oops. thanks | |||
masak | r: "aaaaaaaa" ~~ /(a)+/; say $0.elems | ||
p6eval | rakudo 64208d: OUTPUT«8» | ||
masak | jaffa4: like that? | ||
r: "aaaaaaaa" ~~ /(a)+/; say +$0 | 17:16 | ||
p6eval | rakudo 64208d: OUTPUT«8» | ||
jnthn | doy: When it's the whole test file that won't parse or isn't meaningful to run, that really boils down to the number of tests in the file. | ||
Yes, we could get a better estimate by running the test that will run, adding up all that they plan, then just looking for explicit plans in the remaining test files. | |||
*tests | |||
jaffa4 | r: "\nererer\n" ~~ / \n /; | ||
p6eval | rakudo 64208d: ( no output ) | ||
jaffa4 | NUmber of \n s in the text? | 17:17 | |
jnthn | r: say "\nererer\n".match(/\n/, :g).elems | 17:18 | |
p6eval | rakudo 64208d: OUTPUT«2» | ||
jaffa4 | n: say "\nererer\n".match(/\n/, :g).elems | ||
p6eval | niecza v22-16-g4c016f5: OUTPUT«Unhandled exception: Excess arguments to Cool.match, unused named g at /home/p6eval/niecza/lib/CORE.setting line 0 (Cool.match @ 1)  at /tmp/dfzWZwWqb6 line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3)  at /home/p6… | ||
jnthn | Guess it's nyi in n | 17:19 | |
jaffa4 | n: "aaaaaaaa" ~~ /(a)+/; say $0.elems | 17:20 | |
p6eval | niecza v22-16-g4c016f5: OUTPUT«8» | ||
GlitchMr | grep > +grep * eq "\n", "\nabc\n".comb | 17:21 | |
2 | |||
This is probably bad hack | |||
I meant | |||
+grep * eq "\n", "\nabc\n".comb | 17:22 | ||
jnthn | Well, if it's just \n you are about then in this specific case | ||
r: say "\nererer\n".lines.elems | |||
p6eval | rakudo 64208d: OUTPUT«2» | ||
jnthn | :) | ||
17:23
circlepuller left
|
|||
jaffa4 | yes , or "\n\n" ~~ /(.*?\n)+/; | 17:23 | |
17:24
circlepuller joined,
arkydo left
|
|||
masak | r: say "".lines.elems | 17:26 | |
p6eval | rakudo 64208d: OUTPUT«0» | ||
masak | r: say "a".lines.elems | ||
p6eval | rakudo 64208d: OUTPUT«1» | ||
masak | r: say "\n".lines.elems | ||
p6eval | rakudo 64208d: OUTPUT«1» | ||
masak | r: say "a\n".lines.elems | ||
p6eval | rakudo 64208d: OUTPUT«1» | ||
jnthn | Yeah, it aint' really the same as looking for \n. But may be righter anyway, dependong on the use case :) | ||
17:37
Vlavv_ joined
|
|||
masak | r: macro foo { package bar { } } | 17:38 | |
p6eval | rakudo 64208d: ( no output ) | ||
GlitchMr | r: say +"a\nb".lines | 17:40 | |
p6eval | rakudo 64208d: OUTPUT«2» | ||
GlitchMr | Yeah... I guess if you would insert \n at end of string and remove 1, it would work | 17:41 | |
17:43
cognominal left
17:48
xinming_ joined
17:50
cognominal joined
17:51
xinming left
|
|||
masak | clearly the best answer is "\nabc\n".comb.Bag{"\n"} ;) | 18:16 | |
(but I don't think that works yet) | |||
jaffa4 | r: print $*ERR: "error"; | 18:21 | |
p6eval | rakudo 64208d: OUTPUT«===SORRY!===Confusedat /tmp/M7UiEc7ZOH:1» | ||
jaffa4 | s: print $*ERR: "error"; | 18:22 | |
std: print $*ERR: "error"; | |||
p6eval | std 04216b1: OUTPUT«ok 00:00 43m» | ||
jaffa4 | n: print $*ERR: "error"; | ||
p6eval | niecza v22-16-g4c016f5: OUTPUT«===SORRY!===Invocant handling is NYI at /tmp/XGRxk_C9kr line 1:------> print $*ERR: "error"⏏;Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1437 (die @ 5)  at /home/p6eval/… | ||
18:23
bruges left,
jaldhar joined,
bruges joined
|
|||
masak | it's NYI in Rakudo, too. but Rakudo's just acting confused about it. | 18:23 | |
jaffa4 | r: $*ERR.print ("error"); | 18:24 | |
p6eval | rakudo 64208d: OUTPUT«===SORRY!===Confusedat /tmp/tTFAiPaMWM:1» | ||
jaffa4 | n: $*ERR.print ("error"); | ||
p6eval | niecza v22-16-g4c016f5: OUTPUT«===SORRY!===Two terms in a row (method call requires colon or parens to take arguments) at /tmp/cn45IiCvgK line 1:------> $*ERR.print ⏏("error");Parse failed» | ||
jaffa4 | IS there a way to print to the STDERR? | ||
masak | r: $*ERR.print ("error") | 18:28 | |
p6eval | rakudo 64208d: OUTPUT«===SORRY!===Confusedat /tmp/pnQtFYiCxz:1» | ||
masak | r: $*ERR.print("error") | ||
p6eval | rakudo 64208d: OUTPUT«error» | ||
masak | r: $*ERR.print: "error" | ||
p6eval | rakudo 64208d: OUTPUT«error» | ||
masak | you almost had it. | ||
18:33
tokuhiro_ left
|
|||
jaffa4 | n: $*ERR.print("error"); | 18:37 | |
p6eval | niecza v22-16-g4c016f5: OUTPUT«error» | ||
jaffa4 | ok"; | ||
IS it possible to redirect stderr and stdout? | 18:39 | ||
flussence | r: gist.github.com/1606837 | 18:42 | |
p6eval | rakudo 64208d: OUTPUT«defabc» | ||
colomon | In theory, I think $*ERR = IO object should work. dunno if it works in practice yet. | 18:45 | |
masak | I've successfully temporized $*OUT, I'm pretty sure. | ||
jnthn | yeah, shoudl work. Tehre's even an IO::Capture module | ||
18:48
xinming joined
18:51
xinming_ left
|
|||
masak | right, exactly. | 18:52 | |
sorear | o/ | 18:54 | |
jaffa4 | What chmod? Is there such a function somewhere? | 18:58 | |
jnthn | o/ sorear | 18:59 | |
jaffa4 | r: chmod( 700, "basename.plx" ); | 19:02 | |
p6eval | rakudo 64208d: OUTPUT«Failed to set the mode of 'basename.plx' to '0o1274': chmod failed: No such file or directory in block at src/gen/CORE.setting:7521 in method chmod at src/gen/CORE.setting:7516 in sub chmod at src/gen/CORE.setting:7803 in block at /tmp/W6kF9MHJRP:1»… | ||
jaffa4 | n: chmod( 700, "basename.plx" ); | 19:03 | |
p6eval | niecza v22-16-g4c016f5: OUTPUT«===SORRY!===Undeclared routine: 'chmod' used at line 1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1437 (die @ 5)  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37)  at /ho… | ||
masak | sorear! \o/ | ||
jaffa4 | the speed of Niecza seems to be less than 120 lines/s | 19:06 | |
sorear | masak: best discovery of today: www.jmilne.org/math/ | 19:08 | |
19:08
snearch joined
|
|||
masak looks | 19:09 | ||
19:11
havenn joined
|
|||
masak | sorear: nice! thanks. | 19:13 | |
jaffa4 | rakudo does not like tis... quotestart: if ( $quote == 0 ) { | 19:16 | |
masak | jaffa4: the label? no, Rakudo doesn't do labels yet. Niecza does. | 19:17 | |
wow, the thought of someone writing 112 pages about complex multiplication... | |||
jaffa4 | ok | 19:18 | |
colomon | masak: context? | 19:19 | |
19:20
havenn left
|
|||
colomon thought he had it for a moment, but the article he was looking at is 154 pages on complex multiplication.... | 19:21 | ||
masak | colomon: <sorear> masak: best discovery of today: www.jmilne.org/math/ | ||
the article I found was at www.jmilne.org/math/CourseNotes/cm.html | 19:22 | ||
it is beyond me; I don't know that much group theory. | |||
colomon | gotcha | ||
sorear | seems to be something much broader than just multiplication over C | 19:23 | |
skimming this it makes a lot of references to semisimple K-algebras | |||
colomon | over my head as well. | 19:24 | |
19:26
MayDaniel left
|
|||
masak .oO( "semisimple"... unfortunately it's the wrong half of it that's simple ) :P | 19:26 | ||
sorear | it's like a small planet... | 19:27 | |
19:28
PacoAir left
|
|||
sorear | I came looking for information on elliptic curves | 19:28 | |
I will be here a while | |||
masak | ;) | ||
19:28
PacoAir joined
19:29
PacoAir left,
PacoAir joined
|
|||
masak | I feel like an amateur chess player in terms of category theory. I still have to remind myself that monomorphisms correspond to injective functions, and epimorphisms to surjective functions. | 19:30 | |
it's like having to remind oneself that the horsie moves two steps in one direction, then turns 90 degrees and moves one more step. | |||
colomon | masak++ | 19:32 | |
cognominal | masak: my math teacher (who was a moron) would chastize you for wrongly assimilating the general case to one particular example. But he was a Bourbakian bureaucrat who has no clue about the learning process. | 19:41 | |
masak | the epithet "Bourbakian bureaucrat" has a nice ring to it, even if it's not that flattering ;) | 19:43 | |
cognominal | for him, apparently, everything was said in the formal language of math and it was a crime to try to interpret it or to reformulate in more common languag. | ||
sorear | mm, Bourbaki | ||
masak | cognominal: to me mathematics is awesome precisely because I can context-switch between (sometimes necessary) formalism and (sometimes very useful) informality. | 19:44 | |
cognominal | right | ||
masak | I think many people consider math lethally boring because they are only taught the former. | ||
to me it has always been a very alive topic. | 19:45 | ||
cognominal | we are not straying far away from Perl. It is about languages. Should they be a straight jacket or a way to think? | 19:47 | |
masak | right. | 19:48 | |
cognominal | btw, I should go someday back to read www.di.ens.fr/users/longo/files/Cat...s/book.pdf | 19:51 | |
sorear | cognominal: would you blame any major part of that on the Bourbakis themselves? | 19:54 | |
cognominal | sorear: nope | ||
19:54
domidumont left
|
|||
cognominal | but its caricature fits very well in the educational system. They make it a mechanical way to teach, and to rate students. Somehow formalism is the new numerology of so callled educated people, meaning if you frame anything with enough formalism, it has to be true. | 19:58 | |
… or meaningful in some vague platonist way. | 19:59 | ||
*platonic? | |||
masak | no, I think it has always been that way. probably even before we had empirical science in a big way. | 20:06 | |
cognominal | sorear: I think the first Bourbakists would be horrified to see how their stuff has been transmogrified into a arbitrary selection process. Most of the formalism has been invented to deal with various form of infinities which are hardly touched in school (except for the convergence of series). | ||
masak | people who don't know how to clearly convey their message resort to hiding behind majestic formalisms. | ||
sorear | what level of schooling are we talking about here? | 20:07 | |
cognominal | I forget the equivalency with the american system. I meant before what we call the bacallauréat you get around 17-18 years of age. | 20:09 | |
masak | sounds like 10th to 12th grade here. | 20:10 | |
20:14
kurahaupo joined
|
|||
cognominal | Right now, I am reading Bernard Stiegler and his messsage is buried in Derridian crap wordplay. He has an excuse, he was his student but I don't know why so many authors need to wrap their message in pretentious forms that alienates them from their pontential readership. | 20:17 | |
20:20
mcero left
|
|||
masak | cognominal: have you seen masi.cscs.lsa.umich.edu/~crshalizi/...rnism.html ? | 20:22 | |
20:23
raiph left
|
|||
sorear | Derrida :| | 20:25 | |
masak | I think Eliezer Yudkowsky woke me up from some of the excessive respect for high-falutin' language which doesn't make a difference in the observable universe. does the falling tree in the forest make a sound if no-one's there to hear it? well, if I answered "yes" or "no" to that question, is there any way to tell the difference in the physical universe? | 20:27 | |
that is, models better describe something that matters, or they won't matter either. | 20:28 | ||
cognominal | masak: Chomsky is very much hated by the french intelligentsia because he denounces their lack of integrety : pompous language and playing fast with facts or downright ignoring them. They were very vicious when he got framed by a revisionist. The case was closed : Chomsky himself is a revisionist. en.wikipedia.org/wiki/Faurisson_affair | 20:29 | |
masak | Chomsky v. the French. I don't know anything about that, but I can imagine. :) | 20:30 | |
20:34
kurahaupo left
|
|||
GlitchMr | perl6: print +'З' | 20:35 | |
p6eval | rakudo 64208d: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏З' (indicated by ⏏) in method Str at src/gen/CORE.setting:9992 in method print at src/gen/CORE.setting:7488 in sub print at src/gen/CORE.setting:7298 in block at /tmp/… | ||
..niecza v22-16-g4c016f5: OUTPUT«Unhandled exception: Cannot parse number: З at /home/p6eval/niecza/lib/CORE.setting line 1443 (die @ 5)  at /home/p6eval/niecza/lib/CORE.setting line 3546 (ANON @ 11)  at /home/p6eval/niecza/lib/CORE.setting line 3548 (NumSyntax.str2num @ 5)  at /h… | |||
GlitchMr | ok, I guess that putting Russian letters instead of digits won't work ;-) | 20:36 | |
(ok, that wasn't even an attempt... it's a programming language, not human) | |||
jnthn | .u З | ||
phenny | U+0417 CYRILLIC CAPITAL LETTER ZE (З) | ||
sorear | I kind of feel like a bad person for stereotyping French philospohers as unintelligible | ||
===SORRY!=== Cross-script phishing attack detected | 20:37 | ||
jnthn | :D | ||
GlitchMr | But well, phishing using Russian is actually possible | ||
Many letters are... similar | |||
jnthn | Yeah, peоple wоn't nоtice a thing... | 20:38 | |
GlitchMr | But today, considering that browsers display punycode if website address contains letters from different scripts... | ||
Probably all you can do is paypaI.com | |||
or... | |||
sorear | 2012.10.24.13.32.13 < kurahaupo> κλεπτψ? | 20:39 | |
2012.10.24.13.32.39 < jnthn> .oO( gee, that's some really messed up cyrill...oh, wait... ) | |||
GlitchMr | раураІ.com | 20:40 | |
^ this is actually cyrillic... | |||
Actually, І is not Russian, but still | 20:41 | ||
.u І | |||
phenny | U+0406 CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I (І) | ||
20:43
jaffa4 left
|
|||
sorear | did not realize Belarus had its own letters | 20:44 | |
GlitchMr | Not really. Those letters just have disappeared from Russian. | ||
jnthn | iirc, Belarusian can best represent my surname compared to other Cyrillic alphabets. | 20:45 | |
GlitchMr | I was in Russian before 1918 | ||
jnthn read that as "I was in Russia before 1918" :D | |||
sorear mis-parsed that as "I was in Russi... | |||
GlitchMr | I is 9th letter of alphabet. | 20:46 | |
(no... it's I am... wait) | |||
sorear | GlitchMr, Russian revolution refugee | 20:47 | |
GlitchMr | I was referring to letter, not me. | ||
sorear: en.wikipedia.org/wiki/Reforms_of_R...rthography | |||
felher | masak++ # macro work and newest blogpost. Very nice :) | ||
sorear kind of doubts that GlitchMr was alive in 1918 | 20:48 | ||
masak | felher: thanks! I'm pretty happy about the recent progress. | ||
GlitchMr | lol, I wasn't | ||
I should put it in quotes or something | 20:49 | ||
Or perhaps as U+0406 | |||
U+0406 was in Russian before 1918 | |||
(but they didn't have Unicode...) | |||
masak .oO( Belarussian, the beautiful version of Russian... ) | |||
Belarusian* | 20:50 | ||
20:58
GlitchMr left
|
|||
felher | masak: glad to hear that. While i'm quite impressed to see how far the macro-work has come I am also quite eagerly waiting to see COMPILING:: work. Not that I have a particular use case at hand, but it strikes me as one of those things people will do great stuff with :) | 20:58 | |
But maybe thats just me. I can't help it and I can't explain it -- but I just like macros. :) | 20:59 | ||
masak | me too :) | ||
COMPILING:: will likely have several parts. | 21:00 | ||
you're supposed to be able to both define new things in the mainline scope, and refer to existing things there, for example. | |||
jnthn | .oO( In the first part, we collect together the long list of things the spec and spectests think COMPILING means... ) |
||
masak .oO( it means the programmers are fighting with swords from their office chairs ) | 21:01 | ||
21:07
kaare_ left
|
|||
felher | masak: oh, does this mean that one can write a macro that defines a sub in the mainline code? And this sub may be used by the normal code following it? Something like ' macro make-stubs(...) {...} ; make-stubs(<sub1 sub2 sub3 sub4>); ' which will then make sub1, sub2, sub3 and sub4 in the mainline code, with some stub code in them? | 21:07 | |
Someting like : gist.github.com/7064d9fc21e5b1df6a1a | 21:08 | ||
masak | felher: yes, but the macros as currently spec'd are not powerful enough to vary over sub names. see discussion earlier today with TimToady. | 21:11 | |
felher | masak: okay, great, thanks! :) | 21:13 | |
21:22
theOnliest joined
21:24
SamuraiJack left
21:30
theOnliest left
|
|||
felher | 'night, #perl6 | 21:32 | |
[Coke] | raiph: pretty sure that's from tests with "plan *" | 21:37 | |
... sees jnthn already addressed it. | 21:38 | ||
21:38
plobsing left
21:39
avar left
21:40
avar joined
21:41
plobsing joined
|
|||
dalek | rl6-roast-data: b5f5c0d | coke++ | / (3 files): today (automated commit) |
21:48 | |
21:49
plobsing left
|
|||
masak | 'night, #perl6 | 21:50 | |
sorear | night masak | 21:51 | |
[Coke] is glad to see his family's home country discussed in backscroll. | |||
sorear: 8 failures in my niecza run today. (down from 11) | 21:52 | ||
sorear | Which one? Belarus? | 21:56 | |
22:03
nyuszika7h left,
sftp left
22:05
nyuszika7h joined
22:11
am0c left
22:18
rindolf joined
22:22
kda joined
22:27
fgomez left
22:28
fgomez joined
|
|||
[Coke] | yes. though "home country is extremely generous, since I only found out it was Belarus and not Russia about 5 years ago. | 22:29 | |
22:30
shoeswat joined,
shoeswat left
22:31
Rix left
|
|||
sorear | [Coke]: did you ever live there yourself? | 22:33 | |
[Coke] | no. pretty sure you have to go back 3 more generations for that. | 22:34 | |
records are sketchy. | |||
22:34
fgomez left
22:37
Rix joined
22:38
chee left
22:42
PacoAir left
22:50
daniel-s_ joined
22:51
fgomez joined
22:52
leont left
22:54
daniel-s left
22:55
leont joined
23:07
benabik joined
23:08
azawawi joined
|
|||
azawawi | hi | 23:09 | |
23:26
benabik_ joined,
benabik left,
benabik_ is now known as benabik
23:28
benabik_ joined,
benabik left,
benabik_ is now known as benabik,
benabik left
23:30
plobsing joined
23:46
sjohnson left
23:47
sjohnson joined
23:48
sjohnson left,
sjohnson joined
23:55
thou left
|
|||
azawawi starts dancing... Farabi6 run dialog with various Perl 6/5 runtimes implemented... :) | 23:57 | ||
sorear | \o/ | ||
azawawi | panda install Farabi6 # to test it... since right now Safe is not enabled | 23:59 |