Parrot 3.5.0 "Menelaus" released | parrot.org | Log: irclog.perlgeek.de/parrot/today
Set by moderator on 27 June 2011.
jay gist.github.com/1074072 00:00
NotFound jay: will be more impressive if you show some generated random numbres. 00:01
cotto not sure how to reproduce that. Doing the naive thing and exporting LANG=fr_FR@euro before reconfiguring and building doesn't cause anything unusual other than perl complaining about LANG
3 00:02
jay Ok, not random because I chose the seeds... but you get the idea! My first "pseudo-random number" was there.
NotFound jay++ 00:03
jay cotto: you mean this shouldn't have worked. < sigh > Well, maybe I can contribute something. Want to see the code? It's VERY concise in my Runtime.pm.
kid51 cotto: Where did you get perl to complain about LANG?
cotto kid51, any time perl is run
kid51 cotto: I don't get that complaint. 00:04
NotFound kid51: perl barfs when started with a locale it doesn't know, unless you have some env var set to soemthing I don't remember.
jay ah, sorry... cotto was in a different conversation. jay--
bubaflub jay: i don't know if it'll interest you, but my GSoC project is getting NCI Parrot bindings to GMP
kid51 $ LANG=fr_FR@euro
$ echo $LANG
fr_FR@euro 00:05
$ perl -E 'say qq{hello world}'
hello world
cotto kid51, still complains for me
NotFound kid51: then you have support for that lang, or you have that warnings silenced by defalut.
jay bubaflub: actually, that is very interesting. I know there were some real license issues the R Project struggled with having to do with these math libraries, and if I could do something equivalent without having to worry about that.... 00:06
NotFound Or even, a perl configured without locale support.
kid51 I get no complaint on either linux/i386 or darwin/ppc -- Am using Perl 5.14 both
bubaflub jay: hmmm, i don't know much about that. GMP is definitely GNU licensed... 00:07
cotto kid51, do you see the same failure?
jay bubaflub: just glanced at the first page I found. Are you generating random numbers from the standard distributions?
kid51 NotFound: I certainly made no attempt to deliberately configure my perls without locale support.
bubaflub jay: i'm just using whatever GMP has. 00:08
NotFound $ LANG=fr_FR@euro
$ perl
perl: warning: Setting locale failed.
jay bubaflub: I think some of R's math library were BSD or something a little odd and potentially incompatible with the GNU choice of R.
NotFound perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
cotto It looks like it'll be easy to isolate once we can reproduce it. The build breaks the first time that Parrot is run.
NotFound LC_ALL = (unset),
LANG = "fr_FR@euro"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
bubaflub jay: i know that they have a number of different functions that you can use - some with better distributions, some with better speed, and so on
cotto NotFound, same here
jay Ok, thanks for the reference, I'll have a look. Very helpful to know.
bubaflub++ 00:09
bubaflub jay: yep. my code is at github.com/bubaflub/parrot-gmp
NotFound Of course, I don't have fr_FR@euro support installed in this system.
bubaflub jay: winxed source, but pir included as well. covers all Integer functions and related Random functions; decimal and rational stuff to come after the summer.
NotFound kid51: locale -a in linux will tell you the locale available in the system. 00:10
00:10 jsut_ joined
NotFound I have: C, POSIX and es_ES.utf8 00:10
kid51 NotFound: On this Debian I have fr_FR@euro in /usr/share/i18n/SUPPORTED 00:12
00:12 jsut left
NotFound kid51: SUPPORTED does not imply that you have it installed. 00:13
cotto sudo locale-gen fr_FR@euro 00:14
this looks promising 00:15
kid51 NotFound: On my debian, I have fr_FR@euro in locale -a. I have successfully built and tested Parrot thru make test with fr_FR@euro
cotto I get a nice spectacular failure. 00:16
dalek kudo/nom: 4677323 | jonathan++ | LHF.markdown:
A few more bits of LHF.
00:18
kudo/nom: e42b089 | jonathan++ | src/Perl6/Actions.pm:
Fix a few compile-os. Of note, this gets default { ... } to work again.
kid51 On my (older) Mac, locale -a says I have: fr_FR fr_FR.ISO8859-1 fr_FR.ISO8859-15 fr_FR.UTF-8 00:19
... but no fr_FR@euro 00:20
jay bubaflub: it looks like the original GMP is LGPL. I really like that, it is more permissive than GPL. There are some real debates over GPL, including 2 vs 3. I had dinner with Richard Stallman once. 00:21
NotFound Parrot_oo_get_class allow a ResizableStringArray as key but no other array types. There is some reason for that restriction, or is just an accident?
kid51 once passed up the opportunity to have dinner with Richard Stallman
cotto kid51, that'd be memorable
jay It was an experience, kid51.
cotto jay, one-on-one or as part of a group? 00:22
kid51 That non-dinner followed attendance at a session featuring a leading Linux dev/user from Dominican Republic; RS was in attendance
He wanted to go to Chinatown; I did not. 00:23
jay He came to the UseR! conference last summer. There was some problem with whether some of the equipment was properly open-source, so he was in a bad mood... I was the first person brave (!) enough to try to engage him.
kid51 The speaker from the DR was quite interesting. 00:24
What is the command you use to get Debian version info? 00:25
cotto looks like Parrot dies when trying to print "Unknown codeset `%s', defaulting to ASCII"
kid51 That's where? During 'make'? 00:26
cotto looks like the same failure as on parrot-dev according to the backtrace there
NotFound Uhh... Maybe our old friend %s vs s ?
Uhh... Maybe our old friend %s vs %Ss ?
cotto kid51, yes. parrot doesn't build, so that's with miniparrot
kid51 src/platform/linux/encoding.c 00:27
56: "Unknown codeset `%s', defaulting to ASCII", codeset);
jay bubaflub: may only be random uniforms ('continuous' and discrete). Of course that is sufficient to lead to many other distributions when the inverse-cdf is available, or via other methods. A start, certainly.
cotto NotFound, not in this case
NotFound No, codeset is char *
bubaflub jay: yeah, and there is certainly enough other stuff available to implement a custom solution. 00:28
kid51 Well, on darwin/ppc, I was able to successfully build parrot with LANG= fr_FR@euro even though that LANG does *not* appear in output of locale -a on that machine!
NotFound The platform encoding is initialized after the IO subsystem?
jay Many good algorithms are in the 'Numerical Recipes' book, but again, there are license and copyright issues.
kid51 IIRC, the src/platform/*/* files are run during Configure.pl 00:29
cotto kid51, It's not a problem unless LANG is an installed locale
NotFound Well, if the problem is only in building and not in running the workaround is simple: build with LANG=C 00:30
bubaflub jay: i'm only really familiar with psuedo-random algorithms for cryptographic purposes, not stats purposes. 00:31
cotto NotFound, yes, but an actual fix would be preferable.
kid51 NotFound: but see post on parrot-dev. User apparently also wants to build Rakudo* with that locale
NotFound Wants to build, or want to use?
kid51 build -- but see the list if you need clarification 00:32
jay bubaflub: I don't know anything about cryptography. They aren't completely disjoint, though. There are some good information theory connections.
NotFound The problem is complex: apart from the building and running problems, we don't support that charset. 00:33
kid51 On Debian, in /etc/locale.gen, I see: # fr_FR@euro ISO-8859-15 00:35
cotto It looks like properly fixing this will require adding support for the ISO-8859-15 encoding 00:36
aka Latin-9
NotFound cotto: yes, but then be ready for people demanding a iso-8859-x for x in [0 , +inf] 00:37
cotto NotFound, indeed 00:38
kid51 Perhaps we should consult with Rakudo (and other HLL) folks to see what they think we need to support. 00:39
In particular, fperrad
cotto though Latin-9 doesn't look like it's radically different from Latin-1
00:39 GodFather left
cotto It appears to change the meaning of 8 characters from Latin-1. 00:40
NotFound Parrot_str_init is called after Parrot_io_init, so in principle there is no reason for a segfault.
cotto NotFound, it's not a very elegant failure.
kid51 The user on parrot-dev seems to suggest that once upon a time (Parrot 2.11 (Dec 2010)) he could build Parrot w/that encoding
kid51 must think about dinner 00:41
NotFound kid51: once upon a time people complained about encoding not honored in command line args and lots of other things.
00:42 rurban_ joined
kid51 NotFound: Yes I remember those complaints. But that was/is mostly bout Chinese 00:42
NotFound kid51: that was with env vars if I remember well. The point is that the wider the encoding awareness is, the more problems arise. 00:44
00:44 rurban left, rurban_ is now known as rurban
nopaste "kid51" at 192.168.1.3 pasted "grep 'ISO-8859' /etc/locale.gen | cut -d ' ' -f3 | cut -d '-' -f3 | sort | uniq -c" (12 lines) at nopaste.snit.ch/59079 00:46
kid51 NotFound: Yes, I agree. 00:47
NotFound I think the problem is the usage of Parrot_warn before PMC initialization.
Proposed solution: use fprintf stderr instead of Parrot_warn 00:50
Solution for the segfault, not for the whole problem, of course. 00:51
Or even better, kill Parrot_platform_encoding_ptr 00:52
cotto NotFound, +1 00:54
NotFound The last idea will take time, I suggest we go with the first. 00:55
dalek rrot: e1483aa | NotFound++ | src/platform/linux/encoding.c:
Don't use Parrot_warn in Parrot_init_platform_encoding,
01:04
01:05 jsut joined
kid51 I successfully build Parrot with LANG= fr_FR.ISO8859-15 on darwin/ppc 01:07
01:07 kid51 is now known as kid51_at_dinner
dalek website: soh_cah_toa++ | Load Source and Testing and Build Errors...Oh My! 01:08
website: www.parrot.org/content/load-source-...rs...oh-my
cotto kid51_at_dinner, is that with the locale installed?
01:09 jsut_ left
NotFound Looks like we have more french users these days, BTW 01:10
cotto oui 01:12
NotFound Allons enfants de la parrotrie.
dalek kudo/nom: f83f8ce | tadzik++ | / (3 files):
Implement infix:<%%>, run tests
cotto NotFound, an excessively noisy build is better than a broken one. 01:17
thanks
I'll see if there's a reasonable way to support Latin-9 01:18
NotFound cotto: perl does the same, we follow the masters ;)
If it becomes annoying, we can check an env var to silent it. 01:19
cotto NotFound, complaining when something's broken isn't bad 01:20
mro cotto: i have sent a pull request with some bitwise-operator tests! :-) 01:21
cotto mro, did you also verify that they're correct independently?
NotFound www.xav.com/perl/lib/Pod/perllocale...nvironment 01:22
NOTE: PERL_BADLANG only gives you a way to hide the warning message. The message tells about some problem in your system's locale support, and you should investigate what the problem is.
cotto NotFound, that looks like a band-aid. I would prefer not to add a Parrot-flavored analog. 01:23
NotFound cotto: agree, just a posibility if it becomes too annoying for someone.
mro cotto: yup! 01:24
cotto mro, great. I'll look at it after figuring out what to do about latin9. In the meantime, feel free to write more tests or poke some holes in the spec. 01:25
mro++
mro cotto: I also converted the iton test to convert_i_n and fixed the test logic.
cotto mro, thanks 01:26
That op needs well-defined semantics (and probably extensive tests for those semantics) before it'll be especially useful. 01:27
NotFound cotto: Parrot_oo_get_class allow a ResizableStringArray as key but no other array types. Do you know if there is some reason for that restriction? 01:28
Not urgent, just curious. 01:30
cotto NotFound, looks like that's not a happy function. 01:31
NotFound Yeah
I'm also thinking that we need Parrot_oo_get_root_class
root_new does not work well because of Parrot_oo_get_class 01:32
cotto Telling Parrot_init_platform_encoding to treat ISO-8859-15 the same as ISO-8859-1 causes the build to complete without any extra noise. I don't know if that's the proper fix though. 01:36
NotFound But I don't think the people will be happy when its € and Ā¢ get converted to something... 01:37
cotto NotFound, what problem are you running into?
¤ is a nice character
NotFound cotto: I don't have the info at hand, I'll file a ticket tomorrow. 01:38
cotto NotFound, thanks
NotFound For the array, I was doing some test with the winxed get_class builtin and got surprised by the fact that: string key[] = [ "Getopt", "Obj" ]; cl = get_class(key); works but cl = get_class([ "Getopt", "Obj" ]); fails 01:40
The [ ... ] as expression gives a PMC array. 01:41
string [] initializes a ResizableStringArray
01:42 jevin left
NotFound Not a big problem, just curious. 01:42
01:43 Kulag left 01:44 jevin joined 01:45 jevin left
mro cotto, only memory and FFI instructions are missing tests. Which ones would you prefer I looked at next? 01:45
cotto mro, nothing meaningfully implements the ffi instructions yet 01:46
NotFound Funny workaround: cl = get_class(split(".", join(".",[ "Getopt", "Obj" ])));
cotto NotFound, looking at the code that implements Parrot_ns_get_namespace_keyed, I think it'd be a one-line fix to support your use case.
NotFound, no 01:47
;)
mro cotto, do they (ffi ops) need more work in the spec? 01:49
cotto mro, possibly. The main blocker is that I haven't been able to find a usable Perl ffi module. 01:51
mro okay. What about the memory ops? Can I look at those? 01:52
cotto mro, writing tests would still be helpful, though they'd be more involved.
(for ffi)
NotFound I wonder if a special syntax for typed arrays will be useful: something like int[ 1, 2, 3] ; string ["a", "b"]....
cotto mro, please do. 01:53
01:56 kid51_at_dinner is now known as kid51
kid51 darwin/PPC make test PASS ba03bd8278 fr_FR.ISO8859-15 01:57
01:57 whiteknight joined
kid51 NotFound: Would we need to make similar changes in src/platform/generic/encoding.c ? 01:59
NotFound kid51: I took a look, it just hardcode ascii.
01:59 wknight8111 joined
kid51 Merci. Or gracias. Or something like that. 02:01
02:01 Kulag joined
mro cotto: i will. tomorrow. got to get some sleep now though. 02:01
NotFound De rien 02:02
cotto mro, 'night 02:03
I'll look at your pull requests this evening.
mro, what's your timezone?
NotFound Funny, I thought "de rien" was a bad translation of the spanish "de nada", but looks like is correct french. 02:04
mro cotto: CET, yours? 02:06
cotto mro, US West coast 02:07
mro cotto: roger! 02:08
Buy everyone. And thank you for a friendly welcome! :-)
cotto mro, thanks for the patches! 02:09
aloha, clock? 02:10
aloha cotto: LAX: Sat, 19:10 PDT / CHI: Sat, 21:10 CDT / NYC: Sat, 22:10 EDT / UTC: Sun, 02:10 UTC / LON: Sun, 03:10 BST / BER: Sun, 04:10 CEST / TOK: Sun, 11:10 JST / SYD: Sun, 12:10 EST
wknight8111 soh_cah_toa++ 02:13
I'm not sure I like being called "the infamous whiteknight"
02:13 wknight8111 left
soh_cah_toa :) 02:14
oh wait, infamous is bad fame
crap
cotto whiteknight, sorry. I already had the statue commissioned. 02:15
soh_cah_toa i suppose that word is abused so much it's become synonymous with "famous" 02:16
kid51 like flammable and inflammable
soh_cah_toa exactly
NotFound So inflammable is something that gives bad flames? 02:17
Like a troll? 02:18
soh_cah_toa ha!
kid51 cotto: trac.parrot.org/parrot/ticket/1047: Would that require a deprecation cycle?
cotto let me check
kid51, I don't think it does. 02:20
kid51 Thx
NotFound Spanish is cleaner: famoso - infame, not "infamoso" 02:21
kid51 cotto: Other than your gist post, have you made any progress on the plan for profiling? 02:22
cotto kid51, no.
if whiteknight's free, now would be a great time to discuss that
whiteknight define "free" and "discuss" 02:23
kid51 cotto: Can you repost the link?
cotto kid51, the gist?
gist.github.com/1063804
whiteknight what is this "quick and dirty hack" that pmichaud did? 02:24
was that something today?
cotto whiteknight, that was something he did a month or two ago 02:25
whiteknight ok
cotto I think it printed the time a sub was entered
whiteknight I'm not thinking that a runcore is the best option 02:26
cotto whiteknight, what's your preference?
whiteknight I think a much better option is a CallContext subclass that could monitor push/pop operations 02:27
cotto interesting
whiteknight if we had that kind of interface, an HLL could map in any type they wanted and collect whatever data they want
cotto It'd be quite powerful 02:28
and it wouldn't be yet another runcore
whiteknight of course, the question there is: Is CallContext easily subclassible, and are the interfaces we need to intercept encapsulated?
and I suspect the answers are "no" and "hell no"
cotto seems to be the case
whiteknight too much of that logic is still in a half-migrated state following the CallContext refactor
cotto from PIR, at least
We could still have a C subclass. 02:29
NotFound whiteknight: I've added a builtin getcontext() to winxed. It just does getinterp()["context"] for a now, but will simplify tests of a getcontext op. 02:31
02:31 Kulag left, Kulag joined
whiteknight NotFound: awesome, having that makes it easy to add in an op later 02:31
cotto: I don't know if context push/pop operations go through vtables on CallContext
I suspect it does not, I think push/pop might be for adding args
I can't remember the details 02:32
NotFound I think not
whiteknight The runcore idea is fragile, especially if an HLL really tries to leverage CPS features to do crazy control flow
cotto I'm seeing a lot of worms crawling out of that can.
whiteknight it's hard to say what is a call and what is a return, or when you are leaving a context or entering it, etc
or using exceptions for control flow between nested runcores 02:33
cotto usually you can at least tell when there's a change
whiteknight until we solve inferior runloops, we can't really use a runloop to get an accurate profiling picture
so basically what we need is a routine to print something out to a handle when we enter and leave a context? 02:35
02:35 Drossel joined
whiteknight like "ENTER Foo", "EXIT Foo", etc 02:35
cotto Leaving is implicit
printing something when there's a change is fine 02:36
02:37 Kulag left
whiteknight okay, so just "ENTER Foo" 02:41
02:41 Drossel left
whiteknight then how do you differentiate between recursively entering Foo, and returning to Foo? 02:41
NotFound I've found a problem with the Timer PMC: you can't stop a repeating Timer after its first tick, because the repeating is done by cloning it. 02:42
You stop the original, but not the active clone.
whiteknight we would need something like "ENTER <Sub Name>, <Context ID>
"
NotFound: timers are garbage. I'm not surprised that it's broken, I'm only surprised how badly it was designed
cotto whiteknight, this is sounding a lot like the current profiling runcore. 02:43
whiteknight see, I don't even know what the current profiling runcore does
cotto Maybe I should just make an easy way to get stripped down output from that. 02:45
NotFound Talking about CallContext, I'm not very happy with using the morph vtable to reset arguments. Will not be cleaner to use vtable set_bool, for example? 02:47
02:47 Kulag joined
cotto I'm going to put on my gloves and figure out what you're referring to. 02:48
whiteknight NotFound: me either
morph is stupid, and the only place it is really used is for something that isn't what it's designed for
anyway, I'm heading to bed now. It's late. We'll continue this chat in the morning
cotto 'night
whiteknight goodnight 02:49
02:49 whiteknight left
cotto I'll look into stripping down the profiling runcore. 02:49
And those pull requests I keep not pulling.
02:50 kid51 left 02:52 Kulag left 03:11 Kulag joined 03:20 Kovensky left 03:30 Kovensky joined
dalek rrot/m0-prototype: 8313968 | mro++ | t/m0/integration/m0_xor.m0:
remove eager exits from XOR test.
03:46
rrot/m0-prototype: 712eace | mro++ | t/m0/integration/m0_ (2 files):
Add M0 and, or operator test.
rrot/m0-prototype: 253a05b | mro++ | t/m0/integration/m0_ (2 files):
Move old iton M0 opcode test to new convert_i_n. Fix test logic.
rrot/m0-prototype: eaa043d | mro++ | t/m0/integration/m0_ (3 files):
Add tests for M0 ashr, lshr, shl operators.
rrot/m0-prototype: dbad968 | cotto++ | t/m0/integration/m0_ (8 files):
Merge pull request #140 from martinolsen/m0-prototype

complete math ops coverage, courtesy of mro++
dukeleto m0 development is heating up 03:50
cotto we got us an interested student, courtesy of chromatic++'s blog post 03:51
there were a couple others, but they missed me
well, hacker. not necessarily student 03:52
either way, fresh blood 03:54
dukeleto cotto: what is the status of the m0 glossy? 03:58
cotto: is it still just a gist, or does it exist in a branch somewhere?
cotto dukeleto, still just a gist 03:59
dukeleto, would you like to take charge of turning it into something presentable? 04:00
aloha, m0 glossy? 04:01
aloha cotto: m0 glossy is a brief self-contained glossy brochure-like introduction to M0 or gist.github.com/1022340 (draft)
dukeleto cotto: that could be fun. It fits in with a "visual intro to parrot" 04:03
cotto dukeleto, so it does 04:04
This is going to be an expensive day. I'm just about to book my plane for yapc::eu. 04:05
dukeleto cotto: oy vey. good time to look into frequest flier miles :)
cotto: preferences for formats, or where the m0 glossy should live? 04:06
cotto: in the m0-spec branch ?
cotto ironically, it looks like I'll have fewer layovers on this trip than on the yapc::na trip. 04:07
dukeleto cotto: very nice
cotto dukeleto, that's a good question. I guess it should go somewhere in parrot.git, and if there, the m0-spec branch makes the least non-sense.
dukeleto, It doesn't fit with what we typically use the repo for though. 04:08
jay Since the topic is C and PIR, can I ask a question?
cotto jay, um... permission granted.
;] 04:09
jay I got some PIR working calling c, with libRmath = loadlib "libRmath"
cotto dukeleto, I'd almost want a separate repo under the parrot org, but I'm not sure that's a good solution.
jay in NQP, this doesn't seem to work: my $rexp := pir::dlfunc(libRmath, "rexp", "dd"); (after the pir::loadlib("libRmath"))
WHen I build it isn't happy with the pir::dlfunc(...) attempt. 04:10
Damn... give me a second, I might have a typo.
Well, I did, but it didn't make a difference. Argh. Still not happy. Not critical, I have working PIR code, but I'm trying to get the hang of NQP. 04:11
dukeleto jay: it is probably dlfunc_xxx where i can't remember xxx
jay: dlfunc_p_s_s if the args are pmc, string, string 04:12
jay my $rexp := pir::dlfunc_p_s_s($libRmath, "rexp", "dd");
dukeleto jay: actually, dlfunc_p_p_s_p 04:13
jay Hmm... is the last one the type of the return?
dukeleto jay: gist.github.com/1074258 04:14
jay: run nm on libparrot.so to see all of them
jay: yes, the pattern is funcname_arg1_arg2_arg3_return_type
jay: and only the first letter is used for arguments and return type
jay: p=pmc,s=string,sc=string constant, i=integer, ic=integer constant, etc... 04:15
04:15 jsut_ joined
dukeleto jay: they are unique names so multiple dispatch isn't needed to cover various function arguments 04:15
jay error:imcc:arg count mismatch: op #-1896737904 'dlfunc_p_p_s_p' needs 4 given 3
Got to be close, though, the error is more interesting now... !_) 04:16
dukeleto jay: usually, dlfunc is done from PIR, then that bytecode is loaded from NQP
jay Ok. Happy to learn the "recommended" way. Would that be PIR to basically load all the needed functions into globals for later use? 04:17
dukeleto jay: have a look at this: github.com/letolabs/parrot-libgit2...c/git2.pir
jay: that is actually generated code, from the tools/dev/ncidef2pir.pl tool 04:18
soh_cah_toa i thought the syntax in nqp was pir::foo__PPPS()?
or maybe i'm thinking of something else
dukeleto jay: yes, it is a double underscore 04:19
jay soh_cah_toa++ ! Compiled.
soh_cah_toa first one is return type, the rest are args
yay me
dukeleto jay: and args+function return are mostly lowercase.
soh_cah_toa actually, i don't know the difference between the uppercase/lowercase variants
jay I used upper here. Is lower preferred?
dukeleto jay: they mean slightly different things 04:20
04:20 jsut left
dukeleto jay: which I can't remember, nor where they are documented :( 04:21
jay: parrots function signatures are documented a bit in docs/embed.pod
04:21 fperrad joined
soh_cah_toa yes, that's where it is 04:22
also docs/embed_new.pod
dukeleto jay: this github.com/letolabs/parrot-libgit2...c/git2.nci is a file which describes external library functions arguments and return values, and then a script generates the PIR I showed you above 04:23
cotto dukeleto, github.com/parrot/parrot/blob/mast...mpiler.pir
dukeleto jay: if you have dozens or hundres of functions, it really shines
bubaflub dukeleto: amen. 04:24
jay Ok, thanks.
Then can I just pir::$rexp__PP($arg) or something? That would seem too easy
soh_cah_toa i don't think so b/c the variable is $rexp not $rexp__PP 04:26
dukeleto jay: i think yes. bubaflub just wrote bindings to all of the GMP integer and RNG functions with this method
jay: so now we can have access to GMP from any Parrot language, including NQR if you want it :)
soh_cah_toa interesting, i wonder what would happen if i did have a var like $something__PP 04:27
dukeleto soh_cah_toa: try it out and see :)
jay Yes, I glanced at that earlier. And no, I don't quite have it yet. This didn't work:
$ans := pir::$rexp__PP($arg);
dukeleto i am hacking on libgit2 bindings for parrot now because that sounds fun to me
jay Neither did leaving out the __PP
dukeleto jay: the thing after pir:: has to be a literal string, not a variable 04:28
jay: like pir::r_function_that_i_dlfunced($arg)
jay: also, you need something like this: 04:29
jay Really? So the result of the pir::dlfunc isn't some sort of pointer
dukeleto jay: set_global ['Git'], 'git_treebuilder_get', nci
jay: and then it can be accessed through that key in that namespace, here, Git::git_treebuilder_get
jay: dlfunc is only part of the process
jay Yikes. None of that was required when I just did it in PIR? 04:30
dukeleto jay: no, all of this is required in PIR as well. Each function you want to access has to be dlfunc'ed, then the return value of the dlfunc needs to be stored somewhere that it can be later accessed 04:31
jay: a key in a namespace is usually what people do, but you could make it a global as well
jay Well, I got a working example without it. Want me to gist it?
dukeleto jay: depends if it is a language built-in or not, or on the phase of the moon
jay: sweet! sure.
04:31 fperrad left
dukeleto jay: i guess you can directly use the return value of dlfunc for a simple script, but when you actually cook it into a language, the dlfunc is happening at startup/bootstrap time but not used until later 04:32
jay gist.github.com/1074268 and this was in Runtime.pm
basically my HLL is squaak-ish, no special addins like that treebuilder stuff. 04:33
dukeleto jay: nice!
jay Well... but maybe not recommended?
Or.... given that it isn't that long, maybe I shouldn't bother with an NQP version? 04:34
dukeleto jay: meh. it means you need to "dip down" into PIR for every method you want access to, but it gets the job done
jay: what do you mean? are you asking whether to write it in PIR or NQP? 04:35
jay Well, I've got it in PIR, but NQP is easier to read and fewer lines, right?
But yes, that was my question. Does it matter, at the end of the day?
dukeleto jay: i like to stick with what I have that works and iteratively make it better 04:36
soh_cah_toa that's a good approach
dukeleto jay: what is your vision for NQR? What does it need to do or allow to be considered a success?
jay Ok... I thought that trying to get the same function also working in NQP was a good exercise... making me better. 04:37
NQR vision? Interesting question.
dukeleto jay: i know those are hard questions, but I am trying to understand what NQR needs from Parrot and other things in the parrot ecosystem
cotto dukeleto++
and jay++ for actually writing the thing 04:38
jay I'd consider it a roaring success if I could actually do basic data analysis with it. I think I'll be ok on the grammer, actions, etc... given enough time and a little help. More than that? Well..
04:38 Kulag left
jay I'd be interested in trying to get some graphics going. Have a few thoughts. Is anyone else doing graphics stuff with Parrot? 04:38
I'd like memory-mapped files, so I can work with massive > RAM data sets... an area I've worked in before (R/C++). 04:39
04:39 Kulag joined
jay So on goal 1, I think it's doable. Goal 2 I just don't know yet and haven't given it much thought. Goal 3 is probably doable and we might be able to help Parrot on that front... at least testing. 04:40
dukeleto: I should write up a draft plan, actually. Good idea. 04:41
That's all for me, tonight. I'll just stick with my PIR for simple calls like this for now. Baby steps. At least it works! 04:48
Thanks! cotto++
cotto jay, happy hacking!
'night
jay dukeleto++
04:49 jay left
pmichaud is <parrot/string.h> considered part of the user-facing API? Can HLL's safely use the macros and functions defined there? 04:50
larger question: I'd like to be able to get codepoints from a STRING in C 04:51
(via an iterator, preferably)
cotto I don't know that it's explicitly covered. It does provide a potentially useful low-level interface that doesn't look like it'd be a bad idea to expose. 04:54
From my reading, it's in the gray area of support coverage. 04:55
pmichaud alternately, I could really use a fixed-width encoding of unicode strings, that works even when ICU isn't present.
where "works" doesn't have to mean anything more than "supports basic string compare and indexing operations" 04:56
cotto you mean utf-32? 04:57
04:58 plobsing left
cotto I'm fine with either approach. I think either way, we need to defined the status of the STRING_* macros. 04:58
pmichaud utf-32 would be fine.
I've been thinking of redoing the regex engine and using a ResizableIntegerArray to hold the codepoints and do operations on that... but nearly all of the string operations are only defined for STRINGs 04:59
05:00 daniel-s left
cotto utf-32 sounds like it'd a lot of work 05:00
*it'd be
pmichaud wouldn't be less work than the current utf8? (to implement, I mean)
*wouldn't it be 05:01
cotto actually, we have ucs-4 05:02
pmichaud oh, I see ucs4 now.
Wonder how much of it works w/o ICU.
Time to find out. :)
05:02 daniel-s joined
cotto pmichaud, are you trying to avoid ICU as a hard dependency for Rakudo? 05:02
pmichaud I'm trying to speed up regexes. 05:03
I'm fine with ICU as a dependency for Rakudo.
well
I said that wrong.
benabik ... ucs4 != utf-32?
pmichaud I don't mind if we can't support all unicode operations when ICU isn't present.
but not having ICU present shouldn't prevent common non-unicode-y Perl 6 programs from running. 05:04
soh_cah_toa benabik: no it is
benabik Oh, I'm too tired to be scanning IRC. Nevermind, I go back to bed now.
soh_cah_toa :)
pmichaud earlier in Parrot's history I tried converting strings to non-utf8 to improve performance... but basic operations (including the conversion itself) would often fail if ICU wasn't present. 05:05
However, I notice that strings have been refactored a fair bit... so it might work now :-)
and ucs4 would have about the same memory characteristics of a ResizableIntegerArray, so that would be awesome. 05:08
testing... so far so good! 05:09
05:10 daniel-s left
pmichaud I think I can very much work with this. cotto++ 05:17
cotto pmichaud, very glad to hear it 05:20
05:28 daniel-s joined 05:46 soh_cah_toa left 05:53 dafrito joined 05:57 logie joined 06:10 logie left 06:45 theory left 07:02 fivetonsflax joined 07:11 Eclesia joined
Eclesia hi 07:12
07:25 kthakore left
dalek kudo/nom: 4050741 | moritz++ | / (2 files):
Parcel.values, tests
08:24
08:42 rurban_ joined 08:44 rurban left 08:45 rurban_ is now known as rurban 08:51 mj41 joined 08:53 Eclesia left 08:58 mj41 left 08:59 Eclesia joined
mro yawns 09:04
'morning!
cotto: thanks for the merge. do you have any comments for the changes? 09:05
aloha: time?
aloha mro: time is a lion, where i am a lamb.
mro lol
aloha: clock?
aloha mro: LAX: Sun, 02:05 PDT / CHI: Sun, 04:05 CDT / NYC: Sun, 05:05 EDT / UTC: Sun, 09:05 UTC / LON: Sun, 10:05 BST / BER: Sun, 11:05 CEST / TOK: Sun, 18:05 JST / SYD: Sun, 19:05 EST
10:41 Kulag left, Kulag joined
Eclesia hm ... somone knows what is the cause of this error : 10:53
invoke() not implemented in class 'Packfile'
dalek p: dbc9e77 | jonathan++ | src/ops/nqp.ops:
Add repr_change_type op, for asking the repr to do a type change on the object.
11:04
p: 6ace072 | jonathan++ | src/6model/reprs/P6opaque.c:
Implement change_type for P6opaque.
kudo/nom: ec206d6 | jonathan++ | tools/build/NQP_REVISION:
Bump NQP_REVISION to get repr_change_type support.
11:08
kudo/nom: 6503f6b | jonathan++ | / (3 files):
First sketch of mixin support.
kudo/nom: 5349d59 | jonathan++ | src/core/operators.pm:
First, though basically working, implementation of does and but operators. Undertested so far - there will be bugs.
NotFound Eclesia: you may be trying to use a Packfile PMC as if it were an Eval 11:55
Eclesia NotFound: I'm trying to run a small pir function from winxed : nopaste.snit.ch/59209 11:58
NotFound Eclesia: The PIR compreged object has two ways of working: the older way that returns an Eval PMC is to invoke it as a sub, the "compile" method is the new way that returns a Packfile... or maybe a PackfieView in the near future. 12:01
Eclesia NotFound: so is there something on this PackFile pmc to run it ? 12:02
NotFound Eclesia: supposedly it should have a get_main or main_sub method, but looks like it hasn't. 12:04
Eclesia hahaha 12:06
NotFound Eclesia: better use the Eval interface for a now: var compiled = pirCompiler(pircode); var main = compile.get:main(); main(); 12:07
get_main
Eclesia NotFound: thanks it worked :) 12:11
12:18 daniel-s left
Eclesia NotFound: when I look at this doc ftp://ftp.uni-siegen.de/pub/parrot-docs/html/docs/book/pir/ch04_variables.pod.html (at the bottom, topic on namespaces) . he gives examples to get the parent namespace or all classes in the namespace. but I can't find the methods to have the list of child namespaces and globales . 12:29
NotFound Eclesia: a Namespace PMC is a hash. You can iterate over it, and check the type of each result. 12:38
But note that if there are several items with the same a name (for example, a global var and a namespace) the thing is a bit more complicated... and I don't understand it very well. See src/pmc/namespace.pmc 12:41
12:45 kid51 joined
Eclesia NotFound: thanks for all the help. I have to go ++ 12:46
NotFound by
12:46 Eclesia left 12:53 Coke left, Coke joined 13:03 jay joined 13:18 daniel-s joined
jay Good morning! 14:01
14:05 fperrad joined 14:06 fperrad left
mro jay: 'Morning! 14:06
jay mro: cheers! Happy hacking!
14:07 fperrad joined 14:29 ambs joined
dalek TT #840 closed by jkeenan++: t/op/io.t fails on win32 15:10
TT #840: trac.parrot.org/parrot/ticket/840
15:29 JimmyZ joined
dalek TT #582 closed by jkeenan++: auto::sizes: Complete development of maxmin probes 15:42
TT #582: trac.parrot.org/parrot/ticket/582
15:43 plobsing joined
dalek rrot: 3db09f0 | util++ | parrotbug:
Fix error message in parrotbug
16:05
16:07 daniel-s left 16:10 davidfetter joined 16:14 kid51 left 16:15 zby_home joined
dalek rrot: 9ca83a5 | NotFound++ | src/string/encoding.c:
simplify and fix the encoding search by name functions
16:15
16:25 JimmyZ left 16:29 whiteknight joined 16:33 theory joined
dalek rrot: 91db889 | NotFound++ | / (2 files):
add PARROT_CANNOT_RETURN_NULL to Parrot_pf_(de)serialize,
16:36
16:42 rurban_ joined 16:44 jevin joined, rurban left, rurban_ is now known as rurban
dalek kudo/nom: 850e5c6 | Coke++ | t/spectest.data:
track more nom test status.
16:47
nxed: 517ac40 | NotFound++ | winxedst (2 files):
new builtin unescape
17:02
nxed: 383f500 | NotFound++ | winxedst1.winxed:
new builtins trans_encoding and encoding_name in stage 1
17:14
17:56 simcop2387_ joined
dalek website: benabik++ | GSOC 7: What is newPOST? 17:57
website: www.parrot.org/content/gsoc-7-what-newpost
17:57 simcop2387 left, simcop2387_ is now known as simcop2387
benabik Okay, time to get my head out of "understanding code" and back into "writing code" 17:58
18:10 Kulag left, Drossel joined
whiteknight yeah, understanding the code is way overrated 18:15
jay Suppose I have a lot of dlfuncs all coming from the same library... can I do a loadlib once and put the resulting library "handle" or whatever it is into a global? 18:18
bubaflub jay: github.com/bubaflub/parrot-gmp/blo...MP/raw.pir
jay bubaflub++ Same link as last night but I was looking at something else there I think. Thanks! 18:19
bubaflub jay: ok. this is in PIR and is generated from a script in parrot under tools/dev/ncidef2pir.pl 18:21
jay: i have a NCI definition file (github.com/bubaflub/parrot-gmp/blo...P/raw.nci) and the script outputs the PIR. pretty simple but saves me some time.
jay Sounds like what I'm trying to do. dukeleto challenged me (well, challenged isn't quite the right word) to consider working with the GNU Scientific Library. I figured once I could get one call working I could write a script to generate a bunch of code... 18:23
bubaflub jay: that's exactly what my project is doing - i've got a script that reads gmp.h and generates the NCI definition. from there we've got a script in parrot that goes from NCI def -> PIR. 18:25
jay: each header file is slightly different and GMP had a bunch of #define's i had to work around, but you could probably take my script and modify it to work with GSL
jay Excellent. Nice to have something in the general area to look at. I wanted to work as independenly as I could initially... I'll learn more that way, but I think I'm getting better at recognizing what I don't know and when I probably need a "best practices" bit of advice... 18:26
bubaflub jay: i'm mostly familiar with the NCI stuff, but plobsing knows everything about that sub-system. 18:27
jay I used loadlib/dlfunc in PIR successfully last night with a different shared library. Today I'm trying to use libgsl just with one example: 18:29
double gsl_ran_gaussian_pdf (double x, double sigma)
gsl_ran_gaussian_pdf = dlfunc libgsl, "gsl_ran_gaussian_pdf", "ddd"
gives me an error when I run it:
No NCI thunk available for signature '[ 4, 4, 4 ]'
bubaflub jay: 1, 2, 3 and 4 as NCI signatures have been deprecated 18:30
long story short, try just using d
jay I didn't use 4. I used "ddd" (see above)? 18:31
bubaflub hmmmm
that is strange
jay I'm in 3.3.0, did something change around then perhaps?
bubaflub jay: not sure. can you gist or nopaste exactly what you are using? i can take a look at it. 18:33
jay Sure...
bubaflub: gist.github.com/1074811 18:34
18:35 bluescreen left
bubaflub jay: hmmm, that looks right. 18:36
plobsing that [4,4,4] is the internal representation of the NCI signature 'ddd'. we've since added pretty-printing for those internal representations so on 3.5, it should look like 'double (double,double)'.
jay Sounds like I need to move up to HEAD or 3.5 then? 18:37
plobsing that won't fix your problem, it'll just be easier to parse the error message
what you really need is an NCI thunk to provide the Parrot/C interface for the call you are trying to make
you can do that by compiling Parrot with libffi, providing a dynamic thunk library, or rebuilding parrot with additional core thunks. 18:38
jay bubaflub: is this (what plobsing just said) what you are doing with GMP?
plobsing the easiest solution is to have libffi available
bubaflub jay: yes. currently i have libffi installed but eventually i'll generate thunks so libffi isn't needed 18:39
jay: basically, not every possible combination of signatures is currently covered. either generate a thunk (using parrot_nci_thunk_gen) or use libffi.
jay Ok, let me go back to the drawing board. Thanks for the pointers... 18:40
bubaflub jay: in other news, GSL also has the same documentation format (textinfo) so there is a change that the scripts i use for GMP will work with minimal conversion 18:41
jay Cool. One other question: suppose I wanted to put a copy of libgsl.so in a "good" place so it can be found without the user having to configure LD_LIBRARY_PATH. Where is the right place to do this? 18:42
bubaflub jay: i'm not entirely sure; i'm on Mac OS X and i've got stuff in weird places 18:45
plobsing from dlopen(3) - /lib and /usr/lib are the only places searched dynamically for shared libraries
moritz cat /etc/ld.so.conf 18:46
plobsing you can, however, put the libraries in many other places (eg: /usr/local/lib) and run ldconfig to update the shared library cache
jay Ok. No special parrot place or linker options that would just take care of it... it would need root permissions to put in a sensible place then? 18:47
plobsing sort of 18:49
jay lol Np. I'm happy to leave it for now. Easy to tweak later.
plobsing you can put it anywhere, so long as the path used to load the library contains a path separator (/) 18:50
shared library behaviour is complicated and crufty
jay crufty... nice!
NotFound And shared library dl loaded is even funnier. 18:54
bubaflub plobsing: while you're here - is there an example of somewhere that uses parrot_nci_thunk_gen and loads in those libraries? 18:59
s/libraries/thunks/g
plobsing the opengl bindings do that
so you'll likely want to look at runtime/parrot/library/OpenGL.pir, and sections of Parrot's makefile concerning 'glut_nci_thunks' 19:02
jay Ok... ( taking notes ) 19:03
I just tested my libgsl with standalone C code and it works. Sanity check. 19:04
bubaflub plobsing: ok, i think i get it. i give it a slightly different NCI definition file, use nci_thunk_gen with --loader-name and generate the C. compile the C into a library, and then load that library and call whatever function name i specified in --loader-name. 19:11
19:11 GodFather joined 19:12 GodFather left
cotto ~~ 19:13
19:13 dngor left 19:16 dngor joined
NotFound whiteknight: ping 19:16
mro cotto: oh, hi! 19:25
I was just writing you a mail describing my latest changes... Is it okay I send it to your github address? 19:27
19:27 benabik left
cotto mro, sure. Everything ends up at the same place anyway. 19:28
19:28 benabik joined
mro cotto: okay. I'm heading out now. Have a nice day! 19:29
cotto mro, catch you later
19:30 Eclesia joined
cotto thanks for the feedback 19:30
Eclesia back
davidfetter wb!
plobsing bubaflub: IIRC, there is some magic so that if you do not provide a --loader-name, it picks a special name for the loader and you don't have to call it (parrot calls it automatically as part of the library load) 19:35
19:35 mro left 19:36 Coke left 19:37 Coke joined
dukeleto ~~ 19:38
bubaflub plobsing: ok. so maybe just the --dynext param needed then? 19:41
benabik pmichaud: You added PAST::Node.signature(). Is anything using it, or is it just for the future? 19:42
plobsing bubaflub: yes, the dynext option is required
jnthn__ benabik: We're using it in the nom branch of Rakudo. 19:43
Maybe in nqp too
19:43 bluescreen joined
benabik jnthn__: I didn't see it in NQP. I'll poke around in nom. Guess I should try building the whole stack on my branch and watch for explosions. 19:45
Eclesia get_attr_str() not implemented in class 'NativePCCMethod' <-- ?
19:46 Coke left, Coke joined 19:54 Coke left, Coke joined
Eclesia hm... printing the full namespace tree was not as usefull as I thouht : ftp://ftp-developpez.com/jsorel/temp/ns.txt 20:00
20:00 Limbic_Region joined
Eclesia wondering, what are those NativePCCMethod 20:01
NotFound Eclesia: the methods defined in the .pmc files 20:03
dalek kudo/nom: cb99254 | moritz++ | / (3 files):
implement and test .ords, &ords()
20:09
Eclesia NotFound: changing subject, I test the opengl. even with glut and mesa he still skip the module :/ 20:12
jay ping bubaflub or plubsing
bubaflub jay: pong
NotFound Eclesia: what platform?
Eclesia NotFound: linux x64
NotFound Eclesia: distro?
Eclesia mint
jay bubaflub earlier referenced a location "s/liibraries/thunks/g" for an example of use of parrot_nci_think_gen.... can you help be find that location?
Eclesia NotFound: a derivate of ubuntu 20:13
bubaflub jay: when you build or install parrot you'll get the script parrot_nci_thunk_gen (right in the root and placed into the path)
NotFound Eclesia: Do you have the -dev packages installed?
bubaflub jay: as for an example, plobsing mentioned OpenGL which is at runtime/parrot/library/OpenGL.pir 20:14
jay Oh, ok. I do have that comment, I'll look at that then. Thx.
bubaflub jay: you can also look at config/gen/makefile/root.in ~ line 2970 to see how all this fits together
jay: what i understand is that you have a slightly different NCI definition file that contains all your signatures that you'll want. parrot_nci_thunk_gen turns that nci file into a C file. compile that C file into a library and then load it when you need it. 20:15
jay bubaflub++ good memory on that line reference.
bubaflub jay: heh, i still have a bunch of Vim windows open
Eclesia NotFound: glutgt3-dev, libglut3-dev, libglut, libglu1-mesa-dev
NotFound Eclesia: try this: perl Configure.pl --verbose-step=auto::opengl 20:17
Eclesia NotFound: nopaste.snit.ch/59341 20:20
looks like he doesn't know 'verbose'
NotFound Eclesia: Warning: Building a shared parrot library may conflict with your previously-installed /usr/local/lib/libparrot.so 20:21
Probably unrelated, but anything can fail in that situation. 20:22
You can use --prefix=/any/other/dir for a test 20:23
dalek TT #561 closed by cotto++: What are valid characteristics for 'inspect_str' vtable?
TT #561: trac.parrot.org/parrot/ticket/561
Eclesia NotFound: ... have to go sorry :/ . thanks for the help 20:25
20:25 Eclesia left
NotFound cotto: Now that I think about it, perhaps a sane Default for inspect_str is to return PMCNULL 20:25
whiteknight well, it's a semipredicate problem. There's no difference if there is no item by that name, or if the item contains null 20:26
NotFound Item? 20:27
It you want a item that can contain null not null, you have get_attr_str 20:28
I don't expect that something blows in my face just for taking a look, i think inspect should be like that. 20:29
20:33 mj41 joined
dalek kudo/nom: cd4801e | moritz++ | LHF.markdown:
remove ords() from LHF
20:42
cotto NotFound, first I'd like to see a use case. I'm fine with using PMCNULL to indicate that an attribute doesn't exist, but I don't want to have us write code that's not going to get used. 20:44
whiteknight what really bothers me is the relationship between find_method and can, ops and vtables
20:44 davidfetter left
whiteknight find_method vtable returns pmcnull, but find_method op throws an exception 20:45
NotFound cotto: what Eclesia was doing, inspecting things in general
whiteknight Austin Hastings was doing something similar, and ran into a bunch of problems with _dumper, if I recall correctly 20:46
cotto whiteknight, that is odd 20:47
NotFound, wfm
NotFound whiteknight: people want better to get a meaningful exception rather than a bare 'null pmc access' 20:48
whiteknight NotFound: so what are you suggesting?
NotFound whiteknight: one posibility is to have two versions of each thing, get_ and find_, get throws and find_ return null. The other is the old idea of a Failure PMC 20:50
whiteknight NotFound: Failure PMC? In addition to Null and Undef?
NotFound whiteknight: a variant of Undef that throws an stored message or full exception if used for any other thing than checking it. 20:51
whiteknight Okay, so Null, but with a user-configurable message?
NotFound yeah
whiteknight Null isn't a singleton anymore, I don't think. That should be easy to hack together
NotFound Rakudo uses (or used) soething like that. 20:52
cotto NotFound, I don't like get_ and find_. What's wrong with always returning PMCNULL when a method isn't found?
NotFound cotto: People complaints. They want a meaningful error message without having to check all values. 20:53
cotto laziness is a good argument
NotFound In fact, several things that used to return null were changed because of that.
cotto For M0 I'd be more opposed, but we already have a boatload of PIR ops.
NotFound If we change back, we risk to walk in circles.
whiteknight most vtables should return PMCNULL if a value isn't found. A sugar layer can detect that and throw a custom error message 20:54
Rosella does a lot of that already
fivetonsflax hello cotto 20:55
cotto hi fivetonsflax 20:56
whiteknight What we need to do is define what exactly are the error conditions for each vtable, so we can detect errors
find_method already returns pmcnull, and I think the find_method op should do the same. This obviates the need for can vtable and can opcode
or, the opcode can stay, but the vtable can go
fivetonsflax I read chromatic's call for volunteers the other day.
for Lorito
still needed? 20:57
tadzik sure!
cotto fivetonsflax, I need to think about how to put you to work. How's your C and Perl 5?
whiteknight fivetonsflax: volunteers are always needed!
fivetonsflax I am literate in C but don't program in it often. 20:58
Perl 5, I program in almost every day.
cotto ok. We have a complete-ish Perl 5 prototype of the M0 VM and a less complete C implementation. 20:59
A good starting place would be the m0 spec.
aloha, m0 spec?
aloha cotto: m0 spec is docs/pdds/drafts/pdd32-m0.pod in the m0-spec branch or github.com/parrot/parrot/blob/m0-s...d32_m0.pod
NotFound whiteknight: in the case of find_method I agree, but be ready for some complaint.
whiteknight I had a ticket somewhere to deprecate can vtable 21:00
cotto indeed. That kind of change needs to be run by pmichaud et al.
21:00 soh_cah_toa joined
whiteknight inspect_str and get_attr_str, should they return pmcnull or throw an exception? 21:00
cotto hio soh_cah_toa
soh_cah_toa cotto: hey
whiteknight get_attr_str especially, we need to differentiate between a key that contains a value, and a key that does not exist 21:01
cotto semipredicate problem again
NotFound Attributes can have or not have slot, is an important difference that justifies the exception.
21:02 lichtkind joined
whiteknight okay, so get_attr_str behavior shouldn't change. inspect_str can return PMCNULL on failure 21:02
NotFound And if some PMC does not make such difference, its override can do what it want.
whiteknight and get_prop does that too
right, we're only talking about core types 21:03
we need to set precident
fivetonsflax ok cotto, I have begun reading the spec, have to run now but will ping you when I have finished. what's your preferred mode of contact?
jnthn__ It's probably too language specific to decide.
cotto fivetonsflax, I'm usually here but email is fine too.
jnthn__ For attributes, at least.
fivetonsflax ok, I found an email address for you on github. thanks. ttyl. 21:04
jnthn__ Some languages want you to pre-declare your object attributes up front and it's a compile time failure (and thus should never make it to runtime, and it's fatal if that happens) to access an undeclared attribute.
NotFound jnthn__: a language can override, too. Just need to wrap the access for foreign objects in a thin layer that catches the exception
jnthn__ Others put no such constraints on it.
cotto fivetonsflax, please take notes of what confuses you, if anything
whiteknight jnthn__: But we need to make some kind of decision with respect to core types 21:05
the types we ship with core parrot should be consistent
fivetonsflax will do. I have no compiler experience so will need either simple tasks, or a bit of handholding as I get up to speed.
21:05 fperrad left
cotto fivetonsflax, good to know. If you have the time to answer, what's your interest in M0/Lorito? 21:05
NotFound We can't not decide, they must do something. 21:06
jnthn__ whiteknight: If you integrate 6model it out of the box provides a couple of reprs that have different semantics there, because they're aimed at different languages.
fivetonsflax cotto: I use and like Perl 5, am curious about Perl 6, and when chromatic posted a call for volunteers, no experience needed, I thought it would be a fun way to get involved. 21:07
jnthn__ whiteknight: I can see how it's an interesting question when Parrot does have a core Class type that it expects all languages to use. I'm just saying that it's the wrong one once you have an objects framework rather than a particular objects implementation.
whiteknight jnthn__: okay, so the repr will indicate the behavior? And a language-neutral library should check which repr is used first, before trying to decide how to catch and handle an error condition?
fivetonsflax if there's some other area where I'd be more useful, I am not at all married to the idea of working on M0/Lorito. 21:08
whiteknight jnthn__: but look at something like CallContext. When I do CallContext.inspect_str("CRAPOLA"), what happens?
or Integer.get_attr_str("FOOBARDOESNTEXIST")
jnthn__ whiteknight: I was talking specifically about attributes here.
whiteknight: That's whatever the PMC repr decides to do, I guess. :)
cotto fivetonsflax, it's at an interesting stage. Some of it is pretty well-defined, but we're actively figuring out other aspects of it, especially what the language that compiles down to M0 will look like. 21:09
NotFound fivetonsflax: all parrot areas need work
whiteknight That may just be the longterm solution. Leave things the way they are now until 6model comes in and unifies everything
jnthn__ whiteknight: I'd hope that most people will be interoping with other language's objects by calling method son them rather than attribute access though :)
whiteknight jnthn__: lots of languages do allow attribute access without explicitly going through a dispatcher 21:10
jnthn__ whiteknight: Sure, it happens.
NotFound jnthn__: sometimes you need to access low level things, and that usually means using the core PMCs.
jnthn__ whiteknight: We'll need to work out the HLL interface for that. (more)
Part of the problem is that some languages just don't expect that their attributes can be poked from the outside. 21:11
whiteknight jnthn__: on a side note, does Rakudo make use of the can vtable? I want to deprecate it, since it seems to always fallback to find_method
jnthn__ whiteknight: It uses the can op, but I think that uses find_method directly...
whiteknight yeah, that's what I'm saying. can op calls can vtable which always (that I have seen) calls find_method vtable
21:12 ambs left
NotFound In fact we can delete Object can, it does the same as Default 21:12
whiteknight right 21:13
fivetonsflax OK, well -- I guess I'll finish reading that specification, see if I can think of some questions to answer, and we'll take it from there and see what happens, unless you have a better idea.
s/answer/ask/
NotFound Now that I think about it, there is a big difference: find_method is overridable 21:14
whiteknight right. can always falls back to find_method
I forgot that it couldn't be overridden
jnthn__ whiteknight: Anyway, my impression is we won't miss vtable can.
NotFound And that difference means that can has no useful purpose. 21:15
whiteknight that's what I wanted to hear :)
cotto fivetonsflax, sounds like a plan.
fivetonsflax great. ciao for real now.
21:15 fivetonsflax left
whiteknight TT #2042 21:15
NotFound If it does the same and is not overridable, isn't useful.
whiteknight cotto: While you're hear and present during this conversation, can you take a look at TT #2042? A greenlight before the release would be awesome 21:17
cotto whiteknight, sure 21:18
whiteknight thanks
cotto whiteknight, I already did
apparently
I'm glad trac remembers. 21:19
21:23 PacoLinux left 21:24 zby_home left 21:28 Limbic_Region left
dalek kudo/podparser: 076e348 | tadzik++ | / (3 files):
Move pod related metod from Actions.pm to Pod.pm
21:32
kudo/podparser: 8787be2 | tadzik++ | / (6 files):
Parse tables, import 07-tables.t
21:39 mj41 left 21:42 Psyche^ joined
soh_cah_toa omg, it works 21:44
i can list source code now
\\o/
cotto soh_cah_toa, sounds exciting 21:47
soh_cah_toa it finally does something useful
21:47 Patterner left, Psyche^ is now known as Patterner
soh_cah_toa though i still get a backtrace when using the "quit" command. i have no idea why 21:48
it started happening after the merge into master
21:50 dafrito left
benabik Huh. I'm getting a failure in t/dynpmc/os.t on Darwin/x86 21:53
benabik is merging master into his branch.
cotto soh_cah_toa, do you get any complaints about incompatible versions of core_ops?
soh_cah_toa cotto: no. i did at first after the merge. but i reinstalled 3.5.0 and it went away
from a clean repo too 21:54
cotto interesting
soh_cah_toa yeah, there was a bunch of weird stuff happening after merging 21:55
bubaflub cotto: i got that problem when i had some PBC compiled from 3.4 but upgraded parrot to 3.5 and tried to run; i had to re-compile to PBC
cotto soh_cah_toa, I was using an old pbc file. my mistake
bubaflub, yup
bubaflub cotto: took me a looooooooong time to figure that one out 21:56
soh_cah_toa next to imcc's "syntax error somewhere", it's one of the most annoying errors generated by parrot
i always thought that was weird considering there's only one .pbc format. i would figure it would only fail if the new release generated a new bytecode format 21:57
pmichaud 19:42 <benabik> pmichaud: You added PAST::Node.signature(). Is anything using it, or is it just for the future? 21:58
benabik: nom uses it today.
cotto If only someone could fix it.
benabik pmichaud: So jnthn__ said. I'll test my version against it. Do you know off the top of your head where? There are an awful lot of signature\\( in nom. 21:59
soh_cah_toa i suppose i could poke around a bit
pmichaud it's used for the wrap_return part in src/Perl6/Actions.pm
although I expect we'll use it in many places quite soon
benabik Thanks, pmichaud++ 22:00
(and jnthn__++ too)
pmichaud line 3500.
cotto soh_cah_toa, I'm working on it. 22:01
soh_cah_toa oh, ok
pmichaud afk, dinner
benabik D'oh! `:signature(`! I kept looking for .signature. 22:03
And a rebuild took care of the error. Bah. 22:13
cotto soh_cah_toa, how does this strike you? 22:19
Incompatible versions of `core_ops' oplib, possibly due to loading bytecode generated by an old version of Parrot. Found 3.2.0 but loaded 3.5.0
soh_cah_toa weird
cotto soh_cah_toa, I'm asking how you feel about the error message. 22:20
soh_cah_toa hmm...
benabik Feels like an improvement to me. At least points to reason for error. 22:21
soh_cah_toa yeah, i think it's a little more verbose
actually, what does the old error look like? 22:22
cotto I can make it a lot more verbose. The question is whether it's better.
soh_cah_toa, it didn't give a reason
", possibly due to loading bytecode generated by an old version of Parrot" is the new part 22:23
soh_cah_toa really? i'm almost positive i've seen it w/ the version number
eh, whatever
oh, new part. whoops 22:24
then yes, that's definitely an improvement
yeah, i can't think of a way to be any more clear. it's pretty obvious. good 22:28
though my problem was why 3.5.0 can't load bytecode from 3.2.0 (in this case) b/c it's still the same version of bytecode: format 1
dalek nxed: ff01774 | NotFound++ | winxedst1.winxed:
change the bultin lookup:

of that namespace at the root, and are looked up the same way as functions.
22:32
soh_cah_toa in src/packfile/api.c, i think it would make more sense to check the bytecode format rather than the major/minor version of parrot
22:33 bubaflub left
cotto The way we deal with bytecode compatibility isn't amazing. We have some structures in place to define version numbers, but the overall plan isn't strong. 22:33
soh_cah_toa so even though both version 1.1 and 1.2 uses format 1, there's no guarantee that the bytecode is actually the same? 22:36
dalek rrot: 324de9f | cotto++ | src/packfile/segments.c:
make bytecode incompatibility message more helpful
cotto correct
soh_cah_toa well, then that probably needs improvement
dalek nxed: d68598c | NotFound++ | pir/winxed_compiler.pir:
update installable compiler
benabik soh_cah_toa: More that there are other version numbers. It's PBC format 1, but different op versions.
It's like "still ELF, but different glibc version" 22:37
soh_cah_toa maybe we need revision/patch numbers in bytecode format: format 1.x.y
or something like that
cotto soh_cah_toa, part of the problem is that Parrot_x_exit never returns, so anything after it is dead code. 22:47
22:50 logie joined
dalek kudo/nom: 62c04ce | jonathan++ | / (3 files):
Start to sketch out how dispatchers could look for supporting nextsame et al.
22:57
kudo/nom: b02654b | jonathan++ | src/ops/perl6.ops:
Some ops related to dispatchers.
kudo/nom: 0cd9e67 | jonathan++ | src/Perl6/Actions.pm:
multis and methods get a slot for a dispatcher, which just contains a type object; we'll vivify it on demand to create a real dispatcher if nextsame et al are used.
kudo/nom: 0ecf393 | jonathan++ | src/ops/perl6.ops:
Toss some dead code.
kudo/nom: 0373976 | jonathan++ | src/ops/perl6.ops:
First cut of op for finding a dispatcher (doesn't try to consider exhaustedness or any such stuff yet, though).
kudo/nom: db2ce31 | jonathan++ | src/ops/perl6.ops:
Couple of corrections to find_dispatcher op.
kudo/nom: 3209cd1 | jonathan++ | src/Perl6/Metamodel/Dispatchers.pm:
Refactor dispatchers; introduce a common case to factor out a bunch of stuff they'll probably all share.
kudo/nom: 4bc1ac3 | jonathan++ | src/core/ (2 files):
First cut implementation of callwith. Probably not perfect, but essentially works.
whiteknight All tests pass on my machine. All PLA and Rosella tests are working fine too 23:01
23:05 NotFound left, NotFound joined 23:09 logie left
jay ping bubaflub or plobsing 23:10
whiteknight jay: I got your email, sorry I haven't had much time to reply yet 23:12
jay np -- I know you guys are busy and I've kept busy on other stuff. Whenever you come up for air... 23:13
does the 'msg' utility support two receivers?
whiteknight what msg utility? 23:16
jay I see messages to individuals, and aloha says it will deliver the message?
whiteknight oh, that. No, it's single receiver
msg jay test
aloha OK. I'll deliver the message.
jay pong? 23:17
msg
Maybe it is delivered at login?
cotto jay, it's delivered when the recipient says something 23:19
jay msg whiteknight or maybe not 23:20
aloha OK. I'll deliver the message.
jay Ah: aloha's message deliver seems to be different from the slash msg in IRC docs.
msg bubaflub I got a simpler function call to libgsl working, so the thunk issue was definitely due to the complex signature, not something silly. 23:21
aloha OK. I'll deliver the message.
jay msg bubaflub Thanks for the tips, and I'll look more at your stuff
aloha OK. I'll deliver the message.
sorear /msg jay FOO sends a message to one recepient immediately 23:22
/msg #parrot FOO sends a message to an entire channel
most IRC clients have a concept of a "current window", which is a user or channel that receives unprefixed messages
jay It look like regular messages to me, sorear. I must have a plain-vanilla client (chat on Linux). 23:23
sorear msg jay FOO sends a message to #parrot, which is then received by "aloha", which stores the message until it can be delivered 23:26
aloha OK. I'll deliver the message.
jay sorear++ I'm behind the curve in many ways. 23:27
23:34 Drossel left 23:35 Kulag joined
dalek nxed: 6c1258a | NotFound++ | winxedst1.winxed:
change the lookup for method-like calls to allow access to builtins
23:39
23:50 Kulag left, Kulag joined