john skaller | 30 Aug 10:25 2014
Picon
Picon

Re: [felix] [felix-lang/felix] 7729af: Makefile fixes:


On 30/08/2014, at 5:34 PM, Martin DeMello wrote:
> 
> Yep, file was there. Not sure what the problem was earlier; at least running
> 
> $ cd ~/code/felix 
> $ flx --test=build/release ...
> 
> works now. though doing it from a different directory and supplying the full path as
--test=/home/mdemello/code/felix/build/release does not.

It should, can you try that again with the full path and --debug-flx?

I just tried an absolute path and it worked (but my version is probably a bit newer).

~/felix>cat hello.flx
println$ "Hello";
assert false;
~/felix>build/release/host/bin/flx --test=/Users/johnskaller/felix/build/release hello
Setting FLX_INSTALL_DIR from /Users/johnskaller/.felix/config/felix.fpc
FLX_INSTALL_DIR='/usr/local/lib/felix/felix-latest'
Hello
terminate called after throwing an instance of 'flx::rtl::flx_assert_failure_t'
Shell terminated by signal SIGABRT
~/felix>cd ..
~>felix/build/release/host/bin/flx --test=/Users/johnskaller/felix/build/release felix/hello
Setting FLX_INSTALL_DIR from /Users/johnskaller/.felix/config/felix.fpc
FLX_INSTALL_DIR='/usr/local/lib/felix/felix-latest'
Hello
terminate called after throwing an instance of 'flx::rtl::flx_assert_failure_t'
(Continue reading)

john skaller | 30 Aug 06:23 2014
Picon
Picon

Re: [felix] [felix-lang/felix] 7729af: Makefile fixes:


On 30/08/2014, at 12:12 PM, Ryan wrote:

> BTW, I thought you could do:
> 
> $ flx -c --static -o myapp myapp.flx
> $ ./myapp

You can. However

	flx -c -od . myapp.flx

is better because it works on Windows too, there you get

	myapp.exe

instead of Unix

	myapp

You can also use 

	flx -c -ox myapp myapp.flx

which adds the .exe extension on windows automatically. 

Similarly, -ox can be used whether the target is an object file:

	.o on Unix
	.obj on Windows
(Continue reading)

john skaller | 30 Aug 05:55 2014
Picon
Picon

Re: [felix] [felix-lang/felix] 7729af: Makefile fixes:


On 30/08/2014, at 11:24 AM, Martin DeMello wrote:

> But compiled felix libraries are indistinguishable from c++ libraries, right?

Yes, with extern "C" entry points.

> In which case, why does felix need a systemwide language package manager?

For the Felix library code. For example suppose I want to install
a binding for GMP, or SDL. Where do I put it?

Underneath these are binary libraries and C header files,
but the binding code itself is Felix.

And at the moment quite a lot of code is pure Felix.

> Let $HOME/.felix be the *only* supported place to install libraries into.

Srean can't do that. His "home" account on university computer is
tiny. (though he could use a link).

> What I'm saying is ruthlessly strip away unneeded features and concentrate on providing a really good
experience for a single developer doing everything as user, in a single $HOME directory or mac/windows
equivalent. This is, after all, felix's primary audience.

Yes, but not one with any money :-)

So I need to consider enterprise wide deployment strategy too.

(Continue reading)

john skaller | 30 Aug 03:00 2014
Picon
Picon

Re: [felix] [felix-lang/felix] 7729af: Makefile fixes:


On 30/08/2014, at 9:53 AM, Martin DeMello wrote:

> Actually, my somewhat more drastic inclination (you will probably not agree!) is to get rid of the ability
to use felix as a systemwide scripting language altogether, embrace the fact that it generates native
executables, and let the default be for developers to always install felix as user, set up their dev
environment, and use it to create executables which need no reference to the felix compiler to use them. 

Originally the idea is that you can write *platform independent* programs and just
run them. No switches. No build steps. No conditional compilation for Windows
vs Linux.   

Actually Ocaml does the last thing quite well up to the limits of the
standard distro: the Felix compiler "just works" on both Windows and Unix
with the only work needed to support this in the compiler being some code
to handle filenames (slash separator vs slosh)

Anyhow if you look at the Felix build process there is quite a lot of using 
flx to generate binary stuff and needing switches to control the build steps,
however the design tries to make the shell commands needed platform
independent. Thats why you do:

	flx --static -c -od . hello.flx

The -od dirname flag is the same on Windows as Unix. 

But then consider this, in "make test":

	${BUILDROOT}/host/bin/flx --test=${BUILDROOT} \
		--usage=prototype --expect --nonstop \
(Continue reading)

john skaller | 30 Aug 02:37 2014
Picon
Picon

Re: [felix] [felix-lang/felix] 7729af: Makefile fixes:


On 30/08/2014, at 9:53 AM, Martin DeMello wrote:

> Another idea is for the config file to *always* live in $HOME/.felix/≤somewhere>, if necessary copied in
from a fixed (written once at install time and never modified thereafter) file in /etc/felix, but
maintained in .felix thereafter.

Well its not "another" idea: I did write this:

"""
2. if $HOME exists and $HOME/.felix/config/felix.fpc exists
and it contains the a line starting with exactly

	'FLX_INSTALL_DIR: '

excluding the quote makes, the rest of the line is used to set
the variable FLX_INSTALL_DIR.

If the above mentioned file doesn't exist a warning is printed.
I think the file will become required and the warning will change
to a program abort but we'll see.
"""

> 
> Actually, my somewhat more drastic inclination (you will probably not agree!) is to get rid of the ability
to use felix as a systemwide scripting language altogether, embrace the fact that it generates native
executables, and let the default be for developers to always install felix as user, set up their dev
environment, and use it to create executables which need no reference to the felix compiler to use them.

