IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2014/12/21)20141222 
Robin_Watts Hi kens. You're here today then?11:44.58 
kens Yes, adn tomorrow also11:45.12 
Robin_Watts Ah, so I can ignore the support query that just arrived with a clear conscience :)11:45.35 
kens Indeed, I'm dealing with it11:45.44 
Robin_Watts (as opposed to ignoring it, and feeling vaguely guilty :) )11:45.55 
kens THough I don't plan to make a patched C file for them, either they can learn to do it themselves or wait for Marcos.11:46.03 
  I'm a bit puzzled why someone who is capable of rebuilding Ghostscript from source would have difficulty integrating sucha simple patch into an earlier version of the code.11:52.16 
Robin_Watts kens: The latest comment on bug 695704 set my sarcasm detector off, but I think it was a false-positive :)12:46.28 
avih_ tor8: looks like we'll support both mujs and duktape. i managed that with a wrapper which allows duktape to compile the existing code (which uses mujs api), almost 1:1. so you could still have some PR on it ;) but we'll probably make duktape the official support and mujs an "you're on your own" kind of thing. right now they seem to work identically, and also interestingly in my tests - with similar speed. though my test case does excessive use of array 12:50.44 
  manipulations and duktape is more efficient than mujs with non sparse arrays, so maybe that's that.12:50.45 
Robin_Watts avih_: Well, that sounds like a great compromise.12:51.39 
avih_ Robin_Watts: yeah, i agree. i also didn't want to throw away the code i have and patch it beyond recognition. and the wrapper actually as clean as it could get IMO.12:52.29 
  that's the initial patch, and there are two more after it, and i still need to solve an ugly issue of the wrapper where i declare all the functions again, but that's not a hard problem to solve. https://github.com/avih/mpv/commit/340ba82b641c5aed9cdc233ad5383db4beb13e0812:53.40 
  this revision actually has an off by 1 bug which was fixed in a later patch12:54.46 
  oh, and 2 more minor bugs. one for duktape and one for mujs. 2 commits later both are fixed.12:56.43 
Robin_Watts I can't look at the mo (too busy), and it wouldn't mean much to me if I did.12:57.31 
  tor8 may or may not be about this week - not sure of his movements around Xmas.12:57.59 
avih_ Robin_Watts: would you have an issue with me using the mujs api while compiling with duktape? i don't think you should, though i've now learned to ask in advance ;)12:58.12 
Robin_Watts avih_: Would that involve using a mujs header file?12:58.37 
avih_ no12:58.42 
nsz only comments are copyrightable material in a headerfile..12:59.06 
Robin_Watts Then you're not using any MuJS specific code?12:59.07 
avih_ the wrapper provides the definitions12:59.08 
nsz and those are easy to remove12:59.11 
Robin_Watts I don't think we could possibly object then :)12:59.24 
  nsz: I don't believe that for a second.12:59.41 
avih_ nsz: i don't use mujs.h when compiling with duktape13:00.10 
Robin_Watts Inline code and Macro definitions are certainly copyrightable.13:00.15 
avih_ you can look at the patch i provided hew few mins ago13:00.30 
nsz ok well add '..in reasonable header files'13:00.47 
Robin_Watts You may be right in saying that a simple list of prototypes is not copyrightable.13:00.51 
nsz you dont put code into header files normally only api13:00.58 
Robin_Watts Even then I don't know that I agree with you.13:01.27 
avih_ 90% of the mujs api has an identical api under a slightly different name13:01.32 
nsz this afaik has been tried several times on us courts with no luck.. so at least there it works13:01.45 
avih_ at duktape. so it's just #define js_pushstring to duk_push_string etc13:01.55 
kens I'm reasonably sure there was a recent case involving copyright and an API< but I don't recall which way it went.13:02.16 
Robin_Watts I believe cases in the US have proved that *PUBLIC* apis are not copyrightable.13:02.26 
  There was the java header thing.13:02.40 
avih_ kens: you serious you don't remember? oracle cs google? :)13:02.48 
  vs*13:02.54 
nsz linux allegedly copied errno numbers from sco and that was not an issue either13:03.07 
avih_ iirc the last decision was that oracle had the rights and they got 1$, didn't they? :)13:03.16 
  or #1m, the same for them13:03.28 
kens I have no memory, this is well known to people who know me13:03.28 
Robin_Watts http://en.wikipedia.org/wiki/Oracle_v._Google13:04.22 
  So in the final shakeout, an API *is* copyrightable.13:04.33 
kens According to what I just read, the court's current decision is that API's can be copyrighted.13:04.44 
  But its due for appeal to the Supremes13:04.59 
avih_ Robin_Watts: anyway, the mpv docs will say that we support both interchangably but officially support one. but with links etc. that should give mujs useful exposure imo without getting into any licensing issues.13:05.31 
Robin_Watts avih_: Sounds good to me.13:07.04 
avih_ k. good.13:07.41 
Robin_Watts I would imagine that, given the duktape and mujs APIs are so similar, that we'd be hard pressed to make a case that there was significant IPR in the API.13:07.45 
avih_ i'd think so too.13:08.08 
  it's basically almost a 1:1 translation of the api names13:08.34 
  (not the other way around though since duktape has more features and a _lot_ more api functions)13:09.01 
kens Robin_Watts tor8 : have you looked at flights yet ?13:50.49 
Robin_Watts kens: Vaguely.13:51.06 
kens Looks like BA, US or United for non-stop flights13:51.19 
kens has no intentionof flying Iberian13:51.33 
Robin_Watts https://www.google.co.uk/flights/#search;f=LHR;t=DEN;d=2015-03-05;r=2015-03-0913:51.45 
  BA/Iberia/American are a codeshare I believe.13:51.59 
kens THey are, so you need to be careful to see is it s BA aircraft13:52.16 
Robin_Watts But the 630 quid one is a direct one.13:52.42 
kens Yes and I think its actually a BA flight13:53.01 
  United is cheaper but seems to have stops13:53.17 
  DOn't want stops :-(13:53.22 
Robin_Watts Helen/I and I think Paul/Linda are staying a while.13:53.32 
kens brb door13:53.38 
  I'm planning to head over to Vail13:54.47 
  Currently thinking I might spend 2 or 3 days there then back to Denver and home.13:55.25 
Robin_Watts kens: We plan to go to Longmont on the saturday/sunday nights, then to Vail on the monday/tuesday.13:55.33 
  kens: The Vail Cascade seems to be the Hotel that has caught Helens eye.13:55.57 
kens Might meet you in Vail then :-)13:55.58 
  Hmm, I don't remember seeing that one, let me look13:56.13 
Robin_Watts Actually in Vail (as opposed to beaver creek etc), not stupidly expensive, and gets good reviews.13:56.35 
kens Oh I was only looking at hotels in Vail itself13:56.47 
  Ideally walking distance of the lift, but that looks expensive on the whole, so maybe I'll take the ski bus13:57.07 
Robin_Watts Most hotels in Vail seem VERY expensive.13:57.16 
kens Oh boy yes.13:57.22 
  Cheapest was ~$250 per night at that time13:57.34 
  OK so that's another one on the ski bus route13:58.00 
Robin_Watts There is a lift from the hotel.13:58.16 
kens Hmm doesn't say that ont he fromt page, kust says ski shuttle.13:58.40 
Robin_Watts https://www.google.co.uk/maps/place/Vail+Cascade+Resort+%26+Spa/@39.6180382,-106.3879095,14z/data=!4m2!3m1!1s0x0:0xfd0d64442e1a102313:58.48 
kens Hmm, interesting, I presume you can ski down from the head of the lift to the makred trails.13:59.29 
  Ah so its outside the actual ski resort, I see nopw13:59.58 
  Aha, its not in the ski resort, that's why14:00.14 
Robin_Watts The resort being around "The Lodge At Vail" ?14:01.06 
kens I guess, I was looking at the map where it syas 'Vail Ski Resort'14:01.24 
  I think I need a piste map.....14:02.29 
Robin_Watts Vail Ski Resort, on that map, is at the top of a mountain?14:02.35 
kens Either that or the bottom, there's no terrain marked14:02.51 
Robin_Watts Are the ski runs not the things in dark green ?14:02.58 
kens But there are 3 lifts there14:03.05 
  runs are green, blue or black14:03.18 
  (well dark gray)14:03.24 
Robin_Watts Right, using the satellite imagery, I think there *are* no hotels there.14:04.18 
  They are all along the main road.14:04.23 
kens :-) I guess if its the top of the mountain that makes some sense14:04.36 
  Let me just find a piste map so I can see where that lift goes14:04.50 
  OK found it14:06.44 
Robin_Watts https://www.google.co.uk/maps/place/Vail+Ski+Resort/@39.4978911,-106.3698265,3902a,20y,80.4t/data=!3m1!1e3!4m2!3m1!1s0x876a7060c630dbdb:0xa7c2cf2d4b45ada214:06.58 
kens Its pretty low, so I guess its up the lift, down the green to the main lift and go up that14:07.05 
Robin_Watts Tilting the map shows terrain.14:07.12 
  And Vail Ski Resort is indeed at the top.14:07.34 
kens Yep, it was clear when I saw the trail map14:07.52 
  That URL just shows mw blue14:08.21 
  Oh, I htiunk it got truncated14:08.33 
  Nope just saws nothing useful for me, oh well.14:11.03 
Robin_Watts So, I think these are our flights: https://www.google.co.uk/flights/#search;f=LHR;t=DEN;d=2015-03-05;r=2015-03-11;sel=LHRDEN0BA219,DENLHR0BA218;px=214:12.14 
  But Miles hasn't said to book yet, right?14:12.24 
kens Hmm, let me check14:12.36 
  He said 'let me know your itineraries' so I would say yes14:12.57 
tor8 kens: briefly looked at the available options. looks like BA is my best option yet again...14:13.53 
kens THere don't seem to be many options otr814:14.09 
  tor8^^14:14.12 
  FOr us, anyway14:14.18 
tor8 kens: well, there is that or lufthansa :)14:14.23 
  and I prefer BA, 1 hour shorter second leg14:14.34 
kens I think Lufthansa would be a change for us, so I'm thinking BA like Robin14:14.47 
tor8 but a 30 minuter longer first leg14:14.52 
  kens: yeah. might make sense to get on the same flights, if we're staying the same days14:15.11 
Robin_Watts tor8: sounds like kens/paul and I are all staying longer.14:15.40 
tor8 skiing could be fun, but I'm terribly out of shape and I'd be at huge risk of breaking something :/14:16.52 
  not having been on a pair of skis for coming on 10 years, and 10 years before that...14:17.10 
kens2 My internet is not happy again today :-(14:17.46 
Robin_Watts tor8: Helen and I will not be skiing.14:18.10 
  Helen because she a) has never tried it, b) wouldn't try if it she could, c) wouldn't be able to even if she tried it. (That sounds harsh, but really, we tried cross country skiing once, and she made it 3 yards before giving up).14:19.10 
  I dry slope ski'd once, and didn't enjoy it much.14:19.54 
kens2 Dry slope ski-ing is horrible14:20.04 
Robin_Watts I've done cross country skiing and just thought it was hard work.14:20.11 
  Am more tempted to try boarding, but won't do that on this trip as it would mean leaving Helen etc.14:20.40 
kens2 tor8 I definitely plan to go do some ski-ing, I'd be happy for you to come too, safer to ski in a party14:21.20 
Robin_Watts I believe mvrhel was considering skiing too.14:21.53 
kens2 I see the return flight is the evening and its 2 hours from Vail to Denver, so technically I could ski half a day. OTOH that would also mean a days kift pass, which is *also* expensive14:22.08 
tor8 kens2: is Stella coming as well?14:22.44 
kens2 tor8 almost certainly not14:22.51 
tor8 kens2: so at the moment it's only you going skiing?14:23.07 
kens2 She isn't that great a skier and doesn't fancy an unknown location, at high altitude14:23.11 
  tor8 so far, just me yes14:23.16 
