Tuple/Typedef question

2015-01-11 Thread Martin via Digitalmars-d-learn
Is there a way to get Tuple (and Typedef) from the std.typecons module to generate a new type that is unique on every instantiation? What I mean is: alias T1 = Tuple!(int, int); alias T2 = Tuple!(int, int); writeln(__traits(isSame, T1, T2)); // prints true When using Typedef, the types are

Re: Is anyone working on a D source code formatting tool?

2015-01-11 Thread Suliman via Digitalmars-d
Can this problem be solve on Text Editor level? I use Sublime, and I need some tool for code formating. Maybe there is any ready to use addons for D?

Re: Is anyone working on a D source code formatting tool?

2015-01-11 Thread ponce via Digitalmars-d
On Saturday, 10 January 2015 at 22:11:55 UTC, Walter Bright wrote: On 1/10/2015 12:17 PM, Walter Bright wrote: Has someone made a dfmt, like http://gofmt.com/ ? Next question - standalone tool, or built in to dmd (like Ddoc)? BTW, I think dfmt would be a significant win for D: 1. people

Re: Is anyone working on a D source code formatting tool?

2015-01-11 Thread via Digitalmars-d
On Saturday, 10 January 2015 at 22:11:55 UTC, Walter Bright wrote: On 1/10/2015 12:17 PM, Walter Bright wrote: Has someone made a dfmt, like http://gofmt.com/ ? Next question - standalone tool, or built in to dmd (like Ddoc)? Please don't make the compiler-executable modify source code. It

Re: Is anyone working on a D source code formatting tool?

2015-01-11 Thread Jacob Carlborg via Digitalmars-d
On 2015-01-10 23:11, Walter Bright wrote: Next question - standalone tool, or built in to dmd (like Ddoc)? Ideally the dmd front end should be available as a library then dfmt should be a separate tool that uses the same front end library as dmd. But I know that we're not there yet. It's

Re: Is anyone working on a D source code formatting tool?

2015-01-11 Thread NVolcz via Digitalmars-d
On Saturday, 10 January 2015 at 22:11:55 UTC, Walter Bright wrote: On 1/10/2015 12:17 PM, Walter Bright wrote: Has someone made a dfmt, like http://gofmt.com/ ? Next question - standalone tool, or built in to dmd (like Ddoc)? BTW, I think dfmt would be a significant win for D: 1. people

Re: Is anyone working on a D source code formatting tool?

2015-01-11 Thread Walter Bright via Digitalmars-d
On 1/11/2015 2:00 AM, NVolcz wrote: I guess dfmt is to small for GSOC I'm not so sure. If the code has no comments, it's trivial. Handling comments, though, can be a bit of a challenge.

Re: Why exceptions for error handling is so important

2015-01-11 Thread Walter Bright via Digitalmars-d
On 1/11/2015 2:48 AM, Walter Bright wrote: To migrate the system to the new disk, the idea was to use Windows Backup/Restore of the image. Unfortunately, Windows Backup would get a ways through the process, then fail with no message beyond an error code. Googling the error code produced a vast

Re: Is it possible to collect object usage information during compilation?

2015-01-11 Thread Jacob Carlborg via Digitalmars-d
On 2015-01-11 02:08, DaveG wrote: In the past I have used FreeTDS, through PHP, and it had a lot of problems. This was several years ago and could have been at least partially due to the PHP layer. Last year I messed around with the ODBC wrapper and got amazingly poor performance, I believe

Re: Is it possible to collect object usage information during compilation?

2015-01-11 Thread Jacob Carlborg via Digitalmars-d
On 2015-01-10 21:53, DaveG wrote: One final note. You may have noticed I didn't mention the schema syncing problem (keeping database and code in sync). There was a time I would have said that was essential and while it would be nice in a perfect world, I'm comfortable keeping them in sync

Re: Is it possible to collect object usage information during compilation?

2015-01-11 Thread Paolo Invernizzi via Digitalmars-d
On Saturday, 10 January 2015 at 20:53:47 UTC, DaveG wrote: On Saturday, 10 January 2015 at 18:31:18 UTC, Paolo Invernizzi wrote: I would like to see, someday, something in D that: - can check at compile time the syntax of SQL; - can check at compile time the SQL query statement against the

Why exceptions for error handling is so important

