Questions tagged [gambit]

Questions about the Gambit-C implementation of the Scheme programming language.

Questions about the Gambit-C implementation of the Scheme programming language.

39 questions
1
vote
1 answer

CMake with gambit scheme

Are there open-source projects out there written in Gambit Scheme that use CMake as the build system? I'd love to have such a CMakeLists.cmake file to use as a reference.
SuperElectric
  • 17,548
  • 10
  • 52
  • 69
1
vote
1 answer

Pipe tests/traces from Gambit Scheme Interpreter to file

If I procedure, example: (define square (lambda (n) (* n n))) and I test it using (square 5) for example, how do I pipe this result from the Gambit Scheme interpreter to a text file?
1
vote
1 answer

Gambit scheme incorrect calculation for numbers with decimals

i'm using gambit-c intepreter to evaluate scheme arithmetic operations, but it's results are bit off. for example i execute (+ 23 20.01) and it gives me 43.010000000000005, instead of 43.01. This only occurs if i use numbers with 2 decimal…
1
vote
3 answers

Difference between define and define*

Forgive my ignorance, but what is the difference between these two: (define blah) (define* blah) ? Unfortunately Google ignores the asterisks character.
Matthew
  • 11,203
  • 9
  • 38
  • 44
1
vote
1 answer

Number of arguments in function

Let's say I have a structure "phonenumber". (define-structure phonenumber country area prefix line) This will give me a function (make-phonenumber). I would like to get the number of arguments that make-phonenumber takes. The answer is 4.
Matthew
  • 11,203
  • 9
  • 38
  • 44
0
votes
0 answers

GUI buttons disappearing on repositioning

I am trying to use Lambdanative, a Scheme based language, to create small gui application. As a test, I tried to readjust the buttons on their demo calculator app. The original keypad arrangement is as follows: (define keypad `(( ( (#\A "AC") (#\M…
rnso
  • 23,686
  • 25
  • 112
  • 234
0
votes
0 answers

Linking a CMakeProject and a makefile project

I’ve got a project that needs to use the Nash Equilibrium solving capabilities of Gambit-Project This is a performance critical application, so I have to somehow link my codebase with Gambit. My actual use case sounds simple to me. There is one…
0
votes
0 answers

Installing python module gambit on Windows: problem with MinGW and autotools

I'm trying to install the Python module "Gambit" on Windows. From the documentation, it seems like I need to download Gambit install MinGW get the correct packages, so that the autotool commands work build Gambit from source then build the Python…
fT3g0
  • 17
  • 3
0
votes
2 answers

how to multiply the elements in two lists and save the result in a third list to return in scheme?

I want to multiply the elements of 2 lists in scheme and save the result of each multiplication in a third list that is returned by a function and.. the lists will always have the same size The idea in python is this def multi_elements( l1, l2): …
Dieku
  • 3
  • 2
0
votes
1 answer

gambit scheme - import functions from another file into current scope

I have the function run in file run.scm. I want to make run available in test.scm. How would I go about doing this in Gambit scheme? I've already tried (import "run.scm"), but it just complained about import being an unbound variable.
Kied Llaentenn
  • 133
  • 1
  • 11
0
votes
1 answer

Gambit Scheme FFI

I am trying to use ffi to call opencv's cvReleaseCapture, void cvReleaseCapture( CvCapture** capture ); http://www.ai.rug.nl/vakinformatie/pas/content/Highgui/opencvref_highgui.htm I have tried, (define release-capture (c-lambda ((pointer (pointer…
Hamza Yerlikaya
  • 49,047
  • 44
  • 147
  • 241
0
votes
0 answers

GKScore unable to update Game Center

iOS 12.x Swift 4.2 Trying to update the GKScore using GameKit, but it failed with the error message, "error failed to update nil". The record I am trying to write as an authenticated user looks like this. I don't see any nil values. ScoreReporter…
user3069232
  • 8,587
  • 7
  • 46
  • 87
0
votes
2 answers

how to run gambit-c

It's late and I should go to bed and maybe that's why I can't figure this out. I'm on a fedora-13 machine and I just ran yum install gambit-c I installed it because I want to follow along in a schemed text book. but now that it's installed, how do…
Ramy
  • 20,541
  • 41
  • 103
  • 153
0
votes
1 answer

Lambdanative can compile for OSX but not iOS

I'm running Sierra with XCode 8.3 including command line tools. I can use Gambit to compile to OSX native code. I can use lambdanative to compile the test Calculator app to OSX but when I try to configure and then compile for iOS I get the following…
querist
  • 614
  • 3
  • 11
0
votes
2 answers

How to make executable File using Gambit

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'…
John
  • 1
  • 3