Re: [racket-users] one-source-file package format

2016-03-12 Thread Neil Van Dyke
Jay McCarthy wrote on 03/12/2016 01:22 PM: For my taste, I don't want to run any program on my files to "turn them into real Racket". So, I would not want to do this as a tool. Just to be sure I communicated it... The only things I'm doing are making files `info.rkt` and `.scrbl` be generated,

Re: [racket-users] Sequential vs. Parallel 13-Queens program

2016-03-12 Thread Brian Adkins
My program does represent a solution by a list of length N (one queen per file), so each element of the list is a file and stores the rank. The reason I also store the second coordinate (the file) is for ease of knowing the file when backtracking. If I used vectors instead, I could get by with j

RE: [racket-users] Sequential vs. Parallel 13-Queens program

2016-03-12 Thread Jos Koot
I addition to my previous post: If I understand well you are using posn-s. A solution of the N-queens can be represented by a list or vector of lenhgth N that for each row (or column) records the position of a queen in the column (or row). This reduces the computation of time O(f(N^2)) to O(f(N)),

RE: [racket-users] Sequential vs. Parallel 13-Queens program

2016-03-12 Thread Jos Koot
You are right. The algorithm shown in https://en.wikipedia.org/wiki/Eight_queens_puzzle gives one solution only. I did not realize that you want all solutions. Sorry for that. In order to find all solutions you indeeed need a backtracking algorithm, I think, which requires much more computation. In

RE: [racket-users] Sequential vs. Parallel 13-Queens program

2016-03-12 Thread Jos Koot
You are right. The algorithm shown in https://en.wikipedia.org/wiki/Eight_queens_puzzle gives one solution only. I did not realize that you want all solutions. Sorry for that. In order to find all solutions you indeeed need a backtracking algorithm, I think, which requires much more computation. In

Re: [racket-users] Sequential vs. Parallel 13-Queens program

2016-03-12 Thread Brian Adkins
The code is a little difficult for me to read. It doesn't seem to collect *all* solutions for a given N. If that's the case, would you be able to modify it to do so to allow a more direct comparison? > On Mar 12, 2016, at 1:19 PM, Jos Koot wrote: > > See https://en.wikipedia.org/wiki/Eight_que

Re: [racket-users] one-source-file package format

2016-03-12 Thread Matthias Felleisen
> On Mar 12, 2016, at 1:22 PM, Jay McCarthy wrote: > > For my taste, I don't want to run any program on my files to "turn > them into real Racket". I think you already are running programs on your Racket programs to create some other form of Racket. So the only question is what kind of progr

Re: [racket-users] ports, custodians, and places

2016-03-12 Thread Jon Zeppieri
Yes, thank you! -J On Sat, Mar 12, 2016 at 4:09 PM, Matthew Flatt wrote: > At Sat, 12 Mar 2016 15:35:14 -0500, Jon Zeppieri wrote: > > I have TCP ports that I send from one place to another. I'd like the > > receiving place to be responsible for closing them. In particular, I'd > like > > to ma

Re: [racket-users] ports, custodians, and places

2016-03-12 Thread Matthew Flatt
At Sat, 12 Mar 2016 15:35:14 -0500, Jon Zeppieri wrote: > I have TCP ports that I send from one place to another. I'd like the > receiving place to be responsible for closing them. In particular, I'd like > to make that the responsibility of a custodian in the receiving place. > > If I close the p

[racket-users] ports, custodians, and places

2016-03-12 Thread Jon Zeppieri
I have TCP ports that I send from one place to another. I'd like the receiving place to be responsible for closing them. In particular, I'd like to make that the responsibility of a custodian in the receiving place. If I close the ports in the receiving place, however, that doesn't actually close

Re: [racket-users] one-source-file package format

2016-03-12 Thread Alexis King
It might be worth noting that there was a thread on the racket-dev list a little while back that covered a similar topic about submodules and search paths: https://groups.google.com/d/msg/racket-dev/8BFT-RBDp9E/Y1xOCyf3nIMJ > On Mar 12, 2016, at 10:22, Jay McCarthy wrote: > > For my taste, I do

Re: [racket-users] one-source-file package format

2016-03-12 Thread Jay McCarthy
For my taste, I don't want to run any program on my files to "turn them into real Racket". So, I would not want to do this as a tool. On the other hand, I would like to see us unify submodules and collections into a single concept and have consistent require path rules. For instance... - (require

RE: [racket-users] Sequential vs. Parallel 13-Queens program

2016-03-12 Thread Jos Koot
See https://en.wikipedia.org/wiki/Eight_queens_puzzle For a non recursive non-back-tracking algorithm. It is a loop that (when using a vector) can easily be unrolled in parallelly executed loops. I implemented it as follows running on 2 processors: #lang racket #| The following text is copied from

[racket-users] Re: Sequential vs. Parallel 13-Queens program

2016-03-12 Thread Brian Adkins
On Friday, March 11, 2016 at 9:01:38 PM UTC-5, Brian Adkins wrote: > On Friday, March 11, 2016 at 7:42:22 PM UTC-5, Brian Adkins wrote: > > I coded up a sequential and parallel version of N-Queens, then did a ton of > > benchmark runs of 13-Queens to compare the time. For each configuration > > (

Re: [racket-users] Requiring parent modules within module* forms?

2016-03-12 Thread Matthew Flatt
At Sat, 12 Mar 2016 09:45:57 -0500, Matthias Felleisen wrote: > > > On Mar 11, 2016, at 8:01 PM, Alexis King wrote: > > > > The documentation for module* would seem to indicate that submodules > > declared with module* can require their parent modules: > > > >> Like module, but only for declari

Re: [racket-users] Requiring parent modules within module* forms?

2016-03-12 Thread Matthias Felleisen
> On Mar 11, 2016, at 8:01 PM, Alexis King wrote: > > The documentation for module* would seem to indicate that submodules > declared with module* can require their parent modules: > >> Like module, but only for declaring a submodule within a module, >> and for submodules that may require the e

Re: [racket-users] for/vector with accumulator?

2016-03-12 Thread John Berry
For Heresy, I got to thinking about all the different special for loops in Racket, and how I could generalize them into a single form, and what I realized is that all you need for that is to just build in an accumulator. Every for loop in Heresy contains the inbuilt variable "cry", which is a valu

[racket-users] one-source-file package format

2016-03-12 Thread Neil Van Dyke
Any comments on this? These Emacs screenshots show the tentative "one-source-file package" format that I'd like to use for almost all of my packages. I'd release a tool so that others can maintain their own packages in this format, if they want to. http://www.neilvandyke.org/temporary/one-fi