Re: Crash on Windows with core.stdc.stdlib.free()

2014-11-14 Thread Chris via Digitalmars-d-learn
On Thursday, 13 November 2014 at 10:17:35 UTC, ketmar via Digitalmars-d-learn wrote: On Thu, 13 Nov 2014 10:08:47 + Chris via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Interesting though that it never crashes on Linux, only on Windows did this cause problems. seems

How to use Linux message queues?

2014-11-14 Thread Neven via Digitalmars-d-learn
I've tried importing core.sys.posix.sys.msg however I get the error that is doesn't exist. I sort of solved the problem with: extern (C) int msgget ( key_t key, int msgflg ); extern (C) int msgsnd ( int msqid, msgbuf *msgp, int msgsz, int msgflg ); struct msgbuf { long mtype; /*

Re: How to use Linux message queues?

2014-11-14 Thread Sean Kelly via Digitalmars-d-learn
Sounds like a module that should be in core.sys.linux. Care to submit a pull request?

Re: How to use Linux message queues?

2014-11-14 Thread Gary Willoughby via Digitalmars-d-learn
On Friday, 14 November 2014 at 16:45:45 UTC, Sean Kelly wrote: Sounds like a module that should be in core.sys.linux. Care to submit a pull request? Yes, these are usually added when someone requires them. Neven, if you're able, submitting a pull request to druntime of the complete module

undefined reference to class template

2014-11-14 Thread Satoshi via Digitalmars-d-learn
Hi, Im using GDC 4.9.0 compiler. I have template classes like public class LinkedList(T) {...} and when I try compile it together, everything works fine. But when I compile every source file to separate object file and link it together with ld Ill get errors like:

Functional Sort

2014-11-14 Thread Nordlöw
Is there a functional variant of std.algorithm.sort, say sorted, that returns a sorted copy of its input use typically as const y = x.sorted; ? If not any recommendations on its implementation?

Re: How to use Linux message queues?

2014-11-14 Thread Neven via Digitalmars-d-learn
On Friday, 14 November 2014 at 16:45:45 UTC, Sean Kelly wrote: Sounds like a module that should be in core.sys.linux. Care to submit a pull request? Ok, I've tried to make a module, though since I'm a D beginner (also a student who fiddles with D for Operating system classes) could you

Re: Functional Sort

2014-11-14 Thread Nordlöw
On Saturday, 15 November 2014 at 00:45:11 UTC, Meta wrote: `sort` returns a SortedRange, so sort is the function you're looking for. Do you mean std.algorithm.sort? I want a sort that doesn't mutate its input argument.

Re: Functional Sort

2014-11-14 Thread Meta via Digitalmars-d-learn
On Saturday, 15 November 2014 at 00:33:11 UTC, Nordlöw wrote: Is there a functional variant of std.algorithm.sort, say sorted, that returns a sorted copy of its input use typically as const y = x.sorted; ? If not any recommendations on its implementation? `sort` returns a SortedRange,

Re: Functional Sort

2014-11-14 Thread Meta via Digitalmars-d-learn
On Saturday, 15 November 2014 at 00:45:11 UTC, Meta wrote: On Saturday, 15 November 2014 at 00:33:11 UTC, Nordlöw wrote: Is there a functional variant of std.algorithm.sort, say sorted, that returns a sorted copy of its input use typically as const y = x.sorted; ? If not any

Re: Functional Sort

2014-11-14 Thread Meta via Digitalmars-d-learn
On Saturday, 15 November 2014 at 00:47:41 UTC, Nordlöw wrote: On Saturday, 15 November 2014 at 00:45:11 UTC, Meta wrote: `sort` returns a SortedRange, so sort is the function you're looking for. Do you mean std.algorithm.sort? I want a sort that doesn't mutate its input argument. In that

Re: Functional Sort

2014-11-14 Thread Nordlöw
On Saturday, 15 November 2014 at 00:47:57 UTC, Meta wrote: `sort` returns a SortedRange, so sort is the function you're looking for. Sorry, and if you want a copy, just add a `.array` on the end to create a new array from the returned range. Great! Should I use std.algorithm.array or

Re: Functional Sort

2014-11-14 Thread Meta via Digitalmars-d-learn
On Saturday, 15 November 2014 at 01:01:57 UTC, Nordlöw wrote: On Saturday, 15 November 2014 at 00:47:57 UTC, Meta wrote: `sort` returns a SortedRange, so sort is the function you're looking for. Sorry, and if you want a copy, just add a `.array` on the end to create a new array from the

Re: Functional Sort

2014-11-14 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/14/14 7:47 PM, Meta wrote: On Saturday, 15 November 2014 at 00:45:11 UTC, Meta wrote: On Saturday, 15 November 2014 at 00:33:11 UTC, Nordlöw wrote: Is there a functional variant of std.algorithm.sort, say sorted, that returns a sorted copy of its input use typically as const y =