Jump to content




[Official] CCLite - Lightweight CC Emulator

utility

  • This topic is locked This topic is locked
138 replies to this topic

#61 Sorroko

  • Members
  • 87 posts

Posted 16 June 2013 - 09:21 AM

I researched a bit earlier and came across the socket module, found a nice wrapper for it too which handles requests as threads so they don't block the main thread. Just have to adapt it a bit to work. ;)

I'm also finishing up the fs api, which could do with some improvements. :P

#62 jesusthekiller

  • Banned
  • 562 posts
  • LocationWrocław, Poland

Posted 16 June 2013 - 09:39 AM

Nice!

#63 Sorroko

  • Members
  • 87 posts

Posted 18 June 2013 - 10:08 AM

Should have updated sooner, new version (0.2.0) includes support for the HTTP api, adds fs.copy and fs.move (although they have not been tested and are 90% likely to break ;) ) and a couple of minor fixes.

#64 superaxander

  • Members
  • 609 posts
  • LocationHolland

Posted 18 June 2013 - 10:16 AM

Can you build too long without yielding in?

#65 Sorroko

  • Members
  • 87 posts

Posted 18 June 2013 - 10:19 AM

View Postsuperaxander, on 18 June 2013 - 10:16 AM, said:

Can you build too long without yielding in?
Yes, once I add threading I can in theory force the coroutine to stop, however not sure how difficult it will be to do that in practice, I will also need to reorganise my event system in order to communicate between threads. (As well as some other small implications.)

TL;DR Yes. ;)

#66 nutcase84

  • Members
  • 711 posts
  • LocationIn My Lonely Little Computer Corner

Posted 18 June 2013 - 11:26 AM

Posted Image

Tried to install Nut OS. :(

#67 jesusthekiller

  • Banned
  • 562 posts
  • LocationWrocław, Poland

Posted 18 June 2013 - 01:05 PM

It's in deep alpha, Mr troll.

#68 Sorroko

  • Members
  • 87 posts

Posted 18 June 2013 - 01:17 PM

View Postnutcase84, on 18 June 2013 - 11:26 AM, said:

-snip-

View Postjesusthekiller, on 18 June 2013 - 01:05 PM, said:

-snip-
Haha, well I still managed to track down the bug ;). HTTP api seems to ignore the redirect flag, so I added my own method of redirecting.

Updating download links with a patch version...

#69 ardera

  • Members
  • 503 posts
  • LocationGermany

Posted 18 June 2013 - 01:35 PM

Somehow saving files doesn't work for me, only random lines get saved.

But I wanted to test how fast it is... So I tried this old program and limited r to 10000, and it reached r = 10000 after about 0 secs. (Normal in Vanilla CC: Too long without yielding error after 10 secs. with r = 500)

#70 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 18 June 2013 - 01:40 PM

Wow, this is made with the same engine I use to program my standalone games! :o

#71 Sorroko

  • Members
  • 87 posts

Posted 18 June 2013 - 01:47 PM

View Postardera, on 18 June 2013 - 01:35 PM, said:

Somehow saving files doesn't work for me, only random lines get saved.

But I wanted to test how fast it is... So I tried this old program and limited r to 10000, and it reached r = 10000 after about 0 secs. (Normal in Vanilla CC: Too long without yielding error after 10 secs. with r = 500)

I should mention I know about that bug, it only saves the very last line (normally an empty line). It's because writeLine currently doesn't work, I'm going to fix that asap though.

#72 GravityScore

  • Members
  • 796 posts
  • LocationLand of Meh

Posted 19 June 2013 - 10:08 PM

I love the idea, but this crashes for me as soon as I try to open the .love file. Not a Lua Love crash, an actual application crash. Is this designed to work on a mac? The default love program works fine, as do all my love experiments.

Crash report (courtesy of OSX):
Spoiler


#73 jesusthekiller

  • Banned
  • 562 posts
  • LocationWrocław, Poland

Posted 20 June 2013 - 12:21 AM

That's loong error you have there!
And write line fix: Make it add to buffer and write this buffer out when closed or flushed.

#74 Sorroko

  • Members
  • 87 posts

Posted 20 June 2013 - 03:38 AM

