News for hackers. Stuff that matters.
Re:Tranquil is a programming language built on top of LLVM &... by jheriko on Wednesday December 12, 2012 @11:38AM (#4910967)
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)

Re:Tranquil is a programming language built on top of LLVM &... by fyolnish on Wednesday December 12, 2012 @12:03PM (#4911146)
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.

Re:Tranquil is a programming language built on top of LLVM &... by jheriko on Tuesday December 18, 2012 @09:38AM (#4937640)
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"

Re:Tranquil is a programming language built on top of LLVM &... by jheriko on Tuesday December 18, 2012 @09:41AM (#4937651)
(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)
Re:Tranquil is a programming language built on top of LLVM &... by stcredzero on Wednesday December 12, 2012 @01:08PM (#4911550)
> 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?")

Re:Tranquil is a programming language built on top of LLVM &... by jheriko on Tuesday December 18, 2012 @09:40AM (#4937648)
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.
Re:Tranquil is a programming language built on top of LLVM &... by chc on Wednesday December 12, 2012 @01:08PM (#4911553)
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."
Re:Tranquil is a programming language built on top of LLVM &... by jheriko on Tuesday December 18, 2012 @09:39AM (#4937644)
this is a very good analogy and precisely what i am saying. :)
Re:Tranquil is a programming language built on top of LLVM &... by jrajav on Wednesday December 12, 2012 @11:44AM (#4911002)
If you like Objective-C but not Apple's runtime, you should check out ObjFW: https://webkeks.org/objfw/
Re:Tranquil is a programming language built on top of LLVM &... by lgg on Wednesday December 12, 2012 @01:19PM (#4911613)
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.
Re:Tranquil is a programming language built on top of LLVM &... by Midar on Monday December 24, 2012 @05:53AM (#4962495)
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.