tor8 in that case it'd be bad form not to join you :)14:23.19 
kens2 Don't feel pressured, I'm comfortable ski-ing solo14:23.34 
tor8 I guess I'll have to work on getting into shape; but I'm not that great a skier anymore so you'll likely take off solo anyway :)14:24.10 
kens2 Don't count on it, I'm only intermediate, and I don;'t ski enough to get any better each year14:24.31 
  Melanie is a better sjier than me, but I'm more confident :-)14:24.53 
tor8 I'm comfortable with red pistes, if they're not too icy. I avoid black pistes, they're just not enjoyable since I go down them at a crawl...14:25.30 
kens2 It looks like if we stay at the cascades the lift goes up to a green run that takes you down to the lift at lionhead, and that has a long lift up to a mountain14:25.50 
  tor8 seems to be green/blue/black in the US as opposed to European blue/red/black14:26.09 
  3 nights at the cascades (sun,mon, tues nights) is £65414:28.01 
  FOr a standard room14:28.06 
Robin_Watts Beaver Creek *can* be cheaper I think, but Helen found that the Cascade was as cheap as anywhere you'd want to stay in Beaver Creek.14:29.36 
  or at least, as cheap as anywhere *she'd* want to stay.14:29.53 
kens2 I didn't look anywhere except Vail, the ski-ing didn;t look so good at beaver creek14:30.03 
  I wonder if I can get up to Vail pn Saturday, then I could Ski Sunday Monday and Tuesday14:31.07 
  Will have to find a ski hire place too of course.14:31.35 
tor8 kens2: I would hope that the resort/hotel place has ski hire places14:32.01 
kens2 I'm sure th resort does, byt the hotel is one end of the resort, so might need to catch the shuttle to a hire shop14:32.28 
  I guess I need to talk to Michael, and unfortunately I have to be off in good time tonight, got guests for dinner. I'll try and catch him later.14:39.48 
  Hmm going from 3 nights to 4 at that hotel drops the standard rooms and requires a condo, so the price shoots right up14:40.14 
  I guess it'll be check in on the SUnday then14:40.24 
  OK so tentatively, I'm planning to arrive in Denver on Thursday, meetings Friday and Saturday, head for Vail Sunday morning, stay there until the Wednesday and fly home Wednesday evening. Return shuttle from the airport to Vail is ~$188, 3 nights in the cascades is $1204, lift pass is $129 per day.14:48.34 
henrys vail is pretty expensive I thought - haven't looked recently - keystone, copper and steamboat are all popular amongst the locals here. 15:18.03 
kens2 Vail does seem tobe expensive, yes15:18.19 
tor8 avih_: js_setlength is actually js_pushnumber+js_setproperty("length") ... which is used if for example truncating an array15:20.45 
  the length of an Array object is also automatically updated15:21.11 
Robin_Watts kens2: "Vail Cascade Resort & Spa provides a variety of Vail Mountain ski rentals and equipment for guests, from snowshoes and skis to goggles and gloves."15:21.12 
kens2 Missed that, thanks RObin15:21.23 
Robin_Watts Prof Google knows everything.15:21.39 
kens2 will need skis, poles and a hard hat (to keep my ears warm ;-)15:22.03 
tor8 Robin_Watts: Google is our networked brain memory extension ;)15:22.06 
henrys these rankings match what I've heard fairly well: http://www.powderhounds.com/USA/Ski-Colorado/Best-Ski-Resorts.aspx15:23.13 
kens2 Hmm, a major criterion there seems to be 'off piste'15:24.01 
  Maybe snowmass or copper then15:24.50 
  Dumb question, how far is it from Denver to Aspen ?15:28.44 
