pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, smop: etc.) || We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/
Set by TimToady on 25 January 2008.
00:05 jferrero left, yahooooo joined, jferrero joined 00:06 jferrero left 00:11 araujo joined 00:13 Schwern left, Alias_ left, charsbar_ left, redicaps left, Eevee left, Gruber left, eternaleye_ left, GeJ left, wolverian left, nnunley left, qmole_ left, fullermd left, ingy left, cookys left, ingyfoo joined, wolv joined, Grrrr joined, nnunley joined, GeJ_ joined, wolv is now known as wolverian
meppl good night 00:13
00:16 meppl left 00:21 pbuetow left 00:34 elmex left 00:51 felipe left 00:59 fullermd joined
pugs_svn r21292 | ruoso++ | [smop] changing lowlevel method to receive the responder, identifier and capture of the outer invocation as the arguments for the "call" method. After some sm0p language changes there are a few leaks in p6opaque.sm0p still to be identified. 00:59
01:11 simcop2387 left 01:17 icwiener left 01:32 armagad joined
armagad I have a n00bish unix question… When generating Makefile with .configure how do you tell which executable, of say flex to use, if one is in /usr/local and one is in /usr ? 01:45
Patterner $PATH 01:48
b_jonas armagad: try ./configure --help in case it has an option for that 01:49
armagad Yeah I switched it there and fixed one and broke another :(
b_jonas or try something like ./configure --with-lex=/path/name or something
or try ./configure LEX=/path/name 01:50
armagad WIll the --with-flex= trick work even if there is no --with-flex in the .configure --help?
b_jonas or try LEX=/path/name make
Patterner env PATH=/path/to/flex/directory:$PATH ./configure
b_jonas armagad: some options are not listed in --help
Patterner lots of possibilities...
armagad ah
b_jonas so it may or may not work
there are lots of ./configure options so it's hard to tell 01:51
if these fail, try to ask in ##workingset (preferred) or #gnu
Patterner mv /usr/local/bin/flex /usr/local/bin/NOflexINGALLOWED # if appropriately desperate
armagad: what exactly is the problem? wrong flex used? 01:52
or just curiosity?
armagad php is the problem 01:54
or maybe Leopard
I tried installing the old version of flex for php
b_jonas armagad: doesn't the source distrib include the flex output? 01:55
or did you modify the input?
most programs include flex outputs I think, to reduce dependency problems 01:56
armagad ld says there are duplicate symbols and it seems to be a problem that only mac people have
I was just trying to regenerate those 01:57
b_jonas armagad: is it dupe symbols with yy_* or whatever flex' prefix is?
armagad Mostly just to learn also because the devs just marked the bugs as bogus
Yeah
b_jonas what's the prefix btw?
armagad yy_ ? 01:58
b_jonas or what are some dupe symbols
armagad _yytext ?
b_jonas hmm
01:59 alester_ joined
b_jonas is it using more than one flex lexer? 01:59
02:02 alester left
armagad Doh. you just went over my head 02:03
b_jonas armagad: I mean, are there more than one .l files compiled to different .c/.cxx files each, with both linked to the same program? 02:04
02:05 meteorjay joined
armagad Basically I think I was looking for the solution to the general but super contrived situation where you have a ./configure that requires two specific versions of two different programs neither of which it has a --with for and neither of which are in the same path (breaking the $PATH fix) 02:06
Patterner If the configure requires that, it should have the options. 02:07
armagad Yeah maybe it is too contrived I will just remove the new version of flex 02:08
b_jonas: there is a zend_ini_scanner.l and a zend_language_scanner.l and they both have respective .c files. I am not sure if that is a right answer 02:10
02:11 armagad left, armagad joined
Patterner I compiled PHP 5.2.6 on my linux box without problems. 02:14
my flex is 2.5.35 02:15
armagad oh yeah I do think it is a Mac OS 10.5 issue
02:15 Jamtech left
armagad I was trying from cvs 02:16
Apple ships them with httpd and php preinstalled but no pear 02:18
b_jonas armagad: so you're trying on a mac? 02:20
armagad yeah
b_jonas and you can't reproduce it, right?
that's pain
are you a php maintainer or something?
armagad heck no
I just wanted a php dev environment on my laptop 02:21
b_jonas but then why do you care about an error that you can't reproduce? 02:22
02:23 Limbic_Region left
armagad I am producing the error 02:23
I just want it to go away
b_jonas armagad: oh 02:27
could you change the flex prefix with that flex option?
that would need changing of the code
but it should still be easy
armagad b_jonas:Oh. I did get rid of the flex problem 02:28
b_jonas oh, how?
I'm interested
armagad It didn't help the duplicate symbol problem
I don't think I will use it on anything else I just got rid of the new version 02:29
02:37 armagad left 02:38 armagad joined 02:45 Alias_ joined 02:49 b_jonas left 02:52 armagad left 02:53 Auzon left 02:56 Auzon joined 03:02 Auzon left 03:12 Auzon joined 03:13 justatheory joined 03:16 simcop2387 joined 03:29 Kattana joined 03:33 charsbar joined 03:46 kattana_ left 03:51 c1sung left 04:06 kattana_ joined 04:13 sri_work left, wknight8111 left 04:14 Yonderboy joined 04:16 kanru left
ingyfoo hola 04:19
04:19 ingyfoo is now known as ingy 04:23 Kattana left
TimToady aloh 04:23
Yonderboy aloh 04:26
04:27 Yonderboy left 04:30 smg left 04:31 redicaps joined 04:33 smg joined 04:35 Gothmog_ left 04:39 nipotan is now known as nipotaway 04:46 Gothmog_ joined 04:48 smg left 04:50 smg joined 04:57 kanru joined
ingy hi TimToady 05:03
reading your recent commits to perl6 05:12
05:19 nothingmuch joined 05:25 c1sung joined 05:26 Psyche^ joined 05:43 Patterner left, Psyche^ is now known as Patterner 05:44 justatheory left
ingy seen avar? 05:46
ingy is sad that re::engine::TRE doesn't build on darwin 05:47
05:49 justatheory joined 06:11 alester_ left 06:20 redicaps left 06:31 ashizawa joined 06:37 agentzh left, agentzh joined 06:44 justatheory left 06:55 bacek_ left
ingy anyone know how I can get a password reminder for pugs commit? 06:56
moritz_ ingy: I think I can send one via commitbit, just a sec 06:57
ingy: sent (to your ttul.org address) 06:58
ingy thanks moritz_
07:00 jan_ left 07:02 b_jonas joined
moritz_ wow, pugs repo has 366 commiters, 246 of which have made at least one commit 07:02
bacek moritz_: I've made at least 10 :) 07:06
moritz_ bacek: 27, according to moritz.faui2k3.org/svn-search/searc...ek;terse=1 07:07
lambdabot Title: Pugs SVN search, tinyurl.com/6x8x8c
bacek moritz_: wow...
07:09 jan_ joined
moritz_ and I made 651 - but many of them are just infrastructure (evalbot, irc logs) 07:09
b_jonas evalbot has to be a committer?
not just a reader?
I mean, isn't the repo public read-only 07:10
moritz_ b_jonas: no, I made commits to the evalbot source code, which is also in the pugs repo
b_jonas oh, I see
moritz_ which doesn't really qualify as Perl 6 hacking IMHO
b_jonas is that the pugs-only evalbot or the one that runs multiple p6 implementations?
bacek perl6: say 'Hello' 07:11
moritz_ the multi
p6eval elf 21292: OUTPUT[Hello␤]
..pugs: OUTPUT[Hello␤]
..rakudo 29221: OUTPUT[Hello␤]
moritz_ nqp: say("hi")
p6eval nqp: OUTPUT[hi␤]
moritz_ kp6: say "hi"
p6eval kp6 21292: OUTPUT[hi␤]
pugs_svn r21293 | ingy++ | Refactor the Makefile a bit. Made it nice and friendly. 07:19
r21293 | ingy++ |
r21293 | ingy++ | (I like refactoring Makefiles :)
r21293 | ingy++ |
r21293 | ingy++ | New make targets:
r21293 | ingy++ |
r21293 | ingy++ | * make
r21293 | ingy++ | * make all
r21293 | ingy++ | * make check
r21293 | ingy++ | * make try
r21293 | ingy++ | * make try cat
r21293 | ingy++ | * make clean
r21293 | ingy++ | * make distclean
b_jonas hmm, no maintclean? 07:23
moritz_, bacek: thx
07:25 kane_ joined
pugs_svn r21294 | ingy++ | Add a README to help people get started in src/perl6. 07:27
moritz_ I'm so screwed, on one of my boxes vim doesn't start anymore :/ 07:31
bacek moritz_: how so??? 07:32
moritz_ stopping gpm helped...
bacek: strace showed it got stuck while opening /dev/gpmctl or so
b_jonas wow 07:33
bacek moritz_: are you using console???
b_jonas I've never seen gpm freeze
ingy considers always booting his macbook in the console :) 07:34
b_jonas by the way, do you think it can considered a security bug that the xorg server can lock up completely if the font server it reads from is malicious?
or is it just a feature 07:35
moritz_ bacek: ssh
bacek moritz_: ssh -Y
b_jonas ingy: you can boot os X to console-only? that's nice
moritz_ bacek: but I don't want to forward X stuff. It worked before
b_jonas I mean, usefully and easily 07:36
moritz_ b_jonas: yes, IMHO that's a security bug
b_jonas moritz_: even if it can't do anything worse than lock up indefinitely?
I don't know for sure that it can't, but supposing it couldn't
I know it can lock up
(found out the wrong way) 07:37
moritz_ b_jonas: yes. Denial of Service is a security bug
ingy denial of X
b_jonas moritz_: sure, but you could say the font server has to be trusted that much
moritz_ b_jonas: aren't there ways to load non-trusted fonts as a user? 07:38
b_jonas also I think it can be killed if you tear down the network connection to it
moritz_: yep, there are, but I don't know if that's with the font server or directly
moritz_ isn't too familiar with X and fonts and all that nasty stuff
b_jonas you don't have to use the font server
07:38 jferrero joined
b_jonas plus, it's a different thing 07:38
you can use multiple font servers if you want to load your own fonts
you don't need to be able to safely load fonts to an existing font server as a user 07:39
clarifying is, I think (but haven't tried) that you can make X resume if you tear the network connection to the font server by killing it or downing the network 07:40
moritz_ "mommy, you can't use the interent right now, I have to disconnect the switch..." ;-) 07:42
b_jonas moritz_: no, but disconnect with a packet filter
also, if you connect to an untrusted xfs running on your own machine with local domain sockets so you can't do that and you don't have root rights, you're screwed 07:43
moritz_ assuming you have one installed at all
07:44 pmurias joined
moritz_ (paket filter, that is) 07:44
I don't have them on my desktop machines
b_jonas yeah, if you don't, you'd have to attach a debugger to X and make read from the xfs return 0 to simulate a break
I'm paranoid enough to run a packet filter on my desktop
07:44 felipe joined
moritz_ what does that buy you? 07:44
b_jonas also precompiled kernels that come with debian have iptables compiled as a module in them so you can install the iptables executable and set up a rule on the fly 07:45
what buys me?
moritz_ the packet filter on a desktop
I use debian, but usually my own kernels (weird hardware) 07:46
b_jonas moritz_: yeah, sure
I dunno if you can compile the iptables module and load it on fly
I compile my own kernel on the desktop too 07:47
moritz_ anyway, I have to go to the bakery to get some breakfast, bbl
b_jonas see you then
pmurias bacek: by you "run the console" you meant the virtual terminals?
* by "you are using the console???" 07:48
bacek pmurias: 'something that not xterm'
bacek switched to gvim 2 years ago and happy with it. 07:49
pmurias my X setup at one time got confused with a virtual terminal ;) 07:50
08:16 iblechbot joined 08:38 meppl joined 08:42 kattana_ left 08:43 Alias_ left 08:53 bacek left 09:36 pmurias left 09:46 wknight8111 joined 10:00 ben__ joined 10:01 ben left 10:03 meppl left 10:04 ruoso left 10:10 icwiener joined 10:22 chris2 joined 10:26 meppl joined 10:43 agentzh left 10:46 wknight8111 left 10:47 Kattana joined, pbuetow joined 10:56 meppl left 10:59 meppl joined 11:04 alanhaggai joined 11:24 agentzh joined 11:28 ruoso joined 11:33 bacek joined 11:47 ashizawa left 11:55 barney joined 12:02 bacek left 12:09 chris2 left, jferrero left, felipe left, jan_ left, b_jonas left, nothingmuch left, Gothmog_ left, charsbar left, apeiron left, jfredett left, jjore left, rhr left, Juerd left, yath_ left, kanru left, GeJ_ left, dalek left, pmichaud left, awwaiid_ left, moritz_ left, agentzh left, iblechbot left, smg left, pbuetow left, Patterner left, Grrrr left, Southen left, stevan_ left, s1n left, Ara4n left, pjcj left, c1sung left, r0bby left, SamB left, broquaint left, IRSeekBot left, diakopter left, TimToady left, Auzon left, lambdabot left, buubot left, cosimo left, silug left, speckbot left, jrockway left, perlbot left, p6eval left, yves_ left, orafu left, ilbot2 left, Guest16015 left, ruoso left, meppl left, meteorjay left, yahooooo left, rafl left, cj left, PerlJam left, sunnavy left, clkao left, obra left, lumi left, pengrate left, Tene left, ben__ left, cggoebel left, baest left, zostay left, alanhaggai left, xinming_ left, scrottie left, pugs_svn left, Lunchy left, mtve left, TreyHarris left, spinclad left, nipotaway left, simcop2387 left, nnunley left, PZt left, Khisanth left, audreyt left, kolibrie left, rakudo_svn left, arguile left, Maddingue left, allbery_b left, SubStack left, pasteling left, icwiener left, kane_ left, fullermd left, integral left, [particle] left, thepler left, barney left, Kattana left, araujo left, dmq left, japhb left, mj41_ left, hcchien left, Caelum left, jiing left, funktio left 12:13 TimToady joined, wknight8111 joined, barney joined, ruoso joined, agentzh joined, alanhaggai joined, meppl joined, pbuetow joined, Kattana joined, chris2 joined, icwiener joined, ben__ joined, iblechbot joined, felipe joined, jferrero joined, kane_ joined, jan_ joined, b_jonas joined, Patterner joined, c1sung joined, nothingmuch joined, kanru joined, smg joined, Gothmog_ joined, charsbar joined, simcop2387 joined, Auzon joined, meteorjay joined, fullermd joined, GeJ_ joined, nnunley joined, Grrrr joined, araujo joined, yahooooo joined, dmq joined, apeiron joined, p6eval joined, r0bby joined, cggoebel joined, integral joined, [particle] joined, xinming_ joined, Southen joined, PZt joined, lambdabot joined, japhb joined, rafl joined, stevan_ joined, jfredett joined, irc.freenode.net sets mode: +o TimToady, baest joined, cj joined, Khisanth joined, buubot joined, mj41_ joined, jjore joined, cosimo joined, s1n joined, yves_ joined, scrottie joined, silug joined, Ara4n joined, rhr joined, SamB joined, pugs_svn joined, PerlJam joined, Juerd joined, dalek joined, pmichaud joined, sunnavy joined, broquaint joined, yath_ joined, clkao joined, obra joined, hcchien joined, IRSeekBot joined, awwaiid_ joined, moritz_ joined, pjcj joined, Guest16015 joined, orafu joined, lumi joined, Lunchy joined, diakopter joined, jrockway joined, speckbot joined, perlbot joined, ilbot2 joined, zostay joined, thepler joined, audreyt joined, mtve joined, kolibrie joined, pengrate joined, Tene joined, nipotaway joined, TreyHarris joined, spinclad joined, arguile joined, Maddingue joined, allbery_b joined, rakudo_svn joined, pasteling joined, SubStack joined, funktio joined, Caelum joined, jiing joined 12:15 breinbaas left 12:37 wknight8111 left 13:11 cmarcelo joined 13:34 pmurias joined
pmurias ruoso: hi 13:34
do you think a Hash could serve as our root namespace for now? 13:35
moritz_: it would be usefull (a bit) if the log showed the time someone joined the channel 13:39
moritz_ pmurias: I'll look into it 13:41
13:43 jhorwitz joined, breinbaas joined 13:44 hercynium joined 13:46 Auzon left
pugs_svn r21295 | moritz++ | [irclog] show time for every event 13:47
moritz_ let's see if this works...
no!
pugs_svn r21296 | moritz++ | [irclog] hopefully fixed previous commit 13:48
ruoso hi pmurias 13:49
pmurias, there's one thing I'm not sure about it...
is the namespace a plain or a deep hash?
I mean.... 13:50
is the full name the key?
or a traversal is needed for every part of the name
pugs_svn r21297 | moritz++ | [irclog] right fix this time
ruoso if it's plain, I think a hash works just fine
pmurias ruoso: i'm not sure about it either 13:51
ruoso if it's not we probably want something more ellaborated like a tree walker or something... 13:52
pmurias we can always use nested hashes $Foo::Bar::baz would be $ROOT{'Foo'}{'Bar'}{'baz'} 13:53
ruoso TimToady, is the namespace in Perl 6 a plain "name" => [ Protoobject, Package ]? or is it a deep "name" => [ Protoobject, Package, subnames ]?
pmurias, that is too much inefficient... because you will need a new hash for each step
pmurias dosn't understand how a more complex data structure would help 13:55
ruoso because you would have a single "Tree" not a collection of independent Hashes
pmurias how is the hash function for each object in perl6 specified? 13:58
ruoso pmurias, hash function as in $something.hash that would try to coerce to hash?
pmurias no 13:59
the function which turn an object into an int to be used by hash to store it in the proper hash bucket
* turns
b_jonas pmurias: I don't know, but I'd guess there's a role that means an object can do that 14:00
14:00 iblechbot left
b_jonas that would be nicest, probably roles work 14:00
moritz_ it's somewhere in the spec, we already had that discussion
ruoso pmurias, that is WHICH
WHICH returns something that can be compared by the implementation... 14:01
pmurias WHICH is the indentity value
b_jonas but WHICH gives something that can be compared exactly
a hash function doesn't need to be injective 14:02
pmurias which is a diffrent set of requirement to a hashing function
ruoso b_jonas, I don't follow... what do you mean?
pmurias, not really
pmurias, it's *the* hashing function...
14:03 Auzon joined
ruoso but some hashes will use 'eqv' instead of '===' 14:03
b_jonas ruoso: you need something -- a hash function -- that can quickly put values to hash buckets, but doesn't necessarily distingush between each pair of different objects 14:04
moritz_ but for namespaces and packages you don't need to hash objects, right?
it's enough to hash their names
b_jonas the hash implementation will need to call both that and the hash comparision (eqv) of keys
moritz_ variable names, I mean
pmurias moritz_: yes
ruoso moritz_, their names *are* objects
pmurias Str's 14:05
b_jonas moritz_: I guess that would be a different class behaiving as a hash
ruoso moritz_, not the variables...
moritz_, just the name of the package
the variable lookup happens inside the package
b_jonas the Ses define a role for hash-like even,
pmurias b_jonas: Ses?
b_jonas Synopses
one of hte Synopses
moritz_ lol 14:06
b_jonas there's no WHOM introspection?
pmurias are we even sure Hash'es are speced to be hashes? ;)
moritz_ just 26k lines to search for ;)
b_jonas strange
moritz_ pmurias: only their interface ;) 14:07
b_jonas pmurias: I think %foo are specced to be string-keyed hashes by default
ruoso b_jonas, I would argue that you would make that on the WHICH value
moritz_ you can implement that internall with a balanced tree if you like
ruoso b_jonas, no... %foo supports object as keys
b_jonas, using WHICH as identity
b_jonas ruoso: it does, but not without declaring that way
ruoso b_jonas, declaring that way? 14:08
pmurias ruoso: you undestand how hashes are implemented internaly?
b_jonas that is, the default is a hash that wants only strings as keys
ruoso b_jonas, not in Perl 6
b_jonas but you can declare such a hash that accepts any objects
what classes they actually use I don't know
ruoso: ok, let me check that
ruoso pmurias, you mean the algorithms and such?
pmurias, sort of... I'm a social scientist, not a computers scientist ;) 14:09
PerlJam The standard Hash is just my Any %hash{Str};
S09
moritz_ PerlJam: does that mean that $hash{$stuff} = 2; calls $stuff.Str? 14:10
PerlJam moritz_: um ... no. It means that $stuff is evaluated in a string context 14:11
[particle] ~$stuff
ruoso PerlJam, which in the end means a call to $stuff.Str if (!$stuff.^does(Str))
pmurias ruoso: you need a function which maps your object to an int for hashes to work, the more evenly it works the faster they are
PerlJam If you want a hash that takes anything as keys, you'd declare it as my %hash{Any}
ruoso: if you say so. :)
pmurias if you had -> {1} as your hash function your hashes be equivalent to a linked list ;) 14:12
ruoso pmurias, I see...
b_jonas PerlJam: thanks
does that mean it stringifies non-string keys on both set and get? 14:13
ruoso pmurias, that is not specced... but considering the nature of Perl 6, I would argue that you need to do that calculation with the return of WHICH
14:13 xinming_ left 14:14 xinming joined
b_jonas ruoso: I woudln't be so sure 14:14
14:14 redicaps joined
b_jonas because the comparision of two elements can be faster if it's implemented directly instead of through WHICH 14:14
pmurias the only time i implemented a hash i used the builtin stl hashing function ;)
b_jonas and I think that might help a bit with some simpler classes like numerics
ruoso in fact... I think the implementation is free to require WHICH to return a native type 14:15
pmurias we can always use .Str
ruoso pmurias, I would argue .buf8
b_jonas does .Str make a copy of values that are already mutable strings?
ruoso b_jonas, .Str should return a copy, or something that behaves like a copy... 14:16
moritz_ are there mutable strings at all?
b_jonas how about special strings that are not just strings but subclassed or otherwise augmented
?
rouso: where is .Str even defined in the synopses?
moritz_: I think there are in perl6
I think they're even the default
though most often you might still be doing non-mutation operations on them 14:17
ruoso b_jonas, Str is immutable
pmurias WHICH is speced to make a bad hash function
b_jonas ruoso: I must be confusing something then
ruoso b_jonas, S02 (builtin data types)
pmurias ruoso: re social scientist, what degree did you take? 14:18
moritz_ perlcabal.org/syn/S02.html#Immutable_types
lambdabot Title: S02
ruoso pmurias, I actually didnt' finish yet...
pmurias, some credits still missing...
b_jonas straaange
ruoso pmurias, but I've already presented my final monographu
PerlJam Str is specced, but where is it written that .<typename> does a coercion? 14:19
pmurias ruoso: what were you studing?
PerlJam $foo.Int $foo.Str $foo.str etc
b_jonas moritz_: but later in S02 it says Str can be mutable
ruoso pmurias, about bad hashes... you have to remember that you have polymorphic representations of the objects.... which means that if it's not WHICH, it's some other method that *every object* will need to implement (or inherit, of course) 14:20
b_jonas "This is assuming the string isn't modified in the meanwhile;"
ruoso pmurias, Debian's governance....
b_jonas "a StrPos is not a "marker" and is not required to follow changes to a mutable string."
moritz_ b_jonas: I guess that's a bit imprecise...
b_jonas: a variable that holds a string can change
b_jonas moritz_: but didn't someone say on this channel that Str can be mutable?
Str itself, not just the Scalar holding it 14:21
moritz_ dunno - why would it be tagged as "immutable" in the spec then?
PerlJam Str is immutable. no matter what anyone says on #perl6
(unless that someone is TimToady ;-) 14:22
moritz_ nice to hear that from somebody on #perl6 ;-)
ruoso "changes to a mutable string" means "changes to a (something that is not the standard Str type, but answers true to .does(Str)"
moritz_ ruoso++ good explanation 14:23
ruoso remember that in Perl 6 there's no way to know what the Object really really is
the object can lie about itself if it wants to
moritz_ ruoso: not even with .WHAT and .HOW?
pmurias lunch& 14:24
ruoso .WHAT and .HOW are also implemented by the object
because of the different representations support
the interpreter cannot assume to know how to fetch that information
it must make a method call on the object to do it
b_jonas I'll try to search for that mutable Str issue
PerlJam b_jonas: mutable strings are called Buf :-)
b_jonas I'd like to find out why I remember mutable strings 14:25
PerlJam: no, it wasn't only bufs
it might have been only bufs that are mutable by default though
ruoso PerlJam, Buf doesn't implement character properties and stuff like that...
but nothing stops someone from implementing StrBuf 14:26
the "builtin data types" are just the *built in*... they have nothing special besides being loaded in the Prelude 14:27
pmichaud fwiw, S12:1864 says that WHAT and HOW are actually macros, not methods.
(Rakudo currently implements them as methods as a temporary workaround, yes.)
ruoso pmichaud, sorry... I didn't expressed correctly... I meant that there's no way of implementing them without method calls...
because the interpreter cannot assume the object's internal representation...
pmichaud I won't disagree with that (but I don't necessarily agree, either :-) 14:28
PerlJam pm: Have you thought about a career in politics? ;)
pmichaud pj: yes, many times.
14:28 xinming left 14:29 xinming joined
b_jonas otoh, mutable classes that implement a Str role (if there is such a role) would make sense 14:29
seems like I misremembered 14:30
couldn't find it in the log
PerlJam b_jonas: you can never trust your memory. The brain lies to itself all the time.
b_jonas yeah
pmichaud internally Str can probably be mutable for efficiency reasons, as long as it appears to act immutable to the Perl 6 programmer
b_jonas oh sure 14:31
just like in perl5
Str has to have lots of magic in implementation
PerlJam no more magic than any other type
b_jonas it shall be one of the most complicated and most optimized classes
I mean in implementation
because perl 6 has to be good at string handling 14:32
ruoso b_jonas, and don't forget all that unicode thing...
b_jonas and there are lots of unicode and encoding semantics it has to optimize a great deal
and copy-on write
pmichaud (and this is a big reason why PGE was written in PIR and not C :-)
b_jonas deciding when it has only one copy of the string so it can mutate in place in memory
14:33 hercynium left
b_jonas PIR and C are supposed to be easy to mixed anyways 14:33
pmurias b_jonas: mixing PIR with C is not easier than mixing any normal parrot language with C 14:45
14:45 iblechbot joined
b_jonas pmurias: but they're both quite easy, right? 14:46
at least that's what they seemed to advocate about parrot a lot
14:48 rdice joined
ruoso b_jonas, one way or another you always need to implement type-mapping... there isn't much that can be done about it... 14:48
you can have some tools to make the type-mapping more abstract... 14:49
I was thinking about it...
pmurias b_jonas: i don't have much parrot experience (and not recently) 14:50
ruoso and if you have a global catalog for header files, which symbols they define, and which libraries implement them... you could have a single reusable repository of "type-mappers"...
and then you could transit between different C libraries and let this framework do the job... 14:51
but C is almost never declarative enough to allow much inference...
pmurias or you can just extend your set of types in the language, and not do any type-mapping
ruoso pmurias, how can you call a C library without type-mapping?
pmurias the same way a C compiler calls a C library 14:52
ruoso uh?
pmurias you use type-mapping for two reasons your language dosn't support some of the c types, or you don't like c types 14:54
ruoso pmurias, it's not your language that doens't support it... is your runtime that has some additional data in the object that should not be present in the C call
if the call only contains int as parameter, that's cool 14:55
14:55 icwiener_ joined, hercynium joined
pmurias ruoso: ints are no different from other types in that regard 14:56
ruoso if it contains a struct, you could even represent it as a hash...
14:56 Exodist joined
ruoso but building a struct from the header at runtime would require linking to libgcc 14:57
pmurias you need some minimal unwraping
ruoso pmurias, the point is that it ain't minimal at all... when you start to think about real use cases, you realise that it is specific to each C library
pmurias no
c has structs,number and pointers 14:58
* numbers
and function pointers
(did i forget anything) ;)
ruoso yes... void* ;) 14:59
which means you can't introspect at all
pmurias the c guy can't too
ruoso and then there are different conventions on malloc/free
some libraries returns objects that you must free()
other requires you to call a specific method to destroy it 15:00
pmurias, the c guy is reading the docs on how to use it...
and then there are object-oriented c implemtations...
like Glib
or even berkeley db
pmurias can't we borrow the c guys docs?
ruoso pmurias, the docs are not parseable 15:01
pmurias, you doesn't have much metadata to infer the type-mapping...
pmurias i agree with that
ruoso sometimes (as in SMOP), two structs are related (super-class and sub-class like)
pmurias but i don't have to do type mapping if i want to use a library the same way as i do in c 15:02
the fact that i'm using a civilized language dosn't mean i have to use my libraries in a civilized way 15:03
ruoso pmurias, still... how do you handle the different malloc/free conventions? 15:04
pmurias manualy ;)
moritz_ "how to write segfaulting perl 6 code"
ruoso heh... I really think it's worth writing a type mapping code for each library you want to use... 15:05
ben__ The first chunk of (incorrect) perl 6 code I ran after installing parrot caused a segfault :|
moritz_ ben__: sadly that's not too hard atm
ben__: but it's improving
.oO( because you get a "Null PCM access in type()" for every second type declaration )
15:06
ruoso pmurias, but you already have a way to wrap any library calling convetion more easily in Perl 6 than you had in Perl 5... because of the representation polymorphism...
you don't have to put stub methods and hold a int SV* for every pointer... 15:07
you can actually re-implement the method-dispatch for that object
15:09 icwiener left 15:11 Alias_ joined
rakudo_svn r29231 | jonathan++ | [rakudo] First crack at starting to get named enums in place. This sets up a role, a class, and puts instances of it (for the enum values) into the right places. It introduces an Enum base class for all enumerations also. This doesn't let us do a lot useful with them yet, but 15:13
..it's the first step. If this turns out to be a good base to build the rest on, what I'm checking in now will undoubtably get clean-up to eliminate a few bits of inline PIR; for now, it's just the easy way to have something to play with. Also contains a minor refactoring to extract from
..declare_attribute the code that makes an accessor, since enum_declarator also needed it.
15:16 sri_work joined
pmurias ruoso: some sort of exception mechanism would help in smop 15:26
instead of just printing an error message
maybe having a SMOP_THROW("...") placeholder would help 15:28
?
s/would help/would be a good idea/
ruoso: we don't have an undef in smop yet? (i have to put something in newely create hash cells) 15:48
moritz_ pmurias: why? 15:49
there's still the distinction between "exists" and "undef"
s/undef/defined/
usually you don't create a hash cell unless you have something to put into 15:50
pmurias moritz_: you have to create it to put something in it 15:51
moritz_ yes, but then you know at creation time what to put in 15:52
and you don't have to worry about what it is
pmurias no
my $cell := $foo{'baz'};$cell = 1; 15:53
moritz_ so you need some kind of undef proxy object
now I understand
the same kind that you need for autovivification 15:54
pmurias i'm not doing autovivification
moritz_ the thing inf $foo{'baz'}, isn't that just a scalar container? 15:56
pmurias yet
it's a proxy scalar container
in the autovification case, and a normal once the way i'm doing it initialy 15:57
16:05 alanhaggai left 16:07 icwiener_ is now known as icwiener 16:19 justatheory joined 16:20 ben__ left 16:27 alester joined
pmurias ruoso: the tests should be numbered in the order features depend on each other or i the order they were added? 16:34
16:36 alanhaggai joined 16:51 Jamtech joined 16:52 casyn joined 16:59 nipotaway is now known as nipotan
ruoso pmurias, the exception mechanism still need some features in SLIME I think... but the bigger problem is that down this level, there isn't where to go in an exception... 17:01
pmurias, defined is just something that says true to ".defined"
pmurias, undef is just something that says false to that call
pmurias, autovivification is a very difficult issue in Perl 6, my advice is implement P5 like autovivification for now 17:02
pmurias, which means implementing a proxy scalar for each key 17:03
17:03 cjfields joined 17:04 kanru left
pmurias ruoso: i don't understand the exception part 17:05
ruoso pmurias, there's an attribute of the frame which is "jail"
this attribute would contain the exception handler 17:06
but that will only be effective when more things are inside the interpreter...
we still have most of the code running as standard C calls...
this should change as we have more and more sm0p usage
and also, most of the code is not setting the "outer" attribute of the frame... 17:07
pmurias we can have a place holder SMOP_THROW(...)
which will throw an exception when they are implemented and print an error message for now
17:08 kanru joined
ruoso the point is that there isn't *the* exception handler in smop... there will be as many exception handlers as implemented 17:08
the interpreter doesn't need to care about it
17:08 cjfields left 17:10 wknight8111 joined
pmurias ruoso: any solution then? 17:14
17:14 alanhaggai_ joined
pmurias 12_opaque leakes memory, ok? 17:15
17:15 alanhaggai left, alanhaggai_ is now known as alanhaggai
pmurias ruoso: i read the commit 17:26
the present and past tense of read being spelled identically in english is extremely annoying 17:27
moritz_ that's why the present is more accurately described as "I'm reading the commit" ;-) 17:28
17:30 apple-gunkies joined 17:31 cjfields joined
TimToady yes, to a native English speaker, "I read the commit" can only mean something like "I habitually read any commit" 17:31
"I read books" doesn't mean I'm reading books right now
17:32 barney left
TimToady (in both cases, pronounced "reed" rather than "red") 17:33
pmurias TimToady: "read the commit" is the sentence which annoys me 17:34
which as i understand can either order someone to read the commit or means i read the commit 17:36
TimToady well, that's just an amibiguity in writing, not in spoken speech
moritz_ we should phonetically annotate our IRC conversations ;) 17:37
TimToady and pragmatically, you'd usually get either "Read the commit, please." or "Already read it." 17:38
moritz_ if you're eloquent enough, yes. That's a bit tougher if English isn't your first language ;)
s/first/native/ 17:39
[particle] pragmatic instant messaging, now available in a chatroom near you
TimToady yes, the problem with human languages in general is that native speakers know where the holes are and aren't, and assume the hearer does too.
I hit this all the time in Japanese. I'll look for a word for a long time before figuring out it's a proper noun. This would be immediately obvious to a native speaker. 17:41
17:41 justatheory left
pmurias TimToady: what's the next thing you're hacking on now that STD.pm parses itself? 17:47
17:53 Eevee joined 17:56 cjfields left 17:59 apple-gunkies left
TimToady pmurias: probably rewriting gimme5 as a STD emitter as a long-term goal. Shorter term, writing {*} reductions to produce something more like an AST. 18:16
pmurias something like pixie? ;)
TimToady I'm also thinking about refactoring the top-level namespaces
so the grammar might end up being called STD::Perl, for instance 18:17
but I have to think about how languages get used from the user-point of view 18:18
18:18 Alias_ left
TimToady "use Perl" can't mean both of "pull the Perl grammar into the current grammar" and "switch to language Perl for the rest of this scope" 18:18
and this is tied into to macros handle "is parsed" and such 18:19
s/macros/how macros/
pmurias what's the equivalent of make test for gimme5? 18:20
moritz_ test? ;-)
what's that?
b_jonas wouldn't p6 still have the convention about lowercase pragmas?
18:21 hercynium left
moritz_ is a switch in laguage a pragma? 18:21
b_jonas well, most p5 Acme modules that change the language aren't lowercased
nor is Switch 18:22
pmurias TimToady i fixed a bug with "\\" matching \\
moritz_ think of it as Acme::Perl6 then ;-)
TimToady I currently test by running a script call "trystd" :) 18:23
18:24 Schwern joined
pmurias TimToady: you're testing this one then ;) 18:24
TimToady I think the user wants to be able to just say "use FooLang" since that's the common use case, and the grammar for FooLang should be in some other place 18:26
Grammar::FooLang maybe, but I rather like the idea that the standard Perl 6 definition would be in STD::Perl for psychological reasons
pmurias TimToady: it got fixed in svn HEAD, silly me 18:27
PerlJam TimToady: seems like another use/mention distinction (maybe that means another keyword :) 18:28
pmurias visiting a friend&
ruoso TimToady, there's always the dispatch code if you're out of tasks ;)
TimToady more like a distinction between the language and the grammar for the language 18:29
ruoso: that's not gonna happen any time soon... :P
ruoso TimToady, in fact... it would be nice to have a Perl 6 implementation of the Perl 6 types...
even if nothing is able to run them right now... 18:30
TimToady maybe nothingmuch can run them :)
nothingmuch nuffinvm 18:31
unfortunately my CPS evaluator has GC issues 18:32
unless ritalin is applied i lose old stack frames
TimToady seriously, I think nothingmuch would do a better job writing the fiddly bits of responder/dispatcher
18:33 Eevee left
TimToady just check every change into svn, and let it keep the stack frames for you :) 18:33
then write a program that randomly applies/unapplies the last 100 changes until you get a version that works. :)
ruoso TimToady, btw... speaking of old frames... did you have some time to take a look at the meta methods thingy?
TimToady which meta methods thingy? 18:34
ruoso TimToady, the problem of $foo.HOW.methods() with prototype-based OO 18:35
because some metaclasses might be shared by several objects
and you might need to call methods in the metaclass instance itself
that are not related to a single object
my proposed solution was to force the given object as first positional argument for the metamethods 18:36
and that $foo.^methods would actually be translateable to $foo.HOW.methods($foo)
18:36 hercynium joined
TimToady I thought I already told you that was my preference 18:36
ruoso does that mean it won't conflict with the current spec? 18:37
S12 states that $foo.HOW.methods() is the same as $foo.^methods()
TimToady the current spec is still an approximation of Truth :)
b_jonas wait, isn't that meant to be (^$foo).methods ?
ruoso b_jonas, that's a sintatic variant 18:38
TimToady S12 is speaking from the user-point of view, not the implementor's point of view
b_jonas is it?
moritz_ isn't ^$foo the same as 0...($foo-1) ?
erm, just two dots
b_jonas moritz_: yep
or more precisely as 0..^$foo
ruoso TimToady, yes... and the user will expect $foo.HOW.methods() to have no positional arguments...
TimToady it's the "domain", which for types is the metaobject :)
b_jonas but only for numbers 18:39
18:39 Lorn joined
moritz_ b_jonas: so why should introspection be different for numbers than for other stuff? 18:39
ruoso TimToady, S12 explicitly says that $foo.HOW will hold a "implicit" relation to the object... and that you can my $b = $a.HOW; $b.methods() and still get the methods from $a... 18:40
b_jonas moritz_: actually ^ means not only introspection but like three different things 18:41
depending on what $foo is
S03 tells what exactly
moritz_ b_jonas: but surely not prefix:<^>?
b_jonas thoguh how I used it might have been wrong
yes, prefix
it's a multimethod probably 18:42
or multi sub rather
rakudo_svn r29243 | pmichaud++ | [rakudo]: spectest-progress.csv update: 94 files, 1679 passing tests
b_jonas "The .^ operator calls a class metamethod; foo.^bar is short for foo.HOW.bar."
for the infix syntax you mentioned
but as for the prefix ^,
moritz_ ok, that makes sense 18:43
b_jonas "If applied to a type name, it indicates the metaclass instance instead, so ^Moose is short for HOW(Moose) or Moose.HOW. "
so it won't work for any object as introspection 18:44
moritz_ ok
thanks b_jonas
ruoso TimToady, should I consider that part of S12 as something that wasn't still rewritten? 18:45
TimToady I think we need to be clear which variants of HOW are macros that rewrite to an internal form that supplies $obj as the first arg 18:46
ruoso but that is not compatible with prototype-based OO 18:47
TimToady but I don't think people want to write $obj.^can($obj, "bark") all the time
ruoso I think the .^ operator can do it
TimToady maybe the .^ forms rewrite, and the .HOW doesn't
ruoso yes... that's my point... 18:48
TimToady but currently S12 is assuming the .HOW is also a rewrite
ruoso yes... but that rewrite is not ok for prototype-based OO
my $a = $foo.HOW(); $foo.some_metaclass_instance_general_method() 18:49
TimToady sec, work &
ruoso s/general/specific/
as a pratical example... let's consider a SOAP metaclass that store in the local object the WSDL for the service... you might want to say $foo.HOW().require_ssl = 1; and that would apply to every object that shares this metaclass instance... 18:53
(require_ssl is probably a bad example) 18:54
my $meta = StubType.HOW(); $meta.http_credentials = $http_digest_auth_data;
my $rpc = SOAP::MetaClass.new(wsdl => 'foo.com/wsdl'); my $port_type = $rpc.get_type('port_type_name'); $port_type.HOW === $rpc; 18:57
19:08 justatheory joined 19:10 justatheory left 19:11 justatheory joined
rakudo_svn r29246 | jonathan++ | [rakudo] Shuffle enums around a bit so that the role is named and the class anonymous. Get rid of Enum class since it's not spec'd and we can do find without it. Also make instances of the enum class act more value like, so you can say EnumMember to get the underlying value of 19:15
..EnumMember.
19:23 monomorph joined, monomorph left
pugs_svn r21298 | moritz++ | [spec] add a simple test that an Enum can act like a role 19:27
19:38 frobnitz joined
rakudo_svn r29248 | pmichaud++ | [rakudo]: add 'polar' to Complex and Any (RT #56754, moritz++) 19:41
[particle] really? .polar in Any?
pmichaud my $x = '12'; say $x.polar; 19:43
[particle] yeah. i wouldn't expect that to work 19:44
pmichaud but it should.
[particle] can't find method 'polar' on Scalar $x
moritz_ [particle]: why not?
pmichaud $x isa Str
PerlJam starts working on his patch for .tropical and .equatorial
[particle] oops, Str $x
pmichaud would you expect this to work? my $x = 4; say $x.polar;
[particle] no 19:45
pmichaud how about: my $x = 4+0i; say $x.polar;
[particle] yes
pmichaud interesting.
[particle] 4 is not a coordinate 19:46
pmichaud 4 is numerically the same as 4+0i, though.
rakudo: say 4 == 4+0i;
p6eval rakudo 29248: OUTPUT[1␤]
[particle] indeed, +(4+0i) == 4
but that numifying
not complexifying 19:47
moritz_ [particle]: every integer is also a complex number
[particle] every integer is also a power of pi
19:48 Schwern left
moritz_ that's why you can call .log on it 19:48
PerlJam [particle]: you would expect .polar to work on anything that does(Complex) ?
[particle] perljam: yes
or anything that does the 'coordinate' role or whatever 19:49
PerlJam so, you just think that Any is too far up the food chain for .polar?
[particle] does say '4+0i'.polar work?
yes.
my Opposite $x = 'North'; say $x.polar 19:50
should i really be overriding Any.polar in the Opposite class def?
pmichaud my Opposite $x = 'North'; say $x.abs
moritz_ [particle]: why not? 19:51
[particle] method 'abs' not found for class 'Opposite'
19:51 newbsd joined
moritz_ overriding builtins is by no means evil in Perl 6 19:51
[particle] do we really need abs and polar in the core of perl 6?
pmichaud my Opposite $x = 'North'; say $x.join(';')
particle: they're in the test suite. 19:52
[particle] sure, and S29 is not yet approved
b_jonas [particle]: I'd like all of complex numbers considered just normal numbers in p6 core
[particle] so they're unofficially specced
b_jonas (or in most other languages anyway)
pmichaud particle: au contraire
b_jonas and I'd also like them use the c99 operators and functions for calculation if available, for speed 19:53
19:53 newbsd left
pmichaud Functions.pod:29 says "This document is now the official S29." 19:53
PerlJam d the connection]
19:32 < qweqwe> as you want me to do it
oops
b_jonas (otherwise fall back to a slower implementation or the libstdc++ functions) 19:54
[particle] well, it seems here that i'm outnumbered, although that may be because my imaginary friends aren't on irc
pmichaud I'm only going by what I'm interpreting from TimToady's statements
[particle] i'm sure you listen to him more often than i do :)
b_jonas (the libgsl implementation of complex could be considered as a fallback as well, if it's already installed on the machine)
but basically, it should be the fast complex functions in libgcc and libc 19:55
[particle] sure, but parrot can't rely on gsl 'cause it's not win-compat
and speed isn't the issue here, it's semantics
what does *.polar print?
pmichaud TimToady has already explicitly said that .grep, .join, .elems, etc are defined on Any 19:56
[particle] *say *.polar
pmichaud even though they aren't lists
[particle] that's kind of annoying, too.
PerlJam heh
[particle] Junction.grep doesn't work?
pmichaud and that .eval works on Any as well, even if the invocant isn't a Str 19:57
(yesterday's design meeting)
so, I'm not advocating a position as much as I'm delivering a message. :-)
[particle] does that belong on Any, or Object? 19:58
pmichaud afk for a bit
[particle] like, i could stick a bunch of plugin subs in a junction, then .eval them
b_jonas pmichaud: that sounds like that strange lisp eval :-) 20:00
pugs_svn r21299 | moritz++ | [spec] fixed role tests, jonathan++ 20:02
moritz_ rakudo: enum Maybe <No Yes>; my $x = 42; $x does Maybe(Yes); say $x.Maybe; say $x.No; say $x.Yes; 20:04
p6eval rakudo 29248: OUTPUT[1␤0␤1␤]
TimToady [particle]: generally these things go into Any so that autothreading kicks in on non-Any 20:07
[particle] so, junctions contain Anys, and delegate the method to all members, in an autothreaded fashion? 20:08
TimToady that's precisely why Junction !~~ Any, so the decision to autothread falls out of mmd naturally 20:10
rakudo_svn r29251 | moritz++ | [rakudo] add first enum test to spectest_regression (+9 pass) 20:12
b_jonas seems strange 20:13
b_jonas looks up the exact rules for ~~
20:14 donaldh joined
moritz_ in this case means "Junction is not of type Any" 20:14
[particle] ok, that ~~ sense
TimToady mmd does constraint checks via smartmatching, basically, and parameters by default have a type of Any 20:15
b_jonas yeah, but S03 says ~~ means type membership if the rhs is a type
whereas don't you want to state that Junction is not a subclass of Any or however they say that with roles? 20:16
[particle] and everything but Object and Junction are of type Any
TimToady also spelled "does"
[particle] will does(*) mean does(Any) ?
b_jonas the Junction type itself is not a junction, so shouldn't it match Any?
TimToady I have no idea what does() will do with a * 20:17
well, actually, I do
Whatever is not the ancestor of normal types, though it's in Any
so does(*) is really does(Whatever)
pmichaud in the case of Junction !~~ Any, Junction is the proto-object for junctions 20:18
TimToady and hence generally false
pmichaud and that protoobject is not Any
moritz_ TimToady: but isn't that a bit inconsistent, since you expect when * to be always true?
20:19 jhorwitz left
pmichaud when * would be the same as $_ ~~ * (which is not the same as does(*) ) 20:19
TimToady * is of type Whatever, but it probably isn't the protoobject
especially once you start getting values like *-1 floating around 20:20
moritz_ but when you smartmatch against $stuff, you don't smartmatch against $stuff's type
ok, I read it again
pmichaud it depends on what $stuff is :-)
moritz_ forget my last comment
pmichaud TimToady: shall I go ahead and removes lines 213-214 from S12? (method fall back to sub) 20:22
*remove
TimToady actually, *-1 is probably of type Code:($) or some such
moritz_ btw can we do ranges with *-1? 20:23
TimToady pmichaud: go ahead
*-1 is just a number that is relative to something unspecified
moritz_ @list[1..*-2]
lambdabot Unknown command, try @list
pmichaud feels like he's channeling Smeagol these days. 20:24
b_jonas I'll have to read S12 to get all that terminology about classes, roles, traits, proto-objects, metaclasses
moritz_ I fear S12 mostly assumes you know them already
pmichaud wonders if Parrot ~~ "the One Ring"
b_jonas then S* 20:25
TimToady Nasty hobbitses ruin nice synopseses...
20:26 jferrero left
speckbot r14559 | pmichaud++ | S12: Remove "method fall back to subroutine". 20:26
ruoso TimToady, sorry for being such a boring guy... but... could we clear the issue with the meta methods? 20:27
my proposal is:
TimToady moritz_: if .. is overloaded to map one Code:($) into another, then sure.
ruoso $foo.^meta() rewrites to $foo.HOW.meta($foo)
and $foo.HOW.methods require $foo as first positional argument, while $foo.^methods() doesn't 20:28
pmichaud b_jonas: the beginning of www.parrotblog.org/2008/05/p6object...arrot.html tries to explain P6's metaobject model
lambdabot Title: Parrot: P6object: Perl 6 metaclasses for Parrot, tinyurl.com/5t5m6f
b_jonas pmichaud: I'm too tired to read such things now
TimToady ruoso: I'm fine with that
b_jonas it's probably only the terminology that's strange anyway
ruoso TimToady, nice. S12 needs to be updated then... 20:29
pmichaud b_jonas: probably, but the article tries to clear up the terminology
or at least present a simpler way of looking at it 20:30
thepler S03 says "Two values are never equivalent unless they are of exactly the same type"
( PosInt.new(5) === Int.new(5) ) # true or false?
does it depend on whether PosInt is a subset or a class?
ruoso thepler, "Any object type may pretend to be a value type by defining a .WHICH method which returns a value type that can be recursively compared using ===" 20:31
thepler, there isn't really a way to know the actual implemented type for an object 20:33
thepler ruoso, but something has to check that they're the same type, no? 20:35
TimToady subsets aren't types in that sense, so if PosInt is just a subset of Int, it's of type Int
PosInt is a constraint with a name
but values have to use storage types like Int 20:36
so the above is likely to be true
ruoso thepler, not really... as long as the object complies to the API it advertises, it's ok
TimToady however, if you really want numeric equality, use == :P
thepler so if PosInt is a subset, then the expression is true 20:37
ruoso but Int doesn't assume a storage type...
TimToady ruoso: what would you propose about the ^Foo.method notation?
ruoso only "int" does...
TimToady, honestly... that notation always looked confusing to me...
thepler what if class PosInt is Int {...}? Then Int and PosInt are different types and then the expression is false?
TimToady by storage type I just mean a type that an actual object my be
I don't just mean native type
*may be 20:38
rakudo_svn r29254 | jonathan++ | [rakudo] Implement the but operator. To get it resolving enums correctly, we also mark the enum anonymous class with the 'enum' property; we may find a better way later.
TimToady thepler: yes, it would be false in that case, so use == :)
ruoso TimToady, I think ^Foo is the same as Foo.HOW... 20:39
TimToady, which means that no first argument is prepended...
thepler TomToady: right-o. just trying to understand the difference between types and classes
TimToady objects can really only be of class type. containers can have subset constraints and role constraints 20:41
ruoso TimToady, but... if IntSubClass implements WHICH by returning an Int, $subint === $int could be true... 20:44
that's the "recursively" part of the spec... which means that the implementation will call WHICH until it has something it knows how to compare... 20:47
thepler ruoso, I think 2 values cannot be === unless they are in exactly same class 20:48
ruoso === calls WHICH on each side...
it depends on what return it gets...
thepler if they are, and that class implements .WHICH, then those values will be compared 20:49
ruoso thepler, everything must implement WHICH
thepler, the interpreter cannot assume to have a way to compare the objects...
thepler, the interpreter cannot assume to know how the object is implemented
not in terms of which methods it has
but how it's lowlevel is represented
thepler ruoso, right, everything must have a .WHICH
but I would think that .WHICH isn't even called if the values are in different classes -- but I could very well be wrong 20:50
ruoso thepler, that's the point.... the interpreter cannot really check if they are of the same class... 20:51
the interpreter need to ask that to the object...
and the object can lie 20:52
(which is, actually, one of the most exciting features of Perl 6)
thepler $a.HOW === $b.HOW ?? (I'm guessing)
ruoso in prototype-based OO several objects of different types are going to share the metaclass
but this is how you are going to be able to use Glib as your object representation while still using the default Perl 6 metaclass... 20:54
20:58 b_jonas left
rakudo_svn r29260 | jonathan++ | [rakudo] Make pseudo-functional variant of but operator work. 21:03
speckbot r14560 | larry++ | [S12] .HOW clarifications requested by ruoso++ 21:05
thepler I was thinking about how to implement something like === and .WHICH with p5 + Moose
21:09 jferrero joined 21:10 justatheory left 21:16 cognominal_ joined, cognominal_ left, cognominal_ joined 21:19 jfredett_ joined 21:21 simcop2387 left 21:25 ruoso left 21:31 jfredett left
rakudo_svn r29262 | jonathan++ | [rakudo] Fix does (and thus but) to not lose an object's association with its proto. 21:34
21:42 rdice left 21:45 justatheory joined, jfredett_ left, jfredett joined 21:49 Jamtech left 21:56 donaldh left
pmurias thepler: you can implement WHICH with Scalar::Util::refaddr 22:02
thepler pmurias: right but... I'm thinking something like Foo->new->equals( Foo->new ) being true if an appropriate Foo::WHICH is written 22:08
pmurias what part do you have problems with? 22:10
22:15 iblechbot left
thepler none really. I think it's all doable. can even use autobox so I can call ->equals and ->WHICH on anything I suppose 22:17
pmurias should it be indentical instead of equals? 22:18
* identical
thepler yeah, or maybe ->is_identical ? 22:19
what's wrong with ->equals though? already in use?
moritz_ wtf is -> anyway?
method call in perl 6 is .
thepler moritz_, p5 22:20
moritz_ checks which channel he's in
thepler I was thinking about writing something like p6 === and .WHICH but in p5 + Moose 22:21
moritz_ ah, I didn't follow all of this discussion, sorry
22:32 kattana_ joined
pmurias thepler: equals just felt wrong, equivalence and indentity are too different things 22:36
stevan_ thepler: equals wouldlikely clash 22:42
Foo->meta->equvalent(Foo->new, Foo->new) would be safer 22:43
pmurias stevan_: equivalanet is what he does *not* want 22:46
* equivalence
=== tests for indentity
stevan_ ok then s/equvalent/identity/
the point was that if you stuff it in ->meta then you dont ahve to worry about local name clashes 22:47
or if you stick with ->WHICH then it is unlikely to clash
but ->equals will class with tons of things
22:49 Kattana left
rakudo_svn r29263 | jonathan++ | [rakudo] Switch True and False over to being real values from the (now existing) bool enumeration, rather than instances of the Bool class. 22:54
pugs_svn r21300 | pmurias++ | [sm0p] added string literals "..."
pmurias moritz_: do you think it would make sense to have sm0p in the evalbot? ;) 22:55
moritz_ pmurias: what can you evaluated with it?
pmurias * what can you evaluate it with? 22:57
?
22:58 rhr_ joined
pmurias moritz_: c code 22:58
i should go to sleep now, definitly
22:58 pmurias left
moritz_ @tell pmurias if you want to evaluate C code with evalbot + sm0p from IRC - forget it. There's not even a slight change you'll get it have ways secure 22:59
lambdabot Consider it noted.
pugs_svn r21301 | moritz++ | [irclog] try to restore some of the old layout 23:01
23:11 rhr left
pugs_svn r21302 | moritz++ | [spec] three more tests for string concatenation (with empty strings) 23:22
23:28 meppl left 23:29 jferrero left 23:37 ruoso joined 23:51 Exodist left