Live data from Hacker News

Ask HN: Have you created a programming language and why?

news.ycombinator.com

51–60 of 247 posts

Re: Ask HN: Have you created a programming language and why?

#51
post #49
post #18

I've created three instances of what I'd consider to be programming languages. The first was something I did in an intro to CS class. I asked the professor if I could use C++ rather than Pascal for the assignment, and was, of course, turned down. I'm not proud to admit to this, but in a fit of pique, I decided to write my own programming language in Pascal than then submit the assignment in that. The result was somet…

> I did get an A, the professor said I should've gotten bonus points, but in retrospect he would've been within his rights to fail me outright Well, to be fair, in the real world its not too rare for engineers to write custom programming languages to solve their problems (see: this thread). So what you did isn't that far outside of what's really done, assuming you submitted the code for the programming language with…

> That said, I think he would have been within his rights to give you a C for overengineering it :p.

Exactly.

Re: Ask HN: Have you created a programming language and why?

#52

I'm currently making a programming language that tries not to be a programming language. To give some background: I'm working on a program to allow anyone to create video games. But to add custom functionality, my users need to use some kind of programming/scripting language. Since these are non-technical people, it must be as easy and simple as possible. Therefore I'm now making a language (called Screenplay) where…

I don't think the marketing concept of non-technical programing makes sense. Its like trying to sell atonal arrhythmic music. Or randomization as an interior design strategy. You've already embedded learning in the design where the user has to understand its Subject-Verb not Verb-Subject. Also my experience with OO design is non-technical non-logical people will have truly weird arguments trying to convince you that your objects should be methods and vice versa due to lack of skill at being able to design. By analogy someone who knows how, can always convert a PDA to a CFG, its mathematically proven if you know how you can always do the transform or even write a program (compiler?) to do the transform for you in either direction. But if you don't know how it works or what any of that automata theory jargon means, well, then you just can't, thats it, game over. Likewise your end user can either program at some level, where they can convert culture and emotions and brain waves and other stuff into code, or they can't. And if they can't, well, they just can't.

I'd suggest you market it as a really simple programming language. That'll work. What you've got technically looks good an sounds like it could be useful, so, cool, but you just need to change how you're selling it. Realize that people who can't logically structure and rationally think and technically design will continue to be unable to program, of course, no matter how easy the tool is to use.

Remember most people are functionally illiterate and can't read at a high cognitive level. That probably correlates very strongly with being unable to program BTW.

(edited to add, this was the wisdom of the GUI. Plenty of people are too illiterate and non-technical to ever be able to use languages, including even English prose, as a computer UI. But if you strip out most of the functionality and change it from linguistic IQ skill points to 2-D spatial manipulation, lots more people can "use" that UI... Nobody ever got noobs to use computers via every "simpler" and dumber CLIs, that madness leads to CPM and msdos, the trick was to get lower intellectual functioning people to use computers by taking away power/complexity and abandoning language and literacy entirely by going spatial with GUIs, I'm just saying as a strategy making the tool weaker never helped people who can't use tools as a historical strategy)

Re: Ask HN: Have you created a programming language and why?

#53
We created the Lamdu language that is designed to work well with its IDE.

It has some features we miss in other languages (extensible&structural product and sum types), but also makes different trade-offs (all names are GUIDs behind the scenes, parameters to multi-param functions are [almost] always named).

https://medium.com/lamdu-blog/designing-programming-language...

Re: Ask HN: Have you created a programming language and why?

#54
Although I am not the creator of it, I am a frequent contributor to Pyret [0], (I'm the error message czar, and prototyped the language support for tabular data).

Beyond that: Writing an interpreter is typically the first thing I do when I am trying to pick up a new language.

To anyone interested in learning how to design and implement a programming language, I highly recommend the 2015 offering of Brown's "Programming Languages" [1]. Implementing type inference was a revelation for me! The starter code is supplied in Pyret, but the material isn't language-dependent; the assignments can be implemented in any language.

[0] http://www.pyret.org/ [1] http://cs.brown.edu/courses/cs173/2015/assignments.html

Re: Ask HN: Have you created a programming language and why?

#55

When I was in college, I was addicted to Starcraft II. Luckily, I primarily played 4v4s so the brainpower necessary to win wasn't nearly as high as 1v1s (which left far less room to meme, so I didn't enjoy them nearly as much). However, while playing game after game in the evenings, I was always frustrated that I was using the inputs and outputs of my body so inefficiently. Starcraft tied up my eyes and my hands, but…

This is really interesting. How are you able to multitask so well? I can't hardly listen to a podcast and code at the same time, let alone play a game.

Re: Ask HN: Have you created a programming language and why?

#56
I made ChoiceScript, a DSL for writing interactive novels in the style of choose-a-path gamebooks, but longer, richer, and deeper. https://www.choiceofgames.com/make-your-own-games/choicescri...

The goal was to build a language simple enough that we could teach it to non-coder authors, to scale up the number of interactive novels we could publish.

It seems to be working. ChoiceScript is the core of our business; we're profitable with a staff of four editors, a production assistant, plus me, the main tech person. We've found that ChoiceScript makes it easier to teach writers to code than it is to teach coders how to write.

Re: Ask HN: Have you created a programming language and why?

#57

I made ChoiceScript, a DSL for writing interactive novels in the style of choose-a-path gamebooks, but longer, richer, and deeper. https://www.choiceofgames.com/make-your-own-games/choicescri... The goal was to build a language simple enough that we could teach it to non-coder authors, to scale up the number of interactive novels we could publish. It seems to be working. ChoiceScript is the core of our business; we'r…

Out of curiosity, what's your opinion of Squiffy?

Re: Ask HN: Have you created a programming language and why?

#58
I'm in the process of making a user-facing scripting language for my hobby project Rolz.org (https://rolz.org), that's going to be a very simple affair.

My only attempt at making a "serious" language was np-lang (http://np-lang.org/tutorial - but it's defunct right now). Initially I made an interpreter in Java, later I made a parser that creates bytecode for a slightly mutated Lua VM. The reason why it's not being maintained right now is that, while basing the runtime on the Lua VM was attractive at first, it was really a dead end for me productivity-wise because I ended up spending more time with the Lua internals than was practical.

The reason why I started the np-lang experiment was that I wanted to experiment with a language that could ultimately become my scripting language of choice for web projects. I was never happy enough with it though.

I'll probably try again to make a language with that goal in mind, when I have some time and motivation to spare.

Apart from that I created several toy programming languages over the years because it's fun and I think it's also practice that can make you a better programmer by gaining a deeper understanding of the design decisions that go into a programming language and its runtime.

I also made some project-specific DSLs, mainly to facilitate configuration and user scripting. And simple, BASIC-like scripting interpreters for toy RPG projects.

Re: Ask HN: Have you created a programming language and why?

#59
I made a toy language called Cowbel to experiment with various language minimalism features:

http://cowlark.com/cowbel/example.html

It's an attempt to take as many features as possible out of a language and still have an expressive Javascript-like language. It worked pretty well, but of course, actually producing the compiler is the easiest part of any new programming language.

Features include:

- all types are anonymous (although interfaces are named)

- aggressive type inference which allows the compiler to distinguish between scalars, direct objects and indirect objects (via a vtable) at compile time --- not only does it do direct function calls if it knows what type an object is, but you don't have the scalar/object schizophrenia that Java and C++ does; integers are just objects implementing the int interface, but there's no object overhead

- very limited compiler knowledge of the language semantics --- int semantics like addition, subtraction etc are defined in the standard library

- template-based generics, full closures, nested functions

- multiple return values

- objects, methods (but no classes)

- non-nullable

- compiles into C for maximum interoperability

It was going to have prototypical inheritance via composition, where an object could inherit methods from an arbitrary number of other objects, but I never got round to implementing that bit.

One of the bits I'm most proud of is that I managed to unify block scopes and object constructors. {...} constructs an object. The only difference between one used as a block and one used as a constructor is whether you assign the result to anything --- the compiler just optimises everything away is you don't! This makes nested functions and methods identical, and drastically simplifies the language semantics...

    if (condition) { thisIsABlock(); }
    var object = { thisIsAnObject(); }
It's not actually useful, mind. There are too many rough edges and the compiler tends to crash if you give it invalid code. But it was really interesting to do.

Re: Ask HN: Have you created a programming language and why?

#60
post #21

I created a non-Turing complete programming language for editing animations, implemented as a GIMP Script-Fu script (Scheme, basically). Here's the documentation: http://tshatrov.github.io/animstack Why? Because in GIMP it's annoying to edit animations with many layers, so I wanted to write a script that would do what I want. But rather than hardcoding a specific action, I wrote it in an extensible way, and the rest…

Non-Turing complete languages are useful, but it has been my impression that it is difficult to be powerful enough to be useful without being (accidentally!) Turing complete.

As a Computer Scientist, I actually find the distinction Turing and non-Turing to be rather obscure. Perhaps I am in the ignorant minority on this.
Post reply on HN