Log of #mupdf at irc.freenode.net.

Search:
 <<<Back 1 day (to 2020/10/08)Fwd 1 day (to 2020/10/10)>>>20201009 
malc_ Robin_Watts: 32e4e8b4bcbacbf92af7c88337efae21986d9603 is weird, ptrdiff_t is a signed type and you pass it as a size_t argument to memset, in your eyes it's an improvement because size_t can be 64bit? what about LLP (or whatever the thing that amd64 windows uses)17:28.59 
Robin_Watts w, h, n are signed.17:29.48 
  stride is signed.17:29.59 
  the important thing is that sizeof(pdfdiff_t) == sizeof(size_t)17:30.14 
malc_ huh?17:30.31 
  sez hu?17:30.35 
Robin_Watts ptrdiff_t has to be large enough to cope with the difference between any two pointers.17:31.19 
  So on a 64bit system, it'll be 64bits.17:31.37 
malc_ yes17:31.52 
  but size_t?17:31.55 
Robin_Watts w*h*n is only ever 32bits on a system where int is 32bits.17:32.12 
  ((ptrdiff_t)w) * h * n will be 64bits on a 64bit system, even if int is 32bits.17:32.39 
segfault57 I'm just looking at mujs, it seems a very nice system. But the documentation is lacking, I was wondering if it's possible to load a json string as an object. Any hints would be highly appreciated.17:32.52 
Robin_Watts segfault57: You need to talk to ator, I suspect. He may be having dinner at the mo cos he's in sweden.17:33.31 
malc_ Robin_Watts: this still does not answer my size_t objection17:33.37 
Robin_Watts malc_: You think it's likely that a size_t will be a different size to ptrdiff_t ?17:34.04 
malc_ Robin_Watts: sure17:34.12 
segfault57 size_t is supposed to be the same size as the size of pointer.17:34.17 
Robin_Watts malc_: Give me an example of such a system.17:34.31 
segfault57 size_t and ptrdiff_t should be the same size.17:35.03 
malc_ Robin_Watts: huge model on DOS compilers circa ~9017:35.08 
Robin_Watts malc_: I care not about such things.17:35.21 
malc_ segfault57: can you, please, substantiate that assertion with C&V from the standard17:35.34 
segfault57 what is C&V?17:35.54 
malc_ Robin_Watts: point being - it is possible17:35.57 
  segfault57: chapter and verse17:36.09 
Robin_Watts malc_: On such a system, what would ptrdiff_t and size_t be ?17:36.09 
segfault57 malc_, you got me. I only work on Linux.17:37.33 
malc_ Robin_Watts: you mean huge model dos?17:39.17 
Robin_Watts malc_: Yes.17:40.11 
segfault57 @actor, I need to load a string as a JSON object, is it possible? my current workaround is to create a temp variable and prepend it to the json string like this "var tmp = { ...}", load this string, and use "tmp". But this is not ideal.17:40.40 
malc_ Robin_Watts: https://www.youtube.com/watch?v=5nKxmoP835417:40.50 
Robin_Watts I think we probably fall into a massive heap if run on a segmented memory model anyway.17:41.00 
  so I refuse to worry about such things.17:41.14 
malc_ Robin_Watts: comment would be nice though17:41.46 
Robin_Watts I could have used ssize_t, but I fear that's not always available.17:42.19 
malc_ Robin_Watts: yes, it's posix, not C. https://stackoverflow.com/questions/55190317/where-is-ssize-t-defined-in-linux17:46.18 
Robin_Watts hence ptrdiff_t was the best I could come up with.17:46.51 
malc_ i still think comment would be nice17:48.56 
  Robin_Watts: https://devblogs.microsoft.com/oldnewthing/20200728-00/?p=10401217:56.34 
Robin_Watts yes, I looked at that, and went screaming away as I always do when confronted with segmented models.17:57.15 
malc_ i always used tiny model, and then wrote my own dose extender to not deal with it on 32bit platforms"18:02.07 
 <<<Back 1 day (to 2020/10/08)Forward 1 day (to 2020/10/10)>>> 
ghostscript.com #ghostscript
Search: