Re: [Gnoga-list] Enhancing Exception Handling Suggestion

2015-08-08 Thread Anh (TA) Vo
I am glad that it worked for you. Regarding future of atos tool, it can be
made to work for future OS X if current atos source code exists.


On Sat, Aug 8, 2015 at 12:53 AM, Joakim Dahlgren Strandberg  wrote:

> > On 2015-08-07 00:09, Joakim Dahlgren Strandberg wrote:
> > >
> > > While we are on the subject on exceptions. There is no way to get stack
> > > trace information if one uses GNAT GPL 2015, right? I mean, there is no
> > > addr2line.
> >
> > I have addr2line. You do not mention platform though.
>
>
> Thanks all for responding. The platform I am working on is Mac OS X. I've
> been looking into this and addr2line does not exist on the Mac. Instead one
> should use an application called atos. Thus I've finally been able to get a
> nice stack trace when an application threw an exception. Something that
> worries me though is that when using atos there is a message saying that
> atos is obsolete and will not be included in a future version of Mac OS X.
> Googling about it has not turned up any alternatives. Anyways, getting
> stack traces works for me now, and I regard atos potentially disappearing a
> problem of the future.
>
--
___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Re: [Gnoga-list] gprbuild/gprconfig and non-english environments

2015-08-08 Thread Rabbi David Botton
I had no idea, thanks for the tip. I am considering writing a new build
tool since gnatmake in GNAT 5.1 will not support gpr projects anymore and
gprbuild tools are not available for FSF GNAT on many platforms including
windows. (Actually it is not available on any platform, but on Mac and
Linux there are contributors writing glue code to make it work).

After spending time doing some research a new build tool would be very easy
since you can leverage gnatmake to do all the heavy lifting, you just need
to generate the appropriate calls for building, linking and binding.

David Botton


On Sat, Aug 8, 2015 at 7:54 PM  wrote:

> Hello List, hello David.
>
> My Name is Christian. I'm new to Ada and currently playing with Gnoga. I
> am on Fedora 22, FSF GNAT 5.1.1, GPRBUILD GPL 2014 (20140331).
> I had some trouble getting Gnoga and my first Gnoga-based Application to
> build because of gprconfig no beeing able to detect GNAT on non-english
> systems. Maybe it's worth adding a Note in the user guide so others
> might have a better start.
>
> So here it goes:
>
> - cloned the Gnoga repository
> - cd into it
> - make
>
> ...
> make[2]: Leaving directory '/home/xxx/xxx/gnoga/components/ace_editor'
> make[1]: Leaving directory '/home/xxx/xxx/gnoga/components'
> cd deps/simple_components/xpm && gprbuild -p -Pxpm_parser.gpr
> xpm_parser.gpr:3:09: no languages defined for this project
> components.gpr:4:09: no languages defined for this project
> strings_edit.gpr:1:09: no languages defined for this project
> tables.gpr:1:09: no languages defined for this project
> gprbuild: "xpm_parser.gpr" processing failed
> Makefile:81: recipe for target 'xpm_parser' failed
> make: *** [xpm_parser] Error 4
>
> - ??
> - gprconfig -v tells me:
>
> GNAT is candidate: filename=gnatmake
>  target: executing "gcc -dumpmachine" output= no match
>  target: grep matched="x86_64-redhat-linux"
>  version: executing "gnatls -v" output= no match
>  version: grep matched="5.1"
>  variables: executing "gcc -v" output= no match
>  variables: grep no match
>  Ignore compiler since variable 'gcc_version' is empty
>
> - Switched to gnatmake as the Builder. Could successfully build it then
> - Created a new project with gnoga_make and found out that the make-file
> gets created with gprbuild as the Builder. So that didn't work out.
> Simply exchanging gprbuild for gnatmake also didn't work
> - After some research I found a post on comp.lang.ada by Simon Wright
> (from 2013) containing the Solution
>  => gprconfig can't cope with non-english "gnat --version" outputs.
> So on non-english systems, just give it the english one:
>
> export LANG=en
> make
>
> ... and everything works as intended. (Link to the post:
> https://groups.google.com/forum/#!topic/comp.lang.ada/uJwE-dbeRzk)
>
>
>
>
> --
> ___
> Gnoga-list mailing list
> Gnoga-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gnoga-list
>
--
___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Re: [Gnoga-list] Enhancing Exception Handling Suggestion

2015-08-08 Thread Joakim Dahlgren Strandberg
> On 2015-08-07 00:09, Joakim Dahlgren Strandberg wrote:
> >
> > While we are on the subject on exceptions. There is no way to get stack
> > trace information if one uses GNAT GPL 2015, right? I mean, there is no
> > addr2line.
>
> I have addr2line. You do not mention platform though.



Thanks all for responding. The platform I am working on is Mac OS X. I've been 
looking into this and addr2line does not exist on the Mac. Instead one should 
use an application called atos. Thus I've finally been able to get a nice stack 
trace when an application threw an exception. Something that worries me though 
is that when using atos there is a message saying that atos is obsolete and 
will not be included in a future version of Mac OS X. Googling about it has not 
turned up any alternatives. Anyways, getting stack traces works for me now, and 
I regard atos potentially disappearing a problem of the future.
--
___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


[Gnoga-list] gprbuild/gprconfig and non-english environments

2015-08-08 Thread c . angerer
Hello List, hello David.

My Name is Christian. I'm new to Ada and currently playing with Gnoga. I 
am on Fedora 22, FSF GNAT 5.1.1, GPRBUILD GPL 2014 (20140331).
I had some trouble getting Gnoga and my first Gnoga-based Application to 
build because of gprconfig no beeing able to detect GNAT on non-english 
systems. Maybe it's worth adding a Note in the user guide so others 
might have a better start.

So here it goes:

- cloned the Gnoga repository
- cd into it
- make

...
make[2]: Leaving directory '/home/xxx/xxx/gnoga/components/ace_editor'
make[1]: Leaving directory '/home/xxx/xxx/gnoga/components'
cd deps/simple_components/xpm && gprbuild -p -Pxpm_parser.gpr
xpm_parser.gpr:3:09: no languages defined for this project
components.gpr:4:09: no languages defined for this project
strings_edit.gpr:1:09: no languages defined for this project
tables.gpr:1:09: no languages defined for this project
gprbuild: "xpm_parser.gpr" processing failed
Makefile:81: recipe for target 'xpm_parser' failed
make: *** [xpm_parser] Error 4

- ??
- gprconfig -v tells me:

GNAT is candidate: filename=gnatmake
 target: executing "gcc -dumpmachine" output= no match
 target: grep matched="x86_64-redhat-linux"
 version: executing "gnatls -v" output= no match
 version: grep matched="5.1"
 variables: executing "gcc -v" output= no match
 variables: grep no match
 Ignore compiler since variable 'gcc_version' is empty

- Switched to gnatmake as the Builder. Could successfully build it then
- Created a new project with gnoga_make and found out that the make-file 
gets created with gprbuild as the Builder. So that didn't work out. 
Simply exchanging gprbuild for gnatmake also didn't work
- After some research I found a post on comp.lang.ada by Simon Wright 
(from 2013) containing the Solution
 => gprconfig can't cope with non-english "gnat --version" outputs. 
So on non-english systems, just give it the english one:

export LANG=en
make

... and everything works as intended. (Link to the post: 
https://groups.google.com/forum/#!topic/comp.lang.ada/uJwE-dbeRzk)



--
___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Re: [Gnoga-list] Screen update triggered by data change

2015-08-08 Thread Jeffrey R. Carter
On 08/08/2015 02:52 PM, tony gair wrote:
> a task per piece of data seems extravagant, but then again I don't know enough
> about the internals of linux and gnat, I think I am missing something 
> important!

I would probably keep all the data in the PO, and update them all whenever
something changes.

-- 
Jeff Carter
It's better to be root than to reboot.
119


--
___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Re: [Gnoga-list] Screen update triggered by data change

2015-08-08 Thread tony gair
a task per piece of data seems extravagant, but then again I don't know
enough about the internals of linux and gnat, I think I am missing
something important!

On Sat, Aug 8, 2015 at 6:24 PM, Jeffrey R. Carter  wrote:

> On 08/07/2015 11:58 PM, tony gair wrote:
> > There would be a bit missing. How to register the gnoga label with the
> data,
> > and then the trigger pushing the text value (or indeed values) on the
> gnoga
> > label.
>
> That's because I tend to avoid designs that involve registration and
> pushing.
> Each connection would have a task that sits on Changed. When it's
> released, the
> task obtains the value and updates the appropriate display item.
>
> --
> Jeff Carter
> It's better to be root than to reboot.
> 119
>
>
>
> --
> ___
> Gnoga-list mailing list
> Gnoga-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gnoga-list
>
--
___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Re: [Gnoga-list] Screen update triggered by data change

2015-08-08 Thread Jeffrey R. Carter
On 08/07/2015 11:58 PM, tony gair wrote:
> There would be a bit missing. How to register the gnoga label with the data,
> and then the trigger pushing the text value (or indeed values) on the gnoga
> label.

That's because I tend to avoid designs that involve registration and pushing.
Each connection would have a task that sits on Changed. When it's released, the
task obtains the value and updates the appropriate display item.

-- 
Jeff Carter
It's better to be root than to reboot.
119


--
___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Re: [Gnoga-list] URL decoder.

2015-08-08 Thread Pascal
Hello David,

Here is a proposal of URL_Decode, this one gets Encoding parameter:
   function URL_Decode (S : String; Encoding : String := "") return String is
  C : Integer := S'First;

  function Translate_Character return Character;

  function Translate_Character return Character is
 R : Character := S (C);
  begin
 if R = '+' then
R := ' ';
 elsif R = '%' and C < S'Last - 1 then
R := Character'Val (Integer'Value ("16#" & S (C + 1 .. C + 2) & 
"#"));
C := C + 2;
 end if;
 C := C + 1;
 return R;
  end Translate_Character;

  R : Ada.Strings.Unbounded.Unbounded_String;
   begin
  while C in S'Range loop
 Ada.Strings.Unbounded.Append (R, Translate_Character);
  end loop;

  if Encoding = "UTF-8" then
 return Ada.Strings.UTF_Encoding.Strings.Decode 
(Ada.Strings.Unbounded.To_String (R));
  else
 return Ada.Strings.Unbounded.To_String (R);
  end if;
   end URL_Decode;

I suppose Unescape_Quotes should be also encoding aware.
Shouldn't it?

Regards, Pascal.
http://blady.pagesperso-orange.fr


Le 4 août 2015 à 20:47, Rabbi David Botton  a écrit :

> Oh could be, sorry was on the go. So we can add a URL_Encode and URL_Decode 
> to gnoga.ads
> 
> David Botton
> 
> On Tue, Aug 4, 2015 at 2:34 PM, Pascal  wrote:
> Hello David,
> in my understanding, Unescape_Quotes processes "\x.." escaped characters but 
> not "%.."?
> Does it?
> 
> Thanks, Pascal.
> http://blady.pagesperso-orange.fr
> 
> 
> Le 3 août 2015 à 21:50, Rabbi David Botton  a écrit :
> 
> > Did you look at Gnoga.ads - function Unescape_Quotes (S : String) return 
> > String; ?
> > It already does these translations.
> >
> > David Botton
> >
> >
> >
> > On Mon, Aug 3, 2015 at 3:21 PM Pascal  wrote:
> > Hello,
> >
> > For using easily GET parameters, I want to add in Gnoga an URL decoder 
> > function:
> > The encoded string google.com/search?q=%60Abdu%27l-Bah%C3%A1 should revert 
> > to the unencoded form google.com/search?q=`Abdu'l-Bahá
> >
> > I found this from Rosetta code:
> > http://rosettacode.org/wiki/URL_decoding#Ada
> >
> > There is also a function AWS.URL.Decode.
> >
> > I don't think Gnoga should again include AWS just for that.
> >
> > Should I copy Rosetta function or AWS one in Gnoga Code?
> >
> > Or other ideas?
> >
> > Thanks, Pascal.
> > http://blady.pagesperso-orange.fr
> >
> >
> >
> > --
> > ___
> > Gnoga-list mailing list
> > Gnoga-list@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gnoga-list
> > --
> > ___
> > Gnoga-list mailing list
> > Gnoga-list@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gnoga-list
> 
> 
> --
> ___
> Gnoga-list mailing list
> Gnoga-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gnoga-list
> 
> --
> ___
> Gnoga-list mailing list
> Gnoga-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gnoga-list


--
___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list