Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Yttrill
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
1.
▲
Felix 2018.09.16 Released
(github.com)
1 points
by
Yttrill
8y ago
|
0 comments
2.
▲
by
Yttrill
8y ago
Really? Thats not my understanding, its much smarter than that. Goroutines steal memory from the current pthread machine stack, that is, the machine stack. The problem calling C from a goroutine is that whilst you have a real C stack right
3.
▲
by
Yttrill
8y ago
C++ and Felix obviously have the lowest overhead .. namely zero in both cases :-)
4.
▲
by
Yttrill
9y ago
Modules would be very hard to make work in C++, there's way too much entanglement at all levels. Of course the rot actually started with the ANSI C committee when it introduced typedef and broke context free parsing. C++ just compounds
5.
▲
by
Yttrill
14y ago
Claims 3 and 6 lack a true understanding of Ocaml. The compiler's error messages are exceptionally good in most cases. Syntax errors without detail are a product of the parsing technology: its a minor irritant and worst. The most difficult
6.
▲
by
Yttrill
14y ago
There certainly are languages that can provably ensure all cases are handled. Have a look at ATS.
7.
▲
by
Yttrill
14y ago
This does reflect very sadly on schools, and shows up when trying to explain things to programmers used to conventional languages, especially if you're trying to explain why C is fundamentally broken. Roughly there are three fundamental con
8.
▲
by
Yttrill
14y ago
I'm afraid the argument that C+ASM is always faster is flawed in reality. Pure ASM, with a bit of C thrown in, maybe, but this is just as impractical for complex codes as C itself is. It is well known that for numerical codes Fortran beats
9.
▲
by
Yttrill
14y ago
Felix is built on an extensible parser which uses EBNF for the productions. The Felix "language" is defined in the library by such productions. The action codes of the grammar are arbitrary Scheme functions returning non-arbitrary s-express
10.
▲
by
Yttrill
14y ago
Basically this is to support "expression" like syntax such as people are used to in C, for example i++ and x=y are expressions with side effects in C and a lot of C idioms depend on such things. This kind of thing was originally not allowed
11.
▲
by
Yttrill
14y ago
One needs closures, that is, functional values bound to some context, for higher order functions (HOFs). For example in C++ much of STL was pretty useless until C++11 added lambdas. Many systems provide for closures in C, by requiring you r
12.
▲
by
Yttrill
14y ago
As a whole program analyser, Felix does a lot of optimisations. The most important one is inlining. Felix pretty much inlines everything :) When a function is inlined, there are two things you can do with the arguments: assign them to varia
13.
▲
by
Yttrill
14y ago
This is a hard question to answer. In general the emphasis changed from getting the compiler to work, and to generate efficient code, to using the technology to implement a rich set of libraries (feedback into compiler), and then writing so
14.
▲
by
Yttrill
14y ago
That's correct. However, somewhat problematically, Felix considers the tuple int * int to actually be an array int ^ 2. It's not entirely clear this "automatically applied isomorphism" is a good idea though. However it means arrays "drop ou
15.
▲
by
Yttrill
14y ago
The proc/gen/fun distinction isn't entirely an optimisation issue, its a semantic one, heavily related to the implementation model. In principle fun and gen use the machine stack for return addresses whilst proc uses a heap allocated list w
16.
▲
by
Yttrill
14y ago
Did I mention Felix is based on Cat-e-gory theory and named for the inventor of one-sided donuts?
17.
▲
by
Yttrill
14y ago
Macbook Pro: ~/felix>flx --test=build/release --static mt ~/felix>time ./mt real 0m0.004s user 0m0.001s sys 0m0.002s ~/felix>time ../lua-5.2.1/src/lua mt.lua real 0m0.006s user 0m0.001s sys 0m0.003s
18.
▲
by
Yttrill
14y ago
There is an alternative: a quick start GUI mini-IDE which allows you to type in and edit the code and press a button to run it. Such tools are mandatory on Windows anyhow: Ocaml and Python both have this for example. Most Unix editors like
19.
▲
by
Yttrill
14y ago
for var i in 1 upto 15 do println$ match i % 3, i % 5 with | 0,0 => "Fizz-Buzz" | 0,_ => "Fizz" | _,0 => "Buzz" | _ => str i endmatch ; done Did I get the job?
20.
▲
by
Yttrill
14y ago
Yes, provided you collect all the required library headers and either sources or binaries: the generated C++ still requires run time libraries and the top level driver if it's a program. There is actually an option of flx, --bundle=dirname,
21.
▲
by
Yttrill
14y ago
Python and Lua are both compiled languages, almost all languages are compiled these days. They compile to bytecode rather than native machine code, then run an interpreter which may well do on-the-fly compilation to machine code (JIT). Byt
22.
▲
by
Yttrill
14y ago
Two choices dictate a terminator: (a) free form 1D language like C vs 2D language like Python or Haskell, and, (b) support for assignment statements x = y and the like as in C vs all statements starting with a keyword as in say ATS. I perso
23.
▲
by
Yttrill
14y ago
I am sorry about this problem. I have had a look and I understand what is happening but not how to fix it. Python 3.2 does not provide a timeout in the subprocess module. fbuild is using a module by Peter Astrand which derived a new class a
24.
▲
by
Yttrill
14y ago
It works with this: ~/felix>python3 Python 3.2.3 (v3.2.3:3d0686d90f55, Apr 10 2012, 11:25:50) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin and also on Linux with this: skaller@felix:~$ python3 Python 3.2.3 (default, Oct 19 201
25.
▲
by
Yttrill
14y ago
The webserver, which is written in Felix, translates a particular format called "fdoc" to create the tutorial and slides, including embedded colourised hyperlinked Felix and C++ code. The translation is to a mix of HTML5 and Javascript. Thi
26.
▲
by
Yttrill
14y ago
Of course there is C specific hardware! X86 provided efficient call/return protocol instructions including display management, specifically targeting Pascal/Modula style languages. Microsoft Windows 3.1 even mandated this calling protocol.
27.
▲
by
Yttrill
14y ago
Au contrare it is C which is handicapped. How handicapped is C++ considering it subsumes C, can use C right at the source level, has an inline FFI, and yet C++ libraries can't be called by C because C++ provides type-safe linkage. Advanced