Author Topic: Coming Soon  (Read 210020 times)

FloatingFatMan

  • An Offal
  • Elite Boss
  • *****
  • Posts: 1,178
  • Kheldian's Forever!
Re: Coming Soon
« Reply #340 on: June 29, 2015, 06:53:43 AM »
some of my questions have already been answered and I thank you all for your time in answering them, such as the knowledge the XMPP does not send IP or port externally.  or stuff like "you have to send it as an XML stanza,  Note that if it isn't a chat message, character presence, or position metadata, PC will ignore it."

5 minutes of searching the XMPP spec documentation (which is the first thing you should have looked at when getting the idea for this program) would have told you about the IP/port restriction.  That alone killed your project idea.

Thats the other side of it, I could make a python XMPP server, but then I really would have to read all the documentation, 4 years is the standard development time for new projects of this caliber with one person, and 4 years is a long time.

If you ever want to get anywhere serious as a programmer, drop Python and start learning C. Python's OK for web based stuff, but as an interpreted language, it will -never- be fast enough to process data from something like PC.  Hell, I use C# mostly at work, and even I sometimes have to resort to C, or even assembler, to get some of the calculations our software needs done quickly enough.

edit: ah yes XML stanzas, the standard XMPP format hence why codewalker dropped the documentation on me. too much to read for 11;57 pm. I'll give it a go after the 10th. but it's learning a whole new language.

XML isn't a language in the programming sense, and you should already know how it works if you're a programmer. All you really need to learn there is the XMPP message format, which shouldn't take more than a few minutes to learn.

Also, I find the fact that you were considering this project and didn't even bother to look up the necessary docs to be quite ridiculous...
« Last Edit: June 29, 2015, 07:23:40 AM by FloatingFatMan »

Arcana

  • Sultaness of Stats
  • Elite Boss
  • *****
  • Posts: 3,672
Re: Coming Soon
« Reply #341 on: June 29, 2015, 09:08:30 AM »
If you ever want to get anywhere serious as a programmer, drop Python and start learning C. Python's OK for web based stuff, but as an interpreted language, it will -never- be fast enough to process data from something like PC.  Hell, I use C# mostly at work, and even I sometimes have to resort to C, or even assembler, to get some of the calculations our software needs done quickly enough.

Hey hey hey now.  Personally, I think everyone should learn C, but that doesn't mean you should use it all the time.  Given the specifications Codewalker has implied Paragon Chat has, python ought to be plenty fast.  In fact, it'll be faster than PC itself runs.  I'm likely to be able to make a PC bot that runs faster than PC, simply because PC has throttles that prevent it from running faster than about one message update per second.  Even without something like psyco or pypy, I had a combat calculator capable of running a few million clocks per minute, easy.

Keep in mind that the devs themselves were integrating LUA into the game server engine specifically to perform dynamic script execution within the engine.  The advantage being that while C was faster, C required code compilation and all that implies.  LUA could be put into the data, and executed by the engine without recompiling the entire engine just to alter the behavior of a single function.  And then of course there's Eve Online, which is directly implemented in Python (Stackless Python, specifically).  Of course, it uses C libraries as well, but that's as much of a knock on Python as called assembly routines are a knock on C.

What you find with things like Stackless in particular and python in general is that the interpretive overhead isn't generally the problem, except in the most extreme of performance situations.  Its usually some other architectural issues that causes tricky problems.  For example, with Eve Online the main problem they've fought over the years is the python interpreter global lock, which prevents multithreaded access to global state.  When they can make threads stateless (relative to the global interpreter state) they can make literally hundreds of thousands of lightweight threads run very fast.  The trick is making the system architecture avoid accessing the global lock as much as possible.

One more small point.  Although python can run as a purely interpreted language, its normally run as bytecode within the python virtual machine: python interpretation is highly accelerated as a result.  And that's the same architecture java itself normally runs as: java p-code within the JVM.  So while there are significant differences in how the languages function syntactically, and they do have different strengths and weaknesses (java doesn't have the same global issues python has due to the way it runs), if python isn't fast enough java itself is likely to be not fast enough either.  And clearly java is fast enough to serve as the central server for Paragon Chat, since Openfire is written in java.

Joshex

  • [citation needed]
  • Elite Boss
  • *****
  • Posts: 1,027
    • my talk page
Re: Coming Soon
« Reply #342 on: June 29, 2015, 10:57:26 AM »
5 minutes of searching the XMPP spec documentation (which is the first thing you should have looked at when getting the idea for this program) would have told you about the IP/port restriction.  That alone killed your project idea.

