Search Results

Search found 6 results on 1 pages for 'drracket'.

Page 1/1 | 1 

  • How I install drRacket?

    - by aseed
    i install drRacket in ubuntu. downloaded the source file from http://pre.racket-lang.org/installers/ and typed sudo ./racket-5.2.1-bin-i386-linux-ubuntu-karmic.sh after making it exe file so the file is in the usr/racket/bin/drracket and i want to run it from command line without going to its directory i cant make the drracket to run the .rkt files by the "open with" how can i make this two things ???

    Read the article

  • DrRacket icon doesnt work?

    - by Laurie
    I installed DrRacket from the Ubuntu Software Center. All went well and an icon appeared however nothing happened when I clicked the icon so I removed it. Then went to the Developer website and downloaded full-5.3.0.21-bin-x86_64-linux-debian-squeeze.sh. I installed this via Terminal with sudo apt-get install racket. The DrRacket icon came back in Dash Home but again clicking it nothing appears to happen. How do I start DrRacket? I am running Ubuntu 12.04 LTS dual boot on a 64 bit Dell

    Read the article

  • True / false evaluation doesn't work as expected in Scheme

    - by ron
    I'm trying to compare two booleans : (if (equal? #f (string->number "123b")) "not a number" "indeed a number") When I run this in the command line of DrRacket I get "not a number" , however , when I put that piece of code in my larger code , the function doesn't return that string ("not a number") , here's the code : (define (testing x y z) (define badInput "ERROR") (if (equal? #f (string->number "123b")) "not a number" "indeed a number") (display x)) And from command line : (testing "123" 1 2) displays : 123 Why ? Furthermore , how can I return a value , whenever I choose ? Here is my "real" problem : I want to do some input check to the input of the user , but the thing is , that I want to return the error message if I need , before the code is executed , because if won't - then I would run the algorithm of my code for some incorrect input : (define (convert originalNumber s_oldBase s_newBase) (define badInput "ERROR") ; Input check - if one of the inputs is not a number then return ERROR (if (equal? #f (string->number originalNumber)) badInput) (if (equal? #f (string->number s_oldBase)) badInput) (if (equal? #f (string->number s_newBase)) badInput) (define oldBase (string->number s_oldBase)) (define newBase (string->number s_newBase)) (define outDecimal (convertIntoDecimal originalNumber oldBase)) (define result "") ; holds the new number (define remainder 0) ; remainder for each iteration (define whole 0) ; the whole number after dividing (define temp 0) (do() ((= outDecimal 0)) ; stop when the decimal value reaches 0 (set! whole (quotient outDecimal newBase)) ; calc the whole number (set! temp (* whole newBase)) (set! remainder (- outDecimal temp)) ; calc the remainder (set! result (appending result remainder)) ; append the result (set! outDecimal (+ whole 0)) ; set outDecimal = whole ) ; end of do (if (> 1 0) (string->number (list->string(reverse (string->list result))))) ) ;end of method This code won't work since it uses another method that I didn't attach to the post (but it's irrelevant to the problem . Please take a look at those three IF-s ... I want to return "ERROR" if the user put some incorrect value , for example (convert "23asb4" "b5" "9") Thanks

    Read the article

  • Scheme - What is wrong with my attempt to extend this declaration?

    - by CppLearner
    This is a homework question. Question My attempt (the whole file): http://pastebin.com/vt3Q3dqs If you search let var = exp1 in body, that's the function I need to extend according to the question. When I test the sample code above, I get an error apply-env: No binding for y (eval "let x = 30 in let x = -(x,1) y = -(x,2) in -(x,y)") ; The following is execution log The-next-two-lines-shows-var-and-exp1 (x) (#(struct:const-exp 30)) diff-exp #(struct:var-exp x) #(struct:const-exp 1) diff-exp #(struct:var-exp x) #(struct:const-exp 2) The-next-two-lines-shows-var-and-exp1 (x y) (#(struct:diff-exp #(struct:var-exp x) #(struct:const-exp 1)) #(struct:diff-exp #(struct:var-exp x) #(struct:const-exp 2))) diff-exp #(struct:var-exp x) #(struct:var-exp y) As you can see, when the interperter reads the last line -(x,y) it complains because there is no binding. What did I do wrong? I know this is really long language, but if anyone can kindly lead me to the right direction would be really really nice. Thank you!

    Read the article

  • scheme vs common lisp: war stories

    - by SuperElectric
    There are no shortage of vague "Scheme vs Common Lisp" questions on StackOverflow, so I want to make this one more focused. The question is for people who have coded in both languages: While coding in Scheme, what specific elements of your Common Lisp coding experience did you miss most? Or, inversely, while coding in Common Lisp, what did you miss from coding in Scheme? I don't necessarily mean just language features. The following are all valid things to miss, as far as the question is concerned: Specific libraries. Specific features of development environments like SLIME, DrRacket, etc. Features of particular implementations, like Gambit's ability to write blocks of C code directly into your Scheme source. And of course, language features. Examples of the sort of answers I'm hoping for: "I was trying to implement X in Common Lisp, and if I had Scheme's first-class continuations, I totally would've just done Y, but instead I had to do Z, which was more of a pain." "Scripting the build process in Scheme project, got increasingly painful as my source tree grew and I linked in more and more C libraries. For my next project, I moved back to Common Lisp." "I have a large existing C++ codebase, and for me, being able to embed C++ calls directly in my Gambit Scheme code was totally worth any shortcomings that Scheme may have vs Common Lisp, even including lack of SWIG support." So, I'm hoping for war stories, rather than general sentiments like "Scheme is a simpler language" etc.

    Read the article

  • Scheme vs Common Lisp: war stories

    - by SuperElectric
    There are no shortage of vague "Scheme vs Common Lisp" questions on both StackOverflow and on this site, so I want to make this one more focused. The question is for people who have coded in both languages: While coding in Scheme, what specific elements of your Common Lisp coding experience did you miss most? Or, inversely, while coding in Common Lisp, what did you miss from coding in Scheme? I don't necessarily mean just language features. The following are all valid things to miss, as far as the question is concerned: Specific libraries. Specific features of development environments like SLIME, DrRacket, etc. Features of particular implementations, like Gambit's ability to write blocks of C code directly into your Scheme source. And of course, language features. Examples of the sort of answers I'm hoping for: "I was trying to implement X in Common Lisp, and if I had Scheme's first-class continuations, I totally would've just done Y, but instead I had to do Z, which was more of a pain." "Scripting the build process in my Scheme project got increasingly painful as my source tree grew and I linked in more and more C libraries. For my next project, I moved back to Common Lisp." "I have a large existing C++ codebase, and for me, being able to embed C++ calls directly in my Gambit Scheme code was totally worth any shortcomings that Scheme may have vs Common Lisp, even including lack of SWIG support." So, I'm hoping for war stories, rather than general sentiments like "Scheme is a simpler language" etc.

    Read the article

1