Re: ESA's Schiaparelli Mars probe crashed because of integer overflow
On 25/11/2016 07:14, Patrick Schluter wrote: On Thursday, 24 November 2016 at 20:22:00 UTC, Timon Gehr wrote: On 24.11.2016 20:49, qznc wrote: Although, the article [0] does not say that literally, it sounds like an integer overflow: After trawling through mountains of data, the European Space Agency said Wednesday that while much of the mission went according to plan, a computer that measured the rotation of the lander hit a maximum reading, knocking other calculations off track. That led the navigation system to think the lander was much lower than it was, causing its parachute and braking thrusters to be deployed prematurely. "The erroneous information generated an estimated altitude that was negative—that is, below ground level," the ESA said in a statement. That is why we need CheckedInt, folks. Reminder End. ;) [0] http://phys.org/news/2016-11-glitch-blamed-european-mars-lander.html I don't think overflow is what happened. Rather, the statistical model they used to filter the sensor data didn't match reality. It put too much trust into a malfunctioning sensor -- I assume the sensor readings were extremely implausible. Hey, sounds suspicously similar to Ariane 5 explosion. Does ESA not learn from its errors or am I only reading too much in it (probably)? I thought Ariane was caused by errorcodes from one module being sent on the same bus as telemetry and interpreted as instructions by another module? A...
Re: unit-threaded v0.6.26 - advanced unit testing in D with new features
On 08/08/2016 08:37, Atila Neves wrote: On Saturday, 6 August 2016 at 10:34:52 UTC, Nicholas Wilson wrote: On Friday, 5 August 2016 at 15:31:34 UTC, Atila Neves wrote: https://code.dlang.org/packages/unit-threaded What's new: . Mocking support. Classes, interfaces and structs can be mocked (see README.md or examples) . Shrinking support for property-based testing, but only for integrals and arrays . Bug fixes Enjoy! Atila There is a typo in your readme int adder(int i, int j) { return i + j; } @("Test adder") unittest { > adder(2 + 3).shouldEqual(5); } @("Test adder fails", ShouldFail) unittest { adder(2 + 3).shouldEqual(7); } shouldBe (!) adder(2, 3) No, turns out it was right after all. There's a `ShouldFail` UDA on that test. Atila But you are passing the expression (2 + 3), rather than a tuple of arguments (2, 3)! A...
Re: Card on fire
On 16/07/2016 01:02, Walter Bright wrote: The Ubuntu printer install isn't any better than Microsoft's. I wonder what it is about printers. I can plug in USB drives, internal drives, all sorts of things, and they just work. Even when it's working, the simplest things fail. I learned to never queue a second job until the first one is completely finished, else it botches up both jobs. It's not like it's a weird printer, either. It's an HP LaserJet, fer chrissakes. With my HP printer, if I don't turn it off between print, the computer freezes up after about 30 mins, happened with windows & and motivated my move to 10, but it still happens there too.
Re: The Case Against Autodecode
On 03/06/2016 20:12, Dmitry Olshansky wrote: On 02-Jun-2016 23:27, Walter Bright wrote: I wonder what rationale there is for Unicode to have two different sequences of codepoints be treated as the same. It's madness. Yeah, Unicode was not meant to be easy it seems. Or this is whatever happens with evolutionary design that started with "everything is a 16-bit character". Typing as someone who as spent some time creating typefaces, having two representations makes sense, and it didn't start with Unicode, it started with movable type. It is much easier for a font designer to create the two codepoint versions of characters for most instances, i.e. make the base letters and the diacritics once. Then what I often do is make single codepoint versions of the ones I'm likely to use, but only if they need more tweaking than the kerning options of the font format allow. I'll omit the history lesson on how this was similar in the case of movable type. Keyboards for different languages mean that a character that is a single keystroke in one case is two together or in sequence in another. This means that Unicode not only represents completed strings, but also those that are mid composition. The ordering that it uses to ensure that graphemes have a single canonical representation is based on the order that those multi-key characters are entered. I wouldn't call it elegant, but its not inelegant either. Trying to represent all sufficiently similar glyphs with the same codepoint would lead to a layout problem. How would you order them so that strings of any language can be sorted by their local sorting rules, without having to special case algorithms? Also consider ligatures, such as those for "ff", "fi", "ffi", "fl", "ffl" and many, many more. Typographers create these glyphs whenever available kerning tools do a poor job of combining them from the individual glyphs. From the point of view of meaning they should still be represented as individual codepoints, but for display (electronic or print) that sequence needs to be replaced with the single codepoint for the ligature. I think that in order to understand the decisions of the Unicode committee, one has to consider that they are trying to unify the concerns of representing written information from two sides. One side prioritises storage and manipulation, while the other considers aesthetics and design workflow more important. My experience of using Unicode from both sides gives me a different appreciation for the difficulties of reconciling the two. A... P.S. Then they started adding emojis, and I lost all faith in humanity ;)
Re: Please vote for the DConf logo
On 13/11/2015 14:52, anonymous wrote: I/we should make an SVG version that uses paths instead of , so that it doesn't depend on a local font. Maybe agree on the font first, though. With the chosen font installed ("Droid Sans", Apache 2.0 licence) the text balances well (or at least better than with the font my system was substituting) with the graphic in both weight and spacing. I think the capitalised D works well enough too. I have a personal dislike of narrow D glyphs, so I'd like to move the swoosh a small distance from the spire to add a horizontal hint to the outline. I think the text could be closer to the glyph, and higher, such that the D is in about the 2-o'clock position on the swoosh, which I think would reflect the Dlang logo more strongly.
Re: Please vote for the DConf logo
On 04/11/2015 09:30, Andrei Alexandrescu wrote: Reply to this with 1.1, 1.2, 2, or 3: 1) by ponce: Variant 1: https://github.com/p0nce/dconf.org/blob/master/2016/images/logo-sample.png Variant 2: https://raw.githubusercontent.com/p0nce/dconf.org/4f0f2b5be8ec2b06e3feb01d6472ec13a7be4e7c/2016/images/logo2-sample.png 2) by Jonas Drewsen: https://dl.dropboxusercontent.com/u/188292/g4421.png 3) by anonymous: PNG: http://imgur.com/GX0HUFI SVG: https://gist.github.com/anonymous/4ef7282dfec9ab327084 Thanks, Andrei 3 (or an iteration thereon)
Re: Rant after trying Rust a bit
On 25/07/2015 9:48 PM, Walter Bright wrote: Unfortunately, Bruce Eckel's seminal article on it http://www.mindview.net/Etc/Discussions/CheckedExceptions has disappeared. Eckel is not a Java code monkey, he wrote the book Thinking In Java http://www.amazon.com/gp/product/0131002872/ https://web.archive.org/web/20150515072240/http://www.mindview.net/Etc/Discussions/CheckedExceptions
Re: Voting for std.experimental.allocator
Yes!
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 12/06/2015 12:48 PM, Chris wrote: man is still used as a gender neutral pronoun in German, however, for some reason it's frowned upon these days, just like one in English. It's considered arrogant and old fashioned, but it's effin useful and solves a lot of problems. Mind you, decisions made by those who compile dictionaries and standards are not at all based on the reality of a given language. Double negation exists in English (and many other languages), but it's stigmati(s|z)ed as being incorrect. The vote was 5 to 4 when this decision was made in England. The official reasoning behind it was that minus + minus = plus, i.e. I don't have no money would mean I do have money, which is complete horsesh*t. Of course it means I don't have money. The real reason, of course, was class snobbery and elitism: double negation was and still is commonly used in working class English in England (and the US, I think). Ironically enough, double negation is obligatory in standard French, while it is not used in colloquial French. This shows you how arbitrary these standards are. Don't take them too seriously, and don't start religious wars about some eggheads' decisions ;) The same goes for ain't. There's no reason why ain't should be bad English. I ain't got no money is perfectly fine, although it might make the odd Oxbridge fellow cringe and spill his tea. But what the Dickens, old chap! I must be rare, cos I ain't posh n' well educated but I deplore the use of double negatives in English. I might be heard t'say I ain't got n' money (cos it be true) but in that case the n' is the local dialect contraction of any. Other areas of the UK can't use the same excuse, maybe they got it from us but didn't understand what we were say'n, which is very common, but am more inclined to blame ignorance. Don't know anything about double negative usage in French, but I do know that they are a way making super polite requests in Japanese. Lets all not not stop arguing the minutia. A...
Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?
On 12/06/2015 10:37 PM, Nick Sabalausky wrote: Yea, I'm fine with ain't being considered an actual word. Years ago, I used to hear a lot of 'Ain't' isn't a real word, but meh, it's used as a word, even the people who don't like it still know full-well exactly what it means, so...I ain't got a big problem with it :) But there was one particular argument in favor of ain't that I never liked: It's a contraction for 'are not'. Well, no, it isn't a contraction for are not (maybe it originally was, I dunno). Because I ain't going vs I are not going. So no, it may be a word, but it ain't a contraction for are not. It is a contraction of are not because it originates from a time/dialect where the verb to-be was conjugated differently than today's English. Many of the irregularities of to-be are ignored in international English which gives rise to dialects among ESL speakers that sound wrong but endearing (at least to my ears). A...
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: dec64 decimal floating point type
On 31/03/2015 7:22 PM, Gary Willoughby wrote: This is an old thread but does any one know if any decimal types were ever implemented? I set off trying to implement DEC64 based on the halffloat module, but never got very far. My main problem is that the assembler in the reference implementation renames all the registers, and as a result I really struggle to follow it A...
Re: [OT] HTML: div/iframe hybrid?
On 25/02/2015 9:55 PM, Nick Sabalausky wrote: (Pardon the ot, but I know there are other webdevs here). For various reasons, I like to keep my html...uhh...let's say non-bleeding-edge :), downside of course being I tend to not be quite as up on what's out there as I should be. So just tossing this question out there: I know (at least historically) iframes don't normally resize based on their internal content, but only based on the the outer html page. Aside from the obvious JS, does modern HTML/CSS provide any way to have something like an iframe (ie, embed content from another URL), but otherwise behaves and flows more like a div, expanding (at least vertically, even if nothing else) as the embedded content expands? Would it be too kludgey or questionable-compatibility (or just fail) to just use CSS to set the iframe element to block-style layout? My understanding of the argument against doing this is that it would be a potential security hole. If the content of an iframe could control its size it could theoretically hijack the parent page. Instead, I would consider using JS to load and insert the content, or generate the composite page on the sever. A... --- This email has been checked for viruses by Avast antivirus software. http://www.avast.com
Re: Redesign of gdcproject.org
On 01/08/2014 10:15 AM, tn wrote: On Monday, 28 July 2014 at 10:27:02 UTC, Iain Buclaw wrote: - GDC's homepage is now getting a UI update. Staging area for the new look is found here: http://staging.dgnu.org I think the old logo was better. The new one looks weird, like it was unfinished. It is unfinished, I got sidetracked studying copyright law and lupine anatomy among other things A...
Re: ddoc and CODE_HIGHLIGHT macro
On 26/07/2014 4:31 PM, Nick Treleaven wrote: Hi, Ddoc doesn't seem to expand a macro near top of http://dlang.org/hash-map.html: // The $(CODE_HIGHLIGHT KeyType) is string Which is weird because it expands it for 'remove' on this line not far below it: b.remove(hello); Maybe a bug in dmd? This is because the macro is used within a comment in a code section (between lines of hyphens). Macros are normally expanded within code sections, but inside comments they get ignored. I filed an enhancement request. https://issues.dlang.org/show_bug.cgi?id=13211 Also, I build some dlang.org docs individually and CODE_HIGHLIGHT is inserting a line break in the html. I think this is because the macro has an empty line after it: CODE_HIGHLIGHT=$(B $(I $0)) MDASH=nobr#x200A;mdash;#x200A;/nobr I can't tell from git blame when it was introduced, the website html doesn't show the line break. Is there a workaround, or just remove the empty line? I've reproduced this, it seems it is related to the platform of the file, ie a macro with a blank line after it declared in a file with windows line endings (CR; + LF;) will have a line break on the end but one in file with single character line breaks won't. I filed that one as a bug. https://issues.dlang.org/show_bug.cgi?id=13212 A...
[Dangerously OT] Re: D logo copyright
On 19/07/2014 8:43 PM, Ola Fosheim Grøstad ola.fosheim.grostad+dl...@gmail.com wrote: Not sure why you want a citation. Fair use differs from country to country. Mona Lisa is in the public domain, but photos of it that has been enhanced are not. Many novels and poems are in the public domain, but a book that contains a collection of novels is not, i.e. the selection of novels or poems constitutes a work protected by copyright. I perhaps wasn't specific enough about what you had written that was contrary to what I had read, specifically it was this... The copyright will be held by BOTH the original author and the author of the derivative work Fair use, public domain and collective works legislation have nothing to do with the case in hand. I have found no cases where a derived work has copyright shared with the owner of the original. In the UK, US and France at least the protection follows the guidance of the Berne Convention whereby the derived work is the parts added to the original and its copyright belongs entirely to the deriving artist. By virtue of the fact that permission for the derivative to be made was granted by the original artist, the derived work can freely incorporate original but there is no sharing of copyright. The caveat to this is that the additions of the derived work have to be substantial and copyrightable on their own. Many open licenses give permission to make derivatives with restrictions which may require attribution, transitive licensing or non-commercial use, but those are the terms of the license and are separate from the protection of copyright law. As has been mentioned, the Berne convention is the minimum requirement of the signed up nations and it is entirely possible that some countries offer greater protection than others. I have not been able to discover if Germany is one of those countries or not. As interesting as I found this investigation, it has turned out to be a dead end anyway. Almost entirely because of the definition of what a counts as a derivative work. A...
Re: D logo copyright
On 18/07/2014 4:03 PM, Ola Fosheim Grøstad ola.fosheim.grostad+dl...@gmail.com wrote: This may allow for the creation of a new graphic that is a derivative work of the current one but has a copyright held by Digital Mars. No. The copyright will be held by BOTH the original author and the author of the derivative work, it is joint ownership and you need the permission of two authors instead of one. This is contrary to my understanding from what I have read (although my research has been biased towards the UK due to google knowing where I live), can you provide citations that support this? A...
Re: D logo copyright
On 18/07/2014 4:03 PM, Ola Fosheim Grøstad ola.fosheim.grostad+dl...@gmail.com wrote: This may allow for the creation of a new graphic that is a derivative work of the current one but has a copyright held by Digital Mars. No. The copyright will be held by BOTH the original author and the author of the derivative work, it is joint ownership and you need the permission of two authors instead of one. This is contrary to my understanding based on the reading I've done (admittedly biased towards the UK as google knows where I live). I think it is a moot point anyway. I don't think it is possible to produce a derivative work that would be recognisable as the logo and still original enough, and also the permission to make derivatives is probably worded too vaguely. I'm not going to pursue the idea any further. A...
Re: D logo copyright
On a whim I did a bit of research into the copyright of derivative works, and to my surprise they are actually covered by an international treaty. This may allow for the creation of a new graphic that is a derivative work of the current one but has a copyright held by Digital Mars. There is no requirement for this new graphic to be used on dlang.org, but it would be possible to use and register it as a trademark and for images derived from it to be incorporated into other logos and emblazoned upon merchandise. The only problem is that work required to produce the derivative must be non trivial and the changes copyrightable on their own (like drawing a moustache and goatee on the Mona Lisa (LHOOQ)). I've produced dozens of derivative designs, but I'm not sure any of them meet this requirement. I think it is something to consider if the original designer remains un-contactable. A...
Re: D logo copyright
On 15/07/2014 9:05 PM, Chris wrote: On Tuesday, 15 July 2014 at 11:12:57 UTC, Alix Pexton wrote: I've been researching what is necessary to transfer the copyright of the D logo to Digital Mars, which is complicated by international issues. It seems that the term copyright is often aliased to the German Deutsches Urheberrecht which is what we call the moral rights of the author in the UK. This is something very different from copyright as it is inalienable from the originating creator and not something that can be transferred other that by inheritance. This makes me wonder if previous attempts to negotiate a new copyright for the logo have gone unanswered because the terminology used has lost something in translation. Do any of our native German D users know what the right terminology for the international concept of copyright is? European copyright law is something that is currently being debated for unification and there is no actual legislation in place so any negotiations regarding the logo have to be conducted based on the common ground between German and U.S. laws. A... Does it make a difference a. where the author lives and b. where the logo is hosted? As far as I can work out, its a no for both questions. My problem is that every time that I search for information on German copyright law I get information about Urheberrecht, often with a note saying that it should not be confused with copyright This makes it hard to plan a polite approach. A...
Re: D logo copyright
On 16/07/2014 9:17 AM, Sönke Ludwig wrote: BTW, the shape of the logo itself isn't covered by either copyright, or Urheberrecht, AFAIK. That's what trademarks are for. So a full redo of the logo should be unaffected by the original work. Of course it would still be fair to properly negotiate with the original author... I don't think it would be safe to assume that, the logo didn't exist before the graphic was created, so there was nothing to be used as a Trademark. By my reading of US Trademark law, the author would have grounds to appeal against any attempt to register it as long as they retained the copyright to the image on which the logo is based. But Trademark protection is a few steps further along the path. A...
Re: D logo copyright
On 16/07/2014 9:12 AM, Sönke Ludwig wrote: As far as I know, this is the Verwertungsrecht (roughly the right to distribute) and the Nutzungsrecht (the right to use). Both can be granted to third parties using a proper license, or using a work contract. Thanks, that could be useful ^^ I think what we need here isn't really a change of the ownership, but rather a proper license, either a liberal public license (e.g. some CC variant), or a personal license for Walter that grants him all rights to use, distribute and relicense the logo. I haven't been able to find a licence that grants the appropriate permissions because all the common public ones are about non-exclusive rights. If the graphic just had a CC license, other organisations would have just the same usage rights as Digital Mars. The graphic could have a more restrictive license and then Digital Mars could have additional rights granted separately, but that wouldn't really help. Crafting a new license is dangerous territory that I think is best avoided. Having said that, I'm pretty sure that he can still transfer the copyright according to U.S. laws to another person. It's just that he could then possibly still sue the person according to German laws. So a license would probably be the best bet. That is my understanding too. There are no standard forms for this, it only requires a signed letter from the creator, and there isn't even a requirement for the transaction to be registered in any way (although it can). Because international law is so hand-wavy, such documents often include clauses that state what jurisdiction disputes are resolved under and even waivers for things like the right to sue, but to get things like that right, you need at least 2 lawyers. Disclaimer: I'm not a lawyer, so this is just my limited personal understanding of the matter. I'm optimistic that this can all be resolved without having to get any lawyers involved, but it is a shame that the intersection of D-users and international-copyright-lawyers seems to have a cardinality of zero. A...
Re: Worrying attitudes to the branding of the D language
On 07/07/2014 11:35 AM, Alix Pexton wrote: On 03/07/2014 8:50 PM, Walter Bright wrote: On 7/3/2014 4:40 AM, Alix Pexton wrote: I agree! I started working on this little document last night while angry and tired, maybe it should find its way to the wiki. https://docs.google.com/document/d/1Sb4xnZUbzVRIicsfnxBFhTvRH4EOYq88wZexAuGcnaE/edit Its the last time I'm going to post any work related to D branding or logo design unless someone specifically asks me to. It's a well written document. Thank you for doing this! I've created a pull request on dlang.org to add a brief page on branding. I wasn't sure if I should put a link in to this report or not. A... This PR doesn't seem to have attracted a lot of attention yet, please take a look. https://github.com/D-Programming-Language/dlang.org/pull/609 A...
D logo copyright
I've been researching what is necessary to transfer the copyright of the D logo to Digital Mars, which is complicated by international issues. It seems that the term copyright is often aliased to the German Deutsches Urheberrecht which is what we call the moral rights of the author in the UK. This is something very different from copyright as it is inalienable from the originating creator and not something that can be transferred other that by inheritance. This makes me wonder if previous attempts to negotiate a new copyright for the logo have gone unanswered because the terminology used has lost something in translation. Do any of our native German D users know what the right terminology for the international concept of copyright is? European copyright law is something that is currently being debated for unification and there is no actual legislation in place so any negotiations regarding the logo have to be conducted based on the common ground between German and U.S. laws. A...
Re: Cool Stuff for D that we keep Secret
On 09/07/2014 11:48 PM, Walter Bright wrote: Debugger leads to HTTP 404 Not Found (this is pretty embarrassing) There is a debugger.html in github, it just redirects to the wiki, but its not being served, can't tell you why said file is not finding its way to the server (maybe because its in the ignorefiles section of the repository config?). Perhaps the link should be updated to point directly to the wiki? A...
Re: Worrying attitudes to the branding of the D language
On 10/07/2014 9:18 AM, Jacob Carlborg wrote: BTW, have a look at this Scala website [1]. In the top left corner there is a Scala logo. It's flat and quite simple design with no colors. In the middle there's a big logo, more complex with shades, colors, shadows and so on. You can instantly see that both are the same logo, but at the same time they're quite different. I think it's good idea to have multiple versions of a logo, used in different context. Oh, I just found a third version of their logo, in the bottom right corner. It's like the first one but with some colors. [1] http://www.scala-lang.org/ Shame the spiral staircase in the picture of the office isn't left handed, otherwise that would be their logo too ^^ A...
Re: Worrying attitudes to the branding of the D language
On 02/07/2014 10:10 PM, Alix Pexton wrote: On 02/07/2014 6:13 PM, Vladimir Panteleev wrote: On Wednesday, 2 July 2014 at 16:53:52 UTC, Brad Anderson wrote: He should be contacted and asked if he'd be willing to assign copyright to Walter. Does anyone have his email address? Walter and I have attempted to reach out to Martin a while ago with regards to logo licensing (triggered by the logo's deletion on Wikipedia - it was taken down once, but since then someone reuploaded it again). As far as I know, so far there has been no reply. Here's the information I have: Original post: http://forum.dlang.org/post/e3j72u$16n7$1...@digitaldaemon.com GitHub profile: https://github.com/FunkyM Professional website: http://mirell.de/ The site where the original logo is hosted has a mail me link on its landing page... heyitsal...@sukimashita.com A... Has anyone made a new attempt to reach out to Martin yet? A...
[OT] Re: Redesign of dlang.org
On 09/07/2014 12:36 PM, Chris wrote: On Tuesday, 8 July 2014 at 21:01:46 UTC, Iain Buclaw via Digitalmars-d And everyone should drive on the left. Driving on the left goes back to the times when coaches (carriages) were still in use. This was to avoid that drivers would accidentally hit each other with their whips when a coach would come from the opposite direction. No joke. As regards cars, driving on the left is highly unintuitive for most people as the majority of drivers are right-handed. There is no ergonomic or technical reason why cars should drive on the left. In most parts of the world driving on the right was adopted from early on as it is more intuitive (for most people). Driving on the left actually originates from jousting. On a tilting yard each combatant rides on the right side and aims their lance across their body at the opponent in the lane on the left. When knights passed each other out on the roads, the would do so on the left side so show that they were not hostile. The whole of Europe took up this practice, and used to always ride, drive carts and march as a body of men on the left. Then a chap called Napoleon came along and used a guerilla tactic to trick his enemy by marching on the right so that his troops looked like they were travelling in the opposite direction. Eventually driving on the wrong side became the norm for all the regions of Europe that Napoleon conquered, and it spread as a matter of practicality to adjacent regions over time. Napoleon was defeated by the English because this trick does not work at sea. The UK still drives on the correct side because there is no problem with having to swap sides when crossing land borders. It is also an act that commemorates that historic victory. Or at least that is what I learned in school ^^ A...
Re: [OT] Re: Redesign of dlang.org
On 09/07/2014 4:43 PM, Chris wrote: This sounds just like Imperial education. Very interesting how it equates Imperial practices with the right thing and the (continental) arch enemy with the wrong thing. By the way, there was a reason why combatant riders would ride on the right side on a tilting yard: they were right-handed. Just as it makes more sense to switch gears with the right hand and not with the (in most cases) weaker left hand. Sorry, the correct side/wrong side designations was all me, I have trouble with light and reft, and didn't want to get mixed up with the 2 meanings of right. Perhaps its an artefact of my imperial education ^^ Also some argue that it makes more sense in a modern car to change gear with the left hand and keep the stronger arm on the steering wheel. Early right-hand-drive cars either had all foot operated gears, or they were on the outside (actually outside the cockpit) rather than in the middle because they needed real effort, modern gears especially automatics don't need that effort any more. A...
Re: Redesign of dlang.org
On 08/07/2014 10:01 PM, Iain Buclaw via Digitalmars-d wrote: But the imperial system *isn't* idiotic. :o) 14 lbs is a stone? apart from that its fine ^^ And everyone should drive on the left. I drive in the middle, it works fine until I meet other road users. A...
Re: Worrying attitudes to the branding of the D language
On 07/07/2014 8:29 AM, Jacob Carlborg wrote: On 05/07/14 05:00, deadalnix wrote: We need various logos, as they'll be more or less readable at various scales. The flat-minimal is especially important as this is the only one that is going to scale down without become unrecognizable. I agree. We need something that can be used for icons. Something that can be used on a D source code file. https://drive.google.com/file/d/0B3i8FWPuOpryM0VJQlU5ZDJNcFk/edit https://drive.google.com/file/d/0B3i8FWPuOpryRW9PODBMUUZyMlE/edit A...
Re: Worrying attitudes to the branding of the D language
On 07/07/2014 9:17 AM, Jacob Carlborg wrote: On 07/07/14 10:05, Alix Pexton wrote: https://drive.google.com/file/d/0B3i8FWPuOpryM0VJQlU5ZDJNcFk/edit https://drive.google.com/file/d/0B3i8FWPuOpryRW9PODBMUUZyMlE/edit I don't think that looks so nice. Which one, Package or Sourcefile or both? These are what I'm currently using myself, but I'm not 100% happy with how they appear when small. I'm trying to work with in the constraints that that seem to have emerged over what elements of the logo must be retained in order to preserve the D Brand. A...
Re: Worrying attitudes to the branding of the D language
On 03/07/2014 8:50 PM, Walter Bright wrote: On 7/3/2014 4:40 AM, Alix Pexton wrote: I agree! I started working on this little document last night while angry and tired, maybe it should find its way to the wiki. https://docs.google.com/document/d/1Sb4xnZUbzVRIicsfnxBFhTvRH4EOYq88wZexAuGcnaE/edit Its the last time I'm going to post any work related to D branding or logo design unless someone specifically asks me to. It's a well written document. Thank you for doing this! I've created a pull request on dlang.org to add a brief page on branding. I wasn't sure if I should put a link in to this report or not. A...
Re: Worrying attitudes to the branding of the D language
On 07/07/2014 12:26 PM, Jacob Carlborg wrote: On 07/07/14 12:20, Alix Pexton wrote: Which one, Package or Sourcefile or both? Both, actually. Shame, I kinda liked the cardboard box, I surprised myself with how quickly it came together. These are what I'm currently using myself, but I'm not 100% happy with how they appear when small. I'm trying to work with in the constraints that that seem to have emerged over what elements of the logo must be retained in order to preserve the D Brand. Yeah, that's the problem. Actually, looking at the document icons on OS X, for a file containing C code it's just a document with some code and a large C on the document. Nothing that has anything to do with a logo. I just thought that I would be nice if we had a logo that could work as a document icon as well. But perhaps it's just better to follow the system or text editor conventions. I was surprised when I found my mother's Ubuntu net book had an icon for D files that matched the default theme, while my vertualised Debian install doesn't even have them for C. There doesn't seem to be a standard file icon on Windows any more either, C files on my machine get their icon from visual studio (simple page with a big letter C) the page element is common to all the filetypes registered by VS, but different to ones registered by IE and bundled ones like text files. It is something that everyone seems to have to reinvent! There is a generic page icon, but that doesn't seem to have been updated to the windows 7 theme. I'll try and find generic page icons for for as many systems as I can and see if I can make one overlay that works well with them all. I was wondering if it was worth making separate icons for .di .dd and .ddoc files too, and I wanted to have a special icon for package.d but there doesn't seem to be a way to specify an icon based on anything other than the last element of the extension. A...
Re: Worrying attitudes to the branding of the D language
On 07/07/2014 1:09 PM, Alix Pexton wrote: On 07/07/2014 12:26 PM, Jacob Carlborg wrote: On 07/07/14 12:20, Alix Pexton wrote: There is a generic page icon, but that doesn't seem to have been updated to the windows 7 theme. Oh wait, yes it is, my bad A...
Re: Worrying attitudes to the branding of the D language
On 07/07/2014 3:40 PM, Jacob Carlborg wrote: The C icon probably comes from Xcode. BTW, here's how it looks like [2]. The corresponding icon from TextMate looks like this [3]. Just the TextMate logo with a name of the language at the bottom. So it comes down to where the logo gets positioned. On windows its left of centre, on mac its at the bottom. I think its might be going a bit far to produce an icon per editor, so I'll concentrate on making something that looks good as an overlay in multiple positions and make sure that it is easy for others to incorporate. I have made several versions of the logo with reversed colours (I added a couple of them to the branding strategy document I posted [1]). I prefer them to the versions without horizons, but I'm not sure I like any of them enough to really support them. A... [1]https://docs.google.com/document/d/1Sb4xnZUbzVRIicsfnxBFhTvRH4EOYq88wZexAuGcnaE/edit
Re: Worrying attitudes to the branding of the D language
On 03/07/2014 12:40 AM, deadalnix wrote: On Wednesday, 2 July 2014 at 19:05:56 UTC, Walter Bright wrote: On 7/2/2014 11:08 AM, Gary Willoughby wrote: Here is one of my all time favourite talks from Steve Yegge (Senior Engineer at Google) at OSCON 2007 entitled How to Ignore Marketing and Become Irrelevant in Two Easy Steps. This is sage advice: http://tvuol.uol.com.br/video/oscon--how-to-ignore-marketing--0402D0C90386/ Yes, Steve has a way of pointing out the obvious that the rest of us miss. Is there the complete video somewhere ? This one cut before the end, and that is very frustrating. Ditto, however given the GTE - Verizon anecdote and this... On 01/07/2014 6:45 PM, Gary Willoughby wrote: * D is a brand, whether you like it or not * The logo is the essence of that brand * D has a history of poorly managed change * D's community has been destroyed once before (Tango) * D has the preception of unreliability * D is not seen as a professional offering * D is perceved as half finished A...
Re: Optimizing Java using D
On 03/07/2014 9:13 AM, Andrei Alexandrescu wrote: On 7/3/14, 12:29 AM, Wanderer wrote: Nobody, never, measures sort algorithms by amount of swaps. That... is quite the claim. -- Andrei Most of the algorithm rankings I am aware of list both compares and swaps, because which one has the biggest effect on computation depends on the data (not its the ordering, but the complexity of comparison) and how it is stored (all in a single page of memory vs across multiple networked disks vs in immutable memory such that each swap actually duplicate the whole dataset). Saying that one is always more significant than the other is far too much of an oversimplification. A...
Re: Worrying attitudes to the branding of the D language
On 03/07/2014 10:40 AM, Dicebot wrote: On Wednesday, 2 July 2014 at 17:34:46 UTC, Gary Willoughby wrote: On Wednesday, 2 July 2014 at 11:02:58 UTC, Dicebot wrote: We don't have any recognizable branding worth fighting for. I can't even remember how current D logo looks like without checking the website, it is just some image in the corner of the page. Branding is something bigger than that. But you recognise it when you see it! I recognize the updated one too. Actually I won't be able to tell the difference unless looking at both at the same time. My point is that there is nothing very distinctive with current logo to be that concerned. Anything with similarly styled D letter will be as recognizable as current one. I agree! I started working on this little document last night while angry and tired, maybe it should find its way to the wiki. Its the last time I'm going to post any work related to D branding or logo design unless someone specifically asks me to. A...
Re: Worrying attitudes to the branding of the D language
On 03/07/2014 10:40 AM, Dicebot wrote: On Wednesday, 2 July 2014 at 17:34:46 UTC, Gary Willoughby wrote: On Wednesday, 2 July 2014 at 11:02:58 UTC, Dicebot wrote: We don't have any recognizable branding worth fighting for. I can't even remember how current D logo looks like without checking the website, it is just some image in the corner of the page. Branding is something bigger than that. But you recognise it when you see it! I recognize the updated one too. Actually I won't be able to tell the difference unless looking at both at the same time. My point is that there is nothing very distinctive with current logo to be that concerned. Anything with similarly styled D letter will be as recognizable as current one. I agree! I started working on this little document last night while angry and tired, maybe it should find its way to the wiki. https://docs.google.com/document/d/1Sb4xnZUbzVRIicsfnxBFhTvRH4EOYq88wZexAuGcnaE/edit Its the last time I'm going to post any work related to D branding or logo design unless someone specifically asks me to. A...
Re: Redesign of dlang.org
On 03/07/2014 12:35 PM, w0rp wrote: On Thursday, 3 July 2014 at 09:42:05 UTC, Dicebot wrote: On Wednesday, 2 July 2014 at 23:32:36 UTC, w0rp wrote: I just brought the Twitter module back. :( it was so much better with this ugly widget gone and replaced with something actually useful. I actually didn't intend to remove it before, but if we want to replace it with something else I could do that. I don't feel strongly either way about it. The twitter feed on D currently fulfils the role that in other places is performed by an internal news ticker that summarises the most recent news stories. D for some reason does not seem to generate that much internal news, at least not in a form that would be apt for consumption on the dlang.org landing page. Maybe if the forum front end produced an RSS feed of top level posts to d.announce that could be fed into the buzz box. Then all we'd need is a steady stream of exciting announcements. A...
[OT] Re: Worrying attitudes to the branding of the D language
On 03/07/2014 1:00 PM, Iain Buclaw via Digitalmars-d wrote: You mispelt Useage /spelling troll There is no red underline this end and invoking the spell checker is only finding the hex colour codes at the moment. But means nothing as I discovered just this morning that the google docs spell checker ignores words that appear before a full-stop, so its entirely possibly it skips orphans or single word titles or single capitalised words or something too. A...
Re: Worrying attitudes to the branding of the D language
On 03/07/2014 3:44 PM, Wyatt wrote: On Thursday, 3 July 2014 at 11:40:34 UTC, Alix Pexton wrote: I agree! I started working on this little document last night while angry and tired, maybe it should find its way to the wiki. https://docs.google.com/document/d/1Sb4xnZUbzVRIicsfnxBFhTvRH4EOYq88wZexAuGcnaE/edit Very nice; thank you. Though, having thought on it some more, I would suggest the capital D and the two moons are the most important aspect in terms of a distinctive mark. The red background is currently an element of the logo design, but I don't think it lends much potential for iconified forms. Casting outward, I can't think of many logos that depend heavily on their background either, and I think there are merits to pursuing similar. Isolating the glyph and moons is pretty easy, too! But this then calls attention to the implied horizon of Mars. How essential is it to the mark? I'm really not sure, but my gut is telling me it needs to be given consideration for at least the more ornate levels of the design. So would emulating that boundary with a thin crescent work? I don't have any good tools on-hand, but I managed to scrape together this stupidly rough wireframe that hopefully illustrates the basic idea well enough: http://radiusic.com/imagedump/dwire2.png This allows for dark-on-light or light-on-dark equally, with the horizon some value in the red area; possibly a gradient. -Wyatt I swear it was just before I read this, that I added a paragraphlette saying that in some contexts it may be appropriate to reduce the logo further to just the D and moons in red for use on light coloured backgrounds. I hadn't considered having the horizon a just a line or swoosh, but I like the look of it ^^ A...
Re: Optimizing Java using D
On 03/07/2014 4:16 PM, Wanderer wrote: On Thursday, 3 July 2014 at 11:30:57 UTC, Alix Pexton wrote: and how it is stored (all in a single page of memory vs across multiple networked disks vs in immutable memory such that each swap actually duplicate the whole dataset). And how much of that wide area is actually covered by D's sort that was discussed here? All in a single page is the runtime ideal. Immutable memory where every swap duplicates the whole dataset is the CTFE reality. [But sorting at compile time is a really bad idea!] Multiple networked disks was just the worst case I can think of, someone somewhere will be doing it, but maybe not in D. A...
Re: Redesign of dlang.org
On 03/07/2014 6:38 PM, w0rp wrote: * Run it all with D to tick a official D site made in D checkbox. The powered by Python banner gave me an idea... In a nod to Walter's self confessed petrol-headedness, I thought we could incorporate the logo into a D under the hood or D in the tank banner for sites and software that utilise or run on D. Might be a bit over the top for dlang.org though ^^ A...
Re: Worrying attitudes to the branding of the D language
On 03/07/2014 8:30 PM, Ola Fosheim Grøstad ola.fosheim.grostad+dl...@gmail.com wrote: On Thursday, 3 July 2014 at 19:06:42 UTC, Wyatt wrote: Actually, stepping back a bit: maybe you can explain, concretely, why you believe the horizon line is essential to the point that removing it fundamentally alters the form? That may be more productive. I don't agree with Gary that the horizon/reflection is essential to the form, but I think but if you remove it you get an imbalance that you need to compensate for because you get a big red area in the bottom right and a diagonal move that goes from bottom left to top right. That means you either have to change the logo or change the space around it. I agree, it may be a happy accident that a shape that was meant to be part of the glossy sheen on the image got interpreted as the distant Martian horizon, but the D and moons look unbalanced without it. A...
Re: Worrying attitudes to the branding of the D language
On 01/07/2014 10:29 PM, Walter Bright wrote: On 7/1/2014 10:45 AM, Gary Willoughby wrote: Here is the present and official D logo: http://media.sukimashita.com/d/d-5.svg I suggest we keep it. All excellent points, and I agree with you on all of them. And I like the current logo, and want to keep it. So what counts as the current logo? That exact image and no other? Which of the colours from the gradient fills do we match the colour scheme of a refreshed website to? If there is going to be no change to the branding, can we at least have a definitive statement of what the current brand is that isn't just a link to a single image. [Incidentally, I found the copyright notice that goes with the current logo at the bottom of this page: http://media.sukimashita.com/d/ (the gallery of designs that the current logo was chosen from)] A...
Re: Worrying attitudes to the branding of the D language
On 02/07/2014 6:13 PM, Vladimir Panteleev wrote: On Wednesday, 2 July 2014 at 16:53:52 UTC, Brad Anderson wrote: He should be contacted and asked if he'd be willing to assign copyright to Walter. Does anyone have his email address? Walter and I have attempted to reach out to Martin a while ago with regards to logo licensing (triggered by the logo's deletion on Wikipedia - it was taken down once, but since then someone reuploaded it again). As far as I know, so far there has been no reply. Here's the information I have: Original post: http://forum.dlang.org/post/e3j72u$16n7$1...@digitaldaemon.com GitHub profile: https://github.com/FunkyM Professional website: http://mirell.de/ The site where the original logo is hosted has a mail me link on its landing page... heyitsal...@sukimashita.com A...
Re: Redesign of dlang.org
On 01/07/2014 7:42 AM, w0rp wrote: The logo on the site I'm testing is the most effective duck. The logo is a placeholder I made with no graphic design experience. The old logo is a bit too fat and round to fit with the new design, so I'd like something which is obviously still the same brand, but looks a bit flatter. I just found out why your logo looks terrible on my machine, you are using a web font in the SVG that FF isn't finding and there is no fallback specified so I'm getting a D in Times New Roman A quick solution would be to convert the glyph to curves (Object to Path on the Path menu in Inkscape), then you will know that everyone is seeing the same thing. A...
Re: Redesign of dlang.org
On 01/07/2014 8:40 AM, Alix Pexton wrote: On 01/07/2014 7:42 AM, w0rp wrote: The logo on the site I'm testing is the most effective duck. The logo is a placeholder I made with no graphic design experience. The old logo is a bit too fat and round to fit with the new design, so I'd like something which is obviously still the same brand, but looks a bit flatter. I just found out why your logo looks terrible on my machine, you are using a web font in the SVG that FF isn't finding and there is no fallback specified so I'm getting a D in Times New Roman A quick solution would be to convert the glyph to curves (Object to Path on the Path menu in Inkscape), then you will know that everyone is seeing the same thing. A... However, the font is Apache licensed, so to use it in a logo you would need to purchase the Pro version for $80 dollars. This is why I do all my own typography! A...
Re: Redesign of dlang.org
On 01/07/2014 6:08 PM, Brad Anderson wrote: The original D logo (and colours) must be used. The copyright of the original isn't owned by Walter. I think it'd be best if we moved away from it. I like the flatter, cleaner logo. Should anyone ever deem one of my designs worthy, I'd be happy to sign over the copyright to Walter. A...
Re: D Logos
On 26/06/2014 9:15 PM, Wyatt wrote: I'll first admit I'm not fond of the font. I do agree with a sans serif with fairly thick stroke, but I don't like the vertical stress and I think a wider counter definitely looks better with these proportions. What's the font in the current logo? I don't know for sure, but I don't think its from a named font, rather it is probably hand drawn. (Designers tend to create a lot of partial fonts for customers because of licensing issues.) Very few typefaces have Ds that are wider that they are tall, like the one in the current logo appears. The top two, I'm not sure how I feel about the hard edges. More importantly, though, I don't think there's enough contrast between the red/pink and the white, so the D is rather hard to see. How about going darker on those? Another option might be to give the letter a thin outline. The main red that I chose to use in all the variations so far is #DD, which was entirely a coincidence, but I do like the association. In those top two images, 90% of the time they took to draw was in the selection of a shade of pink that I thought contrasted nicely between the red and the white, but that is obviously very subjective. The bottom six, I'm not keen on the use of black. I find it clashes harshly with the white and red. But changing the white would muddle the contrast with red, so maybe ease the black back to something a bit more mild...say, #1F252B? The shadows on the moons are nice, though; gives them some interest and lightening the black would mess with that... maybe make the shadows a darker red? Not sure on that part. What is Black, white an Red all over? There is a named colour called Outer Space (#414A4C), but I think its meant as a shade of wax crayon. It doesn't look too bad however with, as you suggested, redder shadows on the moons. -Wyatt Thanks for your feed back ^^ A...
Re: D Logos
On 26/06/2014 9:34 PM, H. S. Teoh via Digitalmars-d wrote: Of all these, I find that I like the bottom right one the most. I divided the options into left and right based on the emotion that I felt the angle of the shadow on the moon suggested, the left side are the ones that I felt were happy and optimistic, the right side the sadder ones, so I'm very surprised that anyone would pick a favourite from the right side oO One thing that could improve, though, is the planet's margin shouldn't be white; it clashes with the D. Maybe a slight reddening of the white band should fix it. Good call, but quick experimentation has not found just the right colour yet. It seems that in order not to disappear it needs to get darker. Also, it may help if the margin of the shadows on the moons were made a tad softer -- make the edge between the two halves of each moon just a little less sharp. I like this idea. T Thanks for your feedback.
Re: D Logos
On 25/06/2014 5:16 PM, Walter Bright wrote: I agree with Russel. I think we've had good success with the D With Moons logo, and it's use is pervasive and recognizable as being D. Perhaps just a subtle clean up then? https://drive.google.com/file/d/0B3i8FWPuOpryTjFybHNYYVVtc1k/edit A...
Re: D Logos
On 24/06/2014 9:58 PM, Iain Buclaw via Digitalmars-d wrote: You can also make a logo for GDC if you like. I'm phasing the site itself through something of an infrastructure change, may as well make some visual changes too to make it more appealing. ;-) http://gdcproject.org Here are half a morning's worth of doodles, let me know if you see anything you like. https://drive.google.com/file/d/0B3i8FWPuOpryaGVwb2NKT18zNFE/edit A...
Re: D Logos
On 25/06/2014 2:16 PM, Iain Buclaw via Digitalmars-d wrote: On 25 June 2014 14:08, Iain Buclaw ibuc...@gdcproject.org wrote: On 25 June 2014 12:07, Alix Pexton via Digitalmars-d digitalmars-d@puremagic.com wrote: On 24/06/2014 9:58 PM, Iain Buclaw via Digitalmars-d wrote: You can also make a logo for GDC if you like. I'm phasing the site itself through something of an infrastructure change, may as well make some visual changes too to make it more appealing. ;-) http://gdcproject.org Here are half a morning's worth of doodles, let me know if you see anything you like. https://drive.google.com/file/d/0B3i8FWPuOpryaGVwb2NKT18zNFE/edit A... The circle O doodle could be a turned into the site favicon. I see you did a prettier version of the existing GDC logo, I think the G in that looks too much like C. I think it would be better using the first G in the top left hand corner on the first line (GGDCC). Or maybe the second... Gs can be tricky to draw (yes, these are drawn not from an existing font). The black letters at the top use different thicknesses for the horizontal and vertical strokes, so that G would look out of place with the red letters. Here are some quick variations (just the old red G with bits on ^^). https://drive.google.com/file/d/0B3i8FWPuOpryb2tmc2ZMdVMwcEE/edit A...
Re: D Logos
On 25/06/2014 6:34 PM, Iain Buclaw via Digitalmars-d wrote: Having quickly patched it together in gimp, I'm leaning on either on the right hand side. The G on the bottom left could be nice next to the D in a strange perspective (eg: a 3D box). I agree ^^ At the same time I agree with Walter on the Moons logo. But I'd like to make it slightly unique. Maybe a Gibbous Moon. :) The real Phobos and Deimos look nothing like our moon, Deimos isn't even remotely spherical! http://darkhorizons.emissionline.com/images/moon-ha2l.jpg You could almost make out a G to fir into that... And how do you feel about wolves? I've got 9 total variations on the G now, my 2nd favourite of the ones I've not shown you is just a tiny tweak away from the top right version ^^ A...
Re: D Logos
On 22/06/2014 9:52 AM, Alix Pexton wrote: I feel that most of the new logos that have been proposed lately are too much of a departure from what we already have, so I'm throwing a few of my own designs into the ring. https://drive.google.com/file/d/0B3i8FWPuOpryQU9OQlMydXJmeTQ/edit https://drive.google.com/file/d/0B3i8FWPuOpryMmJZSnpkdnNyR2M/edit A... In the spirit of being my own harshest critic, I did one more logo that addresses my biggest gripe with the originals. While the originals were still distinctive at small sizes, the incorporated letter-Ds became illegible. This revision retains the same character but with more clarity when shrunk. https://drive.google.com/file/d/0B3i8FWPuOpryYWxJOXUwYU8yQ0U/edit A...
Re: Passing around a list of differently typed functions
On 23/06/2014 8:19 AM, Bienlein wrote: On Monday, 23 June 2014 at 01:16:49 UTC, Evan Davis wrote: As the subject says, I would like to pass around an array of functions. The trick is, that the functions have different type signatures. Is there a way to put the two functions int foo(int a, int b); bool bar(bool a, bool b); into one array, that I can pass around and cast as necessary? Thanks, Evan Have functions in the array without parpameters that call the function with the applicable parameters, e.g. int foo(int a, int b) or bool bar(bool a, bool b). That doesn't address the problem of the different return types (int and bool). So change the return type to void and return the value as an inout parameter. You could convert your functions to return via an out parameter (either manually or with template magic) then have an array of same-signatured closures that can call any function. A...
Re: D Logos
I feel that most of the new logos that have been proposed lately are too much of a departure from what we already have, so I'm throwing a few of my own designs into the ring. https://drive.google.com/file/d/0B3i8FWPuOpryQU9OQlMydXJmeTQ/edit https://drive.google.com/file/d/0B3i8FWPuOpryMmJZSnpkdnNyR2M/edit A...
Re: Icons for .d and .di files
On 22/06/2014 11:49 AM, Jordi Sayol via Digitalmars-d wrote: Another based on Alix Pexton's logo: http://s12.postimg.org/nz8amui7h/dsrc5.png Ooh, you based it on my favourite ^^ A...
Re: When is a slice not a slice?
On 06/06/2014 7:39 PM, Steven Schveighoffer wrote: On Fri, 06 Jun 2014 06:14:30 -0400, Rene Zwanenburg renezwanenb...@gmail.com wrote: Immutables should be usable at compile time and not allocate a new instance on every use when in module scope. I was about to say this. But immutable can have its own set of issues. If you want strictly compile-time generation of data, then immutable is the way to go. But if you want to use it at runtime as well, immutable can hamper some things. I'm sure your example is a very small or reduced snippet of what you are actually doing. -Steve Something I read in Adam's D Cookbook (somewhere in chapter 9) got me thinking that I am on the wrong track with the code I was talking about here. My new plan is to make the values that are currently passes to the structs' constructors into enums, then make the instances of the structs into static immutables. I'll need some factory methods in my struct but nothing to taxing. Thanks again for your advice.
Re: When is a slice not a slice?
On 06/06/2014 7:39 PM, Steven Schveighoffer wrote: On Fri, 06 Jun 2014 06:14:30 -0400, Rene Zwanenburg renezwanenb...@gmail.com wrote: Immutables should be usable at compile time and not allocate a new instance on every use when in module scope. I was about to say this. But immutable can have its own set of issues. If you want strictly compile-time generation of data, then immutable is the way to go. But if you want to use it at runtime as well, immutable can hamper some things. I'm sure your example is a very small or reduced snippet of what you are actually doing. -Steve I re-factored my actual code to not need the slices at all as no matter how I tried to use them at compile time it broke one of my invariants.I now have enums that I can use at compile time to generate more enums (via set operations, etc) and at runtime, so I'm happy. A...
mangled coverage report
I've just noticed that in the .lst file for one of my libs the execution counts stop lining up with the source, and the source itself is truncated by a couple of lines. The function where the misalignment begins contains an if (__ctfe) block (first time I ever used one) but just testing that does not manifest the same behaviour. Has anyone else ever noticed anything similar? A...
Re: When is a slice not a slice?
On 05/06/2014 8:56 PM, Philippe Sigaud via Digitalmars-d-learn wrote: enum b = DataAndView(1); assert (!sameTail(b.data, b.view)); I suppose it's because enums are manifest constants: the value they represent is 'copy-pasted' anew everywhere it appears in the code. So for arrays and associative arrays, it means recreating a new value each and every time. In your case, your code is equivalent to: assert (!sameTail(DataAndView(1).data,DataAndView(1).view)); And the two DataAndView(1), being completely separated, do not have the same tail. Ah, Isee, that does kinda make sense ^^ A re-factoring we go... A...
Re: When is a slice not a slice?
On 06/06/2014 8:52 AM, Alix Pexton wrote: And the two DataAndView(1), being completely separated, do not have the same tail. Ah, Isee, that does kinda make sense ^^ A re-factoring we go... However, the code that originally tripped over this issue had the call to sameTail in the struct's invariant, and I don't seem to be able to reproduce that with the obvious reduced code... Still, Thanks! A...
Re: When is a slice not a slice?
On 05/06/2014 8:58 PM, Steven Schveighoffer wrote: On Thu, 05 Jun 2014 15:56:00 -0400, Philippe Sigaud via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: enum b = DataAndView(1); assert (!sameTail(b.data, b.view)); I suppose it's because enums are manifest constants: the value they represent is 'copy-pasted' anew everywhere it appears in the code. So for arrays and associative arrays, it means recreating a new value each and every time. In your case, your code is equivalent to: assert (!sameTail(DataAndView(1).data,DataAndView(1).view)); And the two DataAndView(1), being completely separated, do not have the same tail. Yes, this should work (and execute the initializer at compile time): static b = ... -Steve Ah, the problem with static is that I want to use the values at compile time to create other values. Using static puts construction between compile time and run time. Initialising in static this means that the symbols need to be declared without initializers and that means not disabling default construction A...
When is a slice not a slice?
In CTFE it seems. Only tested with DMD on Windows though. Is this a known limitation, or a bug, I couldn't find anything that seemed to match it in the bugzilla. import std.array; struct DataAndView { int[] data, view; this(int x) { data = [1, 2, 3, 4, 5]; view = data[x .. $]; } } unittest { auto a = DataAndView(1); assert (sameTail(a.data, a.view)); enum b = DataAndView(1); assert (!sameTail(b.data, b.view)); }
Re: 1st Call for Ideas for Google Summer of Code 2015
On 31/05/2014 3:43 AM, Craig Dillabaugh wrote: On Friday, 30 May 2014 at 19:49:31 UTC, Tobias Pankrath wrote: I know this is very early, but I work slowly :o) * Something like boost::log * Something like boost::program_options * An parser generator on par with antlr4 * std.stream replacement / buffers * std.xml * SSL implementation? Would you be interested in offering to mentor any of these? I've been working on my own personal XML project for a while now (no useful code to contribute yet, just a lot of design groundwork) and I'm starting to feel like a bit of a domain expert. To that end I wouldn't mind being listed as a mentor for work on std.xml or a replacement. A...
Re: D Users Survey: Primary OS?
On 29/05/2014 4:53 PM, Tom Browder via Digitalmars-d wrote: Has anyone done a survey of the primary OS of D users? Win7 64bit A...
[OT] Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs
On 28/05/2014 2:05 PM, Craig Dillabaugh wrote: On Tuesday, 27 May 2014 at 21:40:00 UTC, Walter Bright wrote: On 5/27/2014 2:22 PM, w0rp wrote: I'm actually a native speaker of 25 years and I didn't get it at first. Natural language communicates ideas approximately. What bugs me is when people say: I could care less. when they mean: I couldn't care less. and: If you think that, you have another thing coming. when they mean: If you think that, you have another think coming. Whats wrong with If you think that, you have another thing coming.? I've always understood it sort of like say your Father saying: If you think that [i.e. you can steal your little brother's ice cream cone], then you have another thing [i.e no ice cream, but maybe the leather strap] coming. I couldn't resist looking up this debate, and its quite a fiery one with no clear winner! There is no clear origin to the phrase and equal arguments for and against both forms. My personal view is that the thinGists are right, because I often use the word believe in the first half, i.e. if you believe that, then you have another thing coming. I wouldn't tell anyone that they had another belief coming, as in my experience my opinions have very little impact on the beliefs of others. Also, grammatically speaking, if I was expecting someone to change their mind, I like to think that I'd more likely say that they had another thought coming, or If you think that, then you have another thought to come. Not because think can never be a noun, I often say lets have a think. A...
Re: My D book is now officially coming soon
On 28/05/2014 9:00 AM, Mike James wrote: On Tuesday, 27 May 2014 at 14:20:49 UTC, Adam D. Ruppe wrote: On Tuesday, 27 May 2014 at 13:27:56 UTC, Szymon Gatner wrote: Will epub version be available too? Yeah, I think it is already on the packt website. I'm looking at getting the ebook version - does that version include the errata described above? -mike- I've not checked them side-by-side the whole way through but the ePub does have the same triple colons as the PDF. the ePub uses colour instead of font weight for the keywords in the text and the notes and tips are styled differently, but as far as I've seen so far the content is the same. A...
Re: Video of my LDC talk @ FOSDEM'14
On 27/05/2014 1:15 PM, Tommi wrote: On Monday, 26 May 2014 at 05:59:35 UTC, Kai Nacke wrote: [..] http://video.fosdem.org/2014/K4401/Sunday/LDC_the_LLVMbased_D_compiler.webm I can't watch this on my iPhone. https://itunes.apple.com/gb/app/vlc-for-ios/id650377962?mt=8
Re: Livestreaming DConf?
On 09/05/2014 8:48 PM, Andrei Alexandrescu wrote: Hi folks, We at Facebook are very excited about the upcoming DConf 2014. In fact, so excited we're considering livestreaming the event for the benefit of the many of us who can't make it to Menlo Park, CA. Livestreaming entails additional costs so we're trying to assess the size of the online audience. Please follow up here and on twitter: https://twitter.com/D_Programming/status/464854296001933312 Thanks, Andrei I'd watch a livestream, if the time difference doesn't get in the way that is A...
Re: Redesign of dlang.org
On 23/04/2014 5:28 PM, Dicebot wrote: Gosh now I finally know what researches to blame for my eyes bleeding upon most web site restylings (Facebook *caugh-caugh*). Are you sure that your eyes aren't bleeding because your fonts are too small? A...
Re: Redesign of dlang.org
On 24/04/2014 9:44 AM, Dicebot wrote: Considering the very same size 9 fonts are used as default everywhere else in my desktop system and it feels just fine.. yeah, you must be right. It must be small font and not weirdly scaled UI with 2/3 of screen space blank. Sure. We must just be oppositesAt the distance I sit from my monitor 9pt type is vanishingly small, I can read it as I type it, but not once I've forgotten what it says. I couldn't work like that. I find that most sites use fonts that are too small, I often zoom until what I want to read fills the screen at a reasonable line length. don't know for sure how big that makes it but its probably around 32pt. Sites that have too much empty space around the text are often the ones that are kindest to zooming. others that try to fill the void tend to reflow at every step of zoom and get to very short lines very quickly.
Re: Redesign of dlang.org
On 24/04/2014 9:44 AM, Dicebot wrote: Considering the very same size 9 fonts are used as default everywhere else in my desktop system and it feels just fine.. yeah, you must be right. It must be small font and not weirdly scaled UI with 2/3 of screen space blank. Sure. We must just be opposites. I tested. At the distance I sit from my monitor 9pt type is vanishingly small, I can read it as I type it, but not once I've forgotten what it says. I couldn't work like that, I certainly could not bare to browse the web like that. I often zoom in on websites until what I want to read fills the screen at a reasonable line length. I don't know for sure how big that makes it but its probably between 24pt and 32pt. (When I'm coding I have my IDE set to 20pt.) Sites that have too much empty space around the text are often the ones that are kindest to zooming. others that try to fill the void tend to reflow at every step of zoom and line lengths get ridiculously short as the filler expands. I dislike empty space, but I'd rather a page were designed with a fixed maximum line length for readability and allow the reader to zoom, than with the objective of filling every pixel of screen with text. For the record, I am quite severely dyslexic, and mildly myopic, but I don't believe my preference for large type is related to either. A...
Re: Table lookups - this is pretty definitive
On 17/04/2014 8:41 PM, monarch_dodra wrote: On Thursday, 17 April 2014 at 18:07:24 UTC, ixid wrote: I feel like there must be a way of making a fast bit look up but my version is only moderate in speed. You can get all the bits you need on two 64 bit registers or one SSE register. I haven't tried bt, does that work with a 64 bit register? http://dlang.org/phobos/core_bitop.html#.bt ? Note it can be applied to the table in general, rather than the byte themselves. EG: ubyte[256] buf; auto b = bt(buf.ptr, 428); I didn't think to look in core.bitop for a faster way to check bits, I'll check if it closes the gap to Walter's version. A...
Re: A crazy idea for accurately tracking source position
On 17/04/2014 8:20 PM, matovitch wrote: You are doing it all wrong. The easiest way to compute the col position is the following : col_pos = 0; if (non_tab_character_encounter) col_pos++; else col_pos += tab_length - col_pos % tab_length; That's it. Tabs can have variable widths, with your technique the end only lines up with the desired column if tab_length matches the width of tabs being used to display the output, which is at best happenstance. By constructing a string that matches the pattern of characters that precede the column exactly, everything lines up no matter how wide the display tabs are. A... A...
Re: Table lookups - this is pretty definitive
I tested this against the others... (with -inline -release -O of course) === uint[8] tab4; // bitop function only work on uints static this() { for (size_t u = 0; u 0x100; ++u) { if (isIdentifierChar0(cast(ubyte)u)) { bts(tab4.ptr, u); } } } bool isIdentifierChar4(ubyte c) { return bt(tab4.ptr, c) != 0; } === it takes about 3 times as long (about the same as the original isIdentifierChar1, that used lots of s and ||s). So 2 shifts, 2 ands and a compare to zero, beats core.bitop. for clarity, the output of my benchmark for all 5 version was Milliseconds 21 15 2 5 15 the 2 (which on some runs was a 3) is Walter's table of bools, the 5 is my table of ulongs and the 15 on the end is core.bitop. Short of delving into the asm, which I'm trying to avoid, any other suggestions for speed-ups? A...
Re: A crazy idea for accurately tracking source position
A complete, tested and working proof of concept! Pipe the output to a file and load it in an editor that allows you to mess with the size of tabs and no matter what width they have things will still line up (as long as the font is fixed width). I'm pretty sure this is sub optimal even though I did change from my original design so that there is less going on on the path for characters and spaces which I assume would be the more common case. A... = import std.stdio; enum lsb = 0x1L; enum msb = 0x8000___L; enum max = 0x___L; struct columnRange { private string input; private ulong pattern; private long check; this(string s) { input = s; } @property bool empty() { return input.length == 0; } @property string front() { return input; } columnRange save() { return this; } void popFront() { if (input.length 0) { if (pattern == 0) { if (input[0] != 0x09) { pattern = ~lsb; } else { pattern = lsb; } input = input[1..$]; ++check; return; } pattern = 1; if (input[0] == 0x09) { pattern |= lsb; } input = input[1..$]; ++check; } } @property string indent() { if (pattern == 0) { return ; } if (check = 64) { return somewhere way way way down there ---; } auto copy = pattern; auto ret = ; size_t i; if ((pattern msb) == 0) { ret ~= \t; do { copy = 1; ++i; } while ((copy msb) == 0); } else { ret ~= ; do { copy = 1; ++i; } while ((copy msb) != 0); } if (i 64) { copy = 1; ++i; while (i 64) { if ((copy msb) == 0) { ret ~= ; } else { ret ~= \t; } copy = 1; ++i; } } return ret; } } void main() { enum input1 = 1s in input1 \twill have 1 caret directly below them,\t 1 per line, except this 1; writefln(%s, input1); auto r1 = columnRange(input1); while(!r1.empty) { if (r1.front[0] == '1') { writefln(%s^, r1.indent); } r1.popFront; } }
Re: A crazy idea for accurately tracking source position
Just fixing an obvious typo in my code (that is still incomplete). struct someRange { ulong seq; bool fresh = true; long line; dchar front; // and lets just pretend that there is // somewhere for more characters to come from! void popFront() { // advance by whatever means to update front. if (front.isNewline) { ++line; fresh = true; return; } if (fresh) { if (front.isTab) { seq = 0x___fffeL; } else { seq = 0x1L; } fresh = false; } else { seq = 1; if (!front.isTab) { seq |= 0x1L; } } } // and the rest... }
Re: Table lookups - this is pretty definitive
I added a lookup scheme of my own, its not as fast as Walters (in fact its the slowest without -inline - release -O) but it uses 1 bit per entry in the table instead of a whole byte so you can have lots and lots of different tables. I'm even reasonably sure that it works correctly! === import core.stdc.stdlib; import core.stdc.string; import std.algorithm; import std.array; import std.ascii; import std.datetime; import std.range; import std.stdio; import std.traits; bool isIdentifierChar0(ubyte c) { return isAlphaNum(c) || c == '_' || c == '$'; } bool isIdentifierChar1(ubyte c) { return ((c = '0' || c == '$') (c = '9' || c = 'A') (c = 'Z' || c = 'a' || c == '_') (c = 'z')); } immutable bool[256] tab2; static this() { for (size_t u = 0; u 0x100; ++u) { tab2[u] = isIdentifierChar0(cast(ubyte)u); } } bool isIdentifierChar2(ubyte c) { return tab2[c]; } immutable ulong[4] tab3; static this() { for (size_t u = 0; u 0x100; ++u) { if (isIdentifierChar0(cast(ubyte)u)) { auto sub = u 6; auto b = u 0x3f; auto mask = 0x01L b; tab3[sub] |= mask; } } } bool isIdentifierChar3(ubyte c) { auto sub = c 6; c = 0x3f; auto mask = 0x01L c; return (tab3[sub] mask) 0; } int f0() { int x; for (uint u = 0; u 0x100; ++u) { x += isIdentifierChar0(cast(ubyte)u); } return x; } int f1() { int x; for (uint u = 0; u 0x100; ++u) { x += isIdentifierChar1(cast(ubyte)u); } return x; } int f2() { int x; for (uint u = 0; u 0x100; ++u) { x += isIdentifierChar2(cast(ubyte)u); } return x; } int f3() { int x; for (uint u = 0; u 0x100; ++u) { x += isIdentifierChar3(cast(ubyte)u); } return x; } void main() { auto r = benchmark!(f0, f1, f2, f3)(10_000); writefln(Milliseconds %s %s %s %s, r[0].msecs, r[1].msecs, r[2].msecs, r[3].msecs); }
A crazy idea for accurately tracking source position
TL;DR Here is some under documented, incomplete and untested code. CAVEAT IMPLEMENTOR: some details have been omitted to keep things brief! struct someRange { ulong seq; bool fresh = true; long line; dchar front; // and lets just pretend that there is // somewhere for more characters to come from! void popFront() { // advance by whatever means to update front. if (front.isNewline) { ++line; fresh = true; return; } if (fresh) { if (front.isTab) { seq = 0x,,,fffeL; } else { seq = 0x1L; } fresh = false; } else { seq = 1; if (!front.isTab) { seq |= 0x1L; } } } // and the rest... } A long time ago I wrote a very rudimentary XML lexer/parser in pascal. At the time I thought it was a good idea to point to the exact character where a error was detected. Knowing that tabs could be involved and that they can have different widths I stored the line position as a tabs/spaces tuple, because no one would ever put a space anywhere but at the beginning of the line, right! Jump forward a decade or so and I know better. I.e. just knowing the number of tabs and spaces isn't enough, because when tabs can be anywhere, sometimes the spaces are swallowed up. What is needed is a string of tabs and spaces that matches the sequence of tabs and non-tabs in the source. Such could be built while lexing for immediate use if an invalid character is encountered and then thrown away at each newline, but it would not be practical to store that much information in every token. The sequence could be split between tokens from a single line, with each token having just the pattern since the last token, but reversing the reading of the tokens in order to reconstruct the sequence or building it while parsing just in case it is needed are at best impractical. What would help would be a way of fitting that sequence of tabs and spaces into a smaller format. Here is the crazy part... Using a ulong (or longer if possible) to store our tab sequence... Upon starting to lex a fresh line we check the first character, if its a tab we set all but the lsb to 1 . If that first char is anything other than a tab, we set all bits but the lsb to 0 . On each subsequent character in the line we shift the sequence left 1 bit and set the new lsb as 0 if its a tab and 1 if it is anything else. If the line is longer than the number of bits in our ulong[er] we throw our toys out of the pram and go home in tears. Any time a token is emitted the current (or most relevant) value of the ulong can be stored in it. To decode the sequence if it is needed, we check the msb, if it is 1 then the first character is a tab and we shift the whole value until the first 0 reaches the msb (keeping track of how many shifts we do so as not to reach apple headquarters) and then one more shift to account for the first character. If the msb is 0 then the first character is a space and we shift left until one past the first 1 . For each remaining bit we add a tab when the msb is 0 and a space when it is 1 . Thus we have reconstructed a string that when displayed above or below the line that generated it, will end at the correct character, regardless of the number of tabs or spaces used to represent them. Hurrah! For any type of source where lexed lines are regularly contain more characters than there are bits in our longest integer, this technique will fail. However, I reason that in most cases the lines that are all non tabs and full width are often not parsed (i.e. they are comments etc). Lines that start hard to the left are often short and lines that reach the right are often the ones with many tabs in them. In other words, many lines that are too wide, are not too long. Am I on to something or should I be on something? A...
Re: dec64 decimal floating point type
I contacted Doug to ask if he had any additional resources that I could use to make my argument for DEC64. I only got a brief reply (happy to get any reply from someone so busy) to the effect that everything he has to say on the matter is in the motivation segment of his web site for the proposal [1]. The most salient part is the last 2 sentences... A later revision of IEEE 754 attempted to remedy this, but the formats it recommended were so inefficient that it has not found much acceptance. DEC64 is a better alternative. I encourage anyone who is dismissive of the adoption of DEC64 or who would prefer to see the IEEE decimal floats implemented to take the time to read the full article. I also recommend the presentation that alerted me to DEC64 either in full (46:10) [2] or at least just the segment about numbers [3]. A... [1] http://dec64.org [2] https://www.youtube.com/watch?v=3WgVHE5Augc [3] https://www.youtube.com/watch?feature=player_detailpagev=3WgVHE5Augc#t=818
Re: Formal review of std.lexer
On 14/04/2014 10:34 PM, Brian Schott wrote: ubyte[] is required for the lexer to work quickly. That lexer range is designed to keep track of the column and line numbers. I can understand that speed requires the input to be handled as bytes instead of chars, but the restriction to an ubyte[] over an randomAccessRange seems to me un-Dlang-y. If the LexerRange is only there to optionally add line/column numbering support then I think it needs a much more descriptive name and much better documentation. That function's purpose is to determine if the current code unit signifies the end of an identifier/keyword. When lexing fortunate, the lexer would spot for, and then call the separating function with the index of u. In the case of D, it would say that this does NOT end a word, and fortunate should be lexed as an identifier. If it was called with an index of a space or parenthesis, it should return true. Somehow I had skipped the salient part of the documentation for this, so my apologies (at first I thought that the DDoc output I was reading must have been out of sync with the source (it was, but not that much), but further investigations suggest some form of temporary blindness). This description squares with what I had surmised from reading the code, and I can see why it would be more efficient than the common technique of comparing every matched identifier to the list of keywords. I do wonder however if there might be another way to attain the same efficiency without the need for the separating function (I should have replied to this last night when my ideas on the matter were clearer, sleep seems to have stolen my theoretical alternative ). I'm also curious about the decision that the signature of the separating function should take the offset to the character than needs to be tested. A more Dlang-y thing to do in my mind would be to pass a range that begins at the first character after the matched keyword. If more than one prefix is dispatched to the same handler, the handler cannot blindly call popFront or popFrontN. If the lexer author knows that the handler will only be called in certain places, than checking !empty is a waste of cycles. I don't think it's possible for the lexer generator to enforce this. I don't think the lexer needs to do anything extra to ensure that a handler can begin its work both without repeating calls to .empty or blindly calling popFront. To do so requires that the input be treated a a forward range. Before reading a token, store the .save of the input, then advance the input as the token is matched counting the consumed elements. When the handler is called it will have the option of including the token by adding to the count and returning a slice that begins at the .save'd position or ignoring the length of the match and returning a slice that begins at the position after the matched token. I strongly believe that a model that requires the user to reason about a library providing ranges that are logicaly !empty is a misstep. XML doesn't seem to have very distinct lexing/parsing phases like JSON markup or Java code does. This lexer generator may not be the best way to deal with XML. I don't really know how the grammar in the XML standard compares to others in general. It is certainly more convoluted than the published grammar for Dlang, but we all know that that doesn't quite match the language. Some criticise XML for being too complicated, but in some respects it is even more complicated than that, it seems ironic that it was supposed to be simple. But, I might have typed too soon when I wrote that this lexer might not be able to fully tokenize XML in a single pass. As I was drifting off to sleep last night I had the idea of using the extraFields of TokenStructure to add a token pointer (or equivalent construct) to the tokens, making a singly linked list and allowing me to return multiple tokens from a token handler. I just need to convince myself that it is a sane thing to do. If you have specific problems, please list them. I think the calculator example should be improved or replaced so that the documentation's first example uses all the string[]s that can be passed to the lexer. Perhaps a simple symbolic calculator that accepts letter sequences as variables and reserves pi as a keyword? I think that the section that describes the token handlers needs to fully document the primitives that the user has access to in order to lex a token and what state to expect them to be in when the handler is called and what state they should be in when it returns. If tracking lines and columns is optional and supported only when wrapping the input with LexerRange then I think that by default Tokens should not contain fields for them. Perhaps an enum qstring that declares the required fields can be introduced and an example shown where it is concatenated with user declarations to be passed in via