Re: [racket-users] Racket 5, multiple-collection packages and info.rkt

2018-12-12 Thread 韋嘉誠
Right, that's a good option. For the moment, it wouldn't even need a
branch, just point at the current version of the package while the
6.x-compatible version moves on. It's a mature package, and if people
need any new functionality that gets implemented later, they should be
prepared to upgrade Racket. If there emerges a pressing need for
upgrading the 5.x-compatible version, say for some security update,
that could be handled at that time.

They aren't that many versions.

Thanks for the tip!

-- 
   /c
On Thu, Dec 13, 2018 at 7:42 AM Ben Greenman
 wrote:
>
> Another option
>
> - make a branch for the Racket 5 code
> - add version exceptions [1] to pkgs.racket-lang.org
> - split the repo on the master branch
>
> The downside to this plan is that someone needs to add a version
> exception for every 5.x version of Racket that `graph` wants to
> support.
>
> [1] 
> http://docs.racket-lang.org/pkg/getting-started.html#%28part._.Version_.Exceptions%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.

-- 
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 5, multiple-collection packages and info.rkt

2018-12-12 Thread Ben Greenman
Another option

- make a branch for the Racket 5 code
- add version exceptions [1] to pkgs.racket-lang.org
- split the repo on the master branch

The downside to this plan is that someone needs to add a version
exception for every 5.x version of Racket that `graph` wants to
support.

[1] 
http://docs.racket-lang.org/pkg/getting-started.html#%28part._.Version_.Exceptions%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] Re: JSON vs. normal Racket for simple serialization to database

2018-12-12 Thread George Neuner
On Wed, 12 Dec 2018 07:26:44 -0800 (PST), Brian Adkins
 wrote:

>I have some simple serialization needs. In Ruby, I would always serialize 
>an object to JSON and store in a postgres text column. However, w/ Racket, 
>it appears another option is to simply use read/write. Any reason not to 
>use read/write for serialization instead of JSON?

As Jon mentioned, PG can index the JSON column and it would be
interoperable with other non-Racket clients.

That said: 
One reason you might prefer Racket over JSON is if you frequently need
to store large integer values.  JSON encodes 64-bit ints as IEEE
doubles, and doubles do not offer the full range:  values (positive or
negative) having magnitude greater than 2**52 will be mangled by JSON
and will have to translated to strings.

PG can index Racket serializations (as text).  JSON is a serialized
hash - i.e. the values are tagged - so if you do choose to use
Racket's own serialization, you might want to use a hash so (like the
JSON) the values can be indexed by tag.


George

-- 
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] Re: Using Racket behind proxy

2018-12-12 Thread Matthew Butterick

> On Dec 10, 2018, at 11:21 AM, making-a-racket  wrote:
> 
> Does anyone know if Racket is hard-coded to use git://?  


The URL that Racket uses to install a package is whatever the developer has 
listed on the package server — some begin with git://, some with https://, some 
with http://. Moreover, even if the package you want is not associated with a 
git:// URL, it may depend on other packages that are.

-- 
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] Self reference in struct-copy ?

2018-12-12 Thread Brian Adkins
Rather than the following:

(struct descriptive-name (a b))
(define my-instance (descriptive-name 7 8))
(define y (struct-copy descriptive-name my-instance [a (+ 1 
(descriptive-name-a my-instance))]))

Would it be better to allow referring to struct fields as in the following?

(define y (struct-copy descriptive-name my-instance [a (+ 1 a)]))

Brian

-- 
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] JSON vs. normal Racket for simple serialization to database

2018-12-12 Thread Brian Adkins
In this particular case, the only purpose is saving/loading data to/from a 
db column. I have plenty of other uses for JSON, so I'm thankful for the 
Racket JSON library, but I lean toward simplicity when possible.

On Wednesday, December 12, 2018 at 10:35:24 AM UTC-5, Jon Zeppieri wrote:
>
> Postgres can index jsonb column data. Also, other languages will have an 
> easier time reading it. If neither of those matter for your case, then no.
>
> - Jon
>
>
> On Wed, Dec 12, 2018 at 10:26 AM Brian Adkins  > wrote:
>
>> I have some simple serialization needs. In Ruby, I would always serialize 
>> an object to JSON and store in a postgres text column. However, w/ Racket, 
>> it appears another option is to simply use read/write. Any reason not to 
>> use read/write for serialization instead of JSON?
>>
>> -- 
>> 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.
>>
>

-- 
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] JSON vs. normal Racket for simple serialization to database

2018-12-12 Thread Jon Zeppieri
Postgres can index jsonb column data. Also, other languages will have an
easier time reading it. If neither of those matter for your case, then no.

- Jon


On Wed, Dec 12, 2018 at 10:26 AM Brian Adkins  wrote:

> I have some simple serialization needs. In Ruby, I would always serialize
> an object to JSON and store in a postgres text column. However, w/ Racket,
> it appears another option is to simply use read/write. Any reason not to
> use read/write for serialization instead of JSON?
>
> --
> 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] JSON vs. normal Racket for simple serialization to database

2018-12-12 Thread Brian Adkins
I have some simple serialization needs. In Ruby, I would always serialize 
an object to JSON and store in a postgres text column. However, w/ Racket, 
it appears another option is to simply use read/write. Any reason not to 
use read/write for serialization instead of JSON?

-- 
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 5, multiple-collection packages and info.rkt

2018-12-12 Thread Stephen Chang
Hi Claes, Thanks for the effort in splitting the package.

Would any users of the graph library object to dropping support for 5.x?
On Tue, Dec 11, 2018 at 10:19 PM Claes Wallin (韋嘉誠)
 wrote:
>
> I am trying to split the package graph into graph-doc and graph-lib,
> see: https://github.com/stchang/graph/pull/37
>
> So far, the package has been compatible with Racket 5.3.2, and I image
> the original author Mr. Chang would like to keep it that way, if
> possible.
>
> In their respective graph/info.rkt (until now a single file, now split
> into two files), graph-lib wants to define test-timeouts and graph-doc
> wants to define scribblings. On Racket 6 this is fine, but on Racket
> 5[0] I get:
>
>raco pkg install: packages conflict
>   package: ./graph-lib
>   package: graph-doc
>   file: graph/info.rkt
>
> If I remove graph-doc/graph/info.rkt, the documentation does not get built.
>
> Do we have to drop Racket 5 compatibility to split this package in two?
>
> [0] not on Racket 5.92, but I guess that would be more appropriately
> named something like 6.0rc or 6.0pre?
>
> - - - -
>
> I looked in Racket 5.93 and there pkgs/net-pkgs/net-doc/net didn't
> have an info.rkt. How did the documentation get built? Is there some
> special workaround for release packages?
>
> On Racket 5.3.6 and earlier the release packages weren't separate
> packages, they were simply in core collects, and I assume there was no
> racket-minimal? So I have nothing to learn from by looking there.
>
> --
>/c
>
> --
> 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] Macro introducing definitions from list of ids

2018-12-12 Thread Jens Axel Søgaard
Hi Matt,

In the definition of expand-ask-breed you have:

 (syntax/loc stx
(define-syntax (ask-breed stx-inner)
  (syntax-parse stx-inner
[(_ bodies (... ...))
 (syntax/loc stx-inner
   (for ([critter breed-vec])
 (parameterize ([current-agent critter])
   bodies (... ...))
 ))]
)))

Since we have lexical scope current-agent must be visible from here.
The fix is simple, add

 (define current-agent (make-parameter false))

to the bottom of "scopes-base.rkt" and remove it from "scopes-use.rkt".

/Jens Axel


Den ons. 12. dec. 2018 kl. 14.13 skrev Matt Jadud :

