[racket] Scrolling documentation sidebar

2014-10-03 Thread Byron Davies
Forty-year Lisper, three-month Racketeer. I’ve been using Racket to prototype a weakest precondition static analysis tool for my work at http://ontopilot.com. (You may recall the “Guardians of the Software Universe” t-shirt at RacketCon.) I’m thinking about ways to use it at a K-12 charter

[racket] racket distributed hello-world example error

2014-10-03 Thread kevin2059
i run the hello-world example in distributed-lib but got a socket error. here is what i did: 1, i have a pc and a VPS 2, i can login the VPS from the pc without password. (ssh) 3, they both running racket6.1 4,i change localhost to the ip of the vps in hello-world.rkt then i run

[racket] Code that double checks is good, bad, other?

2014-10-03 Thread Sean Kanaley
Hello all, Sometimes I run into situations where a callee has certain input constraints that the caller must satisfy. Particularly when the caller is just below the user interface level, this can lead to redundant checks. For example, if the the callee takes an integer, and the user input

Re: [racket] Code that double checks is good, bad, other?

2014-10-03 Thread Raoul Duke
in theory only the top level things should validate. by which i mean those things which get input from something other than your own code. the problem is when you re-work the code, do you know for sure that you moved the contract/assertion/validation/checking appropriately. test coverage can

Re: [racket] Code that double checks is good, bad, other?

2014-10-03 Thread Michael Wilber
My opinion: Which will waste less time over all uses of your program? A few extra CPU-minutes of double checks, or a few extra man-weeks of debugging when one of your code's assumptions fails? Sean Kanaley skana...@gmail.com writes: Hello all, Sometimes I run into situations where a callee has

Re: [racket] Code that double checks is good, bad, other?

2014-10-03 Thread Sean Kanaley
the problem is when you re-work the code, do you know for sure that you moved the contract/assertion/validation/checking appropriately. That's the real crux that I forgot to say. I was inspired to post when I was slightly repurposing a mid-level function and realized it no longer had to do as

Re: [racket] Code that double checks is good, bad, other?

2014-10-03 Thread Neil Van Dyke
I think someone from the Felleisen extended family of researchers will have something to say on types (both theory and practice) when they get a chance. Two very general comments, IMHO: * Type checking (static, runtime, mixed, other) is one of many mechanisms and disciplines that can

[racket] Mischief causing mischief

2014-10-03 Thread Byron Davies
I’m trying to use the mischief #lang. I did raco pkg install mischief, and I see I have mischief installed among my Mac Library files. I created a file with just: #lang mischief (define one 1) When I click the Run arrow, I get error messages: .undefined: undefined; cannot use before

Re: [racket] Mischief causing mischief

2014-10-03 Thread Carl Eastlund
Byron, That's an issue I had fixed on a separate branch of the git repository where mischief is stored, but hadn't gotten around to moving to the branch raco pkg uses until earlier today. Your question is quite well timed. I believe if you run raco pkg update mischief you should get a version

Re: [racket] Mischief causing mischief

2014-10-03 Thread Byron Davies
Yes, that worked. Thank you for the immediate fix. It was impressive how Racket kept all eight of my iMac’s pseudoCPUs busy while it was recompiling mischief. On Oct 3, 2014, at 12:32 PM, Carl Eastlund carl.eastl...@gmail.com wrote: Byron, That's an issue I had fixed on a separate branch

Re: [racket] Code that double checks is good, bad, other?

2014-10-03 Thread Sean Kanaley
The open-endedness of this led me to write a bit, then read a few things, then produce unnecessarily long responses, and so on, so I deleted everything to spare people. I'll go with saying thanks for the input. But here's an interesting related link: http://blog.codinghorror.com/gold-plating/

Re: [racket] Understanding contracts

2014-10-03 Thread Alexander McLin
Good evening Mathias, After studying your program and mine, and running various permutations, I understand where I was going wrong. It appears that while doing manual experimentation I had gotten confused to which module I was actually in the REPL when calling various functions by hand. Also my

Re: [racket] Understanding contracts

2014-10-03 Thread Alexander McLin
Actually I wasn't quite ready to move on. When I apply (curve 3) where (define curve (cubic-bezier a b) a and b are bezier-control-point? I get the following contract error: --- *(curve 3)* *. . cubic-bezier: contract

Re: [racket] Understanding contracts

2014-10-03 Thread Alexander McLin
Making a correction here, my wish error message should say this. * in: the 1st argument of* * (-** *((and/c number? (between/c 0 1)))* *(#:clamp-range boolean?)* *number?)* Because I understand that the phrase *the range of* means the last item in the - form which