dlang.org should do it in style

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
I just created https://github.com/D-Programming-Language/dlang.org/pull/769, which shifts the majority of dlang.org's look and feel to CSS styles. With this work in tow, we get to use classic CSS styling to improve the look and feel of the site. Please review. I'll be also looking forward

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread eles via Digitalmars-d
On Friday, 16 January 2015 at 04:20:37 UTC, Walter Bright wrote: http://blog.ploeh.dk/2015/01/15/10-tips-for-better-pull-requests/ Most are intuitive, but 10. Avoid thrashing is worthy.

Re: Cross compiler for embedded microcontrollers ?

2015-01-16 Thread Jens Bauer via Digitalmars-d
Build failed on final gcc. I normally use newlib and multilib, because I'm developing for Cortex-M0, Cortex-M3 and Cortex-M4 and would like to be able to switch between those and use the same compiler. But following the above mentioned instructions seem to suggest disabling multilib and using

Re: More tricky range semantics

2015-01-16 Thread Tobias Pankrath via Digitalmars-d
Yep, range semantics just got even trickier. (And we thought transient ranges were bad...) T This is related: https://issues.dlang.org/show_bug.cgi?id=11951

Re: dlang.org should do it in style

2015-01-16 Thread weaselcat via Digitalmars-d
On Friday, 16 January 2015 at 08:23:15 UTC, Andrei Alexandrescu wrote: I just created https://github.com/D-Programming-Language/dlang.org/pull/769, which shifts the majority of dlang.org's look and feel to CSS styles. With this work in tow, we get to use classic CSS styling to improve the

Re: Is anyone working on a D source code formatting tool?

2015-01-16 Thread ketmar via Digitalmars-d
On Fri, 16 Jan 2015 02:05:09 + deadalnix via Digitalmars-d digitalmars-d@puremagic.com wrote: On Tuesday, 13 January 2015 at 12:43:05 UTC, ketmar via Digitalmars-d wrote: On Tue, 13 Jan 2015 12:37:22 + Bruno Medeiros via Digitalmars-d digitalmars-d@puremagic.com wrote: On

Re: Why exceptions for error handling is so important

2015-01-16 Thread ketmar via Digitalmars-d
On Fri, 16 Jan 2015 01:01:26 + via Digitalmars-d digitalmars-d@puremagic.com wrote: On Friday, 16 January 2015 at 00:48:57 UTC, deadalnix wrote: On Thursday, 15 January 2015 at 21:29:28 UTC, Tobias Müller wrote: In a well-designed interface, every function specifies all the errors

Re: Why exceptions for error handling is so important

2015-01-16 Thread via Digitalmars-d
On Friday, 16 January 2015 at 00:59:34 UTC, deadalnix wrote: auto create_unique_file() { for (uint i = 0;; i++) { auto name = make_name(i); if (file_exists(name)) continue; try { create_file(name); return name: } catch(FileAlreadyExistException e) { } } } You

Re: Why exceptions for error handling is so important