2015-01-11 Thread Walter Bright via Digitalmars-d
Over the last few days, I have been getting weird errors from various programs I run on Windows 7. Programs would just fail, or produce corrupt output (I'm looking at you, Windows Moviemaker). I have a 128Gb SSD drive for my system drive, for speed, and a 4T secondary spinning drive for

Re: ddox question

2015-01-11 Thread Mathias LANG via Digitalmars-d
On Saturday, 10 January 2015 at 17:23:24 UTC, Andrei Alexandrescu wrote: In the ddox-generated documentation the heading is e.g. Module std.container. I wanted to style std.container in code font, but can't find where that text is generated. I've searched dlang.org/ and dub/, no avail.

Re: Tuple/Typedef question

2015-01-11 Thread ketmar via Digitalmars-d-learn
On Sun, 11 Jan 2015 11:41:08 + Martin via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Is there a way to get Tuple (and Typedef) from the std.typecons module to generate a new type that is unique on every instantiation? What I mean is: alias T1 = Tuple!(int, int); alias

Re: D idioms list

2015-01-11 Thread Russel Winder via Digitalmars-d-announce
On Sat, 2015-01-10 at 14:13 -0800, Walter Bright via Digitalmars-d-announce wrote: On 1/10/2015 1:28 PM, weaselcat wrote: Sorry for the off-topic noise, but where will you be publishing your articles since Dr.Dobbs has closed? Sorry if you have answered this elsewhere. It's a

Re: @api: One attribute to rule them All

2015-01-11 Thread Dicebot via Digitalmars-d
On Friday, 9 January 2015 at 16:14:01 UTC, Zach the Mystic wrote: To sum up: All .di function signatures will now be generated with both explicit and inferred attributes. The keyword 'export' will be overloaded with a new meaning, toggled on and off by a compiler flag which generates .di files

Re: @api: One attribute to rule them All

2015-01-11 Thread Dicebot via Digitalmars-d
On Saturday, 10 January 2015 at 10:47:04 UTC, Marc Schütz wrote: On Friday, 9 January 2015 at 16:14:01 UTC, Zach the Mystic wrote: If solving the problem at the level of the command line with the help of the existing 'export' attribute is more flexible and robust, then I'm all for it. The

Re: Discussion on groupBy

2015-01-11 Thread Peter Alexander via Digitalmars-d
On Saturday, 10 January 2015 at 20:19:14 UTC, Andrei Alexandrescu wrote: groupBy is an important primitive for relational algebra queries on data. Soon to follow are operators such as aggregate() which is a sort of reduce() but operating on ranges of ranges. GroupBy is a very important

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread via Digitalmars-d
On Sunday, 11 January 2015 at 14:10:56 UTC, ponce wrote: The problem with Rust and Go is that they only deliver in theory, while D kicks some asses in practice. How? Eg: at this very moment, D is more stable than Rust, ground truth. I think Rust will hit non-breaking stability (or close to

Re: Is anyone working on a D source code formatting tool?

2015-01-11 Thread Daniel Murphy via Digitalmars-d
Jacob Carlborg wrote in message news:m8thr2$pag$1...@digitalmars.com... Ideally the dmd front end should be available as a library then dfmt should be a separate tool that uses the same front end library as dmd. But I know that we're not there yet. Well, some of it is. If somebody wants to

Re: Tuple/Typedef question

2015-01-11 Thread Dicebot via Digitalmars-d-learn
I use this Typedef implementation instead: /// one with non-default initializer template Typedef(T, istring name, T initval) { static assert (name.length, Can't create Typedef with an empty identifier); enum Typedef = (struct ~ name ~ { ~

Re: Is anyone working on a D source code formatting tool?

2015-01-11 Thread Russel Winder via Digitalmars-d
On Sun, 2015-01-11 at 11:04 +0100, Jacob Carlborg via Digitalmars-d wrote: On 2015-01-10 23:11, Walter Bright wrote: Next question - standalone tool, or built in to dmd (like Ddoc)? Ideally the dmd front end should be available as a library then dfmt should be a separate tool that uses

Re: Is anyone working on a D source code formatting tool?

2015-01-11 Thread Russel Winder via Digitalmars-d
On Sat, 2015-01-10 at 14:11 -0800, Walter Bright via Digitalmars-d wrote: On 1/10/2015 12:17 PM, Walter Bright wrote: Has someone made a dfmt, like http://gofmt.com/ ? Next question - standalone tool, or built in to dmd (like Ddoc)? Why in the compiler, source code formatting is not a

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread MattCoder via Digitalmars-d
On Sunday, 11 January 2015 at 06:56:02 UTC, thedeemon wrote: At this moment I only see some popularity comparisons Yes in fact they are talking more about popularity between both languages. and I think they're generally correct... Since I'm relative new here, I want know from you agree

Re: Why exceptions for error handling is so important

2015-01-11 Thread Dicebot via Digitalmars-d
What is your opinion of approach advertised by various functional languages and now also Rust? Where you return error code packed with actual data and can't access data without visiting error code too, compiler simply won't allow it.

Re: Game development

2015-01-11 Thread dajones via Digitalmars-d
On Sunday, 11 January 2015 at 02:32:00 UTC, ketmar via Digitalmars-d wrote: On Sun, 11 Jan 2015 01:45:25 + dajones via Digitalmars-d digitalmars-d@puremagic.com wrote: *almost* :-) ah, so that was trolling? You keep taking the bait. sure. just be sure to keep it fun enough for me, so

Re: Could D compete in a competition like this?

2015-01-11 Thread ponce via Digitalmars-d
On Sunday, 11 January 2015 at 13:01:36 UTC, Gary Willoughby wrote: Could D compete in a competition like this? In a nutshell: We give you a bunch of ranked 2D points, then ask you to find the most important ones inside some randomly generated rectangles. Easy, right? Now make it fast, and you

Re: Why exceptions for error handling is so important

2015-01-11 Thread ketmar via Digitalmars-d
On Sun, 11 Jan 2015 13:06:26 + Dicebot via Digitalmars-d digitalmars-d@puremagic.com wrote: What is your opinion of approach advertised by various functional languages and now also Rust? Where you return error code packed with actual data and can't access data without visiting error

Re: Why exceptions for error handling is so important

2015-01-11 Thread Andrej Mitrovic via Digitalmars-d
On 1/11/15, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: Or a @noignore attribute. Just having that alone could easily catch the mistake of ignoring a return value. I'm really rooting for this, but is anyone else on board? Or perhaps to avoid keyword/attribute bloat, a -noignore switch.

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread via Digitalmars-d
On Sunday, 11 January 2015 at 12:57:17 UTC, MattCoder wrote: Since I'm relative new here, I want know from you agree with this statement: [–]clay_davis_sheeit 4 points 17 hours ago* get real. D is more dead now than it was a year ago. if you won't accept repo counts, look at how many people

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread Kiith-Sa via Digitalmars-d
On Sunday, 11 January 2015 at 12:57:17 UTC, MattCoder wrote: On Sunday, 11 January 2015 at 06:56:02 UTC, thedeemon wrote: At this moment I only see some popularity comparisons Yes in fact they are talking more about popularity between both languages. and I think they're generally

Re: D port of the Dynamic Window Manager (DWM)

2015-01-11 Thread Dicebot via Digitalmars-d-announce
On Monday, 5 January 2015 at 06:17:03 UTC, stewart h wrote: Hi, I've ported DWM to D as a learning exercise and thought I'd share it. The repository can be found here: https://bitbucket.org/growlercab/ddwm (Beware, I've only tested it on Arch-Linux 64 bit for about 1 day!) DWM is a

Re: Tuple/Typedef question

2015-01-11 Thread Martin via Digitalmars-d-learn
On Sunday, 11 January 2015 at 11:52:42 UTC, ketmar via Digitalmars-d-learn wrote: On Sun, 11 Jan 2015 11:41:08 + Martin via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Is there a way to get Tuple (and Typedef) from the std.typecons module to generate a new type that is

Re: Is this visible to all?

2015-01-11 Thread Vladimir Panteleev via Digitalmars-d
On Sunday, 11 January 2015 at 07:16:46 UTC, Daniel Murphy wrote: Andrei Alexandrescu wrote in message news:m8sr3k$2s2e$1...@digitalmars.com... Some links on github are only visible to admins/committers. Is this available to all? https://github.com/pulls?user=D-Programming-Language Andrei

Re: Tuple/Typedef question

2015-01-11 Thread ketmar via Digitalmars-d-learn
On Sun, 11 Jan 2015 12:00:19 + Martin via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: as for `Typedef!` -- you can use it's third arg, cookie: import std.typecons; alias T1 = Tuple!(int, int); alias T2 = Tuple!(int, int); alias T1New = Typedef!(T1,

Re: GSOC - Holiday Edition

2015-01-11 Thread Russel Winder via Digitalmars-d
On Sat, 2015-01-10 at 19:30 +, Craig Dillabaugh via Digitalmars-d wrote: 8) Russel Winder and QML ... see #4. Should we drop QML support from our GSOC due to: http://forum.dlang.org/thread/hapeegrotkazppwdn...@forum.dlang.org Or promote it even more with filcuc as a co-mentor

