Re: How do you keep up with the Kardashi^W^W github?

2016-01-16 Thread theotherphil via Digitalmars-d
On Wednesday, 13 January 2016 at 14:01:01 UTC, Andrei Alexandrescu wrote: I have most github-related emails delivered to a separate folder. Only since Jan 30 2015 there are a staggering number of messages there - 25113. Just going through them all would be a full-time job that wouldn't allow

Re: Is this rdmd bug or my fault ?

2016-01-16 Thread zabruk70 via Digitalmars-d-learn
Can anybody explain: Is dependencies file produced from command: dmd -deps=moduleA.deps moduleA.d must contains mention of moduleC? Is dependencies file produced reccursively? Thanks.

Re: dmd installation question

2016-01-16 Thread Dibyendu Majumdar via Digitalmars-d
On Saturday, 16 January 2016 at 02:10:44 UTC, Brad Anderson wrote: On Saturday, 16 January 2016 at 02:07:13 UTC, Brad Anderson wrote: On Saturday, 16 January 2016 at 01:16:22 UTC, Dibyendu Majumdar wrote: [...] Probably this: https://issues.dlang.org/show_bug.cgi?id=15456 I'm going to try

Re: Beta D 2.070.0-b1

2016-01-16 Thread Rainer Schuetze via Digitalmars-d-announce
On 16.01.2016 05:09, Adam D. Ruppe wrote: Has anyone built a Windows program with the beta? I tried and got undefined identifier HWND, but have been unable to minimize the test case and it might be just my install not being clean. Works for me to build Visual D, though it uses it's own

AccessUnalignedMemory version

2016-01-16 Thread Guillaume Chatelet via Digitalmars-d
It came up on this thread a few days ago https://github.com/D-Programming-Language/phobos/pull/3916#issuecomment-171373707 Some architectures do not allow unaligned loads/writes. It would be nice to have a Version for this: version (AccessUnalignedMemory) { foo(cast(ulong[])(ubyte)buffer)); }

Re: [dlang.org] new forum design - preview

2016-01-16 Thread Jacob Carlborg via Digitalmars-d
On 2016-01-16 04:07, Vladimir Panteleev wrote: To accommodate small screens. Without this the font size on phones and tablets is too large to be useful. I think it's too small to be useful. I always read in landscape mode because I think the font size is too small. It would be even better if

Re: So... let's document dmd

2016-01-16 Thread tsbockman via Digitalmars-d
On Saturday, 16 January 2016 at 07:52:11 UTC, Jack Stouffer wrote: dmd is now in D; theoretically that should allow for other projects to import from it like a normal D project. So why not make all of the ddmd modules available from any code that is complied with it, i.e. just like Phobos?

[Issue 15533] RDMD: -g switch produces linker error

2016-01-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15533 --- Comment #1 from Alexey G --- RDMD in both cases produces same rdmd.deps file in corresponding work dir. And those rdmd.deps not contains any mention of moduleC. Command dmd -deps=moduleA.deps moduleA.d produces

Re: Voldemort Type Construction Error

2016-01-16 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, January 16, 2016 06:06:03 Kapps via Digitalmars-d-learn wrote: > On Friday, 15 January 2016 at 20:04:47 UTC, Nordlöw wrote: > > On Friday, 15 January 2016 at 16:51:24 UTC, Anon wrote: > >> On Friday, 15 January 2016 at 14:04:50 UTC, Nordlöw wrote: > >>> What have I missed? > >> > >>

[Issue 15458] when i input "." to show expansion,it crashed.

2016-01-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15458 --- Comment #3 from Thomas --- Yes. The new dll fixes the problem, in issue 15522 example at least. --

Re: c style casts

2016-01-16 Thread Warwick via Digitalmars-d-learn
On Friday, 15 January 2016 at 15:13:37 UTC, Jacob Carlborg wrote: On 2016-01-15 11:16, Warwick wrote: I though C style casts were not supported? But when I accidentaly did int i; if (uint(i) < length) it compiled and worked fine. Whys that? Wouldn't a C style cast be: int i; if

Re: Google Summer of Code 2016

2016-01-16 Thread Jacob Carlborg via Digitalmars-d
On 2016-01-15 23:25, Craig Dillabaugh wrote: How much work do you think that would involve? Would it be enough to qualify as a project (I am guessing something in the range of 150-300 hours of total work, including getting up to speed, design, implementation, testing, would be suitable). It's

[Issue 15570] New: std.array.Appender: segfault on using put(Range)(Range items)

2016-01-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15570 Issue ID: 15570 Summary: std.array.Appender: segfault on using put(Range)(Range items) Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW

Convert some ints into a byte array without allocations?

2016-01-16 Thread Samson Smith via Digitalmars-d-learn
I'm trying to make a fast little function that'll give me a random looking (but deterministic) value from an x,y position on a grid. I'm just going to run each co-ord that I need through an FNV-1a hash function as an array of bytes since that seems like a fast and easy way to go. I'm going to

Re: extern(C++, ns)

2016-01-16 Thread Daniel Murphy via Digitalmars-d
On 13/01/2016 5:51 PM, Walter Bright wrote: If you like: extern (C++) { int a; extern (C++,ns) { int a; } } The whole point of scoped names is to be able to do this. The whole point is meant to be linking to C++ symbols inside namespaces.

Re: Premake officially gains D support

2016-01-16 Thread Dibyendu Majumdar via Digitalmars-d
On Friday, 15 January 2016 at 21:13:22 UTC, Dibyendu Majumdar wrote: On Tuesday, 2 June 2015 at 08:23:08 UTC, Manu wrote: Perhaps of interest, I have been maintaining D support in Premake for years (as an extension). It was finally merged into mainline... so Premake now officially supports D

Re: Functions that return type

2016-01-16 Thread Timon Gehr via Digitalmars-d-learn
On 01/16/2016 11:50 PM, data pulverizer wrote: I guess the constraints are that of a static language. (This is not true.)

Re: topN using a heap

2016-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/16 8:00 PM, Timon Gehr wrote: On 01/16/2016 10:28 PM, Ivan Kazmenko wrote: On Saturday, 16 January 2016 at 15:25:50 UTC, Andrei Alexandrescu wrote: ... To summarize: For k< The implementation falls back to topNHeap whenever k is within the first or last ~n/8 elements and therefore

Re: DUB - link error on Windows 10 64-bit

2016-01-16 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 16 January 2016 at 20:28:02 UTC, Dibyendu Majumdar wrote: I have installed DMD by unzipping the DMD archive (The installer does not work correctly on Windows 10). DUB installed as normal. What problem did you have with the installer? Which version? I've installed DMD more

Re: local import hijacking

2016-01-16 Thread Meta via Digitalmars-d
On Saturday, 16 January 2016 at 01:10:21 UTC, Andrei Alexandrescu wrote: We're live! Please review: https://github.com/D-Programming-Language/dmd/pull/5353 Thanks! "All checks have failed" -- Andrei I hoped it would be as simple as rebasing, but either Kenji left that PR unfinished or

Re: DUB - link error on Windows 10 64-bit

2016-01-16 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 17 January 2016 at 02:48:47 UTC, Mike Parker wrote: On Saturday, 16 January 2016 at 20:28:02 UTC, Dibyendu Majumdar wrote: I have installed DMD by unzipping the DMD archive (The installer does not work correctly on Windows 10). DUB installed as normal. What problem did you

Re: Localization (i18n) Options

2016-01-16 Thread Gerald via Digitalmars-d
On Sunday, 17 January 2016 at 02:51:30 UTC, Gerald wrote: Are there any other options out there that I might not be aware of? And of course, 10 minutes later you stumble across a potential option. Looks like GLib exposes gettext and GtkD does wrap it so I'll play around with that and see if

Re: DStep 0.2.1

2016-01-16 Thread anon via Digitalmars-d-announce
On Saturday, 16 January 2016 at 19:16:26 UTC, Jacob Carlborg wrote: On 2016-01-16 20:01, Russel Winder via Digitalmars-d-announce wrote: Trying the Debian build on Debian Sid, I still have the libclang.so problem, I have shown the list of things there are below. Creating a hack symbolic

Re: Functions that return type

2016-01-16 Thread Ali Çehreli via Digitalmars-d-learn
On 01/16/2016 02:50 PM, data pulverizer wrote: > I guess I have been writing a lot of julia where I take > creating arrays and tuples of types for granted. In this case > types are of type DataType. [...] I guess the constraints are > that of a static language. Exactly. I am sure every D

Re: extern(C++, ns)

2016-01-16 Thread Timon Gehr via Digitalmars-d
On 01/16/2016 08:09 PM, Walter Bright wrote: On 1/16/2016 6:26 AM, Daniel Murphy wrote: Nobody wants conflicting symbols in a module, and nobody wants to cram all of their C++ namespace bindings inside a single D source file to avoid getting namespace symbol conflicts. D's namespace system

[Issue 15573] @safe code using TLS works in debug; crashes in release

2016-01-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15573 --- Comment #1 from thomas.bock...@gmail.com --- Here's the complete output of a failed run on my system: Performing "release" build using dmd for x86_64. bug ~master: target for configuration "application" is up to date. To force a rebuild of

