[julia-users] Re: Is it wrong to think of Julia as a Lisp that uses m-expressions?

2014-04-10 Thread Andrew Dabrowski
I'm neither a Julia nor even a competent programmer, but since no one else 
has responded I'll take a shot at it.

I think that might be fair description of Mathematica, but not of Julia.

Julia is very much a multi-paradigm language, it's not pure enough in any 
sense to be considered a member of any family.



On Wednesday, June 26, 2013 4:38:33 PM UTC-4, Ben Racine wrote:
>
> I stumbled across this on wiki... 
>
> The use of S-expressions  which 
> characterize the syntax of Lisp was initially intended to be an interim 
> measure pending the development of a language employing what McCarthy 
> called "M-expressions ". As an 
> example, the M-expression car[cons[A,B]] is equivalent to the 
> S-expression (car (cons A B)). S-expressions proved popular, however, and 
> the many attempts to implement M-expressions failed to catch on.
>
> I've seen the (awesome) language designers mention that Julia can be 
> thought of a Lisp (in different words)... and I'm just wondering if anybody 
> cares to confirm, expound, or deny this.
>
> Main source: 
> http://en.wikipedia.org/wiki/History_of_the_Scheme_programming_language
> Further background: http://en.wikipedia.org/wiki/M-expression
>


[julia-users] Re: Is it wrong to think of Julia as a Lisp that uses m-expressions?

2014-04-11 Thread Mike Innes
Lisp has certainly had a strong influence on Julia. First class functions, 
homoiconicity, running code at compile time and compiling code at runtime, 
the interactive REPL, dynamic typing and GC, everything you could really 
want from a Lisp is there.

But, syntax does make a difference, I think. For example, deeply nesting 
expressions concisely is far less natural in Julia than Lisp. Macros, while 
just as powerful, are a little more awkward thanks to Julia's more complex 
syntax and the fact that you have to often write @foo begin rather than 
just (foo. Don't get me wrong, Julia's syntax is great, and it's entirely 
the right choice for the technical space, but for that reason I think I'd 
say that Julia isn't *a* Lisp as such. Yes, they're similar in terms of raw 
language power, but each for different problems.

I've often thought that a Lisp which compiles to Julia would be a cool 
project, though.

If you're interested, this Paul Graham 
essay is 
an interesting read. It seems he was spot on about languages with 
algol-like syntax adopting more Lisp features.


[julia-users] Re: Is it wrong to think of Julia as a Lisp that uses m-expressions?

2014-11-30 Thread Chris Kohlhepp
Try typing "julia --lisp" and see what happens. 


On Thursday, June 27, 2013 6:38:33 AM UTC+10, Ben Racine wrote:
>
> I stumbled across this on wiki... 
>
> The use of S-expressions  which 
> characterize the syntax of Lisp was initially intended to be an interim 
> measure pending the development of a language employing what McCarthy 
> called "M-expressions ". As an 
> example, the M-expression car[cons[A,B]] is equivalent to the 
> S-expression (car (cons A B)). S-expressions proved popular, however, and 
> the many attempts to implement M-expressions failed to catch on.
>
> I've seen the (awesome) language designers mention that Julia can be 
> thought of a Lisp (in different words)... and I'm just wondering if anybody 
> cares to confirm, expound, or deny this.
>
> Main source: 
> http://en.wikipedia.org/wiki/History_of_the_Scheme_programming_language
> Further background: http://en.wikipedia.org/wiki/M-expression
>


Re: [julia-users] Re: Is it wrong to think of Julia as a Lisp that uses m-expressions?

2014-04-11 Thread Stefan Karpinski
We contemplated giving Julia macros function call syntax, but decided not
to. These were a few of the reasons:

   1. The @foo syntax serves as a warning to the reader that something
   unusual is about to happen. Macro invocation isn't at all like a function
   call and doesn't look like it – it looks like a user-defined keyword, which
   is basically what it is.
   2. If you write map(m,v) where m is a macro, what happens? If you write
   map(@m,v), there's no expectation that this should do anything but apply
   the @m macro to zero arguments and then map the result of that over v.
   3. We want to discourage excessive use of macros. Macros are the
   ultimate escape hatch, but using them too much is usually a sign of bad
   library design or a language deficiency. Having a jarring macro syntax
   keeps us honest.




On Fri, Apr 11, 2014 at 6:16 AM, Mike Innes  wrote:

> Lisp has certainly had a strong influence on Julia. First class functions,
> homoiconicity, running code at compile time and compiling code at runtime,
> the interactive REPL, dynamic typing and GC, everything you could really
> want from a Lisp is there.
>
> But, syntax does make a difference, I think. For example, deeply nesting
> expressions concisely is far less natural in Julia than Lisp. Macros, while
> just as powerful, are a little more awkward thanks to Julia's more complex
> syntax and the fact that you have to often write @foo begin rather than
> just (foo. Don't get me wrong, Julia's syntax is great, and it's entirely
> the right choice for the technical space, but for that reason I think I'd
> say that Julia isn't *a* Lisp as such. Yes, they're similar in terms of
> raw language power, but each for different problems.
>
> I've often thought that a Lisp which compiles to Julia would be a cool
> project, though.
>
> If you're interested, this Paul Graham 
> essay is
> an interesting read. It seems he was spot on about languages with
> algol-like syntax adopting more Lisp features.
>


Re: [julia-users] Re: Is it wrong to think of Julia as a Lisp that uses m-expressions?

2014-11-30 Thread Matt Gushee
On Sun, Nov 30, 2014 at 3:28 PM, Chris Kohlhepp
 wrote:
> Try typing "julia --lisp" and see what happens.

Wow, that is some easter egg! Is there a serious purpose for this? Any
documentation?

--
Matt Gushee


Re: [julia-users] Re: Is it wrong to think of Julia as a Lisp that uses m-expressions?

2014-11-30 Thread John Myles White
This isn't documented because it's not meant to be an official part of Julia. 
At present, Julia's parser is written in Scheme. That command lets you use the 
Scheme implementation that Julia uses internally.

 -- John

On Nov 30, 2014, at 7:45 PM, Matt Gushee  wrote:

> On Sun, Nov 30, 2014 at 3:28 PM, Chris Kohlhepp
>  wrote:
>> Try typing "julia --lisp" and see what happens.
> 
> Wow, that is some easter egg! Is there a serious purpose for this? Any
> documentation?
> 
> --
> Matt Gushee



Re: [julia-users] Re: Is it wrong to think of Julia as a Lisp that uses m-expressions?

2014-12-01 Thread cdm

from the Julia License.md file   ( 
https://github.com/JuliaLang/julia/blob/master/LICENSE.md 
):

The Julia language links to the following external libraries, which have 
their own licenses:


   - FEMTOLISP 
   
interested individuals can view the Readme.md and remainder of the repo 
there ...

enjoy !!!

cdm



On Sunday, November 30, 2014 7:49:03 PM UTC-8, John Myles White wrote:
>
> This isn't documented because it's not meant to be an official part of 
> Julia. At present, Julia's parser is written in Scheme. That command lets 
> you use the Scheme implementation that Julia uses internally. 
>
>  -- John 
>
> On Nov 30, 2014, at 7:45 PM, Matt Gushee > 
> wrote: 
>
> > On Sun, Nov 30, 2014 at 3:28 PM, Chris Kohlhepp 
> > > wrote: 
> >> Try typing "julia --lisp" and see what happens. 
> > 
> > Wow, that is some easter egg! Is there a serious purpose for this? Any 
> > documentation? 
> > 
> > -- 
> > Matt Gushee 
>
>