PDA

View Full Version : Learn Python for personal P99 apps?


Treefall
07-10-2017, 02:05 PM
Hi all,

I'd really like to learn programming for fun. I know 0%. It would not be something I'd ever make a career out of.

With that said, I've read that it's all about finding problems/projects you're motivated to fix/make happen.

Would Python be capable of reading p99 chat logs and then using that information to display related information?

My goal isn't to make anything that messes with the software or automates, rather I just want to try making fun projects that turn data into relevant information.

Would another language be better suited?

Crookstinger
07-10-2017, 02:34 PM
Python works fine for writing a log parser. I've written my own in Python that does a variety of tasks. I don't know any other languages extensively, so I can't speak to whether or not Python is best, but for what I need it to do, it works great. I'm sure there are several other languages that would work as well if not better, but I myself am learning Python so that's what I used.

Izmael
07-10-2017, 03:25 PM
If on Linux or Mac, I'd recommend just shell scripting. That will teach you a lot of Unix basics that a "real" language won't.

I do not recommend Perl as first language to learn in 2017.

Python pretty good if you end up disliking shell.

loramin
07-10-2017, 03:26 PM
Python is a great option. Javascript might be a better one, because it can be used in places Python can't (eg. web), but for pure file parsing Python is probably easier to learn.

loramin
07-10-2017, 03:28 PM
I like Perl for log monitoring.

The 1990s called: they want their programming language back :p

skarlorn
07-10-2017, 03:43 PM
when former guide moregan and I were planning on creating custom server events, I started learning Perl to write stuff for EQ

then he went crazy.

so maybe Perl would be a good idea, since a GM and Jeremy both suggest using it

maskedmelonpai
07-10-2017, 03:45 PM
i thought perl is what all the eqemu quest scripts is written in? I learned little bit for when I was gonna make my own server I made a Orator of Faiths NPC to change religion so my dark elf could warship the Duke and it work. it was just a proof of concept thingy, but then I realize the stock axclassic database that I was using was full a bunch a garbage :c and i not liek the idea of all that sql editing since I dunno nothing about it.

skarlorn
07-10-2017, 03:51 PM
made a Orator of Faiths NPC to change religion so my dark elf could warship the Duke and it work.



*Triggered 4 squirt*

Patriam1066
07-10-2017, 04:05 PM
Which language is better for extraction and manipulation?

Hebrew

skarlorn
07-10-2017, 04:10 PM
hueheueheu

dafier
07-10-2017, 04:11 PM
This thread is full of ebonics.

Izmael
07-10-2017, 05:36 PM
Which language is better for text extraction and manipulation? CPAN is a beautiful resource for noobs too =)

He just wants to parse P99 logs and do some very basic stuff with it. He doesn't need the Death Star which is Perl.

TBH PHP (which can be ran as a CLI interpreter) is a pretty decent language to learn for a noob. Of course it's not really initially meant for text manipulation but it will get the job done and can potentially be SO much more useful later in life than Perl.

Also to write good Perl code your beard must at least reach your belly button.

loramin
07-10-2017, 05:48 PM
Which language is better for text extraction and manipulation? CPAN is a beautiful resource for noobs too =)

Python, like OP suggested?

Also Python 3, Java, Javascript, Dart, CoffeScript, Ruby*, C, C++, ... heck even PHP.
*if you don't use the Perl parts in it

Perl is teribad, and the only reason it was so popular for cgi-bin scripts in the 90's was because people didn't know any better. Perl scripts are about as easy to comprehend the day after you've written them as a really complex regular expression. There's a reason why no major website still uses Perl.

Treefall
07-10-2017, 07:15 PM
Thanks everyone! I think I'll puts with Python. :)

mickmoranis
07-10-2017, 09:57 PM
Python, like OP suggested?

Also Python 3, Java, Javascript, Dart, CoffeScript, Ruby*, C, C++, ... heck even PHP.
*if you don't use the Perl parts in it

Perl is teribad, and the only reason it was so popular for cgi-bin scripts in the 90's was because people didn't know any better. Perl scripts are about as easy to comprehend the day after you've written them as a really complex regular expression. There's a reason why no major website still uses Perl.

TABS not spaces :mad:

skarlorn
07-10-2017, 10:08 PM
http://i.imgur.com/iGkFRSb.gif

mickmoranis
07-10-2017, 10:47 PM
Perl is impossible to obfuscate, but it's free and really easy to get started with. I use it for the red leaderboard just to monitor logs - then it hits a PHP script.

Array slices? Cmon!

Can we use it to make a statue of rygrim somewhere that stays logged in permanently? Would donate.