Tango 0.95 beta1 released

Chad J gamerChad at _spamIsBad_gmail.com
Thu Feb 1 22:50:36 PST 2007


kris wrote:
> Chad J wrote:
> 
>> Good to see the famed uber lib out in the open!
>>
>> When I try to use it though, I get the following compiler error:
>>
>> --------------------------
>>
>> C:\Dprojects\tango>build main.d -clean
>> Assertion failure: 'classinfo->structsize == CLASSINFO_SIZE' on line 
>> 315 in file
>>  'toobj.c'
>>
>> abnormal program termination
>>
>> C:\Dprojects\tango>
>>
>> --------------------------
>>
>> main.d:
>>
>> import tango.io.Stdout;
>>
>> void main()
>> {
>>     Stdout.println("Hello world!" );
>> }
>>
>> --------------------------
>>
>> Any idea what caused this?
> 
> 
> Yes; the Tango release is based upon a 1004 runtime model. You're using 
> a 1.0 compiler? Imagine you'd find the same when using a 1.0 DMD 
> compiler with a 1004 phobos.lib?
> 
> 

Yeah I was using a 1.0 compiler and the problem went away when I 
installed 1.004.

> 
>>
>>
>> Also, reading the docs I have a few questions/complaints/critiques:
>>
>> Why do I have to instantiate classes to do stuff like basic file/path 
>> operations?  I don't like having to keep track of classes and stuff 
>> when doing such trivial things.  Maybe there could be a procedural 
>> wrapper around this stuff?
> 
> 
> That's possible, but usage of scope is handy here also? e.g.
> 
> scope path = new FilePath (...)
> 
> For many people, the advantages of keeping all the functionality 
> together is a real boon.
> 

For the rest of us, would you consider having a wrapper for that stuff 
included in Tango?

>>
>> Is there some simple way to get a start a timer that will either call 
>> a callback after some period of time or give you the time since it was 
>> started like in phobos' std.perf?
> 
> 
> 
> Not yet. Want to write one?
> 

Sure.

Problem is though, I'm in a bit of time crunch with midterms, 
scholarship essays, and my father's birthday, so I probably wouldn't be 
able to even start for another week or so.  Is that OK?

>>
>> Is there any way I could make my programs that still use phobos 
>> compile again without uninstalling Tango?
> 
> 
> Yes, flip the phobos.lib file (or .a) back to the original one, and use 
> the original -I setting. It's pretty easy, but might become easier if 
> the compiler did not hard-code the lib name ("phobos.lib").
> 
> 

OK, thanks.  Yeah, that's a bit inconvenient.  Hope dmd changes then.

>>
>> The documentation uses 'auto' a lot.  auto is a cool feature, but now 
>> I have no idea what file.read; returns or how to deal with it.  Is it 
>> an array of (u)bytes (I hope!) ??  Is it something else that needs 
>> special care?  I suppose I could read the more exhaustive API index or 
>> even the source, but that would kinda defeat the purpose of a quick 
>> reference.
> 
> 
> That's a good point. And at this time we don't have a quick reference 
> per se [writes a ticket for it].
> 
> FWIW, untyped data in Tango is invariably returned as a void[], and the 
> API links are pretty good even if the doc isn't always complete -- the 
> doc API uses CandyDoc, and the big-blue-title at the top leads to a 
> Decant generated source listing. All the other blue links on the 
> CandyDoc pages lead to Wiki comments, which we'll uses for improving the 
> code doc etc. Quite sophiticated really, for API doc :)
> 

Might I suggest that ubyte[] or byte[] be a more appropriate return type 
for some of those arrays due to the type-awareness of the GC?  It would 
suck to read in a "noisy" data file and have the GC choke on it, or have 
to always tell the GC that there are no pointers there.  I'm assuming 
you will never find valid pointers to memory in a file from a drive, or 
if you do, the GC probably wasn't scanning the file anyways so you'd 
have problems if you didn't already have a safety reference.



More information about the Digitalmars-d-announce mailing list