[racket-users] Changing code fonts and turning off Unicode replacement in Scribble LaTeX output?

2017-10-23 Thread David Christiansen
Hi all, I'm working on a set of lecture notes in Scribble, and the code blocks contain identifiers that are Greek letters (namely, capital gamma and lowercase rho). I'd like to render a pretty PDF as well as HTML output. In the resulting LaTeX, however, the code includes things like \RktSym{$\lamb

Re: [racket-users] Multiple namespaces in Racket

2017-10-15 Thread David Christiansen
> Ultimately, though, that would mean that it would separate the runtime > value and type namespaces, but now types and users’ phase 1 bindings > would share the same namespace, which is still probably confusing and > unintuitive. Maybe that’s okay? Again, I feel like I’d need to > understand bette

Re: [racket-users] Multiple namespaces in Racket

2017-10-15 Thread David Christiansen
> It would probably cause trouble iif we ever were to generalize to > dependent types. Sure, but those same problems will be there anyway if the compile-time and run-time bindings live in separate namespaces and are allowed to bind the same identifier to different things, as is done in languages l

Re: [racket-users] Multiple namespaces in Racket

2017-10-15 Thread David Christiansen
Hi Alexis, What about keeping type bindings separate from program bindings as a matter of phase? This seems to me to fit in with the Hindley-Milner program, where types exist only at compile time only, and programs exist at run time only. /David -- You received this message because you are subs

Re: [racket-users] Idiomatic way to include numbers in a map?

2017-03-02 Thread David Christiansen
> Not with map, which requires equal-length arguments. > > You could do the slightly less ugly: > > (map > foo > lst-A > lst-B > (range (length lst-A))) Why not do it this way? (struct foo (a b c)) (define lst-A '(a b)) (define lst-B '(d e)) (for/list ([a (in-list lst-A)]

Re: [racket-users] How do I find where a module is located?

2017-02-14 Thread David Christiansen
On 02/14/2017 12:00 PM, David Storrs wrote: I prefer Emacs to Dr Racket In that case, if you're using racket-mode, you can use racket-open-require-path (C-c C-x C-f by default) or M-x racket-find-collection to get to the source of particular import or of a collection. You can probably find

Re: [racket-users] DrRacket: Interactive choice of what submodules to run when clicking Run

2017-01-24 Thread David Christiansen
In Greg Hendershott's racket-mode for Emacs, the "run" command will run the submodule that's under the cursor. Something similar that would let one right-click a submodule to run it in DrRacket would be quite nice. /David On 01/24/2017 12:17 PM, Robby Findler wrote: There's not a simple way

Re: [racket-users] list->set behavior on lists of symbols

2016-12-28 Thread David Christiansen
Hi Deyaa, > I wonder why (list->set '('1)) evaluates to (set ''1) instead of (set '1). > I use Racket v6.7. The expression '('1) is a shorter way of writing (quote ((quote 1))) The value of (quote x) is x, so the value of that is the list containing (quote 1), or ((quote 1)). In other

Re: [racket-users] Meta-question: "Racket to go"andtheformatofthedocumentation...

2016-11-05 Thread David Christiansen
Hi Meino, > ... the resulting file was 46x times bigger than the input. > This is little to much for a flash based budget tablet...;) > Any idea to circumeven this? Unfortunately not. I typically just print the resulting file. Good luck! /David -- You received this message because you are sub

Re: [racket-users] Meta-question: "Racket to go"andtheformatofthedocumentation...

2016-11-05 Thread David Christiansen
Hello, > Is there a (simple) way to get rid of most > of the white blank border and to create > the pdfs in a differen page format (aspect > ratio) ? I often use a little command-line utility called pdfcrop to remove margins from PDF files. It's also useful for economical printing of long texts,

Re: [racket-users] Better? or less good?

2016-10-21 Thread David Christiansen
Hi again, > The latter has the same meaning as this: > > (let ((v #t)) > (if v v fnord)) > > This is not even a program, because "fnord" has no meaning. Robby pointed out off-list that I should point out that this is a feature of Racket, not programming languages in general. In many other langu

[racket-users] Thanks for slideshow, racket/gui, and the rest!

2016-09-20 Thread David Christiansen
Today I delivered a talk at ICFP with slides written in slideshow, with an embedded Idris interactive editor and REPL. The slides got good feedback from the audience. I used a similar setup for my PhD defense in January. Thanks so much to Matthew, Robby, and the rest of you for all the hard work o

Re: [racket-users] DrRacket's auto-indentation outside DrRacket?

2016-08-25 Thread David Christiansen
> The code I sent would be influenced by the preferences I believe. But you > could test that? I will, when I'm next on a machine with Racket. Is there a way to set these preferences programmatically, though? I intend to run the code in a VM that is created from scratch each time the tests are run

Re: [racket-users] DrRacket's auto-indentation outside DrRacket?

2016-08-25 Thread David Christiansen
>>> The specification has to come with feature and/or the language, not the >>> tool. How would Emacs know about it? Or Notepad? Every editor — and every >>> tool in the tool chain — must know what indentation means if it may touch >>> it. My goal here is not for Emacs to know how to indent thi

Re: [racket-users] DrRacket's auto-indentation outside DrRacket?

2016-08-25 Thread David Christiansen
Hi Robby, Thank you very much for a fast and useful answer! > I'm not sure about the suitable configuration: that should probably > happen via the #lang line and shouldn't be configured "from the > outside" (we're not quite there yet, but that's where we should be > heading, IMO). Today, this is

[racket-users] DrRacket's auto-indentation outside DrRacket?

2016-08-25 Thread David Christiansen
Hi all, As far as I know, the standard for indentation in Racket is "Do like DrRacket", after DrRacket has been suitably configured for new syntax introduced by the application in question. I'd like to arrange for this to be enforced by Travis. As far as I can see, my building blocks for this are

Re: [racket-users] Detecting mouse events on top of picts?

2016-06-08 Thread David Christiansen
> Looking at the docs for region%, Racket doesn't have a simple way to do > this - it still could be done by force and might not be that slow > depending on the complexity of the "scene" in the image. If you're > familiar with image processing, the basic idea is recursive "blob" > identification.

Re: [racket-users] Detecting mouse events on top of picts?

2016-06-07 Thread David Christiansen
> Why don’t you check the location of the mouse movement? The coordinates are > close enough. I do check the location of the mouse movement to find a canvas location. What I was looking for a smarter way to do was to check whether or not that particular pixel was drawn by a particular pict that

Re: [racket-users] Detecting mouse events on top of picts?

2016-06-06 Thread David Christiansen
> That seems overly complicated. Can you not just compare the mouse's > coordinates to the picture's location in the canvas? I don't have a good way to know where the picture itself is - only its bounding box. So if the picture consists of a doughnut shape, I want the center of the doughnut and t

Re: [racket-users] Detecting mouse events on top of picts?

2016-06-06 Thread David Christiansen
> If I understand the goal, you could render to one bitmap that has an > alpha channel, and then check whether the pixel under the mouse ends up > with a non-zero alpha. That's a good simplification. Thanks! I had kind of been hoping that there was an alternative approach that I was missing, but

Re: [racket-users] Racket PPA updated for 6.5

2016-05-01 Thread David Christiansen
Hi Asumu, Thanks for maintaining this! It's great to have it for my Ubuntu machine! /David -- 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+unsubsc

Re: [racket-users] Racket PPA updated for 6.4

2016-02-09 Thread David Christiansen
Asumu, Thanks so much for maintaining this! /David 2016-02-09 20:26 GMT-05:00 Asumu Takikawa : > Hi all, > > The Racket PPA for Ubuntu has been updated to v6.4: > > https://launchpad.net/~plt/+archive/ubuntu/racket > > I've tested it on Wily. Let me know if you find any problems. > > Cheers, >

Re: [racket-users] Ligatures for monospace fonts in editors?

2016-01-03 Thread David Christiansen
Matthew, > 1) In a Unicode-aware language like Racket, there's no way to visually > distinguish a presentational use of a ligature from a syntactic use. For > instance, these two strings would be displayed the same way: > > (string-append* '("m" "f" "l" "a" "t" "t")) > (string-append* '("m" "fl" "

Re: [racket-users] Ligatures for monospace fonts in editors?

2016-01-03 Thread David Christiansen
surprised) to >> find >> that the ligatures were ignored. >> >> I don’t know how much effort it would take to add support for this in >> Racket’s >> text rendering engine, but I think it would be a welcome addition, probably >> for a lot more than just

[racket-users] Ligatures for monospace fonts in editors?

2016-01-02 Thread David Christiansen
Hello all, I'm using the font Pragmata Pro to display code samples in Slideshow. In particular, I've developed a sort of mini-IDE for Idris that can be embedded in a slide, using the `interactive' procedure to show it. Pragmata Pro has some very nice ligatures for code punctuation. In particular,

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 > t

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, libpangoxft,

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 David Christiansen
ifferent backing scales and also use > different drawing scales (as set by the `scale` method of `dc<%>`, for > example). > > At Thu, 17 Dec 2015 16:21:07 +0100, David Christiansen wrote: >> I'm in the process of learning slideshow, and it's tons of fun! I vastly &

[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 fon

Re: [racket-users] racket/gui: Implementing new snips with multiple items

2015-12-09 Thread David Christiansen
On 09/12/15 21:21, Robby Findler wrote: > Some of the mixins in the framework may also be interesting to you. I just realized that there is also a library called "framework", and that "the framework" wasn't just referring to racket/gui. Excellent! Thanks again! /David -- You received this mess

Re: [racket-users] racket/gui: Implementing new snips with multiple items

2015-12-09 Thread David Christiansen
data structure > parallel to the snip%s, of course. And it means you don't have to deal > with saving the information in files, which what snips are designed > for. > > Robby > > > On Wed, Dec 9, 2015 at 2:18 PM, David Christiansen > wrote: >> Thanks for a fast

Re: [racket-users] racket/gui: Implementing new snips with multiple items

2015-12-09 Thread David Christiansen
dit the file to insert this information; > it's all generated by the compiler, right? > > Robby > > On Wed, Dec 9, 2015 at 1:59 PM, David Christiansen > wrote: >> Hi all, >> >> Summary: >> >> Do I need to do anything over and above defining `g

[racket-users] racket/gui: Implementing new snips with multiple items

2015-12-09 Thread David Christiansen
Hi all, Summary: Do I need to do anything over and above defining `get-count' and `partial-offset' in a custom snip that has multiple items in order to have it work properly in an editor derived from `text%'? Details: I'm in the process of making a library to interface Racket with the Idris com