Vibe.d diet template reuse

2016-11-02 Thread Jot via Digitalmars-d-learn
I would like to create some generic diet templates for different html functionality. Some code in the template will need to be setup/changed for it to function properly. How can I write code that allows for one to express generic statements in the template but access/modify them in another

[Issue 14613] DMD: Internal error: backend/cod1.c 1567 on '-O' switch

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14613 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/a4f584ffdc195cc99a738ba495c8261284813d2a fix Issue 14613 - DMD: Internal error: backend/cod1.c 1567 on

Re: Ever want to compile D on your Android phone? Well, now you can!

2016-11-02 Thread Joakim via Digitalmars-d-announce
On Saturday, 29 October 2016 at 21:47:35 UTC, Mergul wrote: On Sunday, 24 January 2016 at 15:12:30 UTC, Joakim wrote: An alpha release of ldc, the llvm-based D compiler, for Android devices is now available. It is best used with the excellent Termux app

fPIC Error

2016-11-02 Thread Dlang User via Digitalmars-d-learn
I am running Debian Testing and I think I have run into the recent fPIC issue. This is the source code for the test project I am using: import std.stdio; void main() { writeln("Edit source/app.d to start your project."); readln(); } When I try to compile a project, I get

mangle!(void function())("foo").demangle = "void function()* foo"

2016-11-02 Thread Timothee Cour via Digitalmars-d-learn
mangle!(void function())("foo").demangle returns "void function()* foo" how would i get instead: `void foo ()` ? my current workaround: alias FunctionTypeOf(Fun)=typeof(*Fun.init); mangle!(FunctionTypeOf!(void function()))("foo")

Re: Speed up compilation of CTFE-heavy programs with this One Weird Trick!

2016-11-02 Thread Andrei Alexandrescu via Digitalmars-d
On 11/02/2016 11:43 PM, Vladimir Panteleev wrote: For each function that is only called during compilation (e.g. for code generation), at the top add: if (!__ctfe) return; That's it. For one project, this brought compilation time (with optimizations) from over an hour down to

Re: Error: function std.stdio.setmode is not accessible from module a

2016-11-02 Thread Kirill Kryukov via Digitalmars-d-learn
On Wednesday, 2 November 2016 at 11:17:49 UTC, Jonathan M Davis wrote: setmode was never publicly documented, and technically, you weren't supposed to be using it from there (since it wasn't documented). It was fixed in 2.072.0 so that all of the undocumented stuff in std.stdio was made

[Issue 15576] extern(C++, namespace) wrong mangling of variables (Windows)

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15576 --- Comment #3 from Walter Bright --- https://github.com/dlang/dmd/pull/6232 --

[Issue 16658] Win32API: default IE ver. set to 4.0 is too old

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16658 --- Comment #1 from j...@red.email.ne.jp --- Forgot to mention: The value cooperating with this is defined that _WIN32_WINNT = 0x501 ( means WinXP ) So I suppose that _WIN32_IE should be changed as follows. version (IE10) { } else version (IE9)

[Issue 16658] New: Win32API: default IE ver. set to 4.0 is too old

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16658 Issue ID: 16658 Summary: Win32API: default IE ver. set to 4.0 is too old Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: normal

Re: State of issues.dlang.org

2016-11-02 Thread ketmar via Digitalmars-d
On Wednesday, 2 November 2016 at 23:01:42 UTC, Brad Roberts wrote: Upgrading is on my todo list. I'll try to get to it soon. thank you for investigating the possibility. post preview is a great feature! ;-)

Re: State of issues.dlang.org

2016-11-02 Thread Walter Bright via Digitalmars-d
On 11/2/2016 4:01 PM, Brad Roberts via Digitalmars-d wrote: Upgrading is on my todo list. I'll try to get to it soon. Thank you, Brad. Your support of Bugzilla is critically important.

Re: Should I prefer immutable or const?

2016-11-02 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, November 02, 2016 23:23:22 Nordlöw via Digitalmars-d-learn wrote: > On Tuesday, 1 November 2016 at 18:55:26 UTC, Jonathan M Davis > > wrote: > > - Jonathan M Davis > > Thanks. I'll go for immutable, when possible, then. > > I wish I had a shorter way to write immutable, though :) >

