Jump to content

reniat

Member
  • Posts

    849
  • Joined

  • Last visited

Reputation Activity

  1. Like
    reniat got a reaction from Th3seus in Discord Bot JS or PY   
    just a quick note, just because discord is written in JS doesn't mean the JS library is any more or less valid than the python library.  The actual discord bot API is a REST api, so any framework on top of that is a technically just an API wrapper library, including the JS one. It's not more native to discord for bot making than python is, since they are all just fancy delegates to network requests to the REST api.
     
    I would say discord.js has more users, and it seems to be the most popular discord bot lib out there at the moment, but discord.py is also perfectly viable.
  2. Informative
    reniat got a reaction from TheLight in Discord Bot JS or PY   
    just a quick note, just because discord is written in JS doesn't mean the JS library is any more or less valid than the python library.  The actual discord bot API is a REST api, so any framework on top of that is a technically just an API wrapper library, including the JS one. It's not more native to discord for bot making than python is, since they are all just fancy delegates to network requests to the REST api.
     
    I would say discord.js has more users, and it seems to be the most popular discord bot lib out there at the moment, but discord.py is also perfectly viable.
  3. Like
    reniat got a reaction from camjocotem in Front-end and Back-end Developers   
    im curious what you think git is a downgrade from. Would you rather have SVN or mercurial? gross.
  4. Funny
    reniat got a reaction from Zuccers in App lock in python   
    .....................
    I'm gonna blame the fever on this one.
  5. Like
    reniat got a reaction from Den15 in Programming languages and their use   
    Try not to pigeon hole languages like that. Game engines comprise such a small % of the C++ code out in the world (it's behind most of the web browsers you use for example), and python isn't the only language to do machine learning in. There is truth in some of the language stereotypes, but it might give you wrong idea about a language if you latch on too firmly.
     
    Instead of specific applications, think of the languages in terms of their strengths weaknesses and go from there:
     
    (this is BY NO MEANS an exhaustive list, just the stuff that comes to my mind) 
    C/C++
    Pros
    Low level High performance A lot of tooling to catch errors at compile time Portable Cons
    Higher skill curve some types of defects can be very hard to track down (e.g. memory/GDI issues)  
    C#/Java
    Pros
    Not as performant as C/C++, but adequate for the vast majority of applications have a wide variety of built in features (especially with C# and .NET) Lower skill curve, as many low level operations are abstracted away Cons
    Managed memory (garbage collection) can sometimes have performance impact (not common) Not necessarily as portable. The appropriate JVM/.NET environment, and .NET in particular is limited to mostly windows machines. Python/Javascript/Ruby
    Pros
    Typically the lowest barrier of entry. Very little is needed to run simple but useful things Great for automation and quick scripts Extremely large library selection, with a huge dedicated userbase constantly adding to it (this is why python is such a common research language) Cons
    Weaker performance, though this can often be mitigated (such as using precompiled libraries in python) Heavy reliance on third party libraries means extra work with upkeep. Not as portable  
    again, THIS WAS NOT MEANT TO BE A COMPLETE LIST. This is just to show how you should look at languages based on strengths, not stereotypical uses (which are often outdated).
    Most likely embedded development in todays market, but it depends wildly based on where you work.
  6. Informative
    reniat got a reaction from Hi P in Programming languages and their use   
    Try not to pigeon hole languages like that. Game engines comprise such a small % of the C++ code out in the world (it's behind most of the web browsers you use for example), and python isn't the only language to do machine learning in. There is truth in some of the language stereotypes, but it might give you wrong idea about a language if you latch on too firmly.
     
    Instead of specific applications, think of the languages in terms of their strengths weaknesses and go from there:
     
    (this is BY NO MEANS an exhaustive list, just the stuff that comes to my mind) 
    C/C++
    Pros
    Low level High performance A lot of tooling to catch errors at compile time Portable Cons
    Higher skill curve some types of defects can be very hard to track down (e.g. memory/GDI issues)  
    C#/Java
    Pros
    Not as performant as C/C++, but adequate for the vast majority of applications have a wide variety of built in features (especially with C# and .NET) Lower skill curve, as many low level operations are abstracted away Cons
    Managed memory (garbage collection) can sometimes have performance impact (not common) Not necessarily as portable. The appropriate JVM/.NET environment, and .NET in particular is limited to mostly windows machines. Python/Javascript/Ruby
    Pros
    Typically the lowest barrier of entry. Very little is needed to run simple but useful things Great for automation and quick scripts Extremely large library selection, with a huge dedicated userbase constantly adding to it (this is why python is such a common research language) Cons
    Weaker performance, though this can often be mitigated (such as using precompiled libraries in python) Heavy reliance on third party libraries means extra work with upkeep. Not as portable  
    again, THIS WAS NOT MEANT TO BE A COMPLETE LIST. This is just to show how you should look at languages based on strengths, not stereotypical uses (which are often outdated).
    Most likely embedded development in todays market, but it depends wildly based on where you work.
  7. Agree
    reniat got a reaction from AlexBMJ in I keep getting syntax error's Python 3.7   
    you are using 'guess' before it's actually set to anything.
  8. Like
    reniat got a reaction from Dat Guy in What to learn?   
    in terms of pure execution speed the gap is definitely smaller than it used to be, but there are still some major factors that basically prohibit java from being a high performance game language. The biggest reason is that it's really not worth the effort of porting major game engine to java, so you're stuck with whatever platform those engines give you. The closest would be Unity with C#, but the super high performance engines are almost all C/C++. 
     
    Another reason java isn't a great game language is garbage collection. It creates a lot of performance uncertainty, since you really can't control when that happens. There are a few different GC methodologies you can use, but no matter what you are at the mercy of the GC to not collect during a critical moment causing a performance dip. For most desktop development that's not really a huge concern, but in the gaming world of 60fps+ and high refresh rates and "smoothness" being the be all end all metric, java's GC can be nightmare.
     
    The exception of course, is the high performance icon Runescape, which is built in java.
  9. Agree
    reniat got a reaction from v0nN3umann in API   
    Since it's such a specific requirement (conversion and it HAS to be done through consuming an api), i'm guessing its some kind of homework assignment. I just want to throw this out there, since i also think doing a Rest API call for something this trivial would not be a good actual solution.
  10. Agree
    reniat reacted to TVwazhere in Tilting pc tower case on its side   
    Yes and yes. I've tilted mine plenty of times that had an AIO. As long as you dont run a pump dry (assuming its a custom loop) then you'll always be good. 
  11. Like
    reniat got a reaction from MladenM in What to learn?   
    I 100% agree with this (this is also why I hate web development). The only place I think you and I disagree is pythons value as a very first step for general computer science education. I absolutely don't think you should only learn python (if your aim is to be a developer, its a bit different if you aim to be a data scientist), but as an initial stepping stone when there is no prior technical knowledge I think it has a lot of value.
  12. Agree
    reniat got a reaction from lewdicrous in Discord Bot JS or PY   
    just a quick note, just because discord is written in JS doesn't mean the JS library is any more or less valid than the python library.  The actual discord bot API is a REST api, so any framework on top of that is a technically just an API wrapper library, including the JS one. It's not more native to discord for bot making than python is, since they are all just fancy delegates to network requests to the REST api.
     
    I would say discord.js has more users, and it seems to be the most popular discord bot lib out there at the moment, but discord.py is also perfectly viable.
  13. Informative
    reniat got a reaction from Loopios7 in Discord Bot JS or PY   
    just a quick note, just because discord is written in JS doesn't mean the JS library is any more or less valid than the python library.  The actual discord bot API is a REST api, so any framework on top of that is a technically just an API wrapper library, including the JS one. It's not more native to discord for bot making than python is, since they are all just fancy delegates to network requests to the REST api.
     
    I would say discord.js has more users, and it seems to be the most popular discord bot lib out there at the moment, but discord.py is also perfectly viable.
  14. Informative
    reniat got a reaction from PAEz in Discord Bot JS or PY   
    just a quick note, just because discord is written in JS doesn't mean the JS library is any more or less valid than the python library.  The actual discord bot API is a REST api, so any framework on top of that is a technically just an API wrapper library, including the JS one. It's not more native to discord for bot making than python is, since they are all just fancy delegates to network requests to the REST api.
     
    I would say discord.js has more users, and it seems to be the most popular discord bot lib out there at the moment, but discord.py is also perfectly viable.
  15. Agree
    reniat got a reaction from Franck in Completed Java class what to do now   
    Once you get past a certain point, it's pretty easy to pick up and languages as needed. Most languages share the same core fundamental concepts and techniques, and you simply start picking up on them. Obviously to get "expert" status in a given language to learn all the nuances and framework stuff takes more effort, but programming in general isn't really a "use it or lose it" thing. The worst really is you just don't keep up with newer trends and find yourself playing technology catch up.
  16. Funny
    reniat reacted to straight_stewie in GUI programming class   
    Well, I think we should break down the pros and cons of your 3 options. This is by no means an exhaustive list, but it should get you started thinking on the right path.
    Python Pros The language is easy There is a plethora of libraries available to ease GUI programming Cons You don't know the language yet Many of the available libraries don't have good documentation C++ Pros You know the language You get to learn what the libraries in other languages are doing for you It can be easier to build annoyingly silly applications. This one is by no means complete, but it's a start: https://github.com/superstewie/Dumb-Window Cons If you've never worked with Win32-COM or XWindows, this is the most difficult option Java Pros You know the language Some native support for building a GUI "Commercial" libraries are available You'll make @wasab happy. Cons You'll make @wasab happy.  
  17. Funny
    reniat got a reaction from Dat Guy in Processing Power Recommended for Programming   
    Real programmers use cat.
  18. Agree
    reniat got a reaction from straight_stewie in RAM speed in programming   
    Fair, but the only time you need to do this level of optimization during architecting is if you have a fairly strict performance requirement up front and can design around those requirements. For most general purpose software, regardless of team size, spending tons of time worrying about super specific performance considerations usually isn't necessary. I'm not saying there aren't times, but it's not something you do on every software project "just because".
  19. Agree
    reniat reacted to Unimportant in RAM speed in programming   
    While you indeed should not be optimizing too much prematurely, *some* hardware behavior should be kept in mind from the very beginning as it can have a great influence on the overall design.
     
    We had a multi-threaded application run glacially slow once, as it turned out due to false sharing. To solve the false sharing issue certain parts of the application's data structure had to be modified. What is the data structure in OOP ? Your object structure. So we had to radically change part of the object structure which, as you're probably well aware, took a lot of refactoring and time (money).
     
    When certain decisions have to be right from the very beginning, because they're too costly too change afterward, then thinking about and making the right decisions from the start isn't premature. The hardware, mostly caching, affects certain such decisions.
     
     
     
  20. Agree
    reniat reacted to Unimportant in RAM speed in programming   
    I'd worry much more about being cache friendly if you need performance.
  21. Informative
    reniat got a reaction from Dat Guy in Java: How to parse Double into Int?   
    Integer.parseInt() is for strings. You can just use (int) as @Adorable Cat mentioned
  22. Informative
    reniat got a reaction from toobladink in Bug in destructor of doubly linked list (C++)   
    correct, that's a memory leak and you want to avoid that. I'm not saying you shouldnt use delete (you definitely should if you aren't using smart pointers), i'm saying you should delete your target node, not the node next to it
     
    something like:
    void List4::Delete(int pos) { doubleNode* ptrA = FindPosition(pos)->prev; doubleNode* ptrB = ptrA->next->next; delete ptrA->next; ptrB->prev = ptrA; ptrA->next = ptrB; length--; } the only difference being here prtrA->next is being deleted while its pointing to your target node, not after its pointing to the node in positon pos after removal from the list .
  23. Like
    reniat reacted to Hip in Java: How to parse Double into Int?   
    Now I understand thanks.
    Can you answer me another question, I want to print something in System.our.println and somehow I get errors like "error: ';' expected" "error: not a statement" and " error: ')' expected"
     
    This is the outprint:
    System.out.println("double: "+doubleWert"\nbyte: "+byteWert);  
    It only occures when I put in \n
     
    I solved it with:
    System.out.println("double: "+doubleWert+"\n"+"byte: "+byteWert);  
  24. Informative
    reniat got a reaction from Hip in Java: How to parse Double into Int?   
    Sorry I may have over-explained a bit. Integer.createFromString() was an example I made up, illustrating that .parse() is just another method, not something baked into the language like casting using parenthesis like (int)
  25. Informative
    reniat got a reaction from Hip in Java: How to parse Double into Int?   
    Yes kind of, but think about it less like "when casting I use ____ for this type", remember that parse is a method on Integer (or Double, or Float). 
    This syntax:
    NewType someValue = (NewType) oldValue; is the only way to cast that's built directly into the language. The parse methods on Float, Integer, and Double are just methods used to make objects of those types given other data. They aren't "casting" so much as they are almost like static constructors, where you give it a double and it gives you a new Integer object. parse could also be renamed Integer.createFromString(String s); and it'd mean the same thing.
     
    The difference is that casting is simply changing the reference to the object, while methods like these parse methods aren't as limited by the original. For example, you could make a parse method that had custom logic, like:
     
    static int parsePositive(double d) { return (d < 0) ? 0 : (int) d; } // or if you're not familiar with ternaries: static int parsePositive(double d) { if (d < 0) { return 0; } return (int) d; }  
    And raw casting as built by the language doesn't provide that level of customization, because it's simply changing reference types.
     
    So while yes, casting does let you take an object of one type and create an object of a different type from that same object, i would not call it accurate to say that parse() is "casting" here, as there is no valid general transformation from string to numeric (which is why you can't just use the normal cast), though this probably just down to semantics.
×