Re: std.parallelism equivalents for posix fork and multi-machine processing
On Friday, 15 May 2015 at 00:07:15 UTC, Laeeth Isharc wrote: But why would one use python when fork itself isn't hard to use in a narrow sense, and neither is the kind of interprocess communication I would like to do for the kind of tasks I have in mind. It just seems to make sense to have a light wrapper. The managing process doesn't have to be fast, but should be easy to reconfigure. It is overall more effective (not efficient) to use a scripting language with a REPL for scripty tasks. Forking comes with its own set of pitfalls. The unix-way is to have a conglomerate of simple processes tied together with a script. Overall easier to debug and modify. Just because some problems in parallel processing are hard doesn't seem to me a reason not to do some work on addressing the easier ones that may in a practical sense have great value in having an imperfect (but real) solution for. Sometimes I have the sense when talking with you that the answer to any question is anything but D! ;) (But I am sure I must be mistaken!) I would have said the same thing about Rust and Nim too. Overall, what other people do with a tool affects the eco system and maturity. If you do system level programming you are less affected by the eco system then when you do higher level task-oriented programming. What is your mission, to solve a problem effectively now or to start building a new framework with a time horizon measured in years? You have to decide this first. Then you have to decide what is more expensive, your time or spending twice as much on CPU power (whether it is hardware or rented time at a datacenter). True. But we are not speaking of getting from a raw state to perfection but just starting to play with the problem. If Walter Bright had listened to well-intentioned advice, he wouldn't be in the compiler business, let alone have given us what became D. He set out to build a new framework with a time horizon measured in decades. That's perfectly reasonable and what you have to expect when starting on a new language. If you want to build a framework for a specific use you need both the theoretical insights and the pragmatical experience in order to complete it in a timely manner. You need many many iterations to get to a state where it is better (than whatever people use today). Which is why most (sensible) engineers will pick existing solutions that are receiving polish, rather than the next big thing. Yes, indeed. But my question was more about the distinctions between processes and threads and the non-obvious implications for the design of such a framework. If you want to use fork(), you might as well use threads, the main distinction is that with processes you have to be explicit about what resources to share, but after a fork() you also risk ending up in an inconsistent state if you aren't careful. With a fork based solution you still need to deal with a different level of complexity than you get with a Unixy conglomerate of simple programs that cooperate, the Unix way is easier to debug and test, but slower than an optimized multi threaded solution (and marginally slower than a process that fork itself).
std.allocator: nomenclature needed
Ready for yet another name debate? Here's an opportunity! I just added: http://erdani.com/d/phobos-prerelease/std_experimental_allocator_auto_deallocator.html https://github.com/andralex/phobos/blob/allocator/std/experimental/allocator/auto_deallocator.d It's very useful, but it seems the name doesn't do it justice. Also, I need two more good names: one for what's now called "porcelain" - high-level typed interface for allocators, and one for "best of Beatles" (not defined yet) - a module collecting a number of canned good allocator designs by connecting together components. Thanks, Andrei
Re: std.parallelism equivalents for posix fork and multi-machine processing
On Thursday, 14 May 2015 at 20:56:16 UTC, Ola Fosheim Grøstad wrote: On Thursday, 14 May 2015 at 20:28:20 UTC, Laeeth Isharc wrote: My own is a pragmatic commercial one. I have some problems which perhaps scale quite well, and rather than write it using fork directly, I would rather have a higher level wrapper along the lines of std.parallelism. Languages like Chapel and extended versions of C++ have built in support for parallel computing that is relatively effortless and designed by experts (Cray/IBM etc) to cover common patterns in demanding batch processing for those who wants something higher level than plain C++ (or in this case D which is pretty much the same thing). Yes - I am sure that there is excellent stuff here, from which one may learn much: especially if approaching it from a more theoretical or enterprisey industrial scale perspective. However, you could consider combining single threaded processes in D with e.g. Python as a supervising process if the datasets allow it. You'll find lots of literature on Inter Process Communication (IPC) for Unix. Performance will be lower, but your own productivity might be higher, YMMV. But why would one use python when fork itself isn't hard to use in a narrow sense, and neither is the kind of interprocess communication I would like to do for the kind of tasks I have in mind. It just seems to make sense to have a light wrapper. Just because some problems in parallel processing are hard doesn't seem to me a reason not to do some work on addressing the easier ones that may in a practical sense have great value in having an imperfect (but real) solution for. Sometimes I have the sense when talking with you that the answer to any question is anything but D! ;) (But I am sure I must be mistaken!) Perhaps such would be flawed and limited, but often something is better than nothing, even if not perfect. And I mention it on the forum only because usually I have found the problems I face turn out to be those faced by many others too.. You need momentum in order to get from a raw state to something polished, so you essentially need a larger community that both have experience with the topic and a need for it in order to get a sensible framework that is maintained. True. But we are not speaking of getting from a raw state to perfection but just starting to play with the problem. If Walter Bright had listened to well-intentioned advice, he wouldn't be in the compiler business, let alone have given us what became D. I am no Walter Bright, but this is an easier problem to start exploring, and this would be beyond the scope of anything I would do just by myself. If you can get away with it, the most common simplistic approach seems to be map-reduce. Because it is easy to distribute over many machines and there are frameworks that do the tedious bits for you. Yes, indeed. But my question was more about the distinctions between processes and threads and the non-obvious implications for the design of such a framework. Nice chatting. Laeeth.
Re: rvalue references
On Thu, 14 May 2015 16:12:36 -0400, Namespace wrote: Don't ask me, I'm just a little light here. But I think it's because 'in' means 'const scope' and as you said, scope is out. ;) Which means 'in' is available! ;) Bit
Re: D casually mentioned and dismissed + a suggestion
On 05/14/2015 03:20 PM, Dragos Carp wrote: Dragos [1] http://funkwerk-itk.com/funkwerk_itk_de/imagepool/jobs/SoftwareEntwickler.pdf Added: http://wiki.dlang.org/Jobs Ali
Re: D casually mentioned and dismissed + a suggestion
On Thursday, 14 May 2015 at 16:28:01 UTC, Andrei Alexandrescu wrote: On 5/14/15 8:14 AM, Dragos Carp wrote: On Wednesday, 13 May 2015 at 15:24:02 UTC, Andrei Alexandrescu wrote: It should be easy to update by the community, so a wiki might be a good start. So I saw three links, any others? -- Andrei My company have 2-3 positions open in Munich, unfortunately the current job listing is just in German. I'll see if I can get one also in English. Dragos Sorry, I've forgotten your company's name. What is it? -- Andrei Funkwerk Aktiengesellschaft, Traffic & Control Communication http://funkwerk-itk.com/funkwerk_itk_en/ The job posting [1] is not targeted for people knowing D already, if necessary a training period is allowed. Dragos [1] http://funkwerk-itk.com/funkwerk_itk_de/imagepool/jobs/SoftwareEntwickler.pdf
Re: std.parallelism equivalents for posix fork and multi-machine processing
On Thursday, 14 May 2015 at 20:28:20 UTC, Laeeth Isharc wrote: My own is a pragmatic commercial one. I have some problems which perhaps scale quite well, and rather than write it using fork directly, I would rather have a higher level wrapper along the lines of std.parallelism. Languages like Chapel and extended versions of C++ have built in support for parallel computing that is relatively effortless and designed by experts (Cray/IBM etc) to cover common patterns in demanding batch processing for those who wants something higher level than plain C++ (or in this case D which is pretty much the same thing). However, you could consider combining single threaded processes in D with e.g. Python as a supervising process if the datasets allow it. You'll find lots of literature on Inter Process Communication (IPC) for Unix. Performance will be lower, but your own productivity might be higher, YMMV. Perhaps such would be flawed and limited, but often something is better than nothing, even if not perfect. And I mention it on the forum only because usually I have found the problems I face turn out to be those faced by many others too.. You need momentum in order to get from a raw state to something polished, so you essentially need a larger community that both have experience with the topic and a need for it in order to get a sensible framework that is maintained. If you can get away with it, the most common simplistic approach seems to be map-reduce. Because it is easy to distribute over many machines and there are frameworks that do the tedious bits for you. If you have any thoughts on what should be considered, I would very much appreciate them. (And I owe you a response on our last suspended discussion, but haven't had time of late). Nah, you owe me nothing ;-). And I also have no time atm. ;-) Ola.
Re: std.parallelism equivalents for posix fork and multi-machine processing
On Thursday, 14 May 2015 at 20:15:38 UTC, Ola Fosheim Grøstad wrote: On Thursday, 14 May 2015 at 20:06:55 UTC, Laeeth Isharc wrote: To start the process off (because small beginnings are better than no beginning): what are the key features of processes vs threads one would need to bear in mind when designing such a thing? Because I spent the past couple of decades in a different field, multiprocessing passed me by, so I am only now slowly catching up. "nobody" understands multiprocessing. Or rather… you need to understand the hardware and the concrete problem space first. There are no general solutions. Yes, I certainly understand that it is a highly specialist and complex area where the best minds in the world have not yet the answers. So if one were addressing the problem from a computer science academic perspective, then perhaps one will arrive at a different answer. My own is a pragmatic commercial one. I have some problems which perhaps scale quite well, and rather than write it using fork directly, I would rather have a higher level wrapper along the lines of std.parallelism. Perhaps such would be flawed and limited, but often something is better than nothing, even if not perfect. And I mention it on the forum only because usually I have found the problems I face turn out to be those faced by many others too.. If you have any thoughts on what should be considered, I would very much appreciate them. (And I owe you a response on our last suspended discussion, but haven't had time of late). Laeeth.
Re: std.parallelism equivalents for posix fork and multi-machine processing
On Thursday, 14 May 2015 at 20:06:55 UTC, Laeeth Isharc wrote: To start the process off (because small beginnings are better than no beginning): what are the key features of processes vs threads one would need to bear in mind when designing such a thing? Because I spent the past couple of decades in a different field, multiprocessing passed me by, so I am only now slowly catching up. "nobody" understands multiprocessing. Or rather… you need to understand the hardware and the concrete problem space first. There are no general solutions.
Re: rvalue references
Don't ask me, I'm just a little light here. But I think it's because 'in' means 'const scope' and as you said, scope is out. ;)
Re: std.parallelism equivalents for posix fork and multi-machine processing
On Thursday, 14 May 2015 at 10:15:48 UTC, Daniel Murphy wrote: "Laeeth Isharc" wrote in message news:ejbhesbstgazkxnpv...@forum.dlang.org... Is there value to having equivalents to the std.parallelism approach that works with processes rather than threads, and makes it easy to manage tasks over multiple machines? I took a look at std.parallelism and it's beyond what I can do for now. But it seems like this might be a useful project, and not one of unmanageable difficulty... Yes, there is enormous value. It's just waiting for someone to do it. To start the process off (because small beginnings are better than no beginning): what are the key features of processes vs threads one would need to bear in mind when designing such a thing? Because I spent the past couple of decades in a different field, multiprocessing passed me by, so I am only now slowly catching up.
Re: rvalue references
On Thursday, 14 May 2015 at 20:02:29 UTC, bitwise wrote: On Thu, 14 May 2015 13:15:34 -0400, Namespace wrote: On Thursday, 14 May 2015 at 16:53:04 UTC, bitwise wrote: If it were up to me, I would say: 'scope' should be removed as a storage class, 'ref' should be left as is, and 'in' should adopt the behavior of 'ref' post DIP25 Bit As Andrei said several times (recently here: http://forum.dlang.org/thread/scaufixfdyyrbmijg...@forum.dlang.org?page=3#post-mit5lp:241kpt:241:40digitalmars.com) auto ref will take care about rvalue references. I've only hoped that I could get a schedule for that or at least a confirmation. :) If I understand Andrei's response correctly though, you will still have to use 'auto ref' to get ref to bind to rvalues.. no? Yes, that's what I said. :) Besides, it would be horrible if rvalues could be bound to normal ref. So if I'm right about the above, and scope is out, why not just use 'in' instead of 'auto ref'? Bit Don't ask me, I'm just a little light here.
Re: std.parallelism equivalents for posix fork and multi-machine processing
On Thursday, 14 May 2015 at 16:33:46 UTC, John Colvin wrote: On Wednesday, 13 May 2015 at 20:34:24 UTC, weaselcat wrote: On Wednesday, 13 May 2015 at 20:28:02 UTC, Laeeth Isharc wrote: Is there value to having equivalents to the std.parallelism approach that works with processes rather than threads, and makes it easy to manage tasks over multiple machines? I'm not sure if you're asking because of this thread, but see http://forum.dlang.org/thread/tczkndtepnvppggzm...@forum.dlang.org#post-tczkndtepnvppggzmews:40forum.dlang.org python outperforming D because it doesn't have to deal with synchronization headaches. I found D to be way faster when reimplemented with fork, but having to use the stdc API is ugly(IMO) It was also easy to get D very fast by just being a little more eager with IO and reducing the enormous number of little allocations being made. Yes - thank you for your highly educational rewrite, which I personally very much appreciate your taking the trouble to do. Perhaps this should be turned (by you or someone else) into a mini case-study on the wiki of how to write idiomatic and efficient D code. Or maybe just put up the slides from your forthcoming talk (which I look forward to watching later when it is up). It's good to know D can in fact deliver on the implicit promise in a real use case with not too much work. (Yes, naively written code was a bit slow when dealing with millions of lines, but in which language of comparable flexibility would that not be true). It's also interesting that your code was idiomatic. (I was reading up about Scala, which seems beautiful in many ways, but it is terribly disturbing to see that the idiomatic way often seems to be the most inefficient, at least as things stood a couple of years ago). But, even so, I think having a wrapper for fork and an API for multiprocessing (which you could then hook up to eg the Digital Ocean, AWS apis etc) would be rather helpful. I spoke with a friend of mine at one of the most admired/hated Wall Street firms. One of the smartest quants I know who has now moved to portfolio management. He was doing a study on tick data going back to 2000. I asked him how long it took to run on his firm's infrastructure. An hour! And the operations were pretty simple. I think it should only take a couple of minutes. And it would be nice to show an example of - from a spreadsheet - spinning up 100 digital ocean instances - and running the numbers not just on one security, but every relevant security, and having a nice summary appear back in the sheet within a couple of minutes. The reason speed matters is that long waits interfere with rapid iteration and the creative thought process. In a market environment you may well have forgotten what you wanted after an hour... Laeeth.
Re: rvalue references
On Thu, 14 May 2015 13:15:34 -0400, Namespace wrote: On Thursday, 14 May 2015 at 16:53:04 UTC, bitwise wrote: If it were up to me, I would say: 'scope' should be removed as a storage class, 'ref' should be left as is, and 'in' should adopt the behavior of 'ref' post DIP25 Bit As Andrei said several times (recently here: http://forum.dlang.org/thread/scaufixfdyyrbmijg...@forum.dlang.org?page=3#post-mit5lp:241kpt:241:40digitalmars.com) auto ref will take care about rvalue references. I've only hoped that I could get a schedule for that or at least a confirmation. :) If I understand Andrei's response correctly though, you will still have to use 'auto ref' to get ref to bind to rvalues.. no? So if I'm right about the above, and scope is out, why not just use 'in' instead of 'auto ref'? Bit
Re: Thoughts about the ideal programming language
On Wednesday, 13 May 2015 at 18:59:42 UTC, Dennis Ritchie wrote: Hi, I think that many will find something interesting in this article: - https://translate.google.ru/translate?hl=ru&sl=ru&tl=en&u=http%3A%2F%2Fhabrahabr.ru%2Fpost%2F257875%2F - Sorry translated using google translate. Can few to say regarding your thoughts, but need to mention that that site is the only significant one I am aware of with anti-technical, inflated, self - important culture of discussion (this has nothing to do with your post particular).
Re: Need a JQuery plugin for D
On Thursday, 14 May 2015 at 18:23:47 UTC, Wyatt wrote: On Thursday, 14 May 2015 at 18:09:06 UTC, extrawurst wrote: On Tuesday, 12 May 2015 at 15:53:53 UTC, Walter Bright wrote: https://i.stack.imgur.com/ssRUr.gif I hope this is fake!? Look at the sidebar stuff. It's clearly a joke. (From about two years ago, I think?) I've seen this joke several times and this is the first time I looked at the sidebar. It's even more hilarious than the main joke! "Is there a jQuery plugin for making an html page appear in the browser?"
Re: std.allocator: plea for contributions
On 5/13/15 2:19 PM, Atila Neves wrote: Tried to, couldn't get it to compile with git HEAD. Could you please post the dmd and druntime git hashes, or are those forks as well? Thanks for looking into it! Here's what I have: dmd - acbe13ee54e024c0bba044d1146e244a5ea57502 druntime - 18d57ffe3eed8674ca2052656bb3f410084379f6 I haven't rebased phobos in a while, maybe that's the matter. What errors are you getting? Thanks, Andrei
Re: Let's improve D's exceptions
On 5/14/15 6:12 AM, Jacob Carlborg wrote: On 2015-05-14 00:55, Steven Schveighoffer wrote: enforce is one of the most needless pieces of phobos: enforce(cond, message); vs. if(!cond) throw new Exception(message); And the second doesn't mess up inlining. I think enforce could be boiler-plated better. The only verbose part of the if version is the throwing and newing. template throe(Etype = Exception) { void throe(Args...)(Args args, string file = __FILE__, size_t line = __LINE__) { throw new Etype(args, file, line); } } if(!cond) throe(message); Now you're back to the same problem as "enforce" has. That it throws Exception by default. It shouldn't have a default value for the exception type. Sure, but I wasn't arguing about that. I just don't like the utility of enforce completely -- it provides very little value, and kills inlining. BTW, it could be called "raise" as it's called in some other languages. My symbol wasn't intended as a proposal, just something that sounds like "throw" but without using the keyword :) raise would be fine. Wait, you're in an io package, and you want to always throw IO exceptions? alias except = throe!IOException; if(!cond) except(args, to, ioexception); That is a bit better but I still think that IOException is too generic. Streaming something over the network and trying to open a file is quite different. It was just an example, you can use whatever exception you want. -Steve
Re: A few thoughts on std.allocator
On 5/13/15 8:00 PM, Jakob Ovrum wrote: On Wednesday, 13 May 2015 at 17:49:38 UTC, Steven Schveighoffer wrote: OK, then consider that this: void main() { string x; x ~= "hello"; x ~= " world"; } would require locking. That's unacceptable. Nobody would append with strings if this all required locking for no reason. The runtime currently does NOT lock for this case, it considers immutable and const to be thread-local. Well, it's necessary because the design of druntime arrays is incompatible with D2's type system. Without locking, multi-threaded applications that use dynamic array operations could easily contain some particularly hard to track concurrency bugs. I don't think we should go there. I would say it's very unlikely to have this bug occur, but you are right it could occur. I just don't think destroying append performance for all const and immutable array types is worth it to fix the bug opportunity. No, I think the answer is simpler. Introduce shared(immutable), and then we can distinguish between immutable data that is shared and data that is not shared. It also makes implementing local heaps easier. Shared really is orthogonal to mutability. Basically, shared(immutable(T)) would only be useful to allocators, including arrays because they may need to allocate when growing. I don't think it would be useful beyond that; the sharedness of immutable data is probably not interesting to any other kind of code. Yes, it really only matters for cases where the immutable pointer can be used to obtain mutable data. But these are important cases. The fact that most code doesn't share *at all*, makes it less of an issue. Perhaps we need some way to indicate that when an array is shared, it can no longer be appended in-place. It would be as simple as flipping the APPENDABLE bit. The problem is, you're not always passing the immutable array directly. It would make immutable considerably harder to use than it is today. shared(immutable(T)) would be implicitly convertible to shared(const(T)), but not const(T), which precludes the vast majority of mutation-agnostic D code out there today (I have never seen shared(const(T)) used in the wild). We would no longer be able to do even the simplest things, like passing a path string to another thread and use std.file.read on it. Yeah, there is no attribute that takes shared/unshared. I don't know a good solution to that, and I understand that shared(immutable) screws up most usages for immutable. It's not a good answer. The problem is that when you share an immutable pointer, it changes the rules for that pointer, but no type information has been altered. It's impossible to track. I think the idea of making immutable not shared by default is probably not a good answer, but I don't know of a good one. I have a feeling whatever answer we choose is going to be really painful :( -Steve
Re: Thoughts about the ideal programming language
On Thursday, 14 May 2015 at 06:02:37 UTC, thedeemon wrote: On Wednesday, 13 May 2015 at 18:59:42 UTC, Dennis Ritchie wrote: http%3A%2F%2Fhabrahabr.ru%2Fpost%2F257875%2F Just some usual C++ critique and very vague basic principles about having a core language with some extensions and library support, nothing constructive or informative really. I generally agree with you. But his idea of language extension looks very nice, and as I think is similar to tendency in D make some features part of library (e.g. octal numbers, complex numbers). And verbalize such concept can make this tendency sharper and clearer and possible more productive. The last Andrej proposal for allocators may become example of such "language extension". D specifies interface of allocators and introduce reference implementation, but for example embeded D provide other implementation.
Re: Need a JQuery plugin for D
On Thursday, 14 May 2015 at 18:09:06 UTC, extrawurst wrote: On Tuesday, 12 May 2015 at 15:53:53 UTC, Walter Bright wrote: https://i.stack.imgur.com/ssRUr.gif I hope this is fake!? Look at the sidebar stuff. It's clearly a joke. (From about two years ago, I think?)
Re: rvalue references
On Thursday, 14 May 2015 at 17:50:35 UTC, Andrei Alexandrescu wrote: On 5/14/15 10:15 AM, Namespace wrote: But interesting question, what will happen with scope, now that we have return ref. Evaluate its merit once we have everything else in. -- Andrei Short and meaningful. Thank you.
Re: Need a JQuery plugin for D
On Tuesday, 12 May 2015 at 15:53:53 UTC, Walter Bright wrote: https://i.stack.imgur.com/ssRUr.gif I hope this is fake!?
Re: D casually mentioned and dismissed + a suggestion
On 5/13/2015 9:24 AM, Andrei Alexandrescu wrote: On 5/13/15 8:26 AM, Vladimir Panteleev wrote: So do we want a front page widget that's hosted on the wiki? That would be a good idea generally though it opens the site for vandalism. I'd say we start with a wiki page and work from there. -- Andrei I agree.
Re: rvalue references
On 5/14/15 10:15 AM, Namespace wrote: But interesting question, what will happen with scope, now that we have return ref. Evaluate its merit once we have everything else in. -- Andrei
Re: rvalue references
On Thursday, 14 May 2015 at 16:53:04 UTC, bitwise wrote: On Thu, 14 May 2015 02:56:46 -0400, Namespace wrote: On Thursday, 14 May 2015 at 00:12:05 UTC, bitwise wrote: Side note: DIP36 seems to be missing the table with the authors, status, etc. Bit Huh, DIP36? DIP36 was rejected, but the authors (me and Dicebot) are below. Hmm.. so they are ;) I've heard that DIP69 is [quote]almost dead in favor of DIP25[/quote]. That's why I'm a bit confused and would like to know the scheme, if any. :) Makes sense, but if scope is dead, I assume it would have to be removed at some point. So I guess 'ref' could just take rvalues now that it's escape-proof right? Also, what becomes of the 'in' storage class? being just another word for 'const' seems like a waste. If it were up to me, I would say: 'scope' should be removed as a storage class, 'ref' should be left as is, and 'in' should adopt the behavior of 'ref' post DIP25 Bit As Andrei said several times (recently here: http://forum.dlang.org/thread/scaufixfdyyrbmijg...@forum.dlang.org?page=3#post-mit5lp:241kpt:241:40digitalmars.com) auto ref will take care about rvalue references. I've only hoped that I could get a schedule for that or at least a confirmation. :) But interesting question, what will happen with scope, now that we have return ref.
Re: rvalue references
On Thu, 14 May 2015 02:56:46 -0400, Namespace wrote: On Thursday, 14 May 2015 at 00:12:05 UTC, bitwise wrote: Side note: DIP36 seems to be missing the table with the authors, status, etc. Bit Huh, DIP36? DIP36 was rejected, but the authors (me and Dicebot) are below. Hmm.. so they are ;) I've heard that DIP69 is [quote]almost dead in favor of DIP25[/quote]. That's why I'm a bit confused and would like to know the scheme, if any. :) Makes sense, but if scope is dead, I assume it would have to be removed at some point. So I guess 'ref' could just take rvalues now that it's escape-proof right? Also, what becomes of the 'in' storage class? being just another word for 'const' seems like a waste. If it were up to me, I would say: 'scope' should be removed as a storage class, 'ref' should be left as is, and 'in' should adopt the behavior of 'ref' post DIP25 Bit
Re: std.parallelism equivalents for posix fork and multi-machine processing
On Wednesday, 13 May 2015 at 20:34:24 UTC, weaselcat wrote: On Wednesday, 13 May 2015 at 20:28:02 UTC, Laeeth Isharc wrote: Is there value to having equivalents to the std.parallelism approach that works with processes rather than threads, and makes it easy to manage tasks over multiple machines? I'm not sure if you're asking because of this thread, but see http://forum.dlang.org/thread/tczkndtepnvppggzm...@forum.dlang.org#post-tczkndtepnvppggzmews:40forum.dlang.org python outperforming D because it doesn't have to deal with synchronization headaches. I found D to be way faster when reimplemented with fork, but having to use the stdc API is ugly(IMO) It was also easy to get D very fast by just being a little more eager with IO and reducing the enormous number of little allocations being made.
Re: D casually mentioned and dismissed + a suggestion
On 5/14/15 8:14 AM, Dragos Carp wrote: On Wednesday, 13 May 2015 at 15:24:02 UTC, Andrei Alexandrescu wrote: It should be easy to update by the community, so a wiki might be a good start. So I saw three links, any others? -- Andrei My company have 2-3 positions open in Munich, unfortunately the current job listing is just in German. I'll see if I can get one also in English. Dragos Sorry, I've forgotten your company's name. What is it? -- Andrei
Re: D casually mentioned and dismissed + a suggestion
On 5/14/15 7:02 AM, Liran Zvibel wrote: On Wednesday, 13 May 2015 at 16:24:12 UTC, Andrei Alexandrescu wrote: On 5/13/15 8:26 AM, Vladimir Panteleev wrote: So do we want a front page widget that's hosted on the wiki? That would be a good idea generally though it opens the site for vandalism. I'd say we start with a wiki page and work from there. -- Andrei We don't have any publicly available job listing for D, but we would like to also have an entry in that wiki once you create it. We're always on the look for good engineers, and D is our main development language. Liran Added to http://wiki.dlang.org/Jobs, feel free to edit (e.g. I didn't know the city). -- Andrei
Re: D casually mentioned and dismissed + a suggestion
On Thursday, 14 May 2015 at 15:14:25 UTC, Dragos Carp wrote: On Wednesday, 13 May 2015 at 15:24:02 UTC, Andrei Alexandrescu wrote: It should be easy to update by the community, so a wiki might be a good start. So I saw three links, any others? -- Andrei My company have 2-3 positions open in Munich, unfortunately the current job listing is just in German. I'll see if I can get one also in English. Dragos Have you posted it here? There are German users as well.
Re: Breaking changes in Visual C++ 2015
On 14 May 2015 at 17:40, Johannes Pfau via Digitalmars-d wrote: > Am Thu, 14 May 2015 15:00:32 + > schrieb "Victor" : > >> I think that besides all problems D have, the only one that >> mattered most and never was fixed was proper ARM support. > > "proper arm support" depends on your definition of "arm support". GDC > supports ARM/GLibc/Linux just as well as X86/GlibC/Linux. Only > ARM/Android, ARM/iOS and ARM/BareMetal are not supported. That's more > an OS than processor architecture thing though. We still have one disrepency in runtime though (LTR vs. RTL): https://github.com/D-Programming-Language/dmd/pull/4035 I say that, however, there are infact two discrepencies (this exists on GDC x86 vs DMD x86): https://github.com/D-Programming-Language/dmd/pull/3670 I'll be happy the day DMD stops using it's own (non-conforming to spec) ABI. Iain.
Re: Breaking changes in Visual C++ 2015
Am Thu, 14 May 2015 15:00:32 + schrieb "Victor" : > I think that besides all problems D have, the only one that > mattered most and never was fixed was proper ARM support. "proper arm support" depends on your definition of "arm support". GDC supports ARM/GLibc/Linux just as well as X86/GlibC/Linux. Only ARM/Android, ARM/iOS and ARM/BareMetal are not supported. That's more an OS than processor architecture thing though.
Re: D casually mentioned and dismissed + a suggestion
On Wednesday, 13 May 2015 at 15:24:02 UTC, Andrei Alexandrescu wrote: It should be easy to update by the community, so a wiki might be a good start. So I saw three links, any others? -- Andrei My company have 2-3 positions open in Munich, unfortunately the current job listing is just in German. I'll see if I can get one also in English. Dragos
Re: Breaking changes in Visual C++ 2015
I think that besides all problems D have, the only one that mattered most and never was fixed was proper ARM support. Since dmd 1 I'm dreaming to ditch C++ for D on game development but this day never comes as it seems that there's always priorities(mostly justified) that postpone this. So I had to move to rust, which I'm my opinion is a subpar language comparing with D, but at least is moving on this direction.
Re: Need a JQuery plugin for D
On 05/12/2015 11:54 AM, Walter Bright wrote: https://i.stack.imgur.com/ssRUr.gif That is hilarious. And disturbing ;)
Re: D casually mentioned and dismissed + a suggestion
On Thursday, 14 May 2015 at 14:37:03 UTC, weaselcat wrote: On Thursday, 14 May 2015 at 14:33:13 UTC, Vladimir Panteleev wrote: http://wiki.dlang.org/Jobs I think EMSI is in Moscow, Idaho. Err, fixed.
Re: Breaking changes in Visual C++ 2015
On Thursday, 14 May 2015 at 13:22:21 UTC, Chris wrote: However, the data comes from somewhere outside the program, and although you can IoC most parts of a program _after_ it's been fed the data, the initial input section is not easily unit tested (i.e. unit test in D). Gathering parts together is integration point, and unit tests don't test integration. In your example you would be able to test the Process class. If you are unsure Loader can't parse files - that can be tested without files, streams are enough.
Re: D casually mentioned and dismissed + a suggestion
On Thursday, 14 May 2015 at 14:33:13 UTC, Vladimir Panteleev wrote: On Thursday, 14 May 2015 at 14:02:38 UTC, Liran Zvibel wrote: On Wednesday, 13 May 2015 at 16:24:12 UTC, Andrei Alexandrescu wrote: On 5/13/15 8:26 AM, Vladimir Panteleev wrote: So do we want a front page widget that's hosted on the wiki? That would be a good idea generally though it opens the site for vandalism. So does the "latest announcements" ticker, and we haven't had any incidents so far. Unlike with the forum, anyone can revert wiki vandalism, and wiki admins can protect pages. I'd say we start with a wiki page and work from there. -- Andrei We don't have any publicly available job listing for D, but we would like to also have an entry in that wiki once you create it. We're always on the look for good engineers, and D is our main development language. Let's get this started, then: http://wiki.dlang.org/Jobs I found two older job postings on the forum, not sure if they're still valid: http://forum.dlang.org/post/uzemmpgbmdepdbyee...@forum.dlang.org http://forum.dlang.org/post/fqof9i$1ge6$1...@digitalmars.com I think EMSI is in Moscow, Idaho.
Re: D casually mentioned and dismissed + a suggestion
On Thursday, 14 May 2015 at 14:02:38 UTC, Liran Zvibel wrote: On Wednesday, 13 May 2015 at 16:24:12 UTC, Andrei Alexandrescu wrote: On 5/13/15 8:26 AM, Vladimir Panteleev wrote: So do we want a front page widget that's hosted on the wiki? That would be a good idea generally though it opens the site for vandalism. So does the "latest announcements" ticker, and we haven't had any incidents so far. Unlike with the forum, anyone can revert wiki vandalism, and wiki admins can protect pages. I'd say we start with a wiki page and work from there. -- Andrei We don't have any publicly available job listing for D, but we would like to also have an entry in that wiki once you create it. We're always on the look for good engineers, and D is our main development language. Let's get this started, then: http://wiki.dlang.org/Jobs I found two older job postings on the forum, not sure if they're still valid: http://forum.dlang.org/post/uzemmpgbmdepdbyee...@forum.dlang.org http://forum.dlang.org/post/fqof9i$1ge6$1...@digitalmars.com
Re: Let's improve D's exceptions
On Thursday, 14 May 2015 at 12:39:59 UTC, Adam D. Ruppe wrote: On Thursday, 14 May 2015 at 10:29:57 UTC, Kagamin wrote: Maybe also replace file name with ModuleInfo similar to how assert works? Those bug me because all it really wants from it is the name and then you need all the moduleinfo even in bare metal. AFAIK, ModuleInfo is only 8 bytes + module name. Exception support requires some RTTI anyway so maybe it doesn't matter, but my playing with bare metal has made me really prefer the filename versions over the moduleinfo versions... ModuleInfo is primarily to extract module name and use it instead of file name, you can use module name directly if you don't like full ModuleInfo.
Re: D casually mentioned and dismissed + a suggestion
On Wednesday, 13 May 2015 at 16:24:12 UTC, Andrei Alexandrescu wrote: On 5/13/15 8:26 AM, Vladimir Panteleev wrote: So do we want a front page widget that's hosted on the wiki? That would be a good idea generally though it opens the site for vandalism. I'd say we start with a wiki page and work from there. -- Andrei We don't have any publicly available job listing for D, but we would like to also have an entry in that wiki once you create it. We're always on the look for good engineers, and D is our main development language. Liran
[OT] Slogan for this Forum
Arguing with an engineer is a lot like wrestling in the mud with a pig. After a few hours, you realize that he likes it. :-)
Re: Breaking changes in Visual C++ 2015
On Wednesday, 13 May 2015 at 08:26:35 UTC, Kagamin wrote: On Monday, 11 May 2015 at 09:31:34 UTC, Chris wrote: Hm, I was thinking of something like that, however, it gets more and more complicated if you have e.g. a class that uses another class etc. class Data // A singleton { // stores paths to resources etc. } class Loader { this() this.data = Data.getInstance(); // Loads files and caches them in memory } class Process { // Uses cached data } It ain't easy to unit test Process, but even Loader and Data can be tricky to unit test, because all of them depend on input from the outside. That's the reason for IoC design; it's similar to ranges in a sense that you feed the range with data instead of letting it figure out where to get that data on its own. However, the data comes from somewhere outside the program, and although you can IoC most parts of a program _after_ it's been fed the data, the initial input section is not easily unit tested (i.e. unit test in D). Unit tests only work for the data processing logic inside a unit after the program has received the data from the outside. But the initial acquisition of data is outside the scope of these unit tests. Thus, there are always bits and pieces that cannot be unit-tested like e.g. loading files.
Re: Let's improve D's exceptions
On Thursday, 14 May 2015 at 12:26:45 UTC, w0rp wrote: I wonder if enforce should throw an Error instead, if it exists at all. Because it's designed to throw an exception you shouldn't catch. Is it really? My thought of enforce was it iwas just a lazy way to throw on cases like file not found...
Re: Let's improve D's exceptions
On Thursday, 14 May 2015 at 10:29:57 UTC, Kagamin wrote: Maybe also replace file name with ModuleInfo similar to how assert works? Those bug me because all it really wants from it is the name and then you need all the moduleinfo even in bare metal. Exception support requires some RTTI anyway so maybe it doesn't matter, but my playing with bare metal has made me really prefer the filename versions over the moduleinfo versions...
Re: Let's improve D's exceptions
On Thursday, 14 May 2015 at 10:24:45 UTC, Ola Fosheim Grøstad wrote: Using alias like this makes code hard to read. Error types should be humanly deducible at the failure site. Perhaps, I don't hate it too much here though because the alias is fairly local. Without it, you'd probably write enforce!(BaseClass, fopen)("file", "rb") to get the thing I was going for. You'd be better off having non-ignorable result types (e.g. tagged union/variant/algebraic) and a typed way to turn those into exceptions. The only place where I'd be interested in using something like this is calling F functions and you can't change their signature too much...
Re: Let's improve D's exceptions
On Thursday, 14 May 2015 at 10:08:36 UTC, Jacob Carlborg wrote: It was a while since I looked at that DIP, but I'm mostly interested in the hierarchy. I think hierarchies will get better too if there were more incentive to use them - data members instead of string concat encourages new classes and you want to inherit from something... then if there's not a million lines of boilerplate for a new class, it gets to be a lot easier to do.
Re: Let's improve D's exceptions
I wonder if enforce should throw an Error instead, if it exists at all. Because it's designed to throw an exception you shouldn't catch. If you are going to have it throw an Exception subclass, then it should take the exception type, like enforce!WhateverException(...), or something.
Re: Thoughts about the ideal programming language
On Thursday, 14 May 2015 at 06:02:37 UTC, thedeemon wrote: On Wednesday, 13 May 2015 at 18:59:42 UTC, Dennis Ritchie wrote: http%3A%2F%2Fhabrahabr.ru%2Fpost%2F257875%2F Just some usual C++ critique and very vague basic principles about having a core language with some extensions and library support, nothing constructive or informative really. The author develops his own ideal programming language and is based on his tongue D. Actually, currently the best candidate for the common languages - this is D, which proves this article. "I agree completely. I among evernote-notes, where I keep the idea of the differences in programming languages, rather big section is dedicated IDE; the design language to take into account a bunch of IDE (in particular, the syntax of the language should be structured in such a way that it is convenient to work avtokompilitu, Tree Builder classes and other tools IDE, which should work "on the fly"); I did point out specific recommendations to the IDE, by organizing projects, etc., which are usually in the language is not included. And one of the first things with which I began experimenting with my compiler (fork D) - is to write a simple IDE for Qt and do visualizer AST (and then will visualizers all transformations within the compiler, up to the code generator). That is not only to use the compiler, but even without it razrarabyvat GUI uncomfortable."
Re: Let's improve D's exceptions
On Wednesday, 13 May 2015 at 15:08:58 UTC, Adam D. Ruppe wrote: * File and line is set at the throw point instead of the construction point. Maybe also replace file name with ModuleInfo similar to how assert works?
Re: Let's improve D's exceptions
On Thursday, 14 May 2015 at 01:31:22 UTC, Adam D. Ruppe wrote: The local alias tells which kind of exception is relevant in this context. Then the local enforce collects the arguments to the function and throws a new subclass of the base specific to this function call. Using alias like this makes code hard to read. Error types should be humanly deducible at the failure site. You'd be better off having non-ignorable result types (e.g. tagged union/variant/algebraic) and a typed way to turn those into exceptions.
Re: std.parallelism equivalents for posix fork and multi-machine processing
"Laeeth Isharc" wrote in message news:ejbhesbstgazkxnpv...@forum.dlang.org... Is there value to having equivalents to the std.parallelism approach that works with processes rather than threads, and makes it easy to manage tasks over multiple machines? I took a look at std.parallelism and it's beyond what I can do for now. But it seems like this might be a useful project, and not one of unmanageable difficulty... Yes, there is enormous value. It's just waiting for someone to do it.
Re: Let's improve D's exceptions
On 2015-05-14 00:55, Steven Schveighoffer wrote: enforce is one of the most needless pieces of phobos: enforce(cond, message); vs. if(!cond) throw new Exception(message); And the second doesn't mess up inlining. I think enforce could be boiler-plated better. The only verbose part of the if version is the throwing and newing. template throe(Etype = Exception) { void throe(Args...)(Args args, string file = __FILE__, size_t line = __LINE__) { throw new Etype(args, file, line); } } if(!cond) throe(message); Now you're back to the same problem as "enforce" has. That it throws Exception by default. It shouldn't have a default value for the exception type. BTW, it could be called "raise" as it's called in some other languages. Wait, you're in an io package, and you want to always throw IO exceptions? alias except = throe!IOException; if(!cond) except(args, to, ioexception); That is a bit better but I still think that IOException is too generic. Streaming something over the network and trying to open a file is quite different. Sure, it doesn't return the thing that caused the exception if nothing happens. Grepping phobos, this feature is used with enforce about 1% of the time. In fact, I didn't even know it had that feature until looking it up in the docs just now. -Steve -- /Jacob Carlborg
Re: Let's improve D's exceptions
On 2015-05-14 03:31, Adam D. Ruppe wrote: Yeah, we could use a decent hierarchy too. Though the examples in there still use string concatenation to form the message, which is the big thing I want to get away from. It was a while since I looked at that DIP, but I'm mostly interested in the hierarchy. -- /Jacob Carlborg
Re: Broken contract programing
On Wednesday, 13 May 2015 at 23:49:51 UTC, Idan Arye wrote: That a type system can solve this problem if it supports covariant and contravariant generic/template parameters. Not if someone else provided the super class, and generics simply bypasses the OO-inheritance model. Anyway, the key point was that uses of type systems that are workable (not overly tedious) can only catch the most obvious bugs at compile time. Therefore it is useful to be able to constrain invariants to a point where they ensure correctness, not type-soundness.
Re: rvalue references
On Thursday, 14 May 2015 at 00:12:05 UTC, bitwise wrote: On Tue, 12 May 2015 08:54:15 -0400, Namespace wrote: As far as I know, the problem (or at least one of the biggest problems) for rvalue references was that they could escape. Since DIP25 is approved and already implemented this problem should be solved. Would it be possible to allow rvalues references now? I'm just curious what the mindfactory of D has in mind and what the scheme for that problem is. Side note: DIP36 seems to be missing the table with the authors, status, etc. Bit Huh, DIP36? DIP36 was rejected, but the authors (me and Dicebot) are below. I've heard that DIP69 is [quote]almost dead in favor of DIP25[/quote]. That's why I'm a bit confused and would like to know the scheme, if any. :)