unit-threaded (D multithreaded unit testing library) v0.2.0 released

2013-11-13 Thread Atila Neves
http://code.dlang.org/packages/unit-threaded https://github.com/atilaneves/unit-threaded What's new? Bug fixes and the dtest util. dtest lets you point it at a list of directories, preferably just one called tests (that way there's less command-line options to type) and voilá, all tests in

DCD 0.2.0 Released

2013-11-13 Thread Brian Schott
DCD 0.2.0 is released. Github Project: https://github.com/Hackerpilot/DCD Release Tag: https://github.com/Hackerpilot/DCD/tree/0.2.0 The D Completion Daemon is an auto-complete system for the D programming language that is not tied to any specific text editor or IDE. Modules exist for

Re: DCD 0.2.0 Released

2013-11-13 Thread Jussi Jumppanen
On Wednesday, 13 November 2013 at 19:40:08 UTC, Brian Schott wrote: * Only the Textadept module has support for go-to-declaration at the moment. FYI, the dcd_lookup.py Python script found on this page: http://www.zeusedit.com/zforum/viewtopic.php?t=7020 implements the *go-to-declaration*

Re: DCD 0.2.0 Released

2013-11-13 Thread Jacob Carlborg
On 2013-11-13 20:40, Brian Schott wrote: DCD 0.2.0 is released. Github Project: https://github.com/Hackerpilot/DCD Release Tag: https://github.com/Hackerpilot/DCD/tree/0.2.0 The D Completion Daemon is an auto-complete system for the D programming language that is not tied to any specific text

Re: DCD 0.2.0 Released

2013-11-13 Thread Philippe Sigaud
This project imports stdx.d.(lexer/parser/ast). Where can I find these modules? On Thu, Nov 14, 2013 at 8:19 AM, Jacob Carlborg d...@me.com wrote: On 2013-11-13 20:40, Brian Schott wrote: DCD 0.2.0 is released. Github Project: https://github.com/Hackerpilot/DCD Release Tag:

Re: What’s Wrong with OOP and FP

2013-11-13 Thread Froglegs
Go is a boring language, kind of like Dart, I guess Google just sucks at language design? The do use an awful lot of Java, perhaps it has caused irreparable damage

Re: DIP 50 - AST macros

2013-11-13 Thread Jacob Carlborg
On 2013-11-12 10:20, Walter Bright wrote: I confess I have some serious reservations about AST macros in general: 1. I've seen very heavy use of such macros in macro assemblers. What happens is people use it to invent their own (very baroque) language on top of the existing assembler one.

Re: DIP 50 - AST macros

2013-11-13 Thread Jacob Carlborg
On 2013-11-12 11:03, Walter Bright wrote: Here's a project to add Linq support to C++: http://www.codeproject.com/Articles/17844/CLinq-LINQ-support-for-the-C-CLI-language There's also: http://pfultz2.github.io/Linq/ https://github.com/hjiang/linqxx/wiki Again, operator overloading in D

Re: obliterate

2013-11-13 Thread Simen Kjærås
On 13.11.2013 08:16, KlausO wrote: Am 13.11.2013 02:21, schrieb Andrei Alexandrescu: On 11/12/13 5:10 PM, Vladimir Panteleev wrote: * Pointers and class references: size_t.max - 65_535, i.e. 64K below the upper memory limit. On all systems I know it can be safely assumed that that area will

Re: DIP 50 - AST macros

2013-11-13 Thread Jacob Carlborg
On 2013-11-12 19:01, Rob T wrote: My personal main need for macros at this point, is to make up for a lack of better reflection, but as has been pointed out, it's not clear how macros would help anyway without access to the sort of reflection that I'm currently lacking. Macros would need a

Re: Shall I use std.json at my own risks ?

2013-11-13 Thread jean christophe
On Wednesday, 13 November 2013 at 06:16:07 UTC, Rob T wrote: I need my Gtkd application to maintain a (possibly big) archive database of financial records downloaded daily from the server application. In my case JSON seems to be the most convenient format. Please let me know if, according to

Re: DIP 50 - AST macros

2013-11-13 Thread Jacob Carlborg
On 2013-11-12 21:03, Joseph Cassman wrote: After using string mixins for a while I have come to feel much like your statement in (1). I like the power and flexibility of string mixins. Text and strings are understandable and straightforward to manipulate. This is a clear win in my opinion.

Re: DIP 50 - AST macros

2013-11-13 Thread luka8088
On 10.11.2013. 22:20, Jacob Carlborg wrote: I've been thinking quite long of how AST macros could look like in D. I've been posting my vision of AST macros here in the newsgroup a couple of times already. I've now been asked to create a DIP out of it, so here it is:

Re: DIP 50 - AST macros

2013-11-13 Thread Jacob Carlborg
On 2013-11-13 00:26, Walter Bright wrote: It is limiting, but I don't know about extremely limiting. Eric Anderton's regex engine didn't need them. And, if you really do need them, you can always define the templates as regular names: lessThan(a,b) equals(a,b) etc. Not the greatest,

Re: DIP 50 - AST macros

2013-11-13 Thread Jacob Carlborg
On 2013-11-12 16:20, Dicebot wrote: I don't know much about linq but in macro context I'd expect it to generate an actual SQL query to database (and execute it) based on in-language filter statement (via reflection) Exactly, spot on. The interesting thing there, in the context of macros, is

Re: DIP 50 - AST macros

2013-11-13 Thread Jacob Carlborg
On 2013-11-12 15:38, John Colvin wrote: for those of us entirely unfamiliar with linq, what is this supposed to do? Select people with name John from a collection of people, like in sql? It seems trivial to do this using filter, or am I missing something...? The idea of that example is, as

Re: DIP 45 - approval discussion

2013-11-13 Thread Benjamin Thaut
Am 13.11.2013 08:31, schrieb Rainer Schuetze: - The DIP should state what happens to template instances. Assuming the definition is marked export, I guess instances will be dllexport if they are compiled together with the module that contains the definition. What will happen if it is

Re: DIP 50 - AST macros

2013-11-13 Thread Jacob Carlborg
On 2013-11-12 17:14, John Colvin wrote: oh, I see. Would AST macros really be enough to make this work in D? Arbitrary code is a huge feature space in D, including much that doesn't map well to anything outside of a relatively low-level language, let alone SQL. I can see it quickly becoming a

Re: DIP 50 - AST macros

2013-11-13 Thread luka8088
On 13.11.2013. 9:26, Jacob Carlborg wrote: On 2013-11-12 17:14, John Colvin wrote: oh, I see. Would AST macros really be enough to make this work in D? Arbitrary code is a huge feature space in D, including much that doesn't map well to anything outside of a relatively low-level language,

Re: DIP 50 - AST macros

2013-11-13 Thread Jacob Carlborg
On 2013-11-12 21:25, Dicebot wrote: I had an impression it was exactly the context in which linq was originally mentioned, no idea why discussion has moved from that to expressing DSL's (which is not really a problem in D) :) My example is a DSL: Person.where(e = e.name == John); -- /Jacob

Re: DIP 50 - AST macros

2013-11-13 Thread Jacob Carlborg
On 2013-11-12 21:36, deadalnix wrote: The thing I'd like to be able to do it to create a async/await/yield like mechanism, purely as library. Please add this as an example to the DIP. -- /Jacob Carlborg

Re: What’s Wrong with OOP and FP

2013-11-13 Thread logicchains
On Wednesday, 13 November 2013 at 07:55:59 UTC, Froglegs wrote: Go is a boring language, kind of like Dart, I guess Google just sucks at language design? The do use an awful lot of Java, perhaps it has caused irreparable damage If you were working in an Enterprise (TM) with coworkers who

Re: DIP 50 - AST macros

2013-11-13 Thread Walter Bright
On 11/13/2013 12:17 AM, Jacob Carlborg wrote: On 2013-11-13 00:26, Walter Bright wrote: It is limiting, but I don't know about extremely limiting. Eric Anderton's regex engine didn't need them. And, if you really do need them, you can always define the templates as regular names:

Re: Gtkd-2

2013-11-13 Thread Marco Leise
Am Wed, 13 Nov 2013 08:35:39 +0100 schrieb Steve Teale steve.te...@britseyeview.com: I'd like to publicly thank and commend Mike Wey for his hard work and perseverance on Gtkd. It is now fully up-to-date with GTK3, and with it and D, writing GUI programs has rarely if ever been easier.

Re: DIP 50 - AST macros

2013-11-13 Thread Jacob Carlborg
On 2013-11-12 22:55, Philippe Sigaud wrote: Which you still have to mixin, btw. Which means any tree manipulation you do must be done at compile-time. Unless, of course, you then put the resulting code into another file, to be compiled and loaded afterwards. It would be at compile time with

Re: DIP 50 - AST macros

2013-11-13 Thread Jacob Carlborg
On 2013-11-12 21:55, Dmitry Olshansky wrote: Actually I couldn't shake off the feeling that macros are just CTFE functions on Ast objects. How objects are created and converted back to source code is a separate question. Yes, and reflection. If we just had: //this would invoke compiler's

Re: DIP 45 - approval discussion

2013-11-13 Thread Jacob Carlborg
On 2013-11-13 01:36, deadalnix wrote: The serialization is a good example. You'll have to note that if the code has been able to serialize the data, it can generate at compile time the necessary scafolding to deserialize it. No, not necessarily. If you serialize an object through a base class

Re: DIP 50 - AST macros

2013-11-13 Thread Walter Bright
On 11/13/2013 12:03 AM, Jacob Carlborg wrote: Again, operator overloading in D is too limiting to implement something Linq like. Ok, let's set aside the opEquals and opCmp issue for the moment. Can AST macros do anything that expression templates cannot?

Re: DIP 45 - approval discussion

2013-11-13 Thread Jacob Carlborg
On 2013-11-12 23:45, Andrei Alexandrescu wrote: It's not quite trivial - somewhere there has to be a map and registration and lookup and whatnot. I don't see it why it's unbecoming for such functionality to be part of the standard library. I would agree, however, that it's a judgment call

Re: Gtkd-2

2013-11-13 Thread growler
On Wednesday, 13 November 2013 at 08:41:27 UTC, Marco Leise wrote: Am Wed, 13 Nov 2013 08:35:39 +0100 schrieb Steve Teale steve.te...@britseyeview.com: I'd like to publicly thank and commend Mike Wey for his hard work and perseverance on Gtkd. It is now fully up-to-date with GTK3, and with

Re: Gtkd-2

2013-11-13 Thread Mike James
Steve Teale steve.te...@britseyeview.com wrote in message news:sbthddptgdozwiivi...@forum.dlang.org... I'd like to publicly thank and commend Mike Wey for his hard work and perseverance on Gtkd. It is now fully up-to-date with GTK3, and with it and D, writing GUI programs has rarely if ever

Re: DIP 45 - approval discussion

2013-11-13 Thread Jacob Carlborg
On 2013-11-13 03:15, Andrei Alexandrescu wrote: Wait, doesn't Object.factory call the default constructor of the created object? Yes, but you use ClassInfo.find and _d_newclass, which is exactly the same thing, except it won't call the constructor. Object.factory uses these functions

Re: What’s Wrong with OOP and FP

2013-11-13 Thread Paulo Pinto
On Wednesday, 13 November 2013 at 08:39:06 UTC, logicchains wrote: On Wednesday, 13 November 2013 at 07:55:59 UTC, Froglegs wrote: Go is a boring language, kind of like Dart, I guess Google just sucks at language design? The do use an awful lot of Java, perhaps it has caused irreparable damage

Re: DIP 50 - AST macros

2013-11-13 Thread dennis luehring
Am 13.11.2013 09:34, schrieb luka8088: What about something like this? class Person { macro where (Context context, Statement statement) { // ... } it is not generic - and that is the biggest goal to reach

Re: Shall I use std.json at my own risks ?

2013-11-13 Thread growler
On Wednesday, 13 November 2013 at 05:26:54 UTC, jean christophe wrote: Hello would you guys say that std.json is a good or bad choice dor a desktop application ? I've read many threads about it on the forum and finally I don't realy know what to do Oo` I need my Gtkd application to

Re: DIP 45 - approval discussion

2013-11-13 Thread Jacob Carlborg
On 2013-11-13 05:07, Andrei Alexandrescu wrote: Then how do you figure doing this: class Streamable { ... } class Foo : Streamable { ... } class Bar : Streamable { ... } string className = stream.readln(); Streamable obj = ...; How do you create obj from className, when className could be

Re: Gtkd-2

2013-11-13 Thread jean christophe
+1 I'm very happy with Gtkd. My config: Debian 7 dmd v2.064 GtkD 2.3.0 On Wednesday, 13 November 2013 at 07:35:41 UTC, Steve Teale wrote: I'd like to publicly thank and commend Mike Wey for his hard work and perseverance on Gtkd. It is now fully up-to-date with GTK3, and with it and D,

Re: obliterate

2013-11-13 Thread Joseph Cassman
On Wednesday, 13 November 2013 at 00:33:17 UTC, Andrei Alexandrescu wrote: * Arrays: some weird length (like 17), and also starting at size_t.max minus the memory occupied by the array. This question probably reflects the fact that I do not know how arrays are implemented by the D runtime.

Re: DIP 50 - AST macros

2013-11-13 Thread Don
On Wednesday, 13 November 2013 at 08:45:13 UTC, Walter Bright wrote: On 11/13/2013 12:03 AM, Jacob Carlborg wrote: Again, operator overloading in D is too limiting to implement something Linq like. Ok, let's set aside the opEquals and opCmp issue for the moment. Can AST macros do anything

Re: What’s Wrong with OOP and FP

2013-11-13 Thread Jonathan M Davis
On Wednesday, November 13, 2013 09:51:33 Paulo Pinto wrote: On Wednesday, 13 November 2013 at 08:39:06 UTC, logicchains wrote: On Wednesday, 13 November 2013 at 07:55:59 UTC, Froglegs wrote: Go is a boring language, kind of like Dart, I guess Google just sucks at language design? The do use

Re: DIP 50 - AST macros

2013-11-13 Thread deadalnix
On Wednesday, 13 November 2013 at 08:45:13 UTC, Walter Bright wrote: On 11/13/2013 12:03 AM, Jacob Carlborg wrote: Again, operator overloading in D is too limiting to implement something Linq like. Ok, let's set aside the opEquals and opCmp issue for the moment. Can AST macros do anything

Re: What’s Wrong with OOP and FP

2013-11-13 Thread eles
On Wednesday, 13 November 2013 at 08:39:06 UTC, logicchains wrote: On Wednesday, 13 November 2013 at 07:55:59 UTC, Froglegs wrote: If you were working in an Enterprise (TM) with coworkers who were potentially competence-challenged, would you want them having access to the power of D's

Re: DIP 45 - approval discussion

2013-11-13 Thread Andrei Alexandrescu
On 11/13/13 12:55 AM, Jacob Carlborg wrote: On 2013-11-13 05:07, Andrei Alexandrescu wrote: Then how do you figure doing this: class Streamable { ... } class Foo : Streamable { ... } class Bar : Streamable { ... } string className = stream.readln(); Streamable obj = ...; How do you create

Re: What’s Wrong with OOP and FP

2013-11-13 Thread Paulo Pinto
On Wednesday, 13 November 2013 at 09:12:40 UTC, Jonathan M Davis wrote: On Wednesday, November 13, 2013 09:51:33 Paulo Pinto wrote: On Wednesday, 13 November 2013 at 08:39:06 UTC, logicchains wrote: On Wednesday, 13 November 2013 at 07:55:59 UTC, Froglegs wrote: Go is a boring language,

Re: obliterate

2013-11-13 Thread qznc
On Wednesday, 13 November 2013 at 00:33:17 UTC, Andrei Alexandrescu wrote: Hello, I will soon get to work on typed allocators; I figured there will be some issues percolating to untyped allocators that will require design changes (hopefully minor). For starters, I want to define a function

Re: DIP 50 - AST macros

2013-11-13 Thread Regan Heath
On Tue, 12 Nov 2013 14:38:43 -, John Colvin john.loughran.col...@gmail.com wrote: On Tuesday, 12 November 2013 at 13:50:49 UTC, Jacob Carlborg wrote: auto person = Person.where(e = e.name == John); Translates to: select * from person where name = 'John' for those of us entirely

Re: What’s Wrong with OOP and FP

2013-11-13 Thread logicchains
On Wednesday, 13 November 2013 at 09:12:40 UTC, Jonathan M Davis wrote: Personally, I have no interest in it and think that its designers made some very poor choices, but that doesn't mean that we should be making fun of it or make fun of Google for being the place where the engineers who

Re: DIP 50 - AST macros

2013-11-13 Thread dennis luehring
Am 13.11.2013 10:58, schrieb Regan Heath: Linq is often confused with LinqToSQL, the above was a description of what happens in the latter. If Person was an object representing a table from a SQL database, then calling 'where' on it would translate into an IQueryablePerson object which when

Re: DIP 50 - AST macros

2013-11-13 Thread Simen Kjærås
On 12.11.2013 18:53, Ellery Newcomer wrote: Place.objects.filter(name=Bob's Cafe) [snip] C. it would look like even worse crap in D (no named parameters!) It's perfectly possible in D to make this work: Place.objects.filter(args.name = Bob, args.state = unemployed); Proof of

Re: DIP 50 - AST macros

2013-11-13 Thread dennis luehring
Am 13.11.2013 11:41, schrieb dennis luehring: Am 13.11.2013 10:58, schrieb Regan Heath: Linq is often confused with LinqToSQL, the above was a description of what happens in the latter. If Person was an object representing a table from a SQL database, then calling 'where' on it would translate

Re: DIP 45 - approval discussion

2013-11-13 Thread Jacob Carlborg
On 2013-11-13 10:27, Andrei Alexandrescu wrote: With Object.factory that's taken care of already. No, you need to register the subclasses as well. The static type information is lost for the subclasses. Again there is a confusion here. The idea was to create an object with the dynamic

Re: Sorting floating-point values, and NaN

2013-11-13 Thread monarch_dodra
On Tuesday, 12 November 2013 at 22:17:10 UTC, Vladimir Panteleev wrote: On Tuesday, 12 November 2013 at 21:15:39 UTC, Andrei Alexandrescu wrote: We can make that work if we insert the tests at the end of a run of equivalent values. I've thought about this as well, but then there are cases

2.064.2 - ddoc now includes types with parameter identifiers

2013-11-13 Thread Gary Willoughby
I'm using ddoc to generate a lot of documentation and i've noticed in the new 2.064.2 version the type is now included with the identifier in parameter lists. Can this be made optional or able to be controlled by a macro? The current parameter identifier macro is this: DDOC_PARAM_ID = $(TD

Re: What’s Wrong with OOP and FP

2013-11-13 Thread eles
On Wednesday, 13 November 2013 at 10:19:34 UTC, logicchains wrote: On Wednesday, 13 November 2013 at 09:12:40 UTC, Jonathan M Davis wrote: struct, then I have to write (*pt).X to access field X of that It is in our guidelines too. I almost never write -.

Re: DIP 50 - AST macros

2013-11-13 Thread Rikki Cattermole
From my point of view this whole idea is great as it makes it easier what is already possible. For example, with current behavior if I wanted to write. foo { writeln(foo); writeln(foo again); } Currently this would be sent as a string. I have suggested previously (given a lexer

Re: What’s Wrong with OOP and FP

2013-11-13 Thread logicchains
On Wednesday, 13 November 2013 at 11:30:14 UTC, eles wrote: On Wednesday, 13 November 2013 at 10:19:34 UTC, logicchains wrote: On Wednesday, 13 November 2013 at 09:12:40 UTC, Jonathan M Davis wrote: struct, then I have to write (*pt).X to access field X of that It is in our guidelines too.

Re: What’s Wrong with OOP and FP

2013-11-13 Thread JN
On Wednesday, 13 November 2013 at 02:54:05 UTC, eles wrote: On Tuesday, 12 November 2013 at 17:59:50 UTC, Paulo Pinto wrote: Am 12.11.2013 17:10, schrieb eles: On Tuesday, 12 November 2013 at 15:35:48 UTC, Dicebot wrote: On Tuesday, 12 November 2013 at 15:27:36 UTC, bearophile wrote: Ali

Re: What’s Wrong with OOP and FP

2013-11-13 Thread Dejan Lekic
On Tuesday, 12 November 2013 at 11:09:24 UTC, Luís Marques wrote: I think you will be pleased with the argument, given D's philosophy: https://yinwang0.wordpress.com/2013/11/09/oop-fp/ Yep, 100% agree. We should use both, and think ahead whether to take first or the second approach to

Re: dirEntries with ** (recursive) globbing

2013-11-13 Thread Timothee Cour
alas, no, I posted on exactly this some times ago: glob is non-recursive in D: http://forum.dlang.org/post/mailman.2367.1382320537.1719.digitalmars-d-le...@puremagic.com Furthermore, it would be very inefficient to filter out results given by recursive dirEntries that match a glob pattern in

Re: DIP 50 - AST macros

2013-11-13 Thread Jacob Carlborg
On 2013-11-13 09:38, Walter Bright wrote: What's special about it was its use of expression templates. It made for a nice demo of how to do such. Is there an actual point in doing that, except a nice exercise in expression templates? -- /Jacob Carlborg

Re: DIP 50 - AST macros

2013-11-13 Thread Jacob Carlborg
On 2013-11-13 09:45, Walter Bright wrote: Ok, let's set aside the opEquals and opCmp issue for the moment. Can AST macros do anything that expression templates cannot? I need to read up on what expression templates can do. -- /Jacob Carlborg

Re: [Poll] On Linux, what should we commonly use as sub-directory name for D?

2013-11-13 Thread Dejan Lekic
On Tuesday, 12 November 2013 at 19:50:32 UTC, Marco Leise wrote: I've seen people use both 'd' and 'dlang' now, so I created a poll. Everyone assembling Linux packages is then free use the results to create a similar experience on all distributions.

Re: dirEntries with ** (recursive) globbing

2013-11-13 Thread Timothee Cour
and this is further compounded by http://d.puremagic.com/issues/show_bug.cgi?id=11501 : dirEntries fails with Failed to stat file when encountering broken symlinks which i posted couple days ago On Wed, Nov 13, 2013 at 4:20 AM, Timothee Cour thelastmamm...@gmail.comwrote: alas, no, I posted on

Re: DIP 50 - AST macros

2013-11-13 Thread Jacob Carlborg
On 2013-11-13 09:34, luka8088 wrote: What about something like this? class Person { macro where (Context context, Statement statement) { // ... } } auto foo = John; auto result = Person.where(e = e.name == foo); // is replaced by auto foo = John; auto result =

Re: Gtkd-2

2013-11-13 Thread Steve Teale
On Wednesday, 13 November 2013 at 07:35:41 UTC, Steve Teale wrote: I'd like to publicly thank and commend Mike Wey for his hard work and perseverance on Gtkd. It is now fully up-to-date with GTK3, and with it and D, writing GUI programs has rarely if ever been easier. If you have not been

Re: DIP 50 - AST macros

2013-11-13 Thread Jacob Carlborg
On 2013-11-13 10:58, Regan Heath wrote: The motivation is the same as for foreach, it is a general syntax for accessing a wide range of containers including databases with a common syntax. We could, equally, go the other way, use the IMO nicer composition syntax X.where(..).foo(...).etc and

Re: DIP 50 - AST macros

2013-11-13 Thread Jacob Carlborg
On 2013-11-13 09:15, luka8088 wrote: I took a look at it as here is my conclusion for now: Statement and attribute macro examples look great. But I don't like Linq example. I don't think code like the following should be allowed. I'm not a fan of the Linq example either. Or rather if I put

Re: What’s Wrong with OOP and FP

2013-11-13 Thread Max Samukha
On Tuesday, 12 November 2013 at 11:09:24 UTC, Luís Marques wrote: I think you will be pleased with the argument, given D's philosophy: https://yinwang0.wordpress.com/2013/11/09/oop-fp/ “functions are also objects”. Yes, they are. http://en.wikipedia.org/wiki/Category_theory

Re: dirEntries with ** (recursive) globbing

2013-11-13 Thread Jacob Carlborg
On 2013-11-13 13:20, Timothee Cour wrote: alas, no, I posted on exactly this some times ago: glob is non-recursive in D: http://forum.dlang.org/post/mailman.2367.1382320537.1719.digitalmars-d-le...@puremagic.com Hmm, right, my bad. -- /Jacob Carlborg

Re: What’s Wrong with OOP and FP

2013-11-13 Thread Dicebot
On Tuesday, 12 November 2013 at 11:09:24 UTC, Luís Marques wrote: I think you will be pleased with the argument, given D's philosophy: https://yinwang0.wordpress.com/2013/11/09/oop-fp/ The thing I don't like with many such pure paradigm languages is not actually the fact that they stick

Re: [Poll] On Linux, what should we commonly use as sub-directory name for D?

2013-11-13 Thread Dicebot
On Wednesday, 13 November 2013 at 04:35:12 UTC, Jesse Phillips wrote: I don't see why we need such sub-directories. The language doesn't seem important to me. I also place the source under /usr/src since they actually aren't headers/import files. Mostly hygiene concerns. One of reasons why

Re: [Poll] On Linux, what should we commonly use as sub-directory name for D?

2013-11-13 Thread Marco Leise
Am Wed, 13 Nov 2013 13:23:17 +0100 schrieb Dejan Lekic dejan.le...@gmail.com: On Tuesday, 12 November 2013 at 19:50:32 UTC, Marco Leise wrote: I've seen people use both 'd' and 'dlang' now, so I created a poll. Everyone assembling Linux packages is then free use the results to create a

Re: Shall I use std.json at my own risks ?

2013-11-13 Thread Dicebot
On Wednesday, 13 November 2013 at 06:13:08 UTC, H. S. Teoh wrote: What's the reason vibe.d's json tools aren't backported to Phobos? It is quite a lot of effort to adjust module to match Phobos guidelines and push it through the review. No one has been motivated enough to do this for stuff

Re: DIP 50 - AST macros

2013-11-13 Thread Jacob Carlborg
On 2013-11-13 12:49, Rikki Cattermole wrote: AST macros currently suggested do not work at the same stage as mixins, as far as I am aware. They work at a much earlier stage. Mixins have limits because of there lateness in lexing process. I think macros would work on the same stage as mixins.

D program code

2013-11-13 Thread Vincent
import std.stdio,std.cstream; void main(string[] args) { int first; int second; write (First Number : ); readf ( %s, first); write (Second Number: ); readf ( %s, second); int result = first + second;

Re: Shall I use std.json at my own risks ?

2013-11-13 Thread Adam D. Ruppe
std.json is ok. If you want a prettier api btw, I wrote a module called jsvar that uses it to provide a D type that is very similar to a javascript var: https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff/blob/master/jsvar.d void main() { import

Re: Applications that created on D Programming

2013-11-13 Thread Vincent
Thanks guys. Its a great help...

Re: D program code

2013-11-13 Thread Adam D. Ruppe
On Wednesday, 13 November 2013 at 14:36:22 UTC, Vincent wrote: it shows the result it will totally exit and I can't see the output. din.getc has something in its buffer already (the newline from when you hit enter after readf - it uses the number but left the line), so it doesn't

Re: D program code

2013-11-13 Thread Jacob Carlborg
On 2013-11-13 15:36, Vincent wrote: Problem: When I run this code why it is automatically exit when it shows the result. It allows me to input first numbers and second number but when it shows the result it will totally exit and I can't see the output. I use D-IDE as my

Re: D program code

2013-11-13 Thread Dicebot
Changing readf ( %s, second); to readf ( %s , second); is likely to fix it (untested). There is a \n symbol left in buffer from last entry (which gets read by `getc`)

Re: What’s Wrong with OOP and FP

2013-11-13 Thread John Colvin
On Wednesday, 13 November 2013 at 12:05:51 UTC, logicchains wrote: On Wednesday, 13 November 2013 at 11:30:14 UTC, eles wrote: On Wednesday, 13 November 2013 at 10:19:34 UTC, logicchains wrote: On Wednesday, 13 November 2013 at 09:12:40 UTC, Jonathan M Davis wrote: struct, then I have to

Re: D program code

2013-11-13 Thread Dejan Lekic
Problem: When I run this code why it is automatically exit when it shows the result. It allows me to input first numbers and second number but when it shows the result it will totally exit and I can't see the output. I use D-IDE as my editor and dmd2 as my compiler. Add

Re: D program code

2013-11-13 Thread John Colvin
On Wednesday, 13 November 2013 at 14:36:22 UTC, Vincent wrote: import std.stdio,std.cstream; void main(string[] args) { int first; int second; write (First Number : ); readf ( %s, first); write (Second Number: ); readf (

Re: DIP 50 - AST macros

2013-11-13 Thread luka8088
On 13.11.2013. 13:26, Jacob Carlborg wrote: On 2013-11-13 09:34, luka8088 wrote: What about something like this? class Person { macro where (Context context, Statement statement) { // ... } } auto foo = John; auto result = Person.where(e = e.name == foo); // is replaced

Re: [Poll] On Linux, what should we commonly use as sub-directory name for D?

2013-11-13 Thread Marco Leise
Am Wed, 13 Nov 2013 14:53:10 +0100 schrieb Dicebot pub...@dicebot.lv: On Wednesday, 13 November 2013 at 04:35:12 UTC, Jesse Phillips wrote: I don't see why we need such sub-directories. The language doesn't seem important to me. I also place the source under /usr/src since they

Re: [Poll] On Linux, what should we commonly use as sub-directory name for D?

2013-11-13 Thread Iain Buclaw
On 13 November 2013 13:53, Dicebot pub...@dicebot.lv wrote: On Wednesday, 13 November 2013 at 04:35:12 UTC, Jesse Phillips wrote: I don't see why we need such sub-directories. The language doesn't seem important to me. I also place the source under /usr/src since they actually aren't

Re: D program code

2013-11-13 Thread Vincent
Sorry sir my post is out of place. But thanks anyway next time I know now where will I post my topic/questions. Thanks for the help sirs...

Re: DIP 50 - AST macros

2013-11-13 Thread Jacob Carlborg
On 2013-11-13 15:47, luka8088 wrote: May/Should I add such example to wiki? Yes, should. Sure, add it to the DIP. -- /Jacob Carlborg

Re: DIP 45 - approval discussion

2013-11-13 Thread Andrei Alexandrescu
On 11/13/13 2:46 AM, Jacob Carlborg wrote: On 2013-11-13 10:27, Andrei Alexandrescu wrote: With Object.factory that's taken care of already. No, you need to register the subclasses as well. The static type information is lost for the subclasses. We are definitely talking about different

Re: What’s Wrong with OOP and FP

2013-11-13 Thread Andrei Alexandrescu
On 11/13/13 4:05 AM, logicchains wrote: On Wednesday, 13 November 2013 at 11:30:14 UTC, eles wrote: On Wednesday, 13 November 2013 at 10:19:34 UTC, logicchains wrote: On Wednesday, 13 November 2013 at 09:12:40 UTC, Jonathan M Davis wrote: struct, then I have to write (*pt).X to access field

Re: DIP 45 - approval discussion

2013-11-13 Thread Andrei Alexandrescu
On 11/13/13 2:46 AM, Jacob Carlborg wrote: Here is an excerpt of my serialization library, with the relevant code for this discussion: [snip] To drive the point home: I looked once more over the code and I think it's too complicated for what it does. It could be improved as follows. The key

[OT] Re: DIP 50 - AST macros

2013-11-13 Thread Chris Nicholson-Sauls
On Wednesday, 13 November 2013 at 08:26:52 UTC, Jacob Carlborg wrote: I'm using a pluign to Ruby on Rails that does something similar but by overloading operators. The problem with this approach, in Ruby, is that you cannot overload operators like || and , so instead they overload | and

Improving deprecation management

2013-11-13 Thread Dicebot
There is one thing that seems really inconvenient to me but I'd like to see community opinion before writing a DIP :) It is all about current semantics of deprecated attribute. Right now using deprecated symbols is a warning. And if you use -w switch (like most pedantic projects do) it is an

Re: obliterate

2013-11-13 Thread Dmitry Olshansky
13-Nov-2013 04:33, Andrei Alexandrescu пишет: Hello, [snip] Here's what I'm thinking. First, obliterate calls the destructor if present and then writes the fields as follows: * unsigned integers: t.max / 2 * signed integers: t.min / 2 * characters: ? As Vladimir said: 0xFF for char

Re: What’s Wrong with OOP and FP

2013-11-13 Thread deadalnix
On Wednesday, 13 November 2013 at 12:05:51 UTC, logicchains wrote: On Wednesday, 13 November 2013 at 11:30:14 UTC, eles wrote: On Wednesday, 13 November 2013 at 10:19:34 UTC, logicchains wrote: On Wednesday, 13 November 2013 at 09:12:40 UTC, Jonathan M Davis wrote: struct, then I have to

Re: obliterate

2013-11-13 Thread Andrei Alexandrescu
On 11/13/13 10:18 AM, Dmitry Olshansky wrote: As Vladimir said: 0xFF for char 0x for wchar 0x10_ for dchar Alternatives for w/dchar : all in range of 0xFDD0-0xFDEF 0xFFFE and 0x 0x1FFFE and 0x1 0x2FFFE and 0x2 and so on, up to 0x10FFFE and 0x10 Relevant passage from the

Re: D program code

2013-11-13 Thread bachmeier
On Wednesday, 13 November 2013 at 14:45:52 UTC, John Colvin wrote: On Wednesday, 13 November 2013 at 14:36:22 UTC, Vincent wrote: import std.stdio,std.cstream; void main(string[] args) { int first; int second; write (First Number : ); readf ( %s,

Re: DIP 45 - approval discussion

2013-11-13 Thread Dmitry Olshansky
13-Nov-2013 13:27, Andrei Alexandrescu пишет: On 11/13/13 12:55 AM, Jacob Carlborg wrote: On 2013-11-13 05:07, Andrei Alexandrescu wrote: Then how do you figure doing this: class Streamable { ... } class Foo : Streamable { ... } class Bar : Streamable { ... } string className =

Re: DIP 45 - approval discussion

2013-11-13 Thread Andrei Alexandrescu
On 11/13/13 10:41 AM, Dmitry Olshansky wrote: 13-Nov-2013 13:27, Andrei Alexandrescu пишет: On 11/13/13 12:55 AM, Jacob Carlborg wrote: On 2013-11-13 05:07, Andrei Alexandrescu wrote: Then how do you figure doing this: class Streamable { ... } class Foo : Streamable { ... } class Bar :

Re: D program code

2013-11-13 Thread Adam D. Ruppe
On Wednesday, 13 November 2013 at 18:39:59 UTC, bachmeier wrote: This wouldn't happen so often if digitalmars.D.learn appeared at the top of the page. amen, it is so far down that sometimes i forget about it!

  1   2   3   >