www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - What would you rewrite in D?

reply sybrandy <sybrandy gmail.com> writes:
Just asking out of curiosity.  With all the great language features, I'm 
sure that many of you have thought about this.

For me, I figured a good start would be your basic Unix/Linux/BSD 
utilities, like cat and grep.  I figure it may make the code easier to 
read and maintain as well as potentially improve the quality of the 
software.  Of course, most of these are so old they're probably quite 
bug free, but some probably could use a rewrite.  Some may even benefit 
for threading.

Anyone else?

Casey
Oct 05 2010
next sibling parent bearophile <bearophileHUGS lycos.com> writes:
sybrandy:

 Anyone else?

There are several things I'd like to translate to D. Some of them are: - a constraint solver that I use in Python - many small things to perform combinatorics (this is partially fit for Phobos2 too). - The mem.c/mem.h memory management utility written by Walter for C programming, from here: http://c.snippets.org/code/temp/snip-c.zip for when you need to use manual memory management in D :-) - A hierarchical memory manager, http://swapped.cc/halloc/ again for low-level manual memory management. - This little C++ solver for the fifteen puzzle: http://www.codeguru.com/dbfiles/get_file/puzzle_src.zip - Some other small and medium-sized bioinformatics tools. Bye, bearophile
Oct 05 2010
prev sibling next sibling parent BCS <none anon.com> writes:
DMD

-- 
... <IXOYE><
Oct 05 2010
prev sibling next sibling parent Michael Chen <sth4nth gmail.com> writes:
There is DDMD.

On Wed, Oct 6, 2010 at 10:04 AM, BCS <none anon.com> wrote:
 DMD

 --
 ... <IXOYE><

Oct 05 2010
prev sibling next sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 10/5/10 17:27 CDT, sybrandy wrote:
 Just asking out of curiosity.  With all the great language features, I'm
 sure that many of you have thought about this.

 For me, I figured a good start would be your basic Unix/Linux/BSD
 utilities, like cat and grep. I figure it may make the code easier to
 read and maintain as well as potentially improve the quality of the
 software. Of course, most of these are so old they're probably quite bug
 free, but some probably could use a rewrite. Some may even benefit for
 threading.

 Anyone else?

 Casey

I wouldn't spend much time on rewriting classic utilities in D. There's plenty to be done anew. One category of tools to be written in D are utilities aimed at D itself (parsers, analyzers, Thrift bindings, protocol buffers bindings, code for DB interface, etc.) Andrei
Oct 05 2010
next sibling parent reply Jonathan M Davis <jmdavisProg gmx.com> writes:
On Tuesday 05 October 2010 20:16:41 Andrei Alexandrescu wrote:
 On 10/5/10 17:27 CDT, sybrandy wrote:
 Just asking out of curiosity.  With all the great language features, I'm
 sure that many of you have thought about this.
 
 For me, I figured a good start would be your basic Unix/Linux/BSD
 utilities, like cat and grep. I figure it may make the code easier to
 read and maintain as well as potentially improve the quality of the
 software. Of course, most of these are so old they're probably quite bug
 free, but some probably could use a rewrite. Some may even benefit for
 threading.
 
 Anyone else?
 
 Casey

I wouldn't spend much time on rewriting classic utilities in D. There's plenty to be done anew. One category of tools to be written in D are utilities aimed at D itself (parsers, analyzers, Thrift bindings, protocol buffers bindings, code for DB interface, etc.) Andrei

Indeed. It could be reasonable to convert existing C or C++ code to D if you're going to be heavily changing it, but converting pre-existing applications which are currently in C or C++, and which you don't need to maintain, seems like a waste of time. It _could_ be an interesting exercise in how to do things in D and could very well show shortcomings in D, dmd's current implementation, and/or shortcomings in Phobos, but then so would new applications. At this point, if I can choose what language I'm going to write something in, I'm almost certainly going to choose D (though obviously stuff like GUI apps may not really be properly feasible in D yet, and some things are just gonig to work better in other languages), but I have enough to do (and not enough time to do it) without spending the time to rewrite entire, working applications in D. - Jonathan M Davis
Oct 05 2010
parent sybrandy <sybrandy gmail.com> writes:
 I wouldn't spend much time on rewriting classic utilities in D. There's
 plenty to be done anew. One category of tools to be written in D are
 utilities aimed at D itself (parsers, analyzers, Thrift bindings,
 protocol buffers bindings, code for DB interface, etc.)

 Andrei

Indeed. It could be reasonable to convert existing C or C++ code to D if you're going to be heavily changing it, but converting pre-existing applications which are currently in C or C++, and which you don't need to maintain, seems like a waste of time. It _could_ be an interesting exercise in how to do things in D and could very well show shortcomings in D, dmd's current implementation, and/or shortcomings in Phobos, but then so would new applications. At this point, if I can choose what language I'm going to write something in, I'm almost certainly going to choose D (though obviously stuff like GUI apps may not really be properly feasible in D yet, and some things are just gonig to work better in other languages), but I have enough to do (and not enough time to do it) without spending the time to rewrite entire, working applications in D. - Jonathan M Davis

All true. I just figured that it's 1) a nice benchmark to show that yes, D can replace C/C++ and 2) a way to review the existing utils and potentially make them work a bit better. I also have a sneaking suspicion that there may a few hidden bugs that could be prevented by good D programming. Casey
Oct 06 2010
prev sibling parent reply JMRyan <nospam nospam.com> writes:
Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote in news:i8gpne
$2o9r$1 digitalmars.com:

 I wouldn't spend much time on rewriting classic utilities in D. There's 
 plenty to be done anew. One category of tools to be written in D are 
 utilities aimed at D itself (parsers, analyzers, Thrift bindings, 
 protocol buffers bindings, code for DB interface, etc.)
 
 Andrei

If there are old standby's to be rewritten in D, my first choice would not be full programs (for the reasons you suggest). But I might like to see some C++ or even Java libraries rewritten in D to make the more easily available or reliable. wxWidgets, Qt, or SWT make for obvious choices. I'm not the only ones to whom these were obvious as the wxD, QtD, and DWT projects indicate. Not that I want to take on such a project myself, but it's good to see others working on them. (Well, wxD, and QtD are not translations, but oh well).
Oct 06 2010
parent reply "Nick Sabalausky" <a a.a> writes:
"JMRyan" <nospam nospam.com> wrote in message 
news:i8ie7k$d1j$1 digitalmars.com...
 Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote in news:i8gpne
 $2o9r$1 digitalmars.com:

 I wouldn't spend much time on rewriting classic utilities in D. There's
 plenty to be done anew. One category of tools to be written in D are
 utilities aimed at D itself (parsers, analyzers, Thrift bindings,
 protocol buffers bindings, code for DB interface, etc.)

 Andrei

If there are old standby's to be rewritten in D, my first choice would not be full programs (for the reasons you suggest). But I might like to see some C++ or even Java libraries rewritten in D to make the more easily available or reliable. wxWidgets, Qt, or SWT make for obvious choices. I'm not the only ones to whom these were obvious as the wxD, QtD, and DWT projects indicate. Not that I want to take on such a project myself, but it's good to see others working on them. (Well, wxD, and QtD are not translations, but oh well).

Yea, I've been thinking it would be nice to have, at the very least, an overly-simplified D interface to Qt, that at least worked, even if it wasn't as fully-fleshed-out and ideal as QtD was aiming to be. Just so D2 users could make cross-platform GUI apps without having to resort to GTK. I'm sure the GTKD devs did a fine job and all, so nothing against them, but frankly I think I'd rather go around beating up old ladies and baby seals than be the author of a GTK-based app.
Oct 06 2010
parent reply Daniel Gibson <metalcaedes gmail.com> writes:
Nick Sabalausky wrote:
  I'd rather go around beating up old ladies and baby seals than be the 
 author of a GTK-based app.
 

because ... ?
Oct 06 2010
parent reply Robert Clipsham <robert octarineparrot.com> writes:
On 06/10/10 22:26, Daniel Gibson wrote:
 Nick Sabalausky wrote:
 I'd rather go around beating up old ladies and baby seals than be the
 author of a GTK-based app.

because ... ?

If you'd used GTK you'd know ;D -- Robert http://octarineparrot.com/
Oct 06 2010
parent reply "Nick Sabalausky" <a a.a> writes:
"Robert Clipsham" <robert octarineparrot.com> wrote in message 
news:i8ipl4$1tvc$1 digitalmars.com...
 On 06/10/10 22:26, Daniel Gibson wrote:
 Nick Sabalausky wrote:
 I'd rather go around beating up old ladies and baby seals than be the
 author of a GTK-based app.

because ... ?


I have a severe distate for non-native-GUI apps. (And even moreso when the result is a UI that's all big-n-chunky.)
 If you'd used GTK you'd know ;D

Heh, actually, I haven't used GTK. At least not from the programmer side (just the end-user side).
Oct 06 2010
parent reply Daniel Gibson <metalcaedes gmail.com> writes:
Nick Sabalausky schrieb:
 "Robert Clipsham" <robert octarineparrot.com> wrote in message 
 news:i8ipl4$1tvc$1 digitalmars.com...
 On 06/10/10 22:26, Daniel Gibson wrote:
 Nick Sabalausky wrote:
 I'd rather go around beating up old ladies and baby seals than be the
 author of a GTK-based app.



I have a severe distate for non-native-GUI apps. (And even moreso when the result is a UI that's all big-n-chunky.)

Ok, for me GTK is native because I use Linux and a GTK based desktop. I know that there's a native GTK port for OSX/Quartz and I thought GTK had themes to look native on Windows? If that isn't the case I do understand your objection.. I hate non native GUIs as well (java swing is particularly bad).
 If you'd used GTK you'd know ;D

Heh, actually, I haven't used GTK. At least not from the programmer side (just the end-user side).

I have to admit that I don't have much experience with GUI programming (in general and GTK in particular) either.
Oct 06 2010
parent reply "Nick Sabalausky" <a a.a> writes:
"Daniel Gibson" <metalcaedes gmail.com> wrote in message 
news:i8iqr3$22s6$5 digitalmars.com...
 Nick Sabalausky schrieb:
 "Robert Clipsham" <robert octarineparrot.com> wrote in message 
 news:i8ipl4$1tvc$1 digitalmars.com...
 On 06/10/10 22:26, Daniel Gibson wrote:
 Nick Sabalausky wrote:
 I'd rather go around beating up old ladies and baby seals than be the
 author of a GTK-based app.



I have a severe distate for non-native-GUI apps. (And even moreso when the result is a UI that's all big-n-chunky.)

Ok, for me GTK is native because I use Linux and a GTK based desktop. I know that there's a native GTK port for OSX/Quartz and I thought GTK had themes to look native on Windows?

It does make a vague attempt to look native on Windows, and is FAR better in that regard than, say, Swing, Winamp, Iron/Chrome, or pretty much anything from Apple. But there's still rather noticable differences in both look (the chunkiness I mentioned, just as one example) and in feel (particulary if you're using GIMP). It's kinda like gluing a picture of some wings overtop the logo on a Ferrari and saying "See, it's an Aston Martin!"
Oct 06 2010
parent reply Robert Clipsham <robert octarineparrot.com> writes:
On 06/10/10 23:03, Nick Sabalausky wrote:
 Ok, for me GTK is native because I use Linux and a GTK based desktop.
 I know that there's a native GTK port for OSX/Quartz and I thought GTK had
 themes to look native on Windows?

It does make a vague attempt to look native on Windows, and is FAR better in that regard than, say, Swing, Winamp, Iron/Chrome, or pretty much anything from Apple. But there's still rather noticable differences in both look (the chunkiness I mentioned, just as one example) and in feel (particulary if you're using GIMP). It's kinda like gluing a picture of some wings overtop the logo on a Ferrari and saying "See, it's an Aston Martin!"

Platform wise, GTK looks appalling on OS X, acceptable, if non-native on Windows (I think there's a GTK theme that fixes this, not sure), and, well, you use it on linux. As for Qt, it uses the native GUI for all the platforms it works on (and if you don't like that there's a config tool to make it look as ugly as you like :)). From a developers standpoint, GTK is a lot more awkward to work with (whether you're using the C interface or the GtkD wrapper), and is generally not as nice to work with (based on a few hundred lines of code that did very little, I switched to Qt at that point). Qt on the other hand I've found a pleasure to work with from day 1, everything seems to work as expected, and typically needs far less code. -- Robert http://octarineparrot.com/
Oct 06 2010
next sibling parent reply "Nick Sabalausky" <a a.a> writes:
"Robert Clipsham" <robert octarineparrot.com> wrote in message 
news:i8it3t$26f5$1 digitalmars.com...
 On 06/10/10 23:03, Nick Sabalausky wrote:
 Ok, for me GTK is native because I use Linux and a GTK based desktop.
 I know that there's a native GTK port for OSX/Quartz and I thought GTK 
 had
 themes to look native on Windows?

It does make a vague attempt to look native on Windows, and is FAR better in that regard than, say, Swing, Winamp, Iron/Chrome, or pretty much anything from Apple. But there's still rather noticable differences in both look (the chunkiness I mentioned, just as one example) and in feel (particulary if you're using GIMP). It's kinda like gluing a picture of some wings overtop the logo on a Ferrari and saying "See, it's an Aston Martin!"

Platform wise, GTK looks appalling on OS X, acceptable, if non-native on Windows (I think there's a GTK theme that fixes this, not sure), and, well, you use it on linux.

Unless you're a KDE (or Xfce) user. Which actually brings up another thing: It's my understanding that wxWidgets can use other things than just GTK on Linux. And AIUI, Qt and KDE are tied togther in the same way as GTK and GNOME, so does that mean Qt won't use GTK for Linux users running GNOME?
Oct 06 2010
next sibling parent Daniel Gibson <metalcaedes gmail.com> writes:
Nick Sabalausky schrieb:
 "Robert Clipsham" <robert octarineparrot.com> wrote in message 
 news:i8it3t$26f5$1 digitalmars.com...
 On 06/10/10 23:03, Nick Sabalausky wrote:
 Ok, for me GTK is native because I use Linux and a GTK based desktop.
 I know that there's a native GTK port for OSX/Quartz and I thought GTK 
 had
 themes to look native on Windows?

in that regard than, say, Swing, Winamp, Iron/Chrome, or pretty much anything from Apple. But there's still rather noticable differences in both look (the chunkiness I mentioned, just as one example) and in feel (particulary if you're using GIMP). It's kinda like gluing a picture of some wings overtop the logo on a Ferrari and saying "See, it's an Aston Martin!"

