Re: Sockets and using them...
On Sunday, 6 November 2016 at 09:51:41 UTC, sarn wrote: It sounds like you want to do the same thing: design a protocol that includes some kind of message that's agreed to mean, "Yo, make a new connection on this port." Basically, any off-the-shelf textbook on network protocol design will help you. Quirks of different NAT implementations cause huge pain to everyone who tries to deploy a peer-to-peer system. Yeah, I was hoping it would be 'redirect to this port instead' so you wouldn't have to make a new connection. With port forwarding and other issues involved, I can see a big problem. Once you are using a port I'm pretty sure it will be locked (although if multiple can share the same port, I'd be fine with that too, as long as I know what IP address it came from). I suppose I can simply write it and try to get it working...
Re: Bug after update to 2.072?
On Sunday, 6 November 2016 at 08:48:14 UTC, SimonN wrote: I'm not sure how to pass arbitrary dustmite arguments through dub to dustmite. `dub dustmite -h' lists arguments. When dustmite reduces your project to the empty project, maybe try this from the dustmite website: "You can also surround code that is not to be removed around the magic words DustMiteNoRemoveStart and DustMiteNoRemoveStop. Note that if you place them in comments, you won't be able to use --strip-comments." Ok, cool. But as I'm of the opinion, that my code is not buggy, I don't know, which code to keep. On Sunday, 6 November 2016 at 06:28:32 UTC, Alex wrote: object.Exception@DustMite/dustmite.d(270): Initial test fails (try using --no-redirect for details) This means that dustmite doesn't recognize the unreduced source as buggy. As a sanity test, dustmite runs the given test on the unreduced project, and requires this test to succeed. I'm not the alone with the opinion of my code. LDC compiles my code and the binary runs without any problem. Furthermore: If I take the file .../dlang/dmd/core/atomic.d from the sources of version 2.071.2 and replace with this version the file from the current version of 2.072.0; then recompile my project by dmd and run it - it works. When using the new version, binary stops working after recompilation This behavior is reproducible. So my question is: how can I debug atomic.d better to locate the error more precisely. Do not get me wrong, I still assume, that I have to change my own code. But the only entry point for debugging I can see at the moment is the file atomic.d.
Re: Sockets and using them...
On Sunday, 6 November 2016 at 06:02:48 UTC, Era Scarecrow wrote: So I've got a project where I want to create basically a decentralized chat program where every program is a host and a client. When you connect all connections can go through to route the chat to everyone else. So to make this work I've looked over the sockets package and I don't quite follow how you'd make it so it works a lot like a web browser, aka when you get a connection you redirect to a different port so you have 1 listening port for new connections so it can act as a server. What settings or configuration would I need to be able to do that? Web browsers do redirects at the application level. It's in HTTP, which is a protocol built on top of the layer sockets provide. It sounds like you want to do the same thing: design a protocol that includes some kind of message that's agreed to mean, "Yo, make a new connection on this port." Basically, any off-the-shelf textbook on network protocol design will help you. One thing I can tell you now, though, is that NATs will be your big problem if you try to deploy your system for real. Most machines still use IPv4 and don't have publicly accessible IP addresses, so they use network address translation to access the internet. Quirks of different NAT implementations cause huge pain to everyone who tries to deploy a peer-to-peer system. But don't let me put you off :)
Re: Bug after update to 2.072?
I'm not sure how to pass arbitrary dustmite arguments through dub to dustmite. `dub dustmite -h' lists arguments. When dustmite reduces your project to the empty project, maybe try this from the dustmite website: "You can also surround code that is not to be removed around the magic words DustMiteNoRemoveStart and DustMiteNoRemoveStop. Note that if you place them in comments, you won't be able to use --strip-comments." On Sunday, 6 November 2016 at 06:28:32 UTC, Alex wrote: object.Exception@DustMite/dustmite.d(270): Initial test fails (try using --no-redirect for details) This means that dustmite doesn't recognize the unreduced source as buggy. As a sanity test, dustmite runs the given test on the unreduced project, and requires this test to succeed. -- Simon