Re: [racket-users] advice for writing desktop app

2015-04-04 Thread Gour

Alexander D. Knauth alexan...@knauth.org writes:

 For tables, I wrote my own version of some kind of table for racket’s gui
 so that I could use it in a gui latin dictionary I was making.

Thanks. Looks good.


Sincerely,
Gour

-- 
One is understood to be in full knowledge whose every endeavor 
is devoid of desire for sense gratification.

-- 
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] advice for writing desktop app

2015-04-04 Thread Gour

Vincent St-Amour stamo...@ccs.neu.edu writes:

 I have written GUI applications in Racket, .NET, Swing and tk, and
 Racket is the most pleasant by far, IMO.

I'm glad to hear it. Racket, as language, really looks beautiful - simple
syntax and powerful expressibility, afaict.

Do you find Racket's GUI sufficient for desktop appps?


 Racket performance is pretty good in general. The Racket performance
 docs have more information:

Thank you, I'll take a look.

 Realm of Racket is very good, and since you already have programming
 experience, you should be able to pick it up easily.

Thank you.

 If you need a gentler introduction to thinking functionally, I would
 recommend How to Design Programs:

That what I'm reading atm while considering whether to buy ebook or paperback
version of RoR.


Sincerely,
Gour

-- 
One is understood to be in full knowledge whose every endeavor 
is devoid of desire for sense gratification. He is said by sages 
to be a worker for whom the reactions of work have been burned 
up by the fire of perfect knowledge.

-- 
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] advice for writing desktop app

2015-04-04 Thread Gour

Alexander D. Knauth alexan...@knauth.org writes:

 Here it is, although some of the things I did like creating objects on a
 dummy panel and then reparenting them seem like they could be bad ideas.
 https://github.com/AlexKnauth/racket-gui-table

Thank you. I did star it.

What about trees? You don't have need for it?


Sincerely,
Gour

-- 
One is understood to be in full knowledge whose every endeavor 
is devoid of desire for sense gratification.

-- 
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] Questions: free-identifier=?; literal-id in syntax-case

2015-04-04 Thread Jos Koot
The following puzzles me:
 
