lainchan / λ

parser general

Joe Bloggs · 2025-07-03 16:12
A parser is a software component that takes input data, typically text, and transforms it into a structured format that a computer can understand and process. It analyzes the input to determine its grammatical structure, a process known as parsing. Parsers are often used in compilers, data processing, and web scraping. hello, lainons. i'm in the process of architecting and writing a parser for scraping finance forumns, rss and ticker, so I thought making a general for parsers would help me get some ideas for the general structure, maybe help me out with sources, etc. my goal is to write a decent parser for an automated trade bot, which will trade forex and crypto. i'm planning to use perl5 for scraping and its regex, and potentially ruby for the controller.(USER WAS WARNED FOR THIS POST, You should always elaborate on your opinions rather than just spilling the soykaf.)
Spike Spiegel · 2025-07-04 03:59
>>42528 For diagrams, try: - https://nomnoml.com/ OR - https://mermaid.js.org/ I'm more familiar with nomnoml, but GitHub supports embedding mermaid diagrams. Open source tooling is available for both. Example: https://pastebin.com/jNDmaNig
Arisu Mizuki · 2025-07-04 04:15
>>42531 >>41761 (local nomnoml workflow example)
list · 2025-07-04 19:10
>>42531 thanks for the help lainon. any advice on specific sources for finance data? i'm thinking maybe reddit, some rss feeds from major funds
Netrunner · 2025-07-04 19:17
>>42534 Depending on where you're going to be executing trades, you might have data available to you from their APIs. If you're trading crypto, that data is most likely free and public too. I'm not a python guy, but they've solved this particular problem pretty thoroughly already. https://github.com/bmoscon/cryptofeed
Nanashi No Gombe · 2025-07-05 07:14
>>42534 >any advice on specific sources for finance data? Dude if you really want to make money from this then you should test your hypothesis first. Just because some assholes blabber on reddit about a financial instrument that does not mean it is a good idea to invest into it. For example, IG offers free sentiment data for every instrument: https://www.ig.com/en/trading-strategies/_how-to-trade-using-ig-client-sentiment-240912 And other brokers have similar data. But just because 60% of traders are long into something, that does not mean the price will go up, or more importantly, it does not tell you by *how much* it will go up. Which is the most important thing to know before you enter a trade - will the profit cover your costs? So you can look into level 2 data to see the full order book. Some shady websites charge for it but the data is actually available for free, e.g. the German Stock exchange provides this data after creating an account. If you really want to make money from this, you should not waste time by implementing a parser. You need to write down your hypothesis and test it manually before programming anything. After that you will have an idea if this is going to work (maybe) and what you need to program.
Hououin Kyouma · 2025-07-07 12:56
>>42528 any recommended docs/videos to learn how to write parsers/parser grammars?
Dox · 2025-07-07 15:43
>>42557 heres a book on some parsing techniques
Rick Deckard · 2025-07-07 16:55
>>42558 nta but that{s just the kind of book I've always loved, thank you!