Re: Coping files and folders

2013-01-23 Thread Jacob Carlborg
On 2013-01-24 07:28, Joel wrote: How does one copy folders (with files in them) including sub folders, and creating any needed folders? Like: land\house\cat.d land\house\rat.exe land\house\bedroom\ants.txt to root\island\house\cat.d root\island\house\rat.exe root\island\house\bedroom\ants.txt

Re: std.socket undefined UnixAddress?

2013-01-23 Thread Rob T
On Thursday, 24 January 2013 at 06:47:41 UTC, Rob T wrote: I'm using Linux, which supports unix domain sockets, but when I try to use UnixAddress it's not available. Anyone know why? import std.socket; int main() { Address UnixAddr = new UnixAddress( "path" ); // <- compile error re

std.socket undefined UnixAddress?

2013-01-23 Thread Rob T
I'm using Linux, which supports unix domain sockets, but when I try to use UnixAddress it's not available. Anyone know why? import std.socket; int main() { Address UnixAddr = new UnixAddress( "path" ); // <- compile error return(0); } Error: undefined identifier UnixAddress --rt

Coping files and folders

2013-01-23 Thread Joel
How does one copy folders (with files in them) including sub folders, and creating any needed folders? Like: land\house\cat.d land\house\rat.exe land\house\bedroom\ants.txt to root\island\house\cat.d root\island\house\rat.exe root\island\house\bedroom\ants.txt One work around is to use 'system

Re: Assembly - 64-bit registers supported?

2013-01-23 Thread dale
I am following these helpful suggestions, but still having trouble linking properly. I have Visual Studio 10 and its 64-bit extension installed, and I believe the amd64\link.exe is getting called, but I must have something configured incorrectly, because it does not appear to find all of the li

Re: Pull 1019

2013-01-23 Thread Namespace
I have now seen something I've probably overlooked before. Here: https://github.com/D-Programming-Language/dmd/pull/1019#issuecomment-11836011 Kenji says, that the pull is a basic _proposal_. What does this mean? It isn't merged until we made a final discussion and decision about that? :/ I

Re: Reading Standard Input

2013-01-23 Thread Jesse Phillips
On Wednesday, 23 January 2013 at 18:31:31 UTC, Kenneth Sills wrote: It's a bit hard looking for D stuff, even searches such as "Dlang" or "D Language" don't yield terribly useful results. Mostly because the material isn't there. As more content about D exist the easier it is. Just most of the

Re: Associative array issue

2013-01-23 Thread Igor Kolesnik
The correct way to write that line is: string[] words = split(strip(line.idup)); which will copy the buffer, thereby ensuring it's safe to keep slices of it in your associative array, and also return the correct type so that no cast is necessary. T This makes sense. Thanks a lot!

Re: Associative array issue

2013-01-23 Thread H. S. Teoh
On Wed, Jan 23, 2013 at 09:07:24PM +0100, Igor Kolesnik wrote: [...] > import std.stdio, std.string; > > void main() { > uint[string] dic; > foreach (line; stdin.byLine) { > string[] words = cast(string[])split(strip(line)); > foreach (word; words) { > if (word in dic) > co

Associative array issue

2013-01-23 Thread Igor Kolesnik
Hi; I'm trying to run an example from the tutorial on http://www.informit.com/articles/article.aspx?p=1381876&seqNum=4 Here is the code import std.stdio, std.string; void main() { uint[string] dic; foreach (line; stdin.byLine) { string[] words = cast(string[])split(strip(line)); f

Re: Win32 api with 2.061

2013-01-23 Thread cal
On Wednesday, 23 January 2013 at 02:40:55 UTC, Andrej Mitrovic wrote: Try making these changes: https://github.com/AndrejMitrovic/WindowsAPI/commit/6d8ef98508063c5a4741c72eda68aa485d3b25fa WindowsAPI should really be moved to Github.. Thanks this fixed another error i was getting, compiler is

Re: Reading Standard Input

2013-01-23 Thread Kenneth Sills
Thank you very much everyone! I think I'm all set! It was an academic project to begin with, so learning about termios and getting all that in my brain for later use is probably the best idea! Although I'll keep in mind the consoleD project, as I was looking for something just like that before

Re: Continue iteration after exception

2013-01-23 Thread Dmitry Olshansky
23-Jan-2013 20:09, H. S. Teoh пишет: On Wed, Jan 23, 2013 at 04:52:25PM +0100, monarch_dodra wrote: On Wednesday, 23 January 2013 at 15:24:02 UTC, Josh wrote: On Wednesday, 23 January 2013 at 15:00:16 UTC, bearophile wrote: A possible solution: desugar the foreach range iteration protocol of d

Re: Reading Standard Input

2013-01-23 Thread H. S. Teoh
On Wed, Jan 23, 2013 at 06:59:03PM +0100, Kenneth Sills wrote: > Hello everyone! I'm pretty new to the D world, and just started > playing around with it. To start off with the language, I was > going to write a little game (as I usually do). I wanted to use > pure D (no ncurses) and not have to im

Re: Reading Standard Input

2013-01-23 Thread nazriel
On Wednesday, 23 January 2013 at 17:59:04 UTC, Kenneth Sills wrote: Hello everyone! I'm pretty new to the D world, and just started playing around with it. To start off with the language, I was going to write a little game (as I usually do). I wanted to use pure D (no ncurses) and not have to imp

Re: Reading Standard Input

2013-01-23 Thread Adam D. Ruppe
The two files in here are both independent, and either one should help out: https://github.com/robik/ConsoleD/

Reading Standard Input

2013-01-23 Thread Kenneth Sills
Hello everyone! I'm pretty new to the D world, and just started playing around with it. To start off with the language, I was going to write a little game (as I usually do). I wanted to use pure D (no ncurses) and not have to import any libraries (no anything else) for the project. So I set out to

Re: S-Expressions

2013-01-23 Thread bearophile
We are getting to the Mathematica again: http://rosettacode.org/wiki/Rosetta_Code/Rank_languages_by_popularity Bye, bearophile

Re: Passing opaque struct between functions/modules

2013-01-23 Thread Ali Çehreli
On 01/23/2013 08:33 AM, Sarath Kumar wrote: > Can someone please tell me the right way to pass an opaque object > between module's functions. I am assuming that you are interfacing with a C library. That library must have a D binding file. I am assuming that it is your libA.d: // libA.d modul

Re: Continue iteration after exception

2013-01-23 Thread monarch_dodra
On Wednesday, 23 January 2013 at 16:10:57 UTC, H. S. Teoh wrote: On Wed, Jan 23, 2013 at 04:52:25PM +0100, monarch_dodra wrote: On Wednesday, 23 January 2013 at 15:24:02 UTC, Josh wrote: >On Wednesday, 23 January 2013 at 15:00:16 UTC, bearophile >wrote: >>A possible solution: desugar the forea

Passing opaque struct between functions/modules

2013-01-23 Thread Sarath Kumar
DMD v2.61; openSUSE 12.1 Source: --- libA.d: module libA; extern (C) { struct Opaque; Opaque* getObject(); void doSomething(Opaque *); } -- libB.d: module libB; extern (C) { struct Opaque; void doAction(Opaque *); } --- bug.d imp

Re: Scope and with

2013-01-23 Thread Ali Çehreli
On 01/23/2013 08:19 AM, simendsjo wrote: > Stuff like this should really be in the documentation.. The docs says > "in" is equivalent to "const scope", That is correct. > but doesn't mention this is not yet > implemented and is just "const" for now.. I am not sure whether that is true for all

Re: Scope and with

2013-01-23 Thread simendsjo
On Wednesday, 23 January 2013 at 13:43:58 UTC, mist wrote: On Wednesday, 23 January 2013 at 10:43:24 UTC, simendsjo wrote: On Wednesday, 23 January 2013 at 10:30:08 UTC, Namespace wrote: But AFAIK scope isn't fully implemented as storage class, or am I wrong? I think you are right. And I thin

Re: Continue iteration after exception

2013-01-23 Thread H. S. Teoh
On Wed, Jan 23, 2013 at 04:52:25PM +0100, monarch_dodra wrote: > On Wednesday, 23 January 2013 at 15:24:02 UTC, Josh wrote: > >On Wednesday, 23 January 2013 at 15:00:16 UTC, bearophile wrote: > >>A possible solution: desugar the foreach range iteration > >>protocol of dirEntries and wrap the releva

Re: Continue iteration after exception

2013-01-23 Thread monarch_dodra
On Wednesday, 23 January 2013 at 15:24:02 UTC, Josh wrote: On Wednesday, 23 January 2013 at 15:00:16 UTC, bearophile wrote: A possible solution: desugar the foreach range iteration protocol of dirEntries and wrap the relevant method with a try-catch. Sorry, could you explain that a little? I'

Re: Continue iteration after exception

2013-01-23 Thread Josh
On Wednesday, 23 January 2013 at 15:00:16 UTC, bearophile wrote: A possible solution: desugar the foreach range iteration protocol of dirEntries and wrap the relevant method with a try-catch. Sorry, could you explain that a little? I'm not sure what desugar means :/

Re: Continue iteration after exception

2013-01-23 Thread bearophile
Josh: Any help is appreciated. Thanks :) A possible solution: desugar the foreach range iteration protocol of dirEntries and wrap the relevant method with a try-catch. Bye, bearophile

Continue iteration after exception

2013-01-23 Thread Josh
DMD 2.060, Windows 7 64-bit Source: import std.file; import std.stdio; void main() { foreach (DirEntry d; dirEntries("C:\\", SpanMode.breadth)) writeln(d.name); } This code stops with "std.file.FileException@std\file.d(2434): C:\Documents and Settings: Access is denied." when it g

Re: Scope and with

2013-01-23 Thread mist
On Wednesday, 23 January 2013 at 10:43:24 UTC, simendsjo wrote: On Wednesday, 23 January 2013 at 10:30:08 UTC, Namespace wrote: But AFAIK scope isn't fully implemented as storage class, or am I wrong? I think you are right. And I think it's the reason using 'in' parameters are discouraged.

Re: S-Expressions

2013-01-23 Thread bearophile
qznc: Comments, improvements? See RosettaCode, only a little reformatting, cleaning, etc. Bye, bearophile

Re: MS ODBC encoding issue

2013-01-23 Thread Regan Heath
On Wed, 23 Jan 2013 04:41:11 -, Sam Hu wrote: I've tested and the Chinese character issue really fixed! But I have two more issues here. 1.for connect with DSNless string function provided by my original code as below,I can not make it to connect successfully with really database file.

Re: MS ODBC encoding issue

2013-01-23 Thread Regan Heath
On Wed, 23 Jan 2013 04:09:01 -, Sam Hu wrote: for windows console show Chinese character issue,I've solved and posted on the forum before.Please refer to below link: http://forum.dlang.org/thread/suzymdzjeifnfirtb...@dfeed.kimsufi.thecybershadow.net#post-suzymdzjeifnfirtbnrc:40dfeed.kimsu

Re: Scope and with

2013-01-23 Thread simendsjo
On Wednesday, 23 January 2013 at 10:30:08 UTC, Namespace wrote: But AFAIK scope isn't fully implemented as storage class, or am I wrong? I think you are right. And I think it's the reason using 'in' parameters are discouraged.

Re: Scope and with

2013-01-23 Thread Namespace
But AFAIK scope isn't fully implemented as storage class, or am I wrong?

Re: Scope and with

2013-01-23 Thread simendsjo
On Wednesday, 23 January 2013 at 09:52:40 UTC, Namespace wrote: On Wednesday, 23 January 2013 at 08:33:44 UTC, SaltySugar wrote: Can someone explain me scope and with statements? with statements simplify the access to a class, struct or something else. For example: class A { public:

Re: Scope and with

2013-01-23 Thread Namespace
On Wednesday, 23 January 2013 at 08:33:44 UTC, SaltySugar wrote: Can someone explain me scope and with statements? with statements simplify the access to a class, struct or something else. For example: class A { public: int b = 42; } A a = new A(); normal access: writeln(a.b); // wri

Re: shared std.signals

2013-01-23 Thread Jonathan M Davis
On Wednesday, January 23, 2013 08:17:57 Joshua Niehus wrote: > On Wednesday, 23 January 2013 at 07:11:59 UTC, Joshua Niehus > > wrote: > > Is it possible to create a shared signal class? > > oh god... dont tell me __gshared ! > Think i answered my own question, it got me to the next step. > going