Parrot 3.6.0 "P�jaros del Caribe" released | parrot.org | Log: irclog.perlgeek.de/parrot/today | #parrotsketch meeting Tuesday 19:30 UTC
Set by moderator on 31 July 2011.
00:00 kid51 joined
dalek sella: 6bdf518 | Whiteknight++ | src/ (13 files):
Use the new __CLASS__ variable in winxed to make the must_subclass errors more consistent. Also, fix a few other things
00:05
00:10 davidfetter left
kid51 Does anyone know what program I can use to listen to a podcast recorded in .ogg format? 00:10
00:11 whiteknight left 00:12 whiteknight joined
whiteknight bleh 00:13
bubaflub kid51: i'd recommend VLC (www.videolan.org/) 00:17
00:17 theory left
kid51 I tried itunes, windows media player and quicktime, all without success. 00:26
I went back to the web page and got a link to play the .mp3 directly thru the browser.
bubaflub that works too.
dafrito Should I post questions/comments regarding hacking on parrot's lua to IRC, the mailing list, or github, (or even Parrot's trac?) 00:36
For example, a lot of the documentation refers to languages/lua, which is where the fetch_languages script puts lua. But those locations don't make sense if you've cloned it separately, so I'm wondering if they should be changed? 00:37
dalek TT #2008 closed by jkeenan++: [PCT] Patch/feature request: No pop_eh in try PAST::Op
TT #2008: trac.parrot.org/parrot/ticket/2008
kid51 On the face of it, the logical place would be parrot-users mailing list.
We could make sure that the people who currently hack on Lua-on-Parrot would respond. 00:38
2nd choice: parrot-dev 00:39
I'm sure our lead Lua hacker would welcome the opportunity to interact with a user :-)
dafrito kid51, okay, awesome. I'm just not sure what people expect, y'know? I don't want to post stuff where it's not expected/preferred 00:41
Should I file tickets regarding lua in Parrot's trac?
kid51 Our lead Lua person, fperrad, is rarely on IRC. That's why I recommend the mailing list(s). He may wish to direct you to github or someplace else. 00:42
If you think that there's something amiss re where Parrot installs things, do file a Trac ticket.
dafrito kid51, okay 00:43
kid51 I'd give you a less confusing answer but we don't get that many questions about the languages :-( 00:44
whiteknight I have been meaning to learn Lua
I really need to do that
kid51 You could learn Portuguese at the same time :-)
whiteknight if there is one thing I cannot do, it's learn foreign human languages 00:45
I'll stick with computer languages, thank you
dalek sella/new_load_bytecode: 9fd545e | Whiteknight++ | / (183 files):
merge
sella: 9fd545e | Whiteknight++ | / (183 files):
merge
sella: 307ace4 | Whiteknight++ | / (80 files):
Merge branch 'new_load_bytecode'
dafrito whiteknight, basic lua you could probably learn in 20 minutes. metatables can be a little confusing for people.... and if you're not comfortable with closures, then there's that, too 00:47
kid51 whiteknight: Does that mean that you did not attempt the Parrot 3.6 identify-the-release-quotation contest? 00:49
whiteknight kid51: I was able to recognize it was spanish.
Koven 21:44.48 <@kid51> You could learn Portuguese at the same time :-) <-- not worth it 00:58
even if you spend 10 years dedicated to learning it you can never manage it
00:58 Koven is now known as Kovensky
Felipe Kovensky: brasileiro? :) 01:02
dalek rrot: 7d086f7 | Whiteknight++ | config/gen/makefiles/root.in:
+fix checkdepend.t
01:18
rrot: 0fb44aa | Whiteknight++ | src/packfile/api.c:
Throw an exception if we can't find the bytecode path
sella: ff0e807 | Whiteknight++ | src/core/Globals.winxed:
refactor library loading a little bit
01:21
whiteknight Passed 623 tests in 101 files (4 test runs)
that's what I like to see 01:22
kid51 What were you testing? Rosella?
whiteknight yeah 01:28
dalek kudo/nom: ba234b2 | Coke++ | t/spectest.data:
run fudged tests
01:29
01:29 whiteknight left
dalek kudo/nom: 8590f22 | Coke++ | t/spectest.data:
update failure conditions
01:48
01:51 kid51 left 02:01 woosley joined 02:33 jsut joined 02:37 jsut_ left 04:15 kurahaupo left
dalek kudo/nom: b1faa05 | pmichaud++ | NOMMAP.markdown:
Add a "punch list" to NOMMAP.
04:23
benabik ~~ 04:29
whiteknight: unlikely pong
Yeah, not even online. 04:30
plobsing consistently parses "NOMMAP" wrong. I keep asking myself why pmichaud has something against memory mapping. 04:35
pmichaud hey, I didn't pick the name. :) 04:36
I'll be very glad when we can remove or rename that file. :) 04:37
plobsing clarifying punctuation would be a nice place to start 04:38
benabik NOM_MAP? 04:39
plobsing wfm 04:40
04:47 Coke left, Coke joined 04:54 particle left
cotto ~~ 05:06
05:13 SHODAN joined 05:27 preflex_ joined 05:31 preflex left 05:50 dafrito left 05:57 particle joined 06:20 plobsing left 06:35 fperrad joined 06:39 dafrito joined 06:52 mj41 joined 07:58 dafrito left 08:00 lucian joined 08:24 dafrito joined 09:03 eternaleye_ joined 09:05 eternaleye left
dalek kudo/nom: f998cbb | moritz++ | / (3 files):
start to put back tai-utc and Instant (Duration still missing)
09:18
09:22 Tene_ joined, TimToady_ joined, pjcj_ joined, pjcj left, dukeleto left 09:23 TimToady left, Tene left, dukeleto joined 09:33 AzureStone joined 09:35 AzureSto_ left
dalek kudo/nom: 802a6ae | moritz++ | / (3 files):
start to put Duration back in
09:39
09:41 woosley left
dalek kudo/nom: fa2f005 | moritz++ | / (2 files):
be more careful about :D in Instant and Duration