Could D compete in a competition like this?

2015-01-11 Thread Gary Willoughby via Digitalmars-d
Could D compete in a competition like this? In a nutshell: We give you a bunch of ranked 2D points, then ask you to find the most important ones inside some randomly generated rectangles. Easy, right? Now make it fast, and you could get $5K! http://churchillnavigation.com/challenge/ Can D

Re: Why exceptions for error handling is so important

2015-01-11 Thread Andrej Mitrovic via Digitalmars-d
On 1/11/15, Dicebot via Digitalmars-d digitalmars-d@puremagic.com wrote: What is your opinion of approach advertised by various functional languages and now also Rust? Where you return error code packed with actual data and can't access data without visiting error code too, compiler simply

Re: An idea for commercial support for D

2015-01-11 Thread Dicebot via Digitalmars-d
On Friday, 9 January 2015 at 15:39:13 UTC, Joakim wrote: It poses unacceptable risk of company becoming hostage of ecosystem were buying closed patches is only way to use the tool effectively. In software world where even .NET goes open-source there is simply no reason why would one agree on

How to interface with C++ code or dll?

2015-01-11 Thread Suliman via Digitalmars-d-learn
I am trying to understand how to use C++ lib from D. For my App I need http://www.gdal.org I had read about using C++ libs from D, and understood that there is 2 ways: 1. Make binding - convert .H to .d (I still do not fully understand what is it) 2. Use directly C++ lib (.dll) I decided to

