* Ncurses and Ada @ 2012-03-09 14:40 Eilie 2012-03-09 14:56 ` mockturtle 2012-03-09 17:57 ` Ludovic Brenta 0 siblings, 2 replies; 15+ messages in thread From: Eilie @ 2012-03-09 14:40 UTC (permalink / raw) Hello, I started learn ada recently and mess with ncurses. I know this is somewhat unrelated but maybe someone can help me here. I build ncurses with Ada support, Ada examples(rain and so on) has been built fine. But i don't know how should i build mine programs that uses ncurses. For example: I copy rain.adb from examples dir to some other dir, How can i build it? What options of gnatmake should i pick to build it? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ncurses and Ada 2012-03-09 14:40 Ncurses and Ada Eilie @ 2012-03-09 14:56 ` mockturtle 2012-03-09 16:59 ` Eilie 2012-03-09 17:57 ` Ludovic Brenta 1 sibling, 1 reply; 15+ messages in thread From: mockturtle @ 2012-03-09 14:56 UTC (permalink / raw) On Friday, March 9, 2012 3:40:00 PM UTC+1, Eilie wrote: > Hello, > I started learn ada recently and mess with ncurses. > I know this is somewhat unrelated but maybe someone can help me here. > I build ncurses with Ada support, > Ada examples(rain and so on) has been built fine. > But i don't know how should i build mine programs that uses ncurses. > For example: I copy rain.adb from examples dir to some other dir, > How can i build it? What options of gnatmake should i pick to build it? Is ncurses related with curses? (I guess so) Ah, memories... I used curses _many_ years ago, when I was a student and I thought that the name was quite appropriate... :-/ Especially when the usual segmentation fault left your VT100 monitor [yes, I am that old!] in an unusable state, forcing you to logout and login again... Seriously, since I never used ncurses, I cannot be of much help, but I can give you some general advice. Does the example dir has some project file (*.gpr)? If it has, I would start from that, taking an existing project file and modifying to my needs. Hope this "bootstraps" you. Riccardo ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ncurses and Ada 2012-03-09 14:56 ` mockturtle @ 2012-03-09 16:59 ` Eilie 2012-03-09 17:13 ` Shark8 2012-03-09 17:35 ` mockturtle 0 siblings, 2 replies; 15+ messages in thread From: Eilie @ 2012-03-09 16:59 UTC (permalink / raw) On 2012-03-09, mockturtle <framefritti@gmail.com> wrote: > On Friday, March 9, 2012 3:40:00 PM UTC+1, Eilie wrote: >> Hello, >> I started learn ada recently and mess with ncurses. >> I know this is somewhat unrelated but maybe someone can help me here. >> I build ncurses with Ada support, >> Ada examples(rain and so on) has been built fine. >> But i don't know how should i build mine programs that uses ncurses. >> For example: I copy rain.adb from examples dir to some other dir, >> How can i build it? What options of gnatmake should i pick to build it? > > Is ncurses related with curses? (I guess so) Ah, memories... I used curses _many_ years ago, when I was a student and I thought that the name was quite appropriate... >:-/ Especially when the usual segmentation fault left your VT100 monitor [yes, I am that old!] in an unusable state, forcing you to logout and login again... > > Seriously, since I never used ncurses, I cannot be of much help, but I can give you some general advice. Does the example dir has some project file (*.gpr)? If it has, I would start from that, taking an existing project file and modifying to my needs. > > Hope this "bootstraps" you. > > Riccardo I'm tryng to make some simple CLI game. I think that study GtkAda for this purpose would be overhead. But if there is some more stable/usable lib for that purpose(CLI tools/games) i will be happy to hear about it. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ncurses and Ada 2012-03-09 16:59 ` Eilie @ 2012-03-09 17:13 ` Shark8 2012-03-09 17:44 ` Eilie 2012-03-09 17:35 ` mockturtle 1 sibling, 1 reply; 15+ messages in thread From: Shark8 @ 2012-03-09 17:13 UTC (permalink / raw) On Friday, March 9, 2012 10:59:46 AM UTC-6, Eilie wrote: > > I'm tryng to make some simple CLI game. > I think that study GtkAda for this purpose would be overhead. > But if there is some more stable/usable lib for that purpose(CLI tools/games) > i will be happy to hear about it. Inspired by Kroz? http://en.wikipedia.org/wiki/Kroz_series ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ncurses and Ada 2012-03-09 17:13 ` Shark8 @ 2012-03-09 17:44 ` Eilie 0 siblings, 0 replies; 15+ messages in thread From: Eilie @ 2012-03-09 17:44 UTC (permalink / raw) On 2012-03-09, Shark8 <onewingedshark@gmail.com> wrote: > On Friday, March 9, 2012 10:59:46 AM UTC-6, Eilie wrote: >> >> I'm tryng to make some simple CLI game. >> I think that study GtkAda for this purpose would be overhead. >> But if there is some more stable/usable lib for that purpose(CLI tools/games) >> i will be happy to hear about it. > > Inspired by Kroz? > http://en.wikipedia.org/wiki/Kroz_series Not really. I'm just begginer it's too hard for me write rougelikes in Ada. I need to start with a small steps. Maybe some Sokoban or Sudoku with ncurses(i'm know these to games can be easely implemented without ncurses but i want to study Ada ncurses too). ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ncurses and Ada 2012-03-09 16:59 ` Eilie 2012-03-09 17:13 ` Shark8 @ 2012-03-09 17:35 ` mockturtle 1 sibling, 0 replies; 15+ messages in thread From: mockturtle @ 2012-03-09 17:35 UTC (permalink / raw) On Friday, March 9, 2012 5:59:46 PM UTC+1, Eilie wrote: > On 2012-03-09, mockturtle <...@gmail.com> wrote: > > On Friday, March 9, 2012 3:40:00 PM UTC+1, Eilie wrote: > >> Hello, > >> I started learn ada recently and mess with ncurses. > >> I know this is somewhat unrelated but maybe someone can help me here. > >> I build ncurses with Ada support, > >> Ada examples(rain and so on) has been built fine. > >> But i don't know how should i build mine programs that uses ncurses. > >> For example: I copy rain.adb from examples dir to some other dir, > >> How can i build it? What options of gnatmake should i pick to build it? > > > > Is ncurses related with curses? (I guess so) Ah, memories... I used curses _many_ years ago, when I was a student and I thought that the name was quite appropriate... > >:-/ Especially when the usual segmentation fault left your VT100 monitor [yes, I am that old!] in an unusable state, forcing you to logout and login again... > > > > Seriously, since I never used ncurses, I cannot be of much help, but I can give you some general advice. Does the example dir has some project file (*.gpr)? If it has, I would start from that, taking an existing project file and modifying to my needs. > > > > Hope this "bootstraps" you. > > > > Riccardo > > I'm tryng to make some simple CLI game. > I think that study GtkAda for this purpose would be overhead. > But if there is some more stable/usable lib for that purpose(CLI tools/games) > i will be happy to hear about it. Just to avoid any misunderstanding (with written exchange it may happens): I was not criticizing your choice, it just made me wonder (and smile) since it recalled to my memory my experience with "curses." (BTW, I am smiling while I write this ;-) Riccardo ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ncurses and Ada 2012-03-09 14:40 Ncurses and Ada Eilie 2012-03-09 14:56 ` mockturtle @ 2012-03-09 17:57 ` Ludovic Brenta 2012-03-09 18:28 ` Eilie 1 sibling, 1 reply; 15+ messages in thread From: Ludovic Brenta @ 2012-03-09 17:57 UTC (permalink / raw) Eilie writes on comp.lang.ada: > Hello, > I started learn ada recently and mess with ncurses. > I know this is somewhat unrelated but maybe someone can help me here. > I build ncurses with Ada support, > Ada examples(rain and so on) has been built fine. > But i don't know how should i build mine programs that uses ncurses. > For example: I copy rain.adb from examples dir to some other dir, > How can i build it? What options of gnatmake should i pick to build it? I don't know what platform you develop on but Debian is your friend :) and Nicolas Boulenguez made sure it is as easy as possible for you to use ncurses in your programs: aptitude install libncursesada2-dev then look in the file /usr/share/ada/adainclude/ncursesada.gpr. -- Ludovic Brenta. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ncurses and Ada 2012-03-09 17:57 ` Ludovic Brenta @ 2012-03-09 18:28 ` Eilie 2012-03-12 8:18 ` Julian Leyh 0 siblings, 1 reply; 15+ messages in thread From: Eilie @ 2012-03-09 18:28 UTC (permalink / raw) On 2012-03-09, Ludovic Brenta <ludovic@ludovic-brenta.org> wrote: > > I don't know what platform you develop on but Debian is your friend :) > and Nicolas Boulenguez made sure it is as easy as possible for you to > use ncurses in your programs: > > aptitude install libncursesada2-dev > > then look in the file /usr/share/ada/adainclude/ncursesada.gpr. > I'm on Arch Linux and i have /usr/share/ada/adainclude but i don't have /usr/share/ada/adainclude/ncursesada.gpr in it. I already find out wich options should i use to compile my code with ncurses. Anyway thank you for your attention. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ncurses and Ada 2012-03-09 18:28 ` Eilie @ 2012-03-12 8:18 ` Julian Leyh 2012-03-12 8:42 ` Simon Wright 2012-03-12 9:04 ` Eilie 0 siblings, 2 replies; 15+ messages in thread From: Julian Leyh @ 2012-03-12 8:18 UTC (permalink / raw) Am Freitag, 9. März 2012 19:28:39 UTC+1 schrieb Eilie: > I'm on Arch Linux and i have /usr/share/ada/adainclude but i don't have > /usr/share/ada/adainclude/ncursesada.gpr in it. > > I already find out wich options should i use to compile my code with > ncurses. Anyway thank you for your attention. I created a few Ada related PKGBUILDs for the AUR and will have a look at ncursesada. BTW, where did you get /usr/share/ada/adainclude from? Normally, the Ada library packages should install to /usr/include/<foo> and /usr/lib/<foo> and their project files to /usr/lib/gnat. You can identify the package owning a file by using pacman -Qo ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ncurses and Ada 2012-03-12 8:18 ` Julian Leyh @ 2012-03-12 8:42 ` Simon Wright 2012-03-12 10:20 ` Ludovic Brenta 2012-03-12 9:04 ` Eilie 1 sibling, 1 reply; 15+ messages in thread From: Simon Wright @ 2012-03-12 8:42 UTC (permalink / raw) Julian Leyh <julian@vgai.de> writes: > BTW, where did you get /usr/share/ada/adainclude from? Normally, the > Ada library packages should install to /usr/include/<foo> and > /usr/lib/<foo> and their project files to /usr/lib/gnat. FSF GCC and GNAT GPL both use $prefix/lib/gnat to find GPR files, with the rest of the layout as you say. The /usr/share/ada/adainclude is Debian's layout. I don't know why it's different (probably Ludovic needed a scheme before AdaCore had settled on theirs) and I haven't so far worked out install scripts that will work in either situation. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ncurses and Ada 2012-03-12 8:42 ` Simon Wright @ 2012-03-12 10:20 ` Ludovic Brenta 2012-03-12 13:20 ` Georg Bauhaus 0 siblings, 1 reply; 15+ messages in thread From: Ludovic Brenta @ 2012-03-12 10:20 UTC (permalink / raw) Simon Wright wrote on comp.lang.ada: > Julian Leyh writes: >> BTW, where did you get /usr/share/ada/adainclude from? Normally, the >> Ada library packages should install to /usr/include/<foo> and >> /usr/lib/<foo> and their project files to /usr/lib/gnat. > > FSF GCC and GNAT GPL both use $prefix/lib/gnat to find GPR files, with > the rest of the layout as you say. > > The /usr/share/ada/adainclude is Debian's layout. I don't know why it's > different (probably Ludovic needed a scheme before AdaCore had settled > on theirs) Correct. I didn't invent this path myself though; Florian Weimer did, when he made the very first proposal for a standard ("GNU Ada Environment Specification") back in 2001 or so. IIRC, that specification applied to the early .rpm packages for GNAT 3.13p produced by the Ada for Linux Team. So, it is possible that /usr/share/ada/adainclude still exists in distributions other than Debian. > and I haven't so far worked out install scripts that will > work in either situation. Sorry about that :/ but as I've said many times, packaging is difficult; if you want to concentrate on writing your software, your best bet is to leave packaging to specialists of each target platform while making their job as easy as possible. -- Ludovic Brenta. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ncurses and Ada 2012-03-12 10:20 ` Ludovic Brenta @ 2012-03-12 13:20 ` Georg Bauhaus 2012-03-12 14:33 ` Simon Wright 0 siblings, 1 reply; 15+ messages in thread From: Georg Bauhaus @ 2012-03-12 13:20 UTC (permalink / raw) On 12.03.12 11:20, Ludovic Brenta wrote: > Simon Wright wrote on comp.lang.ada: >> Julian Leyh writes: >>> BTW, where did you get /usr/share/ada/adainclude from? Normally, the >>> Ada library packages should install to /usr/include/<foo> and >>> /usr/lib/<foo> and their project files to /usr/lib/gnat. >> >> FSF GCC and GNAT GPL both use $prefix/lib/gnat to find GPR files, with >> the rest of the layout as you say. >> >> The /usr/share/ada/adainclude is Debian's layout. I don't know why it's >> different (probably Ludovic needed a scheme before AdaCore had settled >> on theirs) > > Correct. I didn't invent this path myself though; Florian Weimer did, > when he made the very first proposal for a standard ("GNU Ada > Environment Specification") back in 2001 or so. According to $(man hier), an Ada compiler's spec files would not normally be counted among UNIX System Resources, specifically not in /usr/include, and since /usr/share seems to be the place for architecture independent files, the current paths seem o.K. to me. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ncurses and Ada 2012-03-12 13:20 ` Georg Bauhaus @ 2012-03-12 14:33 ` Simon Wright 2012-03-12 16:23 ` Georg Bauhaus 0 siblings, 1 reply; 15+ messages in thread From: Simon Wright @ 2012-03-12 14:33 UTC (permalink / raw) Georg Bauhaus <rm.dash-bauhaus@futureapps.de> writes: > According to $(man hier), an Ada compiler's spec files would not > normally be counted among UNIX System Resources, specifically not in > /usr/include, and since /usr/share seems to be the place for > architecture independent files, the current paths seem o.K. to me. I don't have a Linux box immediately to hand, but Apple seem to think it's OK to include Tcl & Python (neither of which is mentioned in `man hier`, any more than Ada is) in /usr/include. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ncurses and Ada 2012-03-12 14:33 ` Simon Wright @ 2012-03-12 16:23 ` Georg Bauhaus 0 siblings, 0 replies; 15+ messages in thread From: Georg Bauhaus @ 2012-03-12 16:23 UTC (permalink / raw) On 12.03.12 15:33, Simon Wright wrote: > Georg Bauhaus <rm.dash-bauhaus@futureapps.de> writes: > >> According to $(man hier), an Ada compiler's spec files would not >> normally be counted among UNIX System Resources, specifically not in >> /usr/include, and since /usr/share seems to be the place for >> architecture independent files, the current paths seem o.K. to me. > > I don't have a Linux box immediately to hand, but Apple seem to think > it's OK to include Tcl & Python (neither of which is mentioned in `man > hier`, any more than Ada is) in /usr/include. The header files seem to be mostly for interfacing to the language (or library). Objective-C has its "objc" subdirectory, too. So do PHP and some "system components". Still, the bulk of what (I think) would correspond to the Ada RTS, or AWS or Ada libraries in general lives in /System/Library/Frameworks/{Tcl,Python}.framework/Versions, alongside Cocoa, Ruby, IOKit, LDAP, ... I'd nevertheless hope to find, in an "ada" subdirectory of /usr/include, Ada related header files for cross language programming. For example,if GNAT is a system compiler, one might then write #include <ada/lifecycle.h> and then the C compiler knows about functions (ultimately) named void adainit (void); void adafinal (void); Thus, if other compilers have a comparable mechanism, the ARG could bless names of functions controlling it, and programs that call Ada parts from C parts would be made portable by including the system header. Once Apple considers Ada part of the system, they will have done it for us ;-) ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ncurses and Ada 2012-03-12 8:18 ` Julian Leyh 2012-03-12 8:42 ` Simon Wright @ 2012-03-12 9:04 ` Eilie 1 sibling, 0 replies; 15+ messages in thread From: Eilie @ 2012-03-12 9:04 UTC (permalink / raw) On 2012-03-12, Julian Leyh <julian@vgai.de> wrote: > I created a few Ada related PKGBUILDs for the AUR and will have a look at ncursesada. > > BTW, where did you get /usr/share/ada/adainclude from? Normally, the Ada library packages should install to /usr/include/<foo> and /usr/lib/<foo> and their project files to /usr/lib/gnat. > > You can identify the package owning a file by using pacman -Qo /usr/share/ada/adainclude/terminal_interface-curses.adb is owned by ncurses 5.9-3 I just build ncurses from ABS with ada support. ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2012-03-12 16:23 UTC | newest] Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-03-09 14:40 Ncurses and Ada Eilie 2012-03-09 14:56 ` mockturtle 2012-03-09 16:59 ` Eilie 2012-03-09 17:13 ` Shark8 2012-03-09 17:44 ` Eilie 2012-03-09 17:35 ` mockturtle 2012-03-09 17:57 ` Ludovic Brenta 2012-03-09 18:28 ` Eilie 2012-03-12 8:18 ` Julian Leyh 2012-03-12 8:42 ` Simon Wright 2012-03-12 10:20 ` Ludovic Brenta 2012-03-12 13:20 ` Georg Bauhaus 2012-03-12 14:33 ` Simon Wright 2012-03-12 16:23 ` Georg Bauhaus 2012-03-12 9:04 ` Eilie
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox