logs archiveBotHelp.net / Freenode / #ada / 2015 / July / 19 / 3
darkestkhan
debugger may distort results
whaleig
hm
sparre
Remember that (for example) String is an indefinite type, where different objects of the same type can have different ranges.
Visaoni
and I think sparre is probably on to something
darkestkhan
sparre: I'm "salvaging" whitaker-words right now... man, that one is CRYPTIC...
whaleig
Addressing with 'First throws the Constraint Error
but not thre
let me check
Visaoni
hm. just try printing out First and Last
darkestkhan
lol, there is some black magic out there... I don't even see how addressing with 'First would result in Constraint_Error
whaleig
no, no
Made it wrong
I mean
jumped to conclussions*
The error's elsewhere now
sparre
darkestkhan: Empty array. :-)
whaleig: Sounds like you have some seriously bad code.
Probably dependencies on uninitialised variables.
whaleig
oh, the code *is* bad
That I can't disagree
darkestkhan
sparre: empty or null?
whaleig
haha no I found the error
Before the line where the error happens
I call to a function that compares two of those arrayws
But in doing so, it also messes up with the values of their .v
.n*
And they end up being -1
Visaoni
... dear god
whaleig
Hence the error
Told ya it was bad
Visaoni
good luck... I think you're going to need it
whaleig
Well
At least I found the error
And already know how to fix it
So at least there's some hope... I hope
darkestkhan
whaleig: how come compare is messing with value of N?
whaleig
darkestkhan: let me copypaste the code it had before
darkestkhan: https://bpaste.net/show/b0d5976bd8ad
Visaoni
are you omitting the arguments or is it a nested function?
whaleig
nested function
ptd and ptit are global
Visaoni
ah
(Action) hopes this was intentional
whaleig
Yes that's intentional
Visaoni
I mean that the code is so bad :)
whaleig
Ah
:<
Visaoni
teach people to debug or... that you can write terrible code in any language or... something
darkestkhan
I have a habit of passing arguments even into nested functions
makes it easier to see flow of data
(Action) doesn't like global variables
nerdboy
moin
rtyler
moin moin
nerdboy
(Action) recovering from battle with crazy webkit dev stuff
darkestkhan
nerdboy: I recommend some crazy Ada for that
nerdboy
(Action) stuck with crazy C interface to kernel data
darkestkhan
nerdboy: for example: https://github.com/mk270/whitakers-words/blob/master/src/commands/makeinfl.adb
nerdboy
heh, seems like latest gcc warnings are getting more helpful even...
too many people need help apparently
../include/Ptr.h:72:3: warning: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Wdeprecated]
sparre
darkestkhan: I usually use a mix of formal parameters and "global" objects in nested subprograms.
darkestkhan: (whitakers-words) It definitely looks like it could benefit from a rescue mission.
darkestkhan
sparre: what do you think I'm doing?
it needs entire special devop forces ;P
sparre
I'm trying to find an excuse for helping out.
Maybe I should add it to the list of possible development projects for an Ada-DK hackaton.
godunko
hujuytjuytjuytrdxrtyuki,lp9desr
sparre
godunko: ?
godunko
>@>=550B>36BB=3>L5 A
Lucretia
if a c function takes a char* to place character into, a mapping would be out C.char_array, right?
sparre
I'm pretty sure you can check it in the LRM.
Lucretia
Can anyone see anything wrong with this http://pastebin.com/09F4rfhZ ?
I have
Buffer : in out C.char_array; should be out only
alexandrus
oh...c...xD
array and pointer to is the same in c...
so should work xD
Lucretia
doesn't
well, in GDB, the length parameter is coming out negative for some reason
Visaoni
I wonder
if it's not actually getting a length given
char* would just be a pointer to a char, char array would have a length
(no idea how C interfacing works. haven't touched it)
alexandrus
i have, but it has been a while
hmm...the rm actually gives it as array(size_t range <>) of aliased char
guess then only array(0)'access should be used
funny is, that the example uses C.char_array directly..
maybe the #pragma does it?
Lucretia , what pragma's/import's have you used?
jk4
marino: i get no output for that locale grep
on debian 8
my laptop is debian 8, my vps is debian 7, my router is openbsd and my new box is freebds
marino
jk4- it's okay, i just wanted to see if @euro was still used. my mac is full of locales but it doesn't use any modifiers
it's kind of pointless now anyway (except maybe for greece)
« prev 1 2 3 next »