Re: Anyone knows this issue? std/math.d(2759): Error: number '0x1p-1024' is not representable
On 20 Jun 2015 11:35, Martin Nowak via Digitalmars-d digitalmars-d@puremagic.com wrote: On 06/20/2015 09:52 AM, Walter Bright wrote: Which C runtime are you using? The math functions in C runtimes are often inadequate. So we now call the host's C library to perform constant folding/CTFE of exp? This is a point for Iain's proposal to use a high precision floating point implementation in the compiler to avoid machine/platform differences. I thought dmd used the C library implementations for all intrinsics via CTFE, not just exp? In any case, isn't the problem you are seeing related to the conversion of string to float? Which again dmd is at the mercy of the C library implementation to handle correctly.
Re: Anyone knows this issue? std/math.d(2759): Error: number '0x1p-1024' is not representable
On 06/19/2015 06:54 PM, Andrei Alexandrescu wrote: This is happening on my older CentOS as well, it's a problem in the C library. I suggest we just version those tests. -- Andrei Even more worrisome, I don't understand why dmd is compiling the unittests at all. Might be related to https://issues.dlang.org/show_bug.cgi?id=14431 or https://issues.dlang.org/show_bug.cgi?id=14508.
Re: Anyone knows this issue? std/math.d(2759): Error: number '0x1p-1024' is not representable
On 06/20/2015 09:52 AM, Walter Bright wrote: Which C runtime are you using? The math functions in C runtimes are often inadequate. So we now call the host's C library to perform constant folding/CTFE of exp? This is a point for Iain's proposal to use a high precision floating point implementation in the compiler to avoid machine/platform differences.
Re: Naming things
On Saturday, 20 June 2015 at 09:27:16 UTC, Vladimir Panteleev wrote: Naming things There are only two hard things in Computer Science: cache invalidation and naming things. -- Phil Karlton Hello, There has been a lot of recent debate regarding the names of some new functions recently added to Phobos. ... I'd like to note my support for consistent/standardized naming (especially with regards to `withExtension`/`setExt`). As an end-user of D, it's very important to me that a precedent be set for naming prior to D releases - it means less time spent upfront perusing documentation, and less time spent trying to understand how a particular function works. When I'm viewing code in the wild, so to speak, time spent trying to understand byzantine names is time wasted. In this particular case, `withExtension` is objectively better than `setExt.` The `with` prefix indicates lazy operation - this is a much better cue as to the function's operation than the truncation of an already-existing name. Truncating the name will, without a doubt, lead to user confusion: these two functions have the same goal, but operate in fundamentally different ways, and the name should reflect this. The alphanumerical sorting argument has little validity, especially seeing as the See Also section serves the same purpose. I understand that the community's been beset with naming discussions for the longest of times - and yes, they can often be non-productive - but there are some cases in which it is very much worth the time choosing a better name. `setExt` is objectively confusing and uncommunicative of its actual functionality - and it can be fixed now, before it becomes a permanent wart. As a final note, naming conventions are very important for the end-user of a programming language. If one goes with a 'pick the first name that works' approach, the result is a very unproductive, contradictory language; an extreme example of this can be seen in PHP, where programmers often have to consult the documentation for *every* function to find the correct name for every function. We have the ability to prevent that from happening here.
Re: Anyone knows this issue? std/math.d(2759): Error: number '0x1p-1024' is not representable
On 06/20/2015 02:00 PM, Martin Nowak wrote: On 06/20/2015 12:06 PM, Walter Bright wrote: On 6/20/2015 3:06 AM, Walter Bright wrote: Apparently we need to roll our own version of strtod() and put it in Port. We already do our own strtold(), so it should be straightforward. Thanks, I'll work on a fix. I can't use the strtold_dm from the backend, b/c it's not available for the other compilers, and AFAIU licensing doesn't allow me to move it to the frontend.
Re: We need a typesystem-sanctioned way to cast qualifiers away
On Saturday, 20 June 2015 at 00:07:12 UTC, Andrei Alexandrescu wrote: Again, the reference to IAllocator must be unqualified even inside an otherwise qualified object. no love for a container factory? struct IAllocator{} struct container(T){} template factory(T) { struct factory { T contain; // potentially const IAllocator mutable; alias contain this; } } auto c = factory!(const container!uint)();
Re: Anyone knows this issue? std/math.d(2759): Error: number '0x1p-1024' is not representable
On 6/19/2015 9:18 AM, Martin Nowak wrote: I'm getting this error while trying to build the relase. std/math.d(2759): Error: number '0x1p-1024' is not representable I'm getting that while compiling a -m32 (X86) static release phobos library, but I can't reproduce the error using the same command. https://github.com/D-Programming-Language/phobos/blob/abb21ab9bcd3857f1567bfde11c2d5d385f5caf0/std/math.d#L2759 Don't even know why the unittests are compiled. Which C runtime are you using? The math functions in C runtimes are often inadequate.
Re: N-dimensional slices is ready for comments!
On Friday, 19 June 2015 at 21:45:18 UTC, Vlad Levenfeld wrote: On Friday, 19 June 2015 at 21:43:59 UTC, Vlad Levenfeld wrote: https://github.com/evenex/autodata N-dimensional slicing, range ops (map, zip, repeat, cycle, etc) lifted to n-dimensions, n-dim specific ops like extrusion, n-dim to d-dim of n-1-dim, flattening for lexicographic traversal, support for non-integer indices. I posted this awhile ago but no one took notice. But if this is happening here now, feel free to crib anything that you think might look useful, as I'd hate to think all of this prior work went to waste. and the dub package: http://code.dlang.org/packages/autodata autodata is hard to understand without HTML documentation. Automated documentation based on https://github.com/kiith-sa/harbored-mod can be found at http://ddocs.org/autodata/~master/index.html, and it is empty. You may want to read http://dlang.org/ddoc.html Regards, Ilya
Naming things
Naming things There are only two hard things in Computer Science: cache invalidation and naming things. -- Phil Karlton Hello, There has been a lot of recent debate regarding the names of some new functions recently added to Phobos. Mostly this concerns the good work of Walter Bright, and new functions which operate on ranges rather than strings. A few times, many people felt that the names could have been chosen better - in some cases, much better. This is not a singular occurrence, but a recurrent one: http://forum.dlang.org/post/ybbwpgmgsqvmbvoqh...@forum.dlang.org https://github.com/D-Programming-Language/phobos/pull/2149#issuecomment-42867964 So far, post-merge name changes have been rejected: https://github.com/D-Programming-Language/phobos/pull/3243 https://github.com/D-Programming-Language/phobos/pull/3426 Two examples of controversial name pairs: setExt/setExtension, and toLower/toLowerCase. These functions have the same functionality, but one of them is eager, and the other is lazy. Can you guess which is which? I would like to argue that these rejections were poorly argumented and should have been accepted. Although the names of these particular functions are the primary point of the post, I would like to also discuss the general policy of minor changes. I have discussed the issue at hand with Andrei Alexandrescu on IRC. Here are some points gathered: 1. The renames do not apply to code that appeared in a DMD release, thus they are non-breaking changes. As the actual code has been merged, the renames are not blocking anything either. 2. There seems to be some confusion regarding what counts as consensus. Walter Bright argues that there is no consensus regarding the new names. I would like to split this argument into two questions: a) Is there consensus that the current names are very bad, and should be changed? b) Is there consensus on which name to use? These two questions must not be confused. I think there is sufficient evidence that shows that everyone who has an opinion on the names, agrees that the current names are pretty bad. What the new names should be is of secondary importance, as long as the names are changed to any of the suggested names. 3. The main argument against allowing post-merge renames is that allowing one invites an infinite number of other minor changes. I think this is not a good argument, because: - In this particular case, there is unilateral consensus that the current names are objectively bad, and should be changed. There are no arguments that show that e.g. setExt is a better name than e.g. withExtension. I see no problem with not acting on renaming suggestions in situations when there is no consensus. - Naming things well matters. We need to treat renames in the same way as minor breaking changes. In the same way that we do not reject minor breaking fixes and improvements to the implementations of functions that have not yet been released, we should improve the naming of identifiers if there is consensus that the change is an improvement. 4. I have often heard the argument that bikeshedding distracts from getting actual work done, or variations of such. I think this argument is flawed. Discussions about minor things will continue regardless of whether small changes, such as renames, are rejected as a matter or policy or not. (Yes, this post is an example of this.) Yes, allowing some minor changes but not others will generate debate on why some changes were accepted and others not. Rejecting all minor changes does not prevent such debate from occurring, especially since there will always be exceptions (see e.g. std.meta). I would thus like to argue that the policy of no minor changes, even non-breaking should be reviewed. 5. Again, naming things well matters. An API with confusing or overlapping identifier names is a bad API. I've said this above but I want to say this again: we need to stop looking at renames as evil or as a waste of time, and look at them in the same way as (breaking) changes to the API / functionality. Just like API or functionality changes can be subjective in their usefulness, so can renames be controversial or overwhelmingly positive. I do not disagree that how well identifiers are named is a secondary concern to the functionality that they provide. But this does not mean that we should ignore the quality of the names, and furthermore, reject any attempts to improve them. 6. Concerning the naming itself. My involvement comes from when my PR to rename setExt to withExtension was closed. I would like to present a very similar case in another language, JavaScript. The String method has two functions with a similar name and functionality: substr and substring. If you were to search the web, you can find a multitude of confusion over these functions:
Re: Anyone knows this issue? std/math.d(2759): Error: number '0x1p-1024' is not representable
On 06/20/2015 09:52 AM, Walter Bright wrote: Which C runtime are you using? The math functions in C runtimes are often inadequate. Debian 7.4, there is nothing I can do to avoid glibc.
Re: Proof of concept - library AA
On 05/30/2015 10:50 AM, Vladimir Panteleev wrote: Not sure how much this is a problem but implicit conversion from null may also be an issue: http://localhost/post/asvcbsvfcxznwypttojk@192.168.0.1 Not in my proposal, b/c it's an explicit conversion that does allocate a translation wrapper. https://github.com/D-Programming-Language/druntime/pull/1282/files?diff=unified#diff-7f36fe9957b2e56c0c468548c4e1b0aaR167
Re: Anyone knows this issue? std/math.d(2759): Error: number '0x1p-1024' is not representable
On 6/20/2015 3:06 AM, Walter Bright wrote: Apparently we need to roll our own version of strtod() and put it in Port. We already do our own strtold(), so it should be straightforward.
Re: Anyone knows this issue? std/math.d(2759): Error: number '0x1p-1024' is not representable
On 06/20/2015 12:06 PM, Walter Bright wrote: On 6/20/2015 3:06 AM, Walter Bright wrote: Apparently we need to roll our own version of strtod() and put it in Port. We already do our own strtold(), so it should be straightforward. Thanks, I'll work on a fix.
Re: Anyone knows this issue? std/math.d(2759): Error: number '0x1p-1024' is not representable
On 06/20/2015 01:35 PM, Iain Buclaw via Digitalmars-d wrote: Can we make this a boolean check removing the need for me to explicitly set errno? The function returns a float, so errno seems like the better choice.
Re: Martin Nowak is officially MIA
On 06/19/2015 06:26 PM, Joakim wrote: The impression I get is that everyone in the core team is too busy with their real jobs, other than Walter, to make meetings easy to coordinate. Not sure of a ready solution for that. Being to busy is no excuse for important things like this, b/c we're wasting lots of time on this. Meetings are easy, due to the different timezones synchronous meetings will hardly work, but an asynchronous meeting on a mailing list does. Which also comes with the usual e-mail benefit, people think a lot more before hitting send. Basically a biweekly sprint meeting to plan our trello board and discuss other stuff would suffice. http://forum.dlang.org/post/55586d5b.8020...@dawg.eu
Re: D could catch this wave: web assembly
Am Thu, 18 Jun 2015 08:05:46 + schrieb John Colvin john.loughran.col...@gmail.com: This appears to have involvement from all major browser vendors, which provides hope it might actually catch on properly. An llvm backend will be created which will compile to wasm, hopefully LDC and/or SDC could glue to this. https://www.w3.org/community/webassembly/ https://github.com/WebAssembly In particular, see https://github.com/WebAssembly/design/blob/master/HighLevelGoals.md https://github.com/WebAssembly/design/blob/master/FAQ.md and https://github.com/WebAssembly/design/blob/master/MVP.md I'd be more happy with code that runs outside and independently of the browser, but it seems to be the trend to move everything into virtual machines and browsers. I see the main reason notebooks have to be replaced every few years as once again memory per open tab * 15 = 50% installed system ram. If you have a perfectly working old notebook with Windows XP on it, I can recommend QtWeb for its low resource usage and modern-ish feature set. It is a little unstable and rough around the edges though: http://www.qtweb.net/ -- Marco
Re: Anyone knows this issue? std/math.d(2759): Error: number '0x1p-1024' is not representable
On 6/20/2015 2:48 AM, Iain Buclaw via Digitalmars-d wrote: On 20 Jun 2015 11:35, Martin Nowak via Digitalmars-d digitalmars-d@puremagic.com mailto:digitalmars-d@puremagic.com wrote: On 06/20/2015 09:52 AM, Walter Bright wrote: Which C runtime are you using? The math functions in C runtimes are often inadequate. So we now call the host's C library to perform constant folding/CTFE of exp? This is a point for Iain's proposal to use a high precision floating point implementation in the compiler to avoid machine/platform differences. I thought dmd used the C library implementations for all intrinsics via CTFE, not just exp? In any case, isn't the problem you are seeing related to the conversion of string to float? Which again dmd is at the mercy of the C library implementation to handle correctly. The code is the following, in lexer.c: errno = 0; (void)Port::strtod((char *)stringbuffer.data, NULL); if (errno == ERANGE) { const char *suffix = (result == TOKfloat32v || result == TOKimaginary32v) ? f : ; error(scanloc, number '%s%s' is not representable, (char *)stringbuffer.data, suffix); } The point of the Port:: code is to correct for inadequacies of various C standard library implementations, in this case Debian 7.4. Apparently we need to roll our own version of strtod() and put it in Port.
Re: Anyone knows this issue? std/math.d(2759): Error: number '0x1p-1024' is not representable
On 20 June 2015 at 12:06, Walter Bright via Digitalmars-d digitalmars-d@puremagic.com wrote: On 6/20/2015 2:48 AM, Iain Buclaw via Digitalmars-d wrote: On 20 Jun 2015 11:35, Martin Nowak via Digitalmars-d digitalmars-d@puremagic.com mailto:digitalmars-d@puremagic.com wrote: On 06/20/2015 09:52 AM, Walter Bright wrote: Which C runtime are you using? The math functions in C runtimes are often inadequate. So we now call the host's C library to perform constant folding/CTFE of exp? This is a point for Iain's proposal to use a high precision floating point implementation in the compiler to avoid machine/platform differences. I thought dmd used the C library implementations for all intrinsics via CTFE, not just exp? In any case, isn't the problem you are seeing related to the conversion of string to float? Which again dmd is at the mercy of the C library implementation to handle correctly. The code is the following, in lexer.c: errno = 0; (void)Port::strtod((char *)stringbuffer.data, NULL); if (errno == ERANGE) Ah yes, that brings back memories of fixing GDC to set errno = ERANGE if casting the result from 160bits down returns Infinity. Can we make this a boolean check removing the need for me to explicitly set errno?
Re: Reduce has dreadful performance?
On Saturday, 20 June 2015 at 05:55:07 UTC, Russel Winder wrote: On Thu, 2015-06-18 at 15:54 -0700, Andrei Alexandrescu via Digitalmars-d wrote: […] Russel, do you have numbers for ldc by any chance? Thx! -- Andrei Single data point only, and I need to check this, but: Loop: 1.44s Reduce 1: 1.43s Reduce 2: 1.42s LDC seems to beat DMD into the ground. But then I think we all know this ;-) The PyD setuptools support appears to not properly ser RPATH which is a bit annoying. Actually it is a lot annoying. Interesting, I saw a bigger speedup from the ranges. Do you use windows? What LLVM/LDC version? flags?
Re: Martin Nowak is officially MIA
On Friday, 19 June 2015 at 19:27:09 UTC, Nick Sabalausky wrote: On 06/19/2015 02:41 PM, Jacques =?UTF-8?B?TcO8bGxlciI=?= jacques.muel...@gmx.de wrote: You could use a teamchat like Slack, HipChat, ChatGrape or even Let's Chat. Or irq. With IRC you could miss a conversation. Teamchats allow to browse and even search the entire chat history. Also they include integrations to github and others. It's just more comfortable.
Re: OT - civility in a professional environment
Our management tries to apply best practices, it works most of the time.
Future(s) for D.
I recently read this facebook post on their future implementation in their Folly library. https://code.facebook.com/posts/1661982097368498 This made me slightly envious. Thoughts on a D implementation?
Re: Reduce has dreadful performance?
On Thu, 2015-06-18 at 13:53 -0700, Walter Bright via Digitalmars-d wrote: […] There's no intrinsic reason why ranges must do worse, so I expect they'll achieve parity. reduce already has achieved parity using LDC – once you install it properly, unlike what I had been doing. Explicit loops are just so last millenium. :-) PyData London 2015 here we come. -- Russel. = Dr Russel Winder t:+44 20 7585 2200 voip:sip: russel.win...@ekiga.net 41 Buckmaster Road m:+44 7770 465 077 xmpp:rus...@winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype:russel_winder signature.asc Description: This is a digitally signed message part
Re: Future(s) for D.
On Saturday, 20 June 2015 at 12:35:11 UTC, weaselcat wrote: I recently read this facebook post on their future implementation in their Folly library. https://code.facebook.com/posts/1661982097368498 This made me slightly envious. Thoughts on a D implementation? Even if the callbacks are sequentially listed, the callback hell is still there. A better solution is to use fibers. You can take a look at a fibers[1] and tasks[2] implementation in asynchronous library[3]. [1] - https://github.com/dcarp/asynchronous/blob/master/src/asynchronous/futures.d [2] - https://github.com/dcarp/asynchronous/blob/master/src/asynchronous/tasks.d [3] - http://code.dlang.org/packages/asynchronous
Re: Future(s) for D.
On Sat, 20 Jun 2015 14:00:47 +, Etienne wrote: Yep, looks like we already have better. I don't understand how D hasn't fully picked up in Web Dev at this point. Are they expecting an e-commerce/blogging/cms platform to go with it? D is just not ugly enough. the key to be popular (not only in webdev) is to make tech dumb, ugly, bloated, slow, inconsistent. choose any three or more. signature.asc Description: PGP signature
Re: D could catch this wave: web assembly
On Saturday, 20 June 2015 at 15:36:45 UTC, ketmar wrote: it was designed to ignore that fact altogether. html/css layouting is a pitiful attempt and barely usable. bwah, it can't even do normal constraints! Hmmm, what do you mean by normal constraints? Modern CSS provides many options, too many. CSS is no longer a simple system... So it is probably common to use javascript where CSS could have been sufficient.
Re: D could catch this wave: web assembly
On Sat, 20 Jun 2015 12:32:11 -0400, Nick Sabalausky wrote: On 06/20/2015 12:20 PM, ketmar wrote: On Sat, 20 Jun 2015 16:14:43 +, Ola Fosheim Grøstad wrote: On Saturday, 20 June 2015 at 15:36:45 UTC, ketmar wrote: it was designed to ignore that fact altogether. html/css layouting is a pitiful attempt and barely usable. bwah, it can't even do normal constraints! Hmmm, what do you mean by normal constraints? google://cassowary that is a *real* constraint engine. what we have in css is a half-assed attemt to emulate the real engine without the engine itself. I can see why people aren't familiar with that and it's approach: There's zero front-page examples, and any basic examples 101, how to use it seem well-buried. Most people are gonna take one brief look and move on. It seems to really need some better PR. it's actually a tool for toolkit builders, not for end users. cassowary itself is only a solver, it doesn't even have syntax to setup constraints (toolkit builder must invent an implement one). so it's hard to make example for it which doesn't resemble a wall of text several pages long only to layout three elements. the real power of cassowary is it's dynamic constraint solver. but it needs to be combined with user-friendly constraint syntax, or it will be unusable. so cassowary authors have to write their own toolkit only to show some impressive examples on site! ;-) besides, cassowary comes from university culture, where user-friendly presentations are bad or non-existent. tl;dr: i completely agree with you! ;-) signature.asc Description: PGP signature
Re: OT - civility in a professional environment
On Saturday, 20 June 2015 at 11:23:21 UTC, Kagamin wrote: Our management tries to apply best practices, it works most of the time. When you have sensitive, smart, and creative people, one should expect sometimes more sturm and drang - and the question is what one does with that energy once it has passed. Actually, what the article didn't address is that there is sometimes a tradeoff between being 'nice' (a peculiarly Anglo thing, for which we have Cardinal Newman and his essay on the Gentleman to thank) and doing what's right for the situation - it's always much better, in my experience, to confront things. I think the D community stands out for its civility and helpfulness (also for the fact that people have high standards and care about making sure things are up to scratch). So I didn't intend by posting this to refer to anything recent on the forum. It's just notably relevant to broader experience in many different office environments. The newer title of the NYT article is better - this is more a symptom of distractedness, and less about bosses (who have a lonely, often verging on impossible job) - it applies to us all as human beings in 2015.
Re: D could catch this wave: web assembly
On Saturday, 20 June 2015 at 15:36:45 UTC, ketmar wrote: On Sat, 20 Jun 2015 15:21:28 +, Kagamin wrote: High DPI settings screw up native UI too if it's not pixel-precise, and ignoring user preferences is infraction, I'm afraid. /me wonders if windows still cannot into dynamic layouts. in any decent gui lib it's actually *harder* to build a gui which screws itself up on font size/window size change. Windows API would be similar to X11, where you just specify everything in pixels and toolkits building on top of it manually do all the recomputations and layout policies, not the UI server. And then it's still not simple: with small font you can put a lot of information into a window, which simply won't fit with bigger font size, in this case web gets scrolled naturally, while native UI clunks interface and truncates strings trying to fit it into the window.
Re: Help add D tutorials to Hackr.io
On Sat, 20 Jun 2015 15:55:24 +, NVolcz wrote: Found this site that collects learning material for different programming languages and tech. http://hackr.io/tutorials/d-programming-language OT: why do they keep naming their sites in this suckr manner? there is a limit on number of es in one word which i unaware of? signature.asc Description: PGP signature
Re: Naming things
On Saturday, 20 June 2015 at 09:27:16 UTC, Vladimir Panteleev wrote: I would like to present a very similar case in another language, JavaScript. The String method has two functions with a similar name and functionality: substr and substring. If you were to search the web, you can find a multitude of confusion over these functions: but see how you will hit some of that links by searching for javascript substr or something like it! what that gives is more popularity: everyone wants to write an article for such a hot, yet easy topic. thus, having the same naming in D inevitably leads to more articles about D, and to increased popularity!
Re: Anyone knows this issue? std/math.d(2759): Error: number '0x1p-1024' is not representable
On 6/20/15 2:30 AM, Martin Nowak wrote: On 06/19/2015 06:54 PM, Andrei Alexandrescu wrote: This is happening on my older CentOS as well, it's a problem in the C library. I suggest we just version those tests. -- Andrei Even more worrisome, I don't understand why dmd is compiling the unittests at all. I think it's just tokenizing them that triggers the errors. -- Andrei
Re: Martin Nowak is officially MIA
On 6/20/15 2:37 AM, Martin Nowak wrote: Basically a biweekly sprint meeting to plan our trello board and discuss other stuff would suffice. http://forum.dlang.org/post/55586d5b.8020...@dawg.eu A biweekly meeting would be great. -- Andrei
Re: D could catch this wave: web assembly
On Friday, 19 June 2015 at 15:13:11 UTC, Joakim wrote: Hmm... Web: write once with html, css, js. Native: write three times in obj-c, java, c#. Not sure why the former should sink and not the latter. Because writing it once in HTML/CSS/JS takes you much longer than writing it in Java, while being less responsive, then you get to enjoy all the myriad ways your UI will be screwed up by the different browsers. High DPI settings screw up native UI too if it's not pixel-precise, and ignoring user preferences is infraction, I'm afraid. And this is where web actually shines: it's designed to adapt gracefully to any user settings. Well, of course when site design strays from how web was designed to work, it runs into problems, that should be obvious. I didn't really try to write java, but my impression is that java usually requires huge amounts of boilerplate code, while web is usually succinct. But what do they do instead of starting anew? Web and native are not really related, one doesn't preclude existence of the other and doesn't depend on it. That doesn't answer the rhetorical question you're responding to. In any case, they _are_ competing technologies, and one is so bad that it is manifestly losing out. Dunno, I don't see there losses, maybe because they only happen on mobile. Yeah, you said nothing about how this is related to desktop as if it doesn't exist. On Friday, 19 June 2015 at 15:45:20 UTC, Nick Sabalausky wrote: We need some sort of SVG-BSON, or something along those lines. There's EXI.
Re: Anyone knows this issue? std/math.d(2759): Error: number '0x1p-1024' is not representable
On 6/20/2015 5:16 AM, Martin Nowak wrote: On 06/20/2015 02:00 PM, Martin Nowak wrote: On 06/20/2015 12:06 PM, Walter Bright wrote: On 6/20/2015 3:06 AM, Walter Bright wrote: Apparently we need to roll our own version of strtod() and put it in Port. We already do our own strtold(), so it should be straightforward. Thanks, I'll work on a fix. I can't use the strtold_dm from the backend, b/c it's not available for the other compilers, and AFAIU licensing doesn't allow me to move it to the frontend. Ironically, this just appeared: https://www.reddit.com/r/programming/comments/3aif1a/visual_c_strtod_still_broken/
Re: Future(s) for D.
On 06/20/2015 12:34 PM, ketmar wrote: On Sat, 20 Jun 2015 12:23:59 -0400, Nick Sabalausky wrote: let's compare numbers for php, java, ruby, js -- and D. most companies will not bet on language for which a pool of hireable developers is small. and it's understandable: two developers quit, and the project is dead, doomed to complete rewrite in another language. sheesh! Well, not really. I mean, managers and HR all *believe* that to be so. But that's because pretty much all non-programmers, even ones in the software dev industry who really should know better, are stuck in this bizarre idea that programming skills are somehow non-transferable between languages. Which is obviously total bullcrap, but try explaining that to self-assured HR folk and other pointy-hairs. Hell, my first introduction to JS, ASP (yea, it was a long time ago) and web-dev in general was on-the-job as a fresh hire, and I was up to speed in like a week or so, if even that. The one thing relevant here that has *never* left my mind: http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html Favorite part: The recruiters-who-use-grep, by the way, are ridiculed here, and for good reason. I have never met anyone who can do Scheme, Haskell, and C pointers who can't pick up Java in two days, and create better Java code than people with five years of experience in Java, but try explaining that to the average HR drone. So true.
Re: Anyone knows this issue? std/math.d(2759): Error: number '0x1p-1024' is not representable
On 20 June 2015 at 14:03, Martin Nowak via Digitalmars-d digitalmars-d@puremagic.com wrote: On 06/20/2015 01:35 PM, Iain Buclaw via Digitalmars-d wrote: Can we make this a boolean check removing the need for me to explicitly set errno? The function returns a float, so errno seems like the better choice. It's at this point which I say it's a longdouble for GDC. Incase I need to remind people that there are no uses of native FP whatsoever in my compiler. :-)
Re: D could catch this wave: web assembly
On Sat, 20 Jun 2015 14:06:50 +0200, Marco Leise wrote: If you have a perfectly working old notebook with Windows XP on it, I can recommend QtWeb for its low resource usage and modern-ish feature set. It is a little unstable and rough around the edges though: http://www.qtweb.net/ Qt+WebKit. low resource usage. you must be joking. signature.asc Description: PGP signature
Re: Martin Nowak is officially MIA
On Thursday, 18 June 2015 at 16:02:19 UTC, Nick Sabalausky wrote: What happened to the one I contributed last year? If there's bitrot or other issues that needs addressing, then by all means, either ping me @ GitHub or email me at nick1 @ my domain name in this message's header. Both are set up to go straight to my phone. We still use that as the basis, but as you see people way too little about those tools. https://github.com/D-Programming-Language/installer/tree/master/create_dmd_release
Re: Help add D tutorials to Hackr.io
On 06/20/2015 12:18 PM, ketmar wrote: On Sat, 20 Jun 2015 15:55:24 +, NVolcz wrote: Found this site that collects learning material for different programming languages and tech. http://hackr.io/tutorials/d-programming-language OT: why do they keep naming their sites in this suckr manner? there is a limit on number of es in one word which i unaware of? It's the latest version of naming things iEverything, and eEverything before that. Observe something making it big. Imitate all the inconsequential superficial parts. Flop. Rinse. Repeat. It's the birdmen fallacy: https://seanmalstrom.wordpress.com/2009/12/01/the-birdmen-dont-fly/ Well, plus they're easier search terms this way :/
Re: Future(s) for D.
On Saturday, 20 June 2015 at 13:33:34 UTC, Dragos Carp wrote: On Saturday, 20 June 2015 at 12:35:11 UTC, weaselcat wrote: I recently read this facebook post on their future implementation in their Folly library. https://code.facebook.com/posts/1661982097368498 This made me slightly envious. Thoughts on a D implementation? Even if the callbacks are sequentially listed, the callback hell is still there. A better solution is to use fibers. You can take a look at a fibers[1] and tasks[2] implementation in asynchronous library[3]. [1] - https://github.com/dcarp/asynchronous/blob/master/src/asynchronous/futures.d [2] - https://github.com/dcarp/asynchronous/blob/master/src/asynchronous/tasks.d [3] - http://code.dlang.org/packages/asynchronous Yep, looks like we already have better. I don't understand how D hasn't fully picked up in Web Dev at this point. Are they expecting an e-commerce/blogging/cms platform to go with it?
Re: forum.dlang.org, version 2 (BETA)
Cool. Something changed? Layout is much better now. BTW unsent drafts stack up.
Help add D tutorials to Hackr.io
Found this site that collects learning material for different programming languages and tech. http://hackr.io/tutorials/d-programming-language
Feasibility of a std.encoding.safeDecode overload for InputRanges?
Currently, std.encoding.safeDecode seems to only work on Random Access Ranges that have a .length property. (So essentially arrays and array-like objects), but I would very much like to be able to safeDecode strings that have lazy range-based processing applied to them (which often ends up with only an InputRange). Given that throwing-decodes work just fine on input ranges, would it be possible to let safe decodes work for them as well?
Re: Future(s) for D.
On 06/20/2015 11:12 AM, ketmar wrote: On Sat, 20 Jun 2015 14:00:47 +, Etienne wrote: Yep, looks like we already have better. I don't understand how D hasn't fully picked up in Web Dev at this point. Are they expecting an e-commerce/blogging/cms platform to go with it? D is just not ugly enough. the key to be popular (not only in webdev) is to make tech dumb, ugly, bloated, slow, inconsistent. choose any three or more. Dangit, I was just gonna post the same thing :) More seriously though (and this may sound like cynicism, but in my observation it really is true), webdev (and often computing in general) is all about fashion and buzz. Merit has very little to do with it. Making it big in this arena isn't about being the best, or even necessarily being good. That's been proven time and time again. It's about winning a popularity contest. So that's what's needed. I don't think there's any sure-fire way to pull that off, it's something that differs in each case, and requires hitting just the right variables, often by pure chance. But something that typically seems to help is a big killer app (ex, facebook has been a major reason why people continued to choose PHP even *after* PHP became known-bad and facebook moved to hiphop), or some other one-liner buzzworthy note (ex: Go comes from Google). Of course, catering to the lazy and the inexperienced also seems to help a lot on the web, too. I think that explains why so many of biggest languages there are the ones have ex., no static typing, implicit variable declarations, etc. D by contrast is a known static-typed language, and C/C++/Java have ruined the street cred of static typing. Dynamic is the greasers, and static is the nerd with taped-glasses and pocket protector. Same goes for with whitespace-based syntax versus semicolons/braces. So right there, D already has an uphill battle trying to be sexy. And sexy is exactly the one thing that wins over most of the people in the tech world these days. (Well, inertia counts for a lot of people, too. Hence the Java houses, C++, cobol, and such at some of the mega-corporations and companies in the more conservative industries.)
Re: D could catch this wave: web assembly
On Sat, 20 Jun 2015 16:14:43 +, Ola Fosheim Grøstad wrote: On Saturday, 20 June 2015 at 15:36:45 UTC, ketmar wrote: it was designed to ignore that fact altogether. html/css layouting is a pitiful attempt and barely usable. bwah, it can't even do normal constraints! Hmmm, what do you mean by normal constraints? google://cassowary that is a *real* constraint engine. what we have in css is a half-assed attemt to emulate the real engine without the engine itself. signature.asc Description: PGP signature
Re: D could catch this wave: web assembly
On Sat, 20 Jun 2015 16:18:28 +, Kagamin wrote: Windows API would be similar to X11, where you just specify everything in pixels and toolkits building on top of it manually do all the recomputations and layout policies, not the UI server. only in windows toolkit is built into system. and it can't do anything except pixels and stupid dialog units. And then it's still not simple: with small font you can put a lot of information into a window, which simply won't fit with bigger font size, in this case web gets scrolled naturally, while native UI clunks interface and truncates strings trying to fit it into the window. i lol'd. a typical windows rant, where toolkits still doesn't know about such things as preferred size, minimal size, and can't add scrolling if necessary, choosing to make controls smaller and smaller instead. signature.asc Description: PGP signature
Re: best way to interface D code to Excel
On Friday, 19 June 2015 at 21:06:31 UTC, Jesse Phillips wrote: On Wednesday, 17 June 2015 at 18:35:36 UTC, Laeeth Isharc wrote: Hi. I know D has support for COM - not sure of its status. And there was a Microsoft chap who posted here a couple of years back - wonderful templated code that made it easy to write this kind of thing. Unfortunately he wasn't able to share it publicly. Laeeth. I haven't ever done any real work with it, and certainly nothing with Excel. But Juno provides similarities for COM to what the Microsoft guy demonstrated. I made some changes so it would compile in dmd 2.070, didn't test though so it is still it's own branch. https://github.com/JesseKPhillips/Juno-Windows-Class-Library/tree/dmd6.070 Thanks Jesse - I did look at this, but I think I couldn't make it compile when I tried (or at least some of the unit tests fail, from what I recall). But I appreciate your updating and will take a look now. Somebody should write an article for the wiki on the various options needed for COM. I know it's less in fashion, but it's still very useful. I don't yet have the expertise, and I am only looking into this reluctantly for pragmatic reasons. There is an empty placeholder linked from early in the Wiki here: http://wiki.dlang.org/COM_Programming Does it make sense to keep a register of all unfilled out such pages, so people who are looking for something to do can contribute? Laeeth.
Re: Reduce has dreadful performance?
On Thursday, 18 June 2015 at 18:55:25 UTC, Russel Winder wrote: Loop: 3.14s Reduce 1: 4.76s Reduce 2: 5.12s This is DMD 2.067 Don't compare performance numbers on dmd, particularly not when assessing abstraction overhead.
Re: D could catch this wave: web assembly
On Sat, 20 Jun 2015 15:21:28 +, Kagamin wrote: High DPI settings screw up native UI too if it's not pixel-precise, and ignoring user preferences is infraction, I'm afraid. /me wonders if windows still cannot into dynamic layouts. in any decent gui lib it's actually *harder* to build a gui which screws itself up on font size/window size change. And this is where web actually shines: it's designed to adapt gracefully to any user settings. it was designed to ignore that fact altogether. html/css layouting is a pitiful attempt and barely usable. bwah, it can't even do normal constraints! signature.asc Description: PGP signature
Re: forum.dlang.org, version 2 (BETA)
On Saturday, 20 June 2015 at 15:59:07 UTC, Kagamin wrote: Cool. Something changed? Layout is much better now. Not sure what you mean. BTW unsent drafts stack up. Yes. You can discard them after you open them.
Re: D could catch this wave: web assembly
On 06/20/2015 12:20 PM, ketmar wrote: On Sat, 20 Jun 2015 16:14:43 +, Ola Fosheim Grøstad wrote: On Saturday, 20 June 2015 at 15:36:45 UTC, ketmar wrote: it was designed to ignore that fact altogether. html/css layouting is a pitiful attempt and barely usable. bwah, it can't even do normal constraints! Hmmm, what do you mean by normal constraints? google://cassowary that is a *real* constraint engine. what we have in css is a half-assed attemt to emulate the real engine without the engine itself. I can see why people aren't familiar with that and it's approach: There's zero front-page examples, and any basic examples 101, how to use it seem well-buried. Most people are gonna take one brief look and move on. It seems to really need some better PR.
Re: Future(s) for D.
On Sat, 20 Jun 2015 12:23:59 -0400, Nick Sabalausky wrote: yes. and another thing (which is tied to popularity, though) is the question: how many developers are here to hire for XYZ? let's compare numbers for php, java, ruby, js -- and D. most companies will not bet on language for which a pool of hireable developers is small. and it's understandable: two developers quit, and the project is dead, doomed to complete rewrite in another language. sheesh! signature.asc Description: PGP signature
[Issue 14714] New: Add README.md to the Installer Repository
https://issues.dlang.org/show_bug.cgi?id=14714 Issue ID: 14714 Summary: Add README.md to the Installer Repository Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: installer Assignee: nob...@puremagic.com Reporter: slavo5...@yahoo.com There is currently no README.md for the https://github.com/D-Programming-Language/installer repository. There probably should be to encourage broader participation. --
[Issue 14715] New: Add README.md to the tools Repository
https://issues.dlang.org/show_bug.cgi?id=14715 Issue ID: 14715 Summary: Add README.md to the tools Repository Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: enhancement Priority: P1 Component: tools Assignee: nob...@puremagic.com Reporter: slavo5...@yahoo.com There is currently no README.md for the https://github.com/D-Programming-Language/tools repository. There probably should be to encourage broader participation. --
[Issue 14715] Add README.md to the tools Repository
https://issues.dlang.org/show_bug.cgi?id=14715 Mike slavo5...@yahoo.com changed: What|Removed |Added Hardware|x86_64 |All OS|Windows |All --
Re: Anyone knows this issue? std/math.d(2759): Error: number '0x1p-1024' is not representable
On 6/20/2015 5:16 AM, Martin Nowak wrote: I can't use the strtold_dm from the backend, b/c it's not available for the other compilers, and AFAIU licensing doesn't allow me to move it to the frontend. Hmm. Perhaps google for similar code that would be available? Or submit a bug report to the Debian folks?
Re: D could catch this wave: web assembly
On Saturday, 20 June 2015 at 16:23:47 UTC, ketmar wrote: On Sat, 20 Jun 2015 16:18:28 +, Kagamin wrote: Windows API would be similar to X11, where you just specify everything in pixels and toolkits building on top of it manually do all the recomputations and layout policies, not the UI server. only in windows toolkit is built into system. and it can't do anything except pixels and stupid dialog units. Well, it's just windows api was simple enough to be usable directly, while X11 didn't fly that way and didn't receive development since everybody used toolkits and all features were implemented in toolkits, which in the end used X11 as plain canvas rather than windowing system. And then it's still not simple: with small font you can put a lot of information into a window, which simply won't fit with bigger font size, in this case web gets scrolled naturally, while native UI clunks interface and truncates strings trying to fit it into the window. i lol'd. a typical windows rant, where toolkits still doesn't know about such things as preferred size, minimal size, and can't add scrolling if necessary, choosing to make controls smaller and smaller instead. Knowing minimal size won't help you if the amount of information simply doesn't fit. Dialogs can be scrolled, but master-detail views can't: master and detail views already reserve scrolling for themselves, so it can't be reused for the entire window, well, at least it won't work naturally.
Re: Future(s) for D.
On 06/20/2015 01:24 PM, ketmar wrote: oh, well, i repeated Joel almost literally here. ;-) That dude knows his stuff ;)
Re: forum.dlang.org, version 2 (BETA)
On Saturday, 20 June 2015 at 17:53:43 UTC, Kagamin wrote: http://abload.de/img/tmp67se8.png Previously looked like this: http://abload.de/img/tmpkbqjv.png
Re: D could catch this wave: web assembly
On Friday, 19 June 2015 at 15:52:09 UTC, Ola Fosheim Grøstad wrote: across sites. That does nothing to integrate the old page/hyperlink model of the web with the new dynamic HTML5 model, but as Nick said, simply piles more of the dynamic stuff on top. Actually, it does, as the logic is moved more into elements. Like Angular and Polymer. I probably haven't been clear enough about what I mean. The original model for the web was a bunch of hyperlinked pages/documents. But that model increasingly breaks down as you make the page more dynamic. What are you linking to anymore: a page, an app, or a widget within the app? Now you have to freeze all state within an app then link to it, like the generated links on Google Maps or when you save a document in Word. As the browser tries to mesh these two worlds, the old-fashioned static hyperlinked pages and the new dynamic widgets of AJAX and HTML5, rifts crop up. The recent web components efforts you highlight do not address this at all, they merely make it easier to build more dynamic webapps. But in doing so, they actually bring the problems I'm talking about more to the fore. That actually makes some sense for a document format, which is what HTML originally was. It makes no sense for a vector graphics format like SVG, where efficiency is key. I'd think the opposite, that binary format makes sense for PDF since it is an enduser format, but it is easier to debug when text so it is probably text for the same reasons as SVG. My point was that text makes some sense for the layout of a document format, but efficiency is key in vector graphics, so you always want to go binary there. For SVG I want flexibility and transparency. It would be counterproductive if it was not in XML. Editing would be horrible. And yes, I edit SVG by hand, PDF too. I don't think I've ever used SVG or built PDF generators without manually editing either format as raw text. Then have SVG be an authoring format that is subsequently compiled down to an efficient binary encoding for distribution. There is _zero_ reason for text SVG to be the actual end-user format. I bet a lot of the bloat issues that Wyatt pointed out are exactly because of this. Because writing it once in HTML/CSS/JS takes you much longer than writing it in Java, while being less responsive, then you Dunno about less responsive. Java apps often feel more sluggish than well written web apps. Java is probably better for larger programs, but most programs aren't large. Many programs are just simple interfaces to online databases. On mobile devices, I've been hit by plenty of sluggishness from both, just more so in the browser. On Saturday, 20 June 2015 at 15:21:29 UTC, Kagamin wrote: High DPI settings screw up native UI too if it's not pixel-precise, and ignoring user preferences is infraction, I'm afraid. And this is where web actually shines: it's designed to adapt gracefully to any user settings. Well, of course when site design strays from how web was designed to work, it runs into problems, that should be obvious. The highest-DPI devices I use nowadays are mobile devices and, in my experience, websites are the ones who most often get it wrong. That's usually related to tiny text, but that affects the overall layout too. I didn't really try to write java, but my impression is that java usually requires huge amounts of boilerplate code, while web is usually succinct. I don't find HTML/CSS/JS succinct or easy to get right, the latter of which writing a Java/Android UI is at least better at. Of course, the Android devs had to go muff that up by adding XML into the mix. Dunno, I don't see there losses, maybe because they only happen on mobile. Yeah, you said nothing about how this is related to desktop as if it doesn't exist. Pretty soon it won't. :) There are an estimated 2.5 billion smartphone users: http://www.asymco.com/2014/04/07/postmodern-computing/ The highest estimates of desktop and laptop users I've seen don't crack 2 billion. That means desktops are already a minority platform. All the major mobile vendors are working on multi-window implementations which will soon allow you to plug your mobile device into a dock that connects to a monitor/keyboard/trackpad on your desk and run your mobile apps in a similar way to the desktop: Apple's just-announced multi-window feature to go along with their coming iPad Pro, Google's in-development multi-window implementation that has been found in the Android M build, and Microsoft's recently announced Continuum for mobile devices, that lets you plug your Windows Phone into a monitor and use Office with a desktop UI. What this means is that people will soon be using their mobile devices for almost everything and desktop computers are effectively dead. :) Now, workstations were killed off by PCs and they still sell a couple million worldwide. Similarly, there will
Re: Naming things
On Saturday, 20 June 2015 at 18:46:45 UTC, Steven Schveighoffer wrote: I think the issue we are struggling with here is that: abbreviate - abbreviated This makes some sense. However, the past participle of set is set. So set the extension - a set extension doesn't work, because set doesn't change. Our enemy here is the English language :) If the original was named something like modifyExt, then modifiedExt would be fine. I would understand that if it was part of a consistent pattern for new names. However, judging by toLower/toLowerCase, there is none - and, if I understand Walter Bright's argument correctly, he argues that since we were not consistent in naming when creating std.algorithm, there is no reason to be consistent about it now. And my understanding of the pushback from Walter about renaming really has to do with avoiding breaking code for the sake of renaming. At this point (before setExtension has ever been released), it's what is the best name. No code should be broken, the renaming objection shouldn't apply. I'm 100% in favor of not having both setExt and setExtension to mean different but similar things. Just to clarify, it's still not too late to rename setExt. And 'with' doesn't work with every possible updated version, we have to work around the quirks of English here. I think just using different verbs/prepositions would work. For example, asLowerCase. But really, the egregious error is the slightly different yet identical names. It's like having setExt and set_ext mean different things. This also reminds me of std.regex vs. std.regexp. I never knew which one was the new version. At least that was temporary. This is going to be set in stone once 2.068 rolls out.
Re: D could catch this wave: web assembly
On Saturday, 20 June 2015 at 19:00:08 UTC, Joakim wrote: I probably haven't been clear enough about what I mean. The original model for the web was a bunch of hyperlinked pages/documents. But that model increasingly breaks down as you make the page more dynamic. What are you linking to anymore: a page, an app, or a widget within the app? Yes, but would it be better to just have pages and no apps? I don't think so. When I build an order system it is very useful to build it like an app. The fact is that networking bandwidth is now so large that you often can download the catalog for an online shop at once, compressed it is the size of an image... Of course, the app programmer will have to decide how that maps to urls, or if it should map to urls. You can do it with the hash-tag or by changing the visible url without reloading (on modern browsers). I do that if it is important. widgets of AJAX and HTML5, rifts crop up. The recent web components efforts you highlight do not address this at all, they merely make it easier to build more dynamic webapps. It kinda does. Because you can then serve pages with markup that do things that are specific for the site. When you can attach behaviour to tags implicitly you get to build your own markup-language for the site. My point was that text makes some sense for the layout of a document format, but efficiency is key in vector graphics, so you always want to go binary there. If the vector graphic is intricate it will take time to render it. So there is a limit to how much data you want, I don't think text-transmission is the main issue. Then have SVG be an authoring format that is subsequently compiled down to an efficient binary encoding for distribution. There is _zero_ reason for text SVG to be the actual end-user format. I bet a lot of the bloat issues that Wyatt pointed out are exactly because of this. You can do that if you want. Just download binary data and plot it to a canvas. But there is no way you could introduce binary SVG when using SVG dynamically. That would require specialized binary-format editors for both SVG and HTML. You would basically want binary HTML too, then.
Re: forum.dlang.org, version 2 (BETA)
http://abload.de/img/tmp67se8.png
Re: forum.dlang.org, version 2 (BETA)
On Saturday, 20 June 2015 at 17:53:43 UTC, Kagamin wrote: http://abload.de/img/tmp67se8.png That's the mobile view. You zoomed in, or made your browser window smaller. Zoom out or make your browser window bigger.
Re: D could catch this wave: web assembly
On Saturday, 20 June 2015 at 16:20:31 UTC, ketmar wrote: On Sat, 20 Jun 2015 16:14:43 +, Ola Fosheim Grøstad wrote: On Saturday, 20 June 2015 at 15:36:45 UTC, ketmar wrote: it was designed to ignore that fact altogether. html/css layouting is a pitiful attempt and barely usable. bwah, it can't even do normal constraints! Hmmm, what do you mean by normal constraints? google://cassowary that is a *real* constraint engine. what we have in css is a half-assed attemt to emulate the real engine without the engine itself. Keep in mind that a webpage is being rendered while loading…
Re: Naming things
On 06/20/2015 05:27 AM, Vladimir Panteleev wrote: [...] +1kazillion
pass by value elide dtor + post-blit
When passing a struct by value: Is there any way to trick the compiler to elide unnecessary post-blit dtor pair? Maybe using an union, somehow?
Re: Future(s) for D.
On Sat, 20 Jun 2015 13:10:26 -0400, Nick Sabalausky wrote: Well, not really. I mean, managers and HR all *believe* that to be so. But that's because pretty much all non-programmers, even ones in the software dev industry who really should know better, are stuck in this bizarre idea that programming skills are somehow non-transferable between languages. Which is obviously total bullcrap, but try explaining that to self-assured HR folk and other pointy-hairs. i completely agree with you once again. ;-) Hell, my first introduction to JS, ASP (yea, it was a long time ago) and web-dev in general was on-the-job as a fresh hire, and I was up to speed in like a week or so, if even that. the same was happened to me when i was hired to do JavaME developement. that was the first time i have to do anything with Java, yet i managed to reach higher speed and quality that some of employer's existing Java specialists. not 'cause i'm so brilliant, but 'cause i have a general programming experience, and learning new syntax and consulting dox on standard libraries aren't that hard. oh, well, i repeated Joel almost literally here. ;-) signature.asc Description: PGP signature
Re: Naming things
On 6/20/15 5:27 AM, Vladimir Panteleev wrote: Naming things There are only two hard things in Computer Science: cache invalidation and naming things. -- Phil Karlton I think the issue we are struggling with here is that: abbreviate - abbreviated This makes some sense. However, the past participle of set is set. So set the extension - a set extension doesn't work, because set doesn't change. Our enemy here is the English language :) If the original was named something like modifyExt, then modifiedExt would be fine. And my understanding of the pushback from Walter about renaming really has to do with avoiding breaking code for the sake of renaming. At this point (before setExtension has ever been released), it's what is the best name. No code should be broken, the renaming objection shouldn't apply. I'm 100% in favor of not having both setExt and setExtension to mean different but similar things. withExt seems better, and reasonably informative. path.withExt(abc) - use this path, but with extension '.abc' And 'with' doesn't work with every possible updated version, we have to work around the quirks of English here. But really, the egregious error is the slightly different yet identical names. It's like having setExt and set_ext mean different things. This also reminds me of std.regex vs. std.regexp. I never knew which one was the new version. If there is some other idea besides setExtension (or some prefix of that), I think we should go with that. We could use some analog to 'set', like 'modifiedExt' or 'changedExt' if that sounds better. It just shouldn't be the same exact name, with differing levels of abbreviation. -Steve
Re: forum.dlang.org, version 2 (BETA)
On Saturday, 20 June 2015 at 16:26:53 UTC, Vladimir Panteleev wrote: On Saturday, 20 June 2015 at 15:59:07 UTC, Kagamin wrote: Cool. Something changed? Layout is much better now. Not sure what you mean. The left panel and pads disappeared.
Re: Anyone knows this issue? std/math.d(2759): Error: number '0x1p-1024' is not representable
On Saturday, 20 June 2015 at 17:04:48 UTC, Walter Bright wrote: On 6/20/2015 5:16 AM, Martin Nowak wrote: I can't use the strtold_dm from the backend, b/c it's not available for the other compilers, and AFAIU licensing doesn't allow me to move it to the frontend. Hmm. Perhaps google for similar code that would be available? Might work, as the issue dates back to 2013, I'd say we skip it for this release and fix it independently.
Re: D could catch this wave: web assembly
On 06/20/2015 03:00 PM, Joakim wrote: As the browser tries to mesh these two worlds, the old-fashioned static hyperlinked pages and the new dynamic widgets of AJAX and HTML5, rifts crop up. The recent web components efforts you highlight do not address this at all, they merely make it easier to build more dynamic webapps. But in doing so, they actually bring the problems I'm talking about more to the fore. An excellent example of this is sites like github that actually manage to break the back button, even though it's *clearly* a page-based site (that somehow doesn't seem to believe it is). The highest-DPI devices I use nowadays are mobile devices and, in my experience, websites are the ones who most often get it wrong. That's usually related to tiny text, but that affects the overall layout too. Smart TVs also have trouble there: http://www.quirksmode.org/blog/archives/2014/07/samsung_smart_t.html (See the section The viewport, just underneath the photo with a phone held in front of a TV. Erm...speaking of which: https://semitwist.com/articles/article/view/html-fragment-linking-is-stupid-here-s-the-fix) Pretty soon it won't. :) There are an estimated 2.5 billion smartphone users: http://www.asymco.com/2014/04/07/postmodern-computing/ The highest estimates of desktop and laptop users I've seen don't crack 2 billion. That means desktops are already a minority platform. People have been looking at the sales trends and predicting for years that mobile will kill of PCs. And all that happened (unsurprisingly, IMO) is that the decline in PC sales simply leveled off. Mobile will not, and cannot, replace traditional laptops/desktops (as opposed to merely cooexisting with them as is the case right now) until if/when they finally incorporate all the usability and features of laptops/desktops. Obviously they're not there right *now* yet. But as for the future... All the major mobile vendors are working on multi-window implementations which will soon allow you to plug your mobile device into a dock that connects to a monitor/keyboard/trackpad on your desk and run your mobile apps in a similar way to the desktop: Apple's just-announced multi-window feature to go along with their coming iPad Pro, Google's in-development multi-window implementation that has been found in the Android M build, and Microsoft's recently announced Continuum for mobile devices, that lets you plug your Windows Phone into a monitor and use Office with a desktop UI. What this means is that people will soon be using their mobile devices for almost everything and desktop computers are effectively dead. :) Now, workstations were killed off by PCs and they still sell a couple million worldwide. Similarly, there will always be a niche for PCs and mainframes. It's just a small niche. I don't think phones/tablets replacing desktops/laptops is an entirely accurate way of describing how that will happen (if it does). More like phones/tablets and desktops/laptops will converge into a hybrid. Of course, that's dependent on the phone/tablet folks actually managing to pull it off. Which is certainly a possibility, I agree, but I'm not convinced they'll necessarily manage to, at least not in the short term. MS, oddly enough, seems to have the highest chance of succeeding at this, as desktop/mobile convergence has been their big goal since Win8. And then Win9 (erm, I mean 10) cleans up some of the mess Win8 left. (Not that I like metro or what the metro theme has done to the desktop side of windows, even in Win9^H10, but that's beside the point here.) Interestingly, Canonical could've beat everyone to the punch here. They had what was basically continuum for linux more or less already working, but then...they just...what, threw it in the trash bin or something? I dunno, I don't quite get Canonical sometimes.
Re: Erroneous auto can only be used for template function parameters?
On Saturday, 20 June 2015 at 01:50:11 UTC, Yuxuan Shui wrote: auto ref R) is indeed a template function, so I don't understand. But R is not a parameter on the function itself. It comes from the outside template. Move it to the inside template, rewrite it as: auto a(S, R)(auto ref R i) { return cast(S)i*2; } and you should get further.
Re: Phobos addition formal review: std.experimental.allocator
On Tue, 16 Jun 2015 16:29:08 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On Saturday, 13 June 2015 at 19:08:26 UTC, Jacob Carlborg wrote: On 2015-06-12 13:06, 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 I think IAllocator, theAllocator and it are really bad names. I recommend renaming those symbols to: IAllocator - Allocator theAllocator - currentAllocator or tlsAllocator it - allocator or instance. Even better if a static opDispatch could be used to forward all methods to the instance. https://github.com/D-Programming-Language/phobos/commit/319f3297418c515a6d2e52e6e52d0f3f5895f587 changes .it to .instance for all allocators. -- Andrei Why not .that? ;) Bit
Re: PHP verses C#.NET verses D.
On Friday, 19 June 2015 at 11:28:30 UTC, Etienne Cimon wrote: On Thursday, 18 June 2015 at 05:23:25 UTC, Nick B wrote: On Thursday, 18 June 2015 at 03:44:08 UTC, Etienne Cimon wrote: Will you explain how it is different to Vibe.d ? It has HTTP/2, a new encryption library, it uses a native TCP event library, lots of refactoring. In short, the entire thing is in D rather than linking with OpenSSL and libevent. Etienne Can you explain the benefits of writing these libraries in D, as against just linking to these libraries. Is it for faster execution, or better debugging, or some other reason ?
Slice patterns in Nightly Rust
Recently published documentation Nightly Rust. I saw this: https://doc.rust-lang.org/nightly/book/slice-patterns.html What do you think about this: a terrible thing or a cool feature? fn is_symmetric(list: [u32]) - bool { match list { [] | [_] = true, [x, inside.., y] if x == y = is_symmetric(inside), _ = false } } fn main() { let sym = [0, 1, 4, 2, 4, 1, 0]; assert!(is_symmetric(sym)); let not_sym = [0, 1, 7, 2, 4, 1, 0]; assert!(!is_symmetric(not_sym)); } http://is.gd/TvrXSn I see this competition slices of D. Also seen are not very clear design.
Re: Erroneous auto can only be used for template function parameters?
On Sunday, 21 June 2015 at 01:26:51 UTC, Adam D. Ruppe wrote: On Saturday, 20 June 2015 at 01:50:11 UTC, Yuxuan Shui wrote: auto ref R) is indeed a template function, so I don't understand. But R is not a parameter on the function itself. It comes from the outside template. Move it to the inside template, rewrite it as: auto a(S, R)(auto ref R i) { return cast(S)i*2; } and you should get further. But surely nested template should be able to access outer template's parameter.
Re: Erroneous auto can only be used for template function parameters?
On Sunday, 21 June 2015 at 01:26:51 UTC, Adam D. Ruppe wrote: On Saturday, 20 June 2015 at 01:50:11 UTC, Yuxuan Shui wrote: auto ref R) is indeed a template function, so I don't understand. But R is not a parameter on the function itself. It comes from the outside template. Move it to the inside template, rewrite it as: auto a(S, R)(auto ref R i) { return cast(S)i*2; } and you should get further. Also the same error persists even if I change 'a' to auto a(S)(auto ref S i)
[Issue 8727] __traits(is_reserved_word, ) ?
https://issues.dlang.org/show_bug.cgi?id=8727 naptime naptimeentertainm...@gmail.com changed: What|Removed |Added CC||naptimeentertainment@gmail. ||com --
[Issue 14716] New: recognize snprintf() in CTFE
https://issues.dlang.org/show_bug.cgi?id=14716 Issue ID: 14716 Summary: recognize snprintf() in CTFE Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: bugzi...@digitalmars.com Currently, many formatting options in std.format fail in CTFE because they are implemented using snprintf(). If CTFE can recognize those, and run snprintf() itself, a lot more code can be CTFE'able. --
We simply must implement this for D to stay competitive
https://github.com/rollbear/basicpp
Re: Future(s) for D.
On 06/20/2015 07:00 AM, Etienne wrote: On Saturday, 20 June 2015 at 13:33:34 UTC, Dragos Carp wrote: On Saturday, 20 June 2015 at 12:35:11 UTC, weaselcat wrote: I recently read this facebook post on their future implementation in their Folly library. https://code.facebook.com/posts/1661982097368498 This made me slightly envious. Thoughts on a D implementation? Even if the callbacks are sequentially listed, the callback hell is still there. A better solution is to use fibers. You can take a look at a fibers[1] and tasks[2] implementation in asynchronous library[3]. [1] - https://github.com/dcarp/asynchronous/blob/master/src/asynchronous/futures.d [2] - https://github.com/dcarp/asynchronous/blob/master/src/asynchronous/tasks.d [3] - http://code.dlang.org/packages/asynchronous Yep, looks like we already have better. I don't understand how D hasn't fully picked up in Web Dev at this point. Are they expecting an e-commerce/blogging/cms platform to go with it? A while back I was bored and curious to see how vibe would fare in the web framework benchmarks (http://www.techempower.com/benchmarks/) so I started adding vibe to it (https://github.com/ariovistus/FrameworkBenchmarks). Chose to go with ddb. Postgresql+asynchronous, sounds great. It didn't compile with the latest dmd at the time. So I fixed it up, made a PR, and it worked fine. It looked like I was getting results close to netty (in json serialization) without much effort, but ultimately, I set it aside to wait for my PR to be merged. what is the deal with ddb, anyways? Is it dead?
Re: pass by value elide dtor + post-blit
On 06/20/2015 02:09 PM, Xiaoxi wrote: When passing a struct by value: Is there any way to trick the compiler to elide unnecessary post-blit dtor pair? Maybe using an union, somehow? Can you show with an example please. I don't see either of those called for the following program: import std.stdio; struct S { this(int) { writeln(__FUNCTION__); } this(this) { writeln(__FUNCTION__); } ~this() { writeln(__FUNCTION__); } } S foo() { auto s = S(42); return s; } void main() { writeln(before); auto s = foo(); writeln(after); } The output: before deneme.S.this after deneme.S.~this Ali
[Issue 14717] New: Ddoc macro recursion limit too low
https://issues.dlang.org/show_bug.cgi?id=14717 Issue ID: 14717 Summary: Ddoc macro recursion limit too low Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: ag0ae...@gmail.com Ddoc $(M 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110 ) Macros: M=$1 $(M $+) Output: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 $1 $(M $+) Expected output: numbers up to 110, and no dollar signs. The limit seems to be around 100, which is way too low. Everything works as expected with fewer elements. This blocks https://github.com/D-Programming-Language/dlang.org/pull/1006. --
Re: split up the changelog?
On Friday, 19 June 2015 at 21:28:11 UTC, anonymous wrote: For some reason the list stops at 2.023. I don't know if I messed something up, or if dmd is being silly. Will have to investigate. Filed issue 14717 - Ddoc macro recursion limit too low: https://issues.dlang.org/show_bug.cgi?id=14717 Another thing I'd like to get to work are legacy URLs like e.g. http://dlang.org/changelog.html#2.067.0 and http://dlang.org/changelog.html#new2_064. Solved this to my satisfaction by redirecting to a legacy.html which is not going to be updated further.
Re: Future(s) for D.
On Saturday, 20 June 2015 at 22:42:23 UTC, Ellery Newcomer wrote: On 06/20/2015 07:00 AM, Etienne wrote: On Saturday, 20 June 2015 at 13:33:34 UTC, Dragos Carp wrote: On Saturday, 20 June 2015 at 12:35:11 UTC, weaselcat wrote: [...] Even if the callbacks are sequentially listed, the callback hell is still there. A better solution is to use fibers. You can take a look at a fibers[1] and tasks[2] implementation in asynchronous library[3]. [1] - https://github.com/dcarp/asynchronous/blob/master/src/asynchronous/futures.d [2] - https://github.com/dcarp/asynchronous/blob/master/src/asynchronous/tasks.d [3] - http://code.dlang.org/packages/asynchronous Yep, looks like we already have better. I don't understand how D hasn't fully picked up in Web Dev at this point. Are they expecting an e-commerce/blogging/cms platform to go with it? A while back I was bored and curious to see how vibe would fare in the web framework benchmarks (http://www.techempower.com/benchmarks/) so I started adding vibe to it (https://github.com/ariovistus/FrameworkBenchmarks). Chose to go with ddb. Postgresql+asynchronous, sounds great. It didn't compile with the latest dmd at the time. So I fixed it up, made a PR, and it worked fine. It looked like I was getting results close to netty (in json serialization) without much effort, but ultimately, I set it aside to wait for my PR to be merged. what is the deal with ddb, anyways? Is it dead? Hm, ddb doesn't have an asynchronius driver so you're probably going through std.socket which is thread blocking. I think the author isn't very active, but you shouldn't make it a habit to wait for a merge before continuing, or else you'll never be productive. Worst case your fork will be more up to date and you can become the maintainer I guess
Re: We simply must implement this for D to stay competitive
On Saturday, 20 June 2015 at 22:38:30 UTC, Walter Bright wrote: https://github.com/rollbear/basicpp This leads to this classic, the original Bourne shell ALGO-izer macros: http://minnie.tuhs.org/cgi-bin/utree.pl?file=2.11BSD/src/bin/sh/mac.h
[Issue 14296] RDMD fails at building a lib when the source is in a subdir
https://issues.dlang.org/show_bug.cgi?id=14296 --- Comment #3 from Nick Sabalausky cbkbbej...@mailinator.com --- This can be worked around by giving -of an absolute path: $ rdmd --build-only -lib src/test.d Fails $ rdmd --build-only -lib -oflib/hi.a src/test.d Fails $ rdmd --build-only -lib -of`pwd`/lib/hi.a src/test.d/ OK --
[Issue 14296] RDMD fails at building a lib when the source is in a subdir
https://issues.dlang.org/show_bug.cgi?id=14296 --- Comment #4 from Nick Sabalausky cbkbbej...@mailinator.com --- (In reply to Nick Sabalausky from comment #3) $ rdmd --build-only -lib -of`pwd`/lib/hi.a src/test.d/ OK That should've been: $ rdmd --build-only -lib -of`pwd`/lib/hi.a src/test.d OK --
Creating a better user experience
I have watched plethora of projects come and be discharged to the sea of abandonware over the last 15 years of watching D. For new users getting started with D it can be hard to find some of the tools that are current. It would be really nice if dub, dfmt, and dfix were co-opted into the standard distribution of D and officially sanctioned as part of the D-Programming-Language github organization. These are great tools and I would hate to see them flounder if the authors got bored/busy. -Shammah
Re: D could catch this wave: web assembly
On Saturday, 20 June 2015 at 19:39:06 UTC, Ola Fosheim Grøstad wrote: Yes, but would it be better to just have pages and no apps? I don't think so. When I build an order system it is very useful to build it like an app. No, I'm not arguing for pages at all, I'm saying that model is dead and gone. I think the hyperlink was the killer feature of the web, but everything else, HTML/CSS/JS, is just detritus accumulated on top, that needs to be thrown away. The fact is that networking bandwidth is now so large that you often can download the catalog for an online shop at once, compressed it is the size of an image... You can do some interesting things with caching, sure, but the web frontend is still unwieldy and slow and round-trip latency anytime you do something is what kills you. widgets of AJAX and HTML5, rifts crop up. The recent web components efforts you highlight do not address this at all, they merely make it easier to build more dynamic webapps. It kinda does. Because you can then serve pages with markup that do things that are specific for the site. When you can attach behaviour to tags implicitly you get to build your own markup-language for the site. Again, none of this helps with the fundamental problem: you are engineering an app UI layout engine into an old-fashioned document format. You are always going to be constrained by the architectural constraints and inefficiency of the document format. My point was that text makes some sense for the layout of a document format, but efficiency is key in vector graphics, so you always want to go binary there. If the vector graphic is intricate it will take time to render it. So there is a limit to how much data you want, I don't think text-transmission is the main issue. Text compression will get you part of the way to lessening the bandwidth, but parsing and analyzing the SVG text will always take longer than if it were binary. I have not actually profiled an SVG renderer to see where the bottleneck is, but I bet using text plays a big role. You can do that if you want. Just download binary data and plot it to a canvas. The fact that I could render SVG images to a png and download that instead doesn't excuse the fact that they're putting full text SVG renderers into the browser. But there is no way you could introduce binary SVG when using SVG dynamically. That would require specialized binary-format editors for both SVG and HTML. You would basically want binary HTML too, then. Of course you could use binary SVG dynamically: you'd simply need the right hooks in the browser and in the binary format to manipulate it using javascript. It would not require binary-format editors or binary HTML. However, I have long said that they should have tightened up HTML into a binary format around HTML 3 or so, so that needed to be done on its own anyway. On Saturday, 20 June 2015 at 20:31:35 UTC, Nick Sabalausky wrote: An excellent example of this is sites like github that actually manage to break the back button, even though it's *clearly* a page-based site (that somehow doesn't seem to believe it is). Heh, you don't know how many times that's hit me. :) Smart TVs also have trouble there: http://www.quirksmode.org/blog/archives/2014/07/samsung_smart_t.html Heh, I have never tried to use a browser on a TV, especially since I basically haven't watched a TV screen in the last decade, maybe a couple hours of sports a year. I just download the same or other online videos and watch them on my computer or mobile devices. (See the section The viewport, just underneath the photo with a phone held in front of a TV. Erm...speaking of which: https://semitwist.com/articles/article/view/html-fragment-linking-is-stupid-here-s-the-fix) Hmm, I had not heard of that fragment linking effort you wrote about. I agree that in the old page model it'd be better if the user decides what he wants to link to, but in the new dynamic model, that is very hard to implement. Pretty soon it won't. :) There are an estimated 2.5 billion smartphone users: http://www.asymco.com/2014/04/07/postmodern-computing/ The highest estimates of desktop and laptop users I've seen don't crack 2 billion. That means desktops are already a minority platform. People have been looking at the sales trends and predicting for years that mobile will kill of PCs. And all that happened (unsurprisingly, IMO) is that the decline in PC sales simply leveled off. Still declining though, just less than it was: http://www.asymco.com/2014/07/23/is-the-pc-back/ I'd say this is a temporary respite before the final collapse. The only reason it hasn't happened yet is because mobile devices have not worked well with plugging into a large monitor with a mouse and keyboard, but that is now changing. Mobile will not, and cannot, replace traditional laptops/desktops (as opposed to merely cooexisting with them as is the
Re: Slice patterns in Nightly Rust
On Sunday, 21 June 2015 at 03:23:18 UTC, Dennis Ritchie wrote: I see this competition slices of D. Also seen are not very clear design. It functional programming using pattern matching over arrays. It is very clear, but perhaps not frequently needed.
Re: Slice patterns in Nightly Rust
On Sunday, 21 June 2015 at 03:23:18 UTC, Dennis Ritchie wrote: Recently published documentation Nightly Rust. I saw this: https://doc.rust-lang.org/nightly/book/slice-patterns.html What do you think about this: a terrible thing or a cool feature? fn is_symmetric(list: [u32]) - bool { match list { [] | [_] = true, [x, inside.., y] if x == y = is_symmetric(inside), _ = false } } fn main() { let sym = [0, 1, 4, 2, 4, 1, 0]; assert!(is_symmetric(sym)); let not_sym = [0, 1, 7, 2, 4, 1, 0]; assert!(!is_symmetric(not_sym)); } http://is.gd/TvrXSn I see this competition slices of D. Also seen are not very clear design. Jesus Christ, that syntax...