I'm trying to do a simple depth-first search of a tree in Racket,
ultimately returning a list of nodes up to the node I'm searching for. I
want to do this side-effect-free, if possible, and I'm running into a wall
with the approach I started on...
This is my current implementation:
---
Hello,
I am curious about the current status and future plans for the datalog
package. I am working on an interactive system that uses datalog for its
internal data storage, and am finding it difficult to map dynamic user
actions onto the available datalog syntactic abstractions even with the
rack
That's precisely what (2) was getting at. Good luck and SOS as much as you need
-- Matthias
On Dec 29, 2013, at 6:23 PM, Scott Klarenbach wrote:
> I think I have a much simpler approach for my purposes. I can have a
> (define-expression ...) macro that basically just stores the expression a
Found it
http://www.ccs.neu.edu/home/shivers/papers/sre.txt
On Sun, Dec 29, 2013 at 2:50 PM, Harry Spier wrote:
>
> A while ago I found a link in a post in the Racket user forum to an
> article where a CS prof was describing a suggested a new syntax for regular
> expressions based on s-expressi
I think I have a much simpler approach for my purposes. I can have a
(define-expression ...) macro that basically just stores the expression as
a quoted list. This largely emulates c#'s expression trees, but with a lot
less hassle and ugly syntax. I can then achieve the composition I desire
thro
Thanks Greg.
> Geiser mode for Emacs provides both of these things.
I use Geiser mode but find it pretty lacking for this purpose. Some of the
time it provides documentation, but a lot of the time it doesn't provide
anything. It may be that I have to upgrade my version or look into the
config
A while ago I found a link in a post in the Racket user forum to an article
where a CS prof was describing a suggested a new syntax for regular
expressions based on s-expressions. But I haven't been able to locate it
in the forum again.
If anyone knows the link I'm talking about could they post i
2013/12/29 Alexander D. Knauth :
> I was seeing if it would work with nested patterns and quasiquoted patterns
> and it didn't, so I had to change the rewrite function and use (vector?
> (syntax-e pat)) to check for a vector written like `#(,a:num ,b:num ,c:num).
>
> like this:
>
> (define (rewrit
2013/12/29 Alexander D. Knauth :
> I'm not really sure why this works either, but try this:
>
> (define-syntax (:match stx)
> (syntax-case stx ()
>[(:match val-expr [pat . more] ...)
> (with-syntax ([(new-pat ...) (for/list ([pat-stx (in-list (syntax->list
> #'(pat ...)))])
>
I was seeing if it would work with nested patterns and quasiquoted
patterns and it didn't, so I had to change the rewrite function and
use (vector? (syntax-e pat)) to check for a vector written like
`#(,a:num ,b:num ,c:num).
like this:
(define (rewrite pat)
(cond [(identifier? pat) (
Rackety but otherwise okay
#lang racket
(require rackunit)
(define (make-keyword-procedure-contract kws/c kw-args/c rest/c range/c)
(define all-contracts (list kws/c kw-args/c rest/c range/c))
(make-contract
#:name `(make-keyword-procedure-contract ,@all-contracts)
#:first-order proc
On Dec 28, 2013, at 2:01 PM, Scott Klarenbach wrote:
> I'm playing around with the idea of a sort of "Language Integrated Query"
> like LINQ. For example:
>
> > (sql (query 'my-table
> #:where (λ (row) (> (hash-ref row 'id) 3
> "select * from my-table where id > 3"
>
I understand yo
I'm not really sure why this works either, but try this:
(define-syntax (:match stx)
(syntax-case stx ()
[(:match val-expr [pat . more] ...)
(with-syntax ([(new-pat ...) (for/list ([pat-stx (in-list (syntax-
>list #'(pat ...)))])
(datum->syntax pat-stx
On Sat, Dec 28, 2013 at 2:01 PM, Scott Klarenbach wrote:
> It would be really nice to print the source code of a known procedure on the
> repl, in order to get a quick view of what it does. Or, the "pa" function
> which prints out the arguments of a procedure is even more useful.
A few ideas her
Hi Alexander,
I extended your example to allow other patterns than symbols inside :pat.
> (match '(42 x) [(:pat (list n:num s:sym)) (list n s)])
(list 42 x)
This works fine. I now want to "hide" the :pat, that is I want to write:
(:match '(42 x) [(list n:num s:sym) (list n s)]
On Sat, 28 Dec 2013 22:42:48 -1000
Ryan Davis wrote:
> If I look at the language setting details I can choose what
> submodules to run (main / test / others). But what I can't control is
> the _order_ of the submodules. I simply don't want to run main if my
> tests are going to fail but for some
If I look at the language setting details I can choose what submodules to run
(main / test / others). But what I can't control is the _order_ of the
submodules. I simply don't want to run main if my tests are going to fail but
for some reason tests run afterwards, not before. My questions:
1) I
17 matches
Mail list logo