Jump to content


tesla1889's Content

There have been 49 items by tesla1889 (Search limited from 10-February 22)


By content type

See this member's


Sort by                Order  

#168210 cclint - lua linter with cc-specified features

Posted by tesla1889 on 15 March 2014 - 03:08 PM in APIs and Utilities

http://en.wikipedia...._%28software%29

pretty ambitious from what i've read
i'm glad someone has implemented this



#166488 Hosting Blank Webpage

Posted by tesla1889 on 28 February 2014 - 08:38 PM in Ask a Pro

use a host which allows you to use server-side scripting, such as php

write via http://www.your-url....data=some_value
read via http://www.your-url....some_identifier

then, in script.php, get the input and generate the appropriate response html



#164834 Rednet Problems

Posted by tesla1889 on 14 February 2014 - 10:31 AM in Ask a Pro

in the first code block, why do you call os.pullEvent("rednet_message") the first time?

also, in the second block, you never update ev, id, msg, and dist in the while loop

Edit: in the first block, you're missing the event variable when you call os.pullEvent. even if you specify an event to pull, os.pullEvent returns the event first, before the parameters



#164800 CC Operating Systems and their uses

Posted by tesla1889 on 13 February 2014 - 10:17 PM in General

i think most of it is the psychological boost writing a graphic shell gives inexperienced programmers. basically, it reduces the true art of operating system design and implementation to that of a really simple windowed program that interacts with other programs in a specific way.

it all pretty much started when someone wrote a desktop environment for CC and called it an "OS"



#164463 Read Metadata from block next to computer or turtle

Posted by tesla1889 on 11 February 2014 - 10:23 AM in Ask a Pro

you're going to have to do this in Java (i.e. use a mod or write your own).
there currently is no way to read NBT data from computercraft.



#163062 How would you simulate a programming language in the language Lua?

Posted by tesla1889 on 02 February 2014 - 02:10 AM in General

ChunkSpy is a Lua assembler/disassembler which converts Lua source code to Lua bytecode and back, using an intermediate assembly-like language. The most powerful/efficient method would be compiling to assembly, then assembling to bytecode. ChunkSpy has some interesting methods for the second part.

Plus, if you implement it with an intermediate assembly-like language, it would be easier to decompile to the source code again (unless it was obfuscated).



#159690 What has your first OS?

Posted by tesla1889 on 07 January 2014 - 08:45 PM in General

View PostDog, on 07 January 2014 - 01:50 PM, said:

View Posttesla1889, on 07 January 2014 - 01:28 PM, said:

View PostDog, on 06 January 2014 - 10:47 PM, said:

