Racket's underlying I/O seems sophisticated to me, and contest-friendly parsing conveniences can be layered atop that.

IIRC, a long time ago, Olin Shivers made some parsing stuff for Scheme, which you might want to steal or at least look at. I'm not sure where it all went, or who else was involved, but I'd start looking here:

https://scsh.net/docu/html/man-Z-H-7.html#node_chap_6
https://scsh.net/docu/html/man-Z-H-8.html#node_chap_7
https://scsh.net/docu/html/man-Z-H-9.html#node_chap_8

The Racket package catalog is also worth a look. I mostly know my own old packages, so I'll mention a few parsing-related ones:

For the broad category of CSV format data files (in addition to lots of quoting and escaping conventions, can also handle inputs like ASCII tables with columns separated by vertical bars, for example):
http://www.neilvandyke.org/racket/csv-reading/

For JSON parsing, you probably want to use the core Racket JSON stuff, but at one point I accidentally made a folding JSON parser (unfortunately, not using `syntax-parse`) that might come in handy for big data:
http://www.neilvandyke.org/racket/json-parsing/

For HTML parsing and rewriting, an ancient Scheme library probably still works (but you'll want to get comfortable with SXML ahead of time, especially if you're new to old-school list processing):
http://www.neilvandyke.org/racket/html-parsing/
http://www.neilvandyke.org/racket/sxml-intro/

If a contest ever requires that your program modify its own source file, we got yo back:
http://www.neilvandyke.org/racket/progedit/

Aside on programming contests: I see them as a good *side* thing, kept in perspective. It's an alternative way that some people get excited about programming and problem-solving, and then put in the work and learn things along the way. Two provisos:

(1) We have to be aware that contests can be anti-engineering, and remember to also learn engineering. Know when to be in contest mode, vs. normal engineering mode, vs. somewhat sloppier mode, vs. urgent yet it must work perfectly and resiliently the first time or the asteroid will destroy Earth engineering mode, vs. the asteroid mode plus it might also need keep deflecting asteroids for years after mode.

(2) Don't let the existence of programming contests discourage people from learning programming or other STEM stuff. The contests are artificial, and only loosely related to programming/STEM goals. Some people have a big head start on being good at contests, but, if you want to do programming and other STEM stuff, you can get good at that without ever having to be good at contests, nor even try contests. (Related: try to find and remember a balance between humility and confidence -- in school, immediately post-school, and later. If we're always thinking that we have more to learn, but that we do know some things, and can build upon that to help tackle goals that seem hard, I think that's a good starting point for finding this balance.)

--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to