View PostGravityScore, on 19 June 2013 - 10:08 PM, said:

-snip-

Merged your request, thanks for that! I fixed the Mac issue too, it was caused by loading the text before creating the window. Ah well, all good now. ;)

View Postjesusthekiller, on 20 June 2013 - 12:21 AM, said:

And write line fix: Make it add to buffer and write this buffer out when closed or flushed.
I will do! Might re-do the file handles a bit to use loves file handles, might be more efficient too.

EDIT: I'll release a build a little later today New version!

#75 Sorroko

  • Members
  • 87 posts

Posted 25 June 2013 - 03:27 PM

I haven't forgotten about this! Fixed up many bugs and improved the emulator, still needs threading and some other major additions. However it is now more stable ;)

Bug reports are greatly appreciated, you can post them here or on github

#76 M4sh3dP0t4t03

  • Members
  • 255 posts
  • LocationGermany

Posted 30 June 2013 - 03:11 PM

I just played around with it a little bit and when I tried to edit a file it gave me this error:
[string "edit"]:53:attemp to call field `insert`(a nile value)
The code of the file was(i just made a little program to test this emulator):
table = {"hi", "dude", "hello"}
for i,v in ipairs(table) do
  write(v)
  if i < #table then write(", ") end
end
I hope you can find and fix the bug!

#77 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 30 June 2013 - 05:55 PM

View PostKingOfNoobs, on 30 June 2013 - 03:11 PM, said:

I just played around with it a little bit and when I tried to edit a file it gave me this error:
[string "edit"]:53:attemp to call field `insert`(a nile value)
The code of the file was(i just made a little program to test this emulator):
table = {"hi", "dude", "hello"}
for i,v in ipairs(table) do
  write(v)
  if i < #table then write(", ") end
end
I hope you can find and fix the bug!
I don't think it's a bug in the emulator. You redefined the "table" table in that program, so any program after that can't use table functions (like table.insert). Just give your table another name, and make it local.

#78 M4sh3dP0t4t03

  • Members
  • 255 posts
  • LocationGermany

Posted 30 June 2013 - 06:05 PM

View PostMysticT, on 30 June 2013 - 05:55 PM, said:

View PostKingOfNoobs, on 30 June 2013 - 03:11 PM, said:

I just played around with it a little bit and when I tried to edit a file it gave me this error:
[string "edit"]:53:attemp to call field `insert`(a nile value)
The code of the file was(i just made a little program to test this emulator):
table = {"hi", "dude", "hello"}
for i,v in ipairs(table) do
  write(v)
  if i < #table then write(", ") end
end
I hope you can find and fix the bug!
I don't think it's a bug in the emulator. You redefined the "table" table in that program, so any program after that can't use table functions (like table.insert). Just give your table another name, and make it local.
Damn I forgot that! But why should I give it another name or make it local? I just made this to test the emulator.

#79 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 30 June 2013 - 06:41 PM

View PostKingOfNoobs, on 30 June 2013 - 06:05 PM, said:

View PostMysticT, on 30 June 2013 - 05:55 PM, said:

View PostKingOfNoobs, on 30 June 2013 - 03:11 PM, said:

I just played around with it a little bit and when I tried to edit a file it gave me this error:
[string "edit"]:53:attemp to call field `insert`(a nile value)
The code of the file was(i just made a little program to test this emulator):
table = {"hi", "dude", "hello"}
for i,v in ipairs(table) do
  write(v)
  if i < #table then write(", ") end
end
I hope you can find and fix the bug!
I don't think it's a bug in the emulator. You redefined the "table" table in that program, so any program after that can't use table functions (like table.insert). Just give your table another name, and make it local.
Damn I forgot that! But why should I give it another name or make it local? I just made this to test the emulator.
Well... to avoid that error maybe? :P
I'm just giving you a fix for the problem. If you are not going to use that code, then don't use the fix. But check your code before saying there's a bug (either in CC or some emulator).

#80 Kingdaro

    The Doctor

  • Members
  • 1,636 posts
  • Location'MURICA

Posted 01 July 2013 - 02:46 AM

Incidentally, the "table" variable was redefined in the very emulator itself. The sandboxing is pretty weak there, OP.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users