[racket-users] [Redex] test-->>E and trace

2015-12-18 Thread Anton Podkopaev
Hello, colleagues!

Is there any way to get a term trace from successful test-->>E in Redex?

BR,
Anton Podkopaev, PhD student, SPbSU

-- 
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 https://groups.google.com/d/optout.


Re: [racket-users] Try Racket is ABORTING.

2015-12-18 Thread John Berry
Kicked the server. Seems to work now.

On Fri, Dec 18, 2015 at 3:57 PM, Taro Annual 
wrote:

> over
>
> --
> 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 https://groups.google.com/d/optout.
>

-- 
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 https://groups.google.com/d/optout.


[racket-users] Try Racket is ABORTING.

2015-12-18 Thread Taro Annual
over

-- 
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 https://groups.google.com/d/optout.


Re: [racket-users] Try Racket is ABORTING.

2015-12-18 Thread Taro Annual
2015年12月18日金曜日 23時26分40秒 UTC+9 John Berry:
> Kicked the server. Seems to work now. 
> 
> 
> 
> On Fri, Dec 18, 2015 at 3:57 PM, Taro Annual  wrote:
> over
> 
> 
> 
> --
> 
> 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...@googlegroups.com.
> 
> For more options, visit https://groups.google.com/d/optout.

Thank you. I went there because I want to try Drawing Modules. Try Racket can 
be used them.

ex. (circle 10) or
(require 2htdp/image) (circle 10 "solid" "blue")

-- 
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 https://groups.google.com/d/optout.


Re: [racket-users] Hi Racket Users Fellows: Is there a way to render LaTeX with --htmls

2015-12-18 Thread Matthias Felleisen

On Dec 16, 2015, at 11:46 PM, tachlithavayati  wrote:

> Hi Friends:
> 
> With minlatex.rkt functions I can successfuly render HTML with LaTeX in 
> one-page documents (directly from DrRacket or with Scribble --html). But for 
> multi-page options, for example with Scribble --htmls, the render is 
> something like:
> 
> \[e^{i \pi}+1=0\]
> 
> Question: Is there a way to render multi-page HTML with LaTeX code?
> 
> Thank you in advance for any hint concerning this problem.
> 
> Sincerely, Enrique Comer
> 
> -- 
> 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 https://groups.google.com/d/optout.
> 


I am not sure what you mean with 'rendering latex with htmls'. I am writing 
HtDP/2e with latex embedded and I use the equivalent of --htmls. The code is 
below. When it is in 'latex' mode, I generate real latex math; when it is html 
mode, it creates PDFs that are included. 

 

#lang at-exp racket/gui

