admin-announcements

Announcements from the Clojurians Admin Team (@U11BV7MTK @U077BEWNQ @U050TNB9F @U0ETXRFEW @U04V70XH6 @U8MJBRSR5 and others)
nathansmutz 2016-01-25T02:35:13.000019Z

I'm working on my first project to scrape specific data out of human-readable text reports. I need to scan for a specific string and then apply some logic to material on either side of it. Is there a recommended library for that kind of thing?

ckarlsen 2016-01-25T02:42:43.000020Z

https://github.com/Engelberg/instaparse

2016-01-25T02:54:43.000022Z

hey @nathansmutz instaparse is a great library when you have to make a parser from a grammar, but for ordinary text, it may be that all you need are regular expressions. Are you familiar with those? Or even clojure.string/split may be enough.

2016-01-25T07:31:20.000024Z

hey fellow clojurians, i'm starting a new web project and being fairly new to clojure in production i could need a hint or two 😉 it's a website i need to rebuilt, so i want to use the chestnut leiningen template to use clojure/clojurescript, ring, compoujure and om.

2016-01-25T07:33:44.000025Z

i need hints when it comes to best practices in project setup, e.g all the samples i have seen use only a few routes on the server side and a single clojuresript file managing the whole app for the client side, but i need a lot more routes and views 😉

2016-01-25T07:36:46.000026Z

any pointers will be heavily appreciated

nathansmutz 2016-01-25T08:22:36.000027Z

Thanks @ckarlsen and @jonahbenton . Looking at it, I see I can accomplish this with Clojure's built in string stuff. I've been meaning to get deeper into regex. I guess now I've "got two problems" :-) I'm mining some converted PDFs for data on courses students need to graduate. I'm probably still thinking about it too procedurally; but what has to happen is: after a certain trigger phrase, look for the string "Still Needed:" grab a number then, depending on whether the next word is "credits" or "class" search to the left of "Still needed:" for a phrase describing the type of credits, or search to the right of "Still Needed" for course names. A course subject might be followed by multiple course numbers identifying multiple classes: "CS 161 and 162" etc.

swizzard 2016-01-25T18:22:33.000034Z

@nathansmutz: have you looked into instaparse?

futuro 2016-01-25T19:29:36.000035Z

@dev-hartmann: I personally split up my UI into separate namespaces, then require them all in core and do my routing/general architecture there

futuro 2016-01-25T19:30:12.000036Z

@dev-hartmann: In fact, my core ns is pretty sparse, as it's only real purpose is to bring all of the other pieces of the app together cohesively

futuro 2016-01-25T19:30:35.000037Z

so UI, state, routing, etc. all live in their own ns

futuro 2016-01-25T19:31:45.000038Z

I like doing this because each ns will have a couple functions that other ns's need, and the rest is hidden, so I only need to think about one ns at a time

2016-01-25T19:42:52.000040Z

@futuro: thanks for your reply!

2016-01-25T19:47:10.000041Z

@nathansmutz: in processing messy text, such as in converted PDFs, a q&d mechanical procedural approach is usually best. functional processing opportunities usually only kick in when data is nice and clean and orderly and amenable to processing without special conditions.