Re: [racket] [racket-users]Is Racklog suitable to learn Prolog? A simple example just fails.

2014-07-03 Thread Matthias Felleisen
Racklog should have generated a stream of solutions here. That's my problem with it. -- Matthias On Jul 4, 2014, at 5:37 AM, Scott Moore wrote: > I'm not sure what behavior you were expecting for this program. Under > standard prolog semantics (goal-directed) this program will yield infini

Re: [racket] Lunch choosing program ported from Haskell to Racket

2014-07-03 Thread Matthias Felleisen
On Jul 3, 2014, at 8:01 PM, John Clements wrote: > > On Jul 3, 2014, at 8:52 AM, Brian Adkins wrote: > >> Hi all: >> >> I've recently begun learning Racket. After making some progress through >> various books & tutorials, I took a shot at porting a non-trivial program I >> had written in Ha

Re: [racket] Build hanging on Debian ARM

2014-07-03 Thread Matthew Flatt
I think this is now fixed. To catch up the list: We tracked down the problem to an incorrectly encoded instruction. Most processors (and the gdb disassembler) apparently don't care about the bits that were incorrect, but Deren's does. As you can imagine, it did not immediately occur to us to chec

Re: [racket] how to declare dependency on Racket 6.0?

2014-07-03 Thread Matthew Flatt
That should work, although it's better to declare a dependency on "base" instead of "racket": (define deps '(("base" #:version "6.0") ... ) You should generally declare a dependency on "base", anyway. At least, that's the right way for v6.0 and later. If the goal is to get a nice error message

Re: [racket] [racket-users]Is Racklog suitable to learn Prolog? A simple example just fails.

2014-07-03 Thread Scott Moore
I'm not sure what behavior you were expecting for this program. Under standard prolog semantics (goal-directed) this program will yield infinitely many solutions, so this may not be a bug in racklog but rather in the program. That said, Matthias is probably right that using a currently maintained

Re: [racket] [racket-users]Is Racklog suitable to learn Prolog? A simple example just fails.

2014-07-03 Thread WarGrey Gyoudmon Ju
Okay, Thank you. On Fri, Jul 4, 2014 at 1:21 AM, Matthias Felleisen wrote: > > Yes, I corrected your program and ran into this bug. > > Try to use Kanren instead of Racklog. It isn't completely a legacy package > but I doubt we can get a quick fix here. > > -- Matthias > > > > > On Jul 3, 2014,

[racket] how to declare dependency on Racket 6.0?

2014-07-03 Thread Matthew Butterick
On closer inspection, it seems possible that my recent install problems were a side effect of Racket being installed as a package dependency by my Pollen package, where the info.rkt contains this line: (define deps '(("racket" #:version "6.0") ... ) Is this the wrong way to declare this kind o

[racket] crash possibly related to sqlite

2014-07-03 Thread Dmitry Pavlov
Hello, I have a big Racket+C program that does numerical integration and uses flvectors, unsafe ops and ffi. Recently I added some access to sqlite3 too. The program instantly got the habit of crashing at random moments, after running safely for hours. It never happened before, so I guess the mos

Re: [racket] A safe version of unsafe-struct-ref [for Whalesong]

2014-07-03 Thread Sam Tobin-Hochstadt
Can't you just delete the whole second binding for accs? Sam On Jul 3, 2014 8:11 PM, "Jens Axel Søgaard" wrote: > Thanks to all for the advice. It seems the following version of match > works for Whalesong: > > https://github.com/soegaard/whalesong-libs > > Admitted I have only made superfic

[racket] whalesong (was: Re: A safe version of unsafe-struct-ref [for Whalesong])

2014-07-03 Thread John Clements
FWIW, I’m really really happy that you’ve taken on the task of getting Whalesong running again; I would love to be able to use it. Many thanks, John Racket Users list: http://lists.racket-lang.org/users

Re: [racket] A safe version of unsafe-struct-ref [for Whalesong]

2014-07-03 Thread Jens Axel Søgaard
Thanks to all for the advice. It seems the following version of match works for Whalesong: https://github.com/soegaard/whalesong-libs Admitted I have only made superfical tests. In match/compiler.rkt I replaced (define (gen-clause k rows x xs esc) <...> ;; it's a structure [(box?

Re: [racket] Lunch choosing program ported from Haskell to Racket

2014-07-03 Thread John Clements
On Jul 3, 2014, at 8:52 AM, Brian Adkins wrote: > Hi all: > > I've recently begun learning Racket. After making some progress through > various books & tutorials, I took a shot at porting a non-trivial program I > had written in Haskell to help choose a lunch place for a group of colleagues

Re: [racket] Matthias said something about types -- was: Re: Python creep

2014-07-03 Thread John Clements
On Jul 3, 2014, at 10:30 AM, Hendrik Boom wrote: > On Wed, Jul 02, 2014 at 09:05:53PM +0200, Matthias Felleisen wrote: >> >> On Jun 27, 2014, at 9:08 PM, Todd O'Bryan wrote: >> >>> I know Matthias thinks types are a horrible thing to make students deal >>> with first semester, >> >> >> What

Re: [racket] Matthias said something about types -- was: Re: Python creep

2014-07-03 Thread Hendrik Boom
On Wed, Jul 02, 2014 at 09:05:53PM +0200, Matthias Felleisen wrote: > > On Jun 27, 2014, at 9:08 PM, Todd O'Bryan wrote: > > > I know Matthias thinks types are a horrible thing to make students deal > > with first semester, > > > What I have said in the past: > > (1) HtDP teaches a type-dire

Re: [racket] Style guide and inner definitions

2014-07-03 Thread Greg Hendershott
Good point. I've come to prefer explicit args, usually. On Jul 2, 2014 7:56 PM, "Ryan Davis" wrote: > > On Jun 26, 2014, at 20:43, Greg Hendershott > wrote: > > > With something that big, I will often: > > > > - Move that function to its own new .rkt file. > > - Move the inner functions out to t

Re: [racket] [racket-users]Is Racklog suitable to learn Prolog? A simple example just fails.

2014-07-03 Thread Matthias Felleisen
Yes, I corrected your program and ran into this bug. Try to use Kanren instead of Racklog. It isn't completely a legacy package but I doubt we can get a quick fix here. -- Matthias On Jul 3, 2014, at 4:53 PM, WarGrey Gyoudmon Ju wrote: > Sorry, my example is not correct. > But this one s

[racket] Lunch choosing program ported from Haskell to Racket

2014-07-03 Thread Brian Adkins
Hi all: I've recently begun learning Racket. After making some progress through various books & tutorials, I took a shot at porting a non-trivial program I had written in Haskell to help choose a lunch place for a group of colleagues based on personal rankings of restaurants and individual hist

Re: [racket] [racket-users]Is Racklog suitable to learn Prolog? A simple example just fails.

2014-07-03 Thread WarGrey Gyoudmon Ju
Sorry, my example is not correct. But this one still does not work: #lang at-exp racket (require racklog) (define %edge (%rel () [('a 'b)] [('b 'c)] [('c 'd)] [('d 'a)])) (define %path (%rel (X Y Z) [(X Y) (%edge X Y)] [(X Y) (%edge X Z) (%path Z Y)])) (let answer (

Re: [racket] A safe version of unsafe-struct-ref [for Whalesong]

2014-07-03 Thread Sam Tobin-Hochstadt
The output of `match` when it uses `unsafe-struct-ref` can't be faithfully implemented safely. In particular, `match` has access to the accessor function, which may give you results that you can't get from safe reflection such as `struct->vector`. Instead, I think you should just implement `unsafe

Re: [racket] [racket-users]Is Racklog suitable to learn Prolog? A simple example just fails.

2014-07-03 Thread Matthias Felleisen
If you want to learn Prolog, why not use a free Prolog implementation? If you want to learn about relational programming, use miniKanren, which is available of cKanren. Then you can also get to constraints. Maintainer cc-ed. -- Matthias On Jul 3, 2014, at 6:48 AM, WarGrey Gyoudmon Ju wrote

Re: [racket] gc crash on raspbian

2014-07-03 Thread David Griffiths
Hi Matthew, > On 02/07/14 09:28, Matthew Flatt wrote: >> Is it enough to run the web server in its default configuration, or do >> you have to run something specific? >> >> Meanwhile, I'll looking into Deren's problem, which seems to be >> JIT-related. Just to make sure, does setting the environme