Windows (I think there's a GTK theme that fixes this, not sure), and, well, you use it on linux.

Unless you're a KDE (or Xfce) user. Which actually brings up another thing: It's my understanding that wxWidgets can use other things than just GTK on Linux. And AIUI, Qt and KDE are tied togther in the same way as GTK and GNOME, so does that mean Qt won't use GTK for Linux users running GNOME?

Lots of Qt applications don't use kdelibs and lots of GTK applications don't use gnomes libs so I wouldn't say they're tied together. Newer Qt versions can use GTK themes and even GTKs filepicker, so they feel native for non-kde-users. (Getting this to work can however be a bit tricky, at least when using xfce the correct theme isn't detected out of the box)
Oct 06 2010
prev sibling parent Robert Clipsham <robert octarineparrot.com> writes:
On 07/10/10 00:28, Nick Sabalausky wrote:
 Unless you're a KDE (or Xfce) user. Which actually brings up another thing:
 It's my understanding that wxWidgets can use other things than just GTK on
 Linux. And AIUI, Qt and KDE are tied togther in the same way as GTK and
 GNOME, so does that mean Qt won't use GTK for Linux users running GNOME?

Dunno about GTK, you can set Qt to use your GTK theme though, thus keeping your theme in sync across both Qt and GTK apps. -- Robert http://octarineparrot.com/
Oct 07 2010
prev sibling next sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Wednesday, October 06, 2010 16:28:49 Nick Sabalausky wrote:
 "Robert Clipsham" <robert octarineparrot.com> wrote in message
 news:i8it3t$26f5$1 digitalmars.com...
 
 On 06/10/10 23:03, Nick Sabalausky wrote:
 Ok, for me GTK is native because I use Linux and a GTK based desktop.
 I know that there's a native GTK port for OSX/Quartz and I thought GTK
 had
 themes to look native on Windows?

It does make a vague attempt to look native on Windows, and is FAR better in that regard than, say, Swing, Winamp, Iron/Chrome, or pretty much anything from Apple. But there's still rather noticable differences in both look (the chunkiness I mentioned, just as one example) and in feel (particulary if you're using GIMP). It's kinda like gluing a picture of some wings overtop the logo on a Ferrari and saying "See, it's an Aston Martin!"

Platform wise, GTK looks appalling on OS X, acceptable, if non-native on Windows (I think there's a GTK theme that fixes this, not sure), and, well, you use it on linux.

Unless you're a KDE (or Xfce) user. Which actually brings up another thing: It's my understanding that wxWidgets can use other things than just GTK on Linux.

That's definitely cool if it can, but as far as I know, I've never seen it done. wxwidget apps always seem to look like gtk in Linux (aka butt-ugly - I hate the look of gtk; I'd have to be truly desperate to even consider writing an ap that used gtk).
 And AIUI, Qt and KDE are tied togther in the same way as GTK and
 GNOME, so does that mean Qt won't use GTK for Linux users running GNOME?

There may be a gtk theme that gnome could enable (they have a qt theme for gtk in KDE, but since it only changes the look somewhat and the functionality not at all - like using a proper, Qt/KDE file dialog - the gain is minimal), but I rather doubt that Qt makes an attempt to look like gtk on its own. Regardless, since I'm a diehard KDE user, I wouldn't know. The whole idea of "native" gets a bit funny on Linux anyway, since there really isn't such thing as a native GUI on Linux. The closest that you'd get is whatever GUI toolkit your DE uses, but it still isn't really native like you get with Windows. - Jonathan M Davis
Oct 06 2010
prev sibling next sibling parent reply Seth Hoenig <seth.a.hoenig gmail.com> writes:
--0016e6480d1e73fb140491fdff53
Content-Type: text/plain; charset=ISO-8859-1

 Open SSL
http://www.peereboom.us/assl/assl/html/openssl.html

--0016e6480d1e73fb140491fdff53
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote"><div><br></div><div>=A0Open SSL</div></div><div>=
<meta http-equiv=3D"content-type" content=3D"text/html; charset=3Dutf-8"><a=
 href=3D"http://www.peereboom.us/assl/assl/html/openssl.html">http://www.pe=
ereboom.us/assl/assl/html/openssl.html</a></div>
<div><br></div><div><br></div>

--0016e6480d1e73fb140491fdff53--
Oct 06 2010
parent "Nick Sabalausky" <a a.a> writes:
"Seth Hoenig" <seth.a.hoenig gmail.com> wrote in message 
news:mailman.452.1286420009.858.digitalmars-d puremagic.com...
 Open SSL
 http://www.peereboom.us/assl/assl/html/openssl.html

Boy, that describes sooo many things I've had to deal with. Including the entire (VB6) codebase at a company I used to work for. (Let's name a function that loads a file "save"! Yea! Oh, and "ccc" is a useful variable name, isn't it? Let's use it everywhere! And let's do an NIH "else" by goto-ing over the next 400 lines starting at the end of a "then" clause! And then pretend that we're all professionals! Fuck, I still have nightmares about that shithole.)
Oct 06 2010
prev sibling next sibling parent Jimmy Cao <jcao219 gmail.com> writes:
--0015174c0ffa0efce70491fe0c50
Content-Type: text/plain; charset=ISO-8859-1

Yes!  When I was trying to get D to work with HTTPS, it took me a long time
to figure out how to do it.
I ended up using GnuTLS, somehow, with someone's help.

On Wed, Oct 6, 2010 at 9:53 PM, Seth Hoenig <seth.a.hoenig gmail.com> wrote:

  Open SSL
 http://www.peereboom.us/assl/assl/html/openssl.html

--0015174c0ffa0efce70491fe0c50 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Yes! =A0When I was trying to get D to work with HTTPS, it took me a long ti= me to figure out how to do it.<div>I ended up using GnuTLS, somehow, with s= omeone&#39;s help.<br><br><div class=3D"gmail_quote">On Wed, Oct 6, 2010 at= 9:53 PM, Seth Hoenig <span dir=3D"ltr">&lt;<a href=3D"mailto:seth.a.hoenig= gmail.com">seth.a.hoenig gmail.com</a>&gt;</span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex;"><div class=3D"gmail_quote"><div><br></div><= div>=A0Open SSL</div></div><div><a href=3D"http://www.peereboom.us/assl/ass= l/html/openssl.html" target=3D"_blank">http://www.peereboom.us/assl/assl/ht= ml/openssl.html</a></div> <div><br></div><div><br></div> </blockquote></div><br></div> --0015174c0ffa0efce70491fe0c50--
Oct 06 2010
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2010-10-07 00:26, Robert Clipsham wrote:
 On 06/10/10 23:03, Nick Sabalausky wrote:
 Ok, for me GTK is native because I use Linux and a GTK based desktop.
 I know that there's a native GTK port for OSX/Quartz and I thought
 GTK had
 themes to look native on Windows?

It does make a vague attempt to look native on Windows, and is FAR better in that regard than, say, Swing, Winamp, Iron/Chrome, or pretty much anything from Apple. But there's still rather noticable differences in both look (the chunkiness I mentioned, just as one example) and in feel (particulary if you're using GIMP). It's kinda like gluing a picture of some wings overtop the logo on a Ferrari and saying "See, it's an Aston Martin!"

Platform wise, GTK looks appalling on OS X, acceptable, if non-native on Windows (I think there's a GTK theme that fixes this, not sure), and, well, you use it on linux. As for Qt, it uses the native GUI for all the platforms it works on (and if you don't like that there's a config tool to make it look as ugly as you like :)).

I haven't seen any native looking Qt application on Mac.
  From a developers standpoint, GTK is a lot more awkward to work with
 (whether you're using the C interface or the GtkD wrapper), and is
 generally not as nice to work with (based on a few hundred lines of code
 that did very little, I switched to Qt at that point). Qt on the other
 hand I've found a pleasure to work with from day 1, everything seems to
 work as expected, and typically needs far less code.

-- /Jacob Carlborg
Oct 07 2010
parent Robert Clipsham <robert octarineparrot.com> writes:
On 07/10/10 09:46, Jacob Carlborg wrote:
 I haven't seen any native looking Qt application on Mac.

When did you last use a Qt application on a Mac? The cocoa backend for OS X is fairly new - Qt apps I've written look native on a Mac (admittedly the spacing's a bit off in places, that's not a huge issue though). -- Robert http://octarineparrot.com/
Oct 07 2010
prev sibling next sibling parent reply "Nick Sabalausky" <a a.a> writes:
"sybrandy" <sybrandy gmail.com> wrote in message 
news:i8g8oi$1hv6$1 digitalmars.com...
 Just asking out of curiosity.  With all the great language features, I'm 
 sure that many of you have thought about this.

 For me, I figured a good start would be your basic Unix/Linux/BSD 
 utilities, like cat and grep.  I figure it may make the code easier to 
 read and maintain as well as potentially improve the quality of the 
 software.  Of course, most of these are so old they're probably quite bug 
 free, but some probably could use a rewrite.  Some may even benefit for 
 threading.

Not that I would want to do it myself, but I'd like to see LLMV and Scintilla moved to D. But really, just about anything in C/C++ that I might ever want to modify. If I never have to touch another line of C/C++ it'll be too soon.
Oct 05 2010
next sibling parent Michael Stover <michael.r.stover gmail.com> writes:
--20cf301cbd340757200492971953
Content-Type: text/plain; charset=ISO-8859-1

An operating system written in D would be really interesting.

On Thu, Oct 14, 2010 at 11:05 AM, Andrej Mitrovic <
andrej.mitrovich gmail.com> wrote:

 On 10/6/10, Nick Sabalausky <a a.a> wrote:
 "sybrandy" <sybrandy gmail.com> wrote in message
 news:i8g8oi$1hv6$1 digitalmars.com...
 Just asking out of curiosity.  With all the great language features, I'm
 sure that many of you have thought about this.

 For me, I figured a good start would be your basic Unix/Linux/BSD
 utilities, like cat and grep.  I figure it may make the code easier to
 read and maintain as well as potentially improve the quality of the
 software.  Of course, most of these are so old they're probably quite


 free, but some probably could use a rewrite.  Some may even benefit for
 threading.

Not that I would want to do it myself, but I'd like to see LLMV and Scintilla moved to D. But really, just about anything in C/C++ that I might ever want to

 If I never have to touch another line of C/C++ it'll be too soon.

FYI, there's a DFL Scintilla component you can use in D2, which is downloaded separately from DFL. I've made a small update to it in the DFL forums although you would also need to add one more method in the scintilla class to get messages back from Scintilla itself (I'll post an update to the DFL forums some time later for that). So basically the DFL component loads the scintilla DLL, and you can use message passing or optionally get a function pointer for direct access. It's really easy to use the editor from D in this way. In fact, you can port *Scite* source code to a D equivalent that uses the Scintilla DLL with ease. It only took me a minute to port the automatic indentation functionality from Scite to a fresh project that uses the DFLs Scintilla class. I wouldn't know if there are any bottlenecks in the Scintilla codebase, so I can't judge if it's worth porting to D. But it already works and you can use it from D already, so why go through all the trouble of rewriting it? :-)

--20cf301cbd340757200492971953 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable An operating system written in D would be really interesting.<div><br><div = class=3D"gmail_quote">On Thu, Oct 14, 2010 at 11:05 AM, Andrej Mitrovic <sp= an dir=3D"ltr">&lt;<a href=3D"mailto:andrej.mitrovich gmail.com">andrej.mit= rovich gmail.com</a>&gt;</span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex;">On 10/6/10, Nick Sabalausky &lt;a a.a&gt; w= rote:<br> &gt; &quot;sybrandy&quot; &lt;<a href=3D"mailto:sybrandy gmail.com">sybrand= y gmail.com</a>&gt; wrote in message<br> &gt; news:i8g8oi$1hv6$1 digitalmars.com...<br> &gt;&gt; Just asking out of curiosity. =A0With all the great language featu= res, I&#39;m<br> &gt;&gt; sure that many of you have thought about this.<br> &gt;&gt;<br> &gt;&gt; For me, I figured a good start would be your basic Unix/Linux/BSD<= br> &gt;&gt; utilities, like cat and grep. =A0I figure it may make the code eas= ier to<br> &gt;&gt; read and maintain as well as potentially improve the quality of th= e<br> &gt;&gt; software. =A0Of course, most of these are so old they&#39;re proba= bly quite bug<br> &gt;&gt; free, but some probably could use a rewrite. =A0Some may even bene= fit for<br> &gt;&gt; threading.<br> &gt;&gt;<br> &gt;<br> &gt; Not that I would want to do it myself, but I&#39;d like to see LLMV an= d<br> &gt; Scintilla moved to D.<br> &gt;<br> &gt; But really, just about anything in C/C++ that I might ever want to mod= ify.<br> &gt; If I never have to touch another line of C/C++ it&#39;ll be too soon.<= br> &gt;<br> &gt;<br> &gt;<br> <br> FYI, there&#39;s a DFL Scintilla component you can use in D2, which is<br> downloaded separately from DFL. I&#39;ve made a small update to it in the<b= r> DFL forums although you would also need to add one more method in the<br> scintilla class to get messages back from Scintilla itself (I&#39;ll =A0pos= t<br> an update to the DFL forums some time later for that).<br> <br> So basically the DFL component loads the scintilla DLL, and you can<br> use message passing or optionally get a function pointer for direct<br> access. It&#39;s really easy to use the editor from D in this way. In<br> fact, you can port *Scite* source code to a D equivalent that uses the<br> Scintilla DLL with ease. It only took me a minute to port the<br> automatic indentation functionality from Scite to a fresh project that<br> uses the DFLs Scintilla class.<br> <br> I wouldn&#39;t know if there are any bottlenecks in the Scintilla<br> codebase, so I can&#39;t judge if it&#39;s worth porting to D. But it alrea= dy<br> works and you can use it from D already, so why go through all the<br> trouble of rewriting it? :-)<br> </blockquote></div><br></div> --20cf301cbd340757200492971953--
Oct 14 2010
prev sibling next sibling parent "Denis Koroskin" <2korden gmail.com> writes:
On Thu, 14 Oct 2010 21:32:44 +0400, Michael Stover  
<michael.r.stover gmail.com> wrote:

 An operating system written in D would be really interesting.

http://wiki.xomb.org/index.php?title=Main_Page
Oct 14 2010
prev sibling next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
== Quote from Andrej Mitrovic (andrej.mitrovich gmail.com)'s article
 Just in case you're interested, I did an update in the DFL forums for
 interfacing with Scintilla:
 http://www.dsource.org/forums/viewtopic.php?t=5605

Nice.
 "sybrandy" <sybrandy gmail.com> wrote in message
 news:i8g8oi$1hv6$1 digitalmars.com...
 Just asking out of curiosity.  With all the great language features, I'm
 sure that many of you have thought about this.

 For me, I figured a good start would be your basic Unix/Linux/BSD
 utilities, like cat and grep.  I figure it may make the code easier to
 read and maintain as well as potentially improve the quality of the
 software.  Of course, most of these are so old they're probably quite bug
 free, but some probably could use a rewrite.  Some may even benefit for
 threading.

Not that I would want to do it myself, but I'd like to see LLMV and Scintilla moved to D. But really, just about anything in C/C++ that I might ever want to modify. If I never have to touch another line of C/C++ it'll be too soon.


I can imagine the next project I'd work on being an ICCCM and EWMH compliant Window Manger.
Oct 15 2010
prev sibling next sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
I think you might get away with modifying Scite, not necessarily
Scintilla. Since Scite is the one that takes care of indentation,
folding, etc., maybe it can be modified to use elastic tabstops.
Personally I find Scite's C++ codebase quite readable. (at least after
a pass of the uncrustify code beautifier :p).

I'll take a look at the full documentation of that elastic tabstops
trick and see if I can recreate it in D. It sounds like a fun project.

On 10/17/10, Nick Sabalausky <a a.a> wrote:
 "Andrej Mitrovic" <andrej.mitrovich gmail.com> wrote in message
 news:mailman.597.1287068756.858.digitalmars-d puremagic.com...
 On 10/6/10, Nick Sabalausky <a a.a> wrote:

 I wouldn't know if there are any bottlenecks in the Scintilla
 codebase, so I can't judge if it's worth porting to D. But it already
 works and you can use it from D already, so why go through all the
 trouble of rewriting it? :-)

I've been tempted to try to add support for elastic tabstops, but the idea of diving into a C/C++ codebase again is rather off-putting. But I'm not actually going to go and port Scintilla just to do that ;)

Oct 17 2010
prev sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
Well disregard that, it looks like the original author already tried
it with Scintilla, but it didn't work out:

http://groups.google.com/group/scintilla-interest/browse_thread/thread/44fca717735f860e/9275ab81016110a5?lnk=gst&q=elastic+tabstop#

On 10/18/10, Andrej Mitrovic <andrej.mitrovich gmail.com> wrote:
 I think you might get away with modifying Scite, not necessarily
 Scintilla. Since Scite is the one that takes care of indentation,
 folding, etc., maybe it can be modified to use elastic tabstops.
 Personally I find Scite's C++ codebase quite readable. (at least after
 a pass of the uncrustify code beautifier :p).

 I'll take a look at the full documentation of that elastic tabstops
 trick and see if I can recreate it in D. It sounds like a fun project.

 On 10/17/10, Nick Sabalausky <a a.a> wrote:
 "Andrej Mitrovic" <andrej.mitrovich gmail.com> wrote in message
 news:mailman.597.1287068756.858.digitalmars-d puremagic.com...
 On 10/6/10, Nick Sabalausky <a a.a> wrote:

 I wouldn't know if there are any bottlenecks in the Scintilla
 codebase, so I can't judge if it's worth porting to D. But it already
 works and you can use it from D already, so why go through all the
 trouble of rewriting it? :-)

