How To Wiki:Chat/Logs/13 November 2013

 [08:43]  Working? Awesome [10:54]  test [10:54]  ok I'm still on [10:54]  I log the chat [10:54]  you are never alone... [11:03]  Jesus [11:05]  hey [11:05]  wassup...friend [11:05]  Hi [11:05]  I broke my computer [11:05]  With a C++ program [11:05]  Really? [11:05]  it was fun [11:05]  DL Link? [11:06]  No DL [11:06] <Mr ChatBot> but I can post source code [11:06] <SmokedSausage> Wait, I can't execute .exe files [11:06] <Mr ChatBot> source code here: [11:06] <SmokedSausage> I don't have a C++ compiler for linux tho [11:07] <SmokedSausage> If it was Java it'd be a different story [11:07] <Mr ChatBot> #include "stdafx.h" [11:07] <Mr ChatBot> #include &lt;stdio.h&gt; [11:07] <Mr ChatBot> #include &lt;string&gt; [11:07] <Mr ChatBot> using namespace std; [11:07] <Mr ChatBot> [11:07] <Mr ChatBot> void main{ [11:07] <Mr ChatBot> string myarray[1]; [11:07] <Mr ChatBot> printf("%s", myarray[1]); [11:07] <Mr ChatBot> } [11:07] <Mr ChatBot> [11:07] <Mr ChatBot> i simply print an out-of-range array [11:07] <Mr ChatBot> which the computer freaks out over [11:07] <SmokedSausage> You broke your computer...with an array? [11:08] <SmokedSausage> Oh I get it now [11:08] <Mr ChatBot> it throws out all these exception break stuff and more complex source code for a bootstrap I think... [11:08] <Mr ChatBot> :/ [11:08] <SmokedSausage> Why does it still compile an out of range array tho? [11:08] <Mr ChatBot> what would the Java equivalent be? [11:09] <Mr ChatBot> and IDK why it compiles [11:09] <SmokedSausage> IDK I know very little java [11:09] <Mr ChatBot> I have the smilebasic equivalent [11:09] <SmokedSausage> I will have to look, I do beleive i know the Javascript equivelent tho [11:09] <Mr ChatBot> DIM ARRAY[1] [11:09] <Mr ChatBot> ?ARRAY[1] [11:09] <Mr ChatBot> [11:09] <Mr ChatBot> done [11:09] <SmokedSausage> Yep [11:10] <Mr ChatBot> arrays in SB can use or [] [11:10] <Mr ChatBot> like ARRAY(1) or ARRAY[1] [11:10] <Mr ChatBot> I like brackets [11:10] <SmokedSausage> No curly brackets? It makes code look more intresting [11:10] <Mr ChatBot> i &lt;3 {} [11:10] <Mr ChatBot> curly brackets are amazing [11:10] <Mr ChatBot> { [11:10] <Mr ChatBot> } [11:10] <Mr ChatBot> is teh best [11:11] <Mr ChatBot> the* [11:11] <SmokedSausage> Curly brackets make code look more complex imo [11:11] <SmokedSausage> Although make things easier in oblect oriented programming [11:11] <Mr ChatBot> hey [11:11] <Mr ChatBot> in Java [11:12] <Mr ChatBot> what does: [11:12] <Mr ChatBot> public static void main(String[], args){ [11:12] <Mr ChatBot> [11:12] <Mr ChatBot> mean? [11:12] <SmokedSausage> Lemme think [11:12] <Mr ChatBot> it is also C# code [11:13] <SmokedSausage> args is the arguments made in curly brackets (Similar to IF in SB) [11:13] <SmokedSausage> String is self explainatory amirite? [11:13] <Mr ChatBot> using system; [11:13] <Mr ChatBot> class program{ [11:13] <Mr ChatBot> public static void main(String[], args){ [11:13] <Mr ChatBot> console.writeln("Hello, World!"); [11:13] <Mr ChatBot> } [11:13] <Mr ChatBot> } [11:13] <Mr ChatBot> thats all I know of C# [11:14] <SmokedSausage> I don't know any C [11:14] <Mr ChatBot> I'm gonna make that program [11:14] <Mr ChatBot> C can be harder than C++ [11:14] <Mr ChatBot> in C the command for INPUT X is [11:14] <SmokedSausage> Print in Java is system.out.printin("Hello world!"); [11:14] <Mr ChatBot> scanf("%d", &amp;x); [11:14] <SmokedSausage> Capitalize In [11:14] <Mr ChatBot> INPUT X in C++ is [11:15] <Mr ChatBot> cin&gt;&gt;x; [11:15] <Mr ChatBot> easy [11:15] <Mr ChatBot> much moreso than [11:15] <SmokedSausage> Simple enough [11:15] <Mr ChatBot> scanf("%d", &amp;x); [11:15] <Mr ChatBot> anyway, I'm gonna make that C# program [11:15] <Mr ChatBot> ;) [11:15] <SmokedSausage> Static I think is static code...doesn't continue executing code (I think) [11:15] <Mr ChatBot> you are still being logged [11:16] <SmokedSausage> Dang [11:16] <SmokedSausage> Not if i banz uz [11:18] <Mr ChatBot> &gt;.&lt; [11:18] <Mr ChatBot> I'll unban myself using IAmAPersson's account [11:18] <SmokedSausage> True [11:19] <SmokedSausage> Be back later [11:19] <Mr ChatBot> :D [11:19] <Mr ChatBot> I MADE MY FIRST C# PROGRAM [11:20] <Mr ChatBot> IMMA HAPPY [11:22] <SmokedSausage> Cool [11:24] <Mr ChatBot> i was wrong about print [11:24] <Mr ChatBot> it's not [11:24] <Mr ChatBot> System.println [11:24] <Mr ChatBot> its [11:24] <Mr ChatBot> Console.WriteLine [11:28] <SmokedSausage> why! [11:28] <SmokedSausage> IF FLY==1 AND B AND 2 THEN SY=SY+1 [11:28] <SmokedSausage> It won't freaking work all of a suddem [11:29] <Mr ChatBot> well [11:29] <Mr ChatBot> I know why [11:29] <SmokedSausage> All my other movement code is working [11:29] <Mr ChatBot> since you're using B AND 2, you'll need to do: [11:29] <SmokedSausage> Is B not a button ID for down [11:29] <Mr ChatBot> IF FLY THEN IF B AND 2 THEN... [11:30] <SmokedSausage> B is a variable for BUTTON [11:30] <Mr ChatBot> B AND 2 need to be in a completely seperate IF [11:30] <Mr ChatBot> so I did THEN IF [11:30] <Mr ChatBot> I didn't do FLY==1 because the interpreter is smart [11:30] <SmokedSausage> Yeah but my line for up is working [11:30] <SmokedSausage> IF FLY==1 AND B AND 1 THEN SY=SY-1 [11:31] <Mr ChatBot> what about left and right? [11:31] <Mr ChatBot> are they the same? [11:31] <SmokedSausage> nO LEFT/RIGHT DON'T USE THE FLY VARIABLE [11:31] <Mr ChatBot> oh ok [11:32] <Mr ChatBot> well it probably has to do with binary conflictions [11:32] <SmokedSausage> SO ITS JUST IF B AND 4 OR 8 THEN SX=SX=2 ETC. [11:32] <SmokedSausage> Sorry caps [11:32] <Mr ChatBot> its ok [11:32] <Mr ChatBot> IF statements are actually VERY complex [11:32] <Mr ChatBot> especially AND [11:33] <Mr ChatBot> it is wayyy more complex than it looks [11:33] <SmokedSausage> Thanks for the help..It has worked before tho...? [11:33] <SmokedSausage> Eh, I know them [11:33] <SmokedSausage> I still need work on arrays [11:34] <Mr ChatBot> what about arrays? [11:35] <SmokedSausage> Need more practice...I understand them...just working with them [11:35] <SmokedSausage> My L button is finally going out [11:35] <SmokedSausage> After 2 years [11:35] <Mr ChatBot> :/ [11:35] <Mr ChatBot> arrays are fun [11:36] <Mr ChatBot> they are simply multiple variables under one name [11:36] <Mr ChatBot> array(i) [11:36] <Mr ChatBot> i represents the "slot" in the array [11:36] <Mr ChatBot> We can think if an array like this: [11:37] <Mr ChatBot> if I did DIM ARRAY(3) [11:37] <Mr ChatBot> then I have an array with 3 slots, like this: [11:38] <Mr ChatBot> ---0---1---2 [11:38] <Mr ChatBot> | | | | [11:38] <Mr ChatBot> dangit [11:38] <Mr ChatBot> that wont work [11:39] <Mr ChatBot> _0__1__2_ [11:39] <Mr ChatBot> |__|___|___| [11:39] <Mr ChatBot> there's our array [11:39] <Mr ChatBot> a table with 3 slots [11:39] <Mr ChatBot> each slot can hold 1 number [11:39] <Mr ChatBot> so if I did [11:40] <Mr ChatBot> DIM ARRAY(3) [11:40] <Mr ChatBot> ARRAY(0)=1 [11:40] <Mr ChatBot> ARRAY(1)=5 [11:40] <Mr ChatBot> ARRAY(3)=2 [11:40] <Mr ChatBot> then my table would now look like this: [11:40] <Mr ChatBot> _0__1__2_ [11:40] <Mr ChatBot> |_1|_5_|_2_| [11:41] <Mr ChatBot> slot 0 holds the value 1, slot 1 holds the value 5, and slot 2 holds the value 2 [11:41] <Mr ChatBot> 2D array's are similar [11:41] <Mr ChatBot> arrays* [11:42] <SmokedSausage> O.O [11:43] <Mr ChatBot> DIM ARRAY(2,2) [11:43] <Mr ChatBot> makes: [11:43] <Mr ChatBot> _0__1_ [11:43] <Mr ChatBot> |__|___|1 [11:43] <Mr ChatBot> |__|___|0 [11:43] <SmokedSausage> I was watching this entire time... I just became wiser in those 6 minutes [11:43] <Mr ChatBot> awesome [11:43] <Mr ChatBot> so lets say: [11:43] <Mr ChatBot> ARRAY(0,0)=1 [11:43] <Mr ChatBot> ARRAY(1,0)=2 [11:43] <Mr ChatBot> ARRAY(0,1)=3 [11:43] <Mr ChatBot> ARRAY(1,1)=4 [11:44] <Mr ChatBot> my array drawn out would be [11:44] <Mr ChatBot> _0__1_ [11:44] <Mr ChatBot> |_2|_4_|1 [11:44] <Mr ChatBot> |_1|_3_|0 [11:45] <Mr ChatBot> the biggest 1D array I've ever used was 1000 [11:45] <Mr ChatBot> my biggest 2D has been 64x64 [11:45] <Mr ChatBot> but I've successfully DIMmed a 256x256 array before [11:45] <SmokedSausage> Minecraft DS? [11:45] <Mr ChatBot> yes [11:46] <SmokedSausage> Can I has 256x256 worlds with a 50 block render distance with MCDS Shaders? [11:46] <Mr ChatBot> ... [11:46] <Mr ChatBot> how about 128 block render distance [11:46] <Mr ChatBot> :D [11:47] <SmokedSausage> With a 512x512 Texture pack? [11:47] <Mr ChatBot> awesomeness [11:47] <SmokedSausage> Sphax plz? [11:47] <Mr ChatBot> and lag [11:47] <SmokedSausage> Yes a lot of lag [11:47] <Mr ChatBot> this isnt possible in PTC, but 3D, 4D, and 5D arrays are possible [11:47] <Mr ChatBot> in C/C++ you can do: [11:48] <SmokedSausage> Holy Paradox [11:48] <Mr ChatBot> int array[256,256,256]; [11:48] <Mr ChatBot> which makes a 256x256x256 array [11:48] <SmokedSausage> Scary... [11:48] <SmokedSausage> Easy command for a C language tho [11:48] <Mr ChatBot> a 256x256x256 array holds 16,777,216 slots [11:49] <Mr ChatBot> fun fact [11:49] <Mr ChatBot> i would ASCII draw a 2x2x2 array, but that'd be hard [11:49] <SmokedSausage> I have seen things such as !(commands)command) used in Basic alot [11:49] <SmokedSausage> What wdoes the "!" do [11:50] <Mr ChatBot> it means not [11:50] <Mr ChatBot> lemme show you [11:50] <Mr ChatBot> if I did: [11:50] <Mr ChatBot> IF !VARIABLE THEN... [11:50] <Mr ChatBot> it means [11:50] <Mr ChatBot> IF VARIABLE==0 THEN [11:50] <Mr ChatBot> or [11:50] <Mr ChatBot> IF VARIABLE&lt;1 THEN... [11:50] <SmokedSausage> Oh sorta reverses things? [11:50] <Mr ChatBot> yea [11:51] <SmokedSausage> Ok makes since [11:51] <Mr ChatBot> but be careful; ! is a binary operator [11:51] <Mr ChatBot> and they are very weird [11:51] <SmokedSausage> ... [11:51] <Mr ChatBot> I won't get into that [11:51] <SmokedSausage> Can't be weirder than you [11:51] <Mr ChatBot> I don't wanna confuse you [11:51] <Mr ChatBot> ... [11:51] <Mr ChatBot> .......................... [11:51] <Mr ChatBot> wow [11:51] <SmokedSausage> lol [11:51] <Mr ChatBot> xD [11:51] <SmokedSausage> jk [11:52] <Mr ChatBot> anyway, it is safe to use ! to replace ==0 [11:52] <SmokedSausage> I'm a mod on the PTC wiki O.o. People are scared of me [11:52] <Mr ChatBot> you can also do stuff like this: [11:52] <SmokedSausage> Well just PokeYoshi actually [11:52] <Mr ChatBot> IF !(B AND 1) THEN... [11:53] <Mr ChatBot> which means "If you are NOT pressing up then..." [11:53] <SmokedSausage> That would do IF!(B AND 0) RITE? [11:53] <SmokedSausage> Okay [11:53] <Mr ChatBot> you can also compact that code [11:53] <Mr ChatBot> IF!(B AND 1)THEN... [11:53] <SmokedSausage> Yep [11:54] <Mr ChatBot> I always try to compact my code [11:54] <Mr ChatBot> it makes it go fast [11:54] <Mr ChatBot> omit any whitespace possible [11:54] <Mr ChatBot> I did a test [11:54] <Mr ChatBot> I did: [11:54] <SmokedSausage> Is it possible to display variables using PNLSTR,x,y without converting a string to variable? [11:54] <Mr ChatBot> you'd have to do [11:55] <Mr ChatBot> PNLSTR X,Y,STR$(x) [11:55] <SmokedSausage> Oh ok [11:55] <Mr ChatBot> anyway [11:55] <Mr ChatBot> I did: [11:55] <SmokedSausage> Easy i have done harder [11:55] <SmokedSausage> Continue [11:55] <Mr ChatBot> FOR I=0 TO 9999 [11:55] <Mr ChatBot> NEXT [11:55] <Mr ChatBot> and measured the time to loop [11:55] <Mr ChatBot> it took 10 frames exactly [11:55] <Mr ChatBot> then I did [11:56] <Mr ChatBot> FOR I=0TO 9999 [11:56] <Mr ChatBot> NEXT [11:56] <Mr ChatBot> it took exactly 9 frames [11:56] <SmokedSausage> Wow... [11:56] <Mr ChatBot> proving that whitespace reduces lag [11:56] <SmokedSausage> Never thought i could do that without an error [11:56] <Mr ChatBot> as well as size [11:56] <Mr ChatBot> then I did [11:56] <Mr ChatBot> (an underscore represents a space) [11:57] <SmokedSausage> I almost tried before...But I usually don't use FOR Loops cuz i have no use for them' [11:57] <Mr ChatBot> ____________FOR I = 0 TO 9999_________ [11:57] <Mr ChatBot> _____NEXT_____________ [11:57] <Mr ChatBot> it took... [11:57] <Mr ChatBot> 15 frames [11:57] <Mr ChatBot> much longer [11:58] <Mr ChatBot> anyway, I have to go [11:58] <SmokedSausage> Bye [11:58] <Mr ChatBot> bye!