Re: [racket-users] Failed to load module in drracket

2019-08-24 Thread Hong Yang
Hi Robby

Thanks for your explain, is ther any way I can enforce to load the module?
or let me know which code did this?

Best reagrds
Walter

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAATsUuUbWUr9k%3Dny%2BbEZM5ckMWS%3D_NrBzkTJK%2B05HWO6mbADPA%40mail.gmail.com.


Re: [racket-users] Is it possible to sell commercial use rights to an open source Racket package?

2019-08-24 Thread Neil Van Dyke

Hendrik Boom wrote on 8/24/19 8:48 AM:
The only problem I see is with the ue of macros in the propietary part 
of your software. They make it difficult to take your object code and 
link it with revised versions of the LGPL'd Racket code.


This seems much the same problem as doing the analogous thing with C 
libraries, not unique to Racket.


Racket macros in practice tend to do than C macros do, but the 
sensitivity of the mechanism seems much the same.


For example, if a C header changes even a single simple cpp-based 
`#define SOME_VALUE 7` "constant" between versions, that would probably 
get baked into compiled code, and one would probably be incorrect to 
relink (without recompiling) a new version of the library that changed that.


(Incidentally, the drawbacks of mixing in closed binary libraries and 
kernel modules with open source software are well-known in C and C++.  
This might plague you, for example, if you're trying to bring up new 
Linux on an old Linux-based device that used closed drivers, or are 
dependent on Nvidia closed drivers for your video display or your GPU 
compute engines.  Separate from not being able to inspect and improve 
the closed stuff, they tend to eventually stop working with newer 
software with which they link, with no practical recourse.)


--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/277e5d62-b94b-e639-a6e8-f49ff43a58da%40neilvandyke.org.


[racket-users] Trying out a Racket-powered Webpack alternative

2019-08-24 Thread Sage Gerard
Hi Racket,

I'm excited to show off two new packages if you'll indulge me:

- unlike-assets: A build tool for interdependent assets. Similar to Webpack, if 
you are familiar with the JS ecosystem.
- polyglot: A specific configuration of `unlike-assets` that builds static 
websites using any #lang among Markdown.

This page was build with polyglot: https://sagegerard.com/racket-powered.html

If there is any interest in experimenting with these packages, please enjoy 
them. If not, what can I do to make them better?

~slg

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/q7gcRoyClaQItkQHZjpqRhY3pvVF0SVlrYI3kBXTZgMm9Z6VPRqSaSG4yhhuo1ru1Kk9JRCIoQfwjLEpLlmnHwAbOmz2mD3yh7xrP7yZLmo%3D%40sagegerard.com.


Re: [racket-users] Failed to load module in drracket

2019-08-24 Thread Robby Findler
DrRacket expands your program in a mode that is relatively constrained, not
allowing it certain access to the file system or allowing it to run
executables or make network connections or lots of other things. This is
because it starts running code (on your behalf) as soon as it opens the
file in the editor and it would be bad if you accidentally opened nefarious
code and it got to run right away without you looking at it.

Robby

On Sat, Aug 24, 2019 at 10:14 AM Hong Yang  wrote:

