Re: And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread Denis Koroskin via Digitalmars-d
On Monday, 30 November 2015 at 22:11:09 UTC, deadalnix wrote: On Monday, 30 November 2015 at 21:50:09 UTC, Andrei Alexandrescu wrote: On 11/30/15 4:41 PM, H. S. Teoh via Digitalmars-d wrote: What about when element i is matched, swap it with the (i/2)'th element? Randomization is essential -

Re: The "no gc" crowd

2013-10-08 Thread Denis Koroskin
On Tuesday, 8 October 2013 at 20:44:56 UTC, deadalnix wrote: On Tuesday, 8 October 2013 at 16:22:25 UTC, Dicebot wrote: On Tuesday, 8 October 2013 at 15:43:46 UTC, ponce wrote: Is there a plan to have a standard counter-attack to that kind of overblown problems? It could be just a solid blog p

Re: reddit discussion on replacing Python in 0install

2013-06-14 Thread Denis Koroskin
On Friday, 14 June 2013 at 08:17:02 UTC, Walter Bright wrote: On 6/14/2013 1:11 AM, Denis Koroskin wrote: Does it look like it's slower? To me it looks like it's actually FASTER with a flush, although I don't know why. Because of write caching, you can get very different re

Re: reddit discussion on replacing Python in 0install

2013-06-14 Thread Denis Koroskin
On Thursday, 13 June 2013 at 18:11:12 UTC, Walter Bright wrote: What is wrong and needs fixing is the program exiting with "success" indication when the output has actually failed. What's wrong is a program existing with a status code *different* from one that was supplied by a programmer.

Re: reddit discussion on replacing Python in 0install

2013-06-14 Thread Denis Koroskin
On Wednesday, 12 June 2013 at 06:48:48 UTC, Walter Bright wrote: On 6/11/2013 10:15 PM, deadalnix wrote: On Wednesday, 12 June 2013 at 04:23:39 UTC, Walter Bright wrote: I don't agree. Buffering is often done on page size boundaries - throwing out a random number of characters and then flushing

Re: reddit discussion on replacing Python in 0install

2013-06-11 Thread Denis Koroskin
On Tuesday, 11 June 2013 at 16:50:50 UTC, Andrei Alexandrescu wrote: On 6/11/13 11:57 AM, Steven Schveighoffer wrote: This code DOES fail: import std.stdio; int main() { writeln("hello"); std.stdio.stdout.flush(); return 0; } Ah, I suspected so. (At a point in D's history writeln() did do a

Re: Need some opinions for a GUI editor

2013-05-29 Thread Denis Koroskin
On Wednesday, 29 May 2013 at 21:45:38 UTC, Flamaros wrote: Need some opinions for a GUI editor You can combine both approaches: make the editor an external app that would communicate with your running application (if it's compiled in an editor-enabled mode). On Wednesday, 29 May 2013 at 19

Re: The kind of documentation people like

2013-03-06 Thread Denis Koroskin
On Wednesday, 6 March 2013 at 08:17:58 UTC, Walter Bright wrote: http://www.reddit.com/r/programming/comments/19npsp/developers_may_be_getting_as_much_as_50_of_their/ What I get from this is that people really like PHP's documentation style where users can add to it. For what it's worth, MSDN

Re: Migrating dmd to D?

2013-03-01 Thread Denis Koroskin
On Saturday, 2 March 2013 at 04:20:27 UTC, Walter Bright wrote: On 3/1/2013 7:46 PM, Denis Koroskin wrote: I'm no copyright lawyer, but I think ddmd being a derivative work from dmd should probably inherit the license from it It does indeed. But the derived part of the work can b

Re: Migrating dmd to D?

2013-03-01 Thread Denis Koroskin
On Saturday, 2 March 2013 at 03:01:20 UTC, Walter Bright wrote: On 3/1/2013 6:55 PM, Andrej Mitrovic wrote: On Saturday, 2 March 2013 at 02:35:34 UTC, Walter Bright wrote: On 3/1/2013 7:43 AM, H. S. Teoh wrote: Wow. You make me feel really lucky that at my day job, I once made a request to use

Re: The impoliteness of overriding methods

2012-12-19 Thread Denis Koroskin
On Wed, 19 Dec 2012 15:11:34 -0800, Andrej Mitrovic wrote: Some interesting blog post: http://journal.stuffwithstuff.com/2012/12/19/the-impoliteness-of-overriding-methods/ It's a post about a common problem in class design, I've ran into it a few times in D too. Reddit thread: http://www.

Re: Compilation strategy

2012-12-17 Thread Denis Koroskin
On Mon, 17 Dec 2012 13:47:36 -0800, Walter Bright wrote: I've often thought Java bytecode was a complete joke. It doesn't deliver any of its promises. You could tokenize Java source code, run the result through an lzw compressor, and get the equivalent functionality in every way. Not

Re: Moving towards D2 2.061 (and D1 1.076)

2012-12-13 Thread Denis Koroskin
On Thu, 13 Dec 2012 13:37:07 -0800, Walter Bright wrote: On 12/13/2012 12:46 PM, Jacob Carlborg wrote: On 2012-12-13 18:27, Iain Buclaw wrote: I am confused at this commit also. Walter argues that people are already using it so it can't just be removed. I say, they're using an unrelea

Re: Moving towards D2 2.061 (and D1 1.076)

2012-12-13 Thread Denis Koroskin
On Thu, 13 Dec 2012 00:22:55 -0800, Jeff Nowakowski wrote: On 12/12/2012 04:45 PM, Iain Buclaw wrote: Though one of the downsides would be that if I were to leave, so would the site. For the stability of the project, D needs more commodity-based services like Amazon S3, and less volun

Re: Is there any reason why arithmetic operation on shorts and bytes return int?

2012-12-11 Thread Denis Koroskin
On Wednesday, 12 December 2012 at 03:10:15 UTC, d coder wrote: On Wed, Dec 12, 2012 at 3:40 AM, Walter Bright wrote: No worries there :-) I feel pretty dang strongly about this issue, from bad experience. Even if a language behaves "wrong", it is still usable if it is predictable. Agreed.

Re: TDPL error(s)

2011-05-08 Thread Denis Koroskin
On Sun, 08 May 2011 17:59:02 +0400, Timon Gehr wrote: On page 263, TDPL states that struct objects nested inside a function cannot be returned, because the caller does not have access to their types. Using the auto keyword, DMD lets you do this though. Is this a bug in DMD or an error in

Re: link from a dll to another function in another dll?

2011-04-30 Thread Denis Koroskin
On Sat, 30 Apr 2011 13:47:53 +0400, maarten van damme wrote: I've changed this, I think I'm still kinda confused with lib files. They've told me you can't do something with them without a .di file So I went ahead and made a kernel33.di file. I now import it in kernel32.d and my declarati

Re: How about a Hash template?

2011-04-30 Thread Denis Koroskin
On Sat, 30 Apr 2011 03:19:37 +0400, Alexander wrote: On 29.04.2011 21:58, Andrei Alexandrescu wrote: You need to replace the assert and compile with -O -release -inline. My results: [snip] Still, straight comparison wins - 2x faster ;) /Alexander That's just an optimizer issue. Even if

Re: How about a Hash template?

2011-04-29 Thread Denis Koroskin
On Thu, 28 Apr 2011 03:10:15 +0400, Andrej Mitrovic wrote: I often see code written like this: if (value == somevalue || value == someothervalue || value == yetanothervalue); You could use the switch statement. But that introduces indentation, and is rarely used for a couple of values

Re: A few general thoughts

2011-04-29 Thread Denis Koroskin
On Fri, 29 Apr 2011 12:30:59 +0400, lenochware wrote: I was not happy with error message "invalid utf8 character". I am using international character in my strings and compiler gives me this message. Of course, I can switch my source codes into utf8, but here are few tricks which can be d

Re: Performance of exception handling

2011-04-26 Thread Denis Koroskin
On Tue, 26 Apr 2011 22:26:00 +0400, Sean Kelly wrote: On Apr 26, 2011, at 9:29 AM, Denis Koroskin wrote: On Tue, 26 Apr 2011 20:14:05 +0400, Sean Kelly wrote: Right now, traces are generated on throw. It should be possible to generate them on catch instead. The performance would be

Re: Performance of exception handling

2011-04-26 Thread Denis Koroskin
On Tue, 26 Apr 2011 20:14:05 +0400, Sean Kelly wrote: Right now, traces are generated on throw. It should be possible to generate them on catch instead. The performance would be the same either way however. It would be nice to generate them lazily but I don't think that's possible. Sen

Re: Performance of exception handling

2011-04-26 Thread Denis Koroskin
On Tue, 26 Apr 2011 16:43:26 +0400, Alexander wrote: On 26.04.2011 12:57, Vladimir Panteleev wrote: On my Windows box with an i7 920, a simple try/throw/catch loop runs at about 13 iterations per second. Well, g++ with same loop on same linux system gives ca. 16 iter/s, which i

Re: Implementing std.log

2011-04-21 Thread Denis Koroskin
On Thu, 21 Apr 2011 19:08:38 +0400, so wrote: On Thu, 21 Apr 2011 15:37:42 +0300, Denis Koroskin <2kor...@gmail.com> wrote: On Thu, 21 Apr 2011 01:34:29 +0400, so wrote: For me, Logger needs to be simple but feature complete. Here is my ideal syntax: Logger log = new

Re: Implementing std.log

2011-04-21 Thread Denis Koroskin
On Thu, 21 Apr 2011 16:58:17 +0400, Jens Mueller wrote: Denis Koroskin wrote: On Thu, 21 Apr 2011 01:34:29 +0400, so wrote: >>For me, Logger needs to be simple but feature complete. Here is >>my ideal syntax: >> >>Logger log = new Logger(); >>log.warn("

Re: Implementing std.log

2011-04-21 Thread Denis Koroskin
On Thu, 21 Apr 2011 01:34:29 +0400, so wrote: For me, Logger needs to be simple but feature complete. Here is my ideal syntax: Logger log = new Logger(); log.warn("bewarned"); log.error("error code: %d", 42); log.fatal("Derp"); Fine if you remove the first line, switching the output is som

Re: Implementing std.log

2011-04-20 Thread Denis Koroskin
On Wed, 20 Apr 2011 20:09:30 +0400, Robert Clipsham wrote: Hey folks, I've just finished porting my web framework from D1/Tango to D2/Phobos, and in the transition lost logging functionality. As I'll be writing a logging library anyway, I wondered if there'd be interest in a std.log? I

Re: TempAlloc: Request for Review For Inclusion in core.memory

2011-04-19 Thread Denis Koroskin
On Tue, 19 Apr 2011 18:34:33 +0400, dsimcha wrote: == Quote from Andrej Mitrovic (andrej.mitrov...@gmail.com)'s article Nice work. I've tried it out with allocating some large float arrays, quick two test cases were a 94MB and 282MB audio file. File 1 w/o TempAlloc: 410msecs File 1 w/ TempAllo

Re: GC for pure functions -- implementation ideas

2011-04-18 Thread Denis Koroskin
On Sat, 16 Apr 2011 00:12:34 +0400, Don wrote: I noticed a lively discussion in Bugzilla about the GC, with speculation about the impact of a precise GC on speed. But it seems to me that a dedicated GC for pure functions has enormous unexplored potential, and might be relatively easy to impl

Re: question to Walter - about the GUI library

2011-04-14 Thread Denis Koroskin
On Thu, 14 Apr 2011 17:39:32 +0400, David Wang wrote: Dear Walter Bright, I would like to know that what GUI library you would like to use for D Language ? Have you ever considered the GTK+ 3.0? or other library? or you will produce a new D library of GUI? wainting for your kindly fee

Re: Linux RPM out of date

2011-04-11 Thread Denis Koroskin
On Mon, 11 Apr 2011 18:21:52 +0400, Kai Meyer wrote: Then I suppose I have two options. Do I start where somebody else left off? Or should I start from scratch? If from scratch, should I be re-packaging the .zip file distribution, or building from source? I'm also interested in DDMD. I do

Re: string and char[]

2011-04-08 Thread Denis Koroskin
On Fri, 08 Apr 2011 17:13:19 +0400, Steven Schveighoffer wrote: On Fri, 08 Apr 2011 06:44:42 -0400, Simen kjaeraas wrote: On Fri, 08 Apr 2011 12:46:08 +0200, Morlan wrote: It is OK if I write int[char[]] asr; asr["hello"] = 10; but the following does not compile: char[] car =

Re: i like cakes

2011-03-28 Thread Denis Koroskin
On Mon, 28 Mar 2011 18:31:54 +0400, FeepingCreature wrote: On 28.03.2011 15:19, random lurker wrote: FeepingCreature Wrote: On 28.03.2011 03:45, Gary Whatmore wrote: Hello again I've stayed quiet for a long time because people started accusing me of trolling. But now, I REALLY HATE THI

Re: Library Development: What to finish/flesh out?

2011-03-25 Thread Denis Koroskin
On Sat, 26 Mar 2011 00:26:40 +0300, dsimcha wrote: On 3/25/2011 3:50 PM, Sean Kelly wrote: On Mar 24, 2011, at 1:00 PM, dsimcha wrote: BTW, the TempAlloc module also includes a hash table, hash set and AVL tree that are specifically optimized for TempAlloc. Should these be included in t

Re: How do you debug DMD?

2011-03-14 Thread Denis Koroskin
On Mon, 14 Mar 2011 12:27:45 +0300, Trass3r wrote: %u Wrote: What tools (aka debuggers) do you guys use to debug DMD? Debugging dmd with Visual Studio works flawlessly for me. I just cv2pdb -C it, open devenv bla\dmd.exe, set the working directory to the D code I want to compile and then o

Re: std.path.getName(): Screwy by design?

2011-03-03 Thread Denis Koroskin
On Fri, 04 Mar 2011 00:10:28 +0300, Jesse Phillips wrote: Denis Koroskin Wrote: >No you cannot. What happens is that you *open* them with the > default application, which just happens to be an interpreter whose > default action is to run the script. Try renaming a .exe into

Re: std.path.getName(): Screwy by design?

2011-03-03 Thread Denis Koroskin
On Thu, 03 Mar 2011 21:47:54 +0300, Jérôme M. Berger wrote: Kagamin wrote: Don Wrote: ?? It ALWAYS makes a difference. For example, only .exe and .com files are executable. On unix, the filename is just a name. Nothing more. By contrast, the Windows extension actually matters. They're

Re: We need to rethink remove in std.container

2011-02-22 Thread Denis Koroskin
On Tue, 22 Feb 2011 05:55:20 +0300, Jonathan M Davis wrote: Okay, removing elements from a container sucks right now. You can do stuff like removeAny (generally pretty useless IMHO) or removeFront just fine, but removing an arbitrary range from a container just plain sucks. remove takes

Re: the naked keyword is an attribute - but it looks like an function when used?

2011-02-21 Thread Denis Koroskin
On Mon, 21 Feb 2011 12:45:21 +0300, dennis luehring wrote: naked INSIDE of the context which is adress with the attribute - looks very strange to me, because it changes the pro- AND epilog of an function/codeblock real blabla(real x) { asm{ naked; mov EAX,[RSP]; naked;

Re: DMD and 64-bit

2011-02-19 Thread Denis Koroskin
On Sat, 19 Feb 2011 12:12:25 +0300, Russel Winder wrote: Am I correct in assuming that DMD generates 32-bit by default and that for 64-bit you have to give the -m64 option? Is the eventual plan to use the natural word length of the platform as the default, i.e. 32-bit on 32-bit and 64-bit on

Re: Integer conversions too pedantic in 64-bit

2011-02-17 Thread Denis Koroskin
On Wed, 16 Feb 2011 06:49:26 +0300, Michel Fortin wrote: On 2011-02-15 22:41:32 -0500, "Nick Sabalausky" said: I like "nint". But is it unsigned or signed? Do we need 'unint' too? I think 'word' & 'uword' would be a better choice. I can't say I'm too displeased with 'size_t', but it's

Re: tooling quality and some random rant

2011-02-13 Thread Denis Koroskin
On Mon, 14 Feb 2011 02:01:53 +0300, Walter Bright wrote: Michel Fortin wrote: But note I was replying to your reply to Denis who asked specifically for demangled names for missing symbols. This by itself would be a useful improvement. I agree with that, but there's a caveat. I did such

Re: tooling quality and some random rant

2011-02-13 Thread Denis Koroskin
On Sun, 13 Feb 2011 22:12:02 +0300, Walter Bright wrote: Vladimir Panteleev wrote: On Sun, 13 Feb 2011 20:26:50 +0200, Walter Bright wrote: golgeliyele wrote: I don't think C++ and gcc set a good bar here. Short of writing our own linker, we're a bit stuck with what ld does. That's

Re: High performance XML parser

2011-02-04 Thread Denis Koroskin
On Sat, 05 Feb 2011 00:02:39 +0300, Tomek Sowiński wrote: I am now intensely accumulating information on how to go about creating a high-performance parser as it quickly became clear that my old one won't deliver. And if anything is clear is that memory is the key. One way is the slicing a

Re: new documentation format for std.algorithm

2011-02-02 Thread Denis Koroskin
On Wed, 02 Feb 2011 19:00:20 +0300, Andrei Alexandrescu wrote: On 2/2/11 7:07 AM, spir wrote: On 02/02/2011 09:45 AM, Andrei Alexandrescu wrote: Following ideas and advice from this newsgroup, I have a draft at http://d-programming-language.org/cutting-edge/phobos/std_algorithm.html There

Re: new documentation format for std.algorithm

2011-02-02 Thread Denis Koroskin
On Wed, 02 Feb 2011 19:00:20 +0300, Andrei Alexandrescu wrote: On 2/2/11 7:07 AM, spir wrote: On 02/02/2011 09:45 AM, Andrei Alexandrescu wrote: Following ideas and advice from this newsgroup, I have a draft at http://d-programming-language.org/cutting-edge/phobos/std_algorithm.html There

Re: new documentation format for std.algorithm

2011-02-02 Thread Denis Koroskin
On Wed, 02 Feb 2011 14:06:11 +0300, Magnus Lie Hetland wrote: I think perhaps some adjustments could be made to the layout, to make it more suitable to narrow(ish) browser windows (c.f., the discussio about 80 columns -- without starting a huge thread like that again ;) For one thing, in

Re: Smartphones and D

2011-01-30 Thread Denis Koroskin
On Sun, 30 Jan 2011 16:23:21 +0300, Trass3r wrote: That said I really hope D gets an ARM backend. While it isn't likely for a DMD to happen, it could for LDC. As I said in my other answer to this topic GDC has already been compiled as an ARM cross-compiler. Good to know, thanks!

Re: Smartphones and D

2011-01-30 Thread Denis Koroskin
On Sun, 30 Jan 2011 15:29:54 +0300, Michel Fortin wrote: On 2011-01-30 03:05:59 -0500, Gary Whatmore said: D's main focus currently is 32-bit x86 servers and desktop applications. This is where the big market has traditionally been. Not everyone has 64-bit hardware and I have my doubts

Re: Decision on container design

2011-01-28 Thread Denis Koroskin
On Sat, 29 Jan 2011 02:32:28 +0300, Michel Fortin wrote: On 2011-01-28 17:09:08 -0500, Andrei Alexandrescu said: On 1/28/11 3:05 PM, Michel Fortin wrote: Not my preferred choices (especially #1), but having containers in Phobos will certainly be an improvement over not having them. So g

Re: Version statement

2010-12-14 Thread Denis Koroskin
On Tue, 14 Dec 2010 21:46:47 +0300, Extrawurst wrote: Hi i just want to discuss two points about D version statements. 1) Why is it not possible to negate the condition of a version statement. I think it is unintuitive and keeps me writing weird statements like: version(Win32){}else{versi

Re: Cannot get thread ID with Thread.getThis() in specific callback functions on Windows

2010-12-06 Thread Denis Koroskin
On Mon, 06 Dec 2010 06:38:40 +0300, Haruki Shigemori wrote: Hi. I cannot get thread ID with Thread.getThis() in specific callback functions on Windows. What is the cause of this problem? import win32.windows; import win32.mmsystem; import std.stdio; import core.thread; extern (Windows) void

Re: D's greatest mistakes

2010-11-28 Thread Denis Koroskin
On Mon, 29 Nov 2010 07:19:44 +0300, Jack wrote: The post "C#'s greatest mistakes" prompts/begs this post. Have at it, pick up the ball and run with it, don't be shy. I expect Walter and Andrei to answer (if Walter and Andrei so dare!) after others' posts have stopped or stagnated into that cess

Re: D1 -> D2

2010-11-19 Thread Denis Koroskin
On Sat, 20 Nov 2010 04:33:36 +0300, Walter Bright wrote: Denis Koroskin wrote: On Sat, 20 Nov 2010 04:14:05 +0300, Walter Bright How can it skip it without knowing the grammar? #ifdef D_Version2 ... #else ... #endif D has a precedence of having preprocessor macros (e.g #line) even if

Re: D1 -> D2

2010-11-19 Thread Denis Koroskin
On Sat, 20 Nov 2010 04:14:05 +0300, Walter Bright wrote: Andrew Wiley wrote: I'm a fan of parsing false version blocks, but it seems like there should be some sort of exception for version blocks for a different version of the language. Could they just be skipped with a warning that an

Re: D1 -> D2

2010-11-18 Thread Denis Koroskin
On Thu, 18 Nov 2010 22:39:31 +0300, Walter Bright wrote: Denis Koroskin wrote: From my experience, a bigger issue is that version (D2) { /* some D2 only code involving const etc */ } simply won't compile in D1, because even if it's D2-only the code needs to be correct

Re: D1 -> D2

2010-11-18 Thread Denis Koroskin
On Thu, 18 Nov 2010 22:19:12 +0300, Walter Bright wrote: Steven Schveighoffer wrote: My recommendation -- when you are ready, switch wholly to D2. Don't bother with compatibility, it's just not possible. From what you wrote, it appears that most of the difficulties were in dealing wit

Re: linker wrapper

2010-11-11 Thread Denis Koroskin
On Thu, 11 Nov 2010 15:54:50 +0300, Steven Schveighoffer wrote: Just saw another linker error in d.learn, and it got me thinking dmd just calls the linker, and the linker spits out link errors. But what if we had a 'linker wrapper' program which translated mangled names into demangled n

Re: Passing dynamic arrays

2010-11-08 Thread Denis Koroskin
On Mon, 08 Nov 2010 20:30:03 +0300, Jens Mueller wrote: Hi, I do not understand what's going on behind the scene with this code. Or better said I have some idea but maybe I do not see the whole point. void foo(int[] array) { array.length += 1000; // may copy the array array[

Re: null [re: spec#]

2010-11-08 Thread Denis Koroskin
On Mon, 08 Nov 2010 12:08:01 +0300, Simen kjaeraas wrote: Eric Poggel wrote: On 11/6/2010 6:50 AM, bearophile wrote: foobar: Any type can be wrapped by an OPTION type. trying to do the converse of this is impractical and is bad design. Discussing this is a waste of time now, this par

Re: Can non-nullable references be implemented as a library?

2010-11-07 Thread Denis Koroskin
On Sun, 07 Nov 2010 20:21:49 +0300, steveh wrote: Andrei's stance is, either a library addon or ship D without that feature. D's library already contains both tuples and algebraic data types. They're simple to use, almost like in Python. The reason for library addons isn't that builtin fea

Can non-nullable references be implemented as a library?

2010-11-07 Thread Denis Koroskin
Since many people think that non-nullable references can be implemented as a library and thus don't belong to core language, I've decided to show that it is in fact impossible to do so. How do you enforce the following behavior: class Foo { this() { // error: variable nonNull

Re: null [re: spec#]

2010-11-07 Thread Denis Koroskin
On Sun, 07 Nov 2010 18:01:32 +0300, steveh wrote: Sounds more retarded than the notorious 'retard' here. It's because of people like u that D3 might not come. If you disagree too much with AA and WB they have no interest to make D3. This nonnull question might be good place to give up. C

Re: Spec#, nullables and more

2010-11-07 Thread Denis Koroskin
On Sat, 06 Nov 2010 23:37:09 +0300, Gary Whatmore wrote: Walter Bright Wrote: Adam Burton wrote: > I wouldn't consider that as the same thing. null represents the lack of a > value where as 25 is the wrong value. Based on that argument the application > should fail immediately on accessin

Re: why a part of D community do not want go to D2 ?

2010-11-07 Thread Denis Koroskin
On Sun, 07 Nov 2010 02:11:59 +0300, bioinfornatics wrote: hello, I have a question (i would like understand), they are many important people of D community who do not want go to D2, why ? thanks for answer Many of the D2-only features are half-baked: - pure, nothrow and inout are not im

Re: Spec#, nullables and more

2010-11-07 Thread Denis Koroskin
On Sun, 07 Nov 2010 00:58:57 +0300, Walter Bright wrote: FeepingCreature wrote: Walter Bright Wrote: FeepingCreature wrote: Walter Bright Wrote: All that does is reinvent the null pointer seg fault. The hardware does this for you for free. Walter, I know you're a Windows programmer bu

Re: Spec#, nullables and more

2010-11-06 Thread Denis Koroskin
On Sat, 06 Nov 2010 14:06:20 +0300, Christopher Bergqvist wrote: Does D have anything comparable to C++ references à la "void nullCheckLessFunction(const std::string& notNullStr) {...}" or does it only have the equivalent of "void nullCheckingRequired(const std::string* mightByNullStr) {..

Re: Spec#, nullables and more

2010-11-05 Thread Denis Koroskin
On Sat, 06 Nov 2010 02:41:25 +0300, Walter Bright wrote: Denis Koroskin wrote: On Fri, 05 Nov 2010 23:44:58 +0300, Walter Bright wrote: To eliminate null pointers is the same as shooting the canary in your coal mine because its twitter annoys you. I'm tired of pointing out th

Re: Spec#, nullables and more

2010-11-05 Thread Denis Koroskin
On Fri, 05 Nov 2010 23:44:58 +0300, Walter Bright wrote: To eliminate null pointers is the same as shooting the canary in your coal mine because its twitter annoys you. I'm tired of pointing out that NO ONE is talking about eliminating null pointers, but rather extending an existing type

Re: Spec#, nullables and more

2010-11-05 Thread Denis Koroskin
On Fri, 05 Nov 2010 14:43:48 +0300, Gary Whatmore wrote: bearophile Wrote: Plus a nice Microsoft site that allows you to try it in interactive way, this is very good: http://www.rise4fun.com/SpecSharp D can do that too. We had those interactive versions in the newsrgoup. We saw no value

Re: Streaming library (NG Threading)

2010-10-29 Thread Denis Koroskin
On Fri, 29 Oct 2010 16:32:24 +0400, Bruno Medeiros wrote: On 29/10/2010 12:50, Denis Koroskin wrote: On Fri, 29 Oct 2010 15:40:35 +0400, Bruno Medeiros wrote: On 13/10/2010 18:48, Daniel Gibson wrote: Andrei Alexandrescu schrieb: On 10/13/10 11:16 CDT, Denis Koroskin wrote: P.S. For

Re: Streaming library (NG Threading)

2010-10-29 Thread Denis Koroskin
On Fri, 29 Oct 2010 15:40:35 +0400, Bruno Medeiros wrote: On 13/10/2010 18:48, Daniel Gibson wrote: Andrei Alexandrescu schrieb: On 10/13/10 11:16 CDT, Denis Koroskin wrote: P.S. For threads this deep it's better fork a new one, especially when changing the subject. I thought I d

Re: Lints, Condate and bugs

2010-10-29 Thread Denis Koroskin
On Fri, 29 Oct 2010 11:58:56 +0400, dennis luehring wrote: Am 29.10.2010 09:26, schrieb Roman Ivanov: They would be a great help in debugging programs, for example. NullPointerException is probably the most common error I see in Java. 95% of all times it gets thrown in some weird context, wh

Re: Visual D problems

2010-10-28 Thread Denis Koroskin
On Thu, 28 Oct 2010 11:41:45 +0400, Benjamin Thaut wrote: For my current project I use visualD for debugging. I'm now at a point where both dsss and visualD won't compile my sourcecode any more. Dsss gets stuck in some kind of endless loop and because visualD passes all files to dmd at o

Re: Quick question about target patforms . . .

2010-10-25 Thread Denis Koroskin
On Mon, 25 Oct 2010 13:23:49 +0400, Olivier Pisano wrote: Le 25/10/2010 09:27, Walter Bright a écrit : Russel Winder wrote: . . . but they may have been asked before and I just missed them in trawling around. Is the intention that D should be the language of choice for implementing applica

Re: Looking for champion - std.lang.d.lex

2010-10-24 Thread Denis Koroskin
On Sun, 24 Oct 2010 06:55:22 +0400, Nick Sabalausky wrote: "bearophile" wrote in message news:ia0410$1lj...@digitalmars.com... Nick Sabalausky: But that's all if you want generalized lexing or parsing though. If you just want "lexing D code"/"parsing D code", then IMO anything other than ad

Re: What can the community do to help D?

2010-10-23 Thread Denis Koroskin
On Sun, 24 Oct 2010 01:33:33 +0400, bearophile wrote: Denis Koroskin: FWIW, similar problem exists: class Foo { void foo1() { struct Bar {} } void foo2() { struct Bar { /* different set of fields and methods */ } // using Foo.foo2.Bar

Re: What can the community do to help D?

2010-10-23 Thread Denis Koroskin
On Sun, 24 Oct 2010 01:06:02 +0400, Peter Alexander wrote: On 23/10/10 7:30 PM, Walter Bright wrote: Peter Alexander wrote: There have been threads about what the biggest issues with D are, and about the top priorities for D are, but I don't think there has been a thread about what the best

Re: [due diligence] std.xml

2010-10-19 Thread Denis Koroskin
On Tue, 19 Oct 2010 22:47:56 +0400, Andrei Alexandrescu wrote: On 10/19/10 8:06 CDT, Justin Johansson wrote: This module should be removed altogether from Phobos forthwith. The code was obviously submitted and accepted without peer review, either that or the peers were idiots as well. It w

Re: deepCopy

2010-10-19 Thread Denis Koroskin
On Tue, 19 Oct 2010 12:37:35 +0400, Jacob Carlborg wrote: On 2010-10-19 00:01, Denis Koroskin wrote: Okay, we've finished what we started with Aleksey today, so I decided to share it with you. This is a rough cut, it lacks comments, but it is already usable. deepCopy is a function that

Re: Visual D Build + DMD Bugginess = Bad

2010-10-19 Thread Denis Koroskin
On Tue, 19 Oct 2010 07:53:45 +0400, Nick Sabalausky wrote: "Denis Koroskin" <2kor...@gmail.com> wrote in message news:op.vksxyn15o7c...@korden-pc... On Tue, 19 Oct 2010 06:26:23 +0400, Nick Sabalausky wrote: "Denis Koroskin" <2kor...@gmail.com> wrote in

Re: Visual D Build + DMD Bugginess = Bad

2010-10-18 Thread Denis Koroskin
On Tue, 19 Oct 2010 06:26:23 +0400, Nick Sabalausky wrote: "Denis Koroskin" <2kor...@gmail.com> wrote in message news:op.vkshh4bdo7c...@korden-pc... On Tue, 19 Oct 2010 00:41:54 +0400, Nick Sabalausky wrote: "Rainer Schuetze" wrote in message news:i9f2ce$30r...

Re: [challenge] Limitation in D's metaprogramming

2010-10-18 Thread Denis Koroskin
On Tue, 19 Oct 2010 04:07:16 +0400, Nick Sabalausky wrote: I don't know if others have noticed this before, but I think I've found a notable limitation in D's metaprogramming potential: There doesn't appear to be a way to have mutable global state at compile-time. Challange: Create two..."

deepCopy

2010-10-18 Thread Denis Koroskin
Okay, we've finished what we started with Aleksey today, so I decided to share it with you. This is a rough cut, it lacks comments, but it is already usable. deepCopy is a function that makes a deep copy of your object, and everything it points to. As simple as that. Essentially it is a b

Re: Visual D Build + DMD Bugginess = Bad

2010-10-18 Thread Denis Koroskin
On Tue, 19 Oct 2010 00:41:54 +0400, Nick Sabalausky wrote: "Rainer Schuetze" wrote in message news:i9f2ce$30r...@digitalmars.com... I've used ddmd as a medium sized project for testing. It has more than 400 files with most modules mutually importing each other. Some remarks: - compilatio

Re: The Next Big Language

2010-10-18 Thread Denis Koroskin
On Mon, 18 Oct 2010 22:41:22 +0400, Gour D. wrote: On Mon, 18 Oct 2010 22:23:02 +0400 "Denis" == "Denis Koroskin" <2kor...@gmail.com> wrote: Denis> What D currently lacks is a code written in it. I also think a Denis> stable standard IDE and GUI libr

Re: The Next Big Language

2010-10-18 Thread Denis Koroskin
On Mon, 18 Oct 2010 22:01:05 +0400, Gour D. wrote: On Mon, 18 Oct 2010 10:52:34 -0700 "Walter" == Walter Bright wrote: Hello Walter, Walter> 1. People who won't use D for an irrational or unflattering Walter> reason. They'll search about for some other reason that is Walter> publicly accept

Re: The Next Big Language

2010-10-18 Thread Denis Koroskin
On Mon, 18 Oct 2010 22:01:57 +0400, Walter Bright wrote: Denis Koroskin wrote: We've just tried programming with a friend in pair in D, and after spending about an hour trying to figure out the program misbehavior we understood it was a dmd codegen bug (I'll submit a report sh

Re: The Next Big Language

2010-10-18 Thread Denis Koroskin
On Mon, 18 Oct 2010 20:25:52 +0400, Fawzi Mohamed wrote: On 18-ott-10, at 18:14, Denis Koroskin wrote: On Mon, 18 Oct 2010 19:07:38 +0400, Don wrote: Jeff Nowakowski wrote: On 10/18/2010 04:59 AM, Jonathan M Davis wrote: Java was big long before it was open-sourced, and C# is big in

Re: The Next Big Language

2010-10-18 Thread Denis Koroskin
On Mon, 18 Oct 2010 19:07:38 +0400, Don wrote: Jeff Nowakowski wrote: On 10/18/2010 04:59 AM, Jonathan M Davis wrote: Java was big long before it was open-sourced, and C# is big in spite of the fact that its main compiler isn't open source and the one that is (Mono) is so far behind the

Re: htod feature request: save commands in translated file

2010-10-17 Thread Denis Koroskin
On Mon, 18 Oct 2010 07:51:34 +0400, Andrej Mitrovic wrote: htod could also use a --help switch so we don't have to fire up the browser every time we need to remind ourselves on what arguments it can take. Or, you know, Walter could give us the source code and we'll fix it for him. Hehe. :> H

Re: struct field alignment

2010-10-17 Thread Denis Koroskin
On Mon, 18 Oct 2010 06:22:32 +0400, BCS wrote: Hello Denis, On some platforms it is desired to align struct Vec { float[4] data; } on 16 bytes. At a guess, that is aligning the structure in memory, not the members in the struct. I think the 2nd is the question here. Yes, I was talkin

Re: struct field alignment

2010-10-17 Thread Denis Koroskin
On Mon, 18 Oct 2010 06:00:49 +0400, Walter Bright wrote: http://www.digitalmars.com/d/2.0/attribute.html#align Over time, it has become clear to me that there are only two useful alignments: align // set to whatever the C ABI alignment is align(1) // pack everything in, no ali

Re: Why struct opEquals must be const?

2010-10-17 Thread Denis Koroskin
On Sun, 17 Oct 2010 10:57:02 +0400, Nick Sabalausky wrote: Is there a technical reason why the l- and r- values for opEquals must be const? If the restriction is purely for the intuitive notion that there's no heisenstructs, then I have an example I think might be worth consideration: lazy

Re: [nomenclature] systems language

2010-10-16 Thread Denis Koroskin
On Sun, 17 Oct 2010 07:22:46 +0400, Steven Wawryk wrote: dsimcha wrote: == Quote from Steven Wawryk (stev...@acres.com.au)'s article C and C++ qualify. I'm new to D and still learning about it, but with the deprecation of scoped classes and delete, I'm not sure that D qualifies. Why?

Re: duck!

2010-10-16 Thread Denis Koroskin
On Sun, 17 Oct 2010 04:17:18 +0400, Andrei Alexandrescu wrote: On 10/16/2010 05:57 PM, kenji hara wrote: Current dmd does not enough support runtime reflection. [snip] I think runtime reflection is not needed. What you'd need to do for the "loose duck" is generate code that throws for al

Re: Is mimicking a reference type with a struct reliable?

2010-10-16 Thread Denis Koroskin
Sorry, I misclicked a button and send the message preliminary. On Sat, 16 Oct 2010 20:16:40 +0400, Steven Schveighoffer wrote: A final option is to disable the copy constructor of such an unsafe appender, but then you couldn't pass it around. What do you think? If you think it's worth h

Re: Is mimicking a reference type with a struct reliable?

2010-10-16 Thread Denis Koroskin
On Sat, 16 Oct 2010 20:16:40 +0400, Steven Schveighoffer wrote: On Sat, 16 Oct 2010 11:52:29 -0400, Denis Koroskin <2kor...@gmail.com> wrote: First I'd like to say that I don't really like (or rather use) Appender because it always allocates (at least an internal Dat

Re: duck!

2010-10-16 Thread Denis Koroskin
On Sat, 16 Oct 2010 00:37:10 +0400, Andrei Alexandrescu wrote: I was talking to Walter about Kenji's adaptTo. We both think it's a very powerful enabler, but adaptTo is a bland name. After discussing a few marketing strategies, I proposed "duck". It's short, simple, and evokes "duck typi

Is mimicking a reference type with a struct reliable?

2010-10-16 Thread Denis Koroskin
irst I'd like to say that I don't really like (or rather use) Appender because it always allocates (at least an internal Data instance) even when I provide my own buffer. I mean, why would I use Appender if it still allocates? Okay, you have to store a reference to an internal representation

  1   2   3   4   5   6   7   8   9   >