pugscode.org/ | nopaste: sial.org/pbot/perl6 | ?eval [~] <m oo se> | We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/
Set by diakopter on 11 July 2007.
DarkWolf84 hi there 04:51
:)
agentzh hi, DarkWolf84 05:20
moritz_ good morning ;) 06:59
moritz_ an opinion question: should docs/Perl6/Perl5/Differences.pod be kept short and concise, or should it be made more comprehensive? 08:50
masak moritz_: maybe short explanations with further references to long ones in individual .pod files in docs/Perl6/Perl5/Differences/ 08:51
moritz_ masak: sounds good 08:57
masak moritz_: doing neither and both at the same time. I guess that's the natural solution to everything from a Swedish perspective 09:02
(we're good a compromising)
s/a/at/
moritz_ sweden++ 09:05
masak :)
yes... the middle way is good most of the time 09:06
moritz_ (actually the things I hear recently about sweden are not that good... like a person id for everybody, sever problems with privacy etc.)
masak I know. I'm pretty actively opposing the privacy things 09:07
and ID for everybody, that's been here a long time I think
that's just business as usual in Sweden
moritz_ I mean an ID is not a bad thing, as long as you can't do anything with it unless you have special privileges 09:08
masak hm
I don't think we have gone that far yet, no
moritz_ name+date of birth pretty much serves as an ID otherwise 09:09
masak an ID still feels comparable to a passport or a drivers licence: it identifies you uniquely
but the privacy things worry me
moritz_ apart from that I sympathize with the scandinavian countries... 09:10
masak strangely enough, Piratpartiet is the first political party that brings issues to the table which I even care about
moritz_ and my girlfriend is half norwegean ;)
masak: but currently they don't get that much votes, do they?
masak no, not very many
only in high schools and stuff 09:11
moritz_ that's sad
masak people who don't yet have voting rights
it shows, if nothing else, that there's a generation divide
the elder generation criminalizes the younger
moritz_ which will eventually strike back by reducing pensions ;) 09:12
but seriously, we have similar problems in Germany
masak hm, reducing pensions would be like hitting yourself in a sense 09:13
moritz_ with a minister for inner affair who wants to put everyone under surveilance and has no feeling for privacy
masak plus, I'm not sure the young generation is ever concerted enough to do anything as a unit
yes, that's sad
moritz_ it's pretty clear that the german pension system is going bankrupt
so everybody who cares (and can) builds pension fonds privately 09:14
masak there are silent problems stemming from the Age Revolution, too
people live longer and reach their actual pension age later than at 65
moritz_ it's raised to 67 now :/ 09:15
masak probably not enough
moritz_ aye
masak Sweden is thinking of recording all their mobile phone traffic 09:16
that's just insane
moritz_ it is
moritz_ wants more people to use cryptography 09:17
we need a good crypto api in Perl 6 (back to topic ;) 09:18
riffraff ciao 10:11
moritz_ hi riffraff ;) 10:14
moritz_ since most tests pass with kp6-kp6, can I consider kp6 to be bootstrapped? 11:18
fglock moritz_: not yet, the kp6-kp6 tests dont't test for bootstrapping 11:39
they are runtime tests
moritz_ but it's an kp6 image compiled by kp6, isn't it? 11:40
fglock moritz_: yes, but it needs some fixes before it can replace kp6-mp6 11:46
moritz_ fglock: ok 11:47
fglock kp6-kp6 can't compile itself yet
fglock the original kp6 roadmap didn't mean to bootstrap so early 12:10
moritz_ so why was it attempted? because kp6 is much more hackable than mp6? 12:11
fglock side-projects are good for investigating problems and alternatives 12:17
and because bootstrapping is fun 12:18
moritz_ -Ofun++ 12:19
DarkWolf84 and that gives more bootstraping experience :) 12:21
fglock it also depends on what you mean by bootstrapping, plain kp6 already has a bunch of code written in Perl6 (junctions, multis, array, pair, ...) 12:24
kp6-kp6 is basically migrating the calling conventions in the grammar, from mp6 to kp6 12:25
DarkWolf84 that's what I mean
most of the p6 syntax is done 12:26
:)
or just kp6 one
fglock kp6 grammar is still incomplete, the next project phase would be to fix it 12:28
by merging STD chunks into it
DarkWolf84 I'm curious about emiting executables and how this will be done 12:30
moritz_ DarkWolf84: then write an emitter for a compileable language ;)
DarkWolf84 this things bootstraping and grammar are new things to me
fglock DarkWolf84: you mean binaries?
DarkWolf84 yes 12:31
fglock it would be possible to emit C right now 12:32
but actually making it work requires a lot of work
writing the C libraries 12:33
moritz_ even though C has no BEGIN blocks? 12:34
fglock the emitted code has no BEGIN blocks
they are executed at compile time 12:35
moritz_ it's no fun writing libraries for dynamic lists, hashes and strings in C ;)
fglock i think we can reuse existing libs
moritz_ the emitted p5 code has BEGIN blocks 12:36
but they might be an artefact of the p5 emitter
fglock moritz_: that's because we are using native perl5 pads
but C pads would be just a data structure
Parrot is another option, of course 12:37
and kp6 could even emit nqp code 12:38
moritz_ and parrot supports virtually all of p6 OO, so we wouldn't have to emulate OO 12:39
DarkWolf84 so p6-p6 will use parrot? 12:40
moritz_ some day perhaps, yes 12:41
that's what parrot is being made for
but it doesn't mean that all implementations must use it
fglock lunch & 12:47
xinming 20:26 < fglock> DarkWolf84: you mean binaries? 12:56
Oops. sorry.
In windows, clicked right button, and didn't notice the putty is activeated. >_<
DarkWolf84 np :) 12:57
DarkWolf84 #pugs print pi; print e; 16:02
exp_evalbot OUTPUT[3.141592653589793*** No such subroutine: "&e"␤ at /tmp/mBke6tbUj4 line 1, column 17-18␤]
DarkWolf84 is there the number for e? 16:03
moritz_ I seem to recall it's Math.e or Math::e or some such
moritz_ we had that disussion on p6c 16:04
oh way, if you `use Num :constants;' then you have e and pi 16:05
#pugs use Num :constants; say pi
exp_evalbot OUTPUT[pugs: *** No such subroutine: "&require_Num"␤ at /tmp/r39Cqq83QX line 1, column 1␤]
DarkWolf84 pi works without use 16:06
moritz_ #pugs sayNum::pi
exp_evalbot OUTPUT[*** No such subroutine: "&sayNum::pi"␤ at /tmp/D71EPbS5OC line 1, column 1 - line 2, column 1␤]
DarkWolf84 #pugs print pi
moritz_ #pugs say Num::pi
exp_evalbot OUTPUT[3.141592653589793]
OUTPUT[*** No such subroutine: "&Num::pi"␤ at /tmp/ocI6jFGnpz line 1, column 5 - line 2, column 1␤]
moritz_ Num::pi should work, pi not
DarkWolf84 but pi worked
as a global var 16:07
moritz_ it's not a var (it doesn't have a sigil)
DarkWolf84 s/var/const/
moritz_ where are sigil less constants defined 16:08
masak we have sigil-less constants? :/ 16:09
moritz_ I'm asking that ;)
DarkWolf84 maybe it's a function then
sub*
masak that, strangely, would be ok
by me
moritz_ aye 16:10
still, it shouldn't be in ::GLOBAL ?
t/builtins/math/pi.t calls pi() as a sub
or is there another definition of pi? 16:12
doesn't seem so 16:14
pugs_svnbot r17698 | moritz++ | updated t/builtins/math/pi.t to current synopsis 16:21
diff: dev.pugscode.org/changeset/17698
lambdabot Title: Changeset 17698 - Pugs - Trac
masak I must say I prefer writing pi to writing Num::pi every time ;) 16:24
but a rebind in my programs would solve that
moritz_ you can 'use Num :constants;'
perl5.10.0 -E 'say "YaY"' 16:25
YaY
note the version number ;)
rgs YaY. 16:26
masak cool
PerlJam 5.10 was finally released? 16:27
moritz_ not released
but the version number of blead is 5.10 now 16:28
which means it can't take too long now
rgs IT CAN'T IT CAN'T
PerlJam well it was planned to be here in Sept. So there's still time :)
rgs various small problems still need cleaning, but I hope a RC soon 16:29
TimToady s:g/err/orelse/ 16:34
rgs TimToady: uugh 16:35
masak why?
TimToady logic programming
and readability
masak liked err
not much-despised by me
PerlJam still likes "err"
rgs it's not obvious that the difference between or and orelse is definedness
TimToady please see email 16:36
masak is reading it now
moritz_ TimToady: on p5p? 16:37
PerlJam moritz_: p6l
TimToady private cc to rgs, but he may forward if he likes
moritz_ ah, read it
I liked 'err' as well, 'dor' needs more explanation IMHO 16:38
'orelse' is ok, though
rgs I haven't received anything yet
Juerd I'd almost suggest ifundef
But that's one char longer again
szbalint I like the move away from err, it was too close to error.
TimToady logic programming is about success/failure, which definedness is just the underlying mechanism indicating success
Juerd It's immediately fully obvious what it does though.
PerlJam "andthen" and "orelse" seem a tad forced, but I can live with them :-) 16:39
TimToady I'm forcing them. :)
Juerd $foo ifundef $bar
$foo orelse $bar
$foo dor $bar
$foo err $bar
TimToady foo() orelse fail
Juerd In order of obviousness, from my perspective
TimToady immediately obvious
moritz_ I seem to recall that Eiffel uses 'orelse' or some such for guaranteed short circuit or
Juerd "foo or fail" and "foo orelse fail" read the same to me
TimToady Ada did
moritz_ never used or learned ada 16:40
but eiffel is based on Ada syntax I was told
masak now that we have orelse, what's the remaining uses of or?
PerlJam I thought eiffel predates Ada. 16:41
TimToady it's still just a low precedence ||
PerlJam (or perhaps that's just how I ran into them)
TimToady but for STD I kept running into the need for the logic programming ops that can bind intermediate results
Juerd Actually, what's the use for defined-or for *failure handling*, given that we can now easily "return 0 but true;"?
TimToady so that I can do hypothesis chaining
moritz_ anybody inclined to update the test suite? 16:42
Juerd Why use definedness to indicate success?
TimToady in my mind, any use of "but" is a code smell.
Juerd "but" should be an alias for "and"
TimToady because fail returns something undefined
Juerd if $foo but not $bar { ... }
[particle] TimToady: maybe you should rename it 'butt' to make that more obvious ;)
moritz_ [particle]: lol ;) 16:43
TimToady basically, use of mixins indicate you didn't do a role somewhere you probably should have 16:44
*indicates
[particle] 0 but True|False 16:45
masak moritz_: I could, just a moment 16:52
TimToady hang on, I'm doing it
masak oki
moritz_ I'm trying to hack s/err/orelse/ into pugs
masak guess that's only fair :)
TimToady need to change pugs at same time
right
I was just grepping the whole pugs dir 16:53
including pugs and t
moritz_ I don't have much success, though
masak moritz_: why not?
moritz_ once somebody hacks it in, I can take care of the vim file, and ext/ 16:54
TimToady just let me do it all
moritz_ masak: I don't know which instances to replace
masak TimToady: do it, orelse ;)
TimToady and then?... :)
moritz_ the problem is that 'err' is sometimes used for errors
TimToady and then and then and then and then....
I'll figger it out
moritz_ TimToady, our chief haskell hacker ;) 16:55
TimToady there's really not much much to change in pugs. It immediately remaps to // 16:57
which isn't quite according to current spec, but close enough, given $! is already bound by fail
masak mm 16:58
maybe devise a test which exhibits the diff'rence?
rgs andthen makes sense, once you have orelse 16:59
but days before a RC, I wouldn't add a new operator to perl 5... 17:00
pugs_svnbot r17699 | moritz++ | vim syntax file: added 'orelse', 'andthen'
diff: dev.pugscode.org/changeset/17699
lambdabot Title: Changeset 17699 - Pugs - Trac
moritz_ but it's 7 chars for one op... ;)
TimToady I'd stick with // for 5.10, probably 17:01
rgs TimToady: yes, and add orelse and andthen later. hopefully the feature pragma makes that easier 17:02
I'll remove "err" from 5.10, still.
pmurias hi 17:05
moritz_ hi pmurias 17:06
no 'err' in ext/ 17:07
TimToady some js with err though... 17:08
DarkWolf84 no more err? 17:11
why is that 17:12
moritz_ DarkWolf84: read p5p ;/ 17:13
DarkWolf84 sorry I don't understand 17:14
moritz_ on the perl5porters mailing list there was a discussion on how that op should be named 17:16
fglock pmurias: hi 17:18
pmurias fglock: check if this test is written correctly 17:26
pugs_svnbot r17700 | pmurias++ | [kp6] a very simple token test
diff: dev.pugscode.org/changeset/17700
lambdabot Title: Changeset 17700 - Pugs - Trac
pmurias it fails and i'm not sure if i invoke the rule correctly 17:28
fglock looking
fglock it looks like a new error, thhis is no longer working: perl kp6-mp6-perl5.pl --perl5rx < examples/token-test.pl 17:31
this
pmurias fglock: is the test correct 17:32
?
fglock it looks ok, and it should work
pmurias it dosn't here
fglock it doesn't here either 17:33
pmurias i'm trying to write a simple meta model in kp6 17:34
is it ok to add an Unboxed class, and make ::DISPATCH autobox things which aren't kp6 objects 17:35
fglock hmm - it works if you use { 'foo' } instead of { foo }
pmurias ?
fglock i'd rather handle autoboxing at compile-time 17:36
hmm 17:37
pmurias fglock: yes... int,str might be better 17:40
fglock i think you need to use a non-oo language to write the metamodel
and then define 'class' and such using macros 17:41
pmurias fglock: p6 is planned to allow having custom metamodels
what i think you do is have your new meta model use the old one 17:42
pugs_svnbot r17701 | lwall++ | s:g/err/orelse/ 17:45
diff: dev.pugscode.org/changeset/17701
lambdabot Title: Changeset 17701 - Pugs - Trac 17:45
pmurias fglock: the example i commited requires two things i didn't commit yet but it should ilustrate the principle 17:47
pugs_svnbot r17702 | pmurias++ | kp6: example of a custom metamodel
diff: dev.pugscode.org/changeset/17702
lambdabot Title: Changeset 17702 - Pugs - Trac
fglock hmm - p5landish is not portable 17:49
pmurias a portable interface layer could be written 17:50
you need some way of accesing the dispatcher 17:51
ruoso pmurias, your're missing the bootstrap magic 17:52
pmurias the responder interface in generaly
ruoso presumes we're talking about the kp6+1 compiler
pmurias ruoso: the thing assumes you bootstraped via some other way
ruoso pmurias, ok
in that case
what happens is that 17:53
the new compiler implements a new runtime
using "class Class"
as this new compiler handles all namespace lexicals by itself
"class Foo" will be an object of type "Class"
stored in the namespace "Foo"
then, when the code makes "Foo.new()" 17:54
the new runtime will lookup the "Foo" something
which happens to be an object of "Class"
which have a method "constructor" (or something) 17:55
ruoso creating a object of type "Foo" 17:55
pugs_svnbot r17703 | pmurias++ | [kp6] things required for example/custom-metamodel.pl to run 17:57
diff: dev.pugscode.org/changeset/17703
lambdabot Title: Changeset 17703 - Pugs - Trac
pmurias ruoso: what i'm experimenting with is how the user will be able to use his own metamodel
ruoso pmurias, a proper name for that would be "p6 extension model" 17:58
:)
pugs_svnbot r17704 | moritz++ | updated a few examples to s/err/orelse/
diff: dev.pugscode.org/changeset/17704
lambdabot Title: Changeset 17704 - Pugs - Trac
ruoso but anyway... 17:58
this must be implemented by the new compiler 17:59
in the bootstrap process
pmurias it's implemented now, by the current compiler :)
ruoso not sure that way is a sane way of doing it 18:00
pmurias neither 18:01
ruoso one thing I'm pretty sure
is that it should not be that coupled
fglock pmurias: look at MOP.pm:15
pmurias ruoso: with the implementation? 18:02
ruoso pmurias, yep
the object itself must know where it comes from
and how to handle p6 calling convention
to its own
pmurias fglock: looked 18:03
ruoso in theory the reverse should be possible to
fglock P6opaque could possibly be used to build a new MOP, without the need for low level data
ruoso a p5 tied variable that translates the p5 calling convention to the p6 land 18:04
fglock pmurias: it's a prototype object that rebuilds itself
ruoso in the end we'll have the kp6 objects in this new compiler being dispatched in one way, and the other objects being dispatched in other way 18:06
pmurias fglock: i'll have to think it over as i'm a bit confused 18:08
fglock P6Opaque.new( dispatcher => ..., data => ..., ... ) 18:09
pmurias fglock: i get it now
DarkWolf84 why in IO there is only tcp socket connection? 18:10
pmurias shower&
moritz_ DarkWolf84: not yet specced probably 18:22
DarkWolf84 In p5 there is udp in IO::Socket 18:23
imho it's good to select (optional) the protocol 18:24
Tene DarkWolf84: feel free to propose a spec for how other transports should be specified.
ruoso home & 18:25
pugs_svnbot r17705 | pmurias++ | [kp6] fixed matching of constants 19:20
diff: dev.pugscode.org/changeset/17705
lambdabot Title: Changeset 17705 - Pugs - Trac
pmurias fglock: should there be some general command line syntax for specifing visitor args? 19:21
i want to add a flag to Token to print out the intermediate code but i don't want to add a Yet Another Command Line Option 19:22
allbery_b environment? 19:24
pmurias allbery_b: there is an option passed to a Visitor by the --secure flag 19:27
so i wanted to have a consitent interface 19:28
* consistent
OTOH environment might be best for debugging option 19:30
fglock pmurias: you could use an %ENV variable 19:32
pmurias fglock: not supported by either mp6 or kp6 19:34
supported by kp6 not mp6 19:35
fglock hmm
pmurias * but not
pugs_svnbot r17706 | fglock++ | [kp6] existing open classes are not overwritten by MOP make_class() 19:37
diff: dev.pugscode.org/changeset/17706
lambdabot Title: Changeset 17706 - Pugs - Trac
fglock i wonder why the diffs are so big 19:39
i didn't change the emitter
TimToady possibly some fallout from the s:g/err/orelse/ 19:40
fglock ah, ok 19:41
it's just whitespace 19:45
pugs_svnbot r17707 | fglock++ | [kp6] use 'redefine_method' in make_class, allows to use a circular Perl6 Prelude 19:56
diff: dev.pugscode.org/changeset/17707
lambdabot Title: Changeset 17707 - Pugs - Trac
pugs_svnbot r17708 | fglock++ | [kp6] make forcerecompile 20:07
diff: dev.pugscode.org/changeset/17708
lambdabot Title: Changeset 17708 - Pugs - Trac
fglock home & 20:08
pmurias fglock: do you stay at work up to such later hours? 20:10