On Tue, Jun 7, 2011 at 11:37 PM, Brad Fitzpatrick <brad...@golang.org> wrote:
> We should move this thread to the Camlistore mailing list.
> But in a nutshell: a lot of the UI stuff is very new (last few hours - last
> 2 weeks) & still incomplete. Let's talk about what you need next on the
> list.
> On Tue, Jun 7, 2011 at 2:21 PM, Mathieu Lonjaret
> <mathieu....@gmail.com> wrote:
>>
>> Ok, it took me a while to find out that I had to change the hardcoded
>> pass for the db in the dev-server script as well, not only in the json
>> config file.
>> from the web ui, it seems like I can upload files, but the "New"
>> button to create an item or a collection doesn't seem to do anything.
>> And after some poking around everywhere in the ui, I have that in the
>> blobs:
>>
>> +-----------------------------------------------+---------+----------------------------------+
>> | blobref | size | type
>> |
>>
>> +-----------------------------------------------+---------+----------------------------------+
>> | sha1-ad87ca5c78bd0ce1195c46f7c98e6025abbaf007 | 448 |
>> text/x-openpgp-public-key |
>> | sha1-f8f964331808fa428de001cf47f107fa5970adc0 | 218 |
>> application/json; camliType=file |
>> | sha1-04f36957b2eb157513d38498a2b98808da9b9bc1 | 164375 | image/jpeg
>> |
>> | sha1-496f546f8c6a1444c0944cecc942b5dc4c74317a | 1048576 | image/jpeg
>> |
>> | sha1-8df06bb9f431334b04a1739a2144480153997aae | 317 |
>> application/json; camliType=file |
>> | sha1-be07712f747b2a7274eb3d80c3ba9b9754d1eb05 | 517529 | NULL
>> |
>> | sha1-a1e5159e74514d07a24fee08b2e6d6d0c759f446 | 1843 | image/jpeg
>> |
>> | sha1-8c52a96b8e0db4a3469ab7e4291e27787e8a1d0f | 11372 | NULL
>> |
>> | sha1-ade916e311ddb65b8c21a768afb99e72c3df003c | 7399 | NULL
>> |
>> | sha1-144be469e6ed46d146b7081bb12045296d87036b | 1562 | NULL
>> |
>> | sha1-a9b64a871368a64b763187788caabd8b11193d29 | 3875 | NULL
>> |
>> | sha1-3864f707027d138449025ef8704344ce5571f2a3 | 1150 | NULL
>> |
>> | sha1-37ed9d5b97dcf99f76200495baf58fb86516881c | 10487 | NULL
>> |
>> | sha1-cf4f9da7516f669502f2c656e6698c7ff152e393 | 4366 | NULL
>> |
>> | sha1-99683a5ea6dde7c6e9ce82cde5c3ab68af2d279f | 5099 | NULL
>> |
>> | sha1-3045a3b700382f752866eb82287ad332c93c4b09 | 575 |
>> application/json; camliType=file |
>> | sha1-8b3d3b07901dddb9ec44ccfaa86adc9bef40c421 | 16553 | NULL
>> |
>> | sha1-54cc7761804bcf66de77bc5af4f080d480ea5757 | 281 |
>> application/json; camliType=file |
>> | sha1-358c9411a38208eb9be3a3fbf7f9511b9ae62c9b | 630 |
>> application/json; camliType=file |
>>
>> +-----------------------------------------------+---------+----------------------------------+
>>
>> am I doing something wrong or is that how it is supposed to be at the
>> moment?
>
>
I'm in GMT+2 atm. I'll have a couple hours free in an hour or so.
I should have more time tomorrow, starting at around 19:00 GMT (and
sporadically before).
> On Wed, Jun 8, 2011 at 10:38 AM, Brad Fitzpatrick <br...@danga.com> wrote:
>>
>> For now I'd focus on the permanode.{html,js} page in the UI.
>> It should be possible to drag & drop or (multi-)upload photos into a
>> gallery, creating new permanodes for each, and adding new "child" attributes
>> for each child photo in the gallery. I'm working on some of that right now,
>> so perhaps you should focus on the image-specific stuff. Note the existing
>> download handler that reconstructs a byte stream from a massively cut up
>> "file" schema blob. You should probably make something like that for
>> resized thumbnails taking maxw and maxh query parameters. And ideally
>> without imagemagick, since we want this to run on Linux, Windows, App
>> Engine, Mac, etc.
>> That work for a starter project?
sounds fun. However I think we're not gonna go far without imagemagick
or an equivalent as afaik the standard img lib is quite far from being
there yet (they can't decode just any jpeg, I retried a few days ago),
and there's no project that does image rescaling natively afaik. I had
started one but I had stalled to work on more pressing things. I guess
maybe it's time I restarted on that.
On Wed, Jun 8, 2011 at 7:39 PM, Brad Fitzpatrick <br...@danga.com> wrote:I'm in GMT+2 atm. I'll have a couple hours free in an hour or so.
> What time zone are you in? Perhaps we could hack on this together sometime
> over IM in the next day or so?
I should have more time tomorrow, starting at around 19:00 GMT (and
sporadically before).
sounds fun. However I think we're not gonna go far without imagemagick
> On Wed, Jun 8, 2011 at 10:38 AM, Brad Fitzpatrick <br...@danga.com> wrote:
>>
>> For now I'd focus on the permanode.{html,js} page in the UI.
>> It should be possible to drag & drop or (multi-)upload photos into a
>> gallery, creating new permanodes for each, and adding new "child" attributes
>> for each child photo in the gallery. I'm working on some of that right now,
>> so perhaps you should focus on the image-specific stuff. Note the existing
>> download handler that reconstructs a byte stream from a massively cut up
>> "file" schema blob. You should probably make something like that for
>> resized thumbnails taking maxw and maxh query parameters. And ideally
>> without imagemagick, since we want this to run on Linux, Windows, App
>> Engine, Mac, etc.
>> That work for a starter project?
or an equivalent as afaik the standard img lib is quite far from being
there yet (they can't decode just any jpeg, I retried a few days ago),
and there's no project that does image rescaling natively afaik. I had
started one but I had stalled to work on more pressing things. I guess
maybe it's time I restarted on that.
ok, thanks.
>> > On Wed, Jun 8, 2011 at 10:38 AM, Brad Fitzpatrick <br...@danga.com>
>> > wrote:
>> >>
>> >> For now I'd focus on the permanode.{html,js} page in the UI.
>> >> It should be possible to drag & drop or (multi-)upload photos into a
>> >> gallery, creating new permanodes for each, and adding new "child"
>> >> attributes
>> >> for each child photo in the gallery. I'm working on some of that right
>> >> now,
>> >> so perhaps you should focus on the image-specific stuff. Note the
>> >> existing
>> >> download handler that reconstructs a byte stream from a massively cut
>> >> up
>> >> "file" schema blob. You should probably make something like that for
>> >> resized thumbnails taking maxw and maxh query parameters. And ideally
>> >> without imagemagick, since we want this to run on Linux, Windows, App
>> >> Engine, Mac, etc.
>> >> That work for a starter project?
>>
>> sounds fun. However I think we're not gonna go far without imagemagick
>> or an equivalent as afaik the standard img lib is quite far from being
>> there yet (they can't decode just any jpeg, I retried a few days ago),
>
> Oh? It should be able to. If you find one it can't, that's a bug. It'll
> be fixed. A bunch of work on the images packages and a compression bug
> affecting images was fixed in the past few weeks.
well, maybe I was unlucky, but with the first image I had tried (just
wanted to decode it to get its width and height), I hit one of those
two errors (can't remember which one exactly).
UnsupportedError("luma downsample ratio")
UnsupportedError("chroma downsample ratio")
(src/pkg/image/jpeg/reader.go:162)
>> and there's no project that does image rescaling natively afaik. I had
>> started one but I had stalled to work on more pressing things. I guess
>> maybe it's time I restarted on that.
>
> I thought somebody did it already. I'll look around. Using imagemagick
> just isn't interesting enough, severely limiting where we can run.
if you don't find anything, I had some very basic stuff working here I think:
https://bitbucket.org/mpl/scale/src/eed2a83bd9a5/scale.go
ah, and I've just found the thread where some guy announced he had
made some bindings for GD. And Nigel Tao says there's some resizing
going on in moustachio:
http://code.google.com/p/appengine-go/source/browse/example/moustachio/resize/resize.go
Since I was on my home machine where some of the ui stuff isn't
working (even after fresh pull from both go and camlistore) -
specifically the button to create a permanode doesn't seem to do
anything - I was trying to figure out what's wrong before I can go on.
So far, I've followed it it as far as into camliSigDiscovery
(camli.js) where I don't see any problem, but I don't know much
javascript so I'm not sure.
gotta crash to bed, ttyl.
here's the first draft for the thumbnail handler:
(I wasn't comfortable directly committing directly to camlistore git
as this is still a wip; it's not tested but it compiles).
https://github.com/mpl/camlistuff
The two main questions I have:
1) Do I store the newly created thumbnail as a new permanode in camli
(I think you mentionned that, not sure anymore), so we can reuse it
later? or do we just serve it and forget about it?
2) how do we go about the resize "package" that I created but that is
directly extracted from moustachio? Do we keep it inside? Do I ask the
moustachio guys if they think it would be a good idea that I make an
official external package out of it so they (and us) can import and
reuse it as is? or do I extract the minimum that we actually need and
have it as a new func somewhere?
Cheers,
Mathieu
Hi,
here's the first draft for the thumbnail handler:
(I wasn't comfortable directly committing directly to camlistore git
as this is still a wip; it's not tested but it compiles).
https://github.com/mpl/camlistuff
The two main questions I have:
1) Do I store the newly created thumbnail as a new permanode in camli
(I think you mentionned that, not sure anymore), so we can reuse it
later? or do we just serve it and forget about it?
2) how do we go about the resize "package" that I created but that is
directly extracted from moustachio? Do we keep it inside? Do I ask the
moustachio guys if they think it would be a good idea that I make an
official external package out of it so they (and us) can import and
reuse it as is? or do I extract the minimum that we actually need and
have it as a new func somewhere?
to answer your question:
> Where do you call serveThumbnail? It's defined, but not dispatched to.
Yep, haven't done that yet. will do right after I address your other comments.
I reworked all that on the fork I made on github.
I tried testing from the ui (hacked a bit of blobinfo*) but the
results were erratic since I don't grok well the js yet. However,
things went well when trying a few cases directly from the url bar.
(after having uploaded a pic and directly using its sha-1 in the url).
I also got another jpeg decoding error (the decoder can't handle yet
"progressive mode", whatever that is) with one of the pics I tried.
https://github.com/mpl/camlistore
Do you want me to make a pull request from github?
Also, how do you keep in sync your repo on github and the one reached
through gitosis on camlistore.org ?
I used misc/codereview/git-cl, I hope that's what you meant.
As a next step and a sort of proof of concept, I was thinking I could
try and hack on blobinfo.*, so that instead of the filename (as the
text for the link to download the pic), the thumbnail for the pic
would be displayed. How does that sound?
Unless you already have another idea of a direction for me to follow
of course...
Mathieu
Thanks and sorry about the noise.
I'm not sure what's going on with git/gerrit but ./misc/review is
bugging me atm. I do have have the commit-msg hook (it worked fine the
last time), and yet I get this error:
mpl@yggdrasil:~/camlistore$ ./misc/review
Counting objects: 77, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (44/44), done.
Writing objects: 100% (44/44), 5.23 KiB, done.
Total 44 (delta 23), reused 0 (delta 0)
remote: Resolving deltas: 13% (3/23)
remote: ERROR: missing Change-Id in commit message
remote: Suggestion for commit message:
remote: thumbnail support
remote:
remote: Change-Id: If7a96adc42d3dc6088b5780a8e319d37ce6fadc4
To ssh://m...@camlistore.org:29418/camlistore
! [remote rejected] HEAD -> refs/for/master (missing Change-Id in
commit message)
and I do have that in top of my git log:
commit 03604e4c3011bcb32fa4e97a53d0ae865d1d0216
Author: mpl <mathieu....@gmail.com>
Date: Fri Jun 17 13:35:32 2011 +0200
use thumbnail in blobinfo
Change-Id: I48722b88ec4f2c80b689034df1c0e3fd5132b36c
Since I gotta run and I'm not sure how much connectivity I'll have in
the next couple of days, here's the blobinfo.js attached.
Anecdote that may help: we tried to switch on the "Force Change-Id" on
my company's internal gerrit when we were already deep in git history,
and found that this didn't really work because when you push to gerrit
it often, for whatever reason, inspects older commits you depend on as
well as your current commit, and the older commits don't have Change-Id
on them, so it fails.
I don't know if you can wait for a few months after everyone has used
Change-Id exclusively and then turn it on, but certainly in my
experience just switching it on suddenly as soon as you start using
Change-Id doesn't seem to work right.
Maybe someone who knows more about the internals of gerrit could explain
why it behaves this way; I can only tell you what I observed from the
outside. :)
I should have some more time tomorrow evening/night GMT-ish. Shall we
discuss the next steps?
As far as I can see from the ui it seems like changing the type (to
collection/gallery for example) doesn't do anything atm. Shall I try
and address that? I have no idea (yet) what's already done to get that
working though.
Mathieu
here are the changes for searching the permanodes by tag, as we discussed:
https://github.com/mpl/camlistore/commit/ea22b2fbf45ab797701125e56ee5f5c6d88abee6
at first I had created a new table with an index as you had advised,
but when I saw your latest changes I figured I could directly reuse
signerattrvalue since it seems suitable enough. I'm probably missing a
performance issue with that though. If that's the case, couldn't we
just add another index to signerattrvalue instead of creating a new
table? I need to read some more about sql indexes...
also, the silly changes to the .js/.html are not what I'm proposing of
course, they're just a means of testing the go stuff.
Cheers,
Mathieu