On Sun, Sep 4, 2022 at 4:21 AM Reuben Thomas wrote:
>
> On Sat, 3 Sept 2022 at 19:10, Shu-Hung You wrote:
>>
>> Running `racket foo.asm` will produce the desired output, so a shell
>> script that directly passes the arguments to Racket could work.
>> Otherwise, just
-- Forwarded message -
From: Shu-Hung You
Date: Sat, Sep 3, 2022 at 1:03 PM
Subject: Re: [racket-users] Writing a "command-line front-end" for a language
To: Reuben Thomas
Running `racket foo.asm` will produce the desired output, so a shell
script that directly
(make-rename-transformer (quote-syntax tmp))
>...)] ...)
> ()
> body1 body ...))])
> (syntax/loc stx
>(letrec-syntaxes+values ([(tmp ...) expr] ...) ()
> inner-body])))
>
> and the butt
Here are two syntax errors that behave differently in DrRacket:
#lang racket
(define-syntax (m-late stx)
#'(let () (define x 0)))
(define-syntax (m-early stx)
#'(let-syntax () (define x 0)))
; (m-late)
; (m-early)
DrRacket *correctly* highlights the source location of the errors in
both cas
On Tue, Aug 3, 2021 at 1:13 PM George Neuner wrote:
>
>
> On 8/3/2021 1:03 PM, Norman Gray wrote:
> > On 3 Aug 2021, at 17:38, George Neuner wrote:
> >
> >> Racket is multi-platform and tries to present a common API for
> >> dealing with underlying operating systems. Windows is an important
> >>
On Fri, Jul 2, 2021 at 10:25 AM Rhazes Spell wrote:
>
> Hello-
> I have been using Racket for about 18 months for personal projects and
> teaching. I have been doing all of my work in DrRacket but I wanted to
> interact with a module that I wrote on the interactive command line this
> morning.
On Sun, Jul 11, 2021 at 8:15 PM Kiong-Gē Liāu wrote:
>
> Hi, in non-typed racket, I can define a generalized Fibonacci sequence
>
> X[n+k] = f(X[n], X[n+1], , X[n+k-1])
>
> using the following code
>
> #lang racket
>
> (require racket/stream)
>
> (define (gfib f xs)
> (define (gfib_t xs)
>
As of pict, from the slideshow paper I think the answer is yes and
also many other prior works:
https://users.cs.northwestern.edu/~robby/pubs/papers/icfp2004-ff.pdf
> 6 Slideshow Design and Related Work
> Slideshow’s pict language is by no means the first
> language designed for generating pictur
The PLaneT website (https://planet.racket-lang.org/) is currently
unreachable. The error message is ERR_CONNECTION_REFUSED.
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
Out of curiosity, I wrapped David's code in a loop and tried to write
509 bytes in each iteration. From the output, it looks like CS doesn't
implement pipes using a fixed-size buffer. I'm also not sure how many
different buffers there are. I think this has something to do with
George's question.
I
In addition to the constructor, `foo` is also used for compile-time
struct information. To avoid this, either supply #:name to designate a
different identifier for compile-time struct type information, or
declare #:omit-define-syntaxes to dismiss it.
Shu-hung
On Thu, Jun 3, 2021 at 4:04 PM Sage G
Not that I have any idea of what's going on, but interestingly, Typed
Racket's second ->* example has (1)(3)(4). The use of list* may be
possible if one follows the type (List* String Natural x) in the
example.
https://docs.racket-lang.org/ts-reference/type-ref.html?#%28form._%28%28lib._typed-rack
One option is using save-image from 2htdp/image to save the images as
PNG files and open them using external programs.
https://docs.racket-lang.org/teachpack/2htdpimage.html#%28def._%28%28lib._2htdp%2Fimage..rkt%29._save-image%29%29
If you can use a different language (say racket), another option
The snapshot build here may help: https://snapshot.racket-lang.org/
The HEAD version could add new internal primitives from time to time.
Shu-Hung
On Fri, Feb 5, 2021 at 5:52 PM 'Killian Zhuo (KDr2)' via Racket Users
wrote:
>
> Thank you, does that mean I need a v8.0.0.5 to compile a v8.0.0.5?
Some update:
Hopefully this is the same issue as the one reported at
https://github.com/racket/racket/issues/3604 and that the commit
https://github.com/racket/drracket/commit/3a07fc0319097661d27ea05ba42634f2b5ae14dd
fixes it.
On Sun, Jun 17, 2018 at 10:15 PM Shu-Hung You
wrote:
>
> No
Using the command-line instruction `raco setup` will update all
obsolete bytecodes. If you are looking for a programmable interface,
`compiler/cm` is a good starting point.
On Sun, Nov 1, 2020 at 5:43 PM infodeveloperdon
wrote:
>
> I've never had problems with the .zo files being auto-created dur
Here is an example that provides different colors for some particular
forms such as define, require, lambda etc. However, these forms
('keywords') are recognized literally by the lexer instead of
semantically as in Check Syntax. Therefore it will classify
non-keywords as keywords from time to time.
here
will be no chance to identify which (/ y 0) caused the error.
On Mon, Jul 27, 2020 at 1:13 PM Shu-Hung You wrote:
>
> By changing (fact 5) to (* 2 (fact 5)), the stack information becomes
>
> /: division by zero
> errortrace...:
>/Volumes/ramdisk/fact.rkt:6:17: (/ 1 0)
&g
By changing (fact 5) to (* 2 (fact 5)), the stack information becomes
/: division by zero
errortrace...:
/Volumes/ramdisk/fact.rkt:6:17: (/ 1 0)
/Volumes/ramdisk/fact.rkt:7:12: (* (loop (sub1 n)) n)
/Volumes/ramdisk/fact.rkt:7:12: (* (loop (sub1 n)) n)
/Volumes/ramdisk/fact.rkt:7:12:
Here it is.
https://github.com/racket/racket/blob/master/pkgs/racket-doc/scribblings/reference/stx-trans.scrbl#L31
I agree that it will be good to have a pointer or an example involving
set!-values in the documentation of make-set!-transformer. The status
quo is kind of indirect. The documentation
FWIW, because `.` is just cons, the program
(define (F [X : T1] . [Y : T2]) 'e)
is being read as:
(define (F [X : T1] Y : T2) 'e)
I guess that's the reason for having an extra '*' in the syntax.
On Mon, Jun 1, 2020 at 10:16 PM Sam Tobin-Hochstadt
wrote:
>
> The syntax looks like this:
>
>
On Fri, Jan 24, 2020 at 10:37 PM Jordan Johnson wrote:
>
> On 24 Jan 2020, at 14:00, Robby Findler wrote:
> > In the preferences dialog, in the General tab, the last checkbox is
> > the one you want.
>
> The one for saving files upon switching tabs?
>
That new options is added in the upcoming v7
What's the result of `file
/home/user/racket-tmp-install/bin/racket` and the result of
`uname -a`?
(In other words, what hardware are you using? Is it 32-bit or 64-bit,
it is x86 or ARM? Which version of Racket did you download?)
On Fri, Jan 17, 2020 at 12:21 PM William Dobias
wrote:
>
>
Here's what I did:
1. Download the installer for x86_64 linux.
2. Move (or copy) the downloaded .sh file _into_ penguin through Files App.
3. Allow the installer to run by using `chmod +x FILE` (or `chmod 755 FILE`)
* Chromrebook does not allow eXecutable permission
for files outsi
?
Best,
Shu-Hung
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web vi
On Fri, Dec 20, 2019 at 2:05 PM Shu-Hung You
wrote:
>
> Could it be that the Racket layer importing rktio C code directly uses
> get-ffi-obj and does not convert scheme_bignum_type to _int64?
>
Never mind this -- I got the FFI part wrong.
> On Fri, Dec 20, 2019 at 2:01 PM Matth
Could it be that the Racket layer importing rktio C code directly uses
get-ffi-obj and does not convert scheme_bignum_type to _int64?
@Dmitry: I guess Racket uses 1 bit for type tagging, leaving only
30+sign (or 62+sign) bits for the actual value.
On Fri, Dec 20, 2019 at 2:01 PM Matthew Flatt wr
On Mon, Nov 11, 2019 at 10:30 AM Hendrik Boom wrote:
>
> On Fri, Oct 25, 2019 at 11:31:41AM +0200, Niklas Larsson wrote:
> > Hi!
> >
> > If you right click on an identifier in drracket you get “jump to binding
> > occurrence” and “jump to definition” (if it’s defined in another file).
> > Don’t
On Sun, Nov 3, 2019 at 2:26 PM Hendrik Boom wrote:
>
> scribble does not find module "inclusion.rkt" even though racket does.
> There must be a work-around, mustn't there?
>
> I can (require "inclusion.rkt") jusr fine from racket
>
> t3.rkt:
>
> #lang racket
> (require "inclusion.rkt")
> foo
>
> i
>From the expansion result, match does check whether the inspected
value is a list using list?. But at least for the current version of
Racket (and the C VM), list? is handled specially and ``effectively
takes constant time due to internal caching.'' (quoted from:
https://docs.racket-lang.org/refer
I don't know COM but here's an attempt to guess what happened based on
the documentation.
On Tue, Oct 8, 2019 at 11:51 AM Scott Gudeman wrote:
>
> I am working on converting a powershell script to Racket that takes a Word
> XML document and saves it as PDF.
>
> In powershell, when I call Word's
I forgot to CC my reply to the list. The case here is that the user
account data in `users.rktd` only contain one field but the default
`extra-fields` configuration requires 3 extra fields. The error
message probably comes from some (map cons ...)
expression that resides in the server code.
On
errortrace with ,en should work as normal, as long as you ensure that
there are no pre-compiled bytecode files (compiled/*.zo):
$ ls
myfile.rkt
$ racket -l errortrace -i
Welcome to Racket v7.2.
> ,en "myfile.rkt"
"myfile.rkt"> (f 123)
; g: 123 [,bt for context]
"myfile.rkt"> ,bt
; g: 123
; error
On Mon, Jun 24, 2019 at 4:09 PM David Storrs wrote:
>
> I actually did try writing something at the extended position, although I
> removed it before posting the above. Even with a write, it still does not do
> as expected. In fact, the results are even stranger:
>
> #lang racket
>
> (define (
identifier-binding returns #f for top-level bindings. I believe
make-base-eval is evaluating expressions at top-level.
On Sat, Apr 20, 2019 at 4:56 PM Ryan Kramer wrote:
>
> Below is a short example showing that identifier-binding doesn't seem to work
> quite right with Scribble's make-base-eval
Interesting. This is the timing on Mac. Comparing to Alex's result,
the numbers roughly match "< 7s" v.s. "> 13s" while fact-1 is close.
$ racket
Welcome to Racket v7.2.0.3.
> (enter! "factorial.rkt")
"factorial.rkt"> (equal? (fact 10) (fact-1 10))
#t
"factorial.rkt"> (time (void (fact-1 1
And because it is nothing else but a usual binding, it's possible to
prefix-in or rename-in as in
(require (prefix-in r: racket/base))
(case 5 [r:else 'ok])
On Wed, Feb 27, 2019 at 7:32 AM Laurent wrote:
>
> Good point. I wasn't sure that would work---it does.
>
> On Wed, Feb 27, 2019 at 1:28 PM
rticular binding for 'else', but you
> shadowed it with 'match', which does not treat 'else' differently than any
> other identifier.
>
> Sam
>
> On Mon, Feb 25, 2019, 7:33 PM Shu-Hung You
> wrote:
>>
>> When using a case expression
When using a case expression with an else clause in inside a match
expression, the expander complains about case having a bad syntax.
However, the use of case expressions outside of match are fine. Is
there anyway to get around this?
Currently, I just replace it with another match.
#lang racket/b
On Tue, Feb 12, 2019 at 3:55 PM David Storrs wrote:
>
> On Tue, Feb 12, 2019 at 4:46 PM wrote:
> >>
> >> Thank you for the explanation. Can I ask why the heck it works this
> >> way? This seems to be explicitly designed for maximal surprise and
> >> minimal usefulness.
> >
> >
> > It works that
On Tue, Feb 12, 2019 at 10:04 AM David Storrs wrote:
>
> Could someone point me to the FM on how to properly use struct-info?
> For the life of me, I cannot get anything except (values #f #t) out of
> it. I see that:
>
> 1) struct-info only works with struct types that are under the control
> of
On Wed, Feb 6, 2019 at 9:42 AM 'Paulo Matos' via Racket Users <
racket-users@googlegroups.com> wrote:
>
>
>
> On 06/02/2019 16:00, Shu-Hung You wrote:
> > print-values is a normal identifier introduced by the racket/base's
> > macro module-begin. It
print-values is a normal identifier introduced by the racket/base's macro
module-begin. It is a (private) function defined in racket/private/modbeg.
On Feb 6, 2019 5:02 AM, "'Paulo Matos' via Racket Users" <
racket-users@googlegroups.com> wrote:
> Hi,
>
> The docs[1] give a grammar for fully expa
Deferring everything to runtime could avoid macros as much as
possible. You can implement input parsing as a function and use the
macro only to glue things together.
#lang racket/base
(require (for-syntax racket/base)
syntax/parse/define
redex/reduction-semantics)
(provide (ren
Hi Stephan,
The "submodules to run" drop-down menu lets you choose which
submodules will be executed when you click the "Run" button. For
example, if you have a main submodule and a test submodule, DrRacket
will run those 2 submodules by default. You can avoid running tests in
the test submodule b
Is this some expected behavior?
1. Open DrRacket and run:
#lang racket/base
(require pict)
(circle 50)
2. Copy the output. Open a new tab in DrRacket and paste the pict-snip%.
3. This error message showed up at the bottom: ``write: cannot marshal
value that is embedded in compiled code value: (
Is this some expected behavior?
1. Open DrRacket and run:
#lang racket/base
(require pict)
(circle 50)
2. Copy the output. Open a new tab in DrRacket and paste the pict-snip%.
3. An error message showed up at the bottom, similar to this
https://i.imgur.com/5BnTWP0.png
Despite the error message
I think it depends on the code that logs the message, not the logger.
In the log-message function, the topic and the prefix-message?
arguments together control whether the message will be prefixed by the
topic and ": " or not.
On Mon, Nov 26, 2018 at 5:00 PM David Storrs wrote:
>
> Is there a way
Thanks! However, I am trying to avoid changing USE. The trouble is
that there are too many macros using X that I don't understand, and
these macros themselves are more than one layers deep. It is nearly
impossible to thread the syntax property through the macros.On Wed,
Nov 21, 2018 at 7:30 PM Matt
source information of B and C?
Currently, the only information I can get is the client module that
uses USE, obtained by checking (current-module-declare-name) at
expansion time in X.
Shu-Hung
--
You received this message because you are subscribed to the Google Groups
"Racket Users" gr
The begin form can encapsulate multiple definitions like this:
(require (for-syntax racket/sequence
racket/syntax)
syntax/parse/define)
(define-simple-macro (define-asserts predicate:id ...)
#:with (assert-name ...)
(for/list ([id (in-syntax #'(predicate ...))])
On Fri, Nov 16, 2018 at 12:43 PM Andrew Wilcox wrote:
>
> I'd like to be able to eval a custom language from inside a module... without
> instantiating modules multiple times.
>
> With the help of Matthew Butterick, I've gotten this far:
>
> ; runtime.rkt
> #lang racket
>
>
> (printf "This is run
Thanks for catching this! This is a bug in the setup/dirs library,
which the contract system transitively depends on to compute the path
in the error message. I opened a pull request and let's see how it
goes (#2352).
On Thu, Nov 1, 2018 at 5:23 PM Alex Harsanyi wrote:
>
>
>
> On Thursday, Novembe
vide-by-zero?
> (lambda (exn) (println "div by 0"))])
> (saved-k 0)) ; wrapped in "prompt 4"
>
> (println 'hello2) ; wrapped in "prompt 5"
>
> )
>
> Since the continuation executed in "prompt 4", why I
FWIW here's the part in the document that could be helpful:
1. The section in the Guide that talks about the concept of prompts
and their usage in the continuation in Racket:
https://docs.racket-lang.org/guide/prompt.html
The prompt is kind of like a mark on the continuations that lets the
control
On Wed, Oct 17, 2018 at 1:12 PM Jordan Johnson wrote:
>
>
> On Oct 17, 2018, at 10:35, Matthias Felleisen wrote:
>
> (check-expect (+ 10 .25) 10.25)
>
> errors with check-expect’s message about not comparing inexact numbers, but
> in DrRacket+BSL the decimals are treated as exact numbers.
>
> Wh
Here! http://www.cs.utah.edu/~mflatt/racket-on-chez-jan-2018/
Also a few days algo there were some more updates at RacketCon and
Scheme Workshop.
On Mon, Oct 1, 2018 at 1:08 PM Brett Gilio wrote:
>
>
> Philip McGrath writes:
> > In light of
> > the promising outlook for Chez replacing the current
I should've been clear that the loop example was taken from the
Chicken scheme wiki. Same for the while example mentioned in the
email:
https://wiki.call-cc.org/man/4/Macros#ir-macro-transformer
Using the syntax->datum here would drop lexical information though; if
the syntax object given to the m
I think the following program illustrates the idea, though it doesn't
really work:
#lang racket
(begin-for-syntax
(define (syntax-pair->cons stx)
(define datum (syntax-e stx))
(cond
[(list? datum)
(map syntax-pair->cons datum)]
[(pair? datum)
(cons (syntax-pair
The gui-lib might be an example. It provides modules spanning
different collections such as racket/gui, framework/ and mrlib/.
https://github.com/racket/gui/tree/master/gui-lib
On Wed, Aug 29, 2018 at 7:13 AM, Erich Rast wrote:
> On Wed, 29 Aug 2018 06:46:49 -0500
> Philip McGrath wrote:
>
>
>>
Is it possible to specify mutually-recursive scope in Redex without an
extra layer of nesting expression? I found this example for letrec:
https://github.com/racket/redex/blob/master/redex-examples/redex/examples/letrec.rkt#:34
34 #:binding-forms
...
37 (letrec ([x e_x] ...) #:refers-to (shadow
The markdown package by Greg Hendershott provides a parser that create
HTML like xexprs from a string. The rest would be easy.
https://docs.racket-lang.org/markdown/index.html
On Fri, Aug 17, 2018 at 8:31 PM, Andrew J wrote:
> Hi. In a little side project, I'm looking for an simple Racket-y wa
I would try make-wrapping-module-begin too. Basically, it wraps all
module-level forms that "calculates something" with the syntax object
you gave it. For example, the following program
;; some-language.rkt
#lang racket
(provide (except-out (all-from-out racket)
#%module-begi
Would convert-syntax-error and convert-compile-time-error work? Sure
they are macros, but wrapped up in a nice way.
https://docs.racket-lang.org/syntax/macro-testing.html
On Sat, Aug 11, 2018 at 11:00 AM, Sage Gerard wrote:
> Hi all,
>
> Still working the koans project and am hitting a design s
For small expressions it probably does not matter, but suitably naming
intermediate expressions is definitely a good approach as it
`explains' the code. Also, replacing let* by define can reduce nesting
level. These 2 points are suggested in the style guide 4.2 and 4.4:
https://docs.racket-lang.or
ble event
> for custodian shutdown.
>
> At Fri, 10 Aug 2018 15:27:07 -0500, Shu-Hung You wrote:
>> I'm running a thread with memory limit using custodian-limit-memory.
>> How do I reliably detect whether the thread I'm running was terminated
>> normally or aborted
I'm running a thread with memory limit using custodian-limit-memory.
How do I reliably detect whether the thread I'm running was terminated
normally or aborted by custodian shutdown? Plus, is it possible to
obtain the context at the time the memory limit was exceeded?
I can think these two:
1. Us
On Thu, Aug 9, 2018 at 3:42 PM, Zeta Convex wrote:
>
>
> On Thursday, 9 August 2018 21:34:16 UTC+1, Shu-Hung You wrote:
>>
>> Change the first few lines of lang/reader.rkt to:
>>
>> #lang s-exp syntax/module-reader
>> bf/language
>> #:read my-read
>
Change the first few lines of lang/reader.rkt to:
#lang s-exp syntax/module-reader
bf/language
#:read my-read
#:read-syntax my-read-syntax
;; ...
And just install the entire directory as a package using raco pkg
install. This could take a while. If you want to make it faster, just
skip building t
Hi Stephen,
Running (find-system-path 'pref-file) in the REPL shows the path to
the preference file. Inside the file there's one line like:
(plt:framework-pref:framework:display-line-numbers #t)
I don't know if directly copying the pref file to another computer
would work but perhaps worth a try
Hi James,
If you use (check-deadline) in the checker, the config file needs to
contain the deadline of the assignment. If the deadline configuration is
not found, this error would show up. For example, in you have this config,
((active-dirs ("directoryA"))
(inactive-dirs ...)
(deadline
(
(
#lang racket/load and (load PATH) are less idiomatic and more
low-level in Racket. I don't know how did racket/load and load
interact with ``raco exe'' but here's another way to make it work.
Everything is placed inside modules.
$ racket test.rkt
... ok ...
$ raco exe ++lib racket/base/lang/read
Here's a list of *some* keywords and regular expressions used by
DrRacket, from line 387 to line 477:
https://github.com/racket/gui/blob/master/gui-lib/framework/private/main.rkt#L387
On Sat, May 5, 2018 at 9:44 AM, piv det wrote:
> I want to write a Racket mode for ace,
>
> Relate issue: https
Looks like the implementation of char-utf-8-length returns values
fitting the "FSS-UTF (1992) / UTF-8 (1993)" table in
https://en.wikipedia.org/wiki/UTF-8#History. Not sure what's the
standard UTF-8 encoding..
/* racket/src/char.c */
static Scheme_Object *char_utf8_length (int argc, Scheme_Object
Hello everyone,
I try to save the traces generated by Redex to an image. However, the
arrows between the expressions don't show up in the result.
I tried some combinations of #:x-spacing, #:edge-labels? and #:layout
to let the arrows showed up in trace, but the edges remain hidden when
I ran trac
This is awesome! I never knew that un-cloning can be done by using --lookup.
Shu-Hung
On Wed, Apr 25, 2018 at 12:35 PM, 'John Clements' via Racket Users
wrote:
> YAY!
>
> I can *never* remember this flag.
>
> Many thanks,
>
> John
>
>> On Apr 25, 2018, at 9:32 AM, Matthew Flatt wrote:
>>
>> Br
Hi Keven,
Here's an example:
#lang racket
(let-syntax ([a (lambda (stx)
(printf "expansion time: stx = ~a\n" stx)
#'3) ])
a)
However, I would suggest to start at least from syntax objects and
macro transformers in the guide and use defin
For controlling custom printing of a struct, you can use
`gen:custom-write` generic interface. An example is like the use of
make-cosntructor-style-printer:
https://docs.racket-lang.org/reference/structutils.html#%28def._%28%28lib._racket%2Fstruct..rkt%29._make-constructor-style-printer%29%29
Unde
The explanation of the 5-argument read and 6-argument read-syntax is
here, starting from the 3rd paragraph of this subsection:
https://docs.racket-lang.org/reference/reader.html#%28part._parse-reader%29
The 5 (or 6) arguments version read accepts extra source location
information. However, this ve
(Interned) symbols that have the same printed form but are not equal
to each other already exist tho; the symbols produced by
string->unreadable-symbol are not equal? to their counterparts
produced by the reader, but nevertheless have the same printed
representation.
Shu-Hung
On Wed, Dec 27, 2017
I'm not sure whether the following is a good idea, but it more or less
works. The impersonate-struct function allows one to redirect the some
or all of accessor and mutator functions on *individual struct
instances*. If the actual constructor is hidden from the user and only
a ``smart'' constructor
Yes, because keyword functions expand to macro definitions that try to
optimize keyword applications.
namespace-require and namespace-variable-value are relatively
low-level operations on modules and namespaces. Using dynamic-require
could be a bit easier:
#lang racket
(module p racket
(provid
I think printing which file is currently being loaded can also help,
like the logs given by enter! #:verbose. These logs can also be
printed to the interaction window and be erased after the loading
process is finished. This can let the user know that something is
actually running.
--Shu-Hung
On
Hi Taahir,
The keyword is #:replacement? instead of #:replacement (note the
question mark). I don't know enough Typed Racket to understand that
error message tho, sorry.
Cheers,
Shu-Hung
On Tue, Oct 3, 2017 at 1:40 AM, Taahir Ahmed wrote:
> Hi,
>
> I have been implementing some toy problems in
I think the case here is a little subtle. The syntax object #'(define
x y) has actually gone through expansion, but Racket's new expansion
model will prune this syntax object's local scopes [1]. One could use
#:local [2] in this case to see the difference:
> (syntax-parse (let ([define 'something-
This command should install the net-jwt library for you:
raco pkg install net-jwt
--Shu-Hung
On Mon, Sep 11, 2017 at 9:15 AM, Chongkai Zhu wrote:
> Hi all,
>
> https://docs.racket-lang.org/jwt/index.html
>
> It seems I just need to (require net/jwt) in racket 6.10 and everything
> should work.
Parameterizing current-output-port to (open-output-string) redirects
the output to a string. Something along the line of (open-output-file
"/dev/null") sounds a bit better but I'm not sure how to create a
discard-everything output port.
(define ns (make-base-namespace))
(parameterize ([current-na
If you are implementing a new language, this can be done by delegating
the "=-to-let" work to the macro-expander and let the reader simply
parenthesizing the input into s-expression form. In this approach, we
don't need to worry about being hygienic in the reader since the
actual work is done by th
>From this thread, it seems that the original formula it not actively
maintained. But the thread also mentions `cask`, probably worth a try.
https://groups.google.com/forum/#!msg/racket-dev/Zyl9m8UWvp0/GVDcHVkWAwAJ
Best,
Shu-Hung
On Mon, Aug 7, 2017 at 6:23 PM, wrote:
> It seems I got it workin
Hi Thomas,
I tried following Matthew's suggestions to attach my-lang and use
dynamic-require. Turns out that works pretty well! And then there's
even no need to setup collection path since everything loads from
compiled byte-code.
https://gist.github.com/shhyou/aa2adaf7e1b7d548783cee352c3230a9
Th
Hi Thomas,
I think the program is more of Racket programming setup rather than
embedding Racket. When start a Racket program on our own, we have to
setup the environment correctly.
Here is my test program that can load an external program and the
accompanying commands (also attached at the end).
Sorry, I saw that you're already using raco exe and raco distribute.
So is the problem related to some DLL issue on Windows?
Best,
Shu-Hung
On Mon, Feb 20, 2017 at 1:19 PM, Shu-Hung You
wrote:
> https://docs.racket-lang.org/raco/exe.html
> Is raco exe in this page what you want
https://docs.racket-lang.org/raco/exe.html
Is raco exe in this page what you want? Just type
> raco exe q.rkt
And this command will produce a single executable. Now we can now run
> ./q
q: expects 1 on the command line, given 0 arguments
Best,
Shu-Hung
On Mon, Feb 20, 2017 at 1:12 PM, lu wro
This works completely fine on a fresh racket REPL:
> (exn:fail:bmtc:unknown-user "message" (current-continuation-marks) "bob")
(exn:fail:bmtc:unknown-user "message" # "bob")
I guess there might be some inconsistency in REPL states. Starting a
fresh racket should work, or maybe use (enter! "./modu
x 1)) imp-prop:a "a value"))
(define unimpersonated (impersonate-procedure impersonated #f))
(unimpersonated 10)
;=> 19
(impersonator? unimpersonated)
;=> #t
(imp-prop:a? unimpersonated)
;=> #t
(imp-prop:a-get unimpersonated)
;=> "a value"
Best,
Shu-Hung
--
Yo
Hi Ken, do you mean this? https://github.com/racket/games
--Shu-Hung
On Wed, Nov 23, 2016 at 2:02 PM, Ken Biondi wrote:
> Where is the source code for "PLT Games.exe"? I unsuccessfully searched
> github for it.
>
> --
> You received this message because you are subscribed to the Google Groups
Hi Meino,
Could you give an example of lst or line? Unlike string-append, most of the time
string-join doesn't really require an 'apply'. As we can see:
> (string-append "a" "b" "c")
"abc"
> (string-join '("a" "b" "c") ":")
"a:b:c"
While string-append takes all its arguments and concatenates the
Hi Ken,
string-prefix? does exactly what you want.
> (define a "this") (define b "that") (define c "thisandthat")
> (string-prefix? c a)
#t
> (string-prefix? c b)
#f
https://docs.racket-lang.org/reference/strings.html#%28def._%28%28lib._racket%2Fstring..rkt%29._string-prefix~3f%29%29
Best,
Shu-H
98 matches
Mail list logo