Re: Pyd updates

2018-06-03 Thread ROB via Digitalmars-d
On Wednesday, 12 July 2006 at 23:35:55 UTC, Kirk McDonald wrote: If anyone's interested, I just did some fairly major refactoring of how Pyd wraps functions. I've essentially written my own tuple/metaprogramming library. (Well, at least a limited one.) I'm not sure if the new code is any shorte

Re: Multicast support within std.socket

2013-12-17 Thread Rob T
On Tuesday, 17 December 2013 at 21:21:09 UTC, Evan Davis wrote: Hello all, I've been looking into how to create a multicast packet using std.socket, and I found that std.socket doesn't support the socket option IP_ADD_MEMBERSHIP. Should I be using IPv6 for all of my multicast needs? -Evan D

Re: Inherent code performance advantages of D over C?

2013-12-06 Thread Rob T
On Saturday, 7 December 2013 at 00:40:52 UTC, Manu wrote: Assuming a comparison to C++, you know perfectly well that D has a severe disadvantage. Unless people micro-manage final (I've never seen anyone do this to date), then classes will have significantly inferior performance to C++. C++ cod

Re: DIP 50 - AST macros

2013-11-17 Thread Rob T
Walter, what do you think about allowing mixins to work with parameter list construction? Currently you cannot generate code unless it is syntactically complete on its own, this disallows parameter list construction even for syntactically correct parameter lists. The other failure point of

Re: Look and think good things about D

2013-11-14 Thread Rob T
On Friday, 15 November 2013 at 01:09:53 UTC, bearophile wrote: I have created two interesting D entries for this Rosettacode Task, is someone willing to create a Reddit entry for this? They show very different kinds of code in D. http://rosettacode.org/wiki/Look-and-say_sequence#D Bye, bearop

Re: Build Master: Scheduling

2013-11-14 Thread Rob T
On Thursday, 14 November 2013 at 20:30:40 UTC, Dicebot wrote: On Thursday, 14 November 2013 at 20:27:23 UTC, Rob T wrote: Bug fixes should be as frequent as possible. To understand why, just try and find a good reason to artificially hold back a bug fix. Code breakage. DMD has good amount of

Re: Build Master: Scheduling

2013-11-14 Thread Rob T
On Thursday, 14 November 2013 at 00:37:38 UTC, Tyro[17] wrote: [...] Your thoughts and concerns please. Please do not mix together bugs fix releases with enhancement/new addition releases, those represent two different types of release that serve two entirely different purposes. Bug fixes s

Re: DIP 50 - AST macros

2013-11-14 Thread Rob T
On Thursday, 14 November 2013 at 18:23:20 UTC, Andrei Alexandrescu wrote: [...] Natural languages are "humans complete" because they are the one vehicle we use to describe and manipulate our understanding of the entire reality. If configurable syntax was something necessary to model the worl

Re: DIP 50 - AST macros

2013-11-13 Thread Rob T
On Wednesday, 13 November 2013 at 12:21:22 UTC, Jacob Carlborg wrote: I need to read up on what expression templates can do. But where to read? There's no such thing as "expression template" explicitly mentioned in here. http://dlang.org/template.html --rt

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

2013-11-12 Thread Rob T
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 maintain

Re: C++ namespace support (@Walter)

2013-11-12 Thread Rob T
On Thursday, 7 November 2013 at 16:17:35 UTC, Dejan Lekic wrote: After a year and a half ( https://d.puremagic.com/issues/show_bug.cgi?id=7961 ) I have to remind Walter and Co. about this enhancement request. :) This is becoming increasingly important not just to me, but to the D community in

Re: Why the @ in @safe? & UDAs

2013-11-12 Thread Rob T
thing instead of a bad thing. --rt On Monday, 11 November 2013 at 00:13:34 UTC, Jonathan M Davis wrote: On Monday, November 11, 2013 00:39:04 Rob T wrote: On Sunday, 10 November 2013 at 23:08:11 UTC, Nick wrote: > The alternative is to slowly build up a menagerie of quirks > that pu

Re: DIP 50 - AST macros

2013-11-12 Thread Rob T
On Tuesday, 12 November 2013 at 11:06:17 UTC, Don wrote: On Tuesday, 12 November 2013 at 09:55:20 UTC, Walter Bright wrote: I forgot to mention that "expression templates" can be used in D in an equivalent manner that they are used in C++, They are crippled compared to C++, because you have no

Re: DIP 50 - AST macros

2013-11-11 Thread Rob T
On Tuesday, 12 November 2013 at 02:37:03 UTC, Andrei Alexandrescu wrote: On 11/10/13 11:46 PM, Jacob Carlborg wrote: On 2013-11-11 02:46, bearophile wrote: It's also useful to take a look at what F# is doing: http://tomasp.net/blog/2013/computation-zoo-padl/index.html I'll do that. I've been

Re: DIP 50 - AST macros

2013-11-10 Thread Rob T
On Sunday, 10 November 2013 at 22:33:34 UTC, bearophile wrote: Jacob Carlborg: http://wiki.dlang.org/DIP50 I suggest to add some more use cases (possibly with their implementation). Bye, bearophile A scalable and elegant solution to the "inspection" problem may be a AST use case. Disc

Re: Why the @ in @safe? & UDAs

2013-11-10 Thread Rob T
On Sunday, 10 November 2013 at 23:08:11 UTC, Nick wrote: The alternative is to slowly build up a menagerie of quirks that put us on the same path as C++. It seems that a buildup of quirks is underway as is evidenced by this discussion. The other solution is to at some point place a freeze on

Re: dmd 2.065 - Agenda

2013-11-08 Thread Rob T
On Friday, 8 November 2013 at 20:09:57 UTC, Martin Nowak wrote: I made a wiki page for that. Please discuss, improve and prioritize. http://wiki.dlang.org/Agenda Update the processes so that there's a public beta release rather than only an "insider" beta release to better smooth things out.

Re: Why the @ in @safe? & UDAs

2013-11-07 Thread Rob T
On Thursday, 7 November 2013 at 15:55:47 UTC, Jonathan M Davis wrote: [..] Then should public and private be @public and @private in order to be consistent? Then we'd be inconsistent with C++, Java, C# etc. which would make it that much harder for folks to learn D. Would you want @static and @

Re: Why the @ in @safe? & UDAs

2013-11-06 Thread Rob T
And gain what? You force everyone to change their code for essentially zero benefit. - Jonathan M Davis It's not zero benefit, although it may seem like that over a small period of time, it's over an extended period that inconsistencies can become a very significant cause of productivity

Re: Experiments with emscripten and D

2013-08-17 Thread Rob T
On Saturday, 17 August 2013 at 14:42:19 UTC, Gambler wrote: Every time I do, I get the urge to abandon programming and change my occupation. My thoughts too, The Internet is ripe for another revolution, but the old ways need to be abandoned rather than continually propped up with duct tape a

Re: Recommendation for a D build system

2013-07-24 Thread Rob T
On Wednesday, 24 July 2013 at 12:24:26 UTC, Luís Marques wrote: I have some old D code and I wanted to improve its build system: that code was using a .bat and shell script with dmd, manually listing all the .d files to be linked! Don't ask me why I didn't use at least a Makefile, I don't recal

Re: D roadmap?

2013-07-21 Thread Rob T
On Sunday, 21 July 2013 at 17:07:56 UTC, Suliman wrote: Do team have any roadmap for D? I mean Language + standard lib. There are the DIP's, which are not exactly a raodmap, but at least can give you a sense of what the outstanding issues are and what the possible solutions may be. http://w

Re: DMD spellchecker

2013-07-17 Thread Rob T
On Wednesday, 17 July 2013 at 18:47:47 UTC, Martin Nowak wrote: On 07/17/2013 01:06 AM, Rob T wrote: A colleague of mine who has started coding in D sent me an email to say how impressed he is by the spell checker in the compiler. I've been making frequent use out of the spell checke

DMD spellchecker

2013-07-16 Thread Rob T
A colleague of mine who has started coding in D sent me an email to say how impressed he is by the spell checker in the compiler. I've been making frequent use out of the spell checker too, and appreciate this incredibly simple innovation. The point I'd like to make is that that sometimes sim

Re: Current version of D.

2013-07-14 Thread Rob T
On Saturday, 13 July 2013 at 15:20:44 UTC, Russel Winder wrote: Well most people use X.Y.Z-alpha-N for bleeding edge releases, X.Y.Z-beta-N for getting close to a release, X.Y.Z-RC-N for actual release candidates, the last of which becomes the release simply by relabelling to X.Y.Z without any

Re: Current version of D.

2013-07-10 Thread Rob T
On Wednesday, 10 July 2013 at 04:15:12 UTC, Kapps wrote: The download page has the wrong link, it doesn't seem to have been updated for 2.063.2. Can just manually add a .2 at the end, such as http://downloads.dlang.org/releases/2013/dmd.2.063.2.zip Thanks, that worked. Yup the download page

Re: Current version of D.

2013-07-09 Thread Rob T
On Tuesday, 9 July 2013 at 22:46:36 UTC, Tyro[17] wrote: On 7/9/13 6:36 PM, Rob T wrote: On Tuesday, 9 July 2013 at 22:34:18 UTC, Rob T wrote: Agreed, however we should also have a pre-release package for testing that is clearly marked as a pre-release, it can go on a separate web page to

Re: Current version of D.

2013-07-09 Thread Rob T
On Tuesday, 9 July 2013 at 22:34:18 UTC, Rob T wrote: Agreed, however we should also have a pre-release package for testing that is clearly marked as a pre-release, it can go on a separate web page to avoid any possibility of confusion. The current release is showing as both 2.63.0 and

Re: Current version of D.

2013-07-09 Thread Rob T
On Sunday, 7 July 2013 at 07:36:41 UTC, Russel Winder wrote: On Sat, 2013-07-06 at 15:24 +0200, mike james wrote: > The current release is 2.063.2, but it's the first time that > we've actually > released point releases like that, so there are likely to be > places saying > 2.063 instead of 2.

Re: Ć Programming Language - Compile C# subset to C, Java, C#, JS, AS, Perl and D

2013-06-17 Thread Rob T
On Monday, 17 June 2013 at 23:24:28 UTC, Walter Bright wrote: Why not try it on your machine and report what the autocomplete says? Through secure Tor network with no history on my end anyway, I typed as far as "d pr" and "d programming" showed up as the second item in the list, so I would

2.063.2 released, but no announcement

2013-06-17 Thread Rob T
I'm wondering why there is no announcement in the announce group about this? It's actually a major event considering this is the first time there's been a minor bug fix release of dmd following a major release ... or did I somehow miss it? --rt

Re: Ć Programming Language - Compile C# subset to C, Java, C#, JS, AS, Perl and D

2013-06-17 Thread Rob T
On Monday, 17 June 2013 at 21:33:20 UTC, Walter Bright wrote: I tried it on a machine I never use google on, and I got the same autocomplete results. Your complete historical profile is stored on Google's servers, not the individual machine. Did you log into Google, or use the same IP, or any

Re: Ć Programming Language - Compile C# subset to C, Java, C#, JS, AS, Perl and D

2013-06-17 Thread Rob T
On Monday, 17 June 2013 at 18:12:12 UTC, Walter Bright wrote: On 6/17/2013 6:53 AM, Aleksandar Ruzicic wrote: Oh, on second read I see you were talking about autocomplete box. I've disabled that feature long ago.. I like the autocomplete box. I use it as a spell checker :-) Anyhow, I think t

Re: Ć Programming Language - Compile C# subset to C, Java, C#, JS, AS, Perl and D

2013-06-16 Thread Rob T
On Monday, 17 June 2013 at 01:29:19 UTC, Walter Bright wrote: http://www.reddit.com/r/programming/comments/1gfk15/ć_programming_language_compile_c_subset_to_c_java/ Unfortunately the choice of ć as the name dominates much of the reddit discussion. I just had to mention it, because I too thoug

Re: Slow performance compared to C++, ideas?

2013-06-09 Thread Rob T
On Sunday, 9 June 2013 at 06:03:14 UTC, Manu wrote: I'm here, and interested in D due mainly to it's immediate familiarity, as opposed to others like Rust for instance. I can actually envision a migration. It seems like it's possible... one step at a time. ...it's also compiled and binary compa

Re: Slow performance compared to C++, ideas?

2013-06-07 Thread Rob T
On Friday, 7 June 2013 at 22:57:01 UTC, Walter Bright wrote: On 6/7/2013 9:51 AM, Rob T wrote: If D had a compiler option switch to collect statistics on feature usage, maybe you could get something a lot better than a guess for both 1 and 2. And then you'd have to convince people to u

Re: Slow performance compared to C++, ideas?

2013-06-07 Thread Rob T
On Friday, 7 June 2013 at 07:22:18 UTC, Walter Bright wrote: A pretty good metric of some feature being used is the frequency it comes up in discussion here and the action it sees in bugzilla. There are two obvious reasons why a feature would not have much buzz: 1. it works perfectly 2. i

Re: Slow performance compared to C++, ideas?

2013-06-06 Thread Rob T
On Thursday, 6 June 2013 at 15:40:26 UTC, Joseph Rushton Wakeling wrote: I see a potential problem with allowing 'final' on its own to mean 'final and non-overriding', which is that if you _mean_ to override a function in the base class, but put simply 'final' and not 'override', it will still

Re: Slow performance compared to C++, ideas?

2013-06-05 Thread Rob T
On Thursday, 6 June 2013 at 05:19:32 UTC, H. S. Teoh wrote: 1. 'virtual' means a method is an "introducing" one. 2. 'override' means override with a non-final function. 3. 'final override' means a method overrides a base virtual function with a final function. 4. 'final' by itself both mean fin

Re: Slow performance compared to C++, ideas?

2013-06-05 Thread Rob T
On Thursday, 6 June 2013 at 01:14:23 UTC, Jonathan M Davis wrote: I would have expected something more like 1. 'virtual' means a method is an "introducing" one. 2. 'override' means override with a non-final function. 3. 'final override' means a method overrides a base virtual function with a f

Re: DMD 2.063 produces broken binaries

2013-06-04 Thread Rob T
On Tuesday, 4 June 2013 at 18:03:53 UTC, Jerry wrote: Hi folks, I've downloaded the current dmd 2.063 zip and tried it out. This is Ubuntu 12.10 x86_64. Every program I compile segfaults when I try to run it. As a simple example: jlquinn@wyvern:~/re/test$ cat junk.d import std.stdio; void

Re: Slow performance compared to C++, ideas?

2013-06-04 Thread Rob T
On Tuesday, 4 June 2013 at 07:33:04 UTC, Dicebot wrote: On Tuesday, 4 June 2013 at 05:41:16 UTC, Rob T wrote: Structs would IMO be far more useful if they had inheritance. Inheritence can be fully removed from the rest of polymorphism, so there's no reason why structs which ar

Re: Slow performance compared to C++, ideas?

2013-06-04 Thread Rob T
On Tuesday, 4 June 2013 at 05:58:30 UTC, Andrei Alexandrescu wrote: On 6/4/13 1:41 AM, Rob T wrote: Structs would IMO be far more useful if they had inheritance. We do offer subtyping via alias this. Andrei Yeah, I saw that method described in another thread. The technique is not even

Re: Slow performance compared to C++, ideas?

2013-06-03 Thread Rob T
Manu, I'm wondering that perhaps you should not be using classes at all. You can still create a similar overridable scheme for struct methods, and although it may not be as convenient, it will work. However a big failure point with stucts is the lack of inheritance. Structs would IMO be far m

Re: Rust moving away from GC into reference counting

2013-06-03 Thread Rob T
On Monday, 3 June 2013 at 16:01:29 UTC, H. S. Teoh wrote: C++11 deprecated auto_ptr in favor of unique_ptr, but it's basically the same concept, and it works very well in cases where you prefer to manage your own memory. D should have the same thing in the std lib, it's not difficult to implem

Re: hello world in D

2013-06-01 Thread Rob T
On Friday, 31 May 2013 at 14:33:48 UTC, khurshid wrote: I just download dmd 2.063, and compile simple "hello world" program: // hello.d import std.stdio; int main() { writeln("hello world"); return 0; } with -O -release -inline -noboundscheck flags. And size of result output file '

Re: Labels as values and threaded-code interpretation

2013-06-01 Thread Rob T
On Saturday, 1 June 2013 at 16:23:11 UTC, Adam D. Ruppe wrote: On Saturday, 1 June 2013 at 16:13:18 UTC, Timon Gehr wrote: I'd also like to see this. Me too. Last time this came up I said no since there's some inline asm hacks you can do but turns out those hacks suck in capability and appea

Re: hello world in D

2013-05-31 Thread Rob T
On Friday, 31 May 2013 at 16:52:53 UTC, Jonathan M Davis wrote: On Friday, May 31, 2013 18:05:16 Rob T wrote: I've seen this happen with 2.062, if you take out -noboundscheck it may reduce the size significantly and compile a lot faster. Makes no sense. My first guess would be that more

Re: The stately := operator feature proposal

2013-05-31 Thread Rob T
The := syntax looks just like the += *= ~= syntax, which has completely different meanings, so for some people it will only serve to confuse them more than they already are. BTW D does have instances of multiple ways of doing the same things. Eg private: int x = 1; private int x = 1; p

Re: hello world in D

2013-05-31 Thread Rob T
I've seen this happen with 2.062, if you take out -noboundscheck it may reduce the size significantly and compile a lot faster. Makes no sense. --rt

Re: Slow performance compared to C++, ideas?

2013-05-30 Thread Rob T
I don't know if this is the case with the code in question (I have not looked at it), but sometimes there will be a significant effect on performance caused by the use of the garbage collector. This is an area in need of radical improvements. You have to minimize situations where there's a lot

Re: I was wrong

2013-05-30 Thread Rob T
On Thursday, 30 May 2013 at 18:06:03 UTC, Walter Bright wrote: about the changelog. Andrej Mitrovic has done a super awesome job with the changelog, and it is paying off big time. I am very happy to be proven wrong about it. Yes, this sort of improvement should never ever be underestimated f

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Rob T
I really don't understand the reasoning for not removing as many known sources of bugs as is reasonably possible *provided* that doing so makes the situation incrementally better (rather than worse or to no effect). So will introducing non-nullable references make things worse or have no prac

Re: D on next-gen consoles and for game development

2013-05-24 Thread Rob T
On Thursday, 23 May 2013 at 18:13:17 UTC, Brad Anderson wrote: @nogc comes to mind (I believe Andrei mentioned it during one of the talks released). [1][2] I would love to have something like @nogc to guarantee there's no hidden or misplaced allocations in a section of code or optionally

Re: The liabilities of binding rvalues to ref

2013-05-09 Thread Rob T
On Thursday, 9 May 2013 at 22:42:14 UTC, Manu wrote: And it's even questionable that scope as originally intended can be properly implemented anyway. ...so, the problem is no different than 'auto ref' as you mention above. It's not implemented as drafted, and we're debating what's actually

Re: The liabilities of binding rvalues to ref

2013-05-09 Thread Rob T
On Thursday, 9 May 2013 at 21:55:51 UTC, Manu wrote: Umm, what if the non-template counterpart returns ref? Then it doesn't behave the same. Yes, the non-template version cannot ref return an auto ref param, but I would expect that neither can the template version unless auto ref is specifie

Re: The liabilities of binding rvalues to ref

2013-05-09 Thread Rob T
On Thursday, 9 May 2013 at 19:43:25 UTC, Andrei Alexandrescu wrote: On 5/9/13 3:39 PM, Rob T wrote: So, if I understand correctly, auto ref for templates will end up doing exactly the same thing as auto ref for non-template functions? That would be perfect, otherwise it'll be ter

Re: The liabilities of binding rvalues to ref

2013-05-09 Thread Rob T
On Thursday, 9 May 2013 at 19:26:37 UTC, Jonathan M Davis wrote: On Thursday, May 09, 2013 19:45:16 Peter Alexander wrote: It seems that 'auto ref' would be suitable, provided we can find a way for it to work with normal functions (in a sensible way, not like templates). That's trivial enough

Re: Object.factory() and module name

2013-05-09 Thread Rob T
On Friday, 26 April 2013 at 16:13:44 UTC, Luís Marques wrote: BTW, I was working on a Object.factory scenario right now (!) and stumbled on the limitation that the class can only have a default constructor. Couldn't you call a non-default constructor by passing var args to Object.factory()? I

Re: Rvalue references - The resolution

2013-05-06 Thread Rob T
On Monday, 6 May 2013 at 14:05:48 UTC, Andrei Alexandrescu wrote: template const T& min(const T& a, const T& b) { return b < a ? b : a; } ... int x = ...; auto & weird = min(x, 100); What I see going on is an attempt to double up on the use of ref for twp conflicting purposes. Perhaps pa

Re: A due celebration

2013-05-03 Thread Rob T
On Saturday, 27 April 2013 at 22:32:14 UTC, H. S. Teoh wrote: Vladimir Panteleev's dustmite really helps here. It's really simple to use, too. https://github.com/CyberShadow/DustMite T Hey, tks for the tip about dustmite, it looks very useful! --rt

Re: DConf 2013 last talk

2013-05-03 Thread Rob T
On Friday, 3 May 2013 at 17:27:39 UTC, Andrei Alexandrescu wrote: On 5/2/13 9:10 PM, d coder wrote: And another one. I am working on an embedded DSL on top of D Language. I am using compile time parser ctpg https://github.com/youkei/ctpg for some syntax parsing. It works great, expect for memor

Re: 1 matches bool, 2 matches long

2013-04-30 Thread Rob T
On Tuesday, 30 April 2013 at 14:47:14 UTC, Steven Schveighoffer wrote: Yes, just like it's better matching to long than string. -Steve More precise language is to state that there is no "better match" and long should simply not ever match with bool because long is not the same thing as bool

Re: 1 matches bool, 2 matches long

2013-04-29 Thread Rob T
On Sunday, 28 April 2013 at 13:38:53 UTC, Andrei Alexandrescu wrote: [...] If enough differences accumulate to make bool quite a different type from a regular integral, then the matter of overloading with long, conversion from literals 1 and 0 etc. may be reopened. Even then, it would be a dif

Re: 1 matches bool, 2 matches long

2013-04-29 Thread Rob T
On Monday, 29 April 2013 at 14:08:20 UTC, Mike James wrote: gdc: bool x = false; x++; main.d:50: Error: operation not allowed on bool 'x' why not? is just an integer after all. another special case? If you are going to create a boolean then use it as a boolean - it's not an integer any more

Re: 1 matches bool, 2 matches long

2013-04-28 Thread Rob T
On Sunday, 28 April 2013 at 09:05:06 UTC, deadalnix wrote: On Saturday, 27 April 2013 at 21:52:30 UTC, Walter Bright wrote: On 4/27/2013 2:29 PM, Rob T wrote: If bools are 1 bit ints, then why do we have 'true' and 'false' as keywords? Because writing cast(bool)

Re: 1 matches bool, 2 matches long

2013-04-27 Thread Rob T
On Saturday, 27 April 2013 at 21:52:30 UTC, Walter Bright wrote: On 4/27/2013 2:29 PM, Rob T wrote: If bools are 1 bit ints, then why do we have 'true' and 'false' as keywords? Because writing cast(bool)0 and cast(bool)1 is unappealing. That cannot be the main reason.

Re: 1 matches bool, 2 matches long

2013-04-27 Thread Rob T
On Saturday, 27 April 2013 at 21:59:50 UTC, eles wrote: On Saturday, 27 April 2013 at 21:52:30 UTC, Walter Bright wrote: On 4/27/2013 2:29 PM, Rob T wrote: Because writing cast(bool)0 and cast(bool)1 is unappealing. why need to write that? just drop the bool type entirely and go ahead with

Re: A due celebration

2013-04-27 Thread Rob T
On Saturday, 27 April 2013 at 21:17:42 UTC, bearophile wrote: I invite everybody to not just patch around the problems you see in your D code, but to reduce and report the issues, I report what I can, and I'd like to say I have been impressed with seeing these bugs get fixed quickly. Reasonabl

Re: 1 matches bool, 2 matches long

2013-04-27 Thread Rob T
On Saturday, 27 April 2013 at 19:51:48 UTC, Walter Bright wrote: An analogous issue comes up here now and then about 'char' and characters. Are chars an 8 byte integer, or are they characters, or are they octets, or should access only be allowed to multibyte characters as an indivisible code po

Re: 1 matches bool, 2 matches long

2013-04-27 Thread Rob T
On Saturday, 27 April 2013 at 20:31:15 UTC, Mehrdad wrote: The problem is 'bool' has *NOTHING* in common with integers! - Can't use + - * / << >> on bool's Because currently D views booleans as a 1 bit int, you can do seemingly nonsensical things with the bool type bool b = false + true; //

Re: 1 matches bool, 2 matches long

2013-04-26 Thread Rob T
On Saturday, 27 April 2013 at 01:37:22 UTC, deadalnix wrote: On Friday, 26 April 2013 at 19:22:51 UTC, Walter Bright wrote: I remember once a language that tried to define true and false as something other than 1 and 0. It was horrible. Don't need to look far away. Most shell do that. D can

Re: 1 matches bool, 2 matches long

2013-04-26 Thread Rob T
On Friday, 26 April 2013 at 21:37:14 UTC, Walter Bright wrote: On 4/26/2013 1:59 PM, Andrej Mitrovic wrote: On 4/26/13, Andrej Mitrovic wrote: An even better example: import std.stdio; void foo(bool x) { writeln("1"); } void foo(long x) { writeln("2"); } void main() { foo(1); // "1"

Re: 1 matches bool, 2 matches long

2013-04-26 Thread Rob T
On Friday, 26 April 2013 at 19:37:48 UTC, Jonathan M Davis wrote: The main place where casting would be annoying - if conditions and loop conditions - already insert an explicit cast underneat the hood. IMO it still makes no sense to have the implicit casting done in conditional statements be

Re: Object.factory() and module name

2013-04-26 Thread Rob T
On Friday, 26 April 2013 at 15:36:32 UTC, eles wrote: On Friday, 26 April 2013 at 15:34:01 UTC, eles wrote: Alternatively, a function/variable could be provided inside the module, returning the module name as a string, so that one could write: Object.factory(__MODULE__, ".Human"); I believ

Re: 1 matches bool, 2 matches long

2013-04-26 Thread Rob T
On Friday, 26 April 2013 at 08:03:14 UTC, Walter Bright wrote: On 4/25/2013 11:16 PM, deadalnix wrote: This "feature" never has been useful to me. It has been useful to me. So there! If you want an int to behave like a bool, then by all means go ahead and write the code yourself, I don't w

Re: *trying* to starting using D

2013-04-19 Thread Rob T
On Saturday, 20 April 2013 at 00:44:20 UTC, Diggory wrote: Ah I didn't see that board, could a moderator move this please? This forum is actually a news group run through the nntp system and as such there's no moderator and no way to move a thread. Your best bet for answers it to repost in d

Re: *trying* to starting using D

2013-04-19 Thread Rob T
On Friday, 19 April 2013 at 23:40:58 UTC, Diggory wrote: I found the opengl bindings in "derelict" but that has too many dependencies for my liking. The dsource website confuses people new to D, it's not maintained anymore and applies to the D1 era. For some reason it just won't go away.

Re: Attribute inference for auto functions?

2013-04-17 Thread Rob T
On Wednesday, 17 April 2013 at 16:10:02 UTC, deadalnix wrote: On Wednesday, 17 April 2013 at 12:22:21 UTC, Peter Alexander wrote: On Wednesday, 17 April 2013 at 07:58:42 UTC, deadalnix wrote: auto is about type inference. Attribute is part of the function type as much as it return type, and so

Re: Attribute inference for auto functions?

2013-04-17 Thread Rob T
On Wednesday, 17 April 2013 at 13:59:05 UTC, Peter Alexander wrote: [...] If you want type inference then you just need to use: const foo(); And yes, it is by design. The spec is quite clear on this issue. Type inference is signalled by lack of return type -- not the presence of auto. auto

Re: Disable GC entirely

2013-04-11 Thread Rob T
On Thursday, 11 April 2013 at 04:23:07 UTC, xenon325 wrote: On Wednesday, 10 April 2013 at 16:08:53 UTC, Andrei Alexandrescu wrote: It may as well be a mistake that nonvirtual functions are at all part of a class' methods. This has been quite painfully seen in C++ leading to surprising conclusi

Re: State of the forum

2013-04-10 Thread Rob T
On Wednesday, 10 April 2013 at 17:01:36 UTC, Vladimir Panteleev wrote: On Wednesday, 10 April 2013 at 16:25:03 UTC, ixid wrote: The forum has a number of issues, is there anything practical that can be done to address them? A forum should really work. I was doing some maintenance around the ti

Re: Disable GC entirely

2013-04-10 Thread Rob T
On Wednesday, 10 April 2013 at 22:02:09 UTC, Nick Sabalausky wrote: I have noticed that programming and videogames both scratch the same mental itch, at least for me. If I've been doing a lot of one, I'm less motivated to do the other. I recently reached that exact same conclusion too, but

Re: Disable GC entirely

2013-04-10 Thread Rob T
On Wednesday, 10 April 2013 at 21:33:52 UTC, Jeff Nowakowski wrote: On 04/10/2013 04:44 PM, Andrei Alexandrescu wrote: FWIW there's this Neal Stephenson novel "Diamond Age" taking place in the future. That book's vision is that all modern movies are "ractive" (short from "interactive") using

Re: Disable GC entirely

2013-04-10 Thread Rob T
On Wednesday, 10 April 2013 at 06:03:08 UTC, Manu wrote: Can you demonstrate a high level class, ie, not a primitive tool, but the sort of thing a programmer would write in their daily work where all/most functions would be virtual? I can paste almost any class I've ever written, there is usua

Re: Disable GC entirely

2013-04-09 Thread Rob T
On Wednesday, 10 April 2013 at 04:32:52 UTC, Manu wrote: moments, and give the collect function a maximum timeout where it will yield, and then resume where it left off next time I call it. Maximum collect period is perhaps the most significant missing feature of all. Having that alone would

Re: Disable GC entirely

2013-04-09 Thread Rob T
On Wednesday, 10 April 2013 at 04:32:52 UTC, Manu wrote: final on the class means you can't derive it anymore (what's the point of a class?), I think that you'd place final on a derived class, not a base class. So it can make perfect sense, although final on the methods of a final class make

Re: Disable GC entirely

2013-04-09 Thread Rob T
On Tuesday, 9 April 2013 at 18:38:55 UTC, Dmitry Olshansky wrote: [...] All of this should be CUSTOMIZABLE and DECOUPLED! Give people the frigging control over the OOP breed they want to use. Providing people a toolkit not a one-button black box (and that button keeps getting stuck!) would b

Re: Disable GC entirely

2013-04-09 Thread Rob T
On Tuesday, 9 April 2013 at 16:49:04 UTC, Manu wrote: final class Foo{ //no inheritance final: //no virtuals ... } 2 extra words and you are done. The only problem I see is that there is no way to "undo" final on a few methods later... final class Foo { final //no virtuals { .

Re: Disable GC entirely

2013-04-08 Thread Rob T
On Monday, 8 April 2013 at 08:21:06 UTC, Manu wrote: The C++ state hasn't changed though. We still avoid virtual calls like the plague. One of my biggest design gripes with D, hands down, is that functions are virtual by default. I believe this is a critical mistake, and the biggest one in

Re: Disable GC entirely

2013-04-07 Thread Rob T
On Sunday, 7 April 2013 at 09:41:21 UTC, Dicebot wrote: [...] applications situation is pretty acceptable right now. Well, it will be, once easy way to track accidental gc_malloc calls is added. That's the critical missing piece of the puzzle. In effect we need to be able to use a sub-set of

Re: Disable GC entirely

2013-04-07 Thread Rob T
On Sunday, 7 April 2013 at 09:02:25 UTC, Adrian Mercieca wrote: Incidentally, when you got this speed, what compiler were you using? dmd? I was (and still am) using the latest released DMD compiler. Here's the original thread where I presented the problem and the solution. Youu probably sho

Re: Disable GC entirely

2013-04-06 Thread Rob T
On Saturday, 6 April 2013 at 21:29:20 UTC, Peter Alexander wrote: On Saturday, 6 April 2013 at 11:01:09 UTC, bearophile wrote: Peter Alexander: I also use a modified druntime that prints callstacks when a GC allocation occurs, so I know if it happens by accident. Is it possible to write a pa

Re: Disable GC entirely

2013-04-06 Thread Rob T
On Saturday, 6 April 2013 at 08:01:09 UTC, Adrian Mercieca wrote: In my very simple test, the GC version of my program ran more than twice slower than the non GC version. I just cannot accept that kind of performance penalty. Thanks. I have ran into similar problems with D and understand w

Re: D exceptions and calling c++ code

2013-03-30 Thread Rob T
There was a discussion about Exceptions in D.learn that may be relevant. http://forum.dlang.org/thread/yqzjldpknloyxwlbu...@forum.dlang.org If you look though the discussion towards the end you'll see mention of "Lippincott functions", and from there a C++ exception handler example is shown w

Re: D with experimental features like tuple unpacking

2013-03-21 Thread Rob T
I would like to see tuple syntax and abilities improved. It's been a while since I last tried to use them so I'm not prepared to explain in detail what I'd like to see for improvements, however I can say that when I did try to use them I remember they were much more unwieldy to use and more lim

Re: seg fault due to a ref parameter with default value

2013-03-21 Thread Rob T
http://d.puremagic.com/issues/show_bug.cgi?id=9773

Re: seg fault due to a ref parameter with default value

2013-03-20 Thread Rob T
On Thursday, 21 March 2013 at 00:30:41 UTC, bearophile wrote: Rob T: Any comments before I submit a bug report? I don't see a crash (Win 32) but it should not compile. Bye, bearophile I'm running it on Linux 64 with compiler optimizations enabled. I think the solution to the

seg fault due to a ref parameter with default value

2013-03-20 Thread Rob T
void f( ref string a = "" ) { a = "crash and burn"; } main() { f(); // seg fault. This should not even compile. } I did not see a bug report on this one, but maybe I missed it. Any comments before I submit a bug report? --rt

Re: I'd just like to say thanks for D

2013-03-10 Thread Rob T
On Monday, 11 March 2013 at 00:58:22 UTC, Jonathan M Davis wrote: Well, it seems like the game industry might be the place where we could hit it big given the interest that some of those guys have in D, and there's a game company that Walter's been supporting by working on some of the features

  1   2   3   4   5   6   >