Devisualization and DWC

2014-11-07 Thread Rikki Cattermole via Digitalmars-d-announce
Right, time for a new announcement from me. First off the library I have been talking about called DWC has been renamed. It is now Under the banner of Devisualization, window[0] project. Devisualization.window otherwise known as de_window is a window and context creation for Windows, Linux

Re: Devisualization and DWC

2014-11-07 Thread ponce via Digitalmars-d-announce
Nice work, it's basically the SDL replacement I wished for! I like that its scope is well defined. I don't get why it depends on DerelictGL. AFAIK SDL, GLFW and friends do not depend on GL function loaders.

Re: Devisualization and DWC

2014-11-07 Thread Kagamin via Digitalmars-d-announce
On Friday, 7 November 2014 at 10:48:46 UTC, Rikki Cattermole wrote: - Native GUI controls (such as the menu for OSX) D native or OS native?

Re: Devisualization and DWC

2014-11-07 Thread Rikki Cattermole via Digitalmars-d-announce
On 8/11/2014 12:46 a.m., ponce wrote: Nice work, it's basically the SDL replacement I wished for! I like that its scope is well defined. I don't get why it depends on DerelictGL. AFAIK SDL, GLFW and friends do not depend on GL function loaders. It depends because of OpenGL context creation.

Re: Devisualization and DWC

2014-11-07 Thread Rikki Cattermole via Digitalmars-d-announce
On 8/11/2014 12:48 a.m., Kagamin wrote: On Friday, 7 November 2014 at 10:48:46 UTC, Rikki Cattermole wrote: - Native GUI controls (such as the menu for OSX) D native or OS native? Short answer: Basically it should use the native implementation if possible otherwise it should use the non

Re: D/Objective-C 64bit

2014-11-07 Thread Christian Schneider via Digitalmars-d-announce
Also when I tried to declare / use extern strings like from NSApplication.h: APPKIT_EXTERN NSString *NSApplicationDidHideNotification; I found no way to get this working. Is this a limitation of the current 64 bit port? I think that should work. How did you declare it? It should be

Re: D/Objective-C 64bit

2014-11-07 Thread Jacob Carlborg via Digitalmars-d-announce
On 2014-11-07 13:12, Christian Schneider wrote: Jacob, thank you very much for your reply and explanations! I get EXC_BAD_ACCESS (SIGSEGV) for both NSString and void * if I use the declaration you suggested. What exactly are you doing with the string when you get the EXC_BAD_ACCESS? Also,

Re: D/Objective-C 64bit

2014-11-07 Thread Christian Schneider via Digitalmars-d-announce
I get EXC_BAD_ACCESS (SIGSEGV) for both NSString and void * if I use the declaration you suggested. What exactly are you doing with the string when you get the EXC_BAD_ACCESS? Also, can you reproduce the issue in an program just printing this variable with NSLog? I get the SIGSEGV when i

Re: D/Objective-C 64bit

2014-11-07 Thread Jacob Carlborg via Digitalmars-d-announce
On 2014-11-07 15:23, Christian Schneider wrote: I get the SIGSEGV when i try to NSLog this string constant. I was not looking any further, because if it fails to NSLog, i can't do anything with it ;) Now I know what the problem is. In D, module variables are by default in TLS (thread local

Re: D/Objective-C 64bit

2014-11-07 Thread Christian Schneider via Digitalmars-d-announce
Now I know what the problem is. In D, module variables are by default in TLS (thread local storage). To make it refer to a global C variable, use __gshared: extern (C) extern __gshared NSString NSApplicationDidHideNotification; Sorry, I completely forgot about that. Ha, awesome! It

Re: D/Objective-C 64bit

2014-11-07 Thread Jacob Carlborg via Digitalmars-d-announce
On 2014-11-07 17:05, Christian Schneider wrote: Ha, awesome! It works! I'll add this to a wiki page in the DiveFramework github repos. Thanks again! No problem :). This isn't mention in the DIP since this has nothing to do with Objective-C, it's rather plain C. This is documented here [1].

FoundationDB D API

2014-11-07 Thread George Sapkin via Digitalmars-d-announce
I've recently decided to open source FoundationDB D API from our internal project. It's released under MIT license since that's the simplest option I could think of. https://github.com/GeorgeSapkin/fdb-d It has been ripped out of a working project so it's missing unit testing and sample

Re: Optimization fun

