Camelia, the Perl 6 bug

IRC log for #parrot, 2012-03-14

Parrot | source cross referenced

| Channels | #parrot index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 benabik whiteknight: I'm buried in IMCC.
00:00 benabik I found something that makes IMCC enter an infinite loop.
00:00 whiteknight benabik: I'll send flowers
00:02 whiteknight that doesn't surprise me at all, with the infinite loop. Anything you need a second set of eyes on?
00:03 benabik Nope.  The parser in init_fixedintegerarray_from_string is horrible.
00:04 benabik The strangest thing is that I can't be strict about the presence of ( and ) because in one place it got a plain '0'
00:04 benabik Everywhere else it got '(0)'
00:04 benabik Of course, even weirder is that IMCC generates strings for this thing to parse instead of generating the FIA itself.
00:05 whiteknight ha
00:05 whiteknight so that's where the infinite loop is?
00:05 benabik Yeah.  If you do a line like `.const 'FixedIntegerArray' $0 = "test"`
00:05 whiteknight that simple thing creates an infinite loop?
00:05 benabik It sits there continuously calling strtoul forever and not advancing.
00:07 whiteknight dafaq?
00:07 whiteknight this is terrible
00:08 benabik I think it's something darbelo through together to tear something else horrible out.
00:08 benabik It works as long as the user never hits it.
00:08 benabik *threw
00:11 benabik whiteknight: I would like a look-over before pushing it to master: https://github.com/Benabik/parrot/commit/​54edf2f490eea01601ab80600ca39f611dd046ae
00:12 cotto benabik: can you add a test?
00:14 benabik tests, tests, tests...
00:14 cotto the error message on 1956 looks incomplete
00:15 benabik cotto: No, it's expecting a comma
00:15 benabik That is probably not particularly clear.
00:15 cotto ah.  I'd quote it then.
00:16 benabik There used to be similar text for ( and ) which would have made that more obvious.
00:16 benabik But yes, quoting is a good idea.
00:16 cotto benabik++
00:17 benabik t/compilers/imcc/syn/regressions.t
00:17 benabik That's...  promicing.
00:18 cotto that file's not as big as I'd expect
00:18 cotto how pleasant
00:18 benabik :-D
00:21 whiteknight which strtoul was it getting stuck on, the one on line 1971?
00:21 benabik whiteknight: Yeah.
00:22 whiteknight actually, that's the only instance there
00:22 whiteknight how did you even discover this bug?
00:22 benabik :-D
00:22 benabik By misreading the PDD on PIR.
00:22 benabik I thought the .const declaration needed the type of PMC returned from the immediate sub.
00:22 benabik Which just happened to be an FIA.
00:23 benabik (Was testing how easy it is to get a PMC from the constant table to a PMC register)
00:23 benabik So I had a 'test' :immediate and a .const 'FIA' $0 = 'test'
00:25 whiteknight gotcha.
00:25 whiteknight and that doesn't work, I take it?
00:25 whiteknight I never really understood the .const 'type' syntax
00:26 benabik The only types that can go there is 'Sub', 'Float', 'Integer', and 'String'
00:26 benabik It might have been able to take more when there was an initialize_string VTABLE  (or whatever it was called)
00:26 whiteknight ah, that makes a little bit more sense, but 'Sub' never had an initialize_string
00:27 benabik And 'Sub' gets you the Sub PMC or the result of an immediate.
00:27 benabik IMCC does the lookup.
00:27 * whiteknight hates PIR the more I learn about it
00:27 benabik Yeah.
00:30 benabik Added quotes and tests: https://github.com/Benabik/parrot/commit/​9280f8dd3aa25928bc380b0835ec0561071dc42a
00:31 benabik (Running tests before pushing to master...)
00:32 benabik Oh, I left 'FixedIntegerArray' off the list of types you can .const
00:32 benabik It's very bizzare.
00:34 TonyC joined #parrot
00:34 benabik Huh.   One of the tests to fail worked.  :-(
00:38 benabik dinner &
00:39 whiteknight I don't see any problem with that patch. If all tests pass, commit it
00:46 benabik I tried to rip out the "track a pointer and index" bits.
00:58 TonyC joined #parrot
01:03 TonyC joined #parrot
01:03 particle1 joined #parrot
01:06 nopaste joined #parrot
01:12 whiteknight this file....
01:12 whiteknight ~2500 lines of terrible abstraction-breaking code
01:12 whiteknight I'm using existing data structures here (SymReg *) to store
01:12 whiteknight various global items (currently only PMC constants).
01:12 whiteknight The index in the constant table is in SymReg * ->color
01:12 whiteknight data member. This looks odd, but the register number
01:12 whiteknight from imc.c:allocate is also there for variables,
01:12 whiteknight so it's a little bit consistent at least.
01:13 whiteknight that comment really sums it all up
01:13 benabik A little bit consistant?
01:15 whiteknight "I'm going to use the wrong data structure for the job, and make sure all the field names don't match their purpose"
01:15 whiteknight So when reading color here it's either a constant table index
01:15 whiteknight or a Parrot register number, depending on data type.
01:15 whiteknight yay!
01:17 benabik yay!
01:17 benabik At least make is a union?
01:18 whiteknight We really need two APIs for the packfile subsystem: One for runtime read-only accesses and one for creating packfiles from a compiler
01:18 whiteknight We can start moving a lot of this pbc.c logic into the second API
01:19 whiteknight ...And then expose that API through appropriate PMC types
01:21 benabik +many
01:23 whiteknight don't codetests get run on this file?
01:25 whiteknight There are two broad classes of functions in this file: those that deal with packfiles, and those that deal with symreg bookkeeping
01:26 whiteknight Thats it! I've found my next project
01:26 whiteknight There's only so much of this crap that a man can take
01:28 cotto :D
01:37 whiteknight pc[-1] = add_const_table_pmc(imcc, changed_sig);
01:37 whiteknight that makes me want to vomit
01:39 whiteknight "My loop has an off-by-one error! I know, I'll use a negative offset to pretend like it's not a problem"
01:43 bacek_at_work whiteknight, just run "git rm -rf compilers/imcc". It will solve many-many problems in trade off of just one.
01:47 whiteknight yeah, it's tempting
01:51 kid51 joined #parrot
01:54 dalek parrot: 67bd75b | jkeenan++ | frontend/pbc_dump/main.c:
01:54 dalek parrot: [codingstd] Add 'ASSERT_ARGS(<function_name>) in 8 locations in 2 files. A
01:54 dalek parrot: program with ASSERT_ARGS is an even happier program.
01:54 dalek parrot: review: https://github.com/parrot/parrot/commit/67bd75b4fe
01:56 dalek parrot: 16f74d9 | jkeenan++ | frontend/parrot_debugger/main.c:
01:56 dalek parrot: [codingstd] Add 'ASSERT_ARGS(<function_name>) in 8 locations in 2 files. A
01:56 dalek parrot: program with ASSERT_ARGS is an even happier program.
01:56 dalek parrot: review: https://github.com/parrot/parrot/commit/16f74d9179
01:57 dalek parrot/remove_sub_flags: d6a4648 | Whiteknight++ | src/ops/core (2 files):
01:57 dalek parrot/remove_sub_flags: Fix a few variable names to better represent what they do
01:57 dalek parrot/remove_sub_flags: review: https://github.com/parrot/parrot/commit/d6a464886a
01:57 dalek parrot/remove_sub_flags: 3787eed | Whiteknight++ | / (3 files):
01:57 dalek parrot/remove_sub_flags: A few small fixes so Test/More.pbc runs and include/test_more.pir does the right thing. A few more tests run correctly, but there is still some weirdness.
01:57 dalek parrot/remove_sub_flags: review: https://github.com/parrot/parrot/commit/3787eed92a
01:58 whiteknight With that, it's time for bed. Goodnight
02:04 benabik fulltest takes a while...
02:04 benabik pbc_dump and parrot_debugger both fail c_arg_assert.t
02:06 benabik (in case anyone's board and wants to fix code std issues.
02:06 benabik *bored
02:17 * kid51 just fixed them
02:17 benabik So you did.  kid51++
02:18 dalek parrot: 5779c32 | benabik++ | / (2 files):
02:18 dalek parrot: imcc: Be more strict in parsing FixedIntegerArrays
02:18 dalek parrot:
02:18 dalek parrot: The previous implementation would sit and spin on strtoul when handed
02:18 dalek parrot: invalid input.
02:18 dalek parrot:
02:18 dalek parrot: This version performs more sanity checks as it parses, although it
02:18 dalek parrot: doesn't require the presence of surrounding parenthesis due to the
02:18 dalek parrot: parser giving it just '0' while parsing
02:18 dalek parrot: compilers/pct/src/PCT/HLLCompiler.pir
02:18 dalek parrot: review: https://github.com/parrot/parrot/commit/5779c32e68
02:18 cotto whiteknight++ #first the build breaks, then there's weirdness, then you win
02:23 woosley joined #parrot
02:26 travis-ci joined #parrot
02:26 travis-ci [travis-ci] parrot/parrot#153 (master - 67bd75b : jkeenan): The build was broken.
02:26 travis-ci [travis-ci] Change view : https://github.com/parrot/par​rot/compare/9317840...67bd75b
02:26 travis-ci [travis-ci] Build details : http://travis-ci.org/parrot/parrot/builds/860525
02:26 travis-ci left #parrot
02:28 benabik Just timeouts
02:35 cotto don't forget that tomorrow is π day
02:35 benabik Half-tau day
02:36 cotto or that
02:42 travis-ci joined #parrot
02:42 travis-ci [travis-ci] parrot/parrot#154 (master - 16f74d9 : jkeenan): The build is still failing.
02:42 travis-ci [travis-ci] Change view : https://github.com/parrot/par​rot/compare/67bd75b...16f74d9
02:42 travis-ci [travis-ci] Build details : http://travis-ci.org/parrot/parrot/builds/860542
02:42 travis-ci left #parrot
02:43 cotto time to prepare to subvert $dayjob's uptime counter
02:43 benabik ?
02:45 cotto we have one of these: http://www.mysafetysign.com/mark-a-day-safety-sco​reboard/days-without-an-accident/sku-s-5018.aspx
02:45 kid51 I tested those commits several different ways before committing ... so I don't know what travis-ci is complaining about.
02:46 benabik kid51: It's complaining that fulltest takes too long.
02:46 benabik __ days without a velociraptor attack?
02:53 travis-ci joined #parrot
02:53 travis-ci [travis-ci] parrot/parrot#155 (master - 5779c32 : Brian Gernhardt): The build was fixed.
02:53 travis-ci [travis-ci] Change view : https://github.com/parrot/par​rot/compare/16f74d9...5779c32
02:53 travis-ci [travis-ci] Build details : http://travis-ci.org/parrot/parrot/builds/860606
02:53 travis-ci left #parrot
03:03 mdupont joined #parrot
04:51 aloha joined #parrot
04:52 aloha (parrot/parrot) Issues opened : 734 (Missing declarations and prototypes should be errors) by petdance : https://github.com/parrot/parrot/issues/734
05:02 dalek parrot: d296f64 | petdance++ | lib/Parrot/Pmc2c/PMC.pm:
05:02 dalek parrot: Initialize $hout before we use it
05:02 dalek parrot: review: https://github.com/parrot/parrot/commit/d296f64fed
05:07 travis-ci joined #parrot
05:07 travis-ci [travis-ci] parrot/parrot#156 (master - d296f64 : Andy Lester): The build was broken.
05:07 travis-ci [travis-ci] Change view : https://github.com/parrot/par​rot/compare/5779c32...d296f64
05:07 travis-ci [travis-ci] Build details : http://travis-ci.org/parrot/parrot/builds/861143
05:07 travis-ci left #parrot
05:09 benabik whoops
06:09 johbar_work joined #parrot
06:48 cotto all done
06:48 cotto http://imgur.com/a/ItveK#0
07:03 woosley left #parrot
08:26 mj41 joined #parrot
09:14 lucian joined #parrot
09:33 alin joined #parrot
10:06 bacek joined #parrot
10:44 betterworld joined #parrot
10:53 mj41 joined #parrot
11:33 nine msg whiteknight An interesting idea. I guess checking the flag in the GC should have only minimal performance impact (affects only GC runtime). The is_shared flag just begs to be used this way. It makes me a bit nervous to have foreign PMCs floating around, but I'll just give it a try.
11:33 aloha OK. I'll deliver the message.
11:34 nine bacek: I'll try whiteknight's suggestion of using a flag on the PMC to tell the GC to not touch them. This way it doesn't matter that these constants may be used in arbitrary ways.
11:35 nine bacek: I'll have a look at finalization as soon as the runtime stuff works. Considering that I had to change child interp creation massively, I'm not surprised that tearing them down is more broken than not...
12:16 benabik_ joined #parrot
12:21 bluescreen joined #parrot
13:14 fperrad joined #parrot
13:14 johbar_work joined #parrot
14:01 johbar_work1 joined #parrot
14:21 contingencyplan joined #parrot
14:45 PacoAir joined #parrot
15:04 benabik joined #parrot
15:04 benabik ~~
15:04 benabik_ joined #parrot
15:14 nine o/
15:14 benabik \o nine.  How's things?
15:18 nine benabik: Fine, thanks. Got a good suggestion for my constants problem from whiteknight and am anxious to get home so I can try it out
15:18 benabik nine: Sharing the PMCs seems like not a bad idea.  It could end up with concurrency problems but as long as it's deliberately pointed out, it should work alright.
15:19 nine as long as those 'constants' really are constant it should work
15:19 benabik Yes.
15:21 nine How's things over there?
15:21 benabik Caffinated!
15:22 benabik Didn't sleep well last night but had a coupon for free espresso.
15:22 nine which is almost as good
15:22 benabik So I can be nice and awake for a phone interview.  There's no way this could go wrong.  :-/
15:23 nine s!:-/!:-)!
15:23 benabik The good news is that I could probably charge my laptop via vibrating at the moment.
15:28 nine Sounds like a good occasion for grabbing your running shoes
15:28 benabik If I didn't have to be in the office, that'd be grand.
15:29 nine Ah, always those details in the way
15:29 benabik yarble
15:29 benabik Probably going to go punch things tonight, so that'll be good.  :-)
15:31 nine Well speaking of being at the office. Time to go home for me. Wish you success with your interview. Though I can't imagine something that could make someone nervous who pokes at IMCC's internals...
15:31 benabik :-D
15:31 tadzik ;)
15:45 Psyche^ joined #parrot
16:18 mdupont joined #parrot
16:27 alester joined #parrot
18:07 nine Where else than in PackFile_ConstTable_unpack can a PMC get into a ConstantTable?
18:09 benabik The PackfileConstTable PMC for someone building a new packfile.
18:09 benabik I think that's all, but not completely sure.
18:10 dmalcolm joined #parrot
18:13 cotto ~~
18:24 bluescreen joined #parrot
18:32 dalek parrot: 8032bfa | jkeenan++ | lib/Parrot/Pmc2c/PMC.pm:
18:32 dalek parrot: Under 'use strict', you must declare a lexical ('my') variable before you use it.
18:32 dalek parrot: review: https://github.com/parrot/parrot/commit/8032bfa201
18:45 dngor joined #parrot
18:48 autark joined #parrot
19:03 travis-ci joined #parrot
19:03 travis-ci [travis-ci] parrot/parrot#157 (master - 8032bfa : jkeenan): The build is still failing.
19:03 travis-ci [travis-ci] Change view : https://github.com/parrot/par​rot/compare/d296f64...8032bfa
19:03 travis-ci [travis-ci] Build details : http://travis-ci.org/parrot/parrot/builds/865916
19:03 travis-ci left #parrot
19:23 mj41 joined #parrot
19:30 dngor joined #parrot
19:54 lucian joined #parrot
19:57 seme joined #parrot
19:58 seme hi guys... any reason 4.1.0 is not on the ftp site?
19:58 seme ooh is 4.1 only devel?
19:59 seme are odd releases development and even releases stable?
20:00 nine seme: doesn't look like comparing ftp://ftp.parrot.org/pub/parrot/releases/devel to ftp://ftp.parrot.org/pub/parrot/releases/stable
20:01 seme yeah it is odd... I saw the announcement about the 4.1 release and assumed it was a stable release but I can only find it in the devel branch of the ftp site
20:01 nine there seems to be no obvious system on what's devel and what's stable
20:03 nine I guess I'm the only regular on this channel who doesn't know the secret :)
20:04 seme he hee well don't sweat it... I usually run from teh git repo any way
20:12 pjcj joined #parrot
20:13 seme where is the source for HLL::Grammar?  the squaak example grammar files implement the HLL::Grammar but the docs reference the PCT::Grammar
20:14 Coke we prefer "supported" over "stable". every 3 months is a supported release.
20:14 Coke they happen to be numbered .0, .3, .6, and .9
20:14 seme I see... thta is why stable and supported mirror each other
20:14 seme works for me
20:15 seme any poniters on the whole HLL::Grammar vs PCT::Grammar thing... I'm reading through the docs but they dont' match some of the examples I see out there... any pointers would be appreciated
20:16 Coke seme: that I can't help with, sorry
20:22 seme ooh I see... I think that HLL::Grammar is from the nqp stuff
20:22 seme at least thats the only place I can find it
20:27 moritz there's an src/HLL/Grammar.pm in nqp, yes
20:28 moritz there's also a src/HLL/Grammar.pm in nqp-rx
20:29 seme I'm very confused as to which grammar to use and specifically I'm confused as to why the squaak example implements the HLL::Grammar which doesn't appear to be a part of the parrot src but pynie uses the PCT::Grammar which does appear to be part of the parrot src... What is the relationship between them?
20:30 moritz iirc squaak uses NQP-rx, which is bundled with parrot as the parrot-nqp executable
20:30 moritz NQP-rx is basically the successor of the PCT grammar engine plus the NQP compiler
20:31 moritz and then there's a new NQP compiler, which can be found at https://github.com/perl6/nqp/
20:31 dalek rakudo/nom: 34b7b10 | tadzik++ | src/Perl6/Actions.pm:
20:31 dalek rakudo/nom: Fix DOC phasers for the new add_phaser() API. felher++ for noticing
20:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/34b7b105e3
20:31 moritz you won't find NQP-rx's HLL::Grammar in the parrot repo, because parrot only imports the compiled version of NQP-rx
20:32 moritz https://github.com/perl6/nqp-rx/ has the src/HLL/Grammar.pm
20:32 seme ok that makes sense
20:32 seme ok so if I follow the squaak example then my grammar should implement the HLL::Grammar which is basically the NQP-rx grammar
20:33 seme and the docs for the squaak tutorial and the NQP-rx stuff should match right?
20:34 moritz yes
20:34 seme ok that makes sense :)
20:34 moritz sense is overrated :-)
20:36 seme one other thing... are perl 6 rules NQP-rx ?
20:49 johbar_work joined #parrot
20:55 * Coke really wishes we could start to clean up our trail of old technologies.
20:55 seme seriously... for a complete newbie like me it is really confusing
20:58 cotto Nuking all the old stuff is easy.  Keeping things that depend on the old stuff working is less so.
20:59 Coke cotto: what depends on the old stuff?
20:59 Coke say blackpan and lose a beak.
20:59 cotto lua, largely
20:59 Coke blackpan? darkpan.
20:59 Coke fair enough. I'd worry about breaking lua, yes.
20:59 cotto yeah.  darkpan is no longer an acceptable argument
21:00 seme what about deprecating things over time
21:00 Coke certainly don't worry about breaking tcl. ;)
21:00 Coke oh. I got a text today from particle. Any idea what that was about?
21:01 cotto I don't know about anything special happening.
21:01 cotto though he's a busy fellow, so it could be for something old
21:11 nine Damn.... IMCC is the source of my rouge constants
21:14 moritz it's a very old meme around here
21:14 moritz "who's to blame?" -- "IMCC"
21:18 nine moritz: well in this case, it's not even at fault. It just does it's job. But this means that any compiler would have to set this flag on the constants, or I'd have to find a better place where to do that
21:18 bacek nine, https://github.com/parrot/pirc
21:20 nine bacek: sounds very nice but seems very inactive as well?
21:20 cotto both true
21:21 cotto well, definitely inactive
21:21 cotto the problem with any pir compiler is that it has to compile pir
21:26 bacek cotto, actually problem is to be bug-compatible with IMCC...
21:31 cotto bacek: well pir essentially is "whatever imcc does"
21:32 bacek cotto, afaik we ditched our "deprecation policy". Nothing can stop us from replacing imcc with pirc and declare it's "new pir". Fixing nqp/rakudo/lua shouldn't be too hard.
21:34 cotto I'm not sure that's the right direction though.  The big problem isn't that we have a questionable pir compiler, but that pir is the main non-C way of interacting with parrot.
21:35 cotto *main non-C low-level way of interacting with parrot
21:38 bacek cotto, better way - split Packfile* PMCs into 2 sets - runtime and compile time. Then resurrect PIRATE
21:38 bacek but bringing pirc as imcc replacement will be a good start
21:40 cotto bacek: what's the advantage of pirc over just using imcc as part of the bootstrap to get PIRATE built?
21:40 bacek cotto, test bench for Packfile* splitting.
21:40 cotto bacek: doing that with imcc does sound hairy
21:41 bacek and bringing pirc should be smaller than making full pirate
21:41 bacek smaller task
21:41 cotto yes
21:41 bacek something like "GSoCable"
21:43 dalek winxed: 44a04cf | NotFound++ | pir/winxed_ (2 files):
21:43 dalek winxed: update installable files
21:43 dalek winxed: review: https://github.com/NotFoun​d/winxed/commit/44a04cfa7b
21:48 lucian joined #parrot
21:58 dalek parrot: 86bb3b3 | NotFound++ | ext/winxed/ (2 files):
21:58 dalek parrot: Update winxed snapshot to 1.6.devel 44a04cfa7b
21:58 dalek parrot: - Default parameters
21:58 dalek parrot: - Use pir compile method instead of obsolted ways
21:58 dalek parrot: review: https://github.com/parrot/parrot/commit/86bb3b37e4
22:23 travis-ci joined #parrot
22:24 travis-ci [travis-ci] parrot/parrot#158 (master - 86bb3b3 : NotFound): The build was fixed.
22:24 travis-ci [travis-ci] Change view : https://github.com/parrot/par​rot/compare/8032bfa...86bb3b3
22:24 travis-ci [travis-ci] Build details : http://travis-ci.org/parrot/parrot/builds/867531
22:24 travis-ci left #parrot
22:38 donaldh joined #parrot
23:09 whiteknight joined #parrot
23:15 whiteknight good evening, #parrot
23:16 tadzik good evening whiteknight
23:16 whiteknight hello tadzik
23:42 contingencyplan joined #parrot

| Channels | #parrot index | Today | | Search | Google Search | Plain-Text | summary

Parrot | source cross referenced