www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - What Happend To Tango Graphic's Package

reply Lester Martin <Lester ewam-associates.com> writes:
I just would like to know is there any update on the graphics package tango had
release quite some time ago.
Sep 22 2007
next sibling parent reply Mike Parker <aldacron71 yahoo.com> writes:
Lester Martin wrote:
 I just would like to know is there any update on the graphics package tango
had release quite some time ago.
It wasn't released, just announced that it was in development. And it still is. You should hear more about it after the new year.
Sep 22 2007
parent reply Lester Martin <Lester ewam-associates.com> writes:
Ok.  I just was wandering because all the GUI libraries I have downloaded seem
very tango uncooperative.  I have used DFL and tango with the lowest dmd
version that can support both of them and DFL still gives me function
dfl.socket.AsyncSocket.close function cl
ose does not override anything.  I haven't looke much at any other GUI libs
because this was my favorite before tango was released.

Mike Parker Wrote:

 Lester Martin wrote:
 I just would like to know is there any update on the graphics package tango
had release quite some time ago.
It wasn't released, just announced that it was in development. And it still is. You should hear more about it after the new year.
Sep 23 2007
next sibling parent Bill Baxter <dnewsgroup billbaxter.com> writes:
Lester Martin wrote:
 Ok.  I just was wandering because all the GUI libraries I have downloaded seem
very tango uncooperative.  I have used DFL and tango with the lowest dmd
version that can support both of them and DFL still gives me function
dfl.socket.AsyncSocket.close function cl
 ose does not override anything.  I haven't looke much at any other GUI libs
because this was my favorite before tango was released.
 
 Mike Parker Wrote:
 
 Lester Martin wrote:
 I just would like to know is there any update on the graphics package tango
had release quite some time ago.
It wasn't released, just announced that it was in development. And it still is. You should hear more about it after the new year.
The tango graphics package announced isn't going to be a GUI lib. It sounded more like an image generation API. Like what would be useful for on-the-fly server-side generation of images in a web server. --bb
Sep 23 2007
prev sibling next sibling parent "Vladimir Panteleev" <thecybershadow gmail.com> writes:
On Sun, 23 Sep 2007 12:11:22 +0300, Lester Martin <Lester ewam-associates.com>
wrote:

 Ok.  I just was wandering because all the GUI libraries I have downloaded seem
very tango uncooperative.  I have used DFL and tango with the lowest dmd
version that can support both of them and DFL still gives me function
dfl.socket.AsyncSocket.close function close does not override anything.  I
haven't looke much at any other GUI libs because this was my favorite before
tango was released.
Tango's Socket.close got renamed two times - once to "disconnect" and then to "detach". Beats me why. Here's my DFL patch to fix it: diff -u -r C:\Downloads\dfl-20070811\import\dfl/socket.d C:\Soft\dmd\import\dfl/socket.d --- C:\Downloads\dfl-20070811\import\dfl/socket.d 2007-07-27 10:47:42.000000000 +0300 +++ C:\Soft\dmd\import\dfl/socket.d 2007-08-31 06:24:35.593750000 +0300 -188,10 +188,26 } - override void close() + version(Tango) + { + override void detach() + { + unregisterEvent(this); + super.detach(); + } + + void close() + { + detach(); + } + } + else { - unregisterEvent(this); - super.close(); + override void close() + { + unregisterEvent(this); + super.close(); + } } -- Best regards, Vladimir mailto:thecybershadow gmail.com
Sep 23 2007
prev sibling next sibling parent Carlos Santander <csantander619 gmail.com> writes:
Lester Martin escribió:
 Ok.  I just was wandering because all the GUI libraries I have downloaded
 seem very tango uncooperative.  I have used DFL and tango with the lowest dmd
 version that can support both of them and DFL still gives me function
 dfl.socket.AsyncSocket.close function cl ose does not override anything.  I
 haven't looke much at any other GUI libs because this was my favorite before
 tango was released.
wxD works well with Tango. -- Carlos Santander Bernal
Sep 23 2007
prev sibling parent "Chris Miller" <chris dprogramming.com> writes:
On Sun, 23 Sep 2007 05:11:22 -0400, Lester Martin  
<Lester ewam-associates.com> wrote:

 Ok.  I just was wandering because all the GUI libraries I have  
 downloaded seem very tango uncooperative.  I have used DFL and tango  
 with the lowest dmd version that can support both of them and DFL still  
 gives me function dfl.socket.AsyncSocket.close function cl
 ose does not override anything.
