Re: You too can work on D for iOS
On 12/06/2015 6:45 p.m., Nick Sabalausky wrote: On 06/12/2015 12:51 AM, Steven Schveighoffer wrote: The cost is really minimal if you are serious. A Mac Mini costs $500 new, and you get Xcode free. The last two computers I bought were about $340 each. And those are laptops, with screen and battery and everything. In New Zealand a fully upgraded top of the line model (the kind you get from Apply directly) is ~ $4000. For in store top of the line not fully upgraded it is about $3000. Mac Mini ~$1000. Well and truly above exchange rate.
Re: You too can work on D for iOS
On 06/12/2015 12:51 AM, Steven Schveighoffer wrote: The cost is really minimal if you are serious. A Mac Mini costs $500 new, and you get Xcode free. The last two computers I bought were about $340 each. And those are laptops, with screen and battery and everything.
Re: std.allocator is ready for the review
On 2015-06-12 00:18, Andrei Alexandrescu wrote: Code: https://github.com/andralex/phobos/tree/allocator * Your ODBC code seems to be in the same branch * You have commented out some code in std.math and std.traits * What is std.typed_allocator? It doesn't seem to have anything related to allocators, some leftover code? -- /Jacob Carlborg
Re: You too can work on D for iOS
On Friday, 12 June 2015 at 07:57:27 UTC, Adrian Matoga wrote: On Friday, 12 June 2015 at 07:36:51 UTC, Paulo Pinto wrote: The minimum wage in Portugal is around 400€ after taxes, with around 1000€ for many university degrees. You can guess how many go out and buy a Mac. -- Paulo I remember I saw almost every student at IST with a Mac, and when everyone started to talk about the crisis, people were like uhm, well, we can't now afford to replace our Macs with new ones every year, only every other year maybe. IST is one of the best universities in the country. The majority of the students are from middle, upper, claases. Although there are also exceptions, of course. Also many that do buy one, do so with a 3 -5 year long leasing.
Re: You too can work on D for iOS
On Friday, 12 June 2015 at 07:36:51 UTC, Paulo Pinto wrote: The minimum wage in Portugal is around 400€ after taxes, with around 1000€ for many university degrees. You can guess how many go out and buy a Mac. -- Paulo I remember I saw almost every student at IST with a Mac, and when everyone started to talk about the crisis, people were like uhm, well, we can't now afford to replace our Macs with new ones every year, only every other year maybe.
Re: Arch Linux D package update
On Thursday, 11 June 2015 at 20:13:51 UTC, Marco Leise wrote: Am Thu, 04 Jun 2015 14:46:38 + schrieb Dicebot pub...@dicebot.lv: - provides systemd service : `sudo systemctl enable dcd.service` to start automatically upon system startup Is it really a system-wide server? I can see how it might be technically necessary due to how systemd works and how you would need to pass a different IP port for every user. On the other hand, every user can add imports at runtime and shut the server down. They might even have to, if they want to switch projects and clean up the import path list. I will look into making it user-local service (https://wiki.archlinux.org/index.php/Systemd/User), that is simply I currently don't know much about and didn't want to delay update much longer. - provides default /etc/dcd.conf with stdlib paths for Arch Linux Should work so long noone gives root a XDG_CONFIG_HOME or writes to /root/.config/dcd/dcd.conf. Just contemplating if when running as system wide service it should generally read from /etc/[dcd/]dcd.conf instead of user directories. Maybe via a --system option to dcd-server. https://github.com/Hackerpilot/DCD/blob/master/src/server.d#L248 Ideally I think it should merge them all into one path list but simply using global config a fallback worked good enough for now.
Re: What is D's minimum requirements on Mac?
On 2015-06-11 13:34, Kagamin wrote: You can try to register as a developer: https://developer.apple.com/programs/ and get beta versions of OSX and install them on virtual box. Not sure how much it costs. OS X is free, you just need a Mac to download it :) -- /Jacob Carlborg
Re: Coedit 1 gold released
On Friday, 12 June 2015 at 06:25:04 UTC, Jacob Carlborg wrote: On 2015-06-11 17:22, Basile Burg wrote: never mind if you don't succeed. By the way i think that it'll only work with the Carbon interface, so only a 32 bit application: May I ask why? Carbon is obsolete, for Cocoa there's this [1] [2]. [1] http://wiki.freepascal.org/Cocoa_Interface [2] http://wiki.freepascal.org/FPC_PasCocoa Because of the Big Mouth Syndrome. Actually i don't know which is the best choice for the interface. If someone manages to build it that's a good thing. Whatever is the interface. By the way, this person can use the GH bug tracker if there's something not clear.
Re: [OT] Modules dropped out of C++17
On 2015-06-11 14:33, Steven Schveighoffer wrote: OK, I see the problem. When you type 'a.' then if you put up the list of members and UFCS functions available, then that list may be huge (and possibly filled with useless calls). That definitely is an issue. However, I think DCD should still support that option. A UI for an ide could be: 1. Lookup members, add to the list a UFCS... button at the bottom. 2. When user clicks on that button, re-query DCD for all functions that take the object as the first parameter, then fill in that list. 3. If user continues to type in a UFCS method, and that doesn't match any members, the autocomplete should start looking for functions that start with that text. The context of where the user is typing can also help to narrow the result, i.e. int a = b.fo Here it could filter out anything that doesn't return something that is convertible to an int. Or at least sort those to the bottom of the list. -- /Jacob Carlborg
Re: dub : multiple dmd instances
On 2015-06-11 16:08, weaselcat wrote: On Thursday, 11 June 2015 at 14:07:10 UTC, weaselcat wrote: --parallelRuns multiple compiler instances in parallel, if possible. After rereading your question, that actually isn't exactly what you were asking for. Sorry for the noise, I need my coffee. Isn't that what the --parallel flag is for? -- /Jacob Carlborg
Re: Mixin statements
Also a feature that would make this perfect is macro template arguments. Something like void templateFunction(macro a)() { int x = 5; return mixin(a); } Essentially, the expression in the argument would be converted to an expression macro. Calling templateFunction!(x + x)() would return 10 Why would you want this over string mixins? For one, it looks a lot cleaner. Also as its not a string, it cant be changed and the parser need not re-parse it when it gets mixed in, which could be faster than normal string mixins. Also it would allow for mixin macros to look something similar to c++ macros only with the mixin keyword in front of it. Would keep the whole thing clean looking. Example assert doing c style return error codes. mixin macro cassert(macro expression, alias errorcode) { if(!(mixin(expression))) return errorcode; } ... some other piece of code that returns null on error ... mixin cassert(x == 3, null);
Re: You too can work on D for iOS
On Friday, 12 June 2015 at 06:50:01 UTC, Rikki Cattermole wrote: On 12/06/2015 6:45 p.m., Nick Sabalausky wrote: On 06/12/2015 12:51 AM, Steven Schveighoffer wrote: The cost is really minimal if you are serious. A Mac Mini costs $500 new, and you get Xcode free. The last two computers I bought were about $340 each. And those are laptops, with screen and battery and everything. In New Zealand a fully upgraded top of the line model (the kind you get from Apply directly) is ~ $4000. Hm, in Norway the 12core version fully upgraded is 11354USD without a screen… Are you sure you looked at Mac Pro? Mac Mini ~$1000. I get 695USD with no keyboard for 2 cores@1.4Ghz. A 3Ghz mac mini/16GB RAM/256GB SSD is 1775USD and still only *2* cores? I'd rather buy a used 4-core mac mini or go Linux.
Re: Coedit 1 gold released
On 2015-06-11 17:22, Basile Burg wrote: never mind if you don't succeed. By the way i think that it'll only work with the Carbon interface, so only a 32 bit application: May I ask why? Carbon is obsolete, for Cocoa there's this [1] [2]. [1] http://wiki.freepascal.org/Cocoa_Interface [2] http://wiki.freepascal.org/FPC_PasCocoa -- /Jacob Carlborg
Re: You too can work on D for iOS
On Friday, 12 June 2015 at 04:51:29 UTC, Steven Schveighoffer wrote: On 6/11/15 11:47 PM, Joakim wrote: On Friday, 12 June 2015 at 02:13:26 UTC, Dan Olson wrote: Looks like there is no membership fee to build and install your own iOS apps with Xcode now. As usual, you still need a Mac to run Xcode. http://9to5mac.com/2015/06/10/xcode-7-allows-anyone-to-download-build-and-sideload-ios-apps-for-free/ Huh, that's crazy that they don't make the iOS toolchain available outside OS X. The Android toolchain is available for all three major desktop platforms. Still, good that at least you don't have to pay now. You can develop for iOS on other platforms (I think not using objective-c or swift), but you cannot submit an app to the app store without Xcode. Really, I don't see why Apple needs to care about other platforms -- it's their toolchain, their runtime. This makes things very easy for them support-wise, and people still line up to get iPhones, so the incentive to support other platforms isn't really there. At dconf, I'd say at least 50% of the laptops were macs. They are good systems to use. The cost is really minimal if you are serious. A Mac Mini costs $500 new, and you get Xcode free. -Steve The minimum wage in Portugal is around 400€ after taxes, with around 1000€ for many university degrees. You can guess how many go out and buy a Mac. -- Paulo
Re: You too can work on D for iOS
On Friday, 12 June 2015 at 08:46:19 UTC, rsw0x wrote: On Friday, 12 June 2015 at 08:43:39 UTC, Ola Fosheim Grøstad wrote: On Friday, 12 June 2015 at 06:50:01 UTC, Rikki Cattermole wrote: [...] Hm, in Norway the 12core version fully upgraded is 11354USD without a screen… Are you sure you looked at Mac Pro? [...] I get 695USD with no keyboard for 2 cores@1.4Ghz. A 3Ghz mac mini/16GB RAM/256GB SSD is 1775USD and still only *2* cores? I'd rather buy a used 4-core mac mini or go Linux. even in USA their prices are ridiculous for example, the $999 hidpi monitor they sell on their site? you can buy the same exact monitor for ~$250 on ebay directly from the korean manufacturer. I own one, it looks identical to the apple one. Funnily enough, I bought my macbook pro because it was significantly cheaper than anything comparable the competition had to offer.
[Issue 14682] [REG2.037] Incorrect interpretation of ~ []
https://issues.dlang.org/show_bug.cgi?id=14682 --- Comment #12 from Kenji Hara k.hara...@gmail.com --- (In reply to Kenji Hara from comment #3) At a concatenation expression, arr ~ elem is preferred than arr ~ arr2 when elem is implicitly convertible to typeof(arr[i]). In the code, the rhs `[]` is implicitly convertible to typeof(foo) == string. Sorry I was mistaken. Normally D's array concatenation prefers two arrays concat, rather than prepending/appending one element. I noticed a comment in CatExp::semantic explains how the ambiguity should be resolved to. if (tb1next tb2next (tb1next-implicitConvTo(tb2next) = MATCHconst || tb2next-implicitConvTo(tb1next) = MATCHconst ) ) { /* Here to avoid the case of: *void*[] a = [cast(void*)1]; *void*[] b = [cast(void*)2]; *a ~ b; * becoming: *a ~ [cast(void*)b]; */ } And in CatAssignExp::semantic, array appending is already preferred than element appending. int[] a1; int[][] a2; int[][][] a3; import std.stdio; { auto x = a1 ~ []; x.writeln(); } // prints [] { auto x = a2 ~ []; x.writeln(); } // prints [] { auto x = a3 ~ []; x.writeln(); } // prints [] Therefore I can say it's just an implementation bug in dmd. --
Re: What is D's minimum requirements on Mac?
On 2015-06-10 20:55, Adam D. Ruppe wrote: I'm still tempted to grab a used Mac so I can port my display stuff to Cocoa and test it, but Macs are outrageously expensive and I hate them, so want to spend as little as possible. What does dmd minimally require on a mac? If I got like a 10.5 would that work? Maybe, but I wouldn't even try to run it on something lower than 10.6. I haven't tried to run it on anything lower than 10.7 in a couple of years but I would say 10.6 is the absolute minimum requirements. I think we should considering making the requirement 10.7 or later, at some point. Because in 10.7 Apple implemented native TLS. This is also the minimum requirement for LDC. I'm running a OS X 10.7 on Macbook from 2006, it's working perfectly fine. Although the whole computer it's quite slow, it only has 2 GB of RAM. As for running on a PC in a virtual machine, it's quite cumbersome to do, but it's doable. -- /Jacob Carlborg
Re: What is D's minimum requirements on Mac?
On 2015-06-10 20:55, Adam D. Ruppe wrote: i'm considering something like http://www.amazon.com/Apple-MB138LL-Intel-Drive-Combo/dp/B0006HU49Y/ref=sr_1_5?ie=UTF8qid=1433962021sr=8-5keywords=used+mac+mini You can look up the requirements for OS X and see which is the latest version you can run on that particular machine. -- /Jacob Carlborg
Re: dub : multiple dmd instances
On Friday, 12 June 2015 at 07:20:35 UTC, Jacob Carlborg wrote: On 2015-06-11 16:08, weaselcat wrote: On Thursday, 11 June 2015 at 14:07:10 UTC, weaselcat wrote: --parallelRuns multiple compiler instances in parallel, if possible. After rereading your question, that actually isn't exactly what you were asking for. Sorry for the noise, I need my coffee. Isn't that what the --parallel flag is for? As far as I can tell he wants it broken down into equal-sized n chunks of files where n is the number of CPU cores available, and --parallel just runs each file in parallel. I actually hadn't thought of that before, there might be a (big?) benefit from this as dmd is slow to parse per-file. Perhaps decide which files are in the chunks based on dependency analysis. bye.
[Issue 14681] Add a way to specify a file import's contents on the command line
https://issues.dlang.org/show_bug.cgi?id=14681 --- Comment #3 from yebblies yebbl...@gmail.com --- (In reply to Kenji Hara from comment #2) The ':' prefix allows the compiler to tell apart import paths and key/value pairs. I think it's not good. Indeed in most platform `:` cannot be in file name, but it actually depends on the external file system. Is there more better syntax for the named import string? I thought ':' would be fairly safe as linux uses it for the path separator, and windows uses it as the drive letter separator. Is there really any risk of someone wanting to allow importing files from a directory whose name starts with ':'? --
Re: You too can work on D for iOS
On 12/06/2015 8:43 p.m., Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= ola.fosheim.grostad+dl...@gmail.com wrote: On Friday, 12 June 2015 at 06:50:01 UTC, Rikki Cattermole wrote: On 12/06/2015 6:45 p.m., Nick Sabalausky wrote: On 06/12/2015 12:51 AM, Steven Schveighoffer wrote: The cost is really minimal if you are serious. A Mac Mini costs $500 new, and you get Xcode free. The last two computers I bought were about $340 each. And those are laptops, with screen and battery and everything. In New Zealand a fully upgraded top of the line model (the kind you get from Apply directly) is ~ $4000. Hm, in Norway the 12core version fully upgraded is 11354USD without a screen… Are you sure you looked at Mac Pro? My bad, Mac Book Pro. Very similar name. Mac Mini ~$1000. I get 695USD with no keyboard for 2 cores@1.4Ghz. A 3Ghz mac mini/16GB RAM/256GB SSD is 1775USD and still only *2* cores? I'd rather buy a used 4-core mac mini or go Linux.
Tip: unittest-only artifacts should not be version(unittest) if used across modules
Just ran into this with Phobos: https://github.com/D-Programming-Language/phobos/pull/3403 Andrei
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 12/06/2015 2:53 AM, Walter Bright wrote: On 6/10/2015 12:56 PM, Russel Winder via Digitalmars-d wrote: Please note, OED (which is the definition of the English language whatever any USA upstarts may try to pretend) is gearing up to define they as both singular and plural, thus at a stroke solving all the he/she, she/he, (s)he, it faffing. Hmm, so instead of the documenting the language now the OED is trying to invent it? Such cheek! :-) Nope, singular they has existed since at least the 1600s. It was an act of prejudice in the 1920s[1] that began its decline in usage. The current move by the OED is to reverse that act of invention and document actual use. A... [1] See Modern English Usage (3rd edition or later) [ISBN: 0-19-860263-4]
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 11/06/2015 2:30 AM, weaselcat wrote: On Thursday, 11 June 2015 at 00:57:34 UTC, Tofu Ninja wrote: On Wednesday, 10 June 2015 at 20:14:10 UTC, Nick Sabalausky wrote: Contrary to technical official definition, in REAL WORLD usage, he is BOTH a masuline AND a gender-neutral pronoun. A few occasional nutbags who deliberately ignore the gender-neutral possibility in order to promote their you are all sexists agenda is NO excuse for bowing to thier pressure. Personally I don't perceive he as ever being gender neutral(us native speaker). If I am trying to be gender neutral then I will use they or that person or one. If some one did try to use he in a gender neutral context then I think it would sound weird to me. 'he' has been a gender neutral pronoun for centuries, and as far as I'm aware this has its roots in latin using 'man'(vir?) as a gender neutral pronoun. As far as I know, he was not historically gender neutral, but man used to be. In Old English, man was simply the suffix that meant person (person being a newer loan word), hence words like chairman and foreman are gender neutral (The rise of chairperson is feminism gone mad (or ignorant) -- she said). The Old English word for man was weiman (or werman), literally a male-person and was probably dropped as in some dialects it would likely be pronounced to similarly to woman. A...
Re: Daily downloads in decline
On Thursday, 11 June 2015 at 19:31:52 UTC, Walter Bright wrote: On 6/11/2015 8:03 AM, Dicebot wrote: On the other hand they have one important advantage: all type arguments must comply to one or more trairs and thus bodies of generics are checked before institation. You are only allowed to call methods and operations of generic arguments that are defined in relevan trait. This is huge win for code hygiene compared to D. On the other hand, generic bodies in D can inquire if various additional traits are available, and then adapt: struct S(R) if (isInputRange!R) { ... static if (isForwardRange!R) { R save() { auto result = this; result.r = r.save; return result; } } ... } This kind of thing is used extensively in Phobos generics. That was exactly what I referred to with no arbitrary condition constraints (thus only partial duck typing)
Mixin statements
Can we get a way to mix in statements and expressions? Current mixin templates only allow mixing in declarations. The only way to actually mixin statements is through string mixins which are not parsable by auto complete and such, and are really over kill for a lot of common uses. My first thought was to just allow statements in a mixin template but that does not really make sense. Where would the statements be placed for mixin someMixInTemplateName!() A; So I propose using the currently unused macro keyword for it(I don't think it will ever be used for AST macros any ways...) mixin macro macroTemplateName(ARGS...) { statements or declarations to be mixed in. } and could be use in the same way as mixin templates, just without giving it a name. Example... mixin macroTemplateName!(); Also an extension of this would be to allow expression macros. I haven't really thought of a good syntax for defining these though, but maybe something like... mixin macro expressionMacroName() = (some expression to be mixed in); I am not totally sure on that though because I feel like you would want to be able to do static if's and such, but you could probably at that point call out to a more complex template to handle things like that. The only purpose of the expression macro would be to allow it to capture identifiers in the calling scope. Could be used like string mixins. Example... int a = 3 + 5 + mixin(expressionMacroName!()); Thoughts? Is this something that any one else has wanted?
Re: You too can work on D for iOS
On Friday, 12 June 2015 at 08:43:39 UTC, Ola Fosheim Grøstad wrote: On Friday, 12 June 2015 at 06:50:01 UTC, Rikki Cattermole wrote: On 12/06/2015 6:45 p.m., Nick Sabalausky wrote: On 06/12/2015 12:51 AM, Steven Schveighoffer wrote: The cost is really minimal if you are serious. A Mac Mini costs $500 new, and you get Xcode free. The last two computers I bought were about $340 each. And those are laptops, with screen and battery and everything. In New Zealand a fully upgraded top of the line model (the kind you get from Apply directly) is ~ $4000. Hm, in Norway the 12core version fully upgraded is 11354USD without a screen… Are you sure you looked at Mac Pro? Mac Mini ~$1000. I get 695USD with no keyboard for 2 cores@1.4Ghz. A 3Ghz mac mini/16GB RAM/256GB SSD is 1775USD and still only *2* cores? I'd rather buy a used 4-core mac mini or go Linux. even in USA their prices are ridiculous for example, the $999 hidpi monitor they sell on their site? you can buy the same exact monitor for ~$250 on ebay directly from the korean manufacturer. I own one, it looks identical to the apple one.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 02:12:39 UTC, Brian Rogoff wrote: On Wednesday, 10 June 2015 at 19:57:15 UTC, Russel Winder wrote: Please note, OED (which is the definition of the English language whatever any USA upstarts may try to pretend) Glad to hear it. Please tell your countrymen to prefer the '-ize' suffix, as we colonials do, to the '-ise' one, which is a French affectation. http://en.wikipedia.org/wiki/Oxford_spelling Funny how people argue about English spelling, because English has no spelling at all. It's irrational, inconsistent and part of the English class system. Why is it that English has the highest rate of dyslexics while Spanish has a very low rate of dyslexics? Because Spanish spelling is much more consistent and phonetic than English spelling. Gosh, you dare not say this! Apart from that, spelling is merely a convention you get used to. People oppose to -ize because they were brought up with -ise. If you have a new generation of Englishmen that were taught -ize, they would find -ise strange. It's ridiculous how people get attached to stuff like this.
Re: Phobos addition formal review: std.experimental.allocator
Also wanted to apologize for authors of any other Phobos proposals - I did intend to step down from review manager role but this specific package is of huge personal interest to me, thus the exception has been made.
Call for reviewers : std.experimental.allocator
Formal review process for std.experimental.allocator has started, please check http://forum.dlang.org/post/vfipmwojmvseqxoiw...@forum.dlang.org
Qualified destructors / immutable objects
struct S { int x; ~this() { import std.stdio; writeln(mutable ~this()); x = 1; } } void main() { const(S) s1; immutable(S) s2; } Prints: mutable ~this() mutable ~this() This looks very wrong, although I cannot find a way to actually modify immutable memory with it... Is it a bug?
Re: You too can work on D for iOS
On 6/12/15 8:07 AM, Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= ola.fosheim.grostad+dl...@gmail.com wrote: On Friday, 12 June 2015 at 11:58:35 UTC, Steven Schveighoffer wrote: Those who are serious and willing to invest will buy one. I bought my macbook in 2011 for about $1800, I've made more than 50x that with it since doing iOS work. You don't find it odd that my 2012 mac mini is faster than similarly priced macs today? I do find it odd! Generally apple lowers their prices periodically for their newer versions, and the new stuff is usually faster. But, they do typically take away higher options for older models. For instance, the iPhones when they become the cheaper option, they limit the memory to 8 or 16GB. Looking at wikipedia, I see they don't offer a quad-core for the 2014 version as a base option (and they went from i7 to i5!), that's a shame. Also, not upgradeable RAM... I take it back. Don't buy one of these :) Buy a used 2012 version instead! That's a significant downgrade, I don't know who's deciding these things, but that's definitely a failure. What kind of apps do you make, it would be fun to have a look at them :) This is the app I worked on for 2 years (under contract): http://www.replaylocker.com/ I only worked with the iOS version, not the android version (which is a hand-ported clone of the iOS). I also wrote all the server code (C++ unfortunately, but you can definitely see my D roots in it :), which ran on an ARM based SBC. It was a pretty neat project, lots of networking challenges. There used to be demos to download so you could see how the system works without actually being in a location that supported it, but I think they took those down to save on bandwidth. So if you install the app, you likely will be disappointed :) -Steve
[Issue 14681] Add a way to specify a file import's contents on the command line
https://issues.dlang.org/show_bug.cgi?id=14681 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #4 from Walter Bright bugzi...@digitalmars.com --- The version feature is deliberately restrictive. Setting variables from the command line is most often a failure to design the code properly. I don't think it is a good idea. Do you have a compelling use case for it? --
Re: You too can work on D for iOS
On 6/12/15 1:00 AM, Mattcoder wrote: On Friday, 12 June 2015 at 04:51:29 UTC, Steven Schveighoffer wrote: The cost is really minimal if you are serious. A Mac Mini costs $500 new, and you get Xcode free. I don't want to be that guy but living in Brazil that Mac Mini (Yosemite) costs 6x more in here. I mean it can be more cheap to travel to U.S. and buy one there and go back than buying directly in here. That a pretty steep hike, I wonder why it's so much more expensive! -Steve
Re: Official PPA for dmd
On Friday, 1 August 2014 at 19:34:12 UTC, Andrew Pennebaker wrote: I'm happy to see an official .DEB for installing DMD! Could we please host this in a PPA, to make it easier for Debian/Ubuntu users to install? This would make dmd play nicer with automated provisioning sytems like Chef/Puppet, and pave the way for dmd making it into the official Ubuntu repositories one day. Any updates on an Ubuntu PPA for DMD co? I've had complaints from friends regarding the lack of this functionality. Is it complicated to maintain a PPA?
A Vision on Improved DMD Template Instantiation Diagonostics
After having seen Andrei's Walter's talks on DConf 2015 it's time reveal a dream of mine. It resolves around of feature that I believe is one of the most important improvements that will benefit aggregation of more *new* users to the D Community. Namely a more clever DMD diagnostics when a template instantion fails to match any template definition in the current scope. For instance, if f(a,b,c,d) fails to match any of the overloads f(a,b,c) if (PRED_1(a,b,c) PRED_2(a,b,c)) f(a,b,c,d) if (PRED(a,b) PRED(b,c) PRED(c,d)) instead of saying Error: neither of these matched - f(a,b,c) if (PRED_1(a,b,c) PRED_2(a,b,c)) - f(a,b,c,d) if (PRED(a,b) PRED(b,c) PRED(c,d)) it should instead say Error: no template match to call of f(a,b,c,d) for neither - f(a,b,c) if (PRED_1(a,b,c) PRED_2(a,b,c)) - because template restriction `PRED_2(a,b,c)` evaluate to false - f(a,b,c,d) if (PRED(a,b) PRED(b,c) PRED(c,d)) - because template restriction `PRED(b,c)` evaluated to false Eventhough this might be a bit tricky to get right and may break lots of existing diagnostics (in DMD unittests), I'd say it's definitiely worth effort. Such a feature would attract lots of new users not used to D's advanced template restrictions. All users, newbies aswell as experts, would be benefit from this feature. I you DMD review guys are interested in getting this in and helping me out on source code directions I'd be very happy to start working on DMD PR for this. Destroy.
Re: You too can work on D for iOS
On Friday, 12 June 2015 at 12:48:36 UTC, Vladimir Panteleev wrote: On Friday, 12 June 2015 at 12:47:36 UTC, Vladimir Panteleev wrote: [...] I regret getting involved in an OS holywar. Sorry, I'm done with this thread. fedora debian vim emacs
[Issue 13816] [REG2.066.0] The compiler crashes with recursive tuple expansion
https://issues.dlang.org/show_bug.cgi?id=13816 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/d17412ae8705034336761a10673d3f7553e69506 fix Issue 13816 - The compiler crashes with recursive tuple expansion https://github.com/D-Programming-Language/dmd/commit/d19923916de98edfd4d505ffcd3e93f88f5f5280 Merge pull request #4738 from 9rnsr/fix13816 [REG2.066.0] Issue 13816 - The compiler crashes with recursive tuple expansion --
Re: You too can work on D for iOS
On Friday, 12 June 2015 at 12:42:37 UTC, Steven Schveighoffer wrote: On 6/12/15 8:29 AM, Vladimir Panteleev wrote: On Friday, 12 June 2015 at 12:21:12 UTC, Steven Schveighoffer wrote: Is your mom a software developer? If you spent $160 more and were able to increase your salary 10x, wouldn't that be worth it? 10x? What sort of pipe dream is that? OK, 2x, 1.5x. I have no frame of reference for what you can make as an iOS developer in your country. Where I live, I can make much more than 10x $160 per month. But if it increases your salary, it's worth investing in, no? You said 10x salary increase, not 10x return on investment. I won't argue with that. But just owning a piece of hardware isn't going to *multiply* your existing income. I guess that explains why so many programs with the same functionality are freeware on Windows and commercial on OSX. Open-source software development gives me 0 income, so it'd be a negative net gain. I don't agree with your statement, why would someone charge money on one platform and not on the other? Almost all apps from Apple are free for your Mac. Those that aren't generally have free alternatives. Last time I looked there was a pretty big difference in the diversity and availability of 3rd-party software. Which makes sense considering also the much smaller user market share. And I agree, doing open-source freeware development doesn't justify buying a computer of any kind. What? Here's the problem: if I own a PC, I can install Windows, Linux, FreeBSD etc. on it with no problems, or I can run any in a VM. I can do neither with OS X, I have to buy overpriced hardware from Apple to do that.
Re: You too can work on D for iOS
On Friday, 12 June 2015 at 12:47:36 UTC, Vladimir Panteleev wrote: [...] I regret getting involved in an OS holywar. Sorry, I'm done with this thread.
[Issue 14691] ddox ignores methods defined in static if
https://issues.dlang.org/show_bug.cgi?id=14691 Vladimir Panteleev thecybersha...@gmail.com changed: What|Removed |Added CC||thecybersha...@gmail.com --- Comment #1 from Vladimir Panteleev thecybersha...@gmail.com --- DDox bugs should be filed here, I think: https://github.com/rejectedsoftware/ddox/issues --
AMD Windows 7
Has anyone run into problems with D on AMD processors? I'm talking about Windows 7 on a HP625 laptop in particular.
[Issue 14004] (╯▔︹▔)╯don't use this file https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js, can't access it in china
https://issues.dlang.org/show_bug.cgi?id=14004 --- Comment #5 from Riki lp...@126.com --- script type=text/javascript src=https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js;/script script type=text/javascriptwindow.jQuery || document.write('script src=js/jquery-1.7.2.min.js\x3C/script')/script connect to ajax.googleapis.com first will block long time until time out now, i add 127.0.0.1 ajax.googleapis.com to /etc/hosts but this is not friend for new users in china why not use jquery in locally host or other free cdn http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js --
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 11:13:08 UTC, Chris wrote: -ise. If you have a new generation of Englishmen that were taught -ize, they would find -ise strange. It's ridiculous how people get attached to stuff like this. I have to admit I use -ize over -ise because I think it visually looks cooler. I always felt I did something wrong by mixing colour and -ize, but this thread has finally lifted this guilt off my shoulders! They as singular feels weird tho, but maybe it is related to the archaic thou and thee? We had the same in norwegian ~60 years ago. De (they) was used as singular towards strangers and du (you) was used with people you were familiar with. Then you could claim to be dus (friendly) with people you knew (referring to the fact that you use du when adressing them). Kinda like german Sie.
Re: You too can work on D for iOS
On 6/12/15 3:36 AM, Paulo Pinto wrote: On Friday, 12 June 2015 at 04:51:29 UTC, Steven Schveighoffer wrote: On 6/11/15 11:47 PM, Joakim wrote: On Friday, 12 June 2015 at 02:13:26 UTC, Dan Olson wrote: Looks like there is no membership fee to build and install your own iOS apps with Xcode now. As usual, you still need a Mac to run Xcode. http://9to5mac.com/2015/06/10/xcode-7-allows-anyone-to-download-build-and-sideload-ios-apps-for-free/ Huh, that's crazy that they don't make the iOS toolchain available outside OS X. The Android toolchain is available for all three major desktop platforms. Still, good that at least you don't have to pay now. You can develop for iOS on other platforms (I think not using objective-c or swift), but you cannot submit an app to the app store without Xcode. Really, I don't see why Apple needs to care about other platforms -- it's their toolchain, their runtime. This makes things very easy for them support-wise, and people still line up to get iPhones, so the incentive to support other platforms isn't really there. At dconf, I'd say at least 50% of the laptops were macs. They are good systems to use. The cost is really minimal if you are serious. A Mac Mini costs $500 new, and you get Xcode free. The minimum wage in Portugal is around 400€ after taxes, with around 1000€ for many university degrees. You can guess how many go out and buy a Mac. Those who are serious and willing to invest will buy one. I bought my macbook in 2011 for about $1800, I've made more than 50x that with it since doing iOS work. If you want to make minimum wage, I can guess you shouldn't buy a mac :) -Steve
Re: Daily downloads in decline
On 11/06/2015 18:48, Dennis Ritchie wrote: On Thursday, 11 June 2015 at 17:41:49 UTC, Andrei Alexandrescu wrote: It is possible that Walter and Andrei against macro because of this: macro_rules! o_O { ( $( $x:expr; [ $( $y:expr ),* ] );* ) = { [ $($( $x + $y ),*),* ] } } fn main() { let a: [i32] = o_O!(10; [1, 2, 3]; 20; [4, 5, 6]); assert_eq!(a, [11, 12, 13, 24, 25, 26]); } It looks disgusting! ;) Is that actual Rust code that compiles and runs? -- Andrei Yes, this code is working. I took it here: https://doc.rust-lang.org/stable/book/macros.html#repetition OMG, and it's not just an obscure example someone came up with, but actually a snippet from the official documentation! That said, it does look a bit less crazy when looking at it with the syntax highlighting. -- Bruno Medeiros https://twitter.com/brunodomedeiros
[Issue 4939] Some compile-time length tests of array concats
https://issues.dlang.org/show_bug.cgi?id=4939 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #1 from Kenji Hara k.hara...@gmail.com --- https://github.com/D-Programming-Language/dmd/pull/4741 It will make the Program #1 case error. Program #2 and #3 case are not in range, because they needs data flow analysis. --
[Issue 14686] Postblit isn't sometimes called on concatenation
https://issues.dlang.org/show_bug.cgi?id=14686 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #1 from Kenji Hara k.hara...@gmail.com --- https://github.com/D-Programming-Language/dmd/pull/4741 --
[Issue 12751] Avoid heap allocations in some cases of array concatenation
https://issues.dlang.org/show_bug.cgi?id=12751 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #2 from Kenji Hara k.hara...@gmail.com --- https://github.com/D-Programming-Language/dmd/pull/4741 --
Re: You too can work on D for iOS
On Friday, 12 June 2015 at 11:58:35 UTC, Steven Schveighoffer wrote: On 6/12/15 3:36 AM, Paulo Pinto wrote: On Friday, 12 June 2015 at 04:51:29 UTC, Steven Schveighoffer wrote: On 6/11/15 11:47 PM, Joakim wrote: On Friday, 12 June 2015 at 02:13:26 UTC, Dan Olson wrote: Looks like there is no membership fee to build and install your own iOS apps with Xcode now. As usual, you still need a Mac to run Xcode. http://9to5mac.com/2015/06/10/xcode-7-allows-anyone-to-download-build-and-sideload-ios-apps-for-free/ Huh, that's crazy that they don't make the iOS toolchain available outside OS X. The Android toolchain is available for all three major desktop platforms. Still, good that at least you don't have to pay now. You can develop for iOS on other platforms (I think not using objective-c or swift), but you cannot submit an app to the app store without Xcode. Really, I don't see why Apple needs to care about other platforms -- it's their toolchain, their runtime. This makes things very easy for them support-wise, and people still line up to get iPhones, so the incentive to support other platforms isn't really there. At dconf, I'd say at least 50% of the laptops were macs. They are good systems to use. The cost is really minimal if you are serious. A Mac Mini costs $500 new, and you get Xcode free. The minimum wage in Portugal is around 400€ after taxes, with around 1000€ for many university degrees. You can guess how many go out and buy a Mac. Those who are serious and willing to invest will buy one. I bought my macbook in 2011 for about $1800, I've made more than 50x that with it since doing iOS work. If you want to make minimum wage, I can guess you shouldn't buy a mac :) -Steve Which wouldn't happen in Portugal, where it is easier to see someone on the street with Android, WP, feature phone than iOS. While most handsets are bought with pre-paid cards, iPhone requires a contract. Before Apple was reborn, buying a Mac meant having to travel to Porto or Lisbon and get one there, with leasing. Same thing to get them repaired. My university in Lisbon (UNL) was the first time I got to see LCs live, even then only used by administrative personal and one room for students with around 10 of them. Everywhere else on the campus there were DG/UX, Aix terminals and PCs available. Nowadays you can get them everywhere at a big surface, but for most families still means making use of 3 - 5 years leasing, given the average salaries and life cost. -- Paulo
Re: You too can work on D for iOS
On 6/12/15 8:29 AM, Vladimir Panteleev wrote: On Friday, 12 June 2015 at 12:21:12 UTC, Steven Schveighoffer wrote: Is your mom a software developer? If you spent $160 more and were able to increase your salary 10x, wouldn't that be worth it? 10x? What sort of pipe dream is that? OK, 2x, 1.5x. I have no frame of reference for what you can make as an iOS developer in your country. Where I live, I can make much more than 10x $160 per month. But if it increases your salary, it's worth investing in, no? I'm not trying to say everyone should buy a mac or that they are cheap enough for everyone to afford. I'm saying if your investment in buying a mac increases your income significantly (as it did for me), the cost doesn't matter. It's an enabler for things that just aren't possible without it. I guess that explains why so many programs with the same functionality are freeware on Windows and commercial on OSX. Open-source software development gives me 0 income, so it'd be a negative net gain. I don't agree with your statement, why would someone charge money on one platform and not on the other? Almost all apps from Apple are free for your Mac. Those that aren't generally have free alternatives. And I agree, doing open-source freeware development doesn't justify buying a computer of any kind. That's not what I was saying. -Steve
Re: AMD Windows 7
On Friday, 12 June 2015 at 10:54:46 UTC, Chris wrote: Has anyone run into problems with D on AMD processors? I'm talking about Windows 7 on a HP625 laptop in particular. Can you be any more specific? What kind of problems?
std.(experimental.)logger voting manager wanted
std.(experimental.)logger has been in phobos for one release. The idea was to mature stuff in experimental for one release and then have a vote on inclusion into phobos as std.logger. I would like to see this vote happen before 2.068. Unfortunately, Dicebot is not longer the review manager. Who wants to count yes/no/(my logger is better) votes in a forum thread?
Re: DIP80: phobos additions
On 12 June 2015 at 15:22, Ilya Yaroshenko via Digitalmars-d digitalmars-d@puremagic.com wrote: On Friday, 12 June 2015 at 00:51:04 UTC, Manu wrote: On 10 June 2015 at 02:40, Ilya Yaroshenko via Digitalmars-d digitalmars-d@puremagic.com wrote: On Tuesday, 9 June 2015 at 16:18:06 UTC, Manu wrote: On 10 June 2015 at 01:26, Ilya Yaroshenko via Digitalmars-d digitalmars-d@puremagic.com wrote: I believe that Phobos must support some common methods of linear algebra and general mathematics. I have no desire to join D with Fortran libraries :) D definitely needs BLAS API support for matrix multiplication. Best BLAS libraries are written in assembler like openBLAS. Otherwise D will have last position in corresponding math benchmarks. A complication for linear algebra (or other mathsy things in general) is the inability to detect and implement compound operations. We don't declare mathematical operators to be algebraic operations, which I think is a lost opportunity. If we defined the properties along with their properties (commutativity, transitivity, invertibility, etc), then the compiler could potentially do an algebraic simplification on expressions before performing codegen and optimisation. There are a lot of situations where the optimiser can't simplify expressions because it runs into an arbitrary function call, and I've never seen an optimiser that understands exp/log/roots, etc, to the point where it can reduce those expressions properly. To compete with maths benchmarks, we need some means to simplify expressions properly. Simplified expressions would [NOT] help because 1. On matrix (hight) level optimisation can be done very well by programer (algorithms with matrixes in terms of count of matrix multiplications are small). Perhaps you've never worked with incompetent programmers (in my experience, 50% of the professional workforce). Programmers, on average, don't know maths. They literally have no idea how to simplify an algebraic expression. I think there are about 3-4 (being generous!) people in my office (of 30-40) that could do it properly, and without spending heaps of time on it. 2. Low level optimisation requires specific CPU/Cache optimisation. Modern implementations are optimised for all cache levels. See work by KAZUSHIGE GOTO http://www.cs.utexas.edu/users/pingali/CS378/2008sp/papers/gotoPaper.pdf Low-level optimisation is a sliding scale, not a binary position. Reaching 'optimal' state definitely requires careful consideration of all the details you refer to, but there are a lot of improvements that can be gained from quickly written code without full low-level optimisation. A lot of basic low-level optimisations (like just using appropriate opcodes, or eliding redundant operations; ie, squares followed by sqrt) can't be applied without first simplifying expressions. OK, generally you are talking about something we can name MathD. I understand the reasons. However I am strictly against algebraic operations (or eliding redundant operations for floating points) for basic routines in system programming language. That's nice... I'm all for it :) Perhaps if there were some distinction between a base type and an algebraic type? I wonder if it would be possible to express an algebraic expression like a lazy range, and then capture the expression at the end and simplify it with some fancy template... I'd call that an abomination, but it might be possible. Hopefully nobody in their right mind would ever use that ;) Even float/double internal conversion to real in math expressions is a huge headache when math algorithms are implemented (see first two comments at https://github.com/D-Programming-Language/phobos/pull/2991 ). In system PL sqrt(x)^2 should compiles as is. Yeah... unless you -fast-math, in which case I want the compiler to do whatever it can. Incidentally, I don't think I've ever run into a case in practise where precision was lost by doing _less_ operations. Such optimisations can be implemented over the basic routines (pow, sqrt, gemv, gemm, etc). We can use approach similar to D compile time regexp. Not really. The main trouble is that many of these patterns only emerge when inlining is performed. It would be particularly awkward to express such expressions in some DSL that spanned across conventional API boundaries.
[Issue 14691] New: ddox ignores methods defined in static if
https://issues.dlang.org/show_bug.cgi?id=14691 Issue ID: 14691 Summary: ddox ignores methods defined in static if Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dlang.org Assignee: nob...@puremagic.com Reporter: dragosc...@gmail.com This describes 'clear' and 'shrinkTo' methods: http://dlang.org/phobos-prerelease/std_array.html#.Appender But this don't: http://dlang.org/library-prerelease/std/array/appender.html --
Re: You too can work on D for iOS
On 6/12/15 8:07 AM, Vladimir Panteleev wrote: On Friday, 12 June 2015 at 12:03:59 UTC, Steven Schveighoffer wrote: If the cost of the computer you are using is *that* important to you, you aren't serious about investing what it takes to get the tools you need. That was part of my point. If you're telling me it's not worth an extra $160 to work on iOS, I think you probably have other objections besides that. It's OK, iOS development is not everyone's cup of tea. Woah now, that's an overly broad statement and carries some assumptions. $160 is my mom's MONTHLY salary over here. Is your mom a software developer? If you spent $160 more and were able to increase your salary 10x, wouldn't that be worth it? Perhaps that's not possible in your country, I don't really have an answer for that. I'm not trying to say everyone should buy a mac or that they are cheap enough for everyone to afford. I'm saying if your investment in buying a mac increases your income significantly (as it did for me), the cost doesn't matter. It's an enabler for things that just aren't possible without it. Sorry if it came off sounding arrogant or insensitive. -Steve
Re: You too can work on D for iOS
On Friday, 12 June 2015 at 12:00:17 UTC, Steven Schveighoffer wrote: On 6/12/15 1:00 AM, Mattcoder wrote: On Friday, 12 June 2015 at 04:51:29 UTC, Steven Schveighoffer wrote: The cost is really minimal if you are serious. A Mac Mini costs $500 new, and you get Xcode free. I don't want to be that guy but living in Brazil that Mac Mini (Yosemite) costs 6x more in here. I mean it can be more cheap to travel to U.S. and buy one there and go back than buying directly in here. That a pretty steep hike, I wonder why it's so much more expensive! -Steve it's often referred to as 'brazil cost,' it gets rather political.
Re: You too can work on D for iOS
On Friday, 12 June 2015 at 11:58:35 UTC, Steven Schveighoffer wrote: Those who are serious and willing to invest will buy one. I bought my macbook in 2011 for about $1800, I've made more than 50x that with it since doing iOS work. You don't find it odd that my 2012 mac mini is faster than similarly priced macs today? What kind of apps do you make, it would be fun to have a look at them :)
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 2015-06-12 01:52, Walter Bright wrote: I'm in the compiler business: https://www.youtube.com/watch?v=DwIyClDuBgo You're in the Empire business as well ;) Or was. -- /Jacob Carlborg
Re: You too can work on D for iOS
On Friday, 12 June 2015 at 12:03:59 UTC, Steven Schveighoffer wrote: If the cost of the computer you are using is *that* important to you, you aren't serious about investing what it takes to get the tools you need. That was part of my point. If you're telling me it's not worth an extra $160 to work on iOS, I think you probably have other objections besides that. It's OK, iOS development is not everyone's cup of tea. Woah now, that's an overly broad statement and carries some assumptions. $160 is my mom's MONTHLY salary over here.
Re: You too can work on D for iOS
On Friday, 12 June 2015 at 12:21:12 UTC, Steven Schveighoffer wrote: Is your mom a software developer? If you spent $160 more and were able to increase your salary 10x, wouldn't that be worth it? 10x? What sort of pipe dream is that? I'm not trying to say everyone should buy a mac or that they are cheap enough for everyone to afford. I'm saying if your investment in buying a mac increases your income significantly (as it did for me), the cost doesn't matter. It's an enabler for things that just aren't possible without it. I guess that explains why so many programs with the same functionality are freeware on Windows and commercial on OSX. Open-source software development gives me 0 income, so it'd be a negative net gain.
Re: You too can work on D for iOS
On Friday, 12 June 2015 at 08:46:19 UTC, rsw0x wrote: for example, the $999 hidpi monitor they sell on their site? you can buy the same exact monitor for ~$250 on ebay directly from the korean manufacturer. I own one, it looks identical to the apple one. I'm not surprised! I bet they saw too many developers buying 4-core minis and no screen and thought: hey, let's force devs to buy our 4-core iMacs, then we get to sell a screen too!. And I have to admit, if I _had_ to buy an iMac I'd be tempted to consider the retina version. But I think I'll just pass on an upgrade and make my next machine a 6+ core Linux box with a clang cross compiler and shared filesystem. I don't really mind using makefiles that much.
Re: AMD Windows 7
On 12/06/2015 10:54 p.m., Chris wrote: Has anyone run into problems with D on AMD processors? I'm talking about Windows 7 on a HP625 laptop in particular. Have you checked the issue tracker?
Re: You too can work on D for iOS
On 6/12/15 2:45 AM, Nick Sabalausky wrote: On 06/12/2015 12:51 AM, Steven Schveighoffer wrote: The cost is really minimal if you are serious. A Mac Mini costs $500 new, and you get Xcode free. The last two computers I bought were about $340 each. And those are laptops, with screen and battery and everything. If the cost of the computer you are using is *that* important to you, you aren't serious about investing what it takes to get the tools you need. That was part of my point. If you're telling me it's not worth an extra $160 to work on iOS, I think you probably have other objections besides that. It's OK, iOS development is not everyone's cup of tea. -Steve
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 11:35:30 UTC, Ola Fosheim Grøstad wrote: On Friday, 12 June 2015 at 11:13:08 UTC, Chris wrote: -ise. If you have a new generation of Englishmen that were taught -ize, they would find -ise strange. It's ridiculous how people get attached to stuff like this. I have to admit I use -ize over -ise because I think it visually looks cooler. I always felt I did something wrong by mixing colour and -ize, but this thread has finally lifted this guilt off my shoulders! They as singular feels weird tho, but maybe it is related to the archaic thou and thee? We had the same in norwegian ~60 years ago. De (they) was used as singular towards strangers and du (you) was used with people you were familiar with. Then you could claim to be dus (friendly) with people you knew (referring to the fact that you use du when adressing them). Kinda like german Sie. Do you speak Bokmål or Nynorsk? Here's a nice piece about Language Mavens. They are quite common in every country, and invariably they don't have a clue about how languages and the human mind work: http://www.sp.uconn.edu/~sih01001/english/fall2007/TheLanguageMavens.pdf
Re: Phobos addition formal review: std.experimental.allocator
On Friday, 12 June 2015 at 11:06:43 UTC, Dicebot wrote: The legendary allocator package by Andrei Alexandrescu has arrived at your doorsteps and kindly asks to let it into Phobos http://wiki.dlang.org/Review/std.experimental.allocator Docs: http://erdani.com/d/phobos-prerelease/std_experimental_allocator.html Code: https://github.com/andralex/phobos/tree/allocator/std/experimental/allocator This proposal will undergo the review/inclusion process similar to std.experimental.logger : 1. 2 week review/discussion period 2. if proposal author feels confident, 2 week voting period for accepting into sts.experimental 3. once enough field trial feedback has been accumulated, vote for moving into std mainline during the upcoming release beta period If reviewing find some fundamental issues or voting will fail, the whole process will repeats again per proposal authors request. Please start destruction, review period ends on 26.06 (23.59 +0 Greenwich) Great work :) It would be nice if someone could write some tests/benchmarks in order to show for each allocator where it works well over others.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 06/11/2015 06:35 PM, deadalnix wrote: On Thursday, 11 June 2015 at 20:44:52 UTC, Ola Fosheim Grøstad wrote: On Thursday, 11 June 2015 at 20:14:24 UTC, Kagamin wrote: https://youtu.be/VjNVPO8ff84 :3 https://youtu.be/bJDY5zTiWUk maybe this too(?) Never heard those before, those are really good! Some of my favorite 80's-ish sounding Japanese stuff: https://youtu.be/WL2hBFhyo6Q (Anzen Chitai: Jirettai) https://youtu.be/ZY_h_bW8CK0 (Anzen Chitai: Suki Sa) http://www.dailymotion.com/video/x2pz4h_ai-yori-aoshi-enishi-ending-1_news (The Indigo - I Do!) https://youtu.be/p6Q9gtBmZK8 (Yume no Nake e) https://youtu.be/y0N3w90Hmh0#t=3m10s (TM Revolution: Light My Fire) Some other J favorites, but these aren't 80's-ish: https://youtu.be/7E9ycq5ZXD0 (Kotoko: Meconopsis) https://youtu.be/bimJUWROSIk (Kotoko: Uzu-Maki) https://youtu.be/POQVWetuNv8#t=16m35s (TM Revolution: Timeless Mobius Rover) https://youtu.be/0Nd5Ce_RXbI (Namie Amuro: Come My Way) https://youtu.be/xFqhyUHicQU (Yoko Kanno Origa: Inner Universe) https://youtu.be/baUY9LFlYh0 (-- It's like audio/visual crack, can't turn away...) https://youtu.be/OjkvQzWBpsA (Blood+ OP1) https://youtu.be/5hkA2ivm4wU (Madoka Magica ED2) https://vimeo.com/67644299 (Aira Yuhki: Blue sky, True sky) 'Course with this stuff, I could keep listing awesome ones all day, like just about every opening/closing for Noein, Inuyasha, Scientific Railgun, K-On, Nadia, Nana and Shinichirou Watanabe's shows, every opening for Pani Poni Dash, xxxHolic, Luck Star OP, damn near everything in Project Diva (both F and F2 are like digital crack), anything off Kotoko's Glass no Kaze and Epsilon no Fune albums, and a whole ton of others. Nono, the 80's was more like this: https://youtu.be/Az_GCJnXAI0 https://youtu.be/PN7dd2fW3OQ https://youtu.be/Ug8WeZyTxXg https://youtu.be/drGeLouMm6s Banned in the US: Public Image Limited - This Is Not A Love Song and SABRINA - Boys (Video Original) - HD. Those other two are absolutely wild though. Hilarious. :) Here is a nice documentary about the 80s : https://www.youtube.com/watch?v=bS5P_LAqiVg Wow, just watched the first minute, that's freaking sweet! Definitely gonna watch the rest of that later.
... and the sixth wasn't far behind!
This is really lovely, in the same category as locking one's keys in the car: https://issues.dlang.org/show_bug.cgi?id=14694 Andrei
Re: ... and the sixth wasn't far behind!
The di generation is actually fairly simple code, these are probably all pretty low hanging - I'd encourage anyone who wants some easy entry into dmd hacking to take a look at these.
[Issue 14692] SIGSEGV during SHA.put
https://issues.dlang.org/show_bug.cgi?id=14692 Rory rjmcgu...@gmail.com changed: What|Removed |Added Keywords||wrong-code Severity|blocker |major --- Comment #1 from Rory rjmcgu...@gmail.com --- I'm guessing its wrong code if its crashing in DMD and not GDC. --
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 18:32:22 UTC, Tofu Ninja wrote: On Friday, 12 June 2015 at 15:19:40 UTC, Ola Fosheim Grøstad wrote: My friend came in to the shop today and the entire time they just kept asking for corks... For me that sounds 100% fine... Ah, ok. I found this link interesting: http://blog.dictionary.com/oldenglishgender/ Apparently Old English may have lost its gendered nouns when it was melted with Old Norse due to conflicting genders on same noun. And it is rather obvious that english they have common root with norwegian de from Old Norse þeir: https://en.wiktionary.org/wiki/þeir So I'd find it an odd coincidence if norwegian singular De was not related to english singular they… but it could also come from Sie through the trade German influence in Bergen around 1300… Wikipedia has no real answer I think except that the first written occurrence of singular they was early 1300. https://en.wikipedia.org/wiki/Singular_they
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 19:16:39 UTC, Nick Sabalausky wrote: Banned in the US: Public Image Limited - This Is Not A Love Song and SABRINA - Boys (Video Original) - HD. Banned? Oh well, Lydon of Sex Pistols is an anarchist and Sabrina shows of her tits with a wardrobe malfunction. I guess that explains it well enough.
How to pass voldemort types to functions
Hi; I have tuples created by std.algorithm.group function. auto tupleB = stringB.group(); I need to write a a function which takes tubleB and do some cool stuff. If I don't use a function and write all code below .group() everytihng works but for reusing the code I want to call a function with my tuples. I tried ; void foo(T...)(T tuple) void foo(Tuple!(dchar,uint) tuplle) But even couldn't compiile. Do you have any idea for passing result of std.algorithm.group() to my free function?
Re: You too can work on D for iOS
On 06/12/2015 08:03 AM, Steven Schveighoffer wrote: On 6/12/15 2:45 AM, Nick Sabalausky wrote: On 06/12/2015 12:51 AM, Steven Schveighoffer wrote: The cost is really minimal if you are serious. A Mac Mini costs $500 new, and you get Xcode free. The last two computers I bought were about $340 each. And those are laptops, with screen and battery and everything. If the cost of the computer you are using is *that* important to you, you aren't serious about investing what it takes to get the tools you need. That was part of my point. It was late and I (mis?)interpreted your statement as Macs are inexpensive these days. I was only making a counterargument to that. I'm not saying it can't be worthwhile investment in certain cases. If I had a mobile program out that was doing well on some other platform (ex Android), I'd certainly pony up for the various iOS costs-of-entry. But it *is* still a much higher cost-of-entry for most people (since most people aren't already on OSX) than for the other mobile platforms. It is good though that they've finally relaxed their stance a bit on what's now being called side-loading (or as I've called it since the 1980's, Running my own freaking software on my own freaking machine). Now it appears MS has dropped to last place in that regard (last I checked, they kinda let you do it, moreso than Apple used to, but there's still some goofy restrictions and it appeared primarily geared towards corporations with their own proprietary in-house-only tools).
Re: You too can work on D for iOS
On Friday, 12 June 2015 at 19:36:25 UTC, Nick Sabalausky wrote: It is good though that they've finally relaxed their stance a bit on what's now being called side-loading (or as I've called it since the 1980's, Running my own freaking software on my own freaking machine). Now it appears MS has dropped to last place in that regard (last I checked, they kinda let you do it, moreso than Apple used to, but there's still some goofy restrictions and it appeared primarily geared towards corporations with their own proprietary in-house-only tools). it will never cease to amaze me that people are paying for things they don't even own. If you can't modify something, you don't own it - you're leasing it.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
Dave whate...@whatever.com wrote: On Thursday, 11 June 2015 at 20:06:45 UTC, Kagamin wrote: On Thursday, 11 June 2015 at 18:17:01 UTC, Dave wrote: Disagree. Traditionally also handled by throwing exceptions. C# throws a Format exception if a parse fails. https://msdn.microsoft.com/en-us/library/f02979c7%28v=vs.110%29.aspx https://msdn.microsoft.com/en-us/library/bb299639%28v=vs.110%29.aspx Forgot the one named Parse... https://msdn.microsoft.com/en-us/library/b3h1hf19(v=vs.110).aspx Microsoft does lets you opt out (as I suggested). The default function, the one actually named Parse (Int32.Parse), throws an exception by default. Originally (.Net 1) there was only 'Parse', 'TryParse' came in .Net 2, I guess they had to admit that exceptions are not always practical.
Re: You too can work on D for iOS
On 6/12/15 3:44 PM, Nick Sabalausky wrote: On 06/12/2015 07:58 AM, Steven Schveighoffer wrote: Those who are serious and willing ***and able*** to invest will buy one. Fixed. If you want to make minimum wage, You've got to be fucking kidding everyone. Step out of your ivory tower once in a while. Gladly, it's nice outside today! [...]I can guess you shouldn't buy a mac :) In any case, you have your sequence of events is seriously backwards here. The correct order is: 1: Obtain $ 2: THEN Spend $ 3: GOTO 1 Notice how the loop can only be primed with Obtain, not Spend shit you don't fucking even have. Are you fucking kidding me? People who work minimum wage jobs have iPhones. They have credit cards. If someone has the ability to make above minimum wage, and all they have to do is finance the purchase of a mac, if they don't do it, then they have their priorities messed up. Note, I don't think everyone *can* make money if they just purchase a mac. I'm saying if you have the skills (and desire), and it costs you the risk of charging $500 on a credit card, you should do it if all you can get is minimum wage work otherwise. This is exactly how people get ahead in life, they don't wait for handouts. People who have successful businesses didn't start out with magical seed capital that didn't have to be paid back, they started out by working hard, making do with what they had, sacrificing other things, learning from their mistakes, and building on their successes. They don't cry in the corner saying poor me, if only I had X I could get ahead. Ask any person who built a company. Anyway, this is getting far too political. Now, about that bikeshed color... -Steve
[Issue 14693] @property return type not generated in .di file
https://issues.dlang.org/show_bug.cgi?id=14693 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Blocks||14680 --
[Issue 14693] New: @property return type not generated in .di file
https://issues.dlang.org/show_bug.cgi?id=14693 Issue ID: 14693 Summary: @property return type not generated in .di file Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: and...@erdani.com Repro: struct A { @property foo() { return 42; } } This is correct code, the fact that foo is a function is inferred from the presence of @property, and the return type is deduced automatically from the body. However, if a .di file is generated it'll have this code: struct A { @property foo(); } which is incorrect D. Solution: keep the bodies of functions with automatically inferred type in the .di file. --
[Issue 14680] Investigate the use of .di files for Phobos
https://issues.dlang.org/show_bug.cgi?id=14680 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Depends on||14693 --
Re: Two ideas for faster builds
On Thursday, 11 June 2015 at 23:19:06 UTC, Jonathan M Davis wrote: It's what happens when you use traits like isInputRange, isForwardRange, etc. all over the place. std.algorithm is likely an extreme case Thank you! Laeeth.
Re: Qualified destructors / immutable objects
On Friday, 12 June 2015 at 15:36:22 UTC, anonymous wrote: no need for ~this() to modify immutable data: snip I think that's a another bug related to init values.
[Issue 14694] New: Functions nested within functions need their body in the generated .di file
https://issues.dlang.org/show_bug.cgi?id=14694 Issue ID: 14694 Summary: Functions nested within functions need their body in the generated .di file Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: and...@erdani.com Obvious in retrospect. Repro picked from std.array: inout(T)[] overlap(T)(inout(T)[] r1, inout(T)[] r2) @trusted pure nothrow { alias U = inout(T); static U* max(U* a, U* b) nothrow { return a b ? a : b; } static U* min(U* a, U* b) nothrow { return a b ? a : b; } auto b = max(r1.ptr, r2.ptr); auto e = min(r1.ptr + r1.length, r2.ptr + r2.length); return b e ? b[0 .. e - b] : null; } After .di generation: pure nothrow @trusted inout(T)[] overlap(T)(inout(T)[] r1, inout(T)[] r2) { alias U = inout(T); static nothrow U* max(U* a, U* b); static nothrow U* min(U* a, U* b); auto b = max(r1.ptr, r2.ptr); auto e = min(r1.ptr + r1.length, r2.ptr + r2.length); return b e ? b[0..e - b] : null; } Obviously that's not going to work for more than one reason :o). --
[Issue 14694] Functions nested within functions need their body in the generated .di file
https://issues.dlang.org/show_bug.cgi?id=14694 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Blocks||14680 --
[Issue 14680] Investigate the use of .di files for Phobos
https://issues.dlang.org/show_bug.cgi?id=14680 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Depends on||14694 --
Re: ... and the sixth wasn't far behind!
On 6/12/15 1:53 PM, Adam D. Ruppe wrote: The di generation is actually fairly simple code, these are probably all pretty low hanging - I'd encourage anyone who wants some easy entry into dmd hacking to take a look at these. Word. To make it easier to compare notes: https://github.com/D-Programming-Language/phobos/pull/3407 -- Andrei
Re: Phobos addition formal review: std.experimental.allocator
On Friday, 12 June 2015 at 19:19:55 UTC, Andrei Alexandrescu wrote: On 6/12/15 11:23 AM, Baz wrote: On Friday, 12 June 2015 at 11:09:01 UTC, Dicebot wrote: Small tip for reviewers: there are quite many modules in proposed package but majority is actual allocator implementation. I'd suggest to start investigating sources/documentation starting from http://erdani.com/d/phobos-prerelease/std_experimental_allocator.html and http://erdani.com/d/phobos-prerelease/std_experimental_allocator_building_blocks.html while using http://erdani.com/d/phobos-prerelease/std_experimental_allocator_showcase.html as reference for highlight examples. while building the package as a static lic library, i've found that _showcase.d_ is not usable under Windows because MmapAllocator is Posix only: https://github.com/andralex/phobos/blob/allocator/std/experimental/allocator/showcase.d#L66 https://github.com/andralex/phobos/blob/allocator/std/experimental/allocator/mmap_allocator.d#L14 I've asked this a while ago as well - could anyone with a Windows rig contribute a MmapAllocator for Windows? Thanks! -- Andrei I have done it (https://gist.github.com/BBasile/e382be91dcc18e4d2358), but if i run the tests of the showcase i get: --- ...\region.d(84): Error: shared method std.experimental.allocator.mmap_allocator.MmapAllocator.allocate is not callable using a non-shared object ...\showcase.d(73): Error: template instance std.experimental.allocator.region.Region!(MmapAllocator, 8u, cast(Flag)false) error instantiating ...\allocator_list.d(76): Error: struct Factory does not overload () ...\showcase.d(79): Error: template instance std.experimental.allocator.allocator_list.AllocatorList!(Factory, NullAllocator) error instantiating ...\region.d(84,29): Error: shared method std.experimental.allocator.mmap_allocator.MmapAllocator.allocate is not callable using a non-shared object ...\showcase.d(73,20): Error: template instance std.experimental.allocator.region.Region!(MmapAllocator, 8u, cast(Flag)false) error instantiating ...\allocator_list.d(76,42): Error: struct Factory does not overload () ...\showcase.d(79,12): Error: template instance std.experimental.allocator.allocator_list.AllocatorList!(Factory, NullAllocator) error instantiating C:\...\allocator\showcase.d has not been compiled --- Should i continue and propose a PR ?
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 19:52:56 UTC, Ola Fosheim Grøstad wrote: was not related to english singular they… but it could also come from Sie through the trade German influence in Bergen around 1300… Or more likely Danish… I think they have same polite singular form De. It makes sense that one might pick up polite forms through trading. Oh well.
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
Originally (.Net 1) there was only 'Parse', 'TryParse' came in .Net 2, I guess they had to admit that exceptions are not always practical. I think TryParse (and anything marked prefixed with Try) is meant for quick stuff. It doesn't return any error. Just a boolean indicating that it failed. The entire function seems to be a wrapper around the actual try mechanism. So Parse will give you an error, TryParse will just tell you it failed.
Re: How to pass voldemort types to functions
On 06/12/2015 03:19 PM, kerdemdemir wrote: Hi; I have tuples created by std.algorithm.group function. auto tupleB = stringB.group(); I need to write a a function which takes tubleB and do some cool stuff. If I don't use a function and write all code below .group() everytihng works but for reusing the code I want to call a function with my tuples. I tried ; void foo(T...)(T tuple) void foo(Tuple!(dchar,uint) tuplle) But even couldn't compiile. Do you have any idea for passing result of std.algorithm.group() to my free function? According to group()'s documentation, the elements of the range are Tuples (not the range itself). Best thing to do is to use a template and optionally require that the elements are instances of the Tuple template. import std.stdio; import std.algorithm; import std.typecons; import std.traits; import std.range; void foo(R)(R range) if (isInstanceOf!(Tuple, ElementType!R))// -- optional { writefln(%(%s\n%), range); } void main() { int[] arr = [ 1, 2, 2, 2, 2, 3, 4, 4, 4, 5 ]; foo(arr.group); } Prints Tuple!(int, uint)(1, 1) Tuple!(int, uint)(2, 4) Tuple!(int, uint)(3, 1) Tuple!(int, uint)(4, 3) Tuple!(int, uint)(5, 1) Ali P.S. I know that you like being brief but I find it easier if you provide complete code. :)
Re: Reading array of integers readln performance issues
Thanks a lot for your great advices and exaamples. Yes if I don't return; web-site won't show it as wrong answer. As a learner I am very happy with the responsiveness of the community. Regards
Re: How to pass voldemort types to functions
void foo(R)(R range) if (isInstanceOf!(Tuple, ElementType!R))// -- optional { Ali thanks a lot. I don't believe I didn't simply try your way. It works. I am also happy to learn optional static if . Your examples are really useful for me. Next time I will share whole code. Thanks a lot.
Re: You too can work on D for iOS
On 06/12/2015 04:33 PM, Steven Schveighoffer wrote: Anyway, this is getting far too political. Now, about that bikeshed color... True, fair enough.
Re: Tip: unittest-only artifacts should not be version(unittest) if used across modules
On Thu, Jun 11, 2015 at 11:09 PM, Andrei Alexandrescu via Digitalmars-d digitalmars-d@puremagic.com wrote: Just ran into this with Phobos: https://github.com/D-Programming-Language/phobos/pull/3403 If unittest-only artifacts are not constrained to just unittest builds, does this not make them open to be not unittest-only? That is to say, if there is a method or whatever that is just for tests, without marking it 'version(unittest)' how do you ensure it is not actually used in the regular, shipped code? Not sure best way to solve the across-module problem and still keep test code restricted to tests... maybe instead put the shared test code in its own module, and import with version(unittest).
Re: Phobos addition formal review: std.experimental.allocator
On 6/12/15 11:23 AM, Baz wrote: On Friday, 12 June 2015 at 11:09:01 UTC, Dicebot wrote: Small tip for reviewers: there are quite many modules in proposed package but majority is actual allocator implementation. I'd suggest to start investigating sources/documentation starting from http://erdani.com/d/phobos-prerelease/std_experimental_allocator.html and http://erdani.com/d/phobos-prerelease/std_experimental_allocator_building_blocks.html while using http://erdani.com/d/phobos-prerelease/std_experimental_allocator_showcase.html as reference for highlight examples. while building the package as a static lic library, i've found that _showcase.d_ is not usable under Windows because MmapAllocator is Posix only: https://github.com/andralex/phobos/blob/allocator/std/experimental/allocator/showcase.d#L66 https://github.com/andralex/phobos/blob/allocator/std/experimental/allocator/mmap_allocator.d#L14 I've asked this a while ago as well - could anyone with a Windows rig contribute a MmapAllocator for Windows? Thanks! -- Andrei
Re: rvalue references
On 09/06/2015 13:14, Namespace wrote: snip What does this have to do with garbage-collected language? If I have a big struct, e.g. struct Matrix { float[16] values = [...]; } I always want to pass it by ref because a move or a copy would be too slow. That seems to me a matter more of having something that behaves like C++ const T, than of rvalue references as such. Stewart. -- My email address is valid but not my primary mailbox and not checked regularly. Please keep replies on the 'group where everybody may benefit.
Re: rvalue references
On Friday, 12 June 2015 at 19:39:25 UTC, Stewart Gordon wrote: On 09/06/2015 13:14, Namespace wrote: snip What does this have to do with garbage-collected language? If I have a big struct, e.g. struct Matrix { float[16] values = [...]; } I always want to pass it by ref because a move or a copy would be too slow. That seems to me a matter more of having something that behaves like C++ const T, than of rvalue references as such. Stewart. Yes, you could say that. It is implemented in this manner.
Re: DIP80: phobos additions
On Friday, 12 June 2015 at 17:56:53 UTC, Tofu Ninja wrote: Matrix math is matrix math, it being for ogl makes no real difference. I think it’s a little more complicated than that. BLAS and LAPACK (or variants on them) are low-level matrix math libraries that many higher-level libraries call. Few people actually use BLAS directly. So, clearly, not every matrix math library is the same. What differentiates BLAS from Armadillo is that you can be far more productive in Armadillo because the syntax is friendly (and quite similar to Matlab and others). There’s a reason why people use glm in C++. It’s probably the most productive way to do matrix math with OpenGL. However, it may not be the most productive way to do more general matrix math. That’s why I hear about people using Armadillo, Eigen, and Blaze, but I’ve never heard anyone recommend using glm. Syntax matters.
Re: Dgame 0.6 - Beta
It looks like a really clean interface. Thank you. However I was unable to get either of the WIP games to compile through dub. The API has changed enough to make it difficult to get 5.3 or higher up and running. It's just nice to have a nice example. Btw, Great work! Yes, but as soon as I have time I want to port them to the newest version. Don't worry. :)
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On Friday, 12 June 2015 at 19:16:39 UTC, Nick Sabalausky wrote: Here is a nice documentary about the 80s : https://www.youtube.com/watch?v=bS5P_LAqiVg Wow, just watched the first minute, that's freaking sweet! Definitely gonna watch the rest of that later. The historical accuracy is indeed striking :)