27 Aug 20:42 2014

### [->] How to render math formulas with LaTeX under Scribble [solved]

Hi Jens Axel:

Really thank you very much.

It work exactly as you said.
Now I applied racket-poppler under scribble/manual with the following code, as a test:

#lang scribble/manual
<at> (require racket-poppler/render-tex pict)
<at> (latex-path
(case (system-type)
[(macosx) "/usr/local/texlive/2013/bin/universal-darwin/pdflatex"]
[(unix)   "pdflatex"]
[(windows) "c:/Archivos de programa/MiKTeX 2.9/miktex/bin/pdflatex.exe"])) ; personalized
<at> title{Beautiful: <at> (latex->pict "$e^{i \\pi}=-1$") }
Now we have just to learn how to scale the equation <at> (latex->pict "$e^{i \\pi}=-1$") to the right font size. Thank you very much Jens Axel Soegaard.

And worked just fine.

Thank you again for all your support, and by the way, congratulations for your number theory and linear algebra functions at the math library.

Sincerely, Enrique

P.S. It would be of great value, to be able to add latex functions to the plot library. Thanks.

____________________
Racket Users list:
http://lists.racket-lang.org/users
27 Aug 19:33 2014

### web server + REPL-ish functions?

The main engine of my Pollen system is a project webserver that's started from the command line, uses
serve/servlet, and sends the usual status & error messages to the terminal window.

I was thinking it would be handy to be able to keep an input prompt in that terminal window to be able to issue
commands without stopping the server, switching to another window, etc.

Is there a straightforward approach to this in terms of program design, or would it introduce annoying
complications?

My understanding of serve/servlet is that it can only do one thing, which is listen & respond to TCP requests
on a certain port. So for this REPL-ish feature, there would have to be a separate listenener/response
mechanism. Is that something one would accomplish with threads? Or is there a better way? (Or no way.)

An approach I've seen with other web-development systems is to put an admin panel in the browser (by
injecting it into the HTML of the output web page). But that's inherently hinky because it pollutes your output.
____________________
Racket Users list:
http://lists.racket-lang.org/users

27 Aug 17:37 2014

### FYI: scheme looks good in this paper examining first-year data

I can’t tell whether this paper was published *anywhere*, but Google told me about it because it cites me.
It tries to mine data from ratemyprofessor to draw conclusions about what makes for a good first computing
class. You can take all of this with many grains of salt, but the language most strongly correlated with
clarity in a first-year class is Scheme. The major caveat is the number of samples, which is small for all
languages but especially small (32) for Scheme, suggesting that it may be the good work of a few
professors. On the other hand, it may well be the influence of HtDP.

Anyhow—a small piece of good news to brighten y’all’s day.

John

http://aspiringminds.com/pages/assess/2014/camera_ready/paper/moretti_etal.pdf
____________________
Racket Users list:
http://lists.racket-lang.org/users

27 Aug 03:07 2014

### [->] How to display math formulas using LaTeX in Scribble

Hi Prof. Jens Axel:

Under Windows 7 (32 bits) I installed again the racket-poppler package, for the current Racket snapshot version.
Then I run the following shorter program

#lang racket
(require racket-poppler/render-tex)

And the result of running that code was:

ffi-lib: couldn't open "C:\\Program Files\\Racket-6.1.0.5\\lib\\libpoppler-44.dll" (%1 no es una aplicación Win32 válida.; errno=193)

I copied the files libpoppler-44.dll and libpoppler-glib-8.dll to the lib folder in the Racket installation, but the error was the same.

May be there is something more basic that I'm not doing right.

Thank you very much for your support.

Sincerely,

Enrique Cómer

____________________
Racket Users list:
http://lists.racket-lang.org/users
27 Aug 03:12 2014

### Auto Response

Gracias por su correo. Este es solo un acuse de recibo. Si procede, se enviara respuesta adicional. Que disfruten sus estudios e investigaciones.

____________________
Racket Users list:
http://lists.racket-lang.org/users
25 Aug 17:16 2014

### sllgen:make-rep-loop in Racket 6.1

I've just updated my Racket installation to 6.1 (Windows 64bit), and
something seems to be strange with sllgen:make-rep-loop: Although the
auto-completion finds it (and other sllgen stuff), it seems to be
unbound. Tiny repro:

-----------------------------------------------------------------------------------------
#lang eopl
(display sllgen:make-rep-loop)
-----------------------------------------------------------------------------------------

The output (in German, but I think you get the point):

-----------------------------------------------------------------------------------------
Willkommen bei DrRacket, Version 6.1 [3m].
Sprache: eopl [angepasst]; memory limit: 128 MB.
sllgen:make-rep-loop: unbound identifier in module in: sllgen:make-rep-loop
-----------------------------------------------------------------------------------------

If I run the same program in Racket 5.3 (Linux x64), I get:

-----------------------------------------------------------------------------------------
Welcome to DrRacket, version 5.3 [3m].
Language: eopl; memory limit: 128 MB.
#<procedure:sllgen:make-rep-loop>
-----------------------------------------------------------------------------------------