Also add Instant.{Str,perl}, run tests. .gist is still missing.
10:12
a: 8ea8e82 | dafrito++ | lua/POSTGrammar.tg:
transform return: Removed an optimization that broke some table literals

This optimization would normally remove an unnecessary variable, such as the one in the following generated PIR:
set $P18, $P17[k_Foo] new $P19, "LuaNil"
  .tailcall $P18()
In the above snippet, $P19 is not used, so it can be removed without harm. However, there are instances where this variable is used. Consider the following code:
function Foo()
  \treturn 42
end
return { Foo() }
In this case, the following PIR should be generated:
new $P21, "LuaNil"
  ($P21 :slurpy) = $P20()
  .tailcall tconstruct($P18, $P19, $P21 :flat)
In this case, the register that initially contains a nil value is actually used, so it cannot be optimized away.
10:13
a: ee17af1 | dafrito++ | lua/lib/luaaux.pir:
luaaux.pir: Changed encoding to utf8

This fixes a "Lossy conversion to single byte encoding" error when trying to run a Lua program with Unicode characters.
A simple test is the following snippet:
print "∙";
a: fcf40ee | dafrito++ | luap.pir:
Allow installable_luap to display Unicode characters

installable_luap fails to display Unicode characters. Consider the following snippet:
print "∙";
This yields the following error:
  ./installable_luap Unicode.lua
Invalid character in ASCII string current instr.: 'parrot;PCT;HLLCompiler;evalfiles' pc 1468 (compilers/pct/src/PCT/HLLCompiler.pir:756) called from Sub 'parrot;PCT;HLLCompiler;command_line' pc 1719 (compilers/pct/src/PCT/HLLCompiler.pir:875) called from Sub 'main' pc 27 (luap.pir:27)
This patch fixes the problem for installable_luap, but it remains for installable_lua
a: 3806339 | fperrad++ | lua (3 files):
Merge pull request #3 from dafrito/master