Re: https://issues.dlang.org/show_bug.cgi?id=2504: reserve for associative arrays

2016-11-02 Thread Jon Degenhardt via Digitalmars-d
On Wednesday, 2 November 2016 at 03:36:42 UTC, Andrei Alexandrescu wrote: Last time I looked our associative arrays were arrays of singly-linked lists. It follows that in order to implement reserve() we'd need a freelist allocator approach, which preallocates a bunch of nodes in a single

Re: CTFE Status

2016-11-02 Thread Stefan Koch via Digitalmars-d
On Wednesday, 2 November 2016 at 23:48:46 UTC, Nordlöw wrote: On Wednesday, 2 November 2016 at 11:01:55 UTC, Stefan Koch wrote: I am now passing phobos unittests! I can't wait to see this in action! Keep on going and I'll keep praying...  No need for prayer. I am trying my best to be

Re: CTFE Status

2016-11-02 Thread Nordlöw via Digitalmars-d
On Wednesday, 2 November 2016 at 11:01:55 UTC, Stefan Koch wrote: I am now passing phobos unittests! I can't wait to see this in action! Keep on going and I'll keep praying... 

Re: Should I prefer immutable or const?

2016-11-02 Thread Nordlöw via Digitalmars-d-learn
On Tuesday, 1 November 2016 at 18:55:26 UTC, Jonathan M Davis wrote: - Jonathan M Davis Thanks. I'll go for immutable, when possible, then. I wish I had a shorter way to write immutable, though :) Do you think it would be possible to adopt Rust's syntax `let`?

Re: State of issues.dlang.org

2016-11-02 Thread Brad Roberts via Digitalmars-d
On 11/2/16 2:44 PM, Vladimir Panteleev via Digitalmars-d wrote: On Wednesday, 2 November 2016 at 12:34:04 UTC, Wyatt wrote: This was added in Bugzilla 5.0. We're just running 4.4.2 on issues.d.o. Unfortunately, I'm not sure how easy it is to upgrade... I believe Brad is using the Debian

Re: RC buffer

2016-11-02 Thread Andrei Alexandrescu via Digitalmars-d
On 11/02/2016 01:00 AM, Andrei Alexandrescu wrote: In order to make opAssign safe, a language change will be necessary. Take that back, no need for a language change as long as nobody returns references to refcounted memory. Just pushed a commit to add @safe-ty annotations everywhere. Works

Re: State of issues.dlang.org

2016-11-02 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 2 November 2016 at 12:34:04 UTC, Wyatt wrote: This was added in Bugzilla 5.0. We're just running 4.4.2 on issues.d.o. Unfortunately, I'm not sure how easy it is to upgrade... I believe Brad is using the Debian packaged version, so we'll get it whenever it reaches whatever

Re: Function Proposal: std.algorithm.iteration : cumulativeSum

2016-11-02 Thread jmh530 via Digitalmars-d
On Wednesday, 2 November 2016 at 20:03:59 UTC, Meta wrote: I think there's an obvious reason as to why they're not called that. I almost always see languages call it cumsum rather than cumulativeSum. R - https://stat.ethz.ch/R-manual/R-devel/library/base/html/cumsum.html Matlab -

Re: Ever want to compile D on your Android phone? Well, now you can!

2016-11-02 Thread Dawid Masiukiewicz via Digitalmars-d-announce
On Tuesday, 1 November 2016 at 13:33:02 UTC, Steven Schveighoffer wrote: android_app.savedState appears to be defined here: https://github.com/joakim-noah/android/blob/polish/android_native_app_glue.d#L56 It's a void *. So comparing against null with != is identical to !is. There are

Re: SoundTab Theremin software synthesizer

2016-11-02 Thread Karabuta via Digitalmars-d-announce
On Wednesday, 2 November 2016 at 09:35:20 UTC, Vadim Lopatin wrote: On Monday, 31 October 2016 at 22:33:38 UTC, Karabuta wrote: On Friday, 28 October 2016 at 08:28:41 UTC, Vadim Lopatin wrote: Hello, I've open sourced my project SoundTab: https://github.com/buggins/soundtab/ I've

Re: Linux Kernel in D?

