Re: [racket-users] racket-mode finds wrong version of Racket

2019-12-16 Thread bruno cuconato
Emacs has a few ways to update environment variables (see
https://www.gnu.org/software/emacs/manual/html_node/emacs/Environment.html),
but IMHO they are not very practical if updating several variables — I
always prefer to simply restart Emacs, or not to add anything to $PATH
but to symlink files to somewhere in my PATH (when that approach is
viable).


since you are using OSX,
https://github.com/purcell/exec-path-from-shell might be useful to
you.

-- bruno cuconato

On Mon, 16 Dec 2019 at 14:28, David Storrs  wrote:
>
> I just now updated to 7.5 from 7.3, then updated my .bashrc to have the 
> correct path.  I'm using GNU Emacs in Terminal on OSX 10.11.
>
>
> $ echo $PATH
> [...stuff that isn't Racket...]:/Applications/Racket_v7.5.0.10/bin:[...stuff 
> that isn't Racket...]
>
> From a .rkt file:
> C-c C-c
> Welcome to Racket v7.3.
>
> ; Kill the Racket command server buffer
> C-x C-k
>
> ; back to the .rkt file, try again
> C-c C-c
> Welcome to Racket v7.3.
>
> ; kill and restart emacs
> C-x C-c
> $ emacs
> C-c C-c
> Welcome to Racket v7.3.
>
> Killing and restarting Terminal and reloading Emacs from scratch finally 
> worked.
>
> Is there any way that I could have resolved this without getting quite so 
> nuclear?  I googled around and could not find anything.
>
> --
> 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/CAE8gKodzUn8ZU4Yd2eV26xrBKyb0XW0mSBRNuj5WmE_ZtQW3MA%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/CAPWro-j6tkCN_VnDp2DLTp3-jcEuSFdXefM1DFApV9YTKqKyUA%40mail.gmail.com.


Re: [racket-users] procedural text generation for game jam.

2019-10-23 Thread bruno cuconato
On Mon, 22 Oct 2019 at 19:28, Hendrik Boom  wrote:
> What's desired in a too for a game is to take an abstract syntax of what
> is to be said, and to do the necessary transformations to make it into a
> grammatical sentence.

for the abstract syntax to concrete representation part,
GF(http://www.grammaticalframework.org/) might come in handy!
or maybe one would like to reimplement something like it in Racket...

-- 
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/CAPWro-iZk_0raSASk26rs48yae2RxwPJFTKwMw_M4_%3DVQAHNhQ%40mail.gmail.com.


Re: [racket-users] pollen?

2019-08-05 Thread bruno cuconato
hi Hendrik,

you might want to try https://groups.google.com/forum/#!forum/pollenpub for
pollen-related queries


--
bruno cuconato
(on mobile)

On Mon, Aug 5, 2019, 05:12 Hendrik Boom  wrote:

> On Sun, Aug 04, 2019 at 02:17:33AM -0700, Simon Schlee wrote:
> > I have not completely read this thread in detail, but to me it seems
> like
> > it could be useful to you, to experiment with pollen and custom tags and
> > try to capture more semantic meaning with those tags.
> > I think you would have an easier time creating templates that layout the
> > code exactly like you want, it might be some more work to transition but
> > you would have more control over how things are rendered.
> > Have you already checked-out/considered using pollen?
>
> I've seen a web page about it but I haven't yet looked into it seriously.
> Will look again, in more detail.
>
> I gather that it's built upon scribble.  The manual (
> https://docs.racket-lang.org/pollen/ ) seems to be one meta-level above
> the level of the scribble tutorials I've found.  Instead of descibing
> how to put together a manuscript that can produce, say, both html and
> pdf (possibly via TeX) output it seems to describe how you could define
> notations that could to that.
>
> Now you need that for any kind of sophisticated use (which I gather is
> what I'll be doing) but it's really nice to know what's *already*
> available to produce documents.  Have I somehow missed that in the
> documentation bundle?
>
> Also... pollen seems to be somewhat based on scribble.
> Does is share scribble's problem of not being able to nest
> @include-section within another tag, like
> @italic{
>   @include-section["other-file"]
> }
>
> -- 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/20190805041210.zk7aonuutslxqw7m%40topoi.pooq.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/CAPWro-gSOQSFyn%3DyHcZX4Yt-VVusnF6WKXLewWYyFF9HTRCrxQ%40mail.gmail.com.


Re: [racket-users] Capturing print?

2019-07-10 Thread bruno cuconato
there's
https://docs.racket-lang.org/reference/port-lib.html#%28def._%28%28lib._racket%2Fport..rkt%29._with-output-to-string%29%29
and company.
would that work for you?

-- bruno cuconato


On Wed, 10 Jul 2019 at 17:48, Kevin Forchione  wrote:

> Hi guys,
> Is there a wrapper or something like that that I can place around a print
> expression so that it captures it and returns a string value? Something
> like:
>
> [capture-print [printf “hello, world!”)) => “hello, world!”
>
> There are times when testing I’d like to capture the output and compare it
> with a check-equal? and suppress it from displaying in testing It could
> also be useful in other was possibly for delaying and manipulating printed
> output.
>
> Kevin
>
> --
> 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/CC768C18-C600-4136-8EF7-1A4AAC19BA25%40gmail.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAPWro-izwc1mYkcL-uDKi-m2A2HWoa%3D5ZNL%2B9AJPp55yoMKytQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Help: How to check a typed/racket type in an untyped Racket contract?

2019-05-17 Thread bruno cuconato
hi,

I'm trying to use a data structure defined in a typed racket module in my 
untyped code.

I'm want it to be accessible from a generic interface, so I'm using 
`define-generics`'s #:fast-defaults for
dispatching to the proper methods (this might not be the best practice 
though, and if so I welcome corrections). 
to do this I need a predicate for the type of data structure, hence my 
replying to this thread.

would Matthias' suggestion be the best long-term solution here?

> It suggests we should provide these generated contracts (or grant access 
them) via a modicum of reflection. 

I couldn't get Sam's solution to work, most likely because I haven't read 
much about typed racket yet. I tried
both

`(define-predicate RBTree? (All (A) (RedBlackTree A))) `

and

`(define-predicate RBTree? (RedBlackTree Any)) `

but none of them seem to work. even if I could get it to work, 
I still like Matthias' suggestion because I wouldn't need to create
another module.

cheers,

-- bruno cuconato

On Tuesday, August 8, 2017 at 8:17:11 PM UTC-3, Sam Tobin-Hochstadt wrote:
>
> One other suggestion: you can use `define-predicate` in a Typed Racket 
> module to create a predicate for any type that can be checked 
> immediately. So 
>
> ``` 
> (define-predicate dist? (Discrete-Dist Your-Type-Here)) 
> ``` 
>
> should define the predicate you want. 
>
> Sam 
>
> On Fri, Jul 28, 2017 at 10:23 AM, James Geddes  > wrote: 
> > This is likely a typed-untyped interface newbie question. 
> > 
> > Briefly, how can I write a contract that asserts that some value has a 
> type that is defined in an imported typed/racket library? 
> > 
> > In more detail, I am using the math/distributions library, which is 
> written in typed/racket. My module is written in untyped Racket, and I'm 
> figuring out how to use contacts: 
> > 
> > #lang racket 
> > (require math/distributions) ;; this is a typed/racket library 
> > 
> > (define my-dist (discrete-dist '(thing-one thing-two))) 
> > 
> > (provide (contract-out [my-dist ???])) 
> > 
> > 
> > The question is: what should ??? be?. There is a distribution? predicate 
> but I'd quite like to be more specific: namely, that my-dist is a discrete 
> distribution. In the source of math/distributions, the following type is 
> defined: 
> > 
> > (define-type (Discrete-Dist A) (discrete-dist-struct A A)) 
> > 
> > but I don't know how this might translate into my untyped module. 
> > 
> > 
> > Any help much appreciated! 
> > 
> > James 
> > 
> > 
> > 
> > 
> > --- 
> > James Geddes 
> > 
> > -- 
> > 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...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/2f278821-a585-42c4-b7a4-1ade07a228f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.