David Given | 1 Sep 21:57 2010

Re: ACK GetPosition

On 31/08/10 19:13, Jan Verhoeven wrote:
[...]
>> 	position := position - LONG(s^.maxcnt - s^.cnt + 1)
[...]
> Which was the correct assumption. I changed the Streams implementation 
> module /home/jan/modula/ACK/lang/m2/libm2/Streams.mod recompiled 
> with 'pm -p' and 'pm install' and now all is well.

Fixed and checked in --- thanks very much for that.

-- 
┌─── dg@cowlark.com ─────
http://www.cowlark.com ─────
│
│ "Home is where, when you have to go there, they have to take you in."
│ --- Cordelia Naismith

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Tack-devel mailing list
Tack-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tack-devel
(Continue reading)

Jan Verhoeven | 2 Sep 02:36 2010
Picon

Re: ACK GetPosition

On Wednesday 01 September 2010 21:57:04 David Given wrote:

> Fixed and checked in --- thanks very much for that.

I'd like tyo help a bit more for this fine compiler. As long as it is in 
my competences...

--

-- 
Met vriendelijke groeten,

Jan Verhoeven
http://www.verhoeven272.nl

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
Jan Verhoeven | 8 Sep 22:38 2010
Picon

Allocated memory

Suppose I have a program that allocates 10 MB of memory.

The program stops.

Is memory automatically de-allocated? Or shgould I do this manually?

Mocka has the concept of MemoryPools. At the end of the program you 
simply kill the pool and that's it.

--

-- 
Met vriendelijke groeten,

Jan Verhoeven
http://www.verhoeven272.nl

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
David Given | 9 Sep 16:19 2010

Re: Allocated memory

On 08/09/10 21:38, Jan Verhoeven wrote:
> Suppose I have a program that allocates 10 MB of memory.
> 
> The program stops.
> 
> Is memory automatically de-allocated? Or shgould I do this manually?

On any Unix, all resources the program was using get freed up when the
process gets destroyed [*]. This includes memory, open file handles,
etc. So you don't have to worry about it.

[*] With certain exotic exceptions like shared memory segments.

--

-- 
┌─── dg@cowlark.com ─────
http://www.cowlark.com ─────
│
│ life←{ ↑1 ⍵∨.^3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵ }
│ --- Conway's Game Of Life, in one line of APL

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
(Continue reading)

erik | 27 Sep 16:27 2010
Picon

Beginner - problem linking pascal program

Hello.
I got ack mainly in order to try out the Pascal compiler under Linux, and it seems to work for programs that do not do file I/O. I installed ack-6.0pre4 on a debian system. The only modifications I made was to change the line:
DEFAULT_PLATFORM = "pc86"
to:
DEFAULT_PLATFORM = "linux386"
in config.pm . I then ran the three commands
./pm configure;    ./pm;    ./pm install
Now I can compile Pascal programs with a command like: "ack -o f2 f2.p". This seems to work except when the program contains calls to the standard procedures reset() and rewrite(), then I get an error from the linker:
Undefined:
        __open
        __creat
        _remove
There are modules with names like: 1317-pcreat.o in libpascal.a. and that files seems to contain the symbol '__creat' for example. What am I doing wrong?

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Tack-devel mailing list
Tack-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tack-devel
Jan Verhoeven | 27 Sep 18:15 2010
Picon

Re: Beginner - problem linking pascal program

On Monday 27 September 2010 16:27:17 erik <at> backerud.se wrote:
> Hello.
> I got ack mainly in order to try out the Pascal compiler under Linux,
> and it seems to work for programs that do not do file I/O. I
> installed ack-6.0pre4 on a debian system. The only modifications I
> made was to change the line: DEFAULT_PLATFORM = "pc86"
> to:
> DEFAULT_PLATFORM = "linux386"
> in config.pm . I then ran the three commands
> ./pm configure;    ./pm;    ./pm install

OK

> Now I can compile Pascal programs with a command like: "ack -o f2
> f2.p". This seems to work except when the program contains calls to
> the standard procedures reset() and rewrite(), then I get an error
> from the linker: Undefined:
>         __open
>         __creat
>         _remove

I can create, open, read and append files using the Modula-2 front end. 
So that part seems to work. I guess the Pascal units (or whatever they 
are called) need some touching up. Lately I fixed a 30 year old error 
in a low level library... In the Modula-2 section.

> There are modules with names like: 1317-pcreat.o in libpascal.a. and
> that files seems to contain the symbol '__creat' for example. What am
> I doing wrong?

You're not using the Modula-2 front end... :o)

