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 5 August 2011.
whiteknight soh_cah_toa: no. The Sub PMC will contain some basics, like the arity and the flags for arguments, but not the values themselves 00:04
the values are stored in the CallContext, which you can play with if you get a reference to it
00:05 cognominal joined
Coke dafrito++ dafrito++ # docs work 00:07
dalek kudo/nom: 2542366 | jonathan++ | tools/build/NQP_REVISION:
Another NQP revision bump, to get a fix for a segfault reported by tadzik++.
00:09
kudo/nom: 30b59b1 | Coke++ | tools/build/Makefile.in:
Fix dynext build targets
00:11
00:14 kurahaupo joined
whiteknight dafrito++ indeed 00:14
cotto ~~ 00:18
00:55 daniel-s joined
dalek rrot/whiteknight/frontend_parrot2: 6c59d7b | Whiteknight++ | frontend/parrot2/ (2 files):
Flesh out more logic in prt0.pir, and move the help and version messages there because it's much easier to do with heredocs
00:58
rrot/whiteknight/frontend_parrot2: 5a2e3dd | Whiteknight++ | frontend/parrot2/main.c:
Rip stuff out of parrot2/main.c that doesn't need to be there anymore. Start rearranging some of the logic. It's much cleaner now.
cotto seen nbrown? 01:08
aloha nbrown was last seen in #perl6 1 days 1 hours ago joining the channel.
cotto nbrown++ 01:09
dalek kudo/nom: d0475ef | jonathan++ | src/Perl6/Module/ (3 files):
Remove no longer used module-related code to avoid confusion.
01:10
kudo/nom: 851a48b | jonathan++ | src/Perl6/ModuleLoader.pm:
First cut of being able to use a module without pre-compilation. Still uses PIR or PBC if it finds it along the way; need to put back timestamp checks. Also factored in preparation for auth and version handling going back in later.
01:22 woosley joined
dalek rrot/m0-prototype: ae9cdc9 | nbrown++ | / (4 files):
make sure m0 perl code and tests are treating bytecode files as binary files on Windows
02:11
rrot/m0-prototype: dd6e84a | nbrown++ | src/m0/c/m0_mob.c:
Make m0 c code treat m0b files as binary on Windows
rrot/m0-prototype: 24bd618 | cotto++ | / (5 files):
Merge pull request #149 from nbrown/m0-prototype-binary-files

make M0 tests pass on platforms where binmode is necessary
03:27 jsut_ joined 04:23 bubaflub joined
dalek rrot/nqp_pct: 1f8cc82 | benabik++ | compilers/pct/src/PAST/Compiler.p (2 files):
Avoid deep-cloning symtable in PAST::Compiler.

From:\t1f0d63c3ee8925f3c80a76cdd99569799c051286 Author:\tJonathan Worthington <jnthn@jnthn.net>
05:50
rrot/nqp_pct: ce40b04 | benabik++ | compilers/pct/src/P (25 files):
Re-bootstrap PCT

Preparing for a merge with master and want to be sure all changes made it into the bootstrap.
rrot/nqp_pct: fa4951a | benabik++ | / (24 files):
Merge branch 'master' into nqp_pct

Conflicts:
  \tcompilers/pct/src/PAST/Compiler.pir
