Hacker News new | past | comments | ask | show | jobs | submit login
Tranquil is a programming language built on top of LLVM & the Obj-C Runtime (github.com/fjolnir)
75 points by barredo on Dec 12, 2012 | hide | past | favorite | 28 comments



Please, no backticks. There are a whole bunch of keyboard layouts that don't have this.


Yikes! Thanks for the heads up. I use the backtick in a lightweight markup language that I'm making but felt uneasy about that choice. Now I have impetus to change it.


How do people with those layouts survive in bash?


    $( command )
$() is better than `, because you can nest them (TBH, I probably haven't had a need for nesting them in the past year or so, but I remember vividly that a few times I needed it badly and would be lost if I only had `s)


Just mentioning in case anyone cares, that hacker also released xnomad, which adds dwm-like window management to OS X. It's a bit buggy, but it works the vast majority of the time and rarely screws up……it just ignores things more than I would like and doesn't work well with multiple spaces.


Are you using the latest release? It should work fine with spaces now.

(Also worth a mention: xnomad is written in tranquil)


There is also eero which has similar goals. http://eerolanguage.org/


Seeing all these awesome projects makes me slightly depressed, everyone's building awesome interpreters and compilers, while I'm sitting here just working on <boring things>.


But boring things are where the money is.

Never, ever, ever underestimate the role of MONEY in your career choices. Not everyone has the heady mix of extreme intelligence and bloodyminded foolhardiness it takes to keep their feet in the startup world. For the rest of us, a steady comfortable position in ERP implementation/customization or somesuch will keep your head well above water in this shite economy.


Boring things are what make the world go round.

Unfortunately, many of these awesome things will never have the impact that something like a web form for building permit requests might have, outside of the greatly limited tech sphere.


Work on an awesome interpreter or compiler then?


Do you have a steady job? A mortgage? A family?

Watch your spare time for awesome compilers go down the drain when you acquire one or more of these.


> Do you have a steady job? A mortgage? A family?

Yes, I'm a Googler. No mortgage right now but rent is pretty pricey. Yes, a wife, a toddler, a baby, two dogs, and two cats. Also a one hour commute, each way.

I also have:

https://github.com/munificent/

http://magpie-lang.org/

http://finch.stuffwithstuff.com/

http://journal.stuffwithstuff.com/

You'd be surprised how much you can get done if you just throw half an hour a day at it.


I bet there are companies willing to pay you to work on an interpreter or compiler (though not necessarily any of the new-fangled ones that you consider awesome, I guess).


I assumed that by "working" he meant "on my free time". Spare time goes down the drain whatever you do.


Looks very cool, and the source code is neat which is a plus. I always wanted to make exactly what the OP did, but instead with a pythonic syntax.


The OP has done most of the work for you.


This interesting, i am especially impressed by the debugging stuff... however I contest the assertion of good performance. If you are using the Objective-C runtime then, in my world, you are dog slow. Sorry.

Anything that stops doing 10,000 nothings from compiling out is dirt to me... too easy to screw your performance by accident with Objective-C messaging and objects. (don't get me wrong, I enjoy their enormous power, I'd just like to only pay for it if I actually need something that dynamic - which is almost never)


Must be nice in the world of unfounded assertions.

Tranquil achieves good performance (when compared to other dynamic languages like ruby or python) by using tagged pointers for numbers & bypassing messages for arithmetic operators if both operands are tagged; batching allocations for objects frequently used in the fastpath, and other tricks.

If you compare it with writing straight C ..obviously it's slow. But then so is anything else.


its perfectly well founded and measurable.

my issue with objective-c and its runtime is the message passing implementation and the reliance on it - it is incredibly powerful, but the cost is phenomenal in the contexts i work with - and a common optimisation i find myself doing is making C++ style calls out of c functions with a 'this' as the first parameter.

there is no real need for this cost if the compiler could have more information about use and respected the "don't pay for what you don't need"


(it is good you avoid it for operators etc. - so you must be aware of the issue and how it can be avoided with a little common sense and work)


> if I actually need something that dynamic - which is almost never

The classic case of someone criticizing a screwdriver for not being a chisel. (And then saying, "Oh, look, see how well my chisel chisels?")


i'd like to use objective-c as both screwdriver and chisel. there is nothing wrong with this imo - i can see how to fix the problems myself for instance. it would make a very good chisel with some work, without compromising its screwdriver capabilities.


Your criticism reads a bit like "This kitchen knife says it cuts amazingly fast and clean, but as a lumberjack, I have to say I find it's horrible at cutting."


this is a very good analogy and precisely what i am saying. :)


If you like Objective-C but not Apple's runtime, you should check out ObjFW: https://webkeks.org/objfw/


To be pedantic, ObjFW is an alternative framework, not an alternative runtime. They do include a runtime for architectures that do not have a native ObjC runtime, but that runtime is API compatible with Apple's. Since they use the same compilers (clang and gcc) they have the same inlining limitations and the compiler will generate calls into the runtime in the exact same places.


But the runtime has a faster dispatch than Apple's ;).

Actually, I don't get all this "Messaging is slow". In the ObjFW runtime, it's just 12 instructions for x86_64. That's barely noticable. I even used ObjC in an HPC application and compared it to the C version, just for fun. There was no measurable difference in performance.

What's more important in the average application is that the foundation classes are fast. For example, C#'s and Cocoa's dictionaries are really slow (but I don't know why). While C# and Cocoa both need 1.2 sec to insert 1 Mio objects into a dictionary and retrieve them, ObjFW only needs 0.3.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: