Live data from Hacker News

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

news.ycombinator.com

151–160 of 247 posts

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

#151
In 1990 I started work at a tiny company run by people out of the mainframe data-processing world (apparently). Over the next year or so I created what was more or less Scheme with an infix syntax, plus a DSL for data formats. It happened gradually, starting with the DSL -- before that they'd write custom little programs in C to convert from a new client's format, etc. Then hey, why don't I hook up an arithmetic evaluator so we can filter records without another custom program? (They'd evaluated microcomputer database sytems as unsuitable.) And so on, until they had a real scripting language in a couple thousand lines of C. Nowadays you'd be kind of nuts to do this, but it was mostly a great success, and the gradual insinuation of this way of doing things was much easier to sell (from a guy right out of school) than bringing in a whole new language like Perl, if I could even be sure Perl would be right for them -- I'd just seen it listed in ads in Dr. Dobb's Journal. None of us were on the net. It was a different world.

The fun exception to the success was the time I tweaked something and broke the garbage collector, and we only found out when a job went back to the client with completely bogus results. An educational moment for me.

Years later at JPL I helped with a new Scheme dialect. It was partly in response to the politics described in "Lisp at JPL" https://news.ycombinator.com/item?id=2212211 -- we could say "this is actually a C program, see" -- but the language design was quite nice, IMHO. I can say that without backpatting because it was mostly done before I came in. Influenced by ML and Dylan; a shame it never was released.

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

#152
post #68

Earlier quoted context omitted.

Isn't it just possessing both conditionals and loops?

One more thing - memory. A Turing Machine is literally just a tape, a movable reader/writer, and a bunch of states that dictate what the reader/writer does. As long as you have memory, the ability to write to memory, conditionals, and some form of looping, whether it's a `while` loop, a `for` loop, or a `jmp` or `GOTO` instruction, it's Turing complete. Note that a conditional jump (`jne`, for example) satisfies both…

yup memory. yup.

I forgot...

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

#153
I made one foray into language creation that some folks may find interesting, although I am very much an amateur. I designed a declarative language attempting to mimic the structure of human concepts. The idea was partly to try out this hypothesis that all concepts are reducible to 'types' and 'relations', and to try creating a language based on those two primitives. After coming up with some concept hierarchy, you could use it to generate particular instances of the root concept—the idea being to use it for procedural content generation. Here's some sample code:

  Chair: 
	(legs: Cylinder, seat: Slab, back: Slab)
	{
		attachment(legs, seat)
		attachment(seat, back)
	}

  TestType1:
	OriginType 
	(
		a: unsequence[x: Type2, xor[y: {Type3}(), z: type4]],
	 	b: optional[Fruit], c: >3[pet: Animal], d: 2[Animal(Blah){}]
	)
	{
		constraint1(x, y, z)->recognize->toInt
		constraint2(x, z.a.b.c)
		constraint3(z, y)
	}
I wrote a grammar for the language and generated a parser, and have a design for the runtime on paper—but, the design was rather complex and for various reasons I thought it would be best to build a general purpose data structure visualizer to assist in writing it. That ended up being a quite large project on its own, which I'm still working on (quick demo: https://www.youtube.com/watch?v=HpxgUVNAhXc ; more info: http://symbolflux.net/projects/avd).

I also realized recently that my main 'innovations' were already covered by the logic programming paradigm decades ago, so that has discouraged me some. (And I've recently started thinking that machine learning will be better for doing procedural content generation than anything produced by explicit descriptions.)

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

#154
I write a DSL now and then. I also wrote Toadskin[1]. This is a good reminder for me to rescue it from the Internet Archive and stick it in GitHub along with the fix for the bug in '[' that it looks like I never published.

The reason I gave at the time was: "If you have to ask, then you have never been stuck in a hotel room in Fort Worth with no internet access." (This was 2003)

1. https://esolangs.org/wiki/Toadskin

Edit: Actually there's more than one bug there. I'll get it fixed before I revive it.

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

#155
I once created an emulator for HP Time-Shared BASIC (https://en.m.wikipedia.org/wiki/HP_Time-Shared_BASIC) so I could run the original code for the original text-adventure form of Oregon Trail. I already had much of the AST parsing infrastructure in place for a syntax highlighting text editor I had written. The text editor component got extended to be the terminal emulator. This was all in JavaScript, rendering with Canvas2D, so that the resultant image could be textured into a 3D model of a Commodore PET (the only "old" computer model I could find that didn't cost an arm and a leg to download) in WebGL, then displayed in a VR headset through WebVR.

I regret nothing.

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

#156
Yes, I wrote a few different ones for text-based BBS games I wrote in the 90s. I did it because I wanted to write a totally customizable game engine that didn't require any additional tools. Also, I don't think there were too many free options for me at the time. (Maybe there were, but I didn't really look.)

I did it again years later when I was writing another game engine, this time sprite-based. In this case, I could've used an external scripting language like lua, but I figured it would be fun to learn what it takes to write my own language.

I learned a ton in both cases even though they were really toy languages that were meant for a very tiny scenario.

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

#157
post #129

Yes, EasyAM, a programming language for organizing analysis conversations. I created it to eliminate: 1) Situations where different people in an organization have conversations about the same thing and reach different results, not being aware of the duplication 2) Situations where lots of people in an organization are forced to copy and repeat the same information over and over again 3) Churning and duplication of ef…

Is there any documentation about this? Would by nice to have as a simple interface to a RM tool.

Sure. Email me.

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

#158
I love creating programming languages! They're powerful tools of abstraction - designed well they make complex concepts look simple.

Couple of examples - a language that compiles to Bitcoin script opcodes [0]. Although the Bitcoin script engine is stack based (easier to follow) I couldn't resist designing a small, simple language that could be used to write transaction output scripts. This way it's easy to understand what are the conditions of moving funds to the next owner.

Another language has first-class functions, operators as functions, optional lazy computations, but more importantly a small runtime that supports tail-calls and capturing execution as a value (callcc) [1].

I've also written parser and interpreter for Prolog [2], just to get the feeling of logic programming.

Writing a small language can make you understand the paradigm (functional, imperative etc.) better and it takes a great deal of effort to decide how should the syntax look like, how will the runtime work (usually with toy languages you provide runtime too...).

Edit: Just noticed the "except toy languages" part... :-/

[0]: https://curiosity-driven.org/bitcoin-contracts

[1]: https://curiosity-driven.org/continuations

[2]: https://curiosity-driven.org/prolog-interpreter

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

#159
I’ve been working on a statically typed concatenative programming language, Kitten[1], off and on for a few years now. I plan to do an early release this year.

I started working on the language to bring an elegant compositional style to low-level high-performance programming, in the form of a simple language that admits powerful tooling for program editing and visualisation. I also wanted to address usability concerns with stack-based languages (e.g., by allowing infix operators). As I’ve spent time in industry, I’ve begun to treat it as a way to address my gripes with C, C++, and Haskell; and as I’ve learned more type theory, I’ve begun to use it as a playground for type system research.

The goal is to allow pure functional programming that “feels imperative”, with a simple performance model (unboxed values by default, in-place updates, no laziness) and minimal runtime support (no GC, eventually no libc).

The latest compiler is nearly complete, but not yet usable for real programming. Still, you may like to keep an eye on its development.

[1]: https://github.com/evincarofautumn/kitten

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

#160
Long ago I found a copy of "System Design from Provably Correct Constructs" at the Seattle public library. I didn't realize it at the time but I now know that it is basically a presentation of Dr. Margaret Hamilton's Higher-Order Software ideas. In essence it's a thin AST that is only modified by operations that preserve certain kinds of correctness (i.e. type safety), with a tiny core of essential combinators that are combined (again, in "provably correct" ways) to form control-flow constructs. I was struck by the essential simplicity and spent time on and off trying to get a implementation working. (It never amounted to much but it DID get me my first job as a programmer!)

Eventually, I found Manfred von Thun's Joy language and realized that it was better than my thing and now I've implemented that in Python in Continuation-Passing Style. https://github.com/calroc/joypy

I think Joy is pretty amazing. It's a Functional Programming language that superficially resembles Forth, in that it's stack-based, but it's much more like a mathematical notation. https://en.wikipedia.org/wiki/Joy_(programming_language)

Post reply on HN