05:53
benabik tadzik++ # pointing out that I needed to merge
06:16 fperrad joined 07:03 Kulag joined 07:08 Kulag joined 07:24 Kulag joined 07:50 woosley joined
dalek rrot: 66f52e4 | fperrad++ | runtime/parrot/library/distutils.pir:
[distutils] don't gzip on MSWin32
08:21
08:31 SHODAN joined 09:45 whiteknight joined 09:57 lucian joined
whiteknight good morning, #parrot 10:03
cotto aloha, clock? 10:04
aloha cotto: LAX: Sun, 03:04 PDT / CHI: Sun, 05:04 CDT / NYC: Sun, 06:04 EDT / UTC: Sun, 10:04 UTC / LON: Sun, 11:04 BST / BER: Sun, 12:04 CEST / TOK: Sun, 19:04 JST / SYD: Sun, 20:04 EST
cotto ENOTMORNING
10:11 contingencyplan joined
dafrito cotto, some sketchy thoughts about m0, mole. It's poorly edited atm and woefully incomplete, but: gist.github.com/1130268 10:17
10:18 mj41 joined
dafrito I got some thoughts on how to do call frames and pointers, but they're not in there yet 10:18
cotto dafrito, great 10:19
dafrito++
that's more than I expected
dafrito I mostly switch between the m0 spec and some random snippet of code and try to think about how it'd look in mole 10:23
though the doc kind-of mixes m0 ideas and mole ideas together, like the discussion on opcodes 10:24
cotto dafrito, are you thinking of a C-family syntax?
dafrito cotto, not really. I guess I imagine mole being closer conceptually to pir than C 10:28
which I understand may seem a little backwards ;)
cotto dafrito, that's the opposite of what I've been thinking, but I'm not married to anything. I do want to be sure that Mole is very approachable for people used to hacking in C. 10:29
dafrito, the closer it is to C, the easier it'll be to translate existing C code. 10:31
dafrito cotto, true. I'll have to think about it more 10:33
10:35 jlaire joined
cotto dafrito, I don't want to have to think about registers very much when writing Mole, similar to how I don't have to think about registers when writing C. 10:39
dafrito cotto, what would be some good candidate files in parrot for porting to mole? I'd like to look at those for syntax inspiration 10:43
it's okay if you don't really have any off-hand
cotto dafrito, anything written in C apart from the GC, really 10:46
cotto sleeps 10:49
dafrito cotto, gnight!
cotto dafrito, PMCs wouldn't be bad
cotto really sleeps
11:18 woosley left
dalek kudo/nom: c1fdc43 | jonathan++ | src/Perl6/M (2 files):
Fix usage of @*INC for locating modules.
11:24
kudo/nom: 065f220 | tadzik++ | src/Perl6/ModuleLoader.pm:
[ModuleLoader] Load pirs or pbcs only if they aren't older than the pm file
11:25
kudo/nom: a31ca33 | jonathan++ | NOMMAP.markdown:
Remove a completed item from nommap.
11:30
11:53 JimmyZ joined 12:07 JimmyZ joined
dalek rrot/whiteknight/frontend_parrot2: c731039 | Whiteknight++ | frontend/parrot2/prt0.pir:
fix prt0 so it compiles and runs
12:09
rrot/whiteknight/frontend_parrot2: 655ca07 | Whiteknight++ | / (8 files):
Change the makefile to build parrot from frontend/parrot2. Miniparrot is still built from frontend/parrot/ and prt0.pir needs to be built manually
rrot/whiteknight/frontend_parrot2: 7b940f9 | Whiteknight++ | config/gen/makefiles/root.in:
miniparrot can built prt0.pbc. Add that to the makefile
rrot/whiteknight/frontend_parrot2: b4d7917 | Whiteknight++ | tools/dev/pbc_to_exe.pir:
fix pbc_to_exe.pir, the build now completes, but many tests fail
rrot/whiteknight/frontend_parrot2: eae2c1b | Whiteknight++ | frontend/parrot2/prt0.pir:
Several fixes. We run and pass most tests, we fail some tests involving backtraces and a few other weird failures
12:28 rdesfo joined 12:44 woosley joined 12:45 PacoLinux_ joined 12:50 ambs joined 13:04 kid51 joined
dalek rrot/NotFound/nci_as_string_ready: 0d2eb63 | jkeenan++ | src/nci_test.c:
[codingstd] Correct POD formatting error.
13:13
13:15 gerd joined
gerd hi 13:15
some comments on the m0 instruction set: paste.pocoo.org/show/6JTrvUMhN8p1Z7p44uzZ/
kid51 gerd++ These comments reflect careful study of M0 13:17
gerd: As a veteran release manager, I want to ask you some questions about the release process. 13:21
Specifically, were you able to get ./parrot tools/release/crow.pir to work?
gerd kid51: I think you're mistaking me for some other gerd - this is the first time I used this nick on this server... 13:23
kid51 I guess you're right! 13:24
Gerd Pokorra has served as monthly Release Manager more than anyone else.
not_gerd that's definitely not me - my gerd is short for Gerhard 13:26
dalek rrot: 2ff2d27 | jkeenan++ | src/pmc/packfileview.pmc:
[codingstd] Insert placeholders for documentation of 'find_called_tag' and 'add_called_tag'.
13:28
kid51 msg whiteknight Can you add function-level documentation for find_called_tag and add_called_tag in src/pmc/packfileview.pmc? Thanks.
aloha OK. I'll deliver the message. 13:29
dalek kudo/nom: d438bdd | jonathan++ | src/Perl6/ModuleLoader.pm:
Tweak setting loading to avoid running into issues post-installation where we sometimes loaded two different versions of the setting.
whiteknight kid51: I did, but I did it in the wrong branch 13:31
I'll move it to master soon
kid51 thx
I made the codingstd test pass and inserted 'TK' where the real doc needs to go
whiteknight okay, thanks 13:36
kid51 whiteknight: Does a39491c178b address concerns you raised in trac.parrot.org/parrot/ticket/2171 re Archive::Zip? 13:38
dalek rrot/whiteknight/frontend_parrot2: d0b907d | Whiteknight++ | / (2 files):
fix exit code handling. On EXCEPT_EXIT we jump directly out using the exception exit code. Otherwise, we force a non-zero exit, taking hints from the exception if possible. Also, fix the -V option to pull values out of the config hash
13:40
whiteknight kid51: I'm signing off now, I'll look at it later. can you msg it to me so I don't forget?
kid51 msg whiteknight Review status of TT #2171 at HEAED 13:42
aloha OK. I'll deliver the message.
13:49 nbrown joined
dalek kudo/nom: 1349b46 | jonathan++ | / (6 files):
Move Test.pm and Pod/To/Text.pm into lib directory.
14:06
kudo/nom: 0ad2d79 | jonathan++ | src/core/terms.pm:
Add lib to default @*INC, ahead of installed paths. Avoids hitting stuff in the CWD ahead of installed things, but still gives a way for module developers to try development versions, and also for us to find the non-installed pre-compiled Test.pm.
14:11 bubaflub joined
NotFound Uh... you've fixed in an already merged branch. 14:16
dalek rrot: 557292f | jkeenan++ | src/nci_test.c:
[codingstd] Correct POD formatting error.
14:23
NotFound cherry-picked to master
14:29 rdesfo joined
kid51 Can you then delete the branch? 14:30
NotFound Yes, looks like it's time. 14:31
kid51 I generally delete a branch immediately upon merge into master. That forestalls anyone trying to "fix" the branch again.
NotFound Done 14:32
kid51 thx
dalek TT #2170 closed by NotFound++: as_string method to get strings from NCI results 14:43
TT #2170: trac.parrot.org/parrot/ticket/2170
dukeleto ~~ 14:49
15:01 mj41 joined
dalek website: NotFound++ | strings, encodings, and NCI 15:09
website: www.parrot.org/content/strings-encodings-and-nci
15:50 dodathome joined 15:53 JimmyZ joined 16:10 not_gerd joined 16:34 nbrown joined 16:35 rdesfo joined
pmichaud From Parrot 1.4.0 to Parrot 2.6.0, hash keys would tend to come out unordered by default. Starting with Parrot 2.9.1, they seem to be ordered by default again. Why is this? 16:53
gist.github.com/1130529
"ordered" means "in the order in which the hash entries are created" here. 16:59
17:01 particle1 joined
dalek kudo/nom: d0f04e9 | jonathan++ | src/Perl6/ModuleLoader.pm:
Corrections and enhancements to GLOBAL handling on module usage.
17:02
kudo/nom: 5cb58be | jonathan++ | src/ (3 files):
Implement various basic cases of the handles trait. Gets us the first 33 tests of delegation.t.
cotto ~~ 17:05
pmichaud posts a message to parrot-dev about key ordering. 17:07
cotto pmichaud, is it necessary to provide a guarantee about hash key ordering? 17:08
pmichaud No.
But it's odd that they're ordered.
In fact, 1.4.0 was a major pain point for Rakudo because of the hash key ordering issue. 17:09
So I'm very surprised that Parrot has gone back to ordered keys.
lucian pmichaud: parrot's hashes are ordered? 17:10
pmichaud lucian: see gist.github.com/1130529
lucian pmichaud: that's very odd 17:12
pmichaud lucian: yes, thus my question as to why it's happening. :)
not_gerd cotto: you're the go-to guy for m0? 17:48
cotto not_gerd, yup
not_gerd this is what I posted earlier today: paste.pocoo.org/show/6JTrvUMhN8p1Z7p44uzZ/ 17:49
and this is how I would do memory access: paste.pocoo.org/show/UYJDiaeqCph6aducMi95/
cotto not_gerd, thanks. I'm heading out the door, but I'll look forward to reading those when I get back. 17:50
not_gerd ok, I'll check the logs if I'm no longer around when you get to it 17:51
dalek rrot/tt2007/html_links: df18c04 | jkeenan++ | docs/glossary.pod:
Fix links to point to docs.parrot.org.
18:06
rrot/tt2007/html_links: 14cd84a | jkeenan++ | docs/glossary.pod:
Clean up two links (somewhat).
rrot/tt2007/html_links: c22867e | jkeenan++ | docs/pct/gettingstarted.pod:
Correct link.
kudo/nom: 795f6a6 | pmichaud++ | src/core/metaops.pm:
Add hyper metaops for hash arguments.
18:13
not_gerd cotto: simplified ops for memory access: paste.pocoo.org/show/ox7Tu38sHwlekeOTi2RE/ 18:19
dalek rrot: b9e1949 | Felipe++ | NEWS:
- Added a NEWS entry for mem_sys_strndup
18:23
18:36 rdesfo joined
pmichaud if I write 18:37
.const 'Sub' $P999 = 'abc'
is that actually allocating a register slot?
More to the point, does $P999 participate in the register allocation algorithems?
*algorithms?
dalek kudo/nom: 7d55a9f | pmichaud++ | src/core/Parcel.pm:
?() should return False (jnthn++).
18:39
jnthn__ pmichaud: given its semantics, almost certainly yes
pmichaud: You can do: 18:40
.const 'Sub' $P999 = 'abc'
$P999()
.const 'Sub' $P999 = 'def'
$P999()
pmichaud yeah, I've noticed. :)
benabik I'd want to say yes. But that would imply I have some idea what's going on inside IMCC.
(Hint: I don't.)
pmichaud gist.github.com/1130630
(interestingly, the example that jnthn++ created is *exactly* the example I used to test before mentioning this on-chan :) 18:41
jnthn__ o.O
Spooky
pmichaud well, I printed the sub instead of invoking it. :)
perhaps your example was colored by mine above, though.
so, "given its semantics" really means "given the way it works now"
jnthn__ Yes :)
pmichaud I'm not sure what the defined semantics for .const are supposed to be. 18:42
benabik .const isn't?
pmichaud: I'm not sure PIR has defined semantics so much as "the way it works right now"
pmichaud oh, I'm certain it has defined semantics. Sometimes they even match "the way it works right now" :-) 18:43
pdd19
benabik doesn't trust PDDs
I suppose I should just add "revise PDD22" to my TODO list. 18:44
Or to trac...
pmichaud :q!
ww
pdd22? IO?
benabik Yes. I was trying to find unlink. PDD22 implies it's an opcode, but someone is "seriously considering moving [it] to methods on the ParrotIO object." 18:45
NotFound pmichaud: last time I tested, it does.
Lag...
pmichaud would it be bad if we switched a few things so that .const registers get re-used? 18:46
(in PCT/nqp/rakudo)
rephrase
NotFound I'd like better to be not used at all.
benabik Other than the fact that I only have a week left in GSoC to put serious work into PCT and I don't want it changing more? ;-) 18:47
(tongue firmly in cheek, there)
pmichaud NotFound: you mean don't use .const at all? How would that work?
NotFound Pass the const to the usages, instead of copying it to a register.
pmichaud I don't understand. Can you give an example? 18:48
NotFound Just like keys already do: use the pmc from the constant segment directly, not assigning its value to a rgeister and using the register. 18:49
benabik NotFound: Does PIR support this right now, or are you suggesting additional syntax?
pmichaud NotFound: currently I have:
.const 'Sub' $P999 = 'abc'
$P999()
sorear pmichaud: I suspect what's happening is that '$P999' is being rebound by imcc 18:50
NotFound Probably imcc, and even the ops, will need some addition.
sorear pmichaud: try putting your example in a loop
pmichaud what would this be in your version?
sorear: I suspect that's what is happening also.
NotFound Same as already, but the more natural usage will be with a name, instead of a register. 18:51
pmichaud you mean an imcc symbol that isn't mapped to a register?
.const 'Sub' abcsub = 'abc'
abcsub()
NotFound Yes, map it to the constant.
pmichaud like that?
what about something like: 18:52
.const 'Sub' abcsub = 'abc'
$P0 = newclosure abcsub
the <newclosure> opcode expects a PMC register. 18:53
I guess we'd need a _pc form of that opcode.
NotFound That will be the problem, some opcodes may lack the constant variant.
pmichaud okay, so none of this is going to be fixed prior to december.
NotFound I don't think so. 18:54
pmichaud so, given that as the case...
would it be bad if we switched a few things in pct/nqp/rakudo so that .const registers can be re-used ? 18:55
NotFound I don't see any problem.
benabik Only me having to spend time on porting it to my branch. And I really don't mind that too much. 18:56
19:13 soh_cah_toa joined 19:18 whiteknight joined
Felipe hello whiteknight 19:21
whiteknight hello Felipe 19:25
19:33 not_gerd joined
dalek kudo/nom: b999db7 | kboga++ | t/spectest.data:
enable passing testfiles: S11-modules/lexical.t, integration/advent2009-day12.t and track some failure messages
19:36
kudo/nom: 4b0bc18 | kboga++ | t/spectest.data:
enable passing test: S02-builtin_data_types/instants-and-durations.t
kudo/nom: 4b66f8a | Coke++ | t/spectest.data:
track failure modes & run fudged test.
soh_cah_toa cotto: ping 19:37
whiteknight msg kid51 I created TT #2171 for Eclesia, who was having a trouble creating a ticket. I don't know what the current status is. Eclesia or fperrad might know better 19:44
aloha OK. I'll deliver the message.
cotto soh_cah_toa, pong 20:01
20:02 contingencyplan joined
soh_cah_toa cotto: i have two suggestions regarding m0/mole 20:02
then i wanna talk about hbdb :)
cotto soh_cah_toa, fire at will
soh_cah_toa cotto: once the vm internals are actually starting to be written, i think it would be a great idea to use a document generator like doxygen. perldoc just doesn't cut it for reference documentation 20:03
cotto: i mean, look how gorgeous llvm's developer reference is w/ doxygen: llvm.org/doxygen/classllvm_1_1ARMMCExpr.html
cotto: the only reason i bring it up now is that i'm seeing first hand this summer just how frightening parrot's c internals are. sure, m0/mole design is still in its early stages but do you think something like that is a good idea? i hardly see any disadvantages
and plus, i want parrot to be better than llvm ;) 20:06
tadzik wait for Pod 6 :)
cotto soh_cah_toa, that'll require some thought. I'm not eager to try to change an established convention and to add extra (and less familiar) dependencies to the build for M0, and to have a separate documentation system for M0. 20:07
NotFound I disagree. I think doxygen in most cases is used to avoid to write documentation. 20:08
whiteknight I've been struck on more than one occasion by the inadequacies of POD to really document C-level code
soh_cah_toa NotFound: yeah
NotFound Lack of documentation? See, we have tons of doxygen generated pages!
cotto That said, it's not out of the realm of possibility.
whiteknight There is no built-in allowance for things like function parameters, constraints, return values or possible exception behavior
I'm not saying doxygen or any other particular solution is any better 20:09
dalek kudo/nom: 703b1ef | jonathan++ | src/Perl6/Metamodel/ (3 files):
Add a way for adding dispatch fallbacks to a class, for use in implementing handles.
kudo/nom: 705ae4b | jonathan++ | src/core/traits.pm:
Implement package RHS case of handles.
NotFound doxygen, javadoc, whatever.
soh_cah_toa if we had documentation comparable to llvm's, i could've save a lot of time this summer :) 20:10
plus, it wouldn't really be a dependency. it'd just be what we use for docs.parrot.org
cotto It's a dependency if you want to update the docs and make sure that your changes are correct. 20:13
Hopefully that's most developers.
soh_cah_toa ah, right
well, dependencies aren't always a bad thing. especially if it would mean we'd have an totally awesome api reference. but anyway, that's still down the road quite a bit. i just thought i'd mention it now since m0/mole is really like a clean slate for us 20:15
my second thought: 20:16
i've been reading a lot of the llvm documentation (obviously). i'm no expert but i think their multi-stage approach to optimizations is really clever 20:17
dalek kudo/nom: 9ce5cf1 | jonathan++ | src/core/traits.pm:
Match case of delegation.
soh_cah_toa it performs your traditional link time optimizations but not only does it generate the optimized machine code, it also includes a copy of the llvm bytecode for later runtime optimizations
the nice thing about this is that when the runtime optimizer sees that it can perform some translation, it can either directly modify the optimized machine code or generate new code from the attached llvm bytecode
cotto GCC recently added link-time optimization
soh_cah_toa yeah, i saw 20:18
it also uses an offline optimizer for transformations that are too expensive at runtime. when idle time is detected, the offline optimizer is run to perform more aggressive profile-driven optimizations
i thought that was pretty neat. there's a lot more at llvm.org/pubs/2002-12-LattnerMSThesis.html
cotto At this point in M0, the primary goal is to make that kind of optimization not be impossible. 20:19
NotFound Nice idea, wasting cpu looking for opprtunities to generate bugs ;)
soh_cah_toa i think we could really benefit from looking at what makes llvm a success
actually, i guess that's kinda the purpose of llvm ;)
NotFound soh_cah_toa: mmmmmm.... Apple money? ;)
cotto soh_cah_toa, apple?
soh_cah_toa llvm is made by apple? really? 20:20
benabik Yeah, they hired the main devs.
tadzik mostly, yes
soh_cah_toa wow, didn't know that
benabik llvm's syntax parsing powers Xcode now, and gcc-llvm is the default compiler.
sorear soh_cah_toa: apple pounced on llvm because they needed something to replace gcc and its annoying GPL
benabik They use llvm to do some fun things with refcounting.
soh_cah_toa ah, ok 20:21
benabik (ObjC used to require explicit retain/release calls to maintain the refcounts. They can now automatically insert them into the code.)
sorear: That's a marvelously pessimistic way to view it, but they're also really using LLVM to do some good things for their IDE, language, and runtime. 20:22
sorear: And releasing most of it back into the wild.
soh_cah_toa interesting. never thought i'd ever advocate an apple product :)
benabik Just BSD instead of GPL.
gcc's internals are… not as externally useful as LLVM/clang
sorear benabik: yeah, in it probably has more to do with avoiding that annoying anti-corporate git, rms
benabik soh_cah_toa: I really want to take LLVM's parsing strategies and co-opt them for PCT. 20:23
soh_cah_toa ha! that's probably the most accurate
benabik: nice
benabik integrate tree-optimizer, separate the stages out into easily manipulatable objects...
benabik has a dream... 20:24
tadzik - :my $*DOC := $*DECLARATOR_DOCS;
- { $*DECLARATOR_DOCS := '' }
oops, sorry
weechat--
benabik weechat > wiichat?
tadzik what do you mean?
dalek kudo/nom: 69b45a2 | jonathan++ | src/core/traits.pm:
Should not enforce ro-ness on things we delegate to.
20:25
20:25 mj41 joined
benabik tadzik: Feel free to ignore me, I'm a little strange from lack of sleep. 20:25
cotto soh_cah_toa, did you want to talk about GSoC? 20:26
soh_cah_toa cotto: anyway, on a non-"look at llvm" note, i want to write more tests for hbdb but it seems that i'm never getting any output to compare. could you help?
dalek kudo/nom: b6c6e5b | moritz++ | src/core/ (2 files):
allow Str.match(Str), which in turn also restores Str.subst(Str)
soh_cah_toa yeah :)
kudo/nom: 516a34d | moritz++ | src/core/Match.pm:
add Match.gist
soh_cah_toa let me push first
dalek rrot/soh-cah-toa/hbdb: c4b1151 | soh_cah_toa++ | src/hbdb.c:
Fix for 'list' command where numbers less than 5 were underflowing. It's a bit hacky but it works. :P
20:28
rrot/soh-cah-toa/hbdb: ca5f93a | soh_cah_toa++ | lib/Parrot/Test/HBDB.pm:
Removed some *really* unnecessary inline comments in Parrot::Test::HBDB.
rrot/soh-cah-toa/hbdb: 4b4ed0b | soh_cah_toa++ | lib/Parrot/Test/HBDB.pm:
Tried to fix null output in tests. I don't think it works though.
20:29 soh_cah_toa_ joined
soh_cah_toa_ cotto: agh, did that push go through? 20:29
cotto soh_cah_toa_, dalek seems to think so 20:30
soh_cah_toa_ ok, got disconnected right when i pushed
cotto ah
soh_cah_toa_ at first, i was always getting '' as the actual output. w/ that last commit, now i only get the first thing output by hbdb "HBDB: The Honey Bee Debugger" 20:32
dalek nxed: fcb47ca | NotFound++ | examples/Mysql.winxed:
update example Mysql to use ByteBuffer, StructView and the as_string method
20:33
cotto btw soh_cah_toa, there's some unnecessary duplicate code in HBDB.pm 20:35
soh_cah_toa yeah, a whole lot
i still have to refactor that
cotto ok 20:36
soh_cah_toa actually, if i can get this output problem fixed, i can do that next
20:39 ambs joined
dalek kudo/nom: 4c1dbaf | masak++ | NOMMAP.markdown:
[NOMMAP.markdown] fixed faulty markdown
20:39
cotto soh_cah_toa, it looks like cmd_output_like tries to match against the first line of output from hbdb 20:40
soh_cah_toa cotto: yeah, i tried removing the index and comparing the entire array but that doesn't seem to help
cotto soh_cah_toa, I'm not sure why you'd want like inside the foreach loop 20:43
shouldn't you get all lines from a fd and then try to match against that? 20:44
with a join
soh_cah_toa hm, that would obviously make more sense. don't know why i had it like that 20:45
dalek kudo/nom: 7cf8457 | jonathan++ | t/spectest.data:
We now pass delegation.t.
kudo/nom: ea9929d | jonathan++ | NOMMAP.markdown:
Remove delegation from punchcard.
cotto soh_cah_toa, that approach gets the first test passing for me
should I nopaste?
soh_cah_toa cotto: i got it working to 20:46
cotto soh_cah_toa, great
soh_cah_toa except, now the 'help' test is back to '' output 20:47
cotto soh_cah_toa, can you push what you've got?
soh_cah_toa yeah
dalek rrot/soh-cah-toa/hbdb: 9c79dfd | soh_cah_toa++ | lib/Parrot/Test/HBDB.pm:
Moved call to like() in cmd_output_like() to outside the foreach loop. First test in cmds.t passes but still not the second.
20:49
cotto soh_cah_toa, why use an array at all? 20:50
soh_cah_toa cotto: oh yeah. i was using an array b/c i had to use $line[0] but now i guess i can just use a scalar 20:51
cotto When I did that, I got some (though incorrect) output for the second test. 20:52
soh_cah_toa progress, good
cotto whee 20:53
soh_cah_toa, dailypicksandflicks.com/wp-content/...l-good.jpg 20:54
soh_cah_toa cotto: ha! are you suggesting i should push the changes? real good? 20:55
cotto perhaps 20:57
soh_cah_toa now that the comparison is outside the foreach loop, i can pull out a lot of this duplicate code into a separate function. let me get that first 20:58
cotto wfm 20:59
dalek kudo/nom: f7e3377 | pmichaud++ | NOMMAP.markdown:
Remove hyperoperators from the punch list.
21:12
kudo/nom: f27ddd0 | pmichaud++ | NOMMAP.markdown:
Add "augment" to the punch list.
21:13
soh_cah_toa cotto: agh, i borked it. let me push so you can see 21:15
dalek rrot/soh-cah-toa/hbdb: d3752da | soh_cah_toa++ | lib/Parrot/Test/HBDB.pm:
Refactored duplicate code into _select(). Also made @lines into a scalar. Doesn't quite work yet.
21:16
kudo/nom: b0f733e | moritz++ | src/core/Str.pm:
Str.trim-leading - more efficient than in master
21:22
cotto soh_cah_toa, can you revert that if it breaks? I want to get the tests passing. 21:23
soh_cah_toa cotto: yeah, i'll revert cmd_output_like() 21:25
cotto Ugly working code is better than well-factored broken code.
soh_cah_toa that's true 21:26
whiteknight depends how easy it is to fix 21:29
dalek rrot/soh-cah-toa/hbdb: 63864d0 | soh_cah_toa++ | lib/Parrot/Test/HBDB.pm:
Reverted previous changes to work on passing 'help' test first, then refactor duplication.
soh_cah_toa will brb 21:30
whiteknight cotto: Have you seen the work I've been doing in whiteknight/frontend_parrot2 this morning?
cotto whiteknight, not yet 21:31
benabik Hm. PAST::Compiler is not designed to be used more than once.
whiteknight cotto: I've got the new frontend running, though it's not perfect. It passes most tests
the tests that fail are tests for verbatim backtraces, the new PIR-based entry function messes those up 21:32
I want to try to find a way to fix that
benabik whiteknight: Can you add a exception handler that removes the new layers?
(from the backtrace, if that wasn't obvious.) 21:33
whiteknight benabik: I don't know what I am going to do about it. I can either try to use some continuation magic, or play with the context graph to make the function disappear
cotto whiteknight, do they really need to disappear? 21:34
whiteknight cotto: to preserve behavior of the tests 21:36
benabik Arg. The fact that the PCT tests were written in perl and called a new parrot for each test hid the fact that the compilers are non-reentrant. 21:37
Wrong term.
non-reusable.
jnthn__ benabik: Really?
21:38 rdesfo joined
benabik jnthn__: I suppose it could be mistakes I made while converting PAST::Compiler to NQP… but it seemed to use a _lot_ of globals. 21:38
jnthn__ benabik: I know we were using them in a re-entrant/re-usable way in Rakudo master and I don't remember jumping through hoops.
benabik jnthn__: PAST::Compiler seems to collect all subs it encounters and returns them all, even across multiple invocations. I'll check with master, but I don't think I changed it that much when converting. 21:39
cotto whiteknight, can we update the tests?
jnthn__ benabik: hmm, curious
whiteknight cotto: I suppose we can. That's a decision above my pay grade :) 21:42
I want to try to fix things first, before I go monkeying with tests
21:44 Psyche^ joined
whiteknight the new frontend parses several command-line options in pure PIR, and I think we can expand that number 21:45
-c -o -r -E -v and -h, I think 21:46
-L -I and -X can almost certainly be ported to PIR without much issue
cotto not_gerd++ 21:52
whiteknight I'm less sure, but I think we can probably move -t and -d options too, but that might be some work if the opcodes don't do exactly what the frontend is doing 21:53
not_gerd?
cotto I guess it's the antimatter version of gerd. 21:54
soh_cah_toa is back
dalek rrot/m0-spec: ebb4243 | cotto++ | docs/pdds/draft/pdd32_m0.pod:
fix a couple of typos in the goto* op descriptions found by not_gerd++
21:55
benabik jnthn__: Okay, never mind. I implemented something _else_ idiotically. 21:56
I still dislike the pervasive use of globals, but that's for another day. 21:57
jnthn__ benabik: They've tended to become contextuals of late.
cotto not_gerd, ping 21:59
benabik jnthn__: That still doesn't make me happy, to some extent. Contextuals sometimes seem a bit like globals that are defined in the middle of blocks.
not_gerd cotto, pong 22:00
benabik It's better because it doesn't outlast the sub it's defined in, but it can affect things you call in unknown ways.
cotto not_gerd, are you on parrot-dev? I'd like to comment on your thoughts by quoting/replying there.
also, are you just gerd with a "not_" prefixed or actually someone different? 22:01
not_gerd cotto: someone different, therefore _not_ gerd
jnthn__ benabik: Contextuals have dynamic scope, which means they tend to sync up with the lexical scopes of the thing you're compiling, which tends to fit.
not_gerd I'm not on parrot-de, but I read the logs in the past
cotto actually, I may just respond here if it's a good time for you. 22:02
not_gerd I'm around for a bit, so go ahead
benabik jnthn__: It gets messier with subclassing. 22:03
jnthn__ benabik: I'd mostly seen those as orthogonal so far.
cotto First, thanks for catching the typo in the goto* ops. The non-chunk versions of those ops should use the register numbers as immediate values.
benabik jnthn__: But if I call from the subclass into the superclass, which can end up calling my subclass… How can I be sure my contextuals are what both classes expect them to be. 22:04
jnthn__: I tried using object attributes, but the current design of PCT reuses the objects so they don't get cleared.
cotto not_gerd, one of the key goals of M0 is to keep a minimal instruction set. Having two different conditional goto ops goes against that, especially since most M0 will be generated. 22:05
22:07 PacoLinux_ joined 22:08 PacoLinux__ joined
cotto Bitwise NOT is the same as $x ^ 0xFFFFFFFF (for a 32-bit words). Its omission is intentional. 22:08
not_gerd cotto: what's the reason for a minimal instruction set? 22:09
a larger instruction is probably better for raw interpreters 22:10
cotto not_gerd, simplicity and ease of implementation (especially jitting)
not_gerd, "raw"?
not_gerd ie non-optimizing/jitting 22:11
cotto ok
not_gerd the reason why I wanted to introduce an additional goto was so things like while/do..while/repat...until could all desugar to the same number of instructions for primitive cases 22:14
a single branch instruction favors certain conditions over others
(if it's not symmetric in itsel like LLVM's br) 22:15
cotto On the one hand it feels like bloat to have two ops that are so similar, but on the other hand you're correct. 22:16
not_gerd also, you need to decide how branching and numeric comparison should interact
eg, LLVM has a cmp op and a branch op
other ssemblies have jmp_less, jmp_less_equal,jmp_zero, hmp_nonzero,... 22:17
I didn't find anything about that in the spec
22:17 rdesfo left
cotto You can emulate cmp with the math ops. I'm on the fence as to whether that should be the way it has to be done in M0. 22:18
not_gerd cotto: perhaps a silly question: how do you do comparisons with basic math? 22:19
cotto not_gerd, inelegantly 22:20
benabik A cup B is similar to A - B for numeric A & B 22:21
*cmp
not_gerd benabik: only if you can compare the result against 0, and how do you do that if there's no < ?
benabik not_gerd: By making your branch instructions jump on positive/negative/zero 22:22
not_gerd: Inelegant, but possible.
soh_cah_toa eh, that's true but making the distinction between a math operation and comparison would help reduce much confusion
not_gerd sure, but we currently don't have such an instruction ;)
cotto soh_cah_toa, yes. 22:23
soh_cah_toa though i do agree w/ a minimalist approach
benabik I didn't say it was a good idea, just that you can do it that way. :-D
soh_cah_toa finding a balance is the hard part ;)
cotto minimalist is good, though not for its own sake
benabik multiplication can be replaced by shift and addition. 22:24
But why?
cotto otherwise we'd have a one instruction instruction set
soh_cah_toa exactly
benabik cotto: dwim?
22:24 lucian joined
cotto subleq 22:25
soh_cah_toa cotto: anyway, when you're done talking to not_gerd i'm still a little confused by how the first test can pass but the second gets null output. it's weird
not_gerd cotto: I still would like to see bitwise-not so I can invert values without having to know the width of I registers
cotto soh_cah_toa, I can split my attention for a bit 22:26
benabik not_gerd: +1
(I think.)
cotto not_gerd, I'm becoming less adverse to that
benabik +0.5?
+0.9. I like it, but haven't thought it through all the way. :-D
soh_cah_toa dittos benabik
cotto: btw, i'm aware the regex to match is wrong in the 'help' test b/c i changed the output format for that command. though right now the '' output is the real problem 22:29
not_gerd also, there need to be comparison ops for floating point values, so I'd be in favor of introducing integer comparison for purely aesthetic reasons
(comparing floats shouldn't be easier than comparing ints) 22:30
cotto agreed
soh_cah_toa isn't it a bad idea to compare floats though? 22:31
cotto only if you don't know how
soh_cah_toa w/ limited precision and all
benabik soh_cah_toa: floats at user level should usually be compared with a delta… but even that eventually needs a raw comparison: delta < expected 22:32
not_gerd well, expected < delta most likely, but yeah (SCNR)
soh_cah_toa well, regardless of whether it's bad practice i suppose making it possible for hll's should not be out of question 22:33
not_gerd also, now that's clear that goto uses immediate values, I'd like to see a non-immediate version (ie assigned aka computed goto) 22:34
among other things, this allows implementing fast interpreters ;)
benabik M0le if( x < y ) {} -> M0 cmp temp, x, y; cmp temp, temp, -1; goto_if (LABEL), temp ?? 22:35
cotto not_gerd, what's a use case for computed gotos? 22:37
benabik Probably need compare integer registers, compare integer register to constant, then ditto s/integer/float/
not_gerd benabik: you can always load constants into registers... 22:38
benabik not_gerd: I guess so. That appears to be how M0 currently does math with constants too. 22:39
not_gerd cotto: as I said, fast interpreters - I think Parrot actually makes use/used to make use of that in one of its runcores...
benabik And {in,de}crement… :-P
cotto not_gerd, ah. You're talking about implementing an interpreter in M0.
That was the use case that came to mind when you mentioned assigned/computed gotos. 22:40
I thought you were saying that it'd make M0 faster.
not_gerd yes, that's what I meant 22:41
cotto soh_cah_toa, I'm not seeing null output for that second test.
nopaste "soh_cah_toa" at 192.168.1.3 pasted "Output for cmds.t" (23 lines) at nopaste.snit.ch/68482 22:42
soh_cah_toa cotto: you don't get that?
cotto local changes 22:43
soh_cah_toa i didn't change anything in Parrot::Test::HBDB 22:44
cotto soh_cah_toa, shouldn't you be concatenating on the foreach loops in cmd_output_* ? 22:45
soh_cah_toa cotto: hmm, ok. i think i see what you mean 22:46
not_gerd what I like about computed goto is that you can use addresses instead of opcodes as in-memory representation of instructions
you can't get faster than taht without a jit
cotto It seems like an overly-specialized use case to me, and it'll be something that every implementation would need to support. 22:50
nopaste "soh_cah_toa" at 192.168.1.3 pasted "Foreach with join()" (12 lines) at nopaste.snit.ch/68483 22:54
soh_cah_toa cotto: you mean like that? b/c although it seems right, it doesn't help
cotto soh_cah_toa, .= 22:56
otherwise you only get the last line
soh_cah_toa agh, duh
whiteknight if we have a reduced instruction set like M0, cgoto is a great dispatch mechanism 22:57
cotto whiteknight, I agree, but that's below what M0 needs to care about. 22:58
whiteknight eventually we are going to need to implement it
cotto whiteknight, what do you mean? A C implementation of M0 using cgoto? 22:59
whiteknight yeah, I don't see why not
well, for portability we could probably do it all with a big switch statement. cgoto is a hassle on win32
dalek kudo/nom: f279a51 | jonathan++ | src/Perl6/Grammar.pm:
First cut of augment support. Seems to work for augmenting trivial classes, but any of the built-in ones seem to have issues post-augment. Also, this will need a re-visit when we get real serialization.
23:00
kudo/nom: e15779c | jonathan++ | src/Perl6/Metamodel/MultiMethodContainer.pm:
Clear the list of multi methods to incorporate once we've done so, otherwise we'll hit problems if we come to augment.
kudo/nom: 113da42 | jonathan++ | t/spectest.data:
Three more test files passing.
kudo/nom: c7b6534 | jonathan++ | NOMMAP.markdown:
Implemented augment; remove from punch card list.
cotto I expect multiple implementations, including platform-specific C.
(and portable C)
whiteknight when we have high-level PIR ops, the majority of execution time happens inside the ops and the API methods they call 23:02
with M0, execution time will start to be dominated by op dispatch time
more ops, each doing less work, etc
cotto yes
whiteknight without a JIT, Parrot is going to get substantially slower with M0, likely
cotto a jit will be a big win at that point 23:03
whiteknight same logic to do, more dispatch costs
cgoto will help minimize that, while we scramble to make jit
cotto without some kind of compilation
not_gerd just as a side note: as of last year (don't know about today) luajit2 in interpreter mode beat the V8 JIT
cotto If we can output C, op dispatch goes away too.
whiteknight cotto: true 23:04
cotto luajit is impressibe
*impressive
not_gerd well, take a look at the interepreter code: repo.or.cz/w/luajit-2.0.git/blob/HE...m_x86.dasc 23:05
who wants to do the same for Parrot?
cotto www.reddit.com/r/programming/commen...64/c0lrus0 23:07
23:07 PacoLinux_ joined
dalek rrot/soh-cah-toa/hbdb: 3915e52 | soh_cah_toa++ | lib/Parrot/Test/HBDB.pm:
Concatenate $lines for each iteration in HBDB.pm. Test 2 in cmds.t now has output but just the first line.
23:08
cotto not_gerd, thanks for your M0 thoughts. It'll take me a while to digest and integrate them, but you mention some important things I've omitted so far.
soh_cah_toa cotto: now atleast i get output but it's just the first line
not_gerd cotto: did you see the proposal for load/store? 23:09
cotto not_gerd, why do those ops need to care about types? 23:14
soh_cah_toa ugh, this test is pissing me off. i'm taking a break
soh_cah_toa will brb
cotto not_gerd, it sounds like that op is trying to do more than one thing
not_gerd cotto: m0 only has a single integer and floating-point type, but if you want memory-efficient storage and/or communicate with the outside world, you need a way to read/write integers/floats of different width/precision 23:16
I first speculated about having separate ops for load/store and conversion, but decided to roll them into one 23:17
23:17 jsut joined
not_gerd you should only ever need the conversions when accessing memory 23:17
cotto It's preferable to have two simpler ops. 23:19
not_gerd not if one of the ops is never used on its own 23:20
also, the ccall_arg/_ret ops need to do the same thing
only that it's never explicitly mentioned
cotto The ffi ops haven't gotten much love because I haven't found a good Perl ffi library. Once we start on the C implementation, I expect that they'll change. 23:21
not_gerd the ffi ops is ok, imo - but the arg/ret ops lack an argument to specify which call one deals with 23:30
luckily, $3 is unused ;)
^are ok 23:31
as-is, they'll introduce a dependency on libffi or libjit if you don't want to write asm for all supported platforms yourself, though 23:32
cotto I'd like to abstract that out, but it'll be workable as-is. 23:44
23:49 preflex joined 23:53 PacoLinux_ joined 23:58 jsut_ joined