You can do this now. If you use --static switch, you get an executable. At present it will
(Continue reading)

john skaller | 30 Aug 01:28 2014
Picon
Picon

Re: [felix] [felix-lang/felix] 7729af: Makefile fixes:


On 30/08/2014, at 5:53 AM, Martin DeMello wrote:

> That sounds like an excellent change! Personally as a linux user I'm happy to add things to my $PATH to find a
binary, but would prefer the binary had some fixed, internal way to find the rest of its stuff, either by
writing to a config file in a known location or at the very worst by a well-documented set of environment
variables I would need to set in my .bashrc.

The latest commit does the following:

The host/plat/config.flx file is gone.

This was a platform dependent library file which encoded the
configured installation directory.

Instead there is a platform *Independent* file

	share/lib/plat/config.flx

containing a function which does the following:

1. FLX_INSTALL_DIR is set to /usr/local/lib/felix/felix-<version>
[This is a bug, it should be felix-latest IMHO]

2. if $HOME exists and $HOME/.felix/config/felix.fpc exists
and it contains the a line starting with exactly

	'FLX_INSTALL_DIR: '

excluding the quote makes, the rest of the line is used to set
(Continue reading)

john skaller | 29 Aug 06:57 2014
Picon
Picon

Re: [felix] [felix-lang/felix] 7729af: Makefile fixes:


On 28/08/2014, at 7:40 PM, john skaller wrote:

> 
> As noted, however, this is not enough.
> 
> Examine
> 
> build/release/host/lib/plat/config.flx
> 
> to see why: the install directory is referred to there.
> 
> Now .. I am trying to entirely eliminate this file
> precisely because it makes the system hard to move.

So here's the plan: please COMMENT if you have any thoughts.

I will change the config.flx file to look for data in

	$HOME/.felix/felix.fpc

If found this would override the hard coded location.
So plain

	flx hello.flx

will work, using that file to locate the installation.

Ultimately, the FLX_INSTALL_DIR should cease to exist:
a layout file should always be used.
(Continue reading)

john skaller | 29 Aug 04:46 2014
Picon
Picon

Re: [felix] The website...


On 29/08/2014, at 10:15 AM, Ryan wrote:

>> So I'm not sure what you can do. It's basic HTML deliberately
>> to meet these requirements.
> 
> But it looks bad. I've seen several very nicely done sites that render perfectly fine in most browsers (I
use Opera Mini, which is horribly glitchy, and most of these work fine there as well).

Fine. So make a better page, commit is as src/web/index2.html?

>> I'm actually more concerned with fdoc layout, but that's a bit harder
>> to work with because the HTML is generated. The buttons use SVG 
>> so the whole thing is scalable. Code is of course going to
>> run off the right edge of small windows, this can't be helped.
> 
> Again, looks fine in Opera Mini. I just wish that the code samples had horizontal scrollbars.

That should be easy enough to add.

In an fdoc, see

	src/lib/plugins/fdoc2html.flx

line 254, function inline_felix (b:string) takes formatted
felix code and displays it as <pre class flxgb>.

It formats by calling xlat_felix which is set by
dynamically loading the plugin 

(Continue reading)

john skaller | 29 Aug 01:02 2014
Picon
Picon

Re: [felix] The website...


On 29/08/2014, at 8:23 AM, Ryan Gonzalez wrote:

> ...looks ugly. I'm talking about the home page. No offense, but it seems overly 90's-ish.
> 
> I'd be happy to rewrite it for you. Really.

you mean 

	src/web/index.html

What would you propose? The page has to render in all size browsers
which means no fixed width layouts, no fixed size fonts, no fixed
size widgets, flowing text. The cat picture is fixed size, but it isn't
essential (and the page as it is does render well on a phone).
[A smaller pic could be used in a different way]

It has to be scalable and work on all size browser windows.

So I'm not sure what you can do. It's basic HTML deliberately
to meet these requirements.

I'm actually more concerned with fdoc layout, but that's a bit harder
to work with because the HTML is generated. The buttons use SVG 
so the whole thing is scalable. Code is of course going to
run off the right edge of small windows, this can't be helped.

The hierarchical document format is a bit lame. A better way
of providing a contents like a drop down widget or left
margin would be great. All that stuff is run by plugins
(Continue reading)

john skaller | 28 Aug 07:28 2014
Picon
Picon

Re: [felix] Language specification


On 28/08/2014, at 2:03 PM, srean wrote:

> I believe you are in touch with ATS people, so that might be a good avenue for theoretical collaboration
that interests you.

Unlikely. I also read Lambda the Ultimate occasionally.
Also unlikely. Same with Ocaml.

Theoreticians have their own lives and their own agendas.
They will not be interested until there are many users.

In other words, way too late. Then they'll complain
about the design.

--
john skaller
skaller@...
http://felix-lang.org

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
john skaller | 28 Aug 05:02 2014
Picon
Picon

Re: [felix] Language specification


On 28/08/2014, at 10:04 AM, srean wrote:

> Great development. If I managed to wear you down into doing this, may be I should continue pestering you
about authoring that Felix book :

No way. Its too much work, no fun, and not going
to bring in any money. It's also not going to get published.
Even O'Riley refused to publish a book on OCaml.

I might do this if I had more confidence in the whole
system, but that will not come without some effort
by other people: users, developers, and theoreticians.

My main interest is in getting the type system right.
At present, for example, the way compact linear types
are handled -- the stuff that provides polyadic arrays --
is flawed.

Similarly, whilst we have

	int * int = int ^ 2
	int ^ 2 * int ^ 2 = int ^ (2 + 2)

there is no corresponding identity for sums:

	int + int = 2 * int // doesn't hold

In fact this *nearly* holds: the general representation of sums is:

(Continue reading)


Gmane