Author Topic: F# the new lisp?  (Read 8798 times)

0 Members and 1 Guest are viewing this topic.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: F# the new lisp?
« Reply #15 on: September 25, 2012, 02:12:41 AM »
Glad to help, though I fear you're going down the same path I have: After seeing just what a Lisp "should" be, AutoLisp feels so inadequate afterwards!  ::)

It's in the same line as the F# video - showing the difference between writing the stock analyser in C# as opposed to F#. You usually have to do a lot more in ALisp than CL, or worse you simply cannot do something in AL which is a breeze in CL. What really blew my mind was how easily CL writes FFI's (foreign function interface) to link to outside libraries, it's near automatic.

What I have to say though, the biggest time saving is not necessarily the language itself, it's usually the libraries which come with it. E.g. C# would be a disaster of a language if you did not have access to all the DotNet libraries - actually it might even be more cumbersome to use than C/C++ without those things. E.g. the piping in F# is actually inherent in Lisp (it's just that the "pipe" goes from inside to outside as the functions return their result to the calling function), and then one step further to general structures like the map in F# which is equivalent to mapcar in Lisp, and then lastly you get to the full blown libraries which are usually specific to the "System" (in AutoLisp this would be the AutoCAD specific functions). This is the major reason I prefer CL over Scheme, in Scm you usually have to write those "library" functions from scratch (if you cannot find some open-source which someone else is kind enough to share), while in CL there's very little which is left out of the normal CL base (stuff like native file/folder-access is built into CL but not SCM).
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: F# the new lisp?
« Reply #16 on: September 25, 2012, 02:42:54 AM »
I found F# difficult due to the imposed constraints of formatting.
This topic summarizes code indentation guidelines for F#. Because the F# language is sensitive to line breaks and indentation, it is not just a readability issue, aesthetic issue, or coding standardization issue to format your code correctly. You must format your code correctly for it to compile correctly.


gile, I agree that Luca Bolognese is a funny speaker ... some of his LINQ presentations were excellent.

//-------------

I haven't investigated it for a few years, but I recall there being several attempts to develop a lisp .net API.

Personally I'm quite happy with Visual Lisp and C#  ...

« Last Edit: September 25, 2012, 02:53:01 AM by Kerry »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: F# the new lisp?
« Reply #17 on: September 27, 2012, 05:14:24 AM »
Anyone read this before? http://landoflisp.com/

Scroll down to the comic strip at the bottom of that page ... it's funny ... in a sad sense  :?
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

GUIDO ROOMS

  • Guest
Re: F# the new lisp?
« Reply #18 on: October 17, 2012, 03:52:03 PM »
Anyone read this before? http://landoflisp.com/

Scroll down to the comic strip at the bottom of that page ... it's funny ... in a sad sense  :?

Hey irneb,
I've ordered the book from amazon.de and it arrived yesterday.
Think it's a good book.
Although it's meant for beginners, it covers quite a number of more advanced topics.
Well written. Just the right amount of simplification, no baby talk. Good explanations.
Puts a lot of stress on precisely those topics which make lisp special & different.
Best to use it together with a more formal text like "Common Lisp The Language".

Another thing. I've been downloading and testing lisp development systems.
I kept the express versions of both Allegro CL and LispWorks. Their ide's are just acceptable.
All the rest were fossils compared to which the Visual Lisp ide is a gem :lmao:
For example, I'm using an azerty keyboard and clisp.exe didn't even recognize it: all my function
keys and other special keys like ins, del etc... returned gibberish.

Greetings,
have a nice one.

JasonB

  • Newt
  • Posts: 42
  • perfectionist trapped inside the mind of an idiot.
Re: F# the new lisp?
« Reply #19 on: October 17, 2012, 06:08:40 PM »
Bricscad uses OpenLisp http://christian.jullien.free.fr/ as the base for its LISP engine. You can download installer for a number of OS.

I have Land of Lisp too. Have found it quite useful to look at lisp from a more general viewpoint, and how some of these approaches could be used with AutoLisp. AutoLisp forked off at quite an early stage in LISP development and has missed out on much of what came after,  which books like this highlight.

I think it is interesting as to how things evolve with time. IMHO the growing number of AutoCAD emulators with Lisp engines, and the growing use of multiple OS platforms (iPads, android, linux), positions Lisp in very good position through its portability.

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: F# the new lisp?
« Reply #20 on: October 18, 2012, 07:16:19 AM »
Very intressting thread, I work with Lisp not so long but I think so too it´s easy to learn the basic more complicate is when Autolisp functions get mixed with visualLisp function. In viewing from Kean I´m impressed that F# have also a powerful compiler or give fast feeback if something is wrong in the code.

gile

  • Gator
  • Posts: 2520
  • Marseille, France
Re: F# the new lisp?
« Reply #21 on: October 18, 2012, 03:42:48 PM »
Very intressting thread, I work with Lisp not so long but I think so too it´s easy to learn the basic more complicate is when Autolisp functions get mixed with visualLisp function. In viewing from Kean I´m impressed that F# have also a powerful compiler or give fast feeback if something is wrong in the code.

Yes, F# is fun, but take care, as I said, the F# learning curve is almost as long as for other .NET languages (C# and VB) and there're very much fewer code samples in F# than in C# or VB (a fortiori for AutoCAD).
F# interactive (which is equivalent to the Visual LISP Console) do not work with external libraries as AutoCAD's ones.
Speaking English as a French Frog

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: F# the new lisp?
« Reply #22 on: October 19, 2012, 12:50:49 AM »
Yep, the biggest issue I have with C#/VB.Net is you can only test your code modifications by re-compiling the entire thing. With Lisp/F# (or other interpretive languages) it's possible to "quickly" have a piece of code you're trying out run in the console - to see if it works and if it does what you're expecting, before you go and change everything in your project.
 
BTW, if you want some similar functionality for C#/VB.N, you could try using this: http://www.codeproject.com/Articles/6113/Dot-Net-Script
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: F# the new lisp?
« Reply #23 on: October 19, 2012, 05:51:15 AM »
Yeah nice link. :-o

I was beginning with C# 1 year ago, it is funny to do all forms and visualisation things but I was looking for more a practical side to do something with the Autocad API do own command ...
I allready have fun with OpenDCL to make nice menu or optic details.
Now I have seen the Kean documentation and think I  continue with C# first. :ugly:


irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: F# the new lisp?
« Reply #24 on: February 18, 2014, 05:15:28 AM »
Sorry to revive this zombie thread ... it's just that I saw another thing which might make people move from VB.Net/C# into F# instead: http://simontylercousins.net/does-the-language-you-use-make-a-difference-revisited/

Finally, some apples - to - apples comparison.  ;-)
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.