Re: Do everything in Java…

2014-12-07 Thread Dmitry Olshansky via Digitalmars-d
08-Dec-2014 01:38, John Colvin пишет: On Sunday, 7 December 2014 at 22:13:50 UTC, Dmitry Olshansky wrote: 08-Dec-2014 00:36, John Colvin пишет: On Sunday, 7 December 2014 at 19:56:49 UTC, Dmitry Olshansky wrote: 06-Dec-2014 18:33, H. S. Teoh via Digitalmars-d пишет: On Sat, Dec 06, 2014 at

Re: Do everything in Java…

2014-12-07 Thread Dmitry Olshansky via Digitalmars-d
08-Dec-2014 00:36, John Colvin пишет: On Sunday, 7 December 2014 at 19:56:49 UTC, Dmitry Olshansky wrote: 06-Dec-2014 18:33, H. S. Teoh via Digitalmars-d пишет: On Sat, Dec 06, 2014 at 03:26:08PM +, Russel Winder via Digitalmars-d wrote: [...] primitive are passed by value; arrays and

Re: Do everything in Java…

2014-12-07 Thread Dmitry Olshansky via Digitalmars-d
M for the last 2 years the only problem I've found is memory usage overhead of collections and non-trivial objects. In my tests performance of simple numeric code was actually better with Scala (not even plain Java) then with D (LDC), for instance. -- Dmitry Olshansky

Re: Do everything in Java…

2014-12-07 Thread Dmitry Olshansky via Digitalmars-d
07-Dec-2014 16:39, Dicebot пишет: On Saturday, 6 December 2014 at 09:07:34 UTC, Dmitry Olshansky wrote: Solved in Scala: - operator overloading - properties - that + optional (), a library writer still can enforce () to be used - only and exactly one class - any number in any combination

Re: Do everything in Java…

2014-12-06 Thread Dmitry Olshansky via Digitalmars-d
os which is even more powerful -- Dmitry Olshansky

Re: Need help deciphering posix.mak

2014-12-05 Thread Dmitry Olshansky via Digitalmars-d
nal dependency, but it's one we're already planning to add for dmd. Well I might do just that once I complete my SCons proof of concept. Do I take it right that nobody would be opposed to a D build tool (somewhat dumb but no worse then makefiles) ? -- Dmitry Olshansky

Re: Need help deciphering posix.mak

2014-12-05 Thread Dmitry Olshansky via Digitalmars-d
05-Dec-2014 03:02, Trent Forkert пишет: On Thursday, 4 December 2014 at 19:52:12 UTC, Dmitry Olshansky wrote: 04-Dec-2014 18:32, Dicebot пишет: Please no additional 3d-party dependencies for D core tool stack. What are current 3rd-party deps? Dependency on DMC make and compiler is already

Re: Need help deciphering posix.mak

2014-12-04 Thread Dmitry Olshansky via Digitalmars-d
04-Dec-2014 18:32, Dicebot пишет: Please no additional 3d-party dependencies for D core tool stack. What are current 3rd-party deps? Dependency on DMC make and compiler is already there, GNU make is not installed by default on FreeBSD. What would you suggest we do? -- Dmitry Olshansky

Re: Need help deciphering posix.mak

2014-12-03 Thread Dmitry Olshansky via Digitalmars-d
01-Dec-2014 16:59, Martin Nowak пишет: On Thursday, 27 November 2014 at 20:17:55 UTC, Dmitry Olshansky wrote: What I know(?) so far: 1. First we build library in one go - trivial to reproduce. 2. Then we compile each unittest with -c and -deps to dump actual dependencies. Yes, we compile one

Re: Phobos - breaking existing code

2014-11-30 Thread Dmitry Olshansky via Digitalmars-d
01-Dec-2014 01:44, Walter Bright пишет: On 11/30/2014 12:28 PM, Dmitry Olshansky wrote: 30-Nov-2014 23:22, Walter Bright пишет: On 11/30/2014 7:36 AM, H. S. Teoh via Digitalmars-d wrote: Good idea! We should archive docs from older versions of Phobos and make them accessible on dlang.org. I&#

Re: Phobos - breaking existing code

2014-11-30 Thread Dmitry Olshansky via Digitalmars-d
ost fails in library tests) of 2012 Google's Spuntik JavaScript test. -- Dmitry Olshansky

Re: Need help deciphering posix.mak