Re: Could D compete in a competition like this?

2015-01-11 Thread via Digitalmars-d
On Sunday, 11 January 2015 at 13:01:36 UTC, Gary Willoughby wrote: Could D compete in a competition like this? The guts will have to be done in assembly or Intel intrinsics...

Re: Is anyone working on a D source code formatting tool?

2015-01-11 Thread Dicebot via Digitalmars-d
On Saturday, 10 January 2015 at 22:11:55 UTC, Walter Bright wrote: On 1/10/2015 12:17 PM, Walter Bright wrote: Has someone made a dfmt, like http://gofmt.com/ ? Next question - standalone tool, or built in to dmd (like Ddoc)? I think best approach is akin to git subcommands - you can call

Re: Is anyone working on a D source code formatting tool?

2015-01-11 Thread Andrej Mitrovic via Digitalmars-d
On 1/10/15, weaselcat via Digitalmars-d digitalmars-d@puremagic.com wrote: On Saturday, 10 January 2015 at 20:18:03 UTC, Walter Bright wrote: Has someone made a dfmt, like http://gofmt.com/ ? Uncrustify claims D support. http://uncrustify.sourceforge.net/ Yes, and the author is responsive

Re: Why exceptions for error handling is so important

2015-01-11 Thread ketmar via Digitalmars-d
On Sun, 11 Jan 2015 14:32:21 +0100 Andrej Mitrovic via Digitalmars-d digitalmars-d@puremagic.com wrote: On 1/11/15, Dicebot via Digitalmars-d digitalmars-d@puremagic.com wrote: What is your opinion of approach advertised by various functional languages and now also Rust? Where you return

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread Adam D. Ruppe via Digitalmars-d
Reddit seems to have a constant stream of random project in Go posts. There was one this week that was a command line websocket and it was like 40 lines of code. Come on. I'm tempted to start posting every little thing I write in D to it too, but it'd just be spam!

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread ponce via Digitalmars-d
On Sunday, 11 January 2015 at 13:37:33 UTC, Ola Fosheim Grøstad wrote: On Sunday, 11 January 2015 at 12:57:17 UTC, MattCoder wrote: Since I'm relative new here, I want know from you agree with this statement: [–]clay_davis_sheeit 4 points 17 hours ago* get real. D is more dead now than it

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread Bauss via Digitalmars-d
On Sunday, 11 January 2015 at 14:03:05 UTC, Adam D. Ruppe wrote: Reddit seems to have a constant stream of random project in Go posts. There was one this week that was a command line websocket and it was like 40 lines of code. Come on. I'm tempted to start posting every little thing I write

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread via Digitalmars-d
On Sunday, 11 January 2015 at 14:03:05 UTC, Adam D. Ruppe wrote: Reddit seems to have a constant stream of random project in Go posts. There was one this week that was a command line websocket and it was like 40 lines of code. Come on. I'm tempted to start posting every little thing I write

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread via Digitalmars-d
On Sunday, 11 January 2015 at 15:29:45 UTC, Dicebot wrote: On Sunday, 11 January 2015 at 14:43:08 UTC, Ola Fosheim Grøstad wrote: Maybe we should do a comparison thread between D and Rust. It might be interesting, and perhaps encourage some improvements to D. I am actually writing a Rust