> Hi all,
>
> I have improved my question. In asking it, I'm trying to make sure I
> understand things so that I can ultimately ask fewer questions (about
> this). Apologies for the verbosity; it exposes more surface for confusion
> to be corrected.
>
> I read Matthew's "Macros as scopes" last night before going to bed; I
> cannot claim it was my best reading. That said, it gave me enough to sleep
> on, strip out some mess this morning, and ask a better question.
>
> https://gist.github.com/jadudm/2a1960867223773f09aef41ec551bd3f
>
> Now, I get errors that look like what I saw in the scopes paper. This
> strikes me as good.
>
> In the example code (in "scopes-use"), 'current-agent' is defined at Phase
> 0.
>
> "current-agent" in the first use, in "scopes-use"
>
> Scopes at phase 0:
> #(339342 module)
> #(339349 module scopes-use)
>
> "current-agent" as it appears in the macro expansion:
>
> Scopes at phase 0:
> #(-337432 module scopes-base)
> #(-337431 module scopes-base)
> #(-337422 module)
> #(-337421 module)
> #(339349 module scopes-use)
> #(339369 macro)
> #(339634 macro)
>
> The full error (which is probably obvious from what I've now presented) is
>
> current-agent: unbound identifier
>   context...:
>#(-337432 module scopes-base) #(-337431 module scopes-base)
>#(-337422 module) #(-337421 module) #(339753 macro) #(340018 macro)
>#(340044 local) #(340045 intdef) #(340046 local) #(340047 intdef)
>#(340049 local) #(340051 local) #(340052 intdef) #(340054 local)
>#(340061 intdef) #(340066 local) #(340067 intdef) #(340070 local)
>#(340071 intdef) #(340073 local) #(340074 intdef) [common scopes]
>   other binding...:
>#(current-agent # 0)
>#(339726 module) [common scopes]
>   common scopes...:
>#(339733 module scopes-use)
>
> What I'm uncertain of is how to reconcile the scopes for the macro
> expansion. I've reached my current understanding of how friends like
> syntax/loc, and perhaps more specifically, a macro-expanding-to-a-macro,
> play with the scope expansions.
>
> It may be that I can't do what I want to do.
>
> Cheers,
> Matt
>
>
>
>
>
>
>
>
>
> On Tue, Dec 11, 2018 at 9:13 PM Matt Jadud  wrote:
>
>> Ha! A new question!
>>
>>>
> --
> 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] Macro introducing definitions from list of ids

2018-12-12 Thread Matt Jadud
Hi all,

I have improved my question. In asking it, I'm trying to make sure I
understand things so that I can ultimately ask fewer questions (about
this). Apologies for the verbosity; it exposes more surface for confusion
to be corrected.

I read Matthew's "Macros as scopes" last night before going to bed; I
cannot claim it was my best reading. That said, it gave me enough to sleep
on, strip out some mess this morning, and ask a better question.

https://gist.github.com/jadudm/2a1960867223773f09aef41ec551bd3f

Now, I get errors that look like what I saw in the scopes paper. This
strikes me as good.

In the example code (in "scopes-use"), 'current-agent' is defined at Phase
0.

"current-agent" in the first use, in "scopes-use"

Scopes at phase 0:
#(339342 module)
#(339349 module scopes-use)

"current-agent" as it appears in the macro expansion:

Scopes at phase 0:
#(-337432 module scopes-base)
#(-337431 module scopes-base)
#(-337422 module)
#(-337421 module)
#(339349 module scopes-use)
#(339369 macro)
#(339634 macro)

The full error (which is probably obvious from what I've now presented) is

current-agent: unbound identifier
  context...:
   #(-337432 module scopes-base) #(-337431 module scopes-base)
   #(-337422 module) #(-337421 module) #(339753 macro) #(340018 macro)
   #(340044 local) #(340045 intdef) #(340046 local) #(340047 intdef)
   #(340049 local) #(340051 local) #(340052 intdef) #(340054 local)
   #(340061 intdef) #(340066 local) #(340067 intdef) #(340070 local)
   #(340071 intdef) #(340073 local) #(340074 intdef) [common scopes]
  other binding...:
   #(current-agent # 0)
   #(339726 module) [common scopes]
  common scopes...:
   #(339733 module scopes-use)

What I'm uncertain of is how to reconcile the scopes for the macro
expansion. I've reached my current understanding of how friends like
syntax/loc, and perhaps more specifically, a macro-expanding-to-a-macro,
play with the scope expansions.

It may be that I can't do what I want to do.

Cheers,
Matt









On Tue, Dec 11, 2018 at 9:13 PM Matt Jadud  wrote:

> Ha! A new question!
>
>>


-- 
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] Implementing Racket linting in Vim Ale

2018-12-12 Thread Anthony Quizon
Hello,

I'm trying to implement a racket linter in Ale for vim.
I've just taken neomake 

 code 
and ported it to ale.

Heres what I have so far: ale/raco.vim 


So at the moment it's just using 'raco expand ' and regexing the 
output to match the errors.
However, this way only seems to get the first error.

Is there a better approach to this?

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