2014-11-07 Thread thedeemon via Digitalmars-d
On Thursday, 6 November 2014 at 23:00:19 UTC, H. S. Teoh via Digitalmars-d wrote: 1) The GC could use some serious improvement: it just so happens that the solver's algorithm only ever needs to allocate memory, never release it (it keeps a hash of visited states that only grows, never

x64 can not run [core.thread.Fiber]

2014-11-07 Thread sdvcn via Digitalmars-d
[code] import std.stdio; import core.thread; void fiberFunc() { foreach(i; 0 .. 10) { writefln(int is %d,i); Fiber.yield(); } } int main(string[] argv) { Fiber composed = new Fiber( fiberFunc); do{

Re: x64 can not run [core.thread.Fiber]

2014-11-07 Thread Martin Nowak via Digitalmars-d
On Friday, 7 November 2014 at 11:17:16 UTC, sdvcn wrote: os:windows 2008r2sp1 6.1.7601 x64 We just found another bug with out win64 stack switching function. Will be fixed soon https://issues.dlang.org/show_bug.cgi?id=12800#c6.

Re: Optimization fun

2014-11-07 Thread Steven Schveighoffer via Digitalmars-d
On 11/7/14 1:05 AM, H. S. Teoh via Digitalmars-d wrote: A little more investigation revealed the culprit: a queue object implemented with subarrays, and subarrays were being used as stacks by appending with ~= and popping by decrementing .length. A dangerous combination that causes excessive

Re: Optimization fun

2014-11-07 Thread Steven Schveighoffer via Digitalmars-d
On 11/7/14 8:43 AM, Steven Schveighoffer wrote: On 11/7/14 1:05 AM, H. S. Teoh via Digitalmars-d wrote: A little more investigation revealed the culprit: a queue object implemented with subarrays, and subarrays were being used as stacks by appending with ~= and popping by decrementing .length.

Keeping a dynamic sorted range

2014-11-07 Thread bearophile via Digitalmars-d
(This is a partial repost from a recent D.learn thread.) In Phobos we have SortedRange and assumeSorted, but I do find them not very good for a common enough use case. The use case is to keep a sorted array, keep adding items to it (adding larger and larger items at the end. Or sometimes

Re: DerelictBgfx not shipping core libs.

2014-11-07 Thread Laeeth Isharc via Digitalmars-d
On Friday, 7 November 2014 at 05:33:11 UTC, Mike Parker wrote: And you suppose I have nothing better to do than to compile multiple binaries for over a dozen projects every time they put out a new release or, as in the case of Bgfx, update their repo? My time is rather more valuable to me

Re: Program logic bugs vs input/environmental errors

2014-11-07 Thread Bruno Medeiros via Digitalmars-d
On 29/10/2014 21:22, Walter Bright wrote: On 10/29/2014 5:37 AM, Bruno Medeiros wrote: On 18/10/2014 18:40, Walter Bright wrote: As I've said before, tripping an assert by definition means the program has entered an unknown state. I don't believe it is possible for any language to make

Re: BNF grammar for D?

2014-11-07 Thread Bruno Medeiros via Digitalmars-d
On 31/10/2014 12:02, Daniel Kozák via Digitalmars-d wrote: You can write intellij idea plugins with JDK 7 or even JDK 8, but that plugins will only work with IDEA running on same version of JDK. You must use same version for IDEA SDK and for IDEA itself. Currently IDEA and all plugins are

Re: BNF grammar for D?

2014-11-07 Thread Bruno Medeiros via Digitalmars-d
On 31/10/2014 12:16, Rikki Cattermole wrote: On 1/11/2014 12:35 a.m., Bruno Medeiros wrote: On 27/10/2014 22:35, Jeremy Powers via Digitalmars-d wrote: An interesting path to take for an intellij plugin would be to use his DCD/libdparse for all the heavy lifting, with the plugin just farming

Re: Keeping a dynamic sorted range

2014-11-07 Thread Max Klyga via Digitalmars-d
On 2014-11-07 14:11:30 +, bearophile said: (This is a partial repost from a recent D.learn thread.) In Phobos we have SortedRange and assumeSorted, but I do find them not very good for a common enough use case. The use case is to keep a sorted array, keep adding items to it (adding

Re: Keeping a dynamic sorted range

2014-11-07 Thread bearophile via Digitalmars-d
Max Klyga: Ranges are not container. They are meant for traversing. If you want a sorted range - use an underlying container that preserves ordering (trees, heaps) Let's asssume that the underlying container is a sorted built-in dynamic array (that has more locality than a tree and allows

For a long time this is the first time dmd2 trunk compiles vibe.d but ....

2014-11-07 Thread Domingo via Digitalmars-d
Hello ! I've been following the dmd2 trunk for months and today it was the first time the it could compile vibe.d library cleanly (with deimos/openssl trunk). But when try to compile an application that uses vibe.d then the compiler gives errors inside vibe.d (lazy template instantiation ?).

Re: For a long time this is the first time dmd2 trunk compiles vibe.d but ....

2014-11-07 Thread Domingo via Digitalmars-d
Also after posting this I tried to make vibe.d with unittest and then dmd2 trunk gives errors that it gave on previous builds. - source/vibe/core/concurrency.d(254): Error: template vibe.core.concurrency.send cannot deduce function from argument types !()(Tid, IsolatedArray!double),

Re: Optimization fun

2014-11-07 Thread H. S. Teoh via Digitalmars-d
On Fri, Nov 07, 2014 at 09:28:56AM +, thedeemon via Digitalmars-d wrote: On Thursday, 6 November 2014 at 23:00:19 UTC, H. S. Teoh via Digitalmars-d wrote: 1) The GC could use some serious improvement: it just so happens that the solver's algorithm only ever needs to allocate memory, never

Re: Optimization fun

2014-11-07 Thread H. S. Teoh via Digitalmars-d
On Fri, Nov 07, 2014 at 08:46:29AM -0500, Steven Schveighoffer via Digitalmars-d wrote: On 11/7/14 8:43 AM, Steven Schveighoffer wrote: On 11/7/14 1:05 AM, H. S. Teoh via Digitalmars-d wrote: A little more investigation revealed the culprit: a queue object implemented with subarrays, and

Re: Optimization fun

2014-11-07 Thread H. S. Teoh via Digitalmars-d
On Fri, Nov 07, 2014 at 09:30:47AM -0800, H. S. Teoh via Digitalmars-d wrote: [...] On another note, I wonder if reducing the frequency of GC collections might help keep memory under control while minimizing the performance hits. As a first stab, I could try to manually trigger a collection

Re: Optimization fun

2014-11-07 Thread H. S. Teoh via Digitalmars-d
On Fri, Nov 07, 2014 at 10:01:41AM -0800, H. S. Teoh via Digitalmars-d wrote: [...] OK, I did a little test where I would disable the GC at the beginning of the program, then trigger a collection every 250,000 iterations. As a rough visual aid, I print a message before and after the collection

Re: DerelictBgfx not shipping core libs.

2014-11-07 Thread olivier henley via Digitalmars-d
On Friday, 7 November 2014 at 05:33:11 UTC, Mike Parker wrote: Because it's beyond the scope of the project. I will not distribute any precompiled C binaries with any Derelict packages. Even if I had copious amounts of free time and a room full of computers running multiple operating systems,

Re: DerelictBgfx not shipping core libs.

2014-11-07 Thread olivier henley via Digitalmars-d
Ponce already added a -Warning- on the DerelictBgfx readme. Super, thx. This way the next guy like me will go build bgfx before attempting to blindly make DerelictBgfx examples run... and get uber-@#!x%#%^.

Re: Optimization fun

2014-11-07 Thread Ary Borenszweig via Digitalmars-d
On 11/6/14, 7:58 PM, H. S. Teoh via Digitalmars-d wrote: So today, I was playing around with profiling and optimizing my sliding block puzzle solver, and found some interesting things: 1) The GC could use some serious improvement: it just so happens that the solver's algorithm only ever needs

Re: Optimization fun

2014-11-07 Thread H. S. Teoh via Digitalmars-d
On Fri, Nov 07, 2014 at 04:06:44PM -0300, Ary Borenszweig via Digitalmars-d wrote: [...] Is the code public? I'd like to port it to other languages and see how they behave, see if this is a general problem or just something specific to D. [...] I haven't posted the code anywhere yet, but I

Re: Optimization fun

2014-11-07 Thread Ary Borenszweig via Digitalmars-d
On 11/7/14, 4:16 PM, H. S. Teoh via Digitalmars-d wrote: On Fri, Nov 07, 2014 at 04:06:44PM -0300, Ary Borenszweig via Digitalmars-d wrote: [...] Is the code public? I'd like to port it to other languages and see how they behave, see if this is a general problem or just something specific to

Re: New reference type designed to handle templates better

2014-11-07 Thread Jonathan Marler via Digitalmars-d
On Wednesday, 5 November 2014 at 19:27:59 UTC, Jonathan Marler wrote: I haven't gotten any responses on this so I'll try one more time. The proposal is to add a new function parameter attribute, called pref for now. Here's the difference: ref : modifies the caller's variable pref: modifies

Re: Keeping a dynamic sorted range

2014-11-07 Thread bearophile via Digitalmars-d
Let's asssume that the underlying container is a sorted built-in dynamic array (that has more locality than a tree and allows very fast binary searches, unlike a heap). An array, a sorted array, is a simple data structure that often wins in terms of memory, simplicity, and efficiency.

Embedding D Shared Library in WSGI Web Server

2014-11-07 Thread John McFarlane via Digitalmars-d
I posted this question a while back in D.learn [http://forum.dlang.org/thread/rbozdetvuepfeftxk...@forum.dlang.org] but figured it might be more appropriate to ask here... I've written a modest shared library in D that I'd like to call directly from a Python web server (Linux/OS X, Apache,

Why is size_t not a typedef

2014-11-07 Thread Freddy via Digitalmars-d
Why is size_t an alias and not a typedef(or a struct that is not implictly convertable) test.d void main(){ ulong a; size_t b=a;//only compiles on 64-bit } $ dmd -m64 test $ dmd -m32 test test.d(3): Error: cannot implicitly convert expression (a) of type ulong to uint

Re: Why is size_t not a typedef

2014-11-07 Thread Jonathan Marler via Digitalmars-d
On Friday, 7 November 2014 at 21:05:52 UTC, Freddy wrote: Why is size_t an alias and not a typedef(or a struct that is not implictly convertable) test.d void main(){ ulong a; size_t b=a;//only compiles on 64-bit } $ dmd -m64 test $ dmd -m32 test test.d(3): Error: cannot

Re: New reference type designed to handle templates better

2014-11-07 Thread via Digitalmars-d
On Friday, 7 November 2014 at 19:42:58 UTC, Jonathan Marler wrote: On Wednesday, 5 November 2014 at 19:27:59 UTC, Jonathan Marler wrote: I haven't gotten any responses on this so I'll try one more time. The proposal is to add a new function parameter attribute, called pref for now. Here's

Re: Embedding D Shared Library in WSGI Web Server

2014-11-07 Thread Laeeth Isharc via Digitalmars-d
since you didn't get an answer. https://code.google.com/p/modwsgi/wiki/ProcessesAndThreading you can turn off threads and processes to aid debugging: https://code.google.com/p/modwsgi/wiki/ProcessesAndThreading StartServers 1 ServerLimit 1 With this configuration, only one process will be

Re: Dub integrated into the compiler?

2014-11-07 Thread Laeeth Isharc via Digitalmars-d
Also it is why I suggested that it could be policed. But the D community is too small for that atm. which means that it is easy to have a concept of relatively trusted vs unknown contributors. of course if someone trusted gets hacked or socially engineered then that is a risk, but on the

Re: Optimization fun

2014-11-07 Thread Dmitry Olshansky via Digitalmars-d
07-Nov-2014 09:05, H. S. Teoh via Digitalmars-d пишет: On Thu, Nov 06, 2014 at 02:58:16PM -0800, H. S. Teoh via Digitalmars-d wrote: [...] 1) The GC could use some serious improvement: it just so happens that the solver's algorithm only ever needs to allocate memory, never release it (it keeps

Re: Keeping a dynamic sorted range

2014-11-07 Thread Ali Çehreli via Digitalmars-d
On 11/07/2014 06:11 AM, bearophile wrote: (This is a partial repost from a recent D.learn thread.) In Phobos we have SortedRange and assumeSorted, but I do find them not very good for a common enough use case. The use case is to keep a sorted array, keep adding items to it (adding larger and

Re: Embedding D Shared Library in WSGI Web Server

2014-11-07 Thread John McFarlane via Digitalmars-d
On Friday, 7 November 2014 at 22:14:41 UTC, Laeeth Isharc wrote: since you didn't get an answer. https://code.google.com/p/modwsgi/wiki/ProcessesAndThreading you can turn off threads and processes to aid debugging: https://code.google.com/p/modwsgi/wiki/ProcessesAndThreading StartServers 1

Re: Keeping a dynamic sorted range

2014-11-07 Thread bearophile via Digitalmars-d
Ali Çehreli: If an array is sorted every time an element is added, Items are most times added at the end, and they respect the sortness of the whole array. The array never gets sorted. On the other hand, array wins if the insertions are batched and Insertions are not batched, and they

Re: Optimization fun

2014-11-07 Thread H. S. Teoh via Digitalmars-d
On Sat, Nov 08, 2014 at 01:58:31AM +0300, Dmitry Olshansky via Digitalmars-d wrote: 07-Nov-2014 09:05, H. S. Teoh via Digitalmars-d пишет: [...] Yet more GC drama unfolded tonight: while testing my new GC-disabling option on several other puzzles, one instance ate up my PC's RAM at an

Interesting take on Rust Go

2014-11-07 Thread Walter Bright via Digitalmars-d
https://news.ycombinator.com/item?id=8574184

Re: Optimization fun

2014-11-07 Thread Walter Bright via Digitalmars-d
On 11/7/2014 2:58 PM, Dmitry Olshansky wrote: That's the problem with profilers: they say what takes time but not why :) Often I find myself looking at memcpy at the top of the list, so obvious the textbook answer is to optimize memcpy ;) In contrast it should be read as you seem to do

Re: Optimization fun

2014-11-07 Thread H. S. Teoh via Digitalmars-d
On Fri, Nov 07, 2014 at 04:22:49PM -0800, Walter Bright via Digitalmars-d wrote: On 11/7/2014 2:58 PM, Dmitry Olshansky wrote: That's the problem with profilers: they say what takes time but not why :) Often I find myself looking at memcpy at the top of the list, so obvious the

Re: Optimization fun

2014-11-07 Thread H. S. Teoh via Digitalmars-d
On Fri, Nov 07, 2014 at 04:41:27PM -0800, H. S. Teoh via Digitalmars-d wrote: [...] gprof also shows that in the section section of its output. [...] ^^^ Argh, I mean *second* section (which, incidentally, corresponds with the first section of trace.log in the

Re: BNF grammar for D?

2014-11-07 Thread Rikki Cattermole via Digitalmars-d
On 8/11/2014 4:16 a.m., Bruno Medeiros wrote: On 31/10/2014 12:16, Rikki Cattermole wrote: On 1/11/2014 12:35 a.m., Bruno Medeiros wrote: On 27/10/2014 22:35, Jeremy Powers via Digitalmars-d wrote: An interesting path to take for an intellij plugin would be to use his DCD/libdparse for all

Re: Interesting take on Rust Go

2014-11-07 Thread Sean Kelly via Digitalmars-d
On Saturday, 8 November 2014 at 00:21:52 UTC, Walter Bright wrote: https://news.ycombinator.com/item?id=8574184 It's a good succinct writeup. Rust sounds pretty cool, if still quite immature. The comments in Hacker News are enlightening as well.

Re: Optimization fun

2014-11-07 Thread Walter Bright via Digitalmars-d
On 11/7/2014 4:41 PM, H. S. Teoh via Digitalmars-d wrote: On Fri, Nov 07, 2014 at 04:22:49PM -0800, Walter Bright via Digitalmars-d wrote: On 11/7/2014 2:58 PM, Dmitry Olshansky wrote: That's the problem with profilers: they say what takes time but not why :) Often I find myself looking

Re: toString refactor in druntime

2014-11-07 Thread Manu via Digitalmars-d
On 3 November 2014 19:55, Walter Bright via Digitalmars-d digitalmars-d@puremagic.com wrote: On 11/2/2014 11:45 PM, Manu via Digitalmars-d wrote: On 2 November 2014 04:15, Walter Bright via Digitalmars-d digitalmars-d@puremagic.com wrote: Why would templates make you nervous? They're not C++

Re: Optimization fun

2014-11-07 Thread H. S. Teoh via Digitalmars-d
On Fri, Nov 07, 2014 at 05:31:44PM -0800, Walter Bright via Digitalmars-d wrote: On 11/7/2014 4:41 PM, H. S. Teoh via Digitalmars-d wrote: [...] But speaking of which, I found dmd -profile's output in trace.log a little difficult to understand because of the lack of self-documenting headers in

Re: Optimization fun

2014-11-07 Thread Walter Bright via Digitalmars-d
On 11/7/2014 5:51 PM, H. S. Teoh via Digitalmars-d wrote: I'm surprised that dmd's profiler can't even handle something that only runs for 7-8 seconds or so! It's based on a design I wrote decades ago, when machines were a lot slower. Is it relatively simple to make dmd -profile use larger

Re: Optimization fun

2014-11-07 Thread Kiith-Sa via Digitalmars-d
On Saturday, 8 November 2014 at 01:53:33 UTC, H. S. Teoh via Digitalmars-d wrote: On Fri, Nov 07, 2014 at 05:31:44PM -0800, Walter Bright via Digitalmars-d wrote: On 11/7/2014 4:41 PM, H. S. Teoh via Digitalmars-d wrote: [...] But speaking of which, I found dmd -profile's output in trace.log

Interesting stuff in pastebin

2014-11-07 Thread Israel via Digitalmars-d
Recently i started thinking, how popular is a language based on how often a paste is made in that language? so i decided to look through pastebin in D and found some interesting stuff. This one in particular. http://pastebin.com/dq4Bp9x0. What is this...

Re: toString refactor in druntime

2014-11-07 Thread Walter Bright via Digitalmars-d
On 11/7/2014 5:41 PM, Manu via Digitalmars-d wrote: On 3 November 2014 19:55, Walter Bright via Digitalmars-d This isn't anything to do with what I'm talking about. I'm not nervous because I don't like the D template syntax, it's because I don't feel it's a good idea for druntime (specifically)

Re: Interesting stuff in pastebin

2014-11-07 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 8 November 2014 at 02:42:34 UTC, Israel wrote: This one in particular. http://pastebin.com/dq4Bp9x0. What is this... It is just a function that is already compiled and added as a string literal. It calls the system function exec(/bin/bash); to spawn a shell over the current

Re: Interesting stuff in pastebin

2014-11-07 Thread Israel via Digitalmars-d
On Saturday, 8 November 2014 at 03:06:01 UTC, Adam D. Ruppe wrote: On Saturday, 8 November 2014 at 02:42:34 UTC, Israel wrote: This one in particular. http://pastebin.com/dq4Bp9x0. What is this... It is called shellcode because it is code to launch a shell and is done as a string because a

D embeddable on-line compiler

2014-11-07 Thread Ramon via Digitalmars-d
In the http://dlang.org/ start page, there is a textarea with D code and options to compile/edit/rude the code. I want to have one of this in my website. So is there an online service with an API to embbed a D syntax editor/compiler in my site? (aka iframe)

Re: DerelictBgfx not shipping core libs.

2014-11-07 Thread Mike Parker via Digitalmars-d
On Friday, 7 November 2014 at 18:46:50 UTC, olivier henley wrote: Nevertheless I feel we should be told upfront about the implications of using your package in the context that you can't and won't deliver dependencies like others do. By upfront I mean in an explicit way, limit as a warning.

Re: Keeping a dynamic sorted range

2014-11-07 Thread Jakob Ovrum via Digitalmars-d
On Friday, 7 November 2014 at 14:11:32 UTC, bearophile wrote: (This is a partial repost from a recent D.learn thread.) In Phobos we have SortedRange and assumeSorted, but I do find them not very good for a common enough use case. The use case is to keep a sorted array, keep adding items to

Re: DerelictBgfx not shipping core libs.

2014-11-07 Thread Mike Parker via Digitalmars-d
On Friday, 7 November 2014 at 14:33:09 UTC, Laeeth Isharc wrote: What I should so is volunteer to help, but at this moment I simply don't have the capacity (on the resource front I hope that may change in time). I would very much like to, though. Gathering together multiple binaries for

Re: transversal sum

2014-11-07 Thread via Digitalmars-d-learn
On Thursday, 6 November 2014 at 22:40:58 UTC, John Colvin wrote: this should be a textbook case for std.range.transposed, but I can't seem to get it to work. Ah, I didn't know this existed. Apparently it's not yet released, that's why it's not in the official documentation. With DMD and

Re: Intended behavior or bug (private vs public static)

2014-11-07 Thread Andre via Digitalmars-d-learn
Thanks a lot. I will create a bug report. Kind regards André On Friday, 7 November 2014 at 06:09:02 UTC, Jonathan M Davis via Digitalmars-d-learn wrote: That looks like a bug. All you have to do is change the order of the two function declarations or rename the non-static one to something

Re: transversal sum

2014-11-07 Thread bearophile via Digitalmars-d-learn
Marc Schütz: auto sums = input .transposed .map!(a = a.sum); And that part is better written: .map!sum; I also suggest to align the leading dot to the precedent line: auto sums = input .transposed

Re: Audio file read/write?

2014-11-07 Thread ponce via Digitalmars-d-learn
COn Friday, 7 November 2014 at 02:58:15 UTC, Daren Scot Wilson wrote: What's the current recommended way to read and write audio files? I don't need to play it on the speakers or deal with anything real time - just read a file's data into an array, fiddle with it, and write it out to a file.

Re: transversal sum

2014-11-07 Thread John Colvin via Digitalmars-d-learn
On Friday, 7 November 2014 at 10:58:58 UTC, Marc Schütz wrote: On Thursday, 6 November 2014 at 22:40:58 UTC, John Colvin wrote: this should be a textbook case for std.range.transposed, but I can't seem to get it to work. Ah, I didn't know this existed. Apparently it's not yet released,

Re: Access Violation Tracking

2014-11-07 Thread Nordlöw
On Friday, 7 November 2014 at 03:22:59 UTC, ketmar via Digitalmars-d-learn wrote: crash+coredump is alot more useful than intercepting error and... trying to recover from undefined state? or just exit to OS, losing valuable information about a crash? Together with the DUB package backtrace

Re: Access Violation Tracking

2014-11-07 Thread ketmar via Digitalmars-d-learn
On Fri, 07 Nov 2014 08:49:34 -0500 Steven Schveighoffer via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On 11/6/14 11:43 PM, ketmar via Digitalmars-d-learn wrote: On Thu, 06 Nov 2014 22:45:23 -0500 Steven Schveighoffer via Digitalmars-d-learn

Re: Access Violation Tracking

2014-11-07 Thread ketmar via Digitalmars-d-learn
On Fri, 07 Nov 2014 13:52:33 + Nordlöw via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Friday, 7 November 2014 at 03:22:59 UTC, ketmar via Digitalmars-d-learn wrote: crash+coredump is alot more useful than intercepting error and... trying to recover from

std.array.array and immutable elements

2014-11-07 Thread Jack Applegame via Digitalmars-d-learn
DMD64 D Compiler v2.066.1 Why second call doesn't compile? import std.array; import std.algorithm; class Foo { bool flag; } void main() { immutable(Foo)[] foos; foreach(i; 0..5) foos ~= new Foo; // compiles, typeof(bar1) == immutable(Foo)[] auto bar1 =

Re: std.array.array and immutable elements

2014-11-07 Thread ketmar via Digitalmars-d-learn
On Fri, 07 Nov 2014 14:32:57 + Jack Applegame via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: ah, sorry, my bad, 'const' will not work to, for the same reason. signature.asc Description: PGP signature

Re: std.array.array and immutable elements

2014-11-07 Thread ketmar via Digitalmars-d-learn
On Fri, 07 Nov 2014 14:32:57 + Jack Applegame via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: import std.array; import std.algorithm; class Foo { bool flag; } void main() { immutable(Foo)[] foos; foreach(i; 0..5) foos ~= new Foo; // compiles,

Re: std.array.array and immutable elements

2014-11-07 Thread anonymous via Digitalmars-d-learn
On Friday, 7 November 2014 at 14:57:56 UTC, ketmar via Digitalmars-d-learn wrote: `map` cannot return range with immutable elements, 'cause they are obviously generated by program, and therefore aren't immutable. That's not true. Runtime generated values can be immutable just fine. And it's

Re: std.array.array and immutable elements

2014-11-07 Thread ketmar via Digitalmars-d-learn
On Fri, 07 Nov 2014 15:18:24 + anonymous via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Friday, 7 November 2014 at 14:57:56 UTC, ketmar via Digitalmars-d-learn wrote: `map` cannot return range with immutable elements, 'cause they are obviously generated by

Re: std.array.array and immutable elements

2014-11-07 Thread John Colvin via Digitalmars-d-learn
On Friday, 7 November 2014 at 14:33:00 UTC, Jack Applegame wrote: DMD64 D Compiler v2.066.1 Why second call doesn't compile? import std.array; import std.algorithm; class Foo { bool flag; } void main() { immutable(Foo)[] foos; foreach(i; 0..5) foos ~= new Foo; //

D1: Error: function ... cannot have an in contract when overriden function

2014-11-07 Thread jicman via Digitalmars-d-learn
Greetings! I am trying to compile dfl with the latest version of D1. I am stuck in this error: c:\D\import\dfl\button.d(381): Error: function dfl.button.Button.text cannot have e an in contract when overriden function dfl.control.Control.text does not have an in contract This is the

Re: D1: Error: function ... cannot have an in contract when overriden function

2014-11-07 Thread Adam D. Ruppe via Digitalmars-d-learn
If it is just that one error, you could always just comment out the in contract and recompile.

Re: Access Violation Tracking

2014-11-07 Thread Nikolay via Digitalmars-d-learn
i also developed a habit of writing assert()s before dereferencing pointers first time (including class refs) in appropriate places, so i'll got that stack trace for free. ;-) and i never turning off that asserts in release builds. About null pointer deref core dump I think, it is

Re: Access Violation Tracking

2014-11-07 Thread ketmar via Digitalmars-d-learn
On Fri, 07 Nov 2014 13:52:33 + Nordlöw via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Friday, 7 November 2014 at 03:22:59 UTC, ketmar via Digitalmars-d-learn wrote: crash+coredump is alot more useful than intercepting error and... trying to recover from

Re: Access Violation Tracking

2014-11-07 Thread ketmar via Digitalmars-d-learn
On Sat, 08 Nov 2014 06:23:39 + Nikolay via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I think, it is problem. Dland on windows gives stacktrace without any problem. In general it is expected behavior for many people from different languages (Java, C#). So from my point

Re: Access Violation Tracking

2014-11-07 Thread H. S. Teoh via Digitalmars-d-learn
On Sat, Nov 08, 2014 at 08:50:20AM +0200, ketmar via Digitalmars-d-learn wrote: On Fri, 07 Nov 2014 13:52:33 + Nordlöw via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Friday, 7 November 2014 at 03:22:59 UTC, ketmar via Digitalmars-d-learn wrote: crash+coredump

Re: Access Violation Tracking

2014-11-07 Thread ketmar via Digitalmars-d-learn
On Fri, 7 Nov 2014 22:58:38 -0800 H. S. Teoh via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Some time ago deadalnix gave a neat (if scary) hack where the signal handler overwrites its return address on the stack to redirect the code to a handler that operates outside signal

[Issue 13696] Missing entry for unicode code point literals on the lexer page

2014-11-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13696 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Keywords||spec

[Issue 13696] New: Missing entry for unicode code point literals on the lexer page

2014-11-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13696 Issue ID: 13696 Summary: Missing entry for unicode code point literals on the lexer page Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 9623] Illegal Win64 linker optimization?

2014-11-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9623 Rainer Schuetze r.sagita...@gmx.de changed: What|Removed |Added CC||r.sagita...@gmx.de ---

[Issue 12723] Support compiling C/C++ files in D projects

2014-11-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12723 --- Comment #4 from Rainer Schuetze r.sagita...@gmx.de --- I added basic C/C++ support in https://github.com/D-Programming-Language/visuald/releases/tag/v0.3.40-beta2 --

[Issue 13697] New: Private method hides public static method

2014-11-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13697 Issue ID: 13697 Summary: Private method hides public static method Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: normal

[Issue 13686] Reading unicode string with readf (%s) produces a wrong string

2014-11-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13686 --- Comment #5 from ag0ae...@gmail.com --- https://github.com/D-Programming-Language/phobos/pull/2663 --

[Issue 12320] std.stdio.LockingTextReader populates .front in .empty

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

[Issue 13698] New: ICE(e2ir.c) on on simd call

2014-11-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13698 Issue ID: 13698 Summary: ICE(e2ir.c) on on simd call Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: normal Priority: P1

[Issue 13698] ICE(e2ir.c) on on simd call

2014-11-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13698 Simen Kjaeraas simen.kja...@gmail.com changed: What|Removed |Added Keywords||ice, SIMD --

[Issue 13253] use more scoped imports in phobos

2014-11-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13253 --- Comment #2 from Martin Nowak c...@dawg.eu --- https://github.com/D-Programming-Language/phobos/pull/2658 --

[Issue 8887] static arrays passed by value in extern C/C++ functions should not compile

2014-11-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8887 Dicebot pub...@dicebot.lv changed: What|Removed |Added Keywords||industry Priority|P2

[Issue 8887] static arrays passed by value in extern C/C++ functions should not compile

2014-11-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8887 Steven Schveighoffer schvei...@yahoo.com changed: What|Removed |Added CC||schvei...@yahoo.com

  1   2   >