100 Topics
Hi everyone, Back in April 2011 on the DaniWeb forums I posted a Python 3 adaptation of Peter Norvig’s legendary *Lispy* interpreter. My fascination with Lisp originally sparked all the way back in 1981 from a Finnish magazine called *Prosessori*, which ran articles on symbolic computing right during the Zilog …
**below is the problem i am given, after this i explain where i am at so far and the code i have created, **Write the following functions in Scheme: 1.a "digitinc4" -takes as input a 4-digit integer, and returns another 4-digit integer constructed of the original input integer's digits, each …
i am trying to calculate the minimum difference between the sum of elements of two splits formed from a list. this is how the function should work. the function has to take a list of possitive integers(duplicates are possible) and split it into two sub lists. now it has to …
I have been programming in lisp for a while, not as a main language. But i've gotten pretty decent at it. But I was wondering about if it was a legacy language or not.
I am currently making out the plans for the milestones for the rest of this year in my long-term projects (Thelema, Assiah, and Alfheim). I was hoping that someone would be able to review these plans and help me determine which are feasible in the next four months. The overall …
**note:** This was also posted to the [comp.lang.scheme](https://groups.google.com/forum/#!forum/comp.lang.scheme) earlier today. I normally wouldn't cross-post, but after I noticed the extremely low traffic on the newsgroup, I decided to try a more active, if less specialized, forum. As part of a larger project, I am writing a macro that defines a …
Hello fellow forum members, I am struggling to understand what I am supposed to be doing with ACL2. So I am given these axioms that define a function called up, and I just need to translate these into ACL2. -- axioms for predicate for increasing lists of numbers (up nil) …
Hi guys, I am currently learning this language and have 2 simple questions. 1: What is the equivalent of "break" and "continue" statement in Racket?? I can't find it anywhere on the site's documentation nor online on other sites. 2: Is there a way to create new variable using a …
I am currently working on a new language design in the Lisp family, which I am calling 'Thelema'. It is intended to be a multi-paradigm language which is related loosely to Scheme and, to a lesser extent, Common Lisp, but with modern concepts such as package management, support for object …
I have built this function which calls a couple other functions to get the oprator and numbers for an arithmetic operation but I get the error `function call: expected a function after the open parenthesis, but received '+`. normaly you invoke addition as (+ 5 6) and multiplication as (\* …
I seriously need help with this LISP Programming. There are 8 questions but I've done the first 4 questions. Right now, I'm totally clueless with the rest of the remaining questions. Please help. 5. Give iterative definition of a function (symbol-count-iter) that takes a list and a symbol a and …
Hello, I need help finishing up an unzip function which takes a zipped list and returns a list of two lists. The result I want is as follows. . . (unzip '((a b)(1 2))) ((a 1)(b 2)) (unzip '((a 1)(b 2)(c 3))) ((a b c)(1 2 3)) (unzip '(unzip '())) …
I am trying to make a program that will take a list of words from a .txt file and add the alphabet to the end of each word. the code i have just makes it read and re-read the first line. since each list will be different i cant just …
Please help me with a code in Scheme basically what i need is as below A function (append) which takes an atom and a list and adds the element to the end of the list. Example: (append 'A '(B C D)) -> (B C D A) Any help will be …
I posted one Scheme code to Legacy Languages, and noticed that the formating for Lisp style quoting (single single quote or back quote before) does not function. I know you have more urgent things to consider, but you could put it in your list, Dani.
Hey all; I've been reading SICP and been wanting to write code from the book and the solutions to exercises and execute that code. I find MIT-GNU Scheme, the recommended interpreter, to be very confusing and very slow or impossible to use. I can't even get some of the basic …
if bit? is a procedure that takes an item and returns #t if the items is 1 or 0 and #f otherwise (define bit? (lambda (item) (if (equal? item 0) #t (if (equal? item 1) #t #f)))) how can i use bits? to define roll-out that takes a list of …
Hello i managed to call my C# DLL in Lisp with (command "Program.dll") and I m able to call Lisp from C# with sendstring ... What I need is a Lisp Function that called from C# which gives its results (picked Objects) back to C# Has anybody an idea ? …
I'm learning scheme and having a hard time with the define-syntax part. The tutorials online that I have found are not very helpful, so any help you guys can offer would be greatly appreciated. Basically I need to be able to enter (foreach x : 1 do (display x)) and …
Hello all and Happy Thanksgiving, I am converting a program from Lisp into C#. Everything is going well for most of the program but there are 2 functions where I don't really understand what is going on because I am not very well versed in Lisp. I originally submitted the …
I don't know if this is the right place for a post about Scheme, but i was wondering if anyone knew if there are loops and if statements in Scheme? (I am very new to Scheme, i know there are 'cond' statements, but i don't know if there are if's, …
I am a Computer Science student. This semester I am taking an Artificial Intelligence course in which a large number of our labs will be programming with Lisp. Here on DaniWeb under Software Development I did not see a category for Lisp. I was wondering if anybody out there knew …
Hi! I'm just working on a small problem in Scheme. I am passing to the function a list, such as '(1 2 3), and I need the function to return seperate lists, such as '(1)'(1 2)'(1 2 3). I have already experiemented with many different appends and cons, and I …
Hi, I have a method that returns a list of images. I will say, (get_images str) and (list-ref item num) simply displays num'th element in the list. From the list, I need to print all of the images recursively. And I noticed DrScheme is not smart enough to perform more …
have an implementation of BFS I got elsewhere and modified slightly, but I am having problems with its input. It takes a graph, and will take it as '((a b c) (b c) (c d)) But my input I am giving it is a weighted graph... I know it's not …
Hey, so I'm working on the game set-cubed in Scheme (for those who know the game). Currently, i have a csv file of all the possible dice with dice faces. I'm trying to read this into scheme, and managed to do that with a csvreadermaker. Currently, i can get it …
Hello everyone and Merry Christmas. The reason I am opening this thread is that I am required to write a polynomial calculator in Common LISP as part of a Course Work. As I am newbie to LISP(s) I am asking you if anyone can help me with it . The …
(defun pCount (number) (let (ans 0) (do ((iterator 1 (+ iterator 2))) ((equal iterator number)) (if (equal (0) (rem iterator 3))) (+ ans iterator) (if (equal (0) (rem iterator 5))) (+ ans iterator) (+ ans 0)))) The object is to find the sum of all numbers divisible by 3 or …
So I need to write a procedure to organize a list. Since its hard to explain here is the example: List: ((72 75 0) (0 0 10) (255 255 255) (0 10 10) (0 10 8)(50 100 255)) Return: ((0 0 10) (0 10 8) (0 10 10) (50 100 …
[COLOR=#000000]Write lisp for two functions that manipulate binary search trees. The tree will now be a nested list structure. Inserting 4, 2, 5, 1, 6, 3 should create the list: (4 (2 (1 () ()) (3 () ())) (5 () (6 () ())))[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]1.Write a lisp …
[B]Please help... I need an algorithm for generate sudokus. i searched in the web, but there´s only algorithms in action scrip, java, c, c# or c++, i need it in scheme... why is so difficult find help for scheme expressions ´n algorithms?? if there someone who can give me a …
First off, I am new to this forum so please forgive me for any traditions that you all usually keep that I haven't kept. Currently, I am a java programmer, but I am recently trying to learn scheme for a project. In terms of java swing, can someone explain to …
Merry Christmas everyone! I'm using Lisp in a Box (emacs + GC Lisp) And i tried making a function which takes a number as argument, adds 1 to it if it's negative, and substracts 1 from it if it's positive. (look) [CODE=LISP] (defun enlarge(x) (if (< x 0) (- x …
how would you do that? Language similar to LISP I don't think you can use cons twice. really stuck. maybe (define a '('()))
I can write the recursion version correctly need help with writing a do loop in DrScheme. After the do loop the variable x is sent to car L intially and then is updated to first element of everything but first element in list. [CODE] (define (sumiteration L) (do ((x (car …
I have to create a scheme parser and unparser. My teacher is checking this assigment by seeing if (unparse-exp (parse-exp 'expression)) returns expression and parse-exp returns an error when called with bad input. There is no defined format for what is returned from parse-exp just as long uparse can works …
Here's my code. [CODE] (define L ()) (define (union L1 L2) ;continue until one list is empty (do() ((or (null? L1) (null? L2))) (cond ((<(car L1)(car L2)) (attach(car L1)(cdr L1)L2)) ((eq?(car L1)(car L2)) (attach(car L1)(cdr L1)(cdr L2))) (else(>(car L1)(car L2)) (attach(car L2)L1(cdr L2))) ) ) ;after which you continue to …
Since no one has posted in this forum as of yet, I decided to tap out a quick scheme. This program, when run through the Mr Ed part of dr scheme available from [url]www.drscheme.org[/url] , will cause a window to pop up with text and a button. By clicking the …
Hey guys. Im new to these forums and was hoping i could get some help. Trying to figure out how to divide a number by another number in scheme without using /. I have written these functions that i can use in creating the divide function: [CODE](define pwr (lambda (a …
Hi guys, I'm working in plt-scheme and am trying to do multiple ellipsis (...) in my scheme macro pattern. Basically it's a macro for defining/creating a class with fields and methods. When I try to do this: [CODE] (define_class class_name (field1 value1) ... ((meth1 . args1) body1 ) ... )[/CODE] …
I can write the recursion version correctly need help with writing a do loop in DrScheme. After the do loop the variable x is sent to car L intially and then is updated to first element of everything but first element in list. [CODE] (define (sumiteration L) (do ((x (car …
Hey, My question is on the use of the max/min functions in listing. As part of a larger problem, I decided to first design two helper functions which will determine the maximum and minimum numbers in a list. My max function seems to work properly, but I encountered some difficulties …
I'm new to learning scheme and i need help writing a function that can return everything except the last element in a list and another function that returns the index of the first occurrence of an element in a list. Please reply as soon as possible
These are sheme codes.I intend to put the first two values in a list.. Everytime I run the codes,I get some (#<promise> . #<promise>) ..I am pretty sure of my codes bt nt so sure y am nt getting the intended results..I would be highly obliged to those who cn …
Hi all, I'm trying to retrieve all of the games from a list of games in LISP but am having trouble writing the function. Here is the code: [CODE] (setf game-db '( ((title "Call of Duty Modern Warfare 2") (genre "FPS") (platform "Xbox 360") (players "Multiplayer") (price 39.99)) ((title "Team …
Hello all, I am in the process of translating a program from lisp into C#, most of it has gone smoothly but I have run across two blocks of code that are giving me a bit of trouble. If anyone can help me translate these two pieces of code into …
I currently have a LISP program that is complete and from another source, and I would like to run it and view the output all within Emacs, if anyone could help me I would greatly appreciate it
Hello, and thank you for helping me today! I am working on a scheme procedure that takes a string as its input, capitalizes every letter in the string, and then prints out the result. This is a homework assignment, and we are supposed to use another procedure that we wrote …
Hello, and thank you for taking the time to help me! I am working on a Scheme procedure right now, which is supposed to read in integers until 0 is entered, and display the minimum of the integers (0 included). I have a question about the procedure, which is below. …
I having hard time understanding how to read the expression in scheme. Need HELP!! Can anyone help. PLEASE
The End.