See also http://fruttenboel.verhoeven272.nl/ack/index.html

--

-- 
Met vriendelijke groeten,

Jan Verhoeven
http://www.verhoeven272.nl

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
David Given | 27 Sep 22:54 2010

Re: Beginner - problem linking pascal program

On 27/09/10 15:27, erik <at> backerud.se wrote:

(Do I owe you a reply to a message from weeks ago?)

[...]
> Now I can compile Pascal programs with a command like: "ack -o f2 f2.p". This seems to work except when the
program contains calls to the standard procedures reset() and rewrite(), then I get an error from the linker:
> Undefined:
>         __open
>         __creat
>         _remove
> There are modules with names like: 1317-pcreat.o in libpascal.a. and that files seems to contain the
symbol '__creat' for example. What am I doing wrong?
[...]

Nothing. I've just had a look at the libpascal source code and the
relevant files are calling _open() and _creat() instead of open() and
creat() for some reason; it is perfectly legitimately broken. remove()
was simply not supported in the extremely minimal syscall library for
linux386.

I've changed libpascal to call the correct functions, and I've added
remove() and unlink() to the syscall library; however as these changes
are scattered across the system I'm not going to try and produce a
patch, so I'm afraid I'll have to ask you to check out head of CVS to
get the fixed version. None of this is at all tested. There may be a
*reason* why libpascal is calling _open() and _creat().

To check out CVS, install a CVS client, then run this commands:

cvs -z3 -d:pserver:anonymous <at> tack.cvs.sourceforge.net:/cvsroot/tack co
-P Ack

This will download the ACK source into a directory called Ack.

Sorry for the inconvenience...

-- 
┌─── dg@cowlark.com ─────
http://www.cowlark.com ─────
│ "To be is to do" -- Nietzche
│ "To do is to be" -- Sartre
│ "Do be do be do" -- Sinatra

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Tack-devel mailing list
Tack-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tack-devel
erik | 28 Sep 10:43 2010
Picon

Re: Beginner - problem linking pascal program

2010-09-27 David Given wrote:
>Nothing. I've just had a look at the libpascal source code and the
>relevant files are calling _open() and _creat() instead of open() and
>creat() for some reason; it is perfectly legitimately broken. remove()
>was simply not supported in the extremely minimal syscall library for
>linux386.
>
>I've changed libpascal to call the correct functions, and I've added
>remove() and unlink() to the syscall library; however as these changes
>are scattered across the system I'm not going to try and produce a
>patch, so I'm afraid I'll have to ask you to check out head of CVS to
>get the fixed version. None of this is at all tested. There may be a
>*reason* why libpascal is calling _open() and _creat().
>
>To check out CVS, install a CVS client, then run this commands:
>
>cvs -z3 -d:pserver:anonymous <at> tack.cvs.sourceforge.net:/cvsroot/tack co
>-P Ack

I tried it and it works. Thanks alot!
Now that I've gotten a bit further I have discovered more linking problems in the Pascal compiler.
It seems that any program that contains a call to the built in procedure new() or dispose() fails during linking with the message:
Undefined:
        .reghp
        .limhp
        BRK

I have looked in the source and seen mention of .reghp and .limhp but I haven't found any fix for the problem. I am not so familiar with the internals of the Ack compilers (yet).

Regards
Erik Backerud
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Tack-devel mailing list
Tack-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tack-devel
Jan Verhoeven | 28 Sep 22:37 2010
Picon

GUI front end

I'm working (off and on) on a GUI front end for the ACK:

http://fruttenboel.verhoeven272.nl/ack/gui.html

Not sure when it will be ready....

--

-- 
Met vriendelijke groeten,

Jan Verhoeven
http://www.verhoeven272.nl

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
Jan Verhoeven | 30 Sep 01:48 2010
Picon

Re: GUI front end

On Tuesday 28 September 2010 22:37:22 Jan Verhoeven wrote:
> I'm working (off and on) on a GUI front end for the ACK:
>
> http://fruttenboel.verhoeven272.nl/ack/gui.html
>
> Not sure when it will be ready....

It's almost ready... You can compile, run and execute Unix commands from 
within the GUI. All output is logged in the GUI.

The webpage contains screenshots. In the download section you can get 
yourself a copy of the tcl script:

	http://fruttenboel.verhoeven272.nl/ack/data/gack.tcl

The gack is only tested with the Modula-2 front end. Volunteers for the 
C and Pascal front ends? :o)

--

-- 
Met vriendelijke groeten,

Jan Verhoeven
http://www.verhoeven272.nl

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev

Gmane