[Felix-language] arrays

2012-12-15 Thread john skaller
Farray is a mess. Here's the problem: I'm considering both an array and a pointer to it as equivalent array values. Also pointer to an array is considered as an array object. The idea was: you cannot modify an array value. But if your array is in a variable you can take the address to get an arr

Re: [Felix-language] arrays

2012-06-21 Thread john skaller
On 22/06/2012, at 12:14 AM, john skaller wrote: > > Interestingly there's no problem with ^, the problem is with *. > Felix can handle ^ because it's a left associative binary operator > so any number of these can be handled by recursion (Felix type > functions can be recursive). But operator *

Re: [Felix-language] arrays

2012-06-21 Thread john skaller
On 21/06/2012, at 1:25 AM, john skaller wrote: > I'm in the throws of trying to get multi-dimensional arrays working. > The problem here is that array access is implement in the library bi a C binding. The combinator "EXPR_get_n" is only generated by pattern matching. So now the theory says,

[Felix-language] arrays

2012-06-20 Thread john skaller
I'm in the throws of trying to get multi-dimensional arrays working. The theory behind this was developed by Barry Jay. Basically, there's map: (T ^ N) ^ M -> T ^ (N * M) taking an array of arrays to a matrix. Example on values: ( (1,2), (3,4), (5,6) ) . 1 . 1 --> 4 (zero o

[Felix-language] Arrays

2010-12-24 Thread john skaller
I'm removing a lot of hackery from Felix at the moment. A few issues remain though: arrays and lvalues. Lvalues are problematic. Originally, the idea was only to support pointers, but it made a lot of syntax untenable, eg: x++ so lvalues were introduced into the type system. Now they're gone a

Re: [Felix-language] Arrays??

2006-09-26 Thread skaller
On Wed, 2006-09-27 at 01:29 +1000, skaller wrote: > > It's really NOT clear how to make this all work properly, > which is one reason why the development of extensible > arrays in Felix is stalled. It isn't so hard to make > it work for Felix objects. But for opaque C++ objects, > extra informati

Re: [Felix-language] Arrays??

2006-09-26 Thread skaller
On Tue, 2006-09-26 at 07:46 -0700, James Dennett wrote: > > the way STL handles > > this is very inefficient. > It's within a factor of 2 of optimal, no? What do you mean by > "very" inefficient? See below. > > Using mmap/realloc is much faster, > > but C++ does not provide a move or 'relocate'

Re: [Felix-language] Arrays??

2006-09-26 Thread James Dennett
skaller wrote: > On Tue, 2006-09-26 at 21:47 +1000, Jonathan Kelly wrote: > >> Hi, >> >> am I right in deducing there are no arrays in felix, despite the >> temptingly titled sections in the tute and ref man? I mean the sort of >> arrays a C/C++ programmer would be thinking of, obviously. >>

Re: [Felix-language] Arrays??

2006-09-26 Thread Jonathan Kelly
Hey, skaller wrote: > On Tue, 2006-09-26 at 21:47 +1000, Jonathan Kelly wrote: > >> Hi, >> >> am I right in deducing there are no arrays in felix, despite the >> temptingly titled sections in the tute and ref man? I mean the sort of >> arrays a C/C++ programmer would be thinking of, obviously

Re: [Felix-language] Arrays??

2006-09-26 Thread skaller
On Tue, 2006-09-26 at 21:47 +1000, Jonathan Kelly wrote: > Hi, > > am I right in deducing there are no arrays in felix, despite the > temptingly titled sections in the tute and ref man? I mean the sort of > arrays a C/C++ programmer would be thinking of, obviously. Felix has first class fixed l

[Felix-language] Arrays??

2006-09-26 Thread Jonathan Kelly
Hi, am I right in deducing there are no arrays in felix, despite the temptingly titled sections in the tute and ref man? I mean the sort of arrays a C/C++ programmer would be thinking of, obviously. Jonathan. - Take Surv