• Navigation
Results 1 to 12 of 12
  1. #1
    Rainbow Dash was here,
    Applejack is a silly filly.

    Join Date
    Jan 2008
    Posts
    1,425
    BG Level
    6

    Python, Google App Engine, Partychat, GTalk

    I always wanted a chatroom for all of my IRL friends since like middleschool to just hang out and talk in, something like IRC. Basically, a lot of my friends are only computer literate enough to use AIM and would never be able to comprehend IRC unless they just used mibbit, plus I don't think they'd want to install another application just for one chatroom. Most of my IRL friends use gchat as our way of communicating with eachother, since we've been using gmail since private beta as a way to talk during high school back when you only had like 4 invites and 2GB.

    So I looked into a few things, remembered about a google app before gmail had native chatroom support, and found PartyChat. PartyChat was written with the Google App Engine and basically gives sort of a basic IRC chat that you can use with gchat.

    It's pretty cool, the formatting is a little cumbersome in the gmail webclient so you have to pop out the window if you want to see anything. GTalk, the standalone client, and any client that supports the Jabber protocols and renaming of contacts work best (it works great with Trillian). But it behaves like IRC, not a typical AOL chatroom (or the native gtalk chatroom) that you have to be manually invited to and will close if no one is in it.

    I was wondering if anyone had experience with PartyChat, Google App Engine, or Python. I kind of have some ideas about making a bot with the Google App Engine, similar to IRC bots, for admin/moderator powers; text games like hangman; and other shit you would do with IRC bots (plus it'd give me an excuse and goal to learn Python).

    I have experience with programming languages, like C++ and VB, and if anyone has any references for Python, or would be willing to talk to me about Python that'd be pretty cool. I don't have anything now for anyone to look over unfortunately, if I try to make a bot it probably wont happen until next week.

    So yeah, looking for people to talk to about Python, Google App Engine, PartyChat, and GTalk. Feel free to respond to talk here or if you want my contact info in my profile, I'm also found on the Gamesurge channels #Spam and #FF14.

    http://partychapp.appspot.com/
    http://code.google.com/appengine/

  2. #2
    PROM KING OF
    SHOWDOWN HIGH

    Join Date
    Dec 2008
    Posts
    65
    BG Level
    2

    As a programmer with experience in other languages who wants only to learn the distinctive features of Python while avoiding all the "this is what a variable is" analogies, I highly recommend Dive into Python 3 for Python 3, which is still new enough that not every platform supports it or uses it by default, in which case there's Dive into Python. Both are available in their complete form on the web for free.

  3. #3
    Rainbow Dash was here,
    Applejack is a silly filly.

    Join Date
    Jan 2008
    Posts
    1,425
    BG Level
    6

    Thanks Zeith. Them being free means I'll actually check them out right now. I haven't seen it mentioned anything about Python/Python 3 specifically, but I'm going to assume they use Python 3 since they got the Python creator working for them and check out that one first.

    For anyone who's curious it looks like since the Python creator guy works for Google and apparently his job is just to develop Python, Python seems to be officially supported by Google.

    Google even has some videos on using python on youtube


    I've been reading the Google Apps Engine python documentation since creating this thread
    http://code.google.com/appengine/doc.../overview.html

  4. #4
    PROM KING OF
    SHOWDOWN HIGH

    Join Date
    Dec 2008
    Posts
    65
    BG Level
    2

    It's a wonderful language, my second favorite. C++ is the only thing I like better, but the coolest part about developing in Python in that regard are the bindings. You can write a package that uses C/C++ libraries, and if you find that performance is an issue or it's just something you want to do, you can replace Python modules piece by piece with C++ equivalents. It's been said ad nauseum, but it's a fantastic prototyping language.

  5. #5
    Chram
    Join Date
    Jun 2006
    Posts
    2,737
    BG Level
    7

    Quote Originally Posted by Zeith View Post
    It's been said ad nauseum, but it's a fantastic prototyping language.
    LISP says wat?!

  6. #6
    Very Sexy Nerd
    Join Date
    Oct 2005
    Posts
    8,732
    BG Level
    8
    FFXI Server
    Carbuncle

    booo python (if only google had gone with ruby instead!)

  7. #7
    Bagel
    Join Date
    Jan 2006
    Posts
    1,428
    BG Level
    6

    Python is a fairly easy language to pick up if you're used to C++ / VB (.net? or vb6?).

    I just randomly decided to write a custom language interpreter for a school assignment in python. Was able to pick up the differences in the language fairly easily.

    Also, I'm fairly sure google is entirely based on python.

  8. #8
    PROM KING OF
    SHOWDOWN HIGH

    Join Date
    Dec 2008
    Posts
    65
    BG Level
    2

    Quote Originally Posted by Darus Grey View Post
    LISP says wat?!
    "I'm a great language that's of no practical use to anybody!" Seriously, while I won't debate how great LISP is, there's surely a reason why OSes, games, application software, embedded software, so on, are all written in other languages.

    Quote Originally Posted by Zhais View Post
    Also, I'm fairly sure google is entirely based on python.
    Go is kind of an interesting idea. As far as I know, the major brains behind Google's indexing are written in C++ with bindings to all the languages mentioned in the wiki article.

  9. #9
    PROM KING OF
    SHOWDOWN HIGH

    Join Date
    Dec 2008
    Posts
    65
    BG Level
    2

    Oh, also Numbers, regarding learning Python, I'm not sure how it stacks up, but Google offers their own classes.

  10. #10
    Chram
    Join Date
    Jun 2006
    Posts
    2,737
    BG Level
    7

    Quote Originally Posted by Zeith View Post
    "I'm a great language that's of no practical use to anybody!" Seriously, while I won't debate how great LISP is, there's surely a reason why OSes, games, application software, embedded software, so on, are all written in other languages.
    /derail on , I'm gonna spoiler this, because woah, it ended up a lot longer then I intended. The debate for the ages that no one asked for!
    Spoiler: show

    The reason isn't technical, it's tradition. The major players supported different bases, and depending on which camp you were in(IBM means you're probably using Java, Microsoft C family, and now-a-days, Google means python). These large companies have a financial incentive to keep people segregated by language, it's why their workforces don't mix nearly as much as you'd think, by keeping someone in the "Java circle" or instance, you're really limiting their work-opportunities, mainly to ones that indirectly benefit you. LISP was always basically non-profit and open, which is why it languished in Academia for 1/2 a century.

    The second major reason which is also tradition, is that learning a programming language is very much like learning a real language, in-that you don't just learn the syntax and vocabulary, but you learn to THINK in terms of the limitations, as a bilingual native speaker, there's often times I think in my head something in English I mean to say in French, and then realize there's no equivalent expression, and then have to play work-around to get a similar result. You get "used" to the concept, and working around it.

    Basically, C people(people whos primary influence is C family languages) think in C, they don't think outside of C(often). The propagates throughout a company, and then as new companies start, they imitate those who were successful, then as their code base builds, where they've invested hundreds of thousands of man hours into building C based libraries, they once again have a huge financial investment in never switching from C.

    That is the primary reason you see what you see in programming today.

    The final reason relates to the second, LISP's syntax(or more accurately...lack of...) is so alien that if you're used to the above mentioned schemes(punharhar) that it's almost like starting from scratch, a lot of what you learn in C can help you learn java, for instance, but with LISP little of that transfers over... Types? Who cares? Variables? no...lists!, the fundamentals are so wildly different that you have to start over.

    TL : DR version: People get set in their ways, it doesn't mean their ways are "better".

    Now, onto the technical side...

    The reason I mentioned it specifically in regards to prototyping, is because, on average, the biggest barrier to commercial prototyping is the actual time it takes to type in the code, and that's exactly where LISP shines, it takes between 30-50% less physical characters to get the same end-result as in every other language, which means 30%-50% less time.

    In terms of functions, LISP has every function every other programming language does, and dozens they don't. To put it as Paul Grahm says "Why would you use a less capable tool that takes longer to use?"
    And if it doesn't? you can add it without hassle because LISP is made of LISP. My analogy of comparing LISP to English is actually pretty apt, it's a programming language that assimilates other programming languages, and many of the great innovations of the past 20-30 years, were in LISP a decade or more earlier.

    In the last 15 years, we've actually seen another huge innovation(this is why LISP has been seeing a resurgence of popularity since the 90s), since you can fairly easily incorporate foreign code libraries into LISP implementations(i.e. I can use LISP to implement a C library into LISP, thus allowing you to preserve resources you already spent), and dialects even entirely based on this concept(I'm looking at you, Clojure).

    Just personal experience, but I started out doing basic, C, and then java all those years ago, then 10~ years ago switched to LISP, and I can't imagine how programmers deal with all the limitations they do, or that I used to, it took me a long time to basically unlearn all my bad habits, but the reward was basically unlimited freedom and never having a "Well, I just can't do THAT in C" moment EVER AGAIN. There's a reason people talk about LISP in terms of having epiphanies, it's just a different level. Oh...and Macros. MACROS

    Also, just for the record, Google is one of the biggest LISP employers and the most critical parts of the google search engine are done in LISP. Though ironically that has mostly to do with tradition too, since it's pretty much a requirement that any computational linguist learns LISP.

  11. #11
    PROM KING OF
    SHOWDOWN HIGH

    Join Date
    Dec 2008
    Posts
    65
    BG Level
    2

    Thanks for a well-reasoned reply. My apologies to Numbers for continuing off-topic what could be a conversation in PM in hopes that others might find a discussion as interesting as I do.

    Spoiler: show

    Quote Originally Posted by Darus Grey View Post
    The reason isn't technical, it's tradition. The major players supported different bases, and depending on which camp you were in(IBM means you're probably using Java, Microsoft C family, and now-a-days, Google means python). These large companies have a financial incentive to keep people segregated by language, it's why their workforces don't mix nearly as much as you'd think, by keeping someone in the "Java circle" or instance, you're really limiting their work-opportunities, mainly to ones that indirectly benefit you. LISP was always basically non-profit and open, which is why it languished in Academia for 1/2 a century.
    I agree that it was ahead of its time as many have been (Smalltalk comes immediately to mind) but I'm not sure that its openness is what relegated it to its relative obscurity. Plenty of other languages have been plenty open. K&R came out in 1972, and that and more technical acumen than I've got is all it takes to create a C compiler. Python was open from the beginning, and when it was under Sun's control, they did a more than their fair share to make it an open language.

    Quote Originally Posted by Darus Grey View Post
    The second major reason which is also tradition, is that learning a programming language is very much like learning a real language, in-that you don't just learn the syntax and vocabulary, but you learn to THINK in terms of the limitations, as a bilingual native speaker, there's often times I think in my head something in English I mean to say in French, and then realize there's no equivalent expression, and then have to play work-around to get a similar result. You get "used" to the concept, and working around it.

    Basically, C people(people whos primary influence is C family languages) think in C, they don't think outside of C(often). The propagates throughout a company, and then as new companies start, they imitate those who were successful, then as their code base builds, where they've invested hundreds of thousands of man hours into building C based libraries, they once again have a huge financial investment in never switching from C.
    Now this is something that I agree with. There are those moments (which you reference later, I think) where you finally understand a core difference in a programming paradigm (cherry picking, OO) and it changes the way you design, the way you think. Those times when you get tired or stuck, though, you'll usually revert to whatever it is you know best. Java users will throw more objects at it, C people will functionally decompose.

    Those thousands of man hours, and the mythical months they represent I think are the crux of the issue. What makes Python good for prototyping, what made Perl good for prototyping before it, is the community support. With python, you can get, depending on how hard you look, everything from an HTTP stack to an OpenGL implementation all with one directive. import.

    I will agree with you, however, that companies try to steer the discussion toward their language of preference. I work at a University, and through their MSDNAA program, Microsoft gives away a lot of their software, to include Windows and Visual Studio. They might lose a sale on this, sure, but when these students graduate and move on to the "real world", they're going to be familiar with Microsoft products, and so are going to exert pressures on their employers to make those products available. If we want to get paranoid with it, this explains Visual Basic.

    Quote Originally Posted by Darus Grey View Post
    That is the primary reason you see what you see in programming today.

    The final reason relates to the second, LISP's syntax(or more accurately...lack of...) is so alien that if you're used to the above mentioned schemes(punharhar) that it's almost like starting from scratch, a lot of what you learn in C can help you learn java, for instance, but with LISP little of that transfers over... Types? Who cares? Variables? no...lists!, the fundamentals are so wildly different that you have to start over.
    I don't think anyone would argue that knowing more than one language makes you a better programmer, though this is something I've debated myself about for a long time. Does it make more sense to learn as many different languages, or more appropriately perhaps approaches as exemplified by languages (e.g. functional, imperative, OO) or should you spend that time becoming a better programmer in one language? Again, as you say below, people get set in their ways, and it doesn't mean they're better. However, it doesn't mean necessarily that they're worse. What's bad is holding onto a perspective for personal reasons and insisting they're technical, which is where the majority of flame wars start. Explain it with avoidance of cognitive dissonance (viz. "Of course Erlang is the best because it is the language I know and I am the best QED") or laziness.

    The answer I come to most often is so obvious and dull that it has to be the right one, which is that there are certain languages that are suited to certain tasks, and there are languages less suited to those tasks. I like C++ because I like to model things, and being able to write a program as a simulation of a real or imagined interaction suits me. Some people like C# because they don't know any better.

    Quote Originally Posted by Darus Grey View Post
    TL : DR version: People get set in their ways, it doesn't mean their ways are "better".
    See, there it is, right there.

    Quote Originally Posted by Darus Grey View Post
    Now, onto the technical side...

    The reason I mentioned it specifically in regards to prototyping, is because, on average, the biggest barrier to commercial prototyping is the actual time it takes to type in the code, and that's exactly where LISP shines, it takes between 30-50% less physical characters to get the same end-result as in every other language, which means 30%-50% less time.

    In terms of functions, LISP has every function every other programming language does, and dozens they don't. To put it as Paul Grahm says "Why would you use a less capable tool that takes longer to use?"
    And if it doesn't? you can add it without hassle because LISP is made of LISP. My analogy of comparing LISP to English is actually pretty apt, it's a programming language that assimilates other programming languages, and many of the great innovations of the past 20-30 years, were in LISP a decade or more earlier.

    In the last 15 years, we've actually seen another huge innovation(this is why LISP has been seeing a resurgence of popularity since the 90s), since you can fairly easily incorporate foreign code libraries into LISP implementations(i.e. I can use LISP to implement a C library into LISP, thus allowing you to preserve resources you already spent), and dialects even entirely based on this concept(I'm looking at you, Clojure).
    A lot of these statements could be made regarding python too, but to present a clearer definition. When I say prototyping, what I mean is this: Say you're writing a game. This is something I have been trying to do for years. Something so simple as, let's say, a side-scrolling platformer, can become very complex. You need to think about how you're going to handle, at a bird's eye view, input, 2d graphics, possibly sound, and the core of your engine. ("Business logic.")

    Any of these is a very interesting domain in its own right, but if I'm making a game, what I want to do is write the part of my game that differentiates it from other games. I don't want to spend a whole lot of time writing code to handle blitting, or reading from the keyboard or joystick. Thankfully, there's SDL for that, so I can focus more on the unique qualities of my game.

    In my (admittedly limited) experience, Python has modules that make pretty much everything like this. If you want to write interfaces to microcontrollers or you want to write a RESTful interface (both things I personally want to do) you can find a library for Python that will take care of the established protocols for you, and will likely give you a clean interface that maps conceptually to what you're dealing with.

    Quote Originally Posted by Darus Grey View Post
    Just personal experience, but I started out doing basic, C, and then java all those years ago, then 10~ years ago switched to LISP, and I can't imagine how programmers deal with all the limitations they do, or that I used to, it took me a long time to basically unlearn all my bad habits, but the reward was basically unlimited freedom and never having a "Well, I just can't do THAT in C" moment EVER AGAIN. There's a reason people talk about LISP in terms of having epiphanies, it's just a different level. Oh...and Macros. MACROS

    Also, just for the record, Google is one of the biggest LISP employers and the most critical parts of the google search engine are done in LISP. Though ironically that has mostly to do with tradition too, since it's pretty much a requirement that any computational linguist learns LISP.
    I promise I'm not saying this to be mean, but based on a Google search, the most critical parts of the Google search engine are done in every language ever invented.

    To summarize my point, write with a language only if what makes a language special interests you. If you have something you want to write (a game, automatic sprinkler control, a web-based chat room) then write that thing in the language that makes it easiest to write.

    Even if it is VB6.

  12. #12
    Very Sexy Nerd
    Join Date
    Oct 2005
    Posts
    8,732
    BG Level
    8
    FFXI Server
    Carbuncle

    (Lisp (make (hurt( head))))

    :<