Re: Encapsulating trust

2014-09-01 Thread Denis Shelomovskij via Digitalmars-d
31.08.2014 17:47, Dmitry Olshansky пишет: Quite recently a lot of work has been done to make most of Phobos usable in @safe code. While a very welcome effort, it caused a number of doubts in particular due to the boilerplate required to isolate a small amount of unsafe operations and slap "@trus

Re: Just curious: who do know current purity rules?

2014-06-06 Thread Denis Shelomovskij via Digitalmars-d
06.06.2014 13:05, Kagamin пишет: Do you mean true purity rules or whatever is implemented in the compiler? "whatever is implemented". ) -- Денис В. Шеломовский Denis V. Shelomovskij

Just curious: who do know current purity rules?

2014-06-06 Thread Denis Shelomovskij via Digitalmars-d
As Kenji Hara just created purity fixing pull [1] we will probably soon have more intuitive rules so it's interesting who do understand current purity rules. The following code is proposed to check your understanding: --- alias F = bool function(int) pure; alias D = bool delegate(int) pure; D f

Re: Thank you Kenji

2014-05-24 Thread Denis Shelomovskij via Digitalmars-d
23.05.2014 8:11, Martin Nowak пишет: Today at DConf we learned, once again, that people are doing and starting amazing projects using D. A lot of which wouldn't have been possible without your contribution. So I just wanted to say thank you. -Martin Finally a thread to thank the man who fights

Re: What about DGui?

2014-05-20 Thread Denis Shelomovskij via Digitalmars-d
18.05.2014 19:14, FrankLike пишет: On Sunday, 18 May 2014 at 14:54:44 UTC, FrankLike wrote: 1.DFL's Memory Usage is the least than other. winsamp.exe is 2.1M,DFL's example's exe is 2.7M. DGui's Memory Usage is 3.2M. [1] https://bitbucket.org/dgui/dgui [2] https://bitbucket.org/dgui/dgui/do

Re: What about DGui?

2014-05-20 Thread Denis Shelomovskij via Digitalmars-d
18.05.2014 18:25, FrankLike пишет: *http://denis-sh.bitbucket.org/ Where is the DGui? This dgui is very cool. The link is to my personal page. DGui isn't my library, I only manage it so it can't be listened in "my open-source projects" page. As for x64 support, yes is isn't ready. If it

Re: What about DGui?

2014-05-20 Thread Denis Shelomovskij via Digitalmars-d
18.05.2014 14:52, FrankLike пишет: On Sunday, 18 May 2014 at 09:22:53 UTC, FrankLike wrote: DFL isn't boost licensed, that's the problem for me. And Christopher didn't answered anything on my proposal to change the license. I'd suggest to put the effort in DGui [1] instead because its author,

Re: Allocating a wstring on the stack (no GC)?

2014-05-18 Thread Denis Shelomovskij via Digitalmars-d
07.05.2014 22:26, Maxime Chevalier-Boisvert пишет: I have a very specific use case (JIT compiler) in which I have a pre-allocated array of wchar string data stored somewhere in memory. I'd like to be able to create a temporary D wstring object to pass this as a "regular" string to other functions

Re: What about DGui?

2014-05-18 Thread Denis Shelomovskij via Digitalmars-d
15.05.2014 7:58, FrankLike пишет: 1.DFL's Memory Usage is the least than other. winsamp.exe is 2.1M,DFL's example's exe is 2.7M. 2.The size of DFL's example's exe files is the least than other, and only a single file. 3.DFL's source code is the most easy to understand. D need Christopher E. Mill

Re: Table lookups - this is pretty definitive

2014-04-01 Thread Denis Shelomovskij
01.04.2014 23:22, Denis Shelomovskij пишет: 01.04.2014 22:35, Walter Bright пишет: Try this benchmark comparing various classification schemes: - import core.stdc.stdlib; import core.stdc.string; import std.algorithm; import std.array; import std.ascii; import

Re: Table lookups - this is pretty definitive

2014-04-01 Thread Denis Shelomovskij
01.04.2014 22:35, Walter Bright пишет: Try this benchmark comparing various classification schemes: - import core.stdc.stdlib; import core.stdc.string; import std.algorithm; import std.array; import std.ascii; import std.datetime; import std.range; import std.stdi

Re: Cross Platform GUI Development

2014-03-24 Thread Denis Shelomovskij
24.03.2014 13:04, Gary Willoughby пишет: On Sunday, 23 March 2014 at 20:04:00 UTC, Jeroen Bollen wrote: The main problem I have with GTK is that it's a mess to setup on Windows for the end user. The only real problem is the actual installation of GTK onto the Windows user's machine as some peo

Re: Cross Platform GUI Development

2014-03-23 Thread Denis Shelomovskij
24.03.2014 0:03, Jeroen Bollen пишет: On Sunday, 23 March 2014 at 19:56:47 UTC, Denis Shelomovskij wrote: 23.03.2014 16:34, Jeroen Bollen пишет: Are there any tools to do this at all in Digitalmars D? All current libraries seem to be outdated, but GTKD. GTK on it's end is a pain to b