I've been tempted to try to add support for elastic tabstops, but the idea of diving into a C/C++ codebase again is rather off-putting. But I'm not actually going to go and port Scintilla just to do that ;)


Oct 17 2010
prev sibling next sibling parent reply Kagamin <spam here.lot> writes:
sybrandy Wrote:

What would you rewrite in D?

Phobos.
Oct 05 2010
next sibling parent "Denis Koroskin" <2korden gmail.com> writes:
On Wed, 06 Oct 2010 10:29:24 +0400, Kagamin <spam here.lot> wrote:

 sybrandy Wrote:

 What would you rewrite in D?

Phobos.

Nice one!
Oct 06 2010
prev sibling next sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 10/6/10 1:29 CDT, Kagamin wrote:
 sybrandy Wrote:

 What would you rewrite in D?

Phobos.

The irony/joke is lost on me, so I'll bite: how do you mean that? Andrei
Oct 06 2010
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 10/6/10 9:27 CDT, Denis Koroskin wrote:
 On Wed, 06 Oct 2010 18:23:40 +0400, Andrei Alexandrescu
 <SeeWebsiteForEmail erdani.org> wrote:

 On 10/6/10 1:29 CDT, Kagamin wrote:
 sybrandy Wrote:

 What would you rewrite in D?

Phobos.