2016-11-02 Thread Karabuta via Digitalmars-d
On Wednesday, 2 November 2016 at 13:56:22 UTC, qznc wrote: On Tuesday, 1 November 2016 at 16:22:58 UTC, Andrei Alexandrescu wrote: [...] Nevertheless, I don't see a successful D kernel in the foreseeable future. Building a kernel for IoT devices is trendy, but you want a lot more

Re: Function Proposal: std.algorithm.iteration : cumulativeSum

2016-11-02 Thread Meta via Digitalmars-d
On Wednesday, 2 November 2016 at 00:41:38 UTC, jmh530 wrote: On Tuesday, 1 November 2016 at 22:06:36 UTC, Ivan Kazmenko wrote: DMD 2.072 just got cumulativeFold: https://dlang.org/changelog/2.072.0.html#std-algorithm-iteration-cumulativeFold

Re: __traits(getMember)

2016-11-02 Thread Jacob Carlborg via Digitalmars-d
On 2016-11-02 17:30, Márcio Martins wrote: Can we get a getMember and a getOverloads that won't check for visibility or anything else? __traits appears really powerful, but every-time I try to use it for anything other than a toy example or very simple serialization, it seems like everything

Re: Release D 2.072.0

2016-11-02 Thread Jack Stouffer via Digitalmars-d-announce
On Monday, 31 October 2016 at 01:27:08 UTC, Martin Nowak wrote: Glad to announce D 2.072.0. http://dlang.org/download.html This is the release ships with the latest version of dub (v1.1.0), comes with lots of phobos additions and native TLS on OSX. See the changelog for more details.

Re: __traits(getMember)

2016-11-02 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, November 02, 2016 16:30:04 Márcio Martins via Digitalmars-d wrote: > Can we get a getMember and a getOverloads that won't check for > visibility or anything else? That's coming. There was a big discussion on it after the import rules were changed. But IIRC, it was decided that we

Re: Function Proposal: std.algorithm.iteration : cumulativeSum

2016-11-02 Thread e-y-e via Digitalmars-d
On Tuesday, 1 November 2016 at 21:52:40 UTC, e-y-e wrote: ... bump : any more opinions?

Re: Mir GLAS is a C library and passes Natlib's test suite! And questions :-)

2016-11-02 Thread deXtoRious via Digitalmars-d
On Saturday, 29 October 2016 at 11:25:17 UTC, Nicholas Wilson wrote: On Saturday, 29 October 2016 at 10:21:02 UTC, Guillaume Piolat wrote: On Saturday, 29 October 2016 at 01:43:03 UTC, Nicholas Wilson wrote: If you have any experience with either OpenCL or CUDA we'd love to have your input.

Re: hashOf()

2016-11-02 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 2 November 2016 at 16:14:23 UTC, Márcio Martins wrote: If you include core.internal.hash, you cannot call hashOf() anymore, because it conflicts with the implicit import in object.d, this is annoying in itself... You should still be able to call it with the full name,

__traits(getMember)

2016-11-02 Thread Márcio Martins via Digitalmars-d
Can we get a getMember and a getOverloads that won't check for visibility or anything else? __traits appears really powerful, but every-time I try to use it for anything other than a toy example or very simple serialization, it seems like everything falls apart due to some detail... and I

Re: hashOf()

2016-11-02 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, November 02, 2016 16:19:44 John Colvin via Digitalmars-d wrote: > I think that "internal" means "for internal use", I.e. don't > import and use it outside. > > You could argue that object.hashOf should hash the contents of > slices, not just the meta-data (i.e. length / ptr), but

Re: hashOf()

2016-11-02 Thread John Colvin via Digitalmars-d
On Wednesday, 2 November 2016 at 16:14:23 UTC, Márcio Martins wrote: There are 2 hashOf() definitions, one in object.d and one in core.internal.hash.d If you include core.internal.hash, you cannot call hashOf() anymore, because it conflicts with the implicit import in object.d, this is

hashOf()

2016-11-02 Thread Márcio Martins via Digitalmars-d
There are 2 hashOf() definitions, one in object.d and one in core.internal.hash.d If you include core.internal.hash, you cannot call hashOf() anymore, because it conflicts with the implicit import in object.d, this is annoying in itself... The bigger issue though, is that they have different

Re: RC buffer

