Recent Posts

Pages: [1] 2 3 ... 10
1
CAD General / Re: Converting x-y coordinates to long lat
« Last post by MaCo on Today at 03:18:11 AM »
Doesn't seem to be available for Europe though :(
2
.NET / Re: BindingNavigator does not show correct data information
« Last post by Sheriholty on Today at 03:06:06 AM »
I do not know how many updates have been made so I can not help recommending them.
3
I am a researcher who has applied to learn new things. What do you learn to add?
4
VB(A) / Re: fix Nested If-Then-Statement
« Last post by jtm2020hyo on Today at 01:38:34 AM »
1.  Been a long time since I did any VB.
2.  Elseif is NOT bad in VB.  Cleans up the code and does the same thing as breaking it all down.
3.  My gut says it is the word HANGER that is causing the issue.  See #1.

Have you tried testing different labels instead of HANGER?

I agree, adding a single name not should broken formula... well the problem already was solved.
5
AutoLISP (Vanilla / Visual) / Re: Split big list...
« Last post by John Kaul (Se7en) on May 27, 2020, 06:03:03 PM »
You wouldn't store that much in memory typically. But I've processed the entire "War and Peace" novel in milliseconds in C++ (time values that small are vey hard to get accurate). You can typically get about the same time frames from C and C++. C# is good as well (MS does a good job compiling).

Here was a fun challenge using a snip from "war and peace".
https://www.theswamp.org/index.php?topic=50378.msg555005#msg555005
6
AutoLISP (Vanilla / Visual) / Re: Split big list...
« Last post by Marc'Antonio Alessi on May 27, 2020, 05:16:00 PM »
Sorry for my ignorance (I don't know many languages and I'm not a programmer...) just out of curiosity: with other languages can a list long 4190208 strings be processed much faster?

> Test on AutoCAD 2013 and my old PC...

Code: [Select]
(length (setq aList (atoms-family 1)))
(progn (repeat 10 (setq aList (append aList aList))) (princ))
(prompt "\nLength: ") (princ (setq   aLeng   (length aList))) (princ "\n")
(setq   aMLen  (fix (/ (length aList) 2.0)))

(setq t0 (car (_vl-times)))
(prompt "\nLength ALE_List_FirstN: ")(princ (length (ALE_List_FirstN   aMLen aList)))
(setq t1 (car (_vl-times)))
(prompt "\nElapsed time for ALE_List_FirstN : ") (princ (rtos (- t1 t0) 2 20)) (prompt " milliseconds...")

(setq t0 (car (_vl-times)))
(prompt "\nLength ALE_List_LastN: ")(princ (length (ALE_List_LastN   aMLen aList)))
(setq t1 (car (_vl-times)))
(prompt "\nElapsed time for ALE_List_LastN : ") (princ (rtos (- t1 t0) 2 20)) (prompt " milliseconds...")

Code: [Select]
Length: 4190208
Length ALE_List_FirstN: 2095104
Elapsed time for ALE_List_FirstN : 188 milliseconds...
Length ALE_List_LastN: 2095104
Elapsed time for ALE_List_LastN : 78 milliseconds...
7
AutoLISP (Vanilla / Visual) / Re: Split big list...
« Last post by VovKa on May 27, 2020, 05:10:59 PM »
why LISP in overall is so programmed that it's way too slower than other languages...
because modern computers are way behind the lisp philosophy

p.s. at least they tried https://en.wikipedia.org/wiki/Lisp_machine
8
CAD General / Re: Converting x-y coordinates to long lat
« Last post by cadtag on May 27, 2020, 04:17:36 PM »
you can use Corpscon from the US ACOE to convert between coordinate systems outside of CAD, lat long to state plane, etc.
9
AutoLISP (Vanilla / Visual) / Re: Split big list...
« Last post by gile on May 27, 2020, 03:04:29 PM »
More seriously, this topic is quite interesting about speed performances.
It shows the importance of the algorithm. The best LISP implementations were faster than than my first 'brute force' C# implementations.
Anyway, for the same algorithm LISP will always be slower because it's a quite old interpreted language which uses dynamic typing and has only one data structure (linked list).

VisualLISP is for ObjectARX what windsurfing is for ocean racing yachts: lighter, more fun but less powerful, especially with large tasks.

PS: I really do like LISP.
10
AutoLISP (Vanilla / Visual) / Re: Split big list...
« Last post by John Kaul (Se7en) on May 27, 2020, 02:58:21 PM »
Auto/Visual lisp is an interpreted language--in other words, it needs something to convert the language to instructions before they are run. C, C++, C# are compiled languages; compiled languages get converted to machine instructions (for your actual computer).

Converting an interpreted language to a low level language can happen (algorithm maybe) but not the actual operation because things just aren't done the same. For example, in C (the lowest of the C based languages) you don't have strings; you have char arrays. And you cannot just create a variable like you do in AutoLisp.

Lisp
(setq MyVariable "some text")
C
char MyVariable[10];
MyVariable = "some text";

But the variable is only 10 items big meaning you cant just add to it like you can in AutoLisp.
(setq MyVarialbe (strcat MyVariable " and some more text")

In C you'd need to reallocate more memory for that variable and re-assign it. Things like this get easier the more you step up. C++ being easier to deal with strings, and C# being the easiest.

Obviously, this is just another dumb example; and what I'm trying to say is that you "design" differently in compiled languages then you do in languages like AutoLisp.

Recursion is the easiest form of a loop to understand/use. You really should read at least the first two chapters of Structure and Interpretation of Computer Programs.
Pages: [1] 2 3 ... 10