Re: rpath options to linkers, OSX issue

2014-09-07 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-06 17:51, Russel Winder via Digitalmars-d wrote: Is there an OSX user out there having no problem with dmd and dynamic libraries I can prevail upon to give me a hand with this? Note that dynamic libraries don't work properly on OS X. -- /Jacob Carlborg

Re: rpath options to linkers, OSX issue

2014-09-08 Thread Jacob Carlborg via Digitalmars-d
On 07/09/14 22:23, Andrei Alexandrescu wrote: What are the issues? -- Andrei The usual: module info, exception handling tables, TLS and so on. Same problem Linux used to have. It has only be solved for Linux. -- /Jacob Carlborg

Re: Lieutenant needed: build and release process

2014-09-08 Thread Jacob Carlborg via Digitalmars-d
On 09/09/14 02:56, Dicebot wrote: Yeah those definitely look more interesting - as far as I can see subtree is bound to a branch and not to specific commit hash. Since Git 1.8.2 you can bound a submodule to a branch. -- /Jacob Carlborg

Re: Lieutenant needed: build and release process

2014-09-08 Thread Jacob Carlborg via Digitalmars-d
On 09/09/14 06:56, Brad Roberts via Digitalmars-d wrote: I believe that some vm images were created by someone that Andrew used, and that's likely the best course to continue right now, imho. I think Martin Nowak created the VM images using Vagrant. This file [1] contains some Vagrant related

Re: Voting: std.logger

2014-09-10 Thread Jacob Carlborg via Digitalmars-d
On 10/09/14 10:47, Robert burner Schadek wrote: But void fun(int l = __LINE__, A...)(A...); cannot be replaced by void fun(A...)(A..., int l = __LINE__); Could we modify the compiler to allow that? Just for the special identifiers __LINE__, __FILE__ and similar. It wouldn't be possible to s

Platform specific DMD tests

2014-09-10 Thread Jacob Carlborg via Digitalmars-d
I'm working on the D/Objective-C integration. There's a bunch of new tests added that should only be run on OS X. Currently these are in a separate test suite. How should these tests be handled? Should they stay in a separate test suite, exclude the files from the current makefile somehow or so

Re: Platform specific DMD tests

2014-09-10 Thread Jacob Carlborg via Digitalmars-d
On 10/09/14 15:19, Daniel Murphy wrote: I'd say just disable them in the makefile for all other platforms, if they don't need a custom script. Some of the need to compile Objective-C code. -- /Jacob Carlborg

Re: Platform specific DMD tests

2014-09-10 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-10 17:09, Daniel Murphy wrote: Are you planning to do that with shell scripts or by adding a feature to d_do_test? Currently this is done using REQUIRED_ARGS and $(), something like this: // REQUIRED_ARGS: objc.o $(gcc -m$MODEL objc.m -c -o objc.o) You could fairly easily add EXT

Re: Platform specific DMD tests

2014-09-10 Thread Jacob Carlborg via Digitalmars-d
On 10/09/14 14:04, Andrej Mitrovic via Digitalmars-d wrote: When I had to test windows-specific stuff I put the actual test files in /extra-files/. Here's an example: https://github.com/D-Programming-Language/dmd/blob/master/test/compilable/test9680.sh So you could simply exit if ${OS} does no

Re: How to build dmd with debugging symbols in Linux/x86_64?

2014-09-11 Thread Jacob Carlborg via Digitalmars-d
On 12/09/14 00:22, H. S. Teoh via Digitalmars-d wrote: Any ideas how to work around this breakage? (Short of hacking root/checkedint.c, which is not particularly appealing since it's supposed to be a direct translation of the D version of checkedint.) If you only need debugging symbols, then d

Re: Getting completely (I mean ENTIRELY) rid off GC

2014-09-11 Thread Jacob Carlborg via Digitalmars-d
On 11/09/14 21:02, eles wrote: Could you provide one or two short but illustrative examples in Tango and Phobos showing the howto and the why not in Phobos? Tango: import tango.text.Unicode; void foo () { char[3] result; // pre-allocate buffer on the stack auto b = "foo".toUpper(resu

Re: C++/D interface: exceptions

2014-09-11 Thread Jacob Carlborg via Digitalmars-d
On 12/09/14 02:44, David Nadlinger wrote: Just a quick comment on this: 2) is very simple to implement for all the compilers that actually use libunwind Dwarf 2 EH on Linux, i.e. GDC and LDC (I think deadalnix already looked into this for SDC). It would be nice if DMD could do the same for D e

Re: C++/D interface: exceptions

2014-09-11 Thread Jacob Carlborg via Digitalmars-d
On 12/09/14 02:35, Andrei Alexandrescu wrote: Hello, We are racking our brains to figure out what to do about exceptions thrown from C++ functions into D code that calls them. A few levels of Nirvana would go like this: 0. Undefined behavior - the only advantage to this is we're there already

Re: C++/D interface: exceptions

2014-09-12 Thread Jacob Carlborg via Digitalmars-d
On 12/09/14 05:25, deadalnix wrote: Yes, that is pretty why I limited myself to the "unwind properly but do not catch" option. This one would require to mess with the innards of various C++ runtime. On 64bit Objective-C can catch C++ exceptions. But I don't think you can do anything with the

Re: C++/D interface: exceptions

2014-09-12 Thread Jacob Carlborg via Digitalmars-d
On 12/09/14 07:01, Iain Buclaw via Digitalmars-d wrote: Libunwind + handling foreign exceptions you can do this. And is beneficial in that it works with any other languages that use libunwind, such as gccgo. And Objective-C. -- /Jacob Carlborg

Re: Getting completely (I mean ENTIRELY) rid off GC

2014-09-12 Thread Jacob Carlborg via Digitalmars-d
On 12/09/14 08:59, Daniel Kozak via Digitalmars-d wrote: toUpperInPlace could help little, but still not perfect Converting text to uppercase doesn't work in-place in some cases. For example the German double S will take two letters in uppercase form. -- /Jacob Carlborg

Re: Getting completely (I mean ENTIRELY) rid off GC

2014-09-12 Thread Jacob Carlborg via Digitalmars-d
On 12/09/14 09:58, eles wrote: On Friday, 12 September 2014 at 06:47:56 UTC, Jacob Carlborg wrote: On 11/09/14 21:02, eles wrote: Thank you. Basically, it is about a different interface of the functions, something like the difference between "new" and "placement new". This could be added to

Re: C++ interop - what to do about long and unsigned long?

2014-09-13 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-13 03:36, Manu via Digitalmars-d wrote: Yeah, but that's true regardless of C++ interop. It's so easy to make mistakes, and so hard to find them when you do. virtual-by-default is responsible for most of the silent errors in my code by far. Surely, at very least, an extern(C++) class

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-15 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-15 16:45, Andrei Alexandrescu wrote: On 9/15/14, 2:50 AM, monarch_dodra wrote: - Does not provide Forward range iteration that I can find. This makes it unuseable for algorithms: find (myRCString, "hello"); //Nope Also, adding "save" to make it forward might not be a good idea, s

Re: assume, assert, enforce, @safe

2014-09-18 Thread Jacob Carlborg via Digitalmars-d
On 18/09/14 18:49, H. S. Teoh via Digitalmars-d wrote: What if the program has a bug that corrupts your save game file, but because the program ignores these logic errors, it just bumbles onward and destroys all your progress *without* you even knowing about it until much later? Happened to me

Re: RFC: reference counted Throwable

2014-09-19 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-19 17:32, Andrei Alexandrescu wrote: Whenever a reference to a Throwable is copied about, passed to functions, the compiler inserts appropriately calls to e.g. incRef and decRef. (Compiler may assume they cancel each other for optimization purposes.) Implementation of these is up to t

Re: RFC: reference counted Throwable

2014-09-20 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-19 17:32, Andrei Alexandrescu wrote: Whenever a reference to a Throwable is copied about, passed to functions, the compiler inserts appropriately calls to e.g. incRef and decRef. (Compiler may assume they cancel each other for optimization purposes. Assuming this would eventually be

Re: RFC: reference counted Throwable

2014-09-20 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-20 16:33, Paulo Pinto wrote: It requires compiler support, though. The first thing I asked in this thread was "Are you suggesting we implement ARC?" and the answer was "Yes" [1]. So it looks like Andrei already wants to implement ARC. My definition of ARC is that the compiler ins

Re: Lieutenant needed: build and release process

2014-09-20 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-20 16:44, Dicebot wrote: Trying this right now, got through Win7 box setup but where one is supposed to get "InstallESD.dmg" mentioned in installation instructions? As the instructions say, from the "Install Mac OS X Mountain Lion.app" bundle. This bundle is downloaded from the Mac

Re: RFC: scope and borrowing

2014-09-21 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-21 05:38, Walter Bright wrote: 2. I think there is quite a bit of overlap between scope and ref. Essentially, ref does everything scope does, except deal with classes. I'm not terribly comfortable with such a large overlap, it implies something is wrong. I don't have an answer at the

Re: RFC: reference counted Throwable

2014-09-21 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-21 07:55, Cliff wrote: Swift will never be more important than Objective C was - which is to say it'll be the main development language on Apple products and probably nothing else. That has real value, but the limits on it are pretty hard and fast (which says more about Apple than th

Re: RFC: reference counted Throwable

2014-09-21 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-21 07:55, Cliff wrote: .NET suffers a similar problem in spite of the community's best efforts with Mono - it'll always be a distant 2nd (or 5th or 20th) on other platforms. And on Windows, C++ won't get supplanted by .NET absent a sea-change in the mindset of the Windows OS group -

Re: RFC: reference counted Throwable

2014-09-21 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-20 18:31, Adam D. Ruppe wrote: On Saturday, 20 September 2014 at 16:15:45 UTC, Andrei Alexandrescu wrote: We need to explore that. A possibility is to support coexistence and then have the option to use a tool statically pinpoint the uses of GC. -- Andrei What, *exactly*, does "uses

Re: RFC: reference counted Throwable

2014-09-21 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-20 18:53, Paulo Pinto wrote: I would say ARC == RC. I never saw a distinction in literature between both, before Apple used the term. I never saw the term ARC before Apple used it. I would say, ARC is a form of RC but RC doesn't not need imply ARC. BTW "Automatic Reference Countin

Re: RFC: reference counted Throwable

2014-09-21 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-20 18:56, Andrei Alexandrescu wrote: Please don't take me in a court of law. But yes, I am talking about the compiler inserting calls to increment and decrement reference counts. -- Andrei We do need to know what you're proposal is for. How else can we comment on it? Paulo Pinto's

Re: Identifier resolution, the great implementation defined mess.

2014-09-21 Thread Jacob Carlborg via Digitalmars-d
On 21/09/14 22:04, Walter Bright wrote: Lookup rules are straightforward: scope is current scope do { look up name in scope if name is found, done! look up name in imports imported into scope if name is found, done! set scope to enclosing scope } whi

Re: Any libunwind experts n da house?

2014-09-23 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-23 20:31, Walter Bright wrote: One goal is to have dmd use the g++ exception handling mechanism. That would be cool. It's useful for Objective-C on x86-64 as well. But googling how that works, I find dead links, specs that are 15 years old accompanied by vague comments about it be

Re: What are the worst parts of D?

2014-09-23 Thread Jacob Carlborg via Digitalmars-d
On 23/09/14 18:19, Andrei Alexandrescu wrote: It's been this for a good while, and it will probably be until done. -- Andrei So why isn't there a publicly available road map? Note, this one [1] doesn't mention C++ nor the GC. [1] http://wiki.dlang.org/Agenda -- /Jacob Carlborg

Re: What are the worst parts of D?

2014-09-23 Thread Jacob Carlborg via Digitalmars-d
On 23/09/14 20:32, David Nadlinger wrote: Seriously, once somebody comes up with an automatic fixup tool, there is hardly any generic argument left against language changes. Brain has already said that such a tool is fairly easy to create in many cases. Also that he is willing do to so if it

Re: What are the worst parts of D?

2014-09-23 Thread Jacob Carlborg via Digitalmars-d
On 24/09/14 06:59, Brad Roberts via Digitalmars-d wrote: I agree with Sean quite a bit here. Let's turn the camera around and look at it from a different angle. I'm hard pressed to find a new feature from the last few years that's actually thoroughly complete. And by complete I mean that drun

Re: What are the worst parts of D?

2014-09-23 Thread Jacob Carlborg via Digitalmars-d
On 24/09/14 07:37, Walter Bright wrote: So help out! You always say we should help out instead of complaining. But where are all the users that want C++ support. Let them implement it instead and lets us focus on actual D users we have now. -- /Jacob Carlborg

Re: What are the worst parts of D?

2014-09-23 Thread Jacob Carlborg via Digitalmars-d
On 24/09/14 06:31, Walter Bright wrote: But it is a bit unreasonable to expect large project maintainers to rebuild and check for bugs every day. It's why we have a beta test program. The solution is to make it automatic. -- /Jacob Carlborg

Re: What are the worst parts of D?

2014-09-23 Thread Jacob Carlborg via Digitalmars-d
On 24/09/14 05:59, Walter Bright wrote: No, that's not the problem. The problem is what to do when the "larger project" fails. Currently, it is the submitter's job to adjust the test suite, fix phobos code, whatever is necessary to get the suite running again. Sometimes, in the more convoluted

Re: What are the worst parts of D?

2014-09-24 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-24 08:57, Walter Bright wrote: Heck, the dmd release package build scripts break every single release cycle. The it's obviously doing something wrong. -- /Jacob Carlborg

Re: Announcing libasync, a cross-platform D event loop

2014-09-24 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-24 15:13, Etienne wrote: It's finally here: https://github.com/etcimon/libasync We all know how event loops are the foundation of more popular libraries Qt and Nodejs.. we now have a natively compiling async library entirely written in D. This event library was tested on Win32, Linux

Re: What are the worst parts of D?

2014-09-24 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-24 12:16, Walter Bright wrote: I've never heard of a non-trivial project that didn't have constant breakage of its build system. All kinds of reasons - add a file, forget to add it to the manifest. Change the file contents, neglect to update dependencies. Add new dependencies on some

Re: [Semi OT] Language for Game Development talk

2014-09-24 Thread Jacob Carlborg via Digitalmars-d
On 25/09/14 06:18, Walter Bright wrote: This stood out for me. Deallocated how? People who write high perf software tend to have multiple allocators for different purposes. I don't think this feature will work. He says it's part of the same memory as the enclosing struct. I guess they would

Re: Announcing libasync, a cross-platform D event loop

2014-09-24 Thread Jacob Carlborg via Digitalmars-d
On 24/09/14 22:09, Etienne wrote: I've thought about it but it isn't compatible with other BSD platforms and has no docs about using it with kqueue, it ended up looking more complicated and unstable because I could read complaints everywhere I looked. It ended up putting me in a direction where

Re: What are the worst parts of D?

2014-09-25 Thread Jacob Carlborg via Digitalmars-d
On 25/09/14 03:54, H. S. Teoh via Digitalmars-d wrote: Well, Cliff & I (and whoever's interested) will see what we can do about that. Perhaps in the not-so-distant future we may have a D build tool that can serve as the go-to build tool for D projects. What problems do you see with Dub? -- /J

Re: What are the worst parts of D?

2014-09-25 Thread Jacob Carlborg via Digitalmars-d
On 25/09/14 07:30, Walter Bright wrote: There's more than that, but yeah. Most of my types I'll write a "pretty printer" for, and use that. No conceivable debugger can guess how I want to view my data. With LLDB you can implement your own custom formatters [1]. For example, in Xcode, Apple ha

Re: What are the worst parts of D?

2014-09-25 Thread Jacob Carlborg via Digitalmars-d
On 25/09/14 08:39, H. S. Teoh via Digitalmars-d wrote: In fact, one thing that impressed me immensely is the fact that building the dmd toolchain is as simple as it is. I know of no other compiler project that is comparable. Building gcc, for example, is a wondrous thing to behold -- when it wor

Re: What are the worst parts of D?

2014-09-25 Thread Jacob Carlborg via Digitalmars-d
On 25/09/14 09:38, Atila Neves wrote: Here's one: having to manually generate the custom main file for unittest builds. There's no current way (or at least there wasn't when I brought it up in the dub forum) to tell it to autogenerate a D file from a dub package and list it as a dependency of th

Re: What are the worst parts of D?

2014-09-25 Thread Jacob Carlborg via Digitalmars-d
On 25/09/14 09:38, Atila Neves wrote: Here's one: having to manually generate the custom main file for unittest builds. There's no current way (or at least there wasn't when I brought it up in the dub forum) to tell it to autogenerate a D file from a dub package and list it as a dependency of th

Re: What are the worst parts of D?

2014-09-25 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-25 16:23, H. S. Teoh via Digitalmars-d wrote: That's the hallmark of make-based projects. This was Ninja actually. But how would the build system know I've updated the compiler? -- /Jacob Carlborg

Re: What are the worst parts of D?

2014-09-25 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-25 16:01, Wyatt wrote: I might look at the "modern alternative" once it supports debugging 64-bit executables. :/ LLDB supports OS X, Linux and FreeBSD. 32 and 64bit on all of these platforms [1]. Are you looking for Windows support? [1] http://lldb.llvm.org/ -- /Jacob Carlborg

Re: What are the worst parts of D?

2014-09-25 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-25 21:02, Ary Borenszweig wrote: Maybe Facebook needs D to interface with C++? But I only see Andrei working on that. Don't know how much coding he does in practice for C++ compatibility. -- /Jacob Carlborg

Re: What are the worst parts of D?

2014-09-25 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-25 19:26, Atila Neves wrote: I don't want an empty main function. I want the main function and the file it's in to be generated by the build system. What do you want the main function to contain? -- /Jacob Carlborg

Re: What are the worst parts of D?

2014-09-25 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-25 20:49, H. S. Teoh via Digitalmars-d wrote: The compiler and compile flags are inputs to the build rules in SCons. In my SCons projects, when I change compile flags (possibly for a subset of source files), it correctly figures out which subset (or the entire set) of files needs to

Re: [Semi OT] Language for Game Development talk

2014-09-25 Thread Jacob Carlborg via Digitalmars-d
On 25/09/14 21:59, Walter Bright wrote: But I think it's a waste of time to develop a new language that has 98% overlap with existing ones, like if I proposed a language just like C but with member functions. It seems that people won't switch language, or rather create a new language, even th

Re: D mention on developer.apple.com

2014-09-25 Thread Jacob Carlborg via Digitalmars-d
On 26/09/14 03:31, Michel Fortin wrote: Maybe this will be of interest to someone. D was mentioned on the official Swift Blog today: Swift borrows a clever feature from the D language: these identifiers expand to the location of the caller when evaluated in a default argument list. -- Buildin

Re: What are the worst parts of D?

2014-09-25 Thread Jacob Carlborg via Digitalmars-d
On 25/09/14 13:08, Don wrote: C-style declarations. Builtin sort and reverse. NCEG operators. Built-in complex types. float.min. @property. Let me add: base class protection. It's deprecated but not completely removed. I have never seen base class protection being used in practice. -- /Jaco

Re: [Semi OT] Language for Game Development talk

2014-09-26 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-26 09:24, po wrote: -couldn't open a file? Shut game down, this should never happen It depends on what file it's trying to open and what the failure is. If it can't find the settings file, just recreate it and move on. Perhaps report the error to the user. -- /Jacob Carlborg

Re: What are the worst parts of D?

2014-09-26 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-26 08:51, Atila Neves wrote: Because I don't use unittest blocks, I use my own library. The one thing it can't use the compiler for is discover what files are in a directory, so I need to generate the main function that calls into unit-threaded with a list of compile-time strings. Wha

Re: What are the worst parts of D?

2014-09-26 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-26 14:14, Wyatt wrote: It mentioned only 32-bit ELF on the "About" page. I don't know which "About" page you're reading. The one I'm reading [1] doesn't mention ELF at all. [1] http://lldb.llvm.org/index.html -- /Jacob Carlborg

Re: [Semi OT] Language for Game Development talk

2014-09-27 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-27 02:47, Manu via Digitalmars-d wrote: Initialisation logic often looks like this, and I buy the value of exceptions in this case. However, I've never successfully implemented it yet though, because the calls that create code like that always seem to be extern-C calls in my experienc

Re: Any libunwind experts n da house?

2014-09-27 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-23 19:37, Andrei Alexandrescu wrote: We need a libunwind expert to figure out a good approach for handling exceptions thrown by C++ code into D. BTW, are you only interested in handling C++ exception, or are you interested in handling D exceptions in C++ as well? One ugly hack is

Re: D mention on developer.apple.com

2014-09-27 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-27 11:05, ponce wrote: - and no exceptions, just because The Objective-C frameworks by Apple basically never throw exceptions. -- /Jacob Carlborg

Re: Any libunwind experts n da house?

2014-09-27 Thread Jacob Carlborg via Digitalmars-d
On Saturday, 27 September 2014 at 11:34:32 UTC, IgorStepanov wrote: C++ exception mechanism uses C++ type_info objects. We can inherit object.Throwable from std::exception (through extern(C++) interface), override the what() method, but there are no way to generate C++ type_info for D class n

Re: Any libunwind experts n da house?

2014-09-28 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-27 21:53, IgorStepanov wrote: If someone from D commanders bless me, I can start to exploring and implementing std::type_info for D classes. If we made it, we will implement 50% of C++ exception handling. Objective-C seems to use a struct made of a vtable, the class name and the Ob

Re: Program logic bugs vs input/environmental errors

2014-09-28 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-28 03:24, Steven Schveighoffer wrote: Library code often cannot make that choice. The issue with exceptions vs. errors is that often you don't know where the input comes from. e.g.: auto f = File(someInternalStringThatIsCorrupted) -> error auto f = File(argv[1]) -> exception How do

Re: [Semi OT] Language for Game Development talk

2014-09-28 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-28 00:56, Walter Bright wrote: I see no gain from that syntax. It's very convenient especially when using range based programming. -- /Jacob Carlborg

Re: Program logic bugs vs input/environmental errors

2014-09-28 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-28 19:36, Walter Bright wrote: I suggest removal of stack trace for exceptions, but leaving them in for asserts. If you don't like the stack track, just wrap the "main" function in a try-catch block, catch all exceptions and print the error message. -- /Jacob Carlborg

Re: So what exactly is coming with extended C++ support?

2014-09-29 Thread Jacob Carlborg via Digitalmars-d
On 29/09/14 12:00, Szymon Gatner wrote: Hi, recently there is much talk about extending C++ interop in D but it is unclear to me what that means. Functions and virtual class methods are already callable. What else is planned in the near future? Exceptions? Support for C++ templates? (that seems

Re: Program logic bugs vs input/environmental errors

2014-09-29 Thread Jacob Carlborg via Digitalmars-d
On 29/09/14 13:51, Steven Schveighoffer wrote: That makes no sense. The opening of the file is subject to issues with the filesystem, which means they may be environmental or user errors, not programming errors. But that doesn't mean the opening of the file failed because the file doesn't exist,

Re: RFC: moving forward with @nogc Phobos

2014-09-29 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-29 12:49, Andrei Alexandrescu wrote: Now that we clarified that these existing attempts are not going to work well, the question remains what does. For Phobos I'm thinking of defining and using three policies: enum MemoryManagementPolicy { gc, rc, mrc } immutable gc = ResourceMa

Re: RFC: moving forward with @nogc Phobos

2014-09-30 Thread Jacob Carlborg via Digitalmars-d
On 30/09/14 14:29, Andrei Alexandrescu wrote: Good point. We need to think about that. Weren't all methods in Object supposed to be lifted out from Object anyway? -- /Jacob Carlborg

Re: Program logic bugs vs input/environmental errors

2014-10-01 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-29 17:13, Steven Schveighoffer wrote: Is it? I can think of cases where it's programmer error, and cases where it's user error. When would it be a user error? -- /Jacob Carlborg

Re: RFC: moving forward with @nogc Phobos

2014-10-01 Thread Jacob Carlborg via Digitalmars-d
On 01/10/14 19:25, Oren T wrote: The idea is that the unique property is very short-lived: the caller immediately assigns it to a pointer of the appropriate policy: either RC or GC. This keeps the callee agnostic of the chosen policy and does not require templating multiple versions of the code.

Re: Program logic bugs vs input/environmental errors (checked exceptions)

2014-10-01 Thread Jacob Carlborg via Digitalmars-d
On 02/10/14 01:19, David Nadlinger wrote: What are you referring to specifically? Compared to Tango, yes, Phobos might have a lot fewer concrete exception types. But I don't recall actually eliminating existing ones. It happens implicitly when using "enforce". By default it will throw an inst

Re: Program logic bugs vs input/environmental errors (checked exceptions)

2014-10-01 Thread Jacob Carlborg via Digitalmars-d
On 02/10/14 01:19, Andrei Alexandrescu wrote: My recollection is that was only talked about. Anyhow, one thing is clear - as of now there are no clear idioms and successful techniques for handling errors with exceptions (including the use of subtyping). -- Andrei I think most error handling is

Re: Program logic bugs vs input/environmental errors

2014-10-01 Thread Jacob Carlborg via Digitalmars-d
On 01/10/14 21:57, Steven Schveighoffer wrote: ./progThatExpectsFilename "" -Steve It's the developer's responsibility to make sure a value like that never reaches the "File" constructor. That is, the developer of the "progThatExpectsFilename" application that uses "File". Not the develope

Re: Mike Acton at CppCon (prominent game-dev lecture to non-game-dev's)

2014-10-02 Thread Jacob Carlborg via Digitalmars-d
On 02/10/14 08:10, Manu via Digitalmars-d wrote: (is it just me, or is it getting really hard to keep up with this forum these days!?) Yeah, I need to read every day to keep up. I think it can vary quite a lot. There are a couple of topics that are quite hot, i.e. interfacing with C++, GC/RC

Re: RFC: moving forward with @nogc Phobos

2014-10-02 Thread Jacob Carlborg via Digitalmars-d
On 02/10/14 11:41, "Ola Fosheim Grøstad" " wrote: That would be better, but how do you deal with "bar(foo())" ? Context dependent instantiation is a semantic challenge when you also have overloading, but I guess you can get somewhere if you make whole program optimization mandatory and use a st

Re: Program logic bugs vs input/environmental errors

2014-10-03 Thread Jacob Carlborg via Digitalmars-d
On 03/10/14 13:27, Kagamin wrote: Do you interpret airplane safety right? As I understand, airplanes are safe exactly because they recover from assert failures and continue operation. Your suggestion is when seat 2A creaks, shut down the whole airplane. In reality airplanes continue to operate u

Re: Program logic bugs vs input/environmental errors (checked exceptions)

2014-10-03 Thread Jacob Carlborg via Digitalmars-d
On 2014-10-03 14:36, David Nadlinger wrote: you are saying that specific exceptions were replaced by enforce? I can't recall something like this happening. I have no idea about this but I know there are a lot of "enforce" in Phobos and it sees to be encouraged to use it. Would be really sad i

Re: Program logic bugs vs input/environmental errors

2014-10-04 Thread Jacob Carlborg via Digitalmars-d
On 2014-10-04 12:29, Steven Schveighoffer wrote: Then what is the point of File's constructor throwing an exception? This means, File is checking the filename, and I have to also check the file name. "File" should check if the file exists, can be opened and similar things. These are things th

Re: Program logic bugs vs input/environmental errors (checked exceptions)

2014-10-05 Thread Jacob Carlborg via Digitalmars-d
On 2014-10-05 17:08, Marco Leise wrote: Nice, finally someone who actually wants to discern Exception types. I'm always at a loss as to what warrants its own exception type. Yeah, that can be quite difficult. In the end, if you have a good exception hierarchy I don't think it will hurt to hav

Re: Program logic bugs vs input/environmental errors (checked exceptions)

2014-10-05 Thread Jacob Carlborg via Digitalmars-d
On 05/10/14 23:50, Dmitry Olshansky wrote: Seems like it should be possible to define multiple interfaces for exceptions, and then catch by that (and/or combinations of such). Each of interface would be interested in a particular property of exception. Then catching by: FileException with Perm

Re: Program logic bugs vs input/environmental errors (checked exceptions)

2014-10-05 Thread Jacob Carlborg via Digitalmars-d
On 05/10/14 18:18, Andrei Alexandrescu wrote: Exceptions are all about centralized error handling. How, and how often, would you handle FileNotFoundException differently than PermissionDeniedException? Probably not that often. But I don't think it's up to "File" to decide that. I think "File"

Re: Request for review - std.serialization (orange)

2014-10-06 Thread Jacob Carlborg via Digitalmars-d
On 06/10/14 12:24, "Daniele Bondì" " wrote: Any news on this? No, I'm currently working on D/Objective-C [1]. [1] http://wiki.dlang.org/DIP43 -- /Jacob Carlborg

Re: Program logic bugs vs input/environmental errors (checked exceptions)

2014-10-06 Thread Jacob Carlborg via Digitalmars-d
On 06/10/14 15:45, Andrei Alexandrescu wrote: Knowledge doesn't have to be by type; just place data inside the exception. About the only place where multiple "catch" statements are used to make fine distinctions between exception types is in sample code showing how to use multiple "catch" statem

Re: On exceptions, errors, and contract violations

2014-10-06 Thread Jacob Carlborg via Digitalmars-d
On 2014-10-06 16:36, Steven Schveighoffer wrote: This is the thing I have been arguing. Inside a library, the idea of input to the function being user defined or program-defined is not clear. It means that any user-defined input has to be double checked in the same exact way, to avoid having an

Re: Program logic bugs vs input/environmental errors (checked exceptions)

2014-10-06 Thread Jacob Carlborg via Digitalmars-d
On 2014-10-06 17:07, Andrei Alexandrescu wrote: I don't. On the contrary, I do consider proliferating types to the multiplicity of possible errors an obvious design sin. -- Andrei You loose the ability to have exception specific data. And no, I don't want to see an associative array of Varian

Re: Program logic bugs vs input/environmental errors (checked exceptions)

2014-10-06 Thread Jacob Carlborg via Digitalmars-d
On 2014-10-06 18:03, Regan Heath wrote: Why? It gives us the benefits of error code return values: - ability to easily/cheaply check for/compare them using "switch" on code value (vs comparing/casting types) - ability to pass through OS level codes directly Without any of the penalties:

Re: Program logic bugs vs input/environmental errors (checked exceptions)

2014-10-06 Thread Jacob Carlborg via Digitalmars-d
On 06/10/14 20:26, Andrei Alexandrescu wrote: Then scope them. We already have scoping rules built in to the language. Why should we invent a new way and set of rules for this. -- /Jacob Carlborg

Re: On Phobos GC hunt

2014-10-07 Thread Jacob Carlborg via Digitalmars-d
On 2014-10-07 17:57, Dmitry Olshansky wrote: I made a proposal to quantatively measure and tabulate all GC allocations in Phobos before coming up with solutions to "@nogc Phobos". After approving node from Andrei I've come up with a piece of automation to extract this data and post it on wiki.

Re: Parameterized unit testing and benchmarking of phobos

2014-10-09 Thread Jacob Carlborg via Digitalmars-d
On 08/10/14 23:37, Robert burner Schadek wrote: Lately, I find myself wondering, if I should add parameterized unit tests to std.string, because the last few bugs I fixed where not caught by tests, as the test-data was not good enough. I know random data is not perfect either, but it would be goo

Re: What are the worst parts of D?

2014-10-09 Thread Jacob Carlborg via Digitalmars-d
On 09/10/14 18:41, Andrei Alexandrescu wrote: With structured outputs there are a lot more issues to address: one can think of a JSONObject as an output range with put() but that's only moving the real issues around. How would the JSONObject allocate memory internally, give it out to its own use

Re: D2 (Debian) + MSSQL

2014-10-10 Thread Jacob Carlborg via Digitalmars-d
On 09/10/14 10:08, ketmar via Digitalmars-d wrote: virtually nobody is using mssql with GNU/Linux. 1. Who said anything about GNU/Linux 2. At my previous work we used SQL Server together with Ruby on Rails running on Linux. Odd fit, I know -- /Jacob Carlborg

Re: D2 (Debian) + MSSQL

2014-10-10 Thread Jacob Carlborg via Digitalmars-d
On 10/10/14 09:40, ketmar via Digitalmars-d wrote: topicstarter. the word "Debian" has very defined meaning. Point taken, missed that :) -- /Jacob Carlborg

Re: Parameterized unit testing and benchmarking of phobos

2014-10-10 Thread Jacob Carlborg via Digitalmars-d
On 10/10/14 10:09, Robert burner Schadek wrote: This will work for me private project, but I want this in std.string. Why wouldn't this working std.string? -- /Jacob Carlborg

Re: D2 (Debian) + MSSQL

2014-10-10 Thread Jacob Carlborg via Digitalmars-d
On 2014-10-10 16:35, ketmar via Digitalmars-d wrote: that's why i switched to maillist. nice archives, nice threading, nice searching and subject text in each line. ;-) I have that as well, in Thunderbird. I just somehow filtered out "Debian", perhaps due to the parentheses, perhaps a Lisp fi

Re: Make const, immutable, inout, and shared illegal as function attributes on the left-hand side of a function

2014-10-10 Thread Jacob Carlborg via Digitalmars-d
On 2014-10-10 19:31, Iain Buclaw via Digitalmars-d wrote: Equally, static does not have a double-meaning. "static" is the most overloaded keyword there is ;) -- /Jacob Carlborg

Re: DIP66 - Multiple alias this

2014-10-11 Thread Jacob Carlborg via Digitalmars-d
On 2014-10-11 00:52, Walter Bright wrote: I like the C++ rule that says that access control is not considered for name lookup. I know it makes for some annoying results, but the simplicity of the rule makes it much more understandable. I'm not so sure about that. Perhaps it makes it more under

Re: std.experimental.logger formal review round 3

2014-10-11 Thread Jacob Carlborg via Digitalmars-d
On 2014-10-11 05:41, Dicebot wrote: I don't see critical objections so far and this will move to voting stage this weekend. Please hurry up if you want to say something bad :) I think it's unacceptable that the documentation of "defaultLogFunction" and "trace", "info" and so on is merged. Same

<    1   2   3   4   5   6   7   8   9   10   >