| <<<Back 1 day (to 2013/01/10) | 2013/01/11 |
mvrhel_laptop | marcos: bugzilla exploded on me | 05:58.15 |
| There was an error sending mail from 'bugzilla-daemon@ghostscript.com' to 'marcos.woehrmann@artifex.com': Error executing /usr/lib/sendmail: Cannot allocate memory | 05:58.32 |
Guest7980 | hello! | 11:18.00 |
| Are there any MUPDF developers currently around? | 11:19.10 |
Robin_Watts | there are. | 11:21.20 |
Guest7980 | hello Robin! I have many one page pdf files and I would like to merge it into one pdf file with mupdf library on android device. Is this possible? | 11:21.58 |
Robin_Watts | We don't currently have a merge facility. | 11:22.44 |
| but I suspect it wouldn't be too hard. | 11:23.09 |
Guest7980 | Another workaround I'm currently entertaining is to reload the contents of the ReaderView with the next pdf file; assuming of course that the pdf filenames are named after their page number | 11:24.12 |
Robin_Watts | We had a customer recently who wanted to display n 1 page PDFs as 1 n page PDF. | 11:25.21 |
| and paulgardiner did that for them by tweaking the top level app classes. | 11:25.50 |
Guest7980 | Say after swiping 1.pdf to the right, call the view to load the contents of the 2.pdf | 11:26.26 |
| do you have any idea how paulgardiner did it? | 11:26.53 |
paulgardiner | Guest7980: I still have the patch. It would probably need some fiddling to apply it to current head of master but it shouldn't be too far off | 11:29.10 |
Guest7980 | hi Paul! would you mind sharing the patch? | 11:29.46 |
paulgardiner | Sure not a problem. Let me see where I can upload it. | 11:30.17 |
Guest7980 | thank you so much! | 11:30.36 |
paulgardiner | Guest7980: here you go - http://intranet.glidos.net/~paul/first-page.diff | 11:36.50 |
Guest7980 | thank you Paul! Got it | 11:37.50 |
Robin_Watts | Guest7980: So you're writing an android app based on MuPDF? | 11:41.23 |
| As I'm sure you're aware, MuPDF is available under 2 licenses; the GNU GPL and the Artifex commercial license. | 11:41.54 |
Guest7980 | Hi Robin, I'm Mai. For some strange reason IRC changed my nickname because I failed to identify in time. | 11:42.10 |
| Anyway, yes, I'm writing an Android App based on MuPDF. | 11:42.34 |
Robin_Watts | Ah, ok. I was just going to give my usual spiel about either complying with the GNU GPL (including, but not limited to making source code available for the whole app), or needing to get a commercial license before release. | 11:43.44 |
Guest7980 | I will check which license we'll be adopting, but I don't see any problem with getting a commercial license if needed. Thanks for the heads up. | 11:46.33 |
Robin_Watts | no worries. | 11:46.42 |
Guest7980 | Robin, Paul thanks again. | 11:48.30 |
Robin_Watts | Let us know how you get on. | 11:48.45 |
Guest7980 | Will do! | 11:49.21 |
paulgardiner | Robin_Watts, tor8: would you check over the review on paulg/master please, when you get a free moment? | 12:19.38 |
Robin_Watts | will do. just trying to check the link stuff. | 12:20.45 |
| tor8: Various commits on my repo. The last 2 give me warnings about not being utf-8 conformant due to their being accents in the commit messages. Do you have any idea what to do about that? | 12:32.47 |
| paulgardiner: Looking now. | 12:32.51 |
paulgardiner | ta | 12:32.56 |
Robin_Watts | paulgardiner: I see 4 commits on your repo to look at. | 12:49.52 |
paulgardiner | Yep | 12:51.10 |
Robin_Watts | http://git.ghostscript.com/?p=user/paulg/mupdf.git;a=commitdiff;h=5ffe63ad521dc71b33d9c280ad108ca495a450d1 | 12:52.44 |
| If we fz_throw from Java_com_artifex_mupdf_MuPDFCore_text, will that not leak barr, larr etc? | 12:53.16 |
paulgardiner | I believe it's ok. You have to call DeleteLocalRef only to stop the system running out of local storage while you are in the call. It frees everthing automatically when you return. | 12:54.50 |
Robin_Watts | really? boggle. | 12:55.42 |
paulgardiner | Just googled and found a forum where it explains that it is like setting a java var to null. Unnecessary but can allow sooner garbage collection | 12:56.47 |
Robin_Watts | ok, fair enough. | 12:57.04 |
paulgardiner | AFAIK you don't need to call it at all unless you are allocating loads of stuff repeatedly in a loop | 12:57.49 |
Robin_Watts | + private native TextChar[][][][] text(); | 12:57.54 |
| Is that like the java equivalent of being a 4 * programmer ? :) | 12:58.06 |
paulgardiner | :-) Damn! Should have made it 5. | 12:59.40 |
mp | android's x86 doesn't have sigsetjmp I think | 13:01.06 |
Robin_Watts | I thought we only used sigsetjmp on macOS? | 13:07.57 |
| paulgardiner: is there are reason why the patch does: if (!selecting) { do the not selecting thing } else { do the selecting thing } | 13:13.32 |
| rather than: if (selecting) { do the selecting thing } else { do the non selecting thing } ? | 13:13.53 |
| I find the latter makes more sense to my tiny brain. | 13:14.31 |
paulgardiner | Well... only because selecting is the unusual case. It's do the usual sensible thing when not selecting. Inhibit that and do something else when selecting | 13:15.23 |
Robin_Watts | but it scales poorly, IMHO. When we have another unusual case we end up doing: if (!selecting && !bibbling && !dribbling) ... | 13:16.22 |
| wheras: if (selecting) select else if (bibbling) bibble else if (dribbling) dribble else normal; | 13:16.52 |
paulgardiner | That's a good point | 13:17.41 |
| Is it the last commit where I do that? | 13:18.16 |
Robin_Watts | http://git.ghostscript.com/?p=user/paulg/mupdf.git;a=commitdiff;h=a9df730e0c215f8ff213814686a8df0767cece31 | 13:18.24 |
| 2 of 4. | 13:18.30 |
| but it's a small point. | 13:18.52 |
paulgardiner | If it's 2 of 4 then it might cause the 3 and 4 to apply badly hence best altered as a separate commit. In which case, shall I keep it in mind to alter when I'm next changing that file | 13:20.07 |
Robin_Watts | sure. | 13:20.17 |
| So the highlight is drawn as an inverted rectangle ? | 13:20.48 |
paulgardiner | No. It's the same as the text search highlight. | 13:21.15 |
Robin_Watts | oh, sorry, it's in a loop. | 13:21.27 |
tor8 | Robin_Watts: contents of last 3 commits LGTM | 13:21.34 |
| Robin_Watts: set your editor to use utf-8 encoding (or approximate his name with ascii) | 13:21.50 |
Robin_Watts | each line of the highlight is a rectangle. right. | 13:21.54 |
| tor8: OK. | 13:22.01 |
tor8 | Robin_Watts: which editor do you use to type the commit messages? | 13:22.14 |
Robin_Watts | emacs | 13:22.19 |
tor8 | right. so that one ought to be able to do utf-8 easily enough | 13:22.31 |
| I'm sure it's defaulted to latin-1 though | 13:22.42 |
Robin_Watts | Ctrl-x return f utf8 or something. | 13:22.51 |
| tor8: Had you previously OKd the fax decoder and atoi ones ? | 13:24.05 |
| paulgardiner: What's the animation for with the copy to clipboard stuff ? | 13:27.46 |
tor8 | Robin_Watts: no. I didn't like (or understand) the fax one... it seems like we're stabbing in the dark there | 13:28.34 |
paulgardiner | It fades in quickly. hangs around for a bit and then fades out slowly. xml gives a nice concise way to set it up | 13:28.48 |
tor8 | Robin_Watts: the atoi one, I was thinking fz_atoi that is safe for NULL and use that everywhere instead | 13:28.51 |
Robin_Watts | tor8: fz_atoi - OK. | 13:29.05 |
tor8 | in case there are more places like it | 13:29.13 |
Robin_Watts | paulgardiner: That's for a message saying "copied to clipboard?" | 13:29.22 |
| tor8: The fax one... there is a problem with the current code. | 13:29.37 |
paulgardiner | yes, | 13:29.38 |
Robin_Watts | In that if we call in with x > (w-1)>>3 (i.e. into the last byte), we overread by 1 byte. | 13:30.13 |
tor8 | paulgardiner: Robin_Watts: about the icons, the clipboard icon looks more like a bookmark and the arrow doesn't make much sense. I know robin has expressed a dislike for the icon aesthetics before, so maybe we should look for another set to use? | 13:30.14 |
paulgardiner | tor8: We could keep with iconic but add a few of our own. | 13:31.04 |
tor8 | paulgardiner: Robin_Watts: have a look through http://adamwhitcroft.com/batch/ | 13:31.20 |
paulgardiner | I too don't like my current choice, but I couldn't find others within iconic that seemed better | 13:31.36 |
Robin_Watts | tor8: So how about with the fax one, I strip out the debugging code, and just put the fix in? | 13:31.38 |
tor8 | there's also http://aristath.github.com/elusive-iconfont/ | 13:31.53 |
| Robin_Watts: we should send zeniko the debug code so he can track it down, but leave it out of master, if he's amenable to that | 13:32.27 |
Robin_Watts | tor8: OK. I'll sort that out. | 13:32.40 |
tor8 | paulgardiner: nope, it's a bit limited in choice, iconic | 13:32.53 |
| if we don't care about icon consistency, there's http://thenounproject.com/ | 13:33.18 |
Robin_Watts | We have these lovely hires, color screens. And we're restricting ourselves arbitrarily to mono, blocky icons. | 13:33.46 |
tor8 | Robin_Watts: well, we could go retro 32x32 pixel art ;) | 13:34.25 |
Robin_Watts | I mean, clipboards are rectangular things, with a clip on, plus a piece of paper. | 13:34.39 |
| but if we restrict ourselves to blocky mono, it's impossible to draw that with any form of clarity. | 13:35.10 |
tor8 | http://thenounproject.com/tag/clipboard/ | 13:35.26 |
paulgardiner | I'd highly recommend a solution that doesn't depend on any artistry from me. | 13:35.38 |
Robin_Watts | tor8: OK, but do we have that many pixels to throw around ? | 13:36.01 |
paulgardiner | We seem to be aiming at 32x32 and 24x24 | 13:36.24 |
tor8 | for ipad I think we would want something around 40x40 for the lowres ones | 13:37.01 |
| android a bit lower than that | 13:37.12 |
| damn these multiple resolutions, we should have something more scalable than just sets of png files :( | 13:37.30 |
| do you know if android drawables can do svg? | 13:37.39 |
| Robin_Watts: I'm not opposed to color icons, but then you need to hire someone who can draw a decent, coherent, good looking set that will fit all these funky android and ios color schemes. | 13:38.22 |
| less so now that I've hardcoded the colors and got rid of the theming from android buttons | 13:38.42 |
paulgardiner | The button for which I've used the up-left arrow may be in itself temporary. I t may make no sense when we've added various forms of annotation editing. | 13:39.01 |
tor8 | monochrome silhouette based icons can work well in many environments | 13:39.23 |
paulgardiner | monochrome seems to gel well with ICS on the S2 | 13:42.48 |
| Just a paperclip might be good for copy to clipboard | 13:44.36 |
tor8 | paulgardiner: maybe a pen or marker for selecting text? | 13:44.55 |
Robin_Watts | For copy to clipboard, we want a clipboard with an arrow pointing onto it, I reckon. | 13:46.10 |
paulgardiner | tor8: maybe. We will also be selecting text for the addition of highlight, underline and strikethrough annotations. | 13:46.18 |
Robin_Watts | is being called by the boss for food. | 13:46.58 |
| paulgardiner: Your reviews look good. I will push after lunch. | 13:47.07 |
paulgardiner | And there are annotations that don't involve text selection. I think getting the UI right for that will take a little trial and error. | 13:47.24 |
| On the plus side, Android allows for fairly quick reworking of UI. | 13:48.01 |
tor8 | paulgardiner: the batch icon set has a more typical clipboard icon, but I wouldn't sweat too much on it | 13:51.19 |
| I'll try out a few different sets when I get bored later :) | 13:51.36 |
paulgardiner | That would be good. I chose those icons with every intention that they would be changed. | 13:52.51 |
tor8 | paulgardiner: I wonder if we could use a custom truetype iconfont there | 13:52.55 |
| to get good scalability with a minimal amount of hassle | 13:53.04 |
paulgardiner | Google doesn't seem to be helping much with whether ttfs can be used for icons | 13:54.45 |
| Which batch icon were you refering to, out of interest | 13:55.19 |
| ? | 13:55.21 |
| 6 down to the very right? | 13:55.52 |
| I'm sure I've seem a paperclip used before, and that was the only time I'd immediately recognised the icon as "copy to clipboard" rather than thought "what exactly is that a picture of?" | 14:01.55 |
tor8 | paulgardiner: yeah. there's also a case for using the two stacked documents as in all windows toolbars from the 90's | 14:07.08 |
| paulgardiner: as long as we can load up a font and use it it can be used as text with a funky encoding to get the icon | 14:07.46 |
paulgardiner | Yes true. | 14:07.47 |
| That was yes to point 1 | 14:08.39 |
| Point 2: ah of course. I guess we'd just use a TextView rather than an ImageView. | 14:09.03 |
| The alteration would be more hassle | 14:09.16 |
Robin_Watts | pops into town. bbs. | 14:17.10 |
| paulgardiner: pushed, along with the reviews that tor liked of mine. | 15:24.51 |
paulgardiner | Great. Thanks. | 15:25.24 |
Robin_Watts | tor8: Updated versions of fz_atoi and fax decoder reviews online for you at your convenience. | 15:34.35 |
tor8 | Robin_Watts: you still have the if (s == NULL) throw in there | 15:36.10 |
Robin_Watts | D'Oh. | 15:36.19 |
| New version online, sorry. | 15:37.37 |
tor8 | looks better now, thanks | 15:38.12 |
| nod to both of them | 15:38.23 |
Robin_Watts | Ta. | 15:38.25 |
| henrys: so, the MT stuff is fixed, we believe. | 15:39.39 |
| Was there anything else release critical I should be looking at, or is it back to the customer 395 bugs ? | 15:40.06 |
henrys | Robin_Watts: yes huge fix prior to the release. I can't think of anything else that needs immediate attention. | 15:40.53 |
Robin_Watts | cool. I am crap at remembering things, so thought I'd ask :) | 15:41.30 |
| I sent sags a reminder email yesterday so see if he had further thoughts on the unicode/utf8 stuff, but haven't heard back. | 15:44.27 |
sebras | paulgardiner: can't we ask freetype to render glyphs from the icon ttf and use that as an image in an ImageView? I fail to see why it _has_ to be a TextView...? | 16:22.02 |
Robin_Watts | sebras: That would mean lots more complexity in the app side of things. | 16:25.39 |
sh4rm4 | i am trying to build mupdf for my embedded distro | 16:33.22 |
| there are 2 issues... | 16:33.30 |
| 1) Makefile does not support DESTDIR | 16:33.40 |
| 2) openjpeg uses CMAKE | 16:33.49 |
| 1) is easy to fix: http://sprunge.us/XPDb | 16:34.25 |
| but 2) is a major problem | 16:34.34 |
Robin_Watts | sh4rm4: 2 is not an issue, if you build with our makefiles and without using a shared lib. | 16:34.37 |
sh4rm4 | my distro does not even have a C++ compiler | 16:34.43 |
Robin_Watts | Are you building from git or from release? | 16:35.00 |
sh4rm4 | Robin_Watts, where is that Makefile ? | 16:35.01 |
| release | 16:35.10 |
Robin_Watts | OK, so download the mupdf-thirdparty.zip file from mupdf.com, and unpack that into the thirdparty directory within the source. | 16:35.34 |
sh4rm4 | .zip on unix ? | 16:35.53 |
Robin_Watts | Then just do 'make', and our makefile will spot the presence of the libraries within thirdparty and build appropriately. | 16:36.07 |
| zip because it works on both unix and windows. | 16:36.15 |
sh4rm4 | that will require that i rebuild busybox with zip support | 16:36.38 |
Robin_Watts | sh4rm4: well, you can always repack from .zip to .tgz on a different platform. | 16:37.08 |
sh4rm4 | can't i just unpack the openjpeg tarball into the source tree ? | 16:37.22 |
| (2.0.0, that is) | 16:37.34 |
Robin_Watts | sh4rm4: You can if you want, but then you won't get any of our fixes. | 16:37.40 |
sh4rm4 | ah | 16:37.53 |
Robin_Watts | And it won't work because 2.0.0 is not supported in the last release. | 16:37.54 |
sh4rm4 | oh | 16:37.59 |
Robin_Watts | We are using 1.5.0 | 16:38.03 |
| We have a branch on which we can use 2.0.0, but 2.0.0 fails to decode some images that 1.5.0 decodes just fine. | 16:38.33 |
| so we won't be swapping to it by default until that is fixed. | 16:38.45 |
sh4rm4 | hmm it would be nice if you could offer a mupdf + dependencies tarball | 16:40.06 |
| dealing with 2 different archives defeats the logic of my package manager | 16:40.20 |
| (repacking is not an option, as all tarballs are taken from official site for trust reasons) | 16:41.27 |
Robin_Watts | Sorry, but I don't see us changing that any time soon. | 16:42.14 |
sh4rm4 | :( | 16:42.23 |
| zip doesnt even support unix permissions... | 16:42.45 |
tor8 | Robin_Watts: I'm not so sure. I was considering it for the next tarball release. | 16:42.48 |
Robin_Watts | tor8: Fair enough then, it's your baby :) | 16:43.14 |
Robin_Watts | wonders what happens when people complain they have to get v8 separately then... | 16:43.37 |
sh4rm4 | is it ok to use jbigdec version 0.11 ? | 16:45.15 |
| or do you also have modifications in your 3rd party package ? | 16:45.46 |
Robin_Watts | sh4rm4: If you want to use our makefile, use our dependency archive. | 16:47.16 |
| If you want to come back to us with problems, use our dependency archive, or the first thing we'll do is to tell you to retry with a version that uses our dependency archive :) | 16:47.50 |
sh4rm4 | he he | 16:48.01 |
| feel free to apply the DESTDIR fix http://sprunge.us/XPDb | 16:48.18 |
| oops, there is one whitespace bug in there | 16:49.09 |
| $(DESTDIR) $(incdir) -> $(DESTDIR)$(incdir) | 16:49.30 |
Robin_Watts | tor8: 3 more small reviews. | 17:29.20 |
sebras | sh4rm4: if you want a smaller patch, wouldn't changing prefix ?= /usr/local to prefix ?= $(DESTDIR)/usr/local be even more minimal? | 17:38.01 |
| smaller patches are usually more appealing... | 17:38.14 |
tor8 | Robin_Watts: 3 commits LGTM | 17:46.58 |
Robin_Watts | tor8: Thanks. | 17:47.04 |
jordyd | Hi! I'm a student, looking to implement a %ram% device, partly because it's bountiable, and partly because I want something to do. Anyway, I was reading the source, and I was wondering, in gsiodev.h, why in gx_io_device_procs_s, there is both iodev_proc_open_file and iodev_proc_fopen, and then also why in the definition of %os%, the iodev_proc_open_file field is NULL. | 18:02.00 |
mvrhel_laptop | Robin_Watts: so while my customer bug fix runs, just a quick mupdf question for you. So fz_new_stream is considered an internal command. Any chance that could be opened up or should I add a new similar one that I can use in wrapping my stream | 18:02.03 |
| or that may be a question for you tor8 | 18:02.47 |
tor8 | mvrhel_laptop: just include fitz-internal.h | 18:03.36 |
mvrhel_laptop | I thought about that... | 18:03.58 |
tor8 | mvrhel_laptop: the internal/external border is a bit fuzzy, but in general we consider stuff in the external header to be "stable" api:s that we rarely change | 18:09.01 |
| the internal header can be changed at any time at our whim | 18:09.13 |
ray_work | jordyd: Great! I'll try and answer your issues (it's been a while since I looked at the bug report, so I'm doing that now) | 18:09.15 |
mvrhel_laptop | ok. that makes sense. now I don't feel like I am cheating... | 18:09.16 |
tor8 | in general most clients will rarely need to use the internal apis | 18:09.43 |
deleet | Robin_Watts: I see the patch went in, thanks | 18:12.36 |
| <- dlty from yesterdya | 18:12.51 |
mvrhel_laptop | bbiaw... | 18:12.58 |
sh4rm4 | sebras, prefix != destdir | 18:16.01 |
| see https://github.com/miniupnp/miniupnp/issues/26 | 18:16.40 |
| prefix is for hardcoded paths that end up in binaries etc | 18:17.12 |
tor8 | sh4rm4: we never use hardcoded paths anywhere | 18:17.21 |
sh4rm4 | how can a packager know ? | 18:17.35 |
| he just assumes that prefix and destdir work as usual | 18:17.47 |
| and if destdir is not supported, he has to calculate with the worst | 18:18.02 |
sebras | sh4rm4: well, I guess the packager would need to read up a bit on the package he's packaging if it turns out to be using something else than autotools... ;) | 18:18.44 |
tor8 | we should support destdir | 18:19.02 |
sh4rm4 | sebras, yes and that is a major PITA | 18:19.03 |
sebras | tor8: we could, and that's why I suggested prepending DESTDIR in prefix. | 18:19.39 |
tor8 | sebras: why prepend? | 18:20.11 |
sebras | tor8: as opposed to replace? because autotools-stuff assume that the prefix is kept. | 18:20.38 |
tor8 | http://bugs.ghostscript.com/show_bug.cgi?id=693366 | 18:20.48 |
sebras | tor8: so you would install to $DESTDIR$prefix/{bin,share,lib}.... | 18:21.06 |
tor8 | sebras: is that what DESTDIR is supposed to do? | 18:21.29 |
sh4rm4 | citing https://github.com/miniupnp/miniupnp/issues/26 | 18:21.34 |
| n my case, prefix="" (empty) and DESTDIR=/opt/packagename | 18:21.35 |
| that makes libdir=/lib and things get installed to /opt/packagename/lib | 18:21.35 |
tor8 | (being ignorant here) | 18:21.39 |
sh4rm4 | please read the link i pasted | 18:21.47 |
sebras | sh4rm4: I did. | 18:21.54 |
sh4rm4 | its 15 lines, so not tl;dr | 18:21.57 |
ray_work | jordyd: actually, it looks like alexcher or someone should have reviewed the "real %ram% device" patch in comment #8. Just a quick look at it makes me think that it is already done. | 18:22.00 |
sebras | sh4rm4: very few things are tl;dr for me. it's just a question of whether they keep me interested enough. | 18:22.28 |
ray_work | we arent' very good sometimes about reviewing patches on bountiable bugs, it seems. :-( | 18:22.34 |
jordyd | ray_work, that patch doesn't support directories, I don't believe. | 18:22.36 |
sebras | the length seldom matters in that case. | 18:22.36 |
| tor8: http://www.gnu.org/prep/standards/html_node/DESTDIR.html | 18:23.12 |
tor8 | sh4rm4: sebras: so the patch in the bug I linked should work | 18:23.18 |
ray_work | jordyd: as long as it supports a 'flat file system' and allows '/' to be part of the name, it is compatible with Adobe implementations. | 18:23.23 |
sebras | tor8: don't know yet. *looking* | 18:23.32 |
jordyd | ray_work, oic | 18:23.44 |
sh4rm4 | tor8, that patch is suboptimal | 18:24.06 |
sebras | tor8: well, you risk getting double slashes. | 18:24.11 |
ray_work | jordyd: this still allows enumeration of things like "mydir/*" | 18:24.17 |
sebras | tor8: if you remove the slash after DESTDIR then it's better. | 18:24.24 |
sh4rm4 | there should not be any slashes between DESTDIR and prefix | 18:24.43 |
sebras | tor8: however given how we use $prefix I suggest that we might as well just prepend DESTDIR there. | 18:24.47 |
tor8 | sebras: double slashes are safe, but ugly | 18:25.01 |
sh4rm4 | tor8, wrong | 18:25.13 |
| double slashes are according to posix reserved for network shares | 18:25.26 |
tor8 | but it will make a relative prefix wrong, so shouldn't have a / there | 18:25.28 |
sebras | tor8: if we happen to use $prefix for hardcoded paths (like sh4rm4 mentioned) we could handle that then. | 18:25.29 |
sh4rm4 | it works in practice tho | 18:25.33 |
jordyd | ray_work, I'll have a look at some of the other bountiables then | 18:25.37 |
tor8 | sh4rm4: oh. that's news to me, thought that was a windows specific misfeature :) | 18:26.05 |
sh4rm4 | nope :) | 18:26.14 |
ray_work | jordyd: but it does mean that mydir can exist as a file along with mydir/ and mydir/temp1 as unique files, but that's OK generally (even if not intuitive to those that expect unix like directory path separators) | 18:26.16 |
sh4rm4 | so thats why there must be no slashes between DESTDIR and prefix. this way, it always comes out correct | 18:26.42 |
| and i never heard about *relative* prefixes | 18:26.55 |
tor8 | sh4rm4: make prefix=local/test/dir install | 18:27.23 |
| I've done it on occasion | 18:27.28 |
sebras | sh4rm4: prefix is just a variable, you can assign it to whatever you like. | 18:27.43 |
ray_work | jordyd: OK, thanks. If there are open bugs that don't have 'private' attachments, feel free to ask us to make it bountiable even if it isn't currently | 18:27.48 |
jordyd | ray_work, Alright, thanks. | 18:28.16 |
ray_work | jordyd: here's an OK place to ask, but you can also email that kind of question to gs_devel at ghostscript.com | 18:28.18 |
jordyd | ray_work, is the mailing list preferred for this sort of thing then? | 18:28.53 |
ray_work | jordyd: you'll get an interactive response here if the right people are online and paying attention, so if I were you, I'd ask here first and if nobody replies, use the mailing list | 18:29.57 |
jordyd | ray_work, Ok, thanks. | 18:30.11 |
sebras | sh4rm4: tor8: http://goo.gl/pBNko (last sentence) it is only double slashes at the _beginning_ of a pathname that must be interpreted specially. | 18:33.55 |
sh4rm4 | sebras, yes | 18:34.07 |
| so if prefix="/" and DESTDIR=/tmp, you end up with double slashes with the patch from the bugreport | 18:34.53 |
sebras | sh4rm4: also POSIX doesn't state that it must be networkshares. just that the resolution is implementation-defined. | 18:34.56 |
| sh4rm4: I know, I mentioned this to tor8 a few minutes ago. | 18:35.18 |
sh4rm4 | also, my patch makes it explicitly clear that destdir is only used for install | 18:36.08 |
| if someone later uses libdir in another makefile target, DESTDIR will mess that up | 18:36.56 |
| (in the other patch) | 18:37.15 |
sebras | sh4rm4: I think we have all the info needed, let's see what changes tor8 applies to the Makefile. | 18:39.36 |
sh4rm4 | http://sprunge.us/XAJj fixed version of my patch | 18:39.49 |
tor8 | sebras: Robin_Watts: patch to review on tor/master | 18:45.24 |
Robin_Watts | looks ok to me. | 18:46.19 |
sebras | tor8: give me a minute. | 18:49.22 |
| Robin_Watts: did you update freetype too? | 18:49.52 |
| tor8: lgtm. | 18:50.48 |
Robin_Watts | sebras: I believe so. | 18:51.16 |
sebras | Robin_Watts: anything new that has changed? | 18:51.35 |
| Robin_Watts: is the rendering similar to what it used to be, e.g.? | 18:51.50 |
| tor8: there's a patch over at sebras/master which you ought to include. | 18:52.03 |
| well, you ought to review it at least. | 18:52.19 |
tor8 | sebras: you can probably squash those two | 18:56.33 |
Robin_Watts | sebras: There are a few small changes in rendering- nothing earth shattering. | 18:56.39 |
| and a fix for a file from customer 395 that used to cause an overflow and then a SEGV. | 18:57.00 |
sebras | tor8: I would, but I think Robin merged the first one already. | 18:58.33 |
| tor8: yes, he did. I checked just now. | 18:59.12 |
Robin_Watts | sebras: You should rebase, and then we'd know :) | 18:59.19 |
tor8 | oh. right. | 18:59.21 |
Robin_Watts | liucougar: A patch based on yours has been pushed. Many thanks. | 19:02.27 |
sebras | Robin_Watts: ;) | 19:03.59 |
| e | 19:05.40 |
paulgardiner | Is Andre Ferreira here? | 19:16.00 |
liucougar | Robin_Watts: thanks for fixing the patch | 19:31.35 |
| Robin_Watts: just added a comment there to suggest modify usage message for pdfclean | 19:32.12 |
Robin_Watts | deleet: is Andre Ferreira, I believe ? | 19:36.33 |
paulgardiner | deleet: are you still here? | 19:39.23 |
e98 | hi, I have a shell script to use in place of Apache FOP for generating placeholder PDF files | 21:23.02 |
| which are actually real PDF files, but it seems I didn't read/understand enough of | 21:23.16 |
| the PDF spec introduction and my template is kinda broken in the xref table | 21:23.35 |
| and the offsets | 21:23.39 |
| this is the current script as found in Erlang/OTP's master branch: https://github.com/erlang/otp/blob/master/make/fakefop | 21:24.33 |
| and these are the changes/fixes slated to be included in the next release | 21:25.04 |
| https://github.com/tuncer/otp/compare/master...fakefop | 21:25.06 |
| hopefully with a little help from you guys I can correct the minor issues and write PDF files without errors contained | 21:27.57 |
Robin_Watts | e98: Hi. | 21:31.18 |
| I replied to your email earlier. | 21:31.23 |
| A good plan is to take your broken files, say test.pdf and do: | 21:31.47 |
| mutool.exe clean -difgggg test.pdf fixed.pdf | 21:32.00 |
| and that'll save the fixed version out as fixed.pdf | 21:32.10 |
| Then you can look at the two and see what's different. | 21:32.19 |
e98 | I did actually try that 2 seconds ago but without the flags | 21:32.39 |
sebras | Robin_Watts: four g's? I thought three were enough. | 21:32.56 |
Robin_Watts | without the flags should work too, as your source was uncompressed. | 21:33.11 |
| sebras: Now we need 4 :) | 21:33.18 |
e98 | it's intentional to be all text for simplicity, portability, maintainability | 21:33.39 |
Robin_Watts | A commit went in earlier today that makes 4g's mean "remove duplicate streams" | 21:33.40 |
| e98: Your files are pretty close. I outlined all that was wrong with them in my email. Was it not clear? | 21:34.23 |
sebras | Robin_Watts: oh! how do you compare the two? readall? | 21:34.24 |
Robin_Watts | Read the streams and diff them, yes. | 21:34.40 |
sebras | Robin_Watts: ok. | 21:34.54 |
e98 | Robin_Watts: I understood what you said but without mutool I wouldn't have quikly fixed the problem, but I'm wondering | 21:35.08 |
sebras | Robin_Watts: might be worthwhile to md5 the streams when doing a O | 21:35.22 |
| an O(n^2)... | 21:35.28 |
e98 | some parts of the text are dynamic | 21:35.29 |
Robin_Watts | steps away from keyboard for a bit. | 21:35.37 |
sebras | Robin_Watts: though this ought to be a _fairly_ uncommon operation. ;) | 21:35.48 |
e98 | so, does it mean I'd have to adjust the offsets? | 21:35.52 |
Robin_Watts | sebras: possibly, yes. The main thing is that people can choose not to do it. | 21:35.54 |
e98 | if yes, that'd complicate the script considerably | 21:36.06 |
Robin_Watts | e98: You need to get the values correct, yes. | 21:36.11 |
| but that really shouldn't be hard. | 21:36.20 |
e98 | is there no way to just include plain text without character-level references or length spec? | 21:37.17 |
sebras | Robin_Watts: right, so we just compared the streamdicts before. how foolish of me. | 21:38.42 |
e98 | the mutool clean'ed file has interesting differences: | 21:41.00 |
| 2nd line: | 21:41.03 |
| %μῦ | 21:41.06 |
| and it's missing EnOfFileFile as last line | 21:41.28 |
| Robin_Watts: if I can really not have that one shell var dynamic without having to add offset calc | 21:42.29 |
| Robin_Watts: I'll just make it static text for simplicitys sake. it's more important to have correct PDF than addition content in a placeholder file | 21:43.03 |
| oops, that EndOfFile is of course not to be part of he PDF | 21:44.46 |
| it's my shell script code | 21:44.52 |
| hmm, it seems I need the second line | 21:46.02 |
| %μῦ | 21:46.04 |
| without it I get: | 21:46.16 |
| error: expected 'obj' keyword (8 0 ?) | 21:46.17 |
| error: cannot parse trailer (compressed) | 21:46.17 |
| error: cannot read trailer | 21:46.17 |
| warning: trying to repair broken xref | 21:46.17 |
| but that makes no sense | 21:46.24 |
| there's certainly something else which causes this that's hidden by that 'mysterious to me' 2nd line | 21:46.41 |
sebras | e98: you are aware that the xref table at the end encodes the byte offsets from the beginning of the file to each object? | 21:54.11 |
e98 | sebras: not necessarily, no | 21:56.03 |
| sebras: as it's just a placeholder file I'm totally OK with having a static text and skip the dynamic part (`basename OUTFILE`) | 21:56.51 |
| sebras: so, if I can understand that 2nd line and why it suddenly makes a difference and what it means | 21:57.14 |
| sebras: I'm confident that the new script with the right offsets based on the static text | 21:57.35 |
| sebras: together with the reformatting of the syntax by 'mupdf clean' | 21:58.03 |
| sebras: is enough to fix the script | 21:58.13 |
| so, any idea what "%μῦ\n" on line 2 is? | 22:04.15 |
| adding that make mupdf happy | 22:04.25 |
| oh, it's octal | 22:05.29 |
| reminds me of Postscript | 22:05.33 |
| %\316\274\341\277\246 | 22:05.35 |
| good god why does only emacs show the octal codes and vim try's to be smart and display some characters I cane make sense of | 22:08.31 |
liucougar | Robin_Watts: ping | 22:14.56 |
sebras | e98: are you working at ericsson? | 22:33.55 |
e98 | sebras: nope | 22:34.39 |
| sebras: why do you ask? | 22:34.44 |
sebras | e98: because the copyright refers to Ericsson AB.... | 22:34.52 |
e98 | sebras: I wrote that script in 2010 as a way to avoid Apache FOP's time and space inefficiency | 22:35.37 |
| sebras: especially because the man pages and html pages are built by xsltproc already | 22:35.57 |
sebras | e98: so why does it efer to Ericsson AB? | 22:36.16 |
e98 | sebras: and it saves JVM OOM issues and saves time and dependencies | 22:36.19 |
sebras | refer | 22:36.20 |
e98 | sebras: I contributed that file and made it copyright both Ericsson and myself | 22:36.45 |
| sebras: I don't think it matters much in this case | 22:37.16 |
sebras | e98: right. I worked for Ericsson up until 4-5 years ago. this is why I'm intrigued. | 22:37.21 |
e98 | sebras: ah, I see :) | 22:37.29 |
| sebras: no, I'm just someone who had fun poking around the erlang source to fix issues and add stuff | 22:37.49 |
| hah, I fixed it | 22:39.54 |
| 1. use printf to write those octal values in line 2 | 22:40.09 |
| 2. when doing 2. make sure to add trailing \n at end of file | 22:40.23 |
| 3. make text static | 22:40.27 |
| 4. use static table and length | 22:40.34 |
| and have it all still plain text | 22:40.43 |
| yay | 22:40.45 |
sebras | e98: http://pastebin.com/qczV1tBw | 22:40.59 |
e98 | it even works with pdf.js now | 22:41.16 |
| yay | 22:41.17 |
sebras | e98: the pastebin.com fixes it as well. the xref never needs changing, the octal-stuff your are talking about is not strictly necessary. | 22:42.17 |
e98 | sebras: I didn't have it before | 22:42.35 |
sebras | e98: oh, and my version places the object with variable length at the end and hopes that the text is never longer than 10240 bytes... | 22:42.44 |
| e98: did you look at the pastebin-link? if not, then what I write will not make sense to you. | 22:43.05 |
e98 | sebras: I did | 22:43.20 |
| sebras: you moved the table to the beginning | 22:43.27 |
sebras | e98: exactly. | 22:43.31 |
e98 | sebras: will this version work regardless of what $NAME is? | 22:43.47 |
sebras | e98: this means that the offsets in the table do not depend onf where in the pdf-file the table is... | 22:43.49 |
| e98: no, not regardless | 22:43.58 |
| e98: it works most of the time. | 22:44.08 |
| basically I gamble on that the pdf reader will not try to read 10240 bytes in object 5 if the object is shorter (which it will be). | 22:44.37 |
| and that the pdf reader does not complain about the object stream being short. | 22:44.52 |
e98 | ok, I might still go with static text just in case something could/would overflow the limit or extreme portability | 22:45.16 |
| but avoiding the octal values is great | 22:45.27 |
| because I don't have to use /usr/bin/printf | 22:45.48 |
sebras | e98: if you don't need $NAME in there, then its easy to fix it. | 22:45.55 |
| e98: do you want me to fix that as well? | 22:46.22 |
e98 | sebras: if you want to save me time, I'd appreciate it | 22:46.38 |
sebras | e98: what text do you want displayed instead of $NAME? | 22:47.09 |
e98 | I did remove it in my static variant | 22:47.26 |
| it was just a text to display the filename without file extension | 22:47.37 |
| because that's the name of the lib the pdf contains documentation for | 22:47.51 |
| like say wxErlang.pdf | 22:47.58 |
sebras | e98: http://pastebin.com/0sBZ8WJZ | 22:50.23 |
| e98: I'm assuming that the position doesn't matter. | 22:50.45 |
e98 | centering would be nice but is not important | 22:51.09 |
| give me a second | 22:51.15 |
| want kudos in the commit for the 'rewritten' pdf structure? | 22:51.29 |
sebras | e98: oh... change the 10240 at the end of the file to 89. | 22:52.03 |
| e98: doesn't matter much but if you want to you can attribute it to Sebastian Rasmussen <sebras@gmail.com> | 22:53.19 |
e98 | well, I can even use that git author id if you want to | 22:53.58 |
| it's only fair | 22:54.01 |
alexcher | Robin_Watts: Do you remember why gx_dc_pattern_read() doesn's set all members of pdevc, esp. ccolor ? git blames this on you. | 22:54.23 |
sebras | e98: ok. it's no big deal for me. :) | 22:54.28 |
e98 | the only downside now is that running it through mutool clean produces a totally different structure | 22:54.39 |
| sebras: with table at end and stuff | 22:55.01 |
sebras | e98: I know. I placed the table at the beginning to accomodate for that the text could be dynamic in length. but as far as I know there is not thing in the pdf spec requiring it to be at the end. | 22:55.52 |
e98 | sebras: I changed the only content (text) again as I did earlier today | 22:58.02 |
| sebras: it doesn't affect anything right? | 22:58.14 |
| sebras: your PDF doesn't render in pdf.js but the other one I had written did | 22:59.03 |
| sebras: hmm | 22:59.07 |
sebras | e98: yes, changing the (text) matters. | 23:01.03 |
| e98: if you change the (text) then you need to adjust the /Length | 23:01.16 |
| the /Length states how many bytes are contained in the object stream of object 5 in your file. | 23:01.53 |
sebras | discovers that starting a sentence with /Length on IRC is not a good idea... | 23:02.13 |
| Forward 1 day (to 2013/01/12)>>> | |