Re: Pixen source

22 views
Skip to first unread message

Philippe Casgrain

unread,
Sep 6, 2009, 8:39:10 AM9/6/09
to Joe Osborn, Ian Henderson, Andy Matuschak, pixe...@googlegroups.com
Can you elaborate a little on what the "C data model" is? Document-
writing (as in serialization)? Or just the base document model is a C-
struct?

Phil

Le 09-09-06 à 04:29, Joe Osborn a écrit :

> Sort of! And it probably works, too!
>
> On Sep 6, 2009, at 00.08, Ian Henderson wrote:
>
>>
>> Hasn't TiledPixen done this already?
>>
>> - Ian
>>
>> On Sep 6, 2009, at 12:07 AM, Andy Matuschak wrote:
>>
>>> kill the C data model so hard please
>>
>

Philippe Casgrain

unread,
Sep 6, 2009, 9:03:05 AM9/6/09
to Joe Osborn, Andy Matuschak, Ian Henderson, pixe...@googlegroups.com
So I built and ran the application...

First question: What is a PXToolMatrix and why do I need it? It looks
like objects of this class were stored in a nib file and there doesn't
seem to be code to handle unarchiving of these objects.

Second question: how do you feel about dropping support for 10.3 (at
least) and 10.4 (preferable)? I don't have any way of testing on those
OSes. I guess we can wait for other collaborators to see who would
take that on.

Phil

Andy Matuschak

unread,
Sep 6, 2009, 11:12:27 AM9/6/09
to Philippe Casgrain, Joe Osborn, Ian Henderson, pixe...@googlegroups.com
> Can you elaborate a little on what the "C data model" is? Document-
> writing (as in serialization)? Or just the base document model is a
> C-struct?

The latter. Before we understood the principles of "profile first" we
decided that Pixen must be slow because of the overhead in our Obj-C
data model and so PXImage and PXPalette became C structs. This was
really dumb.

The tiled data model is still structs, though it's actually fast.

> First question: What is a PXToolMatrix and why do I need it? It
> looks like objects of this class were stored in a nib file and there
> doesn't seem to be code to handle unarchiving of these objects.

I think we used to use this as a custom NSMatrix for the tool palette,
but we removed it. Where do you see it still being used?

> Second question: how do you feel about dropping support for 10.3 (at
> least) and 10.4 (preferable)? I don't have any way of testing on
> those OSes. I guess we can wait for other collaborators to see who
> would take that on.

I am absolutely in favor of 10.5-only.

—Andy

Philippe Casgrain

unread,
Sep 6, 2009, 11:49:08 AM9/6/09
to Andy Matuschak, Joe Osborn, Ian Henderson, pixe...@googlegroups.com

Le 09-09-06 à 11:12, Andy Matuschak a écrit :

>> Can you elaborate a little on what the "C data model" is? Document-
>> writing (as in serialization)? Or just the base document model is a
>> C-struct?
>
> The latter. Before we understood the principles of "profile first"
> we decided that Pixen must be slow because of the overhead in our
> Obj-C data model and so PXImage and PXPalette became C structs. This
> was really dumb.
>
> The tiled data model is still structs, though it's actually fast.

Ah. Gotcha.

>> First question: What is a PXToolMatrix and why do I need it? It
>> looks like objects of this class were stored in a nib file and
>> there doesn't seem to be code to handle unarchiving of these objects.
>
> I think we used to use this as a custom NSMatrix for the tool
> palette, but we removed it. Where do you see it still being used?

I'm not sure. It's in one of the nibs, but I don't know which one yet.
Starting the app, the debugger console fills up with messages like:

2009-09-06 11:31:06.469 Pixen[3616:10b] Unknown class PXToolMatrix in
Interface Builder file.

>> Second question: how do you feel about dropping support for 10.3
>> (at least) and 10.4 (preferable)? I don't have any way of testing
>> on those OSes. I guess we can wait for other collaborators to see
>> who would take that on.
>
> I am absolutely in favor of 10.5-only.

I would also say Intel-only, if only for the testing.

Phil

Joe Osborn

unread,
Sep 6, 2009, 2:34:57 PM9/6/09
to pixe...@googlegroups.com
OK, so I've updated the Github repo with all of the latest Pixen4
sources. The biggest changes are to the palette (which now lives in-
window and is generated automatically based on recent use of a color,
frequency of color use, and manual layout-- or something, this isn't
finished yet) and the base canvas data model (this uses that tiled
renderer I talked about earlier). This build also doesn't exhibit the
PXToolMatrix errors Philippe mentioned, and it only has about 46
warnings.

I think 10.5+ makes a lot of sense. I don't have any non-Intel
machines to test on either, so that might seal the architecture
question.

-Joe

Ian Henderson

unread,
Sep 6, 2009, 3:57:50 PM9/6/09
to Andy Matuschak, Philippe Casgrain, Joe Osborn, pixe...@googlegroups.com
On Sep 6, 2009, at 8:12 AM, Andy Matuschak wrote:

>> Can you elaborate a little on what the "C data model" is? Document-
>> writing (as in serialization)? Or just the base document model is a
>> C-struct?
>
> The latter. Before we understood the principles of "profile first"
> we decided that Pixen must be slow because of the overhead in our
> Obj-C data model and so PXImage and PXPalette became C structs. This
> was really dumb.
>
> The tiled data model is still structs, though it's actually fast.

Right now, for each pixel drawn, the function PXImage_setColorAtXY is
called once. We should look into this; I suspect it's responsible for
a lot of drawing overhead (especially if we switch the data model to
objc).

We should also completely remove NSImage from Pixen in as many places
as possible and draw directly from the PXImage, now that this is fast.

- Ian

Andy Matuschak

unread,
Sep 7, 2009, 2:54:59 AM9/7/09
to pixe...@googlegroups.com
> I would also say Intel-only, if only for the testing.

Yes. Actually, I kinda vote for 10.6-only. There's so much code to be
ripped out, and blocks would make that so much easier. Also GCD can be
leveraged to parallelize all the things that are not parallelized
right now.

—Andy

Jon

unread,
Sep 7, 2009, 9:23:16 PM9/7/09
to pixen-dev
I don't necessarily disagree, and I do have access to an Intel
machine, but I still use a quad G5 as my main machine. So I can do any
PPC testing we may need. But if you all want to go Intel only, that's
fine with me. It's just one more sign my G5 won't be practical much
longer. :(
Reply all
Reply to author
Forward
0 new messages