Re: ICE for x[] + x[]

2014-03-23 Thread Denis Shelomovskij
23.03.2014 22:10, "Nordlöw" пишет: Just noticed that const x = [1]; assert(x[] + x[]); causes gives ICE Internal error: e2ir.c 1893 Bugzilla reference anyone? People are expected to search such things themselves: https://d.puremagic.com/issues/query.cgi -- Денис В. Шеломовский De

Re: Cross Platform GUI Development

2014-03-23 Thread Denis Shelomovskij
23.03.2014 16:34, Jeroen Bollen пишет: Are there any tools to do this at all in Digitalmars D? All current libraries seem to be outdated, but GTKD. GTK on it's end is a pain to bundle which is enough to not consider it cross platform at all. First, I don't understand what is the problem with GT

Re: Handling invalid UTF sequences

2014-03-21 Thread Denis Shelomovskij
21.03.2014 12:25, monarch_dodra пишет: On Thursday, 20 March 2014 at 23:34:02 UTC, Brad Anderson wrote: I'm a fan of this approach but Timon pointed out when I wrote about it once that it's rather trivial to get an invalid string through slicing mid-code point so now I'm not so sure. It's just

Re: [Proposal] Add module for C-strings support in Phobos

2014-03-20 Thread Denis Shelomovskij
20.03.2014 13:52, Rikki Cattermole пишет: On Thursday, 20 March 2014 at 09:32:33 UTC, Denis Shelomovskij wrote: 20.03.2014 13:20, Rikki Cattermole пишет: On Thursday, 20 March 2014 at 08:24:30 UTC, Denis Shelomovskij wrote: It's filed as enhancement 12418 [2]: C-strings processing

Re: Finally full multidimensional arrays support in D

2014-03-20 Thread Denis Shelomovskij
18.03.2014 1:35, Christof Schardt пишет: I looked to the doku-page and expected to see, how some basic matrix-operations could be performed. Like e.g. (basic syntax) this: Dim a(10,12) a(3,4) = 7 a(i,j) = a(j,i) * 12 Instead I found exotic assignments and calculations. Did I expect the w

Re: [Proposal] Add module for C-strings support in Phobos

2014-03-20 Thread Denis Shelomovskij
20.03.2014 13:20, Rikki Cattermole пишет: On Thursday, 20 March 2014 at 08:24:30 UTC, Denis Shelomovskij wrote: It's filed as enhancement 12418 [2]: C-strings processing is a special and common case so: 1. C-strings should be supported with both performance and usability. 2. There should

[Proposal] Add module for C-strings support in Phobos

2014-03-20 Thread Denis Shelomovskij
It's filed as enhancement 12418 [2]: C-strings processing is a special and common case so: 1. C-strings should be supported with both performance and usability. 2. There should be a dedicated module for C-strings (instead of adding such functions here and there in other modules). Current state

Re: Finally full multidimensional arrays support in D

2014-03-17 Thread Denis Shelomovskij
17.03.2014 21:39, Denis Shelomovskij пишет: Multidimensional arrays indexing and slicing syntax is finally added [1] (thanks to Kenji Hara). So it was a good cause to update my multidimensional arrays library implementation and add support for the new syntax. So here we are: [2]. Also should we

Finally full multidimensional arrays support in D

2014-03-17 Thread Denis Shelomovskij
Multidimensional arrays indexing and slicing syntax is finally added [1] (thanks to Kenji Hara). So it was a good cause to update my multidimensional arrays library implementation and add support for the new syntax. So here we are: [2]. Also should we add it to the standard library? [1] https

Re: How do you deal with scoped allocations?

2013-12-12 Thread Denis Shelomovskij
08.12.2013 2:32, Namespace пишет: Since my last thread doesn't get much attention I like to ask here: How did you deal with temporary memory? The algorithm is always this: 1. Use function stack frame for small allocations. 2. Use thread local stack allocator if temporary allocations correspond

Re: Duplicate keys in array literals?

2013-11-28 Thread Denis Shelomovskij
28.11.2013 15:23, bearophile пишет: Is it a good idea to silently statically accept duplicated keys in both dynamic array literals and in associative array literals? void main() { int[] a = [0:10, 0:20]; int[int] aa = [0:10, 0:20]; } I don't remember having ever had the need for

Re: scoped allocations

2013-11-28 Thread Denis Shelomovskij
27.11.2013 3:33, Namespace пишет: First of all: I apologize for my bad english. In the last few weeks I searched for a way to allocate nicely temporary buffer of unknown lengths. You can use `unstd.memory.allocation.tempAlloc` [1]. Also there is `unstd.c.string.tempCString` [2] for common cas

Re: std.templatecons ready for comments

2013-11-15 Thread Denis Shelomovskij
12.11.2013 2:19, John Colvin пишет: On Monday, 11 November 2013 at 22:18:27 UTC, John Colvin wrote: On Monday, 11 November 2013 at 20:33:37 UTC, Denis Shelomovskij wrote: 10.11.2013 19:30, Ilya Yaroshenko пишет: Hello, All! std.templatecons: Functional style template constructors

Re: std.templatecons ready for comments

2013-11-11 Thread Denis Shelomovskij
12.11.2013 0:33, Denis Shelomovskij пишет: 10.11.2013 19:30, Ilya Yaroshenko пишет: Hello, All! std.templatecons: Functional style template constructors. Documentation: http://9il.github.io/phobosx/std.templatecons.html Source: https://github.com/9il/phobosx/blob/master/std/templatecons.d

Re: std.templatecons ready for comments

2013-11-11 Thread Denis Shelomovskij
10.11.2013 19:30, Ilya Yaroshenko пишет: Hello, All! std.templatecons: Functional style template constructors. Documentation: http://9il.github.io/phobosx/std.templatecons.html Source: https://github.com/9il/phobosx/blob/master/std/templatecons.d Note: dmd >= 2.64 required Please destroy! I

Re: Expanding the horizons of D purity

2013-11-11 Thread Denis Shelomovskij
07.11.2013 21:41, H. S. Teoh пишет: On Thu, Nov 07, 2013 at 09:22:47PM +0400, Denis Shelomovskij wrote: 01.11.2013 0:05, H. S. Teoh пишет: I'd like to propose extending the scope of weak purity one step further: allow weakly-pure functions to call (not necessarily pure) delegates passed

Re: Expanding the horizons of D purity

2013-11-07 Thread Denis Shelomovskij
01.11.2013 0:05, H. S. Teoh пишет: I'd like to propose extending the scope of weak purity one step further: allow weakly-pure functions to call (not necessarily pure) delegates passed as a parameter. Unacceptable. It will break strongly purity. Your mistake is strongly pure function can easily

Re: Copy elision by spec

2013-11-05 Thread Denis Shelomovskij
04.11.2013 11:02, Lars T. Kyllingstad пишет: My question is therefore, is this by design? Can I rely on this to work in the future, and on all compilers? If this is the case, it really should be added to the spec. This is Issue 10372 [1]. [1] https://d.puremagic.com/issues/show_bug.cgi?id=10

Re: Expanding the horizons of D purity

2013-11-02 Thread Denis Shelomovskij
01.11.2013 21:12, H. S. Teoh пишет: On Fri, Nov 01, 2013 at 08:59:29PM +0400, Denis Shelomovskij wrote: 01.11.2013 0:05, H. S. Teoh пишет: [...] So, in a nutshell, my proposal is: - Functions that, besides invoking a delegate parameter, are pure, should be allowed to be marked as pure

Re: Expanding the horizons of D purity

2013-11-01 Thread Denis Shelomovskij
01.11.2013 0:05, H. S. Teoh пишет: [I actually came up with this idea last week, but decided to postpone bringing it up until all the furor about Andrei's new allocator design has settled a little. ;-)] One of the neatest things about purity in D is that traditionally impure operations like muta

Re: Tristate - wanna?

2013-10-28 Thread Denis Shelomovskij
27.10.2013 4:08, Timon Gehr пишет: On 10/26/2013 05:42 PM, Andrei Alexandrescu wrote: While messing with std.allocator I explored the type below. I ended up not using it, but was surprised that implementing it was quite nontrivial. Should we add it to stdlib? Theory: http://en.wikipedia.org/wik

Re: More on C++ stack arrays

2013-10-23 Thread Denis Shelomovskij
23.10.2013 1:05, Lionello Lunesu пишет: Careful! Alloca doesn't get cleaned up when used in loops! And I don't use `alloca`. -- Денис В. Шеломовский Denis V. Shelomovskij

Re: More on C++ stack arrays

2013-10-21 Thread Denis Shelomovskij
21.10.2013 18:04, dennis luehring пишет: "...Implementation note: For small strings tempCString will use stack allocated buffer, for large strings (approximately 1000 characters and more) it will allocate temporary one from unstd.memory.allocation.threadHeap..." does that mean that tempCString

Re: More on C++ stack arrays

2013-10-21 Thread Denis Shelomovskij
21.10.2013 14:30, Manu пишет: System interface functions that pass zero-terminated strings through to the OS are the primary offender, needless garbage, those should be on the stack. I like to use alloca too where it's appropriate. I'd definitely like if D had a variable-sized static array synta

Re: More on C++ stack arrays

2013-10-20 Thread Denis Shelomovskij
20.10.2013 18:25, bearophile пишет: More discussions about variable-sized stack-allocated arrays in C++, it seems there is no yet a consensus: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3810.pdf I'd like variable-sized stack-allocated arrays in D. I'd say the most common case on

Re: Petition to chime in Issue 1553 - foreach_reverse is allowed for delegates

2013-10-20 Thread Denis Shelomovskij
20.10.2013 15:29, Denis Shelomovskij пишет: `foreach_reverse` is allowed for delegates and do what `foreach` do thus causing dangerous confusion. Walter Bright is the only one for some obscure reason definitely for not deprecating this feature and WONTFIX-ed the issue. And yes, no big red note

Petition to chime in Issue 1553 - foreach_reverse is allowed for delegates

2013-10-20 Thread Denis Shelomovskij
`foreach_reverse` is allowed for delegates and do what `foreach` do thus causing dangerous confusion. Walter Bright is the only one for some obscure reason definitely for not deprecating this feature and WONTFIX-ed the issue. And yes, no big red note in docs about it. As always, this is even mo

Re: add -allinst compiler switch

2013-10-20 Thread Denis Shelomovskij
18.10.2013 11:17, Walter Bright пишет: Explained here: http://d.puremagic.com/issues/show_bug.cgi?id=11284 It's a bit complicated, and important. BTW, I hate the name of the switch, but haven't thought of anything better. Links to user complains are needed or the issue sounds not evident. E

Re: [Proposal] Weak reference implementation for D

2013-10-17 Thread Denis Shelomovskij
17.10.2013 12:09, Martin Nowak пишет: On 10/13/2013 09:47 AM, Denis Shelomovskij wrote: * Alex's one from MCI: https://github.com/lycus/mci/blob/f9165c287f92e4ef70674828fbadb33ee3967547/src/mci/core/weak.d I remember talking about this with Alex. He wanted to add some functio

Re: [Proposal] Weak reference implementation for D

2013-10-16 Thread Denis Shelomovskij
16.10.2013 3:20, Sean Kelly пишет: On Tuesday, 15 October 2013 at 22:09:17 UTC, Robert wrote: The problem is that destructors and thus the registered hooks for the dispose events are called when threads are already resumed. If this wasn't the case there would actually be no problems. Gotcha.

Re: [Proposal] Weak reference implementation for D

2013-10-16 Thread Denis Shelomovskij
16.10.2013 3:20, Sean Kelly пишет: On Tuesday, 15 October 2013 at 22:09:17 UTC, Robert wrote: The problem is that destructors and thus the registered hooks for the dispose events are called when threads are already resumed. If this wasn't the case there would actually be no problems. Gotcha.

Re: [Proposal] Weak reference implementation for D

2013-10-15 Thread Denis Shelomovskij
14.10.2013 17:42, robert пишет: Damn it, you are right I did not think this through, somehow thought the use in addrOf is enough, which is of course crap. Thank's a lot for your time, I'll fix this ASAP. So, here are your revised version: https://github.com/phobos-x/phobosx/blob/1f0016c84c2043d

Re: [Proposal] Weak reference implementation for D

2013-10-14 Thread Denis Shelomovskij
14.10.2013 13:04, robert пишет: Why would I be angry with a stranger who insults me in public? I don't understand your concerns. No insults assumed! Just ugly truth about all of us. ) If you are more experienced in this area I am glad if you share your insights and Walter and Andrei often

Re: [Proposal] Weak reference implementation for D

2013-10-13 Thread Denis Shelomovskij
13.10.2013 21:36, Robert пишет: * Robert's one from his new `std.signals` implementation proposal: https://github.com/phobos-x/phobosx/blob/d0cc6b45511465ef1d493b0d7226ccb990ae84e8/source/phobosx/signal.d Obviously I don't see it, otherwise I would have fixed it. Maybe you could ela

Re: [Proposal] Weak reference implementation for D

2013-10-13 Thread Denis Shelomovskij
13.10.2013 22:19, Walter Bright пишет: On 10/13/2013 12:47 AM, Denis Shelomovskij wrote: --- Proposal --- Please post as a DIP: http://wiki.dlang.org/DIPs The trouble with it as a n.g. posting is they tend to scroll off and be forgotten. Why? There is already enhancement request 4151 to

Re: [Proposal] Weak reference implementation for D

2013-10-13 Thread Denis Shelomovskij
13.10.2013 12:36, Benjamin Thaut пишет: Will rt_attachDisposeEvent also work with std.allocator? Or does it rely on the GC running? What exactly do you mean? `rt_attachDisposeEvent` adds delegate to `object.__monitor.devt` array which is called from `rt_finalize2 -> _d_monitordelete -> _d_mon

Re: [Proposal] Weak reference implementation for D

2013-10-13 Thread Denis Shelomovskij
13.10.2013 12:55, Sönke Ludwig пишет: Am 13.10.2013 09:47, schrieb Denis Shelomovskij: Just to reassure, the following race-condition doesn't exist, right? It looks like "GC.addRoot()" makes guarantees by taking the GC lock or something similar? time -> thre

[Proposal] Weak reference implementation for D

2013-10-13 Thread Denis Shelomovskij
--- Proposal --- The proposal is to add weak reference functionality based on `unstd.memory.weakref`. It can be placed e.g. in `core.memory`. Source code: https://bitbucket.org/denis-sh/unstandard/src/HEAD/unstd/memory/weakref.d Documentation: http://denis-sh.bitbucket.org/unstandard/unstd.m

Re: Rectangular multidimensional arrays for D

2013-10-09 Thread Denis Shelomovskij
09.10.2013 7:55, Nick B пишет: On Tuesday, 8 October 2013 at 17:26:46 UTC, Stefan Frijters wrote: andrei wrote: I too are interesteed in this area as well. Dennis do you only plan to focus on multidimensional arrays only, or will you incorporate the above matrices as well ?? What features are

Rectangular multidimensional arrays for D

2013-10-08 Thread Denis Shelomovskij
I accidentally discovered Andrei wrote [1] multidimensional array implementation is needed. If it really is, I will work to revise the API and prepare my implementation [2] for review if nobody is doing it already. Also as Kenji's "multidimensional indexing and slicing" pull [3] still not merg

Re: My thoughts & experiences with D so far, as a novice D coder

2013-10-08 Thread Denis Shelomovskij
28.03.2013 0:28, Andrei Alexandrescu пишет: On 3/27/13 3:18 PM, H. S. Teoh wrote: Which is what Denis' multidimensional array implementation does. As does my implementation as well. This seems to be quite a common use-case; we should put this into Phobos IMO. Agree. Do you (or Denis) have som

Re: What endiannesses do D support?

2013-10-04 Thread Denis Shelomovskij
04.10.2013 15:00, Alex Rønne Petersen пишет: On Friday, 4 October 2013 at 10:59:05 UTC, Denis Shelomovskij wrote: Some of druntime/phobos code assumes it is one of little/big endianness others have `static assert(0)` for third case. Lets clear the situation and make a decision. Little endian

What endiannesses do D support?

2013-10-04 Thread Denis Shelomovskij
Some of druntime/phobos code assumes it is one of little/big endianness others have `static assert(0)` for third case. Lets clear the situation and make a decision. -- Денис В. Шеломовский Denis V. Shelomovskij

Re: Bug 6186

2013-10-02 Thread Denis Shelomovskij
02.10.2013 23:03, Benjamin Thaut пишет: Am 02.10.2013 20:56, schrieb H. S. Teoh: On Wed, Oct 02, 2013 at 08:26:22PM +0200, Benjamin Thaut wrote: Well thats the problem with volenteer work. People usually pick something they interrested in. (Kenji beeing an exception to this rule) The most ann

Re: D2 is really that stable as it is claimed to be?

2013-09-25 Thread Denis Shelomovskij
21.09.2013 21:41, Zhouxuan пишет: http://d.puremagic.com/issues/show_bug.cgi?id=11086 http://d.puremagic.com/issues/show_bug.cgi?id=11010 http://d.puremagic.com/issues/show_bug.cgi?id=10970 I've found and reported these bugs after about merely 100 LOCs written down. Should I continue? Despite t

Re: D-thrift package detects regressions since 2.061, where is the regression suite located?

2013-08-23 Thread Denis Shelomovskij
13.08.2013 21:49, glycerine пишет: Grrr... Apparently nobody has been testing the D - Apache Thrift bindings since 2.061, and dmd has since accumulated multiple regressions that affect the correctness of the Thrift implementation. I emailed with David N. and he said that this was quite common fo

Re: Strict aliasing in D

2013-07-28 Thread Denis Shelomovskij
27.07.2013 12:59, Walter Bright пишет: On 7/27/2013 1:57 AM, David Nadlinger wrote: On Saturday, 27 July 2013 at 06:58:04 UTC, Walter Bright wrote: Although it isn't in the spec, D should be "strict aliasing". This is because: 1. it enables better code generation 2. there are ways, such as un

Re: Feature request: assert expressions should live inside version(assert)

2013-07-07 Thread Denis Shelomovskij
07.07.2013 17:12, Tommi пишет: On Sunday, 7 July 2013 at 12:30:28 UTC, Andrej Mitrovic wrote: On 7/7/13, Tommi wrote: Sometimes you need to have some extra data to check against in the assert expression. That data isn't needed in release mode when assertions are ignored. Therefore, you put tha

Add static code analyzing to dmd

2013-06-29 Thread Denis Shelomovskij
IMHO it's an important enhancement as I see no reasons for the compiler to not inform about may-be-an-error situations if the user asks as it will save a lot people time. Original issue: http://d.puremagic.com/issues/show_bug.cgi?id=9811 Description: There are things which may or may not indic

Re: DIP42 - Add enum E(T) = expression; eponymous template support

2013-06-29 Thread Denis Shelomovskij
26.06.2013 20:35, Andrej Mitrovic пишет: On 6/26/13, Denis Shelomovskij wrote: which will look better this way: --- static if (...) enum template = ...; else static if (...) enum template = ...; else ... --- Yeah I agree, this is more important than DIP42's shortened synta

What about to add costume projects to D autotester?

2013-06-29 Thread Denis Shelomovskij
As dmd is actively developed approximately every 2 weeks (since May) I have to find a cause for a regression which takes few hours and is a bit annoying as it looks like a needless job. What about to introduce some benefit criteria (regressions discovered by the project e.g.) relying on which

Re: DIP42 - Add enum E(T) = expression; eponymous template support

2013-06-26 Thread Denis Shelomovskij
26.06.2013 1:31, Walter Bright пишет: http://wiki.dlang.org/DIP42 What about enhancement 7364 [1] (from [2] discussion)? As we still have such cases: --- static if (...) enum fullyQualifiedNameImplForTypes = ...; else static if (...) enum fullyQualifiedNameImplForTypes = ...; else stat

Re: std.signals regressions

2013-06-14 Thread Denis Shelomovskij
14.06.2013 18:31, David пишет: This code currently fails with a RangeError (used to work in 2.062) // http://dpaste.dzfl.pl/332a71ec import std.stdio; import std.signals; struct X { mixin Signal!(); } class O { void m() {} } void main() { O o = new O(); X[stri

Re: about "with statement"

2013-06-10 Thread Denis Shelomovskij
09.06.2013 14:11, khurshid пишет: D language have like Pascal/Delphi "with statement", which very useful for writing readable code. http://dlang.org/statement.html#WithStatement Maybe I'm wrong, but, I never saw where using this statement in phobos source codes, what problem using this state

Re: Any plans to fix Issue 9044? aka Language stability question again

2013-06-03 Thread Denis Shelomovskij
25.05.2013 14:07, Denis Shelomovskij пишет: As those of you who do write some non-toy projects in D know, from time to time you projects become unbuildable because of Issue 9044 [1] an you have to juggle with files and randomly copy/move functions from one library to another to "detrigger

Re: Need some opinions for a GUI editor

2013-05-29 Thread Denis Shelomovskij
29.05.2013 1:25, Flamaros пишет: Hi, I and a friend are developing a GUI library, and now our script engine is ready to start a prototype (but far to be finished). We think to try to create a GUI editor based on our library. In this way, we'll see which features are need. My concern is about ho

Re: Discussion of TypeTuple naming

2013-05-28 Thread Denis Shelomovskij
27.05.2013 15:36, Diggory пишет: I gather this has been discussed before and even a potential solution submitted (https://github.com/D-Programming-Language/phobos/pull/780) However it was dismissed due to too much existing code being broken. I'd like to suggest a slightly less severe change whi

Any plans to fix Issue 9044? aka Language stability question again

2013-05-25 Thread Denis Shelomovskij
As those of you who do write some non-toy projects in D know, from time to time you projects become unbuildable because of Issue 9044 [1] an you have to juggle with files and randomly copy/move functions from one library to another to "detrigger" the issue creating mess marked "Issue 9044 worka

Re: I wrote a JSON library

2013-05-10 Thread Denis Shelomovskij
07.05.2013 11:29, w0rp пишет: I wasn't quite satisfied with std.json or the JSON libraries in frameworks. The standard library doesn't make it easy enough to create JSON objects, and my primary objection for the framework solutions is that they seem to depend on other parts of the frameworks. (I'

Re: clear() causes crash?

2013-05-10 Thread Denis Shelomovskij
30.04.2013 1:04, "Luís Marques" " пишет: This crashes in the last line of main: class A { void foo() {} } void main() { A a = new A(); a.foo(); clear(a); assert(a !is null); a.foo(); // crashes } As far as I u

Re: Is there any plans to make working signals in D?

2013-04-26 Thread Denis Shelomovskij
24.04.2013 12:47, deadalnix пишет: On Wednesday, 24 April 2013 at 08:27:15 UTC, Denis Shelomovskij wrote: 19.04.2013 11:45, deadalnix пишет: On Friday, 19 April 2013 at 07:31:16 UTC, Denis Shelomovskij wrote: Another try to describe the problem: When I get a delegate, I'd like to u

Re: Is there any plans to make working signals in D?

2013-04-24 Thread Denis Shelomovskij
19.04.2013 11:45, deadalnix пишет: On Friday, 19 April 2013 at 07:31:16 UTC, Denis Shelomovskij wrote: Another try to describe the problem: When I get a delegate, I'd like to use it unless it become invalid. How does using an object solve that ? Unless this is a struct-member del

Re: Is there any plans to make working signals in D?

2013-04-19 Thread Denis Shelomovskij
18.04.2013 18:21, deadalnix пишет: On Thursday, 18 April 2013 at 13:25:32 UTC, Denis Shelomovskij wrote: - What is the fundamental problem. When a delegate is created information about it's outer scope is lost instead of being stored in it's ptr. That doesn't mean anything.

Re: Is there any plans to make working signals in D?

2013-04-18 Thread Denis Shelomovskij
17.04.2013 19:47, deadalnix пишет: On Wednesday, 17 April 2013 at 10:35:08 UTC, Denis Shelomovskij wrote: Can you explain what is the problem ? Code in Issue 9603 doesn't work. That is not explaining what is the problem. This should contains at least : - Why it doesn't work.

Re: Is there any plans to make working signals in D?

2013-04-18 Thread Denis Shelomovskij
17.04.2013 15:26, Timon Gehr пишет: On 04/17/2013 12:35 PM, Denis Shelomovskij wrote: ... It will make code in Issue 9603 work. You have to argue why this is the correct way to fix it. Why would lifetime control necessarily be linked to implicit object field overhead? 0. I do like this

Re: Is there any plans to make working signals in D?

2013-04-17 Thread Denis Shelomovskij
17.04.2013 10:43, deadalnix пишет: On Wednesday, 17 April 2013 at 06:15:43 UTC, Denis Shelomovskij wrote: Current behaviour when delegates stays alive when its outer scope is destroyed is just a bad language design. No, destroying is unsafe by definition, and this is why GC solve a lot of

Re: Is there any plans to make working signals in D?

2013-04-16 Thread Denis Shelomovskij
16.04.2013 13:17, deadalnix пишет: On Tuesday, 16 April 2013 at 07:55:51 UTC, Denis Shelomovskij wrote: Sorry, I really don't understand what you don't understand. Let's consider example from Issue 9603 Comment 2 [1]. Do you think such code must not work? Also you can look thr

Re: Is there any plans to make working signals in D?

2013-04-16 Thread Denis Shelomovskij
16.04.2013 10:10, deadalnix пишет: On Tuesday, 16 April 2013 at 05:39:32 UTC, Denis Shelomovskij wrote: Do you mean that tracking an object with a delegate whenever it goes to just know where it's outer scope is destroyed is not a problem? Delegate context is allocated on the heap, u

Re: Is there any plans to make working signals in D?

2013-04-15 Thread Denis Shelomovskij
15.04.2013 20:15, deadalnix пишет: On Monday, 15 April 2013 at 12:07:19 UTC, Denis Shelomovskij wrote: 15.04.2013 13:07, Robert пишет: 2. Make regular D objects on closures [4] to be able to know when delegate's outer scope is destroyed (this will auto-fix both [5] and [2], see Comment 2

Re: Is there any plans to make working signals in D?

2013-04-15 Thread Denis Shelomovskij
15.04.2013 13:07, Robert пишет: 2. Make regular D objects on closures [4] to be able to know when delegate's outer scope is destroyed (this will auto-fix both [5] and [2], see Comment 2 of [2] for code example) I still don't understand what that buys us. Having a closure being an object would m

Re: Is there any plans to make working signals in D?

2013-04-14 Thread Denis Shelomovskij
14.04.2013 21:07, Robert пишет: Does it mean you disagree with proposed compiler changes and with the idea we have to create weak reference functionality instead of recreating it every time it is needed (beside of theoretical danger such approach already showed it as a bad thing with `std.stdio.F

Re: Is there any plans to make working signals in D?

2013-04-14 Thread Denis Shelomovskij
15.04.2013 7:46, deadalnix пишет: On Sunday, 14 April 2013 at 07:06:12 UTC, Denis Shelomovskij wrote: For "working signals" I suppose will be enough fixing of both Issue 9606 [1] and Issue 9603 [2]. IMO, for the first issue we need weak references [3]. IMO, for the second issue we ne

Re: Is there any plans to make working signals in D?

2013-04-14 Thread Denis Shelomovskij
14.04.2013 15:22, Robert пишет: There is: http://wiki.dlang.org/Review_Queue It is currently blocked by: http://d.puremagic.com/issues/show_bug.cgi?id=8441 There is already a pull request for 8441, but it was not merged yet. As soon as 8441 gets fixed, I am going to finish up the implementatio

Is there any plans to make working signals in D?

2013-04-14 Thread Denis Shelomovskij
For "working signals" I suppose will be enough fixing of both Issue 9606 [1] and Issue 9603 [2]. IMO, for the first issue we need weak references [3]. IMO, for the second issue we need to make regular D objects on closures [4] and fix Issue 9602 [5]. Any thoughts about my proposal to make sig

Re: PHP extension in D

2013-04-11 Thread Denis Shelomovskij
11.04.2013 15:28, gedaiu пишет: Hi, I want to extend Php with an extension written in D, and wrap some D classes in php. My questions are: 1. How I can build a static library(I am using eclipse with ddt) 2. How I can create methods and create objects in c++ from the D library. Post such quest

Re: Sooo, umm, status of Optlink Issue #6144?

2013-04-10 Thread Denis Shelomovskij
08.04.2013 23:33, Nick Sabalausky пишет: Regarding the blocker "Unexpected OPTLINK Termination at EIP=00428DA3": http://d.puremagic.com/issues/show_bug.cgi?id=6144 I'm hitting on that issue now too, and it's a royal PITA since I can't even get stack traces, there's no obvious way to de-trigger t

Re: Sooo, umm, status of Optlink Issue #6144?

2013-04-10 Thread Denis Shelomovskij
10.04.2013 2:20, Walter Bright пишет: On 4/9/2013 2:41 PM, Denis Shelomovskij wrote: But I have to say I see the only one reason for it here. It is "Wow, that nasty person who used to insult everybody just did something useful. Lets say "Thanks" hoping he will like it and beg

Re: Sooo, umm, status of Optlink Issue #6144?

2013-04-09 Thread Denis Shelomovskij
10.04.2013 0:44, Walter Bright пишет: On 4/9/2013 4:10 AM, Denis Shelomovskij wrote: If you are not interesting in developing OPTLINK but want to live without Issue 6144, email me (on this address or without ".reg" suffix) and I'll send you fixed OPTLINK. Denis, I have neglect

Re: Linear algebra library

2013-04-09 Thread Denis Shelomovskij
09.04.2013 17:52, Maksim Zholudev пишет: Hello! It looks like SciD [1] is obsolete and work on its reincarnation [2] have not been started yet. Here is yet another linear algebra library for D: https://github.com/MaksimZh/linalg/wiki It was inspired by proposal [2] but has some differences: 1

Re: Sooo, umm, status of Optlink Issue #6144?

2013-04-09 Thread Denis Shelomovskij
08.04.2013 23:33, Nick Sabalausky пишет: Regarding the blocker "Unexpected OPTLINK Termination at EIP=00428DA3": http://d.puremagic.com/issues/show_bug.cgi?id=6144 I'm hitting on that issue now too, and it's a royal PITA since I can't even get stack traces, there's no obvious way to de-trigger t

Re: Sooo, umm, status of Optlink Issue #6144?

2013-04-09 Thread Denis Shelomovskij
mportantly, is there any info/files/etc I can provide to help out, or is everything needed already known and merely awaiting a fix from anyone who knows much more about optlink than I do? Denis Shelomovskij has a pull request for optlink on it: https://github.com/DigitalMars/optlink/pull/8 You can g

Re: OSX users out there? Serious bug (I think)

2013-04-03 Thread Denis Shelomovskij
04.04.2013 0:54, Andrei Alexandrescu пишет: On 4/3/13 3:40 PM, Denis Shelomovskij wrote: This is "Issue 7648 - std.stdio expects file names to be encoded in CP_ACP on Windows instead of UTF-8" [1]. I also opened a pull with cautionary note [2]. [1] http://d.puremagic.com/issues/show_

Re: OSX users out there? Serious bug (I think)

2013-04-03 Thread Denis Shelomovskij
03.04.2013 21:35, Andrei Alexandrescu пишет: On 4/2/13 4:45 AM, Denis Shelomovskij wrote: I'm worrying about newbies who can start using the language as there is no warning on the main site about some shortcomings everybody have to be informed about. Damn, `std.stdio.File` is positioned

Re: OSX users out there? Serious bug (I think)

2013-04-03 Thread Denis Shelomovskij
02.04.2013 18:37, Nick Sabalausky пишет: On Tue, 02 Apr 2013 11:20:26 +0400 Denis Shelomovskij wrote: P.S. Also, Nick, if you have time, could you show me, how do you suggest "to use D reliably" in non toy Windows projects as you "never said anything" against it?

Re: OSX users out there? Serious bug (I think)

2013-04-02 Thread Denis Shelomovskij
01.04.2013 19:50, Andrei Alexandrescu пишет: On 4/1/13 11:21 AM, Denis Shelomovskij wrote: 01.04.2013 0:02, monarch_dodra пишет: Bitch please! [snip] Denis, the above (as well as most of the message that follows) is entirely inappropriate. Can't agree. I think the complaining is reaso

Re: OSX users out there? Serious bug (I think)

2013-04-02 Thread Denis Shelomovskij
01.04.2013 20:19, Nick Sabalausky пишет: On Mon, 01 Apr 2013 11:50:22 -0400 Andrei Alexandrescu wrote: On 4/1/13 11:21 AM, Denis Shelomovskij wrote: 01.04.2013 0:02, monarch_dodra пишет: This is a two part post. The reason I'm worried about this bug is that the only condition that see

Re: OSX users out there? Serious bug (I think)

2013-04-01 Thread Denis Shelomovskij
01.04.2013 0:02, monarch_dodra пишет: This is a two part post. The reason I'm worried about this bug is that the only condition that seems to trigger it passing an object that has a destructor. I find this is very bothersome, because it can happen with perfectly safe code, and its "observable co

  1   2   3   >