logs archiveBotHelp.net / Freenode / #ada / 2015 / August / 2 / 1
antranigv
nop, still unable to install gnat with portage, which gcc should I use?
ok, what if I don't use the GCC version, there is also another one, right?
Visaoni
yeah adacore provides gnat too
antranigv
Visaoni: what are the differences?
Visaoni
Mostly license
basically
antranigv
what about GPS?
is it with gnat-gcc or gnat-gpl ?
Visaoni
I don't use it myself, can't say
I'd imagine you could use either
but I've found out first hand that isn't always true
(gprbuild on windows, for example)
Shark8
antranigv: I use Windows, and GPS is decent enough... there are a few quirks, and a few times features have been broken, but over all it's decent. It comes with AdaCore's GNAT-GPL installer (I'm on Windows, so I don't know how easy/hard it is on Linux).
Visaoni
Can you point it to another compiler or is it stuck on GNAT-GPL?
specing
uh. gotta love "C is bad" flamewars at 2 am
Shark8
specing: Where is this?
saison
is anyone able to look at this and tell me if I'm doing something stupid. just learning about protected types. http://pastebin.com/uifWhnM0
Shark8
Ok, the line "type Buffer is array (BufIndex) of Unbounded_String;" means that your buffer is /always/ size 10. (Because of the definition of BufIndex as 0 .. 10)
So 'Length will always be 10.
To have that so that it could have different 'Length you need to alter Buffer to "type Buffer is array (BufIndex range <>) of Unbounded_String;"
^-- This is the unconstrained definition; the original is constrained.
saison: What exactly is your purpose for the Buffer and protected object?
saison
it's supposed to be a synchronized queue/mailbox type thing. so writes will block if it's full, reads block if its empty. you can write/read from two threads
Shark8
Hm, ok.
saison
no real purpose just now, just playing around
Shark8
While it certainly is possible to use [un]constrained array types, perhaps it would be best to use Ada containers...
Give me a moment and I'll try'n type something up, ok?
saison
Shark8: that'd be great. I don't think ive seen containers yet.
Shark8
Cool.
Visaoni
for something like this? a constrained array seems like the only real option...
otherwise writers won't really need to block
still needs to be protected, but doesn't need any guards
then you get a bit more advanced and have writers write variable amounts, and start messing around with requeuing
Shark8
Visaoni: Unconstrained_Vector on Positive, and String.
saison: Sorry about the delay, I haven't used protected objects much... working out how to do familes w/ em.
saison
Shark8: no rush :)
Visaoni
Shark8: just don't see the point of an unconstrained buffer in a learning example on how to prevent writing to a full buffer
Shark8
saison: Here's one way to do it -- https://pastebin.mozilla.org/8841364
Of course there's a problem there: there's no real maximum for messages in a 'box'.
Which is what I was hoping to do w/ families... but I couldn't quite figure out how to do it hat way.
<--- Haven't used protected objects much.
saison
thanks ill have a look now
so these Ada containers are similar to std::vector etc from c++?
Shark8
saison: Yep.
saison: Well, at least the *_Vector ones.
saison: Here it is w/ entry families, and hiding away the mailbox_pkg package -- https://pastebin.mozilla.org/8841365
saison: It also has a maximum for the message-queues.
saison
Shark8: Thanks, thats pretty cool. I think it'll take me a bit to figure it all out
Shark8
saison: Sure thing; if you need any explanations, just ask.
charlie5
anyone using gcc 5.2.0 and having probs with access check failures ?
mm, not so bad after all
maybe they have tightened the checks
antranigv
okey, I was able to install GNAT, now, I need to add gnat1 to libexec path, hmm
specing
Shark8: #fsf
sparre
dbotton: How many entries in the competition? When will they be public? And when will the judges have watched all of them?
antranigv
excuse me for this dumb question, but, how do I use gnat?
specing
antranigv: you need: 1. candles 2. pentagram 3. black robe 4. ...
antranigv
lol
(:
fatal error: -fuse-linker-plugin, but liblto_plugin.so not found << hmm
sparre
antranigv: To compile a simple project: gnatmake (some options) main_source_file.adb
antranigv
sparre: yup, and there's where I'm getting that error :( ah, stuck, again...
sparre
It isn't an error I recognise.
What does 'gnatls -v' say?
I suspect that something is wrong with your installation.
antranigv
sparre: here http://paste.antranigv.me/ptsg7vpbc
yes, I suspect the same, maybe I should recompile everything :/
sparre
antranigv: Looks like at least a part of your installation works.
antranigv
brb, let's recompile the hole OS and be back... in a day (:
sparre
antranigv: Any reason you don't use a packaged version of GNAT?
charlie5
marino: the 'simple components' port is almost done
can you build ada apps to run on a tablet (android, i guess) ?
Lucretia
yes
yo charlie5
charlie5
hi Lucretia
would much porting be required, you think ?
Lucretia
I've only compiled gcc (with gnat) to android once
but the official sdk has gone to llvm now.
so android+ios = llvm
but should still be doable.
I used marino's patches as a guide
as there were bits he had to #ifdef out that I didn't (diff between bsd and linux)
can't remember much about it
but it did compile - never got past that stage tho
antranigv
okey, in the end, I think I'll just install the old gcc :/
charlie5
Lucretia: hok, thanks for info ... was mostly just curious
antranigv
yayyyyy it worked ^__^
Shark8
antranigv: Congrats.
Lucretia
dbotton: sent the link again, but just in case you don't get it again, check yer spam folder
or it's here https://www.dropbox.com/s/masx6vn8bh0h3zm/LukeAGuest_LearnAdaNow.mp4.bz2?dl=0
« prev next »