Re: An idea for commercial support for D

2015-01-11 Thread Dicebot via Digitalmars-d
There are very few monopolies in software, essentially none nowadays. :D :D :D :D :D I have not laughed so hard for quite a while. Modern IT industry is absolutely dominated by monopolies / oligopolies. Hard to reason with you if this is what you see.

Re: An idea for commercial support for D

2015-01-11 Thread Joakim via Digitalmars-d
On Sunday, 11 January 2015 at 16:13:01 UTC, Dicebot wrote: There are very few monopolies in software, essentially none nowadays. :D :D :D :D :D I have not laughed so hard for quite a while. Modern IT industry is absolutely dominated by monopolies / oligopolies. Hard to reason with you if

Re: Is it possible to collect object usage information during compilation?

2015-01-11 Thread DaveG via Digitalmars-d
On Sunday, 11 January 2015 at 09:54:42 UTC, Jacob Carlborg wrote: On 2015-01-11 02:08, DaveG wrote: In the past I have used FreeTDS, through PHP, and it had a lot of problems. This was several years ago and could have been at least partially due to the PHP layer. Last year I messed around

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread MattCoder via Digitalmars-d
On Sunday, 11 January 2015 at 15:44:42 UTC, thedeemon wrote: ...For example, compare these stats: http://www.code2014.com/ http://code2013.herokuapp.com/ Interesting charts. But on the other hand, I remember that sometime ago Andrei posted (

Re: Why exceptions for error handling is so important

2015-01-11 Thread Robert burner Schadek via Digitalmars-d
to not let ranges succumb to such a problem I wrote: https://github.com/D-Programming-Language/phobos/pull/2724

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread via Digitalmars-d
On Sunday, 11 January 2015 at 16:30:09 UTC, MattCoder wrote: Yes, that was what I saw on this thread: http://forum.dlang.org/thread/lu6mhc$t2k$1...@digitalmars.com I don't think such statistics matters much. Downloads is a bad measure, retention rate is what you want to measure (the ratio of

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread Paulo Pinto via Digitalmars-d
On Sunday, 11 January 2015 at 14:03:05 UTC, Adam D. Ruppe wrote: Reddit seems to have a constant stream of random project in Go posts. There was one this week that was a command line websocket and it was like 40 lines of code. Come on. I'm tempted to start posting every little thing I write

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread Dicebot via Digitalmars-d
On Sunday, 11 January 2015 at 14:43:08 UTC, Ola Fosheim Grøstad wrote: Maybe we should do a comparison thread between D and Rust. It might be interesting, and perhaps encourage some improvements to D. I am actually writing a Rust guide as read by D developer article now making random notes

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread Jack via Digitalmars-d
On Sunday, 11 January 2015 at 14:12:08 UTC, Bauss wrote: On Sunday, 11 January 2015 at 14:03:05 UTC, Adam D. Ruppe wrote: Reddit seems to have a constant stream of random project in Go posts. There was one this week that was a command line websocket and it was like 40 lines of code. Come on.

Re: An idea for commercial support for D

2015-01-11 Thread Joakim via Digitalmars-d
On Sunday, 11 January 2015 at 12:39:03 UTC, Dicebot wrote: On Friday, 9 January 2015 at 15:39:13 UTC, Joakim wrote: It poses unacceptable risk of company becoming hostage of ecosystem were buying closed patches is only way to use the tool effectively. In software world where even .NET goes

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread MattCoder via Digitalmars-d
On Sunday, 11 January 2015 at 13:57:54 UTC, Kiith-Sa wrote: That guy has been trolling every D thread in the last year. I didn't know that. Glad you said! Either way, D is definitely way more popular/active than it was a year ago, especially with a large jump around last summer but not

[Issue 12409] Add each function as found in Ruby and jQuery

2015-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12409 bearophile_h...@eml.cc changed: What|Removed |Added Status|RESOLVED|REOPENED CC|

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread ponce via Digitalmars-d
On Sunday, 11 January 2015 at 14:43:08 UTC, Ola Fosheim Grøstad wrote: And as soon as Servo is interrupted because of internal politics at Mozilla or rebudgeting (ie. very high probability), Rust will be halted in a heartbeat since loosing its purpose. Ever noticed the Rust original designer

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread Paulo Pinto via Digitalmars-d
On Sunday, 11 January 2015 at 14:10:56 UTC, ponce wrote: On Sunday, 11 January 2015 at 13:37:33 UTC, Ola Fosheim Grøstad wrote: On Sunday, 11 January 2015 at 12:57:17 UTC, MattCoder wrote: Since I'm relative new here, I want know from you agree with this statement: [–]clay_davis_sheeit 4

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread thedeemon via Digitalmars-d
On Sunday, 11 January 2015 at 12:57:17 UTC, MattCoder wrote: Since I'm relative new here, I want know from you agree with this statement: [–]clay_davis_sheeit 4 points 17 hours ago* get real. D is more dead now than it was a year ago. if you won't accept repo counts, look at how many

Re: Is it possible to collect object usage information during compilation?

2015-01-11 Thread DaveG via Digitalmars-d
On Sunday, 11 January 2015 at 10:06:53 UTC, Paolo Invernizzi wrote: On Saturday, 10 January 2015 at 20:53:47 UTC, DaveG wrote: On Saturday, 10 January 2015 at 18:31:18 UTC, Paolo Invernizzi wrote: I would like to see, someday, something in D that: - can check at compile time the syntax of

Re: Why exceptions for error handling is so important

2015-01-11 Thread thedeemon via Digitalmars-d
On Sunday, 11 January 2015 at 13:25:59 UTC, ketmar via Digitalmars-d wrote: On Sun, 11 Jan 2015 13:06:26 + Dicebot via Digitalmars-d digitalmars-d@puremagic.com wrote: What is your opinion of approach advertised by various functional languages and now also Rust? Where you return error

Re: ddox question

2015-01-11 Thread Andrei Alexandrescu via Digitalmars-d
On 1/11/15 3:03 AM, Mathias LANG wrote: On Saturday, 10 January 2015 at 17:23:24 UTC, Andrei Alexandrescu wrote: In the ddox-generated documentation the heading is e.g. Module std.container. I wanted to style std.container in code font, but can't find where that text is generated. I've searched

Re: Is anyone working on a D source code formatting tool?

2015-01-11 Thread Walter Bright via Digitalmars-d
On 1/11/2015 4:47 AM, Russel Winder via Digitalmars-d wrote: Next question - standalone tool, or built in to dmd (like Ddoc)? Also why in DMD and not in LDC or GDC? It would be in the DMD front end, so LDC and GDC would it automatically. 1. people expect this sort of thing these days

Re: Is anyone working on a D source code formatting tool?

2015-01-11 Thread Walter Bright via Digitalmars-d
On 1/11/2015 5:11 AM, Dicebot wrote: I would love to see DDOC implemented that way too. Ddoc makes use of semantic info, not just an AST. For semantic info, you pretty much need a real compiler.

Re: An idea for commercial support for D

2015-01-11 Thread Iain Buclaw via Digitalmars-d
On 11 January 2015 at 16:23, Joakim via Digitalmars-d digitalmars-d@puremagic.com wrote: On Sunday, 11 January 2015 at 16:13:01 UTC, Dicebot wrote: There are very few monopolies in software, essentially none nowadays. :D :D :D :D :D I have not laughed so hard for quite a while. Modern IT

Re: Ready to make page-per-item ddocs the default?

2015-01-11 Thread Steven Schveighoffer via Digitalmars-d
On 1/9/15 4:17 PM, Andrei Alexandrescu wrote: On 1/9/15 12:59 PM, Jacob Carlborg wrote: On 2015-01-09 20:46, Andrei Alexandrescu wrote: Stuff's up! http://dlang.org/library-prerelease/core/stdc/complex.html. I couldn't get rid of the darn space between the header name and the period. --

Re: Is anyone working on a D source code formatting tool?

2015-01-11 Thread ketmar via Digitalmars-d
On Sun, 11 Jan 2015 12:47:41 + Russel Winder via Digitalmars-d digitalmars-d@puremagic.com wrote: I don't think it'll be hard to do as a builtin feature of dmd. It should be a separate tool not a part of one of the three compilers. i can't see anything wrong with built-in tool. even if

Re: Is anyone working on a D source code formatting tool?

2015-01-11 Thread Jacob Carlborg via Digitalmars-d
On 2015-01-11 20:20, Walter Bright wrote: Ddoc makes use of semantic info, not just an AST. For semantic info, you pretty much need a real compiler. I've been thinking of that the last couple of days. It should be pretty straightforward to copy-paste the driver part of DMD, i.e the part

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread ponce via Digitalmars-d
On Sunday, 11 January 2015 at 18:25:39 UTC, francesco.cattoglio wrote: On Sunday, 11 January 2015 at 14:10:56 UTC, ponce wrote: None of them has Visual Studio integration with debugging support and that is pretty important for native and enterprise programmers. If I remember correctly, just 2

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread bearophile via Digitalmars-d
ponce: Rust is supposed to replace C++, and it happens working in C++ since years, I can't help but notice we actually have very few memory safety problems, Are you always able to detect them? I think languages (and programmers) that don't have a strict attitude toward memory safety will

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread ponce via Digitalmars-d
On Sunday, 11 January 2015 at 19:38:12 UTC, bearophile wrote: Are you always able to detect them? I think languages (and programmers) that don't have a strict attitude toward memory safety will be slowly left behind in the few next years. D is lacking in this (and the scoping management should

Re: Is anyone working on a D source code formatting tool?

2015-01-11 Thread Jacob Carlborg via Digitalmars-d
On 2015-01-11 19:48, Walter Bright wrote: The main problem is what to do about comments, which don't fit into the grammar. A secondary problem is what to do when the line length limit is exceeded, such as for long expressions. clang-format seems to do a pretty good job with both of these.

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread Andrei Alexandrescu via Digitalmars-d
On 1/11/15 10:25 AM, francesco.cattoglio wrote: I'm obviously being the devil's advocate here, but we can't just say D is much more far ahead, we have nothing to fear from Go and Rust, because it's just not true. Totally agreed. It's a competitive climate out there, and we need to mind our

Re: Ready to make page-per-item ddocs the default?

2015-01-11 Thread Andrei Alexandrescu via Digitalmars-d
On 1/11/15 11:26 AM, Steven Schveighoffer wrote: On 1/9/15 4:17 PM, Andrei Alexandrescu wrote: On 1/9/15 12:59 PM, Jacob Carlborg wrote: On 2015-01-09 20:46, Andrei Alexandrescu wrote: Stuff's up! http://dlang.org/library-prerelease/core/stdc/complex.html. I couldn't get rid of the darn

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 11 January 2015 at 19:49:32 UTC, Andrei Alexandrescu wrote: On 1/11/15 10:25 AM, francesco.cattoglio wrote: And I say it as a daily D user, daily facing issues like the horrible invalidMemoryOperationError exception. What is that? It happens if you try to do a GC operation while

Re: Is anyone working on a D source code formatting tool?

2015-01-11 Thread Andrei Alexandrescu via Digitalmars-d
On 1/11/15 10:48 AM, Walter Bright wrote: On 1/11/2015 9:45 AM, Stefan Koch wrote: I'm powerful writing a parser-generator, that will be able to transform the generated parse-tree back into source automatically. writing a rule-based formatter should be pretty doable. Formatting the AST into

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread via Digitalmars-d
On Sunday, 11 January 2015 at 19:38:12 UTC, bearophile wrote: ponce: Rust is supposed to replace C++, and it happens working in C++ since years, I can't help but notice we actually have very few memory safety problems, Are you always able to detect them? When Intel MPX comes you should be

Sqlite

2015-01-11 Thread Paul via Digitalmars-d-learn
Can someone please tell me what I'm doing wrong here, the sql INSERT statement fails for some reason. I don't fully understand the callback function yet (I borrowed this from a C tutorial on the subject), maybe that is the source of the problem? import etc.c.sqlite3; import std.stdio;

Re: Build all combinations of strings

2015-01-11 Thread Nordlöw
On Monday, 11 June 2012 at 19:52:38 UTC, bearophile wrote: Using that the code is: import std.string, std.stdio, std.array; void main() { auto words = foo bar doo.split(); auto res = permutations!false(words).map!(p = p.join( ))().array(); writeln(res); } Is doCopy really needed

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread Andrei Alexandrescu via Digitalmars-d
On 1/11/15 7:29 AM, Dicebot wrote: On Sunday, 11 January 2015 at 14:43:08 UTC, Ola Fosheim Grøstad wrote: Maybe we should do a comparison thread between D and Rust. It might be interesting, and perhaps encourage some improvements to D. I am actually writing a Rust guide as read by D developer

Re: Is it possible to collect object usage information during compilation?