it made it so I was restricted to 2 options, communicate directly with the XMPP server or make my own client server system, the last option is still possible, and I'm tempted to try. -auth it all starts from there, no wait... I still need a way to break CityofHeroes.exe away from the NCSoft launcher. Codewalker, sorry to bother.. especially with an unrelated question but; how did you manage to make the client run without auto-triggering the NCSoft launcher?

If you ever want to get anywhere serious as a programmer, drop Python and start learning C. Python's OK for web based stuff, but as an interpreted language, it will -never- be fast enough to process data from something like PC.  Hell, I use C# mostly at work, and even I sometimes have to resort to C, or even assembler, to get some of the calculations our software needs done quickly enough.

what Arcana said. I have no troubles with python's speed, and yeah it was restrictive at first (because I followed the book, and the book told me certain things were impossible at current) but I developed methods to get around those restrictions.

XML isn't a language in the programming sense, and you should already know how it works if you're a programmer. All you really need to learn there is the XMPP message format, which shouldn't take more than a few minutes to learn.

Protocol, language, it's all similar. you have to learn new construction rules.

yes the message format is what I was after but, I opened the links given and found pages upon pages or repository and wasn;t awake enough to skim through it to find the message format

Also, I find the fact that you were considering this project and didn't even bother to look up the necessary docs to be quite ridiculous...

meh, the way I figure it is; the docs make you start as a beginner, asking someone who already has a completed work in a program or API yields special extras that aren't apparent in the documentation and can usually summarize the info I need in a few paragraphs as opposed to a few chapters. that info is well enough if you don't plan to actually use the XMPP or XML format from the start (Which I planned not to use because I thought XMPP might supply some form of message customization rather than being bound strictly to XML) I was planning to mimic simple messages. now I see that's redundant as the info I want to send wont even be received..

after looking over the options with an awake mind today, I will not be using XML or XMPP, it's better to try and make my own client/server in python cause that would supply more freedom. I've been considering this for a while, I just never have time to mess with it. got 11 days to do some graphics for my project to hand in for the 10th. I guess I could sacrifice one day just to get the client to run with out the NCSoft launcher via python. just need to know how Codewalker did that.
There is always another way. But it might not work exactly like you may desire.

A wise old rabbit once told me "Never give-up!, Trust your instincts!" granted the advice at the time led me on a tripped-out voyage out of an asteroid belt, but hey it was more impressive than a bunch of rocks and space monkies.

Leandro

  • Elite Boss
  • *****
  • Posts: 310
Re: Coming Soon
« Reply #343 on: June 29, 2015, 11:13:52 AM »
Coh doesn't need the NC launcher at all, so there is nothing to break. Paragon Chat doesn't implement authserver, either, since it handles auth on its own window. The command line for launching the client to talk to Paragon Chat is cityofheroes.exe -project coh -db <IP>.

Funny thing: the COH client does not work with 127.0.0.1 as the server IP. If you pass it that IP, it will resolve the "real" IP for the local computer and connect to that, which triggers firewall warnings on Windows. To get around that, Paragon Chat tells the client to connect to 127.0.0.2, which works fine in Windows but not in Mac/Linux, because only 127.0.0.1 is configured as loopback by default in those operating systems. So, firewall warning, no Mac/Linux compatibility, or hack in Island Rum is needed. I better go talk to Manga.

cohRock

  • Lieutenant
  • ***
  • Posts: 82
    • Rich's Tepid Home Page
Re: Coming Soon
« Reply #344 on: June 29, 2015, 04:11:42 PM »
Hey hey hey now.  Personally, I think everyone should learn C, but that doesn't mean you should use it all the time.  Given the specifications Codewalker has implied Paragon Chat has, python ought to be plenty fast.  ...
Python, Java, C, Javascript, etc., -- humbug!

Ya wanna learn a real language, it's Forth.  And I'm not talking about the modern Forths which run as just another language interpreter.  Nope -- that's sissy stuff.  I'm talking real Forth, where it was the:
  • multi-user operating system
  • device drivers
  • interpreter
  • assembler
  • shell language
  • database
  • text editor
  • application development environment
  • application(s)
(Of course, all this pre-dated GUI's, so all the above could fit into a 64 kbyte environment.)

One did not write programs in Forth; one simply made Forth bigger.  Forth was love.  Forth was life.  Kinda like Shrek, but less green.
-- Rich

Arcana

  • Sultaness of Stats
  • Elite Boss
  • *****
  • Posts: 3,672
Re: Coming Soon
« Reply #345 on: June 29, 2015, 05:13:52 PM »
Python, Java, C, Javascript, etc., -- humbug!

Ya wanna learn a real language, it's Forth.  And I'm not talking about the modern Forths which run as just another language interpreter.  Nope -- that's sissy stuff.  I'm talking real Forth, where it was the:
  • multi-user operating system
  • device drivers
  • interpreter
  • assembler
  • shell language
  • database
  • text editor
  • application development environment
  • application(s)
(Of course, all this pre-dated GUI's, so all the above could fit into a 64 kbyte environment.)

One did not write programs in Forth; one simply made Forth bigger.  Forth was love.  Forth was life.  Kinda like Shrek, but less green.

I wrote in Forth once.  On my Atari 800.  As a professional, a similar language I had some experience with was Pick.  Technically Pick wasn't a language so much as it was an entire system.  Pick was a database masquerading as an operating system with a query language pretending to be a scripting system.  But most people associated the Pick language with Pick itself.  I worked on the Universe version, which had a kind of colorful history of hot potato.

Arcana

  • Sultaness of Stats
  • Elite Boss
  • *****
  • Posts: 3,672
Re: Coming Soon
« Reply #346 on: June 29, 2015, 05:37:57 PM »
the docs make you start as a beginner

Yes.


FloatingFatMan

  • An Offal
  • Elite Boss
  • *****
  • Posts: 1,178
  • Kheldian's Forever!
Re: Coming Soon
« Reply #347 on: June 29, 2015, 05:48:25 PM »
it made it so I was restricted to 2 options, communicate directly with the XMPP server or make my own client server system, the last option is still possible, and I'm tempted to try. [/b]

As has been said, your chances of being allowed to run your app on Titan's server are extremely slim.


yes the message format is what I was after but, I opened the links given and found pages upon pages or repository and wasn;t awake enough to skim through it to find the message format

I found it in just a couple of minutes.

meh, the way I figure it is; the docs make you start as a beginner

You are a beginner.

asking someone who already has a completed work in a program or API yields special extras that aren't apparent in the documentation and can usually summarize the info I need in a few paragraphs as opposed to a few chapters. that info is well enough if you don't plan to actually use the XMPP or XML format from the start (Which I planned not to use because I thought XMPP might supply some form of message customization rather than being bound strictly to XML) I was planning to mimic simple messages. now I see that's redundant as the info I want to send wont even be received..

When it comes to programming, shortcuts like this are bad. If you don't understand the fundamentals of talking to an XMPP server, you have no business doing it.  I once wrote my own MSN messenger client, and to get myself started I used a .NET library I found online. Big mistake.  It never worked right and I couldn't figure out WHY it wouldn't work right because I didn't know anything about the underlying technologies.  I ended up junking all my work, actually reading the damn docs, and starting again.  After I did that, it worked first time and I actually knew WHY the library had failed.

We had a guy at work some time ago who used to dream of all the things he could do, and took shortcuts all the time.  After trying to check in some code that included a copyrighted library he "found online somewhere", he now drives a cab for a living.  I pity any fares he takes anywhere...

after looking over the options with an awake mind today, I will not be using XML or XMPP, it's better to try and make my own client/server in python cause that would supply more freedom.

Best of luck.

Arcana

  • Sultaness of Stats
  • Elite Boss
  • *****
  • Posts: 3,672
Re: Coming Soon
« Reply #348 on: June 29, 2015, 06:15:27 PM »
after looking over the options with an awake mind today, I will not be using XML or XMPP, it's better to try and make my own client/server in python cause that would supply more freedom.
Best of luck.
He's going to need more than luck.  Its hard to be certain, because what the text says doesn't always map to what he intends, but it sounds like he's saying even though Codewalker has done the heavy lifting of figuring out how the client works, and mapped client actions to XML messages, Joshex is going to throw that out the window and just do the messaging raw, himself, because XML's docs are too long.  After, of course, he asks Codewalker "so, in a paragraph or two, how did you do that so I can replicate that work."  Because freedom.

I'm rather at a loss.  Codewalker's platform is about as good as it gets: anyone who can't bot this architecture deserves to have their programmer ID card confiscated.  But he wants to reinvent the wheel with marshmallows and a box of toothpicks, and he's never seen a circle before.

There's always someone that wants to do it the impossible way, because they don't understand the easy way, and can't execute the hard way.  If ever there was a time to sit down and learn the fundamentals, its now.  Its never going to get easier to write a line of code that does something City of Heroes-like.  Oh well.

sdrawkcab

  • Underling
  • *
  • Posts: 1
Re: Coming Soon
« Reply #349 on: June 29, 2015, 06:26:01 PM »
You are a beginner.

And you are a jerk.

Glad to see the typical condescending attitude of city of heroes forum members is still alive and well here. All he did was a bit of theorycrafting and ask a few questions and the way you guys spoke to him completely didn't line up with how he was presenting himself. Why do you feel the need to speak down to people like that? Does it make you feel good about yourself?

Edit: Also, Python is a great language for learning how to code and to work in a modern software company you absolutely do not need to know C. That's just something "veterans" (read: oldies) say because they're still working in grunt-work developer positions after 20+ years in the industry and they need something to maintain their air of superiority over the younger, smarter, faster developers climbing over them on the career ladder.
« Last Edit: June 29, 2015, 06:47:25 PM by sdrawkcab »

benkenobi

  • Underling
  • *
  • Posts: 13
  • Nōlī turbāre circulōs meōs!
Re: Coming Soon
« Reply #350 on: June 29, 2015, 06:42:10 PM »
This thread reminds me of *this thread* https://news.ycombinator.com/item?id=2069810

Anyway, every implementation (of life) is riddled with hidden gotchas, and we're all jerks.. including the guy who wants us to PM him what we think his (probably) one-way hashing algorithm says.  ;)

We could do with being nicer and less patronizing of one another methinks! <3
# Quantum Mechanics
(rand(0..1)) ? True : False;

Arcana

  • Sultaness of Stats
  • Elite Boss
  • *****
  • Posts: 3,672
Re: Coming Soon
« Reply #351 on: June 29, 2015, 07:24:20 PM »
Funny thing: the COH client does not work with 127.0.0.1 as the server IP. If you pass it that IP, it will resolve the "real" IP for the local computer and connect to that, which triggers firewall warnings on Windows.

On my Windows machine trying to direct the client to 127.0.0.1 causes it to bind to and try to connect to my VMware virtual network adapter.  So its apparently just grabbing an interface and pulling the addresses off of that.

It also getaddrs whatever you feed it before checking it, because it wouldn't be tricked by all the normal ways of faking this sort of thing out (for example, feeding it cityofheroes.exe -project coh -db 2130706433 works, but also bounces you to a real address).  I gave it my best shot there.

FloatingFatMan

  • An Offal
  • Elite Boss
  • *****
  • Posts: 1,178
  • Kheldian's Forever!
Re: Coming Soon
« Reply #352 on: June 29, 2015, 07:45:30 PM »
And you are a jerk.

As far as XMPP is concerned, he IS a beginner. So am I.  This is a fact and stating facts does not make one a jerk.  The difference between he and I is I'm reading the specification docs whilst waiting for CW to release his work. Then I might take a look to see if I want to write some RP bots.

Arcana

  • Sultaness of Stats
  • Elite Boss
  • *****
  • Posts: 3,672
Re: Coming Soon
« Reply #353 on: June 29, 2015, 07:59:14 PM »
We could do with being nicer and less patronizing of one another methinks! <3

I should point out that a lot of people have been asking a lot of questions, technical and operational, some interesting and some trivial, and pretty much all of them have been answered fairly directly and politely, including the majority of Joshex's questions.

However, leaving aside Joshex's history for grandiosity, Joshex committed a sin: the gravest sin you can commit in technical circles, and I don't think you or sdrawkcab fully appreciate it, because you may only be looking at the tone of the text.  The gravest sin you can possibly commit in technical circles, and its something Joshex will have to learn if he is going to function in them one day, is you never, ever, ever imply that your time is more valuable than the time of the people who's help you're asking for.  Particularly when it comes to doing your own homework, RTFM, and acquiring the context to ask realistic questions.  He may say he did no such thing, but that's irrelevant: the text speaks for itself.

When the average player says "I have no idea how any of this works but I'd like to know if we can use Paragon Chat from multiple computers" I answer that question in the spirit it was asked: the person genuinely has no technical knowledge, and doesn't need to know the technical details, but wants to know something about how the software is likely to work for them.  But when Joshex says he's going to script up the ski slopes, and he just wants to know how they work and how the data gets sent around and how to get the IP addresses of connected clients, that's different.  Giving him the full benefit of the doubt that he's actually going to try to do what he claims he's going to do, we - the technical we - know his very questions imply he doesn't have the requisite knowledge to attempt to do that.  Its not even enough to theorycraft it, because all of his assumptions about everything are wrong.  Again, giving him the full benefit of the doubt, the correct thing to do is to point him to the information not that answers his direct questions, because those direct questions don't have direct answers, but to the context information he needs so that when he just even thinks about the problem he's at least thinking about the right problem.

You can either try to learn enough so that you're asking reasonable questions in the first place, or you can drop the pretense of wanting to know things from a technical perspective.  But when you say, or even imply, that you're a technical person with all these great ideas, but you just need people to do the trivial stuff like tell you how everything works or explain how to actually make your idea work, that is never going to incite a good response.  There are many technical circles, in fact, where it will permanently mark you for life as one of those

Thing is, every time it happens, I forgive him these errors.  Every time Joshex asks a technical question, I tend to start from scratch and answer the question like I would any other, giving him the full benefit of the doubt with regard to how he intends to use that information.  As I would for anyone else.  That's not a courtesy most people get in the real world.

Now, if that sometimes comes off as condescending, so be it.  I'd be willing to bet even Joshex would prefer I answer his questions the way I currently do, rather than the alternative of ignoring them completely, which is the only other option.  But I'm willing to be disproved on that count.

FloatingFatMan

  • An Offal
  • Elite Boss
  • *****
  • Posts: 1,178
  • Kheldian's Forever!
Re: Coming Soon
« Reply #354 on: June 29, 2015, 08:05:22 PM »
^ You have infinitely more patience than I, Arcana. I take my hat off to you (and sneak into your kitchen to steal some apples). ;)


benkenobi

  • Underling
  • *
  • Posts: 13
  • Nōlī turbāre circulōs meōs!
Re: Coming Soon
« Reply #355 on: June 29, 2015, 08:22:40 PM »
^ You have infinitely more patience than I, Arcana. I take my hat off to you (and sneak into your kitchen to steal some apples). ;)

