Jump to content


grabie2's Content

There have been 78 items by grabie2 (Search limited from 10-February 22)


By content type

See this member's


Sort by                Order  

#92749 Computer space limit and writing to file

Posted by grabie2 on 02 March 2013 - 08:52 PM in Bugs

View PostCranium, on 02 March 2013 - 01:05 PM, said:

This is not a bug. It's due to the fact that you have 1,024 files open at once, and once that happens, it lags your computer horribly. Try putting the file.close() within the loop. It will not cause that same error.

It's not opening 1024 files at once, I'm opening file, writing 1024 bytes and closing file...

@Cloudy
Maybe change the protection mechanism, for example, calculate free space when all file handles are closed and when some handle opens and writes to file decrease that number, once it hits 0 then lock writing ?



#92670 Computer space limit and writing to file

Posted by grabie2 on 02 March 2013 - 12:29 PM in Bugs

Hello!

I found a big issue with computer space limitation:
The more files you have on computer the longer it's going to take to write something to disk.

Steps to reproduce:
- make sure that you have "I:computerSpaceLimit" in config set to something other than 0
- create 10 files in computer main directory
- run this lua code:
local file = fs.open("test.bin", "wb")
for i = 1, 1024, 1 do file.write(i % 256) end
file.close()

Then turn off your minecraft instance
- set "I:computerSpaceLimit" to 0
- run this lua code again

For me the first time it errored "too long without yelling"
the second time was about 10 ms

From my tests:
- file 525 bytes long
- script copying it to new file 100 times
- 1st iteration - writing time 1.25 sec
- 20th iteration 2.6 sec
- 78th iteration - 4.95 sec
- 79th iteration - too long without yelling

It's not effecting reading time, tho.
I have idea why it's working like that, but it can't work like that.

Thanks for solving this issue!



#91017 netOS - first truly multitasking OS with real world networking build in(not yet)

Posted by grabie2 on 25 February 2013 - 05:53 AM in Programs

Thanks for your offer, but right now without at least basic knowledge of lua, you will not be able to test for me.



#84374 netOS - first truly multitasking OS with real world networking build in(not yet)

Posted by grabie2 on 06 February 2013 - 11:06 AM in Programs

Sorry for silence from my side, but I currently have a lot of exams in school and I can't keep up with coding netOS and studying. I have new multitasking code ready to be tested. I'll go back to working on netOS during next week or next weekend(about 14-17 February).I'll try to at least get new base code working in next week, but I can't promise anything. I won't leave this project it's great fun to make internet in CC, but it also is difficult task ;)
I'm looking forward to find someone who is good in lua and want to help me.



#81419 netOS development thread - first OS with "internet" build in.

Posted by grabie2 on 29 January 2013 - 05:56 AM in General

Currently I'm rewriting my multitasking and netOS file itself, I'm also planning to rewrite VTYs, so they'll behave a little bit batter

EDIT:
Currently I have working multitasking, from now eventListeners are gone! What will replace them? to os.pullEvent you could pass only one filter, however currently you're able to pass multiple filters!
I'm not pushing this to SVN right yet, cause OS itself isn't working, but probably I'll have it done on Monday.



#80146 netOS - first truly multitasking OS with real world networking build in(not yet)

Posted by grabie2 on 25 January 2013 - 06:07 AM in Programs

I've written an installer, It has all files in it, but can also download newest version from pastebin(asks if you have http enabled).
Also If you follow development thread, I have done IP layer of network(at least debugging version) now I'll improve multitasking, clean up my code and then I'll program UDP/TCP. Then I'll jump to making some kind of GUI.



#79399 Octree - Efficient way of storing, and querying 3D data

Posted by grabie2 on 23 January 2013 - 12:27 PM in APIs and Utilities

it's impossible, but you can have table of tables of tables ;)
For example:
local data = {}
local function set(x, y, z, value)
  if not data[x] then data[x] = {} end
  if not data[x][y] then data[x][y] = {} end
  data[x][y][z] = value