2015-01-11 Thread Andrei Alexandrescu via Digitalmars-d
On 1/11/15 8:21 AM, DaveG wrote: On Sunday, 11 January 2015 at 09:54:42 UTC, Jacob Carlborg wrote: On 2015-01-11 02:08, DaveG wrote: In the past I have used FreeTDS, through PHP, and it had a lot of problems. This was several years ago and could have been at least partially due to the PHP

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread Andrei Alexandrescu via Digitalmars-d
On 1/11/15 8:27 AM, MattCoder wrote: On Sunday, 11 January 2015 at 15:44:42 UTC, thedeemon wrote: ...For example, compare these stats: http://www.code2014.com/ http://code2013.herokuapp.com/ Interesting charts. But on the other hand, I remember that sometime ago Andrei posted (

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread Andrei Alexandrescu via Digitalmars-d
On 1/11/15 9:43 AM, Andrei Alexandrescu wrote: I just regenerated the 28-day moving average graph: erdani.com/d/downloads.daily.png http://erdani.com/d/downloads.daily.png that is. -- Andrei

Re: Is anyone working on a D source code formatting tool?

2015-01-11 Thread Stefan Koch via Digitalmars-d
I'm powerful writing a parser-generator, that will be able to transform the generated parse-tree back into source automatically. writing a rule-based formatter should be pretty doable.

Want to make http://dconf.org more attractive?

2015-01-11 Thread Andrei Alexandrescu via Digitalmars-d
Please add here! https://github.com/D-Programming-Language/dconf.org/pulls. I'm thinking CSS, design, layout, content, the whole enchilada. dconf.org is a much smaller site than dlang.org and has much fewer constraints., Contributions appreciated! Andrei

Re: Build all combinations of strings

2015-01-11 Thread bearophile via Digitalmars-d-learn
Nordlöw: Is doCopy really needed as an argument here? Couldn't this be inferred from the mutability of T instead? doCopy is useful, if it's true all the permutation arrays are distinct and dup-ped, otherwise they are all different. It's true by default, so casual users of that generator

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread francesco.cattoglio via Digitalmars-d
On Sunday, 11 January 2015 at 14:10:56 UTC, ponce wrote: None of them has Visual Studio integration with debugging support and that is pretty important for native and enterprise programmers. If I remember correctly, just 2 month ago someone was explaining how they lost a commercial user

Re: D idioms list

2015-01-11 Thread Walter Bright via Digitalmars-d-announce
On 1/11/2015 4:24 AM, Russel Winder via Digitalmars-d-announce wrote: Feel free to send stuff to ACCU's CVu or Overload. http://accu.org/index.php/journal Good idea!

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread via Digitalmars-d
On Sunday, 11 January 2015 at 17:44:59 UTC, Andrei Alexandrescu wrote: On 1/11/15 9:43 AM, Andrei Alexandrescu wrote: I just regenerated the 28-day moving average graph: erdani.com/d/downloads.daily.png http://erdani.com/d/downloads.daily.png that is. -- Andrei Considered doing a scatter

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread Walter Bright via Digitalmars-d
On 1/11/2015 6:48 AM, Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= ola.fosheim.grostad+dl...@gmail.com wrote: You know what, if you push out the projects which are tiny utilities that solves real world problems, then you might get people interested. If you can solve such real world problems in 40 lines

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread Walter Bright via Digitalmars-d
On 1/11/2015 7:29 AM, Dicebot wrote: I liked in Rust more were also things I complained about in D for ages before. I know the feeling. My internal state of the right way to write programs evolves constantly.

Re: Thoughts on replacement languages (Reddit + D)

2015-01-11 Thread via Digitalmars-d
On Sunday, 11 January 2015 at 18:37:31 UTC, Walter Bright wrote: For once, I agree with you :-D You're in denial, you meant like always. ;ˆ]

Re: Is anyone working on a D source code formatting tool?

2015-01-11 Thread Walter Bright via Digitalmars-d
On 1/11/2015 9:45 AM, Stefan Koch wrote: I'm powerful writing a parser-generator, that will be able to transform the generated parse-tree back into source automatically. writing a rule-based formatter should be pretty doable. Formatting the AST into text is straightforward, dmd already does

Re: DConf 2015 Call for Submissions is now open

2015-01-11 Thread Iain Buclaw via Digitalmars-d-announce
On 10 January 2015 at 20:15, Walter Bright via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: On 1/10/2015 9:50 AM, Andrei Alexandrescu wrote: On 1/10/15 9:49 AM, Andrei Alexandrescu wrote: On 1/10/15 8:15 AM, Iain Buclaw via Digitalmars-d-announce wrote: In any event,

Re: Sqlite

2015-01-11 Thread ketmar via Digitalmars-d-learn
On Sun, 11 Jan 2015 20:00:03 + Paul via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Can someone please tell me what I'm doing wrong here, the sql INSERT statement fails for some reason. I don't fully understand the callback function yet (I borrowed this from a C tutorial

  1   2   >