Re: isForwardRange failed to recognise valid forward range

2015-05-04 Thread ketmar via Digitalmars-d
On Mon, 04 May 2015 14:33:11 +, Alex Parrill wrote: > Add @property to save. another arcane knowledge. i'm seriously thinking about going back to C++, as i know that C++ is insane and full of such warts. and with C++ i have full access to all C and C++ libraries. consistency issues tend to

Re: Breaking changes in Visual C++ 2015

2015-05-07 Thread ketmar via Digitalmars-d
On Thu, 07 May 2015 12:16:17 +, d user wrote: > If you want D to stay unpopular, keep moving > towards Haskell with braces. i'll go with "Haskell with braces". signature.asc Description: PGP signature

Re: isForwardRange failed to recognise valid forward range

2015-05-07 Thread ketmar via Digitalmars-d
On Tue, 05 May 2015 18:28:11 +, Ola Fosheim Grøstad wrote: > Out of curiosity, did you give up on Aliced now that dmd is moving to D > from C++? in no way. actually, i'm waiting for "final move" (i.e. for dropping C++) to implement some features i want to have. Aliced is fully backwards co

Re: Making `object.opEquals' replaceable

2015-05-08 Thread ketmar via Digitalmars-d
On Fri, 08 May 2015 16:59:59 +, Manfred Nowak wrote: > Jonathan M Davis wrote: > >> And why not just use another function instead of opEquals for what you >> want? > > Because the local `opEquals' _is_ the overload-function for `==' and > `!='. > > I guess that your "another function"-opini

Re: isForwardRange failed to recognise valid forward range

2015-05-08 Thread ketmar via Digitalmars-d
On Thu, 07 May 2015 16:02:35 +, Ola Fosheim Grøstad wrote: > You probably would like to look at the language Pure before digging deep > into AST macros. It is based on term rewriting. thank you, i'll take a look at it. i remember that i met that name before. signature.asc Description: PGP s

Re: Runtime.traceHandler

2015-05-11 Thread ketmar via Digitalmars-d
On Sat, 09 May 2015 18:35:44 +, Márcio Martins wrote: > Hello! > > While working on getting better callstacks, I ran into what I think is a > nasty bug - The module constructor in runtime.d is overriding any custom > handler as soon as a new thread spawns, making this facility quite > annoyi

Re: CTFE ^^ (pow)

2018-03-17 Thread ketmar via Digitalmars-d
Manu wrote: What is so hard about implementing a pow intrinsic that CTFE can use? It's ridiculous that we can't CTFE any non-linear function... It's one of those blocker bugs that's been there almost 10 years. nobody bothered. it is all done by intercepting calls in CTFE engine (using FQN man

Re: CTFE ^^ (pow)

2018-03-18 Thread ketmar via Digitalmars-d
Nicholas Wilson wrote: On Sunday, 18 March 2018 at 04:25:48 UTC, Manu wrote: What is so hard about implementing a pow intrinsic that CTFE can use? It's ridiculous that we can't CTFE any non-linear function... It's one of those blocker bugs that's been there almost 10 years. Not all that much.

Re: Sealed classes - would you want them in D?

2018-05-11 Thread ketmar via Digitalmars-d
H. S. Teoh wrote: On Fri, May 11, 2018 at 05:28:48PM -0600, Jonathan M Davis via Digitalmars-d wrote: [...] what the OP wants is to have the class be publicly available while restricting who's allowed to derive from it, with the idea that a particular class hierarchy would have a well-defined s

Re: Sealed classes - would you want them in D?

2018-05-11 Thread ketmar via Digitalmars-d
H. S. Teoh wrote: p.s. and struct with `alias this` will allow us to extend it with fields too. not without using some other tricks, of course, but as there is a documented and ligitimate way to workaround any "sealing", i myself see a little sense in such feature. the only thing it will be go

Re: struct dtor never called, what's wrong?

2018-06-15 Thread ketmar via Digitalmars-d
Andrea Fontana wrote: I hope I'm wrong. Maybe I'm missing something. Anyone can help? you are not wrong, this is bug in DMDFE.

Re: How do I do this?

2017-08-03 Thread ketmar via Digitalmars-d
Shachar Shemesh wrote: Under D, there is no facility to transfer a string from the command line to the code, so I can't use that approach. module a; void mylog (string) { ... } module b; void mylog (string) { ... } module c; version(loga) import a; else import b; .. mylog("boo!"); ..

Re: RFC: Implementation of binary assignment operators (e.g s.x += 2) for @property functions

2017-08-14 Thread ketmar via Digitalmars-d
Michael V. Franklin wrote: An implementation of binary assignment operators for @property functions has been submitted to the DMD pull request queue at https://github.com/dlang/dmd/pull/7079. It addresses the following issues: Issue 8006 - Implement proper in-place-modification for properti

Re: dmd demangle

2017-08-30 Thread ketmar via Digitalmars-d
Arun Chandrasekaran wrote: Just a thought. Can dmd demangle the symbols before spitting the output of ld to stderr? no need to ;-) just add this to DFLAGS in dmd.conf, "Envirnment" section: -L--demangle=dlang so, it should look something like this: .. [Environment] DFLAGS= -L--demangle=dlan

Re: dmd demangle

2017-08-30 Thread ketmar via Digitalmars-d
Arun Chandrasekaran wrote: Just a thought. Can dmd demangle the symbols before spitting the output of ld to stderr? p.s.: redirecting output to ddemangle may work too, as ddemange will try to detect mangled DMD names, and won't modify other text. this way you can, for example, demangle names

Re: What is the Philosophy of D?

2017-10-15 Thread ketmar via Digitalmars-d
codephantom wrote: If the philosophy of C, is 'the programmer is in charge', what might the philosophy of D be? fast. safe. reliable. choose any three of 'em.

Re: What is the Philosophy of D?

2017-10-16 Thread ketmar via Digitalmars-d
codephantom wrote: I take it from your story, that one could say the philosophy of D, is: 'Do it your way'. and "have fun" too. this is important.

Re: What is wrong with core.stdc.signal ?

2017-10-27 Thread ketmar via Digitalmars-d
angel wrote: Core.stdc.signal.signal() requires that a signal handler function is "nothrow @nogc @system". These attributes impose quite a limitation - one cannot even print which signal was accepted. 'cause you CANNOT print in signal handler. you can do almost *nothing* in signal handler besi

Re: First Impressions!

2017-11-27 Thread ketmar via Digitalmars-d
A Guy With an Opinion wrote: That is true, but I'm still unconvinced that making the person's program likely to error is better than initializing a number to 0. Zero is such a fundamental default for so many things. And it would be consistent with the other number types. basically, default ini

Re: First Impressions!

2017-11-27 Thread ketmar via Digitalmars-d
A Guy With an Opinion wrote: Eh...I still don't agree. anyway, it is something that won't be changed, 'cause there may be code that rely on current default values. i'm not really trying to change your mind, i just tried to give a rationale behind the choice. that's why `char.init` is 255 too

Re: Question on Dual-Licensing Some Code for Phobos

2017-12-01 Thread ketmar via Digitalmars-d
Walter Bright wrote: You cannot add/change the license of software without permission from the copyright holder. Translating the code from one language to another does not erase the copyright - it's still a derived work. but you still can add another license to source code translation, if tha

Re: Question on Dual-Licensing Some Code for Phobos

2017-12-01 Thread ketmar via Digitalmars-d
Walter Bright wrote: On 12/1/2017 2:57 PM, ketmar wrote: Walter Bright wrote: You cannot add/change the license of software without permission from the copyright holder. Translating the code from one language to another does not erase the copyright - it's still a derived work. but you still

Re: @ctfeonly

2017-12-06 Thread ketmar via Digitalmars-d
H. S. Teoh wrote: On Thu, Dec 07, 2017 at 01:21:11AM +, Nicholas Wilson via Digitalmars-d wrote: I'd like to add an attribute to indicate that the annotated function is only available at compile time so that in cases where the operation is invalid at runtime (strings and concatenation on a

Re: @ctfeonly

2017-12-06 Thread ketmar via Digitalmars-d
Nicholas Wilson wrote: Also not generating the code in the first place means less I/O for the compiler and less work for the linker. this is solvable without any additional flags, tho: compiler should just skip codegen phase for any function that is not referenced by another compiled function

Re: @ctfeonly

2017-12-06 Thread ketmar via Digitalmars-d
ketmar wrote: Nicholas Wilson wrote: Also not generating the code in the first place means less I/O for the compiler and less work for the linker. this is solvable without any additional flags, tho: compiler should just skip codegen phase for any function that is not referenced by another co

Re: @ctfeonly

2017-12-07 Thread ketmar via Digitalmars-d
Walter Bright wrote: On 12/7/2017 5:30 PM, Manu wrote: I tried this, and was surprised it didn't work: int ctfeOnly(int x) { static assert(__ctfe); return x + 1; } The error is: test2.d(3): Error: variable __ctfe cannot be read at compile time test2.d(3):while evaluating: static asse

Re: @ctfeonly

2017-12-07 Thread ketmar via Digitalmars-d
ketmar wrote: still, why `__ctfe` was designed as variable, and not as `enum ctfe = ;`? p.s.: i see only one reason for this rationale: to explicitly prevent people using `static if` to separate CTFE and non-CTFE code (that is, to lessen the chance than function heaves differently in runtime

Re: @ctfeonly

2017-12-07 Thread ketmar via Digitalmars-d
ketmar wrote: still, why `__ctfe` was designed as variable, and not as `enum ctfe = ;`? ah, sorry, i remembered. that was stupid question. the rationale is: `static if` and `static assert` are processed *before* CTFE phase. i.e. CTFE interpreter never sees them, and cannot do the choice. an

Re: @ctfeonly

2017-12-07 Thread ketmar via Digitalmars-d
Mike Franklin wrote: // I couldn't figure out how to force `onlyCompileTime` to // execute at runtime. That's probably a good thing. string s = onlyCompileTime(); no compilation errors, runtime assert. that is, it is technically still executed in runtime.

Re: toChars Bug?

2017-12-12 Thread ketmar via Digitalmars-d
see documentation: http://dpldocs.info/experimental-docs/std.conv.toChars.html "...Can be uint or ulong. If radix is 10, can also be int or long." 45 is int, not uint. so no radices except `10` will work.

Re: toChars Bug?

2017-12-12 Thread ketmar via Digitalmars-d
p.s.: but no, i am wrong. foo(-42); this is perfectly valid for `foo (uint n)`, as D converts negative ints to uints without any warnings. so no, overloads won't fit.

Re: toChars Bug?

2017-12-12 Thread ketmar via Digitalmars-d
John Colvin wrote: On Tuesday, 12 December 2017 at 12:49:32 UTC, ketmar wrote: see documentation: http://dpldocs.info/experimental-docs/std.conv.toChars.html "...Can be uint or ulong. If radix is 10, can also be int or long." 45 is int, not uint. so no radices except `10` will work. I thin

Re: Some thoughts about C and D, return data through parameters

2017-12-19 Thread ketmar via Digitalmars-d
cosinus wrote: So my question is would it be a good idea to have some kind of implicit declarations of variables that are used as parameters: ```D int add(decl ref int c, int a, int b); // ... // c is unknown here if(add(c, 123, 456)) { writeln("error!"); } // c is implicit declared at

Re: Maybe D is right about GC after all !

2017-12-19 Thread ketmar via Digitalmars-d
rikki cattermole wrote: On 19/12/2017 9:54 AM, Walter Bright wrote: "C, Python, Go, and the Generalized Greenspun Law" http://esr.ibiblio.org/?p=7804 I must agree, GC is a wonderful fallback. Although I do wish we had better scope+RC support. but Rikki, we have this! i'm using refcounted s

Re: Maybe D is right about GC after all !

2017-12-19 Thread ketmar via Digitalmars-d
rikki cattermole wrote: On 19/12/2017 11:30 AM, ketmar wrote: rikki cattermole wrote: On 19/12/2017 9:54 AM, Walter Bright wrote: "C, Python, Go, and the Generalized Greenspun Law" http://esr.ibiblio.org/?p=7804 I must agree, GC is a wonderful fallback. Although I do wish we had better sc

Re: Some thoughts about C and D, return data through parameters

2017-12-19 Thread ketmar via Digitalmars-d
Steven Schveighoffer wrote: I insist that auto is a storage qualifier what is the rationale to have `auto` as storage qualifier? except of keeping it in line with the ancient C feature (and most C programmers don't even know what `auto` does in C). i bet that most people are sure that `aut

Re: Maybe D is right about GC after all !

2017-12-22 Thread ketmar via Digitalmars-d
bpr wrote: It seems that there's an effort from the top to bring more higher level features into --betterC. I agree with you that more should be there, that it should really be betterC++ and strive for feature parity with modern C++. we already have better c++: it is titled "D".

Re: Maybe D is right about GC after all !

2017-12-23 Thread ketmar via Digitalmars-d
Russel Winder wrote: I think we are now in a world where Rust is the zero cost abstraction language to replace C and C++, except for those who are determined to stay with C++ and evolve it. sorry, but it is not zero cost. we have alot of C and C++ code. converting it to Rust is not zero cost

Re: __traits(documentation, X)

2018-01-16 Thread ketmar via Digitalmars-d
Steven Schveighoffer wrote: I shudder at the thought of compiled code being affected by documentation. I don't like it, sorry. it's not really different from `version(DDoc)`, or string mixins, or UDAs. i can put documentation in UDA, and process code differently when UDA changes. yes, UDA i

Re: #dbugfix Issue 16189

2018-02-07 Thread ketmar via Digitalmars-d
Bastiaan Veelo wrote: On Wednesday, 7 February 2018 at 11:37:19 UTC, Michael wrote: Does it work with slightly varied examples like where a = -1, and is incremented etc.? I played with it here https://run.dlang.io/is/15sr6c and every variation I tried worked (correctly). So the example seems

Re: Old but interesting link as to the low adoption reason for D

2018-02-12 Thread ketmar via Digitalmars-d
Bo wrote: This is part of the issues that D faces. Especially that last sentence... "bring a significant benefit". tbh, the only *real* problem with D that i see is people who thinks that D (and D devs) should do everything to please "business developers". 'cause, you know, there is no sense

Re: Old but interesting link as to the low adoption reason for D

2018-02-13 Thread ketmar via Digitalmars-d
welkam wrote: On Monday, 12 February 2018 at 22:10:49 UTC, Bo wrote: * Lack of default OFFICIAL libraries like HTTP(s), database access, ... Why there should be one default OFFICIAL library for anything? because Business Developers wants it that way. they are... well... Doing Business, and

Re: Annotation of functions

2018-02-20 Thread ketmar via Digitalmars-d
psychoticRabbit wrote: On Tuesday, 20 February 2018 at 12:18:47 UTC, rikki cattermole wrote: So the point is moot. ok. I've come around... and the point reall is moot. so.. in that case..another idea...how about a compiler option to output a list of functions. (I don't really expect many w

Re: Translating C "static arrays" into D?

2018-02-26 Thread ketmar via Digitalmars-d
H. S. Teoh wrote: What's the correct translation of the following C declarations into D? typedef double[1] mytype; void someFunc(mytype x, mytype *y, mytype **z); struct SomeStruct { mytype x; mytype *y; mytype **z;

Re: Translating C "static arrays" into D?

2018-02-26 Thread ketmar via Digitalmars-d
H. S. Teoh wrote: On Mon, Feb 26, 2018 at 08:07:11PM +0200, ketmar via Digitalmars-d wrote: [...] in C, arrays are *always* decaying to pointers. so void foo (int x[2]) is the same as void foo (int* x) `[2]` is purely informational. that is, in D it will be: alias

Re: Slow code, slow

2018-02-26 Thread ketmar via Digitalmars-d
H. S. Teoh wrote: On Sat, Feb 24, 2018 at 09:43:35AM +, Stefan Koch via Digitalmars-d wrote: [...] This particular slowdown happens because there are somehow depdencies on std.format.format which is instantiated. Which has a ton of dependencies itself. Aha! That explains it. Thanks, St

Re: Slow code, slow

2018-02-26 Thread ketmar via Digitalmars-d
H. S. Teoh wrote: On Sat, Feb 24, 2018 at 09:43:35AM +, Stefan Koch via Digitalmars-d wrote: [...] This particular slowdown happens because there are somehow depdencies on std.format.format which is instantiated. Which has a ton of dependencies itself. Aha! That explains it. Thanks, St

Re: Slow code, slow

2018-02-26 Thread ketmar via Digitalmars-d
H. S. Teoh wrote: On Sat, Feb 24, 2018 at 09:43:35AM +, Stefan Koch via Digitalmars-d wrote: [...] This particular slowdown happens because there are somehow depdencies on std.format.format which is instantiated. Which has a ton of dependencies itself. Aha! That explains it. Thanks, St

Re: Slow code, slow

2018-02-26 Thread ketmar via Digitalmars-d
H. S. Teoh wrote: On Mon, Feb 26, 2018 at 08:38:39PM +0200, ketmar via Digitalmars-d wrote: H. S. Teoh wrote: On Sat, Feb 24, 2018 at 09:43:35AM +, Stefan Koch via Digitalmars-d wrote: [...] This particular slowdown happens because there are somehow depdencies on std.format.format which

Re: implicit construction operator

2018-02-26 Thread ketmar via Digitalmars-d
WebFreak001 wrote: Now before you would have only been able to do this: --- Nullable!Foo a; foo(a, Nullable!int(5)); --- but now you should also be able to do: --- Nullable!Foo x = null; Nullable!Foo y = 5; foo(null, 5); please no. such unobvious type conversions goes out of control really

Re: Slow code, slow

2018-02-26 Thread ketmar via Digitalmars-d
H. S. Teoh wrote: The problem is not the Phobos implementation. The problem is that the compiler's way of handling templates and CTFE needs to be improved. We seriously need to muster some manpower to help Stefan finish newCTFE, and then we need to take a serious look at improving the current

Re: implicit construction operator

2018-02-26 Thread ketmar via Digitalmars-d
aliak wrote: And if that's also a no no, how about char -> int. Or int -> float? Is ok? no, it is not ok. it was a mistake. it is now too late to fix it, but we can avoid doing more of the same kind.

Re: implicit construction operator

2018-02-26 Thread ketmar via Digitalmars-d
aliak wrote: It makes libraries *much* more intuitive and expressive (C++ just got it wrong by choosing the wrong default). If you allow library authors to opt in instead of opt out then it becomes a conscious decision for one. library authors can create overloads for various argument types.

Re: Slow code, slow

2018-02-26 Thread ketmar via Digitalmars-d
H. S. Teoh wrote: On Mon, Feb 26, 2018 at 10:12:25PM +0200, ketmar via Digitalmars-d wrote: [...] but until that brave new world materializes, we have a smart/fast dilemma. alas. I'd like to contribute to the materialization of that brave new world. Rather than sit around and wait for

Re: Slow code, slow

2018-02-27 Thread ketmar via Digitalmars-d
Martin Tschierschke wrote: On Tuesday, 27 February 2018 at 08:49:15 UTC, Stefan Koch wrote: On Monday, 26 February 2018 at 21:38:09 UTC, ketmar wrote: H. S. Teoh wrote: On Mon, Feb 26, 2018 at 10:12:25PM +0200, ketmar via Digitalmars-d wrote: [...] When looking at the problem of

Re: implicit construction operator

2018-02-27 Thread ketmar via Digitalmars-d
aliak wrote: On Monday, 26 February 2018 at 21:34:21 UTC, ketmar wrote: aliak wrote: And if that's also a no no, how about char -> int. Or int -> float? Is ok? no, it is not ok. it was a mistake. it is now too late to fix it, but we can avoid doing more of the same kind. Oops, yeah, ok,

Re: Slow code, slow

2018-02-27 Thread ketmar via Digitalmars-d
Martin Tschierschke wrote: basically, compilation of a code without templates is FAST. 500+ KB of source almost without templates often compiles in less than a second (on not-so-bleeding-edge i3, not even i7). but throw templates in a mix, and BOOM! coffee and cigarettes. My negative experi

Re: why not use git rebase instead of git merge in dlang repos?

2018-03-07 Thread ketmar via Digitalmars-d
Seb wrote: OT: I don't know what you are doing, but you seem to be the only one who always creates new threads when replying. I assume you use nntp? Maybe something wrong with your client? it was already discussed several times: this is the issue with mailing list processor: it cannot proper

Re: why not use git rebase instead of git merge in dlang repos?

2018-03-07 Thread ketmar via Digitalmars-d
H. S. Teoh wrote: I've pestered Brad about it before, but the real trouble is the Mailman software. If you feel motivated enough, pestering the upstream Mailman authors about it might actually get us closer to fixing this problem, as it really isn't a problem on Brad's end either. It's not unfi

Re: Remember when make -f posix.mak just worked for dmd from zip?

2018-03-12 Thread ketmar via Digitalmars-d
Seb wrote: Out of interest: Why would you compile the compiler from the release sources? After all, it's the binary release bundle and not the development build. Also there are tools like digger that automate everything for you... I understand that sometimes it can be nice to do that, but im

Re: Remember when make -f posix.mak just worked for dmd from zip?

2018-03-12 Thread ketmar via Digitalmars-d
Adam D. Ruppe wrote: compiler used to build the compiler... if i try to just build dmd from git i get `/home/me/d/dmd2/linux/bin32/../../src/druntime/import/core/exception.d(686): _store is thread local`) it is just a -vtls message, btw, absolutely harmless. i don't know why that reporting

Re: What about an identifier that is an mixin

2017-01-13 Thread ketmar via Digitalmars-d
On Friday, 13 January 2017 at 21:15:32 UTC, André Puel wrote: I think this could be useful when one is creating Idiom and Patterns, you could hide implementations details. it hides the fact that mixin is used, which may be undesirable. otherwise, template mixins will do: mixin template d

Re: Why not promoting team work?

2017-01-13 Thread ketmar via Digitalmars-d
On Saturday, 14 January 2017 at 02:28:34 UTC, nbro wrote: How could you do such a thing? freakin' easy: just pay people to do what you want. either that, or people will keep working on the things *they* are interested (and not someone else).

Re: Why not promoting team work?

2017-01-13 Thread ketmar via Digitalmars-d
On Saturday, 14 January 2017 at 03:05:44 UTC, nbro wrote: On Saturday, 14 January 2017 at 02:57:05 UTC, ketmar wrote: On Saturday, 14 January 2017 at 02:28:34 UTC, nbro wrote: How could you do such a thing? freakin' easy: just pay people to do what you want. either that, or people will keep

Re: CTFE Status

2017-02-14 Thread ketmar via Digitalmars-d
Jacob Carlborg wrote: 301 posts (302 with this one). Time for a new thread? please, no! i just downloaded 4500+ posts only to get the root of this thread! don't turn it into useless effort!

Re: D future ...

2017-02-15 Thread ketmar via Digitalmars-d
Jack Stouffer wrote: And I sincerely hope they work to fix them before adding in a bunch of new DIPs which will further complicate matters, especially with regard to function signitures. so far i see that they just like to say: "we won't break user's code", and then silently breaking it, eve

Re: D future ...

2017-02-15 Thread ketmar via Digitalmars-d
Jack Stouffer wrote: Can you please make a bug with a level of regression for your specific problem? yeah. https://issues.dlang.org/show_bug.cgi?id=17188

[OT] NNTP client and threading

2017-02-17 Thread ketmar via Digitalmars-d
Walter Bright wrote: Something is going on with your newsreader client. It's replies break the thread. i honestly don't know what is wrong there. i creating "In-Reply-To:" field, and DFeed is able to correctly link my posts (see web interface), and my own reader correctly links 'em too. i.e.

Re: D future ...

2017-02-17 Thread ketmar via Digitalmars-d
Walter Bright wrote: Something is going on with your newsreader client. It's replies break the thread. ooops. created the content, but forgot to actually send it. ;-)

Re: [OT] NNTP client and threading

2017-02-17 Thread ketmar via Digitalmars-d
Jacob Carlborg wrote: On 2017-02-17 08:56, ketmar wrote: Walter Bright wrote: Something is going on with your newsreader client. It's replies break the thread. i honestly don't know what is wrong there. i creating "In-Reply-To:" field, and DFeed is able to correctly link my posts (see web int

Re: [OT] NNTP client and threading

2017-02-17 Thread ketmar via Digitalmars-d
Ali Çehreli wrote: On 02/17/2017 09:52 AM, ketmar wrote: that one didn't had "References:" set -- i forgot to append 'em to headers. this one should have 'em. This one worked. Ali thank you. so mail readers aren't that smart after all. ;-)

Re: [OT] NNTP client and threading

2017-02-17 Thread ketmar via Digitalmars-d
Walter Bright wrote: My news archiver program: https://github.com/DigitalMars/ngArchiver relies on "References:", and if that is absent, looks for a "Re:" as the start of the "Subject:" text. i see. anyway, i added "References:" generation, so it should work now. feel free to write here or co

Re: [OT] NNTP client and threading

2017-02-18 Thread ketmar via Digitalmars-d
Vladimir Panteleev wrote: Even in the presence of "In-Reply-To", "References" is still useful when different parties see different Message-IDs (e.g. due to mailing-list gateways). That way, replies (except top-level replies) will still at least be nested in the right thread instead of appearin

Re: The end of curl (in phobos)

2017-02-18 Thread ketmar via Digitalmars-d
Seb wrote: So what's the consensus on this issue? leave curl where it is now. i am teh user. i have alot of code depending on std.net.curl. i hope that "we are not breaking user's code" motto is not just a PR slogan.

Re: [OT] NNTP client and threading

2017-02-18 Thread ketmar via Digitalmars-d
Walter Bright wrote: On 2/18/2017 1:37 PM, ketmar wrote: i think that we should have an article on wiki for client writers. no, really, some knowledge is here but never written, so people like me have to figure it out each time. not that there are so many client writers, of course, but... oh,

Re: [OT] NNTP client and threading

2017-02-18 Thread ketmar via Digitalmars-d
Walter Bright wrote: On 2/18/2017 2:11 PM, ketmar wrote: Walter Bright wrote: I'm curious about your client project. Can you post a link? sure: http://repo.or.cz/knntp.git I'm curious what problem this solves that other nntp clients do not. it perfectly fits my needs. i usually see little r

Re: [OT] NNTP client and threading

2017-02-19 Thread ketmar via Digitalmars-d
"Nick Sabalausky (Abscissa)" wrote: On 02/19/2017 02:50 AM, ketmar wrote: i usually see little reason to "adapt" myself to something if i can write my own thingy. Ditto to that. Thunderbird (or rather whatever version I've frozen it at) is the closest match to my needs I've seen so far, but it

Re: [OT] NNTP client and threading

2017-02-19 Thread ketmar via Digitalmars-d
Walter Bright wrote: On 2/18/2017 11:50 PM, ketmar wrote: I'm curious what problem this solves that other nntp clients do not. it perfectly fits my needs. i usually see little reason to "adapt" myself to something if i can write my own thingy. besides, writing code is fun. Haha, I understand pe

Re: [OT] NNTP client and threading

2017-02-19 Thread ketmar via Digitalmars-d
Walter Bright wrote: On 2/19/2017 6:17 PM, ketmar wrote: Walter Bright wrote: Haha, I understand perfectly. My problem is there aren't enough hours in the day to write my own versions of everything I use, yeah, the time is the greatest problem! ;-) so I settled for designing a language and

Re: Threads not garbage collected ?

2017-02-22 Thread ketmar via Digitalmars-d
Alex wrote: import core.thread; class A { Thread mThread; bool mStopped; this() { mThread = new Thread(&run); mThread.start(); } void run() { while (!mStopped) {

Re: Threads not garbage collected ?

2017-02-22 Thread ketmar via Digitalmars-d
Alex wrote: The thread can then prevent the program from exiting on exception or otherwise. If the garbage collector doesn't kill threads, do I need to break all encapsulation to call some sort of finalise or destroy function on every object in case it has a thread object in it ? It would prob

Re: If you needed any more evidence that memory safety is the future...

2017-02-23 Thread ketmar via Digitalmars-d
Jack Stouffer wrote: This is something that valgrind could have easily picked up, but the devs just didn't use it for some reason. Runtime checking of this stuff is important, so please, don't disable safety checks with DMD if you're dealing with personal info. or, even better: don't disable

Re: assert with format considered harmful

2017-02-26 Thread ketmar via Digitalmars-d
Seb wrote: On Sunday, 26 February 2017 at 06:34:07 UTC, Ali Çehreli wrote: So, obviously, assert message generation is not lazy. This is a WAT! for me but perhaps there is a good reason for it. FWIW imho we shouldn't need to write such messages at all. It shouldn't be to difficult to lower `a

Re: Of the use of unpredictableSeed

2017-02-26 Thread ketmar via Digitalmars-d
cym13 wrote: Hi, I found many times that people use unpredictableSeed in combination with normal PRNG for cryptographic purpose. Some even go as far as reseeding at each call to try making it more secure. It is a dangerous practice, most PRNG are not designed with security (and unpredictab

Re: Of the use of unpredictableSeed

2017-02-26 Thread ketmar via Digitalmars-d
cym13 wrote: "like /dev/random on Linux" (sighs) it was so good until this... That's a typo actually, I meant urandom, I'll correct it. thank you. sorry for me being rough: i was trying to make a joke, and i was pretty sure that it was a typo. but now i reread my post and found that the jok

Re: If you needed any more evidence that memory safety is the future...

2017-03-02 Thread ketmar via Digitalmars-d
H. S. Teoh wrote: Yet another nail in the coffin: https://www.theregister.co.uk/2017/03/01/aws_s3_outage/ i just can't stop laughing.

Re: D street cred: Just a thought

2017-03-04 Thread ketmar via Digitalmars-d
Nick Sabalausky (Abscissa) wrote: Just a thought for boosting D's street cred: Perhaps...take a worthwhile C/C++ project with real potential, fork it, and port it to D. And make a real commitment to maintaining it. Obviously a bit of a gambit, granted, but the potential payout is improving a

Re: Ordering comparisons

2017-03-06 Thread ketmar via Digitalmars-d
Nick Sabalausky (Abscissa) wrote: On 03/06/2017 08:27 PM, Andrei Alexandrescu wrote: * A struct S { int x; } compares differently on little endian and big endian system (!) This one is very surprising. How is that so, if both structs being compared are of the same endian-ness? if we're t

Re: Zcoin implementation bug enabled attacker to create 548, 000 Zcoins

2017-03-07 Thread ketmar via Digitalmars-d
Walter Bright wrote: https://makebitcoingreatagain.wordpress.com/2017/02/18/is-the-zcoin-bug-in-checktransaction/#update6 The error is here: https://github.com/zcoinofficial/zcoin/blob/81a667867b5d8489... and the line of code: zccoinSpend.denomination == libzerocoin::ZQ_LOVELACE; In other w

Re: Zcoin implementation bug enabled attacker to create 548, 000 Zcoins

2017-03-07 Thread ketmar via Digitalmars-d
Jack Stouffer wrote: On Tuesday, 7 March 2017 at 15:05:45 UTC, ketmar wrote: only for primitive types, sadly. void main () { Object a, b; a == b; } oops. no more error messages. yes, i know that this invokes `opEquals()`, and `opEquals()` can have side-effects. but what are the chances of w

Re: D street cred: Just a thought

2017-03-07 Thread ketmar via Digitalmars-d
Ilya Yaroshenko wrote: I don't care about existing D users. i wonder if "existing D users" care about your "betterC" and other initiatives then. rethorical sentence, no need to answer to it.

Re: Zcoin implementation bug enabled attacker to create 548, 000 Zcoins

2017-03-09 Thread ketmar via Digitalmars-d
John Colvin wrote: On Thursday, 9 March 2017 at 15:55:07 UTC, deadalnix wrote: On Thursday, 9 March 2017 at 15:42:22 UTC, qznc wrote: I'm curious. Where does it make sense for opEquals to be non-pure? Likewise opCmp, etc. When the object need some kind of normalization to be comparable and

Re: Zcoin implementation bug enabled attacker to create 548, 000 Zcoins

2017-03-12 Thread ketmar via Digitalmars-d
Jerry wrote: On Tuesday, 7 March 2017 at 21:34:35 UTC, Walter Bright wrote: On 3/7/2017 9:45 AM, Atila Neves wrote: 1 warning generated. Pretty much all C++ compilers will generate warnings for this. The thing about warnings, though, is they imply that there are situations where the code i

Re: optimatization suggestion

2017-04-01 Thread ketmar via Digitalmars-d
Inquie wrote: I use a lot of code that has string appending and it seems like it could be optimized; wchar[] x; x ~= "This is one line"; x ~= "This is another line"; could become x ~= "This is one lineThis is another line"; the problem with "smal optimizations" is that they adds complexit

Re: Exceptions in @nogc code

2017-04-02 Thread ketmar via Digitalmars-d
Walter Bright wrote: 1. If the thrown object was not allocated with the GC (such as if it was 'emplaced'), then doing a GC free on it at the catch site will corrupt memory. no, it won't. it is completely safe to free non-GC-owned memory with GC[0]. [0] http://dpldocs.info/experimental-docs/c

Re: Running out of memory ctfe 16GB

2017-04-06 Thread ketmar via Digitalmars-d
Dmitry Olshansky wrote: 2) Instead of building out out big string try building each interface separately. If I'm not mistaken current CTFE will actually allocate a whole new array on each append and copy things. Since it never deallocates building up a huge string by bits and pieces is a bad i

Re: Running out of memory ctfe 16GB

2017-04-06 Thread ketmar via Digitalmars-d
H. S. Teoh wrote: On Fri, Apr 07, 2017 at 01:16:20AM +0300, ketmar via Digitalmars-d wrote: Dmitry Olshansky wrote: 2) Instead of building out out big string try building each interface separately. If I'm not mistaken current CTFE will actually allocate a whole new array on each appen

Re: Running out of memory ctfe 16GB

2017-04-07 Thread ketmar via Digitalmars-d
Nierjerson wrote: How to implement trick is this and are you 100% sure it works? e.g., char[] x; x.length = 65536; x.length = 0; this won't work. the moment you did `.length = 0;`, you are returned to point zero. what you have to do is to maintain "shadow length" yourself, like this:

Re: Running out of memory ctfe 16GB

2017-04-07 Thread ketmar via Digitalmars-d
Jethro wrote: On Friday, 7 April 2017 at 21:02:33 UTC, ketmar wrote: Nierjerson wrote: How to implement trick is this and are you 100% sure it works? e.g., char[] x; x.length = 65536; x.length = 0; this won't work. the moment you did `.length = 0;`, you are returned to point zero. wha

Re: Optilink bugs(or DMD)

2017-04-18 Thread ketmar via Digitalmars-d
Nierjerson wrote: Major optilink bugs, blocker. not at optlink bug.

<    9   10   11   12   13   14   15   16   17   18   >