end
local function get(x, y, z)
  if not data[x] then data[x] = {} end
  if not data[x][y] then data[x][y] = {} end
  return data[x][y][z]
end

BUT that's less memory efficient and less impressive that one posted by mentlerd ;)



#79391 Simple Game Engine

Posted by grabie2 on 23 January 2013 - 12:17 PM in APIs and Utilities

Hello everyone!

Working only on netOS was very painful, so I decided to do something other. And I have for you simple, Object-oriented game engine.

For now It doesn't have much, but If you'll like it, I'll be adding mode stuff to that. For now there is basic Entity, MovableEntity and Game classes. I also have example for you, cause I don't feel like explaining all Object-oriented programming now.

Pastebin
Spoiler

If you guys like it please post suggestions what to add to if. From me I have in mind mouse menu system for games.

Screenshots will be when there will be something to show ;)

Keep in mind that it's not my main project, I'll work on it only when I get crazy programming netOS, you know looking for that one line that messes up all your code and doesn't even error it self(today situation) ;)

Thanks for feedback !



#79344 os.queueEvent - queuing tables

Posted by grabie2 on 23 January 2013 - 10:17 AM in Ask a Pro

Oww right, derp.
I looked at your code and somehow seen FILO queue, derp.
Sorry for that.
(Thread can be closed)



#79336 getting side on which rednet message arrived

Posted by grabie2 on 23 January 2013 - 09:55 AM in Ask a Pro

yea, I was just surprised that Lyqyd said that it's possible. As I said I used MAC addresses for identification and rednet.broadcast.

However thanks for reply!
(Thread can be closed)



#79334 os.queueEvent - queuing tables

Posted by grabie2 on 23 January 2013 - 09:52 AM in Ask a Pro

Thanks Eric, I thought that this is the case, but I used Lua only with C api, and that wasn't problem.
But instead of FILO queue that you shown I'll use FIFO, that'll be better for event queue ;)

Again thanks for quick response and help!
(Thread can be closed)



#79231 netOS development thread - first OS with "internet" build in.

Posted by grabie2 on 23 January 2013 - 07:21 AM in General

IP layer is working!
It's on SVN right now, so you can check it out.
Now I'll document everything, correct some bugs and wrong conceptions and then I'll program UDP(will be pretty easy) and after that TCP

Thanks for support!

Also I'm looking for someone to help me with that pretty difficult task, I need:
- printer driver (printing queue, page management, paper/ink management, API for it, user application[console], future printing over network, mapping network printers)
- beta tester
- someone to help programming GUI
- printer application for GUI that will be created



#79227 getting side on which rednet message arrived

Posted by grabie2 on 23 January 2013 - 07:15 AM in Ask a Pro

Oww, sorry I forgot about that thread.

@Lyqyd
I need to know which modem received data to make routing possible, but I done it program way - I check(in my OS that exist) MAC address of modem and one passed n packet. I'm not afraid of tricky things, how is it possible? I read rednet API couple times and I didn't find anything that could help.

Thanks for replies!



#79214 os.queueEvent - queuing tables

Posted by grabie2 on 23 January 2013 - 07:04 AM in Ask a Pro

I went into strange problem, when I queued event with strings and tables, in os.pullEventRaw it returned strings and ALL tables were nil. Could someone explain to me why it doesn't work, maybe there is a solution(I don't want to do textutils.serialize, sometimes tables contain functions WITH upvalues)

thanks for replies!



#79208 Monitor with wire?

Posted by grabie2 on 23 January 2013 - 07:00 AM in Ask a Pro

I don't know what exactly you mean, but you can have different monitors on different sides of computer.



#77559 netOS development thread - first OS with "internet" build in.

Posted by grabie2 on 20 January 2013 - 11:52 AM in General

I've got ARP working. I'll try to submit new SVN revision tonight. I think I'll be able to run basic IP tomorrow. Thanks for feedback and great support!



