www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Stewart's Utility Library 0.10 release - now exclusively for D2

reply Stewart Gordon <smjg_1998 yahoo.com> writes:
As some of you have heard already, I've taken the plunge and switched to D2.

And, having seemingly discovered that most people have already left D1 behind,
and that 
it's now harder than it was to make code compatible with both languages, I have
decided to 
make my libraries D2-only.

Other updates include the addition of DimensionedValue, my own stab at the old
problem of 
primitive units checking, changing DateInterval and TimeInterval from kludgy
typedefs to 
structs, and enforcing that set elements are immutable.

http://pr.stewartsplace.org.uk/d/sutil/

Stewart.
Apr 01 2012
parent reply Dmitry Olshansky <dmitry.olsh gmail.com> writes:
On 01.04.2012 20:00, Stewart Gordon wrote:
 As some of you have heard already, I've taken the plunge and switched to
 D2.

 And, having seemingly discovered that most people have already left D1
 behind, and that it's now harder than it was to make code compatible
 with both languages, I have decided to make my libraries D2-only.

 Other updates include the addition of DimensionedValue, my own stab at
 the old problem of primitive units checking, changing DateInterval and
 TimeInterval from kludgy typedefs to structs, and enforcing that set
 elements are immutable.

 http://pr.stewartsplace.org.uk/d/sutil/

 Stewart.

I gave this a brief look, the console stuff for windows caught my eye. No offense, but I totally expected console module to do coloring or some other cool terminal stuff. As is it looks like a workaround for stdio. BTW I think dgwrap can be safely yanked out, see http://dlang.org/phobos/std_functional.html#toDelegate -- Dmitry Olshansky
Apr 01 2012
next sibling parent Stewart Gordon <smjg_1998 yahoo.com> writes:
On 01/04/2012 18:27, Dmitry Olshansky wrote:
<snip>
 I gave this a brief look, the console stuff for windows caught my eye.
 No offense, but I totally expected console module to do coloring or some other
cool
 terminal stuff. As is it looks like a workaround for stdio.

I'm not sure what it would take to do stuff like that. SUL isn't a Windows programming library - it's a utility library that aims to be as platform-independent as possible. Though some bits still need implementing or testing under platforms other than Win32 platforms (anyone want to help?). The console module was created to get around three problems with stdio: - no codepage support - EOF assumed to be false unless known otherwise - line of output is lost when EOF of stdin is reached (bug in Win9x, though fixed in Win2000+) Still, I wonder how adding the "cool terminal stuff" of which you speak would go down. One worry is whether it'll detract from the primary purpose of the module....
 BTW I think dgwrap can be safely yanked out, see
 http://dlang.org/phobos/std_functional.html#toDelegate

Yes, I've discovered that. And I've noticed it's more general than dgwrap. I guess I'll have to experiment with it. But I still wonder if there's a way that it could be made to work with variadics and whatever else. (Speaking of which, does anyone still use C-style or D-style runtime variadics, or have variadic templates taken over?) Stewart.
Apr 01 2012
prev sibling parent Stewart Gordon <smjg_1998 yahoo.com> writes:
On 01/04/2012 18:27, Dmitry Olshansky wrote:
<snip>
 No offense, but I totally expected console module to do coloring or some other
cool
 terminal stuff. As is it looks like a workaround for stdio.

I've now rephrased the description of console on the library's main page to make its purpose clearer. Stewart.
Apr 01 2012