How to inspect/export/serialize a (guile) Scheme environment
I'd like to export or replicate a scheme environment in another guile process. The algorithm I'm imagining would do something like this to serialize:
(map (lambda (var val) (display (quasiquote (define ,var ,val))
And then I'd read/eval that on the other end.
However, while there are functions that return the current environment, they are in some internal format that I can't just
map across. How can I "walk" the environment as the above? Alternatively, how else can I replicate an environment into another process?
The problem is the following and it found in http://www.cs.indiana.edu/classes/b551-leak/scheme_practice.html . Problem definition: Write a function cxr that is a generalization of the car/cdr operat
There exists an elecomagnetic simulator called meep which provides as a front end in the form of a guile interpreter. The simulator consists of a bunch of scheme macros. I am trying to figure out what
How can i evaluate the performance of a Scheme (R6RS) pieces of code? I need some procedure like:(time (oper args)) or (time oper args). I red the discussion here but it does not seems to work for me.
I'm currently working on a set of utilities, written in Chicken Scheme, and this is the first time I've tried writing a multi-file based program (or set of programs) in Chicken Scheme, and I'm having
Does anybody know how Eclipse CDT populate the path variable when the origin is BUILD SYSTEM? I thought through the global environment, but my system path is set to visual studio 2010 and somehow cd
A couple of days ago I resetted Visual Studio settings. All keyboard shortcuts were assigned to their default values. I applied IntelliJ IDEA scheme back but it seems like some Visual Studio shortcuts
I have a theoretical database scheme that stores information akin to Google Maps. It gives you directions how to get from one location to another, but it does more than just driving, it tells you how
I normally use MIT/GNU Scheme, but found some Guile code in github (guile-2d). (define main-menu (make-scene Main Menu #:init create-menu #:enter menu-enter #:exit menu-exit #:draw draw-menu #:updat
I want to build URI (or URL scheme) support in my app. I do a LSSetDefaultHandlerForURLScheme() in my + (void)initialize and I setted the specific URL schemes also in my info.plist. So I have URL sche
I work on windows and MacOS, I would like to get environment variables. How to get system environment variables using boost library? Are there equivalent to System.Environment.GetEnvironmentVariable()
I need to understand Continuations in Scheme for my upcoming exams and I have no idea about continuations at all. Can anyone please suggest me sources of how to go about learning continuations? Regard
By primitive expressions, I mean + - * / sqrt, unless there are others that I am missing. I'm wondering how to write a Scheme expression that finds the 6th root using only these functions. I know that
I'm currently playing a bit around with scheme, and I've been stuck for quite a while trying to figure out how to implement a test, that checks if any element in 'xs' is also stored in 'l'. That is th
MIT Scheme's (load ...) procedure apparently takes in an environment as a parameter. Is there any way I could clone the current environment and pass it there, so that I can isolate the file's enviro
I am trying to implement a game theory algorithm by using scheme. I wrote a code piece which is named tit for two tat. Here is the code: (define (tit-for-two-tat my-history other-history) (cond ((empt
I have on my local PC installed WAMP environment (using WampServer OS). Now I would need to change one script from working with MySQL to MSSQL. I have no idea at all how to proceed, where to download
I am trying to make a list in Scheme like this: (list 'quote 'a) and I expect the output to be (quote a) but the interpreter excutes the quote and the output is: 'a How can I write the code to get the
I'm new to Scheme, have been using MIT Scheme for sometime now. I'm trying to understand how to implement popular graph algorithms like the shortest path algorithms, BFS, DFS. Are there any tutorials
How can I specify test environment for specific Spock test other than default one?
I notice that almost all scheme functions can only return one list as output. In the following, I would like to return multiple values of all the adjacent nodes of neighbors. (define (neighbors l w)
I am learning my way around Scheme, and I am especially interested in how the language is constructed. I'm trying to find a nice description of the core syntax for a Scheme implementation. I don't kno
How can I create and load a color scheme on my HTML site using CSS? I have base.css green.css and orange.css. Now, when site is loaded default color scheme is green, but how to change it to orange.css
I'm using the IMIS package (Incremental Mixture Importance Sampling) to estimate parameters. Unfortunately, it's written to look for functions likelihood, sample.prior, and prior in the environment it
How to allow failures for builds having specific environment variable value? For example: .travis.yml: env: - TEST_GROUP=Smoke - TEST_GROUP=other # How to allow failures for this variable? matrix: all
I have been giving a language in Scheme. (define-datatype statement statement? (add1 (V symbol?)) (sub1 (V symbol?)) (skip (V symbol?)) (if-goto (V symbol?) (l symbol?))) (define-datatype instruction
I think I got what a continuations is (in general), but I can't understand how it is used in Scheme. Consider this example (from wikipedia call/cc) (define (f return) (return 2) 3) (display (call/cc f
how can I write a function to take the last element of the list?
I'm trying to solve the n-queens problem in scheme. I was told by my professor to use a single vector as the chess board where the ith element of the vector represents the ith column of the board. The
What is proper way to extract and remove scheme name and :// from a NSURL? For example: note://Hello -> @Hello calc://3+4/5 -> @3+4/5 so NSString *scheme = @note://; NSString *path = @H
How do I set environment variables from Java? I see that I can do this for subprocesses using ProcessBuilder. I have several subprocesses to start, though, so I'd rather modify the current process's e
How can I write a scheme program that makes regular sums. In scheme 2+2 is written (+ 2 2). The program I have to make should make (2 + 2) possible is scheme.
I can easily read an environment variable using System.Environment.getEnv. However, System.Environment does not have any corresponding setEnv function (as far as I could tell). How do I set an environ
Currently, I have the following alist: (define globals '((objects test))) The name of its variable is stored in another alist: (define test '((loc globals) (other properties))) I would like to easil
How can I use arrays in Scheme? In particular, I'm attempting to implement a recursive fibonacci procedure using memoization. Do arrays even exist in Scheme? If not, how can I implement memoization?
I am shifting from DrScheme to Emacs to edit my PLT Scheme files. Can you teach me how to use steppers or debuggers in Emacs? Thanks.
If 2 other app register same url scheme, how iOS handle this?
I'm fiddling another time with a (should be easy) task. compound interest... (formula is known) Scheme... (For one single years everything works flawlessy) Problem: Accumulator needed... My program ha
I've just got into PHP world and I have this problem. I want to setup variables for different environment for example, development, CI, staging and production. The example of the variables would be, T
I cant seem to find this anywhere..a lot of times I run commands with an environment variable set like: export BLA=foo && ./somebinary how do i do this in eshell? I think the command is calle
Does anyone know how i could use sublime text 2 with scheme. I've heard ST2 and I want to try it out? right now I'm learning scheme. I have the scheme interpreter installed - I can go to the terminal
In Scheme, how can I make use of the define/lambda shorthand for nested lambda expressions within my define? For example given the following procedure... (define add (lambda (num1 num2) (+ num1 num2))
Is there a way to get information about the current Rack environment in Rake? For example, how can I tell whether Rack is running in development or production mode? I understand that Rake is not Rack-
I am attempting to evaluate a literal as an expression in Scheme (using Guile currently). Example: (define x '(+ 6 6)) (define y (evaluate-literal x)) ; Expected result: y = 12 (Here, evaluate-litera
'(a 'b) gives out the answer (a 'b). How does this work when there is no binding for a (which is unquoted).
How can I achieve below in Scheme REPL? Create a variable name from a string. =>(define (string->variable-name foo) 12) =>foo 12 =>(+ foo 8) 20 In Common Lisp, this should be => (
I am new to Scala & Play would like to know if there is a way I can check URL scheme (http/https) using request provided by Play api ? I tried some properties mentioned in the document they did no
Let's say I want to use a WebKitWebView in GTK to display some static HTML pages. These pages use a custom URL scheme, let's call it custom://. This scheme represents a local file whose location is no
Is there a way to check if a variable exists in Scheme? Even doing things like (if variable) or (null? variable) cause errors because the variable is not defined. Is there some function that returns w
Background I need to solve polynomials in multiple variables using Horner's scheme in Fortran90/95. The main reason for doing this is the increased efficiency and accuracy that occurs when using Horne
I need to use Scheme for a class project. Is it better to use the compiler or an interpreter? I have seen posts recommending DrScheme, but those are 5 year old discussions, and it is now called Racket