Time |
Nickname |
Message |
04:10
🔗
|
|
DFJustin has quit IRC (Remote host closed the connection) |
04:13
🔗
|
|
DFJustin has joined #jsmess |
04:16
🔗
|
SketchCow |
People have suggested I use Chrome headless. That will mostly stop the hellish console messages exploding out of firefox as I see them |
04:17
🔗
|
SketchCow |
And I can always use the old trick I was using of ingesting the colors along one edge to determine where the screen is |
04:18
🔗
|
SketchCow |
But otherwise the same. |
04:18
🔗
|
SketchCow |
So we'll see if hitsthings sees something |
04:21
🔗
|
bai |
nah, you can grab a png or jpg directly from the canvas |
04:21
🔗
|
bai |
you don't need all that phantomjs mumbo jumbo at all |
04:21
🔗
|
bai |
just canvas.toDataURI('image/png') |
04:23
🔗
|
SketchCow |
Need help understanding. |
04:24
🔗
|
SketchCow |
Like, right now I do an Imagemagick |
04:24
🔗
|
SketchCow |
How do I yell that at Firefox |
04:27
🔗
|
bai |
well, this would be for chrome headless. so what I do for my screenshotter is, I load a special screenshotter.html in my headless chrome, and that runs whatever normal stuff, in this case it would create the emulator and add canvas to the document, etc |
04:28
🔗
|
bai |
then at any point, like on timers or whatever like you have it now, you can call var imgbase64 = canvas.toDataURL('image/png'); |
04:29
🔗
|
bai |
then the next question is what you do with the base64 image, from there you can either make the browser download it as a file, or you can send it directly to an API |
04:30
🔗
|
SketchCow |
This sounds.... involved |
04:31
🔗
|
bai |
sure. so's wht you're doing now :D |
04:31
🔗
|
SketchCow |
You got me into the restaurant with "simple" and then here we are cooking the souffle ourselves |
04:31
🔗
|
SketchCow |
It's all horrible |
04:32
🔗
|
bai |
basically, extracting the image data is the easy part. it's the pipeline around that that's hard |
04:32
🔗
|
SketchCow |
I can run post-processing on a bunch of grabbed images |
04:32
🔗
|
bai |
you have a pipeline for one method but this is a bit different |
04:32
🔗
|
SketchCow |
We're all going to die, aren't we |
04:32
🔗
|
SketchCow |
you, me, a pile of malformed screenshots |
04:32
🔗
|
bai |
oh, definitely |
04:33
🔗
|
SketchCow |
It all comes down to who eats other first |
04:33
🔗
|
* |
SketchCow gets fork |
04:34
🔗
|
bai |
I mean I can basically give you a function that you could call which would dump a screenshot into the browser's download directory |
04:34
🔗
|
bai |
and from there you could do whatever kind of things |
04:35
🔗
|
SketchCow |
Well, let's at least ask why I couldn't make chromium-browser headless |
04:36
🔗
|
bai |
not sure I understand the question |
04:36
🔗
|
bai |
you can |
04:37
🔗
|
SketchCow |
I tried chromium-browser --headless |
04:37
🔗
|
SketchCow |
Was there other magic |
04:37
🔗
|
bai |
well, it's a relatively new feature so I'm not quite clear on exactly which version you need to be running to use it |
04:38
🔗
|
bai |
but I think from there, I think yes, either there's a little bit of magic needed to script it if you want to do a bunch of phantomjs-style puppeteering, or you can just fire it at a page which does what you want as a regular old javascript script |
04:44
🔗
|
SketchCow |
chromium-browser --headless --remote-debugging-port=9222 https://chromium.org |
04:44
🔗
|
SketchCow |
[18796:18796:0312/044314:ERROR:browser_main_loop.cc(261)] Gtk: cannot open display: |
05:49
🔗
|
SketchCow |
Meanwhile: I am going through a pile of 1,000 floppy images to add them to a collection |
05:52
🔗
|
SketchCow |
Oh, speaking of "Jason wastes time on insane scripts" |
05:53
🔗
|
SketchCow |
I did prelim work on a terrible idea that I'll do anyway |
06:07
🔗
|
Vito` |
I can spend a little time right now on trying phantomjs 2.5 if you'd like |
07:03
🔗
|
Vito` |
looks like the macos beta is broken |
07:03
🔗
|
Vito` |
I'll try on Windows in a bit |
08:05
🔗
|
bai |
everything is broken forever |
08:31
🔗
|
Vito` |
okay uh |
08:31
🔗
|
Vito` |
I think phantomjs still sucks |
08:31
🔗
|
Vito` |
I'm injecting ES5 and ES6 shims and it's still barfing on that React thing |
08:32
🔗
|
Vito` |
best bet is to file a bug with the phantomjs folks |
09:05
🔗
|
Vito` |
https://gist.github.com/vitorio/52cf78c6b28423994434d728ac0eb4f9 |
09:05
🔗
|
Vito` |
that's the modified pacman.js I was using, it still doesn't work |
09:05
🔗
|
Vito` |
best bet is to file a bug with the phantomjs folks |
11:22
🔗
|
SketchCow |
Oh PhantomJS, why do you suck |
13:49
🔗
|
SketchCow |
WebAssembly now supported in Chrome |
13:54
🔗
|
SketchCow |
What kind of machine do we want as the "official" machine for Emularity? |
14:13
🔗
|
SketchCow |
I'm starting to really gear towards the idea of we just get an AWS instance and use that. |
14:14
🔗
|
SketchCow |
Document it up, write scripts to maintain it, etc. |
14:14
🔗
|
SketchCow |
Share credentials |
15:51
🔗
|
db48x |
I think loading pages from archive.org to screenshot is making things too complicated |
15:51
🔗
|
db48x |
just load the emularity scripts, and then run this: |
15:51
🔗
|
db48x |
var emulator = new IALoader(document.querySelector("#canvas"), |
15:51
🔗
|
db48x |
"Pitfall_Activision_1982"); |
15:51
🔗
|
db48x |
emulator.start({ waitAfterDownloading: false }); |
15:52
🔗
|
db48x |
where, of course, you put in any item name you want instead of Pitfall |
15:53
🔗
|
db48x |
then you grab the image out of the canvas and save it to a file, as usual |
19:34
🔗
|
Vito` |
hm |
19:34
🔗
|
Vito` |
IA scripts do support embeds right |
19:34
🔗
|
Vito` |
maybe that |
19:34
🔗
|
Vito` |
let me try it real quick |
19:48
🔗
|
bai |
well this works http://assets.metacade.com/emulators/win311-wasm.html |
19:48
🔗
|
bai |
loads nice and quickly in chrome and ff |
19:49
🔗
|
bai |
like damn near instantly, once the data's loaded |
19:51
🔗
|
Vito` |
the IA embeds still include react and jquery and stuff |
19:51
🔗
|
Vito` |
so they are still broken |
19:55
🔗
|
bai |
runs noticably faster on mobile. too bad it isn't emulating touch events properly |
19:55
🔗
|
bai |
if I could use netscape 1.0 on my phone I would be so happy |
20:18
🔗
|
|
webmirc has joined #jsmess |
20:20
🔗
|
|
webmirc has quit IRC (Client Quit) |
20:31
🔗
|
Vito` |
db48x: I'm getting "failed to download IA item metadata" |
20:32
🔗
|
Vito` |
ah |
20:32
🔗
|
Vito` |
okay so db48x's idea might work maybe |
20:33
🔗
|
Vito` |
but it'd require having those pages served up by an actual http server |
20:33
🔗
|
Vito` |
phantomjs's local-to-remote parameters aren't enough |
21:02
🔗
|
Vito` |
nor is specifying a base href |
21:03
🔗
|
Vito` |
it redirects to IA properly then, but the screenshots say it failed to configure emulator |
21:03
🔗
|
bai |
maybe you need to point it to the cors address directly if it's not running on ia's servers? |
21:04
🔗
|
Vito` |
the emularity loader seems to be doing that for me |
21:05
🔗
|
Vito` |
but I can't really tell |
21:06
🔗
|
bai |
if you see any requests in the network tab for cors_get.php then we're cool |
21:18
🔗
|
Vito` |
yeah |
21:21
🔗
|
Vito` |
even loading the IA loader example page from a localhost server doesn't work |
21:23
🔗
|
Vito` |
works fine in a browser |
21:24
🔗
|
Vito` |
2017-03-12T16:20:14 [DEBUG] Network - Redirecting to "http://ia801906.us.archive.org/cors_get.php?path=%2F7%2Fitems%2Femularity_engine_v1%2Fa2600.json" |
21:24
🔗
|
Vito` |
that's where phantomjs stops |
21:24
🔗
|
Vito` |
in a browser it loads a bin and a cfg after that |
21:27
🔗
|
bai |
hmm, localhost server as in a real webserver you mean, right? as opposed to just loading from files? |
21:27
🔗
|
bai |
there are extra security restrictions when loading from files |
21:28
🔗
|
Vito` |
yeah I turned those off and set a base href to archive.org |
21:28
🔗
|
Vito` |
but it doesn't matter, it's the same behavior as with a localhost webserver |
21:29
🔗
|
Vito` |
it stops/breaks on that json file |
21:31
🔗
|
Vito` |
hm |
21:32
🔗
|
Vito` |
different URLs break differently |
21:32
🔗
|
Vito` |
the Oregon trail is saying access denied |
21:32
🔗
|
Vito` |
service unavailable |
21:32
🔗
|
bai |
yeah, what response does it get for the json, and are there any errors abing not being able to access its content? |
21:32
🔗
|
Vito` |
another msdos app is saying remote host closed the connection |
21:33
🔗
|
Vito` |
is IA blocking phantom? |
21:33
🔗
|
Vito` |
2017-03-12T16:33:45 [DEBUG] Network - Resource request error: QNetworkReply::NetworkError(ServiceUnavailableError) ( "Error transferring http://cors.archive.org/cors/msdos_Oregon_Trail_Deluxe_The_1992 - server replied: Service Unavailable" ) URL: "http://cors.archive.org/cors/msdos_Oregon_Trail_Deluxe_The_1992" |
21:34
🔗
|
Vito` |
2017-03-12T16:29:41 [DEBUG] Network - Resource request error: QNetworkReply::NetworkError(RemoteHostClosedError) ( "Connection closed" ) URL: "http://ia801502.us.archive.org/cors_get.php?path=%2F7%2Fitems%2Fmsdos_shareware_fb_PCM350" |
21:37
🔗
|
Vito` |
oh hm |
21:37
🔗
|
Vito` |
both of those seem to be broken in the emularity loader in a browser also |
21:38
🔗
|
Vito` |
looks like there might be multiple points of failure here |
21:38
🔗
|
Vito` |
db48x: if you can provide HTML that provides a simple, working embed for all types of IA resources, I can try again |
21:39
🔗
|
Vito` |
but right now it looks like either emularity or IA are breaking |
21:39
🔗
|
Vito` |
not only phantomjs |
21:40
🔗
|
bai |
hmm. do those games work if you load them up directly on IA? |
21:41
🔗
|
bai |
maybe IA is having server issues, it happened to me the other night when I was trying to prep slides the night before my talk |
21:49
🔗
|
Vito` |
yeah both load up fine directly from IA |
22:58
🔗
|
|
phe has joined #jsmess |