[Issue 15573] New: @safe code using TLS works in debug; crashes in release

2016-01-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15573 Issue ID: 15573 Summary: @safe code using TLS works in debug; crashes in release Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW

Re: topN using a heap

2016-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/16 9:12 PM, Andrei Alexandrescu wrote: On 1/16/16 4:58 PM, Ziad Hatahet via Digitalmars-d wrote: On Sat, Jan 16, 2016 at 7:25 AM, Andrei Alexandrescu via Digitalmars-d > wrote: 1. Organize the first 11 elements into

Localization (i18n) Options

2016-01-16 Thread Gerald via Digitalmars-d
I have a GtkD application for Linux where I would like to support localization. The current options in D seem pretty limited with the most recent being i18n-d (https://github.com/JakobOvrum/i18n-d). My code is structured for GNU gettext but I could make the effort and convert it to the way

Re: extern(C++, ns)

2016-01-16 Thread Walter Bright via Digitalmars-d
On 1/16/2016 4:35 PM, Timon Gehr wrote: On 01/16/2016 08:09 PM, Walter Bright wrote: On 1/16/2016 6:26 AM, Daniel Murphy wrote: Nobody wants conflicting symbols in a module, and nobody wants to cram all of their C++ namespace bindings inside a single D source file to avoid getting namespace

Re: Premake officially gains D support

2016-01-16 Thread Mike Parker via Digitalmars-d
On Sunday, 17 January 2016 at 03:56:11 UTC, Mike Parker wrote: On Sunday, 17 January 2016 at 00:18:37 UTC, Dibyendu Majumdar wrote: Unfortunately I find that premake doesn't support DMD correctly on Windows 64-bit - it attempts to use the D linker rather than the MS Linker. Regards I can

Re: Premake officially gains D support

2016-01-16 Thread Mike Parker via Digitalmars-d
On Sunday, 17 January 2016 at 00:18:37 UTC, Dibyendu Majumdar wrote: Unfortunately I find that premake doesn't support DMD correctly on Windows 64-bit - it attempts to use the D linker rather than the MS Linker. Regards I can reproduce this. Specifying architecture "x64" apparently does

Question about OutputRange and std.range: put

2016-01-16 Thread Uranuz via Digitalmars-d-learn
Hello to forum readers! I have a question about using OutputRange and std.range: put. I have the following code snippet to illustrate my question: import std.range, std.stdio, std.string; void main() { string greating = "Hello, " ; string username = "Bob";

Re: [dlang.org] new forum design - preview

2016-01-16 Thread anonymous via Digitalmars-d
On 16.01.2016 14:18, Jacob Carlborg wrote: I think it's too small to be useful. I always read in landscape mode because I think the font size is too small. It would be even better if the reader view worked (iPhone). Looks like I had accidentally made it a bit smaller. Fixed it.

Re: Rust's website is really good

2016-01-16 Thread karabuta via Digitalmars-d
On Friday, 15 January 2016 at 11:56:36 UTC, Andrea Fontana wrote: On Friday, 15 January 2016 at 11:35:52 UTC, Saurabh Das wrote: I saw it via Reddit. Since the dlang.org website has been under discussion on this forum, I thought I would bring it up: https://www.rust-lang.org/faq.html

Re: Convert some ints into a byte array without allocations?

2016-01-16 Thread Samson Smith via Digitalmars-d-learn
On Saturday, 16 January 2016 at 15:42:39 UTC, bearophile wrote: Yazan D: On Saturday, 16 January 2016 at 14:42:27 UTC, Yazan D wrote: ubyte[] b = (cast(ubyte*) )[0 .. int.sizeof]; Better to use the actual size: ubyte[] b = (cast(ubyte*) )[0 .. a.sizeof]; Bye, bearophile Good thinking, I

Re: Premake officially gains D support

2016-01-16 Thread Russel Winder via Digitalmars-d
On Fri, 2016-01-15 at 21:13 +, Dibyendu Majumdar via Digitalmars-d wrote: […] > > Hi - Thanks for this; I currently use CMake for C/C++ projects,  > but due to lack of support for D in CMake, planning to migrate to  > premake. Is this project totally dead? (It's what's left of the CMakeD2 on

[Issue 15550] [Reg 2.070.0-b1] compile error while testing template constraint

2016-01-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15550 --- Comment #1 from Martin Nowak --- The bug boils down to this behavior change. cat > bug.d << CODE struct Vector(T, int N) { void opDispatch(string, U)(U) { } } static assert(!is(typeof(Vector!(int, 2)._isMatrix)));

Re: Logo for D

2016-01-16 Thread Dylan Allbee via Digitalmars-d-announce
On Saturday, 16 January 2016 at 17:55:13 UTC, karabuta wrote: How do you see it? http://amazingws.0fees.us/wp-content/uploads/2016/01/dlang2.png Many variants are on the way. In all honesty I like the current one better. The binary background feels gimmicky.

[Issue 15570] std.array.Appender: segfault on using put(Range)(Range items)

2016-01-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15570 Uranuz changed: What|Removed |Added Status|NEW |RESOLVED

Re: Status of DWT on OS X

2016-01-16 Thread Jacob Carlborg via Digitalmars-d-dwt
On 2016-01-16 08:05, Andrew wrote: I'm looking for a GUI that's cross platform including Windows, Limus, and OS X. From what I can tell, DWT isn't on OS X yet, is that correct? No, DWT isn't on OS X yet. Is DWT is t ready yet, then Are the QT bindings to D stable? I'm not sure that what

Re: Today was a good day

2016-01-16 Thread Timon Gehr via Digitalmars-d
On 01/13/2016 04:38 AM, Andrei Alexandrescu wrote: On 01/12/2016 08:31 PM, Timon Gehr wrote: ... - getPivot selects indices which depend deterministically on the range length. Therefore afaics it is now possible to create inputs that force quadratic runtime for topN. (E.g. an input can be

Re: DIP83

2016-01-16 Thread deadalnix via Digitalmars-d
On Saturday, 16 January 2016 at 03:00:33 UTC, rsw0x wrote: On Friday, 15 January 2016 at 11:58:19 UTC, Márcio Martins wrote: On Thursday, 14 January 2016 at 14:28:05 UTC, deadalnix wrote: [...] True that. I think it's great to keep evolving the language and making it better, on the other

Re: DIP83

2016-01-16 Thread deadalnix via Digitalmars-d
On Friday, 15 January 2016 at 15:06:00 UTC, Yazan D wrote: On Fri, 15 Jan 2016 13:20:18 +, deadalnix wrote: Well I don't, both on OSX and linux, using the latest release. On linux I can do the addr2line dance, but on OSX I can't even do that as it require information that are gone once

Re: Question about OutputRange and std.range: put

2016-01-16 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, January 16, 2016 12:11:11 Uranuz via Digitalmars-d-learn wrote: > Hello to forum readers! > I have a question about using OutputRange and std.range: put. I > have the following code snippet to illustrate my question: > > import std.range, std.stdio, std.string; > > void main() > { >

Re: Logo for D

2016-01-16 Thread anonymous via Digitalmars-d-announce
On 16.01.2016 18:55, karabuta wrote: How do you see it? http://amazingws.0fees.us/wp-content/uploads/2016/01/dlang2.png Many variants are on the way. Do you intend to propose this for the official logo? If so, be aware that the logo is a delicate matter. There have been various proposals

Type safe OpenGL - Converting strings into types in D by Maik Klein

2016-01-16 Thread Ali Çehreli via Digitalmars-d-announce
Not a brand new article but I don't think it was posted here before. On Reddit: https://www.reddit.com/r/programming/comments/4182xc/type_safe_opengl_converting_strings_into_types_in/ Actual link: https://maikklein.github.io/2015/11/14/Converting-strings-to-types/ Ali

Re: Convert some ints into a byte array without allocations?

2016-01-16 Thread Samson Smith via Digitalmars-d-learn
On Saturday, 16 January 2016 at 14:42:27 UTC, Yazan D wrote: On Sat, 16 Jan 2016 14:34:54 +, Samson Smith wrote: [...] You can do this: ubyte[] b = (cast(ubyte*) )[0 .. int.sizeof]; It is casting the pointer to `a` to a ubyte (or byte) pointer and then taking a slice the size of int.

Re: Question about OutputRange and std.range: put

2016-01-16 Thread Uranuz via Digitalmars-d-learn
On Saturday, 16 January 2016 at 16:14:56 UTC, Jonathan M Davis wrote: On Saturday, January 16, 2016 12:11:11 Uranuz via Digitalmars-d-learn wrote: [...] There are a few problems here. First off, when put is used with an array, it fills the array. It doesn't append to it. So, you can't use a

Re: [dlang.org] getting the redesign wrapped up

2016-01-16 Thread karabuta via Digitalmars-d
On Friday, 8 January 2016 at 22:32:59 UTC, anonymous wrote: My implementation of the redesign is pretty much complete. Check it out: http://d-ag0aep6g.rhcloud.com/ This is an implementation of a design done by one Ivan Smirnov, brought forward by Jacob Carlborg [1]. The dark forum widgets

Re: IPFS is growing and Go, Swift, ruby, python, rust, C++, etc are already there

2016-01-16 Thread karabuta via Digitalmars-d
On Wednesday, 13 January 2016 at 20:07:01 UTC, Wyatt wrote: On Wednesday, 13 January 2016 at 19:17:00 UTC, karabuta wrote: when they do This is... remarkably optimistic. -Wyatt Mark my words

Re: Question about OutputRange and std.range: put

2016-01-16 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, January 16, 2016 16:53:24 Uranuz via Digitalmars-d-learn wrote: > On Saturday, 16 January 2016 at 16:14:56 UTC, Jonathan M Davis > wrote: > > On Saturday, January 16, 2016 12:11:11 Uranuz via > > Digitalmars-d-learn wrote: > >> [...] > > > > There are a few problems here. First off,

[Issue 15550] [Reg 2.070.0-b1] compile error while testing template constraint

2016-01-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15550 --- Comment #2 from Martin Nowak --- Introduced by https://github.com/D-Programming-Language/dmd/pull/5263. --

Re: Convert some ints into a byte array without allocations?

2016-01-16 Thread Yazan D via Digitalmars-d-learn
On Sat, 16 Jan 2016 14:34:54 +, Samson Smith wrote: > I'm trying to make a fast little function that'll give me a random > looking (but deterministic) value from an x,y position on a grid. I'm > just going to run each co-ord that I need through an FNV-1a hash > function as an array of bytes

Re: Convert some ints into a byte array without allocations?

2016-01-16 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, January 16, 2016 14:34:54 Samson Smith via Digitalmars-d-learn wrote: > I'm trying to make a fast little function that'll give me a > random looking (but deterministic) value from an x,y position on > a grid. I'm just going to run each co-ord that I need through an > FNV-1a hash

Re: local import hijacking

2016-01-16 Thread karabuta via Digitalmars-d
On Thursday, 14 January 2016 at 15:54:02 UTC, Daniel Kozak wrote: V Thu, 14 Jan 2016 16:17:41 +0100 anonymous via Digitalmars-d napsáno: On 14.01.2016 15:25, Byron Heads wrote: > I got burned by this yesterday, this code should not compile > void foo() {

DStep 0.2.1

2016-01-16 Thread Jacob Carlborg via Digitalmars-d-announce
I've just created a new release of DStep, 0.2.1 [1]. Binaries are available for OS X, Linux 64bit and FreeBSD 64bit. No 32bit versions this time, unfortunately. For those not familiar with DStep: DStep is a tool for translating C and Objective-C headers to D modules. Changelog: Version

Re: Rust's website is really good

2016-01-16 Thread anonymous via Digitalmars-d
On 16.01.2016 16:53, karabuta wrote: OK. How do I contribute to the design? I will run away if I have to go through a long process b4 i can do that:) In the end someone will have to make a successful pull request against the dlang.org git repository. That means cloning the repository,

Re: Convert some ints into a byte array without allocations?

2016-01-16 Thread Yazan D via Digitalmars-d-learn
On Sat, 16 Jan 2016 14:42:27 +, Yazan D wrote: > > You can do this: > ubyte[] b = (cast(ubyte*) )[0 .. int.sizeof]; > > It is casting the pointer to `a` to a ubyte (or byte) pointer and then > taking a slice the size of int. You can also use a union: union Foo { int i; ubyte[4] b; }

Re: So... let's document dmd

2016-01-16 Thread H. S. Teoh via Digitalmars-d
On Sat, Jan 16, 2016 at 08:35:40AM +, tsbockman via Digitalmars-d wrote: > On Saturday, 16 January 2016 at 07:52:11 UTC, Jack Stouffer wrote: > >dmd is now in D; theoretically that should allow for other projects > >to import from it like a normal D project. So why not make all of the > >ddmd

Re: Convert some ints into a byte array without allocations?

2016-01-16 Thread bearophile via Digitalmars-d-learn
Yazan D: On Saturday, 16 January 2016 at 14:42:27 UTC, Yazan D wrote: ubyte[] b = (cast(ubyte*) )[0 .. int.sizeof]; Better to use the actual size: ubyte[] b = (cast(ubyte*) )[0 .. a.sizeof]; Bye, bearophile

Re: std.experimental.yesnogc

2016-01-16 Thread karabuta via Digitalmars-d
On Thursday, 14 January 2016 at 07:44:16 UTC, Jacob Carlborg wrote: On 2016-01-14 01:35, Andrei Alexandrescu wrote: Hey folks, I want to push things forward with artifacts dedicated to avoiding the GC, and of course my main worry is finding the right name. An obvious choice is

[Issue 7016] local import does not create -deps dependency

2016-01-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7016 Alexey G changed: What|Removed |Added CC||golovanov_ale...@mail.ru

Logo for D

2016-01-16 Thread karabuta via Digitalmars-d-announce
How do you see it? http://amazingws.0fees.us/wp-content/uploads/2016/01/dlang2.png Many variants are on the way.

Re: Convert some ints into a byte array without allocations?

2016-01-16 Thread Samson Smith via Digitalmars-d-learn
On Saturday, 16 January 2016 at 16:28:21 UTC, Jonathan M Davis wrote: On Saturday, January 16, 2016 14:34:54 Samson Smith via Digitalmars-d-learn wrote: I'm trying to make a fast little function that'll give me a random looking (but deterministic) value from an x,y position on a grid. I'm just

Re: DStep 0.2.1

2016-01-16 Thread Russel Winder via Digitalmars-d-announce
On Sat, 2016-01-16 at 18:02 +0100, Jacob Carlborg via Digitalmars-d- announce wrote: > I've just created a new release of DStep, 0.2.1 [1]. Binaries are  > available for OS X, Linux 64bit and FreeBSD 64bit. No 32bit versions  > this time, unfortunately. I tried the Debian build on Fedora Rawhide,

Re: extern(C++, ns)

2016-01-16 Thread Walter Bright via Digitalmars-d
On 1/16/2016 6:26 AM, Daniel Murphy wrote: Nobody wants conflicting symbols in a module, and nobody wants to cram all of their C++ namespace bindings inside a single D source file to avoid getting namespace symbol conflicts. D's namespace system does not suffer from those faults.

Re: Convert some ints into a byte array without allocations?

2016-01-16 Thread Johannes Pfau via Digitalmars-d-learn
Am Sat, 16 Jan 2016 18:05:46 + schrieb Samson Smith : > On Saturday, 16 January 2016 at 16:28:21 UTC, Jonathan M Davis > wrote: > > > > But it will be less error-prone to use those functions, and if > > you _do_ actually need to swap endianness, then they're exactly > > what

Re: Logo for D

2016-01-16 Thread Jacob Carlborg via Digitalmars-d-announce
On 2016-01-16 18:55, karabuta wrote: How do you see it? http://amazingws.0fees.us/wp-content/uploads/2016/01/dlang2.png Many variants are on the way. I think any new logo should have a base form, with only two colors, black and white. This allows for further variations without loosing the

Re: topN using a heap

2016-01-16 Thread Ziad Hatahet via Digitalmars-d
On Sat, Jan 16, 2016 at 7:25 AM, Andrei Alexandrescu via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > > 1. Organize the first 11 elements into a max heap > > Why not the first 10?

Re: Functions that return type

2016-01-16 Thread data pulverizer via Digitalmars-d-learn
On Saturday, 16 January 2016 at 21:22:15 UTC, data pulverizer wrote: Is it possible to create a function that returns Type like typeof() does? Something such as: Type returnInt(){ return int; } More to the point what is the Type of a type such as int? Thanks p.s. I am aware I could do

Re: dmd installation question

2016-01-16 Thread Dibyendu Majumdar via Digitalmars-d
On Saturday, 16 January 2016 at 11:53:07 UTC, Dibyendu Majumdar wrote: Probably this: https://issues.dlang.org/show_bug.cgi?id=15456 I'm going to try to get around to fixing that and making an installer for LDC this weekend. Reading more carefully it may not be the same bug. It seems

Re: Functions that return type

2016-01-16 Thread rsw0x via Digitalmars-d-learn
On Saturday, 16 January 2016 at 21:22:15 UTC, data pulverizer wrote: Is it possible to create a function that returns Type like typeof() does? Something such as: Type returnInt(){ return int; } Functions return values, not types. You would use a template to "return" a type. More to

Re: Logo for D

2016-01-16 Thread karabuta via Digitalmars-d-announce
On Saturday, 16 January 2016 at 18:15:06 UTC, anonymous wrote: On 16.01.2016 18:55, karabuta wrote: [...] Do you intend to propose this for the official logo? If so, be aware that the logo is a delicate matter. There have been various proposals to change it from the current one, and all

DUB - link error on Windows 10 64-bit

2016-01-16 Thread Dibyendu Majumdar via Digitalmars-d-learn
Hi I am using DUB on Windows 10 64-bit with DMD. I have simple project with following configuration: { "name": "testing", "description": "A minimal D application.", "copyright": "Copyright © 2016, dibyendu", "authors": ["dibyendu"], "targetType":

Re: DUB - link error on Windows 10 64-bit

2016-01-16 Thread Robert M. Münch via Digitalmars-d-learn
On 2016-01-16 20:28:02 +, Dibyendu Majumdar said: I have installed DMD by unzipping the DMD archive (The installer does not work correctly on Windows 10). DUB installed as normal. Check your paths in sc.ini Looks like the D link libraries are not found. -- Robert M. Münch

[Issue 15572] New: Windows installer leaves "sc.ini" inaccessible

2016-01-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15572 Issue ID: 15572 Summary: Windows installer leaves "sc.ini" inaccessible Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: major

[Issue 15571] .dup is incompatible with self referencing structs

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

Re: DStep 0.2.1

2016-01-16 Thread Jacob Carlborg via Digitalmars-d-announce
On 2016-01-16 20:01, Russel Winder via Digitalmars-d-announce wrote: Trying the Debian build on Debian Sid, I still have the libclang.so problem, I have shown the list of things there are below. Creating a hack symbolic link I got it to work. I've built the DStep against libclang provided by

Re: Convert some ints into a byte array without allocations?

2016-01-16 Thread Johannes Pfau via Digitalmars-d-learn
Am Sat, 16 Jan 2016 15:46:00 + schrieb Samson Smith : > On Saturday, 16 January 2016 at 14:42:27 UTC, Yazan D wrote: > > On Sat, 16 Jan 2016 14:34:54 +, Samson Smith wrote: > > > >> [...] > > > > You can do this: > > ubyte[] b = (cast(ubyte*) )[0 .. int.sizeof]; > > > >

[Issue 15571] New: .dup is incompatible with self referencing structs

2016-01-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15571 Issue ID: 15571 Summary: .dup is incompatible with self referencing structs Product: D Version: D2 Hardware: All URL: http://dlang.org/ OS: All Status:

Functions that return type

2016-01-16 Thread data pulverizer via Digitalmars-d-learn
Is it possible to create a function that returns Type like typeof() does? Something such as: Type returnInt(){ return int; } More to the point what is the Type of a type such as int? Thanks

Re: local import hijacking

2016-01-16 Thread Iain Buclaw via Digitalmars-d
On 15 January 2016 at 23:50, John Colvin via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Friday, 15 January 2016 at 08:15:50 UTC, Iain Buclaw wrote: > >> On 15 Jan 2016 9:12 am, "Russel Winder via Digitalmars-d" < >> digitalmars-d@puremagic.com> wrote: >> >>> >>> In this mindset D is

Re: Functions that return type

2016-01-16 Thread data pulverizer via Digitalmars-d-learn
On Saturday, 16 January 2016 at 21:59:22 UTC, data pulverizer wrote: On Saturday, 16 January 2016 at 21:22:15 UTC, data pulverizer wrote: Is it possible to create a function that returns Type like typeof() does? Something such as: Type returnInt(){ return int; } More to the point what is

Re: So... let's document dmd

2016-01-16 Thread tsbockman via Digitalmars-d
On Saturday, 16 January 2016 at 15:13:28 UTC, H. S. Teoh wrote: I disagree. I think having the dmd itself (lexer, parser, etc.) as a library (with the dmd executable merely being the default frontend) will do D a lot of good. For one thing, IDE's will no longer need to reinvent a D parser

Re: topN using a heap

2016-01-16 Thread Ivan Kazmenko via Digitalmars-d
On Saturday, 16 January 2016 at 15:25:50 UTC, Andrei Alexandrescu wrote: That's quite a bit of work, so 3934 uses an alternate strategy for finding the smallest 10: 1. Organize the first 11 elements into a max heap 2. Scan all other elements progressively. Whenever an element is found that

Re: Functions that return type

2016-01-16 Thread anonymous via Digitalmars-d-learn
On Saturday, 16 January 2016 at 21:22:15 UTC, data pulverizer wrote: Is it possible to create a function that returns Type like typeof() does? Something such as: Type returnInt(){ return int; } No. A function cannot return a type. A template can evaluate to a type, though:

Re: topN using a heap

2016-01-16 Thread Ivan Kazmenko via Digitalmars-d
On Saturday, 16 January 2016 at 15:25:50 UTC, Andrei Alexandrescu wrote: 3. At the end, swap the largest in the heap with the 10th and you're done! And why this? Do we additionally require the k-th element to arrive exactly on k-th place?

Re: Functions that return type

2016-01-16 Thread sarn via Digitalmars-d-learn
On Saturday, 16 January 2016 at 21:22:15 UTC, data pulverizer wrote: Is it possible to create a function that returns Type like typeof() does? Something such as: Type returnInt(){ return int; } A type itself isn't a runtime value. I think the closest thing is a TypeInfo object:

Re: DStep 0.2.1

2016-01-16 Thread Russel Winder via Digitalmars-d-announce
On Sat, 2016-01-16 at 18:27 +, Russel Winder wrote: > On Sat, 2016-01-16 at 18:02 +0100, Jacob Carlborg via Digitalmars-d- > announce wrote: > > I've just created a new release of DStep, 0.2.1 [1]. Binaries are  > > available for OS X, Linux 64bit and FreeBSD 64bit. No 32bit > > versions  > >

Re: Convert some ints into a byte array without allocations?

2016-01-16 Thread tsbockman via Digitalmars-d-learn
On Saturday, 16 January 2016 at 14:46:47 UTC, Yazan D wrote: You can also use a union: union Foo { int i; ubyte[4] b; } // write to int part Foo f = Foo(a); // then read from ubyte part writeln(foo.b); ps. I am not sure of the aliasing rules in D for unions. In C, this is allowed, but in

Re: DUB - link error on Windows 10 64-bit

2016-01-16 Thread Dibyendu Majumdar via Digitalmars-d-learn
On Saturday, 16 January 2016 at 20:50:51 UTC, Robert M. Münch wrote: Check your paths in sc.ini Looks like the D link libraries are not found. Well as far as I can tell they are correct (unchanged from whatever the installer set them to): ; environment for both 32/64 bit [Environment]

Re: topN using a heap

2016-01-16 Thread Timon Gehr via Digitalmars-d
On 01/16/2016 10:28 PM, Ivan Kazmenko wrote: On Saturday, 16 January 2016 at 15:25:50 UTC, Andrei Alexandrescu wrote: ... To summarize: For k< The implementation falls back to topNHeap whenever k is within the first or last ~n/8 elements and therefore is Ω(n log n) on average.

Re: topN using a heap

2016-01-16 Thread Timon Gehr via Digitalmars-d
On 01/17/2016 03:09 AM, Andrei Alexandrescu wrote: On 1/16/16 8:00 PM, Timon Gehr wrote: On 01/16/2016 10:28 PM, Ivan Kazmenko wrote: On Saturday, 16 January 2016 at 15:25:50 UTC, Andrei Alexandrescu wrote: ... To summarize: For k< The implementation falls back to topNHeap whenever k is

Re: Localization (i18n) Options

2016-01-16 Thread Jakob Ovrum via Digitalmars-d
On Sunday, 17 January 2016 at 02:51:30 UTC, Gerald wrote: I have a GtkD application for Linux where I would like to support localization. The current options in D seem pretty limited with the most recent being i18n-d (https://github.com/JakobOvrum/i18n-d). My code is structured for GNU

Re: DUB - link error on Windows 10 64-bit

2016-01-16 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 16 January 2016 at 21:51:15 UTC, Dibyendu Majumdar wrote: Well as far as I can tell they are correct (unchanged from whatever the installer set them to): ; environment for both 32/64 bit [Environment] DFLAGS="-I%@P%\..\..\src\phobos" "-I%@P%\..\..\src\druntime\import" ;

Re: topN using a heap

2016-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/16 5:27 PM, Ivan Kazmenko wrote: On Saturday, 16 January 2016 at 15:25:50 UTC, Andrei Alexandrescu wrote: 3. At the end, swap the largest in the heap with the 10th and you're done! And why this? Do we additionally require the k-th element to arrive exactly on k-th place? Yes. --

Re: topN using a heap

2016-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/16 4:58 PM, Ziad Hatahet via Digitalmars-d wrote: On Sat, Jan 16, 2016 at 7:25 AM, Andrei Alexandrescu via Digitalmars-d > wrote: 1. Organize the first 11 elements into a max heap Why not the first 10? So you get

Re: dmd installation question

2016-01-16 Thread Mike Parker via Digitalmars-d
On Saturday, 16 January 2016 at 22:04:58 UTC, Dibyendu Majumdar wrote: It seems that the sc.ini is modified by the installer - and in doing so it loses the group "Users" assignment so that no one other than the administrator can access it. I'm unable to reproduce this with the 2.069.2

Re: topN using a heap

2016-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/16 9:37 PM, Timon Gehr wrote: Ivan's analysis suggests that even something significantly larger, like n/log(n)² might work as an upper bound for k. I'm not clear on how you got to that boundary. There are a few implementation details to be minded as well (quickly and carefully

  1   2   >