Re: DerelictCocoa

2015-08-14 Thread ponce via Digitalmars-d-announce
On Thursday, 30 July 2015 at 18:21:00 UTC, Jacob Carlborg wrote: I had a quick look at the implementation. You're not using the objc_msgSend_* family of functions correctly. That's one of the main reasons why extern(Objective-C) was implemented. I strongly recommend you adapting

Re: std.data.json formal review

2015-08-14 Thread Andrei Alexandrescu via Digitalmars-d
On 8/12/15 5:43 AM, Sönke Ludwig wrote: Anyway, I've just started to work on a generic variant of an enum based algebraic type that exploits as much static type information as possible. If that works out (compiler bugs?), it would be a great thing to have in Phobos, so maybe it's worth to delay

Re: std.data.json formal review

2015-08-14 Thread Matthias Bentrup via Digitalmars-d
On Friday, 14 August 2015 at 09:20:14 UTC, Ola Fosheim Grøstad wrote: On Friday, 14 August 2015 at 08:03:34 UTC, Walter Bright wrote: 1. 'real' has enough precision to hold 64 bit integers. Except for the lowest negative value… (it has only 63 bits + floating point sign bit) actually the

Re: new release doesn't work as advertised

2015-08-14 Thread QAston via Digitalmars-d
On Thursday, 13 August 2015 at 17:44:11 UTC, learn wrote: On Thursday, 13 August 2015 at 16:44:09 UTC, David Nadlinger wrote: On Thursday, 13 August 2015 at 16:30:59 UTC, learn wrote: On Thursday, 13 August 2015 at 11:04:21 UTC, Rikki Cattermole wrote: It was posted there. It's a known issue.

Re: SList container problem

2015-08-14 Thread ted via Digitalmars-d-learn
thanks for the reply... the method you described is suitable for appending to an array, but I'm using the singly-linked-list container. I've extended the test, and I'm pretty sure it's a bug... --ted Nicholas Wilson wrote: On Thursday, 13 August 2015 at 08:40:13 UTC, ted wrote: have

Bug in std.container: SList