Removed optimization from transform return
dafrito lol, I apparently need to do shorter commit messages ;) 10:19
tadzik (: 10:21
dalek kudo/nom: d43fbb8 | jonathan++ | src/binder/container.c:
Optimize decontainerization by hot-pathing Perl 6 scalars.
10:37
Felipe good morning 10:39
10:58 contingencyplan left 11:15 pjcj_ is now known as pjcj
dalek kudo/nom: fdacbbc | tadzik++ | / (4 files):
Fix .WHY on subroutines.

Also rename $*DECLARATOR to $*DECLARATOR_DOCS in Gramar.pm, and unify documenting stuff a bit.
11:26
atrodo =~ 11:27
Felipe ~~ 11:29
12:01 whiteknight joined 12:02 JimmyZ joined
whiteknight good morning, #parrot 12:05
12:05 particle left
tadzik hello whiteknight 12:05
whiteknight hello tadzik, how are you doing today? 12:09
tadzik pretty fine. Allergy is quite annoying, but it doesn't stop me from sitting with a laptop in a garden :)
whiteknight lucky you. I wish I had a laptop for work, I would work anywhere but from my desk 12:10
well, until the humidity kicks up again, then I'll be inside under the air vent like everybody else 12:13
atrodo But still, not at your desk 12:15
whiteknight my desk is in a pretty comfortable place A/C-wise 12:18
well, as comfortable as it gets in here. Their system is significantly underpowered for the size of the space
atrodo better than my old office. The distribution was so messed up I would freeze all summer while the rest of the area struggled to cool 12:30
Felipe hello whiteknight 12:31
whiteknight hello Felipe
dalek a: 9d61129 | fperrad++ | test_lex.pir:
[test_lex] use encoding 'utf8'
12:35
12:39 plobsing joined 12:52 dafrito left 12:54 dafrito joined 12:57 bluescreen joined 12:58 JimmyZ left 13:01 JimmyZ joined 13:03 lucian_ joined 13:08 contingencyplan joined 13:12 particle joined, SHODAN left 13:15 lucian_ left
dalek a: 1dd0df0 | fperrad++ | lua/lib/luaio.pir:
before Parrot 3.6.0, only PMCs could be stored in lexicals
13:22
kudo/nom: 87334a8 | moritz++ | LHF.markdown:
remove get() and lines() from LHF
13:27
kudo/nom: de6879e | tadzik++ | / (4 files):
Fix a bug with a traited .WHY. Don't document stuff when compiling the setting.

Also, make AttributeContainer.get_attribute_for_usage throw an exception for a non-existant attribute.
13:51
rrot/NotFound/nci_as_string: c78508a | NotFound++ | src/pmc/unmanagedstruct.pmc:
use platfrom encoding if encodingname is omited or null in as_string
whiteknight ls 13:57
moritz no such file or directory 13:59
atrodo ENOTYOURTTY
14:05 PacoLinux_ joined
whiteknight yeah, thanks 14:18
lucian i keep doing that too 14:19
dalek kudo/nom: 499c78c | tadzik++ | / (2 files):
Implement .WHY for methods, add a segfaulting test for .WHY on attributes
14:20
bubaflub ~
tadzik ~ 14:21
whiteknight ~~ 14:22
dalek kudo/nom: 8b7bea9 | tadzik++ | / (2 files):
.WHY is undefined for not documented things
14:30
14:38 JimmyZ left 14:48 lucian left 14:49 JimmyZ joined 15:17 lucian joined 15:19 PacoLinux_ left 15:20 PacoLinux_ joined
benabik whiteknight: delayed pong 15:24
whiteknight did I ping you? 15:27
benabik whiteknight: Last night, IIRC.
If you don't remember, no biggie. :-D 15:28
Just saw it on my back scroll.
whiteknight We do need to have a mentor meeting soon, you and I 15:29
although, we did talk status a lot yesterday, so that might count for most of it
benabik Fair enough. I have a fairly open schedule today/tonight, so if you want to chat any more that's good. 15:30
I got newPOST to generate code and loaded it via load_bytecode!
whiteknight okay, that's awesome
benabik Although the fact that it always writes to /tmp/temp.pbc is… poor.
whiteknight But you're still stuck on not being able to get a working PackfileView directly from memory?
benabik Loading it directly is probably best long term, but I can work as is IF I remember to use different PBC names per test. 15:31
whiteknight you could use a random filename generator, or something 15:32
benabik I may want to investigate the note of "use mkstemp".
Yeah, that was my thought. bacek noted that mkstemp should be added to the OS PMC, but if that's overly difficult I may just use something like "temp-" ~ rand ~ ".pbc" 15:33
Or s/rand/now/ or whatever's quick.
15:36 mj41 left
dalek kudo/nom: 8bb3078 | moritz++ | / (3 files):
Start to implement minmax, &min etc.

run io.t, jnthn++
15:36
whiteknight benabik: right 15:37
where is mkstemp defined?
benabik stdlib.h?
moritz es 15:38
yes
whiteknight oh, I thought you were talking about a parrot-ish implementation of it
benabik I was going to say "But, in Parrot, nowhere."
15:40 daniel-s joined
whiteknight okay 15:40
I sent an email to parrot-dev a few weeks back about temporary files, and didn't get any feedback. I would be happy to expose mkstemp through OS PMC 15:41
There's an honest question, with real ramifications, depending on whether we want to create temporary filehandles, or create temporary file names
or both 15:42
moritz I for one would love a way to generate temp files safely
benabik There appears to be a "tempdir()" sub in osutils
moritz we'll have to provide that functionality for Perl 6 at some point
whiteknight moritz: "safely" is not in the C standard library vocabulary
if we want any kind of safety, we're going to end up rolling our own, not just providing a wrapper around an existing posix routine 15:43
moritz whiteknight: well, it should be the default :-)
benabik mkstemp should provide a safe file handle. mktemp can be racy, in theory. 15:44
whiteknight benabik: right, it should provide a safe handle, but you wouldn't be able to persist it anywhere between program runs
that is, you would have a handle, but not a file name to go with it 15:45
benabik Hm. Point.
We have a marginally-sane parrotish version of mktemp in osutils called "tempdir()" 15:49
s/ish//
whiteknight that's better than nothing 15:53
15:54 PacoLinux_ left
benabik Is unlink still an opcode? 15:55
whiteknight was it ever an opcode?
15:56 PacoLinux_ joined
benabik There's a note in PDD22: "I'm seriously considering moving most of these to methods on the ParrotIO object […] The ones to keep as opcodes are C<unlink>, C<rmdir>, and 15:56
C<opendir>."
Looks bit rotted… osutils.pir provides an unlink() sub that uses OS.rm() 15:58
whiteknight yeah, there isn't a ParrotIO PMC, and hasn't been one for a very long time 15:59
16:03 lucian_ joined 16:10 lucian_ left 16:15 JimmyZ left 16:17 PacoLinux_ left
dalek sella/gh-pages: 6addb83 | Whiteknight++ | libraries/ (5 files):
Update some docs files to show the new load_bytecode syntax. Add a few new pieces to the core docs
16:20
sella: 8c52429 | Whiteknight++ | / (6 files):
Improve the test- and harness-related standard templates to have several fixes and improvements, and also to use the new load_bytecode semantics
16:21
sella/cleanup_core: b8a1e7a | Whiteknight++ | / (10 files):
Cleanup and rearrange some of the code for Core
16:23 lucian left 16:24 lucian joined
dalek rrot/nqp_pct: 73e1e7e | benabik++ | / (3 files):
POST::PBCCompiler - Make pbc take a packfile

Instead of calling packfile itself, make it so that either pbc or mainpmc should be called as a stage after packfile.
16:25
rrot/nqp_pct: 42ef971 | benabik++ | t/compilers/pct/newpost.t:
[newpost.t] Cleanups: better names, comments

Also:
  - remove useless say after return
  - add todo reason (instead of 1)
rrot/nqp_pct: 85442f3 | benabik++ | t/compilers/pct/newpost.t:
[newpost.t] Add more basic tests

Sanity tests like type checking return values.
rrot/nqp_pct: efa1883 | benabik++ | / (3 files):
POST::PBCCompiler - use tempdir to make temp file

