News for hackers. Stuff that matters.
Re:How to parse EVE Online chat logs (in Common Lisp) by Yhippa on Saturday November 27, 2021 @11:44PM (#29366215)
In general, what is a good language to parse game logs?
Re:How to parse EVE Online chat logs (in Common Lisp) by stevekemp on Sunday November 28, 2021 @01:05AM (#29366591)
Most languages can do most things, so you should pick the one(s) you know best.

That said traditionally perl would be the choice for parsing, and it is still a good candidate. For simple extraction - think "programatic grep" - then awk is also a good choice.

Re:How to parse EVE Online chat logs (in Common Lisp) by duped on Sunday November 28, 2021 @01:58AM (#29366803)
I've found for down and dirty parsing, you can almost always parse simple log/structured output using operations like `split`, `substring`, `prefix`, and `suffix` where :

- `split` splits a string at an index or into substrings separated by a pattern - `substring` takes a substring of a string for a range of indices - `prefix` returns true if the start of the string matches a pattern, false otherwise - `suffix` returns true if the end of the string matches a pattern, false otherwise

Python and C++ both have good standard library functions for these tasks. What's less important than a language for your parser is a language to plug the output into to make something useful.

Re:How to parse EVE Online chat logs (in Common Lisp) by tomjen3 on Sunday November 28, 2021 @03:29AM (#29367190)
Unless the game logs are in json or xml, the easiest language to get started in (assuming a few regexs isn't enough) is whatever language you know, that has a good packrat parser library.
Re:How to parse EVE Online chat logs (in Common Lisp) by bjoli on Sunday November 28, 2021 @03:59AM (#29367351)
Anything with parser combinators or PEG support. I had to learn PEG parsing for a project when I was a kid, and that has been one of my most useful skills.
Re:How to parse EVE Online chat logs (in Common Lisp) by Yhippa on Monday November 29, 2021 @01:30AM (#29377018)
Pardon, what is PEG?
Re:How to parse EVE Online chat logs (in Common Lisp) by bjoli on Monday November 29, 2021 @05:09AM (#29378096)
Parsing Expression Grammar. https://en.m.wikipedia.org/wiki/Parsing_expression_grammar

The examples section under definitions is the easiest way to understand them.

Re:How to parse EVE Online chat logs (in Common Lisp) by dunefox on Sunday November 28, 2021 @05:06AM (#29367700)
I'm using F# and FParsec atm, works great.
Re:How to parse EVE Online chat logs (in Common Lisp) by 2OEH8eoCRo0 on Sunday November 28, 2021 @12:10AM (#29366351)
Perl
Re:How to parse EVE Online chat logs (in Common Lisp) by jhgb on Sunday November 28, 2021 @04:03AM (#29367374)
Also known as Practical EVE Re-Engineering Language?