gambit

How to make executable File using Gambit

孤人 提交于 2021-02-08 09:55:56
问题 I wrote this Scheme source file on notepad. I have gambit scheme installed. (define hello-world (lambda () (begin (write ‘Hello-World) (newline) (hello-world)))) I use windows command line. i type in 'gsc hello.scm' in the command line. It spits out a file on my desktop called "hello.o2". I want to see "Hello-World" pop up on my command line. For example, when I compile stuff in c++ it gives me a file called a.exe and I am able to observe it on the command line. how can I do this with the

Is there a Haskell/ML-like compiler to C?

寵の児 提交于 2019-12-20 10:21:04
问题 People have written games for the iPhone in Scheme. Because (some) Scheme-compilers compile down to C, it was easy to mix with Objective-C and integrate with XCode. I am aware of patches for Haskell and OCaml compilers to enable ARM/iOS-backends. But those appear unofficial and experimental/unstable. I prefer a static haskell/ML-type type-system over Scheme's dynamic typing. Is there a stable ML/SML/Haskell compiler which generates C-code so that it can be used in a similar way as Scheme

Writing a scheme function

戏子无情 提交于 2019-12-12 04:43:39
问题 How do I write a function that takes both a scoring function (which I've written already) and a list of pairs of strings as input (which I'm confused on how to write), and returns a modified list of pairs of strings, where the returned list should contain all the optimal string pairs from the input, scored according to the input function. Example input: '( ("hello" "b_low") ("hello_" "b_l_ow") ("hello" "_blow") ("hello" "blow") ("h_e_llo" "bl_o__w") ) Example output: ( ("hello" "b_low") (

Is there a Haskell/ML-like compiler to C?

无人久伴 提交于 2019-12-02 20:37:48
People have written games for the iPhone in Scheme. Because (some) Scheme-compilers compile down to C, it was easy to mix with Objective-C and integrate with XCode. I am aware of patches for Haskell and OCaml compilers to enable ARM/iOS-backends. But those appear unofficial and experimental/unstable. I prefer a static haskell/ML-type type-system over Scheme's dynamic typing. Is there a stable ML/SML/Haskell compiler which generates C-code so that it can be used in a similar way as Scheme/Gambit-C? I can't help with ML, but have you looked at JHC ? JHC is a whole-program optimizing Haskell