Re: [racket] Completely disallow numbers, quoted and all

2014-06-03 Thread Matthew Flatt
At Wed, 4 Jun 2014 00:38:11 -0400, Daniel Brady wrote: > So I'm playing around with the DrRacket reader, and I'm decided to see if I > could disallow certain types of literal data. I figured I'd start with > numbers, and maybe see if I can come up with a tiny numberless language > like pure lambda

[racket] You're invited to Neil Toronto's Dissertation Defense

2014-06-03 Thread Jay McCarthy
Many of you have seen many emails and commits from my PhD student, Neil Toronto, who has worked on projects like math and plot. He will be defending his dissertation soon and we're going to stream the talk for anyone who is interested. The defense is Wednesday, June 11th, 2:00pm MDT and we'll use

[racket] Completely disallow numbers, quoted and all

2014-06-03 Thread Daniel Brady
So I'm playing around with the DrRacket reader, and I'm decided to see if I could disallow certain types of literal data. I figured I'd start with numbers, and maybe see if I can come up with a tiny numberless language like pure lambda calculus. This is a simple module that I came up with: (modul

Re: [racket] Performance. How to disable contract checks?

2014-06-03 Thread Matthias Felleisen
Yes, I have a suite of half-finished macros that do something like this. I don't have the time to extract these macros from a project and create an independent library. Sorry. Yes, I proposed something like this on 'dev' for types. You can have one submodule that exports typed versions and an

Re: [racket] Performance. How to disable contract checks?

2014-06-03 Thread Matthew Butterick
You can use `module+` to automatically create a submodule that invokes your contracts, while the main module ignores them. Then if you want speed, you can import your module as (require module-name) or if you want safety, you can import as (require (submod module-name safe)) Here's how I di

Re: [racket] Scribble source file with inline images

2014-06-03 Thread Matthew Flatt
The piece that can't handle non-character input is the `@` reader. You can avoid it by a kind of `include`, so that a plain Racket reader is used to get the source. This almost works: #lang scribble/manual @(require (for-syntax racket/base syntax/strip-context

Re: [racket] Performance. How to disable contract checks?

2014-06-03 Thread Roman Klochkov
On the other side of the question: one may simply make something like (module lib/unsafe racket/base    (provide foo bar baz)    ...) (module lib racket/base   (require lib/unsafe)   (provide/contract (foo (-> integer? any)) (bar (-> list? list?))) (module lib/debug racket/base   (re

Re: [racket] Performance. How to disable contract checks?

2014-06-03 Thread Jay McCarthy
I think the phase-0 approach would leave in the cost of constructing the wrappers and blame information in addition to inhibiting inlining. Jay Sent from my iPhone > On Jun 3, 2014, at 3:17 PM, Roman Klochkov wrote: > > Now we have t least errortrace > (http://docs.racket-lang.org/errortrac

Re: [racket] Performance. How to disable contract checks?

2014-06-03 Thread Roman Klochkov
Now we have t least errortrace ( http://docs.racket-lang.org/errortrace/index.html ) with the same approach. One should require (or set variable) at top level, then remove *.zo and recompile the module. I even may make it as a simple phase-0 variable and replace arrow-val-first.rkt/check-post

[racket] Scribble source file with inline images

2014-06-03 Thread Jens Axel Søgaard
Hi all, I have the following source file which contains inline images: https://github.com/soegaard/flappy-bird/blob/master/flappy-bird.rkt I'd like to use Scribble to pretty print it to html. I tried wrapping the source in a racketblock, but I get an error concerning the inline images "Onl

[racket] DrRacket 6.0.1 with R5RS user-initial-environment

2014-06-03 Thread Tim
I am using DrRacket 6.0.1 with language R5RS when I try to evaluate the statement: (eval '(+ 1 2) user-initial-environment) I get the error: "user-initial-environment: undefined;" Am I doing something wrong? Thank you. -Tim O. Racket Users list: http://lists.racket-lang.or

Re: [racket] Performance. How to disable contract checks?

2014-06-03 Thread Jay McCarthy
Roman, This approach is unlikely to work out due to separate compilation. Module A can't really affect how module B gets compiled. Your contract-mode appears to be trying to do such a thing. So it is not clear where the decision on compile mode is made. If it is inside a module, then why not t

Re: [racket] Performance. How to disable contract checks?

2014-06-03 Thread Roman Klochkov
Will you accept patch for this, if I'll write it? (contract-out ...) will have (id debug-contract-expr production-contract-expr) instead of (id contract-expr) in syntax There will be global phase-1 variable contract-mode : (or/c 'nothing 'production 'pre 'pre-and-past 'all) = 'all nothing -- n

Re: [racket] Performance. How to disable contract checks?

2014-06-03 Thread Matthias Felleisen
Your mail calls for a philosophical answer. If this were Eiffel, you would be correct. But Racket is not Eiffel: -- we are not a tools company that sells a language -- we spent our own time on a maintenance effort that goes above and beyond our jobs -- and we don't provide a standard lan

Re: [racket] Performance. How to disable contract checks?

2014-06-03 Thread Roman Klochkov
There should be _standard_ check-modes. With global variable (or better compile-mode). Because, I can in my own libraries make this 4 or even more modes. But I use 3d-party or standard library. And I cannot rewrite them all to my 4 modes. Even if another developer will use the same idea, he or

[racket] ICFP 2014 Student Volunteer Programme

2014-06-03 Thread David Van Horn
[With apologies for cross-posting] Please forward this to anyone who may be interested! ICFP Student Volunteer Programme http://icfpconference.org/icfp2014/sv.html We are looking for student volunteers to help with the running of ICFP 2014 in Gothenburg, Sweden. If you are a student (part-time, f

Re: [racket] Performance. How to disable contract checks?

2014-06-03 Thread Matthias Felleisen
You can program these scenarios with option contracts; see comparison in paper. Perhaps it's time to write this up as a chapter for the Guide. On Jun 3, 2014, at 12:38 AM, Daniel Prager wrote: > > I propose something like two contracts: for debug and production modes. > > Eiffel compilers im

Re: [racket] logic, boolean algebra

2014-06-03 Thread Damien MATTEI
Thanks Eduardo, with the one in the magazine i have two solution now, this Byte magazine is a real time capsule too :-) Damien Le Wednesday 28 May 2014 23:30:37, vous avez écrit : > Hi, Damien. > > That is a very easy program to write. It was one of the first programs in > Lisp every. In fact