(provide
 ;; [#:file (f String)] String *-> ImageSnip
 ;; (latex s ..) runs latex on s ... and turns the result into an image snip
 ;; if #:file is specified it also saves a version of the image in a file
 latex

 ;; -> Real
 latex-scale

 ;; -> Boolean
 in-latex-mode?)

;; 
---
;; IMPLEMENTATION

(require scribble/core)

(define (in-latex-mode?)
  (define v (map string->symbol (vector->list 
(current-command-line-arguments  
  (member 'latex v))

(define (latex-scale)
  (if (in-latex-mode?) 0.75 1.0))

(define (latex #:display [display-style #false] #:file (f "x") . strs)
  (define math-delimiters (if display-style "$$" "$"))
  (define the-math (string-append math-delimiters (string-append* strs) 
math-delimiters))
  (define x.tex (string-append f ".tex"))
  (define x.pdf (string-append f ".pdf"))
  (define x.png (string-append f ".png"))
  (define cmd (regexp-replace #rx"\n+" (COMMANDS x.tex x.pdf x.png) " \\&\\& "))
  (define latex/x (string->path "Latex/"))
  (define in-latex-mode (in-latex-mode?))
  (define (run) 
(parameterize ([current-directory latex/x] 
   [current-input-port (open-input-bytes #"")] 
   [current-output-port (open-output-string)]) 
  (call-with-output-file* x.tex #:exists 'truncate
(lambda (o) (fprintf o TEMPLATE the-math)))
  (unless (system cmd)
(display (get-output-string (current-output-port)) (current-error-port))
(error 'latex "commands did not run successfully, see above output; 
check convert"))
  (begin0
(make-object image-snip% x.png 'png/mask)
#;
(rename-file-or-directory x.pdf (string-append "../" x.pdf) #t
  ; (define (cleanup) (delete-directory/files latex))
  (if in-latex-mode
  (exact the-math)
  (dynamic-wind void run void)))

(define ((mk-latex-command n #:style [style '(exact-chars)]) . items)
  (make-element (make-style n style) items))

; (define lpara (mk-latex-command "paragraph"))
(define exact (mk-latex-command #f))

(define TEMPLATE 
  @string-append{
   \documentclass[preview]{standalone} 
   % \usepackage[mathletters]{ucs} 
   % \usepackage[utf8x]{inputenc} 
   \usepackage{amsmath} 
   \pagestyle{empty} 
   \begin{document} 
   ~a
   \end{document}})

(define (COMMANDS x.tex x.pdf x.png)
  @string-append{
   pdflatex @x.tex 
   convert -density 90 @x.pdf -quality 90 -transparent white -trim +repage 
@x.png})

@;latex{\sum_{i=0}^{\infty}\lambda_i}

-- 
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 https://groups.google.com/d/optout.


Re: [racket-users] [Redex] test-->>E and trace

2015-12-18 Thread Matthias Felleisen

The quickest way is to write a macro that expands to trace plus a test. -- 
Matthias



On Dec 18, 2015, at 6:33 AM, Anton Podkopaev  wrote:

> Hello, colleagues!
> 
> Is there any way to get a term trace from successful test-->>E in Redex?
> 
> BR,
> Anton Podkopaev, PhD student, SPbSU
> 
> -- 
> 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 https://groups.google.com/d/optout.

-- 
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 https://groups.google.com/d/optout.


Re: [racket-users] [Redex] test-->>E and trace

2015-12-18 Thread Robby Findler
I think you may want to call apply-reduction-relation* with a
#:stop-when argument instead?

Robby


On Fri, Dec 18, 2015 at 5:33 AM, Anton Podkopaev  wrote:
> Hello, colleagues!
>
> Is there any way to get a term trace from successful test-->>E in Redex?
>
> BR,
> Anton Podkopaev, PhD student, SPbSU
>
> --
> 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 https://groups.google.com/d/optout.

-- 
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 https://groups.google.com/d/optout.


[racket-users] Can scribble/lp2 typeset comments within chunks?

2015-12-18 Thread Matthew Butterick
First try: seemingly not, because this file does not render to HTML with 
comments:

;;;
#lang scribble/lp2

@chunk[<*>
   (define (f x) ; not g
 ;; amazing computation
 (* x x))]
;;;

In HTML it becomes this:

<*> ::=
(define (f x)
 
  (* x x))


Second try: Docs suggest use of CHUNK + UNSYNTAX [1] but this next try fails 
with "UNSYNTAX: unbound identifier"

;;;
#lang scribble/lp2

@CHUNK[<*>
   (define (f x) ; not g
 @UNSYNTAX{;; amazing computation}
 (* x x))]
;;;


Third try: also tried scribble/comment-reader [2] but this doesn't work 
(apparently because `racketblock` knows about `code:comment` but `chunk` does 
not:

;;;
#lang scribble/lp2

@#reader scribble/comment-reader
(chunk <*>
  (define (f x) ; not g
;; amazing computation
(* x x)))
;;;

[1] 
http://docs.racket-lang.org/scribble/lp.html?q=CHUNK#%28form._%28%28lib._scribble%2Flp..rkt%29._.C.H.U.N.K%29%29

[2] 
http://docs.racket-lang.org/scribble/scribble_manual_code.html?q=comment-reader#%28mod-path._scribble%2Fcomment-reader%29


-- 
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 https://groups.google.com/d/optout.


[racket-users] listing the identifiers from "all-defined-out" and "all-from-out"

2015-12-18 Thread Sanjeev Sharma
how can I get lists of identifiers im/exported when one uses

all-defined-out 
all-from-out

I can't yet make sense of regprov.rkt 

-- 
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 https://groups.google.com/d/optout.


[racket-users] Try Racket is ABORTED.

2015-12-18 Thread Taro Annual
over.

-- 
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 https://groups.google.com/d/optout.


[racket-users] winter break project for student = android

2015-12-18 Thread Neil Van Dyke
If some smart student is looking for a winter break project (as an 
alternative to grinding trophies in Fallout 4, arguing Star Wars 
semiotics in online forums, or marathoning ultimately disappointing 
Netflix shows)...


Build Racket for the Android NDK, then make a generic shell Android app 
in Java that makes the Racket APIs (GUI, filesystem, networking) work 
through the Android SDK, for arbitrary apps coded in Racket.


This might be the kind of project in which you get to a milestone, like 
a GUI click calling Racket code, working within a few days. After that 
early milestone, then there's probably weeks or months of a combination 
of tricky technical improvements (e.g., communication channel, GUI 
issues, VM issues) and straightforward churning (moving somewhat 
mechanically towards API completeness).  The ultimate demo would be 
complete DrRacket running on an Android tablet, without modification.  
Then release a `raco` tool that generates an `.apk` from an arbitrary 
Racket GUI program.


A variation on this would be to defer/eliminate the Racket GUI part, and 
instead/first expose an Android UI API to Racket.  That would give more 
Android-ish UI for Racket apps written specifically for that API, but 
doesn't give us DrRacket on Android tablets.


Neil V.

--
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 https://groups.google.com/d/optout.