Jump to content


Orwell's Content

There have been 432 items by Orwell (Search limited from 10-February 22)


By content type

See this member's


Sort by                Order  

#159027 [1.6.4] TechValley ComputerCraft Server

Posted by Orwell on 02 January 2014 - 02:13 PM in Servers

The server seems to be down, I hope this is temporary...



#158651 [1.6.4] TechValley ComputerCraft Server

Posted by Orwell on 31 December 2013 - 09:30 AM in Servers

Hi, I'm interested in playing ComputerCraft again and I love the charm of a pure CC-server. :) It would be nice to be added to your whitelist.
IGN: this_is_1984



#148160 [1.6.4/1.57][creative][whitelist] "[a][p][i]" - The One Of A Kind

Posted by Orwell on 06 October 2013 - 06:34 PM in Servers

IGN: this_is_1984
How much would you rate yourself as a person (1/10): 5.5 (I guess I'm average as a person)



#148154 Lua Code Golf

Posted by Orwell on 06 October 2013 - 06:09 PM in Forum Games

View PostSymmetryc, on 06 October 2013 - 05:49 PM, said:

* snip *
That doesn't seem to be entirely true, 'nil or nil' yields nil. Where nil does make a difference is in the case of 'false or nil':
x = 1==2
y = x --# or nil
Of course, in the case of the golf submission, b is only used in the conditional statement 'if b then' so it wouldn't matter in this particular example.
But you are right about it having a use. I didn't realize that. :)



#148152 Lua Code Golf

Posted by Orwell on 06 October 2013 - 05:39 PM in Forum Games

View Postkreezxil, on 06 October 2013 - 11:43 AM, said:

View Postbentallea, on 06 October 2013 - 10:09 AM, said:

this is for the turtle goto challenge
instructions:
  • place turtle facing west
  • insert fuel into any slot
  • run goto(x,y,z,)
NOTE: if there is any data in b then the coordinates are assumed global. leave b out of the function if the coordinates are relative to the turtle.
Spoiler
total length: 447 characters without whitespace
this program won't run it's only a function, You need the interface code for parsing the command line. it's character count will be more than 447. At minimum you will need this at the end of the program to make it functional:
a={...}
goto(a[1],a[2],a[3],a[4] or nil)
Also there is an error on line 1 of your function() you have 'B' and not 'b'. Remember variables are case sensitive. With my addition to make your goto function an actual program for the competition valid your total character count comes to 476!
I do agree with theoriginalbit on this matter. But besides that, you only need to add 9 characters if you insist on it being a program:
goto(...)
This keeps the count at 456 which is a lot less than your addition.

And why would you ever do this?
a[4] or nil
It's like doing '1+0'. :P



#134612 Programming Jokes [Nerds Only :p]

Posted by Orwell on 19 July 2013 - 06:29 PM in General

View PostZudoHackz, on 19 July 2013 - 10:14 AM, said:

Spoiler

Would your IT teacher accept this for detention?
No, he wouldn't due to lack of indentation. :P



#134074 CC-copy -- Your solution to servers without HTTP API

Posted by Orwell on 17 July 2013 - 07:18 AM in APIs and Utilities

View PostAliveGhost, on 16 July 2013 - 05:32 PM, said:

Hey,

It all seems to be running okay, apart from it says "Couldn't open file 'desktop\mainprog'. How can I get the cmd to open it?

Cheers,
AliveGhost
What exact command you're running? I might be able to help you better that way. The trick is to use the full path name in between quotes. E.g.:
CC-copy.exe "C:\Users\username\desktop\mainprog"



#133006 Who will get GTA V?

Posted by Orwell on 12 July 2013 - 07:17 AM in General

This source says:

Quote

The Grand Theft Auto V Special Edition includes:
  • Full retail copy of Grand Theft Auto V
  • Collectible SteelBook with Exclusive Artwork This special SteelBook features double-sided, never-before-seen artwork of Michael, Trevor and Franklin. Custom color and metallic treatments bring out the detail of the artwork created exclusively for this SteelBook.
  • Blueprint Map This exclusive, additional 21.5” x 26.75” map displays a blueprint view of Los Santos and Blaine County. Cryptic markings indicate locations for fast cash and other points of interest for the up-and-coming entrepreneur.
  • Special Ability Boost Michael, Franklin and Trevor each have a unique special ability. With this boost, the special ability bar will generate 25% faster.
  • Stunt Plane Trials Single player Stunt Plane Trials let you take on additional aerial challenges spread throughout Los Santos and Blaine County.
  • Bonus Outfits, Tattoos and More Michael, Franklin and Trevor get bonus outfits in their wardrobes, character specific tattoos at tattoo parlors, and special deals from shopkeepers across Los Santos and Blaine County.
  • Additional Weapons When visiting Ammunation stores in single player, merchants will have special weapons in their inventory available for free: the Pistol .50, Bullpup Shotgun and melee Hammer.
It was the first hit on Google. They're also mentioning a GTA V Collector's Edition.



#130488 [C++] My first program!

Posted by Orwell on 30 June 2013 - 06:33 PM in General

The Easter Egg was easy to find by just browsing through the data segment of the executable.
Also, your program behaves somewhat strange when using Wine on Ubuntu. Not sure if it's Wine or the program... But the clock isn't working for me, it sort of restarts the program.



#129364 TorVerse - A Work In Progress

Posted by Orwell on 26 June 2013 - 08:04 AM in General

I use Linux all the time. And he said he's using DirectX which uses Direct3D for 3D graphics, so there's no need for using OpenGL.



#129062 About Linux

Posted by Orwell on 25 June 2013 - 08:34 AM in General

View PostShadowedZenith, on 25 June 2013 - 08:24 AM, said:

In my experience, it's very difficult to use. If you like using a tablet-like interface on a desktop, then by all means, go with Ubuntu. If you'd rather use a traditional desktop, use Linux Mint where at least you get your choice of window managers.

Either way, I don't see why you'd rather go with Ubuntu when you can get Linux Mint. Like I said before, Linux Mint is a fork off of Ubuntu to begin with, so they're able to use mostly the same packages are each other (except maybe in some rare, freak case). Linux Mint has a bit more freedom with it.

Also, wasn't Ubuntu adding in like advertisements and stuff into Unity? I could have sworn that they were sending unencrypted searches to Amazon or something like that when you searched your own computer/desktop.
The only tablet kinda thing on ubuntu is the sidebar. And I simply run the Cinnamon window manager on my Ubuntu installation, so I have no trouble with that. I wouldn't stay away from Ubuntu for unity only, there are much more important differences between distributions.



#128128 [artificial neural network - ANN] - Is it posible to do ot in CClua?

Posted by Orwell on 21 June 2013 - 05:56 PM in General

Of course it is. Neural networks are merely a mathematical model. It should be able to implement this in practically every programming language.



#125619 Generate numbers from strings

Posted by Orwell on 12 June 2013 - 08:05 AM in Ask a Pro

View Posttheoriginalbit, on 12 June 2013 - 08:00 AM, said:

View PostOrwell, on 12 June 2013 - 07:54 AM, said:

But for the record: it's textutils.deserialize and not textutils.unserialize.
Its what now? Is this a troll or just a `moment`? textutils.
It was a very weird moment. :P I changed my post allready. My brain must have been malfunctioning..



#125615 Generate numbers from strings

Posted by Orwell on 12 June 2013 - 07:54 AM in Ask a Pro

View Postsuperanonymous, on 12 June 2013 - 07:46 AM, said:

I am sending a table over rednet. I am using textutils.seialize and unserialize but whenever it downloads the table it acts as if it isn't declared.
We need code, your description of the problem is extremely vague. But for the record: it's textutils.deserialize and not textutils.unserialize. (Where did I get that from? The wiki says I'm wrong.)



