Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Scheme runtime

Name: Anonymous 2007-09-09 11:10 ID:kO6U4+Hg

Which Scheme implementation allows me to check how long a procedure has been running? SICP mentions something about (runtime), but no resource on MIT Scheme says anything.

Name: Anonymous 2007-09-09 11:11 ID:Heaven

Just skip that exercise. That's what I did.

Name: Anonymous 2007-09-09 11:13 ID:kO6U4+Hg

>>2
That's what I did as well, I'm just curious.

Name: Anonymous 2007-09-09 11:14 ID:Heaven

>>3
That's okay. Let's wait for the answer, then.

Name: Anonymous 2007-09-09 11:31 ID:Heaven

sage

Name: Anonymous 2007-09-09 12:08 ID:Sm6TUf3C

(time ...)

Name: Anonymous 2007-09-09 12:09 ID:ahmd98v0

You guys are such losers.

Name: Anonymous 2007-09-09 12:19 ID:sNVM1mIG

How long a procedure has been running?  Sorry, I am a purely functional programmer -- I do not understand the concept of runtime.

Name: Anonymous 2007-09-09 12:22 ID:nzINk6/g

I don't know. maybe ask for the time before, and for the time after? something like, supossing a function (time) gets you the actual time, and that you can substract both times
(define (time-run fun)
   (lambda rest
       (let ((init (time)))
           (let ((val (apply fun rest)))
              (print (- (time) init))
               val))))

so time-run gets a function and returns a function that does the same but also it prints the time the function has been running.
what do u think?

Name: Anonymous 2007-09-09 12:38 ID:Heaven

I think that you can't ask for time in Scheme.

Name: Anonymous 2007-09-09 14:54 ID:Heaven

>>1
Forget it. It's NP-complete.

Name: Anonymous 2007-09-09 17:03 ID:Kx1fwqyB

>>10
You most surely can in MIT Scheme.

Name: Anonymous 2007-09-09 18:31 ID:Heaven

>>10
Forget it. It's NP-complete.

Name: Anonymous 2007-09-09 23:23 ID:slJUGA8d

>>11,13
P/NP are just implementation details.

Name: Anonymous 2007-09-10 1:44 ID:jYNyGOc9

>>14
Forget it. It's NP-complete.

Name: Anonymous 2007-09-10 2:52 ID:w/qyStY6

>>15
Forget it. It's BBCode-complete.

Name: Anonymous 2007-09-10 7:01 ID:VsAi3Dsd

PLT Scheme

Name: Anonymous 2009-06-04 11:26

I remember posting this thread. I still don't know how to do this. I still know only LISP.

Don't change these.
Name: Email:
Entire Thread Thread List