Jump to content


  • Content count

  • Joined

  • Last visited


This user doesn't have any awards

1 Follower

About Yamoto42

  • Title


  • CPU
  • Motherboard
    ASUS X99-A/USB 3.1
  • RAM
    32GB Corsair Vengeance LPX DDR4-2400
  • GPU
    Gigabyte GTX 980Ti G1 Gaming
  • Case
    Phanteks Enthoo Luxe - White
  • Storage
  • PSU
    EVGA 850G2
  • Display(s)
    3x ASUS VN289QL
  • Cooling
    Corsair H110i GT
  • Keyboard
    Corsair K70 w/ Cherry MX Brown
  • Mouse
  • PCPartPicker URL

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

460 profile views
  1. most used non-OOP lanuage?

    I've heard convincing arguments for Excel considering how much of the world is run by spreadsheets...
  2. No...we use 2's complement is because it turns the rather complex operation of subtraction into the simple operation of addition, meaning you no longer need separate circuitry for the two operations.
  3. Java or Python?

    They use python because its the best tool for the job. There's kind of a chicken and the egg situation there. Part of the reason the scientific tools are so well developed for python is because the scientists liked that python was easy to pick up and didn't require much boilerplate...so its ultimately the result of a feedback loop... Python isn't without its problems...duck typing is nice and all...but it leads to documentation that technically tells you what is returned...but not necessarily any indication of how to use it. Method Spam returns an Egg if successful, else none...or maybe every 2nd Tuesday in July on a leap year it returns a Bacon. Ok...well where the heck is the documentation on what an Egg or Bacon is...or at least (since duck typing) their common methods of interest? Sample size AND a bandwagon? not bad... But some people just do have problems disassociating logical constructs from languages. And quite frankly, the real difference between C/C++/Java and python on that front is boilerplate, of which python requires significantly less. I could see how it might be more difficult for someone inexperienced to go from less structured to more structured syntax. Ultimately, given we're talking about network administration and not software development...I'd go with python.
  4. Always returning 0 in C

    Binary 0111 isn't 7/16. It is just 7. It's an integer...there's no real reason to convert it to a floating point.
  5. Is this encryption method secure?

    It's not just that per se, as that is itself ultimately rooted in the bootstrap problem of cryptography. Much like how people call TCP reliable, yet it is absolutely 100% impossible to create a reliable transport protocol on top of an unreliable medium. It is literally impossible to establish a secure channel within an insecure medium. Therefore we "solve" the problem of impossibility by bypassing the medium entirely at the start of the process (ie. sysadmins externally deciding to mutually trust a CA). As you note, it is not a true solution, but it is the best approximation we have been able to come up with so far to a truly impossible problem.
  6. Is this encryption method secure?

    Yeah...rule 1 of cryptography: Don't do it yourself.
  7. C Programming

    @Unimportant And I do agree as a rule of thumb. J = C+x && J = C <-> x = 0 But the C STANDARD does not guarantee x=0, or that x > 0, or x < 0. Undefined literally means we know nothing about x. It could be negative, making C slower for all the language should assume. And you'd have to be a certain kind of stupid to use an implementation of C where x<=0...which is while it's not TECHNICALLY correct, I do agree in general.
  8. C# Array vs List

    In object oriented programming, there is a concept of abstract and concrete types. Concrete types are what you are likely familiar with. They consist of data, methods, etc. Abstract classes are similar to concrete classes, except they may have data or methods that are DECLARED, but not DEFINED. As an example: public class Concrete { public Int32 GetAnInt() { return 42; } public Int64 GetALong() { return 1234567890; } } public abstract class Abstract { public Int32 GetAnInt() { return 64; } public abstract Int64 GetALong(); } Now, because the definition of Abstract is incomplete, you cannot call its constructor...but don't worry about that for now. We have a special case for classes where NOTHING is defined. We call them interfaces. // By convention in C# we start them with an uppercase I public interface INumberMaker { In32 GetAnInt(); } public class Spam : INumberMaker { public In32 GetAnInt() { return 42; } } public class Eggs : INumberMaker { public In32 GetAnInt() { return 64; } public In64 GetALong() { return 42; } } Now for teh code ... INumberMaker myNum = new Spam(); System.out.println(myNum.GetAnInt()); // Will print 42 myNum = new Eggs(); System.out.println(myNum.GetAnInt()); // Will print 64 System.out.println(myNum.GetALong()); // Will not compile ... What we have effectively done is said "I don't care what myNum is, as long as it has a method called GetAnInt() that returns an Int32." The second time we assign it, it may have a method called GetALong...but we don't care. By DECLARING it of type INumberMaker, even though we INSTANTIATED eggs, we have explicitly said INumberMaker and its GetanInt() method is all we care about. That's what interfaces are used for. We declare what matters, for example IList<T> defines what MAKES a list, but not how it is implemented. It says what does a list do? It stores items an a specific order, allows retrial based on their order, etc... It doesn't say how they are stored, only that they exist and what method names will be used to access them. (this is called an API) List<T> then says "lets store it as an array" and LinkedList<T> says "Lets store it as a path of nodes". But they both implement IList<T>. ...and in this case your code should care about how it's ACCESSED, not how its STORED. That decision only has to be made once...and it may often change. If your code needs to know how its stored, you've probably put too much responsibility on a single area. Let the initialization worry about how its stored, let the accessor only worry about how its accessed.
  9. C Programming

    I do understand what you are saying. And no reasonable implementer of the the C language would perform a bound check on the array access...or for that matter differentiate it from pointer arithmetic...much like no reasonable C programmer would not take the time (read development cost) to write the check themselves before making the access in any non-trivial situation. But a rule of thumb is not necessarily technically correct. The thing is this: Speed is in no way an attribute of the language. It is entirely an attribute of implementation. I keep bringing up Turing completeness because its core concept creates contradiction when speed is considered an attribute of the language. If a language, lets call it A (C wat I did thar?), is Turing complete, then by the definition of Turing completeness I can write an interpreter for A in the A language itself...That quality is exactly what lets you write a C compiler in C. Now, if you write a program in A, and compile it with Richard M. Stalin's latest gaa compiler, then run it in my A interpreter, then only two results are possible: They finish at the exact same time or one finishes before the other (it doesn't matter which one is first). Now, since my A interpreter is doing effectively run-time compilation AND execution, it is performing more computation than the result of gaa. From this, if the programs complete at the same time, since the extra work included the execution time of both must have been zero. Both execute your program A, but one has run-time compilation overhead. A * n = A * (n+x) -> A = 0...so I feel comfortable throwing that out saying they won't finish simultaneously. But what happens if they don't finish simultaneously? Well, if speed is an attribute of the language and not the implementation you are effectively saying A != A. //======== In practice, however, the latter will tend to be true. They will not finish simultaneously. However, it is not a contradiction because the difference comes from the native language vs. interpreted IMPLEMENTATIONS. In fact, it's largely a moot point because my computer doesn't speak C, java, or python. It only speaks x86...if anything we're more debating compilers than languages... But as a rule of thumb, I fully agree a program written in C will halt faster than a program written to perform the same task in Java or Python....but the key phrase is "rule of thumb".
  10. C Programming

    The key words there is ALLOWS. It is undefined behavior by the standard. As soon as you use the word "default", you have defined it. Undefined by the standard is absence of evidence, not evidence of absence. Ultimately, there is no one tool for the job. The three properties of a produce are fast, cheap, and good. Realistically you'll at best get to choose 2....typically 1 and a half... C does teach you a lot of about how a computer works. Definitely more so than any other high level language. Unfortunately, to use your own example, that includes bounds checking arrays. I wouldn't even pay minimum wage for a C developer that skipped their own bounds check in a non-trivial situation...and because we need to prevent such undefined behavior, that leads to a lot of what is essentially redundant boilerplate code. It leads to frequently re-inventing the wheel. While I would highly advocate learning C (if you're a serious developer), I would recommend C++, Java, C# or python first, and THEN learning C. You don't have to be able to build a transmission to be an excellent driver...but If you later (after you've gotten your feet a little wet just driving around town) want to, I highly recommend at least learning how transmissions and differentials work; or even what they do. You don't learn English by translating the complete works of Shakespear from their original Klingon. That comes later. At least learn to say "Hello World" first. Similarly, knowing and understanding something does not in any imply that the solution will be correct. The heartbleed bug is a good (potentially catastrophic) example of this. But I digress...C does teach you a lot of things, and knowing what's going on under the hood can extremely helpful for debugging and finding optimizations in other languages...and even for that alone I would recommend learning it. But even then I can't say I would use it for a new project if C++ were available.
  11. C Programming

    @Sebivor You can't convince a true believer. If they can't see the inherent contradiction in saying Turing complete languages operate at different speeds when the fundamental core of Turing completeness is recursive equivalency...
  12. C Programming

    What is 143726 * 9304723 / 5? No calculator, pencil or paper. Just because you know something exists or how it works in absolutely no way means you will get it right.
  13. C Programming

    This. The fundamental concept of Turing completeness.
  14. C# Array vs List

    Exactly what I was getting it: designing around abstractions so he can easily change his mind later...or even based on different situations. I used the word "declare" specifically to differentiate it from instantiation. He obviously still has to use a concrete implementation...but beyond the constructor "ideally" that shouldn't be referenced again unless he absolutely requires it...but if that were the case this question would likely be moot from the start. The same thing stands for IDictionary. The only thing here I don't quite understand is what hes trying to accomplish with #2...he says "They need to be at the same index so I can find the WWW based on the contents of the String."...if they are at the same index what sort of searching does he need to do? I think i understand what he's trying to do (create a pointer to another collection)...but I don't understand why it's necessary, or what searching has to do with it.