2015-08-14 Thread ted via Digitalmars-d
Hi, (earlier posting on D.learn, but better test included here)... dmd.2.067, dmd.2068 (64bit linux) import std.container: SList; void main() { SList!int tmp=( 4 ); SList!int tmp1; // Ensure tmp is empty tmp.removeAny(); assert( tmp.empty == true ); // Both tmp and

Re: The object operator

2015-08-14 Thread BBasile via Digitalmars-d
On Friday, 14 August 2015 at 04:17:25 UTC, TheHamster wrote: For class types, a special operator is defined to return the class object for method calls rather than the return value from the call itself. The use of the operator places the return types in special variables to be accessed easily.

Associative array literal. Why doesn't it compile?

2015-08-14 Thread Adel Mamin via Digitalmars-d-learn
Compiler dmd_2.068.0-0_amd64.deb on Ubuntu 12.04 Linux: auto lookup = [ one:1, two:2 ]; The dmd error: Error: non-constant expression [one:1, two:2] Why doesn't it compile? As a workaround I could do the assignment one element at a time in a loop. It would be uglier though.

Re: std.data.json formal review

2015-08-14 Thread Sönke Ludwig via Digitalmars-d
Am 14.08.2015 um 02:26 schrieb Walter Bright: On 8/13/2015 3:51 AM, Sönke Ludwig wrote: These were, AFAICS, the only major open issues (a decision for an opt() variant would be nice, but fortunately that's not a fundamental decision in any way). 1. What about the issue of having the API be a

Re: std.data.json formal review

2015-08-14 Thread Dmitry Olshansky via Digitalmars-d
On 14-Aug-2015 03:48, Walter Bright wrote: On 8/13/2015 5:18 PM, Adam D. Ruppe wrote: On Thursday, 13 August 2015 at 03:44:14 UTC, Walter Bright wrote: Hah, I'd like to replace dmd.conf with a .json file. There's an awful lot of people out there replacing json with more ini-like files

[Issue 14919] utf/unicode should only be validated once

2015-08-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14919 Martin Nowak c...@dawg.eu changed: What|Removed |Added Summary|utf error |utf/unicode should only be

[Issue 14919] New: utf error

2015-08-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14919 Issue ID: 14919 Summary: utf error Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1

Re: I'm confused about ranges (input and forward in practice, in algorithms)

2015-08-14 Thread Gary Willoughby via Digitalmars-d
On Friday, 14 August 2015 at 00:33:30 UTC, Luís Marques wrote: Despite using them all the time, I'm suddenly confused about ranges... My understanding is that (for library-worth code) algorithms that consume ranges are supposed to use .save() to be compatible with both ref type and value

Re: new release doesn't work as advertised

2015-08-14 Thread QAston via Digitalmars-d
On Friday, 14 August 2015 at 06:28:54 UTC, QAston wrote: Just the redistributable package should be enough. It's a normal practice to install it because vc libs are incompatible. I have all of the redistributables installed atm, no problems.

Re: Associative array literal. Why doesn't it compile?

2015-08-14 Thread Ali Çehreli via Digitalmars-d-learn
On 08/13/2015 11:48 PM, Adel Mamin wrote: Compiler dmd_2.068.0-0_amd64.deb on Ubuntu 12.04 Linux: auto lookup = [ one:1, two:2 ]; The dmd error: Error: non-constant expression [one:1, two:2] I think the problem is when the variable is defined at module scope. It works inside functions, etc.

Re: std.data.json formal review

2015-08-14 Thread via Digitalmars-d
On Friday, 14 August 2015 at 07:14:34 UTC, Sönke Ludwig wrote: Am 14.08.2015 um 07:11 schrieb Walter Bright: Make the type for storing a Number be a template parameter. Then we'd lose the ability to distinguish between integers and floating point in the same lexer instantiation, which is

Re: The object operator

2015-08-14 Thread puming via Digitalmars-d
On Friday, 14 August 2015 at 04:17:25 UTC, TheHamster wrote: assert(@@myObj.Do(3).Do(@).Do(@2) == 9); If what you want is to omit the object during the call chain, you can use with statement to mimic this feature, though not as compact as you suggested: ``` import std.stdio; class

[Issue 14919] utf/unicode should only be validated once

2015-08-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14919 Martin Nowak c...@dawg.eu changed: What|Removed |Added Hardware|x86_64 |All OS|Linux

Re: Associative array literal. Why doesn't it compile?

2015-08-14 Thread BBasile via Digitalmars-d-learn
On Friday, 14 August 2015 at 06:48:27 UTC, Adel Mamin wrote: Compiler dmd_2.068.0-0_amd64.deb on Ubuntu 12.04 Linux: auto lookup = [ one:1, two:2 ]; The dmd error: Error: non-constant expression [one:1, two:2] Why doesn't it compile? As a workaround I could do the assignment one element at a

Re: std.data.json formal review

2015-08-14 Thread Sönke Ludwig via Digitalmars-d
Am 14.08.2015 um 07:11 schrieb Walter Bright: On 8/12/2015 12:44 AM, Sönke Ludwig wrote: That's where Decimal would come in. There is some code for that commented out, but I really didn't want to add it without a standard Phobos implementation. But I wouldn't say that this is really an argument

Re: std.data.json formal review

2015-08-14 Thread via Digitalmars-d
On Friday, 14 August 2015 at 13:10:53 UTC, Steven Schveighoffer wrote: On 8/14/15 8:51 AM, Andrei Alexandrescu wrote: On 8/13/15 8:16 PM, Walter Bright wrote: On 8/13/2015 5:22 AM, CraigDillabaugh wrote: No configuration file should be in a format that doesn't support comments. [ comment :

[Issue 14912] Move initialisation of GC'd struct and class data from the callee to the caller

2015-08-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14912 --- Comment #8 from Steven Schveighoffer schvei...@yahoo.com --- (In reply to Iain Buclaw from comment #7) That's fine for anything except classes... Sure, but with compiler visibility, and ability to inline (and ability to alter the implementation

Re: More threads - Slower program ??

2015-08-14 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 12 August 2015 at 23:23:03 UTC, Yuxuan Shui wrote: Is there a way to do thread-local allocations? Yes, either manually or just putting things on the stack, but the std.string functions you use doesn't try to do them. You might try replacing format() with formattedWrite(),

Re: I'm confused about ranges (input and forward in practice, in algorithms)

2015-08-14 Thread anonymous via Digitalmars-d
On Friday, 14 August 2015 at 00:33:30 UTC, Luís Marques wrote: Despite using them all the time, I'm suddenly confused about ranges... My understanding is that (for library-worth code) algorithms that consume ranges are supposed to use .save() to be compatible with both ref type and value

Re: Associative array literal. Why doesn't it compile?

2015-08-14 Thread anonymous via Digitalmars-d-learn
On Friday, 14 August 2015 at 07:04:53 UTC, BBasile wrote: It's because of the key type (string is a library type). This is not true. It's not because of the key type. And string is not a library type.

Re: iterating through a range, operating on last few elements at a time

2015-08-14 Thread Timon Gehr via Digitalmars-d-learn
On 08/14/2015 05:12 AM, H. S. Teoh via Digitalmars-d-learn wrote: On Fri, Aug 14, 2015 at 02:42:26AM +, Laeeth Isharc via Digitalmars-d-learn wrote: I have a range that is an array of structs. I would like to iterate through the range, calling a function with the prior k items in the

Re: std.data.json formal review

2015-08-14 Thread Andrei Alexandrescu via Digitalmars-d
On 8/14/15 9:10 AM, Steven Schveighoffer wrote: On 8/14/15 8:51 AM, Andrei Alexandrescu wrote: On 8/13/15 8:16 PM, Walter Bright wrote: On 8/13/2015 5:22 AM, CraigDillabaugh wrote: No configuration file should be in a format that doesn't support comments. [ comment : and you thought it

Re: std.data.json formal review

2015-08-14 Thread via Digitalmars-d
On Friday, 14 August 2015 at 13:30:44 UTC, Andrei Alexandrescu wrote: On 8/14/15 9:10 AM, Steven Schveighoffer wrote: On 8/14/15 8:51 AM, Andrei Alexandrescu wrote: On 8/13/15 8:16 PM, Walter Bright wrote: On 8/13/2015 5:22 AM, CraigDillabaugh wrote: No configuration file should be in a

Re: std.data.json formal review

2015-08-14 Thread Dmitry Olshansky via Digitalmars-d
On 14-Aug-2015 11:04, Walter Bright wrote: On 8/13/2015 11:54 PM, Dmitry Olshansky wrote: On 14-Aug-2015 03:48, Walter Bright wrote: On 8/13/2015 5:18 PM, Adam D. Ruppe wrote: On Thursday, 13 August 2015 at 03:44:14 UTC, Walter Bright wrote: Hah, I'd like to replace dmd.conf with a .json

Re: TCP Socket Client Example

2015-08-14 Thread Alex Parrill via Digitalmars-d
On Friday, 14 August 2015 at 14:06:03 UTC, Kingsley wrote: Hi Does anyone have some examples of making a client socket connection to a host on a port and parsing the incoming data in some kind of loop. --K auto addresses = getAddress(localhost, 8085); auto socket = new

Re: iterating through a range, operating on last few elements at a time

2015-08-14 Thread Timon Gehr via Digitalmars-d-learn
On 08/14/2015 03:26 PM, Timon Gehr wrote: On 08/14/2015 05:12 AM, H. S. Teoh via Digitalmars-d-learn wrote: ... I didn't figure out how to eliminate the short slices toward the end, ... :o) ... Less hacky and less efficient: auto slidingWindow(R)(R range, int k) { return

Re: TCP Socket Client Example

2015-08-14 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 14 August 2015 at 14:06:03 UTC, Kingsley wrote: Does anyone have some examples of making a client socket connection to a host on a port and parsing the incoming data in some kind of loop. I put one in chapter 2 of my book: https://www.packtpub.com/application-development/d-cookbook

Re: std.data.json formal review

2015-08-14 Thread Steven Schveighoffer via Digitalmars-d
On 8/14/15 9:37 AM, Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= ola.fosheim.grostad+dl...@gmail.com wrote: On Friday, 14 August 2015 at 13:30:44 UTC, Andrei Alexandrescu wrote: On 8/14/15 9:10 AM, Steven Schveighoffer wrote: On 8/14/15 8:51 AM, Andrei Alexandrescu wrote: On 8/13/15 8:16 PM, Walter

Re: std.data.json formal review

2015-08-14 Thread Walter Bright via Digitalmars-d
On 8/13/2015 11:54 PM, Dmitry Olshansky wrote: On 14-Aug-2015 03:48, Walter Bright wrote: On 8/13/2015 5:18 PM, Adam D. Ruppe wrote: On Thursday, 13 August 2015 at 03:44:14 UTC, Walter Bright wrote: Hah, I'd like to replace dmd.conf with a .json file. There's an awful lot of people out

Re: std.data.json formal review

2015-08-14 Thread Walter Bright via Digitalmars-d
On 8/13/2015 11:52 PM, Sönke Ludwig wrote: Am 14.08.2015 um 02:26 schrieb Walter Bright: On 8/13/2015 3:51 AM, Sönke Ludwig wrote: These were, AFAICS, the only major open issues (a decision for an opt() variant would be nice, but fortunately that's not a fundamental decision in any way). 1.

Re: The Bug Tracker is a community tool

2015-08-14 Thread sigod via Digitalmars-d
On Thursday, 13 August 2015 at 14:52:17 UTC, Luís Marques wrote: More seriously, please take a look at my findSplit post please; http://forum.dlang.org/thread/rhtjonvwgktbqvbat...@forum.dlang.org Always provide links, please.

Re: std.data.json formal review

2015-08-14 Thread via Digitalmars-d
On Friday, 14 August 2015 at 08:03:34 UTC, Walter Bright wrote: 1. 'real' has enough precision to hold 64 bit integers. Except for the lowest negative value… (it has only 63 bits + floating point sign bit)

Theoretical Best Practices

2015-08-14 Thread DarthCthulhu via Digitalmars-d-learn
This is more a theoretical exercise than specific code nitty gritty, but... Let's say I have some code like this: class World { // Bunch of members and other functions void happyDay () { if (bCthulhuRises) { debug(logging) {

Re: DIP81: Writing files at compile time

2015-08-14 Thread JDemler via Digitalmars-d
On Thursday, 13 August 2015 at 10:06:32 UTC, Ola Fosheim Grøstad wrote: You need to be able to tell the compiler what files should be included in the output bundle. While I basically agree that this would be a nice to have feature I do not think it is necessary and it would not make up for

Re: std.data.json formal review

2015-08-14 Thread Walter Bright via Digitalmars-d
On 8/14/2015 12:14 AM, Sönke Ludwig wrote: Am 14.08.2015 um 07:11 schrieb Walter Bright: Make the type for storing a Number be a template parameter. Then we'd lose the ability to distinguish between integers and floating point in the same lexer instantiation, which is vital for certain input

dub and subpackages

2015-08-14 Thread yawniek via Digitalmars-d-learn
i'm trying to have my own versions of my dependencies as git submodules. problem: i include a local version of vibe.d and then i add other local versions of packages that themselves include vibe.d somehow my version of vibe isn't picked up by the other dependencies and it results in an

Re: dub and subpackages

2015-08-14 Thread Edwin van Leeuwen via Digitalmars-d-learn
On Friday, 14 August 2015 at 08:06:15 UTC, yawniek wrote: i'm trying to have my own versions of my dependencies as git submodules. whats the correct way of having a chain of packages included from git submodules so that every packages get's only picked once? dub add-local allows you to

Re: Attributes not propagating to objects via typeinfo?

2015-08-14 Thread via Digitalmars-d-learn
On Thursday, 13 August 2015 at 16:05:19 UTC, Steven Schveighoffer wrote: On 8/13/15 11:59 AM, Steven Schveighoffer wrote: That is definitely a bug. It's because typeid is looking up the derived type via the vtable, but the compiler should rewrap it with 'shared' afterwards. Actually, now

Re: dub and subpackages

2015-08-14 Thread yawniek via Digitalmars-d-learn
On Friday, 14 August 2015 at 08:09:18 UTC, Edwin van Leeuwen wrote: On Friday, 14 August 2015 at 08:06:15 UTC, yawniek wrote: dub add-local allows you to add local copy of a package. This will be system wide though, not only for the current package. i actually tried this, somehow did't work

TCP Socket Client Example

2015-08-14 Thread Kingsley via Digitalmars-d
Hi Does anyone have some examples of making a client socket connection to a host on a port and parsing the incoming data in some kind of loop. --K

Re: Associative array literal. Why doesn't it compile?

2015-08-14 Thread Temtaime via Digitalmars-d-learn
It's because it's implemented in DMD only partly. There's a bug report associated with it.

Re: RFC: dispatchToMember 2, electric boogaloo

2015-08-14 Thread Meta via Digitalmars-d
On Friday, 14 August 2015 at 14:29:38 UTC, Andrei Alexandrescu wrote: Nice work, though I see it fails to compile if the member does not define the member. I noticed sometimes dispatchToMemberIfPresent is useful, too, and allows for flexible composition and good introspection. So having both

Re: DerelictCocoa

2015-08-14 Thread Jacob Carlborg via Digitalmars-d-announce
On 2015-08-14 14:39, ponce wrote: I see. I've indeed started to cast but only to get the right return type, and left the vararg list. That may be the problem. The signature of the objc_msgSend function is mostly irrelevant. The function needs to be casted because it will jump to the

Matrix API support - start with formats?

2015-08-14 Thread Andrei Alexandrescu via Digitalmars-d
I stumbled upon https://software.intel.com/en-us/node/471374 which gives good detail on Intel's Math Kernel Library's data formats for sparse matrices. No doubt other popular linear algebra libraries have similar documentation. I was thinking we could start with adding these layouts to std,

[Issue 14920] [REG2.067.0] SList.insertAfter on uninitialized list triggers assertion in _first

2015-08-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14920 ag0ae...@gmail.com changed: What|Removed |Added CC||ag0ae...@gmail.com

Re: The object operator

2015-08-14 Thread Timon Gehr via Digitalmars-d
On 08/14/2015 06:17 AM, TheHamster wrote: For class types, a special operator is defined to return the class object for method calls rather than the return value from the call itself. The use of the operator places the return types in special variables to be accessed easily. The operator is

Re: RFC: dispatchToMember 2, electric boogaloo

2015-08-14 Thread Andrei Alexandrescu via Digitalmars-d
On 8/13/15 11:59 PM, Meta wrote: On Friday, 14 August 2015 at 03:55:13 UTC, Meta wrote: I've finally got around to fixing some bugs that were blocking dispatchToMember, and I've now got a working solution that's ready for destruction. Something I remember Andrei mentioning was controlling

Re: std.data.json formal review

2015-08-14 Thread via Digitalmars-d
On Friday, 14 August 2015 at 14:09:25 UTC, Steven Schveighoffer wrote: a) we aren't writing b) comments are for the human reader, not for the program. Dmd should ignore the comments, and it doesn't matter the order. c) it's not important, I think we all agree a format that has specific

Re: std.data.json formal review

2015-08-14 Thread Steven Schveighoffer via Digitalmars-d
On 8/14/15 10:44 AM, Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= ola.fosheim.grostad+dl...@gmail.com wrote: On Friday, 14 August 2015 at 14:09:25 UTC, Steven Schveighoffer wrote: a) we aren't writing b) comments are for the human reader, not for the program. Dmd should ignore the comments, and it

Re: std.data.json formal review

2015-08-14 Thread via Digitalmars-d
On Friday, 14 August 2015 at 15:11:41 UTC, Steven Schveighoffer wrote: And that would be possible here. JSON file format says nothing about how the data is stored in your library. But again, not important. It isn't important since JSON is not too good as a config file format, but it is

Re: Attributes not propagating to objects via typeinfo?

2015-08-14 Thread Timon Gehr via Digitalmars-d-learn
On 08/13/2015 06:05 PM, Steven Schveighoffer wrote: On 8/13/15 11:59 AM, Steven Schveighoffer wrote: That is definitely a bug. It's because typeid is looking up the derived type via the vtable, but the compiler should rewrap it with 'shared' afterwards. Actually, now that I think about it,

Re: Matrix API support - start with formats?

2015-08-14 Thread Rikki Cattermole via Digitalmars-d
On 15/08/2015 2:57 a.m., Andrei Alexandrescu wrote: I stumbled upon https://software.intel.com/en-us/node/471374 which gives good detail on Intel's Math Kernel Library's data formats for sparse matrices. No doubt other popular linear algebra libraries have similar documentation. I was thinking

Re: RFC: dispatchToMember 2, electric boogaloo

2015-08-14 Thread Andrei Alexandrescu via Digitalmars-d
On 8/14/15 10:38 AM, Meta wrote: I also plan to detect whether the symbol being forwarded to is a function or a field, and generate an @property wrapper as appropriate, which shouldn't be too hard. Great. What *will* be difficult, though, is controlling which overloads are forwarded to.

Re: Matrix API support - start with formats?

2015-08-14 Thread ponce via Digitalmars-d
On Friday, 14 August 2015 at 14:57:19 UTC, Andrei Alexandrescu wrote: I stumbled upon https://software.intel.com/en-us/node/471374 which gives good detail on Intel's Math Kernel Library's data formats for sparse matrices. No doubt other popular linear algebra libraries have similar

Re: Where are the semantics of shared defined?

2015-08-14 Thread rsw0x via Digitalmars-d
On Friday, 14 August 2015 at 12:43:26 UTC, thedeemon wrote: Anrei's TDPL book spent a lot of words on shared (and this book had kind-of-a-spec reputation), but I don't know how much of it is relevant now. I know for a fact that a lot of the things related to shared in TDPL aren't implemented

Re: Matrix API support - start with formats?

2015-08-14 Thread David Nadlinger via Digitalmars-d
On Friday, 14 August 2015 at 15:11:39 UTC, ponce wrote: Are sparse matrices a common scenario? Yes. They tend to pop up in virtually all serious numerical problems in science and engineering, particularly when partial differential equations are involved. If anything I think small vectors,

Re: D fund

2015-08-14 Thread Nick Sabalausky via Digitalmars-d
On 08/10/2015 01:00 PM, Tofu Ninja wrote: On Monday, 10 August 2015 at 16:58:15 UTC, vladde wrote: Will the swag feature http://dlangcomicstrips.tumblr.com/ ? Lol Wtf who makes those? They are hilarious! I love the AliasSeq one!

Re: Matrix API support - start with formats?

2015-08-14 Thread Tofu Ninja via Digitalmars-d
On Friday, 14 August 2015 at 18:51:51 UTC, David Nadlinger wrote: On Friday, 14 August 2015 at 15:11:39 UTC, ponce wrote: Are sparse matrices a common scenario? Yes. They tend to pop up in virtually all serious numerical problems in science and engineering, particularly when partial

Re: Matrix API support - start with formats?

2015-08-14 Thread jmh530 via Digitalmars-d
On Friday, 14 August 2015 at 18:51:51 UTC, David Nadlinger wrote: If anything I think small vectors, non-sparse matrixes and rectangles/AABB could be part of Phobos before that. If you just had a go at it from the CG/gamedev perspective, you'd probably end up with an API that is entirely

Re: Nested public imports - bug or feature?

2015-08-14 Thread Timon Gehr via Digitalmars-d
On 08/14/2015 08:57 PM, Dicebot wrote: Ok, let's stop for a minute and make sure we are on the same thread here. Because you seem to argue something I have never said or at least intended to say. ... OK. This is my view: The sub-thread was started with the claim that the module system is

Re: RFC: dispatchToMember 2, electric boogaloo

2015-08-14 Thread Meta via Digitalmars-d
As an aside, forwardIfDefined seems like it would fit nicely in this mythical std.idioms module that's talked about from time to time.

Re: Mid level IR

2015-08-14 Thread Dmitry Olshansky via Digitalmars-d
On 14-Aug-2015 20:00, rsw0x wrote: On Friday, 14 August 2015 at 16:13:07 UTC, Ola Fosheim Grøstad wrote: Rust is getting a mid level IR for speeding up compilation. http://blog.rust-lang.org/2015/08/14/Next-year.html There are some really neat things you can do in Rust today – if you’re

Re: TCP Socket Client Example

2015-08-14 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 14 August 2015 at 16:02:30 UTC, Kingsley wrote: How would I send stuff back to the server without blocking? Is there some kind of IO reactor / event machine library for D that could help me? you could also just use Socket.select and not worry about the whole blocking thing as much

Re: std.data.json formal review

2015-08-14 Thread Steven Schveighoffer via Digitalmars-d
On 8/14/15 1:30 PM, deadalnix wrote: It doesn't matter what you think of JSON. JSON is widely used an needed in the standard lib. PERIOD. I think you are missing that this sub-discussion is about using json to replace dmd configuration file. -Steve

Can the compiler catch my stupid mistake?

2015-08-14 Thread Jack Stouffer via Digitalmars-d
Recently, I made the mistake of trying to reference an enum pointer in a struct before it was set (see example below). I was wondering if it's possible for DMD to catch this mistake at compile time, as this currently compiles fine and segfaults on execution. Thanks enum

Re: Attributes not propagating to objects via typeinfo?

2015-08-14 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/14/15 11:39 AM, Timon Gehr wrote: On 08/13/2015 06:05 PM, Steven Schveighoffer wrote: On 8/13/15 11:59 AM, Steven Schveighoffer wrote: That is definitely a bug. It's because typeid is looking up the derived type via the vtable, but the compiler should rewrap it with 'shared' afterwards.

[Issue 14920] [REG2.067.0] SList.insertAfter on uninitialized list triggers assertion in _first

2015-08-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14920 ag0ae...@gmail.com changed: What|Removed |Added Keywords||pull --

Re: Matrix API support - start with formats?

2015-08-14 Thread jmh530 via Digitalmars-d
On Friday, 14 August 2015 at 19:19:24 UTC, bachmeier wrote: One concern I have is the choice of MKL, which due to cost and license reasons, many developers will not have on all (or even any) of their machines. I don't work with sparse matrices often so I do not know which libraries are

Re: mood : simple vibe.d based blog implementation

2015-08-14 Thread David Nadlinger via Digitalmars-d-announce
On Friday, 14 August 2015 at 18:51:33 UTC, Dicebot wrote: - HTTPS-only By the way, Firefox on Mac does not recognize your TLS certificate as valid. – David

Re: Nested public imports - bug or feature?

2015-08-14 Thread Dicebot via Digitalmars-d
Ok, let's stop for a minute and make sure we are on the same thread here. Because you seem to argue something I have never said or at least intended to say. So, my basic statements: 1. I don't like default D import semantics but I am not proposing to change it 2. I like Rust default import

Re: mood : simple vibe.d based blog implementation

2015-08-14 Thread Adam D. Ruppe via Digitalmars-d-announce
On Friday, 14 August 2015 at 18:51:33 UTC, Dicebot wrote: A bit more details - https://blog.dicebot.lv/posts/2015/08/In_the_mood_for_some_releasing huh, this doesn't look awful. I've been thinking about starting a fancier blog but I hate all blog software too. So I just write html files but

Re: Matrix API support - start with formats?

2015-08-14 Thread bachmeier via Digitalmars-d
On Friday, 14 August 2015 at 14:57:19 UTC, Andrei Alexandrescu wrote: I stumbled upon https://software.intel.com/en-us/node/471374 which gives good detail on Intel's Math Kernel Library's data formats for sparse matrices. No doubt other popular linear algebra libraries have similar

mood : simple vibe.d based blog implementation

2015-08-14 Thread Dicebot via Digitalmars-d-announce
A bit more details - https://blog.dicebot.lv/posts/2015/08/In_the_mood_for_some_releasing Project repo - https://github.com/Dicebot/mood Branch which powers actual blog.dicebot.lv - https://github.com/Dicebot/mood/tree/blog.dicebot.lv Copy of feature list for quick overview: - stand-alone

Re: mood : simple vibe.d based blog implementation

2015-08-14 Thread Dicebot via Digitalmars-d-announce
On Friday, 14 August 2015 at 18:55:19 UTC, David Nadlinger wrote: On Friday, 14 August 2015 at 18:51:33 UTC, Dicebot wrote: - HTTPS-only By the way, Firefox on Mac does not recognize your TLS certificate as valid. – David Yeah, I am aware of that issue, need to embed signature chains of

Re: Matrix API support - start with formats?

2015-08-14 Thread Tofu Ninja via Digitalmars-d
On Friday, 14 August 2015 at 15:11:39 UTC, ponce wrote: On Friday, 14 August 2015 at 14:57:19 UTC, Andrei Alexandrescu wrote: I stumbled upon https://software.intel.com/en-us/node/471374 which gives good detail on Intel's Math Kernel Library's data formats for sparse matrices. No doubt other

[Issue 14920] [REG2.067.0] SList.insertAfter on uninitialized list triggers assertion in _first

2015-08-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14920 --- Comment #2 from secondaryacco...@web.de --- https://github.com/D-Programming-Language/phobos/pull/3554 --

Re: Bug in std.container: SList

2015-08-14 Thread Xinok via Digitalmars-d
On Friday, 14 August 2015 at 18:12:42 UTC, anonymous wrote: Other insert* functions call the private function SList.initialize() which does the null-check for _root. I am working on a PR adding the missing call in insertAfter - that's a 1 line change. I am not a phobos dev. I would do the

Re: Matrix API support - start with formats?

2015-08-14 Thread jmh530 via Digitalmars-d
On Friday, 14 August 2015 at 14:57:19 UTC, Andrei Alexandrescu wrote: I stumbled upon https://software.intel.com/en-us/node/471374 which gives good detail on Intel's Math Kernel Library's data formats for sparse matrices. No doubt other popular linear algebra libraries have similar

[Issue 14921] New: getopt throws preventing printing of options

2015-08-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14921 Issue ID: 14921 Summary: getopt throws preventing printing of options Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Mid level IR

2015-08-14 Thread via Digitalmars-d
Rust is getting a mid level IR for speeding up compilation. http://blog.rust-lang.org/2015/08/14/Next-year.html https://github.com/rust-lang/rfcs/pull/1211 It has been mentioned that before that this would be worthwhile for D too. It also would make it much easier for backends to keep up

[Issue 14903] Destructors for arguments completely broken

2015-08-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14903 --- Comment #9 from ki...@gmx.net --- PR created: https://github.com/D-Programming-Language/dmd/pull/4885 --

Re: Can the compiler catch my stupid mistake?

2015-08-14 Thread Adam D. Ruppe via Digitalmars-d
Try compiling with -O, it sometimes catches these things in the optimization process (weird i know)

Re: std.data.json formal review

2015-08-14 Thread via Digitalmars-d
On Friday, 14 August 2015 at 17:31:02 UTC, deadalnix wrote: JSON is widely used an needed in the standard lib. PERIOD. The discussion was about suitability as a standard config file format for D not whether it should be in the standard lib. JSON, XML and YAML all belong in a standard lib.

[Issue 14912] Move initialisation of GC'd struct and class data from the callee to the caller

2015-08-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14912 --- Comment #10 from Iain Buclaw ibuc...@gdcproject.org --- (In reply to Iain Buclaw from comment #9) (In reply to Steven Schveighoffer from comment #8) (In reply to Iain Buclaw from comment #7) That's fine for anything except classes...

Re: Can the compiler catch my stupid mistake?

2015-08-14 Thread Jack Stouffer via Digitalmars-d
On Friday, 14 August 2015 at 17:44:11 UTC, Steven Schveighoffer wrote: On 8/14/15 1:36 PM, Jack Stouffer wrote: Recently, I made the mistake of trying to reference an enum pointer in a struct before it was set (see example below). I was wondering if it's possible for DMD to catch this mistake

Re: Can the compiler catch my stupid mistake?

2015-08-14 Thread Jack Stouffer via Digitalmars-d
On Friday, 14 August 2015 at 17:45:51 UTC, Jack Stouffer wrote: On Friday, 14 August 2015 at 17:38:48 UTC, Adam D. Ruppe wrote: Try compiling with -O, it sometimes catches these things in the optimization process (weird i know) $ dmd -O test.d $ ./test.d Whoops, that should be ./test

[Issue 14912] Move initialisation of GC'd struct and class data from the callee to the caller

2015-08-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14912 --- Comment #9 from Iain Buclaw ibuc...@gdcproject.org --- (In reply to Steven Schveighoffer from comment #8) (In reply to Iain Buclaw from comment #7) That's fine for anything except classes... Sure, but with compiler visibility, and ability

Re: Can the compiler catch my stupid mistake?

2015-08-14 Thread Jack Stouffer via Digitalmars-d
On Friday, 14 August 2015 at 17:38:48 UTC, Adam D. Ruppe wrote: Try compiling with -O, it sometimes catches these things in the optimization process (weird i know) $ dmd -O test.d $ ./test.d [1]1755 segmentation fault ./test :(

Re: Can the compiler catch my stupid mistake?

2015-08-14 Thread Meta via Digitalmars-d
On Friday, 14 August 2015 at 17:59:12 UTC, Jack Stouffer wrote: On Friday, 14 August 2015 at 17:44:11 UTC, Steven Schveighoffer wrote: On 8/14/15 1:36 PM, Jack Stouffer wrote: Recently, I made the mistake of trying to reference an enum pointer in a struct before it was set (see example below).

[Issue 14912] Move initialisation of GC'd struct and class data from the callee to the caller

2015-08-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14912 --- Comment #11 from Steven Schveighoffer schvei...@yahoo.com --- (In reply to Iain Buclaw from comment #9) Still need the ability to *deref a class to assign in bulk to its underlying structure in the language. Currently only the

Re: Bug in std.container: SList

2015-08-14 Thread Xinok via Digitalmars-d
On Friday, 14 August 2015 at 06:44:53 UTC, ted wrote: Hi, (earlier posting on D.learn, but better test included here)... dmd.2.067, dmd.2068 (64bit linux) import std.container: SList; void main() { SList!int tmp=( 4 ); SList!int tmp1; // Ensure tmp is empty

Re: The object operator

2015-08-14 Thread TheHamster via Digitalmars-d
On Friday, 14 August 2015 at 14:20:57 UTC, Timon Gehr wrote: On 08/14/2015 06:17 AM, TheHamster wrote: [...] Close enough? :o) import std.typecons; // (workaround for lack of seq return) [...] Cool, I guess it is about as close as you can get in D with compiler support. Is $ a good

Re: Can the compiler catch my stupid mistake?

2015-08-14 Thread Temtaime via Digitalmars-d
Java / C# are executed under virtual machine. D is executed on real hardware. You can use your OS api to catch these exceptions, for windows it is SetUnhandledExceptionFilter. But you will never be able to log for example line where this exception happend.

Re: Can the compiler catch my stupid mistake?

2015-08-14 Thread deadalnix via Digitalmars-d
On Friday, 14 August 2015 at 18:06:41 UTC, Jack Stouffer wrote: On Friday, 14 August 2015 at 18:02:10 UTC, Meta wrote: You're dereferencing a null pointer Oh, I see now, Thanks. Is there any way that the D runtime can throw a null pointer exception, a la Java or C#?

Re: Bug in std.container: SList

2015-08-14 Thread anonymous via Digitalmars-d
On Friday, 14 August 2015 at 16:28:39 UTC, Xinok wrote: I can confirm that this is a bug but I'm not sure what the correct way is to fix it. SList creates a dummy node for the root of the list, but because structs don't allow default constructors, this dummy node is never allocated in the

  1   2   >