Re: [racket-users] Machine code executable

2021-01-07 Thread Stephen De Gabrielle
we also have a faq

https://github.com/racket/racket/wiki/Frequently-Asked-Questions#is-racket-compiled


On Thursday, January 7, 2021 at 3:23:31 PM UTC Paulo Matos wrote:

>
> Daniel Santos writes:
>
> > Has Racket to output to other language, such as C, in order to have 
> machine
> > code executables, or, does Racket produce machine code executables 
> directly?
>
> Hi Daniel,
>
> It's certainly possible to generate executables. Take a look at `raco
> exe`.
> https://docs.racket-lang.org/raco/exe.html
>
> >
> > thank you
>
>
> -- 
> Paulo Matos
>

-- 
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/b32230d5-728f-440b-b201-94df0de971aen%40googlegroups.com.


Re: [racket-users] side-conditions

2021-01-07 Thread Robby Findler
I'm not sure without seeing more of your code (one annoying thing about
Redex is that it is not always clear when you "in redex" and when you are
"in racket" and your code might be mixing those up) but here is an example
along the lines I think you're working towards. Note that it might be
better to define in-dom as a judgment form (this would require you to
define a metafunction that checks if two names are different) but I did it
as a metafunction to show how that would work.

Robby


#lang racket
(require redex/reduction-semantics)

(define-language L
  (e ::= (+ e e) x)
  (x y ::= variable-not-otherwise-mentioned)
  (Γ ::= · (x Γ)))

(define-judgment-form L
  #:mode (closed-by I I)
  #:contract (closed-by Γ e)

  [(closed-by Γ e_1) (closed-by Γ e_2)
   ---
   (closed-by Γ (+ e_1 e_2))]

  [(side-condition (in-dom x Γ))
   -
   (closed-by Γ x)])

(define-metafunction L
  in-dom : x Γ -> boolean
  [(in-dom x ·) #false]
  [(in-dom x (x Γ)) #true]
  [(in-dom x (y Γ)) (in-dom x Γ)])

(test-judgment-holds (closed-by (c ·) c))
(test-judgment-holds (closed-by (b (c ·)) b))
(test-judgment-holds (closed-by (b (c ·)) c))
(test-judgment-holds (closed-by (a (b (c ·))) (+ a (+ b c
(test-equal (judgment-holds (closed-by · a)) #false)
(test-equal (judgment-holds (closed-by · (+ a (+ b c #false)

(test-results)


On Thu, Jan 7, 2021 at 10:52 AM Beatriz Moreira 
wrote:

> I have tried to use a metafunction to represent s∉dom(env-ß) in a side
> condition,* (side-condition (notinenv ((ß_1 ...) env-ß ...) x))*,  but
> the error message *notinenv: illegal use of syntax in: (notinenv ((ß_1
> ...) env-ß ...) x) value at phase 1: #* appears and i don't
> understand why.
>
> I defined *notinenv* as a simple metafunction just for testing:
> (define-metafunction FS
>   notinenv : env-ß x -> any
>   [(notinenv (((x -> _) ß_1 ...) env-ß ...) x) #f]
>   [(notinenv ((ß_1 ...) env-ß ...) x) #t])
>
> Thank you :)
>
> A segunda-feira, 21 de dezembro de 2020 à(s) 15:05:37 UTC, Robby Findler
> escreveu:
>
>> I recommend you define a metafunction or judgment form that captures what
>> you want exactly and then use that.
>>
>> Robby
>>
>>
>> On Mon, Dec 21, 2020 at 8:32 AM Beatriz Moreira 
>> wrote:
>>
>>> Hi,
>>> I have been using side-condition to check if a sequence of variables
>>> exist is in an environment , like this :
>>>
>>> *(side-condition (not (member (term ((s : _) ...)) (term (env-ß_1
>>> ...)*
>>>
>>> being s a state variable and _ a value that i don't know. But it doesn't
>>> seem to work as expected, as it returns #t even when it shouldn't.
>>> Is it there a better way of doing it?
>>>
>>> Thank you :)
>>>
>>> --
>>> 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.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/racket-users/c8632f31-98c2-46cb-8231-2ca272ae2b8an%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/30754357-0563-4709-8d88-f0f8ef5d8b63n%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/CAL3TdOOjKuczdg0S6XhHeCi9QuJRtFLb8EBOUzQWVqhJfbsyCQ%40mail.gmail.com.


Re: [racket-users] side-conditions

2021-01-07 Thread Beatriz Moreira
I have tried to use a metafunction to represent s∉dom(env-ß) in a side 
condition,* (side-condition (notinenv ((ß_1 ...) env-ß ...) x))*,  but the 
error message *notinenv: illegal use of syntax in: (notinenv ((ß_1 ...) 
env-ß ...) x) value at phase 1: #* appears and i don't understand 
why. 

I defined *notinenv* as a simple metafunction just for testing: 
(define-metafunction FS
  notinenv : env-ß x -> any
  [(notinenv (((x -> _) ß_1 ...) env-ß ...) x) #f]
  [(notinenv ((ß_1 ...) env-ß ...) x) #t])

Thank you :)

A segunda-feira, 21 de dezembro de 2020 à(s) 15:05:37 UTC, Robby Findler 
escreveu:

> I recommend you define a metafunction or judgment form that captures what 
> you want exactly and then use that.
>
> Robby
>
>
> On Mon, Dec 21, 2020 at 8:32 AM Beatriz Moreira  
> wrote:
>
>> Hi,
>> I have been using side-condition to check if a sequence of variables 
>> exist is in an environment , like this : 
>>
>> *(side-condition (not (member (term ((s : _) ...)) (term (env-ß_1 
>> ...)*
>>
>> being s a state variable and _ a value that i don't know. But it doesn't 
>> seem to work as expected, as it returns #t even when it shouldn't. 
>> Is it there a better way of doing it?
>>
>> Thank you :) 
>>
>> -- 
>> 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.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/racket-users/c8632f31-98c2-46cb-8231-2ca272ae2b8an%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/30754357-0563-4709-8d88-f0f8ef5d8b63n%40googlegroups.com.


Re: [racket-users] Machine code executable

2021-01-07 Thread Paulo Matos


Daniel Santos writes:

> Has Racket to output to other language, such as C, in order to have machine
> code executables, or, does Racket produce machine code executables directly?

Hi Daniel,

It's certainly possible to generate executables. Take a look at `raco
exe`.
https://docs.racket-lang.org/raco/exe.html

>
> thank you


-- 
Paulo Matos

-- 
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/87mtxkhiuv.fsf%40linki.tools.


Re: [racket-users] Re: Racket News - Happy New Year Issue 44

2021-01-07 Thread Paulo Matos


Stephen De Gabrielle writes:

> Another awesome issue Paulo, RN has become indispensable! (I was just
> thinking I needed base64!)
> Thank you so much
>

Thank you for your kind words.
Your work on Racket has been great as well - on to 2021 and to a great
Racket year!

-- 
Paulo Matos

-- 
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/87pn2ghixv.fsf%40matos-sorge.com.


Re: [racket-users] Re: Racket News - Happy New Year Issue 44

2021-01-07 Thread Stephen De Gabrielle
Another awesome issue Paulo, RN has become indispensable! (I was just
thinking I needed base64!)
Thank you so much

Stephen

On Wed, 6 Jan 2021 at 13:16, Paulo Matos  wrote:

> Hi again,
>
> A problem with the datasets meant that in the first few hours after
> publishing, the plots reflected incorrect values. This is now fixed. Thanks
> to Sorawee for noticing and pointing it out to me.
>
> Paulo
>
> On Wednesday, 6 January 2021 at 11:34:04 UTC+1 Paulo Matos wrote:
>
>> Happy new year everyone,
>>
>> It is with great joy that I publish the first issue of the year.
>> Issue 44: https://racket-news.com/2021/01/racket-news-issue-44.html
>>
>> That's our longest issue ever. Not everything could be included as I
>> always try the issues to be quick to read (over a coffee break) but this
>> one might need an extra long coffee.
>>
>> Lets make 2021 the year of Racket! Up, Up, and Away!
>> --
>> Paulo Matos
>>
> --
> 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/93836fa4-db47-439f-aaef-9077a1b5f1efn%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/CAGHj7-Ka3H4C56XuxVEO_9-R663YmGfCY6Kwb5BZRyfXOgQLkQ%40mail.gmail.com.


[racket-users] Machine code executable

2021-01-07 Thread Daniel Santos
Has Racket to output to other language, such as C, in order to have machine
code executables, or, does Racket produce machine code executables directly?

thank you

-- 
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/CAL6VdkS9xrv7c78POVsMg5QTX%3Dj3MA%2BUsDXmdhjoxjA4e-G%2BoQ%40mail.gmail.com.