Re: [racket-users] [racket users] scribble using @ as text?

2020-09-24 Thread Sorawee Porncharoenwase
See https://docs.racket-lang.org/scribble/reader.html#%28part._.The_.Scribble_.Syntax_at_a_.Glance%29 On Thu, Sep 24, 2020 at 2:26 PM Kevin Forchione wrote: > Hi guys, > I’ve been racking my brains and going through scribble manuals trying to > figure out how to do something as simple as

[racket-users] Memory usage of (port->lines ...) is extreamly high

2020-09-24 Thread Hong Yang
Hi Racketer I'm trying to load a log file which size is 600MB, then I found the program exhausted 3 GB resident memory just for load all the content of it via (port->lines...). I do have enough RAM but it looks like some thing went wrong here, and I do need to load them all into RAM for my use

[racket-users] Re: Memory usage of (port->lines ...) is extreamly high

2020-09-24 Thread Hong Yang
Update with memory dump log attached. 1. With out (set! input empty), call (collect-garbage) doesn't help 2. Call (set! input empty) and (collect-garbage), memory reduce dramaticly. ; 214M(VIRT)/101M(RSS) without open any file (let loop() (sleep 5) ; Waiting here so that I can check

Re: [racket-users] Re: Memory usage of (port->lines ...) is extreamly high

2020-09-24 Thread Laurent
Quick comment: of you don't need to load the whole file but want to parse it line by line, use `in-lines` which is memory-efficient. On Thu, Sep 24, 2020, 11:46 Hong Yang wrote: > Update with memory dump log attached. > > 1. With out (set! input empty), call (collect-garbage) doesn't help > 2.

Re: [racket-users] Re: Memory usage of (port->lines ...) is extreamly high

2020-09-24 Thread Hong Yang
Thanks Laurent, I tried (in-lines...), and yes, it's memory-efficient, but I still curious and concern why (port->lines ...) takes so many memory. Best regards Hong On Thursday, September 24, 2020 at 6:55:10 PM UTC+8 laurent...@gmail.com wrote: > Quick comment: of you don't need to load the

Re: [racket-users] [relation-rules] found the same binder

2020-09-24 Thread Beatriz Moreira
Thank you, the problem was that I was defining f_0 as multiple patterns of* (c_0 -> f_0)...* and only comparing it to one instance of f_0. A quinta-feira, 24 de setembro de 2020 à(s) 02:27:45 UTC+1, Robby Findler escreveu: > I'm not sure exactly what you're trying to accomplish so take this

Re: [racket-users] Re: Memory usage of (port->lines ...) is extreamly high

2020-09-24 Thread Sam Tobin-Hochstadt
port->lines produces a list with all the lines in it. That list is what uses all the memory. Using in-lines avoids producing the whole list at once. Sam On Thu, Sep 24, 2020, 8:53 AM Hong Yang wrote: > Thanks Laurent, I tried (in-lines...), and yes, it's memory-efficient, but > I still curious

Re: [racket-users] Why are these @defthing blocks typeset incorrectly?

2020-09-24 Thread Sage Gerard
I opted for the read-syntax based solution. For those reading, it's convenient to use `replace-context` from `syntax/strip-context` to donate lexical info. The form of the transformer I used is: @(define-syntax (reformat stx) (replace-context stx (read-syntax #f (open-input-string

[racket-users] [Reduction Relation] where clause

2020-09-24 Thread Beatriz Moreira
Hello, I was reading your documentation for the Reduction Relations (4.4), and we can use side-conditions and other extras like where and bind. But I cannot implement them in my code. Can someone show me an example of how do I use the clause *where*? For example, how do I verify that a variable

Re: [racket-users] [racket users] scribble using @ as text?

2020-09-24 Thread Jay McCarthy
I went too fast: @"@" -- Jay McCarthy Associate Professor @ CS @ UMass Lowell http://jeapostrophe.github.io Vincit qui se vincit. On Thu, Sep 24, 2020 at 5:30 PM Jay McCarthy wrote: > @["@"] > > -- > Jay McCarthy > Associate Professor @ CS @ UMass Lowell > http://jeapostrophe.github.io >

Re: [racket-users] [racket users] scribble using @ as text?

2020-09-24 Thread Sorawee Porncharoenwase
I think you meant `@"@"`? `@["@"]` is an application. On Thu, Sep 24, 2020 at 2:31 PM Jay McCarthy wrote: > @["@"] > > -- > Jay McCarthy > Associate Professor @ CS @ UMass Lowell > http://jeapostrophe.github.io > Vincit qui se vincit. > > > On Thu, Sep 24, 2020 at 5:26 PM Kevin Forchione

Re: [racket-users] [racket users] scribble using @ as text?

2020-09-24 Thread Jay McCarthy
@["@"] -- Jay McCarthy Associate Professor @ CS @ UMass Lowell http://jeapostrophe.github.io Vincit qui se vincit. On Thu, Sep 24, 2020 at 5:26 PM Kevin Forchione wrote: > Hi guys, > I’ve been racking my brains and going through scribble manuals trying to > figure out how to do something as

[racket-users] [racket users] scribble using @ as text?

2020-09-24 Thread Kevin Forchione
Hi guys, I’ve been racking my brains and going through scribble manuals trying to figure out how to do something as simple as proceed a sentence like: The @ is used in a scribble command. I’m sure I’m overlooking something very basic, since the @ is referenced all over scribble documentation.