Jump to content


Kingdaro's Content

There have been 22 items by Kingdaro (Search limited from 29-March 23)


By content type

See this member's

Sort by                Order  

#205157 What Do You Look For in a Programming Language?

Posted by Kingdaro on 04 February 2015 - 11:02 PM in General

Personally, I like a language to have enough constructs to allow a variety of things to get done, but not so much so as to overload the user with a bunch of syntaxes they need to learn to do anything with it. Pretty much what Lua does.



#204329 What's with the lack of new pocket programs?

Posted by Kingdaro on 28 January 2015 - 04:41 AM in General

The problem is in the general usefulness of PDAs, in that... they aren't really useful. 90% of the time, just carrying around a computer with a wireless modem will accomplish everything you can do with a PDA. Obviously doing it this way is clunky as hell and not nearly as convenient (which is why they were implemented, I imagine) but in terms of usability, there just isn't much reason to have a PDA at all, and there's not much a PDA can do that a normal computer can't. The only difference is in convenience.

The best way I can think of to give PDAs an actual purpose is being able to view the screen without focusing on the device, like you can with maps. This has probably been suggested once or twice before, and I haven't dug into the mod as of recent, but things like this would actually make PDA programs relevant.



#174394 Dye-able pda's

Posted by Kingdaro on 19 April 2014 - 04:29 PM in Suggestions

You have no idea how much I'd love a black PDA.



#173847 [Help Neede] Trying to revamp a script for CC 1.62

Posted by Kingdaro on 17 April 2014 - 02:38 AM in Ask a Pro

I feel like an easy and more sensible workaround would be to simply store your tables in one table.



#173087 Lua: What would you change?

Posted by Kingdaro on 12 April 2014 - 11:43 PM in General

I don't agree. Functions are a value type, and defining a function that way is the same as "test = function(str) print(str) end". By that logic,
print(var)
var = 5
would work, when obviously it shouldn't as var hasn't been defined yet.



#173085 The Anime Topic

Posted by Kingdaro on 12 April 2014 - 11:32 PM in General

Sakurasou or GTFO. :P



#172191 Normal to advanced computer upgrade

Posted by Kingdaro on 07 April 2014 - 05:46 AM in Suggestions

I think it's fairly reasonable for it to keep its label. Losing its label would be equivalent to me upgrading my graphics card IRL and somehow getting my HDD wiped.



#172119 Window API error checking

Posted by Kingdaro on 06 April 2014 - 08:11 PM in Suggestions

I definitely support this. Having to check the API for the error in your program is the worst.



#171940 Shouldn't turtle.getFuelLevel() return math.huge (infinity) when fuel is...

Posted by Kingdaro on 05 April 2014 - 09:10 PM in Suggestions

Likewise, turtle.getFuelLimit() would also return math.huge. This would pretty much remove the need for checks against the current return, "unlimited", as the common check of "if turtle.getFuelLevel() == 0 then" would return false, but also "< 1" or "< someOtherNumber" wouldn't fail with a string comparison error.



#171363 Thoughts on Lua 5.3

Posted by Kingdaro on 02 April 2014 - 10:29 PM in General

View Postardera, on 02 April 2014 - 03:36 PM, said:

I don't understand that: you're saying one of lua's philosophies is a minimalized syntax, but isn't num >> bitstoshift much more minimalized than calling bit32.brshift(num, bitstoshift)?
Minimalism is not equivalent to less typing. Minimalism is simply using one of lua's provided constructs, a function, instead of hardcoding a syntax into the language, a new construct. It's the same as splitting the table type into an array, a hashmap, and other data structures, which is stupid when a table does the job of all of these nicely.



#170991 Thoughts on Lua 5.3

Posted by Kingdaro on 01 April 2014 - 05:51 AM in General

That reminds me, wouldn't they have to add like 6 new metamethods to accommodate the operators?



#170771 Thoughts on Lua 5.3

Posted by Kingdaro on 31 March 2014 - 01:20 AM in General

View PostShazz, on 31 March 2014 - 01:15 AM, said:

I agree, I think +=, -=, ++, --, ..= (or .= ?) are pretty much essential.
I'd be fine without ++ and --, as += 1 and -= 1 is good enough, as well as /= and *= of course.

View PostSymmetryc, on 31 March 2014 - 01:17 AM, said:

.= should work like this:
local a = {
  b = 5;
}
a .= "b"
print(a) --> 5
Just like how a.b would return 5 :D/>.
Interesting idea, but incredibly screwy, lol.



#170768 Thoughts on Lua 5.3

Posted by Kingdaro on 31 March 2014 - 01:07 AM in General

View Postimmibis, on 31 March 2014 - 01:03 AM, said:

How are bitwise operators related to assignment operators, apart from both being operators?
Because the former is something a lot of people I'm sure have wanted as a feature in Lua, and last I checked, minimal syntax was one of Lua's philosophies. Why suddenly break it? What makes bitwise operators so special? Was the bit32 library not enough?



#170765 Thoughts on Lua 5.3

Posted by Kingdaro on 31 March 2014 - 12:55 AM in General

I find it kind of silly that they're adding bitwise operators but not assignment operators (+=, -=, etc.). That and the whole float/int differentiation.



#170303 term.redirect() to a variable

Posted by Kingdaro on 28 March 2014 - 10:20 PM in Suggestions

I don't see how
local foo = ""
term.redrect(stuff)
term.write("bar")
local foo = {}
term.redirect(foo)
term.write("bar")

is better than

local foo = "bar"
local foo = {}
table.insert(foo, "bar")

Unless I'm misunderstanding the suggestion. What would be the use of this?



#170170 disk.getColor()?

Posted by Kingdaro on 28 March 2014 - 01:00 PM in Suggestions

Disk colors are purely a cosmetic property of disks and should only be treated as such.



#166516 Craftbang - Multitasking Desktop Environment

Posted by Kingdaro on 01 March 2014 - 01:08 AM in Operating Systems

Sure! It wouldn't be your OS without your own personal touch, now would it? :P



#166400 Craftbang - Multitasking Desktop Environment

Posted by Kingdaro on 27 February 2014 - 10:14 PM in Operating Systems

Sure, go ahead.

And I'll go ahead and put a clear in the OP for anyone else who's interested in doing the same.



#166038 XLogin - The fast login program!

Posted by Kingdaro on 24 February 2014 - 06:12 AM in Programs

View PostHellkid98, on 24 February 2014 - 05:55 AM, said:

Well that is very insecure if they don't hash the password before storing it into a file, It would also be good to override some fs functions to completly hide the password file and make it as secure as possible, But still make sure you can access the file.
Tips: If you would override a function it would be this
fs.list
This solution is outside the scope of the OP's problem.



#166031 XLogin - The fast login program!

Posted by Kingdaro on 24 February 2014 - 03:47 AM in Programs

View PostDeath, on 24 February 2014 - 12:48 AM, said:

Not really a fs tutorial, I use the wiki/IRC for all needed information c:
I use dofile('.password') where .password is:
login = 'herp'
pass = 'derp'
c:
That's kind of unsafe. By doing that, the variables "login" and "pass" are both thrown into the global namespace for any program to access just by doing "print(login, pass)".

A better practice would be to read the file and store the values directly, line by line for example.

Password file:
herp
derp

Program:
local file = fs.open('.password', 'r')
local login = file.readLine()
local pass = file.readLine()
file.close()



#165418 The String API is VERY confusing

Posted by Kingdaro on 19 February 2014 - 12:50 PM in Ask a Pro

What you would do is create a new table, go through each letter in your string, then insert each letter one by one into the new table.
word = "ABCD"
letters = {}

for i=1, string.len(word) do -- loop, start at 1, go to the length of "word"
  letters[i] = string.sub(word, i, i) -- in each loop, insert the ith letter into the letters table
end



#163874 Where is the problem ?

Posted by Kingdaro on 06 February 2014 - 02:07 PM in Ask a Pro

The first line should say "os.pullEvent = os.pullEventRaw" and not "os.pullEvent = os.PullEventRaw".