2016-11-02 Thread Andrei Alexandrescu via Digitalmars-d
On 11/02/2016 11:32 AM, Andrei Alexandrescu wrote: On 11/02/2016 07:29 AM, Nick Treleaven wrote: On Wednesday, 2 November 2016 at 05:00:23 UTC, Andrei Alexandrescu wrote: In order to make opAssign safe, a language change will be necessary. Technically, it should be possible with runtime

[Issue 16657] [The D Bug Tracker]

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16657 --- Comment #1 from Eyal --- Minor correction: opCmp is not auto-generated anyway and opEquals should just be exhaustive and not lexicographic. --

Re: Best way to get ceil(log2(x)) of a BigInt?

2016-11-02 Thread Andrea Fontana via Digitalmars-d-learn
On Wednesday, 2 November 2016 at 15:15:18 UTC, Andrea Fontana wrote: Why don't you perform a binary search over 200 power of 2? Something like: http://paste.ofcode.org/scMD5JbmLMZkrv3bWRmPPT I wonder if a simple binary search on whole array is faster than search for limits as in this example

Re: RC buffer

2016-11-02 Thread Andrei Alexandrescu via Digitalmars-d
On 11/02/2016 07:29 AM, Nick Treleaven wrote: On Wednesday, 2 November 2016 at 05:00:23 UTC, Andrei Alexandrescu wrote: In order to make opAssign safe, a language change will be necessary. Technically, it should be possible with runtime checks:

Re: Best way to get ceil(log2(x)) of a BigInt?

2016-11-02 Thread Andrea Fontana via Digitalmars-d-learn
On Wednesday, 2 November 2016 at 14:49:08 UTC, pineapple wrote: On Wednesday, 2 November 2016 at 14:24:42 UTC, Andrea Fontana wrote: On Wednesday, 2 November 2016 at 14:05:50 UTC, pineapple wrote: I'm trying to do some math stuff with std.bigint and realized there's no obvious way to calculate

Re: Set Operations on Set-like Containers

2016-11-02 Thread Andrei Alexandrescu via Digitalmars-d-learn
On 11/02/2016 11:07 AM, Nordlöw wrote: On Wednesday, 2 November 2016 at 13:45:41 UTC, Nordlöw wrote: Typically set- and map-like containers with O(1) key membership checking. A typical use case is intersection of the two sets `x` and `y`. When `x` and `y` both support O(1)-`contains(e)` the

[Issue 16657] New: [The D Bug Tracker]

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16657 Issue ID: 16657 Summary: [The D Bug Tracker] Product: D Version: D2 Hardware: All URL: http://dlang.org/ OS: All Status: NEW Severity:

Re: Is the following code legal?