> me too of to maillist..:(
>
> Hong Yang  于 2019年8月24日周六 下午11:04写道:
>
>> Hi Robby
>>
>> The error message just apear after I type (require fluxus/fluxus) in the
>> drracket. The mentioned so is an extension of racket for fluxus.
>>
>> Thanks
>> Walter
>>
>> Robby Findler  于 2019年8月23日周五 下午7:43写道:
>>
>>> (Sorry, accidentally dropped the list CC.)
>>>
>>> On Fri, Aug 23, 2019 at 6:42 AM Robby Findler 
>>> wrote:
>>>
 Is this an error you see when you click "run" or does it appear along
 the very bottom of the window on its own?

 Robby

 On Fri, Aug 23, 2019 at 5:23 AM Walter Yang  wrote:

> I'm trying to load a module in drracket:
>
> #lang racket
>
> (require fluxus/fluxus)
>
> I got the following error message:
>
>   default-load-extension-handler: forbidden (execute) access to
> /usr/share/racket/collects/fluxus/compiled/native/x86_64-linux/3m/fluxus-engine_ss.so
>
> But it's OK load in command line racket:
>
> $ racket
> Welcome to Racket v7.4.
> > (require fluxus/fluxus)
> >
>
> Any comments?
>
> Thanks
> Walter
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/a76162ca-ee89-4d62-be51-e6a81d6adfd3%40googlegroups.com
> 
> .
>
 --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CAATsUuUVM91pMAOM9a9n3WJ4NZb0JjMeFk_CwrbyLBNtfL7gUg%40mail.gmail.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAL3TdONovg0inJvDG-1x-%2BObTm%3DwkFAsiNXm0m-pWn3TUCWoGQ%40mail.gmail.com.


Re: [racket-users] Failed to load module in drracket

2019-08-24 Thread Hong Yang
me too of to maillist..:(

Hong Yang  于 2019年8月24日周六 下午11:04写道:

> Hi Robby
>
> The error message just apear after I type (require fluxus/fluxus) in the
> drracket. The mentioned so is an extension of racket for fluxus.
>
> Thanks
> Walter
>
> Robby Findler  于 2019年8月23日周五 下午7:43写道:
>
>> (Sorry, accidentally dropped the list CC.)
>>
>> On Fri, Aug 23, 2019 at 6:42 AM Robby Findler 
>> wrote:
>>
>>> Is this an error you see when you click "run" or does it appear along
>>> the very bottom of the window on its own?
>>>
>>> Robby
>>>
>>> On Fri, Aug 23, 2019 at 5:23 AM Walter Yang  wrote:
>>>
 I'm trying to load a module in drracket:

 #lang racket

 (require fluxus/fluxus)

 I got the following error message:

   default-load-extension-handler: forbidden (execute) access to
 /usr/share/racket/collects/fluxus/compiled/native/x86_64-linux/3m/fluxus-engine_ss.so

 But it's OK load in command line racket:

 $ racket
 Welcome to Racket v7.4.
 > (require fluxus/fluxus)
 >

 Any comments?

 Thanks
 Walter

 --
 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.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/racket-users/a76162ca-ee89-4d62-be51-e6a81d6adfd3%40googlegroups.com
 
 .

>>>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAATsUuUVM91pMAOM9a9n3WJ4NZb0JjMeFk_CwrbyLBNtfL7gUg%40mail.gmail.com.


Re: [racket-users] [racket users] Contracts and make-keyword-procedure question

2019-08-24 Thread Ben Greenman
The -> combinator doesn't support unspecified keywords. ->* won't work either.

Instead, you can try writing a new contract combinator (keyword-procedure/c ?)

Or, don't use define/contract and put the domain checks in the function body.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAFUu9R4P2MS7qeBgdUcsW5FPpHLcKp%3Dqj6DZ2RjsWaiQKf%2BFYA%40mail.gmail.com.


[racket-users] Article from "Uncle Bob" Clojure not Racket but syntax related

2019-08-24 Thread tbrooke



>From Bob Martin: (I know he's not the last word, but interesting)



Over the last 5 decades, I’ve used a LOT of different languages.

And I’ve come to a conclusion.


My favorite language of all, the language that I think will outlast all the 
others, the language that I believe will eventually become the standard 
language that all programmers use…


…is Lisp.


I have not come to this conclusion casually, nor even willingly. I was not 
fan of Lisp. For 40 years I was not a fan of Lisp. I saw the CARs and CDRs 
and CADDADDRs and thought it was all just academic baloney; interesting but 
not truly useful.


And then, a decade ago I found SICP 
. And after 
that I found Clojure. Clojure is a Lisp that rides on top of the Java 
ecosystem (and does not have CARs or CDRs, or CADADAADR s).


I wasn’t convinced right away. It took a few years. But after the usual 
stumbling around and frustration, I began to realize that this language was 
the easiest, most elegant, least imposing language I had ever used – and 
not by a small margin.

So, why Clojure? I’ve made a list. Are you ready for it? Here it is.

   1. Economy of Expression.

If you are wondering where the rest of the list is, there isn’t any more. 
That’s the reason. There’s only one. It is just simpler, and easier, and 
less occluding to write expressive code in Clojure. It requires fewer 
lines. It require fewer characters. It require fewer hours. It requires 
fewer mental gymnastics.


http://blog.cleancoder.com/uncle-bob/2019/08/22/WhyClojure.html

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/e22dd0c7-dc1d-4b92-8bbd-548af243f78a%40googlegroups.com.


Re: [racket-users] Is it possible to sell commercial use rights to an open source Racket package?

2019-08-24 Thread Hendrik Boom
On Fri, Aug 23, 2019 at 07:20:31PM -0400, Neil Van Dyke wrote:

> 
> Aside: One thing I don't want is anyone new to Racket and open source
> licensing to get a chance drive-by impression that Racket has unusual
> "licensing problems".  I saw this concern multiple times recently.  I'd say
> Racket's standard licensing (for using it as a compiler/runtime/libraries)
> is pretty commercial-friendly, especially given the willingness (perhaps,
> desperation) of a lot of Racketeers to encourage commercial adoption.  Worst
> case might be that a particular attorney will just need some clarifications
> that people are happy to help with.

The only problem I see is with the ue of macros in the propietary part 
of your software.  They make it difficult to take your object code and 
link it with revised versions of the LGPL'd Racket code.

It seems to me that the LGPL does not require you to be able to link 
with incompatible versions of LGPL'd code, so this should not be a 
*legal* problem, but would be a severe practical problem for your 
customers.

Anyone know for sure?

In any case you should be able to release your proprietary source code
to your customers.  They they could install it on their working Racket 
systems.

-- hendrik

> 
> 
> -- 
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/7f441387-cb9c-5cd5-0d7b-c6d8f8919409%40neilvandyke.org.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20190824124838.yhq6wge2z6q2t7ql%40topoi.pooq.com.


[racket-users] [standard-fish] small house facade, with attribute handling code

2019-08-24 Thread Hendrik Boom
door.rkt draws a picture of a small house, with a door and windows.
Different picture each time you run it.

The bulk of the code is there to handle attributes (like colours and 
sizes) in an association list, so that you can establish defaults and 
the like.

One thing I know is that the attribute-handling code isn't right yet, 
and follows different conventions in different parts of it.

Sometimes I have multipls versions of a function that are identical 
except for using different argument conventions.

It's still very much in a state of flux.

Suggestions very welcome.

-- hendrik

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20190824122733.ov2gfaerxsgl5ajz%40topoi.pooq.com.
#lang racket
(require pict)
(require racket/gui/base)
(require racket/random)

(define (show tag thing) (print (cons tag thing)) thing)

; (list 'random (random 1 10) (random 1 2) (random 1 234))
; (list 'chosen (random-ref '(a b c d e f)))
; (list 'nope)
; (show 'showtest 'showdatum)


; Attribute management


; ali is an environment.  It should contain all the parameters that are neede 
to make a typical whatever (at the moment, the whatever is a door.)
;  At the moment, also, it allows attributes to be defined as functions; at 
lookup time the entire association list is passed to the function so that its 
value can depend on other (not necessarily previous) parameters.

; This mechanism was originally introduced for flexibility, but is being used 
mainly to implement the freeze operation.

(define (looker name ali succeed fail)
  (letrec (
  (lookup2 (lambda (name aa succeed fail)
(if (eq? aa '())
  (fail)
  (if (eq? name (caar aa))
(let ((value (cdar aa)))
  (if (procedure? value)
  (succeed (value ali))
  (succeed value)
)
  )
(lookup2 name (cdr aa) succeed fail)
  )
)
  )))
(lookup2 name ali succeed fail)
  )
)

(define (lookup name ali fail)
  (looker name ali (lambda (result) result) fail)
)
(define (old lookup name ali fail)
  (letrec (
  (lookup2 (lambda (name aa fail)
(if (eq? aa '())
  (fail)
  (if (eq? name (caar aa))
(let ((value (cdar aa)))
  (if (procedure? value)
  (value ali)
  value
)
  )
(lookup2 name (cdr aa) fail)
  )
)
  )))
(lookup2 name ali fail)
  )
)

(define (binda name value a) (cons (cons name value) a))

(define (bind name value object)
  (lambda (a)
(object (binda name value a))
  )
)

; Freezing is a mechanism for choosing parameters to be passed down to more 
local objects, so, for example, we can set a style for all he windows in a 
house, but allow each house to have its own style for windoess.  This is 
accomplished by having the window-style be a function instead of a value.  The 
freeze calls the function and rebids the name to the result of that function.  
The resulting associon list is passed down to lower objects.

(define (freezea name a)
  (let ((value (lookup name a (lambda () '()
(if (eq? value '()) a (binda name value a

; Got the wrong definition for lookup.  Need a way after the lookup to base 
decision on its success.  Returning '() in't enough.  I wonder what the right 
definition is.

(define (freeze name f a)
  ( let (( value (lookup name a (lambda () '())) ))
(if (eq? value '())
  f
  (lambda (a) (f (binda name value a)))
)
  )
)

(define (freezeo name object)
  ( lambda (a)
(let (( value (lookup name a (lambda () '())) ))
(if (eq? value '())
  (object a)
  (object (binda name value a))
)
  ))
)

(define (with a name value) (cons (cons name value) a))


;  Graphics combinators

(define ( hor l )
  (if (cons? l)
(if
  (null? (cdr l))
  (car l)
  (let
( [rest (hor (cdr l))] )
(lambda (a) (hc-append ((car l) a) (rest a)))
  )
)
(print "ERROR: null list in hor")
  )
)  

(define ( vert l )
  (if (cons? l)
(if
  (null? (cdr l))
  (car l)
  (let
( [rest (vert (cdr l))] )
(lambda (a) (hc-append ((car l) a) (rest a)))
  )
)
(print "ERROR:null list in vert")
  )
)  


(define (horsep count object spacer a) ; object and spacer are functions taking 
alists.
  (if (equal? count 1) (object a) ; TODO: zero case
(ht-append (object a) (spacer a) (horsep ( - count 1 ) object spacer a))
  )
)

(define (horsepp count object spacer)
  (lambda (a) (horsep count object spacer a))
  )

(define (spacer a)
  (blank 40 40)
  ; (filled-rectangle 40 40 #:color "white")
  )


; Architectural