Not using the same name over and over again means that we can run it more than once in the same program and load_bytecode's cache won't confuse us. This unbreaks the test and gets us to generating code!
16:26 lucian left
benabik So I now have a test file that generates actual byte code… And runs it! 16:29
cotto_work ~~
16:30 particle1 joined 16:33 particle left
bubaflub benabik: was it the bytcode cache that was breaking it? 16:33
benabik bubaflub: Yes. It was always writing to /tmp/temp.pbc, so trying to load it multiple times did nothing. 16:34
bubaflub benabik: ah, because load_bytecode already had a file with that name in there.
benabik bubaflub: Exactly.
whiteknight Because namespaces and class definitions are global, there's no real way to encapsulate loading multiple versions of the same bytecode 16:37
We really need to consider something like that in the future, it's a big deal
benabik It depends on your definition of "the same bytecode", I suppose. 16:38
whiteknight right, there's no saying that loading from the same filename will return the same or even a similar packfile
benabik But it's simpler and more correct to make PBCCompiler not reuse the same file over and over again.
whiteknight true
after reading through all this code last night, I came to a conclusion: It all needs to fall into a super mario-style spike pit and die 16:39
benabik +1
whiteknight previously, I was ambivalent towards it. Now, not so much
benabik I'm tempted to rebuild PCT from first principles. While what's there works, it's not cleanly designed. Plus, splitting it out from Parrot means I could test it without rebuilding half of Parrot. 16:40
Is there a way to distinguish class methods from object methods? i.e. Compiler.pbc vs (new Compiler).pbc ? 16:42
whiteknight We really don't have any such thing as "class methods" 16:44
those are namespace methods
er, namespace functions
16:45 theory joined
benabik So the method would have to determine if the object passed in was a Namespace/Class/whatever? 16:45
(Or, I suppose, be multi on self) 16:46
NotFound Compiler.pbc() tries calls a method name pbc in the Class PMC
benabik NotFound: Nope!
NotFound: Otherwise PCT::Node.new() wouldn't work.
Or POST::Compiler.to_pir() 16:47
whiteknight that's a method on the P6protoobject
NotFound benabik: in the Class PMC, not in your instance of Class
benabik whiteknight: Any method seems to work there. 16:48
I seem to be able to call any method of Compiler as Compiler.meth() instead of Compiler.new.meth()
If that's P6object magic, neat.
whiteknight yes, P6object magic 16:49
benabik s/neat/"neat"
I know NQP tends to use a `new` method, but is there a standard way to initialize a PMC? 16:52
NotFound ./winxed -e 'var a = 1; var c = typeof(a); var n = c.new(); say(n instanceof "Integer");'
prints: 1 16:53
That is 'new' in the PMCProxy for Integer, I think.
benabik Interesting. I'll have to poke at Parrot's actual object model at some point. At this point, I'm not quite sure what's 'standard' and what NQP is doing for me. 16:54
NotFound benabik: to initialize a PMC you use new with an argument, wich invokes the init_pmc ot init_int vtable. 16:58
benabik An argument? Singular?
whiteknight just one
that's why HLLs should be using constructor-like methods 16:59
init_pmc is very low-level
NotFound Yes. Some PMC take a Hash and peek named arguments from it.
benabik Seems somewhat awkward that there's no standard initializer. Although I guess you could pass a capture to init_pmc. :-/ 17:02
NotFound At some point I thought about using that way in winxed, but it will need more code than a method call. 17:04
17:05 ambs joined
benabik I guess after calling pir::new, object attributes are just 0/PMCNULL? 17:07
whiteknight benabik: depends on type. Some types initialize to default values 17:08
NotFound auto_attrs fills all with zeroes
17:08 daniel-s left
whiteknight the parrot built-in types are intentionally low-level. If you want better semantics, you need to make your own types 17:08
benabik I guess it just feels like there should be a "standard" way to pass arguments to an initializer. Although I guess that's what init_pmc is for. 17:09
NotFound Yes. The main problem is that the implementation of new and instantiate in class is not flexible. 17:10
whiteknight init_pmc is a vtable, not a method or an ordinary constructor. It's not really designed for users to be passing in initialization data. 17:11
Winxed has a standard semantic for constructors
NQP doesn't, but I've always thought that it should
if the .new() P6protoobject method called BUILD(), if it exists, that would be best 17:12
benabik What is Winxed's constructor semantic?
whiteknight new Foo() calls Foo.Foo() 17:13
benabik method Foo on the Foo class object?
Apparently so. 17:14
whiteknight method Foo from the Foo class 17:15
benabik Ah.
whiteknight $P0 = new Foo \\n $P0.Foo()
NotFound But I paid the price of providing several variants of new to accommodate that system while still allowing parrot internal style.
benabik See, I dislike that these methods have an uninitialized object around.
whiteknight it's not really uninitialized at any point, at least not from winxed code 17:16
benabik It's something to get wrong during language interop.
NotFound benabik: I don't like it particularly, but is the only reasonable scheme I found.
whiteknight yes, that's a big issue. That's why Parrot doesn't try to provide consistent constructor semantics, because no two languages are going to do it the same 17:17
NotFound Its main virtue is that it works, and other ideas around are sand castles.
benabik NotFound: Fair enough.
My instinct would be to override init() and init_pmc() VTABLES to make them handle doing initialization. 17:18
NotFound benabik: I tried it. But the new and instantiate vtables worked agains me, and are hard enemies. 17:19
whiteknight besides that fact that this would cause an expensive nested runloop for every object created, you would have to pack all your constructor arguments into a single PMC, and then have to unpack it again
benabik I can see why we have a P6protoobject. 17:20
whiteknight mumbles something about 6model and waves his hands around in front of his face
NotFound benabik: that was one of the problems. The few times I talked about such things tha answer was to use protoobjects/protoclasses. 17:21
Is hard to solve a problem that other people don't see.
benabik sees it. 17:22
NotFound Now is easier to see it, because you just need to look at what winxed does and why it needs to do it that way.
benabik I don't see how to do things like static methods, initializers, or even private methods. 17:24
Nor is it particularly clear how namespaces and classes are related, if at all. 17:25
NotFound If I've waited until these things were debated and a solution designed and implemented, winxed will be probably still in the drawing board ;)
benabik NotFound: I'm not blaming you. I'm trying to figure out how Parrot OO works and what I'd like to do with it.
TimToady_
.oO(ooh, don't give us a straight line like that...)
17:26
benabik I really like the idea of Parrot for playing with language design, but bits of its design really confuse me.
whiteknight benabik: the confusion is because so much of it was nott *designed* 17:27
much of Parrot appears to have just happened
NotFound Sorry, I wasn't intending to be rude.
benabik NotFound: I didn't think you were rude, I just wanted to be clear I was asking/complaining about Parrot, not you. ;-) 17:28
NotFound benabik: I said that because of TimToady_ comment, not yours. 17:29
benabik Although I guess a private method is a .sub '' :subid('something')? Could you access that sub from elsewhere? 17:31
NotFound benabik: I just worked around the bits of the design that confused or obstaculized me.
benabik NotFound: I approve of getting something that works. I also want Parrot to be better.
NotFound benabik: I think subid are only accesible from the current pir compilation. 17:34
Unless you do something like iterating all subs in some namespace looking for them. 17:35
whiteknight NotFound: I have a question for you 17:36
NotFound I may have an answer.. 17:37
whiteknight NotFound: yesterday you said you weren't interested in putting in a lambda-like syntax into winxed. What if I provided a working patch for it?
benabik I'm going to go cool off and clear my head. My final comment on this matter is that I really hope that we don't just import 6model and use it to implement what we have. It seems like our organically grown class/namespace/etc interactions could use some weeding. 17:38
NotFound whiteknight: my objections are more about the rationale than the implementation.
benabik (cool off literally. I have no A/C)
whiteknight benabik: The intention is to use 6model as a lawnmower to destroy what we have 17:39
NotFound benabik: 6model may allow better ways while providing the existing ones at the same time. I hope it will do.
whiteknight NotFound: github.com/Whiteknight/winxed/comm...8b6fc11cb3
17:40 _sri is now known as sri
NotFound Also to destroy it... eventually, and after a smooth transition. 17:40
whiteknight var f = ->{ say("hello"); }; f(); 17:41
17:41 dmalcolm joined
whiteknight var g = ->(string t){ say(t); }; g("test"); 17:42
can't get much more brief than that
benabik Blarg. I don't want to get into a big rant, particularly because I haven't looked up all the details, but it seems that we don't do encapsulation well and that opens up too many opportunities for people to do the wrong thing. I'd like to see us do it better.
Anyway, I was trying to find a swimsuit. 17:43
NotFound Is nice, but I still don't see any advantage other that a few less keystrokes.
whiteknight benabik: you remind me of me, saying all the things that I've already said
NotFound: fewer keystrokes is important, and improves readability, in my eyes
benabik whiteknight: Sometimes I think we think alike. Let's team up and burn the sucker down… Uhm, after building something better of course. <.< >.> 17:44
whiteknight :)
next version will be called "Phoenix", because we'll be building it up from ashes
benabik +1
NotFound whiteknight: iy may improve readability in the eyes of people used to perl, but I care more for people with javascript background. 17:45
whiteknight NotFound: okay, it's your language. It was a very easy patch to make
I also want to find a shorter syntax for looking up functions in namespaces 17:46
NotFound whiteknight: I recommend you again Stroustrup book. One of his recommendations is against adding features just because they are easy to implment ;)
whiteknight using Foo.Bar; Bar(), is complicated and is not very readable
NotFound: I wanted it *and* it happened to be easy 17:47
NotFound whiteknight: using namespace Foo;
whiteknight NotFound: using namespace doesn't work for libs loaded at runtime
NotFound It should work, if you declare them. 17:48
whiteknight a full namespace declaration isn't less verbose
I'm thinking about Rosella, I need an easy way for people to load and initialize rosella libraries
NotFound But you've written a tool to do that automatically, haven't you? 17:49
whiteknight it's still three lines of code to get it working
var rosella = load_packfile("rosella/core.pbc"); using Rosella.initialize_rosella; initialize_rosella();
that's a lot more than I would like to have to use
in NQP, the second and third lines are Rosella::initialize_rosella(); 17:50
so that's much shorter and more clear
NotFound Yes, I've considered that problem, but haven't found yet a way that doesn't need more operators and don't need runtime checks. 17:51
And I'd like to be sure before adding an operatoe.
whiteknight ok
I'll do the work of adding things once you decide what syntax you like 17:52
I like hacking on winxed. It's nice
I was tempted to make a winxed++ which bootstrapped winxed and used a bunch of Rosella magic to make the codebase smaller 17:53
I probably won't do that
NotFound whiteknight: I've considered several time to write an stage 2 using features not available in stage 0, but I'm still not convinced. 17:54
If you want to try an alternate implementation, no problem for me. 17:55
whiteknight I might have to, if I want a bunch of crazy new features
:)
17:55 pjcj left
NotFound But then, maybe will need to create a commitee to define the winxed standard ;) 17:55
we'll 17:57
whiteknight by the way, I'm much more inspired by C# lamba syntax than I am inspired by Perl6
17:57 theory_ joined
whiteknight it ends up looking like the perl6 version because it's much easier to do it that way with a recursive descent parser if I want to reuse lots of code 17:57
17:57 theory left
NotFound I think my knowledge of C# is seriously outdated. 17:57
17:57 theory_ is now known as theory
whiteknight var x = ( ) => { ... }; x() 17:58
but it also allows some weirness, like var x = i => { ... }; x(1);
where we can omit the parenthesis for one argument 17:59
I think that's absurd, and hard to parse
but, it is brief
NotFound That are my concern, promoting ways of writing code hard to understand for beginners.
whiteknight Closures are very easy in parrot, and they could be used a lot. A short easy syntax demonstrates that 18:00
jnthn__ Note that if you move the lambda before any args, you can avoid ambiguity 18:01
lambda { ... }
lambda i { ... }
lambda i, j { ... }
whiteknight jnthn__: that's what my winxed patch did
jnthn__ ah, ok
whiteknight var x = -> (x){ }
it's much more natural to do that with recursive descent
a bottom-up parser would be just fine with the C#-ish way 18:02
NotFound Anyway, I'm not going to make any definitive decision today.
whiteknight it's okay. don't rush. The patch is there. We can keep it if you like it, trash it if you don't 18:03
It was very easy to do, so I did it
NotFound Well, at least is a good demonstration of the hackability of the compiler. 18:04
whiteknight does the using Foo expression return a value?
Can I do (using Foo)(...)? 18:05
or x = using Foo;?
that would solve my problem immediately
NotFound using as operator... interesting idea. 18:06
whiteknight it's not very pretty, of course
NotFound Do you intend to use that for things not in accesible scopes, isn't it? 18:07
whiteknight yes, that's it exactly. For libraries loaded at runtime
NotFound I'll give it a try during this weekend. 18:08
whiteknight I can play with it too. Save you the effort
NotFound We can play both. 18:09
whiteknight I don't think I'm moving again this weekend 18:10
Although the @#$&*$%# realtor won't return our calls, so I don't know
NotFound Do you solved your bureaucratic problems? 18:11
I was under the idea that in the USA you solved such problems by picking guns and dueling at main street ;) 18:12
whiteknight no, I don't have a permit for a gun
and I'm not going to mainstreet if I'm going to be shot at
NotFound whistles a Ennio Morricone tune... 18:13
18:14 davidfetter joined 18:17 autark left
dalek rrot/NotFound/nci_as_string: 1a38fbe | NotFound++ | src/pmc/ptr.pmc:
implement as_string method also in the Ptr PMC
18:17
nopaste "NotFound" at 192.168.1.3 pasted "Cleanup of winxed MySql example made possible by the nci_as_string branch" (196 lines) at nopaste.snit.ch/67411 18:22
whiteknight very nice 18:24
I love when small changes in parrot can lead to big cleanups in user code 18:29
18:32 PacoLinux_ joined
NotFound Specially when even that mess failed to cover all cases. 18:34
whiteknight ouch
dukeleto check it out! github.com/languages/Parrot
18:35 plobsing_ joined
whiteknight awesomeness! 18:36
I wonder how they determine what is a parrot file
NotFound Parrot is the #61 most popular language on GitHub -> we have some maegin to improve ;) 18:37
margin
whiteknight Rosella is somehow listed as "Perl"
18:37 plobsing left
whiteknight so I think that's wrong 18:37
dukeleto whiteknight: github.com/github/linguist/pull/58 18:40
whiteknight: they just merged that, I don't know if they are running that on the live site yet. Probably not.
whiteknight: i think nqp may be detected as "Perl"
nopaste "NotFound" at 192.168.1.3 pasted "Tests towards libxml2 bindings" (112 lines) at nopaste.snit.ch/67413
NotFound This simple example can parse xhtml 18:41
18:56 Eclesia joined
dukeleto NotFound++ 18:57
dukeleto has become quite impressed with Winxed lately
benabik … Is there a way to make a :main sub in PAST? 19:03
whiteknight I'm sure there has to be 19:04
benabik whiteknight: That's what I thought too.
Eclesia hi
whiteknight hello Eclesia
19:05 mj41 joined
Eclesia has one hour to find out how to use the Archive.Zip 19:05
whiteknight only one hour!
benabik Okay, now I'm confused about how PAST works. 19:06
19:06 PacoLinux_ left
Eclesia whiteknight: for this evening. I have the feeling to move forward in my project as the speed of a snail 19:08
at*
19:08 pjcj joined
jnthn__ benabik: .pirflags(':main') 19:09
whiteknight Eclesia: github.com/parrot/parrot/blob/mast....pir#L3300
Eclesia whiteknight: already found this one ... but it's still obscure :/ 19:10
benabik NQP does top-level code at :load time by adding a PAST::Block inside the top level block that's marked :load?
whiteknight archive = new ["Archive";"Zip"], archive.addFile("foo.whatever"); archive.writeToFileNamed("output.zip") 19:11
Eclesia archive.addFile("foo.whatever"); <----- that does tell me what he expect, a string. a pmc . a rosella file ? 19:12
whiteknight It's the name of a file to add to the archive 19:13
doesn't look like Archive::Zip includes tools for reading a .zip, only for creating one 19:15
Eclesia whiteknight: I've seen a method uncompress somewhere ... 19:16
or maybe it was on the gziphandler or tarsomething ... don't remember
19:17 mj41 left
Eclesia var handle = new 'GzipHandle '; handle.open("/media/SATA2_7200/dev.../test.em", "rb"); 19:18
something like that
whiteknight yeah GZipHandle does have a .uncompress method 19:21
Eclesia hm winxed dont like the : var archive = new ["Archive";"Zip"](); 19:23
the syntax changed ? 19:24
whiteknight var archive = new Archive.Zip;
Eclesia ... seaching complicate when it can be simple
hm : Method 'Zip' not found for invocant of class 'Archive;Zip' 19:25
whiteknight don't use parenthesis 19:27
just new Archive.Zip;
NotFound Eclesia: winxed uses , not ;
dalek kudo/nom: 0e7bdd3 | tadzik++ | src/Perl6/ (2 files):
Move document() to Pod.pm
NotFound Eclesia: and drop the ()
Eclesia why drop the () ??? 19:28
19:28 AndroUser2 joined
Eclesia its an instanciation, must have some parameters ... normaly 19:28
benabik Is there a way to get a method in the superclass of an NQP class? 19:29
NotFound Eclesia: using the same operator for winxed classes and the several ways of initializing PMCs conflicts with the desire for clean snd simple syntax.
Eclesia: In short: the absence of parenthesis mean: no constructor call and no init arguments. 19:30
Eclesia *sigh* 19:31
NotFound Take into account that winxed looks high level but in some aspects is almost low level as pir. 19:33
19:34 rohit_nsit08 joined
nopaste "Eclesia" at 192.168.1.3 pasted "hard way to zip" (9 lines) at nopaste.snit.ch/67415 19:34
19:34 AndroUser2 left
rohit_nsit08 dukeleto: ping 19:35
whiteknight hello rohit_nsit08
dukeleto rohit_nsit08: howdy
rohit_nsit08: how is corellaScript ?
rohit_nsit08: how do I check it out and run it's test suite?
rohit_nsit08 dukeleto: for running the test-suite one need to have nodeunit installed on system, I can write a blog post for setting it up 19:36
NotFound readZip and writeToFile? Doesn't look right
rohit_nsit08 dukeleto: as I mentioned in the mail, couldn't do work this week due to some interviews . 19:37
Eclesia var archive = new ["Archive","Zip"]; archive.addFile("README.txt"); archive.writeToFileNamed("output.zip");
can't make any more basic 19:38
rohit_nsit08 dukeleto: will surely update my all progress by tomorrow positively
dukeleto rohit_nsit08: where is your corellaScript repo? The README should contain info on how to install dependencies, compiling and running tests
rohit_nsit08 whiteknight: hi
dukeleto rohit_nsit08: promises are not nearly as useful as incremental improvements :)
NotFound Looks like there is no test in t/library/archive_zip.t covering such usage. 19:40
rohit_nsit08 dukeleto: ya, I do agree with that, and you will be seeing the progress by now, as I am done with all the interfering work :-) 19:41
dukeleto rohit_nsit08: it should only take a few minutes to update your README, right? Also, it would be nice to have IRC notifications for your github repo 19:42
benabik This is 'fun': pir::find_method__pps(Parent, $method)(|@args, |%opts)
whiteknight benabik: doesn't look so bad to me 19:43
dukeleto Eclesia: if you could add a test or docs for Archive::Zip, that would be awesome
NotFound Eclesia: also fails for me.
benabik whiteknight: I was hoping there was an easier way to call the original method in the superclass. 19:44
rohit_nsit08 dukeleto: ya, updating the readme right now.
benabik whiteknight: I put that into a super() sub and call it as super('method', args)
Eclesia I dont even know how write a test ... pir is still 'magic' for me
whiteknight benabik: Austin Hastings did something very similar in Kakapo a while back 19:45
benabik: you should be able to walk up the context scopes to get the name of the sub being executed, instead of passing it as the first argument 19:49
that's an aesthetic touch though
benabik whiteknight: I don't even know where to begin with that. 19:51
19:51 lucian_ joined
whiteknight benabik: github.com/Whiteknight/kakapo/blob...ax.nqp#L31 19:53
NotFound Eclesia: the code in the SYNOPSIS section of Zip.pir doesn't work, so I think you should file a ticket before thinking about a test. 19:54
whiteknight with helpers here: github.com/Whiteknight/kakapo/blob...Parrot.nqp
NotFound: why doesn't that code work? 20:02
NotFound The backtrace that Eclesia pasted 20:04
Eclesia because no one uses it I beleive
whiteknight I don't see a backtrace
oh wait, I do 20:05
awesome
Eclesia hm where do I add a ticket ... trac.parrot.org/parrot/report ? can't find anything like 'submit a bug report' 20:06
whiteknight Eclesia: you have to log in. Do you have an account?
Eclesia I'm logged in
whiteknight what is your username?
Eclesia a very complicate one : Eclesia :D 20:07
whiteknight Try again
We've been having spam problems, so you need permissions to post a ticket
Eclesia ha here it is
lucky for me I didn't give my mail adress ^^ 20:08
here you are : trac.parrot.org/parrot/report/32 20:10
hm ... I wonder if I add it at the correct place 20:11
Eclesia always report bugs on projects using Jira not trac 20:12
whiteknight I use Jira at work. I don't like it either
Eclesia: definitely not in the correct place 20:13
benabik whiteknight: I converted it to a single block of Q:PIR.
Eclesia damn. 'create new report' looked like it was the right place
whiteknight Eclesia: I'll move it
trac.parrot.org/parrot/ticket/2171 20:14
dalek TT #2171 created by whiteknight++: Archive.Zip Errors
TT #2171: trac.parrot.org/parrot/ticket/2171
benabik $P1 = ['POST';'File'] # Doesn't work? 20:22
Eclesia ...one hour, a not a single working line of code :'(
benabik How do I get a Key in PIR?
Eclesia trac.parrot.org/parrot/ticket/2172 20:23
whiteknight benabik: Keys are really intended to be compile-time constants. There isn't a very easy way to make them at runtime 20:25
NotFound set $P0, [ ... ] 20:26
whiteknight benabik: if you want a Key, you can create a Key, set values to it, then push new keys onto it to create a new multi-level key
or, like NotFound says, use a compile-time constant
whiteknight is going home.
benabik I just need a constant one. But using it in a sub call didn't work, so I tried to assign it to a $P register and then got confused.
o/ whiteknight
20:26 whiteknight left
NotFound benabik: the syntactic sugar of '=' has some limitations. 20:27
bubaflub Eclesia: i'm getting a slightly different error on the TT #2171 - i'll post my results there 20:28
dalek TT #2172 created by Eclesia++: Archive.Zip : missing convinient method to unpack archive 20:30
TT #2172: trac.parrot.org/parrot/ticket/2172
bubaflub Eclesia: i get a very unhelpful error when README.txt doesn't exist. 20:33
Eclesia bubaflub: I am not the one who you must report the errors you found :D 20:34
bubaflub Eclesia: i know - just letting you know I'm looking into it too.
Eclesia the zip capabilities is a keypoint in the language I'm building, so I'm a bit stuck if I can't have this working :/ 20:35
bubaflub Eclesia: it looks like the library was originally done by fperrad - maybe send an email parrot-dev to let people know this is a problem. 20:40
21:03 bluescreen left 21:04 mj41 joined 21:10 Eclesia left 21:11 plobsing_ left
dalek kudo/nom: 45eeaac | jonathan++ | src/Perl6/Actions.pm:
Ensure we generate a proto if the thing in the outer scope is an only.
21:13
benabik ARG! Subclassing won't work. Accessing super multis appears to be… difficult. 21:20
21:20 rohit_nsit08 left, ambs left
jnthn__ benabik: Working in nqp-rs? 21:22
er, -rx?
benabik Yes
jnthn__ Ah, it just uses Parrot's own multi-method dispatch semantics. Which are...kinda ew.
It doesn't continue looking in the next class up, nor does it combine the multis through the hierarchy. 21:23
benabik That's a big big problem. *sigh*
jnthn__ Right, which is why new nqp didn't use Parrot's multi semantics, and why Rakudo hasn't for a couple of years. 21:24
Best you can do is have a fallback, very liberal multi that re-dispatches up the tree, I guess. :/
sorear Why does Parrot even have multi-method dispatch semantics? 21:25
benabik Oh, wait...
No wonder it failed… I didn't call super() correctly.
21:28 mj41 left 21:35 lucian_ left
NotFound man super... superman! 21:36
21:44 Psyche^ joined 21:48 kurahaupo joined 21:49 Patterner left, Psyche^ is now known as Patterner 21:50 perlite_ joined 21:54 perlite left, perlite_ is now known as perlite 22:02 PacoLinux_ joined 22:07 autark joined, PacoLinux_ left
dalek kudo/nom: 3823e80 | pmichaud++ | src/core/Range.pm:
Fix 'a'..'z' (and other Str-based Ranges) by delegating to
22:07
22:07 PacoLinux_ joined 22:16 dmalcolm left
benabik I compiled a PAST tree direct to bytecode. That's.. amazing. 22:22
And a little hacky.
dalek rrot/nqp_pct: b89d1b4 | benabik++ | t/compilers/pct/newpost.t:
[newpost.t] Allow named args to compiler

