Hi Roger,
This is cool, thanks for putting it together!
Roger Rousseau
writes:
> It's largely inspired from the Clojure version and the Racket documentation
> I would be grateful for any corrections/suggestions before I send a pull
> request to get this online
Here are a couple of (tiny) sugge
Mark Engelberg
writes:
> While we're on the topic of exploring from Racket to alternative languages,
> what's the friendliest way to dip into Prolog coming from a Racket
> background?
Well, there's the Racklog module:
http://docs.racket-lang.org/racklog/
There's also the Datalog language:
htt
I wrote a macro once to `flatten' this kind of idiom, because I was
writing code where I was doing a *lot* of this. It lets you mix
let-style bindings with tests that throw an error if they fail.
Warning: there is almost certainly a better way to write it (it is among
the first `real' macros I wr
Hi everyone,
I have a question about the parser-tools library (which is great!). I'm
hoping maybe someone has run into this use-case before and figured out a
solution. What I'd like to be able to do is `nest' parsers --
i.e., have one parser's grammar include terminal symbols which are not
token
Hi Neil,
I am an Emacs user, but have so far stuck with DrRacket as I learn
Racket; apologies if my suggestions are features that are already
available in Quack/Meow.
1. An operation that I always find myself wanting is something like
``wrap next sexp'' that would put parentheses around the next
Eli Barzilay writes:
> There is a "submit bug report" in DrRacket's help menu. You can also
> use bugs.racket-lang.org, though the former is better.
Got it, thanks.
_
For list-related administrative tasks:
http://lists.racket-lang.org/listinf
Hi Typed Racket folks,
I checked out the development version of Racket today, and noticed what
I believe to be a regression: TR thinks that regexp-match and friends
return a String when given an Input-Port, but in fact they return Bytes:
; as expected: string input returns String
(regexp-match #r
Thanks, Ray, Sam, and Matthias for the information and your
suggestions.
Ray Racine writes:
> Define the node structure and constructor in a library. Then use
> appropriate concrete constructor function(s) as needed.
> [...]
I'm still working through this one, but I think Ray's idea
is bas
Hi all,
I think I must be missing something about how Typed Racket predicates
work. If I define a predicate for an instantiated polymorphic structure,
my programs type check fine, but I get runtime errors when I try to use
the predicate, which boil down to "expected procedure, given:
#".
Here
Hi Raoul,
> to what degree can one leverage typed racket for new languages in the
> racket ecosystem?
(You mean for *creating* new languages, right?) I'm actually in the
middle of doing this right now.
> tho i read that even if there are ways to use it, there be dragons in
> terms of getting t
Hi all,
I have another question about whether something is possible in Typed
Racket. What I would like to do is define a polymorphic structure where
the polymorphism is limited to a certain subset of types. Again, I'm
not sure I'm using the terminology correctly, so here's an example.
Right now
Sam Tobin-Hochstadt
writes:
> I'll try to respond more comprehensively about the more general
> question, but for this:
>> (define-type Variable (Pair 'var Symbol))
>> (define-predicate variable? Variable)
>
> Just use a struct:
>
> (struct: variable ([s : Symbol]))
>
> Now you have `variable' an
Hi Racketeers,
I'm wondering if there's a way to specify a type in Typed Racket that is
an infinite subtype of an existing type. (Not sure if I'm using the
terminology correctly; by "subtype" I just mean a type whose values are a
subset of another type's values.)
For example, suppose I want to sp
Hi Jon,
Thanks for your help!
> I have functions below that pass your tests, but a lot depends on what
> you count as whitespace (not to mention newlines, since one of your
> comments suggests that you want to match all Unicode
> line-terminators). The functions below assume that "newline" means
Hi everyone,
I'm sure this is a really trivial question, but I've been trying on my
own for some time now, and I can't quite figure it out. I am trying to
define a pair of functions, skip-whitespace and skip-blank-line, that do
the following:
- skip-whitespace should consume any whitespace chara
Sam Tobin-Hochstadt
writes:
> (assert x p?) is equivalent to (if (p? x) x (error ...)) except that
> the result is known to have the appropriate type (here `String').
Ah, OK, I think I see my mistake; is this the right way to put it?
Although the expression
(assert x string?)
has type String,
Hi everyone,
I've been starting out learning Typed Racket, which I've enjoyed quite a
lot -- thanks!
I've run into a snag several times now that I wanted to ask the experts
about: does TR know about short-circuiting `and' and `or'? (If not, why
not?) If so, how do they interact with `assert'?
Bojan Nikolic writes:
> I've been using geiser recently (https://github.com/jaor/geiser) -- it
> is already quite usable for the type of exploration that you mention
> (e.g., listing all exported procedures in a module) and seems to be
> evolving rapidly.
Looks cool, thanks for the pointer!
Ric
Hi Eli,
> BTW, if you tried just that, then note that you can also an identifier
> to jump directly to its definition:
>
> (help lambda)
>
> This uses the *syntactic* information from the system, for example:
>
> (define kons cons)
> (help kons)
>
> won't work because `kons' is a new identif
[Apologies if this gets mis-threaded; I'm switching between Gmane and the
mailing list address.]
> On Dec 1, 2010, at 1:20 AM, Eli Barzilay wrote:
>
>>>
>>> Examples: comparing Python's help function to Racket's as a tool for
>>> introspecting objects at the REPL
>>> [...]
(define (f x y)
>>>
>
> On Dec 1, 2010, at 1:20 AM, Eli Barzilay wrote:
>
>>>
>>> Examples: comparing Python's help function to Racket's as a tool for
>>> introspecting objects at the REPL
>>> [...]
(define (f x y)
>>>(+ x y))
(help f)
>>> Not found in any library's documentation: f
>>
>> This is because
Hi Matthias,
> It isn't clear to me whether you have tried
>
> > (help "lambda")
>
> in your emacs repl. If so, do you object to the browser coming up with
> intensively hyperlinked documentation? Or do you not like the format?
(Evidently I had not. Now that is embarrassing. I could swear
Dear Racketeers:
Apologies in advance for what will probably be a long-winded newbie
question. I'm wondering how one goes about "exploring" the Racket
libraries. That is, how does one find out things like:
1. which modules are likely to contain functions useful for a particular
task
2. what nam
Richard Cleis writes:
> These two threads remind me of an observation that I wish I could cite:
>
> "Debugging programs is harder than writing programs. Those who write
> programs at the limits of their ability are unqualified to debug
> them."
You might be thinking of this:
"Debugging is twice
Neil Van Dyke writes:
> For new students, I would show them examples like Eli and Matthias
> did. For production work, I usually build up strings using string
> ports.
>
> Compared to various ways of building lists and doing "string-append",
> or to simply doing lots of incremental "string-appen
Matthias Felleisen
writes:
> On Nov 17, 2010, at 2:40 AM, Eli Barzilay wrote:
>
>> (define (alist->string alist)
>> (string-join
>> (for/list ([a (in-list alist)])
>> (format "~a=~a" (car a) (cdr a)))
>> " "))
>
>
> Somewhat more 'native':
>
> (define (alist->string l)
Dear Racketeers:
Ok, I feel really silly asking this, because I feel like I am missing
something really conceptually basic, but the answer isn't apparent to me
from the examples in the Guide:
What's the right way to programatically build up strings in Racket?
For example, suppose I want to consu
Matthias Felleisen writes:
> We should start with a Racket version for Land of Lisp.
> It would be much nicer in the Universe world than in an
> old Lisp world.
I think this would be really cool! I was thinking of doing this for my
own edification. It might be fun for interested parties to
> For what it's worth, I have filed a Debian bug requesting that they
> update the existing plt-scheme package to Racket:
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593614
>
Seems I was a bit hasty in filing this bug; this work is already
underway. See: http://git.debian.org/?p=collab-m
Hi all,
> On Aug 15, Laurent wrote:
>> On Sat, Aug 14, 2010 at 18:54, Todd O'Bryan wrote:
>>
>> > One of my dreams has been to write a script of some sort that
>> > would build a .deb for Eli automatically when he packages up the
>> > latest version. Then it could be uploaded to the Ubuntu repo a
30 matches
Mail list logo