schemers | Let 's build a scheme interpreter in Rust | Interpreter library
kandi X-RAY | schemers Summary
kandi X-RAY | schemers Summary
Let's write a Scheme interpreter and learn some Rust along the way!.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of schemers
schemers Key Features
schemers Examples and Code Snippets
Community Discussions
Trending Discussions on schemers
QUESTION
Suppose I have a string containing a date: "11/10/2020"
(mm/dd/yyyy). Is there a way to parse this into a date data type in Racket? Scheme has SRFI 19 (Time Data Types and Procedures) which defines string->date
for parsing date strings. Is there something similar in Racket?
ANSWER
Answered 2020-Nov-09 at 23:36There is something similar. It's ... SRFI 19:
QUESTION
I would like to implement a functional stack in scheme. This is my attempt:
...ANSWER
Answered 2020-Oct-23 at 05:12Your goals are contradictory. If s
is a stack, and your operations purely functional, then (s 'push 1)
must return the same thing every time it is called. To capture the notion of change, you must use a different s
each time. That's how your functional stack works: it gives you back a new stack, and you must compose function calls with it.
QUESTION
I'm new to Chez, and just looking for some clarity given the various maintained and unmaintained repos existing.
Is there a single commonly preferred source repo to obtain the R6RS SRFI libraries (specifically for Chez Scheme)?
I know about https://srfi.schemers.org/ which is good for searching for individual SRFI documentation, and has a tgz of all documentation and some scheme code, but there is no version or release info on the tgz (although the timestamps suggest it's fairly up to date https://srfi.schemers.org/srfi.tgz).
For R6RS I can find most of the SRFIs as separate repos under the following repo, which isn't very practical to grab all the code: https://github.com/scheme-requests-for-implementation
And then a variety of other repos, eg:
https://github.com/arcfide/chez-srfi
https://github.com/ovenpasta/thunderchez
https://github.com/dharmatech/surfage
https://bazaar.launchpad.net/~scheme-libraries-team/scheme-libraries/srfi/files
The only ones with recent activity, and luckily also seem to be Chez-focused, seem to be chez-srfi and thunderchez.
chez-srfi seems the most recently active, and once I worked out the requirement to run link-dirs.chezscheme.sps
and then softlink the chez-srfi
directory to srfi
it seems to work using the standard import references - (import (srfi :N lib))
.
That said I've had similar success using (import (srfi sN lib))
using Thunderchez.
I'm completely agnostic over which repo I use, providing it's easy to use and actively kept up to date. Is there a clear preferred choice providing this, or is choice based more cosmetically on personal opinion (in which case I'll form my own rather ask it on here!).
...ANSWER
Answered 2020-May-16 at 17:20The honest answer is probably "no" - there is not a single version of srfi preferred by the community.
But to (kinda) answer my own question, whilst I can't say it's a defacto standard yet, Akku is a package manager and virtual environment management system of Scheme that is miles ahead of any of the alternatives, and actively developed. It's not an individual implementation of srfi, but is a way to install various Scheme packages you need to use through a single interface.
It's not quite venv and pip - but it's getting there. I'm amazed this isn't talked about more, I only stumbled upon it some time after my initial search for a tool like this.
You get a single interface to pull packages for both R6RS and R7RS, and a range of Scheme implementations.
There is also Snow, which is currently only supporting R7RS: http://snow-fort.org/
But as Akku mirrors Snow as well as providing R6RS support, it is more comprehensive.
To answer the specifics of the original example - Akku installs chez-srfi by default (on a Chez Scheme system at least) on creation of a new project, but also offers thunderchez as a package. Whether that indicates a preference by the Akku developer's, I'll leave up to the reader to decide.
The original question was about a single defacto srfi implementation for Chez, rather than a more general package manager. In hindsight this misses the point a bit, simply because I didn't think a single package manager (beyond srfi) was a remote possibility.
So for my use at least - Akku, not only provides various implementations of srfi, but also offers a host of other packages, and largely answers my question.
QUESTION
I have one more questions about Hygienic macros in Scheme, consider example from R5RS
...ANSWER
Answered 2020-Apr-13 at 21:42Yes. It is very non lispy that we have a modifier ...
that changes the meaning of element in front. eg. something ...
is basically similar to . something
except it works with structures like this:
QUESTION
I'm reading R5RS spec and it shows this:
...ANSWER
Answered 2020-Mar-27 at 15:19This is Chibi's implementation:
remainder
: https://github.com/ashinn/chibi-scheme/blob/master/bignum.c#L527modulo
: https://github.com/ashinn/chibi-scheme/blob/master/lib/init-7.scm#L1398
The author is one of the authors of R7RS.
QUESTION
I'm reading the spec for R5RS and it have this two examples for eqv?
ANSWER
Answered 2020-Mar-22 at 11:43This is a remarkably subtle example. In the first example:
QUESTION
I have this file named myprog.scm
:
ANSWER
Answered 2020-Feb-13 at 03:42Why did the authors of
plt-r5rs
not define theerror
procedure?
It appears that The Revised5 Report on the Algorithmic Language Scheme does not define a procedure named error
. The initial environment created by plt-r5rs
contains only the values and syntactic forms defined in the report (except for a handful of implementation-specific forms listed in the docs, like #%require
, which are not legal identifiers according to R5RS).
How can I define or import an
error
procedure so that my program can run? Perhaps there's a way to import SRFI-23 Error reporting mechanism?
As you probably know, R5RS also does not define a module system, so there is no portable way to import anything. For plt-r5rs
specifically, this version of your program works:
QUESTION
I'm reading (looking at) the Guile Reference Manual but I do not understand some notational conventions specified by SRFI.
Note that the Guile Reference Manual seems to follow the structure of the SRFI documents. I browsed the source code on GuixSD to find some use cases without luck.
For example, I do not understand the meaning of kons
and knil
.
ANSWER
Answered 2019-Aug-10 at 16:16This notation for optional arguments is not only used here. It is also used in Unix program usage.
QUESTION
I am trying to declare a hash table. Based on this SRFI I believe that the form (define x (make-table))
ought to result in the correct behavior; however, I am getting the following error.
ANSWER
Answered 2018-Nov-19 at 10:58CHICKEN does not ship with SRFI 90, and as far as I can tell so far nobody has made an egg for it, either. An earlier and more commonly used hash table library, SRFI-69, is part of core, though. It is also not available by default, you'll need to use it like so:
QUESTION
I'm working on Movie app for practice and I'm stuck on parsing JSON into Array. I'm using Alamofire for HTTP request and Unboxer for deserializing JSON into Object.
I'm getting JSON response in this form.
...ANSWER
Answered 2018-Aug-08 at 02:00I think you are using array of dictionary for your response in this line -
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install schemers
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page