Is this a bug in 6.1 or am I doing something wrong? I've discovered
that while trying out my old EOPL exercise, which don't work
anymore... :-/

Cheers,
S.
____________________
Racket Users list:
http://lists.racket-lang.org/users

25 Aug 16:11 2014

### Re: copy-shared-files and different platforms

At Mon, 25 Aug 2014 16:06:15 +0200, Jens Axel Søgaard wrote:
> 2014-08-23 20:12 GMT+02:00 Matthew Flatt <mflatt <at> cs.utah.edu>:
>
> > The install-platform definitions in those "info.rkt" files mean that
> > only libraries for the current platform will be installed. It's
> > probably better for each directory within "poppler-libs" to be its own
> > package, so that an installation gets only the libraries for the
> > installation's platform, but the current way should work.
>
> Got it. Each platform gets its own package.
>
> This leads to the question: How can I have multiple packages in the
> same GitHub repository?
>
> This package is for i386-macosx:
>     http://pkgs.racket-lang.org/#[poppler-i386-macosx]
>
> At Github the package is at:
>    https://github.com/soegaard/poppler-libs/tree/master/poppler-i386-macosx
>
> So I entered:
>     Source:
> github://github.com/soegaard/poppler-libs/tree/master/poppler-i386-macosx

To specify a path within a repo, use a "path=..." query with the "git:"
package-source format:

git://github.com/soegaard/poppler-libs?path=poppler-i386-macosx

____________________
Racket Users list:
http://lists.racket-lang.org/users
25 Aug 02:11 2014

### interpreting λ' as Î' ?

On pkg-build.racket-lang.org/server/built/fail/afl.txt, my afl package is failing with it saying
read: bad syntax #Î»’
But in the place that it’s pointing to, I have #λ

So is there anything wrong with either how the file is written or how pkg-build.racket-lang.org is
interpreting it?

And is there anything I can do to either right the file properly or tell pkg-build.racket-lang.org how to
interpret it?

____________________
Racket Users list:
http://lists.racket-lang.org/users
25 Aug 01:03 2014

### Latex Symbols

Hello all,

I am writing a paper and the implementation was done in redex.

My question is when I render the semantics and state space is there a way to get a wide hat symbol to print out
over some of the characters like in latex?

Thank you!

Maria
____________________
Racket Users list:
http://lists.racket-lang.org/users

24 Aug 23:00 2014

### Asynchronously inserting text to editor%

Hi. I am asyncrhonously insert text strings to editor% (from another thread)

The problem is that i sometimes get this exception from object of editor% class:

sequence-contract-violation: negative: method insert cannot be called,
except in states (unlocked)

I've tried to loop while editor is locked calling these functions
http://docs.racket-lang.org/gui/editor___.html#%28meth._%28%28%28lib._mred%2Fmain..rkt%29._editor~3c~25~3e%29._locked-for-flow~3f%29%29

But it seems they do not work for me (do not return if editor is
locked) and still that exception in caused.

I've fallen back to ugly loop then.

(define retry (call/cc (lambda (k) k)))

(with-handlers ([exn:fail?
(lambda (ex)
(sleep 1)
(retry retry))])
(send editor insert message))

Is there a better way?

P.S Full source code for that stuff is available there:
-------------------------------------------------------------------------------

https://github.com/lehitoskin/blight/blob/master/msg-history.rkt#L143

add-recv-message' is called by on-friend-message':
https://github.com/lehitoskin/blight/blob/master/blight.rkt#L956

which is called back by callback-friend-message' C function:
https://github.com/lehitoskin/libtoxcore-racket/blob/master/functions.rkt#L489
----------------------------------------------------------------------------------

Thank you.

--

--
With best regards,
Dmitry
____________________
Racket Users list:
http://lists.racket-lang.org/users

24 Aug 07:24 2014

### Re: contracts ->i optional keyword syntax

Keywords should be followed by an id+ctc as described in the documentation, so something like the
following should work

(->i ([lst list?])
(#:foo [foo (lst) foo?])
(result list?))

Hope this helps
Dan

----- Original Message -----
From: "Kevin Forchione" <lysseus <at> gmail.com>
To: "Racket Users" <users <at> racket-lang.org>
Sent: Sunday, August 24, 2014 1:03:58 AM GMT -05:00 US/Canada Eastern
Subject: [racket]  contracts ->i optional keyword syntax

I’ve been trying to figure out the syntax for optional keywords in the ->i contract form. For example:

(->i ([lst list?])
([#:foo ….]) ; what does this look like?
(result list?))

The mandatory domain syntax seems straightforward, but I’ve tried various combinations for the
optional keyword that don’t appear to be correct.

(->i ([lst list?])
([#:foo (lst) (….etc)))
(result list?))

doesn’t work for me, neither does sticking an id before or after … (lat) …

Does anyone have an example of an optional keyword ->i contract? This would seem to be an extremely useful
form, but the examples in the documentation do not appear to cover it. They do cover the ->* form, but not the
->i for that combination.

Thanks!

-Kevin
____________________
Racket Users list:
http://lists.racket-lang.org/users

____________________
Racket Users list:
http://lists.racket-lang.org/users

Gmane