Can you try the recent snapshot? http://wiki.dprogramming.com/Dfl/Snapshots By the way, DFL versions mention which versions of DMD and Tango they were tested with. If you have problems, you should go back to a version that was tested and is supported, or check out snapshots.
Sep 23 2007
prev sibling parent reply Robert Fraser <fraserofthenight gmail.com> writes:
Vladimir Panteleev Wrote:

 On Sun, 23 Sep 2007 12:11:22 +0300, Lester Martin <Lester ewam-associates.com>
wrote:
 
 Ok.  I just was wandering because all the GUI libraries I have downloaded seem
very tango uncooperative.  I have used DFL and tango with the lowest dmd
version that can support both of them and DFL still gives me function
dfl.socket.AsyncSocket.close function close does not override anything.  I
haven't looke much at any other GUI libs because this was my favorite before
tango was released.
Tango's Socket.close got renamed two times - once to "disconnect" and then to "detach". Beats me why. Here's my DFL patch to fix it:
Tango's naming has always been an issue for me. I like the library, but many of their naming decisions (toUtf8 instead of toString, Seq instead of List, renaming close, etc.) have baffled me. I know in my heart they're just trying to get the most accurate names, but sometimes I just wish they'd use names similar to what other standard libraries use.
Sep 23 2007
parent reply kris <foo bar.com> writes:
Robert Fraser wrote:
 Tango's naming has always been an issue for me. I like the library, but many
of their naming decisions (toUtf8 instead of toString, Seq instead of List,
renaming close, etc.) have baffled me. I know in my heart they're just trying
to get the most accurate names, but sometimes I just wish they'd use names
similar to what other standard libraries use.
Oh, close() is still there, it's just that the low-level device 'close' (like socket disconnect, etc) was renamed so that close() itself could do something a little more useful by default. This change does not affect the overwhelming majority of code (in fact, there's just one dependency I know of, over which there was some early communication). That is, the change does not affect "user-level" code. toUtf8() itself will very likely change when we make Tango compatible with phobos, so that might make some folks happy. That change could require a mechanical search/replace in user-code, but we'll very likely add an alias to ease that migration. That is, toString() and toUtf8() will likely map to the same this (at least temporarily). The unholy trinity of toUtf8(x), toUtf16(x), and toUtf32(x) variations will (very likely) remain as is, since they have a different signature from toString() and are always provided as a trio. For instance, tango.text.String will retain those three stooges. BTW, that particular class will perhaps have to be renamed to tango.text.Text instead. Hope that help to clarify things :)
Sep 23 2007
parent reply Chad J <gamerChad _spamIsBad_gmail.com> writes:
kris wrote:
 ...
 
 toUtf8() itself will very likely change when we make Tango compatible 
 with phobos, so that might make some folks happy. That change could 
 require a mechanical search/replace in user-code, but we'll very likely 
 add an alias to ease that migration. That is, toString() and toUtf8() 
 will likely map to the same this (at least temporarily).
 
 ...
I hope polysemous types come out and solve this mess. I do not like the first-class nature of char[] nor do I like toUtfXX().
Sep 23 2007
next sibling parent Robert Fraser <fraserofthenight gmail.com> writes:
Chad J Wrote:

 kris wrote:
 ...
 
 toUtf8() itself will very likely change when we make Tango compatible 
 with phobos, so that might make some folks happy. That change could 
 require a mechanical search/replace in user-code, but we'll very likely 
 add an alias to ease that migration. That is, toString() and toUtf8() 
 will likely map to the same this (at least temporarily).
 
 ...
I hope polysemous types come out and solve this mess. I do not like the first-class nature of char[] nor do I like toUtfXX().
What exactly do you mean by this? That you don't like the fact that objects can be implicitly converted to strings, that strings have special powers regular array types don't, or that 8-bit char types get prioritized over 16-bit and 32-bit types? I think the ability to implicitly convert an object to a string via toString is perfect for debugging, and the fact that strings can be used places other array types can't (like as template parameters) isn't bad at all, just more expressive power. The fact that char[] gets prioritized over wchar[] and dchar[] is a shame, though.
Sep 23 2007
prev sibling parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 9/24/07, Chad J <gamerChad _spamisbad_gmail.com> wrote:
 I hope polysemous types come out and solve this mess.
What does "polysemous type" mean? What are polysemous types?
Sep 24 2007
parent reply Christopher Wright <dhasenan gmail.com> writes:
Janice Caron wrote:
 On 9/24/07, Chad J <gamerChad _spamisbad_gmail.com> wrote:
 I hope polysemous types come out and solve this mess.
What does "polysemous type" mean? What are polysemous types?
A variable that can have several types depending on how it is assigned or casted is polysemous. Walter wants to use this especially for string literals -- should it be fixed length or not, should it be char, wchar, dchar? This sort of thing can be statically checked, but D doesn't do it currently. It probably will within the next year or so. http://s3.amazonaws.com/dconf2007/WalterAndrei.pdf page 23
Sep 24 2007
parent reply Don Clugston <dac nospam.com.au> writes:
Christopher Wright wrote:
 Janice Caron wrote:
 On 9/24/07, Chad J <gamerChad _spamisbad_gmail.com> wrote:
 I hope polysemous types come out and solve this mess.
What does "polysemous type" mean? What are polysemous types?
For example, the literal number 1. Could be a short, int, uint, float, complex number,... Strict typing forces us to assign a type to it, but actually they're all the same.
 
 A variable that can have several types depending on how it is assigned 
 or casted is polysemous. Walter wants to use this especially for string 
 literals -- should it be fixed length or not, should it be char, wchar, 
 dchar?
It should kill signed/unsigned type mismatches forever, too. It's really a fantastic concept.
Sep 24 2007
parent reply Reiner Pope <some address.com> writes:
Don Clugston wrote:
 Christopher Wright wrote:
 Janice Caron wrote:
 On 9/24/07, Chad J <gamerChad _spamisbad_gmail.com> wrote:
 I hope polysemous types come out and solve this mess.
What does "polysemous type" mean? What are polysemous types?
For example, the literal number 1. Could be a short, int, uint, float, complex number,... Strict typing forces us to assign a type to it, but actually they're all the same.
 A variable that can have several types depending on how it is assigned 
 or casted is polysemous. Walter wants to use this especially for 
 string literals -- should it be fixed length or not, should it be 
 char, wchar, dchar?
It should kill signed/unsigned type mismatches forever, too. It's really a fantastic concept.
Can someone explain how it works? From the slides, I can make a few guesses about it, but none of them seems to fit with everything on the slides. Guess #1: it's a form of type inference which is more powerful than "auto" because it examines use as well as the initial assignment. A number of other languages do this, and it's very nice, but it seems not to gel with the statement, "if it is used in a context where sign does matter ... then an error is issued." Guess #2: algebraic data types/discriminating unions/some other fancy name. The example, "function results (polysemous: result type or error type)" suggests this. In Haskell syntax, this might be the type, data FunctionResult = Result Int | Error String so the result is a union of a string and an int; pattern matching is used to check if it's an result or an error. However, this doesn't seem to relate to the rest of the examples. --- My concern is that, unless it is a form of type inference, I can't see a context where uint and int behave identically: for instance, they overflow at different places. If that's the case, then a specific semantics must be chosen (ie int over uint, or uint over int), and the polysemous-ness no longer exists. It seems like I've got completely the wrong idea about this. -- Reiner
Sep 25 2007
next sibling parent reply Christopher Wright <dhasenan gmail.com> writes:
Reiner Pope wrote:
 Don Clugston wrote:
 Christopher Wright wrote:
 Janice Caron wrote:
 On 9/24/07, Chad J <gamerChad _spamisbad_gmail.com> wrote:
 I hope polysemous types come out and solve this mess.
What does "polysemous type" mean? What are polysemous types?
For example, the literal number 1. Could be a short, int, uint, float, complex number,... Strict typing forces us to assign a type to it, but actually they're all the same.
 A variable that can have several types depending on how it is 
 assigned or casted is polysemous. Walter wants to use this especially 
 for string literals -- should it be fixed length or not, should it be 
 char, wchar, dchar?
It should kill signed/unsigned type mismatches forever, too. It's really a fantastic concept.
Can someone explain how it works? From the slides, I can make a few guesses about it, but none of them seems to fit with everything on the slides. Guess #1: it's a form of type inference which is more powerful than "auto" because it examines use as well as the initial assignment. A number of other languages do this, and it's very nice, but it seems not to gel with the statement, "if it is used in a context where sign does matter ... then an error is issued." Guess #2: algebraic data types/discriminating unions/some other fancy name. The example, "function results (polysemous: result type or error type)" suggests this. In Haskell syntax, this might be the type, data FunctionResult = Result Int | Error String so the result is a union of a string and an int; pattern matching is used to check if it's an result or an error. However, this doesn't seem to relate to the rest of the examples.
Well, that is a variable whose type depends on a runtime execution path. A polysemous type is the same value, but the type of that value can change based on compile time usage. Maybe on runtime usage: --- void foo (uint i) {} void bar (long j) {} PolysemousIntegerType getval () { return 0; } // syntax for polysemy? void main (char[][] args) { auto i = getval(); if (args.length == 0) { foo(i); } else { bar(i); } } Except I don't think the auto keyword will work with polysemous types, at least not initially. ---
 My concern is that, unless it is a form of type inference, I can't see a 
 context where uint and int behave identically: for instance, they 
 overflow at different places. If that's the case, then a specific 
 semantics must be chosen (ie int over uint, or uint over int), and the 
 polysemous-ness no longer exists.
 
 It seems like I've got completely the wrong idea about this.
Only a little -- you can check at compile time whether there's ambiguity, and just issue an error if there is.
    -- Reiner
 
Chris Wright.
Sep 25 2007
parent reply Reiner Pope <some address.com> writes:
Christopher Wright wrote:
 Reiner Pope wrote:
 Don Clugston wrote:
 Christopher Wright wrote:
 Janice Caron wrote:
 On 9/24/07, Chad J <gamerChad _spamisbad_gmail.com> wrote:
 I hope polysemous types come out and solve this mess.
What does "polysemous type" mean? What are polysemous types?
For example, the literal number 1. Could be a short, int, uint, float, complex number,... Strict typing forces us to assign a type to it, but actually they're all the same.
 A variable that can have several types depending on how it is 
 assigned or casted is polysemous. Walter wants to use this 
 especially for string literals -- should it be fixed length or not, 
 should it be char, wchar, dchar?
It should kill signed/unsigned type mismatches forever, too. It's really a fantastic concept.
Can someone explain how it works? From the slides, I can make a few guesses about it, but none of them seems to fit with everything on the slides. Guess #1: it's a form of type inference which is more powerful than "auto" because it examines use as well as the initial assignment. A number of other languages do this, and it's very nice, but it seems not to gel with the statement, "if it is used in a context where sign does matter ... then an error is issued." Guess #2: algebraic data types/discriminating unions/some other fancy name. The example, "function results (polysemous: result type or error type)" suggests this. In Haskell syntax, this might be the type, data FunctionResult = Result Int | Error String so the result is a union of a string and an int; pattern matching is used to check if it's an result or an error. However, this doesn't seem to relate to the rest of the examples.
Well, that is a variable whose type depends on a runtime execution path. A polysemous type is the same value, but the type of that value can change based on compile time usage. Maybe on runtime usage: --- void foo (uint i) {} void bar (long j) {} PolysemousIntegerType getval () { return 0; } // syntax for polysemy? void main (char[][] args) { auto i = getval(); if (args.length == 0) { foo(i); } else { bar(i); } } Except I don't think the auto keyword will work with polysemous types, at least not initially.
I understand your example to mean that it is some kind of integer type, and the casts may be omitted. Is there some other feature to it? But how is the variable actually stored? uint? long? It *must* be clearly defined, otherwise the following program would be undefined: void main() { auto i = getval(); // i is polysemous as defined above, with value 0 while (i < 1) --i; writefln(i); } I just realised that the comparison is disallowed by polysemy as per WalterAndrei.pdf. However, even if a type is polysemous between long and ulong don't problems occur when decrementing? When you decrement 0L you get -1L; when you decrement 0LU you get ulong.max; now the two types no longer have the same value. Or is there a special way of representing the numbers so they behave the same way? --- Perhaps polysemous types involve actually choosing a specific definition of the variable's representation in memory; in that case, "polysemous integer types" seems to be another word for "long, but it is implicitly convertable to all the other integer types." --- Thanks for your help. -- Reiner
Sep 25 2007
parent Christopher Wright <dhasenan gmail.com> writes:
Reiner Pope wrote:
 Christopher Wright wrote:
 Reiner Pope wrote:
 Don Clugston wrote:
 Christopher Wright wrote:
 Janice Caron wrote:
 On 9/24/07, Chad J <gamerChad _spamisbad_gmail.com> wrote:
 I hope polysemous types come out and solve this mess.
What does "polysemous type" mean? What are polysemous types?
For example, the literal number 1. Could be a short, int, uint, float, complex number,... Strict typing forces us to assign a type to it, but actually they're all the same.
 A variable that can have several types depending on how it is 
 assigned or casted is polysemous. Walter wants to use this 
 especially for string literals -- should it be fixed length or not, 
 should it be char, wchar, dchar?
It should kill signed/unsigned type mismatches forever, too. It's really a fantastic concept.
Can someone explain how it works? From the slides, I can make a few guesses about it, but none of them seems to fit with everything on the slides. Guess #1: it's a form of type inference which is more powerful than "auto" because it examines use as well as the initial assignment. A number of other languages do this, and it's very nice, but it seems not to gel with the statement, "if it is used in a context where sign does matter ... then an error is issued." Guess #2: algebraic data types/discriminating unions/some other fancy name. The example, "function results (polysemous: result type or error type)" suggests this. In Haskell syntax, this might be the type, data FunctionResult = Result Int | Error String so the result is a union of a string and an int; pattern matching is used to check if it's an result or an error. However, this doesn't seem to relate to the rest of the examples.
Well, that is a variable whose type depends on a runtime execution path. A polysemous type is the same value, but the type of that value can change based on compile time usage. Maybe on runtime usage: --- void foo (uint i) {} void bar (long j) {} PolysemousIntegerType getval () { return 0; } // syntax for polysemy? void main (char[][] args) { auto i = getval(); if (args.length == 0) { foo(i); } else { bar(i); } } Except I don't think the auto keyword will work with polysemous types, at least not initially.
I understand your example to mean that it is some kind of integer type, and the casts may be omitted. Is there some other feature to it? But how is the variable actually stored? uint? long? It *must* be clearly defined, otherwise the following program would be undefined: void main() { auto i = getval(); // i is polysemous as defined above, with value 0 while (i < 1) --i; writefln(i); }
For primitives, it is an implementation detail and you need not concern yourself. It only need be something that can handle the entire range of any of the possible values. For user-defined types, well, that's the polysemous type: class A { // As per the slides, these two make A polysemous. int opImplicitCastTo() { ... } byte opImplicitCastTo() { ... } } A something () { ... } void main () { auto foo = something(); // typeof(foo) == A if (foo & 0b0011000) // yields int, or byte, or something writefln("Fuzzy pattern!"); else writefln("Funny pattern!"); } I'm not sure this will make it into the language except for primitives. There, it's useful mainly because of literals.
Sep 26 2007
prev sibling parent Don Clugston <dac nospam.com.au> writes:
Reiner Pope wrote:
 Don Clugston wrote:
 Christopher Wright wrote:
 Janice Caron wrote:
 On 9/24/07, Chad J <gamerChad _spamisbad_gmail.com> wrote:
 I hope polysemous types come out and solve this mess.
What does "polysemous type" mean? What are polysemous types?
For example, the literal number 1. Could be a short, int, uint, float, complex number,... Strict typing forces us to assign a type to it, but actually they're all the same.
 A variable that can have several types depending on how it is 
 assigned or casted is polysemous. Walter wants to use this especially 
 for string literals -- should it be fixed length or not, should it be 
 char, wchar, dchar?
It should kill signed/unsigned type mismatches forever, too. It's really a fantastic concept.
Can someone explain how it works? From the slides, I can make a few guesses about it, but none of them seems to fit with everything on the slides. Guess #1: it's a form of type inference which is more powerful than "auto" because it examines use as well as the initial assignment. A number of other languages do this, and it's very nice, but it seems not to gel with the statement, "if it is used in a context where sign does matter ... then an error is issued." Guess #2: algebraic data types/discriminating unions/some other fancy name. The example, "function results (polysemous: result type or error type)" suggests this. In Haskell syntax, this might be the type, data FunctionResult = Result Int | Error String so the result is a union of a string and an int; pattern matching is used to check if it's an result or an error. However, this doesn't seem to relate to the rest of the examples. --- My concern is that, unless it is a form of type inference, I can't see a context where uint and int behave identically: for instance, they overflow at different places. If that's the case, then a specific semantics must be chosen (ie int over uint, or uint over int), and the polysemous-ness no longer exists.
They behave identically in cases like: int a = 7; uint b = 3; What's the type of (a|b) ? Is it int, or uint? So only one of the following two cases is OK; the other has a signed-unsigned type mismatch: int c = a|b; uint d = a|b; And it's completely arbitrary which one is allowed. But this is stupid; actually, it doesn't matter. The same asm code is generated, regardless. Static type checking is a nuisance in this case.
Sep 25 2007