digitalmars.D - What Happend To Tango Graphic's Package
- Lester Martin (1/1) Sep 22 2007 I just would like to know is there any update on the graphics package ta...
- Mike Parker (3/4) Sep 22 2007 It wasn't released, just announced that it was in development. And it
- Lester Martin (3/8) Sep 23 2007 Ok. I just was wandering because all the GUI libraries I have downloade...
- Bill Baxter (5/15) Sep 23 2007 The tango graphics package announced isn't going to be a GUI lib. It
- Vladimir Panteleev (38/39) Sep 23 2007 Tango's Socket.close got renamed two times - once to "disconnect" and th...
- Carlos Santander (4/10) Sep 23 2007 wxD works well with Tango.
- Chris Miller (7/12) Sep 23 2007 Can you try the recent snapshot?
- Robert Fraser (2/8) Sep 23 2007 Tango's naming has always been an issue for me. I like the library, but ...
- kris (18/19) Sep 23 2007 Oh, close() is still there, it's just that the low-level device 'close'
- Chad J (3/12) Sep 23 2007 I hope polysemous types come out and solve this mess. I do not like the...
- Robert Fraser (2/15) Sep 23 2007 What exactly do you mean by this? That you don't like the fact that obje...
- Janice Caron (2/3) Sep 24 2007 What does "polysemous type" mean? What are polysemous types?
- Christopher Wright (8/12) Sep 24 2007 A variable that can have several types depending on how it is assigned
- Don Clugston (6/16) Sep 24 2007 For example, the literal number 1. Could be a short, int, uint, float, c...
- Reiner Pope (24/44) Sep 25 2007 Can someone explain how it works?
- Christopher Wright (22/76) Sep 25 2007 Well, that is a variable whose type depends on a runtime execution path....
- Reiner Pope (27/95) Sep 25 2007 I understand your example to mean that it is some kind of integer type,
- Christopher Wright (20/105) Sep 26 2007 For primitives, it is an implementation detail and you need not concern
- Don Clugston (13/66) Sep 25 2007 They behave identically in cases like:
I just would like to know is there any update on the graphics package tango had release quite some time ago.
Sep 22 2007
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
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
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: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. --bbLester 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
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
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
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
Vladimir Panteleev Wrote:On Sun, 23 Sep 2007 12:11:22 +0300, Lester Martin <Lester ewam-associates.com> 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.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:
Sep 23 2007
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
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
Chad J Wrote:kris wrote: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.... 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
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
Janice Caron wrote:On 9/24/07, Chad J <gamerChad _spamisbad_gmail.com> wrote: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 23I hope polysemous types come out and solve this mess.What does "polysemous type" mean? What are polysemous types?
Sep 24 2007
Christopher Wright wrote:Janice Caron wrote: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.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?It should kill signed/unsigned type mismatches forever, too. It's really a fantastic concept.
Sep 24 2007
Don Clugston wrote:Christopher Wright wrote: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. "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." 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. -- ReinerJanice Caron wrote: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.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?It should kill signed/unsigned type mismatches forever, too. It's really a fantastic concept.
Sep 25 2007
Reiner Pope wrote:Don Clugston wrote: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. ---Christopher Wright wrote: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. "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." 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.Janice Caron wrote: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.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?It should kill signed/unsigned type mismatches forever, too. It's really a fantastic concept.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.-- ReinerChris Wright.
Sep 25 2007
Christopher Wright wrote:Reiner Pope wrote: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. -- ReinerDon Clugston wrote: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.Christopher Wright wrote: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. "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." 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.Janice Caron wrote: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.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?It should kill signed/unsigned type mismatches forever, too. It's really a fantastic concept.
Sep 25 2007
Reiner Pope wrote:Christopher Wright wrote: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.Reiner Pope wrote: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); }Don Clugston wrote: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.Christopher Wright wrote: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. "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." 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.Janice Caron wrote: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.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?It should kill signed/unsigned type mismatches forever, too. It's really a fantastic concept.
Sep 26 2007
Reiner Pope wrote:Don Clugston wrote: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.Christopher Wright wrote: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. "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." 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.Janice Caron wrote: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.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?It should kill signed/unsigned type mismatches forever, too. It's really a fantastic concept.
Sep 25 2007