News for hackers. Stuff that matters.
Re:Factor: An impressive stack-based language environment by foldr on Saturday August 11, 2018 @07:45AM (#17739311)
Factor is definitely very cool. Apart from being stack-based, it's also impressive for compiling to native code on Windows, Linux and OS X without going via LLVM or anything similar. It can even produce self-contained executables.

IIRC, named local variables have been available as a library feature for a long time now, so you don't have to write in a concatenative style when it's cumbersome to do so.

Re:Factor: An impressive stack-based language environment by phoe-krk on Saturday August 11, 2018 @08:19AM (#17739398)
It basically has its own native compiler built-in, just like many Lisp, Scheme and Smalltalk implementations.
Re:Factor: An impressive stack-based language environment by pome on Saturday August 11, 2018 @09:44AM (#17739638)
How Factor compiler is different from something like SBCL? It's interesting because Factor have plans to support ARM/Android/iOS, how hard to achieve these goals? It's interesting because Common Lisp's (SBCL, CCL), Scheme (Chez Scheme), Smalltalk (Pharo, Squeak) also have native compiler's, but no one have iOS/Android support, SBCL also have self-contained executables and ARM port. What are the biggest problems to these projects from having iOS/Android support.
Re:Factor: An impressive stack-based language environment by lispm on Saturday August 11, 2018 @02:35PM (#17740939)
LispWorks has a native compiler and supports Android and iOS: http://www.lispworks.com/products/lw4mr.html

The iOS situation is difficult, because Apple does not allow runtime compiled/loaded code in general. LispWorks pre-compiles Lisp code and one creates an App with the help of Apple's Xcode. LispWorks has still an Interpreter at runtime. Generally it is a very complete implementation of Common Lisp (minus the runtime compilation), but without a Lisp-based GUI library. They also had to write a special Garbage Collector for the 64bit ARM iOS. Seems like it was not possible to have their usually more advanced GC, which for example is available with their 64bit ARM Linux port of LispWorks.

Re:Factor: An impressive stack-based language environment by ppseafield on Saturday August 11, 2018 @04:34PM (#17741369)
That's not exactly Apple's policy - there are React Native apps in the iOS store, and that runs on nodejs. Apple specifically forbids applications that download and run code or allow for other code outside of the application's code to be run. I.e. any and all code that your application will execute has to be submitted with your app.

https://developer.apple.com/app-store/review/guidelines/ specifically 2.5.2

Re:Factor: An impressive stack-based language environment by lispm on Saturday August 11, 2018 @05:24PM (#17741622)
https://code.janeasystems.com/nodejs-mobile

> On iOS, V8 cannot run because the operating system forbids just-in-time compilation; so instead of V8, we use our own port of the ChakraCore engine, on top of the integration with Node that Microsoft created in Node.js on ChakraCore. ChakraCore has a well-optimized, pure interpreter mode which complies with iOS’ restrictions.

http://www.janeasystems.com/blog/node-js-meets-ios/

> Apple does not allow Just-In-Time compilation on iOS (except for its own JavaScriptCore engine).

So the claim is that Apple will not allow a third-party Javascript engine which provides a JIT - even though interpreted code engines are allowed and this is what their node.js version did.

My impression is also that this is a technical restriction.

Has that changed?

Re:Factor: An impressive stack-based language environment by ppseafield on Saturday August 11, 2018 @08:02PM (#17742211)
Ah, you're right. I should have read your comment more carefully.

> ChakraCore has a well-optimized, pure interpreter mode which complies with iOS’ restrictions.

(Which does not include runtime-compilation.)

Re:Factor: An impressive stack-based language environment by doublec on Saturday August 11, 2018 @06:58PM (#17741994)
Factor used to have ARM support back in the days of Windows Mobile: https://bluishcoder.co.nz/2007/02/17/factor-on-windows-mobil...

The ARM backend has bitrot now so no longer works.

Re:Factor: An impressive stack-based language environment by 3rdAccount on Saturday August 11, 2018 @01:19PM (#17740585)
SBCL & Chez are really fast. I don't remember Factor having very high performance.
Re:Factor: An impressive stack-based language environment by pome on Saturday August 11, 2018 @01:34PM (#17740646)
There are some old benchmarks (2010) - http://factor-language.blogspot.com/2010/05/comparing-factor... , in 2018 sure, situation I think is different.