2016-11-02 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 2 November 2016 at 14:21:32 UTC, Shachar Shemesh wrote: The D documentation (https://dlang.org/spec/hash-map.html) leaves this not defined. The foreach statement is defined to not allow it: http://dlang.org/spec/statement.html#ForeachStatement "The aggregate must be loop

Re: Is the following code legal?

2016-11-02 Thread Andrei Alexandrescu via Digitalmars-d
On 11/02/2016 11:17 AM, Adam D. Ruppe wrote: On Wednesday, 2 November 2016 at 14:21:32 UTC, Shachar Shemesh wrote: The D documentation (https://dlang.org/spec/hash-map.html) leaves this not defined. The foreach statement is defined to not allow it:

Re: Release D 2.072.0

2016-11-02 Thread anonymous via Digitalmars-d-announce
On Wednesday, 2 November 2016 at 15:08:26 UTC, anonymous wrote: On Wednesday, 2 November 2016 at 12:36:45 UTC, Johan Engelen wrote: LDC built with DMD 2.072.0 gives the following error when run: object.Error@src/rt/minfo.d(356): Cyclic dependency between module ddmd.traits and ddmd.cond

Re: Set Operations on Set-like Containers

2016-11-02 Thread Nordlöw via Digitalmars-d-learn
On Wednesday, 2 November 2016 at 13:45:41 UTC, Nordlöw wrote: Typically set- and map-like containers with O(1) key membership checking. A typical use case is intersection of the two sets `x` and `y`. When `x` and `y` both support O(1)-`contains(e)` the preferred algorithm is to interate over

Re: Release D 2.072.0

2016-11-02 Thread anonymous via Digitalmars-d-announce
On Wednesday, 2 November 2016 at 12:36:45 UTC, Johan Engelen wrote: LDC built with DMD 2.072.0 gives the following error when run: object.Error@src/rt/minfo.d(356): Cyclic dependency between module ddmd.traits and ddmd.cond ddmd.traits* -> ddmd.attrib -> ddmd.cond* -> ddmd.expression ->

Re: Is the following code legal?

2016-11-02 Thread Andrei Alexandrescu via Digitalmars-d
On 11/02/2016 10:21 AM, Shachar Shemesh wrote: int[int] hash; .. foreach( key, ref value; hash ) { if( value>12 ) hash.remove(key); } Some hash implementations support this, some don't. The D documentation (https://dlang.org/spec/hash-map.html) leaves this not defined. As

Re: Best way to get ceil(log2(x)) of a BigInt?

2016-11-02 Thread pineapple via Digitalmars-d-learn
On Wednesday, 2 November 2016 at 14:24:42 UTC, Andrea Fontana wrote: On Wednesday, 2 November 2016 at 14:05:50 UTC, pineapple wrote: I'm trying to do some math stuff with std.bigint and realized there's no obvious way to calculate the ceil of log2 of a bigint. Help? How big are your bigints?

[Issue 2742] std.stdio assumes console works in utf-8

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2742 Martin Krejcirik changed: What|Removed |Added CC||m...@krej.cz See

[Issue 15761] Windows wide character console output broken with MS runtime

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15761 Martin Krejcirik changed: What|Removed |Added See Also||https://issues.dlang.org/sh

Is the following code legal?

2016-11-02 Thread Shachar Shemesh via Digitalmars-d
int[int] hash; .. foreach( key, ref value; hash ) { if( value>12 ) hash.remove(key); } Some hash implementations support this, some don't. The D documentation (https://dlang.org/spec/hash-map.html) leaves this not defined. As reference, C++ does define this (in C++

Re: Best way to get ceil(log2(x)) of a BigInt?

2016-11-02 Thread Andrea Fontana via Digitalmars-d-learn
On Wednesday, 2 November 2016 at 14:05:50 UTC, pineapple wrote: I'm trying to do some math stuff with std.bigint and realized there's no obvious way to calculate the ceil of log2 of a bigint. Help? How big are your bigints?

[Issue 16655] lambda with type alias parameter fails std.traits.isSomeFunction

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16655 ag0ae...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC|

Best way to get ceil(log2(x)) of a BigInt?

2016-11-02 Thread pineapple via Digitalmars-d-learn
I'm trying to do some math stuff with std.bigint and realized there's no obvious way to calculate the ceil of log2 of a bigint. Help?

[Issue 15576] extern(C++, namespace) wrong mangling of variables (Windows)

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15576 --- Comment #2 from Johan Engelen --- Bootcamp hint: start looking at `mangleVariable` in `VisualCPPMangler` in cppmangle.d. --

Re: Linux Kernel in D?

2016-11-02 Thread qznc via Digitalmars-d
On Tuesday, 1 November 2016 at 16:22:58 UTC, Andrei Alexandrescu wrote: On 11/01/2016 09:41 AM, Wild wrote: On Tuesday, 1 November 2016 at 12:12:29 UTC, Heisenberg wrote: Just an idea. Do you think it would have any advantage compared to the one that is written in C? I think it wouldn't

[Issue 15576] extern(C++, namespace) wrong mangling of variables (Windows)

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15576 Johan Engelen changed: What|Removed |Added Keywords||bootcamp --

Set Operations on Set-like Containers

2016-11-02 Thread Nordlöw via Digitalmars-d-learn
Does https://dlang.org/phobos/std_algorithm_setops.html support specializations when (some) arguments are containers/ranges that provide the `in` operator? Typically set- and map-like containers with O(1) key membership checking. If not, should they? And what about operator overloading

[Issue 15576] extern(C++, namespace) wrong mangling of variables (Windows)

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15576 Johan Engelen changed: What|Removed |Added Summary|extern(C++) wrong mangling |extern(C++,

[Issue 15576] extern(C++) wrong mangling

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15576 Johan Engelen changed: What|Removed |Added CC||jbc.enge...@gmail.com

[Issue 15984] [REG2.071] Interface contracts retrieve garbage instead of parameters

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15984 --- Comment #9 from MichaelZ --- If this can't be readily fixed, then what exactly must we do (or rather, not do) in our code to avoid triggering the issue? Must we avoid using pre- (and post?) conditions in an interface at

Re: RC buffer

2016-11-02 Thread Andrei Alexandrescu via Digitalmars-d
On 11/2/16 7:42 AM, anonymous wrote: BTW about this PR: why RCString an not more generally RCArray ? RCArray comes on top of RCBuffer. That way we isolate the matter of reference counting the buffer itself from the matter of managing the objects stored in the buffer. It's a simple matter of

[Issue 16656] move embedded zlib to a separate library

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16656 Andrei Alexandrescu changed: What|Removed |Added CC||and...@erdani.com

[Issue 16656] New: move embedded zlib to a separate library

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16656 Issue ID: 16656 Summary: move embedded zlib to a separate library Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: Release D 2.072.0

2016-11-02 Thread Johan Engelen via Digitalmars-d-announce
On Tuesday, 1 November 2016 at 16:40:42 UTC, Andrei Alexandrescu wrote: On 11/01/2016 11:41 AM, Johan Engelen wrote: On Monday, 31 October 2016 at 01:27:08 UTC, Martin Nowak wrote: Glad to announce D 2.072.0. DMD 2.072.0 miscompiles/uncovers a bug in LDC, so I switched back to DMD 2.071.2

Re: State of issues.dlang.org

2016-11-02 Thread Wyatt via Digitalmars-d
On Wednesday, 2 November 2016 at 11:00:58 UTC, Nick Treleaven wrote: One thing I miss is the ability to preview posts on Bugzilla, This was added in Bugzilla 5.0. We're just running 4.4.2 on issues.d.o. Unfortunately, I'm not sure how easy it is to upgrade... -Wyatt

Re: RC buffer

2016-11-02 Thread anonymous via Digitalmars-d
On Wednesday, 2 November 2016 at 05:00:23 UTC, Andrei Alexandrescu wrote: I've eliminated all UTF nonsense from https://github.com/dlang/phobos/pull/4878 resulting in a bare reference counted buffer of (qualified) ubyte. Andrei BTW about this PR: why RCString an not more generally RCArray

Re: RC buffer

2016-11-02 Thread Nick Treleaven via Digitalmars-d
On Wednesday, 2 November 2016 at 05:00:23 UTC, Andrei Alexandrescu wrote: In order to make opAssign safe, a language change will be necessary. Technically, it should be possible with runtime checks: https://forum.dlang.org/post/aeeffshzkfjbrejzt...@forum.dlang.org The checking overheads

[Issue 4542] [tdpl] TDPL NVI example results in linker error

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4542 Simon Na. changed: What|Removed |Added Keywords||link-failure

Re: Error: function std.stdio.setmode is not accessible from module a

2016-11-02 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, November 02, 2016 08:58:04 Kirill Kryukov via Digitalmars-d- learn wrote: > Hello, > > dmd 2.072.0 broke my project. I reduced it to following: > > = a.d start = > import std.stdio; > > void main() > { > setmode(stdin.fileno, 0x8000); > } > = a.d end = > >

Re: Pattern matching in D?

2016-11-02 Thread Nick Treleaven via Digitalmars-d
On Friday, 28 October 2016 at 11:53:16 UTC, Nick Treleaven wrote: In the unittest, using with(Color) should help, but I couldn't get that to compile (visit thinks invalid lambdas are being passed). https://issues.dlang.org/show_bug.cgi?id=16655

Re: CTFE Status

2016-11-02 Thread Stefan Koch via Digitalmars-d
On Tuesday, 1 November 2016 at 21:12:06 UTC, Nordlöw wrote: On Tuesday, 1 November 2016 at 19:28:03 UTC, Stefan Koch wrote: Now a phobos unittest miscompiles :( Again passing the unittests does not mean too much. I just means I bail out before I generate invalid code :) Keep up! I am now

Re: State of issues.dlang.org

2016-11-02 Thread Nick Treleaven via Digitalmars-d
On Tuesday, 25 October 2016 at 13:04:22 UTC, ag0aep6g wrote: On 10/25/2016 05:17 AM, Jacob wrote: There's no editing one's comments so I often see people making multiple posts to themselves to add more information or to correct themselves. That's just a minor issue. I don't think that's

[Issue 16655] lambda with type alias parameter fails std.traits.isSomeFunction

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16655 --- Comment #2 from Nick Treleaven --- BTW parameter names aren't needed because the lambdas are used for Algebraic().visit!Lambdas: http://forum.dlang.org/post/pggfdcttxdpernjbx...@forum.dlang.org --

[Issue 16655] lambda with type alias parameter fails std.traits.isSomeFunction

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16655 --- Comment #1 from Nick Treleaven --- Workaround is to add parameter names: alias ls = (string s) => "string"; alias lc = (Red r) => "red"; --

[Issue 16655] New: lambda with type alias parameter fails std.traits.isSomeFunction

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16655 Issue ID: 16655 Summary: lambda with type alias parameter fails std.traits.isSomeFunction Product: D Version: D2 Hardware: x86 OS: Windows Status:

Re: https://issues.dlang.org/show_bug.cgi?id=2504: reserve for associative arrays

2016-11-02 Thread safety0ff via Digitalmars-d
On Wednesday, 2 November 2016 at 03:36:42 UTC, Andrei Alexandrescu wrote: Last time I looked our associative arrays were arrays of singly-linked lists. F.Y.I. It now appears to use quadratic probing since druntime PR #1229. Each hashtable would have its own freelist, or alternatively

Error: function std.stdio.setmode is not accessible from module a

2016-11-02 Thread Kirill Kryukov via Digitalmars-d-learn
Hello, dmd 2.072.0 broke my project. I reduced it to following: = a.d start = import std.stdio; void main() { setmode(stdin.fileno, 0x8000); } = a.d end = Compiling on Windows 7 64-bit with the following commands: C:\utl\dev\D\dmd-2.071.2\windows\bin\dmd.exe a.d -ofa1.exe

Re: is there "this"?

2016-11-02 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, November 02, 2016 02:42:01 Konstantin Kutsevalov via Digitalmars-d-learn wrote: > I tested already and it really works, thank you. > I asked that because I tried once to use "this" in past but I got > error. So I asked on some forum "how to get property of class?" > and peoples said

Re: is there "this"?

2016-11-02 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, November 02, 2016 07:26:57 Bauss via Digitalmars-d-learn wrote: > Well "this" in D has different meanings as it depends on its > context sometimes. Yes, but it's almost always the same thing that you'd expect from a language like C++ or Java. - Jonathan M Davis

Re: RC buffer

2016-11-02 Thread Daniel9 via Digitalmars-d
On Wednesday, 2 November 2016 at 05:00:23 UTC, Andrei Alexandrescu wrote: I've eliminated all UTF nonsense from https://github.com/dlang/phobos/pull/4878 resulting in a bare reference counted buffer of (qualified) ubyte. The goal is to get the buffer @safe and be able to have a reasonable

Re: Got a post for the D Blog?

2016-11-02 Thread Daniel9 via Digitalmars-d-announce
On Monday, 31 October 2016 at 03:51:16 UTC, Mike Parker wrote: So far, getting content for the blog has, with a few exceptions, been a process of sending out emails prompted by activity on my radar. This is no problem when it comes to project highlights or other fairly broad topics, but it's

Re: is there "this"?

2016-11-02 Thread Bauss via Digitalmars-d-learn
On Wednesday, 2 November 2016 at 02:42:01 UTC, Konstantin Kutsevalov wrote: On Wednesday, 2 November 2016 at 02:33:10 UTC, Konstantin Kutsevalov wrote: On Wednesday, 2 November 2016 at 02:20:43 UTC, rikki cattermole wrote: On 02/11/2016 3:17 PM, Konstantin Kutsevalov wrote: [...] You forgot

Re: Assistance with DUB

2016-11-02 Thread Basile B. via Digitalmars-d-learn
On Tuesday, 1 November 2016 at 22:01:23 UTC, Alfred Newman wrote: Greetings, I need some help with dub libraries. Executing "dub list" in my machine, I got the following: Packages present in the system and known to dub: colorize ~master: