Live data from Hacker News

Sylph: the programming language I want

eev.ee

61–70 of 119 posts

Re: Sylph: the programming language I want

#61

A lot of syntax / spacing / etc. problems would go away if we stopped using completely plain text as the medium for programming languages. Or rather, if we extended plain text, or got our editors to understand the languages a bit more thoroughly than just highlighting keywords and giving us autocompletion or whatever. This has been explored a bit by michaelw and others ( http://www.foldr.org/~michaelw/emacs/ ) for li…

This was tried. It was called APL. http://en.wikipedia.org/wiki/APL_%28programming_language%29 It was very, very clever. It was so clever hardly anyone understood it, and it's (mostly) forgotten. Having said that - I kind of agree. It seems like most languages are attempts to: 1. Create a human-readable text-based representation of symbolic logic. 2. Chunk the symbolic logic in (hopefully) useful ways. 3. Cross-corre…

>This was tried. It was called APL.

APL is absolutely nothing like the parent described.

Re: Sylph: the programming language I want

#62

> it’s sometimes asked why len in Python is a function, rather than a method. The answer is that of course it is a method, called __len__. The real answer is that Python pointedly and deliberately does not reserve any method That's some comical post rationalization. The reason why len is a function is because it was in Python before Python started receiving OO features. As a result, Python is a crazy hodge podge of i…

This is a myth. Python supported classes close to the start of its existence, way before it became popular.

Re: Sylph: the programming language I want

#63

A lot of syntax / spacing / etc. problems would go away if we stopped using completely plain text as the medium for programming languages. Or rather, if we extended plain text, or got our editors to understand the languages a bit more thoroughly than just highlighting keywords and giving us autocompletion or whatever. This has been explored a bit by michaelw and others ( http://www.foldr.org/~michaelw/emacs/ ) for li…

This was tried. It was called APL. http://en.wikipedia.org/wiki/APL_%28programming_language%29 It was very, very clever. It was so clever hardly anyone understood it, and it's (mostly) forgotten. Having said that - I kind of agree. It seems like most languages are attempts to: 1. Create a human-readable text-based representation of symbolic logic. 2. Chunk the symbolic logic in (hopefully) useful ways. 3. Cross-corre…

Interesting that you use the past tense. I am using such a language in the present. And it is working just fine. I have no need for Python but so many people are seemingly trying to coax me to use it. Such is the case for most of the verbose languages.

I do not understand all the constant discourse about languages. Personally I prefer to choose something simple and small, and stick to it. To increase convenience when working with these terse languages, I write code generators.

To me, it is not the language that matters (except as below), it is the programs that the author chooses to write and how those programs perform.

It is probably my own selective bias but I find that the smaller programs written in relatively terse languages tend to be of higher quality. When I see a verbose language used to write a program, I am reluctant to use the program. But I would never suggest that someone else make the same decisions. I believe one should think for herself.

There is not so much discussion about the terse languages I use. I am inclined to think this is a good thing. Then I can focus on the choice of the programs the author chooses to write instead of her choice of language.

Re: Sylph: the programming language I want

#64
post #60

Earlier quoted context omitted.

Not at all. In this case, by 'languages without braces' we mean languages where indentation is part of the grammar. Python's grammar includes explicit INDENT/DEDENT tokens. It is impossible to reindent this mangled python: if z: print 'a' print 'b'

Why would it be improperly indented in the first place? How is removing the indentation any different from removing braces? Sure, when you paste code somewhere that expects prose (Facebook status updates, for example), it will consolidate consecutive whitespace and thereby remove the indentation, but you shouldn't be pasting code into a place like that anyway, because no matter what you do it'll be unreadable, and mo…

I did not make the value judgment you are arguing against.

Re: Sylph: the programming language I want

#65

> it’s sometimes asked why len in Python is a function, rather than a method. The answer is that of course it is a method, called __len__. The real answer is that Python pointedly and deliberately does not reserve any method That's some comical post rationalization. The reason why len is a function is because it was in Python before Python started receiving OO features. As a result, Python is a crazy hodge podge of i…

I really like the approach of allowing either kind of call, with the "dot" style mere convenience over the function style. Rust has that sort of thing:

    let v = &vec![1u32,2,3];
    println!("{}", v.len());
    println!("{}", Vec::len(v));

Re: Sylph: the programming language I want

#66
post #59

Earlier quoted context omitted.

> The indention doesn't mean anything to C programmers So you could read and debug a 5000-line program written all on one line without reformatting it?

What does "5000 lines all on one line" mean? If it fits on a page I don't have trouble reading it. Line breaks tend to make it harder to fit on a page and not easier. Example: http://www.nsl.com/papers/origins.htm

You can honestly read and understand that as-is? And adding line breaks and proper indentation would make it absolutely no easier? Impressive. I don't think there's many C programmers who have that ability.

Re: Sylph: the programming language I want

#67
post #59

Earlier quoted context omitted.

What does "5000 lines all on one line" mean? If it fits on a page I don't have trouble reading it. Line breaks tend to make it harder to fit on a page and not easier. Example: http://www.nsl.com/papers/origins.htm

You can honestly read and understand that as-is? And adding line breaks and proper indentation would make it absolutely no easier? Impressive. I don't think there's many C programmers who have that ability.

Yes I can read this, and adding line breaks would not make it easier.

In fact I think it would make it worse.

This has come up before, if you're interested:

* https://news.ycombinator.com/item?id=8476189

* https://news.ycombinator.com/item?id=8476702

It is also something I set out to learn how to do because I saw someone else do it: If someone produces smaller and faster code than me, then I should want to learn from it.

When working with others, I will often extemporise my code for their sake. I sometimes make mistakes when doing this, but sometimes making friends is more important than fast and correct programs.

Re: Sylph: the programming language I want

#68

> it’s sometimes asked why len in Python is a function, rather than a method. The answer is that of course it is a method, called __len__. The real answer is that Python pointedly and deliberately does not reserve any method That's some comical post rationalization. The reason why len is a function is because it was in Python before Python started receiving OO features. As a result, Python is a crazy hodge podge of i…

I really like the approach of allowing either kind of call, with the "dot" style mere convenience over the function style. Rust has that sort of thing: let v = &vec![1u32,2,3]; println!("{}", v.len()); println!("{}", Vec::len(v));

In general this feature is sometimes called "Universal Function Call Syntax" (UFCS), though interestingly Rust does it exactly the opposite of most other languages with this feature. In Rust, defining a method lets you use it as a free function; in C# and D, defining a free function lets you use it as a method.

Re: Sylph: the programming language I want

#69
The lang I want would be mixture of C, C++, Go, Rust, Julia, JavaScript 6, PHP 7, Swift, Lua.

  * Optional typing (like PHP7/Hack/ES7)
  * support for compilation (statically linked native
    binaries) and JIT (like Visual Basic 6 with its P-Code)
  * memory safety (no null/dangling pointers like Rust)
  * procedural & object oriented & functional style 
    (like JavaScript/PHP/C++)
  * modern base standard library / API (like 
    C/Go/JavaScript/PHP but more modern with better naming, 
    not as heavy as Java class libraries or .Net Framework)
  * third party libraries (like Nodejs NPM)
  * online documentation with code samples and 
    community comments (like PHP.net)
  * good debugger
  * IDE plugins for IDEA/Eclipse/VS
  * good OS support (32 & 64bit) for:
    Windows & OSX & Linux & BSD & iOS & Android.
Edit:

  * Actor model (like Erlang)
  * Built-in concurrency primitives:
    ° light-weight processes (like Fibers in WinAPI, 
      Coroutine in Lua, Goroutine in Go), 
    ° Channels (interprocess communication and 
      synchronization via message passing like in Go 
      and OCaml)

Re: Sylph: the programming language I want

#70
post #69

The lang I want would be mixture of C, C++, Go, Rust, Julia, JavaScript 6, PHP 7, Swift, Lua. * Optional typing (like PHP7/Hack/ES7) * support for compilation (statically linked native binaries) and JIT (like Visual Basic 6 with its P-Code) * memory safety (no null/dangling pointers like Rust) * procedural & object oriented & functional style (like JavaScript/PHP/C++) * modern base standard library / API (like C/Go/J…

I would add the Actor model of Erlang.
Post reply on HN