The irony/joke is lost on me, so I'll bite: how do you mean that? Andrei

He emphasized on "rewrite" rather than on "D".

Oh, okay. Well it is funny. Thanks! Andrei
Oct 06 2010
prev sibling parent "Denis Koroskin" <2korden gmail.com> writes:
On Wed, 06 Oct 2010 18:23:40 +0400, Andrei Alexandrescu  
<SeeWebsiteForEmail erdani.org> wrote:

 On 10/6/10 1:29 CDT, Kagamin wrote:
 sybrandy Wrote:

 What would you rewrite in D?

Phobos.

The irony/joke is lost on me, so I'll bite: how do you mean that? Andrei

He emphasized on "rewrite" rather than on "D".
Oct 06 2010
prev sibling next sibling parent reply "Gour D." <gour atmarama.net> writes:
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Wed, 06 Oct 2010 23:47:58 +0200
 "Daniel" =3D=3D Daniel Gibson wrote:






Daniel> If that isn't the case I do understand your objection.. I hate Daniel> non native GUIs as well (java swing is particularly bad). Although I'm still hankering to see QtD, I'm just curious (not having experience with) how does SWT (DWT) can compare in regards? Sincerely, Gour --=20 Gour | Hlapicina, Croatia | GPG key: CDBF17CA ----------------------------------------------------------------
Oct 06 2010
parent reply "Nick Sabalausky" <a a.a> writes:
"Gour D." <gour atmarama.net> wrote in message 
news:20101007055846.597a5b6e atmarama.noip.me...
Although I'm still hankering to see QtD, I'm just curious (not having
experience with) how does SWT (DWT) can compare in regards?