henrys I've been to keystone, vail, beaver and a-basin and it all seemed the same to me. poor man's skiing is eldora. rent a dump in boulder to stay at and take the bus to the mountain ...15:28.53 
kens2 Hmm so copper is nearer denver.15:30.08 
henrys well over 3 hours closer to 415:30.15 
kens2 Vail looks prettier :-)15:31.13 
henrys it certainly is.15:31.28 
kens2 I have to push off early today, so I'm heading out now. I'll try and come back later to catch up with Michael. Goodnight all16:26.37 
avih_ tor8: yeah, i know that's how you implement it, and it would most probably work in duktape too. anyway, i didn't really have a need for it.19:43.04 
avih nevertheless, it should probably either implemented correctly or we should drop the code which uses it.19:44.00 
tor8 avih: I mostly reflected over the comment which isn't exactly true19:44.44 
  or at least rather misleading19:44.50 
avih tor8: which comment isn't true?19:45.05 
  also, the comments at the last patch on that branch are etter, though stillcan be corrected a bit19:45.27 
  for instance for userdata i ignore both tag and prototype, but only mentioned tag there'19:45.51 
tor8 "duktape doesn't really has an equivalent api. It sets the length according to the highest index pushed." near js_setlength19:45.57 
avih oh19:46.15 
tor8 with the 'empty' js_setlength might be misleading in terms of what js_setlength is supposed to do19:46.23 
avih i meant as an equivalently functioning call ;)19:46.32 
  not two! ;)19:46.48 
tor8 does duk_push_pointer take the prototype object from the stack?19:47.41 
avih tii was a bit surprised to see that on my system it performs very close to mujs, especially with the overhead of the shift 'this' on every call19:47.42 
tor8 I reckon the vast majority of time is going to be spent in property lookups19:48.02 
avih it diesn't. that but is fixed at one of the two followup commits19:48.05 
  same as mud_push_next_key for the mujs case19:48.17 
tor8 a few memory shifts of the stack which sits in hot cache is going to be irrelevant19:48.20 
  right19:48.28 
  I've done some more benchmarks, and the performance difference between mujs and duktype is all over the map19:49.08 
avih yeah, and also, for non sparse arrays with numeric indexes it uses a c array as far as i understand and doesn't convert the intex to a string19:49.12 
  sort of a fast path19:49.18 
tor8 some things, mujs is magnitudes faster, some things, slower19:49.22 
  yeah, mujs doesn't do that fast path19:49.34 
avih interesting19:49.35 
tor8 overall I reckon the performance is going to be close enough not to worry about it19:49.58 
avih (wtf is wrong with my typing today??!?)19:49.59 
  paybe, but even if one of them is x2-x3 slower than the other, that's still plenty for scripting of a video player. it mostly has to do with wait for key presses and do something, or handle other very simple stuff19:50.56 
tor8 yeah, I don't think any performance diff < 100x is going to be relevant for the sorts of things you intend to use it for19:51.31 
avih yeah19:51.45 
tor8 which is why performance has never been a major concern for mujs19:52.15 
avih btw, another project which i found very interesting is CASTL https://github.com/PaulBernier/castl . it's a javascript engine implemented on top of lua, possibly luajit19:52.34 
  the code looks solid, as well as the approach. it has some parts in js to bootstrap it, but it's self hosted since this stuff is also at the sources already compiled to lua to support eval and Function19:53.25 
tor8 interesting, but very heavy weight dependencies... spidermonkey and pcre19:53.46 
avih not at all19:53.55 
  it's fully self hosted, i.e. you supposedly don't really need any of it to actually run it, since everything is lua eventually19:54.29 
  for development though, maybe. but i didn't get that far, just read his blurbs and browsed the code a bit19:54.57 
tor8 for bootstrapping then I guess19:55.35 
avih and since mpv supports lua and luajit, i thought it could actually have some very interesting js performance. but i don't think it's mature enough for us yet, i don't think it has lua binding yet, and it's LGPL3 which we probably prefer to not use19:56.19 
  still, very interesting :)19:56.54 
tor8 brb, need to relog19:59.23 
avih i really wish there was some reference js implementation out there19:59.28 
  i'd say mujs could come close if it straighten out its kinks19:59.49 
tor8 spidermonkey is the closest there is, but that's still full of extensions and nonstandard behaviour19:59.50 
avih yeah. and huge :)20:00.03 
  OTOH, if it was distributed with distros as a common enough component, then hugeness wouldn't have been an issue, but afaik it isn't20:01.22 
