Re: [racket] Understanding GC when working with streams

2013-09-09 Thread Joe Marshall
Ever? Or for the purpose discussed earlier? On Sep 9, 2013 7:17 AM, Matthias Felleisen matth...@ccs.neu.edu wrote: I wonder whether you really want lazy streams. -- Matthias On Sep 9, 2013, at 10:19 AM, Lawrence Woodman wrote: On 09/09/13 07:19, Stephen Chang wrote: Konrad's exactly

Re: [racket] Why parameterize is so sloooow?

2013-08-16 Thread Joe Marshall
Sounds like Racket is using a deep binding strategy rather than shallow binding. I expect that SBCL uses shallow. On Aug 16, 2013 5:10 AM, Matthew Flatt mfl...@cs.utah.edu wrote: At Fri, 16 Aug 2013 13:59:55 +0400, Roman Klochkov wrote: I compared parameterize with lexical var

Re: [racket] Why parameterize is so sloooow?

2013-08-16 Thread Joe Marshall
that has to be searched to find a parameter value. At Fri, 16 Aug 2013 05:23:52 -0700, Joe Marshall wrote: Sounds like Racket is using a deep binding strategy rather than shallow binding. I expect that SBCL uses shallow. On Aug 16, 2013 5:10 AM, Matthew Flatt mfl...@cs.utah.edu wrote

Re: [racket] Where to learn advanced programming skills?

2013-07-26 Thread Joe Marshall
On Jul 22, 2013 7:24 AM, Neil Toronto neil.toro...@gmail.com wrote: It's a bit of a shame they [monads] don't come up in Racket much, Not really. They're overrated. If you try doing effectful computation in Haskell, though, you'll be begging for something like monads within an hour. If you

Re: [racket] Use `set!' or not in this scenario?

2013-07-20 Thread Joe Marshall
On Sat, Jul 20, 2013 at 4:16 AM, Norman Gray nor...@astro.gla.ac.uk wrote: Can anyone illustrate how that solution would work in Ben's example here? The basic gist of it is that instead of manipulating the-data, we manipulate functions. So the inner functions f2, f3, ... will change from

Re: [racket] Use `set!' or not in this scenario?

