Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Sunburned Surveyor

#1
I'm back. :]



I've done some reading on the "open", "exec", and "pipe" commands in the NewLISP manual and I'm still a little confused about the best way to approach a particular problem.



I'm trying to set up communication via text messages between a NewLISP application and an application that doesn't support pipes. (Namely AutoLISP...) However, I can write to text file from the other application.



I think I can write my message for the NewLISP application into a text file and use a combination of the "pipe", "exec" and "open" functions in my NewLISP application to incrementally read that text from the same file.



Is this possible, and if so, how might I use the three newLISP functions to do so?



Thanks for the help.



The Sunburned Surveyor
#2
I would like to know if there is a function in NewLISP that will return all the elements of an association list based on the value of any of the lists members.



For example, I have the following list:



("fruit" "bannana" "pear" "apple" "plum" "grapes")

("vegatables" "lettuce" "celery" "cucumbers" "olives" "onions")

("junk food" "ice cream" "licorice" "chocolate bar" "carmel apple" "bubble gum")



I want to be able to retrieve the entire "junkfood" list by searching for any one of the elements. I believe the lookup and assoc functions only allow you to do this when using the first element in the association list.



Thanks for the help.



The Sunburned Surveyor
#3
newLISP in the real world / Breaking out of dolist...
November 30, 2005, 04:10:43 PM
Is it possible to break out of a dolist loop before all of the elements in the subject list have been iterated through?



For example, I want to use dolist to manipulate each element in a list until I reach an element with a certain value. Is this possible?



What syntax would I use to break out of a dolist or other loop in NewLISP?



I checked the NewLISP manual, but I couldn't find a "break" statement that is common to other languages.



The Sunburned Surveyor
#4
Whither newLISP? / Newlisp Memory Usage
July 28, 2005, 04:54:04 PM
I've got 3 brief questions about newLISP memory usage. I looked over the manual, but didn't see anything that answered my question directly.



[1] Is there a way to see the total amount of memory newLisp is using at a given moment?



[2] Is there a function that returns a list of all the symbols currently in memory? How about the size of each symbol in memory?



[3] Is there a way to time the execution of a newLISP function?



Thanks,



The Sunburned Surveyor
#5
Is it possible to have a custom function defined in newLisp that accepts a variable number of arguments?



For example, could I have the "doThis" function accept an integer named "number1" and a string named "text" or just two integers, "number1" and "number2"? How would I do this? Can you do it by just specifying all parameters in the define statement for the function, and then if the values are not used they are passed as nil?



Thanks,



The Sunburned Surveyor
#6
Question for the NewLISP pros:



I am setting up a programming library in NewLisp, and I would like to use an object-oriented programming model. I know that this can be accomplished using contexts in NewLISP, but I believe it could also be accomplished with lists.



For example, my geometry library will contain "point" objects, with 3 simple properties, or symbols. (One property for each coordinate value.)



I could represent each point object with a context, or each point object with a list containing the 3 properties as the list elements.



What are the advantages and disadvntages of each method? (As far as speed, memory usage, simplicity, and ease of use?)



Thanks,



The Sunburned Surveyor
#7
NewLISPers,



I've been brainstorming ideas for a geometry library for NewLISP. (When I can't sleep at night...)



I've jotted some things down on paper, and I'm getting ready to start writing code.



The geometry library will work with 3D entities, and will include the following geometry objects:



Points

MultiPoints

Lines

MultiLines

Polygons

MultiPolygons

3D Faces

3D Solids

3D Composite Solids

TIN Surfaces

LinearNetworks



The library will allow you to do basic geometry operations like:



[1] Scaling

[2] Rotation

[3] Translation

[4] Copying/Duplication

[5] Arraying



And lots of other things like:



- Calculate the slope and vertical difference of a 3D line.

- Determine the percentage of overlapping polygons in a MulitPolygon.

- Calculate the volume of a composite solid.



All of these functions will be available via NewLisp functions.



If you are interested in the development of this library, please let me know. I could use some advice and comments before I invest a lot of time in the design.



Thanks,



The Sunburned Surveyor
#8
I'm designing a simple database in newLisp based on an XML document. I was wondering if anyone has tried to run any compression utlities from newLisp? I would like to compress the XML file representing the database as part of the save/serialization process, but I would like this step to be invisible to the user. (The same would apply to decompression when the user opens the database.)



Any ideas? I prefer open source solutions if at all possible.



I would also like to know if anyone has done any work validating XML schemas with newLisp? Either internally, or via an external tool.



The Sunburned Surveyor
#9
newLISP newS / newLisp IDE Website
March 03, 2005, 05:04:28 PM
I've got the newLisp IDE website up at SourceForge, although development hasn't begun just yet.



http://newlispeclipse.sourceforge.net/">http://newlispeclipse.sourceforge.net/



Let me know if your interested in helping with the project...........I could use some experienced Lispers and anyone that has experience with Eclipse or Java programming.



The Sunburned Surveyor
#10
I have had some questions from newLisp users about my SurveyLisp project.

More specifically, they were curious how I was using newLisp in AutoCAD.



I wanted to clarify that here. I'm not technically using newLisp inside of AutoCAD, although it may appear that way to the user.



Let me give you an example of what I am doing:



The user has a 3D polyline that represents the centerline of a road. They want to create offsets of this polyline



that represent the road's lip of gutter, flowlone of gutter, top face of curb, and back of sidewalk. I will need four



pieces of information from the user to create the offsets.



(1) The name of each offset type. (For example: Flowline)

(1) Horizontal distance to each offset.

(3) Vertical distance to each offset.

(4) The layer of each offset polyline.

(5) The linetype of each polyline.

(6) The polyline to offset. (The road centerline.)



I create an Autolisp routine called "CreateRoadOffsets.lsp" that prompts the user to select the polyline that



represents the road centerline. The Autolisp routine then writes the X, Y, and Z coordinate of each node of the



polyline to a text file in XML or Lisp list format. It stores this file in a folder called "Communications". It then



fires an executable called "CreateRoadOffsets.exe" that contains my newLisp code. This executable creates a GUI using



newLisp and GTK-Server that allows the user to enter our required information. The executable then stores this



information as newLisp symbols and uses them to write a piece of Autolisp code that creates the desired offset



polylines. It then saves this chunk of code to a text file called "CreateRoadOffsetsALCode.lsp". It saves this text



file in the same "Communications" folder, and deletes the text file created by "CreateRoadOffsets.lsp" in the folder.



My executable then closes, returning control to the original AutoLisp routine. The AutoLisp routine then reads in



CreateRoadOffsetsALCode.lsp and executes it, creating our offsets as desired.



I could also write an executable in newLisp that creates a GUI that allows the user to design "road offset



templates". These templates would store the required information and write them to disk. These templates could then be used in the "CreateRoadOffests.exe" mentioned previously, instead of entering the offset data manually. I would then write Autolisp code to run this executable, and place it in a menu named "Roads", under the command "CreateRoadOffsetsTemplate."



If you have anymore questions, please let me know. I would welcome any Lispers as volunteers to the SurveyLisp project.



The Sunburned Surveyor
#11
newLISP newS / newLisp for AutoCAD
February 15, 2005, 07:53:31 AM
newLispers,



I've started a project that will use newLisp and AutoLisp to design extensions for AutoCAD/IntelliCAD. The link to the project website is:



http://surveyos.sourceforge.net/xoops/">http://surveyos.sourceforge.net/xoops/



Check the SurveyLisp links.



Please let me know if your interested in becoming a developer with the SurveyLisp Project. We could really benefit from some experienced Lisp Programmers contributions.



The Sunburned Surveyor



P.S. - I've also started a SourceForge project for newLispEclipse. It will be an extension to the Eclipse IDE that integrates the GTK GUI builder Glade, the GTK-Server, and newLisp in one programming environment. I hope to have the website for this project online in the next few weeks.
#12
newLISP Graphics & Sound / IDE for newLISP
January 28, 2005, 04:00:50 PM
newLisper's,



Does anyone have an IDE they would recommend for newLISP, or LISP in general. I'm looking for something open source, with things like parentheses matching and bug checking.



Is there a way to get  Jabberwocky to work with newLisp?



http://sourceforge.net/projects/jabberwocky">http://sourceforge.net/projects/jabberwocky



Would anyone else be interested in an Eclipse plug-in for newLISP? If so, let me know and perhaps we can get a project going.



The Sunburned Surveyor[/url]
#13
newLISP in the real world / newLisp and MySQL
January 17, 2005, 07:59:15 AM
The newLisp website mentions that newLisp is able to expose the MySQL API. Where would I find more information or documentation on this feature? Does it work with Windows?



Thanks,



The Sunburned Surveyor
#14
I had a couple of questions about the newLisp syntax I was hoping you guys could help with.



(1) I believe a symbol is like a variable in other languages. It is a named container that holds a value. Is this correct?



(2) What is the difference between a symbol and a constant?



(3) On page 13 pf the reference manual it discusses resetting the value of the integer math operators. It has the following LISP statement:



(constant '+ add)



I realize this statement is setting the value of the "+" operator to the add function, but what is the purpose of the single quote? Are we using that to refer to the name "+" rather than evauluating it as a math operator?



(4) Is init.lsp used to load a set of user defined functions for the newLisp compiler/IDE?



(5) I did some on-line research about Lambda ecpressions. I want to make sure I understand them correctly. Is the following true:



A Lambda expression defines a function temporarily. The first part of the expression must be the symbol name Lambda, the second is a parameter/argument list, and the thirs is the expression that operates on the arguments.





Thanks for any info.



The Sunburned Surveyor
#15
newLISP Graphics & Sound / GTK or Tcl/Tk
January 14, 2005, 07:44:37 AM
I think I've narrowed my choices for GUI development with newLisp to 1 of 2 choices:



1. Tcl/Tk

2. GTK



I can't seem to see a clear advantage of one over the other, although I've got a good book on Tcl/Tk at my local library. What have you experienced newLisp developers found to be the best? What are the advantages of the one over the other? I would really appreciate some input. I'd hate to invest significant time learning one option, to find I should've chosen the other.



Thanks,



The Sunburned Surveyor
#16
newLISP Graphics & Sound / GTK GUI for newLISP
January 12, 2005, 04:46:12 PM
I'm just checking out newLisp at the moment and I had a rookie question.



Where might I find a guide or tutorial, (or even an article), on how to use newLisp with GTK to build graphical user interfaces. Has anyone built GUI's for NewLisp this way.



I am very curious. A reliable way to build GUI's is the only thing holding me back from newLisp at this point.



I don't know much about GTK, but I do use GIMP. I also no very little C++. However, I do write programs in Java, and I write in AutoLISP.



Thanks,



The Sunburned Surveyor