[racket-users] read-line reads only a character at a time from file.

2015-12-17 Thread Mark Thom
As an exercise, I'm implementing a simple grep function in Racket: (define (grep-file pattern . files) (for ([file-path (in-list files)]) (with-input-from-file file-path #:mode 'text (lambda () (for ([line (read-line (current-input-port) 'return-linefeed)] [i

Re: [racket-users] read-line reads only a character at a time from file.

2015-12-17 Thread Daniel Feltey
I think the issue is that `read-line` is returning a string, so in every iteration of the for loop line is bound to a single character from that string, I think you may want to use `in-lines`[1] instead of `read-line`. [1]:

[racket-users] Re: Letter spacing in slideshow

2015-12-17 Thread Matthew Butterick
A clue, perhaps, to tracking down the problem: It appears that the pairs that are being compressed — Pr, Re, Ty — are all pairs that have kerns applied (i.e., pair-specific spacing). Moreover, it looks like a systemic error in rendering the kerning (e.g., kern is being doubled) — notice how the

[racket-users] How To Uninstall DrRacket

2015-12-17 Thread Max
Hi, I installed DrRacket by downloading and executing the sh file (http://download.racket-lang.org/racket-6-3-x86_64-linux-debian-squeeze-sh.html). How do I uninstall this application? Thank you, Max -- You received this message because you are subscribed to the Google Groups "Racket Users"

Re: [racket-users] Letter spacing in slideshow

2015-12-17 Thread Matthew Flatt
The problem appears to be fixed in Pango 1.37: https://bugzilla.gnome.org/show_bug.cgi?id=700592 Is upgrading your Pango installation a possibility? Otherwise, `racket/draw` could can probably work around this problem, much the same as

Re: [racket-users] Letter spacing in slideshow

2015-12-17 Thread Matthew Flatt
Letter spacing there certainly does look wrong. While "Ty" is the most obvious problem, "Pr" and "Re" look too closely spaced, also. It appears that spacing is going wrong for kerning pairs, and not for other pairs of letters. You're correct that Racket defers to Pango and Cairo to kern and draw

[racket-users] Letter spacing in slideshow

2015-12-17 Thread David Christiansen
I'm in the process of learning slideshow, and it's tons of fun! I vastly prefer Racket to LaTeX for algorithmically generating slides :-) However, I'm encountering a pretty major issue with font rendering. I'm running Racket 6.3 under GNOME 3.16 on Linux. I have noticed that, with a number of

[racket-users] Re: Letter spacing in slideshow

2015-12-17 Thread Matthew Butterick
Whoops sorry, didn't see MFlatt's diagnosis. On Thursday, December 17, 2015 at 8:25:12 AM UTC-8, Matthew Butterick wrote: > A clue, perhaps, to tracking down the problem: It appears that the pairs that > are being compressed — Pr, Re, Ty — are all pairs that have kerns applied > (i.e.,

Re: [racket-users] Letter spacing in slideshow

2015-12-17 Thread David Christiansen
I seem to have clicked "Reply" rather than "Reply list" - sorry for the duplicate email, Matthew! -- Thanks so much for a quick answer! Sorry it took me a bit to get back, I had to go read up on the relevant APIs. I've managed to cause the problem at the REPL, and it

Re: [racket-users] How To Uninstall DrRacket

2015-12-17 Thread Matthew Flatt
If you created a Unix-style installation (i.e., answered "yes" to the installer's first question), then a `racket-uninstall` script was installed. If you didn't choose the Unix-style option (i.e., chose the default "no" option), then you can simply discard the installed directory. At Thu, 17 Dec

Re: [racket-users] Letter spacing in slideshow

2015-12-17 Thread David Christiansen
On 17/12/15 17:52, Matthew Flatt wrote: > The problem appears to be fixed in Pango 1.37: > > https://bugzilla.gnome.org/show_bug.cgi?id=700592 > > Is upgrading your Pango installation a possibility? That would be a pretty major disturbance for my machine - I'm a bit hesitant to change distros

Re: [racket-users] Letter spacing in slideshow

2015-12-17 Thread Matthew Flatt
At Thu, 17 Dec 2015 18:30:51 +0100, David Christiansen wrote: > On 17/12/15 17:52, Matthew Flatt wrote: > > The problem appears to be fixed in Pango 1.37: > > > > https://bugzilla.gnome.org/show_bug.cgi?id=700592 > > > > Is upgrading your Pango installation a possibility? > > That would be a

Re: [racket-users] read-line reads only a character at a time from file.

2015-12-17 Thread Mark Thom
Thanks very much! -- 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

Re: [racket-users] Letter spacing in slideshow

2015-12-17 Thread David Christiansen
> It might work to drop a repaired "libpangocairo.so" into the "lib" > directory of your Racket installation. I'll see if I can build one, > just to see how hard that is. :) I made the problem go away by building libpango from source and putting the just-built libpango, libpangocairo,

Re: [racket-users] `raco setup` won't build docs when `compile-omit-paths` is 'all?

2015-12-17 Thread Matthew Flatt
Oh, you're right that it's not quite the same issue as treating "nothing to do" as failure, but I noticed this related problem while working on the handling of "nothing to do". At Thu, 17 Dec 2015 12:12:47 -0800 (PST), Matthew Butterick wrote: > Thanks. Wasn't clear to me if this was same /

Re: [racket-users] Re: How to put image background?

2015-12-17 Thread Stephen De Gabrielle
Do you mean http://docs.racket-lang.org/graphics/Draw__Clear__and_Flip_Operations.html?q=Viewport#%28part._.Pixmaps%29 I've not used the viewports stuff For the racket/gui toolkit I think you can do this by overriding on-paint for a canvas on a frame

Re: [racket-users] Letter spacing in slideshow

2015-12-17 Thread David Christiansen
> Assuming that you're on 64-bit Linux, here is a set of libraries to > try: > > http://www.cs.utah.edu/~mflatt/tmp/pango-1-37-libs.tgz > > Unpack in some directory , and run > > env LD_LIBRARY_PATH= racket > > To avoid setting `LD_LIBRARY_PATH`, you could probably adjust rpaths in >

[racket-users] Composing `splicing-let-syntax` with `prop:rename-transformer` and `module+` (or anything made with `syntax-local-lift-module-end-decloration`

2015-12-17 Thread Leif Andersen
Hello, I am noticing that if I in the body of splicing-let-syntax I put a module+, or anything that lifts with syntax-local-lift-module-end-decloration really, The stuff that gets lifted out doesn't seem to match what I would expect it to. I suspect this is in part do to using

Re: [racket-users] Letter spacing in slideshow

2015-12-17 Thread Matthew Flatt
At Thu, 17 Dec 2015 10:52:02 -0700, Matthew Flatt wrote: > At Thu, 17 Dec 2015 18:30:51 +0100, David Christiansen wrote: > > On 17/12/15 17:52, Matthew Flatt wrote: > > > The problem appears to be fixed in Pango 1.37: > > > > > > https://bugzilla.gnome.org/show_bug.cgi?id=700592 > > > > > > Is

[racket-users] `raco setup` won't build docs when `compile-omit-paths` is 'all?

2015-12-17 Thread Matthew Butterick
Can't see how this would be a feature, but maybe I lack imagination: `raco setup` seemingly won't build docs when `compile-omit-paths` is 'all. For instance the "info.rkt" of this package specifies docs, but `compile-omit-paths` is 'all, and the docs are not built. raco pkg install

Re: [racket-users] Composing `splicing-let-syntax` with `prop:rename-transformer` and `module+` (or anything made with `syntax-local-lift-module-end-decloration`

2015-12-17 Thread Matthew Flatt
A short answer: When compiling a submodule, as for any other module, imported modules get fresh compile-time instantiations. It you want to run effects from the enclosing module (which is an implicit import), the effects must be in `begin-for-syntax`. A long answer: When you write (module+

[racket-users] Re: Composing `splicing-let-syntax` with `prop:rename-transformer` and `module+` (or anything made with `syntax-local-lift-module-end-decloration`

2015-12-17 Thread Leif Andersen
Also, I should point out that if I wasn't using module+, I get the expected output: "yellow" "blue" So I think it is due to the module+ macro pulling up the expression past the assignment. (This can be seen with the following code that is missing the module+ modules.) #lang racket (require

[racket-users] [racket][scribble] UNSYNTAX and lp

2015-12-17 Thread WarGrey Gyoudmon Ju
I see docs says UNSYNTAX can be used to escape code to scribble lots of times. So what is the UNSYNTAX? In lp chunks, are there any examples to demonstrate how to keep comments in the resulting docs? In my practice, tests are written in lp. If there is a way to keep the original form of a

Re: [racket-users] Composing `splicing-let-syntax` with `prop:rename-transformer` and `module+` (or anything made with `syntax-local-lift-module-end-decloration`

2015-12-17 Thread Leif Andersen
Ah, okay, that makes sense, and fixed my issue. Thank you very much. ~Leif Andersen On Thu, Dec 17, 2015 at 4:13 PM, Matthew Flatt wrote: > A short answer: When compiling a submodule, as for any other module, > imported modules get fresh compile-time instantiations. It you

Re: [racket-users] Typed Racket and struct

2015-12-17 Thread Asumu Takikawa
On 2015-11-20 16:02:32 +, Antonio Menezes Leitao wrote: >That would be great! >I don't mind testing it on a snapshot build. Just so you know, the pre-release version of TR's struct should now support this option:

Re: [racket-users] `raco setup` won't build docs when `compile-omit-paths` is 'all?

2015-12-17 Thread Matthew Flatt
Yep. I've already pushed a repair for this as prompted by your question yesterday (but let us know if it still doesn't work right). At Thu, 17 Dec 2015 11:22:38 -0800, Matthew Butterick wrote: > Can't see how this would be a feature, but maybe I lack imagination: `raco > setup` seemingly won't

Re: [racket-users] `raco setup` won't build docs when `compile-omit-paths` is 'all?

2015-12-17 Thread Matthew Butterick
Thanks. Wasn't clear to me if this was same / related issue. On Thursday, December 17, 2015 at 11:59:01 AM UTC-8, Matthew Flatt wrote: > Yep. I've already pushed a repair for this as prompted by your question > yesterday (but let us know if it still doesn't work right). > > At Thu, 17 Dec 2015