IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<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 ping07:27.16 
chrisl kens: pong07: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 back07:28.09 
  I *think* Ray may have introduced the problem back in 200807:28.21 
  But I can't now build a version of GS that old under WIndows07: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 7a31db6d07:29.13 
  I think that one may work07:29.18 
  I suspect the problem commit is 34f0b7f007:29.51 
  "Massive commit discussed before the freeze to move the PostScript initialization07: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 trivially07:31.31 
  THere are instructions in bug #69450907: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 -dNODISPLAYDEVICE07:33.06 
  I had to look that one up too07:33.14 
  you can ignore it and just use gs07: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 me07:35.53 
  I believe he has created a ProcSet, and simply enumerating it with resourceforall should show its presence *if* the paths thing is working07:36.29 
  its supposed to find the additional GenericResourceDir by looking at all the paths in GS_LIB with 'GenericResourceDir' added07: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 resource07:39.22 
kens Hmmm.07:39.31 
  let me try a little earlier07:39.41 
  Last attempt try 5f7c14ea07:40.04 
  THat's March 200607:40.18 
  8.61 was released in 2007 so that *should* work if what hte reporter says is correct07: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' it07:43.32 
  Its clearly been broken for a very long time07:43.42 
chrisl Hmm, this version predates COMPILE_INITS07:44.04 
kens yes07:44.09 
  THe COMPILE_INITS changes were another possible culprit07: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 honest07:45.48 
  COUld try a little later I suppose, I don't think that commit was likely to caus e problem07:46.25 
  Or I could hunt for the 8.61 release tag07: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 now07:47.12 
kens I htink 8.61 has COMPILE_INITS though07:47.28 
  and its what the reporter (thinks) he was using07:47.39 
  THe 8.61 release was 53edfe728107: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 describes07: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" case07:50.48 
kens Right, but tha'ts not a font07:50.58 
  TO be honest I just did (*) {==} 256 string ProcSet resourceforall07: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 practical07:52.10 
chrisl I'll give it a try - the makefile hack was trivial07: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 it07: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 chrisl09: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 nicely09: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 automatically09: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 annotation10: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 issue10:48.25 
kens chrisl unless having COMPILE_INITS changes the behaviour, no....10:53.33 
  Having it 1 that is10: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=110:55.03 
kens yeah that would be tedious10: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 111: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* commit11: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 benefit11:28.01 
Noldorin hi rayjj 12:00.53 
kens Noldorin he won'r be here really, its only 4 am in California12:01.17 
Noldorin kens, ah okay. didn't know he was in US, fair enough12: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 startup12:02.56 
  You can do something else though, possibly12:03.06 
  You really need to tell me what you want to do in this situation, and why12: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...} ifelse12: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 value12:06.32 
kens yes, that's another possibility12:06.55 
  Like I said, 'need more information' :-)12:07.15 
  back in a moment12:08.08 
Noldorin sure12:14.53 
  chrisl, that sounds like exactly what i want12: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 it12:26.52 
Noldorin yeah, i'm just tinkering with ghostscript, that's the thing12:27.13 
  haven't looked at the language properly yet even12:27.20 
  just playing around12:27.22 
chrisl Noldorin: as kens intimated, look up the "known" operator in the PLRM, and also the "where" operator might be useful12:28.05 
Noldorin right12:28.39 
  chrisl, all operators in ghostscript/postscript are postfix, it would seem?12:28.51 
chrisl Noldorin: yes, PS is a stack based language12:29.19 
Noldorin right12:29.26 
  chrisl, and GS code is a proper superset of PS code?12:30.05 
kens GS is a PostScript inerpreter12:30.19 
  Not a separate language12:30.31 
chrisl To langauge level 312:30.38 
Noldorin oh12: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 around12:31.58 
  THere are thre versions of the spec, levels 1 to 312:32.13 
  adding extra features12:32.20 
  level 1 is the original, level 2 cmae later, 3 is the mot recent12:32.32 
Noldorin got it12:33.23 
  ta12:34.11 
