Hello, I found an interesting thing.
My conclusion was totally wrong since your example are written in Untyped
Racket, the generated contracts eat all the seconds unconsciously.
Timing your example in Typed Racket with my functional bitmap combiners:
no optimizing, generating all 2500 bitmaps on
I've been systematically looking at different Linux GUI environments, on and
off, for a while now. I currently use macOS on both my desktop and laptop but
have Linux and Windows virtual machines. I might switch to Linux for the host
OS at some point. The thing I am finding to be lacking in al
Hi Ju
Interesting results. Did you run the Contract Profiler tool? [
http://docs.racket-lang.org/contract-profile/]
I think it's fairly well understood that the contract-induced performance
costs across the typed / untyped boundary can be severe.
BTW: At the back of my mind is the thought that t
Hi Andrew. Thanks, I do know about the here string syntax, and it's part of why
I'm not willing to put much effort into fixing the lexer. :)
William, udelim is neat and may be useful for me, so thanks for mentioning it.
On Monday, May 1, 2017 at 6:48:12 PM UTC-4, Andrew Gwozdziewycz wrote:
> Hi
> On May 2, 2017, at 12:01 AM, circularba...@gmail.com wrote:
>
> I am somewhat reluctant to use structures as I want to keep the interpreter
> as minimal as possible. Also, I'm not familiar enough with the semantics of
> frames to implement it in interpreter.rkt.
>
> With regards to mcons bei
On Tue, May 2, 2017 at 8:02 PM, Daniel Prager
wrote:
> Hi Ju
>
> Interesting results. Did you run the Contract Profiler tool? [
> http://docs.racket-lang.org/contract-profile/]
>
> I think it's fairly well understood that the contract-induced performance
> costs across the typed / untyped boundar
On Mon, 1 May 2017 15:37:49 -0400, James
wrote:
>I've been systematically looking at different Linux GUI environments,
>on and off, for a while now. I currently use macOS on both my
>desktop and laptop but have Linux and Windows virtual machines.
>I might switch to Linux for the host OS at some
My concept of how (simple) contracts should work was influenced by the
Bertrand Meyer / Eiffel approach and spent many years of rolling my own
contracts in lesser languages to mimic this.
The main things I found pragmatically useful were:
1. Being able to specify pre-conditions and post-condi
Thinking more about the functional context, a macro — say (define/pre-post
...) that cleanly defined the following functions would be pretty sweet
(continuing with the real-sqrt example):
- real-sqrt-unsafe
- real-sqrt-with-pre-conditions
- real-sqrt-with-pre-and-post-conditions
- real
> On May 2, 2017, at 4:33 PM, Daniel Prager wrote:
>
> (define/pre-post (real-sqrt x)
> #:pre ([(real? x) "real argument expected"]
> [(>= x 0) "non-negative argument expected"])
>
> #:implementation (sqrt x)
>
> #:post ([(implies (= x 0) (= result 0)) "The sqrt of zero should b
Thanks Matthew
That's very helpful. I definitely want to hook into the existing contract
system if possible, and you've given some good pointers to how this might
be done.
I kind of expected that it would be possible to do what I wanted with
"indy" contracts, but struggled with the heavy use of c
Here's the "quick" way I'd write the real-sqrt in Racket, combined with an
illustration of one of the advantages of using the established contract
combinators: here they gracefully report a kind of error that in the
original would have caused an error in the error-checking code.
(define/contract (
On Tue, May 2, 2017 at 11:43 PM, Daniel Prager
wrote:
> I kind of expected that it would be possible to do what I wanted with
> "indy" contracts, but struggled with the heavy use of combinators in the
> examples.
Two offhand thoughts:
1. To practice with dependent contracts, I made a "full" sp
While trying to express in the contract system Daniel Prager's check that a
possibly-buggy square root function actually returns the square root of its
argument (and in particular the nice error messages, I ran into a few
things that weren't quite as I expected.
My first attempt, using flat-contra
14 matches
Mail list logo