Useful for debugging
22:27
rrot/nqp_pct: b56e6cd | benabik++ | t/compilers/pct/newpost.t:
[newpost.t] Test returning all non-PMC values

We can now return integers, floats, and strings. Even all three at once!
rrot/nqp_pct: 805280c | benabik++ | compilers/pct/src/PCT/HLLCompiler.pir:
PCT::HLLCompiler - use PBCCompiler.pbc

mainpmc doesn't work very well yet...
rrot/nqp_pct: 4005ef3 | benabik++ | / (5 files):
Enable compiling very simple PAST trees to PBC
benabik msg whiteknight Check out the tip of nqp_pct! It's compiling a PAST tree direct to bytecode! It might work for more than just "return a number", but I have to stop hacking to make dinner.
aloha OK. I'll deliver the message.
cotto_work benabik++ 22:29
benabik cotto_work: I feel it's a bit hacky, but it seems to work. 22:31
NotFound benabik++ 22:32
benabik Streamlining it would involve some significant refactors to PCT… newPOST and oldPOST don't quite agree on how type information should propagate, where subs should live in the tree, etc. I'm gluing them together as best I can. 22:34
NotFound That will be an added benefit. 22:35
jnthn__ I suspect oldPOST is fairly geared towards generating text at the end of the day. 22:37
cotto_work jnthn__: very
benabik jnthn__: Yes.
jnthn__ So it could leave more to the PIR compiler. 22:38
Which is fine for what it was designed for, but a bad fit for what you're doing now. :)
cotto_work That's the big problem with it.
jnthn__ Well, I guessed that's why we're getting a newPOST. :)
Anyway, just chiming in to say that "I'd expect them to look quite different" :) 22:39
cotto_work benabik: what's the magic invocation to use PAST->PBC generation, or is there even a way to do it from the cli?
benabik cotto_work: You need to use <parse past newpost pbc> stages instead of <parse past post pbc>. I didn't want a command line option to switch it before more of it worked. 22:41
cotto_work benabik: wfm
benabik But assuming your PAST tree doesn't use anything that blows up newPOST, just replacing those two stages should compile anything to bytecode.
But I have no idea yet how big that assumption is. 22:42
cotto_work So if it works, it'll work. Got it. ;)
benabik Most obvious gotcha is that inline PIR just won't work. But I should try to modify squaak and see what I can get to work and what breaks. 22:45
22:51 rdesfo joined 22:57 kid51 joined 22:58 rdesfo left 23:18 whiteknight joined 23:20 kurahaupo left
whiteknight good evening, #parrot 23:22
msg benabik dinner is overrated! Keep making good code! 23:23
aloha OK. I'll deliver the message.
whiteknight benabik++
cotto_work hi whiteknight
whiteknight hey cotto_work
whiteknight is building pct_nqp now 23:26
whiteknight is looking forward to awesome fantasticness
cotto_work: I haven't seen soh_cah_toa for a few days.
cotto_work whiteknight: me neither
seen soh_cah_toa 23:27
aloha soh_cah_toa was last seen in #parrot 2 days 23 hours ago saying "whatever though, i gotta go eat".
whiteknight yeah, about that long
dalek kudo/nom: c8eb6c4 | jonathan++ | src/binder/multidispatch.c:
Sort multi-dispatch fixes, to deal with a bug noted by pmichaud++.
23:29
23:29 PacoLinux_ left, PacoLinux_ joined 23:31 PacoLinux__ joined, PacoLinux_ left
dalek rrot/nqp_pct: ebdd931 | Whiteknight++ | t/compilers/pct/newpost.t:
tabs -> spaces in newpost.t
23:33
23:33 davidfetter left
cotto_work whiteknight: sent him a text. 23:41
whiteknight +1 23:45
benabik Crud. I have to figure out what in my .vimrc is overriding the expandtabs in the modeling. Grump. 23:47
whiteknight benabik: no worries, I get free karma for fixing it 23:50
benabik Fixed. I guess the modeling gets run before my autocmds. Pity.
modeline! Stupid Lion. 23:51