| <<<Back 1 day (to 2013/08/11) | 2013/08/12 |
Noldorin | ray_laptop, what's the dict stack? it includes userdict too? | 00:05.11 |
| i literally just started tinkering with ghostscript today, sorry. no experience with it! | 00:05.24 |
| hey rayjj | 02:09.38 |
| rayjj, presuming you're ray_laptop? | 02:09.55 |
djapo | can mupdf be launched from tty, without an xserver, similar to how xbmc can be launched without an xserver? | 05:01.09 |
kens | chrisl ping | 07:27.16 |
chrisl | kens: pong | 07:27.30 |
kens | RUn across a problem looking into this GenericResourceDir and wondering if you cna do a bisect for me. | 07:27.48 |
| THe reporter now says that his previous system was (probably) 8,61 which takes me further back | 07:28.09 |
| I *think* Ray may have introduced the problem back in 2008 | 07:28.21 |
| But I can't now build a version of GS that old under WIndows | 07:28.33 |
chrisl | I can try, I can't be sure of building under Unix, either! | 07:28.50 |
kens | The commit I'd like to try is 7a31db6d | 07:29.13 |
| I think that one may work | 07:29.18 |
| I suspect the problem commit is 34f0b7f0 | 07:29.51 |
| "Massive commit discussed before the freeze to move the PostScript initialization | 07:30.10 |
| files to Resource/Init." | 07:30.10 |
| There is oneother (also from Ray), slilghtly older which might be the problem too. | 07:31.10 |
chrisl | So, how do I test this crazy nonsense? | 07:31.24 |
kens | Not trivially | 07:31.31 |
| THere are instructions in bug #694509 | 07:31.49 |
| I believe what the GenericResourceDir with a relative path is meant to do is, in essence, allow multiple paths to be searched for resources (in a similar way as for lib files, fonts etc) | 07:32.45 |
chrisl | Hmm, what is "gsnd"? | 07:32.57 |
kens | ghs with -dNODISPLAYDEVICE | 07:33.06 |
| I had to look that one up too | 07:33.14 |
| you can ignore it and just use gs | 07:33.28 |
chrisl | Build failed..... | 07:34.03 |
kens | Bum :-( | 07:34.14 |
| Oh well, back to thinking about it I guess. THis of course is what happens if you use archaic versions and never upgrade. | 07:35.18 |
chrisl | Okay, little hacking, and it built - now to test it....... | 07:35.44 |
kens | You're doing better than me | 07:35.53 |
| I believe he has created a ProcSet, and simply enumerating it with resourceforall should show its presence *if* the paths thing is working | 07:36.29 |
| its supposed to find the additional GenericResourceDir by looking at all the paths in GS_LIB with 'GenericResourceDir' added | 07:37.07 |
| I am not sure whether this would work at all in WIndows I have to say, as you would end up with '../' in the middle of a path spec. | 07:37.36 |
chrisl | I think that would work on Windows, yes. | 07:38.46 |
kens | I'm not certain, I've never tried it. Bet it won't work on OS/2 though, or probably other OSs. | 07:39.16 |
chrisl | Okay, with the commit above (7a31db6d) I still get undefined resource | 07:39.22 |
kens | Hmmm. | 07:39.31 |
| let me try a little earlier | 07:39.41 |
| Last attempt try 5f7c14ea | 07:40.04 |
| THat's March 2006 | 07:40.18 |
| 8.61 was released in 2007 so that *should* work if what hte reporter says is correct | 07:41.25 |
chrisl | Building now - fingers crossed! | 07:42.46 |
kens | Not sure,some ways if it doesn't work I'd be happy, I'll just amend the documentation :-) | 07:43.07 |
| TO behonest I think this is of dubious value, I'm in rwo minds about even attempting to 'fix' it | 07:43.32 |
| Its clearly been broken for a very long time | 07:43.42 |
chrisl | Hmm, this version predates COMPILE_INITS | 07:44.04 |
kens | yes | 07:44.09 |
| THe COMPILE_INITS changes were another possible culprit | 07:44.21 |
| (they were done in 2008) | 07:44.52 |
chrisl | The problem is, how to run it without causing possible conflicts with what I'm testing...... | 07:44.55 |
kens | I'm not sure to be honest | 07:45.48 |
| COUld try a little later I suppose, I don't think that commit was likely to caus e problem | 07:46.25 |
| Or I could hunt for the 8.61 release tag | 07:46.38 |
| and test that ? | 07:46.46 |
chrisl | It will still have the problem, won't it? I've hacked the path in the makefile, rebuilding now | 07:47.12 |
kens | I htink 8.61 has COMPILE_INITS though | 07:47.28 |
| and its what the reporter (thinks) he was using | 07:47.39 |
| THe 8.61 release was 53edfe7281 | 07:48.06 |
chrisl | Bollocks, no fonts :-( | 07:49.02 |
kens | Do we care ? | 07:49.09 |
chrisl | Well, I was following his instructions...... | 07:49.31 |
| OKay, 5f7c14ea (apparently) works as he describes | 07:50.14 |
kens | But he doesn't mention fonts, what am I missing ? | 07:50.16 |
| ah! | 07:50.26 |
chrisl | He does "/Wingdings /Encoding findresource" for a "normal" case | 07:50.48 |
kens | Right, but tha'ts not a font | 07:50.58 |
| TO be honest I just did (*) {==} 256 string ProcSet resourceforall | 07:51.19 |
chrisl | Oh, right - well, no encodings either..... | 07:51.29 |
kens | I was going to ask if you could bisect it, but if it means hacking makefiles that's not practical | 07:52.10 |
chrisl | I'll give it a try - the makefile hack was trivial | 07:52.52 |
kens | Well, let me know if it starts taking up too much time, I'd like to see the code before it was broken, and what broke it | 07:53.16 |
| I think I'll go get a coffee... | 07:54.45 |
davidzweig | Hello. I am considering using MuPDF for a project. I was wondering if anyone knew the plans for annotation support in the iOS app. Thanks for the help. | 08:57.19 |
kens | paulgardiner that's a question for you and/or Tor I htink ? | 09:01.55 |
paulgardiner | kens: Yes. The problem is Tor is not here (unusually) and I don't know the answer. My belief is that we intend to add annotation support to the iOS app, but it has yet to come up as a priority. | 09:05.14 |
| davidzweig: Talking to Tor when he arrives would be a good idea, or catching henrys later. | 09:06.15 |
| davidzweig: What are your plans with MuPDF? | 09:10.59 |
chrisl | kens: I'm nearly finished with the bisect (I had to restart, due to a typo!) - but I need to go out for ~30 mins, will finish it when I get back, okay? | 09:26.42 |
kens | of course, thanks chrisl | 09:26.59 |
davidzweig | I'm hoping to use it software for publishing language learning materials, implementing audio-text highlighting and some interesting means of user interaction. I've been in contact with Scott Sackett about licencing. I know there's already a couple of functions that would need to be added to the library, have been in contact with Robin Watts about this too: Get the quadpoints out for an annotation, and to select an appearance | 09:45.25 |
paulgardiner | Right. Getting the quadpoints is easy enough. In what sense "select and appearance"? | 09:47.14 |
| tor7: Morning. davidzweig is asking about our plans as to annotation support in iOS. | 09:48.14 |
davidzweig | For the android platform, the MuPDF reader would be a good starting place for the code, but it seems annotation support is not yet implemented in the iOS reader. Annotaton support is present in the MuPDF library, so I guess the annotation support needs to be added at the level of the iOS-specific UI widget level.. | 09:49.16 |
tor7 | paulgardiner: morning. overslept a bit today... | 09:50.03 |
davidzweig | ;-) | 09:50.44 |
tor7 | davidzweig: we don't have any immediate plans to improve on the iOS application. doing so would not be too difficult given a motivated programmer who knows his way around the iOS frameworks. | 09:51.30 |
davidzweig | PDF annotations can have multiple possible appearances defined by appearance streams. One of the possible uses of this is alternative appearances when the mouse is over the annotation, or it is clicked. | 09:52.13 |
paulgardiner | davidzweig: Okay I understand now. We have some support for that. The Windows app handles mouse up/down appearance differences at least. | 09:53.09 |
tor7 | the iOS app has problems with the new iOS 7 beta that will need to be fixed. the new OS has introduced lots of incompatibilities and differences in how some things are handled automatically. | 09:53.14 |
davidzweig | The appearance state could also be set by calling a function, this is what we would use to activate a 'highlighted-state' for text. | 09:54.55 |
paulgardiner | davidzweig: Yes that would work nicely | 09:55.12 |
sebras | paulgardiner: I noticed that annotation hovering is not implemented in pdfapp unfortunately. :( | 09:56.29 |
paulgardiner | davidzweig: ... although the current mechanism is to send in mouse events and have the library handle apperance changes automatically | 09:56.52 |
davidzweig | The plans to make an iOS app are not immediate, and I could probably find someone to spend some time on improving annotation support to the iOS version, although it would make more sense if the person was already familiar with the code. | 09:58.35 |
paulgardiner | sebras: Priorities. When form support was mostly working, we moved on to annotations. When a few of the annotations were in place we moved on to signatures. I think the idea is to have at least some support for each of these rather than full support for one and none for the others. I'm sure henrys knows exactly what he's doing when it comes to setting prioities. | 10:01.18 |
davidzweig | I understand a function to set the annotation state would require a little work.. I'm guessing getting the quadpoints for an should be just a few lines of code. I'm just mailing Scott again, hopefully we can find a solution. :-) | 10:04.10 |
| *getting the quadpoints for an annotation | 10:04.47 |
| thanks for the info :-) | 10:05.21 |
paulgardiner | davidzweig: Another way, rather than the app having to keep track of the positions of annotations, determine whether the mouse is over one and set the highlight state, would be to send mouse move event to MuPDF via pdf_pass_event and have it determine the appearance change. | 10:09.32 |
| I'm not sure which way is best. | 10:09.42 |
| The one I just described is what I've had planned. | 10:09.58 |
davidzweig | Interesting idea. I will think this through. | 10:16.56 |
| I have a couple of things to take care of, will post back later in the day. | 10:27.17 |
chrisl | kens: the git bisect isn't (yet) conclusive - it throws up commit a2d599de - "Enable COMPILE_INITS by default in the autoconf build", but I can't see how that commit would cause the issue | 10:48.25 |
kens | chrisl unless having COMPILE_INITS changes the behaviour, no.... | 10:53.33 |
| Having it 1 that is | 10:53.44 |
chrisl | kens: well, it clearly does change the behaviour with the default build, hence bisect finding it. I would need to repeat the bisect always setting COMPILE_INITS=1 | 10:55.03 |
kens | yeah that would be tedious | 10:55.19 |
chrisl | Trouble is, there seemed to be more than one commit related to COMPILE_INITS before it became the default, so..... | 10:56.08 |
kens | Hmm, I guess I can see how the behviour differs if COMPILE_INITS is 1 | 11:02.40 |
| Well, ray seems to have done all (or the very large majority) of the changes that 'might' have impacted this, so I think I'm going to reassign it to him. Given that nopbody else has noticed in 7 years that this is broken, I;m inclined to think that we should just remove the relative path behaviour from the doucmentation. If you want to have custom'per-user' resources, then you need to include all the standard GS resources. | 11:10.20 |
chrisl | kens: Well, I've come this far, I'll see if I can narrow down the *actual* commit | 11:15.33 |
kens | chrisl, OK well I won't put what I was writing in the bug thread yet then :-) | 11:15.57 |
chrisl | kens: good - there are some confusing differences in the builds going back this far, so might get p*ssed off before I find the commit! | 11:16.58 |
kens | Let me know when you've had enough and I'll press the 'Save CHanges' button :-) | 11:17.30 |
chrisl | kens: I have now given up - getting a segfault from mkromfs (I suspect because I'm on a 64 bit system). | 11:23.46 |
kens | OK time to say enough then. I've put the information in the thread and I'm re-assigningto to Ray with a recommendation that we deprecate the behaviour of relative paths in GenericResourceDir and remove teh documentation. I believe the effor tin fixing it greatly outweighs any marginal benefit | 11:28.01 |
Noldorin | hi rayjj | 12:00.53 |
kens | Noldorin he won'r be here really, its only 4 am in California | 12:01.17 |
Noldorin | kens, ah okay. didn't know he was in US, fair enough | 12:01.30 |
| well, maybe your or someone else can answer my question. | 12:01.50 |
kens | Possibly :-) | 12:01.59 |
Noldorin | i'm looking to provide a default value for a systemdict definition, if it hasn't been set (via a -dNAME switch on the commandl ine) | 12:02.29 |
| how can i do this? | 12:02.32 |
kens | Basically, you cna't, susyemdict is not writeable after startup | 12:02.56 |
| You can do something else though, possibly | 12:03.06 |
| You really need to tell me what you want to do in this situation, and why | 12:03.35 |
| you cna put PostScript constructs such as : | 12:04.38 |
| systemdict /NamedKey known {..what to do if it is...}{..what to do if it isn't...} ifelse | 12:04.38 |
chrisl | I normally check if the value exists in systemdict, and if it does "copy" the definition to userdict, if it doesn't exist in systemdict, set a default value in userdict, and all subsequent uses access the userdict value | 12:06.32 |
kens | yes, that's another possibility | 12:06.55 |
| Like I said, 'need more information' :-) | 12:07.15 |
| back in a moment | 12:08.08 |
Noldorin | sure | 12:14.53 |
| chrisl, that sounds like exactly what i want | 12:15.06 |
| chrisl, mind sharing your code? :) | 12:15.12 |
chrisl | Noldorin: I would, but I don't have anything handy - it's so straight forward, I don't keep it | 12:26.52 |
Noldorin | yeah, i'm just tinkering with ghostscript, that's the thing | 12:27.13 |
| haven't looked at the language properly yet even | 12:27.20 |
| just playing around | 12:27.22 |
chrisl | Noldorin: as kens intimated, look up the "known" operator in the PLRM, and also the "where" operator might be useful | 12:28.05 |
Noldorin | right | 12:28.39 |
| chrisl, all operators in ghostscript/postscript are postfix, it would seem? | 12:28.51 |
chrisl | Noldorin: yes, PS is a stack based language | 12:29.19 |
Noldorin | right | 12:29.26 |
| chrisl, and GS code is a proper superset of PS code? | 12:30.05 |
kens | GS is a PostScript inerpreter | 12:30.19 |
| Not a separate language | 12:30.31 |
chrisl | To langauge level 3 | 12:30.38 |
Noldorin | oh | 12:31.24 |
| kens, it's the most common though i suppose? | 12:31.40 |
| chrisl, language level 3? what's that, like the full feature set? | 12:31.49 |
kens | Ghostscript is (probably) the only open sourcde PostScript interpreter still around | 12:31.58 |
| THere are thre versions of the spec, levels 1 to 3 | 12:32.13 |
| adding extra features | 12:32.20 |
| level 1 is the original, level 2 cmae later, 3 is the mot recent | 12:32.32 |
Noldorin | got it | 12:33.23 |
| ta | 12:34.11 |
kens | You're welcome | 12:34.17 |
chrisl | Noldorin: I'd do something like this: http://pastebin.com/S50GXmWG | 12:36.26 |
| Usual disclaimers about lack of testing etc apply! | 12:37.06 |
Noldorin | ah interesting. looks sensible | 12:37.21 |
| chrisl, what does the 3 -1 roll do? | 12:37.25 |
chrisl | Gets the operand stack into the correct order for the "put" operator | 12:37.46 |
kens | Id the stack has the objects a b c it rolls them to leave b c a | 12:38.26 |
| 3 1 roll would produce c a b | 12:38.40 |
chrisl | Noldorin: I'd strongly urge you to download the Postscript reference manual - you probably won't get far without it! | 12:39.09 |
Noldorin | chrisl: already have, but i've said to myself i'm hacking here, and i don't have time to learn PS properly now. maybe in a few weeks! | 12:40.41 |
| but got it, thanks | 12:41.07 |
chrisl | Noldorin: if you haven't found it, towards the end of the PLRM, there's a really nice "cheat sheet" for the PS operators - "Operator Details" | 12:42.11 |
Noldorin | ah excellent | 12:42.20 |
| cheatsheets are good, even for now | 12:42.31 |
chrisl | It's actually a little more than a cheat sheet, but it's in alphabetical order, and the descriptions are mostly brief and easy to follow | 12:44.08 |
Noldorin | right | 12:45.27 |
| chrisl, incidentally, is it possible to put that code you pastebinned into a function of sorts? | 12:45.46 |
kens | "/FunctionName {...contents...} bind def" | 12:46.39 |
| We'll skip early and late name binding for now.... | 12:47.04 |
chrisl | Strictly speaking it would be a procedure.... | 12:48.36 |
Noldorin | kens, hah yeah, just as well. i'll need to read a guide/tutorial at some point on postscript, to get me going | 12:48.45 |
| kens: seems putting that code into a function/procedure would actually be a little tricky to do for an arbitrary systemdict name | 12:49.12 |
kens | The Blue book and the green book are useful (the language refernce is the red book) | 12:49.17 |
| Noldorin, so you pass the parameter on teh stack | 12:49.35 |
Noldorin | the problem is it is referred to multiple times... | 12:50.18 |
kens | dup copies an object on the stack | 12:50.31 |
Noldorin | kens, hmm? the language reference i just downloaded from Adobe; is that not the one? | 12:50.36 |
kens | as do index and copy, though in different ways | 12:50.43 |
| Noldorin that's the red book | 12:51.29 |
| http://www-cdf.fnal.gov/offline/PostScript/GREENBK.PDF | 12:52.01 |
Noldorin | kens, http://partners.adobe.com/public/developer/ps/sdk/sample/index_psbooks.html for the green and blue? | 12:52.11 |
kens | http://www-cdf.fnal.gov/offline/PostScript/BLUEBOOK.PDF | 12:52.29 |
Noldorin | thanks | 12:52.39 |
kens | There's also the black-and-white4 book for fonts but you should not need that | 12:53.00 |
Noldorin | yeah, i do hope not :) | 12:56.28 |
| these ones look good | 12:56.43 |
| green and blue that is | 12:56.45 |
| some code samples too even | 12:56.48 |
kens | indeed, they are a useful starting poitn and illustrate some confusing areas of hte language | 12:57.08 |
chrisl | Noldorin: here is the same basic code munged into a procedure: http://pastebin.com/UMJRrFvP | 13:09.13 |
| Noldorin: the last two lines are an example call to the procedure, and showing that it did what we intended | 13:09.55 |
Noldorin | ah cool | 13:10.18 |
| i think it makes sense yeagh | 13:10.21 |
| chrisl, except for the " == flush"⦠what does that do? | 13:10.28 |
kens | '==' prints a representation of what's on teh stack, flush flushes a stream, in thic case stdout | 13:11.12 |
| I shoudl say prints a representation of the topmost element on the stack | 13:11.34 |
Noldorin | ah right | 13:11.56 |
chrisl | So that line gets the value from userdict and dumps it to stdout | 13:12.09 |
Noldorin | kens, so == is the command of importance for debugging purposes? though i preusme there are others too... | 13:12.18 |
kens | Its a useful operator | 13:12.31 |
| "{== ==} forall " is useful for dumpin array contents | 13:12.58 |
| plain old 'print' is good too | 13:13.06 |
chrisl | kens: "{== ==} forall " for dictionaries - "{==} forall " for arrays...... | 13:13.48 |
kens | Sorry yes, I meant dictionaries | 13:14.03 |
chrisl | Although, I prefer "{exch == ==} forall " | 13:14.15 |
Noldorin | ah | 13:23.08 |
| so what's the diff between == and print? | 13:23.13 |
chrisl | "print" prints a string object, "==" takes any object type | 13:24.33 |
| "==" is sort of equivalent to "1024 string cvs print" (the 1024 is just an arbitrary value hopefully producing a large enough string to print any object) | 13:26.04 |
Noldorin | string converts the top item on the stack to a string simply? | 13:35.06 |
| and cvs⦠? | 13:35.07 |
kens | string creates a string object, cvs converts object to string | 13:35.32 |
chrisl | These operators are all in the PLRM, covered in the section I indicated earlier....... | 13:36.17 |
| going out for a while - back in a couple of hours | 13:41.59 |
kens | bye | 13:42.04 |
henrys | kens:sigh bug reported against patched gs... | 16:02.58 |
kens | henrys yes, but it goes worng on clean source | 16:06.54 |
| it looks like another interpolation bug with 1bpp output to me | 16:07.11 |
| SO I believe Marcos' patch fixes the original problem, which simply reveals another problem previously masked | 16:08.09 |
henrys | kens:I'll followup today | 16:09.48 |
kens | OK thanks, between thatr, our Indian friends and Mr Flack, I've had more than enough today :-( | 16:10.10 |
henrys | indeed | 16:10.54 |
| I guess you could have suggested using the bbox device for a first pass... | 16:11.23 |
kens | henrys for the page sizes ? Yes that would work too, but I expect they will come back with a landscape page rotated onto portrait media, so I htought I shoudl be more thorough | 16:12.12 |
| anyway, I'm off, goodnight all | 16:14.09 |
ray_laptop | mvrhel: OK change running. I'll be back after picking up my son and look at the bmpcmp | 18:34.55 |
cinch | have there been bug reports/problems with the new ghostscript 9.08 rc1? i'm tempted to deploy it for pdf to jpg conversion | 18:42.56 |
mvrhel | ray_laptop: ok sounds good | 18:45.24 |
| cinch: not that I am aware of | 18:45.44 |
chrisl | cinch: what problems are you seeing? | 18:55.29 |
| cinch: oh, you haven't tried the RC? | 18:56.01 |
cinch | chrisl, couple of bugs where gs crashes on 9.07. they're fixed in the git version | 18:56.06 |
| chrisl, nah but i'll try it out | 18:56.23 |
chrisl | cinch: well, I'm probably going to do the final 9.08 release before the end of the week, so by all means try out the RC (please do, in fact), but might as well wait two or three days for the full release before deploying fully | 18:57.27 |
| okay, I'm off now - I've just worked myself in a circle and am right back where I was a half hour ago :-( | 19:01.45 |
Gigs- | Is SeparationColorNames case sensitive? | 19:06.06 |
mvrhel | Gigs- : I would expect it to be | 19:06.59 |
| but I would have to test | 19:07.07 |
cinch | chrisl_away, good to hear the release is out soon :) i just deployed rc1 partially, should see some good testing of it | 19:07.10 |
Gigs- | ok, thanks | 19:08.03 |
ray_laptop | mvrhel: I'm looking at the bmpcmp results. Looks pretty much as expected. Softmask shades are a bit "darker" in the difference areas. *only* 431 differences. A smattering of files, but includes 12 of the PDF FTS files | 19:31.32 |
mvrhel | ray_laptop: oh great! | 19:35.50 |
mvrhel_laptop | yes. they are just a bit darker, and probably easily missed in initial review | 19:37.35 |
| it would be nice to squeeze this fix in the new release | 19:39.03 |
ray_laptop | OK. 690777.pdf needs to be looked into. It is a LOT darker than Adobe. The original was much closer | 19:41.31 |
mvrhel | ray_laptop: ok. I am heading home for lunch I will be back on line this afternoon to help you. Just go done writing a little shell script for my raspberry timing tests. | 19:49.04 |
| s/go/got/ | 19:49.12 |
ray_laptop | OK. made it all the way through the bmpcmp. That's the only one that I don't like. | 20:03.17 |
| I have to get lunch as well. Look at it in a bit. | 20:07.22 |
toothrot | I see the text extraction code has recently been worked on, does anyone know if any work on this "TODO: smart sorting of blocks in reading order" is underway at all? | 23:14.10 |
sebras | toothrot: usually the main mupdf developers are active during european daytime. so you might have to wait for an answer. | 23:15.51 |
| toothrot: just so you are not surprised. :) | 23:16.08 |
mvrhel_laptop | ray_laptop: so the thing of interest is the Note on page 550 and 551 | 23:23.09 |
| but let me try the file now | 23:24.16 |
ray_laptop | mvrhel: OK. checking the docs... | 23:38.53 |
mvrhel_laptop | ray_laptop: I have to head out now. I will work on this more this evening | 23:40.29 |
ray_laptop | mvrhel: OK. | 23:40.56 |
mvrhel_laptop | I ran it with and without your change and have the raw dumps | 23:41.05 |
| I should be able to track this down | 23:41.11 |
toothrot | sebras, thanks for the heads up. | 23:48.51 |
| Forward 1 day (to 2013/08/13)>>> | |