HA! -- true, I would've just ignored him.

I guess I have the opposite problem, I have to constantly check myself for socially correct responses.
On the technical side, I have nothing to prove: the baddies I just ignore, (note above.)

 :-X
# Quantum Mechanics
(rand(0..1)) ? True : False;

FloatingFatMan

  • An Offal
  • Elite Boss
  • *****
  • Posts: 1,178
  • Kheldian's Forever!
Re: Coming Soon
« Reply #356 on: June 29, 2015, 08:35:07 PM »
HA! -- true, I would've just ignored him.

I guess I have the opposite problem, I have to constantly check myself for socially correct responses.
On the technical side, I have nothing to prove: the baddies I just ignore, (note above.)

 :-X

I don't believe in being socially/politically correct.  I'd rather be blunt and honest, than spare someones feels by lying. :p  I dislike lying, a lot, and try to avoid it as much as I can.

Gothenem

  • Minion
  • **
  • Posts: 43
Re: Coming Soon
« Reply #357 on: June 29, 2015, 08:44:08 PM »
I don't believe in being socially/politically correct.  I'd rather be blunt and honest, than spare someones feels by lying. :p  I dislike lying, a lot, and try to avoid it as much as I can.

You, sir, are a better offal than I.

Oh, and I don't post much here, but I lurk, and follow. Paragon chat has me excited, but I have an interesting question.