#125415 Protecting a text file or folder with Password

Posted by Orwell on 11 June 2013 - 09:37 AM in Ask a Pro

View PostImque, on 11 June 2013 - 07:36 AM, said:

The best way of doing this is just to hash any passwords stored.
Password storage isn't really the topic here though. :/



#125414 Regex description

Posted by Orwell on 11 June 2013 - 09:36 AM in Ask a Pro

View Posttheoriginalbit, on 11 June 2013 - 08:49 AM, said:

View PostOrwell, on 11 June 2013 - 06:44 AM, said:

This is a updated version of yours:
local config = fs.open("file", "r")
local sFile = config.readAll()
local something = sFile:gmatch("something = (%S+)")() -- %S matches every character except for space characters
print(something or "No match has been found!")
I would say that you would still want to for loop so that it gets the last copy of the match, not the first, or of course you should be able to use the `$` in the pattern.
Indeed. I understood from the OP that he doesn't really have a use for this but rather wants to know what's going on. So I tried breaking it down a little and I left some parts out.



#125381 Regex description

Posted by Orwell on 11 June 2013 - 06:44 AM in Ask a Pro

It will find a portion in the file that reads 'something = abcdef' where abcdef is any sequency of characters with a length greater than one. The brackets mean that only the abcdef part will be extracted and that the function will only return that value. So for each instance of 'something = xxsomestringxx', the variable 'a' will equal 'xxsomestringxx'. In each iteration of the loop a will be assigned to the variable something. So eventually something will equal the value from the last match in the file and will be nil if no match has been found.

