Re: [racket-users] Re: From Clojure to Racket

2018-08-23 Thread Alex Gian
On Thursday, August 23, 2018 at 7:25:02 PM UTC+1, Alex Knauth wrote: > > > > On Aug 23, 2018, at 2:00 PM, Alex Gian > > wrote: > > I don't think I am either eloquent or knowledgeable enough to help, being > a dabbler in both. > I do think of them very much as d

[racket-users] Re: From Clojure to Racket

2018-08-23 Thread Alex Gian
I don't think I am either eloquent or knowledgeable enough to help, being a dabbler in both. I do think of them very much as duals of each other, both in a good way and a bad - to wit: whichever I'm using I often find myself really wanting features of the other! However there is a good (if some

[racket-users] Interesting lockup with void - perhaps bug?

2018-08-18 Thread Alex Gian
No big deal, but I thought I'd report this: I had a series of expressions that were generating unwanted output. Putting them inside a (begin <>) did not work, for reasons that were explained to me elsewhere (thanks!) Anyway, I sorted the problem by enclosing every offending expression in (voi

[racket-users] Re: Confused by match

2018-08-16 Thread Alex Gian
Well, it's not often I'm happy when I see a bug, but thank Fog for that. Thanks, gfb. @David K. Storrs. I'm not sure your explanation is right, unless it's explaining the bug. Surely the two values for 'x' must be the same! On Thursday, August 16, 2018 at 4:45:42 PM UTC+1, gfb wrote: > > This

[racket-users] Re: Confused by match

2018-08-16 Thread Alex Gian
It will work like this > (match '( b b b b b b ) [(list x ... y ... ) #:when (equal? x y) (list 'x: x 'y: y)]) '(x: (b b b) y: (b b b)) But does (list x ... x ... ) not obviate the need for (list x ... y ... ) #:when (equal? x y) ? -- You received this message because you

[racket-users] Re: Confused by match

2018-08-15 Thread Alex Gian
Incidentally, while on the subject of matching, is there a way to coax it into returning ALL the valid matches, either by backtracking or any other method? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop

[racket-users] Confused by match

2018-08-15 Thread Alex Gian
Normally in match... > (match '(a b b b b b b a) [`(,x ,y ... ,x) (list 'x: x 'y: y)]) '(x: a y: (b b b b b b)) > (match '(a b b b b b b d) [`(,x ,y ... ,x) (list 'x: x 'y: y)] [_ 'nope]) 'nope So far, so good. However, in this case: > (match '(a b b b b b b c) [`(a ,x ... ,y

[racket-users] Re: Trying to understand the module system.

2018-08-07 Thread Alex Gian
After some deliberation, and consultation with heads wiser than my own, I have decided to abandon the idea of porting the "rule-system" directly. There was no point, really. It relies on too many techniques that were hacks, albeit very clever ones, in their time, to make up for tools that tod

[racket-users] Recommendation for learning syntax?

2018-08-07 Thread Alex Gian
Simply put, I find syntax to be a brain I can do simple stuff, often by extensive study of example code, and I even have the odd moment of illumination, which shows me that there is more to it than just masochism! What I do not have is the flow, the mojo, to be able to write syntax like se

Re: [racket-users] Trying to understand the module system.

2018-08-07 Thread Alex Gian
(new links, old ones not working after refactoring) > The offending code is here - 'rules.rkt' ca. line 173 > Once it tries to execute the 'rule-system' macro, in order to load up the rules, it crashes with the following me

Re: [racket-users] Trying to understand the module system.

2018-08-05 Thread Alex Gian
interesting) On Sunday, August 5, 2018 at 3:16:34 AM UTC+1, Alex Gian wrote: > > Well, I can now get a namespace out of any particular module! > > e.g: > > (module->namespace 'rat/src/polynomial/polynomial) > > # > > Many, many thanks to those who helped clear this up

Re: [racket-users] Trying to understand the module system.

2018-08-04 Thread Alex Gian
Well, I can now get a namespace out of any particular module! e.g: > (module->namespace 'rat/src/polynomial/polynomial) # Many, many thanks to those who helped clear this up. Onward now, to see how that will work with eval. And then to see if those scmutils environments can be sensibly simulat

Re: [racket-users] Re: SICM, scmutils, MIT-Scheme, CAS systems, etc, etc...

2018-08-04 Thread Alex Gian
I shouldn't have, really, it was in no state to be uploaded, but out of consideration to the many folks that have helped me so far, I've put it up here . Actually, although it's quite the mess now, once I've sorted out what to do about the "environments" (module

Re: [racket-users] Trying to understand the module system.

2018-08-04 Thread Alex Gian
Well, here we are: the essence of the problem lies in that scmutils defines certain modules, "environments" as it calls them, which it then proceeds to augment or access from other locations with gay abandon. One use of this, for instance, is switching between the genericised and the explicit f

Re: [racket-users] Trying to understand the module system.

2018-08-04 Thread Alex Gian
Hi Greg Maybe I've got this wrong, but the way I understand it is that (apart from an actual language) #lang can be used for a development environment that is independent in some unique way. If I'm not mistaken even SICP is a #lang, and some old Scheme books too, never mind the heaps of educat

Re: [racket-users] Trying to understand the module system.

2018-08-04 Thread Alex Gian
ist. Cheers! On Saturday, August 4, 2018 at 4:28:15 PM UTC+1, Philip McGrath wrote: > > There are several different issues here, but I'll try to touch on a few of > them. > > On Sat, Aug 4, 2018 at 9:33 AM, Alex Gian > > wrote: > >> Say I have written a little

[racket-users] Re: Trying to understand the module system.

2018-08-04 Thread Alex Gian
In fact, even this (module polynomial racket (require "pcf.rkt" "fpf.rkt" "rcf.rkt" "pcf-fpf.rkt") (provide (all-from-out "pcf.rkt" "fpf.rkt" "rcf.rkt" "pcf-fpf.rkt")) ) (require 'polynomial) (define ns (module->namespace ''polynomial)) (eval '(poly/make-from-dense 1 '(1 -1)) ns) which is a

[racket-users] Trying to understand the module system.

2018-08-04 Thread Alex Gian
A simplified view of the problem I am trying to sort out: Say I have written a little library, perhaps of various maths utilities. There are several files all providing different features. I make them available to the user by 'requiring' them and 'providing' them all from the top-level main.rkt