| <<<Back 1 day (to 2017/07/02) | 20170703 |
tor8 | avih: some new code on tor/master that may or may not work better than before for toString(radix) | 10:16.16 |
avih | tor8: feel free to use this test and compare your output to firefox/chrome https://0x0.st/0L-.txt | 10:22.26 |
| (this doesn't work in mujs REPL because strict. i really think it shouldn't be strict by default) | 10:24.18 |
| (and i'm also not sure it can be done in strict mode without global this) | 10:24.55 |
tor8 | if (typeof console === 'undefined') console = {log:print} | 10:26.23 |
| one of the quirks of javascript, the 'typeof' operator doesn't dereference the expression so undefined variables there are safe | 10:27.10 |
| but you are right in that mujs default shell being strict may be a bit awkward | 10:28.39 |
avih | tor8: that wouldn't work because console would be undeclared, which is prohibited in strict mode | 10:38.45 |
| (the assignment obviously. the check is simple and doesn't need strict) | 10:41.22 |
| tor8: unrelated issue, that one.c is annoying for several reasons: 1. it's hard to debug syntax errors. 2. you can't compile units in parallel. 3. it compiles the entire code base for every minor code change. | 10:50.40 |
| i think one.c could be useful on some cases, but it shouldn't take away from the "normal" way to build it | 10:51.06 |
| while it's not a big codebase, it can still take few seconds instead of few ms, especially on non top end systems | 10:52.03 |
| there also appears to be a weird issue where the number -1e-30 is displayed (normally, base 10) as -9.999999999999999e-31 | 10:53.39 |
| (only in mujs, that is) | 10:53.51 |
tor8 | avih: I noticed that too... that's the grisu2 code :( | 10:54.07 |
avih | yeah | 10:54.14 |
| if (num == -1e-30) js_pushliteral(J, "-1e-30"); :p | 10:55.03 |
| (i also noticed you're inconsistent between pushstring and pushliteral. e.g. your last patch uses pushstring, but other code which pushes these same exact strings uses literal. i'm also not sure if the compiler guarantees to keep that string at the same place after that function exits with such usage) | 10:56.30 |
| (personally i'd probably have put them in some static strings array to use with push literal) | 10:57.37 |
tor8 | I should be using pushliteral in this commit for the literal C strings | 11:00.34 |
| that's what it's for but I'm rusty | 11:00.40 |
| pushliteral means you guarantee the pointer passed will never change (as is the case for literal C strings) so it just stores a raw pointer to it | 11:01.26 |
| no need to make a copy or garbage collect | 11:01.32 |
avih | yeah, i understand what js_pushliteral does, but i wasn't convinced a c compiler guarantees a c string stays after the function which references it exits | 11:02.22 |
| c string literal* | 11:02.37 |
RobinWattsLenovo | tor8: ping | 14:00.47 |
| so I'm just fixing up some refernce counting w.r.t colorspaces. | 14:01.03 |
| When we load the default colorspaces, we do: | 14:01.15 |
| fz_set_default_cmyk(ctx, default_cs, pdf_load_colorspace(ctx, cs_obj)); | 14:01.29 |
| pdf_load_colorspace returns a reference to a colorspace (not a borrowed reference) | 14:01.45 |
| This means that fz_set_default_cmyk needs to take ownership of the reference. | 14:02.02 |
| which it currently doesn't | 14:02.16 |
| Should I add fz_set_default_cmyk_drop ? | 14:02.28 |
tor8 | RobinWattsLenovo: I'd rather rewrite the three call sites than add three wrapper functions like that | 14:06.05 |
RobinWattsLenovo | tor8: OK. | 14:06.19 |
tor8 | especially since the code already has a try/catch block around each call | 14:06.21 |
RobinWattsLenovo | don't need a try catch for that bit. | 14:06.39 |
| will fix. | 14:06.43 |
tor8 | yeah, I guess we can rely on fz_set_default_cmyk not throwing | 14:07.02 |
RobinWattsLenovo | I'm trying a hack whereby if we exit mudraw with memory unfreed it SEGVs. | 14:14.43 |
| Just to see how many times the cluster run fails. | 14:14.57 |
| Every epub will fail for a start (Thanks harfbuzz) | 14:15.19 |
sebras | Robin_Watts: when I tried your memento backtrace patch I do get backtraces but the they are all just addresses. | 15:06.21 |
| Robin_Watts: got it working. on Debian (at least) libbacktrace is a static library, but I cannot seem to find a pkg-config file to detect it. | 16:03.27 |
Robin_Watts | sebras: Any patches gratefully received. | 16:35.45 |
sebras | Robin_Watts: in your case would installing libgcc-6-dev add libbacktrace.a to your /usr/lib? | 16:40.23 |
| Robin_Watts: in Debian there is but no pkg-config to use for detecting att compile time, and there is no dynamic library to detect at run time. | 16:41.04 |
| one wonders why libbacktrace is not the default. I guess due to lack of architecture and debug format support. :-/ | 16:44.19 |
sebras | needs to sleep. | 16:44.32 |
avih | tor8: your current code is bigger, apparently less accurate and possibly slower (guessing - lots of pow, but OTOH less calcs with lots of 0's) than my initial version. what's your main goal of trying more approaches? | 17:24.12 |
| (also, i don't you recall referring to my patch even once, is that accidental? are you not looking at it intentionally to not taint your copyright?) | 17:25.37 |
| don't recall you* | 17:27.10 |
| Forward 1 day (to 2017/07/04)>>> | |