This nightmarish but organic example produced by a student actually works
correctly, and is a beautiful example of why we need teaching languages (or a
type system that enforces boolean inputs to ‘or’):
https://www.brinckerhoff.org/blog/
Note that while the actual student code is in python,
I would also like to know more about this topic. I have never done any
rigorous tests, however for my application which takes about 7 seconds to load,
I have observed the following:
* there is no big startup difference between running the application as "racket
run.rkt" (which loads the
On Thu, Apr 27, 2017 at 12:34 PM, Vishesh Yadav wrote:
>
>> BTW: I'm interested in porting to RacketScript. How does the performance
>> of the image library equivalent compare with regular Racket?
>>
>>
> It is slower than regular Racket. I did not spend much time comparing
>
>
> BTW: I'm interested in porting to RacketScript. How does the performance
> of the image library equivalent compare with regular Racket?
>
>
It is slower than regular Racket. I did not spend much time comparing it
with Racket, and there is definitively scope for improvement. Let us know
how
Thanks, that does the trick!
-Philip
On Wed, Apr 26, 2017 at 6:27 PM, Matthew Flatt wrote:
> The `all-defined-out` macro supports a trick that several non-hygienic
> macros use: it uses the scopes on the parentheses around
> `all-defined-out` non-hygienically, instead of
The `all-defined-out` macro supports a trick that several non-hygienic
macros use: it uses the scopes on the parentheses around
`all-defined-out` non-hygienically, instead of the scopes on the
identifier.
So, in place of
(datum->syntax stx '(all-defined-out)))
you can use
(datum->syntax stx
I'm working on a #%module-begin variant that provides all module-level
bindings, and I'm having trouble finding the right way to give lexical
context to all-defined-out.
The issue (IIUC) is that all-defined-out only exports identifiers "that
have the same lexical context as the (all-defined-out)
Hi,
This sounds like a nice enhancement.
You might want to request this at https://github.com/racket/scribble/issues .
Aside from the implementation difficulty (the code for defform and friends is
large, handles many edge cases, and feels a bit like spaghetti code), one of
the main concerns
Hi all!
Some of my libraries take a while to load: just adding a (require mylib) to an
empty #lang racket/base file bumps the compile time from 0.5s to 1.5s, even if
no bindings from the library are used. After experimenting a bit, it seems that
the overhead is mainly due to other modules
Konrad,
Sorry I am a bit late to the party.
You may remember me from this topic:
https://groups.google.com/forum/#!topic/racket-users/E6utg2Pv5hA
where I looked for a scientific language and a tool for code generation.
Leibniz seems to be very general. Is generation of (C or other) code from
On Wednesday, April 26, 2017 at 9:48:56 AM UTC-7, David K. Storrs wrote:
> On Wed, Apr 26, 2017 at 12:21 AM, Jon Zeppieri wrote:
> I don't know that there's a right way, but if your functions are
>
> nullary, then promises are a decent fit:
>
>
>
> (define conf
>
>
On Wed, Apr 26, 2017 at 12:48 PM, David Storrs wrote:
>
>
> On Wed, Apr 26, 2017 at 12:21 AM, Jon Zeppieri wrote:
>>
>> I don't know that there's a right way, but if your functions are
>> nullary, then promises are a decent fit:
>>
>> (define conf
>>
On Wed, Apr 26, 2017 at 12:21 AM, Jon Zeppieri wrote:
> I don't know that there's a right way, but if your functions are
> nullary, then promises are a decent fit:
>
> (define conf
> (delay
> (with-input-from-file ...)))
>
> Then just (force conf) whenever you want the
Alexander McLin writes:
> One paper I have in mind is Hodgkin & Huxley's paper published in 1952
> where they first wrote down the equations describing the membrane
> voltage of the giant squid
> axon.
>
#lang racket
(define read-conf
(let [(conf (delay (with-input-from-file “db.conf" (thunk (displayln "hello")
(read)]
(thunk
(force conf
(read-conf)
(read-conf)
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To
On Wednesday, April 26, 2017 at 5:21:41 AM UTC+1, Jon Zeppieri wrote:
> (define conf
> (delay
> (with-input-from-file ...)))
>
> Then just (force conf) whenever you want the value.
I tend to call promises xxx-promise (e.g. conf-promise),
to remind me not to use them without force'ing them.
Greetings.
On 25 Apr 2017, at 23:51, 'John Clements' via Racket Users wrote:
In answer to your actual question, the most common name is “Tail
Call Optimization,” which many people correctly object to because
it’s not an optimization, it’s a change to the meaning of terms in
the language
A `define/delay` macro for this might be a good addition to `racket/promise`:
(define-simple-macro (define/delay id:id expr:expr)
(begin (define p (delay expr)) (define (id) (force p
(define/delay conf
(with-input-from-file "db.conf" read-json))
(conf) ;; forces promise
--
You
Thank-you all for the suggestions. I'll check them out and report back.
Vishesh: There is some repetition (not animation), but I removed all
caching to simplify and rework the interactive flow. It would be with
trying freeze in conjunction with updated caching.
BTW: I'm interested in porting to
You can use convert-syntax-error from syntax/macro-testing to convert
the syntax error to a runtime error, which can be caught by RackUnit:
http://docs.racket-lang.org/syntax/macro-testing.html#%28form._%28%28lib._syntax%2Fmacro-testing..rkt%29._convert-syntax-error%29%29
Alexis
> On Apr 25,
Sorry for forgot to mention Racket version. It is 6.8.
--
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.
For more
Hi there,
I am writing a simple macro `if-let` that tried to bind the condition to a
variable.
```
(define-simple-macro (if-let (~describe "binding pairs" [binding:expr
value:expr])
(~describe "\"then\" clause" then:expr)
(~describe
22 matches
Mail list logo