kens You're welcome12:34.17 
chrisl Noldorin: I'd do something like this: http://pastebin.com/S50GXmWG12:36.26 
  Usual disclaimers about lack of testing etc apply!12:37.06 
Noldorin ah interesting. looks sensible12: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" operator12:37.46 
kens Id the stack has the objects a b c it rolls them to leave b c a12:38.26 
  3 1 roll would produce c a b12: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, thanks12: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 excellent12:42.20 
  cheatsheets are good, even for now12: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 follow12:44.08 
Noldorin right12: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 going12:48.45 
  kens: seems putting that code into a function/procedure would actually be a little tricky to do for an arbitrary systemdict name12: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 stack12:49.35 
Noldorin the problem is it is referred to multiple times...12:50.18 
kens dup copies an object on the stack12: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 ways12:50.43 
  Noldorin that's the red book12:51.29 
  http://www-cdf.fnal.gov/offline/PostScript/GREENBK.PDF12: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.PDF12:52.29 
Noldorin thanks12:52.39 
kens There's also the black-and-white4 book for fonts but you should not need that12:53.00 
Noldorin yeah, i do hope not :)12:56.28 
  these ones look good12:56.43 
  green and blue that is12:56.45 
  some code samples too even12:56.48 
kens indeed, they are a useful starting poitn and illustrate some confusing areas of hte language12:57.08 
chrisl Noldorin: here is the same basic code munged into a procedure: http://pastebin.com/UMJRrFvP13:09.13 
  Noldorin: the last two lines are an example call to the procedure, and showing that it did what we intended13:09.55 
Noldorin ah cool13:10.18 
  i think it makes sense yeagh13: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 stdout13:11.12 
  I shoudl say prints a representation of the topmost element on the stack13:11.34 
Noldorin ah right13:11.56 
chrisl So that line gets the value from userdict and dumps it to stdout13: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 operator13:12.31 
  "{== ==} forall " is useful for dumpin array contents13:12.58 
  plain old 'print' is good too13:13.06 
chrisl kens: "{== ==} forall " for dictionaries - "{==} forall " for arrays......13:13.48 
kens Sorry yes, I meant dictionaries13:14.03 
chrisl Although, I prefer "{exch == ==} forall "13:14.15 
Noldorin ah13:23.08 
  so what's the diff between == and print?13:23.13 
chrisl "print" prints a string object, "==" takes any object type13: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 string13: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 hours13:41.59 
kens bye13:42.04 
henrys kens:sigh bug reported against patched gs...16:02.58 
kens henrys yes, but it goes worng on clean source16:06.54 
  it looks like another interpolation bug with 1bpp output to me16:07.11 
  SO I believe Marcos' patch fixes the original problem, which simply reveals another problem previously masked16:08.09 
henrys kens:I'll followup today16:09.48 
kens OK thanks, between thatr, our Indian friends and Mr Flack, I've had more than enough today :-(16:10.10 
henrys indeed16: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 thorough16:12.12 
  anyway, I'm off, goodnight all16:14.09 
ray_laptop mvrhel: OK change running. I'll be back after picking up my son and look at the bmpcmp18: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 conversion18:42.56 
mvrhel ray_laptop: ok sounds good18:45.24 
  cinch: not that I am aware of18: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 version18:56.06 
  chrisl, nah but i'll try it out18: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 fully18: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 be19:06.59 
  but I would have to test19:07.07 
cinch chrisl_away, good to hear the release is out soon :) i just deployed rc1 partially, should see some good testing of it19:07.10 
Gigs- ok, thanks19: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 files19: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 review19:37.35 
  it would be nice to squeeze this fix in the new release19:39.03 
ray_laptop OK. 690777.pdf needs to be looked into. It is a LOT darker than Adobe. The original was much closer19: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 55123:23.09 
  but let me try the file now23: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 evening23:40.29 
ray_laptop mvrhel: OK.23:40.56 
mvrhel_laptop I ran it with and without your change and have the raw dumps23:41.05 
  I should be able to track this down23:41.11 
toothrot sebras, thanks for the heads up.23:48.51 
 Forward 1 day (to 2013/08/13)>>> 
ghostscript.com
Search: