Re: dpaste and the wayback machine

2016-02-08 Thread Wyatt via Digitalmars-d
On Sunday, 7 February 2016 at 21:59:00 UTC, Andrei Alexandrescu wrote: Dpaste currently does not expire pastes by default. I was thinking it would be nice if it saved them in the Wayback Machine such that they are archived redundantly. I'm not sure what's the way to do it - probably linking

Re: An IO Streams Library

2016-02-08 Thread Wyatt via Digitalmars-d
On Sunday, 7 February 2016 at 00:48:54 UTC, Jason White wrote: This library provides an input and output range interface for streams (which is more efficient if the stream is buffered). Thus, many of the wonderful range operations from std.range and std.algorithm can be used with this. Ah,

Re: Dynamic Ctors ?

2016-02-08 Thread Voitech via Digitalmars-d-learn
On Monday, 8 February 2016 at 15:09:30 UTC, Kagamin wrote: http://dpaste.dzfl.pl/1f25ac34c1ee You need Tuple, not Algebraic. Algebraic stores only one value of one type from a set, like Variant. Thank you for answering. You right if i would want to store all types of T.. in an Inner

Re: Things that keep D from evolving?

2016-02-08 Thread NX via Digitalmars-d-learn
On Monday, 8 February 2016 at 11:22:45 UTC, thedeemon wrote: On Saturday, 6 February 2016 at 08:07:42 UTC, NX wrote: What language semantics prevent precise & fast GC implementations? Unions and easy type casting prevent precise GC. Lack of write barriers for reference-type fields prevent

Re: Just because it's a slow Thursday on this forum

2016-02-08 Thread John Colvin via Digitalmars-d
On Monday, 8 February 2016 at 13:37:19 UTC, Andrei Alexandrescu wrote: On 2/7/16 7:11 PM, John Colvin wrote: alias dump = dumpTo!stdout; alias errDump = dumpTo!stderr; I'm hoping for something with a simpler syntax, a la dump!(stdout, "x") where stdout is optional. -- Andrei How about

Re: An IO Streams Library

2016-02-08 Thread Dejan Lekic via Digitalmars-d
I think this is a huge task and requires a (huge) DIP, and collaborative effort of coming up with a good, really good, API for BOTH synchronous and asynchronous IO. As mentioned in the previous messages, there is already an asyncio library, although I am not sure it is good enough to be in

Re: An IO Streams Library

2016-02-08 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 8 February 2016 at 09:12:25 UTC, Jakob Ovrum wrote: I don't think we've used DIPs for library additions before. I don't see what it would provide over module documentation. Probably because a standard library should keep things simple, meaning it should unify high level

Re: Do D need a popular framework? like ruby's rails? or java 's ssh?

2016-02-08 Thread Eugene Wissner via Digitalmars-d-announce
On Thursday, 4 February 2016 at 15:37:21 UTC, sigod wrote: On Tuesday, 19 January 2016 at 13:22:48 UTC, beck wrote: Do D need a popular framework? in china ,a little peopel use dlang. i just use it do some simple work for myself. yet,i have learn d for a week .. i ask so many friends ,they

[Issue 15656] broken link in datetime.d documentation

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15656 Gerald Jansen changed: What|Removed |Added Status|NEW |RESOLVED

Re: How to warn of unused imports?

2016-02-08 Thread Daniel Kozak via Digitalmars-d-learn
V Mon, 08 Feb 2016 08:25:09 + cy via Digitalmars-d-learn napsáno: > When I factor out code from my modules, it really, really often > leaves import statements that just sit there doing nothing, > making it look like my program is more complex than it is.

Re: An IO Streams Library

2016-02-08 Thread Jakob Ovrum via Digitalmars-d
On Monday, 8 February 2016 at 09:08:53 UTC, Dejan Lekic wrote: I think this is a huge task and requires a (huge) DIP, and collaborative effort of coming up with a good, really good, API for BOTH synchronous and asynchronous IO. As mentioned in the previous messages, there is already an asyncio

Re: IDE - Coedit 2 rc1

2016-02-08 Thread Basile Burg via Digitalmars-d-announce
On Monday, 8 February 2016 at 07:05:15 UTC, Suliman wrote: On Sunday, 7 February 2016 at 13:18:44 UTC, Basile Burg wrote: See https://github.com/BBasile/Coedit/releases/tag/2_rc1 Cool! Thanks! But do you have any plans to reimplement it from Pascal to D No.

How to warn of unused imports?

2016-02-08 Thread cy via Digitalmars-d-learn
When I factor out code from my modules, it really, really often leaves import statements that just sit there doing nothing, making it look like my program is more complex than it is. How do I get warned for leaving those, and a list of which ones I can safely remove?

Re: is increment on shared ulong atomic operation?

2016-02-08 Thread Andrea Fontana via Digitalmars-d-learn
On Sunday, 7 February 2016 at 20:25:44 UTC, Minas Mina wrote: Just noticed that there's no example. It's used like shared(ulong) a; atomicOp!"+="(a, 1); Wow, that syntax sucks a lot. a.atomicOp!"+="(1); sounds better. You can alias it too.

Re: An IO Streams Library

2016-02-08 Thread Atila Neves via Digitalmars-d
On Monday, 8 February 2016 at 09:08:53 UTC, Dejan Lekic wrote: I think this is a huge task and requires a (huge) DIP, and collaborative effort of coming up with a good, really good, API for BOTH synchronous and asynchronous IO. As mentioned in the previous messages, there is already an asyncio

Re: Bug or intended?

2016-02-08 Thread cy via Digitalmars-d-learn
On Saturday, 6 February 2016 at 14:15:04 UTC, rsw0x wrote: I was playing around with alias templates and came across this, I reduced it to: --- struct A(alias C c){ auto foo(){ return c.i; } } struct B{ C c; A!c a; } struct C{ int i; } --- It gives me a "need 'this' for 'i'

Re: IDE - Coedit 2 rc1

2016-02-08 Thread John Colvin via Digitalmars-d-announce
On Monday, 8 February 2016 at 07:25:49 UTC, Dominikus Dittes Scherkl wrote: On Monday, 8 February 2016 at 07:05:15 UTC, Suliman wrote: Cool! Thanks! But do you have any plans to reimplement it from Pascal to В to get it's more native... B? What is B?

Re: Dynamic Ctors ?

2016-02-08 Thread Voitech via Digitalmars-d-learn
On Monday, 8 February 2016 at 07:08:58 UTC, Voitech wrote: On Saturday, 6 February 2016 at 23:35:17 UTC, Ali Çehreli wrote: On 02/06/2016 10:05 AM, Voitech wrote: > [...] You can use string mixins (makeCtor and makeCtors): string makeCtor(T)() { import std.string : format; [...] Thank

Re: Things that keep D from evolving?

2016-02-08 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Monday, 8 February 2016 at 11:22:45 UTC, thedeemon wrote: http://www.infognition.com/blog/2014/the_real_problem_with_gc_in_d.html Well, the latest Intel CPUs have a theoretical throughput of 30GB/s... so that makes for up to 30MB/ms. But language changes are needed, I think. I also

[Issue 15656] broken link in datetime.d documentation

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15656 ag0ae...@gmail.com changed: What|Removed |Added CC||ag0ae...@gmail.com --- Comment #1 from

Re: An IO Streams Library

2016-02-08 Thread Kagamin via Digitalmars-d
On Sunday, 7 February 2016 at 00:48:54 UTC, Jason White wrote: GitHub: https://github.com/jasonwhite/io In the output stream you compare output data length to the input data length. In case of a transcoding stream they can be different. Are you trying to account for partial writes?

[Issue 15656] New: broken link in datetime.d documentation

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15656 Issue ID: 15656 Summary: broken link in datetime.d documentation Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: minor

[Issue 15629] [REG2.066.0] wrong code with "-O -inline" but correct with "-O"

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15629 Kenji Hara changed: What|Removed |Added Summary|[REG] wrong code with "-O |[REG2.066.0] wrong code

[Issue 15629] [REG2.066.0] wrong code with "-O -inline" but correct with "-O"

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15629 --- Comment #5 from Kenji Hara --- (In reply to Kenji Hara from comment #4) > Sorry, the reduced code cannot reproduce exactly same regression with the > original. > I'll open one more issue for that. Ah, I got understanding.

Re: Things that keep D from evolving?

2016-02-08 Thread thedeemon via Digitalmars-d-learn
On Saturday, 6 February 2016 at 08:07:42 UTC, NX wrote: What language semantics prevent precise & fast GC implementations? Unions and easy type casting prevent precise GC. Lack of write barriers for reference-type fields prevent fast (generational and/or concurrent) GC. Some more detailed

[Issue 15656] broken link in datetime.d documentation

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15656 ag0ae...@gmail.com changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID

Re: How is D doing?

2016-02-08 Thread Basile Burg via Digitalmars-d-learn
On Tuesday, 22 December 2015 at 11:42:42 UTC, bachmeier wrote: 1. Downloads of the DMD compiler have been fluctuating between 1000 and 1600 per day: http://erdani.com/d/downloads.daily.png To this you can add 75dl per day for ldc:

Better Forum view.

2016-02-08 Thread Martin Tschierschke via Digitalmars-d
Hello, it took me a while to discover, that there is a possibility to change the appearing of the Forum. Stettings->View mode: Basic, Threadet, Horzontal Split, Vertical Split. I like the "Vertical Split" option in general, but I dislike to have it on the Index Page, So I am very much in

[Issue 15659] SList: clear() can cause crash

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15659 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/b847c5a194f0eea8429c50c8a2539ca82ff2bb55 Fix Issue 15659 - fix

Problem with release build.

2016-02-08 Thread sanjayss via Digitalmars-d-learn
In the following sample program (which tries to set terminal to raw mode and check for key presses), compiling as usual (dmd t.d), the program works, but compiling in release mode (dmd -release t.d) and the raw mode doesn't seem to work. Where do I start looking to figure this out or if it is

Re: Challenge: fair partition function

2016-02-08 Thread Xinok via Digitalmars-d
On Monday, 8 February 2016 at 23:25:00 UTC, Andrei Alexandrescu wrote: Consider defining a function that partitions a range around a given index like this: size_t pivotPartition(alias less = (a, b) => a < b, Range) (Range r, size_t pivot); Returns x, one of the the indexes that r[pivot] would

Re: Is this a bug in std.typecons.Tuple.slice?

2016-02-08 Thread Marco Leise via Digitalmars-d-learn
Am Tue, 09 Feb 2016 00:38:10 + schrieb tsbockman : > On Sunday, 7 February 2016 at 02:11:15 UTC, Marco Leise wrote: > > What I like most about your proposal is that it doesn't break > > any existing code that wasn't broken before. That can't be > > emphasized

Re: How do you reference variables in an AA of Variants?

2016-02-08 Thread Basile B. via Digitalmars-d-learn
On Tuesday, 9 February 2016 at 03:49:11 UTC, Enjoys Math wrote: This: double b = 1.0; Variant[string] aa = ["b": ]; writeln(aa["b"]); fails with: Error: cannot implicitly convert expression(["b":]) of type double*[string] to VariantN!20u[string] Helps please!

Re: How do you reference variables in an AA of Variants?

2016-02-08 Thread Ali Çehreli via Digitalmars-d-learn
On 02/08/2016 07:49 PM, Enjoys Math wrote: This: double b = 1.0; Variant[string] aa = ["b": ]; writeln(aa["b"]); fails with: Error: cannot implicitly convert expression(["b":]) of type double*[string] to VariantN!20u[string] Helps please! When initializing the array,

[Issue 15661] Destructor called while object still alive

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15661 --- Comment #1 from Daniel Kozak --- in 2.066.1 and before it works as expected --

Re: Problem with release build.

2016-02-08 Thread sanjayss via Digitalmars-d-learn
Ignore this -- this is probably due to how I am doing the assert(). In the release build, it is getting compiled out and in the process compiling out the tcgetattr and the tcsetattr. On Tuesday, 9 February 2016 at 05:08:20 UTC, sanjayss wrote: In the following sample program (which tries

[Issue 15661] Destructor called while object still alive

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15661 Daniel Kozak changed: What|Removed |Added CC||kozz...@gmail.com

How do you reference variables in an AA of Variants?

2016-02-08 Thread Enjoys Math via Digitalmars-d-learn
This: double b = 1.0; Variant[string] aa = ["b": ]; writeln(aa["b"]); fails with: Error: cannot implicitly convert expression(["b":]) of type double*[string] to VariantN!20u[string] Helps please!

Re: voldemort stack traces (and bloat)

2016-02-08 Thread Steven Schveighoffer via Digitalmars-d
On 2/8/16 8:19 AM, wobbles wrote: On Monday, 8 February 2016 at 13:01:44 UTC, Steven Schveighoffer wrote: On 2/7/16 12:18 AM, Steven Schveighoffer wrote: I have a library where I was using very many voldemort types a la std.range. [snip] Is there a better way we should be doing this? I'm

Re: Just because it's a slow Thursday on this forum

2016-02-08 Thread Andrei Alexandrescu via Digitalmars-d
On 2/7/16 7:11 PM, John Colvin wrote: alias dump = dumpTo!stdout; alias errDump = dumpTo!stderr; I'm hoping for something with a simpler syntax, a la dump!(stdout, "x") where stdout is optional. -- Andrei

[Issue 15619] [REG 2.066] Floating-point x86_64 codegen regression, when involving array ops

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15619 Kenji Hara changed: What|Removed |Added Keywords||wrong-code

Re: Dynamic Ctors ?

2016-02-08 Thread Kagamin via Digitalmars-d-learn
http://dpaste.dzfl.pl/1f25ac34c1ee You need Tuple, not Algebraic. Algebraic stores only one value of one type from a set, like Variant.

unit-threaded v0.5.7 - advanced multi-threaded unit testing library

2016-02-08 Thread Atila Neves via Digitalmars-d-announce
What's new: Built-in unittest blocks can now have a name with just a string UDA: @("test that does stuff") unittest {... } Why is this important? If you just want to run unit tests in threads and have them named, you don't

Re: CTFE thoughts & functional approach

2016-02-08 Thread Robert M. Münch via Digitalmars-d
On 2016-01-31 13:59:06 +, Robert M. Münch said: I like CTFE and the meta programming idea for languages like D. However, I'm wondering why most (everyone?) is trying to do meta-programming using the same language as the one getting compiled. IMO the use-cases a pretty different and doing

Re: voldemort stack traces (and bloat)

2016-02-08 Thread wobbles via Digitalmars-d
On Monday, 8 February 2016 at 13:01:44 UTC, Steven Schveighoffer wrote: On 2/7/16 12:18 AM, Steven Schveighoffer wrote: I have a library where I was using very many voldemort types a la std.range. [snip] Is there a better way we should be doing this? I'm wondering if voldemort types are

Re: Google Summer of Code 2016

2016-02-08 Thread CraigDillabaugh via Digitalmars-d
On Sunday, 7 February 2016 at 12:14:24 UTC, Dragos Carp wrote: On Saturday, 6 February 2016 at 20:18:57 UTC, Craig Dillabaugh wrote: Anyone interested and capable of mentor a student interested in doing FlatBuffers for D. I could do that. Currently, as a side project, I'm working on adding D

Re: Just because it's a slow Thursday on this forum

2016-02-08 Thread Tourist via Digitalmars-d
On Monday, 8 February 2016 at 13:37:19 UTC, Andrei Alexandrescu wrote: On 2/7/16 7:11 PM, John Colvin wrote: alias dump = dumpTo!stdout; alias errDump = dumpTo!stderr; I'm hoping for something with a simpler syntax, a la dump!(stdout, "x") where stdout is optional. -- Andrei dump and

Re: How to warn of unused imports?

2016-02-08 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 8 February 2016 at 08:25:09 UTC, cy wrote: How do I get warned for leaving those, and a list of which ones I can safely remove? Remove one, recompile. If it passes, leave it. If not, undo and move on to the next one.

Re: voldemort stack traces (and bloat)

2016-02-08 Thread Steven Schveighoffer via Digitalmars-d
On 2/7/16 12:18 AM, Steven Schveighoffer wrote: I have a library where I was using very many voldemort types a la std.range. [snip] Is there a better way we should be doing this? I'm wondering if voldemort types are really worth it. They offer a lot of convenience, and are much DRYer than

[Issue 15657] New: [internal] StructLiteralExp.sinst comparison in constfolding needs to be removed

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15657 Issue ID: 15657 Summary: [internal] StructLiteralExp.sinst comparison in constfolding needs to be removed Product: D Version: D2 Hardware: All OS: All

Re: Proposal: Database Engine for D

2016-02-08 Thread Mengu via Digitalmars-d
On Saturday, 6 February 2016 at 13:41:03 UTC, Piotrek wrote: On Saturday, 6 February 2016 at 00:14:08 UTC, Mengu wrote: and while we were talking the talk, rust community rolled out something good called diesel. check it out at http://diesel.rs/. we need tools that get things done. we do not

Re: Things that keep D from evolving?

2016-02-08 Thread Chris Wright via Digitalmars-d-learn
On Mon, 08 Feb 2016 11:22:45 +, thedeemon wrote: > On Saturday, 6 February 2016 at 08:07:42 UTC, NX wrote: >> What language semantics prevent precise & fast GC implementations? > > easy type casting prevent precise GC. To expand on this point: A GC makes a tradeoff between allocating

Re: An IO Streams Library

2016-02-08 Thread Atila Neves via Digitalmars-d
On Monday, 8 February 2016 at 17:11:56 UTC, Chris Wright wrote: On Mon, 08 Feb 2016 12:19:59 +, Atila Neves wrote: On Monday, 8 February 2016 at 09:08:53 UTC, Dejan Lekic wrote: [...] I like boost. Well, sometimes. I _severely_ dislike boost::asio. The new couroutines may make it

Re: Can D interface with Free Pascal?

2016-02-08 Thread Basile B. via Digitalmars-d-learn
On Thursday, 28 January 2016 at 04:26:26 UTC, Taylor Hillegeist wrote: Just curious... I had a thought that perhaps since Objective C was a replacement for Pascal on the mac. that they might have the same interface. but I'm not savvy enough with fpc to figure out how to try it. As said in

Re: Things that keep D from evolving?

2016-02-08 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Monday, 8 February 2016 at 17:15:11 UTC, Wyatt wrote: Maybe we could. But it's never going to happen. Even if Walter weren't fundamentally opposed to multiple pointer types in D, it wouldn't happen. You asked about things that prevent improvement, right? Here's the big one, and a major

Re: An IO Streams Library

2016-02-08 Thread Chris Wright via Digitalmars-d
On Mon, 08 Feb 2016 12:19:59 +, Atila Neves wrote: > On Monday, 8 February 2016 at 09:08:53 UTC, Dejan Lekic wrote: >> I think this is a huge task and requires a (huge) DIP, and >> collaborative effort of coming up with a good, really good, API for >> BOTH synchronous and asynchronous IO. As

Re: Things that keep D from evolving?

2016-02-08 Thread rsw0x via Digitalmars-d-learn
On Monday, 8 February 2016 at 17:15:11 UTC, Wyatt wrote: On Monday, 8 February 2016 at 16:33:09 UTC, NX wrote: I see... By any chance, can we solve this issue with GC managed pointers? Maybe we could. But it's never going to happen. Even if Walter weren't fundamentally opposed to

Re: Things that keep D from evolving?

2016-02-08 Thread Wyatt via Digitalmars-d-learn
On Monday, 8 February 2016 at 16:33:09 UTC, NX wrote: I see... By any chance, can we solve this issue with GC managed pointers? Maybe we could. But it's never going to happen. Even if Walter weren't fundamentally opposed to multiple pointer types in D, it wouldn't happen. You asked

Re: How to warn of unused imports?

2016-02-08 Thread Ali Çehreli via Digitalmars-d-learn
On 02/08/2016 06:35 AM, Adam D. Ruppe wrote: On Monday, 8 February 2016 at 08:25:09 UTC, cy wrote: How do I get warned for leaving those, and a list of which ones I can safely remove? Remove one, recompile. If it passes, leave it. If not, undo and move on to the next one. Similarly, I

Re: dpaste and the wayback machine

2016-02-08 Thread Wyatt via Digitalmars-d
On Monday, 8 February 2016 at 20:02:41 UTC, Jesse Phillips wrote: I'm not sure if the wayback machine should be used for version control, if you want to keep a history of your past I suggest using a gist.github.com. I view the wayback machine as a view for what the web used to look like

in a template argument, specify which object member to access?

2016-02-08 Thread cy via Digitalmars-d-learn
object.member lets me access the member of the object, but what if I want to access those members in a generic way, but in a different arrangement depending on context? Like if I wanted to first follow a tree down, and second priority would be going left to right, but then I wanted to first go

Re: Safe cast away from immutable

2016-02-08 Thread Jonathan M Davis via Digitalmars-d
On Monday, 8 February 2016 at 19:07:01 UTC, Iakh wrote: import std.stdio; struct S { void[] arr; auto f() pure @safe { int[] a = new int[4]; arr = a; return a; } } void main() @safe { S s; immutable a = s.f(); int[] b = (cast(int[])s.arr);

[Issue 15660] New: result of pure function

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15660 Issue ID: 15660 Summary: result of pure function Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1

[Issue 15660] breack "immutable" with pure function and mutable params

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15660 Iakh changed: What|Removed |Added Summary|result of pure function |breack "immutable" with

Re: Dconf 2015 talks...

2016-02-08 Thread John Colvin via Digitalmars-d
On Monday, 8 February 2016 at 19:46:19 UTC, Joseph Rushton Wakeling wrote: [snip] This might be a stupid idea, but perhaps there's something useful in it: Determinism isn't the same thing as "one long chain of numbers that everybody reads from". It can be acceptable to seed a set of

Re: How to warn of unused imports?

2016-02-08 Thread cy via Digitalmars-d-learn
On Monday, 8 February 2016 at 18:57:52 UTC, Basile B. wrote: Otherwise, it sounds like a decent enhancement request for DMD. I know other compilers who do this warning. It definitely does sound like a decent enhancement request. I didn't know it wasn't implemented yet, but it should be

Re: Safe cast away from immutable

2016-02-08 Thread Iakh via Digitalmars-d
On Monday, 8 February 2016 at 20:43:23 UTC, Jonathan M Davis wrote: in a bug report should be sufficient to show the bug, even without the rest of what you're doing. In general, it should be impossible for member functions to be considered strongly pure unless they're marked as immutable,

Re: Safe cast away from immutable

2016-02-08 Thread Jonathan M Davis via Digitalmars-d
On Monday, 8 February 2016 at 21:14:11 UTC, Iakh wrote: On Monday, 8 February 2016 at 20:43:23 UTC, Jonathan M Davis wrote: in a bug report should be sufficient to show the bug, even without the rest of what you're doing. In general, it should be impossible for member functions to be

Re: How to warn of unused imports?

2016-02-08 Thread Basile B. via Digitalmars-d-learn
On Monday, 8 February 2016 at 08:50:17 UTC, Daniel Kozak wrote: V Mon, 08 Feb 2016 08:25:09 + cy via Digitalmars-d-learn napsáno: When I factor out code from my modules, it really, really often leaves import statements that just sit there doing

[Issue 15658] isFile isn't a template

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15658 Cédric Picard changed: What|Removed |Added Component|dmd |phobos --

Re: Safe cast away from immutable

2016-02-08 Thread Jesse Phillips via Digitalmars-d
On Monday, 8 February 2016 at 19:07:01 UTC, Iakh wrote: import std.stdio; struct S { void[] arr; auto f() pure @safe { int[] a = new int[4]; arr = a; return a; } } void main() @safe { S s; immutable a = s.f(); int[] b = (cast(int[])s.arr);

[Issue 15658] New: isFile isn't a template

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15658 Issue ID: 15658 Summary: isFile isn't a template Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1

[Issue 15658] isFile isn't a template

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15658 Cédric Picard changed: What|Removed |Added Severity|enhancement |normal --

Re: [suggestion] Automated one-stop compiler version chart

2016-02-08 Thread Nick Sabalausky via Digitalmars-d
On Sunday, 7 February 2016 at 21:26:36 UTC, Xinok wrote: On Sunday, 7 February 2016 at 18:46:48 UTC, Nick Sabalausky wrote: I was just updating a project's .travis.yml file and noticed: It doesn't seem we have any one-stop-shop location to check all the versions of DMD/LDC/GDC currently

Re: Dconf 2015 talks...

2016-02-08 Thread Joseph Rushton Wakeling via Digitalmars-d
On Monday, 8 February 2016 at 00:54:24 UTC, Era Scarecrow wrote: Either they use more stack space, or they act normally after their call is done and are deallocated normally (automatically, unless they are passed outside of the scope where they were generated). It's that "passed outside of

Safe cast away from immutable

2016-02-08 Thread Iakh via Digitalmars-d
import std.stdio; struct S { void[] arr; auto f() pure @safe { int[] a = new int[4]; arr = a; return a; } } void main() @safe { S s; immutable a = s.f(); int[] b = (cast(int[])s.arr); writeln(a); b[0] = 1; writeln(a); }

[Issue 15659] New: SList: clear() can cause crash

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15659 Issue ID: 15659 Summary: SList: clear() can cause crash Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1

[Issue 15659] SList: clear() can cause crash

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15659 --- Comment #1 from sigod --- https://github.com/D-Programming-Language/phobos/pull/3980 --

Re: dpaste and the wayback machine

2016-02-08 Thread Jesse Phillips via Digitalmars-d
On Sunday, 7 February 2016 at 21:59:00 UTC, Andrei Alexandrescu wrote: Dpaste currently does not expire pastes by default. I was thinking it would be nice if it saved them in the Wayback Machine such that they are archived redundantly. I'm not sure what's the way to do it - probably linking

Re: Safe cast away from immutable

2016-02-08 Thread Iakh via Digitalmars-d
On Monday, 8 February 2016 at 19:33:54 UTC, Jesse Phillips wrote: I'm pretty sure this is not safe. Works, but not safe. You So it is bug?

Re: An IO Streams Library

2016-02-08 Thread Jason White via Digitalmars-d
On Monday, 8 February 2016 at 07:50:33 UTC, Jakob Ovrum wrote: I like what I've seen so far, but I'd just like to note that it's easier to give feedback on the API when there is web documentation. GitHub Pages would be a natural place to host it. A lot of D libraries on GitHub do this and not

Re: An IO Streams Library

2016-02-08 Thread Jason White via Digitalmars-d
On Monday, 8 February 2016 at 12:02:08 UTC, Kagamin wrote: In the output stream you compare output data length to the input data length. In case of a transcoding stream they can be different. Are you trying to account for partial writes? Reads and writes are not guaranteed to fill/write the

Re: Just because it's a slow Thursday on this forum

2016-02-08 Thread Nick Sabalausky via Digitalmars-d
On Sunday, 7 February 2016 at 23:26:05 UTC, Andrei Alexandrescu wrote: On 02/04/2016 09:46 PM, Tofu Ninja wrote: On Thursday, 4 February 2016 at 15:33:41 UTC, Andrei Alexandrescu wrote: https://github.com/D-Programming-Language/phobos/pull/3971 -- Andrei People one github were asking for a

Re: Safe cast away from immutable

2016-02-08 Thread Iakh via Digitalmars-d
On Monday, 8 February 2016 at 21:48:30 UTC, Jonathan M Davis wrote: that right now, but clearly, what it currently has is buggy, Yeah. Looks like it just traverse params's AST and search for exactly match with ReturnType. The code with replaced (void, int) with (class A, class B : A)

Re: Things that keep D from evolving?

2016-02-08 Thread Laeeth Isharc via Digitalmars-d-learn
On Monday, 8 February 2016 at 17:15:11 UTC, Wyatt wrote: On Monday, 8 February 2016 at 16:33:09 UTC, NX wrote: I see... By any chance, can we solve this issue with GC managed pointers? Maybe we could. But it's never going to happen. Even if Walter weren't fundamentally opposed to

Re: in a template argument, specify which object member to access?

2016-02-08 Thread cy via Digitalmars-d-learn
This is what I have so far. Using mixin(rawstring~templatearg) for every time I access the member is kind of cludgy though. struct A { string up; string down; string left; string right; } template goPlaces(string D1, string D2, string D3) { string

Re: in a template argument, specify which object member to access?

2016-02-08 Thread cy via Digitalmars-d-learn
On Monday, 8 February 2016 at 22:38:45 UTC, Mengu wrote: i believe you can use __traits(getMember) there. Great! Should have refreshed before sending that reply... I wonder if mixin("a."~member) is better or worse than __traits(getMember,a,member)...

Re: Google Summer of Code 2016

2016-02-08 Thread Dragos Carp via Digitalmars-d
On Monday, 8 February 2016 at 13:25:38 UTC, CraigDillabaugh wrote: Awesome! Thanks. I will write up something on the idea's page in the next day or two (which you are welcome to edit of course). Also, if a student were interested in working on Protocol Buffers, would there be opportunities

Re: Safe cast away from immutable

2016-02-08 Thread Jesse Phillips via Digitalmars-d
On Monday, 8 February 2016 at 20:07:49 UTC, Iakh wrote: On Monday, 8 February 2016 at 19:33:54 UTC, Jesse Phillips wrote: I'm pretty sure this is not safe. Works, but not safe. You So it is bug? Yeah, I missed a couple items of your code. You'd marked the functions @safe, and also the

Re: Safe cast away from immutable

2016-02-08 Thread anonymous via Digitalmars-d
On 08.02.2016 22:14, Iakh wrote: Is all prams being const(but not immutable) not enough for function to be Pure? The hidden `this` parameter must be const, too. And mutable indirections in the return type must be considered. This article explains it in detail:

[Issue 15660] breack "immutable" with pure function and mutable params

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15660 --- Comment #1 from Iakh --- Also this works import std.stdio; class A { int i; } class B : A {} struct S { A a; auto f() pure @safe { B b = new B; a = b; return b; } } void main()

Re: An IO Streams Library

2016-02-08 Thread Chris Wright via Digitalmars-d
On Mon, 08 Feb 2016 18:52:52 +, Atila Neves wrote: > On Monday, 8 February 2016 at 17:11:56 UTC, Chris Wright wrote: >> On Mon, 08 Feb 2016 12:19:59 +, Atila Neves wrote: >> >>> On Monday, 8 February 2016 at 09:08:53 UTC, Dejan Lekic wrote: [...] >>> >>> I like boost. Well,

Re: in a template argument, specify which object member to access?

2016-02-08 Thread Mengu via Digitalmars-d-learn
On Monday, 8 February 2016 at 21:09:47 UTC, cy wrote: object.member lets me access the member of the object, but what if I want to access those members in a generic way, but in a different arrangement depending on context? Like if I wanted to first follow a tree down, and second priority would

Re: in a template argument, specify which object member to access?

2016-02-08 Thread Mengu via Digitalmars-d-learn
On Monday, 8 February 2016 at 22:46:06 UTC, cy wrote: On Monday, 8 February 2016 at 22:38:45 UTC, Mengu wrote: i believe you can use __traits(getMember) there. Great! Should have refreshed before sending that reply... I wonder if mixin("a."~member) is better or worse than

[Issue 15661] New: Destructor called while object still alive

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15661 Issue ID: 15661 Summary: Destructor called while object still alive Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: major

[Issue 15662] New: Cannot move struct with defined opAssign due to @disabled post-blit

2016-02-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15662 Issue ID: 15662 Summary: Cannot move struct with defined opAssign due to @disabled post-blit Product: D Version: D2 Hardware: x86_64 OS: Windows

Re: Odd Destructor Behavior

2016-02-08 Thread Matt Elkins via Digitalmars-d-learn
On Monday, 8 February 2016 at 07:31:07 UTC, Daniel Kozak wrote: Seems to me too, please report it on issues.dlang.org Reported: https://issues.dlang.org/show_bug.cgi?id=15661

Re: D's equivalent to C++'s std::move?

2016-02-08 Thread Matt Elkins via Digitalmars-d
On Thursday, 4 February 2016 at 02:33:06 UTC, Andrei Alexandrescu wrote: Got it, thanks. That's a bug in the implementation, no two ways about it. No copy should occur there, neither theoretically nor practically. Please report it to bugzilla at http://issues.dlang.org. Thanks very much! --

Re: Is this a bug in std.typecons.Tuple.slice?

2016-02-08 Thread tsbockman via Digitalmars-d-learn
On Sunday, 7 February 2016 at 02:11:15 UTC, Marco Leise wrote: What I like most about your proposal is that it doesn't break any existing code that wasn't broken before. That can't be emphasized enough. Although I wish more than 3 people had voted in my poll, two of them did claim to need

Challenge: fair partition function

2016-02-08 Thread Andrei Alexandrescu via Digitalmars-d
Consider defining a function that partitions a range around a given index like this: size_t pivotPartition(alias less = (a, b) => a < b, Range) (Range r, size_t pivot); Returns x, one of the the indexes that r[pivot] would have if r were sorted. Also, r[0 .. x] contains stuff no greater than

  1   2   >