2013-07-19 Thread Joe Marshall
You could also hide the data with a monad. On Jul 19, 2013 9:35 AM, Carl Eastlund c...@ccs.neu.edu wrote: One common solution to this issue is a parameter: (define current-data (make-parameter #f)) (define (f1 the-data ...) (parameterize ([current-data the-data]) (f2 ...))) (define

Re: [racket] OPERATING SYSTEM ON A FPGA

2012-12-05 Thread Joe Marshall
On Wed, Dec 5, 2012 at 10:30 AM, Patrick Li patrickli.2...@gmail.comwrote: Hello, I have only done system programming in assembly and C, and found that I frequently did a lot of manual placement and shuffling of data in memory, with the usual pointer tricks. Off the top of my head, I do

Re: [racket] Racket now has 360K hits in Google verbatim

2012-12-05 Thread Joe Marshall
I don't object to the silliness, I object to it being called a measure! The number that shows up on the search results page is a pure guess made by a part of the system that doesn't have access to the actual index. Really, Google Trends is a much better tool.

Re: [racket] OPERATING SYSTEM ON A FPGA

2012-12-05 Thread Joe Marshall
http://dspace.mit.edu/handle/1721.1/5731 Those who cannot remember the past are condemned to repeat it -- Santayana Racket Users list: http://lists.racket-lang.org/users

Re: [racket] 80-bit precision in Racket

2012-11-15 Thread Joe Marshall
On Wed, Nov 14, 2012 at 6:16 PM, Hugh Aguilar hughaguila...@yahoo.comwrote: This Supercomputer Toolkit looks pretty cool! I skimmed over the article, and will read it completely later on. Am I understanding that this uses integer arithmetic? No, the Digital Orrery used floating point.

Re: [racket] 80-bit precision in Racket

2012-11-15 Thread Joe Marshall
On Thu, Nov 15, 2012 at 12:13 PM, Dmitry Pavlov dpav...@ipa.nw.ru wrote: In hindsight, the use of quad precision appears to have been overly conservative for this problem Might be, and may still be, but the precision of astronomical observation has grown much since the time the paper was

Re: [racket] 80-bit precision in Racket

2012-11-14 Thread Joe Marshall
On Tue, Nov 13, 2012 at 10:43 PM, Hugh Aguilar hughaguila...@yahoo.comwrote: We are doing numerical integration of celestial bodies over large periods of time (100 years is a norm). I'm new to Scheme, so I may be totally wrong about this --- but, isn't a numerical program like this exactly

Re: [racket] [plt-edu-talk] Does a Scheme procedure return a value?

2012-09-08 Thread Joe Marshall
A Scheme procedure might return a value, or it might delegate to another procedure (via tail recursion). This is a key point: languages without tail recursion cannot delegate to another procedure. They can do a limited simulation of delegation by chaining the returns, but this adds an O(n) space

Re: [racket] [plt-edu-talk] Does a Scheme procedure return a value?

2012-09-08 Thread Joe Marshall
returns, if you don't mind if Ellen and I cringe. We'll know what you mean.) rac On Sep 8, 2012, at 9:07 AM, Joe Marshall wrote: A Scheme procedure might return a value, or it might delegate to another procedure (via tail recursion). This is a key point: languages without tail recursion cannot

Re: [racket] Racket Google Hits

2012-01-09 Thread Joe Marshall
On Sun, Jan 8, 2012 at 10:09 AM, John Clements cleme...@brinckerhoff.org wrote: Many people have better things to do than worry about our rank in the TIOBE programming languages index. The `number of results' printed for a Google query is an extraordinarily poor approximation (it is not much

Re: [racket] arity of + versus =

2011-10-28 Thread Joe Marshall
On Wed, Oct 26, 2011 at 8:32 PM, Dan Grossman d...@cs.washington.edu wrote: Very minor point, but is there a rationale beyond historical precedent for + and * to allow any number of arguments but, =, =, , , = to require at least two arguments? 0 is the additive identity. 1 is the

Re: [racket] arity of + versus =

2011-10-28 Thread Joe Marshall
To John: The original poster was asking why the comparison operators do not generalize downward to 1-ary and 0-ary versions. Upward generalization works. On Fri, Oct 28, 2011 at 9:31 AM, Arthur Nunes-Harwitt a...@cs.rit.edu wrote: Hi,  That's the wrong question. Well, sort of.  Recall

Re: [racket] arity of + versus =

2011-10-28 Thread Joe Marshall
On Fri, Oct 28, 2011 at 10:05 AM, Carl Eastlund c...@ccs.neu.edu wrote: Joe Marshall picked the wrong way to generalize = is not a reason, historical or otherwise, for = not being generalized to 0 or 1 arguments. Certainly not, but it carries the same weight as Carl Eastlund claims Joe's

Re: [racket] arity of + versus =

2011-10-28 Thread Joe Marshall
On Fri, Oct 28, 2011 at 10:26 AM, Stephen Bloch bl...@adelphi.edu wrote: Since there is in fact a well-defined and useful meaning for (= a b c d e), to wit all the numbers a, b, c, d, and e are equal, and a well-defined and useful meaning for (= a b c d e), to wit the sequence a, b, c, d, e

Re: [racket] arity of + versus =

2011-10-28 Thread Joe Marshall
On Fri, Oct 28, 2011 at 10:58 AM, Stephen Bloch sbl...@adelphi.edu wrote: OK, here's a variant of binary-nary that produces the results we want when op has contract X X - boolean rather than X X - X (define (binary-nary relop)   (letrec ((f (lambda args                 (or (empty? args)  

Re: [racket] arity of + versus =

2011-10-28 Thread Joe Marshall
On Fri, Oct 28, 2011 at 11:08 AM, Carl Eastlund c...@ccs.neu.edu wrote: You seem to be assuming that we have to pick one binary-nary for all binary operators. That is the nature of `generalization'. If I have to discriminate, it isn't general.  I would choose this one for relations and the

Re: [racket] Compilation

2011-02-26 Thread Joe Marshall
It used to be that the DLL was expected to be stored in the collects/mysterx subdirectory somewhere. If you look there, you might find the existing DLL. Simply replace it with your new one. 2011/2/26 José Lopes jose.lo...@ist.utl.pt: Hello, I want to make changes in MysterX and execute

Re: [racket] Fwd: MysterX

2011-02-24 Thread Joe Marshall
2011/2/24 José António jose.lo...@ist.utl.pt: And how do I perform a blind call? It's been more than five years since I've worked with MysterX, so my memory is rusty. The source is in racket/src/mysterx/mysterx.cc The relevant method is mx_make_call It looks like if there is no pTypeDesc for

Re: [racket] Multiplying by 0

2011-02-15 Thread Joe Marshall
On Tue, Feb 15, 2011 at 12:22 AM, Hendrik Boom hend...@topoi.pooq.com wrote: Yeah, floating point is approximate. To be very precise and pedantic, floating point consists of two things: 1. A selected set of rational numbers along with an associated representation. 2. A variety of

Re: [racket] MysterX

2011-02-15 Thread Joe Marshall
MysterX will allow you to make a COM call without type information, but it cannot validate the argument list. If you *know* the type info, you can make a `blind call' where you simply push the args on the stack, jump to the entry point, and pray that the callee is expecting those kind of

Re: [racket] Multiplying by 0

2011-02-14 Thread Joe Marshall
2011/2/13 José Lopes jose.lo...@ist.utl.pt: I understand. However, not only that disregards type promotion but also is incoherent since (+ 0 0.0) evaluates to 0.0. Worse: (min 0 1e100) = 0.0 -- ~jrm _ For list-related administrative tasks:

Re: [racket] Multiplying by 0

2011-02-14 Thread Joe Marshall
My point was that inexactness leads to a lot of nasty incoherence. But in the spirit of asking naive questions... On Mon, Feb 14, 2011 at 12:14 PM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote: No, it's not a bug.  Since 1e100 is an inexact number, there's uncertainty about the minimum of those

Re: [racket] Multiplying by 0

2011-02-14 Thread Joe Marshall
On Mon, Feb 14, 2011 at 12:14 PM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote: No, it's not a bug. Since 1e100 is an inexact number, there's uncertainty about the minimum of those two numbers, On Mon, Feb 14, 2011 at 5:01 PM, Joe Marshall jmarsh...@alum.mit.edu wrote: So could

Re: [racket] Plea for neologism (was: Re: letoverlambda)

2010-11-24 Thread Joe Marshall
On Wed, Nov 24, 2010 at 11:49 AM, John Clements cleme...@brinckerhoff.org wrote: Hang on... you're still using the term hygienic in the non-Felleisen way.   That is, if we accept that a hygienic system is one that has well-defined behavior but where you can bind new names when you explicitly

Re: [racket] Plea for neologism

2010-11-24 Thread Joe Marshall
On Wed, Nov 24, 2010 at 10:20 AM, Don Blaheta dblah...@monm.edu wrote: To turn it around, if I hand you a compositional expression, I also hand you the syntax rule and the values of all evaluable sub-expressions, then you can 100% reliably hand back the value of the overall expression, and

Re: [racket] Box: When and why?

2010-10-22 Thread Joe Marshall
Racket is call-by-value. Period. Always. -- Matthias On Thu, Oct 21, 2010 at 6:38 PM, Shriram Krishnamurthi s...@cs.brown.edu wrote: There is a variation on what Matthias said, which is when you need a shared structure whose value changes but whose representation may contain immutable

Re: [racket] reliable path comparison?

2010-10-21 Thread Joe Marshall
On Wed, Oct 20, 2010 at 7:20 PM, Danny Yoo d...@cs.wpi.edu wrote: I'm trying to compare two paths for equality; I misread normalize-path and didn't realize that it does not do case folding, so that on Windows,   (equal? (build-path C:\\)              (build-path c:\\)) returns false.  

Re: [racket] [BULK] Fundamentals

2010-10-14 Thread Joe Marshall
Wow! There is a lot of confusion on this list by people who know better. Mathew Kurian As long as the processor can only read only numbers (binary), Racket cannot be interpreted by the machine before being translated into another language such as Assembly. John Clements There is a

Re: [racket] a small programming exercise

2010-10-14 Thread Joe Marshall
Here's a fast way to get the leftmost digit of a number: (defun leftmost-digit (n base) (do* ((i 1 next) (next base (* i base))) (( next n) (floor n i (This is in Common Lisp. DO* is to DO as LET* is to LET. Floor takes two integer arguments and returns the floor of the

Re: [racket] a small programming exercise

2010-10-14 Thread Joe Marshall
On Thu, Oct 14, 2010 at 3:19 PM, Justin Zamora jus...@zamora.com wrote: On Thu, Oct 14, 2010 at 2:26 PM, Joe Marshall jmarsh...@alum.mit.edu wrote: Here's a fast way to get the leftmost digit of a number: ... This version is slightly slower for small numbers, but much much better for large

Re: [racket] a small programming exercise

2010-10-14 Thread Joe Marshall
Here's an interesting data point. (define (first-digit-fast-1 n) (if ( 10 n) n (let loop ((i 10) (next 100)) (if ( next n) (first-digit-fast (floor (/ n i))) (loop next (* i i)) This takes about 13 seconds on my work machine. If I take

Re: [racket] [BULK] Fundamentals

2010-10-14 Thread Joe Marshall
On Thu, Oct 14, 2010 at 11:14 AM, Richard Cleis rcl...@mac.com wrote:  Can you explain 'script' ? Nope. But a couple of years back we were debating the definition of a `light-weight language'. I think the best answer to that was ``any language where you don't need a Makefile'' (or `Ant', or an

Re: [racket] writing garbage collector in racket/scheme?

2010-10-08 Thread Joe Marshall
On Fri, Oct 8, 2010 at 11:49 AM, YC yinso.c...@gmail.com wrote: Hi all - I have a rather curious question - is it possible to write a garbage collector in a pointerless language such as racket/scheme? It is possible if the system provides a good API to the underlying memory architecture. The

Re: [racket] SIGCSE AWARDS

2010-10-06 Thread Joe Marshall
On Tue, Oct 5, 2010 at 6:53 PM, Mike Gallo,,, mi...@psg.com wrote: What is the likelihood that the address will be put on-line? Here you go: 308B, West Village H (Building 23H) Matthias Felleisen Trustee Professor College of Computer Science Northeastern University Boston, MA 02115

Re: [racket] Checking infinite loops

2010-10-04 Thread Joe Marshall
On Mon, Oct 4, 2010 at 8:56 AM, Patrick Li patrickli.2...@gmail.com wrote: So this seems rather positive. Through some clever search algorithms, or heuristics, we can have a infinite-loop checker that works well enough in practice. Um, no. You have to restrict the problem space, too. For

Re: [racket] Is there a name for: (lambda (x) (x)) ?

2010-09-23 Thread Joe Marshall
On Thu, Sep 23, 2010 at 5:35 AM, Tim Brown tim.br...@cityc.co.uk wrote: Is there a standard name for the (lambda (x) (x)) in racket? In Common Lisp, the standard name for this is `funcall' -- ~jrm _ For list-related administrative tasks:

Re: [racket] What is inexactness about?

2010-09-01 Thread Joe Marshall
On Wed, Sep 1, 2010 at 6:40 AM, Stephen Bloch sbl...@adelphi.edu wrote: On Sep 1, 2010, at 9:29 AM, Matthias Felleisen wrote: The #i indicates inexactness as far as computer arithmetic is concerned, that is, what the so-called 'machine' level arithmetic supplies. And yet Scheme/Racket

Re: [racket] What is inexactness about?

2010-09-01 Thread Joe Marshall
On Wed, Sep 1, 2010 at 7:30 AM, Prabhakar Ragde plra...@uwaterloo.ca wrote: Inexact in Racket is code for IEEE double-precision floating point. And for a particular, somewhat idiosyncratic `contagion' policy. As Noel pointed out, the reason that we have floating-point is for speed. (Well, also

Re: [racket] Question about the double submit bug 'in the wild'

2010-08-20 Thread Joe Marshall
On Fri, Aug 20, 2010 at 3:19 PM, Horace Dynamite horace.dynam...@gmail.com wrote: Would this be considered bad practise by professionals not protecting their system against this? Absolutely. It is pathetic. -- ~jrm _ For list-related

Re: [racket] question about foldl implementation

2010-08-13 Thread Joe Marshall
It seems to me that the Haskell version is better. The arguments to foldl are these: (procedure accumulator list1 list2 ...) so it makes sense that the call to procedure take the arguments in the same order. That is, you end up calling (procedure accumulator (car list1) (car list2) ...)

Re: [racket] Google doesn't know from DrRacket

2010-07-02 Thread Joe Marshall
On Thu, Jul 1, 2010 at 11:56 AM, Stephen De Gabrielle stephen.degabrie...@acm.org wrote: I'm guessing there is a XML sitemap registered with google/bing/yahoo? On Jul  1, Joe Marshall wrote: No.  There should be. On Thu, Jul 1, 2010 at 10:35 PM, Eli Barzilay e...@barzilay.org wrote

Re: [racket] Google doesn't know from DrRacket

2010-07-01 Thread Joe Marshall
On Thu, Jul 1, 2010 at 11:56 AM, Stephen De Gabrielle stephen.degabrie...@acm.org wrote: I'm guessing there is a XML sitemap registered with google/bing/yahoo? No. There should be. -- ~jrm _ For list-related administrative tasks:

Re: [racket] Google doesn't know from DrRacket

2010-06-30 Thread Joe Marshall
On Tue, Jun 29, 2010 at 7:15 PM, Neil Van Dyke n...@neilvandyke.org wrote:  Someone who really wants to do this optimally will have to look up the latest SEO rules of thumb for what to do and not do on this page. It'll take a small amount of time investment (perhaps ten total hours), but you

Re: [racket] Google doesn't know from DrRacket

2010-06-30 Thread Joe Marshall
On Wed, Jun 30, 2010 at 1:50 PM, David Van Horn dvanh...@ccs.neu.edu wrote: I think a lot of people on the list would be interested if you can sketch what's involved here. It's all spelled out on http://www.google.com/webmasters/ -- ~jrm _

Re: [racket] Y-combinator perfomance

2010-06-28 Thread Joe Marshall
On Fri, Jun 25, 2010 at 11:50 AM, Matthew Flatt mfl...@cs.utah.edu wrote: Compilers can't easily see through a Y combinator, and a factor of 8 or so difference is probably typical for Lisp compilers. (I tried Ikarus and Gambit to double check, and performance was about the same as with