tor8 avih: we'd need to add "use strict" to be really ES5 compliant20:03.23 
avih true, though you said it shouldn't be too hard.20:03.40 
tor8 but it's such a hack, I'm thinking a flag to js_newstate whether to be "use strict" globally or not20:03.47 
  the interactions between strict and non-strict code are a nightmare20:03.59 
avih and probably also accept null inside strings, and manage gc for everything if that's still not the case20:04.11 
  oh20:04.28 
tor8 zeros in strings are a major issue right now, but should be a fairly minor fix but would need to add another C function in the api20:04.45 
avih such as?20:04.57 
tor8 const char *js_tolstring(js_State *J, int *lenp)20:04.58 
avih right20:05.02 
  tbh though, the duktape api is not fun to use. mujs is minimalistic and works. /me like20:05.37 
  which is also why i prefered to take the wrapper approach. initially i wanted to use a wrapper to get things working and then actually apply the wrapper. but it ended up decent enough to keep the mujs style api use, and just make it run in duktape too20:06.43 
  and i also gained to keep compatibility with both, which is nice20:07.00 
tor8 the benefits of both having been inspired by the lua stack based api :)20:14.17 
  how does duktape handle 'this', both for setting when calling a function and then using?20:14.35 
avih duk_push_this20:17.09 
  inside a function20:17.16 
  and to can a functoun bound to an object you use duk_call_method20:17.35 
  call*20:17.43 
  and there's another one where you can call a property of an onject by name20:18.05 
  i'm guesing he tried to optimize each case, but tbh it's too many function to use regularly20:18.48 
tor8 right. I preferred a more direct approach. the only gripe I have is with how it can be tricky to juggle the prototype objects to create userdata20:19.51 
  but I can't really see a better approach20:20.04 
avih what would that be used for?20:20.08 
  it also has buffer userdata, both fixed and dynamic, though i inly took what i needed to make my existing code work.20:20.38 
tor8 buffer userdata, as typed array style stuff?20:21.19 
avih no, c biffer20:21.40 
  buffer20:21.43 
tor8 use the prototype object to create a userdata object with methods20:21.51 
avih oh20:21.59 
tor8 mujs.com/docs/examples, the "Complete userdata example"20:22.25 
  f = new File("input.txt"); f.readLine()20:22.48 
avih right, yeah, that could be useful, though i didn't need it so i didn't learn its capabilities. i only use userdata in two places (one if i use setcontext), and in both i only needed a pointer20:22.52 
  i see. interesting20:23.37 
  the mpv avi internally is rather flat. it's only arranged into object for namespacing of sorts20:24.21 
  api*20:24.25 
  and only for the scripts. internally it's all mpv_do_this and mpv_do_that20:26.15 
tor8 just a lot of global state then, not a tangle of objects?20:28.41 
avih the api which the lua binding expose is this http://mpv.io/manual/master/#lua-scripting and the js one implements it to the letter except for very internal stuff20:28.54 
  the state is of the script and of the client instance (which maps to the player itself)20:29.35 
  each script is completely isolated from other scripts except through mpv apis (like one script can change the volume and another script can observe the volume for changes and do something when it changes)20:30.24 
  and each script runs in its own thread and its own lua/js instance20:31.16 
tor8 yeah, so from each script's pov it's global state20:31.32 
  which makes for a simple scripting API20:31.41 
avih yeah, for the most part. the biggest functions are to convert between the mpv json-like c structure and js/lua native objects20:33.00 
  and there's also a rather chunky piece of code to implement all the state at the client script (this is done in js/lua default file which is loaded before each script). like registrations of events or observers, timers, the key binding stuff needs quite some code to support, etc20:34.34 
  all in all, it provides very thorough control of the player via scripting20:35.17 
  if you download and try it, you'll see that it has a sort of GUI which is called OSC (on screen control). so this is implemented in lua which uses libass to draw the stuff20:36.15 
 Forward 1 day (to 2014/12/23)>>> 
ghostscript.com
Search: