| <<<Back 1 day (to 2015/11/23) | 20151124 |
mvrhel_laptop | Robin_Watts: spices arrived tonight. Just in time | 03:08.18 |
mrev1l | hi everyone. | 10:19.03 |
ferter_terter | guys, may i ask you a question about pdf format reference? i found the spec on the adobe website http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_reference_1-7.pdf. and in the TABLE 8.15 Entries common to all annotation dictionaries (p. 606) there is a P tag, that represents "...An indirect reference to the page object..." so i'm wodering, what data exactly should it contain each dictionary element. what i | 10:36.04 |
kens | It contains an indirect reference ot the page object, something like 1 0 R | 10:37.21 |
| If you are new ot PDF< don't start with the annotations, start with the basics | 10:37.49 |
| You will need to understand (for example) waht an indirect reference is before you can proceed further | 10:38.11 |
ferter_terter | ok, thank you kens | 10:40.44 |
t4nk301 | Hi all! I have one little question about mupdf api. Is there any way to set XObject appearance such it might be done with anotations, or i should directly access page object streams to add 'Do' operator? | 12:04.25 |
ferter_terter | prepare to wait for the answer. | 12:10.16 |
tor8 | t4nk301: what exactly is it you're trying to accomplish? | 12:21.53 |
t4nk301 | I'm trying to save path drawing as XObject. With mupdf API i can create this object by pdf_new_xobject(), but i have a hard time to set its appearance in document | 12:23.53 |
tor8 | t4nk301: these parts of the API aren't really complete, so you're in dangerous territory here :( | 12:25.59 |
| have you set the "content stream" of the XObject with pdf_update_xobject_contents? | 12:26.27 |
| also, if you're creating a new XObject then how do you intend to add it to the page? you'll need to add it to the page resources and also edit the page contents to add a "Do" operator | 12:27.28 |
t4nk301 | There was my question consist of. Is there any ways to edit page resources and contents in one call like "pdf_set_annot_appearanse". Anyway, thanks for help) | 12:30.17 |
tor8 | No, afraid not. You'll have to do it manually for now. | 12:30.43 |
| We have a project under way to improve these APIs, but that's not going to be ready for yet another couple of months. | 12:31.03 |
| the return value of pdf_new_xobject is a pdf_obj with the indirect reference you need to add to the resource dictionary | 12:32.34 |
| so if you have the page where you want to add the XObject you've just created, you "only" need to find the /Resources/XObject dictionary and add it to an entry there | 12:33.53 |
| then append the Do operator to the page content stream | 12:34.05 |
| kens: You really did lead me down the rabbit hole with gxps/muxps differences... | 12:36.38 |
| kens: There's a dozen commits on ghostpdl tor/master for review :) | 12:36.52 |
chrisl | tor8: so, was there a reason you decided to add the gs_throw/gs_rethrow/gs_catch/gs_warn stuff rather than use (and maybe improve) the existing Ghostscript error logging stuff? | 12:52.26 |
tor8 | chrisl: the only thing they really add is the annotations in the printfs, which error is the source and which are continuations and which one terminates and handles the error | 12:57.10 |
| other names that could be better are gs_new_error, gs_pass_error, gs_handle/stop_error? | 12:58.36 |
chrisl | tor8: well, as we already have return_error(), I'd probably have started with return_error_msg() or something like that.] | 12:59.40 |
tor8 | yeah, I dislike the return_error macro (since it hides the 'return' control flow keyword) | 13:00.16 |
chrisl | In general I agree with that, but in this case, I think the function and purpose is fairly obvious from the name | 13:01.05 |
tor8 | and it's not gs_ namespace prefixed :/ | 13:01.14 |
chrisl | Again, I'd agree with that..... before my time! | 13:01.38 |
tor8 | I'd be fine with replacing both gs_throw/rethrow with a plain return_error_msg macro | 13:01.58 |
| and drop the annotations | 13:02.04 |
| but it would be nice if you could keep them, but since nothing outside of gxps uses it IIRC it doesn't make all that much sense to keep it | 13:02.31 |
| there's also a gs_note_error | 13:03.05 |
chrisl | gs_note_error is used by return_error IIRC | 13:03.21 |
tor8 | right, so return_error is essentially a return gs_note_error? | 13:03.35 |
chrisl | Yeh | 13:03.43 |
tor8 | bah, I'd s/return_error/return gs_note_error/ over the whole source code in one fell swoop :) | 13:04.16 |
| then make gs_throw into gs_note_error_message | 13:04.30 |
chrisl | I do like the functionality that gs_throw and co add, I'm just increasingly bothered by the number of cases where we have two or more subtly (or no subtly) different ways of achieving the same (or very similar) ends | 13:04.50 |
tor8 | I was hoping to get the gs_throw style adopted more widely | 13:05.22 |
| but that didn't really pan out | 13:05.26 |
| and then mupdf took off as a project | 13:05.41 |
chrisl | Maybe we'll talk about it at the staff meeting. I think it would be worth a day or two of my time to have one approach throughout the code | 13:06.21 |
kens2 | tor8 I'll go look at your repository now | 13:06.44 |
| I'd definitely like a more coherent return strategy | 13:07.03 |
| I seem to be using the wrong nick, I'll be right back | 13:07.25 |
chrisl | I'm not terribly bothered which strategy we settle on, but it'd be nice to have just one. And I really do dislike the throw/rethrow/catch nomenclature...... | 13:09.53 |
tor8 | chrisl: agreed, the nomenclature is misleading. sorry about that! | 13:10.29 |
kens | I'm not a fan of throw/catch, but having (IIRC) 4 different macros is even less sane | 13:10.36 |
chrisl | I like the idea of something that makes it explicit: "I'm triggering an error", "I'm propagating an error", "I'm ignoring/handling an error". But I think we'll struggle to enforce the discipline of using that appropriately | 13:13.58 |
kens | Maybe, but it would help if hte macros were actually docuented that way, and indeed even used that way at the moment | 13:14.39 |
Robin_Watts | chrisl: Enforcing following a standard is easy enough, but only if everything follows that standard to start with :( | 13:15.13 |
kens | tor8 your fix for 'last piece of multi-part zip entries' Why seen_last == !!ent ? | 13:16.54 |
| make that a single = there | 13:17.05 |
| But the !!ent question stands | 13:17.17 |
chrisl | Robin_Watts: clearly not that easy, since no one ever seems to have enforced the return_error/gs_note_error stuff before, either :-( | 13:17.53 |
Robin_Watts | kens: !!x = Turn x from an int into a bool. | 13:18.24 |
kens | Yeah, but its an int variable | 13:18.36 |
Robin_Watts | i.e. it's (x == 0 ? 0 : 1) | 13:18.46 |
kens | shrugs, I'd not bother, but if its what Tor wants I have no problem with it particularly | 13:19.44 |
| But I'd like to make sure that's what Tor intende | 13:20.19 |
Robin_Watts | kens: sure. | 13:20.27 |
| chrisl: It's poorly documented, and the code has never been consistent in it's use as far as I can tell. | 13:20.45 |
tor8 | kens: yes, it truncates a truthy value into 0 or 1 specifically | 13:20.52 |
Robin_Watts | But I would welcome it being consistent. | 13:21.03 |
kens | tor8 OK NP then | 13:21.13 |
tor8 | kens: the ent is a pointer, so this is shorthand for (ent == NULL ? 0 : 1) | 13:21.24 |
chrisl | Robin_Watts: the use of return_error and co is document in the C-style document - which clearly, no one bothers with | 13:22.34 |
tor8 | kens: and I find writing y = !!x easier to understand than y = x != NULL... | 13:22.43 |
Robin_Watts | !!ptr is much much nicer than !ptr. I have to think about !ptr every time. | 13:23.58 |
| It's all to easy to confuse !ptr with ptr != NULL. | 13:24.11 |
kens | depends what you are used to | 13:24.13 |
tor8 | !ptr alone is easy enough, I find. but I guess it's all about what you're used to. | 13:24.38 |
| and I'm used to if (ptr) and if (!ptr) and have to do a double take whenever I see (ptr == NULL) and (ptr != NULL) :) | 13:25.09 |
Robin_Watts | Now, !!!ptr, that's another matter :) | 13:25.17 |
| yeah, I guess it's what you're used to. At picsel if (ptr) was (supposedly) forbidden, and we all used if (ptr != NULL) | 13:26.08 |
kens | tor8 those commits all look good to me, though I can't be certain I understand all the implications of a couple of them. | 13:28.55 |
ferter_terter | could you, please, tell me what pdf_obj->ref stands for. i mean, i sort of understand, that it's the most likely to be the amount of pointers, referring to the same piece of data. but, that's it? | 13:29.09 |
| nothing more, nothing less? | 13:30.05 |
tor8 | ferter_terter: pdf_obj_s.refs is the reference counter. see http://git.ghostscript.com/?p=mupdf.git;a=blob;f=docs/refcount.txt | 13:50.51 |
Nathaniel7687 | hello~ | 16:21.24 |
| good afternoon | 16:21.44 |
| I find.. problem that x86 library in MuPDF | 16:22.09 |
Robin_Watts | Nathaniel7687: Tell us more. | 16:23.56 |
Nathaniel7687 | I use Android Studio and run emulator(API 10, Android 2.3.3, x86). | 16:27.52 |
| I run MuPDF application after I'm ndk-build x86 library. | 16:28.50 |
| then crashed | 16:28.58 |
| logcat here http://codeshare.io/dcIWn | 16:31.07 |
| hm... | 16:32.28 |
| AVD Emulator ( API 10, Android 2.3.3, armeabi, Google Inc) is appear same problem | 16:41.56 |
| and AOSP is same | 16:42.18 |
| genymotion(Emulator) is fine. | 16:44.09 |
Robin_Watts | cannot locate 'sigsetjmp'... | 16:53.10 |
| Nathaniel7687: OK, so look in include/mupdf/fitz/system.h | 16:55.55 |
| At the top of that file there is some code that sets HAVE_SIGSETJMP | 16:56.21 |
| I suspect you need to make the #elif be: #elif defined(__unix) && !defined(__NACL__) && !defined(ANDROID) | 16:58.21 |
| Nathaniel7687: Can you try that please? | 16:58.28 |
| actually, I bet it needs something more cunning as a general fix, but... | 16:59.15 |
Nathaniel7687 | okay wait | 17:04.32 |
Robin_Watts | I don't quite understand: "AVD Emulator ( API 10, Android 2.3.3, armeabi, Google Inc) is appear same problem" | 17:05.11 |
| Running an x86 lib in an armeabi emulator seems doomed to fail. | 17:05.33 |
Nathaniel7687 | yaya~ | 17:05.40 |
| I mean | 17:06.18 |
| I use armeabi-v7a library with AVD Emulator (CPU: armeabi) | 17:06.56 |
| but appear same error | 17:07.07 |
| understood? | 17:07.11 |
| so I try to modify include/mupdf/fitz/system.h "#elif be: #elif defined(__unix) && !defined(__NACL__) && !defined(ANDROID)"? | 17:08.23 |
Robin_Watts | yeah, as a quick fix. | 17:08.38 |
Nathaniel7687 | how to set -j option with ndk-build looks like make | 17:13.29 |
Robin_Watts | Nathaniel7687: Not sure you can. I've never managed to. | 17:15.52 |
Nathaniel7687 | ah okay | 17:18.11 |
| fixed it | 17:28.21 |
Robin_Watts | ok, so I suspect that early androids didn't have sigsetjmp | 17:28.55 |
Nathaniel7687 | ah ha.. | 17:29.26 |
Robin_Watts | That'll cost you some performance. | 17:29.34 |
Nathaniel7687 | can you modify system.h when release new version. | 17:30.21 |
| or possible right now on git? | 17:31.17 |
Robin_Watts | Nathaniel7687: I'll need to ponder it. | 17:34.38 |
Nathaniel7687 | why~? | 17:34.51 |
Robin_Watts | Ah! Right. It's a flaw in the version of the NDK you are using. | 17:35.17 |
Nathaniel7687 | It's can make another crash? | 17:35.17 |
Robin_Watts | If you use a non-broken NDK then the problem goes away. | 17:35.32 |
| Code that uses sigsetjmp is faster than that that uses just setjmp. | 17:35.51 |
| Hence I don't want to take the speed hit unless I have to. | 17:36.03 |
| What version of the ndk are you using? | 17:36.24 |
Nathaniel7687 | ah! okay understood | 17:36.25 |
| It's up-to-date | 17:36.34 |
Robin_Watts | what do you mean 'up to date' ? | 17:36.58 |
Nathaniel7687 | hm... | 17:37.09 |
Robin_Watts | You're using the version that comes with android studio? | 17:37.13 |
Nathaniel7687 | the latest | 17:37.21 |
Robin_Watts | Or you're using a standalone version you downloaded? | 17:37.23 |
Nathaniel7687 | android studio | 17:37.30 |
| GNU Make 4.1 Built for x86_64-unknown-cygwin Copyright (C) 1988-2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. | 17:37.38 |
Robin_Watts | So it's STILL broken in android studio ndk? | 17:38.09 |
Nathaniel7687 | hm i don't understand "broken"? | 17:38.36 |
| I just download google android web site Android Studio(included ndk). | 17:39.27 |
Robin_Watts | Right. And if that's the version of the ndk that you're using, and you're seeing this problem, then the ndk is broken. | 17:39.56 |
| old versions were certainly broken. I'd have hoped they would have fixed it by now. | 17:40.13 |
Nathaniel7687 | what ndk version is safety? | 17:42.17 |
Robin_Watts | Nathaniel7687: I don't know. | 17:42.27 |
| r8e is supposedly safe. I would have hoped that anything newer than that should be fine. | 17:43.37 |
sebras | https://lwn.net/Articles/664861/ would this tool be of any help to you? | 19:19.36 |
Robin_Watts | sebras: kens/chrisl talked about that last week. | 19:20.18 |
sebras | Robin_Watts: did they? let me read the logs... | 19:20.35 |
Robin_Watts | They bemoaned it's lack of VS solution etc. | 19:21.01 |
sebras | Robin_Watts: oh, so it does consistency checks on fonts, but nothing useful. oh well. | 19:23.51 |
Robin_Watts | sebras: AIUI, yes. That may make it not entirely useless as it's a stick to beat people with when they report problems, but people would just say "it works with XXXX". | 19:31.41 |
sebras | Robin_Watts: maybe it is better used as a tool to test the results when you order fonts from a foundry..? | 19:41.51 |
Robin_Watts | sebras: Possibly. | 19:42.05 |
| Forward 1 day (to 2015/11/25)>>> | |