Edit:
LBP is right, there are some other issues with the code. You don't need to loop through the lines of the file and obviously you need to pass the content from the file to string.gmatch. This is a updated version of yours:
local config = fs.open("file", "r")
local sFile = config.readAll()
local something = sFile:gmatch("something = (%S+)")() -- %S matches every character except for space characters
print(something or "No match has been found!")

Now if you have a file on your computer named 'file' that has this content:
This is a file with some stuff in.
foo = bar
something = foobar
me ~= you



#125376 Protecting a text file or folder with Password

Posted by Orwell on 11 June 2013 - 06:23 AM in Ask a Pro

View PostEngineer, on 11 June 2013 - 02:25 AM, said:

There is nothinf wrong with pingeleon's solution, however, I wanted to add that it is hard to to make it possible without having two computers.

Also, you are quoting me lately a lo, may I ask why?
No idea, probably same time zone, so your posts are a lot at the top for me? I really didn't notice, I've been posting more often lately so maybe other people are thinking the same. :P No need to feel targetted, it's not like that. :) Anyway, it's equally secure to use encryption between the two computers (probably even more secure). And if securing files is all you want you really don't need to change anything to api methods or anything.

Let's say you want to send a file from client to server. Then you encrypt it on the client using a password as the key, next send it over rednet to the server. The server stores it encrypted. Then the client can ask to fetch it again, it will still be sent encrypted over rednet. Then the client will be prompted for the password so the file can be decrypted again.



#125375 coord into name on say command

Posted by Orwell on 11 June 2013 - 06:18 AM in Ask a Pro

View PostSirDiggalot, on 11 June 2013 - 04:02 AM, said:

View PostXenthera, on 11 June 2013 - 12:46 AM, said:

View PostOrwell, on 11 June 2013 - 12:46 AM, said:

* snip *

Yeah, except
[@]Xenthera:
Xenthera:

They're pretty distinguishable. Plus, when it sends a message, it can return to the server the computer's coordinates. That can also help in tracking who is using the computer. At least maybe. Besides it would be no different than spamming with the current block, would it?

Plus, I don't know if it already exists, but there could be a block limit, (say 64 or something) so it would only bother people within a 64 block radius.
there is a block limit set in one of the parameters of the say command, but if you omit the parameter, then it is an infinite range (I think). and since coding is so epic, you could probably prevent the computer taking even the resemblance of a players name.
My point is that it's not enough to make it distinguishable, but it should also be obvious to newbies that this is a program talking and not a player. And spamming would be totally different than framing someone else for something. Anyway, block limit sounds like a decent thing to make configurable by default (in the server config that is).



#125338 Post your desktop!

Posted by Orwell on 10 June 2013 - 09:54 PM in General

View PostETHANATOR360, on 10 June 2013 - 07:35 PM, said:

i really need to change my background http://imgur.com/p1tSNJv
So... You have the Ubuntu logo as avatar because it's pretty? :D



#125337 [Turtle] Schematic File Builder

Posted by Orwell on 10 June 2013 - 09:49 PM in Turtle Programs

View PostVas, on 10 June 2013 - 09:45 PM, said:

View PostOrwell, on 10 June 2013 - 09:10 PM, said:

No you change one 9 too many
Huh, so what did the 9 I change affect? xD My turtle seems to be running fine right now. I'll go stab it with a knife and give it a new code. I wish I could delete programs from it's list.
In command-line:
rm programName
;)
You changed the code for a list in the NBT data. But I don't think the schematic files use lists, so you had luck. ;)
Oh yeah, what I meant to say earlier. If there are more than 16 materials needed.. Just returning to a chest for the next materials wouldn't be so handy because you can't know what item is which. The automatic refill would work because the turtle can always keep one of each item, thus sucked items from the chest would append to the allready loaded items.



#125336 coord into name on say command

Posted by Orwell on 10 June 2013 - 09:45 PM in Ask a Pro

View PostXenthera, on 10 June 2013 - 09:32 PM, said:

View PostOrwell, on 10 June 2013 - 08:55 PM, said:

View PostXenthera, on 10 June 2013 - 08:30 PM, said:

I think RG could easily change it to the computer's Label... Seems more practical IMO.
The issue is that it makes spoofing of other player's names possible. You don't want a computer be spamming the chat in the name of the owner, do you?
Fair enough. However it would have the @ sign in front of it and be italicized. So it would obviously not be mistaken for the real owner, or whoever. I don't really see it as THAT big of an issue.
We'll see when you get banned from a server because I start trolling like hell with your username. :P The prefix idea is ok. It might be better to make it even more obvious for the more naive people out there, but it could work.



#125332 Unknown failure in code and while not give a reason

Posted by Orwell on 10 June 2013 - 09:29 PM in Ask a Pro

View Postcommanderbass, on 10 June 2013 - 09:22 PM, said:

* snip *
As suggested, change:
while x=300 do
to:
while x==300 do

You use '==' for comparisons.



#125328 [Turtle] Schematic File Builder

Posted by Orwell on 10 June 2013 - 09:10 PM in Turtle Programs

View PostVas, on 10 June 2013 - 12:39 AM, said:

One issue I had when I downloaded a schematic, is it had like 40 different block types in it so I couldn't do that with the limited 16 slots. :P Maybe something that will attempt to place all blocks in a level, if some weren't there it can pull from a chest what it needed replacing slots and such? THough that's getting much more complex I bet. :P

http://pastebin.com/789upkpX - is this correct? For the use of 16 slots. I don't know programming of any kind so I wouldn't know if I was right or not. I changed 2 9s into 16 and left the others alone since they didn't seem to be part of the code, were more like block IDs.
Oh, I didn't know that. No you change one 9 too many (it was a code from the NBT format) and you missed a 'n>0 and n<10' which checked that the slot was in between 0 and 10.
Here is the a correct adaption: http://pastebin.com/RAztRaLH



#125327 [CC 1.51 | MC 1.5.2] Scanner Peripheral v0.4

Posted by Orwell on 10 June 2013 - 09:01 PM in Peripherals and Turtle Upgrades

View PostScript Kiddie, on 10 June 2013 - 04:04 AM, said:

can i use this peripheral with printer? so i can duplicate a printed paper :)
and please add a video to use the scanner add an example program for it
thanks
Yes, you can use it with the printer. Usage is in the OP. If you can't read that, a video won't do you much good either.

View Postccbad, on 10 June 2013 - 01:10 PM, said:

You know what would be a good implementation of this? Making a fax machine. scanner and a printer hooked up to a computer, run, say, fax. scan. Sends through rednet via wired, wireless or immubus LAN cables. prints out page on other computer. Now all i need is to figure out how to code it....
I've seen people do it before (quite often actually), so it is possible. :) Have fun coding that! Also (shameless self-promotion): http://www.computerc...rinter-api-mcp/