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

Messages - DrDave

#1
Quote from: "Kazimir Majorinc"When you speak about problems with 27, that means that 1/27 doesn't make nice output, right?

Essentially, yes. When you compare the inverse of 27, 27227, 27272, etc. with any of the others that I listed above, it doesn't seem to be inserting either zeros or other digits as the above numbers do.
#2
Quote from: "cormullion" 9 is a bit odd in my view.

You are so right. And it's also a little square.
#3
Recently, I was doing some number crunching that involved 9 and multiples thereof. Just for fun, look at the digits for the INVERSE of each of these numbers. The "special properties" (whatever that might mean) of 9 have been studied and used since ancient times.



In the numbers below, they mostly show insertion of zeros. But the set begining with 81 runs a bit differently by inserting various digits. And it appears 81*9 =729 contiunes with the insertion of digits. I didn't pursue this one further.



I'm sure those of you that are pattern finders will see also that the sum of the digits reduce to 9.



Also, why don't ALL numbers that reduce to 9 give these "unusual" sequences? For example, 27 doesn't produce  a very "pleasing" sequences of digits.



9, 99, 999, 9999, ...



18, 1818, 181818, ...



45, 4545, 454545, ...



36, 3636, 363636, ...



81, 8181, 818181, 81818181, ...



108, 108108, 108108108, ...



81*9 = 729



DrDave
#4
Quote from: "Robert Gorenc"so, how did you collect this data, manually or use some nl script?

What is this symbol E if formula y=2E+.... and what is R^2??

It was long ago when I worked with math..... :-)


The correlation coefficient for a simple linear regression like these tells you how much of the variability in the Y-values of the sample data can be accounted for by the model (your linear equation, which is the relationship betweeen the X and Y values) you created. The variability that is not accounted for by the model is unexplained (at least unexplained by your model; there might be some actual explanation for it).



So, if your sample points all lie EXACTLY on the plotted line of your model, R^2=1; that is 100%, of the variability in your Y sample data can be explained by your model equation.



Like most models, you really need to be able to inspect the raw data (or at least see the plot of the raw data and the model like presented here). Just because R^2 is a very high number dosn't necessarily mean your model is so good at predicting Y from X on all portions of the data region. For example, look at how far from the model line that the sample data falls near the left end of the X scale compared to the middle region.  Think about having a data set that has a logarithmic relationship that has a linear plot fitted. You can get a rather high R^2 because only near the extreme end do the sample data vary significantly from the linear model.



DrDave
#5
Anything else we might add? /
September 16, 2009, 04:52:54 AM
Quote from: "cormullion""Common Lisp programmer willing to learn newLISP." Should be interesting... :)


Do any such creatures exist in the DC area? Or do any such creatures exist ANYWHERE on the planet?
#6
Whither newLISP? /
July 31, 2009, 12:00:44 AM
I'm wondering why FLOOR runs about 2X slower than CEIL.



DrDave
#7
newLISP in the real world /
April 07, 2009, 09:53:49 AM
Quote from: "newdep"Heheh.. Well actualy "being Lucky at self-destruct" is partly a good function

as you can only do it ones, I tried indeed the harakiri but I did not want

to involve a 2nd party...



PS the above is about a newlisp function..just to make that clear ;-)



PPS Harakiri is an individual action where the Sepuku i think was done

by a 2nd 'close releative' party.. Anyway options enough...


I visited a friend in Japan a few years ago and some discussion about harakiri developed. If I recall correctly, sepuku and harakiri are essentially synonyms in contemporary Japanese. But I think sepuku is reserved for formal language like in literature, and harakiri is spoken on the street. In any case, they were to be used only by Samarai warriors. (But really, would anyone else but a Samuarai want to slice themselves in the abdomen on purpose?)



By the way, you WANT to be lucky (successful) when attempting harakiri, or you are in even greater shame than whatever condition brought you to the point of harakiri in the first place.



