TailBite 1.0 Preview, soon in PureProject and PureArea

TailBite specific forum

Moderators: gnozal, ABBKlaus, lexvictory

User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Post by NoahPhense »

El_Choni wrote:Sounds reasonable and feasible, I'll try to do it easily, with PB's commands (IncludeBinary...)

Anyway, all my projects are stuck until my brother finds a new home in Madrid; he has taken over my room and my computer, and I won't have access to it for some days.

I'll do all the requested stuff ASAP.

Regards,
Got your new release.. nice job!! ..

ps - are you using my site for official releases or betas?

- np
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post by El_Choni »

I tried to upload the stuff, but I always get some kind of error after logged in.
El_Choni
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Post by NoahPhense »

El_Choni wrote:I tried to upload the stuff, but I always get some kind of error after logged in.
http://sourceforge.net/projects/filezilla

This is what I use.. it must use pasv mode.. never an issue

- np
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Hi !
I again have a new suggestion :
Would it be possible to include a .lib files that is containing functions in a Purelibrary that we would call from the pb file ?
Let me explain :

- I've got a .lib file with myfunction() into (which is not PB_myfunction and which won't be exported as a pb function)

- In my tailbite project (a purebasic file so), i will do :

Code: Select all

ProcedureDLL LibTesting()
;asm code which call myfunction, don't remember how we do this
EndProcedure
That way, the .lib file will be included in the tailbite project, and the function in the .lib file will be called by the LibTesting() command ;)
Could you try to add that ?

Yes, i know it's quite difficult, but for example, you could add something to check the first line of the pbfile, and if it's

Code: Select all

;IncludeLib "mylib.lib" "muylib2.lib" "..."
Then it automatically include the libs, and we can then call the function into with an asm command ;)
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post by El_Choni »

I think including a lib will be possible, but I'm stuck with an important bug right now (the one sverson posted). It's a bit difficult to overcome, and everything else is waiting until I fix this one, sorry. I hope II fix it soon.

Regards,
El_Choni
akee
Enthusiast
Enthusiast
Posts: 496
Joined: Wed Aug 18, 2004 9:52 am
Location: Penang, Malaysia

:)

Post by akee »

I really like the name Tailbite... It reminds of a dog I used to have that love biting it's tail when it itches. However it died of old age... at 18 years... I really miss that dog... :cry:
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post by El_Choni »

Thx, akee ;)

There's a saying in Spanish about 'the fish which bites its tail', related to things that go in circles and self repeat. With TailBite you can in theory write a lib in PB which calls another PB lib, which calls another PB lib, etc... which calls the first one, effectively 'tailbiting'. I've never wasted my time doing that, but thinking about it gave me the idea for the name. Of course, you can also do that by coding the libs in ASM or by using procedures, but, well, I just liked the name...

And, BTW, I also had a dog, many years ago, which used to bite his tail and everything else around ;)
El_Choni
Justin
Addict
Addict
Posts: 948
Joined: Sat Apr 26, 2003 2:49 pm

Post by Justin »

choni, it would be possible to have some support for passing variables of [any] type like in the .desc file?

the problem are strings, if you define them as longs in the proceduredll only works if you pass a single string, passing a string addition doesn't work

proceduredll foo(a.l)
endprocedure

foo("a" + "b") , will not work

i think is because the new string system fred implemented, before i think you could do

@"a" + "b" , wich gets the address of the resulting string, now you can't. there is also a bug related to this i posted, this crashes PB itself,

Procedure.s foo()
ProcedureReturn "a" + "b"
EndProcedure
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post by El_Choni »

The problem is that I don't know when to choose "Any". I could make type declaring mandatory for any other types, but I don't like that solution, would break existing stuff.

What about concatenating these strings previously in a variable? :mrgreen:

Anyway, why are you using a long instead of a string? Knowing that might help.

Regards,
El_Choni
Justin
Addict
Addict
Posts: 948
Joined: Sat Apr 26, 2003 2:49 pm

Post by Justin »

The problem is that I don't know when to choose "Any". I could make type declaring mandatory for any other types, but I don't like that solution, would break existing stuff.
not sure what you mean with break existing stuff, but if it's to maintain compability with previous versions i think is a mistake not to implement a new feature
What about concatenating these strings previously in a variable?
yes, the easy solution but i like to create variables only when needed. cleaner and faster code, specially with strings
Anyway, why are you using a long instead of a string? Knowing that might help
as a workaround to the ANY type. using a long lets you pass strings and longs, the parameter i'm passing can be a string or an integer. the parameter type is passed in another argument, since i think there is no way to know it from within the function
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post by El_Choni »

What do you think of this:

If an argument is declared as ".any", "Any" will be used instead of "Long" for that argument:

Code: Select all

ProcedureDLL foo(mylongorstring.any)
  ; stuff
EndProcedure
I'll include a dummy "any" structure in a .res file, which can be deleted in case you don't need that much help.

But, now that I think of it, you wouldn't be able to use other structure for that value...

Hmmm... just thinking loud, I'll try to find a simple solution.

Regards,
El_Choni
Justin
Addict
Addict
Posts: 948
Joined: Sat Apr 26, 2003 2:49 pm

Post by Justin »

not a big problem, there are hundreds of reserved structures in the win res

btw, is possible to also return any type?,

proceduredll.any bstr(a.any)

this function could convert a string to BSTR(com string) back and forth, passing a bstr(long) returns the pb string version, passing a pb str returns a bstr(long). SysStringLen_() could be used to determine if a bstr is being passed, SysStringLen_("a") returns 0
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

Just a suggestion:
What about checking for "!public name" as well? Would that be possible?
Good programmers don't comment their code. It was hard to write, should be hard to read.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

A problem I've just been through :
I've done a library with that to test something :

Code: Select all

ProcedureDLL Test()
  MessageRequester("","")
EndProcedure
And I tried to Tailbite it, but it created a resident file instead of a library :?
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

@ElChoni :
What will be the next features of tailbite ?
Post Reply