2014-11-30 Thread Dmitry Olshansky via Digitalmars-d
28-Nov-2014 00:39, H. S. Teoh via Digitalmars-d пишет: On Thu, Nov 27, 2014 at 11:30:49PM +0200, ketmar via Digitalmars-d wrote: On Thu, 27 Nov 2014 23:17:34 +0300 Dmitry Olshansky via Digitalmars-d wrote: Okay, so I'm prepping up a SCons build of Phobos. It comes along rather nicely,

Re: Need help deciphering posix.mak

2014-11-30 Thread Dmitry Olshansky via Digitalmars-d
somebody is willing to write CMake for Phobos. For me it always seemed a bit overcomplicated though the result is kind of nice, it still requires CMake itself installed so 1:1 on the extra dependency count. -- Dmitry Olshansky

Re: Need help deciphering posix.mak

2014-11-30 Thread Dmitry Olshansky via Digitalmars-d
en soon. i used to build DMD from git head, but i don't want to install python for that. ;-) There is an option to package SCons as stand-alone executable using any of the available python to exe tools. -- Dmitry Olshansky

Need help deciphering posix.mak

2014-11-27 Thread Dmitry Olshansky via Digitalmars-d
: about 60-70 LOCs) That means in general that SConstruct is changed only for new platform/compiler and SConscript only when source/targets structure radically changes. -- Dmitry Olshansky

Re: [OT] suggestions for a programmable drone on a budget?

2014-11-21 Thread Dmitry Olshansky via Digitalmars-d
19-Nov-2014 23:25, Dmitry Olshansky пишет: 4 proper DC motors + 4 power drivers for each + 12 or more of propellers E-hm let me correct myself else it sounds like 16 drivers which is pricy :) 1 driver per motor. Power (or motor) driver is the thing that allows a controller board to adjust

Re: [OT] suggestions for a programmable drone on a budget?

2014-11-21 Thread Dmitry Olshansky via Digitalmars-d
tually used Forth to program the flight controller - an 8-bit micro with ~256Kb (actually used about 40K) of ROM. Interpreter provided nice development cycle where we basically tuned the thing literally on the fly. -- Dmitry Olshansky

Re: [OT] suggestions for a programmable drone on a budget?

2014-11-19 Thread Dmitry Olshansky via Digitalmars-d
e. In a year or so it seems ;) As for budget the recipe goes - you either spend some more money or some more time. Overall it's not too costly if you don't go fancy with sensors, cameras and other cool extras. -- Dmitry Olshansky

Re: Can't pass private symbols as alias parameter

2014-11-17 Thread Dmitry Olshansky via Digitalmars-d
. Which one is it ? I think that it's a bug or a very annoying feature. I've seen it a few times before but never filed (I too wasn't sure if it's by design). -- Dmitry Olshansky

Re: Dynamic array as stack and GC.BlkAttr.APPENDABLE

2014-11-14 Thread Dmitry Olshansky via Digitalmars-d
15-Nov-2014 01:38, Steven Schveighoffer пишет: On 11/14/14 5:25 PM, Dmitry Olshansky wrote: 15-Nov-2014 01:16, IgorStepanov пишет: Recently I encountered the following problem. I need a simple stack of uint. I want to push uints back and pop it. I don't want to copy this stack and I want

Re: Dynamic array as stack and GC.BlkAttr.APPENDABLE

2014-11-14 Thread Dmitry Olshansky via Digitalmars-d
stack; my_stack.reserve(256); my_stack ~= 1; //push uint head = my_stack[$ - 1]; //top my_stack.length--; //pop Just make push into: my_stack.assumeSafeAppend(); my_stack ~= value; To avoid relocations. -- Dmitry Olshansky

Re: New std.range submodule

2014-11-14 Thread Dmitry Olshansky via Digitalmars-d
15-Nov-2014 00:17, Dicebot пишет: std.range.primitives ? +1 -- Dmitry Olshansky

Re: Microsoft now giving away VS 2013

2014-11-14 Thread Dmitry Olshansky via Digitalmars-d
14-Nov-2014 23:20, "Ola Fosheim Grøstad" " пишет: On Friday, 14 November 2014 at 19:38:44 UTC, Paulo Pinto wrote: On Friday, 14 November 2014 at 18:30:54 UTC, Dmitry Olshansky wrote: 14-Nov-2014 13:48, Paulo Pinto пишет: It is primitive compared to modern language standards

Re: Microsoft now giving away VS 2013

2014-11-14 Thread Dmitry Olshansky via Digitalmars-d
14-Nov-2014 22:38, Paulo Pinto пишет: On Friday, 14 November 2014 at 18:30:54 UTC, Dmitry Olshansky wrote: 14-Nov-2014 13:48, Paulo Pinto пишет: It is primitive compared to modern language standards, but companies see business value in it. Even Microsoft has joined the party with Azure