#lang racket
(define plus +)
(free-identifier=? #'+ #'plus) ; - #f
 
#lang racket
(define-syntax (a stx)
 (syntax-case stx ()
  ((_) (datum-syntax stx (free-identifier=? #'+ #'plus)
(define plus +)
(a) ; - #f
 
#lang racket
(define plus +)
(define-syntax (a stx)
 (syntax-case stx (+)
  ((_ +) #'#t)
  ((_ x) #'#f)))
(a plus) ; - #f
 
I am confused, because I expect #t to be produced in the three above cases.
Obviously I don't understand free-identifier=? well.
Can you help me with that?
 
As another question: the docs on syntax-case state:
 
An id that has the same binding as a literal-id matches a syntax object
that is an identifier with the same binding in the sense of
free-identifier=?
file:///C:/Program%20Files/Racket/doc/reference/stxcmp.html?q=syntax-case#%
28def._%28%28quote._~23~25kernel%29._free-identifier~3d~3f%29%29 .
The match does not introduce any
file:///C:/Program%20Files/Racket/doc/reference/stx-patterns.html?q=syntax-
case#%28tech._pattern._variable%29 pattern variables.
 
Why isn't or cant't the match introduce a pattern variable?
Without binding the literal-id as a pattern variable,
location information is lost, for example:
 
#lang racket
(error-print-source-location #t)
(begin-for-syntax (error-print-source-location #t))
(define-syntax (a stx)
 (syntax-case stx (+)
  ((_ +) (raise-syntax-error 'a msg stx #'+ ; ---
(a +)
 
raises a syntax-error as expected, but it highlights + in the line marked
---,
not in the last line.
I would prefer the + in the last line to be highlighted.
 
(I am running DrRacket, version 6.1.1 [3m])
 
Help very much appreciated.
 
Wish all of you a fine easter,
Jos Koot
 

-- 
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] raco exe can't build executables on OpenBSD

2015-04-04 Thread Andrew Mauer-Oats
Notice that not only does the output file fail to open, but also the raco
pkg show has a similar error. I missed that the first read through.

I see you said you installed manually main-distribution. You could look
into that process. I think you should verify no issues exist before you do
that step (does raco pkg show work then?).

Andrew

PS Are you aware of the find command's perm options to help track this
down? At least GNU find...


On Friday, April 3, 2015, Juan Francisco Cantero Hurtado 
juanfra...@gmail.com wrote:

 When I use a racket version built from source everything works fine but
 the OpenBSD port has some problems.

 $ cat mytest.rkt
 #lang racket
 (displayln (+ 1 1))
 $ racket mytest.rkt
 2
 $ raco exe mytest.rkt
 open-output-file: cannot open output file
   path: /home/juanfra/racket-fallo-exe/exe/mytest
   system error: Permission denied; errno=13

 (full output in http://dpaste.com/0C6F715.txt )

 $ raco pkg config
 name:
   6.2.0.2
 catalogs:
   http://www.cs.utah.edu/plt/snapshots/20150328-cae1626/catalog/
   http://pkgs.racket-lang.org
   http://planet-compats.racket-lang.org
 default-scope:
   user
 download-cache-dir:
   /home/juanfra/.racket/download-cache
 download-cache-max-files:
   1024
 download-cache-max-bytes:
   67108864
 trash-max-packages:
   512
 trash-max-seconds:
   172800

 $ raco pkg show
 Installation-wide:
 open-output-file: cannot open output file
   path: /usr/local/share/racket/pkgs/.LOCKpkgs.rktd
   system error: Permission denied; errno=13

 The port uses racket minimal and I installed manually main-distribution.
 Racket was compiled with these options: --enable-libffi --enable-gracket
 --enable-foreign --enable-lt=/usr/bin/libtool --disable-backtrace
 --disable-docs --disable-places --disable-futures --enable-extflonum
 --enable-jit. The port also changes installation-name in config.rktd from
 snapshot to the version number.

 Maybe the port is breaking racket somewhere. Any idea?.

 --
 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 javascript:;.
 For more options, visit https://groups.google.com/d/optout.



-- 
Andrew Mauer-Oats
Mathematics Ph.D.
Chicago Public Schools: Whitney Young

-- 
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] a desperate plea for new package system etiquette

2015-04-04 Thread Neil Van Dyke
I don't know how other people feel about someone else putting packages 
they wrote into the new package system, but I think it's a problem.


Today marks at least the third time that I was about to move forward 
with the new package system, but it just came to a screeching halt, when 
I found someone had already put that particular package there.


Please, please, please, don't put my packages into the new package system.

And, if you've already done this with one of my packages, it would be 
nice if you would correct it by taking the package out of the directory, 
so that it's not messing up my work.


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.


Re: [racket-users] Racket and FastCGI

2015-04-04 Thread Neil Van Dyke

Lux wrote on 04/03/2015 05:47 AM:

cgi.assign = ( .rkt = /usr/bin/racket )

scgi.server = ( .rkt = ((
 bin-path = /usr/bin/racket,
 socket = /tmp/racket.socket
   )))

scgi.debug = 1
--

Trying to get: http://localhost/scgi-test/scgi.rkt
Result in: 500 - Internal Server Error

I think I miss something important here...


Looks like you specified reaching the SCGI server via a Unix domain 
socket, but you never told the Racket program to use that socket. You 
actually can't use that kind of socket with the Racket SCGI library -- 
typically, the SCGI server will talk TCP to localhost on a specific port.


Offhand, I can't tell you confidently the exact lighttpd configuration 
to use, since the lighttpd SCGI module appears not clearly documented, 
but you can figure it out from: 
http://redmine.lighttpd.net/projects/1/wiki/Docs_ModSCGI


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.


Re: [racket-users] advice for writing desktop app

2015-04-04 Thread Jens Axel Søgaard
Tree?

Do you mean this?

http://docs.racket-lang.org/mrlib/Hierarchical_List_Control.html?q=button%25

/Jens Axel


2015-04-04 10:30 GMT+02:00 Gour g...@atmarama.net:

 Alexander D. Knauth alexan...@knauth.org writes:

 Here it is, although some of the things I did like creating objects on a
 dummy panel and then reparenting them seem like they could be bad ideas.
 https://github.com/AlexKnauth/racket-gui-table

 Thank you. I did star it.

 What about trees? You don't have need for it?


 Sincerely,
 Gour

 --
 One is understood to be in full knowledge whose every endeavor
 is devoid of desire for sense gratification.

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



-- 
--
Jens Axel Søgaard

-- 
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] Questions: free-identifier=?; literal-id in syntax-case

2015-04-04 Thread Alexander D. Knauth

On Apr 4, 2015, at 11:22 AM, Jos Koot jos.k...@gmail.com wrote:

 The following puzzles me:
  
 #lang racket
 (define plus +)
 (free-identifier=? #'+ #'plus) ; - #f
  
 #lang racket
 (define-syntax (a stx)
  (syntax-case stx ()
   ((_) (datum-syntax stx (free-identifier=? #'+ #'plus)
 (define plus +)
 (a) ; - #f
  
 #lang racket
 (define plus +)
 (define-syntax (a stx)
  (syntax-case stx (+)
   ((_ +) #'#t)
   ((_ x) #'#f)))
 (a plus) ; - #f
  
 I am confused, because I expect #t to be produced in the three above cases.
 Obviously I don't understand free-identifier=? well.
 Can you help me with that?

Maybe you’re thinking of what happens when you use
(define-syntax plus (make-rename-transformer #’+))
Instead of
(define plus +)

 As another question: the docs on syntax-case state:
  
 An id that has the same binding as a literal-id matches a syntax object
 that is an identifier with the same binding in the sense of free-identifier=?.
 The match does not introduce any pattern variables.
  
 Why isn't or cant't the match introduce a pattern variable?
 Without binding the literal-id as a pattern variable,
 location information is lost, for example:
  
 #lang racket
 (error-print-source-location #t)
 (begin-for-syntax (error-print-source-location #t))
 (define-syntax (a stx)
  (syntax-case stx (+)
   ((_ +) (raise-syntax-error 'a msg stx #'+ ; ---
 (a +)
  
 raises a syntax-error as expected, but it highlights + in the line marked 
 ---,
 not in the last line.
 I would prefer the + in the last line to be highlighted.

I mostly agree with that idea, but there is a reason why it doesn’t do that.
If it did that, then I don’t think you could do things like put multiple of 
these in a single pattern, so for instance:
(define-syntax (a stx)
  (syntax-case stx (+)
[(_ + +) (raise-syntax-error ‘a “msg” stx #’+)]))
(a +)
It wouldn’t know which + to bind.

The way I do this which feels a bit clunky like there should be a better 
solution:
(define-syntax (a stx)
  (syntax-parse stx
[(_ (~and + (~literal +)) (~literal +)) (raise-syntax-error ‘a “msg” stx 
#’+)]))
To tell it specifically to bind it.

To make it a little less verbose, you could define a pattern-expander that 
expanded to (~and + (~literal +)), but I’m not sure how to do better than that.


-- 
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] a syntax-class that can get the var-id it was used with?

2015-04-04 Thread Alexander D. Knauth
Is there a way to define a syntax-class so that for example in:
(syntax-parse stx
  [(_ a:stxcls) ….])
It would be able to know that it was used with a, instead of for instance b in 
b:stxcls?

Is that possible?

If not, would it be a good idea to add?

The reason I ask is that then it might be possible to define a `lit` 
syntax-class that would do this:
(syntax-parse stx
  [+:lit #’+])
And have it check that stx matched the literal +, but also bound + as a pattern 
variable.


-- 
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] raco exe can't build executables on OpenBSD

2015-04-04 Thread Juan Francisco Cantero Hurtado
On Saturday, April 4, 2015 at 5:10:21 PM UTC+2, Andrew Mauer-Oats wrote:
 Notice that not only does the output file fail to open, but also the raco pkg 
 show has a similar error. I missed that the first read through. 
 
 
 I see you said you installed manually main-distribution. You could look 
 into that process. I think you should verify no issues exist before you do 
 that step (does raco pkg show work then?). 

I tested with racket (which includes the main distribution) and racket minimal. 
I have the same problem with both.In fact, I have had the racket pkg show 
issue for a long time.

 
 
 Andrew
 
 
 PS Are you aware of the find command's perm options to help track this down? 
 At least GNU find...

No.

-- 
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] eval and set

2015-04-04 Thread Erik Silkensen
Could someone explain how this example works?

$ racket
Welcome to Racket v6.1.1.
- (require racket/sandbox)
- (define racket-eval (make-evaluator 'racket))
- (define a (racket-eval '(set 1 2 3)))
- a
(set 1 2 3)
- (set? a)
#f
- (define racket-eval-again (make-evaluator 'racket))
- (equal? a (racket-eval-again '(set 1 2 3)))
#f

Is it something particular to set?  (Or objects like that?)

--Erik

-- 
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] eval and set

2015-04-04 Thread Alexander D. Knauth

On Apr 4, 2015, at 5:26 PM, Erik Silkensen eriksilken...@gmail.com wrote:

 Could someone explain how this example works?
 
 $ racket
 Welcome to Racket v6.1.1.
 - (require racket/sandbox)
 - (define racket-eval (make-evaluator 'racket))
 - (define a (racket-eval '(set 1 2 3)))
 - a
 (set 1 2 3)
 - (set? a)
 #f
 - (define racket-eval-again (make-evaluator 'racket))
 - (equal? a (racket-eval-again '(set 1 2 3)))
 #f
 
 Is it something particular to set?  (Or objects like that?)

I don’t really know how this works, but if you do this:

 (define racket-eval2
(parameterize ([sandbox-namespace-specs
(append (sandbox-namespace-specs)
`(racket/set))])
  (make-evaluator 'racket)))
 (define b (racket-eval2 '(set 1 2 3)))
 (set? b)
#t

Then it works more like you would expect.

The documentation for sandbox-namespace-specs says this:

The module paths are needed for sharing module instantiations between the 
sandbox and the caller. For example, sandbox code that returns posn values 
(from the lang/posn module) will not be recognized as such by your own code by 
default, since the sandbox will have its own instance of lang/posn and thus its 
own struct type for posns. To be able to use such values, include 'lang/posn in 
the list of module paths.


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