This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
1lann's profile picture

Mimic - ComputerCraft Web Emulator (HTML5)

Started by 1lann, 25 February 2014 - 06:48 AM
1lann #1
Posted 25 February 2014 - 07:48 AM
Mimic Web Emulator

Version 1.0


Hi

So full release of Mimic, GravityScore's and my web emulator written in JavaScript using HTML5 :D/>

Use it here!

Features
  • Full ComputerCraft emulator in your web browser
  • CC 1.63 support
  • Mobile (iOS and Android) support
  • Edit files easily in browser using Ace (stripped out version of Sublime Text in JS)
  • Persistent filesystem
  • Save screenshots
  • Download files
  • Startup scripts! Demo your own CC programs to others through just one click! Let Mimic load your program from Pastebin and run it automatically
  • Auto save while editing files
  • Pasting support
  • Control T, S, and R, as well as corresponding buttons
  • Fullscreen mode
  • Hierarchical, collapsable file sidebar
Things that Don't Work
  • Startup scripts can't use the shell API yet
  • Screenshots seem to capture past images of the terminal
  • Files sometimes destroy empty lines at the end of them
  • Files download multiple times when clicking the download button
  • The drop down menu moves behind the computer depending on the screen size
  • http.post doesn't work at all
  • Redstone API isn't implemented
  • No storage size limit
  • Haven't tested on Android yet, only iOS :)/>
  • Oh I broke pasting just then…
Screenshots



Spoiler

Spoiler

Spoiler


Link

Here!
Edited on 07 June 2014 - 08:11 PM
gamax92 #2
Posted 25 February 2014 - 10:03 AM
I think the concept is a great idea. A web emulator prevents the problems caused by having to install software, since some environments don't allow you to. It's also a quick way to go test something in CC and for me, runs faster than real CC.

I'll just put a list of problems, please don't feel overwhelmed, its just things I've ran into before with my own emulator.
The ones with a * are kinda just "It doesn't matter if you fix this or not."
SpoilerDebug is accessable from lua.

http.request should give "Not an HTTP URL" if the url protocol is ftp, file, or mailto.
After that, if its not http or https then it gives "Invalid URL"

The terminal should only renderers Chars 9 and 32-126. Tabs are rendered as spaces.
Regarding the font, Minecraftia isn't very accurate for CC, if you wish you may try the font I made for CCLite, only thing that isn't correct is underscore, tis a pixel too high.
minecraft.ttf by Gamax92

* LuaJ's loadstring always acts like you have a @ infront of the source name, source name also defaults to "string" if not specified. - (Not important because its just visual)
* Black text has a different color than the black background - (Not important because its just visual)