Re: On heap segregation, GC optimization and @nogc relaxing

2014-11-14 Thread Dmitry Olshansky via Digitalmars-d
13-Nov-2014 00:27, deadalnix пишет: On Wednesday, 12 November 2014 at 20:36:32 UTC, Dmitry Olshansky wrote: Seems sane. owned(Exception) would be implicitly assumed i.e.: catch(Exception e){ ... } would be seen by compiler as: catch(owned(Exception) e){ ... } What happens if I throw l-value

Re: Microsoft now giving away VS 2013

2014-11-14 Thread Dmitry Olshansky via Digitalmars-d
cause I use tools written in Perl doesn't mean I endorse Perl. -- Dmitry Olshansky

Re: On heap segregation, GC optimization and @nogc relaxing

2014-11-12 Thread Dmitry Olshansky via Digitalmars-d
ink this is a good one. The proposed approach allow for a lot of code to be marked as @nogc and allow for the caller to decide. That is ultimately what we want libraries to look like. I'm not sure I get all details but I like your proposal MUCH better then forcibly introducing ref-counting. -- Dmitry Olshansky

Re: Optimization fun

2014-11-08 Thread Dmitry Olshansky via Digitalmars-d
08-Nov-2014 03:22, Walter Bright пишет: On 11/7/2014 2:58 PM, Dmitry Olshansky wrote: That's the problem with profilers: they say what takes time but not why :) Often I find myself looking at memcpy at the top of the list, so obvious the "textbook" answer is to optimi

Re: Optimization fun

2014-11-07 Thread Dmitry Olshansky via Digitalmars-d
ers are bound to hit it once in the while. Memory safety "by default" has its costs. Though I'd just call mmap, far more predictable then these pesky memory allocators + no need to reallocate if reserved range is large enough. -- Dmitry Olshansky

Re: Algorithms to solve programming contest problems

2014-10-26 Thread Dmitry Olshansky via Digitalmars-d
ay ;) > Majority of scared cows must be killed, the sooner leaders realize the better. I think now that we have Dub repository, we could just let it grow and look at the fittest designs to boot the standard from. Maybe start labeling the most popular as "featured", and have "new" in the same vane. -- Dmitry Olshansky

Re: Postblit bug

2014-10-21 Thread Dmitry Olshansky via Digitalmars-d
21-Oct-2014 05:38, Jonathan M Davis via Digitalmars-d пишет: On Sunday, October 19, 2014 22:33:32 Dmitry Olshansky via Digitalmars-d wrote: 17-Oct-2014 16:42, Marco Leise пишет: Am Fri, 17 Oct 2014 00:42:24 + schrieb "IgorStepanov" : OK, I've run into the same problem and t

Re: Postblit bug

2014-10-19 Thread Dmitry Olshansky via Digitalmars-d
d (a-la Java). But the gain to semantic load factor is too small IMHO. -- Dmitry Olshansky

Re: Postblit bug

2014-10-19 Thread Dmitry Olshansky via Digitalmars-d
mutable method Lib.Sys.File.File.~this is not callable using a immutable object haha! I should start from scratch. Been there. Which implies that we can't have ref-counted const object (or ref-count has to leave outside of immutable section). -- Dmitry Olshansky

Re: On Phobos GC hunt

2014-10-16 Thread Dmitry Olshansky via Digitalmars-d
On Wednesday, 15 October 2014 at 11:25:58 UTC, Chris wrote: On Tuesday, 14 October 2014 at 13:29:33 UTC, Dmitry Olshansky wrote: On Wednesday, 8 October 2014 at 07:52:37 UTC, Dmitry Olshansky wrote: On Tuesday, 7 October 2014 at 21:59:08 UTC, Peter Alexander Okay, I think I should go a bit

Re: On Phobos GC hunt

2014-10-14 Thread Dmitry Olshansky via Digitalmars-d
On Wednesday, 8 October 2014 at 07:52:37 UTC, Dmitry Olshansky wrote: On Tuesday, 7 October 2014 at 21:59:08 UTC, Peter Alexander Okay, I think I should go a bit futher with the second version of the tool. Things on todo list: - make tool general enough to work for any GitHub based

Re: On Phobos GC hunt

2014-10-08 Thread Dmitry Olshansky via Digitalmars-d
On Wednesday, 8 October 2014 at 11:25:25 UTC, Johannes Pfau wrote: Am Tue, 07 Oct 2014 15:57:58 + schrieb "Dmitry Olshansky" : Instead we need to observe patterns and label it automatically until the non-trivial subset remains. So everybody, please take time and identify simpl

Re: On Phobos GC hunt

2014-10-08 Thread Dmitry Olshansky via Digitalmars-d
On Tuesday, 7 October 2014 at 16:23:19 UTC, grm wrote: 1.) It may be helpful to reduce the noise in that every match after a new is ignored (and probaly multiple 'operator ~' alarms within the same statement). The tool currently is quick line-based hack, hence no notion of statement. It's ind

Re: On Phobos GC hunt

2014-10-08 Thread Dmitry Olshansky via Digitalmars-d
On Tuesday, 7 October 2014 at 21:59:08 UTC, Peter Alexander wrote: On Tuesday, 7 October 2014 at 20:13:32 UTC, Jacob Carlborg wrote: I didn't look at any source code to see what "new" is actually allocating, for example. I did some random sampling, and it's 90% exceptions, with the occasional

On Phobos GC hunt

2014-10-07 Thread Dmitry Olshansky via Digitalmars-d
tterns and post back your ideas on solution(s). So far I see the most frequent cases: - `new SomeException` - switch to RC exceptions - AA access - ??? (use user-defined AA type as parameter?) - array concat - ??? - closure - ??? --- Dmitry Olshansky

Re: Program logic bugs vs input/environmental errors (checked exceptions)

2014-10-05 Thread Dmitry Olshansky via Digitalmars-d
06-Oct-2014 10:33, Jacob Carlborg пишет: On 05/10/14 23:50, Dmitry Olshansky wrote: Seems like it should be possible to define multiple interfaces for exceptions, and then catch by that (and/or combinations of such). Each of interface would be interested in a particular property of exception

Re: Program logic bugs vs input/environmental errors (checked exceptions)

2014-10-05 Thread Dmitry Olshansky via Digitalmars-d
PermissionException would mean process manipulation was forbiden, etc. Of course, some code may be interested only in PermissionException side of things, while other code may want to contain anything related to files, and the catch-all-sensible-ones inside of the main function. -- Dmitry Olshansky

Re: RFC: moving forward with @nogc Phobos

2014-10-03 Thread Dmitry Olshansky via Digitalmars-d
04-Oct-2014 00:56, Dmitry Olshansky пишет: 04-Oct-2014 00:42, Dmitry Olshansky пишет: 04-Oct-2014 00:21, Dmitry Olshansky пишет: 04-Oct-2014 00:21, Andrei Alexandrescu пишет: On 10/3/14, 1:18 PM, Dmitry Olshansky wrote: 03-Oct-2014 23:50, Andrei Alexandrescu пишет: [snip] Glad you liked it

Re: RFC: moving forward with @nogc Phobos

2014-10-03 Thread Dmitry Olshansky via Digitalmars-d
04-Oct-2014 00:42, Dmitry Olshansky пишет: 04-Oct-2014 00:21, Dmitry Olshansky пишет: 04-Oct-2014 00:21, Andrei Alexandrescu пишет: On 10/3/14, 1:18 PM, Dmitry Olshansky wrote: 03-Oct-2014 23:50, Andrei Alexandrescu пишет: [snip] Glad you liked it. Being in favor of automation as a start I

Re: RFC: moving forward with @nogc Phobos

2014-10-03 Thread Dmitry Olshansky via Digitalmars-d
04-Oct-2014 00:21, Dmitry Olshansky пишет: 04-Oct-2014 00:21, Andrei Alexandrescu пишет: On 10/3/14, 1:18 PM, Dmitry Olshansky wrote: 03-Oct-2014 23:50, Andrei Alexandrescu пишет: [snip] Glad you liked it. Being in favor of automation as a start I just toggled -vgc flag in Win64 makefile

Re: RFC: moving forward with @nogc Phobos

2014-10-03 Thread Dmitry Olshansky via Digitalmars-d
04-Oct-2014 00:21, Andrei Alexandrescu пишет: On 10/3/14, 1:18 PM, Dmitry Olshansky wrote: 03-Oct-2014 23:50, Andrei Alexandrescu пишет: On 10/3/14, 11:27 AM, Dmitry Olshansky wrote: 29-Sep-2014 14:49, Andrei Alexandrescu пишет: Back when I've first introduced RCString I hinted that we

Re: RFC: moving forward with @nogc Phobos

2014-10-03 Thread Dmitry Olshansky via Digitalmars-d
03-Oct-2014 23:50, Andrei Alexandrescu пишет: On 10/3/14, 11:27 AM, Dmitry Olshansky wrote: 29-Sep-2014 14:49, Andrei Alexandrescu пишет: Back when I've first introduced RCString I hinted that we have a larger strategy in mind. Here it is. [snip] I think it would be well worth

Re: std.utf.decode @nogc please

2014-10-03 Thread Dmitry Olshansky via Digitalmars-d
03-Oct-2014 23:51, Andrei Alexandrescu пишет: On 10/3/14, 11:35 AM, Dmitry Olshansky wrote: 01-Oct-2014 14:10, Robert burner Schadek пишет: lately when working on std.string I run into problems making stuff nogc as std.utf.decode is not nogc. https://issues.dlang.org/show_bug.cgi?id=13458

Re: No TypeTuple expansion for assert?

2014-10-03 Thread Dmitry Olshansky via Digitalmars-d
NOT COMPILE: // assert(args); // Must expand manually: assert(args[0], args[1]); } void main() { foo(true, "hi"); } Ali -- Dmitry Olshansky

Re: std.utf.decode @nogc please

2014-10-03 Thread Dmitry Olshansky via Digitalmars-d
exceptions. Literally we have easy TLS why not put 1 copy of each possible exception there? (**ck the chaining, who need it anyway?) b) Make all exceptions ref-counted. The benefit of A is that "creating" exceptions becomes MUCH faster. -- Dmitry Olshansky

Re: RFC: moving forward with @nogc Phobos

2014-10-03 Thread Dmitry Olshansky via Digitalmars-d
nough). Thanks! P.S. If there are no takers I'd get do myself it in a week or so. -- Dmitry Olshansky

Re: Creeping Bloat in Phobos

2014-09-30 Thread Dmitry Olshansky via Digitalmars-d
Now if the same inlining failure happens with other two compilers - that is something worth talking about (I don't know if it happens) +1 -- Dmitry Olshansky

Re: RFC: moving forward with @nogc Phobos

2014-09-30 Thread Dmitry Olshansky via Digitalmars-d
each function for the win? I'm at loss as to how it would make things better. -- Dmitry Olshansky

Re: Creeping Bloat in Phobos

2014-09-29 Thread Dmitry Olshansky via Digitalmars-d
29-Sep-2014 03:48, Walter Bright пишет: On 9/28/2014 2:00 PM, Dmitry Olshansky wrote: I've already stated my perception of the "no stinking exceptions", and "no destructors 'cause i want it fast" elsewhere. Code must be correct and fast, with correct being a pr

Re: Program logic bugs vs input/environmental errors

2014-09-28 Thread Dmitry Olshansky via Digitalmars-d
29-Sep-2014 01:21, Sean Kelly пишет: On Sunday, 28 September 2014 at 21:16:51 UTC, Dmitry Olshansky wrote: But otherwise agreed, dropping the whole process is not always a good idea or it easily becomes a DoS attack vector in a public service. What I really want to work towards is the Erlang

Re: Program logic bugs vs input/environmental errors

2014-09-28 Thread Dmitry Olshansky via Digitalmars-d
t otherwise agreed, dropping the whole process is not always a good idea or it easily becomes a DoS attack vector in a public service. -- Dmitry Olshansky

Re: Creeping Bloat in Phobos

2014-09-28 Thread Dmitry Olshansky via Digitalmars-d
with it in std lib. At least this way in not documented enough. Well on the bright side consider that C has lots of broken functions in stdlib, and even some that are _never_ safe like "gets" ;) -- Dmitry Olshansky

Re: Creeping Bloat in Phobos

2014-09-28 Thread Dmitry Olshansky via Digitalmars-d
formance tuning and speed hacks. Correct usually entails exceptions and automatic cleanup. I also do not believe the "exceptions have to be slow" motto, they are costly but proportion of such costs was largely exaggerated. -- Dmitry Olshansky

Re: Creeping Bloat in Phobos

2014-09-28 Thread Dmitry Olshansky via Digitalmars-d
a foreach loop over an autodecoding .front.) Yes, it has fast path. -- Dmitry Olshansky

Re: Creeping Bloat in Phobos

2014-09-28 Thread Dmitry Olshansky via Digitalmars-d
oint lookups on non-decoded strings: http://dlang.org/phobos/std_uni.html#.utfMatcher And to create sets of codepoints to detect with matcher: http://dlang.org/phobos/std_uni.html#.CodepointSet -- Dmitry Olshansky

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-28 Thread Dmitry Olshansky via Digitalmars-d
28-Sep-2014 16:42, Andrei Alexandrescu пишет: On 9/28/14, 3:40 AM, Dmitry Olshansky wrote: [snip] I don't think this is a feature worth adding. Fair enough. Personally I suspect compilers would have to go a long way yet to optimize away ref-counts decently enough without

Re: Creeping Bloat in Phobos

2014-09-28 Thread Dmitry Olshansky via Digitalmars-d
where) that can be done. Guys, when developing Phobos/Druntime code, please look at the assembler once in a while and see what is being wrought. You may be appalled, too. -- Dmitry Olshansky

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-28 Thread Dmitry Olshansky via Digitalmars-d
28-Sep-2014 00:16, Andrei Alexandrescu пишет: On 9/27/14, 12:50 PM, Dmitry Olshansky wrote: 27-Sep-2014 23:14, Andrei Alexandrescu пишет: On 9/27/14, 2:38 AM, Dmitry Olshansky wrote: Okay it serves no good for me to make these tiny comments while on the go. As usual, structs are value types

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Dmitry Olshansky via Digitalmars-d
27-Sep-2014 23:15, Andrei Alexandrescu пишет: On 9/27/14, 2:43 AM, Dmitry Olshansky wrote: Refcounting is process of add(x), and sub(x), and calling destructor should the subtract call report zero. Everything else is in the hands of the creator. I literally have no idea what you are

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Dmitry Olshansky via Digitalmars-d
27-Sep-2014 23:14, Andrei Alexandrescu пишет: On 9/27/14, 2:38 AM, Dmitry Olshansky wrote: Okay it serves no good for me to make these tiny comments while on the go. As usual, structs are value types, so this feature can be mis-used, no two thoughts abouts it. It may need a bit of improvement

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Dmitry Olshansky via Digitalmars-d
27-Sep-2014 14:23, "Marc Schütz" " пишет: On Saturday, 27 September 2014 at 09:38:35 UTC, Dmitry Olshansky wrote: The good thing w.r.t. to memory about structs - they are themselves already allocated "somewhere", and it's only ref-counted payload that is all

Re: Announcing libasync, a cross-platform D event loop

2014-09-27 Thread Dmitry Olshansky via Digitalmars-d
arked for future ;) -- Dmitry Olshansky

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Dmitry Olshansky via Digitalmars-d
26-Sep-2014 06:49, Ola Fosheim Grostad пишет: Analysis of Go growth / usage. http://redmonk.com/dberkholz/2014/03/18/go-the-emerging-language-of-cloud-infrastructure/ Google was popular last time I heard, so does their language. -- Dmitry Olshansky

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Dmitry Olshansky via Digitalmars-d
25-Sep-2014 17:31, Ola Fosheim Grostad пишет: On Monday, 22 September 2014 at 19:58:31 UTC, Dmitry Olshansky wrote: 22-Sep-2014 13:45, Ola Fosheim Grostad пишет: Locking fibers to threads will cost you more than using threadsafe features. One 300ms request can then starve waiting fibers even

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Dmitry Olshansky via Digitalmars-d
COM) MS COM etc. Refcounting is process of add(x), and sub(x), and calling destructor should the subtract call report zero. Everything else is in the hands of the creator. -- Dmitry Olshansky

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-27 Thread Dmitry Olshansky via Digitalmars-d
27-Sep-2014 02:51, Andrei Alexandrescu пишет: On 9/26/14, 2:50 PM, Dmitry Olshansky wrote: 24-Sep-2014 18:55, Andrei Alexandrescu пишет: On 9/24/14, 3:31 AM, Dmitry Olshansky wrote: 23-Sep-2014 19:13, Andrei Alexandrescu пишет: On 9/23/14, 12:17 AM, Dmitry Olshansky wrote: In my imagination

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-26 Thread Dmitry Olshansky via Digitalmars-d
24-Sep-2014 18:55, Andrei Alexandrescu пишет: On 9/24/14, 3:31 AM, Dmitry Olshansky wrote: 23-Sep-2014 19:13, Andrei Alexandrescu пишет: On 9/23/14, 12:17 AM, Dmitry Olshansky wrote: In my imagination it would be along the lines of @ARC struct MyCountedStuff{ void opInc(); void opDec

Re: What are the worst parts of D?

2014-09-25 Thread Dmitry Olshansky via Digitalmars-d
n a hill you describe. Most people using make/autotools say build systems are hard, it need not to be true but I'm obviously biased. -- Dmitry Olshansky

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-24 Thread Dmitry Olshansky via Digitalmars-d
23-Sep-2014 16:17, Manu via Digitalmars-d пишет: On 23 September 2014 17:17, Dmitry Olshansky via Digitalmars-d wrote: 23-Sep-2014 10:47, Manu via Digitalmars-d пишет: On 23 September 2014 16:19, deadalnix via Digitalmars-d mailto:digitalmars-d@puremagic.com>> wrote: On Tuesd

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-24 Thread Dmitry Olshansky via Digitalmars-d
23-Sep-2014 19:13, Andrei Alexandrescu пишет: On 9/23/14, 12:17 AM, Dmitry Olshansky wrote: In my imagination it would be along the lines of @ARC struct MyCountedStuff{ void opInc(); void opDec(); } So that would be a pointer type or a value type? Is there copy on write somewhere? -- Andrei

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-23 Thread Dmitry Olshansky via Digitalmars-d
sive ref-counts are useful too. And not everybody is thrilled by writing inc/dec code again and again. Then we can preserve the type of things, rather than obscuring them in layers of wrapper templates... This would be intrusive ref-counting which may be more efficient. -- Dmitry Olshansky

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-22 Thread Dmitry Olshansky via Digitalmars-d
23-Sep-2014 03:11, Andrei Alexandrescu пишет: On 9/22/14, 12:34 PM, Dmitry Olshansky wrote: 22-Sep-2014 01:45, Ola Fosheim Grostad пишет: On Sunday, 21 September 2014 at 17:52:42 UTC, Dmitry Olshansky wrote: to use non-atomic ref-counting and have far less cache pollution (the set of fibers

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-22 Thread Dmitry Olshansky via Digitalmars-d
blem statements are not going to prove your point. Pardon me making a personal statement, but for instance showing how Go avoids your problem and clearly specifying the exact conditions that cause it would go a long way to demonstrated whatever you wanted to. -- Dmitry Olshansky

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-22 Thread Dmitry Olshansky via Digitalmars-d
22-Sep-2014 01:45, Ola Fosheim Grostad пишет: On Sunday, 21 September 2014 at 17:52:42 UTC, Dmitry Olshansky wrote: to use non-atomic ref-counting and have far less cache pollution (the set of fibers to switch over is consistent). Caches are not a big deal when you wait for io. Go also

Re: RFC: reference counted Throwable

2014-09-21 Thread Dmitry Olshansky via Digitalmars-d
actly what Visual C++ does now for new style COM object (inherited from IInspectable). -- Dmitry Olshansky

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-21 Thread Dmitry Olshansky via Digitalmars-d
21-Sep-2014 13:06, Ola Fosheim Grostad пишет: On Sunday, 21 September 2014 at 08:24:46 UTC, Dmitry Olshansky wrote: Not spontaneously :) You'd have to cast to shared and back, and then you are on your own. Fiber is thread-local, shared(Fiber) isn't. That will have to change if Go i

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-21 Thread Dmitry Olshansky via Digitalmars-d
ocal, shared(Fiber) isn't. -- Dmitry Olshansky

Re: RFC: reference counted Throwable

2014-09-20 Thread Dmitry Olshansky via Digitalmars-d
ions being GC and not counted. -- Dmitry Olshansky

Re: Regarding Nullables

2014-09-14 Thread Dmitry Olshansky via Digitalmars-d
case ... } else { ... use r.front ... r.popFront; assert(r.empty); // just one element } Andrei -- Dmitry Olshansky

Re: @nogc and exceptions

2014-09-13 Thread Dmitry Olshansky via Digitalmars-d
13-Sep-2014 06:01, Jakob Ovrum пишет: On Friday, 12 September 2014 at 16:33:50 UTC, Dmitry Olshansky wrote: Agreed. I think that the total amount of live (not garbage) exceptions on heap is small for any typical application. Thus just special casing the hell out of exception allocation in the

Re: rvalues->ref args

2014-09-13 Thread Dmitry Olshansky via Digitalmars-d
13-Sep-2014 05:43, Manu via Digitalmars-d пишет: On 13 September 2014 03:14, monarch_dodra via Digitalmars-d mailto:digitalmars-d@puremagic.com>> wrote: On Friday, 12 September 2014 at 16:48:28 UTC, Dmitry Olshansky wrote: 08-Sep-2014 16:46, Manu via Digitalmars-d

Re: It turns out it's quite hard to have @safe pure nothrow functions. Oh, and const.

2014-09-12 Thread Dmitry Olshansky via Digitalmars-d
bar(void delegate(inout int*) dg) inout { // Not supported dg(p); } } Both of these issues have been discussed before and IIRC, consensus seemed to be that we do want to do something about them. -- Dmitry Olshansky

Re: rvalues->ref args

2014-09-12 Thread Dmitry Olshansky via Digitalmars-d
st legalese auto ref for normal functions and you are all set. The semantics end up to be pretty much the same as c++ const & does (not duplicating the function, like current template-style auto ref). -- Dmitry Olshansky

Re: @nogc and exceptions

2014-09-12 Thread Dmitry Olshansky via Digitalmars-d
s in order here. Agreed. I think that the total amount of live (not garbage) exceptions on heap is small for any typical application. Thus just special casing the hell out of exception allocation in the GC (and compiler) is IMO perfectly satisfactory hack. -- Dmitry Olshansky

Re: Using D

2014-09-07 Thread Dmitry Olshansky via Digitalmars-d
an be useful. Enterprise answer: - lots of libraries to chose from; Any JVM language has that. - lots of easy to find (replacable) programmers; That is both blessing and the curse. -- Paulo -- Dmitry Olshansky

Re: Encapsulating trust

2014-09-02 Thread Dmitry Olshansky via Digitalmars-d
;, then it is a program error for it to be marked @trusted. I agree with monarch_data, this is the executive summary, the salient point, the money shot, etc. Well, whatever. Let's wait to see where our code base goes. -- Dmitry Olshansky

Re: Encapsulating trust

2014-09-02 Thread Dmitry Olshansky via Digitalmars-d
31-Aug-2014 17:47, Dmitry Olshansky пишет: Quite recently a lot of work has been done to make most of Phobos usable in @safe code. ... What do you guys think? Probably a lot of people missed the point that if we standardize a few idioms (dangerous but at least centralized) we at least can

Re: Encapsulating trust

2014-09-02 Thread Dmitry Olshansky via Digitalmars-d
01-Sep-2014 20:36, Daniel Murphy пишет: "Dmitry Olshansky" wrote in message news:ltv91u$2mtc$1...@digitalmars.com... 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

Re: Encapsulating trust

2014-09-02 Thread Dmitry Olshansky via Digitalmars-d
ymore. Making things ugly doesn't make them safe or easier to verify. Somehow people expect the opposite, but just take a look at e.g. OpenSSL :) Slapping @trusted across whole functions just blurs the scope of system code (where? what was system? or maybe it's that pointer ... it&

Re: Encapsulating trust

2014-09-02 Thread Dmitry Olshansky via Digitalmars-d
02-Sep-2014 04:03, Walter Bright пишет: On 8/31/2014 6:47 AM, Dmitry Olshansky wrote: import core.stdc.string; import trusted; void main() @safe { char[] msg = "Hello!".dup; char[] msg2 = msg; import trusted; // may also use static import for absolute clarity a

Re: Encapsulating trust

2014-09-01 Thread Dmitry Olshansky via Digitalmars-d
01-Sep-2014 00:36, monarch_dodra пишет: On Sunday, 31 August 2014 at 13:47:42 UTC, Dmitry Olshansky wrote: What do you guys think? I'd say add "trusted" to those function names: "trustedCall" "trustedAddrOf" Would we ever use our module system? I agree

Encapsulating trust

2014-08-31 Thread Dmitry Olshansky via Digitalmars-d
at do you guys think? -- Dmitry Olshansky

Re: Relaxing the definition of isSomeString and isNarrowString

2014-08-24 Thread Dmitry Olshansky via Digitalmars-d
tion) Then use it as latin!"some-string-in-latin1" -- Dmitry Olshansky

Re: Some Notes on 'D for the Win'

2014-08-24 Thread Dmitry Olshansky via Digitalmars-d
acebook OS some day. Written in D, of course :) -- Dmitry Olshansky

Re: Relaxing the definition of isSomeString and isNarrowString

2014-08-24 Thread Dmitry Olshansky via Digitalmars-d
true, then D has done well and I'm unafraid of duck-typing here. -- Dmitry Olshansky

Re: Relaxing the definition of isSomeString and isNarrowString

2014-08-24 Thread Dmitry Olshansky via Digitalmars-d
24-Aug-2014 21:59, Andrei Alexandrescu пишет: On 8/24/14, 6:16 AM, Dmitry Olshansky wrote: 24-Aug-2014 16:24, Andrei Alexandrescu пишет: Speaking of data-structures I find just about the opposite. Most data structure are small, which must be the fact so fondly used by C++ vector: small

<    1   2   3   4   5   6   7   8   9   10   >