#76161 netOS - first truly multitasking OS with real world networking build in(not yet)

Posted by grabie2 on 18 January 2013 - 05:29 AM in Programs

I'm back from holidays, but tomorrow I'll get a new PC, you know moving stuff and all that. I think that at weekend I'll be able to release first networking things, but no TCP/UDP yet.

Also on new PC I'll be able to test network on over 10 000 CC computers, and I definitely will be trying that ;) BUT first things first, so IP layer, TCP/UDP and then debugging application.

@PixelToast
Why not DHCP? It will make configuration of network A LOT easier.

Also BIG thanks for support, I didn't expect that much posts when I'm on holidays.



#73025 netOS - first truly multitasking OS with real world networking build in(not yet)

Posted by grabie2 on 12 January 2013 - 10:23 AM in Programs

yea, It is ;)
BUT in future there will be dedicated mod(CC addon) for netOS and there will be proxy betweeen CC and Internet



#72560 netOS - first truly multitasking OS with real world networking build in(not yet)

Posted by grabie2 on 11 January 2013 - 02:19 PM in Programs

I'm saying that you need to build your own computer network out of CC computer with netOS installed(when it's ready) to make it work.

You will need at least DNS server and "irc" server, all will be included ;) However you can run them on one computer, even you can connect using "telnet" to yourself ;) Like in real Internet, but out of CC computers

OK, I'm going to sleep in 5 hours I'm leaving :D
Hope now you got it.
I'll be back in a week.



#72536 netOS - first truly multitasking OS with real world networking build in(not yet)

Posted by grabie2 on 11 January 2013 - 01:08 PM in Programs

you can telnet to another computer in minecraft, but there will be software like proxy to real network(in faaaaar future)

if irc.opera.com will be pointing to IP of computer that listens on port 6667, then you will be able to run that command ;)



#72504 Need suggestions for high quantity of signals

Posted by grabie2 on 11 January 2013 - 12:01 PM in Ask a Pro

I think that he wants to make refreshing screen like real world, so like this
1st step - all lines off but first
2nd step - all lines off but second
and so on

That way he can have one bundled cable to select line and second(or more) to control pixels.
But I think, that this will be impossible in minecraft, cause it will be flickering like crazy(due to tickrate - only 20 per second).
BUT you can make memory for screen and use it like a buffer, then you'll be able to make something like below:
- set memory row to 0
- set output cables to value
- set write bit to memory
- reset write bit to memory

- set memory row to 1
- set output cables to value
- set write bit to memory
- reset write bit to memory
and so on



#72416 netOS development thread - first OS with "internet" build in.

Posted by grabie2 on 11 January 2013 - 10:19 AM in General

I'm leaving for about a week for winter holidays, so development will be suspended for that time.

Currently I have few bugs with ARP, it's not receiving packets, or sending them incorrectly, or even doesn't have proper interface table
IP protocol is untouched for now.
so status for now is 40% IP/70% ARP



#72376 netOS - first truly multitasking OS with real world networking build in(not yet)

Posted by grabie2 on 11 January 2013 - 08:37 AM in Programs

OK, I've got another screen-teaser, this time network configuration ;)
Posted Image



#72316 netOS - first truly multitasking OS with real world networking build in(not yet)

Posted by grabie2 on 11 January 2013 - 05:23 AM in Programs

yea, I'm big Linux fan, but mainly windows developer ;)

EDIT:
Little tease about dialogAPI(yea I know Linux 'dialog' program :D)
Posted Image



#72312 netOS - first truly multitasking OS with real world networking build in(not yet)

Posted by grabie2 on 11 January 2013 - 05:13 AM in Programs

In Poland we have winter holidays and I'm leaving for about a week. Some status update - I have about 60% of IP functionality, so when I'll be back, I'm going to end this ASAP and release it. In meantime I will need someone to test multitasking, and VTYs.