First OS I remember seriously using was on my Apple ][+.

really want to try one of those. too expensive nowadays for what ya get.
I imagine working specimens would be rather pricey considering their age alone. Somewhere in a box in my garage I still have my ][+, a //c (semi-portable), and my friend's old //e - can't imagine selling them, though. Making the switch to PC was a shocker - DOS was weak, basic wasn't 'built-in', nor was an assembler interface, and 8.3 file-names were restrictive...but Windows was interesting, the machine had more than 40x the amount of RAM of my ][+, and gaming at 1024x768 in 256 color at 15+ fps was pretty awesome :)

switching away from unix to dos-based is a really painful direction though. such a bad development philosophy.



#159687 My OS

Posted by tesla1889 on 07 January 2014 - 08:35 PM in General

why mimic such a horribly-designed OS? unix is much more reliable, safe, and powerful



#159637 What has your first OS?

Posted by tesla1889 on 07 January 2014 - 01:28 PM in General

View PostDog, on 06 January 2014 - 10:47 PM, said:

First OS I remember seriously using was on my Apple ][+.

really want to try one of those. too expensive nowadays for what ya get.



#159418 I'm new; I need some help. Hi!

Posted by tesla1889 on 05 January 2014 - 04:30 PM in Ask a Pro

http://www.computerc...?showtopic=2674
http://computercraft.../wiki/Main_Page
http://computercraft.../wiki/Tutorials

Edit: sorry if I seem terse: the general mentality around here is to provide links to documentation and examples, then answer questions to specific errors once code is written



#159339 Getting key events in CC 1.3

Posted by tesla1889 on 05 January 2014 - 04:47 AM in Ask a Pro

is this the exact code you're using?
because if so, it's complaining about
if key == 28 then
for some reason

also, wouldn't you want to wrap the last two lines in a while true loop?



#159337 CCTV, ComputerCraft TV Reborn Update w/ Extras

Posted by tesla1889 on 05 January 2014 - 04:40 AM in Programs

View PostZudo, on 01 January 2014 - 08:02 AM, said:

CCTV = Closed Circuit Television?

dɹǝp

so would a computercraft closed-circuit television be CCCCTV?



#159084 What has your first OS?

Posted by tesla1889 on 03 January 2014 - 02:36 AM in General

xubuntu? the xubuntu that was first released in 2006?



#159071 which programming language's syntax do you like the best?

Posted by tesla1889 on 02 January 2014 - 11:52 PM in General

View Post6677, on 02 January 2014 - 07:25 AM, said:

You want object orientated C but hate the C++ syntax (which is a logical thing to do), Objective-C. One neat thing is that Objective C is a strict superset of C, which is to say that C is also valid Objective-C, the same does not apply to C being valid C++.

if there's a language that bothers me almost as much as C++, it's Objective-C, for the same reason. wtf is up with all the plus and minus signs?



#158956 What Other Languages Do You Program In?

Posted by tesla1889 on 02 January 2014 - 06:26 AM in General

the language which gets the job done

usually C or Python will do the trick



#158953 which programming language's syntax do you like the best?

Posted by tesla1889 on 02 January 2014 - 05:22 AM in General

C++ is one of the most annoying IMHO
cout << "<- wtf kind of syntax is this???\n";

i love C and FORTH syntax.

actually, if Lua used bracket notation instead of 'end's and had a switch statement, it'd be my favorite.



#158950 What has your first OS?

Posted by tesla1889 on 02 January 2014 - 05:18 AM in General

mac os 8
just barely though. os 9 came out a few months later



#158397 FileServ - File Storage Client-Server

Posted by tesla1889 on 28 December 2013 - 10:49 PM in Programs

you should split the files into packets so that people arent sending huge files at once across servers



#158396 Qcraft

Posted by tesla1889 on 28 December 2013 - 10:45 PM in General

inb4 requests for quantum computers or some BS like that



#158006 Attempt to perform arithmetic __add on number and nil

Posted by tesla1889 on 25 December 2013 - 02:46 AM in Ask a Pro

tonumber is returning nil because it received a string that was not a serialized number

try print(m:sub(1,1)) instead to debug



#155029 ComputerCraft teaching programs

Posted by tesla1889 on 03 December 2013 - 07:16 PM in Ask a Pro

well, the debugger is pretty useful.
error messages are too, but sometimes they lead back to the API they came from rather than your program.

as with everything, nothing beats experimentation.
just program something with the expectation that you are going to fail the first hundred times.
no professional developers get it right on the first build either.



#154094 get function from coroutine

Posted by tesla1889 on 25 November 2013 - 10:32 PM in Ask a Pro

i would like to implement the UNIX fork function:
function fork()

local C = coroutine.running()

local F = someMagic(C)

local C_child = coroutine.create(F)

passCoroutineBackToScheduler(C_child)

end

or something similar such that one simply has to call fork to branch into two coroutines



#154076 get function from coroutine

Posted by tesla1889 on 25 November 2013 - 05:36 PM in Ask a Pro

say there is a coroutine C created from the function F:
C = coroutine.create(F)
is there any way to get the function F, given only the coroutine C?



#148216 See - Standard Execution Environment

Posted by tesla1889 on 07 October 2013 - 12:19 PM in APIs and Utilities

for future reference, __gc is only called if the metatable describes a userdata value.
for example, FileInputStream will not call __gc when the object is garbagecollected.\
__gc is pretty much pointless in CC, unless you're writing a mod or dan200 is using a non-standard version of lua



#142980 Update Check

Posted by tesla1889 on 02 September 2013 - 12:00 PM in Ask a Pro

create a custom header system and put all of the metadata at the top:
--[[
Program Name
version:
release:
patch:
--]]

then, parse the download for the version, release, and patch numbers to check if you need to update