Re: [racket] sxpath, txpath and accessors

2015-03-03 Thread Sanjeev K Sharma
On Tue, Mar 03, 2015 at 09:14:42AM -0800, John Clements wrote: > Also, why do I have to use 'ntype??' > instead of sxpath? Not sure. I think this library might gain a great deal > from being a *teensy* bit less higher-order. > I started using ntype there after realizing sxpath can't make predic

Re: [racket] sxpath, txpath and accessors

2015-03-03 Thread Sanjeev K Sharma
dang ... thanks so much I don't know how much time you saved me, this was the tack I was on #lang racket (require sxml);(require sxml/html) (define doc(ssax:xml->sxml(open-input-string" www content

Re: [racket] sxpath, txpath and accessors

2015-03-03 Thread Sanjeev K Sharma
On Mon, Mar 02, 2015 at 09:52:53AM -0500, Vincent St-Amour wrote: > I recommend the short tutorial near the top of this document: > > http://pkg-build.racket-lang.org/doc/sxml/sxpath.html > Thanks for the suggested solution; that was exactly the document I referred to I have not been able

[racket] sxpath, txpath and accessors

2015-03-01 Thread Sanjeev K Sharma
I tried to send this twice now- this is the 3rd attempt, I hope no one gets this 3 times / gets pissed. on this page ~/.racket/6.1.1/pkgs/sxml/sxml/doc/sxml/sxpath.html I read this: "Like sxpath, but only accepts an XPath query in string form, using the standard XPath syntax. Deprecated; us

[racket] xpath, txpath and accessors

2015-02-28 Thread Sanjeev K Sharma
on this page ~/.racket/6.1.1/pkgs/sxml/sxml/doc/sxml/sxpath.html I read this: "Like sxpath, but only accepts an XPath query in string form, using the standard XPath syntax. Deprecated; use sxpath instead." so I'd like to get the hang of sxpath but I'm somehow stuck on how to translate txpat

[racket] xslt in current racket version

2013-09-26 Thread Sanjeev K Sharma
how are folks doing this? I just realized the stx-engine component is gone from Mr. Lizorkin's sxml package. Was the functionality tucked away somewhere obvious? (to everyone but me & my weak google-fu) Racket Users list: http://lists.racket-lang.org/users

[racket] [throw...@gmail.com: Re: issue with function "regexp-replaces"]

2013-06-07 Thread Sanjeev K Sharma
Welcome to DrRacket, version 5.3.4 [3m]. Language: racket; memory limit: 1 MB. inpu# t-str# ing# inpu t-str ing printfinpu t-str ing replaces inpu t-str ing# > --- Begin Message --- sorry, I did that too quick I'm getting something working doing this (display (regexp-replace* ... I'

Re: [racket] issue with function "regexp-replaces"

2013-06-07 Thread Sanjeev K Sharma
sorry, I did that too quick I'm getting something working doing this (display (regexp-replace* ... I'll have to figure out now why (regexp-replaces ...) doesn't give me the same. __ On Fri, Jun 07, 2013 at 10:58:06AM -0400, Sanjeev K Sharma wrote: > thanks for the

Re: [racket] issue with function "regexp-replaces"

2013-06-07 Thread Sanjeev K Sharma
1 MB. inpu# t-str# ing# printfinpu# t-str# ing printfinpu t-str ing "inpu#\nt-str#\ning#\n " "inpu#\nnt-str#\nning#\nn " "inpu##\nt-str##\ning##\n " "inpu#\nt-str#\ning#\n " "inpu##\nnt-str##\nning##\nn " "inpu##\n\nt-str##\n\ning##\n\n

[racket] issue with function "regexp-replaces"

2013-06-07 Thread Sanjeev K Sharma
I have to clean up a bunch of source files that don't show properly I have a file from which I'm reading a bunch of regular expressions to replace, things like this: (#px"(?i:%5C)""/") but included in the same file (full of from-to pairs) are a bunch of straight string replacements, like thi

[racket] webscraperhelper, sxml, xpath, etc ...

2013-05-30 Thread Sanjeev K Sharma
any way to apply webscraperhelper, with goals including element attributes - "id" or "class" or "width" for span, div , etc ...? for example the "four" here: (webscraperhelper'(td"four")doc) apply to this line (the four is in the last ) a3b4four instead of the "four", how could I get

Re: [racket] unrequire for modules, or a new, clean sub-context?

2013-04-29 Thread Sanjeev K Sharma
On Mon, Apr 29, 2013 at 01:36:26PM -0600, Danny Yoo wrote: > For your other two questions: I'm not quite sure what you mean by > "dump a module". Can you say more? Also, it looked like your second > question got cut off in mid-sentence. get rid of all the identifiers and data associated with a

[racket] unrequire for modules, or a new, clean sub-context?

2013-04-26 Thread Sanjeev K Sharma
three module related questions for you all what do you do when you get the same procedure name between two required modules? This is the key question, the next 2 are to further my understanding of (require ...) binding. Is there a way to dump a module mid way through a program? Or temporari

[racket] a string->list or file->list that drops comments?

2013-03-31 Thread Sanjeev K Sharma
anyone have a version lying around? I'd like to see how it's done. It must already be there in the source code but I haven't been able to write a grep to find it Racket Users list: http://lists.racket-lang.org/users

Re: [racket] simple problem with let .. I'm just NOT getting it

2013-03-23 Thread Sanjeev K Sharma
Hi again folks ... I'm now guessing something in file->string is not working right. I think I may have had some files from an older install lying around. so I'm re-installing - Have to go out at the moment, will get back to you tomorrow. On Sat, Mar 23, 2013 at 04:09:54PM -04

Re: [racket] simple problem with let .. I'm just NOT getting it

2013-03-23 Thread Sanjeev K Sharma
this looks unclear; I get an arrow connecting the very first bracket before the let (let((in-this(file-> with the second bracket in this line (replacements(file->list "/home/sam/REPLACEMENTS"))) > please help, this is driving me crazy. I sometimes run brackets together to > get a clear

[racket] simple problem with let .. I'm just NOT getting it

2013-03-23 Thread Sanjeev K Sharma
please help, this is driving me crazy. I sometimes run brackets together to get a clearer picture of completions #lang racket (let((x 5) (y 2)) (let ((x 2) [y x]) (list y x))) (let((a 2) (b 3)) (let((a 2) (b 3)) (printf "in this:~a~n"a) (printf "~nreplace

[racket] how are folks typesetting math along with racket code

2013-01-08 Thread Sanjeev K Sharma
Eventually I'd like to get html output (with CSS, not mathml - LyX does some of this from LaTeX source, and GIFs of the equations aren't useable) I've been looking at Scribble but haven't found examples of folks including fractions, integrals, etc ... in j If I'm not doing "real" papers (biblio

[racket] can't cdr list from dotted-tail notation?

2012-11-22 Thread Sanjeev K Sharma
I already spent a couple of hours on this, hope I am not missing something really obvious - does the dotted notation produce some kind of flat list instead of cons cells? (define list-rf (lambda ( n . items ) (if (= n 0) (car items) (list-rf (- n 1)(cdr items) (list-rf 3 1 4