2015-01-16 Thread Tobias Pankrath via Digitalmars-d
IMO, this example just shows that it's a bad idea to follow the exceptions are for exceptional circumstances only mantra too strictly. The call to `file_exists()` serves no other purpose than to make the exception truly exceptional, otherwise it's completely superfluous (well, aside from

Re: For the lulz: ddmd vs libdparse lexer timings

2015-01-16 Thread Daniel Murphy via Digitalmars-d
Iain Buclaw via Digitalmars-d wrote in message news:mailman.4161.1420481405.9932.digitalmar...@puremagic.com... I think I've got a handle on this, sort of. I've moved the declaration of __va_argsave into the glue layer, and added intrinsic detection for va_start/va_end/va_arg (the

Re: More tricky range semantics

2015-01-16 Thread Dicebot via Digitalmars-d
On Friday, 16 January 2015 at 14:58:09 UTC, Dicebot wrote: On Friday, 16 January 2015 at 00:58:34 UTC, Joseph Rushton Wakeling via Digitalmars-d wrote: On 16/01/15 00:24, Andrei Alexandrescu via Digitalmars-d wrote: That's right. To simplify the problem space we might decree that forward (or

Re: Cross compiler for embedded microcontrollers ?

2015-01-16 Thread Mike via Digitalmars-d
On Friday, 16 January 2015 at 10:04:55 UTC, Jens Bauer wrote: Build failed on final gcc. I normally use newlib and multilib, because I'm developing for Cortex-M0, Cortex-M3 and Cortex-M4 and would like to be able to switch between those and use the same compiler. But following the above

Re: More tricky range semantics

2015-01-16 Thread Dicebot via Digitalmars-d
On Friday, 16 January 2015 at 00:58:34 UTC, Joseph Rushton Wakeling via Digitalmars-d wrote: On 16/01/15 00:24, Andrei Alexandrescu via Digitalmars-d wrote: That's right. To simplify the problem space we might decree that forward (or better) ranges with reference semantics are not allowed. --

Re: Is anyone working on a D source code formatting tool?

2015-01-16 Thread Ary Borenszweig via Digitalmars-d
On 1/11/15 3:48 PM, Walter Bright wrote: On 1/11/2015 9:45 AM, Stefan Koch wrote: I'm powerful writing a parser-generator, that will be able to transform the generated parse-tree back into source automatically. writing a rule-based formatter should be pretty doable. Formatting the AST into

Re: Cross compiler for embedded microcontrollers ?

2015-01-16 Thread Mike via Digitalmars-d
On Friday, 16 January 2015 at 10:04:55 UTC, Jens Bauer wrote: Build failed on final gcc. But following the above mentioned instructions seem to suggest disabling multilib and using libgcc instead of newlib. Also, libgcc is not a replacement for newlib. I'm not an expert on the toolchain but

Re: dlang.org should do it in style

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 2:42 AM, weaselcat wrote: On Friday, 16 January 2015 at 08:23:15 UTC, Andrei Alexandrescu wrote: I just created https://github.com/D-Programming-Language/dlang.org/pull/769, which shifts the majority of dlang.org's look and feel to CSS styles. With this work in tow, we get to use

Re: The ANSI character set is very important for operating MSSQL, if no conversion,will attract more C# users

2015-01-16 Thread FrankLike via Digitalmars-d
On Thursday, 15 January 2015 at 16:03:47 UTC, Ola Fosheim Grøstad wrote: On Thursday, 15 January 2015 at 14:50:29 UTC, FrankLike wrote: The wstring displayed ok in cmd,but not ok in gui(must use the fromMBS fuction),so I want to test change the gui'control.d ,set text property is Tstring ,by

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread H. S. Teoh via Digitalmars-d
On Thu, Jan 15, 2015 at 08:20:32PM -0800, Walter Bright via Digitalmars-d wrote: http://blog.ploeh.dk/2015/01/15/10-tips-for-better-pull-requests/ I agree with pretty much everything in this article. tl,dr: The more you make your reviewer work, the greater the risk is that your Pull

Re: Is anyone working on a D source code formatting tool?

2015-01-16 Thread Brian Schott via Digitalmars-d
On Friday, 16 January 2015 at 15:06:42 UTC, Ary Borenszweig wrote: The way I did it in Descent (I copied the logic from JDT) is to parse the code into an AST, and then walk the AST in sync with a lexer. My dfmt tool does something similar. The parser runs over the code first and makes notes

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 7:50 AM, H. S. Teoh via Digitalmars-d wrote: On Thu, Jan 15, 2015 at 08:20:32PM -0800, Walter Bright via Digitalmars-d wrote: http://blog.ploeh.dk/2015/01/15/10-tips-for-better-pull-requests/ I agree with pretty much everything in this article. tl,dr: The more you make your

Re: More tricky range semantics

2015-01-16 Thread Joseph Rushton Wakeling via Digitalmars-d
On Friday, 16 January 2015 at 14:59:10 UTC, Dicebot wrote: To specify : the way I see it you either want PRNG to be a forward range and that fits with value semantics. Or you want reference semantics and it naturally becomes input range. Here's the problem with value semantics. This is a

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread ketmar via Digitalmars-d
On Fri, 16 Jan 2015 08:10:50 -0800 Andrei Alexandrescu via Digitalmars-d digitalmars-d@puremagic.com wrote: On 1/16/15 7:50 AM, H. S. Teoh via Digitalmars-d wrote: On Thu, Jan 15, 2015 at 08:20:32PM -0800, Walter Bright via Digitalmars-d wrote:

Re: More tricky range semantics

2015-01-16 Thread Tobias Pankrath via Digitalmars-d
On Friday, 16 January 2015 at 16:12:23 UTC, Joseph Rushton Wakeling wrote: void foo (FRange) (FRange range) if (isForwardRange!FRange) { foreach (i; 0 .. 10) { // silly example :-P auto r = range.save; r.take(10).writeln; } } This is a problematic design

Re: More tricky range semantics

2015-01-16 Thread Joseph Rushton Wakeling via Digitalmars-d
On Friday, 16 January 2015 at 17:09:47 UTC, Tobias Pankrath wrote: While the first example is indeed problematic, this one actually is not. If this does not print the same 10 numbers every time, your save method is wrong. Regardless of being a reference type or not it has to clone the RNG

Re: More tricky range semantics

2015-01-16 Thread Joseph Rushton Wakeling via Digitalmars-d
On Friday, 16 January 2015 at 17:13:33 UTC, Joseph Rushton Wakeling wrote: I think you've misunderstood what I was getting at, probably because I didn't explain myself well. There's a concrete example of the problem I can demonstrate from some Phobos functionality, but off the top of my head

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread Tobias Pankrath via Digitalmars-d
On Friday, 16 January 2015 at 16:22:13 UTC, ketmar via Digitalmars-d wrote: On Fri, 16 Jan 2015 08:10:50 -0800 Andrei Alexandrescu via Digitalmars-d digitalmars-d@puremagic.com wrote: On 1/16/15 7:50 AM, H. S. Teoh via Digitalmars-d wrote: On Thu, Jan 15, 2015 at 08:20:32PM -0800, Walter

Re: More tricky range semantics

2015-01-16 Thread Tobias Pankrath via Digitalmars-d
On Friday, 16 January 2015 at 17:13:33 UTC, Joseph Rushton Wakeling wrote: On Friday, 16 January 2015 at 17:09:47 UTC, Tobias Pankrath wrote: While the first example is indeed problematic, this one actually is not. If this does not print the same 10 numbers every time, your save method is

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 9:16 AM, Tobias Pankrath wrote: On Friday, 16 January 2015 at 16:22:13 UTC, ketmar via Digitalmars-d wrote: On Fri, 16 Jan 2015 08:10:50 -0800 Andrei Alexandrescu via Digitalmars-d digitalmars-d@puremagic.com wrote: On 1/16/15 7:50 AM, H. S. Teoh via Digitalmars-d wrote: On Thu,

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread H. S. Teoh via Digitalmars-d
On Fri, Jan 16, 2015 at 05:16:38PM +, Tobias Pankrath via Digitalmars-d wrote: On Friday, 16 January 2015 at 16:22:13 UTC, ketmar via Digitalmars-d wrote: On Fri, 16 Jan 2015 08:10:50 -0800 Andrei Alexandrescu via Digitalmars-d digitalmars-d@puremagic.com wrote: [...] I think it would be

css minification

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
I just added https://github.com/D-Programming-Language/dlang.org/pull/770, which generates minified css files. This is because in the near future css files will become heftier (more documentation comments, more detailed styles etc). The disadvantage is that now one needs to be online to

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread ketmar via Digitalmars-d
On Fri, 16 Jan 2015 17:16:38 + Tobias Pankrath via Digitalmars-d digitalmars-d@puremagic.com wrote: On Friday, 16 January 2015 at 16:22:13 UTC, ketmar via Digitalmars-d wrote: On Fri, 16 Jan 2015 08:10:50 -0800 Andrei Alexandrescu via Digitalmars-d digitalmars-d@puremagic.com

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread Tobias Pankrath via Digitalmars-d
Bad idea. Take for example this one of mine https://github.com/D-Programming-Language/phobos/pull/2793 that sits there for more than 20 days. I've addressed all concerns and now it's waiting for someone who feels responsible for std.container to pull it. Now four things can happen: 1.

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 9:41 AM, Tobias Pankrath wrote: That reply was not about my pull request specifically. Since it basically consists of two new files, it can stay there for months without generating any additional work for me. But it is a good counterexample to the »just close old stuff«-policy. I

Re: css minification

2015-01-16 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 16 January 2015 at 17:40:40 UTC, Andrei Alexandrescu wrote: I just added https://github.com/D-Programming-Language/dlang.org/pull/770, which generates minified css files. This is because in the near future css files will become heftier (more documentation comments, more detailed

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread Tobias Pankrath via Digitalmars-d
I agree that a hamfisted policy would do more harm than good. That's why it's so hard to define! I'm thinking of something like: if there's $(legitimate) request for changes but the author is dormant for more than $(X) days, then close. Andrei Macros: legitimate=? X=? legitimate=

Re: More tricky range semantics

2015-01-16 Thread Joseph Rushton Wakeling via Digitalmars-d
On Friday, 16 January 2015 at 17:22:42 UTC, Tobias Pankrath wrote: Ah, now I understand you. Since copy-construction is undefined for ForwardRanges, you cannot guarantee this. Things would be better, if we had required that this(this) does the same as .save or must be @disabled. I'm not sure

Re: css minification

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 9:58 AM, Vladimir Panteleev wrote: On Friday, 16 January 2015 at 17:40:40 UTC, Andrei Alexandrescu wrote: I just added https://github.com/D-Programming-Language/dlang.org/pull/770, which generates minified css files. This is because in the near future css files will become heftier

Re: Cross compiler for embedded microcontrollers ?

2015-01-16 Thread Timo Sintonen via Digitalmars-d
On Friday, 16 January 2015 at 10:04:55 UTC, Jens Bauer wrote: Has anyone used newlib with a Cortex-M based GDC toolchain ? As Mike pointed out, my minlibd project is a good starting point. It contains a fully functional example for stm32f4 Build failed on final gcc. I normally use newlib

Re: no size yet for forward reference for nested structures

2015-01-16 Thread Steven Schveighoffer via Digitalmars-d
On 1/16/15 2:18 AM, zeljkog wrote: On 16.01.15 08:04, zeljkog wrote: On 15.01.15 23:30, Steven Schveighoffer wrote: On 1/15/15 9:56 AM, zeljkog wrote: This compiles: import std.container; class Node { DList!Node children; } Then use DList? DList is not SList, they were written by

Re: More tricky range semantics

2015-01-16 Thread Tobias Pankrath via Digitalmars-d
On Friday, 16 January 2015 at 18:12:03 UTC, Joseph Rushton Wakeling wrote: On Friday, 16 January 2015 at 17:22:42 UTC, Tobias Pankrath wrote: Ah, now I understand you. Since copy-construction is undefined for ForwardRanges, you cannot guarantee this. Things would be better, if we had required

Re: css minification

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 9:58 AM, Vladimir Panteleev wrote: [snip] Just made css minification opt-in. -- Andrei

Re: css minification

2015-01-16 Thread H. S. Teoh via Digitalmars-d
On Fri, Jan 16, 2015 at 10:37:38AM -0800, Andrei Alexandrescu via Digitalmars-d wrote: On 1/16/15 9:58 AM, Vladimir Panteleev wrote: [snip] Just made css minification opt-in. -- Andrei Thanks!! T -- Maybe is a strange word. When mom or dad says it it means yes, but when my big

Re: css minification

2015-01-16 Thread H. S. Teoh via Digitalmars-d
On Fri, Jan 16, 2015 at 10:16:55AM -0800, Andrei Alexandrescu via Digitalmars-d wrote: On 1/16/15 9:58 AM, Vladimir Panteleev wrote: On Friday, 16 January 2015 at 17:40:40 UTC, Andrei Alexandrescu wrote: I just added https://github.com/D-Programming-Language/dlang.org/pull/770, which

Re: More tricky range semantics

2015-01-16 Thread H. S. Teoh via Digitalmars-d
On Fri, Jan 16, 2015 at 06:34:08PM +, Tobias Pankrath via Digitalmars-d wrote: On Friday, 16 January 2015 at 18:12:03 UTC, Joseph Rushton Wakeling wrote: On Friday, 16 January 2015 at 17:22:42 UTC, Tobias Pankrath wrote: Ah, now I understand you. Since copy-construction is undefined for

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread deadalnix via Digitalmars-d
On Friday, 16 January 2015 at 16:22:13 UTC, ketmar via Digitalmars-d wrote: it sits in queue without any comments more than 20 days? reject and close it. It is better to have some kind of bot that comment on the PR after a while. Like hey, this PR is hanging, can someone make thing go

Re: Is anyone working on a D source code formatting tool?

2015-01-16 Thread Ahmed Fasih via Digitalmars-d
Hi there, I'm a C++/Python refugee, new to D. clang-format seems to do a pretty good job with both of these. Comments seem to be intact unless they're too long, then they're wrapped. It seems to wrap at a space or other non-identifier character. Same thing with expressions that are too long.

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread Walter Bright via Digitalmars-d
On 1/16/2015 9:49 AM, Andrei Alexandrescu wrote: I'm thinking of something like: if there's $(legitimate) request for changes but the author is dormant for more than $(X) days, then close. That's also a hamfisted policy. I've seen PR's that were good, but needed a bit of work, but the author

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread aldanor via Digitalmars-d
On Friday, 16 January 2015 at 18:50:29 UTC, deadalnix wrote: On Friday, 16 January 2015 at 16:22:13 UTC, ketmar via Digitalmars-d wrote: it sits in queue without any comments more than 20 days? reject and close it. It is better to have some kind of bot that comment on the PR after a while.

Re: no size yet for forward reference for nested structures

2015-01-16 Thread Steven Schveighoffer via Digitalmars-d
On 1/16/15 1:24 PM, Steven Schveighoffer wrote: I will file a bug. Thanks for digging into this. https://issues.dlang.org/show_bug.cgi?id=13990 https://github.com/D-Programming-Language/phobos/pull/2876 -Steve

Building dmd with msvc 2015

2015-01-16 Thread Temtaime via Digitalmars-d
Hi ! Is anyone tried to build dmd with msvc 2015 preview ? I cannot build phobos with following error: src\phobos\std\functional.d(43): Error: function std.algorithm.countUntil!(b a.timeT, immutable(Transition)[], immutable(int)).countUntil.pred2 (immutable(Transition) a) is not callable

Re: css minification

2015-01-16 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 16 January 2015 at 18:16:55 UTC, Andrei Alexandrescu wrote: What would be a trustworty offline CSS minifier? http://yui.github.io/yuicompressor/ Its only dependency is Java. Usage: java -jar yuicompressor-*.jar --type css input.css output.css

Re: css minification

2015-01-16 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 16 January 2015 at 18:16:55 UTC, Andrei Alexandrescu wrote: I should also add that we already connect online to fetch LATEST from github. Incidentally today that takes forever :o). We (and a lot of other people) already trust GitHub. Also, GitHub is HTTPS-only. That's a rather

Re: css minification

2015-01-16 Thread Steven Schveighoffer via Digitalmars-d
On 1/16/15 12:40 PM, Andrei Alexandrescu wrote: I just added https://github.com/D-Programming-Language/dlang.org/pull/770, which generates minified css files. This is because in the near future css files will become heftier (more documentation comments, more detailed styles etc). The

Re: html files without the .html extension

2015-01-16 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 16 January 2015 at 20:42:53 UTC, Andrei Alexandrescu wrote: To my surprise I saw that all pages linked from http://dlang.org/spec.html do NOT have an .html extension, see e.g. http://dlang.org/intro which Just Works(tm). However, it doesn't work when I test the site locally or

Re: css minification

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 10:40 AM, H. S. Teoh via Digitalmars-d wrote: On Fri, Jan 16, 2015 at 10:37:38AM -0800, Andrei Alexandrescu via Digitalmars-d wrote: On 1/16/15 9:58 AM, Vladimir Panteleev wrote: [snip] Just made css minification opt-in. -- Andrei Thanks!! Glad it works for you. Vladimir, is

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 11:23 AM, Walter Bright wrote: On 1/16/2015 9:49 AM, Andrei Alexandrescu wrote: I'm thinking of something like: if there's $(legitimate) request for changes but the author is dormant for more than $(X) days, then close. That's also a hamfisted policy. I've seen PR's that were good,

html files without the .html extension

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
To my surprise I saw that all pages linked from http://dlang.org/spec.html do NOT have an .html extension, see e.g. http://dlang.org/intro which Just Works(tm). However, it doesn't work when I test the site locally or upload it for testing on my own website. Do we have some automatic

Re: css minification

2015-01-16 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 16 January 2015 at 20:40:29 UTC, Andrei Alexandrescu wrote: On 1/16/15 10:40 AM, H. S. Teoh via Digitalmars-d wrote: On Fri, Jan 16, 2015 at 10:37:38AM -0800, Andrei Alexandrescu via Digitalmars-d wrote: On 1/16/15 9:58 AM, Vladimir Panteleev wrote: [snip] Just made css

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 16 January 2015 at 19:23:06 UTC, Walter Bright wrote: On 1/16/2015 9:49 AM, Andrei Alexandrescu wrote: I'm thinking of something like: if there's $(legitimate) request for changes but the author is dormant for more than $(X) days, then close. That's also a hamfisted policy. I've

Re: css minification

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 12:37 PM, Steven Schveighoffer wrote: On 1/16/15 12:40 PM, Andrei Alexandrescu wrote: I just added https://github.com/D-Programming-Language/dlang.org/pull/770, which generates minified css files. This is because in the near future css files will become heftier (more documentation

[WORK] Backtick dat code?

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
Now that Adam's work on transforming `code` into $(D code) is in, who'd want to write the glorious sed --in-place expression that transforms Phobos? Or should we just leave it for future code and occasional refactoring? -- Andrei

Re: css minification

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 12:27 PM, Vladimir Panteleev wrote: On Friday, 16 January 2015 at 18:16:55 UTC, Andrei Alexandrescu wrote: What would be a trustworty offline CSS minifier? http://yui.github.io/yuicompressor/ Its only dependency is Java. Usage: java -jar yuicompressor-*.jar --type css input.css

Re: [WORK] Backtick dat code?

2015-01-16 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 16 January 2015 at 20:50:22 UTC, Andrei Alexandrescu wrote: Now that Adam's work on transforming `code` into $(D code) is in, who'd want to write the glorious sed --in-place expression that transforms Phobos? Or should we just leave it for future code and occasional refactoring? --

Re: css minification

2015-01-16 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 16 January 2015 at 20:51:34 UTC, Andrei Alexandrescu wrote: On 1/16/15 12:27 PM, Vladimir Panteleev wrote: On Friday, 16 January 2015 at 18:16:55 UTC, Andrei Alexandrescu wrote: What would be a trustworty offline CSS minifier? http://yui.github.io/yuicompressor/ Its only

Re: css minification

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 12:56 PM, Vladimir Panteleev wrote: On Friday, 16 January 2015 at 20:51:34 UTC, Andrei Alexandrescu wrote: On 1/16/15 12:27 PM, Vladimir Panteleev wrote: On Friday, 16 January 2015 at 18:16:55 UTC, Andrei Alexandrescu wrote: What would be a trustworty offline CSS minifier?

Re: html files without the .html extension

2015-01-16 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 16 January 2015 at 20:44:11 UTC, Vladimir Panteleev wrote: To disable it, you can add to .htaccess: Not that this would be a good idea at this point, as it'd break existing links. But we can also add a redirect from extensionless to .html (or vice versa).

Re: [WORK] Backtick dat code?

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 12:58 PM, Vladimir Panteleev wrote: On Friday, 16 January 2015 at 20:50:22 UTC, Andrei Alexandrescu wrote: Now that Adam's work on transforming `code` into $(D code) is in, who'd want to write the glorious sed --in-place expression that transforms Phobos? Or should we just leave it

Re: css minification

2015-01-16 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 16 January 2015 at 21:04:58 UTC, Andrei Alexandrescu wrote: On 1/16/15 12:56 PM, Vladimir Panteleev wrote: On Friday, 16 January 2015 at 20:51:34 UTC, Andrei Alexandrescu wrote: On 1/16/15 12:27 PM, Vladimir Panteleev wrote: On Friday, 16 January 2015 at 18:16:55 UTC, Andrei

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread ketmar via Digitalmars-d
On Fri, 16 Jan 2015 11:23:02 -0800 Walter Bright via Digitalmars-d digitalmars-d@puremagic.com wrote: On 1/16/2015 9:49 AM, Andrei Alexandrescu wrote: I'm thinking of something like: if there's $(legitimate) request for changes but the author is dormant for more than $(X) days, then

Re: css minification

2015-01-16 Thread Steven Schveighoffer via Digitalmars-d
On 1/16/15 3:53 PM, Andrei Alexandrescu wrote: On 1/16/15 12:37 PM, Steven Schveighoffer wrote: On 1/16/15 12:40 PM, Andrei Alexandrescu wrote: I just added https://github.com/D-Programming-Language/dlang.org/pull/770, which generates minified css files. This is because in the near future css

Re: css minification

2015-01-16 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 16 January 2015 at 21:04:58 UTC, Andrei Alexandrescu wrote: That's why online services rok. Anyone knows of a secure css minimizing service? -- Andrei Minification in general is of dubious value, but doubly so with css, it barely makes a difference compared to gzip and client side

Re: css minification

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 1:13 PM, Steven Schveighoffer wrote: On 1/16/15 3:53 PM, Andrei Alexandrescu wrote: On 1/16/15 12:37 PM, Steven Schveighoffer wrote: On 1/16/15 12:40 PM, Andrei Alexandrescu wrote: I just added https://github.com/D-Programming-Language/dlang.org/pull/770, which generates minified

Re: css minification

2015-01-16 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 16 January 2015 at 21:26:04 UTC, Andrei Alexandrescu wrote: Well good point. As of January two of the css files are in the top 3 most trafficked files off of dlang.org, second only to favicon.ico. That's probably because HTTP caching is not configured. Ideally, you'd put the

Re: css minification

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 1:32 PM, Vladimir Panteleev wrote: On Friday, 16 January 2015 at 21:26:04 UTC, Andrei Alexandrescu wrote: Well good point. As of January two of the css files are in the top 3 most trafficked files off of dlang.org, second only to favicon.ico. That's probably because HTTP caching is

Re: css minification

2015-01-16 Thread Steven Schveighoffer via Digitalmars-d
On 1/16/15 4:26 PM, Andrei Alexandrescu wrote: On 1/16/15 1:13 PM, Steven Schveighoffer wrote: On 1/16/15 3:53 PM, Andrei Alexandrescu wrote: On 1/16/15 12:37 PM, Steven Schveighoffer wrote: On 1/16/15 12:40 PM, Andrei Alexandrescu wrote: I just added

http://wiki.dlang.org/DIP25 has been preliminarily approved for 2.067

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
Please help us work the kinks out! Walter will be proceeding with the opt-in implementation for quicker pipelining. http://wiki.dlang.org/DIP25 Andrei

Re: css minification

2015-01-16 Thread Kiith-Sa via Digitalmars-d
I looked at the favicon, and... the file is .ico (bad format), stores 5 versions of the icon (16x16 to 64x64) even though only 16x16/32x32 are supported. Here are just the 16x16(383b) and 32x32(1.77kiB) versions, as PNGs (better compression than gif, and official standard - used RGBA, as

Re: http://wiki.dlang.org/DIP25 has been preliminarily approved for 2.067

2015-01-16 Thread Zach the Mystic via Digitalmars-d
On Friday, 16 January 2015 at 21:41:25 UTC, Andrei Alexandrescu wrote: Please help us work the kinks out! Walter will be proceeding with the opt-in implementation for quicker pipelining. http://wiki.dlang.org/DIP25 Andrei I'm working on an article/DIP which actually goes further than the

Re: [WORK] Backtick dat code?

2015-01-16 Thread H. S. Teoh via Digitalmars-d
On Fri, Jan 16, 2015 at 12:50:21PM -0800, Andrei Alexandrescu via Digitalmars-d wrote: Now that Adam's work on transforming `code` into $(D code) is in, who'd want to write the glorious sed --in-place expression that transforms Phobos? Or should we just leave it for future code and occasional

Re: More tricky range semantics

2015-01-16 Thread Joseph Rushton Wakeling via Digitalmars-d
On 16/01/15 07:38, H. S. Teoh via Digitalmars-d wrote: I've been wondering about that. Must ranges have an underlying container? Or are they allowed to be more abstract entities that basically function as generators, producing data on demand? (This distinction is also somewhat related to

Re: css minification

2015-01-16 Thread Kiith-Sa via Digitalmars-d
On Friday, 16 January 2015 at 21:39:52 UTC, Andrei Alexandrescu wrote: On 1/16/15 1:32 PM, Vladimir Panteleev wrote: On Friday, 16 January 2015 at 21:26:04 UTC, Andrei Alexandrescu wrote: Well good point. As of January two of the css files are in the top 3 most trafficked files off of

Re: http://wiki.dlang.org/DIP25 has been preliminarily approved for 2.067

2015-01-16 Thread Brian Schott via Digitalmars-d
On Friday, 16 January 2015 at 21:41:25 UTC, Andrei Alexandrescu wrote: Please help us work the kinks out! Walter will be proceeding with the opt-in implementation for quicker pipelining. http://wiki.dlang.org/DIP25 Andrei I added support to my tools a few days ago:

Re: http://wiki.dlang.org/DIP25 has been preliminarily approved for 2.067

2015-01-16 Thread Walter Bright via Digitalmars-d
On 1/16/2015 1:41 PM, Andrei Alexandrescu wrote: Please help us work the kinks out! Walter will be proceeding with the opt-in implementation for quicker pipelining. http://wiki.dlang.org/DIP25 https://github.com/D-Programming-Language/dmd/pull/4298

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread Walter Bright via Digitalmars-d
On 1/16/2015 12:44 PM, Andrei Alexandrescu wrote: On 1/16/15 11:23 AM, Walter Bright wrote: On 1/16/2015 9:49 AM, Andrei Alexandrescu wrote: I'm thinking of something like: if there's $(legitimate) request for changes but the author is dormant for more than $(X) days, then close. That's also

Re: css minification

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 1:44 PM, Steven Schveighoffer wrote: I don't care how much of the overall bandwidth it is, what I was asking is how much does the file shrink if you minify. 30% -- ANDREI

Re: http://wiki.dlang.org/DIP25 has been preliminarily approved for 2.067

2015-01-16 Thread Steven Schveighoffer via Digitalmars-d
On 1/16/15 4:41 PM, Andrei Alexandrescu wrote: Please help us work the kinks out! Walter will be proceeding with the opt-in implementation for quicker pipelining. http://wiki.dlang.org/DIP25 I was about to complain because I remember not liking that DIP, but I see you removed inout as the

Re: css minification

2015-01-16 Thread Steven Schveighoffer via Digitalmars-d
On 1/16/15 5:12 PM, Andrei Alexandrescu wrote: On 1/16/15 1:44 PM, Steven Schveighoffer wrote: I don't care how much of the overall bandwidth it is, what I was asking is how much does the file shrink if you minify. 30% -- ANDREI so d-minified.css.gz is 30% smaller than d.css.gz? Just want

Re: Is anyone working on a D source code formatting tool?

2015-01-16 Thread qznc via Digitalmars-d
On Friday, 16 January 2015 at 15:55:53 UTC, Brian Schott wrote: On Friday, 16 January 2015 at 15:06:42 UTC, Ary Borenszweig wrote: The way I did it in Descent (I copied the logic from JDT) is to parse the code into an AST, and then walk the AST in sync with a lexer. My dfmt tool does

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread Walter Bright via Digitalmars-d
On 1/16/2015 12:48 PM, Vladimir Panteleev wrote: On Friday, 16 January 2015 at 19:23:06 UTC, Walter Bright wrote: On 1/16/2015 9:49 AM, Andrei Alexandrescu wrote: I'm thinking of something like: if there's $(legitimate) request for changes but the author is dormant for more than $(X) days,

Re: http://wiki.dlang.org/DIP25 has been preliminarily approved for 2.067

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 2:00 PM, Brian Schott wrote: On Friday, 16 January 2015 at 21:41:25 UTC, Andrei Alexandrescu wrote: Please help us work the kinks out! Walter will be proceeding with the opt-in implementation for quicker pipelining. http://wiki.dlang.org/DIP25 Andrei I added support to my tools

Re: css minification

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 1:54 PM, Kiith-Sa wrote: I looked at the favicon, and... the file is .ico (bad format), stores 5 versions of the icon (16x16 to 64x64) even though only 16x16/32x32 are supported. Here are just the 16x16(383b) and 32x32(1.77kiB) versions, as PNGs (better compression than gif, and

Re: [WORK] Backtick dat code?

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 1:59 PM, H. S. Teoh via Digitalmars-d wrote: On Fri, Jan 16, 2015 at 12:50:21PM -0800, Andrei Alexandrescu via Digitalmars-d wrote: Now that Adam's work on transforming `code` into $(D code) is in, who'd want to write the glorious sed --in-place expression that transforms Phobos? Or

Re: css minification

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 1:44 PM, Steven Schveighoffer wrote: On an embedded product we have with a dead-simple web server, there is terrible network performance. Adding gzip support saved way more than minification ever could. But the best performance improvement was to add caching support to the server.

Re: css minification

2015-01-16 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 16 January 2015 at 22:17:51 UTC, Steven Schveighoffer wrote: On 1/16/15 5:12 PM, Andrei Alexandrescu wrote: On 1/16/15 1:44 PM, Steven Schveighoffer wrote: I don't care how much of the overall bandwidth it is, what I was asking is how much does the file shrink if you minify. 30%

Re: css minification

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 2:02 PM, Kiith-Sa wrote: +1 for gzip and caching. *don't even consider* microoptimizations like this if you're not even doing that yet, whatever gains you might get are negligible by comparison. I'm estimating about one third of 12%, or 4% of the total traffic. That's a hell of a

Re: 10 Tips for Better Pull Requests

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 2:17 PM, Walter Bright wrote: I've worked at companies that would rate engineers based on the bug count. That ended very badly, it was so bad it was comical, how working that number actually wrecked the quality of the product. I've seen similar disasters with use of metrics on

Re: css minification

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 2:17 PM, Steven Schveighoffer wrote: On 1/16/15 5:12 PM, Andrei Alexandrescu wrote: On 1/16/15 1:44 PM, Steven Schveighoffer wrote: I don't care how much of the overall bandwidth it is, what I was asking is how much does the file shrink if you minify. 30% -- ANDREI so

Re: css minification

2015-01-16 Thread Steven Schveighoffer via Digitalmars-d
On 1/16/15 5:23 PM, Andrei Alexandrescu wrote: On 1/16/15 1:44 PM, Steven Schveighoffer wrote: On an embedded product we have with a dead-simple web server, there is terrible network performance. Adding gzip support saved way more than minification ever could. But the best performance

Re: css minification

2015-01-16 Thread Andrei Alexandrescu via Digitalmars-d
On 1/16/15 2:26 PM, Vladimir Panteleev wrote: On Friday, 16 January 2015 at 22:17:51 UTC, Steven Schveighoffer wrote: On 1/16/15 5:12 PM, Andrei Alexandrescu wrote: On 1/16/15 1:44 PM, Steven Schveighoffer wrote: I don't care how much of the overall bandwidth it is, what I was asking is how

Re: css minification

2015-01-16 Thread Steven Schveighoffer via Digitalmars-d
On 1/16/15 5:30 PM, Andrei Alexandrescu wrote: On 1/16/15 2:26 PM, Vladimir Panteleev wrote: On Friday, 16 January 2015 at 22:17:51 UTC, Steven Schveighoffer wrote: On 1/16/15 5:12 PM, Andrei Alexandrescu wrote: On 1/16/15 1:44 PM, Steven Schveighoffer wrote: I don't care how much of the

  1   2   >