SWT/DWT uses the native GUI, at least on windows. I have no idea what it uses on Linux, my guess would be GTK-only, but that's only a guess. But I think DWT is D1-only right now (so is wxD).
Oct 06 2010
next sibling parent Jacob Carlborg <doob me.com> writes:
On 2010-10-07 07:00, Nick Sabalausky wrote:
 "Gour D."<gour atmarama.net>  wrote in message
 news:20101007055846.597a5b6e atmarama.noip.me...
 Although I'm still hankering to see QtD, I'm just curious (not having
 experience with) how does SWT (DWT) can compare in regards?

SWT/DWT uses the native GUI, at least on windows. I have no idea what it uses on Linux, my guess would be GTK-only, but that's only a guess. But I think DWT is D1-only right now (so is wxD).

It uses native controls on all supported platforms. If there isn't a native control available it will emulate it. On Linux GTK and Motif is supported, I think they're working on a Qt port as well. -- /Jacob Carlborg
Oct 07 2010
prev sibling parent Jacob Carlborg <doob me.com> writes:
On 2010-10-07 08:37, Jonathan M Davis wrote:
 On Wednesday 06 October 2010 22:00:02 Nick Sabalausky wrote:
 "Gour D."<gour atmarama.net>  wrote in message
 news:20101007055846.597a5b6e atmarama.noip.me...

 Although I'm still hankering to see QtD, I'm just curious (not having
 experience with) how does SWT (DWT) can compare in regards?

SWT/DWT uses the native GUI, at least on windows. I have no idea what it uses on Linux, my guess would be GTK-only, but that's only a guess. But I think DWT is D1-only right now (so is wxD).

SWT uses GTK on Linux (unfortunately), so presumably DWT does as well. It's what Eclipse uses. However, I do believe that you're right and that it's currently only D1 compatible.

Correct, though I think they're working on Qt port. I'll try to do my best to make DWT work with D2. -- /Jacob Carlborg
Oct 07 2010
prev sibling next sibling parent "Gour D." <gour atmarama.net> writes:
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Wed, 6 Oct 2010 16:40:06 -0700
 "Jonathan" =3D=3D Jonathan M Davis wrote:






Jonathan> That's definitely cool if it can, but as far as I know, I've Jonathan> never seen it done. wxwidget apps always seem to look like Jonathan> gtk in Linux (aka butt-ugly - I hate the look of gtk; I'd Jonathan> have to be truly desperate to even consider writing an ap Jonathan> that used gtk). Well, wxQt is work in progress and when done, then wxwidgets would have a chance to work differently on Linux. Sincerely, Gour --=20 Gour | Hlapicina, Croatia | GPG key: CDBF17CA ----------------------------------------------------------------
Oct 06 2010
prev sibling next sibling parent Brad Roberts <braddr puremagic.com> writes:
On 10/6/2010 7:56 PM, Jimmy Cao wrote:
 On Wed, Oct 6, 2010 at 9:53 PM, Seth Hoenig <seth.a.hoenig gmail.com
 <mailto:seth.a.hoenig gmail.com>> wrote:
 
 
      Open SSL
     http://www.peereboom.us/assl/assl/html/openssl.html

 Yes!  When I was trying to get D to work with HTTPS, it took me a long time to
 figure out how to do it.
 I ended up using GnuTLS, somehow, with someone's help.

If you're tempted to replace or rewrite battle hardened crypto code, you're not paranoid enough. As much as I've hated every little bit of my work with openssl, I'm not nearly crazy enough (and I'm fairly crazy sometimes) to believe it's worth the pain to start over. I'd LOVE to do it, but no way would it be worth it. And thanks.. now I'm gonna have another nightmare filled night. OpenSSL.. shudder. Later, Brad
Oct 06 2010
prev sibling next sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Wednesday 06 October 2010 22:00:02 Nick Sabalausky wrote:
 "Gour D." <gour atmarama.net> wrote in message
 news:20101007055846.597a5b6e atmarama.noip.me...
 
Although I'm still hankering to see QtD, I'm just curious (not having
experience with) how does SWT (DWT) can compare in regards?

SWT/DWT uses the native GUI, at least on windows. I have no idea what it uses on Linux, my guess would be GTK-only, but that's only a guess. But I think DWT is D1-only right now (so is wxD).

SWT uses GTK on Linux (unfortunately), so presumably DWT does as well. It's what Eclipse uses. However, I do believe that you're right and that it's currently only D1 compatible.
Oct 06 2010
prev sibling next sibling parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 10/6/10, Nick Sabalausky <a a.a> wrote:
 "sybrandy" <sybrandy gmail.com> wrote in message
 news:i8g8oi$1hv6$1 digitalmars.com...
 Just asking out of curiosity.  With all the great language features, I'm
 sure that many of you have thought about this.

 For me, I figured a good start would be your basic Unix/Linux/BSD
 utilities, like cat and grep.  I figure it may make the code easier to
 read and maintain as well as potentially improve the quality of the
 software.  Of course, most of these are so old they're probably quite bug
 free, but some probably could use a rewrite.  Some may even benefit for
 threading.

Not that I would want to do it myself, but I'd like to see LLMV and Scintilla moved to D. But really, just about anything in C/C++ that I might ever want to modify. If I never have to touch another line of C/C++ it'll be too soon.

FYI, there's a DFL Scintilla component you can use in D2, which is downloaded separately from DFL. I've made a small update to it in the DFL forums although you would also need to add one more method in the scintilla class to get messages back from Scintilla itself (I'll post an update to the DFL forums some time later for that). So basically the DFL component loads the scintilla DLL, and you can use message passing or optionally get a function pointer for direct access. It's really easy to use the editor from D in this way. In fact, you can port *Scite* source code to a D equivalent that uses the Scintilla DLL with ease. It only took me a minute to port the automatic indentation functionality from Scite to a fresh project that uses the DFLs Scintilla class. I wouldn't know if there are any bottlenecks in the Scintilla codebase, so I can't judge if it's worth porting to D. But it already works and you can use it from D already, so why go through all the trouble of rewriting it? :-)
Oct 14 2010
parent "Nick Sabalausky" <a a.a> writes:
"Andrej Mitrovic" <andrej.mitrovich gmail.com> wrote in message 
news:mailman.597.1287068756.858.digitalmars-d puremagic.com...
 On 10/6/10, Nick Sabalausky <a a.a> wrote:

 I wouldn't know if there are any bottlenecks in the Scintilla
 codebase, so I can't judge if it's worth porting to D. But it already
 works and you can use it from D already, so why go through all the
 trouble of rewriting it? :-)

I've been tempted to try to add support for elastic tabstops, but the idea of diving into a C/C++ codebase again is rather off-putting. But I'm not actually going to go and port Scintilla just to do that ;)
Oct 17 2010
prev sibling next sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
Just in case you're interested, I did an update in the DFL forums for
interfacing with Scintilla:

http://www.dsource.org/forums/viewtopic.php?t=5605

My last two posts show how to get messages from Scintilla, and I've
added a basic text editor example that has D syntax highlighting and
maintains indentation. You would need to build DFL, and put it's files
to DMD/windows/lib and build scintilla.lib which you passs to DMD when
you're buildling your editor. + you need to build the Scintilla DLL,
which will be called ScintillaLexer.dll, or something like that. (The
DFL build script does need some modification though).

On 10/6/10, Nick Sabalausky <a a.a> wrote:
 "sybrandy" <sybrandy gmail.com> wrote in message
 news:i8g8oi$1hv6$1 digitalmars.com...
 Just asking out of curiosity.  With all the great language features, I'm
 sure that many of you have thought about this.

 For me, I figured a good start would be your basic Unix/Linux/BSD
 utilities, like cat and grep.  I figure it may make the code easier to
 read and maintain as well as potentially improve the quality of the
 software.  Of course, most of these are so old they're probably quite bug
 free, but some probably could use a rewrite.  Some may even benefit for
 threading.

Not that I would want to do it myself, but I'd like to see LLMV and Scintilla moved to D. But really, just about anything in C/C++ that I might ever want to modify. If I never have to touch another line of C/C++ it'll be too soon.

Oct 15 2010
prev sibling parent Emil Madsen <sovende gmail.com> writes:
--001517478b50c2a6340492e1a054
Content-Type: text/plain; charset=ISO-8859-1

I would love to rewrite the copybyvalue and copybyreference schematics, to
one, and then keep that one. I think its counter intuitive that the same
syntax is used for both, and tbh, if everything was just copybyvalue, one
would be able to use by reference, if they wanted to by explicitly declaring
so, using pointers/references/ect., this is the one thing that bugged me
mostly in Java, when coming from C, and the thing that bugs me the most
about D.

On 6 October 2010 00:27, sybrandy <sybrandy gmail.com> wrote:

 Just asking out of curiosity.  With all the great language features, I'm
 sure that many of you have thought about this.

  For me, I figured a good start would be your basic Unix/Linux/BSD
 utilities, like cat and grep.  I figure it may make the code easier to read
 and maintain as well as potentially improve the quality of the software.  Of
 course, most of these are so old they're probably quite bug free, but some
 probably could use a rewrite.  Some may even benefit for threading.

 Anyone else?

 Casey

-- // Yours sincerely // Emil 'Skeen' Madsen --001517478b50c2a6340492e1a054 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I would love to rewrite the copybyvalue and copybyreference schematics, to = one, and then keep that one. I think its counter intuitive that the same sy= ntax is used for both, and tbh, if everything was just copybyvalue, one wou= ld be able to use by reference, if they wanted to by explicitly declaring s= o, using pointers/references/ect., this is the one thing that bugged me mos= tly in Java, when coming from C, and the thing that bugs me the most about = D.<br> <br><div class=3D"gmail_quote">On 6 October 2010 00:27, sybrandy <span dir= =3D"ltr">&lt;<a href=3D"mailto:sybrandy gmail.com">sybrandy gmail.com</a>&g= t;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0= .8ex;border-left:1px #ccc solid;padding-left:1ex;"> Just asking out of curiosity. =A0With all the great language features, I&#3= 9;m sure that many of you have thought about this.<br> <br>=A0For me, I figured a good start would be your basic Unix/Linux/BSD ut= ilities, like cat and grep. =A0I figure it may make the code easier to read= and maintain as well as potentially improve the quality of the software. = =A0Of course, most of these are so old they&#39;re probably quite bug free,= but some probably could use a rewrite. =A0Some may even benefit for thread= ing.<br> <br> Anyone else?<br> <br> Casey<br> </blockquote></div><br><br clear=3D"all"><br>-- <br>// Yours sincerely<br>/= / Emil &#39;Skeen&#39; Madsen<br> --001517478b50c2a6340492e1a054--
Oct 18 2010