Now, I understand we can connect to this via Trillian, which is awesome, since I use Trillian alot, and can thus get updates on the happening of the community while at work and such. I also understand that "local and emote" chats won't work, because you will not have an avatar, as that requires the CoH client.

How DOES one appear to the CoH Client users? Are you just a "Voice from the Heavens?" My question is more on the lines of if I try to pull up a window using the global handle. Also, can said Trillian User be logged in with a character, or just via global handle?

Also, as this is not Icon, I presume we cannot load NPC's onto the world. Am I correct in this or not?

Arcana

  • Sultaness of Stats
  • Elite Boss
  • *****
  • Posts: 3,672
Re: Coming Soon
« Reply #358 on: June 29, 2015, 08:46:32 PM »
^ You have infinitely more patience than I, Arcana. I take my hat off to you (and sneak into your kitchen to steal some apples). ;)

You can catch more flies with honey than vinegar.

Then again, the point of that is to kill the flies, so maybe there's something in there you can work with.

benkenobi

  • Underling
  • *
  • Posts: 13
  • Nōlī turbāre circulōs meōs!
Re: Coming Soon
« Reply #359 on: June 29, 2015, 08:49:03 PM »
I don't believe in being socially/politically correct.  I'd rather be blunt and honest, than spare someones feels by lying. :p  I dislike lying, a lot, and try to avoid it as much as I can.

I also dislike lying, and sometimes let emotion cloud my judgement like anyone.
But lying is not the same thing as articulating your responses to avoid conflict, which is a social tool.

 :)
# Quantum Mechanics
(rand(0..1)) ? True : False;