* term.write serializes its input. - (Not important because most people don't try to use non strings)
For functions, coroutines, nil, and detected recursive entries, it drops them.
For number, it makes sure the number has atleast to the tens place, I.E: 4.0, 4.1, 4.2132, 4.3E100
infinity and negative infinity are shown as: Infinity, -Infinity
strings don't get formatted any way.

However kinda important though, is that (file).write and (file).writeLine also serialize their input, I found that out when an "OS" on the forums broke CCLite because it was writing nil. Not really important because it affects that one OS, and the OS shouldn't be writing nil in the first place.
Edited on 25 February 2014 - 09:05 AM
awsmazinggenius #3
Posted 25 February 2014 - 10:07 AM
I like the concept of an in-browser CC emulator. Maybe, just maybe, it will work with iPad Air + Chrome App.

Note that I would have the first post if my WiFi signal wasn't cut off by me microwaving something :/

EDIT: Lua instead of LuaJ?
Edited on 25 February 2014 - 09:07 AM
Alice #4
Posted 25 February 2014 - 10:20 AM
lua.vm.js by Kripken? Just a guess c:
gamax92 #5
Posted 25 February 2014 - 10:42 AM
Lua instead of LuaJ, because This is JavaScript, and LuaJ is for Java.
LDShadowLord #6
Posted 25 February 2014 - 10:45 AM
My only complaint is that when I type on it (I use a UK keyboard…because i'm from the UK…) it defaults to the US keyboard so instead of typing Shift+2 for " I have to type Shift+# for ". Which is kinda irritating, any way to put in localisation? Or detect what keyboard is being used or something? Other than than, great job :)/>
1lann #7
Posted 25 February 2014 - 11:12 AM
- snip -
Thanks a ton for posting all of those problems :)/>, strange though that the debug API is there, I didn't think it was existent since it was unavailable to the JS ( C ) API since it was not implemented by the developer of the Lua engine I'm using. Perhaps I could use that from lua to do "too long without yielding" (Like the way you did it in CCLite?), I'll figure it out sometime. Thanks.

My only complaint is that when I type on it (I use a UK keyboard…because i'm from the UK…) it defaults to the US keyboard so instead of typing Shift+2 for " I have to type Shift+# for ". Which is kinda irritating, any way to put in localisation? Or detect what keyboard is being used or something? Other than than, great job :)/>
We actually handle conversion of JS event key codes into CC, so we could add a UK keyboard mapping, and add a locale switcher in the UI for people using a UK keyboard.

Also it does run on Android (Tested on Chrome on a Nexus 5, but you can't use keyboard inputs), so I'm sure it can run on Chrome on an iOS device, though I don't have one to test on.

Also for those wondering, the Lua engine I'm using is this: https://github.com/l...-com/lua5.1.js/
Edited on 25 February 2014 - 10:13 AM
6677 #8
Posted 25 February 2014 - 04:01 PM
Also it does run on Android (Tested on Chrome on a Nexus 5, but you can't use keyboard inputs), so I'm sure it can run on Chrome on an iOS device, though I don't have one to test on.
Chrome on iOS is simply a wrapper around iOS safari. Apple disallowed 3rd party render engines somewhat inexplicably.

On the plus side, I decided to see what happens when you use internet explorer 11 on windows 8.1 simply because you said IE was unsupported. It seemed to work and then internet explorer intercepted my pressing of the backspace key as a cue to go back to my homepage.
I normally use chrome, but I personally find that IE10 and 11 dont deserve the poor rep IE has gained over the years, chrome is still better but they are at least serviceable browsers now.
amtra5 #9
Posted 26 February 2014 - 05:42 AM
Damn, beat me to it :P/>

Good work though.

Also, this could be the very first truly cross platform emulator…
oeed #10
Posted 26 February 2014 - 05:53 AM
How does this differ from GravityScore's standalone(ish) version?

https://github.com/GravityScore/Mimic

GravityScore's has pretty much everything implemented, why the change?

Anyway, it's really nice to be able use it in browser, although I'd recommend releasing a standalone version (you could just make a Java WebKit viewer).

Also, for me the text in white is a little blurry, but error messages are fine.

Using OS X 10.9, Chrome 33
awsmazinggenius #11
Posted 26 February 2014 - 05:59 AM
Lua instead of LuaJ, because This is JavaScript, and LuaJ is for Java.
I realize that, but LuaJ is kinda what CC uses, so I thought me might as well use that (link with CC.jar to get it, or though some other way.)
1lann #12
Posted 26 February 2014 - 07:45 AM
How does this differ from GravityScore's standalone(ish) version?
https://github.com/GravityScore/Mimic
GravityScore's has pretty much everything implemented, why the change?

Anyway, it's really nice to be able use it in browser, although I'd recommend releasing a standalone version (you could just make a Java WebKit viewer).
Also, for me the text in white is a little blurry, but error messages are fine.

GravityScore's used Node-Webkit, a standalone implementation of Node.js and Chrome (basically). Gravs used Node.js libraries, including one that allowed him to run Java from it, which is how he did his emulator, through Java. Whereas mine can run straight in the browser with JavaScript. They're 2 completely different approaches in fact. I have to re-write the entire mod from scratch, whereas Gravs doesn't. Also it's blurry because I cannot disable anti-aliasing of fonts for canvases. The color red is actually in fact anti-aliased, its just that it's so close to the color black you don't notice it. I set the font size to a size that reduces the anti-aliasing effect as much as possible. Grav's version did not have this problem, as he used images instead of a font to display on the canvas, which can have anti-aliasing disabled when drawing.

Also Node-Webkit is a standalone website (Chrome renderer) viewer. So I can just use that as a standalone version.

I realize that, but LuaJ is kinda what CC uses, so I thought me might as well use that (link with CC.jar to get it, or though some other way.)
You can't run a full programming language that runs in a VM, within a scripting language… I'm actually re-writing the entire mod from scratch. The point being with pure JS, is that it requires no libraries/additional things installed, and can be ran on mobile devices.
Edited on 26 February 2014 - 06:46 AM
GravityScore #13
Posted 26 February 2014 - 07:48 AM
Just to clarify, my JS emulator started a separate Java process and communicated with it through std in/out.
oeed #14
Posted 26 February 2014 - 08:19 AM
How does this differ from GravityScore's standalone(ish) version?
https://github.com/GravityScore/Mimic
GravityScore's has pretty much everything implemented, why the change?

Anyway, it's really nice to be able use it in browser, although I'd recommend releasing a standalone version (you could just make a Java WebKit viewer).
Also, for me the text in white is a little blurry, but error messages are fine.

GravityScore's used Node-Webkit, a standalone implementation of Node.js and Chrome (basically). Gravs used Node.js libraries, including one that allowed him to run Java from it, which is how he did his emulator, through Java. Whereas mine can run straight in the browser with JavaScript. They're 2 completely different approaches in fact. I have to re-write the entire mod from scratch, whereas Gravs doesn't. Also it's blurry because I cannot disable anti-aliasing of fonts for canvases. The color red is actually in fact anti-aliased, its just that it's so close to the color black you don't notice it. I set the font size to a size that reduces the anti-aliasing effect as much as possible. Grav's version did not have this problem, as he used images instead of a font to display on the canvas, which can have anti-aliasing disabled when drawing.

Also Node-Webkit is a standalone website (Chrome renderer) viewer. So I can just use that as a standalone version.

I realize that, but LuaJ is kinda what CC uses, so I thought me might as well use that (link with CC.jar to get it, or though some other way.)
You can't run a full programming language that runs in a VM, within a scripting language… I'm actually re-writing the entire mod from scratch. The point being with pure JS, is that it requires no libraries/additional things installed, and can be ran on mobile devices.

Oh, I see. So apart from the name they're basically completely different.
1lann #15
Posted 26 February 2014 - 10:48 AM
Oh, I see. So apart from the name they're basically completely different.
Yep, in like every way. Gravs used a ComputerCraft.jar file and his own rendering system, whereas I made a different rendering system and had to re-write all of the core functions in ComputerCraft. I originally named mine WebCC, but Gravs just wanted to keep the name Mimic on a product, so we renamed it to that. His version (http://github.com/GravityScore/Mimic) is no longer being developed.
Edited on 26 February 2014 - 09:48 AM
Ir7_o #16
Posted 27 February 2014 - 12:51 PM
Very cool but a major risk of cross site scripting?
Shazz #17
Posted 27 February 2014 - 10:58 PM
Very cool but a major risk of cross site scripting?

All the code is executed within a Lua VM. As long as the 'native' APIs (term, fs, etc.) are coded properly then it's fine. Also, there is really nothing damaging that you can achieve with cross site scripting in this case.
1lann #18
Posted 27 February 2014 - 11:32 PM
Very cool but a major risk of cross site scripting?
All the code is running on your computer… Nothing is submitted to the server, it's all static. The only thing you can achieve with "cross-site scripting" in this case is hacking your own computer…
MostwantedRBX #19
Posted 19 March 2014 - 10:48 PM
Works very well, even without the other APIs. One thing that annoys me: There is no cursor movement functionality, but that isn't needed really in a Lua prompt. However, I think it'd be a great if you added the up arrow on the keyboard to access previously submitted code, just an idea. I think you are on the right track, though. Great job!
dan200 #20
Posted 19 March 2014 - 11:01 PM
I am extremely excited by this. I'll be checking up on your progress :)/>
SuicidalSTDz #21
Posted 20 March 2014 - 01:24 AM
This is pretty neat, but I do have one question. Do you plan on history support, like the native lua prompt provides?

Edit: Already asked, whoops ^_^/>
Edited on 20 March 2014 - 12:25 AM
Cranium #22
Posted 20 March 2014 - 01:25 AM
This is actually really, really nice. Totally +1'ed.
I effectively had to stop writing CC programs because I didn't have an emulator to test on at work, and having an easily accessed web based emulator is just the best for me.
I expect great things here.

EDIT: also, where are files stored locally? Chrome informed me that it wanted my permission to save files locally.
Edited on 20 March 2014 - 12:26 AM
theoriginalbit #23
Posted 20 March 2014 - 01:40 AM
EDIT: also, where are files stored locally? Chrome informed me that it wanted my permission to save files locally.
I'd assume its in Chromes application data. I had a quick Google and couldn't find a path its stored, if you want to take a look yourself I'd assume they're using HTML5 Permanent Storage.
1lann #24
Posted 20 March 2014 - 06:19 AM
Yep, indeed it is HTML5 permanent storage. We're also planning to allow you download the computer as a zip through JS.

Although I haven't been working on this lately, as I had lots of school work. On the weekends I'll be more determined to work on it, but if I can't then It'll most probably be finished on my term break (A month away)
Cranium #25
Posted 20 March 2014 - 01:41 PM
I see. But I meant if I decide to create a file via the fs api, can I pull it up and edit it?
GravityScore #26
Posted 20 March 2014 - 02:35 PM
Another sneak peak version coming. Improvements:
  • Images instead of fonts, so no anti-aliasing on the text now :D/>
  • Supposedly working FS API (not very well tested). If the computer hangs, check the JS console. Note you have to run fs.makeDir('/') first
  • Improved Lua prompt, with command history and arrow key movement working
  • Added os.reboot and os.shutdown
  • A half implemented too long without yielding (a simple while true do end will not trigger it, but something like while true do term.write('blah') end will)
  • In progress GUI
  • Safari Support! :D/>
If it doesn't work at first, try refreshing the page a couple of times just to refresh the browser cache.
1lann #27
Posted 20 March 2014 - 02:38 PM
I see. But I meant if I decide to create a file via the fs api, can I pull it up and edit it?
Oh that, no it's not stored on your computer's filesystem, it's stored in Chrome's storage. So you can't pull it up with your favourite text editor and edit it like that :(/> You'll have to use the in-browser Ace editor if you want to edit files live (Which I have to admit is pretty nice). However, we may release a standalone version that allows you to do this with node-webkit.
InputUsername #28
Posted 20 March 2014 - 04:30 PM
Looking forward to this being completed! Looking nice so far.
MostwantedRBX #29
Posted 20 March 2014 - 08:22 PM
Yay, arrow key suport. :D/> (+1nd this, btw.)
GravityScore #30
Posted 21 March 2014 - 10:10 AM
Another updating coming. This time with FS API! :D/>
Changes:
  • Proper too long without yielding now :D/>
  • FS API
  • Contents of file system persist over page reloads (excluding empty directories)
  • fs.move and fs.copy aren't implemented
  • fs.delete can't delete directories
Note it behaves roughly like the CC one. It's not a noticable difference, but calling .readAll() always returns the contents of the file, ie there is no cursor position in the file.
Edited on 21 March 2014 - 09:16 AM
awsmazinggenius #31
Posted 21 March 2014 - 04:58 PM
Gravity, does this FS update still mean that we have to run ms.makeDir("/") first?
Csstform #32
Posted 21 March 2014 - 06:29 PM
Feature Request!

I know that iOS (at least iPod) is capable of HTML5 webapps. I would like to request that this can function as one, or, if you could somehow tell my iPod to open it's keyboard so I can type.
TheOddByte #33
Posted 21 March 2014 - 06:51 PM
Feature Request!

I know that iOS (at least iPod) is capable of HTML5 webapps. I would like to request that this can function as one, or, if you could somehow tell my iPod to open it's keyboard so I can type.
I agree with this feauture, Since it doesn't seem there is any other emulator currently that supports iOS.
Is this designed for an american keyboard? :P/>
Since it seems when I press 8 + shift where '(' should be inputted I get '*' and when I press 9 + shift where I should get ')' I get '(' etc.
( Nice date the latest update was :P/> )
awsmazinggenius #34
Posted 22 March 2014 - 02:19 AM
I'm not sure what keyboard layout this was designed for. Assuming you're on windows, check your settings, as at least for me as I'm Canadian Windows would piss me off and change my layout randomly to "Canadian French" even after I changed my settings until I bit the bullet and just changed my locale to the US. You may have a similar problem where you live, depending on the local language there.

I get mixed results when using an Apple Wireless Keyboard to input text. Sometimes it works, sometimes it doesn't. iPad Air, latest Chrome app and iOS 7.1
Edited on 22 March 2014 - 01:20 AM
1lann #35
Posted 22 March 2014 - 04:01 AM
Gravity, does this FS update still mean that we have to run ms.makeDir("/") first?
Lol, of course not. Its just that since we were working in the FS api, we didn't properly initialize it because of the state it is in.

And yes we are planning on a mobile version, though it would probably use an onscreen JavaScript based keyboard, because I can't grab key events with native keyboards.
theoriginalbit #36
Posted 22 March 2014 - 04:08 AM
I can't grab key events with native keyboards.
really? why not?
1lann #37
Posted 22 March 2014 - 02:58 PM
I can't grab key events with native keyboards.
really? why not?
Because it's just how software keyboards on mobile devices work… If you can find a way to do it then I'll be happy to use it :)/>. The only option I can think of simulating mobile device keyboard input is through a dummy input field, which tracks the characters that have changed, and figure out what keys you have pressed.
awsmazinggenius #38
Posted 22 March 2014 - 03:13 PM
What about that Apple Wireless Keyboard thing that I mentioned above? Of course, it always works on my laptop, but I get mixed results when using it on the iPad Air.
1lann #39
Posted 22 March 2014 - 03:53 PM
What about that Apple Wireless Keyboard thing that I mentioned above? Of course, it always works on my laptop, but I get mixed results when using it on the iPad Air.
Well I don't have one to test with… so yeah… But if I do do the dummy input field method it should work with any device that is capable of inputting text into a field (That includes iPad Airs with a wireless keyboard).

Oh and I have updated http://gravlann.github.io which now runs CraftOS! Horray! Full FS API is not available yet, as you will notice some actions will cause it to crash. Also, there's not HTTP atm either.
Edited on 22 March 2014 - 03:02 PM
oeed #40
Posted 22 March 2014 - 09:36 PM
What about that Apple Wireless Keyboard thing that I mentioned above? Of course, it always works on my laptop, but I get mixed results when using it on the iPad Air.
Well I don't have one to test with… so yeah… But if I do do the dummy input field method it should work with any device that is capable of inputting text into a field (That includes iPad Airs with a wireless keyboard).

Oh and I have updated http://gravlann.github.io which now runs CraftOS! Horray! Full FS API is not available yet, as you will notice some actions will cause it to crash. Also, there's not HTTP atm either.

Yay! I like the new layout by the way, nice and clean.
awsmazinggenius #41
Posted 23 March 2014 - 02:59 AM
Oh, and if all else fails, you can just copy-paste from Sublime Text into the online editor, right?

EDIT: Try running fs.delete("rom") and notice that you do not get an error.
Edited on 23 March 2014 - 02:01 AM
GravityScore #42
Posted 23 March 2014 - 03:29 AM
Oh, and if all else fails, you can just copy-paste from Sublime Text into the online editor, right?

EDIT: Try running fs.delete("rom") and notice that you do not get an error.

There's a tonne of fixes in the next version 1lann hasn't put on GitHub. I've fixed that in the next version :)/>
oeed #43
Posted 23 March 2014 - 05:19 AM
Out of curiosity, will/are you basing this upon CC 1.6 or 1.5?
GravityScore #44
Posted 23 March 2014 - 06:35 AM
It's currently based on 1.58, but hopefully we'll update it to 1.6 once it's properly released. It shouldn't be too hard to update as most changes were Lua side in the rom, or to do with turtles, which we're not implementing.
1lann #45
Posted 23 March 2014 - 08:22 AM
Another update has been pushed to http://gravlann.github.io Now with HTTP get (Which means pastebin get works) and many other bug fixes! (No HTTP post ATM) A recap of recent significant features:
  • File editing in-browser with the left panel works
  • HTTP get works (mostly)
  • Buttons to forcefully terminate, shutdown and reboot the computer.
  • Moar error screens! (You can reboot the computer out of errors!)
  • Rendering has been fixed more, and has been tested to be able to run alongtimeago! (It's installed in the rom)
  • Tonnes of fixes
This will hopefully be finished by next week! (7 days).
Note that the FS api is still incomplete.
TheOddByte #46
Posted 23 March 2014 - 01:44 PM
Another update has been pushed to http://gravlann.github.io Now with HTTP get (Which means pastebin get works) and many other bug fixes! (No HTTP post ATM) A recap of recent significant features:
  • File editing in-browser with the left panel works
  • HTTP get works (mostly)
  • Buttons to forcefully terminate, shutdown and reboot the computer.
  • Moar error screens! (You can reboot the computer out of errors!)
  • Rendering has been fixed more, and has been tested to be able to run alongtimeago! (It's installed in the rom)
  • Tonnes of fixes
This will hopefully be finished by next week! (7 days).
Note that the FS api is still incomplete.
Love the new update! :D/>
TheOddByte #47
Posted 23 March 2014 - 01:50 PM
Hmm.. It seems there is something screwed up with the character @

Whenever you type it and then press backspace to remove it a white line appears
EDIT: Found out that ~ is screwed up as well
Edited on 23 March 2014 - 12:55 PM
GravityScore #48
Posted 23 March 2014 - 02:05 PM
Hmm.. It seems there is something screwed up with the character @

Whenever you type it and then press backspace to remove it a white line appears
EDIT: Found out that ~ is screwed up as well

Thanks for that, fixed in the master branch of GitHub. Just need to bug 1lann before it'll be up on gravlann.github.io.
Imgoodisher #49
Posted 23 March 2014 - 03:27 PM
On Firefox pressing =, +, -, or _ (anything on the 2 buttons between 0 and backspace) doesn't do anything.
GravityScore #50
Posted 23 March 2014 - 03:40 PM
On Firefox pressing =, +, -, or _ (anything on the 2 buttons between 0 and backspace) doesn't do anything.

Thanks! Fixed in GitHub master (not on gravlann.github.io). Need to bug 1lann to get it uploaded.
1lann #51
Posted 23 March 2014 - 03:48 PM
http://gravlann.github.io has been updated for fixing everything above, and has improved accuracy on os.setTimer! You can also now take screenshots with Mimic! :D/>
awsmazinggenius #52
Posted 23 March 2014 - 06:28 PM
As I see it, you cannot directly edit the files in your hard drive (they are in Chrome's storage), but you can just copy-paste from Sublime Text into the web editor, right?
Imgoodisher #53
Posted 23 March 2014 - 07:58 PM
I was bored so I tried to fix a few things. :)/>
1lann #54
Posted 23 March 2014 - 10:56 PM
As I see it, you cannot directly edit the files in your hard drive (they are in Chrome's storage), but you can just copy-paste from Sublime Text into the web editor, right?
Yes.

Wow, thanks. Although the main reason why we didn't implement copying, moving and deletion was because we needed to write it with folder support. But all the other parts look fine, I'll take a closer look and merge it after school. Thanks.
GravityScore #55
Posted 24 March 2014 - 11:07 AM
Moar features!
  • Startup scripts! Add ?pastebin=<a pastebin code> or ?url=<a url> to launch a script upon page load! Just add a link to Mimic at the bottom of your forum post, and allow people to live-demo your program with just a click!
  • Pasting
  • Ctrl T, S, and R (for terminate, shutdown, and reboot)
  • Save a screenshot to your computer
  • Bug fixes (of course)
Also, to anyone who feels like contributing, feel free to submit a pull request on GitHub!
Edited on 24 March 2014 - 10:08 AM
theoriginalbit #56
Posted 24 March 2014 - 11:43 AM
Startup scripts! Add ?pastebin=<a pastebin code> or ?url=<a url> to launch a script upon page load! Just add a link to Mimic at the bottom of your forum post, and allow people to live-demo your program with just a click!
That is so awesome Grav! Live demo test!
GravityScore #57
Posted 24 March 2014 - 02:15 PM
Oh forgot to mention Mimic comes with LuaIDE in the rom. Just type ide filename (like you would with the edit program) to use it.
Csstform #58
Posted 24 March 2014 - 03:44 PM
Shameless self-advertizing. :P/>

Ima try this out. Looks good!
awsmazinggenius #59
Posted 24 March 2014 - 04:22 PM
About the dummy text field thing - would that not make it so that only renderable characters can be typed? What about keys like the f# keys! the ctrl, alt, shift etc. keys and all those other keys?
Cranium #60
Posted 24 March 2014 - 07:07 PM
Minor nitpick: Possibly add an error on not loading the HTML5 for those who do not have it enabled, or are on an older browser suchas at work or in school. If I recall, it's very easy to do, with only a few lines added.
I was not aware that HTML5 wasn't enabled on my work computer, and I allowed it to load for several minutes before tracking down the issue.
Imgoodisher #61
Posted 24 March 2014 - 10:39 PM
About the dummy text field thing - would that not make it so that only renderable characters can be typed? What about keys like the f# keys! the ctrl, alt, shift etc. keys and all those other keys?

If you mean in the pasting thing I added, how do you paste a F5 keypress? If you aren't talking about the pasting, normal key input doesn't use a dummy text field, it uses the window.onkeypress event, which gets all key presses (including F#, ctrl, alt, etc.).
Edited on 24 March 2014 - 09:39 PM
awsmazinggenius #62
Posted 25 March 2014 - 03:55 AM
I get this:

when I try to get the "Sublime Text 2" theme in LuaIDE.
theoriginalbit #63
Posted 25 March 2014 - 03:57 AM
Since awsmazinggenius didn't do what the error actually told him to do, I went ahead and did it for you.
console said:
[Error] ReferenceError: Can't find variable: getCanvasLocation
onmousemove (event.js, line 175)

when I try to get the "Sublime Text 2" theme in LuaIDE.
ooooo people use my Theme! :D/>
Edited on 25 March 2014 - 03:01 AM
apemanzilla #64
Posted 25 March 2014 - 04:42 AM
Feature request: a parameter that can be passed through the URL such as "?fullscreen=1"
Removes all the info, buttons, etc, leaving just the emulator itself and maybe an exit fullscreen button
Edited on 25 March 2014 - 03:42 AM
GravityScore #65
Posted 25 March 2014 - 07:33 AM
I get this:

when I try to get the "Sublime Text 2" theme in LuaIDE.

That's cause LuaIDE is trying to use the fs.copy/fs.move function, which we haven't implemented yet :P/> Really need to get onto that.
1lann #66
Posted 25 March 2014 - 02:24 PM
Another (pretty much daily) update pushed to http://gravlann.github.io, the FS api has been fully written (Although we couldn't be bothered to handle errors, so when there is an error with FS, it doesn't do anything). But yeah, if you find any other bugs with FS (or anything else in the emulator) tell us here, or submit an issue report on github https://github.com/1lann/Mimic/issues!
Csstform #67
Posted 25 March 2014 - 02:42 PM
Another (pretty much daily) update pushed to http://gravlann.github.io, the FS api has been fully written (Although we couldn't be bothered to handle errors, so when there is an error with FS, it doesn't do anything). But yeah, if you find any other bugs with FS (or anything else in the emulator) tell us here, or submit an issue report on github https://github.com/1lann/Mimic/issues!

Do you have an estimate for how long until a mobile version?
1lann #68
Posted 25 March 2014 - 02:50 PM
Another (pretty much daily) update pushed to http://gravlann.github.io, the FS api has been fully written (Although we couldn't be bothered to handle errors, so when there is an error with FS, it doesn't do anything). But yeah, if you find any other bugs with FS (or anything else in the emulator) tell us here, or submit an issue report on github https://github.com/1lann/Mimic/issues!

Do you have an estimate for how long until a mobile version?
I could write a quick prototype in the next 2 days if you want :)/> (Anddd I suppose that means I will :P/>)
Edited on 25 March 2014 - 01:50 PM
Csstform #69
Posted 25 March 2014 - 03:03 PM
Cool!
apemanzilla #70
Posted 25 March 2014 - 08:33 PM
Bug; LuaIDE crashes if you try to update it. I'm guessing it's attempting to write to ROM.
GravityScore #71
Posted 25 March 2014 - 11:42 PM
Bug; LuaIDE crashes if you try to update it. I'm guessing it's attempting to write to ROM.

Yes that'd be right. I'll just remove the button.
apemanzilla #72
Posted 26 March 2014 - 12:06 AM
Bug; LuaIDE crashes if you try to update it. I'm guessing it's attempting to write to ROM.

Yes that'd be right. I'll just remove the button.
Was playing around with lightshot earlier and found an anomaly. The emulator can't pick up on function key presses. Doesn't seem to be possible with JS in the first place, so it's not exactly a bug, but a bit of a nuisance when using Lightshot :P/>
awsmazinggenius #73
Posted 26 March 2014 - 03:07 AM
The OneOS installer freezes when I run it, I would assume it's a problem on your end since this is in beta and it works in Vanilla CC. To try the installer, use this:

pastebin run E1xftzLa
oeed #74
Posted 26 March 2014 - 03:26 AM
The OneOS installer freezes when I run it, I would assume it's a problem on your end since this is in beta and it works in Vanilla CC. To try the installer, use this:

pastebin run E1xftzLa

Yes, I noticed that too.

Also, what's status on my pull request? https://github.com/1lann/Mimic/pull/27
1lann #75
Posted 26 March 2014 - 02:57 PM
GravityScore is currently re-writing the GUI, so he'll possibly implement it once he's finished (Which could take a while, your problem isn't such a big deal is it? Just a small aesthetic detail).

OneOS doesn't work because I believe it's too big, as we have to use a XDR (Cross domain request) proxy for HTTP request, which in this case is Yahoo Query Language, which doesn't allow downloading of large files (And doesn't do proper HTTP POST too, which is why post doesn't work), so yeah. If someone could find an alternative (that works, and preferably we don't have to host), that would be awesome :)/>

Was playing around with lightshot earlier and found an anomaly. The emulator can't pick up on function key presses. Doesn't seem to be possible with JS in the first place, so it's not exactly a bug, but a bit of a nuisance when using Lightshot :P/>

Actually, I just tested it and it is possible, however we haven't implemented it, I'll add it to our to-do list.


Oh and another quick update, I got the prototype for mobile input working :D/>, but it won't be published until GravityScore finishes re-writing the GUI for many reasons. Including the fact that I need to re-write the input system once GravityScore finishes too, and that the input is super glitchy on Android due to some weird way the keyboard acts. I have yet to test it on iOS.

Roadmap:
New GUI by Friday
Mobile Version by Friday-Sunday
Small Features by Friday-Sunday
Exporting by zip Sunday-Friday (Next week)
Project will be very near completion: Next Sunday.
Expect the full release date to be at the latest April 10th.
Edited on 26 March 2014 - 02:33 PM
amtra5 #76
Posted 26 March 2014 - 08:10 PM
What's the licensing on Mimic. Are we allowed to rehost it ourselves?
awsmazinggenius #77
Posted 26 March 2014 - 09:47 PM
What's the licensing on Mimic. Are we allowed to rehost it ourselves?
Why don't you actually look at the GitHub? It's in the README.md, though I guess it should be in LICENSE. It's the CC BY-NC 4.0
1lann #78
Posted 27 March 2014 - 12:28 PM
What's the licensing on Mimic. Are we allowed to rehost it ourselves?
Feel free to redistribute it yourself, as long as you follow the CC BY-NC 4.0 license that awsmazinggenius posted above. You may not re-brand it unless you make significant changes, (I wouldn't count re-themeing as significant) and as the license is Non-Commercial, you may not use it to earn any revenue.
theoriginalbit #79
Posted 27 March 2014 - 12:34 PM
What's the licensing on Mimic. Are we allowed to rehost it ourselves?
-snip- as the license is Non-Commercial, you may not use it to earn any revenue.
that includes no use of adverts or ad.fly links to even cover the cost of hosting, right?
1lann #80
Posted 27 March 2014 - 01:04 PM
that includes no use of adverts or ad.fly links to even cover the cost of hosting, right?
I suppose in some cases it will be okay. My intention of making the license Non-Commercial is to prevent people from charging the use of Mimic. This: http://wiki.creative...the_licenses.3F really describes what I would allow and wouldn't. Though Mimic is all static content, there are plenty of services that can host static sites for free. Including Dropbox. If you would like to include it in your own domain that has ads on other pages, then I'm fine with that. However I wouldn't like ad.fly links to Mimic, as that would just piss people off, as the up-to-date official version of Mimic will always be hosted with no ads. Not to mention Mimic is free and open-source.

Update: Actually we will probably change to this license http://creativecommons.org/licenses/by-nc-sa/4.0/
Edited on 27 March 2014 - 12:54 PM
awsmazinggenius #81
Posted 27 March 2014 - 02:55 PM
1lann, the license is irrevocable, just so you know. That means that people that downloaded your source (like me! I'm starting to tinker with it) still have the right to use it under the old license, unless they violate it. Also, CC licenses aren't recommended for code.

Edit: Irrevocability: http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Irrevocability
Not for code: http://wiki.creativecommons.org/Frequently_Asked_Questions#Can_I_apply_a_Creative_Commons_license_to_software.3F
Edited on 27 March 2014 - 01:58 PM
1lann #82
Posted 27 March 2014 - 11:11 PM
Yes, I know if you have the old version of Mimic with the previous license, you use that license, however any future versions (Of the original Mimic) with the new license must be used with the new license.

I however didn't know that Creative Commons licenses weren't for software (or really websites), since I've seen it used on many websites of software. Since I haven't changed the license yet, I suppose I'll find an alternative one. But the rules will be generally the same. Noncommercial and no sublicensing.
Edited on 28 March 2014 - 11:50 AM
awsmazinggenius #83
Posted 27 March 2014 - 11:58 PM
Just so you know prohibiting commercial use is sometimes considered against the spirit of open-source. I do like the GPL, however, as it requires users to be able to see the source code, so that means that the user still has their right to tinker with the code. It also means that anyone who modifies their code must release the code under the GPL, (well, there are some exceptions, but that's the main idea), so there is your no sub licensing.
theoriginalbit #84
Posted 28 March 2014 - 12:04 AM
Just so you know prohibiting commercial use is sometimes considered against the spirit of open-source.
but it is a fair enough clause.
could you imagine putting months of time and effort into a program you've made and releasing it for free to the public so everyone can use it, and putting open-source on it so that people can tinker with it at will. but then someone comes along, grabs your source and starts selling it unmodified; you'd feel cheated and robbed, since they've just taken all your hard work, not made any changes themselves, and have started selling it, that's taking the spirit out of why you made it free and open-source to begin with.
apemanzilla #85
Posted 28 March 2014 - 12:08 PM
Just so you know prohibiting commercial use is sometimes considered against the spirit of open-source.
but it is a fair enough clause.
could you imagine putting months of time and effort into a program you've made and releasing it for free to the public so everyone can use it, and putting open-source on it so that people can tinker with it at will. but then someone comes along, grabs your source and starts selling it unmodified; you'd feel cheated and robbed, since they've just taken all your hard work, not made any changes themselves, and have started selling it, that's taking the spirit out of why you made it free and open-source to begin with.

Of course, since it uses Javascript and HTML5 primarily, all client side non-compiled code, it's practically open-source anyways…
1lann #86
Posted 28 March 2014 - 12:57 PM
Just a heads up that I changed the license to The Q Public License: http://opensource.org/licenses/QPL-1.0
If you just use common sense and be ethical about using Mimic, then I'm happy about you using. This means you will not charge to use Mimic, unless you have made large, significant changes (Enough to say that a lot of the code isn't really much ours anymore) and that you do not re-brand it or state it was made by you if all you did was make minor changes. If you made minor modifications, keep it as "By GravityScore and 1lann" and add a "With modifications by <your name>"
apemanzilla #87
Posted 28 March 2014 - 01:50 PM
:o/> it works on my iPad!

1lann #88
Posted 28 March 2014 - 02:09 PM
Lol, nice catch. I just pushed mobile support to http://gravlann.github.io

I noticed it doesn't work so well on an iPad sadly, as the blue cursor is in the way (for me at least) and its really prone to crashing on my iPad, and runs pretty slowly on my iPad too. Although I'm using Safari, not Chrome, since it's my school's iPad, and they don't let you install apps on it.
It's pretty flawless on Android devices (Specifically on my Nexus 5), but yeah, try out the new mobile version! Just point your browser to the same URL.
It scales down the emulator display if you have a smaller mobile display. Oh yeah, and touching/mouse clicking works too.

I will add more support later, with additional keys (like ctrl, and arrow keys) onto the page for mobile devices, and hopefully iron out some bugs/glitches with it!
Edited on 28 March 2014 - 01:12 PM
Cranium #89
Posted 28 March 2014 - 03:04 PM
I have a /minor/ issue with the mobile version. I use Swype Keyboard, which is supposed to automatically add a space in between swyped words, but when typing on Mimic, the space doesn't enter. It just means that I have to make sure to type a space between words. It's not a major thing, because there is a simple workaround, but it is somewhat annoying.
1lann #90
Posted 28 March 2014 - 03:33 PM
I have a /minor/ issue with the mobile version. I use Swype Keyboard, which is supposed to automatically add a space in between swyped words, but when typing on Mimic, the space doesn't enter. It just means that I have to make sure to type a space between words. It's not a major thing, because there is a simple workaround, but it is somewhat annoying.
I believe it would be because I'm using a password type input field, because the keyboard used for password fields are different, and thus don't have autocorrect or auto-spacing, etc. I honestly prefer this more when programming, so then autocorrect doesn't get in the way of typing function names, and I prefer not having a space after each word, else I'll have to erase the space each time I'm writing a function, or really just any code.
I can't/don't want want to change this, as using the default keyboard setting is even more annoying and glitchier, as it tries to auto-captialise the first character, and some seriously glitchy stuff happens.

Remember that on mobile, I'm not actually receiving input events from the keyboard itself, but instead I have a dummy, invisible text field that captures what you type, and then converts them to key events.
Edited on 28 March 2014 - 02:34 PM
apemanzilla #91
Posted 28 March 2014 - 03:34 PM
Bugs w/ mobile support:
  • input box is inside the canvas - if it's possible, could the input bar have a display:none attribute; and have a button to focus/blur it when clicked?
  • cannot use touch support whiled input box is focused - this means you have to exit the keyboard after every touch
  • no right clicking or scrolling - maybe scrolling could be overridden to send scroll events to the emulator?
  • often replaces characters with ">" when typing quickly
Very excited to see it coming to mobile though :D/>
1lann #92
Posted 28 March 2014 - 03:58 PM
Bugs w/ mobile support:
  • input box is inside the canvas - if it's possible, could the input bar have a display:none attribute; and have a button to focus/blur it when clicked?
  • cannot use touch support whiled input box is focused - this means you have to exit the keyboard after every touch
  • no right clicking or scrolling - maybe scrolling could be overridden to send scroll events to the emulator?
  • often replaces characters with ">" when typing quickly
Very excited to see it coming to mobile though :D/>
When I tried, focusing and blurring doesn't work with iOS (Safari at least) for some reason.
The way iOS popups the keyboard to fit the content within it screws up the touch events. Not sure how I'm gonna fix that, perhaps modifications to the GUI would fix it.
Right clicking and scrolling is planned and I have prepared a way to do it. On mobile I'll probably get some form of gestures to implement this.
I have attempted a fix to stop the ">" appearing when typing quickly on /1lann/Mimic, not pushed to gravlann.github.io. I need to go to sleep now, I'll push updates tomorrow. (Update: Actually it seems to only happen in iOS, I never get it in Android)

Thanks a tonne for all the bug reports btw. :)/> It's really helpful as you pickup on a lot of small details that we forget.
Edited on 28 March 2014 - 03:02 PM
awsmazinggenius #93
Posted 28 March 2014 - 04:30 PM
Zoom in to notice the faint black (well, dark gray, but whatever) marks the emulator leaves behind when back spacing on iPad Air, iOS 7.1, latest Chrome app:
TheOddByte #94
Posted 28 March 2014 - 08:25 PM
Amazing, Mobile support!
Now I can finally use CC on my iPhone! :D/>
( It does work on iPhone right? )

Offtopic: 1000th Post! :D/>
Edit: The cursor seems kinda messed up( I mean the iOS one )
Edited on 28 March 2014 - 07:32 PM
Csstform #95
Posted 28 March 2014 - 08:28 PM
Doesnt even load on Safari iOS 4.2.1.
Zambonie #96
Posted 28 March 2014 - 09:09 PM
Yay, excited that it works on android :)/>

Edited on 28 March 2014 - 08:11 PM
Cranium #97
Posted 28 March 2014 - 09:44 PM
One thing I have noticed is that after using the "startup script feature" by altering the URL, you cannot start the computer normally without the startup script by using the base url.
Example:

I had originally used it to test my SmartPaste program(yeah, no POST so it doesn't work properly) and after exiting and going back, it goes right back to the program.
Edited on 28 March 2014 - 08:45 PM
1lann #98
Posted 29 March 2014 - 12:38 AM
One thing I have noticed is that after using the "startup script feature" by altering the URL, you cannot start the computer normally without the startup script by using the base url.

I had originally used it to test my SmartPaste program(yeah, no POST so it doesn't work properly) and after exiting and going back, it goes right back to the program.
That's part of Mimic for all versions, it's the lazy way GravityScore implemented by making the auto pastebin download into startup. He's gonna change it soon.
Edited on 28 March 2014 - 11:38 PM
awsmazinggenius #99
Posted 29 March 2014 - 01:32 AM
I don't see any mention of mobile devices in Cranium's post, I think he just took the screenshot on his phone, that's all.

Csstform and Hellkid (PS: Congratz on 1k posts!): try updating your devices to iOS 7.1 and see if it works. Works like a charm (well mostly, some minor keyboard issues and those gray lines, but still) on my iPad Air, iOS 7.1, latest Chrome app. Also, may I ask what the reason is for putting the requests through a third-party service? Also, the blue cursor isn't a huge problem for me if I get to use CC on my iPad. Also, I don't have those other issues you said you had. Are you using older devices?
Csstform #100
Posted 29 March 2014 - 04:54 AM
I don't see any mention of mobile devices in Cranium's post, I think he just took the screenshot on his phone, that's all.

Csstform and Hellkid (PS: Congratz on 1k posts!): try updating your devices to iOS 7.1 and see if it works. Works like a charm (well mostly, some minor keyboard issues and those gray lines, but still) on my iPad Air, iOS 7.1, latest Chrome app. Also, may I ask what the reason is for putting the requests through a third-party service? Also, the blue cursor isn't a huge problem for me if I get to use CC on my iPad. Also, I don't have those other issues you said you had. Are you using older devices?
HA! You try updating to iOS 7 on a iPod 2, heck try installing 6, or 5, or 4.3!

Frickin apple.
awsmazinggenius #101
Posted 29 March 2014 - 05:35 AM
Oops, maybe I posted too fast and just said that automatically as I go by "It's not a bug unless you can reproduce it with everything up to date." Sorry about that :(/>
1lann #102
Posted 29 March 2014 - 06:00 AM
Csstform and Hellkid (PS: Congratz on 1k posts!): try updating your devices to iOS 7.1 and see if it works. Works like a charm (well mostly, some minor keyboard issues and those gray lines, but still) on my iPad Air, iOS 7.1, latest Chrome app. Also, may I ask what the reason is for putting the requests through a third-party service? Also, the blue cursor isn't a huge problem for me if I get to use CC on my iPad. Also, I don't have those other issues you said you had. Are you using older devices?

Well as I am using Safari on an iPad 4th Gen iOS 7.1. I can't install chrome on it. The reason why I have to put HTTP requests through a third-party services is because of this: http://en.wikipedia.org/wiki/Same-origin_policy (Basically I'm only allowed to perform requests to my own domain, or to other servers which explicitly allow it. In this case I'm using Yahoo's servers.)
awsmazinggenius #103
Posted 29 March 2014 - 06:46 AM
What about those faint gray lines when you backspace stuff on iPad? Will they be fixed?
Edited on 29 March 2014 - 05:46 AM
1lann #104
Posted 29 March 2014 - 09:02 AM
What about those faint gray lines when you backspace stuff on iPad? Will they be fixed?
Probably. It's not much of a high priority right now.
Edited on 29 March 2014 - 08:03 AM
GravityScore #105
Posted 29 March 2014 - 09:54 AM
What about those faint gray lines when you backspace stuff on iPad? Will they be fixed?
Probably. It's not much of a high priority right now.

Should've just fixed it then. Wasn't hard at all.

Anyways, just pushed a new version with all new GUI :D/> Looks awesome now.

Oh I'm pretty sure I broke mobile support with that too.
Edited on 29 March 2014 - 09:02 AM
1lann #106
Posted 29 March 2014 - 10:41 AM
Ugh. I'll work on mobile support either today or tomorrow.
oeed #107
Posted 29 March 2014 - 10:47 AM
I looove that loading indicator!!! Did you make it?

The credits button feels a bit out of place. Have you not added multiple computers yet, I can't seem to find any button to add a new one.
GravityScore #108
Posted 29 March 2014 - 10:48 AM
I looove that loading indicator!!! Did you make it?

The credits button feels a bit out of place. Have you not added multiple computers yet, I can't seem to find any button to add a new one.

No multiple computers yet. Would the credits button be better over next to the fullscreen button?

I didn't make the loading indicator! :P/> I found it somewhere online.
oeed #109
Posted 29 March 2014 - 10:49 AM
I looove that loading indicator!!! Did you make it?

The credits button feels a bit out of place. Have you not added multiple computers yet, I can't seem to find any button to add a new one.

No multiple computers yet. Would the credits button be better over next to the fullscreen button?

I didn't make the loading indicator! :P/> I found it somewhere online.

Yea, that'd probably work.

Where did you get it?

Edit: If you want to add Quick Shell feel free to go ahead and do it now. If I update it in future I'll let you know.
Edited on 29 March 2014 - 09:50 AM
GravityScore #110
Posted 29 March 2014 - 11:11 AM
Where did you get it?

Found it here: http://codepen.io/desandro/pen/HhdrA

A neat collection of a bunch of them here: http://codepen.io/collection/HtAne/
theoriginalbit #111
Posted 29 March 2014 - 11:21 AM
Found it here: http://codepen.io/desandro/pen/HhdrA
A neat collection of a bunch of them here: http://codepen.io/collection/HtAne/
WOAH! It's done with CSS3‽‽‽
apemanzilla #112
Posted 29 March 2014 - 12:49 PM
Found it here: http://codepen.io/desandro/pen/HhdrA
A neat collection of a bunch of them here: http://codepen.io/collection/HtAne/
WOAH! It's done with CSS3‽‽‽
It's the best way :P/>
theoriginalbit #113
Posted 29 March 2014 - 12:50 PM
It's the best way :P/>
Oh believe me I know, in my websites I use HTML5 and CSS3, I avoid JS at all costs, but some of those loading bars I wouldn't have ever imagined possible with CSS!
apemanzilla #114
Posted 29 March 2014 - 12:52 PM
It's the best way :P/>/>
Oh believe me I know, in my websites I use HTML5 and CSS3, I avoid JS at all costs, but some of those loading bars I wouldn't have ever imagined possible with CSS!
Yeah, the stuff you can do with plain CSS3 - no JS - it's pretty crazy…
awsmazinggenius #115
Posted 29 March 2014 - 03:20 PM
You didn't actually totally break mobile support. On iPad Air, iOS 7.1, latest Chrome app, you can bring up the keyboard but it just doesn't do anything when you type on it.
MostwantedRBX #116
Posted 29 March 2014 - 07:08 PM
Wow, you guys have definitely made some progress! I'll have to look at the CSS "loader dots". I didn't think that was possible with CSS, lol.
oeed #117
Posted 29 March 2014 - 10:43 PM
Wait… no JS at all… :o/>

I've made a few in SVG (such as the one on my personal site), but it's a bit of pain. This looks far more advanced!
1lann #118
Posted 30 March 2014 - 10:51 AM
Just a heads up, Mimic has been put on hold today because we're also working on the next version of Firewolf, and I have some school work to do. So, sorry that mobile support won't be finished today.
Edited on 30 March 2014 - 08:51 AM
apemanzilla #119
Posted 31 March 2014 - 04:10 PM

You just got fork'd :D/>
awsmazinggenius #120
Posted 31 March 2014 - 04:48 PM

You just got fork'd :D/>/>
I WANT DAT EMULATOR

Seriously, nice job. Did you get the mobile thing going too?
1lann #121
Posted 31 March 2014 - 04:59 PM
I WANT DAT EMULATOR

Seriously, nice job. Did you get the mobile thing going too?
Should have been pretty easy, all he had to do was replace the rom.zip file with the CC 1.6 one's (And Mimic's FS loader will take care with the rest). Features like pasting (and mobile support) will require manual programming. Me and gravs just couldn't be bothered to do so, and we wanted to make sure that we added all hard-coded changes too. But as of right now, still working on Firewolf.

Oh and if anyone would want to directly contribute to Mimic, you can feel free to submit pull requests on our Github repo, we will look through them :)/>.
Edited on 31 March 2014 - 03:03 PM
awsmazinggenius #122
Posted 31 March 2014 - 05:00 PM
Oh. I thought he actually implemented other things, too, not just replacing the rom.zip.
apemanzilla #123
Posted 31 March 2014 - 05:16 PM

You just got fork'd :D/>
I WANT DAT EMULATOR

Seriously, nice job. Did you get the mobile thing going too?
Trust me, you don't want that emulator. Lots of 1.6 stuff is still broken, and the bios changes aren't working either. So if you want, you can try it, just run "rom/programs/advanced/multishell" and you'll have partial 1.6 support :P/>
Tbh, all I really did was update the rom files, hehe

Slowly working through the mobile emulator :3
Edited on 31 March 2014 - 03:19 PM
Vekat #124
Posted 04 April 2014 - 01:34 AM
I'm amazed by what you guys did here, html5 is only getting more and more impressive as an app development platform.
I have a little question though. How exactly lua5.1.js runs the user script? Imagining if turtles were implemented, lua5.1.js could allow them to walk around the enviroment and interact with it while the script runs (like returning true when a movement is possible or false when it's not) in real time?
Edited on 04 April 2014 - 03:06 AM
1lann #125
Posted 04 April 2014 - 05:59 PM
I'm amazed by what you guys did here, html5 is only getting more and more impressive as an app development platform.
I have a little question though. How exactly lua5.1.js runs the user script? Imagining if turtles were implemented, lua5.1.js could allow them to walk around the enviroment and interact with it while the script runs (like returning true when a movement is possible or false when it's not) in real time?
I can insert JavaScript functions into Lua, that will run JavaScript when the function is called in Lua. Using this, I can do whatever JavaScript can do, and track functions that Lua runs. So I can do some checking and stuffs within JavaScript, whenever the Lua function turtle.forward() is called.

I run the bios by loading it into the Lua stack, and then running it as a coroutine from within JavaScript.
apemanzilla #126
Posted 04 April 2014 - 07:55 PM
I'm amazed by what you guys did here, html5 is only getting more and more impressive as an app development platform.
I have a little question though. How exactly lua5.1.js runs the user script? Imagining if turtles were implemented, lua5.1.js could allow them to walk around the enviroment and interact with it while the script runs (like returning true when a movement is possible or false when it's not) in real time?
I can insert JavaScript functions into Lua, that will run JavaScript when the function is called in Lua. Using this, I can do whatever JavaScript can do, and track functions that Lua runs. So I can do some checking and stuffs within JavaScript, whenever the Lua function turtle.forward() is called.

I run the bios by loading it into the Lua stack, and then running it as a coroutine from within JavaScript.
Quick question: how are you loading the BIOS? When I modified the one in the ROM zip, none of the changes went through, but they did for other programs.
TheMrIron2 #127
Posted 05 April 2014 - 12:50 AM
This is an exciting prospect. I'll be having a look at this.

BTW, alongtimeago is meant to be in a folder called '.secret/'. I think. Nevermind that, it's still a demo. Just a bug.
theoriginalbit #128
Posted 05 April 2014 - 01:06 AM
BTW, alongtimeago is meant to be in a folder called '.secret/'. I think. Nevermind that, it's still a demo. Just a bug.
No they're on treasure disks now. which means they now come up as 'disk#/alongtimeago/alongtimeago' or something like that.
1lann #129
Posted 05 April 2014 - 04:05 AM
Quick question: how are you loading the BIOS? When I modified the one in the ROM zip, none of the changes went through, but they did for other programs.
The bios is stored in code.js, idk really why but it's there.

BTW, alongtimeago is meant to be in a folder called '.secret/'. I think. Nevermind that, it's still a demo. Just a bug.
I purposefully put it in /rom/programs so I could test it out. It looks like GravityScore broke it too now…
Edited on 05 April 2014 - 02:06 AM
TheMrIron2 #130
Posted 05 April 2014 - 06:30 PM
BTW, alongtimeago is meant to be in a folder called '.secret/'. I think. Nevermind that, it's still a demo. Just a bug.
I purposefully put it in /rom/programs so I could test it out. It looks like GravityScore broke it too now…

Yeah, it gives you a black screen.

BTW, alongtimeago is meant to be in a folder called '.secret/'. I think. Nevermind that, it's still a demo. Just a bug.
No they're on treasure disks now. which means they now come up as 'disk#/alongtimeago/alongtimeago' or something like that.

I know (I forgot when I was posting :P/>) but how would you implement treasure disks to the HTML5 emulator?
Vekat #131
Posted 12 April 2014 - 04:13 PM
I can insert JavaScript functions into Lua, that will run JavaScript when the function is called in Lua. Using this, I can do whatever JavaScript can do, and track functions that Lua runs. So I can do some checking and stuffs within JavaScript, whenever the Lua function turtle.forward() is called.

I run the bios by loading it into the Lua stack, and then running it as a coroutine from within JavaScript.
Interesting. Another quick question: Does that mean you can yield from a Lua coroutine and run some JavaScript?
GravityScore #132
Posted 13 April 2014 - 04:16 AM
Interesting. Another quick question: Does that mean you can yield from a Lua coroutine and run some JavaScript?

The user can't run any JavaScript from within the emulator, but yes, in the code things are run when the coroutine yields.
1lann #133
Posted 13 April 2014 - 06:27 AM
I can insert JavaScript functions into Lua, that will run JavaScript when the function is called in Lua. Using this, I can do whatever JavaScript can do, and track functions that Lua runs. So I can do some checking and stuffs within JavaScript, whenever the Lua function turtle.forward() is called.

I run the bios by loading it into the Lua stack, and then running it as a coroutine from within JavaScript.
Interesting. Another quick question: Does that mean you can yield from a Lua coroutine and run some JavaScript?
When I said that I can insert JavaScript functions into Lua, what I meant is that I have JavaScript functions sitting outside, which Lua then converts into a pointer and inserts it into the environment. So within Lua, you cannot register JavaScript functions, unless you create the function outside of it, then insert it into the environment with the JavaScript console, but you can do anything with the JavaScript console anyway.

A minor update will be pushed today, now with scrolling! (Which is somewhat glitchy), partial mobile support, pasting is back, and soon to be done will be full mobile support with a mobile UI, and collapsable file listings. Oh and I added crisp/retina edges for all browsers except for Google Chrome, cause it doesn't support it… I don't know why…
Edited on 13 April 2014 - 06:59 AM
awsmazinggenius #134
Posted 15 April 2014 - 01:41 AM
Emulator doesn't seem to work on iPad Air, iOS 7.1, latest Chrome app, using an Apple Wireless Keyboard.
apemanzilla #135
Posted 15 April 2014 - 05:46 AM
Emulator doesn't seem to work on iPad Air, iOS 7.1, latest Chrome app, using an Apple Wireless Keyboard.
Right now mobile support is broken.
awsmazinggenius #136
Posted 16 April 2014 - 01:01 AM
"partial mobile support"
1lann #137
Posted 16 April 2014 - 06:45 PM
Yeah it's more or less broken. It at least works on android, I'll work on it sometime soon… though that may be a while…
apemanzilla #138
Posted 16 April 2014 - 06:59 PM
Yeah it's more or less broken. It at least works on android, I'll work on it sometime soon… though that may be a while…

The editor is also a bit wacky on mobile.
awsmazinggenius #139
Posted 18 April 2014 - 03:21 PM
I would just copy-paste over from Textastic when I'm on my iPad anyways. (So many nice features, extra keys above the virtual keyboard for when you forget to bring the real keyboard, and works with the fonts and theme that I set in Sublime Text and have grown addicted to.)
Blue #140
Posted 19 April 2014 - 06:09 AM
I tried this out on my tablet and it works! The only problem is that it can't use Ctrl
(I'm using an on–screen keyboard and android 4.2)
Edited on 19 April 2014 - 04:11 AM
amtra5 #141
Posted 22 April 2014 - 11:09 AM
I tried this out on my tablet and it works! The only problem is that it can't use Ctrl
(I'm using an on–screen keyboard and android 4.2)
Try "Hacker's Keyboard"!
Blue #142
Posted 30 April 2014 - 07:03 PM
I tried this out on my tablet and it works! The only problem is that it can't use Ctrl
(I'm using an on–screen keyboard and android 4.2)
Try "Hacker's Keyboard"!
Thanks for the suggestion! :)/>
cdel #143
Posted 03 May 2014 - 12:05 PM
Fantastic, however I was curious if I could embed this into my own website possibly?
GravityScore #144
Posted 03 May 2014 - 03:53 PM
Fantastic, however I was curious if I could embed this into my own website possibly?

No sorry, we'd prefer you not to. Plus it would probably end up being reasonably complicated.
cdel #145
Posted 04 May 2014 - 02:02 PM
okay, thanks for being polite about it unlike others. :)/>
Cranium #146
Posted 08 May 2014 - 06:29 AM
Waaait…waitwaitwaitwait…….
Wait…
When did you add the external editor? That is AMAZING. Syntax highlighting, function collapsing, real time editing awesomeness. I LOVE IT. Way better than having to go through, finding my html5 save files(which can't really be read), and editing those.
And to be able to make changes, switch, and have the changes be effective immediately? That's just great. Keep up the hard work!
apemanzilla #147
Posted 08 May 2014 - 01:28 PM
Waaait…waitwaitwaitwait…….
Wait…
When did you add the external editor? That is AMAZING. Syntax highlighting, function collapsing, real time editing awesomeness. I LOVE IT. Way better than having to go through, finding my html5 save files(which can't really be read), and editing those.
And to be able to make changes, switch, and have the changes be effective immediately? That's just great. Keep up the hard work!
It doesn't work so well on mobile, but other than that it is pretty great :3
awsmazinggenius #148
Posted 09 May 2014 - 04:38 AM
I was wondering if you could use a Chrome packaged app or something else to implement this in a top-level window on the OS, and to add external editor support. The web editor is nice, but I'd love to use Sublime with this easily.
MudkipTheEpic #149
Posted 22 May 2014 - 03:28 AM
Did you recently update this for mobile? My iPhone 5S running jailbroken iOS 7.0.6 is able to finally input text, but there's a black bar in the way of the terminal screen as soon as I start typing. This seems like a big step towards being the first truly universal ComputerCraft emulator! :D/>
GravityScore #150
Posted 07 June 2014 - 10:14 PM
Yay new features! :)/>

Updated OP and stuffs. I fixed mobile support, at least for my iPad and iOS simulator. Haven't got an android to test on. New GUI and more stuffs - check the OP.


Link
apemanzilla #151
Posted 09 June 2014 - 06:47 PM
Couple bugs in new version:

The delete button in the file editor seems to delete ALL files
Programs from 1.6 are available, but it seems to be running the 1.5 BIOS
LuaIDE is no longer available
The menu buttons are rendered behind the canvas for the computer
SpencerBeige #152
Posted 12 June 2014 - 06:56 AM
this is the best thing ever!
LDShadowLord #153
Posted 12 June 2014 - 07:27 PM
Will you ever add localisations for the text? It is still garbling my text when I type (I'm on a UK keyboard)
adencraft2000 #154
Posted 13 June 2014 - 05:42 AM
Is there a way to create a file without using the computer?
timia2109 #155
Posted 13 June 2014 - 09:04 PM
I very like your Emulator but can you add support for german keyboards, because I can't use any of () or ' ". Thanks

And I have a question. What file must I modify to get the saved files into PHP over jQuery?

Thanks,
timia2109
gamax92 #156
Posted 13 June 2014 - 10:42 PM
Hi, I'm back. Here is a new set of things that don't match CC's behaviour
Spoilerhttp api crashes emulator on invalid urls
bit api can return negative numbers
bit api will accept numbers larger than (2^32)-1, CC will error
rs.getAnalogueOutput, rs.setAnalogueOutput, rs.getAnalogueInput is missing
redstone and rs are not the same table
fs.delete will give "Access denied" rather then "Access Denied"
fs api doesn't check for Invalid paths, like ".." or "&amp;#46;&amp;#46;/something"
fs.move("f","f\a") will succeed and the folder is lost, CC will error "Can't move a directory inside itself"
fs.copy("f","f\a") will succeed and nothing happens, CC will error "Can't copy a directory inside itself"
fs.move will succeed if the first path doesn't exist, CC will error "No such file"
fs.move will succeed if the second path exists and do nothing, CC will error "File exists"
fs.copy will succeed if the first path doesn't exist, CC will error "No such file"
fs.copy will succeed if the second path exists and do nothing, CC will error "File exists"
fs.copy("rom","rom") will succeed, CC will error "Access denied" (Yes, denied is supposed to be lowercase)
fs.move("rom","sdfs") will crash the emulator, CC will error "Access denied"
fs.move("rom","rom") will succeed, CC will error "Access denied"
fs.makeDir will succeed on files, CC will error "File exists"
fs.makeDir will succeed on "rom" or "rom/sda" and do nothing, CC will error "Access Denied"
fs.getFreeSpace returns nothing
fs.getSize always returns 2097152
fs.getDrive does nothing
fs.getName should give "root" if the name is ""
fs.list crashes the emulator if a file is specified
fs.find doesn't clean paths
when cleaning paths, the following characters are dropped: ":&amp;lt;&amp;gt;?|
Incase there is confusion, thats double quote, colon, left triangle bracket, right triangle bracket, question mark, and pipe
fs.getDir should give ".." if the name is ""
when cleaning paths, if your piece is ".." and the stack is empty or the last piece is also a "..", then add it to the stack
os.setComputerLabel should also accept nil
os.clock returns numbers not in steps of 0.05
debug api is there
string.gfind is there
math.mod is there
the bios identifies itself as "CraftOS 1.5", not 1.6
fs.find("*") is not adding "rom"
Invalid characters render as spaces, not question marks.
character 96 (0x60) renders, it should be hidden
Everything is rendered one scaled pixel too low and one scaled pixel too right
Labels are being trimmed
path cleaning cannot handle backslashes properly: fs.combine("a/\\/\\\\/\\/b","") -> "a///\/b"
Blinking is not every 1/4s

SpoilerVarious things are spaced incorrectly

Left: Mimic, Right: ComputerCraft
Edited on 14 June 2014 - 01:36 PM
daphee #157
Posted 26 June 2014 - 04:15 PM
My keyboard layout(german) doesn't work at all. As far as I know the keypress event's 'which' provides a pretty reliable source of ASCII codes.
Edited on 26 June 2014 - 02:16 PM
awsmazinggenius #158
Posted 27 June 2014 - 04:28 PM
The blue look of the sidebar is a bit ugly. Could you change it back?
SpencerBeige #159
Posted 01 July 2014 - 05:04 AM
is there a way to make a new computer other then computer 0?
SpencerBeige #160
Posted 02 July 2014 - 09:02 PM
well, i found a small bug, if you do control+r with an empty dir, that dir gets deleted
Vekat #161
Posted 12 July 2014 - 12:53 AM
I have a little question. How the debug hooks (inside xpcall) can yield?
I made a little local test and the c-bounduary error always happens. I admit I don't have much experience with Lua.
Cookiezi #162
Posted 21 July 2014 - 10:24 PM
I wish this had Pocket computer support.
MudkipTheEpic #163
Posted 22 July 2014 - 01:41 AM
For some reason, when I use this on my iPhone 5S (Jailbroken 7.0.6), the computer starts out frozen with no blinking cursor. When I tap the screen, this error appears in the developer console:

[Log] Intialization Error:  Redirect object is missing method isColour. (computer.js, line 132)
[Log] Trace:  Redirect object is missing method isColour. (computer.js, line 133)
[Log] Thread closed (computer.js, line 134)
[Error] ReferenceError: Can't find variable: thread
launch (computer.js, line 135)
afterSetup (core.js, line 130)
onload (render.js, line 44)
[Log] Error:  cannot resume non-suspended coroutine (computer.js, line 185)

I'll try to examine the code and see what's up, but it would be nice to have some support from the people who made the application. :P/>

(cross posted as a Github issue)
Danny12328 #164
Posted 22 July 2014 - 07:21 AM
Good idea. it's hard to say if I'll use it or not.
rhyleymaster #165
Posted 22 July 2014 - 06:13 PM
Just in-case anyone was wondering, I tested this on my Chromebook, and it works fine.

… I guess I'm likely the only one with a chromebook…
Monthkiller #166
Posted 22 August 2014 - 03:34 AM
Does this work for Ubuntu linux? I hope it does becuase I have a os and the data got nuked becuse the hdd went in my rig :(/>
Edited on 22 August 2014 - 01:35 AM
SpencerBeige #167
Posted 18 November 2014 - 10:24 PM
LUAide no work :'(
secret6timb1 #168
Posted 26 February 2015 - 03:56 PM
http://www.computercraft.info/forums2/index.php?/topic/17250-mimic-computercraft-web-emulator-html5/

pastebin get is not working :/
Bomb Bloke #169
Posted 26 February 2015 - 09:33 PM
It sometimes requires a few attempts, depending on the mood of the pastebin servers. This is true within MineCraft as well.
Geforce Fan #170
Posted 19 March 2015 - 03:13 AM
It sometimes requires a few attempts, depending on the mood of the pastebin servers. This is true within MineCraft as well.
Pastebin never faileds on me!
cyanisaac #171
Posted 11 April 2015 - 11:09 PM
Looks like it's been updated to CC 1.7! Woohoo! :D/>
Left4Cake #172
Posted 22 April 2015 - 08:29 PM
I keep getting this error when running my http://www.computercraft.info/forums2/index.php?/topic/15982-craftmon-a-pokemon-game/ program.
Bomb Bloke #173
Posted 22 April 2015 - 11:19 PM
When a computer/turtle starts running code, ComputerCraft starts a ten second timer. If that code doesn't yield before that timer ends then ComputerCraft will either crash the script or the whole computer (depending on the nature of the functions your script is calling). After each yield, any other systems waiting to run code may do so, then after they've all yielded, processing continues with a new time limit.

The reason why is that running your code chews up valuable server processing power, and so it shouldn't be able to monopolise it. In fact, only ONE CC device can run code at a time: While one is doing something, none of the others can do anything until it yields.

Whether or not it takes more than ten seconds for your code to execute has a little to do with the power of the Minecraft server it's running on, and a lot to do with how often you allow your code to yield. Pulling events (eg getting typed characters or checking timers) triggers a yield, and many commands (eg turtle movements, sleeping, or getting text input from the user) have to pull events to work anyway. Basically, anything that triggers a pause is pulling an event in order to do it, and in order to pull an event the code yields.

Mimic's timing will be a bit different to ComputerCraft. Your screen-updating code is likely taking longer to finish its work while running through a web browser, and will likely need to yield on a more regular basis.
Tag365 #174
Posted 21 May 2015 - 02:37 PM
It appears that I can type in text in the command window for the first time on an unjailbroken iPhone.

Also, where can you find the original Lua resources for ComputerCraft?
CrazedProgrammer #175
Posted 21 May 2015 - 03:07 PM
It appears that I can type in text in the command window for the first time on an unjailbroken iPhone.

Also, where can you find the original Lua resources for ComputerCraft?
https://www.github.com/alekso56/ComputerCraftLua
Edited on 21 May 2015 - 01:08 PM
Konlab #176
Posted 12 August 2015 - 10:17 AM
Bug report:
os.queueEvent makes a second argument which is the same as the event name

http://www.computerc...emulator-html5/

pastebin get is not working :/
try with http.get() with the raw paste data
JerryWester #177
Posted 21 October 2015 - 09:10 PM
This is the best thing I've ever used. Especially because I'm generally at a chromebook, my school computer. As a matter o' fact, I made a chrome app just for it. However, because of the $5 developer fee, and because I want to get approval first, I haven't put it up on the Chrome Web Store. Anyway, it seems to work just fine for me, but a few suggestions:
  • Multiple Computers (Perhaps a donation bonus?)
  • Modems (Same, though they wouldn't be much use w/o multiple computers)
  • Redstone signal (Like in this one, though still very inferior to yours: http://www.xurei-des...craft-emulator/)
And, that's all I can think of for now. Otherwise, in my opinion, this is the best thing in ComputerCraft since, well, ComputerCraft!

Off topic, but I love back to the future, and today just so happens to be the day! October 21, 2015. Still waiting on my flying car, however.
Creator #178
Posted 21 October 2015 - 09:34 PM
Exactly. Here, there are 28 minutes to go until Back to the Future turns out to be just a movie with normal actors.

By the way, I have noticed bugs with the timer in Mimic.
LDDestroier #179
Posted 22 October 2015 - 02:27 PM
Exactly. Here, there are 28 minutes to go until Back to the Future turns out to be just a movie with normal actors.

By the way, I have noticed bugs with the timer in Mimic.

All events in all Back to the Future movies have now officially happened in the past.
Creator #180
Posted 22 October 2015 - 03:23 PM
Exactly. Here, there are 28 minutes to go until Back to the Future turns out to be just a movie with normal actors.

By the way, I have noticed bugs with the timer in Mimic.

All events in all Back to the Future movies have now officially happened in the past.

What is there is a sequel?
GreenByteSoftware #181
Posted 22 October 2015 - 06:20 PM
Any way of getting this working offline? I will be traveling the whole day and just programming CC in minecraft would be a real battery killer.
Creator #182
Posted 22 October 2015 - 06:38 PM
You can download CClite and love2d for android.
GreenByteSoftware #183
Posted 22 October 2015 - 07:21 PM
You can download CClite and love2d for android.
Forgot to mention that I am on a mac
Creator #184
Posted 22 October 2015 - 07:23 PM
There is love2D for mac.
Lupus590 #185
Posted 22 October 2015 - 07:29 PM
You can download CClite and love2d for android.
Forgot to mention that I am on a mac

CC Emu Redux
GreenByteSoftware #186
Posted 22 October 2015 - 07:33 PM
ok thanks
JerryWester #187
Posted 23 October 2015 - 08:57 PM
Exactly. Here, there are 28 minutes to go until Back to the Future turns out to be just a movie with normal actors.

By the way, I have noticed bugs with the timer in Mimic.

All events in all Back to the Future movies have now officially happened in the past.

What is there is a sequel?

No, he's talking about it being in the past because it's after the future, according to BTTF, and that means it's all in the past.
Creator #188
Posted 24 October 2015 - 11:51 AM
I know. I was just suggesting there might be another sequel.
Yarillo #189
Posted 30 October 2015 - 12:25 AM
I'd like to use it but it doesn't understand my keystrokes correctly on my french keyboard. It works fine for letters, but not for special characters such as &amp;"'([-|_]}= and so on. Those are all on the first row of the keyboard in France (in america that's where the numbers would be)

Now even though the layout is right for the second row, it undestands "azerty" when I type "azerty" and not "qwerty", it's not as sharp when it comes to the first row.
Edited on 29 October 2015 - 11:35 PM
FHSgames99 #190
Posted 18 November 2015 - 07:19 PM
i like this emulator but how i can dowload my program from the emulator?
Lupus590 #191
Posted 18 November 2015 - 09:36 PM
i like this emulator but how i can dowload my program from the emulator?

you could push it to pastebin
Creator #192
Posted 18 November 2015 - 09:38 PM
Or you can copy the source code to the Mimic in-built, but external to CC, text editor.
apemanzilla #193
Posted 19 November 2015 - 08:24 PM
i like this emulator but how i can dowload my program from the emulator?

If you select the file in the left side bar, there's a button in the top right labelled "Download". Click it.
RedNeckSnailSpit #194
Posted 25 December 2018 - 12:27 PM
I like the emulator, it's pretty awesome. My only question is is it possible to create a second computer on the web app? I want to create an pair of apps that communicate over a network, but so far I only have Computer 0 and no other computers on the 'network' meaning I can have a server and I can have a client but I can't have a server and a client at the same time.
Bomb Bloke #195
Posted 25 December 2018 - 11:59 PM
I don't believe so, but you could fake it: coding up a virtual modem peripheral to use with multishell would allow you to simulate a network of systems on the one machine.
TheRockettek #196
Posted 19 January 2019 - 02:29 PM
When will there ever be a fix for having a different keyboard layout because every time I use " it acts as @.
Also, I'm pretty sure yahoos yql has been down for quite a long time now
EveryOS #197
Posted 23 January 2019 - 01:17 PM
When will there ever be a fix for having a different keyboard layout because every time I use " it acts as @.
Also, I'm pretty sure yahoos yql has been down for quite a long time now

Umm…