Re: DIP 1034--Add a Bottom Type (reboot)--Formal Assessment Concluded

2021-02-16 Thread Johannes Loher via Digitalmars-d-announce
On Tuesday, 16 February 2021 at 07:07:09 UTC, Mike Parker wrote: When I emailed Walter and Atila to officially launch the Formal Assessment of DIP 1034, "Add a Bottom Type (reboot)", I expected it would be three or four weeks before I received their final decision. So I was surprised when

Re: Selective unittesting in DUB

2020-12-01 Thread Johannes Loher via Digitalmars-d-learn
Am 01.12.20 um 08:11 schrieb ryuukk_: > Running .\dawn-test-application.exe > 2 modules passed unittests > > > Wich ones? it should print > > > ``` > Running tests for target X > > - src/module_a.d Tests: OK   <-- line in green > - src/module_b.d Tests: OK >

Re: Running unit tests from DUB single file packages

2020-12-01 Thread Johannes Loher via Digitalmars-d-learn
Am 01.12.20 um 14:55 schrieb drug: > On 12/1/20 2:40 PM, Johannes Loher wrote: >> ... >> However, I am having trouble running the unit tests when using the >> ... > > This can be one of solution https://github.com/dlang/dub/pull/2050 > Thanks! Let's see if it gets merged or if a slightly more

Re: Running unit tests from DUB single file packages

2020-12-01 Thread Johannes Loher via Digitalmars-d-learn
Am 01.12.20 um 14:52 schrieb jmh530: > On Tuesday, 1 December 2020 at 13:52:35 UTC, jmh530 wrote: >> On Tuesday, 1 December 2020 at 11:40:38 UTC, Johannes Loher wrote: >>> [snip] >>> >>> Any hints on how to execute unit tests from single file DUB packages? >>> Is it even possible at the moment?

Running unit tests from DUB single file packages

2020-12-01 Thread Johannes Loher via Digitalmars-d-learn
Hello everybody, when solving today's problem for the adventofcode [1], I decided to try out DUB's single file package feature, in order to keep things short. When doing the adventofcode, I always use the given examples as unit tests in order to verify that my solutions are actually correct.

Re: Github Actions now support D out of the box!

2020-08-21 Thread Johannes Loher via Digitalmars-d-announce
Am 21.08.20 um 04:03 schrieb Mathias LANG: > [...] Thanks a lot for this! I just switched to using this instead of Travis CI in one of my projects. Works great!

Re: isInputRange not satisfied even if all individual conditions are satisfied

2020-06-26 Thread Johannes Loher via Digitalmars-d-learn
Am 26.06.20 um 15:35 schrieb ag0aep6g: > `isInputRange!R` fails because it has no knowledge of your free `empty` > function. Without `empty`, `R` is obviously not a range. Ah, OK, that makes sense. It's kind of sad though because it really limits the extensibility of existing types with UFCS. Do

isInputRange not satisfied even if all individual conditions are satisfied

2020-06-26 Thread Johannes Loher via Digitalmars-d-learn
Recently, I read about problems regarding the API design of ranges (not being able to make them const, differences between class and struct based ranges etc.). One of the issues that came up what the fact that sometimes it is useful to use the class wrappers `InputRangeObject` etc. if you need to

Re: From the D Blog: A Pattern for Head-mutable Structures

2020-06-26 Thread Johannes Loher via Digitalmars-d-announce
On Friday, 26 June 2020 at 09:30:47 UTC, aberba wrote: On Friday, 26 June 2020 at 07:35:17 UTC, JN wrote: [...] For a while I thought it was just me but the D blog posts addressing D specific nifty tricks mostly don't interest me. Benchmarks, const, etc... :(. Probably it's just because of

Re: Why is it possible to call non-const member functions of rvalues but a compile error to modify members or rvalues directly?

2020-06-14 Thread Johannes Loher via Digitalmars-d-learn
On Saturday, 13 June 2020 at 12:47:31 UTC, Stanislav Blinov wrote: [...] The temporary exists until the end of full expression, or until the end of enclosing statement. It is simply not an lvalue for the caller, but it certainly exists, and so its interface must function. So public data

Why is it possible to call non-const member functions of rvalues but a compile error to modify members or rvalues directly?

2020-06-13 Thread Johannes Loher via Digitalmars-d-learn
Consider the following example: ``` struct A { auto a(int _a) { return this._a = _a; } int _a = 0; } void main() { static assert(!__traits(compiles, { A()._a = 2; })); static assert(__traits(compiles, { A().a(2); })); } ``` (https://run.dlang.io/is/GkmpA8) Why

Re: I want Sublime 3 D auto import !

2020-06-01 Thread Johannes Loher via Digitalmars-d-learn
On Monday, 1 June 2020 at 16:18:44 UTC, Виталий Фадеев wrote: I want Sublime D auto import ! When typing code like this: class Uno : IStylable { // } I want will be auto added "import IStylable" at begin of file. Like this: import ui.istylable : IStylable;

Re: how to achieve C's Token Pasting (##) Operator to generate variable name in D?

2020-05-30 Thread Johannes Loher via Digitalmars-d-learn
On Saturday, 30 May 2020 at 23:39:31 UTC, mw wrote: On Saturday, 30 May 2020 at 22:21:14 UTC, Paul Backus wrote: [...] Thank you all for the reply. I hate to write boilerplate code: [...] import std.stdio : writeln; mixin template f(T, string name, T value = T.init) { mixin("T _" ~

Re: DIP 1028 "Make @safe the Default" is dead

2020-05-28 Thread Johannes Loher via Digitalmars-d-announce
Am 29.05.20 um 06:53 schrieb Walter Bright: > The subject says it all. > > If you care about memory safety, I recommending adding `safe:` as the > first line in all your project modules, and annotate individual > functions otherwise as necessary. For modules with C declarations, do as > you think

Re: Determining @trusted-status

2020-05-28 Thread Johannes Loher via Digitalmars-d-learn
On Friday, 29 May 2020 at 00:09:56 UTC, Clarice wrote: It seems that @safe will be de jure, whether by the current state of DIP1028 or otherwise. However, I'm unsure how to responsibly determine whether a FFI may be @trusted: the type signature and the body. Should I run, for example, a C

Re: A custom name for variables

2020-05-28 Thread Johannes Loher via Digitalmars-d-learn
On Thursday, 28 May 2020 at 20:26:55 UTC, Quantium wrote: I need to create a variable with custom name, like this import std; void main() { string name; readf(" %s", ); // some code that generates a variable of type integer and value 0 } Could you help me with that? Do you want

Re: DIP1028 - Rationale for accepting as is

2020-05-27 Thread Johannes Loher via Digitalmars-d-announce
Am 27.05.20 um 12:40 schrieb Walter Bright: > > Indeed it is, and that's the whole point to @safe. My motivation here is > make suspicious code stand out. @trusted code does not stand out so > much, because it is required to exist. By that logic, wouldn't it also make more sense to implicitly

Re: What's the best way to find out which exceptions may be thrown ?

2020-05-27 Thread Johannes Loher via Digitalmars-d-learn
Am 27.05.20 um 12:30 schrieb wjoe: > > Could you please elaborate why checked exceptions are more annoying? > > The only exposure to checked exceptions I had was with Java and I always > liked and appreciated them. > It's super annoying the fiddle around with catch(Exception) all over the >

Re: DIP1028 - Rationale for accepting as is

2020-05-27 Thread Johannes Loher via Digitalmars-d-announce
Am 27.05.20 um 11:50 schrieb Walter Bright: > > It is a fair point. > By the way, thank you for acknowledging that. I appreciate it.

Re: DIP1028 - Rationale for accepting as is

2020-05-27 Thread Johannes Loher via Digitalmars-d-announce
Am 27.05.20 um 11:25 schrieb Walter Bright: > On 5/24/2020 3:40 AM, Stefan Koch wrote: >> The distinction is that you can find a slapped on trusted with a grep. > > It's just as easy to use grep to *not* find @trusted. But that's not enough. You need a regexp that searches for extern (C(++))

Re: DIP1028 - Rationale for accepting as is

2020-05-27 Thread Johannes Loher via Digitalmars-d-announce
Am 27.05.20 um 11:50 schrieb Walter Bright: > It is a fair point. But I am looking a bit farther than that - the team > that is responsible for QAing software (sometimes it is a separate > team). The QA team cannot tell the difference between correctly > annotated @trusted code and greenwashed

Re: How to get the pointer of "this" ?

2020-05-27 Thread Johannes Loher via Digitalmars-d-learn
On Tuesday, 26 May 2020 at 22:23:19 UTC, bauss wrote: On Tuesday, 26 May 2020 at 12:08:29 UTC, Johannes Loher wrote: [...] You can just do this to get around it: auto button = this; log(); True, somebody else posted the same idea already. But as explained, it doesn't do

Re: How to get the pointer of "this" ?

2020-05-26 Thread Johannes Loher via Digitalmars-d-learn
Am 26.05.20 um 16:17 schrieb Vinod K Chandran: > On Tuesday, 26 May 2020 at 13:48:52 UTC, ag0aep6g wrote: >> On 26.05.20 15:43, Vinod K Chandran wrote: >>> So far now, two solutions are very clear for this problem. >>> 1. As per John Chapman's suggestion - use >>> cast(DWORD_PTR)cast(void*)this).

Re: DIP1028 - Rationale for accepting as is

2020-05-26 Thread Johannes Loher via Digitalmars-d-announce
Am 26.05.20 um 15:10 schrieb Panke: > > The bazel community has lots of such switches. Basically every new > behaviour get's introduced with a --preview switch, that will turn into > a --revert after some time. > > For each switch there is a github issue, explaining the change it > detail. Why

Re: DIP1028 - Rationale for accepting as is

2020-05-26 Thread Johannes Loher via Digitalmars-d-announce
Am 26.05.20 um 14:20 schrieb Johannes T: > Thank you very much for your patience with all the negative feedback. I > get your decision to not annotate extern C with @system by default. As much as i disagree with the decision, I am still very glad that we are at least having a discussion. I also

Re: How to get the pointer of "this" ?

2020-05-26 Thread Johannes Loher via Digitalmars-d-learn
On Tuesday, 26 May 2020 at 12:08:29 UTC, Johannes Loher wrote: [...] Small correction: I said that this is an lvalue and that you cannot take the address of lvalues. Of course that is incorrect, I meant to say that rvalues (this is an rvalue and you cannot take the address of rvalues).

Re: How to get the pointer of "this" ?

2020-05-26 Thread Johannes Loher via Digitalmars-d-learn
On Tuesday, 26 May 2020 at 11:44:58 UTC, Vinod K Chandran wrote: On Monday, 25 May 2020 at 16:39:30 UTC, Mike Parker wrote: On Monday, 25 May 2020 at 08:39:23 UTC, John Burton wrote: I believe that in D *this* is a reference to the object and not a pointer like in C++. So I think that writing

Re: DIP1028 - Rationale for accepting as is

2020-05-26 Thread Johannes Loher via Digitalmars-d-announce
On Tuesday, 26 May 2020 at 03:37:29 UTC, Walter Bright wrote: He can look at unattributed declarations. The issue is, you have to know about that beforehand. In the other situation, you explicitly get warned by the compiler (by the compile error) that that something dangerous is going on.

Re: DIP1028 - Rationale for accepting as is

2020-05-25 Thread Johannes Loher via Digitalmars-d-announce
On Tuesday, 26 May 2020 at 01:16:49 UTC, Walter Bright wrote: On 5/24/2020 5:56 PM, Timon Gehr wrote: It's only greenwashing if it's misleading. Putting @safe is a lie, putting @trusted is honest. It is not honest unless the programmer actually carefully examined the interface and the

Re: DIP1028 - Rationale for accepting as is

2020-05-25 Thread Johannes Loher via Digitalmars-d-announce
On Monday, 25 May 2020 at 11:40:46 UTC, Johannes T wrote: On Monday, 25 May 2020 at 10:19:22 UTC, Johannes Loher wrote: [..] But with the DIP in its current form, we make @safe lose its meaning and power, which is much worse in my opinion. [..] The alternative, not making extern @safe,

Re: DIP1028 - Rationale for accepting as is

2020-05-25 Thread Johannes Loher via Digitalmars-d-announce
On Monday, 25 May 2020 at 09:25:52 UTC, Johannes T wrote: On Monday, 25 May 2020 at 00:56:04 UTC, Timon Gehr wrote: [..] After thinking about it, Walter ultimately made the right decision, leading to overall higher safety and code quality. We all agree that making extern C @safe is

Re: DIP1028 - Rationale for accepting as is

2020-05-24 Thread Johannes Loher via Digitalmars-d-announce
On Sunday, 24 May 2020 at 12:14:13 UTC, aliak wrote: On Sunday, 24 May 2020 at 11:30:53 UTC, Johannes Loher wrote: On Sunday, 24 May 2020 at 11:25:06 UTC, aliak wrote: On Sunday, 24 May 2020 at 10:40:11 UTC, Johannes Loher wrote: does not work). But I admit that it is still a bit weird to

Re: DIP1028 - Rationale for accepting as is

2020-05-24 Thread Johannes Loher via Digitalmars-d-announce
On Sunday, 24 May 2020 at 11:25:06 UTC, aliak wrote: On Sunday, 24 May 2020 at 10:40:11 UTC, Johannes Loher wrote: does not work). But I admit that it is still a bit weird to have 2 different defaults. Is that any more or less weirder than having functions inferred with different attributes

Re: DIP1028 - Rationale for accepting as is

2020-05-24 Thread Johannes Loher via Digitalmars-d-announce
On Sunday, 24 May 2020 at 08:55:32 UTC, Walter Bright wrote: I infer your position is the idea that putting @trusted on the declarations isn't greenwashing, while @safe is. I can't see a practical difference between: @safe extern (C) void whatevs(parameters); @trusted extern (C) void

Re: DIP1028 - Rationale for accepting as is

2020-05-22 Thread Johannes Loher via Digitalmars-d-announce
On Friday, 22 May 2020 at 12:47:04 UTC, matheus wrote: On Friday, 22 May 2020 at 12:28:56 UTC, rikki cattermole wrote: Although it seems an improvement has been made to how he needs to respond to the DIP assessment. It should also include a statement from Atila as well given his position.

Re: DIP 1028--Make @safe the Default--Formal Assessment

2020-05-21 Thread Johannes Loher via Digitalmars-d-announce
On Thursday, 21 May 2020 at 13:51:34 UTC, Mike Parker wrote: DIP 1028, "Make @safe the Default", has been accepted without comment. https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1028.md As others have mentioned, this really is a farce. I understand that not everybody will be

Re: Unexpectedly nice case of auto return type

2019-12-06 Thread Johannes Loher via Digitalmars-d-learn
On Tuesday, 3 December 2019 at 10:06:22 UTC, Mike Parker wrote: On Tuesday, 3 December 2019 at 10:03:22 UTC, Basile B. wrote: That's interesting details of D developement. Since you reply to the first message I think you have not followed but in the last reply I told that maybe we should be

Re: D Forum Mobile Version - Beta

2019-11-28 Thread Johannes Loher via Digitalmars-d-announce
On Thursday, 28 November 2019 at 04:23:21 UTC, Nick Sabalausky (Abscissa) wrote: 1. I find the text size to be exactly what I wish most sites would use. Most sites just assume everyone's on some kind of "Apple iSuperMini for Oompa-Loompas With The Fingers of Five-Year-Olds" and crank up the

Re: D Forum Mobile Version - Beta

2019-11-28 Thread Johannes Loher via Digitalmars-d-announce
To begin with: Sorry if my last post came across a bit harsh. That was not my intention. I thought you were looking for feedback and I wanted to be honest regarding that. If you are simply doing it for yourself and others, who also like it, that is of course perfectly fine. But personally I

Re: D Forum Mobile Version - Beta

2019-11-27 Thread Johannes Loher via Digitalmars-d-announce
On Wednesday, 27 November 2019 at 15:17:15 UTC, matheus wrote: On Wednesday, 27 November 2019 at 10:58:17 UTC, Bastiaan Veelo wrote: I’d recommend contacting Vladimir directly, like bachmeier said... OK I'll try that. However, I tried your version and it didn’t work well for me; I’m on an

Re: Throwing from a lambda isn't supported by the compiler

2019-09-09 Thread Johannes Loher via Digitalmars-d-learn
On Monday, 9 September 2019 at 10:46:10 UTC, Dennis wrote: Such a shame it got rejected in favor of ugly 'no return' annotations [...] This is incorrect. It was rejected because the proposal was not solid enough. While it is true that a lot of people seemed to prefer an annotation based

Re: How should I sort a doubly linked list the D way?

2019-08-13 Thread Johannes Loher via Digitalmars-d-learn
Am 13.08.19 um 11:48 schrieb Mirjam Akkersdijk: > Hello there, > If I had a DLL, how would I sort it judging by the node contents, the D > way? > > In C if I were to sort a piece of malloc'd memory pointing to node > pointers, I would write my compare function and let qsort sort it out. > In D, I

Re: Redis client hunt-redis RC1 released

2019-07-27 Thread Johannes Loher via Digitalmars-d-announce
Am 27.07.19 um 16:00 schrieb zoujiaqing: > On Saturday, 27 July 2019 at 09:07:13 UTC, Eugene Wissner wrote: >> On Saturday, 27 July 2019 at 06:08:34 UTC, zoujiaqing wrote: >>> On Thursday, 25 July 2019 at 20:19:53 UTC, ag0aep6g wrote: [...] >>> >>> Thanks. >>> But we use other language to

Re: Why is Throwable.TraceInfo.toString not @safe?

2019-07-22 Thread Johannes Loher via Digitalmars-d-learn
Am 22.07.19 um 20:38 schrieb Jonathan M Davis: > On Monday, July 22, 2019 1:29:21 AM MDT Johannes Loher via Digitalmars-d- > learn wrote: >> Am 22.07.19 um 05:16 schrieb Paul Backus: >>> On Sunday, 21 July 2019 at 18:03:33 UTC, Johannes Loher wrote: >>>> I'd

Re: Why is Throwable.TraceInfo.toString not @safe?

2019-07-22 Thread Johannes Loher via Digitalmars-d-learn
Am 22.07.19 um 05:16 schrieb Paul Backus: > On Sunday, 21 July 2019 at 18:03:33 UTC, Johannes Loher wrote: >> I'd like to log stacktraces of caught exceptions in an @safe manner. >> However, Throwable.TraceInfo.toString is not @safe (or @trusted), so >> this is not possible. Why is it not @safe?

Why is Throwable.TraceInfo.toString not @safe?

2019-07-21 Thread Johannes Loher via Digitalmars-d-learn
I'd like to log stacktraces of caught exceptions in an @safe manner. However, Throwable.TraceInfo.toString is not @safe (or @trusted), so this is not possible. Why is it not @safe? Can it be @trusted? Thanks for your help!

Re: Beta 2.087.0

2019-06-18 Thread Johannes Loher via Digitalmars-d-announce
Am 17.06.19 um 00:47 schrieb Martin Nowak: > Glad to announce the first beta for the 2.087.0 release, ♥ to the 66 > contributors. > > http://dlang.org/download.html#dmd_beta > http://dlang.org/changelog/2.087.0.html > > As usual please report any bugs at > https://issues.dlang.org > > -Martin >

Re: Why after writeln the binaryHeap become empty?

2019-06-18 Thread Johannes Loher via Digitalmars-d-learn
Am 18.06.19 um 17:45 schrieb lili: > Hi Guys: >    see this code > ~~~ >     int[] ar = [1,2,3,4,52,34,22]; >     auto h = heapify(ar); >     assert(h.length() == ar.length); >     writeln("h:",h); >     assert(h.empty()); > ~~~ > dmd v2.086.0  run all assert passed. Why? The result of heapify is

Re: Function parameters UDAs

2019-06-10 Thread Johannes Loher via Digitalmars-d-learn
On Wednesday, 14 November 2018 at 18:05:55 UTC, Adam D. Ruppe wrote: On Wednesday, 14 November 2018 at 16:28:19 UTC, Radu wrote: Looks like that there is no easy way to extract a function parameters UDA list. Indeed, the only way I can find is kinda crazy: --- void foo(int f, @("test")

Re: Meson build system user learning D.

2019-05-20 Thread Johannes Loher via Digitalmars-d-learn
On Sunday, 19 May 2019 at 16:47:39 UTC, Mike Brockus wrote: On Sunday, 19 May 2019 at 07:46:11 UTC, Johannes Loher wrote: Am 18.05.19 um 08:20 schrieb Mike Brockus: [...] Hey there, I already tried to answer your questions on reddit. You can post links here by simply pasting the URL (the

Re: Meson build system user learning D.

2019-05-19 Thread Johannes Loher via Digitalmars-d-learn
Am 18.05.19 um 08:20 schrieb Mike Brockus: > Hello there this is your hometown Meson build system user here just > happen to have a > question related to unit testing in D. > > So is there a way to run the unit-test in the test main as a costume > test runner in > "test/test.d", and run the

Re: Static Webpages of Forum Threads

2019-05-13 Thread Johannes Loher via Digitalmars-d-announce
Am 13.05.19 um 09:45 schrieb Walter Bright: > A request for this was made at DConf (I think by Nicholas) and we're > already doing it: > >   https://www.digitalmars.com/NewsGroup.html > > Just click on the items under the "Archive" column. It's all there, back > to the first post. It's organized

Re: DConf 2019 Day 2 Livestream

2019-05-09 Thread Johannes Loher via Digitalmars-d-announce
On Thursday, 9 May 2019 at 07:45:41 UTC, Andrei Alexandrescu wrote: Just checked, it works: https://youtu.be/Vj6jNAlv03o Great to know! Thanks for fixing this for today!

Re: DConf 2019 Livestream

2019-05-08 Thread Johannes Loher via Digitalmars-d-announce
On Wednesday, 8 May 2019 at 08:33:52 UTC, Laeeth Isharc wrote: On Wednesday, 8 May 2019 at 08:04:08 UTC, Mike Parker wrote: On Wednesday, 8 May 2019 at 08:00:15 UTC, Andrej Mitrovic wrote: On Wednesday, 8 May 2019 at 07:57:40 UTC, Mike Parker wrote: The venue uses WebEx for livestreaming. All

Re: How to mixin finction name?

2019-04-14 Thread Johannes Loher via Digitalmars-d-learn
Am 14.04.19 um 15:22 schrieb Adam D. Ruppe: > [...] > Though, I'd point out the mixin code doesn't have to be too ugly. > Consider this: > > void main() > { >     enum letters = ['A', 'B', 'C']; > >     static foreach(ch; letters) >     { >     mixin(q{ >     void print}~ch~q{(int i) { >

Re: Aliasing a mixin (or alternative ways to profile a scope)

2019-03-07 Thread Johannes Loher via Digitalmars-d-learn
Am 07.03.19 um 22:50 schrieb Johannes Loher: > [...] As a small addition, if you always want to pass the function name as a parameter, you can simplify this to the following: ``` enum profile_scope(string name = __FUNCTION__) = "import core.stdc.stdio : printf; printf(\"" ~ name ~ "\n\");

Re: Aliasing a mixin (or alternative ways to profile a scope)

2019-03-07 Thread Johannes Loher via Digitalmars-d-learn
Am 07.03.19 um 22:21 schrieb Simon: > > Is there a way to achieve this while compiling with -betterC? I use a > custom string struct right now, and your version needs TypeInfo, > concatening using ~ needs the garbage collector. I have the feeling D is > really not agreeing with the way I want to

Re: Aliasing a mixin (or alternative ways to profile a scope)

2019-03-07 Thread Johannes Loher via Digitalmars-d-learn
Am 07.03.19 um 21:07 schrieb Simon: > Hello, > > I am currently porting the frontend of my instrumenting profiler to D. > It features a C++-makro that profiles the time between entering and > leaving a scope (achieved with con-/destructors in C++). Since D has > scopeguards, I hoped to achieve

Re: 2 class issues

2019-03-07 Thread Johannes Loher via Digitalmars-d-learn
Am 07.03.19 um 11:38 schrieb spir: > Hello, > > First, I am not very experimented with the combination of static lang > (alloc & typing) and OO (class-based). I'm implementing a library for > lexical analysis (lexing), with 2 minor issues: > > -1- How to enforce that subclasses implement given

Re: DIP 1017--Add Bottom Type--Formal Assessment

2019-01-30 Thread Johannes Loher via Digitalmars-d-announce
Am 30.01.19 um 15:05 schrieb Mike Parker: > Given the nature of the feedback in both review rounds this DIP has gone > through, Walter has decided to reject his own DIP. He still believes > there is a benefit to adding a bottom type to the language, but this > proposal is not the way to go about

Re: Should I prefix package names with the name of my program?

2019-01-29 Thread Johannes Loher via Digitalmars-d-learn
Am 28.01.19 um 18:29 schrieb H. S. Teoh: > On Mon, Jan 28, 2019 at 04:59:22PM +, Victor Porton via > Digitalmars-d-learn wrote: >> Should I prefix all module names with `xmlboiler.` (where XML Boiler >> is the name of my program). These packages are expected to be used >> internally by my

Re: New Fundraiser: D Forums Server

2019-01-29 Thread Johannes Loher via Digitalmars-d-announce
Am 29.01.19 um 01:58 schrieb Mike Parker: > On Monday, 28 January 2019 at 20:00:53 UTC, Johannes Loher wrote: > >> I would like to donate for this, but flipcause does not seem to work >> for me at all: >> >> I tried to make the donation several times, but after entering all the >> details and

Re: Hunt framework 2.0.0 released

2019-01-29 Thread Johannes Loher via Digitalmars-d-announce
Am 29.01.19 um 11:00 schrieb zoujiaqing: > [...] It's really great to see your continued efforts. Keep up the good work!

Re: GtkD Blog Now Up and Running

2019-01-29 Thread Johannes Loher via Digitalmars-d-announce
Am 29.01.19 um 22:47 schrieb Ron Tarrant: > And this goes in the same folder as the code file. And then... what? I > type: dub? The code file should be in a subfolder called "source". This is customizable, but this is the default. So the folder structure should look something like this: ├──

Re: New Fundraiser: D Forums Server

2019-01-28 Thread Johannes Loher via Digitalmars-d-announce
Am 25.01.19 um 18:01 schrieb Mike Parker: > One of the options we were considering for a new fundraising campaign > was raising money for Vladimir's continuing efforts on the forums. He's > been maintaining them, and covering the server, without any compensation > since the beginning. The recent

Re: DConf 2019 Early-Bird Registration Now Open

2019-01-28 Thread Johannes Loher via Digitalmars-d-announce
Am 28.01.19 um 15:07 schrieb Mike Parker: > I've published a post on the blog with updates about DConf 2019 > registrations, the invited keynote speaker, the Symmetry Autumn of Code > finalist, and the previously announced fundraiser for a new forum server. > > Early-bird registrations are $340

Re: B Revzin - if const expr isn't broken (was Re: My Meeting C++ Keynote video is now available)

2019-01-17 Thread Johannes Loher via Digitalmars-d-announce
Am 17.01.19 um 23:20 schrieb Stefan Koch: > For 2 years I have pondered this problem, and I did come up with a > solution. > It's actually not that hard to have CTFE interact with type-tuples. > You can pass them as function parameters, or return them if you wish. > Of course a type-tuple

Re: hunt library 1.0.0 released!

2019-01-15 Thread Johannes Loher via Digitalmars-d-announce
On Tuesday, 15 January 2019 at 14:58:01 UTC, Brian wrote: [...] Thanks for the great work! I had already been planning on playing around with hunt for a bit. What has been holding me back until now is the fact that part of the documentation still is only available in Chinese, which I

Re: Understanding SIGSEGV issues

2019-01-09 Thread Johannes Loher via Digitalmars-d-learn
On Wednesday, 9 January 2019 at 16:48:47 UTC, Russel Winder wrote: On Tue, 2019-01-08 at 11:51 +, Nicholas Wilson via Digitalmars-d-learn wrote: [...] […] [...] [...] If debugger integration is that important to you, you might want to try out visual studio code with the corresponding

Re: DCD, D-Scanner and DFMT : new year edition

2019-01-01 Thread Johannes Loher via Digitalmars-d-announce
On Monday, 31 December 2018 at 12:25:08 UTC, WebFreak001 wrote: IMPORTANT: if you have downloaded the v0.10.2 DCD binaries before 2018-12-31T12:30:00Z, please delete those and redownload because the binaries were broken; they reported version v0.1 instead of v0.10.2 and this could mess with

Re: typeof function literals which define the types of its parameters but do not give their parameters names

2018-12-27 Thread Johannes Loher via Digitalmars-d-learn
On Thursday, 27 December 2018 at 08:53:30 UTC, Johannes Loher wrote: On Thursday, 27 December 2018 at 04:27:03 UTC, Steven Schveighoffer wrote: [...] As a side note: During last DConf I talked to Walter and Andrei about the fact that `typeof(SomeTemplate) == void` and they agreed that it

Re: typeof function literals which define the types of its parameters but do not give their parameters names

2018-12-27 Thread Johannes Loher via Digitalmars-d-learn
On Thursday, 27 December 2018 at 04:27:03 UTC, Steven Schveighoffer wrote: On 12/26/18 10:52 PM, Johannes Loher wrote: Hey all, I am a bit confused about the inferred types of function literals which do not name their parameters (something like `(int) {}`). The confusion arises from the fact

typeof function literals which define the types of its parameters but do not give their parameters names

2018-12-26 Thread Johannes Loher via Digitalmars-d-learn
Hey all, I am a bit confused about the inferred types of function literals which do not name their parameters (something like `(int) {}`). The confusion arises from the fact that the inferred type sometimes is `void` (might be the case, because the function literal is inferred to be a

Re: cas and interfaces

2018-12-25 Thread Johannes Loher via Digitalmars-d-learn
On Monday, 24 December 2018 at 11:23:32 UTC, Johan Engelen wrote: On Sunday, 23 December 2018 at 14:07:04 UTC, Johannes Loher wrote: [...] The types of the 2nd and 3rd arguments of `cas` do not have to be the same, and aren't in your case. I think what's happening is that you are

cas and interfaces

2018-12-23 Thread Johannes Loher via Digitalmars-d-learn
I recently played around with atomic operations. While doing so, I noticed a problem with the interaction of interfaces and cas. Consider the following program: ``` import core.atomic; import std.stdio; interface TestInterface { } class TestClass : TestInterface { } void main() { shared

Re: DConf 2019: Shepherd's Pie Edition

2018-12-22 Thread Johannes Loher via Digitalmars-d-announce
On Saturday, 22 December 2018 at 16:57:10 UTC, Joakim wrote: As I recall, you largely agreed with me: That is true, and I still do regarding many points (though not all). But this is not the point I wanted to make. I don't consider my opinion that important. I simply wanted to point out why

Re: DConf 2019: Shepherd's Pie Edition

2018-12-22 Thread Johannes Loher via Digitalmars-d-announce
On Saturday, 22 December 2018 at 15:11:10 UTC, Joakim wrote: On Saturday, 22 December 2018 at 14:26:29 UTC, Atila Neves wrote: On Saturday, 22 December 2018 at 13:46:39 UTC, Joakim wrote: On Saturday, 22 December 2018 at 12:18:25 UTC, Mike Parker wrote: The egregious waste of time and

Re: Why do ints defined in template mixins have garbage values?

2018-12-12 Thread Johannes Loher via Digitalmars-d-learn
On Tuesday, 11 December 2018 at 21:09:55 UTC, Johannes Riecken wrote: Code: import std.conv; import std.stdio; mixin template genInts() { enum arr = [0,1]; static foreach (t; arr) { mixin("int i" ~ to!string(t) ~ " = 5;"); } } void main() { mixin genInts!(); writeln(i0);

Re: DIP 1015--Deprecation of Implicit Conversion of Int. & Char. Literals to bool--Formal Assement

2018-11-12 Thread Johannes Loher via Digitalmars-d-announce
On Monday, 12 November 2018 at 16:39:47 UTC, Mike Parker wrote: Walter and Andrei take the position that this is incorrect the wrong way to view a bool. Unfortunately you did not include their justification for this position (if any). To me it would be interesting to know about the reasoning

Re: Please don't do a DConf 2018, consider alternatives

2018-10-02 Thread Johannes Loher via Digitalmars-d
On Tuesday, 2 October 2018 at 15:42:20 UTC, Joakim wrote: On Tuesday, 2 October 2018 at 15:03:45 UTC, Adam D. Ruppe wrote: That is what Joakim is talking about - changing the main event to be more like the after-hours stuff everyone loves so much, to actually use all the time to maximize the

Re: Copy Constructor DIP and implementation

2018-09-22 Thread Johannes Loher via Digitalmars-d-announce
On Monday, 17 September 2018 at 19:10:27 UTC, Jonathan M Davis wrote: On Monday, September 17, 2018 8:27:16 AM MDT Meta via Digitalmars-d-announce wrote: [...] Honestly, I don't think that using a pragma instead of an attribute fixes much, and it goes against the idea of what pragmas are

Re: vibe.d: Finding out if currently in webinterface request

2018-08-10 Thread Johannes Loher via Digitalmars-d-learn
On Friday, 10 August 2018 at 09:33:34 UTC, Timoses wrote: On Thursday, 9 August 2018 at 21:59:24 UTC, Johannes Loher wrote: I already posted this in the vibe.d forums (https://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/58891/), but it seems, there is not a lot of activity

vibe.d: Finding out if currently in webinterface request

2018-08-09 Thread Johannes Loher via Digitalmars-d-learn
I already posted this in the vibe.d forums (https://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/58891/), but it seems, there is not a lot of activity over there, so I am cross posting this here: Is there a way to find out, if we are currently in a webinterface request? My

Re: Question about template argument matching with alias this

2018-07-29 Thread Johannes Loher via Digitalmars-d-learn
On Sunday, 29 July 2018 at 20:51:45 UTC, Alex wrote: Do you mean something like this? [...] Yeah, I know that it possible to implement the template like this, but that is not the point here. I would like to know why it does not work the way I described it. To me it seems very strange, that

Question about template argument matching with alias this

2018-07-29 Thread Johannes Loher via Digitalmars-d-learn
I have a question about template argument matching in combination with implicit conversion and alias this. Consider the following code: interface SomeInterface { } class SomeClass : SomeInterface { } struct SomeStruct { SomeClass someClass; alias someClass this; } template

Re: Request scoped information in Vibe.d

2018-07-29 Thread Johannes Loher via Digitalmars-d-learn
On Sunday, 22 July 2018 at 18:21:21 UTC, Venkat wrote: On Sunday, 22 July 2018 at 08:43:23 UTC, Johannes Loher wrote: On Sunday, 22 July 2018 at 06:21:40 UTC, Venkat wrote: [...] What is your usecase? If you simply want to pass a variable to a diet template, just pass it as a template

Re: Request scoped information in Vibe.d

2018-07-22 Thread Johannes Loher via Digitalmars-d-learn
On Sunday, 22 July 2018 at 06:21:40 UTC, Venkat wrote: How do I make variables available to diet templates ? Java has request.setAttribute. Vibe.d's HTTPServerRequest has params and queryString. But by the looks of it, neither one of them is created for the purpose of temporary storage in the

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-22 Thread Johannes Loher via Digitalmars-d
On Saturday, 21 July 2018 at 08:59:39 UTC, Manu wrote: 4. A struct-type getter that returns by-val exhibits this gotcha in a variety of ways; you 'get' the member (a by-val copy), then mutate a member in any way, (ie, call a method), and you've accidentally modified the copy, not the source

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-21 Thread Johannes Loher via Digitalmars-d
On Saturday, 21 July 2018 at 07:10:51 UTC, Johannes Loher wrote: [...] By the way, this does not mean I am totally against DIP 1016. It has a lot of benefits in my opinion. But I also think that Jonathan has a very valid point which definitely needs to be considered.

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-21 Thread Johannes Loher via Digitalmars-d
On Saturday, 21 July 2018 at 05:59:37 UTC, Manu wrote: [...] Let me give a concrete example of one of the situations Jonathan is describing. Consider the following code: struct Secret { public: string key; } /* ... */ genrateRandomKey(ref string key) { key = /* some code to

Re: I have a plan.. I really DO

2018-07-01 Thread Johannes Loher via Digitalmars-d-announce
Am 01.07.2018 um 14:12 schrieb Ecstatic Coder: > > Add a 10-liner "Hello World" web server example on the main page and > that's it. There already is one in the examples: #!/usr/bin/env dub /+ dub.sdl: name "hello_vibed" dependency "vibe-d" version="~>0.8.0" +/ void main() { import vibe.d;

Re: DUB colored output proposal/showcase

2018-06-08 Thread Johannes Loher via Digitalmars-d
On Friday, 8 June 2018 at 13:35:36 UTC, gdelazzari wrote: Hello everyone, I'm a new user of the language (I've been playing around with it for some months) and I'm really liking it. [...] I really like this very much! I think this a great improvement for dub and I believe ist is very

Re: unit-threaded v0.7.45 - now with more fluency

2018-05-07 Thread Johannes Loher via Digitalmars-d-announce
On Monday, 7 May 2018 at 09:19:31 UTC, Dechcaudron wrote: On Saturday, 5 May 2018 at 15:51:11 UTC, Johannes Loher wrote: Personally, I don't like that kind of "abuse" of operators at all. I think it looks really unusual and it kind of breaks your "flow" when reading the code. Additionally,

Re: unit-threaded v0.7.45 - now with more fluency

2018-05-05 Thread Johannes Loher via Digitalmars-d-announce
On Saturday, 5 May 2018 at 13:28:41 UTC, Atila Neves wrote: For those not in the know, unit-threaded is an advanced testing library for D that runs tests in threads by default. It has a lot of features: http://code.dlang.org/packages/unit-threaded New: * Bug fixes * Better integration

Re: Need help with the dmd package on NixOS

2018-05-04 Thread Johannes Loher via Digitalmars-d
Am 04.05.2018 um 22:27 schrieb Thomas Mader: > [...] Here is a demangled version of what you posted: dmd hello.d hello.o: In function `@safe void std.stdio.writeln!(immutable(char)[]).writeln(immutable(char)[])': hello.d:(.text.@safe void

Re: mysql-native v2.2.2: Minor updates

2018-05-04 Thread Johannes Loher via Digitalmars-d-announce
On Friday, 4 May 2018 at 02:59:10 UTC, Nick Sabalausky (Abscissa) wrote: An all-D MySQL/MariaDB client library: https://github.com/mysql-d/mysql-native == Tagged release, 'v2.2.2'. Sorry, no "zero date" fix just yet, but I think we're getting close

Re: making a struct an inputRange with free functions

2018-04-16 Thread Johannes Loher via Digitalmars-d-learn
Am 16.04.2018 um 21:27 schrieb Jonathan M Davis: > On Monday, April 16, 2018 21:10:03 Johannes Loher via Digitalmars-d-learn > wrote: >> Is there a way to do this? Here is a naive implementation: >> https://run.dlang.io/is/JKvL80 . >> >> It does not pass `isInputRan

making a struct an inputRange with free functions

2018-04-16 Thread Johannes Loher via Digitalmars-d-learn
Is there a way to do this? Here is a naive implementation: https://run.dlang.io/is/JKvL80 . It does not pass `isInputRange` (I think, because the free functions are not visible in the scope of `isInputRange`). Trying to iterate over it with a foreach loop results in a compile error: Error:

Re: code-d 0.17.0 + serve-d 0.1.2

2018-04-10 Thread Johannes Loher via Digitalmars-d-announce
Am 10.04.2018 um 14:27 schrieb WebFreak001: > On Monday, 9 April 2018 at 21:45:57 UTC, Johannes Loher wrote: >> Am 04.04.2018 um 20:34 schrieb greatsam4sure: >>> [...] >> I just tried to get this to work, too, but I was not able to get it to >> work correctly. It seems that running dub fails

Re: code-d 0.17.0 + serve-d 0.1.2

2018-04-09 Thread Johannes Loher via Digitalmars-d-announce
Am 04.04.2018 um 20:34 schrieb greatsam4sure: > On Tuesday, 3 April 2018 at 23:02:42 UTC, WebFreak001 wrote: >> new code-d (D extension for vscode) and serve-d (Language Server >> Protocol server for it) release >> >> See the CHANGELOG in vscode, or on >>

  1   2   >