EDIT--OK, I did some checking on this. Sepuku USUALLY involved a "second", a trusted swordsman that, upon a previously arranged moment after the abdominal slashing, sliced off the victim's head, thereby providing a quick and honorable death. The most desirable condition was to leave the head attached by a strip of skin, so that it did not roll off and make a mess on someone nearby.
#8
Whither newLISP? /
April 06, 2009, 10:33:09 AM
Quote from: "itistoday"
How did you get those results? With that code the second argument is always evaluated, therefore producing this result:


(my-or temp nil) = 45
(my-or nil temp) = 45
-----------
first arg
second arg
should be 1: 1
-----------
first arg
second arg
should be 2: 2


Ah, my bad. You're right. I didn't look carefully at the results.
#9
Whither newLISP? /
April 06, 2009, 04:32:24 AM
Does this work for you?


(define-macro (my-or)
   (let (
         temp  (eval (args 0))
         temp1 (eval (args 1))
        )
     (if temp
         temp
         temp1
     )

    )
)




results:


(my-or temp nil) = 45
(my-or nil temp) = 45
-----------
first arg
should be 1: 1
-----------
first arg
second arg
should be 2: 2
#10
newLISP Graphics & Sound /
March 12, 2009, 12:09:55 PM
Quote from: "Lutz"The problem with [cmd][/cmd] tags in the newLISP-GS Java front-end has been fixed. Download a new guiserver.jar from:



http://www.newlisp.org/download/development/guiserver.jar">http://www.newlisp.org/download/develop ... server.jar">http://www.newlisp.org/download/development/guiserver.jar



and install on Win32 as: $PROGRAMFILES/newlisp/guiserver.jar



or install on Mac OS X and other Unix as: /usr/share/newlisp/guiserver.jar

Lutz,



there is a typo in your URL. It should be this:

http://www.newlisp.org/downloads/development/guiserver.jar">http://www.newlisp.org/downloads/develo ... server.jar">http://www.newlisp.org/downloads/development/guiserver.jar
#11
I am running newLISP 10.0.0 on WIN 32 IPv4 and newLISP-GS 1.24 on Win XP pro SP2



Your code
[cmd]
(define (foo x y)
(+ x y))
[/cmd]
runs fine in both a console and in newLISP-GS.



According to the error message, it appears that when you run the code from GS, the two trailing right parentheses have somehow been moved to the start of the code and also possibly removed all charcters after the 'y', including a newline marker ,as if you entered the following code
))
[cmd]
(define (foo x y)
(+ x y


I have used prior releases of GS also without problems. Considering that you stated you have had this problem from many releases earlier
QuoteThis problem has been persisting since v.9.4.5.
I suspect there is a problem either with your XP installation or configuration of GS rather than with newLISP itself.



Are you using a Japanese version of Win XP, or perhaps have some other text-related problems due to Japanese? In other applications,  I sometimes run into anamolies (bugs) in character placement in right-to-left languages that disappear when I paste the same text into a pure English Win XP installation.



DrDave
#12
newLISP newS /
February 07, 2009, 11:08:37 AM
Thanks for the nice analysis of Apply.
#13
newLISP newS /
February 02, 2009, 09:41:31 AM
Quote from: "cormullion"
there are a lot of CL-ers looking for an argument, it seems.

@cormullion, was that "looking for an argument" in reference to "check whether someone supplied extra arguments to function", or meant being argumentative?
#14
Anything else we might add? /
January 29, 2009, 12:41:12 PM
I think the CL club has totally forgotten about ...



...it is better to first strive for clarity and correctness and to make programs efficient only if really needed.



"Getting Started with Erlang" version 5.6.2
#15
newLISP newS /
January 27, 2009, 03:04:52 PM
Quote from: "xytroxon"
Maybe someone could write a post explaining how modernizing the antiquated...

As I recall, they like to remind those that question the CL dogma that they have a "Standard".  While standards usually have a positive aspect, it seems to me that the standard bearers are so afraid of breaking any existing code that their community cannot (will not?) modernize the standard. Hence, the standard they so proudly defend is probably their greatest impediment to progress