View previous topic :: View next topic |
Author |
Message |
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Thu Apr 22, 2004 3:47 pm Post subject: Dsc Beta 4 |
|
|
Dsc is now checked-in to subversion, and is browsable via the "projects" tab above. A download is available via the project download section.
If you look in the repository root you'll find a readme.txt and a quickref.doc. The former contains revision history, whilst the latter provides a general overview of Dsc functionality. There's also an dsc_io_overview.doc which discusses the design of the IO package. File unittest.d provides a variety of code examples.
A few things will not operate correctly until dmd v0.83 is released, due to Interface runtime issues. Those classes include TextWriter, ColumnWriter, Printf, and SerializableWriter. On dmd v0.82 they will fail under particular circumstances.
Please note that a couple of things are not implemented on linux as yet. These items include FileProxy.toList() and FileConduit.truncate(), and dependents such as FileBucket will not operate without them. Is there anyone with a linux box who is willing to make these operational?
There are undoubtedly some bugs lurking in there ... please post any issues you run into, and I'll get them resolved ASAP.
Lastly: I do hope you'll find these packages to be useful either as part of your own projects, or perhaps as part of learning the D language; not much point in my writing them otherwise <g>
- Kris |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Sat Apr 24, 2004 2:54 am Post subject: |
|
|
Dsc.io now supports memory-mapped files (up to 2GB) on Win32 platforms. Buffers, Readers and Writers operate on such files in the same manner as any other file. Use FileConduit.createMappedBuffer() to take advantage of this.
64bit systems will extend the 2GB limit. |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Sat Apr 24, 2004 3:35 am Post subject: |
|
|
Now up to 4GB (actually 4GB - 1) of memory-mapped file IO, on 32bit platform. |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Sat Apr 24, 2004 5:41 pm Post subject: |
|
|
please note that the latest download is not actually on the Project "home page" -- instead it is over here: http://svn.dsource.org/svn/projects/dsc/ in file dsc.zip
We'll do something about keeping the home-page-download "up to date" during next week. |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Tue Apr 27, 2004 12:52 am Post subject: |
|
|
Walter has just released dmd 0.86 with a number of language updates. I assume the non-working portions of dsc will now compile and run properly? (haven't tried yet). |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Tue Apr 27, 2004 11:58 am Post subject: |
|
|
JJR wrote: | Walter has just released dmd 0.86 with a number of language updates. I assume the non-working portions of dsc will now compile and run properly? (haven't tried yet). |
Yes, they appear to be good. |
|
Back to top |
|
|
tyfon
Joined: 29 Apr 2004 Posts: 4
|
Posted: Thu Apr 29, 2004 12:53 pm Post subject: |
|
|
I'll have a swing at those linux functions. Have to burn to cd and take home, so dont expect it to happen within a few hrs _________________ --
Ãyvind Jægtnes |
|
Back to top |
|
|
tyfon
Joined: 29 Apr 2004 Posts: 4
|
Posted: Sun May 02, 2004 5:43 am Post subject: |
|
|
I've been looking a bit through the code, and since im not very used to OO programming, i've only seen a couple things i'd put in so far.
Socket.d:
in closure()...
Code: |
else version(BsdSockets)
{
.shutdown(sock, Shutdown.BOTH);
.close(sock);
}
|
This is because i'd shutdown it even if its an outgoing connection.
And for server sockets:
Code: |
this (InternetAddress addr, int backlog)
{
super (Socket.AddressFamily.INET, Socket.Type.STREAM, Socket.Protocol.IP);
enableAddressReuse (); // Or it will fail quite fast
bind (addr);
listen (backlog);
}
|
If it dont reuse the sockets it runs out pretty quickly.
Anyhow.. it segfaults after quite a lot of connections to itself. I havent had the time to look at this, but will do soon. And i have fixed up some of the linux makefile.. But thats on my home computer.. Will post when i get the chance.
oh and btw.. I tried to make it a shred library, but when i link dsctest to that i get undefined refrence to _d_throw.. i'll poke a bit around with this too.. _________________ --
Ãyvind Jægtnes |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Sun May 02, 2004 11:15 am Post subject: |
|
|
Hi Tyfon,
John and I did play around with both suggestions, but to no avail. I would agree that it's best to shutdown a socket before closing it, though that's traditionally been done on the client side (not that tradition is necessarily good!). Part of the problem here lies in the fact that there's really no clear rules involved regarding 'soft' termination (and perhaps the client/browser has already cancelled the request...). Google will happily unearth hundreds of folks with differing opinions <g>. And then Win32 does things differently than BSD, and apparently some of the BSD implementation are slightly different in this regard ... tricky, but perhaps best to use shutdown() as you say.
ReuseAddress() should definately be in there also, but not for the reason that you appear to state. I could easily be misunderstanding, but you note that the server will run out of sockets if it doesn't apply reuseAddress(). That's not quite accurate, since (a) there's only one listening socket in use and (b) reuseAddress() is simply about ensuring you can bind multiple listeners on the same port. This latter aspect is typically applied such that a halted server can be restarted again immediately, rather that waiting for the OS to scavange the previous listener. Regardless, it should definately be there for this purpose (the walkthrough is for the benefit of others, who may now decide to correct me!)
Both good points.
- Kris |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Tue May 04, 2004 2:17 am Post subject: |
|
|
tyfon wrote: | This is because i'd shutdown it even if its an outgoing connection |
Can you elaborate further on this please Tyfon? I need an education on these kinds of details; |
|
Back to top |
|
|
|