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

2018-10-02 Thread Gary Willoughby via Digitalmars-d
On Tuesday, 2 October 2018 at 07:32:58 UTC, Joakim wrote: Thank you for making clear that the real reason you and some others like the current format is because you want to have a fun "vacation"- as I pointed out in that earlier thread- rather than anything to do with D or advancing the ecosyst

Re: `shared`...

2018-10-02 Thread Walter Bright via Digitalmars-d
On 10/1/2018 7:31 PM, Manu wrote: Surely `scope` must be transitive? It isn't. How could it work otherwise? It's a storage class, not a type constructor. There is no "pointer to scope" type, for example. Having it transitive would make it unworkable, actually, for similar reasons that tra

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

2018-10-02 Thread Joakim via Digitalmars-d
On Tuesday, 2 October 2018 at 07:14:54 UTC, bauss wrote: On Tuesday, 2 October 2018 at 06:26:30 UTC, Joakim wrote: [...] I highly disagree with this. I love conferences and meetups. It's good socially and a conference is not 100% just about the topic it hosts. I think you didn't read what

Re: Funny way to crash dmd and brick the whole computer

2018-10-02 Thread bauss via Digitalmars-d
On Monday, 1 October 2018 at 10:18:48 UTC, Basile B. wrote: On Monday, 1 October 2018 at 09:24:18 UTC, Basile B. wrote: On Friday, 28 September 2018 at 11:58:25 UTC, Zardoz wrote: CTE fib : module fib_cte; import std.stdio; long fib(long n) { if (n <= 1) return 1; return fib(n - 1) + fib(

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

2018-10-02 Thread bauss via Digitalmars-d
On Tuesday, 2 October 2018 at 06:26:30 UTC, Joakim wrote: I'm sure some thought and planning is now going into the next DConf, so I'd like to make sure people are aware that the conference format that DConf uses is dying off, as explained here: https://marco.org/2018/01/17/end-of-conference-e

Please don't do a DConf 2018, consider alternatives

2018-10-01 Thread Joakim via Digitalmars-d
I'm sure some thought and planning is now going into the next DConf, so I'd like to make sure people are aware that the conference format that DConf uses is dying off, as explained here: https://marco.org/2018/01/17/end-of-conference-era There was a discussion about this in a previous forum th

Help needed for D support in SCons on Windows

2018-10-01 Thread Russel Winder via Digitalmars-d
Hi, I know there are a number of people out there who use SCons to build D codes. I know there are a number of those people who work on Windows. Your help is being asked for. All the work I have done for D support in SCons has been based entirely on Debian Sid, but tested on Fedora Rawhide, and

Re: Funny way to crash dmd and brick the whole computer

2018-10-01 Thread Joakim via Digitalmars-d
On Friday, 28 September 2018 at 11:58:25 UTC, Zardoz wrote: CTE fib : module fib_cte; import std.stdio; long fib(long n) { if (n <= 1) return 1; return fib(n - 1) + fib(n - 2); } static immutable valueFib = fib(46); void main() { writeln(valueFib); } I tried it on Android with LDC,

Re: Warn on unused imports?

2018-10-01 Thread Jonathan M Davis via Digitalmars-d
On Monday, October 1, 2018 8:03:39 PM MDT Nick Sabalausky (Abscissa) via Digitalmars-d wrote: > On 10/01/2018 04:58 PM, Jonathan M Davis wrote: > > On Monday, October 1, 2018 2:44:32 PM MDT Nick Sabalausky (Abscissa) via > > > > Digitalmars-d wrote: > >> Nobody s

Re: `shared`...

2018-10-01 Thread Manu via Digitalmars-d
On Mon, Oct 1, 2018 at 5:00 PM Timon Gehr via Digitalmars-d wrote: > > On 02.10.2018 01:09, Manu wrote: > > Your entire example depends on escaping references. I think you missed > > the point? > > There was no 'scope' in the OP, and no, that is not suffici

Re: Warn on unused imports?

2018-10-01 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 10/01/2018 04:58 PM, Jonathan M Davis wrote: On Monday, October 1, 2018 2:44:32 PM MDT Nick Sabalausky (Abscissa) via Digitalmars-d wrote: Nobody said anything about making them part of the build process. We're talking about them being included in the compiler, not about them being i

Re: `shared`...

2018-10-01 Thread Walter Bright via Digitalmars-d
On 10/1/2018 4:56 PM, Timon Gehr wrote: There was no 'scope' in the OP, and no, that is not sufficient either, because scope is not transitive but shared is. Oops, I missed that point. Glad you noticed it.

Re: Yet another binding generator (WIP)

2018-10-01 Thread evilrat via Digitalmars-d
On Monday, 1 October 2018 at 15:35:30 UTC, Stefan Koch wrote: On Monday, 1 October 2018 at 13:51:10 UTC, evilrat wrote: Hi, Early access program is now live! Limited offer! Preorder until 12.31.2017 BC and you will receive* unique pet - "Cute Space Hamster"! !! *(Limited quantity in stock) [.

Re: Yet another binding generator (WIP)

2018-10-01 Thread evilrat via Digitalmars-d
On Monday, 1 October 2018 at 15:39:42 UTC, Jonathan Marler wrote: On Monday, 1 October 2018 at 13:51:10 UTC, evilrat wrote: Hi, Early access program is now live! Limited offer! Preorder until 12.31.2017 BC and you will receive* unique pet - "Cute Space Hamster"! !! *(Limited quantity in stock)

Re: `shared`...

2018-10-01 Thread Steven Schveighoffer via Digitalmars-d
On 10/1/18 7:09 PM, Manu wrote: On Mon, Oct 1, 2018 at 8:55 AM Timon Gehr via Digitalmars-d wrote: On 01.10.2018 04:29, Manu wrote: struct Bob { void setThing() shared; } As I understand, `shared` attribution intends to guarantee that I dun synchronisation internally. This method is

Re: `shared`...

2018-10-01 Thread Timon Gehr via Digitalmars-d
On 02.10.2018 01:09, Manu wrote: Your entire example depends on escaping references. I think you missed the point? There was no 'scope' in the OP, and no, that is not sufficient either, because scope is not transitive but shared is.

Re: `shared`...

2018-10-01 Thread Steven Schveighoffer via Digitalmars-d
On 10/1/18 7:56 PM, Steven Schveighoffer wrote: On 10/1/18 7:09 PM, Manu wrote: Your entire example depends on escaping references. I think you missed the point? The problem with mutable wildcards is that you can assign them. This exposes the problem in your design. The reason const works is

Re: `shared`...

2018-10-01 Thread Manu via Digitalmars-d
On Mon, Oct 1, 2018 at 11:45 AM deadalnix via Digitalmars-d wrote: > > On Monday, 1 October 2018 at 02:29:40 UTC, Manu wrote: > > I feel like I don't understand the design... > > mutable -> shared should work the same as mutable -> const... > > because &

Re: `shared`...

2018-10-01 Thread Manu via Digitalmars-d
On Mon, Oct 1, 2018 at 8:55 AM Timon Gehr via Digitalmars-d wrote: > > On 01.10.2018 04:29, Manu wrote: > > struct Bob > > { > >void setThing() shared; > > } > > > > As I understand, `shared` attribution intends to guarantee that I dun > >

Re: `shared`...

2018-10-01 Thread Manu via Digitalmars-d
On Mon, Oct 1, 2018 at 3:51 AM Jonathan M Davis via Digitalmars-d wrote: > > pure is not sufficient regardless of what happens with threads, [..] #truefacts > Certainly, it's way, way simply just to use scope and force > the programmer to continue to cast in those cases that t

Re: Warn on unused imports?

2018-10-01 Thread Jonathan M Davis via Digitalmars-d
On Monday, October 1, 2018 2:44:32 PM MDT Nick Sabalausky (Abscissa) via Digitalmars-d wrote: > On 10/01/2018 03:32 PM, Jonathan M Davis wrote: > > On Monday, October 1, 2018 12:36:49 PM MDT Nick Sabalausky (Abscissa) > > via > > > > Digitalmars-d wrote: > >> Y

Re: Warn on unused imports?

2018-10-01 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 10/01/2018 03:32 PM, Jonathan M Davis wrote: On Monday, October 1, 2018 12:36:49 PM MDT Nick Sabalausky (Abscissa) via Digitalmars-d wrote: Yes, that's exactly what warnings are for. If people need to treat them differently than that (ex: C++), that's a failing of the language.

Re: Warn on unused imports?

2018-10-01 Thread Jonathan M Davis via Digitalmars-d
On Monday, October 1, 2018 12:36:49 PM MDT Nick Sabalausky (Abscissa) via Digitalmars-d wrote: > On 09/25/2018 09:13 PM, Jonathan M Davis wrote: > > IMHO, the only time that anything along the lines of a warning > > makes sense is when the programmer is proactively ru

Re: `shared`...

2018-10-01 Thread deadalnix via Digitalmars-d
On Monday, 1 October 2018 at 02:29:40 UTC, Manu wrote: I feel like I don't understand the design... mutable -> shared should work the same as mutable -> const... because surely that's safe? Nope. Consider. struct A { A* a; } void foo(shared A* a) { a.a = new shared(A))(); } Now you

Re: Warn on unused imports?

2018-10-01 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 09/25/2018 09:13 PM, Jonathan M Davis wrote: IMHO, the only time that anything along the lines of a warning makes sense is when the programmer is proactively running a tool to specifically ask to be informed of a potential type of problem where they will then go look at each of them individual

Re: `shared`...

2018-10-01 Thread Timon Gehr via Digitalmars-d
On 01.10.2018 04:29, Manu wrote: struct Bob { void setThing() shared; } As I understand, `shared` attribution intends to guarantee that I dun synchronisation internally. This method is declared shared, so if I have shared instances, I can call it... because it must handle thread-safety intern

Re: Yet another binding generator (WIP)

2018-10-01 Thread Jonathan Marler via Digitalmars-d
On Monday, 1 October 2018 at 13:51:10 UTC, evilrat wrote: Hi, Early access program is now live! Limited offer! Preorder until 12.31.2017 BC and you will receive* unique pet - "Cute Space Hamster"! !! *(Limited quantity in stock) [...] Based on clang? I approve. I'll have to try it out somet

Re: Yet another binding generator (WIP)

2018-10-01 Thread Stefan Koch via Digitalmars-d
On Monday, 1 October 2018 at 13:51:10 UTC, evilrat wrote: Hi, Early access program is now live! Limited offer! Preorder until 12.31.2017 BC and you will receive* unique pet - "Cute Space Hamster"! !! *(Limited quantity in stock) [...] How does it compare to dstep?

Re: Yet another binding generator (WIP)

2018-10-01 Thread evilrat via Digitalmars-d
On Monday, 1 October 2018 at 13:59:42 UTC, JN wrote: Are there Windows binaries available somewhere? Try this https://1drv.ms/u/s!AgMDJgyotPu6ljpA5_GwX898gAcg It is x64 debug build without PDB. But from my experience it will not work due to debug C++ runtime being used. At least not without

Re: Yet another binding generator (WIP)

2018-10-01 Thread JN via Digitalmars-d
On Monday, 1 October 2018 at 13:51:10 UTC, evilrat wrote: Give it a try and let me know if you find something that is not on the limitations list, I will add it to the list, and everyone will be happy again! Are there Windows binaries available somewhere?

Yet another binding generator (WIP)

2018-10-01 Thread evilrat via Digitalmars-d
Hi, Early access program is now live! Limited offer! Preorder until 12.31.2017 BC and you will receive* unique pet - "Cute Space Hamster"! !! *(Limited quantity in stock) Ok, enough BS... So here is my personal tool for generating extern(C)/extern(C++) bindings[1]. I know there is several oth

Re: Quick C bindings

2018-10-01 Thread yawniek via Digitalmars-d
On Friday, 28 September 2018 at 16:39:14 UTC, Márcio Martins wrote: Hi y'all! If you'd be so kind and help me out here with a few questions/opinions: I would like to generate decent D bindings for https://github.com/libuv/libuv with as little pain as possible. What are you guys using these

Re: `shared`...

2018-10-01 Thread RazvanN via Digitalmars-d
On Monday, 1 October 2018 at 02:29:40 UTC, Manu wrote: struct Bob { void setThing() shared; } As I understand, `shared` attribution intends to guarantee that I dun synchronisation internally. This method is declared shared, so if I have shared instances, I can call it... because it must ha

Re: `shared`...

2018-10-01 Thread Jonathan M Davis via Digitalmars-d
On Monday, October 1, 2018 3:55:41 AM MDT ag0aep6g via Digitalmars-d wrote: > On 10/01/2018 08:47 AM, Nicholas Wilson wrote: > > In order to be safe, a mutable parameter can be implicitly cast to > > shared iff the parameter is also scope (that includes the `this` > > referenc

Re: Funny way to crash dmd and brick the whole computer

2018-10-01 Thread Basile B. via Digitalmars-d
On Monday, 1 October 2018 at 09:24:18 UTC, Basile B. wrote: On Friday, 28 September 2018 at 11:58:25 UTC, Zardoz wrote: CTE fib : module fib_cte; import std.stdio; long fib(long n) { if (n <= 1) return 1; return fib(n - 1) + fib(n - 2); } static immutable valueFib = fib(46); void main()

Re: `shared`...

2018-10-01 Thread Nicholas Wilson via Digitalmars-d
On Monday, 1 October 2018 at 09:55:41 UTC, ag0aep6g wrote: On 10/01/2018 08:47 AM, Nicholas Wilson wrote: In order to be safe, a mutable parameter can be implicitly cast to shared iff the parameter is also scope (that includes the `this` reference`). With an implicit cast in place of the expli

Re: `shared`...

2018-10-01 Thread Nicholas Wilson via Digitalmars-d
On Monday, 1 October 2018 at 08:04:38 UTC, Kagamin wrote: Shared data may need different algorithms. Yes, but those same algorithms will work on unshared (they might be slower but they will work). The reverse is not true, it can lead to race conditions. If unshared data is implicitly conve

Re: `shared`...

2018-10-01 Thread ag0aep6g via Digitalmars-d
On 10/01/2018 08:47 AM, Nicholas Wilson wrote: In order to be safe, a mutable parameter can be implicitly cast to shared iff the parameter is also scope (that includes the `this` reference`). With an implicit cast in place of the explicit cast under the new rules it would fail to compile becaus

Re: Funny way to crash dmd and brick the whole computer

2018-10-01 Thread Basile B. via Digitalmars-d
On Friday, 28 September 2018 at 11:58:25 UTC, Zardoz wrote: CTE fib : module fib_cte; import std.stdio; long fib(long n) { if (n <= 1) return 1; return fib(n - 1) + fib(n - 2); } static immutable valueFib = fib(46); void main() { writeln(valueFib); } don't try to compile this one li

Re: `shared`...

2018-10-01 Thread Kagamin via Digitalmars-d
On Monday, 1 October 2018 at 02:29:40 UTC, Manu wrote: So, I know that there's not a bunch of threads banging on this object... but the shared method should still work! A method that handles thread-safety doesn't suddenly not work when it's only accessed from a single thread. Shared data may ne

Re: `shared`...

2018-09-30 Thread Nicholas Wilson via Digitalmars-d
On Monday, 1 October 2018 at 06:06:31 UTC, ag0aep6g wrote: `shared` isn't analogous to `const`. It's analogous to `immutable`. Functions dealing with `shared` data can assume that other threads also see the data as `shared`. If you allow calling `shared` methods on non-`shared` objects, you're

Re: `shared`...

2018-09-30 Thread ag0aep6g via Digitalmars-d
On 10/01/2018 04:29 AM, Manu wrote: struct Bob { void setThing() shared; } [...] void f(ref shared Bob a, ref Bob b) { a.setThing(); // I have a shared object, can call shared method b.setThing(); // ERROR } This is the bit of the design that doesn't make sense to me... The method is

Typo: to not be a warning (n/t)

2018-09-30 Thread FeepingCreature via Digitalmars-d
Typo: to not* be a warning

Re: Warn on unused imports?

2018-09-30 Thread FeepingCreature via Digitalmars-d
On Wednesday, 26 September 2018 at 16:29:24 UTC, Neia Neutuladh wrote: * If you encounter a mixin in the module you're analyzing, give up. Unfortunately, our code uses mixins heavily, so I don't think this would be useful for us. In any case, I fundamentally don't consider the approach of "w

Re: `shared`...

2018-09-30 Thread Nicholas Wilson via Digitalmars-d
On Monday, 1 October 2018 at 04:22:24 UTC, Manu wrote: Ah, good point. So, it could only be allowed if scope... struct Bob { void setThing() shared scope; } That's going to require far-reaching proliferation of `scope`. Do we infer `scope` like the other attributes? For templates (either th

Re: `shared`...

2018-09-30 Thread Manu via Digitalmars-d
On Sun, Sep 30, 2018 at 9:00 PM Nicholas Wilson via Digitalmars-d wrote: > > On Monday, 1 October 2018 at 03:33:16 UTC, Manu wrote: > > On Sun, Sep 30, 2018 at 8:20 PM Nicholas Wilson via > > Digitalmars-d wrote: > >> > >> On Monday, 1 October 2018 at 02:29:4

Re: `shared`...

2018-09-30 Thread Nicholas Wilson via Digitalmars-d
On Monday, 1 October 2018 at 03:33:16 UTC, Manu wrote: On Sun, Sep 30, 2018 at 8:20 PM Nicholas Wilson via Digitalmars-d wrote: On Monday, 1 October 2018 at 02:29:40 UTC, Manu wrote: > struct Bob > { > void setThing() shared; > } > > As I understand, `shared` attr

Re: `shared`...

2018-09-30 Thread Manu via Digitalmars-d
On Sun, Sep 30, 2018 at 8:20 PM Nicholas Wilson via Digitalmars-d wrote: > > On Monday, 1 October 2018 at 02:29:40 UTC, Manu wrote: > > struct Bob > > { > > void setThing() shared; > > } > > > > As I understand, `shared` attribution intends to gu

Re: `shared`...

2018-09-30 Thread Nicholas Wilson via Digitalmars-d
On Monday, 1 October 2018 at 02:29:40 UTC, Manu wrote: struct Bob { void setThing() shared; } As I understand, `shared` attribution intends to guarantee that I dun synchronisation internally. This method is declared shared, so if I have shared instances, I can call it... because it must ha

`shared`...

2018-09-30 Thread Manu via Digitalmars-d
struct Bob { void setThing() shared; } As I understand, `shared` attribution intends to guarantee that I dun synchronisation internally. This method is declared shared, so if I have shared instances, I can call it... because it must handle thread-safety internally. void f(ref shared Bob a, ref

Re: Most Effective way of developing a new GC for D

2018-09-30 Thread Basile B. via Digitalmars-d
On Sunday, 30 September 2018 at 09:40:10 UTC, Per Nordlöw wrote: I'm gonna play around with creating a GC that alleviates some of the uses described in https://olshansky.me/gc/runtime/dlang/2017/06/14/inside-d-gc.html What's the most effective way of incrementally developing a new pluggable G

Most Effective way of developing a new GC for D

2018-09-30 Thread Per Nordlöw via Digitalmars-d
I'm gonna play around with creating a GC that alleviates some of the uses described in https://olshansky.me/gc/runtime/dlang/2017/06/14/inside-d-gc.html What's the most effective way of incrementally developing a new pluggable GC for druntime with regards to prevention of really-hard-to-find-

Re: DIP 1014

2018-09-30 Thread Jonathan M Davis via Digitalmars-d
On Sunday, September 30, 2018 1:35:28 AM MDT Shachar Shemesh via Digitalmars-d wrote: > On 30/09/18 10:26, Manu wrote: > > Other implementations make much better use of that built-in space by > > not wasting 8 bytes on an interior pointer for small-strings. > > I will poi

Re: DIP 1014

2018-09-30 Thread Shachar Shemesh via Digitalmars-d
On 30/09/18 10:26, Manu wrote: Other implementations make much better use of that built-in space by not wasting 8 bytes on an interior pointer for small-strings. I will point out that a pointer that *sometimes* points to an internal member was one of the use cases I documented when I submitt

Re: DIP 1014

2018-09-30 Thread Manu via Digitalmars-d
On Sat, Sep 29, 2018 at 11:50 PM Walter Bright via Digitalmars-d wrote: > > On 9/29/2018 9:34 PM, Manu wrote: > > GNU's std::string implementation stores an interior pointer! >_< > > > > No other implementation does this. It's a really bad implementation &

Re: DIP 1014

2018-09-29 Thread Walter Bright via Digitalmars-d
On 9/29/2018 9:34 PM, Manu wrote: GNU's std::string implementation stores an interior pointer! >_< No other implementation does this. It's a really bad implementation actually, quite inefficient. It could make better use of its space for small-strings if it wasn't wasting 8-bytes for an interior

Re: DIP 1014

2018-09-29 Thread Jonathan M Davis via Digitalmars-d
On Saturday, September 29, 2018 10:34:20 PM MDT Manu via Digitalmars-d wrote: > Who knows about DIP 1014? (struct move hook) > Is it well received? Is it likely to be accepted soon? > > I'm working on the std::string binding, it's almost finished... but > then I hit

Re: DIP 1014

2018-09-29 Thread Mike Parker via Digitalmars-d
On Sunday, 30 September 2018 at 04:34:20 UTC, Manu wrote: Who knows about DIP 1014? (struct move hook) Is it well received? Is it likely to be accepted soon? I'm working on the std::string binding, it's almost finished... but then I hit a brick wall. GNU's std::string implementation stores an

DIP 1014

2018-09-29 Thread Manu via Digitalmars-d
Who knows about DIP 1014? (struct move hook) Is it well received? Is it likely to be accepted soon? I'm working on the std::string binding, it's almost finished... but then I hit a brick wall. GNU's std::string implementation stores an interior pointer! >_< No other implementation does this. It's

Re: Updating D beyond Unicode 2.0

2018-09-29 Thread Shachar Shemesh via Digitalmars-d
On Saturday, 29 September 2018 at 16:19:38 UTC, ag0aep6g wrote: On 09/29/2018 04:19 PM, Shachar Shemesh wrote: On 29/09/18 16:52, Dukc wrote: [...] I know you meant Sarn, but still... can you please be a bit less aggresive with our wording? From the article (the furthest point I read in it)

Re: Quick C bindings

2018-09-29 Thread Arun Chandrasekaran via Digitalmars-d
On Friday, 28 September 2018 at 16:39:14 UTC, Márcio Martins wrote: Hi y'all! If you'd be so kind and help me out here with a few questions/opinions: I would like to generate decent D bindings for https://github.com/libuv/libuv with as little pain as possible. What are you guys using these

Re: Updating D beyond Unicode 2.0

2018-09-29 Thread ag0aep6g via Digitalmars-d
On 09/29/2018 04:19 PM, Shachar Shemesh wrote: On 29/09/18 16:52, Dukc wrote: [...] I know you meant Sarn, but still... can you please be a bit less aggresive with our wording? From the article (the furthest point I read in it): When I ask myself what I've found life is too short for, the wo

Re: Updating D beyond Unicode 2.0

2018-09-29 Thread Shachar Shemesh via Digitalmars-d
On 29/09/18 16:52, Dukc wrote: On Saturday, 29 September 2018 at 02:22:55 UTC, Shachar Shemesh wrote: I missed something he said in one of the other (as of this writing, 98) posts of this thread, and thus causing Dukc to label me a bullshitter. I know you meant Sarn, but still... can you plea

Re: Updating D beyond Unicode 2.0

2018-09-29 Thread Dukc via Digitalmars-d
On Saturday, 29 September 2018 at 02:22:55 UTC, Shachar Shemesh wrote: I missed something he said in one of the other (as of this writing, 98) posts of this thread, and thus causing Dukc to label me a bullshitter. I know you meant Sarn, but still... can you please be a bit less aggresive with

Re: Quick C bindings

2018-09-29 Thread Márcio Martins via Digitalmars-d
On Friday, 28 September 2018 at 16:44:31 UTC, Adam D. Ruppe wrote: What, exactly do you want to do with them? Using them is well-supported, but creating them is more iffy. Create/load/unload. I want to create a hot-reload workflow of smaller components of my projects, since compilation times a

Re: Quick C bindings

2018-09-29 Thread Márcio Martins via Digitalmars-d
On Friday, 28 September 2018 at 21:42:25 UTC, bachmeier wrote: If they're pure C, you can use dpp: https://github.com/atilaneves/dpp Even if you want to work with the bindings, not just call the C functions, you can use the intermediate files that dpp creates. It works with pretty much everyt

Re: Funny way to crash dmd and brick the whole computer

2018-09-29 Thread bauss via Digitalmars-d
On Friday, 28 September 2018 at 11:58:25 UTC, Zardoz wrote: CTE fib : module fib_cte; import std.stdio; long fib(long n) { if (n <= 1) return 1; return fib(n - 1) + fib(n - 2); } static immutable valueFib = fib(46); void main() { writeln(valueFib); } What exactly did you expect?

Re: Updating D beyond Unicode 2.0

2018-09-28 Thread Shachar Shemesh via Digitalmars-d
On 28/09/18 14:37, Dukc wrote: On Friday, 28 September 2018 at 02:23:32 UTC, sarn wrote: Shachar seems to be aiming for an internet high score by shooting down threads without reading them.  You have better things to do. http://www.paulgraham.com/vb.html I believe you're being too harsh. It

Re: Quick C bindings

2018-09-28 Thread sarn via Digitalmars-d
On Friday, 28 September 2018 at 16:39:14 UTC, Márcio Martins wrote: What are you guys using these days to generate bindings? Writing them by hand is easy if the library doesn't use the preprocessor much. I often do that for simple jobs. dpp supports preprocessor directives (because it actua

Re: Updating D beyond Unicode 2.0

2018-09-28 Thread sarn via Digitalmars-d
On Friday, 28 September 2018 at 11:37:10 UTC, Dukc wrote: It's easy to miss a part of a post sometimes. That's very true, and it's always good to give people the benefit of the doubt. But most people are able to post constructively here without * Abrasively and condescendingly declaring ot

Re: Warn on unused imports?

2018-09-28 Thread Jonathan M Davis via Digitalmars-d
On Friday, September 28, 2018 6:50:01 AM MDT Olivier FAURE via Digitalmars-d wrote: > Warnings often catch real problems, even categories of warnings > with high amounts of false positives like unused variables. > > But yeah, I get your point. Warning lose their interest when they >

Re: Funny way to crash dmd and brick the whole computer

2018-09-28 Thread Norm via Digitalmars-d
On Friday, 28 September 2018 at 11:58:25 UTC, Zardoz wrote: CTE fib : module fib_cte; import std.stdio; long fib(long n) { if (n <= 1) return 1; return fib(n - 1) + fib(n - 2); } static immutable valueFib = fib(46); void main() { writeln(valueFib); } This isn't a brick, this is your

Re: Quick C bindings

2018-09-28 Thread bachmeier via Digitalmars-d
On Friday, 28 September 2018 at 16:39:14 UTC, Márcio Martins wrote: Hi y'all! If you'd be so kind and help me out here with a few questions/opinions: I would like to generate decent D bindings for https://github.com/libuv/libuv with as little pain as possible. What are you guys using these

Re: Quick C bindings

2018-09-28 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 28 September 2018 at 16:39:14 UTC, Márcio Martins wrote: I would like to generate decent D bindings for https://github.com/libuv/libuv with as little pain as possible. I just write bindings by hand as I need them, in the file where I want to use them. It isn't really that hard to do

Quick C bindings

2018-09-28 Thread Márcio Martins via Digitalmars-d
Hi y'all! If you'd be so kind and help me out here with a few questions/opinions: I would like to generate decent D bindings for https://github.com/libuv/libuv with as little pain as possible. What are you guys using these days to generate bindings? I remember trying Dstep a few years ago,

Re: Funny way to crash dmd and brick the whole computer

2018-09-28 Thread Stefan Koch via Digitalmars-d
On Friday, 28 September 2018 at 11:58:25 UTC, Zardoz wrote: CTE fib : module fib_cte; import std.stdio; long fib(long n) { if (n <= 1) return 1; return fib(n - 1) + fib(n - 2); } static immutable valueFib = fib(46); void main() { writeln(valueFib); } to be fair, that function is inc

Re: Warn on unused imports?

2018-09-28 Thread Olivier FAURE via Digitalmars-d
On Wednesday, 26 September 2018 at 09:25:11 UTC, Jonathan M Davis wrote: It's just a message. You can use a compiler flag to make the message go away or to turn it into an error (though in general, I'd advise against it, since then your code breaks as soon as something gets deprecated), but by

Funny way to crash dmd and brick the whole computer

2018-09-28 Thread Zardoz via Digitalmars-d
CTE fib : module fib_cte; import std.stdio; long fib(long n) { if (n <= 1) return 1; return fib(n - 1) + fib(n - 2); } static immutable valueFib = fib(46); void main() { writeln(valueFib); }

Re: Updating D beyond Unicode 2.0

2018-09-28 Thread Dukc via Digitalmars-d
On Friday, 28 September 2018 at 02:23:32 UTC, sarn wrote: Shachar seems to be aiming for an internet high score by shooting down threads without reading them. You have better things to do. http://www.paulgraham.com/vb.html I believe you're being too harsh. It's easy to miss a part of a po

Re: Warn on unused imports?

2018-09-27 Thread Jacob Carlborg via Digitalmars-d
On Wednesday, 26 September 2018 at 15:57:57 UTC, rikki cattermole wrote: For those who are unaware, dmd-fe for usage as a library is completely worthless currently. So not having the tags is probably a good thing. For those who are unaware I'm using it in one of my projects [1] and so far e

Re: Calling nested function before declaration

2018-09-27 Thread nkm1 via Digitalmars-d
On Wednesday, 26 September 2018 at 22:46:21 UTC, Jonathan wrote: This code fails to compile: ("undefined identifier fun") void main() { fun(); void fun() {} } Having the call after the declaration works: void main() { void fun() {} fun(); } Is this how it is intended to work? I

Re: Updating D beyond Unicode 2.0

2018-09-27 Thread sarn via Digitalmars-d
On Thursday, 27 September 2018 at 16:34:37 UTC, aliak wrote: On Thursday, 27 September 2018 at 13:59:48 UTC, Shachar Shemesh wrote: On 27/09/18 16:38, aliak wrote: The point was that being able to use non-English in code is demonstrably both helpful and useful to people. Norwegian happens to b

Re: How to correctly deal with dmd.conf with multiple dmd installations - [ref osx, brew, digger]

2018-09-27 Thread Vladimir Panteleev via Digitalmars-d
On Thursday, 27 September 2018 at 19:53:32 UTC, aliak wrote: Can you explain a bit maybe how it'd break the maximally reproducible builds with an example? I believe you might've mentioned that in the issue linked but I didn't quite get it. Well, essentially Digger tries to minimize the number

Re: Calling nested function before declaration

2018-09-27 Thread Walter Bright via Digitalmars-d
On 9/27/2018 11:33 AM, Timon Gehr wrote: The current behavior is easy to specify and simple to implement, and it is what Walter has implemented. A better behavior that is almost as simple to implement would be to insert nested functions into the symbol table in blocks of back-to-back-defined ne

Re: How to correctly deal with dmd.conf with multiple dmd installations - [ref osx, brew, digger]

2018-09-27 Thread aliak via Digitalmars-d
On Wednesday, 26 September 2018 at 01:17:24 UTC, Vladimir Panteleev wrote: On Tuesday, 25 September 2018 at 10:34:17 UTC, aliak wrote: When you do `digger install` it seems to not “install” a `dmd.conf` but it does install the `dmd` binary in `/usr/local/bin/dmd` - but that wasn’t built with `S

Re: dub configuration for a dependency?

2018-09-27 Thread joshuabarnes via Digitalmars-d
On Wednesday, 26 September 2018 at 11:03:04 UTC, Laurent Tréguier wrote: On Wednesday, 26 September 2018 at 10:41:36 UTC, joshuabarnes wrote: By default, DerelictODE is configured to load the double-precision version of ODE. If you want to load the single-precision version, declare "DerelictODE

Re: Warn on unused imports?

2018-09-27 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 09/26/2018 04:37 AM, Dejan Lekic wrote: On Tuesday, 25 September 2018 at 13:03:30 UTC, FeepingCreature wrote: I'm playing with a branch of DMD that would warn on unused imports: I humbly believe this does not belong to the compiler. These sort of things belong to a static code analyser TOO

Re: Calling nested function before declaration

2018-09-27 Thread Timon Gehr via Digitalmars-d
On 27.09.2018 00:46, Jonathan wrote: I can't see how the current behavior is at all better or to be preferred unless it is faster to compile?  What is the reason for it being how it is? The current behavior is easy to specify and simple to implement, and it is what Walter has implemented. A

Re: Calling nested function before declaration

2018-09-27 Thread Timon Gehr via Digitalmars-d
On 27.09.2018 01:05, Neia Neutuladh wrote: The standard ways of dealing with this: * Reorder the declarations. * Make the functions non-nested. * Get rid of mutual recursion. * Use a delegate. * Do a method-to-method-object refactoring. * turn the function with the forward reference into a te

Re: Updating D beyond Unicode 2.0

2018-09-27 Thread aliak via Digitalmars-d
On Thursday, 27 September 2018 at 13:59:48 UTC, Shachar Shemesh wrote: On 27/09/18 16:38, aliak wrote: The point was that being able to use non-English in code is demonstrably both helpful and useful to people. Norwegian happens to be easily anglicize-able. I've already linked to non ascii cod

Re: OT: Bad translations

2018-09-27 Thread Paolo Invernizzi via Digitalmars-d
On Thursday, 27 September 2018 at 07:03:51 UTC, Andrea Fontana wrote: On Thursday, 27 September 2018 at 05:15:01 UTC, Ali Çehreli wrote: A delicious Turkish desert is "kabak tatlısı", made of squash. Now, it so happens that "kabak" also means "zucchini" in Turkish. Imagine my shock when I came

Re: Updating D beyond Unicode 2.0

2018-09-27 Thread Shachar Shemesh via Digitalmars-d
On 27/09/18 16:38, aliak wrote: The point was that being able to use non-English in code is demonstrably both helpful and useful to people. Norwegian happens to be easily anglicize-able. I've already linked to non ascii code versions in a previous post if you want that too. If you wish to mak

Re: Updating D beyond Unicode 2.0

2018-09-27 Thread aliak via Digitalmars-d
On Thursday, 27 September 2018 at 08:16:00 UTC, Shachar Shemesh wrote: On 27/09/18 10:35, aliak wrote: Here's an example from this years spring semester and NTNU (norwegian uni): http://folk.ntnu.no/frh/grprog/eksempel/eks_20.cpp ... That's the basic programming course. Whether the professor

Re: Then new forum moderation

2018-09-27 Thread bauss via Digitalmars-d
On Wednesday, 26 September 2018 at 14:59:20 UTC, SashaGreat wrote: On Wednesday, 26 September 2018 at 09:09:30 UTC, Kagamin wrote: On Tuesday, 25 September 2018 at 15:11:20 UTC, SashaGreat wrote: For example: If a person knows VB/Delphi and now he is trying D and have any doubt, he will need to

Re: Updating D beyond Unicode 2.0

2018-09-27 Thread Walter Bright via Digitalmars-d
On 9/27/2018 12:35 AM, aliak wrote: Anyway, on a related note: D itself (not identifiers, but std) also supports unicode 6 or something. That's from 2010. That's a decade ago. We're at unicode 11 now. And I've already had someone tell me (while trying to get them to use D) - "hold on it support

Re: Updating D beyond Unicode 2.0

2018-09-27 Thread Shachar Shemesh via Digitalmars-d
On 27/09/18 10:35, aliak wrote: Here's an example from this years spring semester and NTNU (norwegian uni): http://folk.ntnu.no/frh/grprog/eksempel/eks_20.cpp ... That's the basic programming course. Whether the professor would use that I guess would depend on ratio of English/non-English spea

Re: Updating D beyond Unicode 2.0

2018-09-27 Thread aliak via Digitalmars-d
On Wednesday, 26 September 2018 at 20:43:47 UTC, Walter Bright wrote: On 9/26/2018 5:46 AM, Steven Schveighoffer wrote: This is a non-starter. We can't break people's code, especially for trivial reasons like 'you shouldn't code that way because others don't like it'. I'm pretty sure Walter wo

Re: OT: Bad translations

2018-09-27 Thread Andrea Fontana via Digitalmars-d
On Thursday, 27 September 2018 at 05:15:01 UTC, Ali Çehreli wrote: A delicious Turkish desert is "kabak tatlısı", made of squash. Now, it so happens that "kabak" also means "zucchini" in Turkish. Imagine my shock when I came across that desert recipe in English that used zucchini as the ingredi

Re: OT: Bad translations

2018-09-26 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, September 26, 2018 11:15:01 PM MDT Ali Çehreli via Digitalmars-d wrote: > A delicious Turkish desert is "kabak tatlısı", made of squash. Now, it > so happens that "kabak" also means "zucchini" in Turkish. Imagine my > shock when I came across

Re: D IDE

2018-09-26 Thread Neia Neutuladh via Digitalmars-d
On 09/26/2018 08:23 PM, Nick Sabalausky (Abscissa) wrote: On 09/05/2018 01:34 PM, ShadoLight wrote: I sometimes wonder if the Vim/Emacs 'affectionados' spend so much time mastering their editors (which by all accounts have a steep learning curve), that they forgot that IDE development did not

<    4   5   6   7   8   9   10   11   12   13   >