Re: cannot call impure function

2020-10-04 Thread Michael via Digitalmars-d-learn
On Sunday, 4 October 2020 at 17:43:13 UTC, Michael wrote: On Sunday, 4 October 2020 at 17:37:52 UTC, Mathias LANG wrote: On Sunday, 4 October 2020 at 17:05:33 UTC, Michael wrote: On Sunday, 4 October 2020 at 17:01:44 UTC, Paul Backus wrote: On Sunday, 4 October 2020 at 16:48:24 UTC, Michael

Re: cannot call impure function

2020-10-04 Thread Michael via Digitalmars-d-learn
On Sunday, 4 October 2020 at 17:37:52 UTC, Mathias LANG wrote: On Sunday, 4 October 2020 at 17:05:33 UTC, Michael wrote: On Sunday, 4 October 2020 at 17:01:44 UTC, Paul Backus wrote: On Sunday, 4 October 2020 at 16:48:24 UTC, Michael wrote: Dear all, Sorry for the potentially stupid

Re: cannot call impure function

2020-10-04 Thread Michael via Digitalmars-d-learn
On Sunday, 4 October 2020 at 17:05:33 UTC, Michael wrote: On Sunday, 4 October 2020 at 17:01:44 UTC, Paul Backus wrote: On Sunday, 4 October 2020 at 16:48:24 UTC, Michael wrote: Dear all, Sorry for the potentially stupid question, but I'm a complete newbie to D. Why does compiling the

Re: cannot call impure function

2020-10-04 Thread Michael via Digitalmars-d-learn
On Sunday, 4 October 2020 at 17:01:44 UTC, Paul Backus wrote: On Sunday, 4 October 2020 at 16:48:24 UTC, Michael wrote: Dear all, Sorry for the potentially stupid question, but I'm a complete newbie to D. Why does compiling the following trivial code fail? import std.stdio; void main() {

cannot call impure function

2020-10-04 Thread Michael via Digitalmars-d-learn
Dear all, Sorry for the potentially stupid question, but I'm a complete newbie to D. Why does compiling the following trivial code fail? import std.stdio; void main() { writeln(3.14); } Error message: /Library/D/dmd/src/phobos/std/format.d(1601): Error: pure function

Unused imports

2020-01-30 Thread Michael via Digitalmars-d-learn
Is there a way to detect unused imports? It happened to me that I used imports which I did not need in the end. So, I'd like to remove them easily.

Re: readline / Gnu readline

2020-01-30 Thread Michael via Digitalmars-d-learn
On Thursday, 30 January 2020 at 13:23:17 UTC, Adam D. Ruppe wrote: On Thursday, 30 January 2020 at 06:12:32 UTC, Michael wrote: I did exactly just what you proposed. yeah i often just leave my random filenames in there, in this case rl was one of them. (if you don't put `.d` at the end of a

auto keyword

2020-01-30 Thread Michael via Digitalmars-d-learn
auto is surely a nice feature. Nonetheless I'd prefer to use explicit types. So when reading a code and I see the auto keyword I also have to find out what kind of type is meant. I have a line of code that looks like this: auto elements = buf.to!string.strip.split(" ").filter!(a => a != "");

Re: readline / Gnu readline

2020-01-30 Thread Michael via Digitalmars-d-learn
On Thursday, 30 January 2020 at 08:13:16 UTC, Mike Parker wrote: That means any arguments you pass on the command line after the source file name will be passed to your program. Compiler options need to go before the source file name. rdmd -L-lreadline mysource.d That works, thanks Mike

Re: readline / Gnu readline

2020-01-29 Thread Michael via Digitalmars-d-learn
On Thursday, 30 January 2020 at 06:15:54 UTC, Mike Parker wrote: Is your source file named rl.d? And are you running dmd in the source file's directory? No, I did not. Changed it now and it works with dmd. Great! Tried the same with rdmd I'm getting a linker error.

Re: readline / Gnu readline

2020-01-29 Thread Michael via Digitalmars-d-learn
On Wednesday, 29 January 2020 at 21:15:08 UTC, Adam D. Ruppe wrote: On Wednesday, 29 January 2020 at 20:01:32 UTC, Michael wrote: I am new to D. I would like to use the Gnu readline function in D. Is there a module that i can use? just define it yourself --- // this line right here is all

readline / Gnu readline

2020-01-29 Thread Michael via Digitalmars-d-learn
I am new to D. I would like to use the Gnu readline function in D. Is there a module that i can use?

Re: Deprecation: foreach: loop index implicitly converted from size_t to int

2019-01-18 Thread Michael via Digitalmars-d-learn
On Friday, 18 January 2019 at 13:29:29 UTC, Adam D. Ruppe wrote: On Friday, 18 January 2019 at 12:27:17 UTC, Michael wrote: This, to be, looks like quite the explicit conversion, no? Yeah, I agree. But the language is silly. I just leave the type out of foreach and explicitly cast it inside

Deprecation: foreach: loop index implicitly converted from size_t to int

2019-01-18 Thread Michael via Digitalmars-d-learn
Hello all, I am getting this deprecation warning when compiling using DMD64 D Compiler v2.084.0 on Linux. I'm a little unsure what the problem is, however, because the code producing these warnings tends to be of the form: foreach (int i, ref prop; props) This, to be, looks like quite

Re: Forums intermittently going down?

2018-09-17 Thread Michael via Digitalmars-d
On Monday, 17 September 2018 at 11:51:04 UTC, Vladimir Panteleev wrote: On Monday, 17 September 2018 at 11:02:39 UTC, Michael wrote: It has been occurring for the past two weeks now, at least. When I try to load the forum (on different networks) it will often hang for a while, and when it does

Forums intermittently going down?

2018-09-17 Thread Michael via Digitalmars-d
It has been occurring for the past two weeks now, at least. When I try to load the forum (on different networks) it will often hang for a while, and when it does eventually load a page, it is likely that clicking a link will cause it to get stuck loading again, or eventually display the

Re: John Regehr on "Use of Assertions"

2018-09-05 Thread Michael via Digitalmars-d
On Saturday, 1 September 2018 at 20:15:15 UTC, Walter Bright wrote: Note the "may or may not be evaluated." We've debated this here before. I'm rather pleased that John agrees with me on this. I.e. the optimizer can assume the expression is true and use that information to generate better

Re: Enum and CTFE function call

2018-08-14 Thread Michael via Digitalmars-d-learn
On Tuesday, 14 August 2018 at 11:25:06 UTC, Jonathan M Davis wrote: On Tuesday, August 14, 2018 4:03:11 AM MDT Michael via Digitalmars-d-learn wrote: [...] CTFE is triggered when a value must be known at compile-time. So, if you have something like [...] That is much clearer now, thanks

Re: Enum and CTFE function call

2018-08-14 Thread Michael via Digitalmars-d-learn
On Tuesday, 14 August 2018 at 09:17:41 UTC, ixid wrote: On Tuesday, 14 August 2018 at 09:12:30 UTC, ixid wrote: This will not compile as it says n is not known at compile time... This does work if 'value' is changed to immutable and fun to accept it. So it still seems like a missed

Re: throwing lots of resources at a GC

2018-07-23 Thread Michael via Digitalmars-d
On Friday, 20 July 2018 at 00:46:37 UTC, John Belmonte wrote: Interesting (and way too detailed for me) tale of GC adventures in golang: https://blog.golang.org/ismmkeynote Seeing the pretty incredible reductions in additional latency was great. I would love to see some in-depth analysis of

Re: Funding code-d

2018-07-13 Thread Michael via Digitalmars-d-announce
On Friday, 13 July 2018 at 14:20:19 UTC, Mike Parker wrote: As promised in my tweet of June 30 (and to the handful of people who emailed me), the cloud of mystery surrounding the use of the money raised for code-d and its supporting tools has now been (partially) lifted! In this post, I lay

Re: UFCS confusion

2018-07-13 Thread Michael via Digitalmars-d-learn
On Friday, 13 July 2018 at 11:17:32 UTC, Radu wrote: On Friday, 13 July 2018 at 11:12:47 UTC, Michael wrote: On Friday, 13 July 2018 at 10:52:54 UTC, Radu wrote: On Friday, 13 July 2018 at 10:21:54 UTC, Michael wrote: [...] Do you try to call member functions? UFCS only works with free

Re: UFCS confusion

2018-07-13 Thread Michael via Digitalmars-d-learn
On Friday, 13 July 2018 at 10:52:54 UTC, Radu wrote: On Friday, 13 July 2018 at 10:21:54 UTC, Michael wrote: Hello, I am nesting some function calls, and I'm pretty used to making use of D's Uniform Function Call Syntax, but I'm getting an error if I try to convert this line:

UFCS confusion

2018-07-13 Thread Michael via Digitalmars-d-learn
Hello, I am nesting some function calls, and I'm pretty used to making use of D's Uniform Function Call Syntax, but I'm getting an error if I try to convert this line: createSet(createVector(langSize, index)).length; which works, into this line: createVector(langSize,

Re: Passing a reference to a returned reference

2018-07-06 Thread Michael via Digitalmars-d-learn
On Friday, 6 July 2018 at 16:24:03 UTC, Timoses wrote: On Friday, 6 July 2018 at 15:51:34 UTC, Michael wrote: [...] While writing I realized that the following is even the case without the 'ref' parameter: The caller of the setter will still be able to change the content of your private data

Re: Passing a reference to a returned reference

2018-07-06 Thread Michael via Digitalmars-d-learn
On Friday, 6 July 2018 at 15:57:27 UTC, Timoses wrote: On Friday, 6 July 2018 at 15:33:18 UTC, Michael wrote: This is definitely to do with my use of the setter syntax, which maybe I am misunderstanding? Because if I change it to a normal function call like so:

Re: Passing a reference to a returned reference

2018-07-06 Thread Michael via Digitalmars-d-learn
On Friday, 6 July 2018 at 15:37:25 UTC, Timoses wrote: On Friday, 6 July 2018 at 15:14:01 UTC, Michael wrote: class Agent { private { double[int] mDict; } // Setter: copy void beliefs(ref double[int] dict) { import std.stdio : writeln;

Re: Passing a reference to a returned reference

2018-07-06 Thread Michael via Digitalmars-d-learn
On Friday, 6 July 2018 at 15:14:01 UTC, Michael wrote: On Friday, 6 July 2018 at 14:50:39 UTC, Ali Çehreli wrote: [...] I'm just trying to do that now. Here is what I have in terms of code: [...] This is definitely to do with my use of the setter syntax, which maybe I am

Re: Passing a reference to a returned reference

2018-07-06 Thread Michael via Digitalmars-d-learn
On Friday, 6 July 2018 at 14:50:39 UTC, Ali Çehreli wrote: On 07/06/2018 07:36 AM, Michael wrote: > but not in > my case, if this is a weird edge-case with setter member functions? This is all very interesting but I'm dying to see the code. :) Can you change Timoses's code to demonstrate your

Re: Passing a reference to a returned reference

2018-07-06 Thread Michael via Digitalmars-d-learn
On Friday, 6 July 2018 at 14:11:42 UTC, Timoses wrote: This works for me: auto create() { string[int] dict; dict[2] = "hello"; return dict; } void modifyNoRef(string[int] m) { writeln("Address not ref: ", ); m[0] = "modified";

Re: Passing a reference to a returned reference

2018-07-06 Thread Michael via Digitalmars-d-learn
On Friday, 6 July 2018 at 14:11:42 UTC, Timoses wrote: On Friday, 6 July 2018 at 13:13:43 UTC, Michael wrote: static auto ref consensus( ... ) `auto ref` infers the return type from the return statement [1]. So it's not necessarily returning a ref type. However, I don't think this matters

Passing a reference to a returned reference

2018-07-06 Thread Michael via Digitalmars-d-learn
Hello, I'm a little confused about what is actually happening when I try to pass a reference, returned by a method that produces the object (associative array), to a setter method which expects a reference. What seems to be happening is that it simply does nothing, as if the setter method is

Re: Is it possible to set up DConf Asia?

2018-06-29 Thread Michael via Digitalmars-d
On Friday, 29 June 2018 at 10:12:28 UTC, Mike Parker wrote: I can tell you that DConf Asia is something the Foundation is interested in. It's also something I plan to work toward making happen eventually. We discussed this at our Seoul meetup recently. What I need to know before anything can

Re: ldc flags for beginner

2018-04-22 Thread Michael via Digitalmars-d-learn
On Sunday, 22 April 2018 at 02:08:40 UTC, fevasu wrote: what flags to use so that the intermediate .o files are discared by ldc and only a.out is written to disk You can also use rdmd with ldc, if that makes things easier.

Re: How to delete element from array container or dlist?

2018-03-18 Thread Michael via Digitalmars-d-learn
On Sunday, 18 March 2018 at 15:42:18 UTC, Andrey Kabylin wrote: On Sunday, 18 March 2018 at 15:32:47 UTC, Michael wrote: On Sunday, 18 March 2018 at 14:58:52 UTC, Andrey Kabylin wrote: In DList we have method remove, but I can't understand how this method works, I want write somethink like

Re: How to delete element from array container or dlist?

2018-03-18 Thread Michael via Digitalmars-d-learn
On Sunday, 18 March 2018 at 14:58:52 UTC, Andrey Kabylin wrote: In DList we have method remove, but I can't understand how this method works, I want write somethink like this: void unsubscribe(EventsSubscriber subscriber) { subscribers.remove(subscriber); } The remove function seems to

Re: How to delete element from array container or dlist?

2018-03-18 Thread Michael via Digitalmars-d-learn
On Sunday, 18 March 2018 at 14:58:52 UTC, Andrey Kabylin wrote: In DList we have method remove, but I can't understand how this method works, I want write somethink like this: void unsubscribe(EventsSubscriber subscriber) { subscribers.remove(subscriber); } So I guess you would want

Re: A betterC base

2018-02-08 Thread Michael via Digitalmars-d
On Thursday, 8 February 2018 at 14:54:19 UTC, Adam D. Ruppe wrote: On Thursday, 8 February 2018 at 11:06:15 UTC, ixid wrote: It feels like D has not overcome at least two major issues in the public mind, the built-in GC D is a pragmatic language aimed toward writing fast code, fast. Garbage

Re: #dbugfix Issue 16189

2018-02-07 Thread Michael via Digitalmars-d
On Wednesday, 7 February 2018 at 08:51:01 UTC, Kirr wrote: https://issues.dlang.org/show_bug.cgi?id=16189 This is a P1 critical DMD bug, silently generating wrong code. Reported one and a half year ago, but exists in DMD compilers going back to DMD 2.050 (possibly more, but this is as far

Re: My choice to pick Go over D ( and Rust ), mostly non-technical

2018-02-05 Thread Michael via Digitalmars-d
On Saturday, 3 February 2018 at 01:52:04 UTC, psychoticRabbit wrote: On Friday, 2 February 2018 at 15:06:35 UTC, Benny wrote: [...] I think that point hits the cause of your problem with D (along with your need to 'choose' something over 'something' else). [...] I think it is worth

Re: Quora: Why hasn't D started to replace C++?

2018-01-31 Thread Michael via Digitalmars-d
On Wednesday, 31 January 2018 at 07:56:37 UTC, Andrew Benton wrote: On Tuesday, 30 January 2018 at 20:45:44 UTC, Andrei Alexandrescu wrote: https://www.quora.com/Why-hasnt-D-started-to-replace-C++ Andrei I think that the largest issue there is probably the marketing and advocacy. When Rust

Re: Should negating an unsigned integral be an error?

2018-01-30 Thread Michael via Digitalmars-d
On Tuesday, 30 January 2018 at 14:08:41 UTC, bauss wrote: On Tuesday, 30 January 2018 at 11:09:08 UTC, Michael wrote: On Monday, 29 January 2018 at 10:06:41 UTC, Jonathan M Davis wrote: On Monday, January 29, 2018 09:58:00 Dave Jones via Digitalmars-d wrote: Given uint i = 12345; should

Re: Should negating an unsigned integral be an error?

2018-01-30 Thread Michael via Digitalmars-d
On Monday, 29 January 2018 at 10:06:41 UTC, Jonathan M Davis wrote: On Monday, January 29, 2018 09:58:00 Dave Jones via Digitalmars-d wrote: Given uint i = 12345; should writeln(-i) be an error? or maybe i should be automatically cast to a larger signed type? It arguably should be, but

Re: How programmers transition between languages

2018-01-29 Thread Michael via Digitalmars-d
On Monday, 29 January 2018 at 03:22:54 UTC, Ola Fosheim Grøstad wrote: On Sunday, 28 January 2018 at 23:09:00 UTC, Michael wrote: by the whole target audience. Rust, on the other hand, seems to be picking up those who have left Go. I guess some go to Rust after working with Go, but the

Re: How programmers transition between languages

2018-01-28 Thread Michael via Digitalmars-d
On Sunday, 28 January 2018 at 15:36:17 UTC, bachmeier wrote: On Sunday, 28 January 2018 at 13:50:03 UTC, Michael wrote: Most people at my university, outside of the computer science department, that are using languages like Python and R and MATLAB the most, are very aware of Rust and Go, but

Re: How programmers transition between languages

2018-01-28 Thread Michael via Digitalmars-d
On Sunday, 28 January 2018 at 13:50:03 UTC, Michael wrote: On Friday, 26 January 2018 at 09:02:03 UTC, Ola Fosheim Grøstad wrote: [...] I find it fascinating that C# is in the "languages to avoid" section, because from my perspective it's receiving more and more adoption as the modern

Re: How programmers transition between languages

2018-01-28 Thread Michael via Digitalmars-d
On Friday, 26 January 2018 at 09:02:03 UTC, Ola Fosheim Grøstad wrote: While this analysis of language popularity on Github is enlightening: http://www.benfrederickson.com/ranking-programming-languages-by-github-users/ I found the older analysis of how programmers transition (or adopt new

Re: The name "Phobos" in user-facing docs

2018-01-12 Thread Michael via Digitalmars-d
On Friday, 12 January 2018 at 22:26:38 UTC, Michael wrote: On Friday, 12 January 2018 at 21:24:40 UTC, John Gabriele wrote: [...] I mean, you're correct to say it's an artifact of D being an old language. Tango was the original, and Phobos was introduced for D2 as a competing library. I

Re: The name "Phobos" in user-facing docs

2018-01-12 Thread Michael via Digitalmars-d
On Friday, 12 January 2018 at 21:24:40 UTC, John Gabriele wrote: After having started learning some D lately, two things about the standard library have struck me: 1. It has its own name. Phobos. This is unusual. I don't know of any other language who's std lib has any name other than "the

Re: I want to transmit the class name and the member name in the method

2018-01-05 Thread Michael via Digitalmars-d-learn
On Friday, 5 January 2018 at 12:19:11 UTC, thedeemon wrote: On Friday, 5 January 2018 at 07:40:14 UTC, Brian wrote: I think code style like: db.select(User).where(email.like("*@hotmail.com")).limit(10); You need to read about templates in D, here's a good guide:

Re: Alias example should supposedly be illegal, but runs fine

2017-12-19 Thread Michael via Digitalmars-d-learn
On Tuesday, 19 December 2017 at 02:12:29 UTC, Mike Franklin wrote: On Tuesday, 19 December 2017 at 02:04:34 UTC, codephantom wrote: writeln(S.j); // Error: Instance symbols cannot be used through types. I don't understand why you would say that is a bug. I meant that the example is

Re: Alias example should supposedly be illegal, but runs fine

2017-12-19 Thread Michael via Digitalmars-d-learn
On Tuesday, 19 December 2017 at 01:29:04 UTC, Meta wrote: On Monday, 18 December 2017 at 23:44:46 UTC, Michael wrote: [...] I think the reason that this works is because i is static, meaning that you don't need the `this` reference of S to access it and thus it can be aliased. Declaring a

Alias example should supposedly be illegal, but runs fine

2017-12-18 Thread Michael via Digitalmars-d-learn
Hello, I have been looking at the following example found right at the end of the section here: https://dlang.org/spec/declaration.html#alias struct S { static int i; } S s; alias a = s.i; // illegal, s.i is an expression alias b = S.i; // ok b = 4; // sets S.i to 4 and it runs

Re: Is there a pragma or command line option to ask DMD to show a warning when it implicitly casts from long to ulong ?

2017-12-15 Thread Michael via Digitalmars-d-learn
On Friday, 15 December 2017 at 21:29:10 UTC, Jonathan M Davis wrote: On Friday, December 15, 2017 20:40:10 Ecstatic Coder via Digitalmars-d-learn wrote: It's taken me some time to find an implicit cast bug ("if (my_sometimes_negative_index >= this_array.length)"), while a simple C++-like

Re: d-apt update

2017-12-08 Thread Michael via Digitalmars-d-announce
On Friday, 8 December 2017 at 15:53:24 UTC, Jordi Sayol wrote: d-apt release dmd v2.077.1 In this release, d-apt splits "dmd-bin" deb package into "dmd-compiler" (the command line compiler) and "dmd-tools" (includes: dumpobj, obj2asm, rdmd, ddemangle and

Re: Release D v2.077.1

2017-11-30 Thread Michael via Digitalmars-d-announce
On Thursday, 30 November 2017 at 13:52:00 UTC, Martin Nowak wrote: Glad to announce D v2.077.1. http://dlang.org/download.html This point release fixes a few issues over v2.077.1, see the changelog for more details. http://dlang.org/changelog/v2.077.1.html - -Martin Thanks for all your

Re: Shared and race conditions

2017-11-29 Thread Michael via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 17:03:42 UTC, Steven Schveighoffer wrote: On 11/29/17 11:13 AM, Wanderer wrote: I'm trying to simulate a race condition in D with the following code: (https://run.dlang.io/is/RfOX0I) One word of caution, I think the running of your code on run.dlang.io is

Re: Shared and race conditions

2017-11-29 Thread Michael via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 16:33:50 UTC, Steven Schveighoffer wrote: On 11/29/17 11:13 AM, Wanderer wrote: [...] [snip] [...] Using the compiler switch -vcg-ast, I see no synchronization of these methods. [...] Any idea what has changed in DMD-nightly to retain the correct

Re: Shared and race conditions

2017-11-29 Thread Michael via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 16:19:05 UTC, Michael wrote: On Wednesday, 29 November 2017 at 16:13:13 UTC, Wanderer wrote: [...] I unfortunately cannot answer your question but I am noticing that running the code with DMD gives you an unordered sequence of IDs, but running with

Re: Shared and race conditions

2017-11-29 Thread Michael via Digitalmars-d-learn
On Wednesday, 29 November 2017 at 16:13:13 UTC, Wanderer wrote: I'm trying to simulate a race condition in D with the following code: (https://run.dlang.io/is/RfOX0I) ``` import std.stdio; import core.thread; import std.concurrency; shared struct IdGen(T) { T id; this(T start) {

Re: reduce condition nesting

2017-11-23 Thread Michael via Digitalmars-d-learn
On Thursday, 23 November 2017 at 14:16:25 UTC, Andrea Fontana wrote: On Thursday, 23 November 2017 at 13:47:37 UTC, Adam D. Ruppe wrote: On Thursday, 23 November 2017 at 05:19:27 UTC, Andrey wrote: for instance in kotlin it can be replace with this: when { c1 -> foo(), c2 -> bar(),

Re: Project Elvis

2017-11-10 Thread Michael via Digitalmars-d
On Friday, 10 November 2017 at 05:23:53 UTC, Adam Wilson wrote: On 11/6/17 12:20, Michael wrote: [...] You're right, I didn't, that was intentional, because sometimes people write things like that. And it took a while for anyone to say anything about it. That is my point. But that's the

Re: Project Elvis

2017-11-06 Thread Michael via Digitalmars-d
I can't quite see why this proposal is such a big deal to people - as has been restated, it's just a quick change in the parser for a slight contraction in the code, and nothing language-breaking, it's not a big change to the language at all. On Monday, 6 November 2017 at 19:13:59 UTC, Adam

Re: html fetcher/parser

2017-08-12 Thread Michael via Digitalmars-d-learn
On Saturday, 12 August 2017 at 20:22:44 UTC, Adam D. Ruppe wrote: On Saturday, 12 August 2017 at 19:53:22 UTC, Faux Amis wrote: [...] My dom.d and http2.d combine to make this easy: https://github.com/adamdruppe/arsd/blob/master/dom.d https://github.com/adamdruppe/arsd/blob/master/http2.d

Re: Vectorflow noob

2017-08-11 Thread Michael via Digitalmars-d-learn
On Thursday, 10 August 2017 at 19:10:05 UTC, Jiyan wrote: Hey, wanted to the following simple thing with vectorflow: [...] I'm worried there might not be many on the forums who can help too much with vectorflow given how new it is. Maybe some in the community are more familiar with neural

Re: I'm the new package maintainer for D on ArchLinux

2017-08-09 Thread Michael via Digitalmars-d-announce
On Wednesday, 9 August 2017 at 20:42:48 UTC, Wild wrote: Hi everyone, The D packages for ArchLinux has been orphaned since Dicebot stepped down as the maintainer and no one else stepped up. So I decided to step up and apply to become a Trusted User, and I got accepted yesterday[1]. So from

Re: Calling D from Ruby for GPU computing

2017-08-04 Thread Michael via Digitalmars-d-announce
On Saturday, 29 July 2017 at 06:54:47 UTC, Prasun Anand wrote: Hi, I wrote a Linear Mixed Model tool for Genome Wide Association Studies(GWAS) called [faster_lmm_d](https://github.com/prasunanand/faster_lmm_d). It is built on LDC and is faster than its Python alternative. Also, its the only

Re: D books for $5

2017-08-03 Thread Michael via Digitalmars-d-announce
On Friday, 16 December 2016 at 05:43:02 UTC, Kai Nacke wrote: Hi all, Packt Publishing offers eBooks for $5 for a limited time. If your collection of D eBooks is still incomplete then this is a great chance for you. :-) D Cookbook by Adam D. Ruppe

Re: Why free and realloc seem to include .

2017-08-03 Thread Michael via Digitalmars-d-learn
On Thursday, 3 August 2017 at 15:29:29 UTC, Adam D. Ruppe wrote: On Thursday, 3 August 2017 at 15:18:17 UTC, Michael wrote: I've not seen that either, though I'm not a C++ programmer. Does using free() on its own not assume access of a global namespace? Consider the following: class Foo {

Re: Why free and realloc seem to include .

2017-08-03 Thread Michael via Digitalmars-d-learn
On Thursday, 3 August 2017 at 14:15:40 UTC, Temtaime wrote: On Thursday, 3 August 2017 at 14:03:56 UTC, Michael wrote: So this might be a bit of a stupid question, but looking at the DMD source code (dmodule.d in particular) I see the following code: [...] and I was just wondering why

Why free and realloc seem to include .

2017-08-03 Thread Michael via Digitalmars-d-learn
So this might be a bit of a stupid question, but looking at the DMD source code (dmodule.d in particular) I see the following code: if (srcfile._ref == 0) .free(srcfile.buffer); srcfile.buffer = null; srcfile.len = 0; and I was just wondering why certain functions seem to be called

Re: Visual D 0.45 released - better VS2017 integration

2017-08-03 Thread Michael via Digitalmars-d-announce
On Thursday, 3 August 2017 at 07:04:55 UTC, Rainer Schuetze wrote: Hi, there is a new version 0.45 of Visual D available at http://rainers.github.io/visuald/visuald/StartPage.html Most changes are bug fixes and incremental improvements, maybe standing out: * improved VS 2017 integration *

Re: is the ubuntu sourceforge repository safe?

2017-08-01 Thread Michael via Digitalmars-d
On Monday, 24 July 2017 at 11:02:55 UTC, Russel Winder wrote: On Sun, 2017-07-23 at 18:23 +, Michael via Digitalmars-d wrote: I stopped using it. It kept causing error messages in my package manager and I couldn't update it properly so I've just stuck to downloading the updates

Re: How do you use D?

2017-07-31 Thread Michael via Digitalmars-d
On Friday, 28 July 2017 at 14:58:01 UTC, Ali wrote: How do you use D? In work, (key projects or smaller side projects) I did my undergraduate in CS where I picked up Python, Java and a little bit of C/C++, but Java was my most familiar language. When I started my PhD in an Engineering Maths

Re: is the ubuntu sourceforge repository safe?

2017-07-23 Thread Michael via Digitalmars-d
On Saturday, 22 July 2017 at 00:21:45 UTC, Ali wrote: I know that sourceforge doesnt have the best security track record Is it safe thought to use the dmd ubuntu repository hosted there [code] sudo wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O

Re: Go 1.9

2017-06-25 Thread Michael via Digitalmars-d
On Monday, 19 June 2017 at 15:07:12 UTC, Jack Stouffer wrote: On Monday, 19 June 2017 at 13:24:00 UTC, Russel Winder wrote: The former is not a problem for D, but the latter… Disagree. One of D's biggest competitive advantages is fast compilation of fast code. If other languages become as

Re: bug in foreach continue

2017-03-17 Thread Michael via Digitalmars-d-learn
On Friday, 17 March 2017 at 11:30:48 UTC, Jonathan M Davis wrote: On Friday, March 17, 2017 01:55:19 Hussien via Digitalmars-d-learn wrote: I tend to agree with this. If the foreach is static, and continue and break are just going to be ignored, then they should just be illegal. Allowing

Re: Any news on DIP88?

2017-03-14 Thread Michael via Digitalmars-d
On Saturday, 11 March 2017 at 19:07:10 UTC, Jonathan M Davis wrote: On Saturday, March 11, 2017 15:25:14 bauss via Digitalmars-d wrote: Are there any news on DIP88? Will it be implemented?, when?, is there an implementation currently in development or? https://wiki.dlang.org/DIP88 So, if

Re: D to C++

2016-08-31 Thread Michael via Digitalmars-d-learn
On Wednesday, 31 August 2016 at 11:43:12 UTC, Nick wrote: On Tuesday, 30 August 2016 at 14:24:22 UTC, eugene wrote: On Tuesday, 30 August 2016 at 13:33:44 UTC, Nick wrote: Is it possible to compile from D to C++? Explanation: I do some competition programming and would like to write it in D

Re: D APT repository fails

2016-07-25 Thread Michael via Digitalmars-d
On Monday, 25 July 2016 at 15:51:50 UTC, Zardoz wrote: I keep seeing along this last month many problems with the D APT repository. There is any one cheeking the health of these repository ? Now I get an error with

Re: Card on fire

2016-07-12 Thread Michael via Digitalmars-d
On Monday, 11 July 2016 at 21:29:49 UTC, Walter Bright wrote: On 7/11/2016 7:49 AM, Meta wrote: It wouldn't happen to be an nVidia card, would it? MSI GeForce GT 720 DirectX 12 N720-1GD3HLP 1GB 64-Bit DDR3 PCI Express 2.0 x16 HDCP Ready Video Card The fire happened at the junction between

Re: daffodil, a D image processing library

2016-07-01 Thread Michael via Digitalmars-d-announce
On Friday, 1 July 2016 at 11:09:49 UTC, Relja Ljubobratovic wrote: On Thursday, 30 June 2016 at 21:35:37 UTC, Benjamin Schaaf wrote: [...] Hi there. Took a quick look at the source and it seems really nice! I like your idea of extensibility for color conversion. Also, image I/O seems to be

Re: Release D 2.071.1

2016-06-28 Thread Michael via Digitalmars-d-announce
On Monday, 27 June 2016 at 23:26:25 UTC, Jack Stouffer wrote: On Monday, 27 June 2016 at 23:15:06 UTC, Robert burner Schadek wrote: Awesome, releases are becoming more and more boring. I like it! I wouldn't call 1.0 * -1.0 == 1.0 boring! Yeah I was thinking this haha.

Re: I'd love to see DScript one day ...

2016-06-11 Thread Michael via Digitalmars-d
Having DScript running in the browser and D on the server would be an absolute dream to develop with. It might also turn a few heads our way.

Re: Free the DMD backend

2016-05-31 Thread Michael via Digitalmars-d
On Monday, 30 May 2016 at 15:06:42 UTC, Saurabh Das wrote: On Monday, 30 May 2016 at 14:51:48 UTC, Matthias Klumpp wrote: The case for DMD though is compile speed. It really changes the way one writes programs and makes it possible to write bash script-like functionality in D because of a

Re: Using -O with DMD seems to produce non-random values.

2016-05-19 Thread Michael via Digitalmars-d-learn
On Thursday, 19 May 2016 at 15:49:17 UTC, ag0aep6g wrote: On 05/19/2016 05:09 PM, Michael wrote: Any idea what causes this to occur when optimising? I wanted to try and speed up a simulation I'm running but it just produces too many unexpected consequences. I suspect that you're seeing issue

Re: Using -O with DMD seems to produce non-random values.

2016-05-19 Thread Michael via Digitalmars-d-learn
Could it be that the code is optimised to the same as that in the original issue and so the current compiler still produces the incorrect result? Obviously the original issue has since been fixed but I won't be able to test this until the next version of DMD is released.

Using -O with DMD seems to produce non-random values.

2016-05-19 Thread Michael via Digitalmars-d-learn
I'm not entirely sure what optimisations are made when supplying the -O flag to rdmd, but this may be related to an earlier issue I found for similar code here: https://issues.dlang.org/show_bug.cgi?id=16027 The code is: void main() { auto seed = 128; auto rand = Random(seed);

Re: Beta D 2.071.1-b1

2016-05-18 Thread Michael via Digitalmars-d-announce
On Monday, 16 May 2016 at 20:59:41 UTC, Jack Stouffer wrote: On Sunday, 15 May 2016 at 04:40:21 UTC, Martin Nowak wrote: First beta for the 2.071.1 point release. A few issues remain to be fixed before the next beta. http://dlang.org/download.html#dmd_beta

Re: Using shorthand *= leads to unexpected result?

2016-05-15 Thread Michael via Digitalmars-d-learn
On Sunday, 15 May 2016 at 14:12:47 UTC, Marc Schütz wrote: On Sunday, 15 May 2016 at 13:01:45 UTC, Michael wrote: It may be that I'm doing something wrong here, but after updating DMD to the latest version, my simulations started producing some very odd results and I think I've pinpointed it

Re: Using shorthand *= leads to unexpected result?

2016-05-15 Thread Michael via Digitalmars-d-learn
On Sunday, 15 May 2016 at 13:12:44 UTC, Saurabh Das wrote: On Sunday, 15 May 2016 at 13:01:45 UTC, Michael wrote: It may be that I'm doing something wrong here, but after updating DMD to the latest version, my simulations started producing some very odd results and I think I've pinpointed it

Using shorthand *= leads to unexpected result?

2016-05-15 Thread Michael via Digitalmars-d-learn
It may be that I'm doing something wrong here, but after updating DMD to the latest version, my simulations started producing some very odd results and I think I've pinpointed it to a sign inversion that I was making. Here is some code from dpaste to demonstrate the behaviour I get vs. the

Re: Computer Vision Library in D

2016-04-28 Thread Michael via Digitalmars-d-announce
On Thursday, 28 April 2016 at 11:50:55 UTC, Edwin van Leeuwen wrote: On Thursday, 28 April 2016 at 11:32:25 UTC, Michael wrote: And I would also like to see some more scientific libraries make it into D. Though I understand that including it in the standard library can cause issues, it would

Re: Using D in Android App

2016-04-18 Thread Michael via Digitalmars-d-learn
On Monday, 18 April 2016 at 09:38:48 UTC, Justice wrote: On Saturday, 16 April 2016 at 04:04:24 UTC, Justice wrote: Is it difficult to create a D business like app and connect it to android through java for the interface? I'd rather create all the complex stuff in D and either use it

Re: Pitching D to academia

2016-03-09 Thread Michael via Digitalmars-d
On Sunday, 6 March 2016 at 08:40:17 UTC, Ola Fosheim Grøstad wrote: On Sunday, 6 March 2016 at 07:38:01 UTC, Ali Çehreli wrote: Motivated by Dmitry's "Pitching D to a gang of Gophers" thread, how about pitching it to a gang of professors and graduate students? The geeky graduate students are

Re: scope block do not handle failure, but try-catch does

2014-12-11 Thread Michael via Digitalmars-d-learn
On Thursday, 11 December 2014 at 20:40:40 UTC, Suliman wrote: string dbname = config.getKey(dbname1); scope(failure) writeln(look like dbname is missing); I am using dini and trying to throw exception if value can't be extract from config. If I am wrap it's in try-сефср block it's work or.

how to access a ftp sever with socket

2014-12-08 Thread michael via Digitalmars-d-learn
Hello Anyone: i am trying make a ftp client with socket,i have tried std.net.curl,but i cont stand with so many try-catch structure in my code,i am not familiar with socket,i write a pecie of code but it cont give me the welcome message which i want,and then i use wireshark to trace the

Re: threading issues with D - C - Python

2014-12-08 Thread Michael via Digitalmars-d-learn
On Monday, 8 December 2014 at 01:17:16 UTC, Ellery Newcomer wrote: On 12/07/2014 03:12 PM, Michael wrote: On Saturday, 6 December 2014 at 00:40:49 UTC, Ellery Newcomer wrote: On 12/04/2014 10:55 PM, Ellery Newcomer wrote: I guess tomorrow I can try messing around with thread_attachThis, as

Re: threading issues with D - C - Python

2014-12-07 Thread Michael via Digitalmars-d-learn
On Saturday, 6 December 2014 at 00:40:49 UTC, Ellery Newcomer wrote: On 12/04/2014 10:55 PM, Ellery Newcomer wrote: I guess tomorrow I can try messing around with thread_attachThis, as the fullcollect happening in #2 might be screwing with python data. But you aren't really passing anything

Re: threading issues with D - C - Python

2014-12-04 Thread Michael via Digitalmars-d-learn
On Thursday, 4 December 2014 at 03:22:05 UTC, Ellery Newcomer wrote: dustmite? Not sure what went wrong with dustmite, but every time I tried it it just started deleting all the files in the directory and setup.py would give errors. I manually deleted a reasonable chunk of the code and I'm

  1   2   >