| <<<Back 1 day (to 2014/02/23) | 2014/02/24 |
Robin_Watts | henrys: Possibly. I only heard the name of the bipartate founder that wasn't andrew once, but that sounds familiar. | 00:11.29 |
| gxht_thresh_planes was michaels, i think. | 00:11.48 |
| but it ended up as my commit maybe? | 00:11.55 |
henrys | Robin_Watts: hah we could have just googled it. But I seem to be talking to him. As far as I can tell if I contact Bipartate engineers and try and hire them their first born sons will be will be taken... | 00:14.26 |
Robin_Watts | Oh, you think they have non-compete clauses? | 00:15.06 |
henrys | his words seemed to indicate that ... but anyway I think we do have will have an arrangement in place where we can work together. | 00:16.02 |
Robin_Watts | That's great. | 00:16.10 |
henrys | s/do have// | 00:16.17 |
Robin_Watts | And if we can't work with them (because of any future conflict of interest) we have the option of using emobix too. | 00:16.46 |
| So I think we're in a good position. | 00:16.50 |
| The SO code does not handle XPS. Neither does it handle ODT. | 00:24.03 |
henrys | oh I'm surprised about odt | 00:25.08 |
Robin_Watts | ODT is the obvious missing one. | 00:25.14 |
| It all depends where we want to put our effort. | 00:25.34 |
| If Miles wants to aim for 100% appearance match, then that's going to eat our time. | 00:26.16 |
| If we're happy to stay with the current level of appearance matching (which would be appropriate for the non-printing market, and app sales, probably), then we could look at supporting ODT. | 00:27.19 |
| ray_laptop: I think you're right. Michaels SSE code only does 1bpp thresholding. | 00:28.14 |
| Initially it only did 1 component 1bpp, then he updated it to do n component 1bpp. But he hasn't done n component m bpp. | 00:28.49 |
henrys | Robin_Watts: off to dinner, I imagine you'll be off before I return, see yout tomorrow. | 00:29.22 |
Robin_Watts | ODT support might be enough to make us stand out from any bipartate offering (though I'd guess it would be a reasonable bet to say they are looking at it too). | 00:29.36 |
| henrys: I'm going to turn my attention back to mupdf tomorrow unless you say different. Try and get the changes that I was doing as a basis for bates numbering support in. | 00:30.13 |
| It should also help with the customers watermark request. | 00:30.23 |
henrys | Robin_Watts: sounds fine | 00:30.31 |
Robin_Watts | cool. have a good dinner. Say Hi to Sabrina. | 00:30.47 |
henrys | will do | 00:31.04 |
tor8 | morning Robin_Watts | 08:46.13 |
sebras | tor8: morning! | 08:49.24 |
tor8 | Robin_Watts: henrys: so, I tried out the Smart Office LITE version on my Nexus 10... it looks dreadful. The resolution scaling is completely botched. Some UI elements are scaled, but the majority is not, so there are big buttons mixed with text that is so tiny as to be unreadable, and icons that look like specks of dirt. | 08:58.11 |
Robin_Watts | tor8: Did you try out the apk from my home dir ? | 09:08.06 |
tor8 | Robin_Watts: I could only find a GhostDocs apk when I looked | 09:08.21 |
| if there is a full SO2 apk there now, I'll give that a spin. | 09:08.33 |
Robin_Watts | There is. | 09:10.13 |
tor8 | Robin_Watts: okay, that has the same issues. normal sized buttons with miniscule text labels. | 09:16.38 |
| and opening pdfref13.pdf and scrolling to page 8 takes over ten seconds to complete.... :( | 09:16.56 |
| with the carousel thing, the progreess spinner is constantly busy and it takes ages for new pages to fill in | 09:17.42 |
kens | Well, I have finally caught up with the backlog, I htink I will go fetch some more coffee now :-( | 10:34.36 |
jhabjan | when using diacritics in the filename passed to the "gsapi_init_with_args" with a call to "gsapi_set_arg_encoding (utf8)" before the initialization, everything works fine as expected | 12:36.29 |
Robin_Watts | jhabjan: Why do I feel a "but" coming on... | 12:37.10 |
jhabjan | the problem I'm having at the moment is when i try to do similar thing by passing: "(äbc.pdf) (r) file pdfopen begin" to "gsapi_run_string" | 12:37.28 |
Robin_Watts | Where that string is UTF8 encoded too ? | 12:37.55 |
jhabjan | yep | 12:38.01 |
Robin_Watts | That should work too, I believe. | 12:38.18 |
jhabjan | it does not work for me... | 12:38.54 |
| I just tryed GSView... it has a same problem | 12:39.02 |
Robin_Watts | regardless of how the filename gets into gs (whether from ps or from an arg) it should be treated the same internally. | 12:39.07 |
| Do you have a simple example project that shows the problem? | 12:39.51 |
| I'm assuming this is windows you are working on ? | 12:40.02 |
jhabjan | yep, windows... I'm trying this from C#.. | 12:40.58 |
Robin_Watts | oh, ew. | 12:41.13 |
jhabjan | but... | 12:41.34 |
| I have ghostscript attached, so I can debug native code.. | 12:41.49 |
Robin_Watts | If you can reproduce the same problem by calling gswin32c.exe directly, I can then have a quick look. | 12:42.02 |
| Calls to gsapi_run_string essentially tunnel all the way down to gs_interpret with no changes to the string. | 12:44.02 |
| at which point the string disappears into the depths of gs. | 12:44.47 |
| I'd check to see that the string looks properly UTF8 encoded at that point. | 12:45.07 |
jhabjan | gswin32c.exe & 64 handles the file correctly.. | 12:45.27 |
Robin_Watts | Then the actual file open will be done by a call from the core to... gp_fopen I think. | 12:46.03 |
| or gp_fopen64 | 12:46.28 |
| If you check there, you should see that the filename passed into that function is still properly utf8 encoded. | 12:46.54 |
| You can see that it's unpacked to wchars there, and passed to _wfopen | 12:47.12 |
| If you can spot a place where it's not in utf8 encoding and it should be, we can try to figure out what's going wrong. | 12:47.42 |
jhabjan | do you want to TeamView to my machine? | 12:48.12 |
Robin_Watts | Only if I really have to. I've got my head in mupdf at the moment. | 12:49.41 |
jhabjan | no worries, no rush.. | 12:50.28 |
| will try to see what I can find out... | 12:50.58 |
henrys | hi kens welcome back! | 14:52.12 |
kens | Thanks henrys | 14:52.18 |
| I see its been busy while I was away :-) | 14:52.48 |
henrys | oh you mean the smart office business | 14:55.14 |
kens | Yes, lots of stuff to read on IRC | 14:55.44 |
| Meeting in Texas looks like it will be lengthy | 14:56.01 |
henrys | I imagine lengthy pontification probably irrelevant to what we actually end up doing (i.e. a software meeting) | 15:00.33 |
kens | forsees much 'debate' | 15:00.59 |
Robin_Watts | henrys: Dunno if it's worth populating the GhostDocs section of the agenda with anything? | 15:02.36 |
| At the moment it's just got "Font Metrics" on. | 15:02.47 |
kens | I suspect the topic will be enough to generate plenty of talk | 15:03.11 |
Guddu | How can i use Ghostscript to see barcode image? | 15:05.11 |
kens | depends, is your barcode in PostScript, PDF ? | 15:05.30 |
henrys | Robin_Watts: we'll make a list at the meeting tomorrow. | 15:09.09 |
Robin_Watts | ok. | 15:09.18 |
Guddu | kens, Its a postscript i guess. I am basically using a Python library to generate PDF417 Barcode. | 15:11.09 |
| http://dpaste.com/hold/1653582/ | 15:11.10 |
| But it kind of shows nothing. Error at http://dpaste.com/hold/1653582/ | 15:11.21 |
kens | Guddu : I would have to see the PostScript file before I could comment, the Python is gibberish to me | 15:12.10 |
Guddu | kens, I willl now generate the PS and send it shortly. Thanks for your help. | 15:12.37 |
kens | No problem | 15:12.44 |
tor8 | chrisl: I liked your name suggestion more than mujs... enough to make a mockup web page to see how it would look: | 15:23.59 |
| http://ghostscript.com/~tor/occamscript/ | 15:24.01 |
chrisl | tor8: only problem is, as Robin_Watts pointed out, it might be confused with occam language :-( | 15:25.00 |
tor8 | chrisl: perfect, just like java and javascript ;) | 15:25.13 |
chrisl | :-) | 15:25.26 |
paulgardiner | :-) | 15:25.28 |
tor8 | chrisl: or we could just spell it ockhamscript (but then nobody would remember how to google for it) | 15:25.44 |
chrisl | tor8: I like the self portrait on the page, too ;-) | 15:26.02 |
tor8 | chrisl: :) | 15:26.11 |
| I'll let henrys have the final word, but occamscript as a name has really grown on me. | 15:27.49 |
Robin_Watts | ew, yuck. | 15:29.53 |
kens | thinks oghamscript :-) | 15:30.21 |
henrys | is that in reference to occamscript, Robin_Watts ? | 15:30.30 |
| I really do like it. | 15:30.53 |
Robin_Watts | indeed. | 15:30.59 |
| A really good name should allow you to hear it and say "ah, I know what that does". | 15:31.31 |
tor8 | Robin_Watts: like v8 and spidermonkey? ;) | 15:31.43 |
Robin_Watts | mujs achieves that. occamscript... doesn't. | 15:31.46 |
| Did I say that v8 and spidermonkey were good names? :) | 15:31.58 |
kens | So, Javascript allows me to control my coffee machine ? | 15:32.03 |
chrisl | *That* would make JavaScript worth learning! | 15:32.32 |
tor8 | Robin_Watts: we don't have to pick a good name, just a memorable and googlable name. | 15:32.47 |
Robin_Watts | tor8: occamscript wouldn't get my vote (but then I've actually coded in occam :) ), but it's not my call. It's not an *awful* name. | 15:33.59 |
henrys | tor8:of course you could get the same effect and appeal to dolts with "razorscript" and a bit of explanation on the page. | 15:34.16 |
kens | Mochascript | 15:34.31 |
| Joescript ? | 15:34.40 |
tor8 | Robin_Watts: I did consider orcscript, just because javascript is as ugly | 15:34.41 |
Robin_Watts | What's the argument for occam ? | 15:34.53 |
chrisl | It's small, but powerful: "EspressoScript"? | 15:35.10 |
kens | :) | 15:35.17 |
tor8 | occamscript: always prefer the simplest implementation. | 15:35.49 |
Robin_Watts | Ah. quantascript. | 15:36.07 |
| The smallest possible implementation. | 15:36.22 |
tor8 | planckscript? | 15:36.38 |
Robin_Watts | but then we'd get sued by australian pilots. | 15:36.39 |
paulgardiner | Having "script" in there suggests to me a new language rather than a new interpreter for an existing language, but that's probably just me. | 15:36.54 |
tor8 | paulgardiner: yeah, there is that... | 15:37.11 |
kens | We have that with GS | 15:37.19 |
paulgardiner | planckjs | 15:37.20 |
tor8 | but we already have it for GS and (sort of) mupdf | 15:37.40 |
paulgardiner | "mu" has the "by the same people as mupdf" connotation | 15:38.01 |
| Oh yes: GS, true. | 15:38.39 |
tor8 | there's also the argument that with 'occamscript' we already have a brilliant logo! | 15:39.59 |
henrys | who has more hair Ockham or Tor? | 15:41.26 |
paulgardiner | Now you've explained the s/ghost/occam/ thing (which I should have noticed) it certainly makes more sense. | 15:41.39 |
chrisl | henrys: whichever has the sharper razor? | 15:41.54 |
henrys | ;-) | 15:43.35 |
| and I do like razorscript but I'll assume everyone else is a "no-go" on that one and withdraw it. | 15:44.20 |
chrisl | kens: would the ramfs stuff not be better in non-gc memory? Or does it rely on garbage collection? | 15:44.51 |
kens | It doesn't rely on it, but since its part of PosScript.... | 15:45.18 |
chrisl | It's in base..... | 15:45.57 |
kens | Hmm probably because the others are | 15:46.27 |
chrisl | I mean, it's accessible to, and no reason not to be use by the other languages, presumably? | 15:47.13 |
kens | I guess, though I;'ve no idea how you would use it | 15:47.24 |
| #I only really considered PostScript | 15:48.21 |
chrisl | I haven't looked at the code, I just thought it would make sense to not burden the garbage collector if it's not necessary | 15:48.35 |
kens | It 'shouldn't' be required, but I'm not certain tha code is that great at cleaning itself up in the absence of garbage collection (I believe it should, but....) | 15:51.40 |
| I wasn't terribly worried because frankly its a check box, nobody actually uses ramfs | 15:52.05 |
| As evidenced by how long it took for this error to surface. | 15:52.22 |
chrisl | Yeh, you're probably right. | 15:52.38 |
kens | I don't have a problem with altering it, except that I have no idea how to use the chunk allocator | 15:52.41 |
Guddu | kens, I am rally sorry but I am not able to figure out a way to extract the PS code. I was trying to use a Python library to generate PDF417 Barcodes. But The library seems to be not working. I will continue trying. If there is any other better way of accomplishing this barcode generation then please let me know. | 15:58.33 |
kens | Guddu : that's not somethign I can answer, 'better' depends utterly on what you are trying to do. There are Barcode fonts available for PostScript, those are probably easier to use than some Pythong library, but if your desired end result isn't a PostScript file, then that's not a 'better' solution.... | 16:02.31 |
Guddu | kens, I basically need to generated PDF and the PDF File needs to have the barcode (along with other contents) | 16:03.14 |
kens | Using a barcode font is probably easier then, there are free ones readily available on the web | 16:03.49 |
Guddu | kens, Could you please guide me to one of those? | 16:06.33 |
kens | Google for barcode font | 16:06.58 |
| Eg: | 16:07.17 |
| http://www.barcodesinc.com/free-barcode-font/ | 16:07.17 |
| http://www.dafont.com/theme.php?cat=711 | 16:08.04 |
Guddu | kens, If i have this EPS file then how can i see it in GhostScript? Shall i paste the contents as it is on the prompt? http://dpaste.com/1653782/ | 16:08.09 |
kens | If you run Ghostscript and supply the EPS filename on the command line then the default device will be used to render the output, normally this is the display device | 16:08.51 |
jzmer | could ghostscript extract pdf attachments? | 16:10.31 |
| that is some files "attached" inside a pdf? | 16:10.40 |
kens | It 'could', but it doesn't | 16:10.51 |
Guddu | kens, I tried that but i get error. http://dpaste.com/1653792/ | 16:11.58 |
Robin_Watts | Guddu: That is not what kens said to do. | 16:12.24 |
| At the GS> prompt you are expected to enter postscript commands. | 16:12.40 |
| You want: gswin32c.exe C:\Users\Guddu\Downloads\barcode.eps | 16:12.57 |
kens | Assuming this is WIndows: | 16:12.58 |
| gswin32 <filename.eps> | 16:12.58 |
jzmer | kens: what do you mean? | 16:13.57 |
Guddu | Thanks Robin_Watts kens That works :-) | 16:14.07 |
kens | jzmer, exact.y what I said, Ghostscript could extract attachments from *inside* a PDF file, but it does not currently do so | 16:14.22 |
jzmer | kens: are you saying that it is possible with a sdk, but not exposed directly? | 16:14.26 |
kens | jzmer its possible by writing some code (PostScript code) | 16:14.43 |
jzmer | kens: how much time would it take for a ps newbie to write such code though? i need an attachmend inside a pdf really quick, but i don't have access to adobe reader/foxit | 16:16.08 |
| and it has to be in commandline | 16:16.18 |
kens | jzmer, I would think quite a long time, the PDF interpreter is a nasty piece of PostScript | 16:16.41 |
Robin_Watts | jzmer: You might have more luck extending MuPDF to do it. Assuming you're happy in C ? | 16:17.14 |
kens | For me, probably less than a day, longer for someone versed in PostScript but not in the intracacies of our PDF itnerpreter, *much* longer for someone without considerable PostScript experience | 16:17.16 |
| Almost certainly the easiest way to extract and embedded file is to do it by hand :-) | 16:18.36 |
jzmer | horrible news then... | 16:18.50 |
kens | Why not just contact the creator of the PDF and ask them to send you the 'attachemnent' | 16:20.35 |
Robin_Watts | mutool extract file.pdf <object number> | 16:21.42 |
| but you'd need to know the object number. | 16:21.49 |
| jzmer: Are you looking to do this for a single file, or a whole set ? | 16:22.01 |
kens | A grep might tell you that | 16:22.04 |
| I cna't recall offhand how those are stored | 16:22.13 |
| let me look at mu history, I implemented /EMBED in GS just recently | 16:23.16 |
jzmer | Robin_Watts: just a single file | 16:24.10 |
| Robin_Watts: but how large could <object number> be though? | 16:24.43 |
kens | very large | 16:24.53 |
| Its a 10 digit number | 16:25.05 |
jzmer | kens: i am the creator of the pdf, really... | 16:25.10 |
| way back... | 16:25.19 |
| but no longer do i have access to the file that is embedded... | 16:25.32 |
| but i still have the pdf. and i will need to extract the file somehow | 16:25.51 |
kens | Hmm, well embedded files are mor complex than I remembered | 16:25.56 |
| THey have their own tree | 16:26.06 |
Robin_Watts | jzmer: Can you put the file somewhere we can see it? | 16:26.47 |
kens | Looks like you need to grep for a dictionary containing /FS | 16:26.54 |
jzmer | Robin_Watts: you mean something like google drive? | 16:27.15 |
kens | thinks Robin_Watts is correct, it'll be quicker to do it than talk about it | 16:27.16 |
Robin_Watts | jzmer: that'd do. | 16:27.30 |
jzmer | thank you, folks. hang on for a moment. | 16:27.56 |
| actually, it might take longer. i will call a staff to make the 2 pdf files available for a moment. | 16:29.37 |
kens | so its 2 PDF files now ? | 16:30.16 |
jzmer | erh, only 2, i promise. and the files embedded within are *.nb files, one per pdf. | 16:31.25 |
kens | :-) | 16:31.33 |
jzmer | here you are: https://gist.github.com/anonymous/23e6e434ec3c3cbc906a | 16:33.51 |
kens | Hmm I only see a text file in the .ra | 16:34.46 |
| sorry .tar.gz | 16:34.52 |
jzmer | wow, that was fast. there should be two goo.gl urls in the gist, each for one file | 16:35.24 |
kens | THere are 2 URLs :-) | 16:35.33 |
Robin_Watts | I have requested access for both files. | 16:35.41 |
kens | ANd if I go to the URL (signing in witgh Google) it says I need permission | 16:35.49 |
kens | will leave it with Robin | 16:36.31 |
chrisl | henrys: mail about the URW/Monotype comparison coming to you. | 16:36.36 |
jzmer | all right... i will call them again... sorry.... | 16:36.48 |
henrys | chrisl alright great | 16:36.58 |
Robin_Watts | I have them. | 16:37.01 |
jzmer | they've changed the access rights now. | 16:38.00 |
kens | I'll leave it with Rovbin unless he has trouble (can't see hwy he would though) | 16:38.43 |
jzmer | Robin_Watts: are you really coding postscript for extraction though? | 16:38.59 |
kens | LOL, no way | 16:39.08 |
| decompress the PDF, find the object number then extract it with mutool | 16:39.34 |
jzmer | but how do you perform the first two steps though? | 16:40.00 |
kens | decomrpess with MuPDF then read tghe PDF file | 16:40.12 |
jzmer | you mean mutool? | 16:40.23 |
kens | possibly ;-) | 16:40.32 |
Robin_Watts | kens: Not even decompressing with mupdf :) | 16:40.49 |
jzmer | i then i will get a table of objects and their names then, i guess? | 16:40.51 |
| Robin_Watts: these are mathematica-9.0.1-generated pdfs | 16:41.14 |
kens | jzmer, no you just get a decomrpessed PDF file | 16:41.15 |
jzmer | and iirc, mathematica is built on adobe's pdf stack | 16:41.34 |
| one of them might be huge | 16:41.48 |
| spanning around 30 pages | 16:41.52 |
kens | The name tree is always in the Root node | 16:42.07 |
jzmer | kens: so the toil would then lie in finding the right magic number | 16:42.39 |
kens | Its not hard, but hard ot program | 16:42.52 |
| For a one-off better to work manually | 16:43.14 |
Cromir | hi guys | 16:43.17 |
| Is there someone? | 16:43.26 |
kens | many | 16:43.32 |
Cromir | :) | 16:43.48 |
| I've a little problem | 16:43.55 |
jzmer | hmm, lemme check with mutools for a moment. | 16:43.56 |
Cromir | I try to load a pdf with links between pages on android | 16:44.19 |
| but links are completely wrong | 16:44.27 |
| is it a known bug? | 16:44.33 |
kens | What application ? What version ? | 16:45.00 |
Cromir | last mupdf app downloaded from Play Store and last lib version used in my app | 16:45.36 |
Robin_Watts | jzmer: Where to send the decompressed versions? | 16:45.38 |
Cromir | some behaviour | 16:45.46 |
| same* | 16:45.49 |
kens | Cromir someone would need to see you r PDF file, I suggest you open a bug report and attach the PDF file. By the way, are you sure the PDF is not faulty ? | 16:46.15 |
jzmer | Robin_Watts: could you make it wget-able though? | 16:46.16 |
Cromir | Kens, same pdf opened with Adobe Reader, links works | 16:47.04 |
kens | THen I suggest you open a bug report | 16:47.14 |
Robin_Watts | jzmer: See private tab. | 16:47.19 |
| Cromir: Hi. So you're using MuPDF in an app? Are you a free user, or a commercial licensee? | 16:47.51 |
jzmer | Thank you many times! If we ever meet in person I will buy you a bottle of beer! | 16:47.52 |
Robin_Watts | jzmer: Let me know when you have them, so I can delete them. | 16:48.06 |
Cromir | I use it for non commercial use | 16:48.18 |
Robin_Watts | Cromir: So you're a GNU GPL user then? Are you intending to let anyone else have a copy of your app? | 16:48.47 |
Cromir | When it will be ready.. :D | 16:49.15 |
jzmer | Robin_Watts: staff called back saying about "requesting access". | 16:49.36 |
| i guess google didn't make it easy enough for ppl to share files | 16:50.13 |
Robin_Watts | jzmer: Try now. | 16:51.09 |
jzmer | Robin_Watts: i have the files ready! | 16:53.20 |
Robin_Watts | Ta. | 16:53.28 |
jzmer | you saved me a day's work in re-prototyping, Robin_Watts! | 16:54.04 |
Robin_Watts | Damn. I lost cromir. | 17:00.45 |
kens | OK I'm off for the night, bye everyone | 17:08.27 |
jhabjan | Robin_Watts: just to let you know that I manage to solve the problem related to diacritics... | 17:13.40 |
Robin_Watts | jhabjan: Ah, cool. Was it an error in gs? | 17:13.56 |
| Is BAE systems a supported customer yet? | 17:14.05 |
chrisl | Robin_Watts: I don't believe so, why? | 17:14.41 |
Robin_Watts | New bug from them. | 17:14.52 |
jhabjan | actually... I figured out that there is no need to call 'gsapi_set_arg_encoding' (with UTF8) | 17:14.53 |
Robin_Watts | "Close as freeloader" | 17:14.58 |
chrisl | Robin_Watts: well, according to the report, the problem is really with Oracle...... | 17:15.32 |
Robin_Watts | chrisl: Can I change the bug report to "Will not work with BAE Systems" ? please? | 17:15.52 |
| jhabjan: Urm... really? | 17:16.13 |
jhabjan | Rowin_Watts: and the only difference was that gsapi_init_with_args handles backslashes slightly different... | 17:16.23 |
chrisl | Robin_Watts: better still, we could hack bugzilla to reject bugs from their addresses! | 17:16.37 |
jhabjan | Robin_Watts: the solution was to encode string as UTF8 byte array, and then back to windows default encoding... | 17:17.36 |
Robin_Watts | "Ghostscript has been known to misbehave when used to develop weapons of mass destruction. We believe it has become self aware and developed a conscience. Perhaps you should try the same and become a supported customer." | 17:17.38 |
| jhabjan: Sounds ick. | 17:17.54 |
chrisl | Robin_Watts: TBH, I would close it saying, "if it works in normal use, the problem is probably with Oracle, report it to them" | 17:18.10 |
jhabjan | Robin_Watts: when passing a path to gsapi_init_with_args the backslash has to be escaped with another backslash... and when passing to a gsapi_run_string, the path has to be double escaped or forward slash has to be used. | 17:19.43 |
Robin_Watts | jhabjan: That sounds like a C# specific thing. | 17:20.14 |
chrisl | I think it's a Postscript thing: Postscript generally expects forward slash in paths | 17:20.57 |
jhabjan | Robin_Watts: actually... it's not C# thing... | 17:21.23 |
chrisl | The thing is, with gsapi_run_string() you passing in Postscript. | 17:22.17 |
jhabjan | chrisl: yep, and the backshlash gets lost when it reaches "case exec(t_file):" | 17:23.04 |
chrisl | jhabjan: so, when using gsapi_run_string() it's probably better to use forward slashes, since that's what Postscript expects | 17:23.46 |
jhabjan | chrisl: correct :) it took me a while to figure that out... | 17:24.10 |
| chrisl: but it also works with double escaped backshlashes | 17:24.58 |
chrisl | jhabjan: it does, it's just we generally recommend forward slashes - it's up to you | 17:25.36 |
| jhabjan: the other thing is that gsapi_run_string() *probably* doesn't do any UTF8 encoding, so you'd need to convert the path string yourself. | 17:26.32 |
jhabjan | chrisl: the only thing what's confusing me at the moment is in which case should I use "gsapi_set_arg_encoding" | 17:27.03 |
chrisl | jhabjan: TBH, I work on Linux, so I'm not too sure off this stuff. | 17:27.48 |
Robin_Watts | jhabjan: gsapi_set_arg_encoding is used to set the encoding for args. | 17:27.53 |
| If you pass a postscript string in, that's just a sequence of bytes, so no encoding expected there. | 17:28.37 |
jhabjan | Robin_Watts: but it works without a call to that method anyway... | 17:28.37 |
Robin_Watts | ALL filenames used within the code of gs are now assumed to be in UTF8 format. | 17:29.10 |
jhabjan | Robin_Watts: If i don't perform any encoding on my side, there is no difference if I call 'gsapi_set_arg_encoding' or not... | 17:29.32 |
Robin_Watts | hence if you pass in a postscript program that happens to contain a string that gets used as a filename, then that string should be UTF8 encoded. | 17:29.49 |
| jhabjan: Right. | 17:29.56 |
jhabjan | Robin_Wats: ok.. all clear | 17:30.18 |
Robin_Watts | Great. Can you explain it all back to me when I forget it before I have to look at this code again? :) | 17:30.45 |
jhabjan | sure :) | 17:31.07 |
| anyway... thank you | 17:31.25 |
chrisl | Robin_Watts: does gsapi_set_arg_encoding() affect the conversion to wchar for the call to _wfopen()? | 17:32.10 |
ray_laptop | jhabjan: you could put a comment in your code that calls the gs api, right (or are comments something that you don't allow in oyur code) ;-) | 17:32.17 |
Robin_Watts | chrisl: No. | 17:32.29 |
chrisl | Okay, that was the only other issue I could see arising..... so that's good :-) | 17:32.50 |
Robin_Watts | Whenever we call gp_fopen we assume we are passed UTF8. | 17:33.09 |
jhabjan | ray_laptop: well, I had in plan to document my code... and I will once i get some time off my regular work :) | 17:33.32 |
chrisl | Robin_Watts: no, I mean the conversion of the UTF8 *into* wchars | 17:33.38 |
Robin_Watts | chrisl: in gp_fopen we always convert from utf8 to wchar. It's unaffected by anything else. | 17:34.23 |
chrisl | Robin_Watts: okay, that's what I thought..... | 17:34.54 |
jhabjan | Robin_Watts: I think (from what I see) that it depends on the compiler directive: | 17:35.21 |
| GS_NO_UTF8 | 17:35.22 |
Robin_Watts | Indeed. But that's set by default. | 17:35.46 |
jhabjan | ok | 17:36.12 |
Robin_Watts | If people want to define GS_NO_UNICODE then they can get the old behaviour back, but we don't recommend (or support) that. | 17:36.13 |
chrisl | At some point, we should probably get rid of GS_NO_UNICODE | 17:36.59 |
Robin_Watts | chrisl: Don't be silly. This is Ghostscript. | 17:37.38 |
chrisl | AAAAGGGHHHHHHHHH!!!!!! | 17:37.50 |
henrys | 151 bugs - seg faults found in ... jesus | 17:52.04 |
| 150 I fixed one. | 17:56.17 |
Robin_Watts | You're on a roll! | 17:56.38 |
ray_laptop | can someone glance at my patch http://git.ghostscript.com/?p=user/ray/ghostpdl.git;a=commitdiff;h=eefcb0a18ed793568869250571a9e6c7c70fd4f8 | 18:29.46 |
| why this didn't show up more often, I don't know. It was quite a hole, in having a stale pointer to memory that had been freed by a restore | 18:43.27 |
chrisl | ray_laptop: so, when is pint freed in relation to the call to gx_pattern_cache_free_entry()? | 18:45.13 |
| s/pint/pinst | 18:45.20 |
| I'm wondering why pinst isn't nulled when it is freed? | 18:45.52 |
| ray_laptop: does the pattern instance not have access to a pointer to the clist device? | 18:52.23 |
zeniko | henrys: Thanks for signing off and landing (and good luck with the remaining segfauls!) | 20:12.38 |
| Robin_Watts: I've got another half a dozen patches on zeniko/mupdf for review | 20:13.09 |
| (although tor8 might want to look at the follow-up for bug 694851) | 20:13.38 |
| tor8: do you already accept bug reports for libjs (mujs, occamscript, ...)? | 20:14.31 |
henrys | sure zeniko thanks for helping out | 20:53.58 |
tor8 | zeniko: yeah, but I don't think we have a product set up in the bugzilla. you can just mail me (or post here) with anything you've got. | 20:58.40 |
| and I'll ask marcosw to create a product in the bugzilla. henrys, did we come to a consensus regarding the name? | 20:59.31 |
henrys | no but mujs seems to the be the frontrunner | 21:01.36 |
tor8 | henrys: occamjs, razorjs? mujs looks like unpronouncable gibberish, as if someone sneezed on the keyboard :( | 21:07.01 |
henrys | tor8: torscript ;-) | 21:08.47 |
| you pick between those 2, I can live with either | 21:09.30 |
tor8 | henrys: as much as I hate to say it, maybe scott or miles ought to have a vote... they're the ones to be peddling it should we decide to try to sell it. | 21:13.14 |
henrys | okay I'll add it to the agenda, whatever you use in bugzilla can be changed. | 21:14.11 |
tor8 | henrys: crap. razorjs is taken :( | 21:14.15 |
| and so is razorscript. | 21:15.21 |
| zeniko: the 694851 changes look good to me. | 21:17.57 |
zeniko | tor8: thanks for the review | 21:20.38 |
| as for libjs: my vote would be for mujs | 21:20.55 |
| it's brief, to the point and fits well in the the mu* family | 21:21.16 |
| as for the bugs: |var a = ["c"]; a[0] += a[0];| fails to update a[0] | 21:22.28 |
| and |str.replace(/.*/, "X")| overflows the stack if str.length is large enough (happens for reasonably sized data) | 21:25.15 |
tor8 | zeniko: oops. looks like a merge error slipped in, I never emit the "setprop" opcode :( | 21:27.36 |
| and yes, the regexp implementation still needs some work to reduce/eliminate the recursion | 21:28.23 |
sebras | tor8: I agree with zeniko. mujs is probably the better name. especially since the primary use of it is within mupdf. | 21:28.25 |
tor8 | zeniko: the fastest way to smash the stack right now are recursive counted quantifiers. /(a{0,500}){0,500}/ for instance | 21:29.21 |
| if only they hadn't included assertions and backreferences, it would be trivial to avoid recursive algorithms | 21:30.09 |
zeniko | if only all input data were sane, there would be no need to prevent stack overflows ;-) | 21:31.54 |
tor8 | zeniko: I did note a few irregularities in your t-rex fork. \c escapes according to the ECMAScript spec should take any character value % 32. | 21:32.46 |
sebras | tor8: or if you want to keep with the coffee-related theme: zarfjs from the word zarf which is a holder of ornamental metal for a coffee cup without a handle. | 21:33.57 |
tor8 | sebras: but that's andrew plotkin's internet nick! | 21:34.34 |
sebras | tor8: oh, mr xyzzy. | 21:35.18 |
zeniko | tor8: IMO \c escapes could've been left out of the spec altogether and octal escapes even more so (IOW: I've never really bothered implementing them at all, at least not for my personal usage) | 21:37.13 |
tor8 | zeniko: there's a lot of crap that shouldn't be in the spec. but octal escapes are not in the spec at least. | 21:38.37 |
| zeniko: just out of curiosity, what do you use your t- | 21:39.22 |
| rex fork for? | 21:39.26 |
zeniko | tor8: every browser I've tested supports octal escapes, though | 21:40.10 |
tor8 | zeniko: yeah, browsers support a lot more than the spec... :( | 21:40.43 |
zeniko | I've created the fork originally for my own Notepad clone and then had fun reinventing grep, sed and find on top of it :-) | 21:41.17 |
tor8 | but javascript coders expect odd things like "08" to be a valid number | 21:41.19 |
zeniko | "use strict" to the rescue! | 21:41.54 |
tor8 | that is the worst idea ever... the amount of complexity "use strict" adds to the ES5 spec is insane, just to deal with the unholy mixture of scrict and non-strict code. | 21:42.31 |
sebras | tor8: does mujs interpret 08 as a decimal number? I forgot what we did in the end. | 21:42.41 |
tor8 | sebras: no. we throw a syntax error. | 21:42.53 |
sebras | right, I was uncertain if it was just a warning. | 21:43.25 |
tor8 | zeniko: but don't get me wrong, "use strict" should have been the default from the beginning. | 21:44.19 |
zeniko | tor8: as should have been -Wall -Wextra -Werror for C compilers | 21:45.32 |
| if only that also included -Wunreachable-code ;-) | 21:45.55 |
tor8 | zeniko: heh, that flag would have saved Apple a lot of embarassment lately :) | 21:46.29 |
zeniko | I was even more amazed to learn that it's been removed as of GCC 4.5 | 21:47.20 |
tor8 | zeniko: even more reason to switch to clang... | 21:47.49 |
zeniko | now I'll have to wait until mujs compiles under MSVC to feel safe again ;-) | 21:47.50 |
Urchlay | any mupdf devs in the house? | 21:50.27 |
tor8 | zeniko: I have never actually tried to compile mujs under MSVC. does it fail hard? | 21:50.34 |
| Urchlay: yes, but I am not going to stay on for much longer. | 21:51.14 |
sebras | tor8: zeniko: http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00179.html | 21:51.23 |
Urchlay | just one dumb question. the xps_parse_color() overflow only affects XPS documents, that stuff never gets called when viewing a PDF, right? | 21:51.49 |
| (common sense says "of course not", but I haven't read the code...) | 21:52.27 |
tor8 | Urchlay: of course not :) | 21:52.47 |
Urchlay | what I thought. I maintain the mupdf build for slackbuilds.org, one of my users is being paranoid | 21:53.10 |
tor8 | Urchlay: there is a stack buffer overflow fix for xps_parse_color in the git | 21:53.28 |
Urchlay | yah, I know. I just backported it to mupdf-1.2 | 21:53.45 |
zeniko | tor8: the usual missing functions, __inline instead of inline and a bunch of warnings which -Wextra should catch | 21:53.53 |
tor8 | zeniko: oh yeah, the signed/unsigned int conversion insanity that drives me crazy all the time. I guess I'll become a convert soon, like with const... | 21:54.36 |
Urchlay | would prefer to update my build for mupdf-1.3, but it'll take more work (zathura-pdf-mupdf will need updating, which probly means all the zathura-* stuff needs updating) | 21:55.13 |
tor8 | Urchlay: you might want to wait for 1.4 (due out in march) if you're going to be spending time updating stuff | 21:55.42 |
zeniko | tor8: how much longer until I get size_t instead of int for lengths? ;-) | 21:55.55 |
Urchlay | also I'll be stuck with your static libopenjpeg.a, as slackbuilds hasn't got openjpeg newer than 1.5 (and its API changed so everything that uses it will need patching) | 21:56.00 |
tor8 | zeniko: a few more years, at most. | 21:56.32 |
Urchlay | tor8: thanks, that helps a lot. I'll send 'em my 1.2 + xps fix, and wait until 1.4 is released instead of packaging up 1.3 now | 21:56.54 |
| tor8: if it's not too late for a feature request... dynamic libmupdf & friends, by default? | 21:58.00 |
tor8 | zeniko: actually, I might look at making mujs signed/unsigned clean first. | 21:58.09 |
zeniko | Urchlay: just don't tell your user that there are dozens of other exploits in 1.2 which just haven't got a CVE number | 21:58.10 |
Urchlay | :) | 21:58.14 |
zeniko | tor8: -Wextra -Werror -Wunreachable-code ? | 21:59.02 |
tor8 | Urchlay: I have an intense dislike for shared libraries. and we're 100% *not* ABI compatible between versions. | 21:59.11 |
| zeniko: yeah. I looked at cleaning up -Wextra but got discouraged by how far signed/unsigned stuff spreads. | 21:59.51 |
Urchlay | tor8: ok, that's a no. Cool. | 22:00.18 |
tor8 | Urchlay: yeah, we don't want to do it ourselves (it also makes cross platform makefiles a lot more difficult) | 22:00.40 |
| but we don't object if distro packagers make shared libraries. | 22:00.56 |
Urchlay | I only want dynamic libs because zathura-pdf-mupdf ends up huge if I don't | 22:01.04 |
| ok, even better. I suppose for the purposes of this discussion mine counts as a distro package (unofficial tho it is) | 22:01.35 |
tor8 | good night all | 22:03.28 |
zeniko | tor8: yeah, if you don't start a project with -Wextra -Werror, it's quite hard to catch back up | 22:03.43 |
tor8 | zeniko: only 10k lines to fix :) should be a piece of cake! | 22:04.11 |
zeniko | tor8: good night to you too | 22:04.21 |
Urchlay | -Werror is great for debug builds, hate when code's released that way & then I try to compile with a later version of gcc | 22:24.42 |
henrys | Robin_Watts: I think zeniko wanted bugs like http://bugs.ghostscript.com/show_bug.cgi?id=694880 to be left open until mupdf integration happens, which seems reasonable. Should I note the bug fixed and assign it to you or tor? | 23:01.00 |
SpNg | what ICC profile is used when converting from DeviceGay to RGB colorspace from a postscript file? | 23:38.35 |
Robin_Watts | henrys: If you've committed, then I'll pull in stuff tomorrow. Assign the bug to me by all means. | 23:47.34 |
| Forward 1 day (to 2014/02/25)>>> | |