./racket: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found
(required by ./racket)
I just ran into this problem and a search led me to this thread, thanks.
I am running Debian 7.8 wheezy which includes glibc 2.13. I originally
used the Ubuntu 12.04 (Precise) 64bit installer from
Glad you're having a good time!
I think you should be able to use it to implement your language's
reader but I don't have any actual experience doing so.
I seem to recall that Racket used to come with a combinator parser
library. It's been removed but I don't remember why but maybe that
could be
Once I get my head around what's needed to connect up a custom
reader
Matthew's example from his talk at the first RacketCon (and other
conferences) might be a good place to start:
https://github.com/mflatt/scratchy/blob/master/scratchy/reader.rkt
Would any of the functions in unstable/list help? For example,
#lang racket
(require unstable/list)
(define (gather lst)
(for/hash ([g (group-by car lst)])
(values (caar g) (append-map cdr g
(gather '((a c) (a d) (b e) (b f)))
; = '#hash((a . (c d)) (b . (e f)))
On Thu, Jun 11, 2015
The prefixes are based on this file:
https://github.com/racket/gui/blob/master/tex-table/tex-table.rkt
Maybe there are missing ones you're used to?
Sorry, that was supposed to be a compliment! I love DrRacket's support
for unicode and I havent wanted any symbols that aren't already
supported.
, Stephen Chang stch...@ccs.neu.edu wrote:
What symbols have the least historic baggage?
I've gone through this exercise a few times, and each time settled on '$'.
As Greg points out, pretty much every one of my my Racket libraries
makes use of this symbol (was it that obvious? :) ) exactly
What symbols have the least historic baggage?
I've gone through this exercise a few times, and each time settled on '$'.
As Greg points out, pretty much every one of my my Racket libraries
makes use of this symbol (was it that obvious? :) ) exactly because I
was looking for something that
Perhaps this isn’t applicable in this case, but may I suggest a less-common
alternative: no prefixing at all? If you put all the commands into a separate
module, users of the module can use ‘prefix-in’ to choose whatever prefix
they prefer.
Prefixes (and suffixes) have two purposes. One is
Actually, ~a by itself might do what you want.
(~a 1 2 3) ; = 123
On Fri, Jul 3, 2015 at 4:18 PM, Stephen Chang stch...@ccs.neu.edu wrote:
I think the call to values is misplaced.
Here's a functioning version of foo, and a perhaps more concise alternative:
(define (foo . L)
(let ([bar
I think the call to values is misplaced.
Here's a functioning version of foo, and a perhaps more concise alternative:
(define (foo . L)
(let ([bar (string-join (build-list (length L) (λ (x) ~a)) )])
(apply format bar L)))
(define (my-foo . L)
(string-join (map ~a L) ))
On Fri, Jul 3,
Racket has linguistic support for keyword arguments, which address
many of the issues you raised:
http://docs.racket-lang.org/guide/keywords.html
Would this help in your case?
Additional background: http://www.cs.utah.edu/plt/publications/scheme09-fb.pdf
On Mon, Jul 6, 2015 at 10:56 AM, John
, 2015 at 11:05 AM, Stephen Chang stch...@ccs.neu.edu wrote:
Racket has linguistic support for keyword arguments, which address
many of the issues you raised:
http://docs.racket-lang.org/guide/keywords.html
Would this help in your case?
Additional background: http://www.cs.utah.edu/plt
Is there a way to access an attribute, other than with the . syntax?
For example, the following example does not work:
#lang racket
(require (for-syntax syntax/parse))
(define-syntax (define-stuff stx)
(syntax-parse stx
[(_ attr-name macro-name)
#'(begin
(begin-for-syntax
You might want to specify collect in #:datum-literals if it is not a
defined name.
Can you describe some usage examples? That may lead to better insight
for the implementation.
On Fri, Jul 31, 2015 at 11:49 AM, Deren Dohoda deren.doh...@gmail.com wrote:
Suppose I have a macro (experiment ...)
For any f, acc, and lst, (foldl f acc lst), from left-to-right,
applies to f to each element of lst and the current accumulated value.
The initial accumulator is acc so the second intermediate accumulated
value is (f (first lst) acc). Replacing f, acc, and lst with your
arguments, the second
What's the output you expected?
Does this post help you?
http://stackoverflow.com/questions/8778492/why-is-foldl-defined-in-a-strange-way-in-racket
On Wed, Jul 29, 2015 at 9:45 AM, sagyo12341...@gmail.com wrote:
Dear racket maintainers,
Maybe, I found a bug.
(foldr (lambda (x y) (list x
I haven't played with the example in detail, but do you want the cut
operator here?
http://docs.racket-lang.org/syntax/stxparse-patterns.html?q=syntax-parse#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7e!%29%29
On Sat, Jul 25, 2015 at 9:55 AM, Jens Axel Søgaard
jensa...@soegaard.net wrote:
Hi
class?
On Sat, Jul 25, 2015 at 10:51 AM, Stephen Chang stch...@ccs.neu.edu wrote:
I haven't played with the example in detail, but do you want the cut
operator here?
http://docs.racket-lang.org/syntax/stxparse-patterns.html?q=syntax-parse#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7e!%29%29
pasterack uses make-module-evaluator in a sandbox. It's also still
running 6.1.1. Would either of those cause the observed difference?
On Wed, Oct 21, 2015 at 9:18 PM, Matthew Flatt wrote:
> An empty closure is allocated as a constant --- similar to a literal
> string or
This paper is not about Racket but reports on an r7rs implementation
experience and so may have some helpful hints:
http://www.schemeworkshop.org/2014/papers/Kato2014.pdf
On Oct 25, 2015 5:18 PM, "Alexis King" wrote:
> I have built a very small, very incomplete
The Style Guide is a good place to start for learning Racket
conventions: http://docs.racket-lang.org/style/index.html
Overall, things look good! Your code already uses many Racket idioms.
Some things that caught my attention on first glance:
- The code is wider than typical. Though tastes
I understand now. I still claim that an (explicit) inner loop is not needed:
(define (validate-ranges5 value-list low-list high-list)
(for*/fold ([failures 0])
([(lo hi) (in-parallel low-list high-list)]
[v value-list]
#:when ( lo v hi))
(printf
Perhaps I don't understand the problem, but why is the inner loop necessary?
By the way, you can use (printf ...) instead of (fprintf
(current-output-port) ...)
Would this work?
(define (validate-ranges2 value-list low-list high-list)
(for/sum ([v value-list]
[lo low-list]
Hi Racket users,
This past summer, Vishesh Yadav created a web application to
facilitate sharing of Racket programs as Javascript (big-bang programs in
particular).
Vishesh is exploring improvements to Whalesong as part of a master's
thesis, taking a descriptive approach and focusing on how
o
> indicate I would like it to match on all phases?
>
> ~Leif Andersen
>
>
> On Wed, Dec 16, 2015 at 10:02 PM, Stephen Chang <stch...@ccs.neu.edu> wrote:
>> There's a #:phase option available when specifying literals:
>>
>> http://docs.racket-lang.org/syntax
I added similar basic tests here.
https://github.com/racket/racket/blob/master/pkgs/racket-test-core/tests/racket/hash.rktl
On Feb 13, 2016 4:12 PM, "Robby Findler"
wrote:
> I think this is what you want?
>
> (chaperone-hash
> (hash)
> (λ (h key) (values key (λ (h
Thanks for the report. Which version are you using? I'm seeing that
the behavior appears in 6.3 but is fixed in 6.4.
On Wed, Feb 24, 2016 at 4:22 PM, Jeffrey Edgington wrote:
> I am getting an unexpected message from check-expect when I try the following:
>
> #lang racket
>
e there's no agreement, I'll leave it for now.
I'll just add a special case for empty vectors and 0,0.
It's probably not worth it to add yet-another new special case, as in
Matthew's email, right?
>
> Robby
>
> On Tue, Jan 19, 2016 at 1:16 PM, Stephen Chang <stch...@ccs.neu.edu> wr
I'm fixing pr 15227 but I would like to do so in a backwards-incompatible way.
Right now an out-of-range index is sometimes allowed as an argument to
in-vector, leading to the bug:
$ racket
Welcome to Racket v6.4.0.4.
-> (for/sum ([x (in-vector (vector 10 20) 2 -1 -1)]) x)
SIGSEGV MAPERR si_code
2) 1 1)
On Tue, Jan 19, 2016 at 2:06 PM, Vincent St-Amour
<stamo...@eecs.northwestern.edu> wrote:
> Would it be possible to special-case `(in-vector (vector) 0 0)`
> directly, and fix the bug while keeping backwards compatibility?
>
> Vincent
>
>
> On Tue, 19 Jan 201
You can also submit the code to pasterack.org, which uses the scribble
css. Each paste page also gives the html source of the code and output
on the side, which you can copy to anywhere you want.
On Tue, Mar 15, 2016 at 7:11 PM, Sanjeev Sharma wrote:
> is there a quick &
A "read" variant that works with format strings would be a useful
addition I think.
Matthew, your solution is clever :) (but with symbols instead of strings).
Another alternative could be to use match:
#lang racket
(define (trim-brackets str)
(string-trim str #rx"\\[|\\]|,"))
(define (pad n
> It may be overkill for this use case, but I would probably use the
> parsack package, since I think its interface is pretty intuitive.
:) I had started writing up a parsack example, and I was all set to
admonish the OP for not creating a parser when you want a parser but
then I saw it was for a
Use display? or set read-accept-bar-quote to #f
On Wed, Mar 2, 2016 at 1:12 PM, Marco Morazan wrote:
>
> Hi All,
>
> I seem to recall I knew how to do this once, but can't recall the details.
>
> How do we write a blank to a text file without the parallel bars appearing?
>
>
In general, times reported in DrRacket are unreliable.
See:
https://docs.racket-lang.org/guide/performance.html#%28part._.Dr.Racket-perf%29
Try the command line. Here's what I get on my machine:
$ ~/racket61/bin/racket
Welcome to Racket v6.1.
-> (define (total n)
(for/sum ([x (in-range (+
Do you mean something like?
#lang racket
(require rackunit)
(require rackunit/gui)
(define tests
(test-suite
"my tests"
(test-equal? "check 1" 1 1)
(test-equal? "check 2" 2 2)))
(test/gui tests)
But that will pop a window. Alternatively,
#lang racket
(require rackunit)
(require
> It was also suggested that it is not in src/Makefile, instead:
"I'm usually in the top-level checkout dir", to quote stamourv.
Is this what you're looking for?
https://github.com/racket/racket/blob/master/Makefile#L153-L160
On Wed, Aug 3, 2016 at 1:02 PM, Tim Brown wrote:
>
> Do you have plans to revist the tail call question within RacketScript?
Yes we do. The readme includes that statement just to be upfront with
users about racketscript's philosophy and what to expect when trying
racketscript.
That being said, RacketScript currently converts self-tail-calls to
I like the current structure of the docs but Ethan's comments reminded
of recent blog posts by Eric Raymond (of "Cathedral and the Bazaar"
fame), who surprisingly advocates against "swarm design". The posts
are about Rust but maybe it's something to keep in mind if the package
system gets much
I have a package whose tests are timing out when run by pkg-build. Is
there a way to extend this timeout?
I know I can specify individual file timeouts with `test-timeouts` but
I couldnt figure out how to specify a timeout for testing the whole
package. Is this possible?
Steve
--
You received
Cool! Will definitely check it out.
Is this at all related to Vincent's work? [1]
[1]: https://github.com/stamourv/rash
On Sat, Aug 20, 2016 at 3:17 PM, William G Hatch wrote:
> Hello everyone,
>
> Being obsessed with shells and wanting very badly to have a racket
> shell,
I'm trying to write a provide transformer that wraps a provided
identifier and then provides that instead.
For example,
#lang racket
(require (for-syntax syntax/parse racket/provide-transform))
(define-syntax wrapped-out
(make-provide-pre-transformer
(lambda (stx modes)
(syntax-parse
Vishesh Yadav wrote a DrRacket plugin that automatically compiles a
program to JS via whalesong and uploads it to a server. It sounds
related to what you are describing so you may want to take a look at
his code.
The plugin code is here: https://github.com/vishesh/drracket-whalesong
in particular
string-join already expects a list of strings, so are you sure you want apply?
Can you give a more specific example?
Perhaps map or some other iteration is what you want?
(for ([strs '(("a" "b") ("c" "D" "E"))])
(displayln (string-join strs " ")))
=>
a b
c D E
On Sat, Oct 29, 2016 at 10:27
Hi Lawrence,
Can you provide some more context? Are you looking to learn about
graphs in general, or specifically about the graph library API.
For the former, any well known algorithms textbook should have a
decent introduction. I used CLRS [1] as a guide when developing the
library.
For the
Yes, that worked. Thanks.
On Sun, Oct 9, 2016 at 8:11 AM, Matthew Flatt <mfl...@cs.utah.edu> wrote:
> Does `syntax-local-lift-module-end-declaration` work?
>
> At Sat, 8 Oct 2016 19:29:19 -0400, Stephen Chang wrote:
>> I'm trying to write a provide transformer that wraps a p
You can use the escape identifier:
#lang scribble/manual
@(require scribble/eval
(for-label racket))
@interaction[
(define a (list 1))
(define b (list 1))
(code:comment @#,para{a and b are not @racket[eq?], but they are
@racket[equal?]:})
(eq? a b)
(equal? a b)]
On Tue, Nov 29,
> What are the implications of this for the Types as Macros/Turnstile
stuff?
As William mentioned, he's also working on a language using the Types
as Macros approach. Alex and I have run into the same issue, but it's
always with compiled files (without compiling, requires and provides
appear to
s.k...@gmail.com> wrote:
> Thanks, I'll try that.
> It is not clear to me where I can use @#,
> But certainly your response will be a great help for me.
> Thanks again, Jos
>
> -Original Message-
> From: stchang...@gmail.com [mailto:stchang...@gmail.com] On Behalf Of Stephen
&g
You get the dreaded "bad syntax" because syntax-parse doesnt know
which pattern failed. There a couple of things you can do:
1) Use a commit pattern, which tells syntax-parse not to backtrack
past the commit point. You have to change the order of patterns for
this to work.
The inner ellipses need to be "escaped". I like using the dot notation
in nested macros but I know others do not like that style.
(define-syntax (test stx)
(syntax-case stx ()
((_ n e ...)
#'(define-syntax (n stx)
(syntax-case stx ()
((_ e0 (... ...))
Not with map, which requires equal-length arguments.
You could do the slightly less ugly:
(map
foo
lst-A
lst-B
(range (length lst-A)))
On Thu, Mar 2, 2017 at 11:14 AM, David Storrs <david.sto...@gmail.com> wrote:
>
>
> On Thu, Mar 2, 2017 at 10:09 AM, Step
Does `hyperlink` do what you want?
eg
@section{@hyperlink["http://google.com"]{The Google}}
On Sat, Mar 4, 2017 at 1:49 PM, David Van Horn wrote:
> I'm using scribble to make a web page and I'd like a section-like
> heading that is just a link to an external URL, but I
combine-out may help simplify things?
(define-syntax my-out
(make-provide-transformer
(lambda (stx modes)
(syntax-parse stx
((_ name:id)
#:with mk-name (format-id #'name "make-~a" #'name)
(expand-export #'(combine-out name mk-name) modes))
or
vid Van Horn <dvanh...@cs.umd.edu> wrote:
>> Thanks, this does make the section heading a link, but in the table of
>> contents or in the left hand navigation bar, the link is to the
>> (empty) section, not the URL. What I'd like is for the navigation
>> links to go to the URL.
>
The in-X forms are sequences, and must be used with the sequence API, ie for/X.
map only works with lists, so you could use build-list or range:
(map
foo
lst-A
lst-B
(range 2))
On Thu, Mar 2, 2017 at 9:55 AM, David Storrs wrote:
> I'd like to be able to
I believe Racket uses HAMTs [1] for immutable hash tables.
[1]: http://lampwww.epfl.ch/papers/idealhashtrees.pdf
On Wed, May 24, 2017 at 11:01 AM, 'John Clements' via users-redirect
wrote:
> I’m introducing hash tables to students in a first-year class. Is there a
> handy
Ran into some unexpected behavior today. Quoted values do not seem to
be garbage collected when there are only weak references. Is this
correct behavior?
Here's an example program:
#lang racket/base
(define key1 (list 1))
(define key2 '(1))
(define hash1 (make-weak-hash (list (cons key1 1
~r
http://docs.racket-lang.org/reference/strings.html?q=~r#%28def._%28%28lib._racket%2Fformat..rkt%29._~7er%29%29
On Mon, May 7, 2018 at 7:46 PM, 'John Clements' via Racket Users
wrote:
> Okay, how many times have I written the function that accepts 1.237472387 and
Oops, I didnt see the rounding.
On Mon, May 7, 2018 at 7:53 PM, Ben Greenman
wrote:
> I use this:
> http://docs.racket-lang.org/gtp-util/index.html#%28def._%28%28lib._gtp-util%2Fmain..rkt%29._rnd%29%29
>
> I didn't know about SRFI 54 --- looking forward to reading
It's fixed now. Cron job didn't run for some reason. Thanks for the heads up!
On Fri, Mar 9, 2018 at 12:42 PM, 'John Clements' via Racket Users
wrote:
>
>
>> On Mar 9, 2018, at 8:25 AM, Tim Hanson wrote:
>>
>> Hi, I tried to grab the latest
Here's a version of your program that performs as you specified:
http://pasterack.org/pastes/91460
But do take a look at the paper, docs [1], or codebase [2], which
turns this idea into complete languages.
[1]: http://docs.racket-lang.org/turnstile/index.html
[2]:
Hi Alexis,
Great article. And timely too, since it addresses some of the same
usage issues of local-expand and stoplists that we ran into with
Turnstile.
(I'm also interested in why the core forms are added to the stop list.
Is it because of let-syntax? I know it's probably been mentioned
before
For those who don't have drracket handy: http://pasterack.org/pastes/59296
On Mar 24, 2018 4:26 PM, "Jos Koot" wrote:
>
> Very nice,
> Jos Koot
>
>
> From: racket-users@googlegroups.com [mailto:racket-users@googlegroups.com] On
> Behalf Of
I frequently want to run the same tests with different #lang's.
Has anyone written a test harness that lets me do this without
duplicating the test code? (I couldnt find anything on the pkg
server.)
--
You received this message because you are subscribed to the Google Groups
"Racket Users"
Hi Claes, Thanks for the effort in splitting the package.
Would any users of the graph library object to dropping support for 5.x?
On Tue, Dec 11, 2018 at 10:19 PM Claes Wallin (韋嘉誠)
wrote:
>
> I am trying to split the package graph into graph-doc and graph-lib,
> see:
> For the same reasons I would use a `let` around a code block -- it's an easy
> way to isolate computation and create reusable elements. What would a more
> normal way be when using syntax-parse?
The #:with syntax-parse "pattern directive" does the same thing, but
with less parens.
answer 1) You are missing a dot in (~@ propthing), ie this will work:
(~@ . propthing)
minor question) is there a reason you are using with-syntax with syntax-parse?
answer 2) You may want to try "attribute". It's somewhat like
"syntax", except it returns false when there are unbound patvars,
If `define-values` is not strictly required, here's a more
syntax-case-y recursive version:
(define-syntax (aux stx)
(syntax-case stx ()
[(_) #'(begin)]
[(_ (var val) . rst)
(identifier? #'var)
#'(begin
(define var val)
(aux . rst))]
[(_ var . rst)
https for lists.racket-lang is not working at the moment. Sorry for
the inconvenience. The server hosting lists.racket-lang went down
recently. A partial temporary non-https version is up but https hasnt
been enabled yet.
On Mon, May 6, 2019 at 12:48 PM David Storrs wrote:
>
> I'm not sure if
fwiw, I think here is a working version along the lines of your
original attempt.
#lang racket
(require (for-syntax syntax/parse))
(define-syntax set/define
(syntax-parser
[(_ h k v)
#:when (with-handlers ([exn:fail:syntax:unbound? (lambda _ #f)])
(local-expand #'h
The RacketScript compiler [1] has been updated to work with Racket 7.x
programs, ie all tests pass (though we are still working to support
more primitives).
Try it out here: http://rapture.twistedplane.com:8080/
The next milestone is to improve RacketScript enough to compile the
Racket expander
In case this issue is still unresolved, I just ran into this error
message because I accidentally installed a 64 bit distribution when I
needed 32-bit.
On Tue, Jun 16, 2015 at 12:11 PM Vincent St-Amour wrote:
>
> Hi,
>
> How did you install Racket? It looks like you have used the wrong
>
As William mentioned, the example conflates Typed Racket types with
surface language types, which would probably not be right even if
Typed Racket did not complain.
Does your custom language have its own type system? If not, you may
not need to use Turnstile. Plain macros that expand to Typed
I don't know of a more efficient way to convert, but depending on what
operations you want, you might be able to compute it directly on the
hash, e.g., see hash-has-key?, hash-keys-subset?, hash-union, etc. (I
didnt know about some of the functions until recently.)
On Fri, Oct 25, 2019 at 4:21 PM
I dont know much about J, but if I'm understanding correctly, you have
an implementation of J in Typed Racket?
And then you want to be able to infer more specialized cases in some
instances by pruning the type?
You might be able to do it with just plain macros in that case, which
would generate
nality of RacketScript has not
changed. It is in the same experimental state and supports the same
subset of Racket as before.
On Wed, Oct 2, 2019 at 2:04 PM Hendrik Boom wrote:
>
> On Wed, Oct 02, 2019 at 01:53:46PM -0400, Stephen Chang wrote:
> > The RacketScript compiler [1] has be
> I am somewhat surprised that the graph library enforces numerical edge
> weights at all.
The docs do informally say number weights but I don't think the
constructors do any checking? Any enforcement should be deferred to
individual algorithms.
Re: graphviz, I took a quick look and I think we
As mentioned, to get your macro to work, you have to change how the
reader behaves on "|".
You might be interested in the (implementation of) no-vert-bar reader lang:
https://docs.racket-lang.org/no-vert-bar-lang/index.html
On Mon, Feb 3, 2020 at 6:27 PM Kevin Forchione wrote:
>
> Hi guys,
>
Your second suggestion is described in this (hard to find) section of
the TR Guide on Type Generalization:
https://docs.racket-lang.org/ts-guide/caveats.html#%28part._.Type_generalization%29
I agree it should be much more prominent. At the very least, any docs
for invariant constructors should
Hi everyone, Has eq? behavior changed with Racket CS? (ie, 8.0+)
Specifically:
$ racket79/bin/racket
Welcome to Racket v7.9 [bc].
> (eq? (integer->char 955) (integer->char 955))
#f
$ plt/racket/bin/racket
Welcome to Racket v8.1.0.6 [cs].
> (eq? (integer->char 955) (integer->char 955))
#t
Is
)
>
>
> At Fri, 21 May 2021 11:33:41 -0400, Stephen Chang wrote:
> > Hi,
> >
> > It seems that, since 8.1, the format of paths in links.rktd has changed?
> >
> > Are there new API fns that deal with this new kind of encoded path? Or
> > what is the rec
Hi,
It seems that, since 8.1, the format of paths in links.rktd has changed?
Are there new API fns that deal with this new kind of encoded path? Or
what is the recommended way to process them?
Something like this? (Is this `decode-link-path` public? I couldnt find it)
> shouldn't the entire parenthesized expression be given to the macro processor
> and then replaced with something valid before being rejected?
That would be true if you're defining a macro, i.e. if you use
`define-syntax` instead of `define`.
>
> --
> You received this message because you are
:
>> > >
>> > > I had this exact same question when I looked at the RacketScript issue
>> > > lol.
>> > >
>> > > The answer is https://docs.racket-lang.org/reference/numbers.html:
>> > >
>> > > a complex number with an
In the following, why is the first considered a real number but the
second considered not real
> (real? 0.0+0i)
#t
> (real? 0.0+0.0i)
#f
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails
rg/reference/numbers.html:
>
> a complex number with an exact zero imaginary part is a real number.
>
> Since 0.0 is not exact, 0.0i is not a real number.
>
> On Fri, Nov 19, 2021 at 11:59 AM Stephen Chang wrote:
>>
>> In the following, why is the first considered a real nu
Sorry, the "workaround" was in regard to complex numbers. How to
support them in a minimal way so that programs that dont use them are
not blocked by lack of full support.
On Fri, Nov 19, 2021 at 3:20 PM Sam Tobin-Hochstadt wrote:
>
> On Fri, Nov 19, 2021 at 3:13 PM Step
88 matches
Mail list logo