Re: core.sys.posix.sys.ioctl

2016-01-27 Thread tsbockman via Digitalmars-d-learn
On Thursday, 28 January 2016 at 06:15:54 UTC, sanjayss wrote: So I got round to doing this -- https://github.com/D-Programming-Language/druntime/pull/1485 -- it's not clear what happens now -- is there a set of people that reviews pull requests and comment on it or is it open to all? Since y

Digger 2.4 & DMD 2.070.0

2016-01-27 Thread Robert M. Münch via Digitalmars-d-learn
Just compiled the latest release with digger. Everything works without any problems, but the resulting binary shows the following version: mac-pro:Digger robby$ ./result/bin/dmd --version DMD64 D Compiler v2.069-devel-682687b Copyright (c) 1999-2015 by Digital Mars written by Walter Bright I us

Re: core.sys.posix.sys.ioctl

2016-01-27 Thread sanjayss via Digitalmars-d-learn
On Friday, 15 January 2016 at 21:49:38 UTC, Adam D. Ruppe wrote: On Friday, 15 January 2016 at 21:21:26 UTC, sanjayss wrote: Is the contribution process straightforward. For this, yes. Should be able to just fork druntime and edit the ioctl.d that exists to flesh it out to be more complete.

Re: How should I do object serialization?

2016-01-27 Thread Saurabh Das via Digitalmars-d-learn
On Thursday, 28 January 2016 at 04:27:31 UTC, Enjoys Math wrote: I'm not looking for anything advanced, just serialization of some of my own types (classes & structs). I've seen: http://wiki.dlang.org/Review/std.serialization However, I don't see std.serialization in my dmd source tree: v2.070

How should I do object serialization?

2016-01-27 Thread Enjoys Math via Digitalmars-d-learn
I'm not looking for anything advanced, just serialization of some of my own types (classes & structs). I've seen: http://wiki.dlang.org/Review/std.serialization However, I don't see std.serialization in my dmd source tree: v2.070.0-b2 So where is the /official/ home for D object serialization?

Can D interface with Free Pascal?

2016-01-27 Thread Taylor Hillegeist via Digitalmars-d-learn
Just curious... I had a thought that perhaps since Objective C was a replacement for Pascal on the mac. that they might have the same interface. but I'm not savvy enough with fpc to figure out how to try it.

Re: Getting the body of a HTTP Request

2016-01-27 Thread Chris Wright via Digitalmars-d-learn
On Thu, 28 Jan 2016 00:16:12 +, brian wrote: > On Wednesday, 27 January 2016 at 23:50:34 UTC, Chris Wright wrote: >> On Wed, 27 Jan 2016 23:42:54 +, brian wrote: >>> Body: vibe.stream.counting.EndCallbackInputStream Body to String: Body >>> to String: HTTP/1.1 302 Found >> >> You got an HT

Re: Getting the body of a HTTP Request

2016-01-27 Thread brian via Digitalmars-d-learn
On Wednesday, 27 January 2016 at 23:50:34 UTC, Chris Wright wrote: On Wed, 27 Jan 2016 23:42:54 +, brian wrote: Body: vibe.stream.counting.EndCallbackInputStream Body to String: Body to String: HTTP/1.1 302 Found You got an HTTP redirect as a response. There should be a header called Loca

Re: Getting the body of a HTTP Request

2016-01-27 Thread Chris Wright via Digitalmars-d-learn
On Wed, 27 Jan 2016 23:42:54 +, brian wrote: > Body: vibe.stream.counting.EndCallbackInputStream Body to String: > Body to String: HTTP/1.1 302 Found You got an HTTP redirect as a response. There should be a header called Location containing a URL. Redo the request with that URL. Most HTTP l

Getting the body of a HTTP Request

2016-01-27 Thread brian via Digitalmars-d-learn
Hello forumites I am using vibe to connect to an (internal) API however, an am expecting to get back an authorization token with the body of a HTTP POST response. /* start code snippet */ shared static this() { requestHTTP("http://mywebsite.website.com/thelogonthing/oauth/authori

Re: free causes exception

2016-01-27 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/27/16 5:35 PM, Igor wrote: On Wednesday, 27 January 2016 at 14:31:20 UTC, Steven Schveighoffer wrote: All D destructors should destroy all the members. And generally speaking, if you ever plan to use a class with the GC, you should only destroy non-GC members. The GC members may already b

Re: free causes exception

2016-01-27 Thread Igor via Digitalmars-d-learn
On Wednesday, 27 January 2016 at 14:31:20 UTC, Steven Schveighoffer wrote: On 1/26/16 4:23 PM, Igor wrote: On Tuesday, 26 January 2016 at 20:17:20 UTC, Steven Schveighoffer wrote: [...] um? Memory manager? I am doing it manually C++ style so I don't have to worry about the god forsaken memor

Re: how to allocate class without gc?

2016-01-27 Thread Igor via Digitalmars-d-learn
On Wednesday, 27 January 2016 at 06:40:00 UTC, Basile B. wrote: On Tuesday, 26 January 2016 at 01:09:50 UTC, Igor wrote: Is there any examples that shows how to properly allocate an object of a class type with the new allocators and then release it when desired? This is more or less the same

Re: std.algorithm.startsWith only predicate

2016-01-27 Thread Nordlöw via Digitalmars-d-learn
On Monday, 19 October 2015 at 19:20:15 UTC, Nordlöw wrote: https://github.com/D-Programming-Language/phobos/pull/3752 Is merged now!

Re: Speed of csvReader

2016-01-27 Thread jmh530 via Digitalmars-d-learn
On Tuesday, 26 January 2016 at 22:36:31 UTC, H. S. Teoh wrote: Yeah, in the course of this exercise, I found that the one thing that has had the biggest impact on performance is the amount of allocations involved. [...snip] Really interesting discussion.

Re: free causes exception

2016-01-27 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/26/16 4:23 PM, Igor wrote: On Tuesday, 26 January 2016 at 20:17:20 UTC, Steven Schveighoffer wrote: On 1/26/16 9:20 AM, Igor wrote: I have successfully malloc'ed an object but when I go to free it in the destructor I get an exception. The destructor simply has ~this() // destructor for Fo

Re: free causes exception

2016-01-27 Thread Kagamin via Digitalmars-d-learn
On Tuesday, 26 January 2016 at 21:21:29 UTC, Igor wrote: That shouldn't be the case. I allocate in a static method called New once. I then deallocate in the destructor. Basically just as one would do in C++. You can't deallocate in destructor in C++, because an object can be embedded in anoth

Re: Speed of csvReader

2016-01-27 Thread Gerald Jansen via Digitalmars-d-learn
On Tuesday, 26 January 2016 at 22:36:31 UTC, H. S. Teoh wrote: ... So the moral of the story is: avoid large numbers of small allocations. If you have to do it, consider consolidating your allocations into a series of allocations of large(ish) buffers instead, and taking slices of the buffers.