Thought this code ended up really concise and readable:
https://gist.github.com/lionello/60cd2f1524c664d4d8454c01a05ac2c8
Suitable for dlang.org?
L.
Let's occupy codeaholics:
https://www.meetup.com/Codeaholics/events/242640432/
On 6/9/2017 00:26, Lionello Lunesu wrote:
+1!
Let me know the dates and I'll blast it to the channels I'm on
(Codeaholics, Dim Sum Labs hacker space.)
L.
On 5/9/2017 03:25, Jonathan M Davis via
+1!
Let me know the dates and I'll blast it to the channels I'm on
(Codeaholics, Dim Sum Labs hacker space.)
L.
On 5/9/2017 03:25, Jonathan M Davis via Digitalmars-d-announce wrote:
Several of us from the D community will be in Hong Kong on a business trip
next week (me, John Colvin, Atila
On 22/5/2016 05:51, Stefan Koch wrote:
On Saturday, 21 May 2016 at 21:12:15 UTC, Walter Bright wrote:
The current one is effective, but slow:
https://github.com/dlang/dmd/blob/master/src/backend/compress.c
Anyone want to make a stab at making it faster? Changing the format is
fair game, as
On 13/5/2016 20:44, Nick Treleaven wrote:
On Thursday, 12 May 2016 at 02:51:33 UTC, Lionello Lunesu wrote:
I'm trying to think of a case where changing a single value into a
tuple with 2 (or more) values would silently change the behavior, but
I can't think of any. Seems to me it would always
On 12/5/2016 16:38, Kagamin wrote:
For HTTP you can't use anything but escape sequences. AFAIK, they apply
only to protocol headers, the content can be anything.
Not just HTTP, MIME multipart/mixed content also requires CRLF, as does
application/http content.
On 11/5/2016 21:13, deadalnix wrote:
On Wednesday, 11 May 2016 at 10:50:47 UTC, Lionello Lunesu wrote:
On 10/5/2016 22:16, deadalnix wrote:
On Tuesday, 10 May 2016 at 10:09:40 UTC, Andrei Alexandrescu wrote:
On 5/10/16 12:52 PM, Mathias Lang wrote:
So, following DConf2016, I raised a P.R. to
Writing a lot of server side D code lately, and bummed the usual `string
literals` (or r"string literals") will only use '\n' as the End of line
character, while HTTP (and others too) use CRLF for EOL.
One way is to create a CTFE function that replaces all \n with \r\n, and
call this on all
On 10/5/2016 22:16, deadalnix wrote:
On Tuesday, 10 May 2016 at 10:09:40 UTC, Andrei Alexandrescu wrote:
On 5/10/16 12:52 PM, Mathias Lang wrote:
So, following DConf2016, I raised a P.R. to deprecate usage of the comma
expressions, except within `for` loops increment [5].
The agreed-upon
On 10/5/2016 14:39, Jacob Carlborg wrote:
On 2016-05-10 06:49, Lionello Lunesu wrote:
Well, it's either wrong phobos or wrong dmd. I assumed phobos was
mismatched, but perhaps DMD was mismatched? Installing with brew suggest
it's installing 2.071.0, but DMD appears to be 2.070:
The issue
On 10/5/2016 16:24, John Colvin wrote:
On Tuesday, 10 May 2016 at 04:49:33 UTC, Lionello Lunesu wrote:
Well, it's either wrong phobos or wrong dmd. I assumed phobos was
mismatched, but perhaps DMD was mismatched? Installing with brew
suggest it's installing 2.071.0, but DMD appears to be 2.070:
On 9/5/2016 20:19, John Colvin wrote:
On Monday, 9 May 2016 at 07:57:33 UTC, Lionello Lunesu wrote:
On 8/5/2016 14:43, Steven Schveighoffer wrote:
[...]
I ran into this as well. It's a bug in the package from brew: it
shipped with the wrong phobos. You can build your own DMD:
$ make -f
On 9/5/2016 12:01, Jon D wrote:
On Monday, 9 May 2016 at 00:15:03 UTC, Peter Häggman wrote:
On Sunday, 8 May 2016 at 23:38:31 UTC, Jon D wrote:
I did a performance study on speeding up case conversion in
std.uni.asLowerCase. Specifics for asLowerCase have been added to
issue
On 8/5/2016 14:43, Steven Schveighoffer wrote:
I went to create a PR, and did a git pull on all my repositories. After
make clean on OSX, dmd would not build:
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src -f posix.mak
no cpu specified, assuming X86
CC=c++ dmd idgen.d
Undefined
I just saw Shachar's lightning talk and wanted to point them to this
feature that I had done for enhancing Value Range Propagation.
By adding "const" to the index variable, the compiler will actually
enforce the value-range for a foreach iterator. But, this still requires
the range to known,
On 6/5/2016 22:13, Andrei Alexandrescu wrote:
The atmosphere here is great, and I'm curious how it feels for those who
are watching remotely. Is the experience good? What can we do better?
Also: we're talking about the DConf 2017 location. Please share any
initial thoughts!
Thanks,
Andrei
On 6/5/2016 20:17, qznc wrote:
On Friday, 6 May 2016 at 09:21:43 UTC, Andrei Alexandrescu wrote:
On 5/6/16 10:32 AM, Robert burner Schadek wrote:
As discussed yesterday at DConf, curl in phobos must go.
The plan is as follows.
1. undocument everything curl related in may 2016
2. deprecate
I'm finishing up a big project and can't leave this week. :( Hope to
tune in remotely though!
Let me know if you're interested or know somebody who is. Or bring that
skeptical colleague of yours!
Lio.
On 17/11/15 07:52, Nick_B wrote:
On Sunday, 15 November 2015 at 04:19:21 UTC, Lionello Lunesu wrote:
On 09/11/15 04:38, Richard Davies wrote:
Yeah, I got curious too. I spend some time on it yesterday and had a
stab at writing it in D.
Hi. I send a email to John Gustafson yesterday, re this
On 16/11/15 22:45, Andrei Alexandrescu wrote:
On 11/16/2015 08:51 AM, Marc Schütz wrote:
On Monday, 16 November 2015 at 02:26:29 UTC, Andrei Alexandrescu wrote:
Yah, I agree with that argument. Probably @mutable is a more
principled way to go about things.
Glad to here that. I think the
On 16/11/15 18:05, deadalnix wrote:
https://issues.dlang.org/show_bug.cgi?id=15305
Any taker ? I don't think this is that hard to fix, and this is really bad.
https://github.com/D-Programming-Language/phobos/pull/3815
On 09/11/15 04:38, Richard Davies wrote:
On Friday, 18 September 2015 at 03:19:26 UTC, Nick B wrote:
On Thursday, 17 September 2015 at 23:53:30 UTC, Anthony Di Franco wrote:
I read the whole book and did not regret it at all, but I was already
looking for good interval arithmetic
Sorry for the short notice, but I'll be giving an introduction to D at
this month's Codeaholics meetup. Drop by if you happen to be in Hong Kong!
More info here (no need for RSVP):
http://www.meetup.com/Codeaholics/events/226177740/
7pm - 9pm
CoCoon
3/F, Citicorp Centre, 18 Whitfield Road,
On 11/11/15 23:34, Walter Bright wrote:
On 11/11/2015 3:03 AM, Lionello Lunesu wrote:
Will share how it's received in an hour ;)
This is great! How did it go?
Actually went much better than expected! Very engaging crowd, with good
questions. I think the way I positioned D was being "just
On 11/11/15 18:30, Ali Çehreli wrote:
On 11/11/2015 01:19 AM, Lionello Lunesu wrote:
an introduction to D at this month's Codeaholics meetup
Can you share your slides please... within the next 12 hours or so...
before some of us give a similar talk... :)
Ali
Sure thing:
On 04/11/15 17: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:
On 02/10/15 19:25, Andrei Alexandrescu wrote:
Walter and I will travel to Brasov, Romania to hold an evening-long
event on the D language. There's been strong interest in the event with
over 300 registrants so far.
http://curiousminds.ro
Scott Meyers will guest star in a panel following the
On 26/09/15 12:50, Jeremy wrote:
http://www.codestrokes.com/2015/09/deploying-d-to-azure-webapp/
Thanks for this! Really useful!
On 24/09/15 07:10, Maor Ben Dayan wrote:
static assert(is(typeof((inout int = 0) { R r = R.init; h =
r.front; }))); /* B fails */
What is `h`?
On 16/06/15 01:12, Adam D. Ruppe wrote:
http://arsdnet.net/this-week-in-d/jun-14.html
I didn't finish Friday yet, so that will be next week, but here's all of
Thursday's stuff! Also std.database update in there, lots of community
announcements, and a bug list cleanup.
Great writeup. Reading
On 05/06/15 05:07, Yuxuan Shui wrote:
I tried something like this:
foreach(e; scoped!SomeRangeType(args)) {
}
And my program segment faults. But this works:
{
auto x = scoped!SomeRangeType(args);
foreach(e; x) {
}
}
Shouldn't the range be alive until the end of the loop?
On 26/05/15 15:25, Andrei Alexandrescu wrote:
Sad news - Martin missed his flight and found no viable alternative to
make it to DConf.
For his slot at 10:00 AM on Thursday, we'll look into teleconferencing
options for him. Alternatively, we're now taking applications from the
other speakers and
On 27/05/15 13:01, Andrei Alexandrescu wrote:
On 5/27/15 12:13 PM, Lionello Lunesu wrote:
Daniel suggested to turn it into a round of lightning talks. These are
more spontaneous and don't need preparation. Might get people to talk
that wouldn't fill a 1-hour talk.
Good. So you go first? --
On 27/05/15 13:23, Kai Nacke wrote:
On Wednesday, 27 May 2015 at 19:01:00 UTC, Andrei Alexandrescu wrote:
Thanks to John Colvin! He rigged his webcam centrally so we can
livestream DConf 2015 in passable quality to youtube. Link:
https://www.youtube.com/watch?v=-OCl-jWyT9E
It's live now (30
On 25/05/15 10:39, Andrei Alexandrescu wrote:
I'm arriving in SLC on Tue at 11:39 pm. Anyone up for sharing a ride?
I'm thinking http://www.expressshuttleutah.com/. -- Andrei
I took the Green TRAX (light rail) from airport to downtown for $2.50.
From there you can apparently take the train or
On 09/10/14 17:32, francesco cattoglio wrote:
On Thursday, 9 October 2014 at 08:50:52 UTC, Martin Nowak wrote:
Kenji just proposed a slightly controversial pull request so I want to
reach out for more people to discuss it's tradeoffs.
It's about deprecating function qualifiers on the left hand
On 11/09/14 14:32, Daniel Murphy wrote:
pragma(cpp_mangle_as_struct)
class Foo
{
}
and/or?
pragma(cpp_mangle_as_class)
struct Bar
{
}
On 10/08/14 11:33, Aldo Nunez wrote:
Greetings to all Mago Debugger, Visual D, and interested D users.
After 5 years, I can no longer continue development of Mago Debugger.
The project requires too much attention for me to keep working on it
while keeping my family happy.
I learned a ton, and
On 13/07/14 22:11, yamadapc wrote:
Hello all :)
I've made a simple port of ruby's colorize library for D.
I'd greatly appreciate any feedback. Windows isn't supported,
yet.
Links:
http://code.dlang.org/packages/colorize
https://github.com/yamadapc/d-colorize
On 16/07/14 08:49, ketmar via Digitalmars-d-announce wrote:
On Wed, 16 Jul 2014 06:39:56 +
uri via Digitalmars-d-announce digitalmars-d-announce@puremagic.com
wrote:
You spent the effort implementing a fix, the time talking about
your fix but cannot be buggered submitting a PR for the fix?
On 16/07/14 00:40, Andrew Edwards wrote:
Binaries are located here:
...
None of these links appear to work for me. (And this time I can't blame
the Chinese firewall.)
L.
On 16/07/14 14:34, ketmar via Digitalmars-d-announce wrote:
standalone module copypasted in comments. my fault, i'm really sorry.
It's fine, I can create the PR for you, but I haven't ventured into the
backend before, so your fix would be appreciated. You'll get the credit
as well, of
On 03/07/14 02:08, 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:
On 30/06/14 15:27, bearophile wrote:
Lionello Lunesu:
I've closed the valueRange PR because I now think it's not a good
idea, since the values it returns are not stable and any code using it
can break in the future as VRP gets smarter. The obvious cases
(valueRange of ubyte returning 0 and 255
Latest [1] now also supports CTFE:
const i = foo ? -1 : 33;
if (i)
static assert(__traits(intrange, i) == Tuple!(-1, 33));
else
{
static assert(i == 0); // Works now!
static assert(__traits(intrange, i) == Tuple!(0, 0));
}
if (i == 33)
{
On 26/06/14 18:38, bearophile wrote:
https://github.com/D-Programming-Language/dmd/pull/3679
This introduces __traits(valueRange, expr), and I think it introduces
range values to the ?: expressions too.
The __traits(valueRange, expr) is meant to be useful for debugging
On 23/06/14 04:51, Nordlöw wrote:
That will only work now if you use an else.
So you mean something like
if(xbyte.min || xbyte.max)
throw new InvalidArgumentException(...
else {}
?
That seems like a strange restriction. Why is that?
I meant, else return x;
Because
On 20/06/14 11:00, Jerry wrote:
Hi folks,
I'm unable to debug binaries built with dmd 2.065. The platform is
x86-64 Ubuntu 14.04. This is gdb 7.7.
If I have a simple program:
nodebug.d:
void main() {
int i;
i = 3;
}
dmd -g nodebug.d
jlquinn@wyvern:~/d$ gdb nodebug
GNU gdb (Ubuntu
On 20/06/14 15:53, Don wrote:
On Wednesday, 18 June 2014 at 06:40:21 UTC, Lionello Lunesu wrote:
Hi,
https://github.com/lionello/dmd/compare/if-else-range
There, I've also added a __traits(intrange, expression) which
returns a tuple with the min and max for the given expression.
Destroy?
On 19/06/14 15:59, Timon Gehr wrote:
On 06/18/2014 09:54 PM, Meta wrote:
...
This could be a bad thing. It makes it pretty enticing to use contracts
as input verification instead of logic verification.
The following is doable as well with a standard range analysis:
byte foo(immutable int
Hi,
I got this thing working and I think it's about time I get some comments
on it.
I've been wanting to extend Value Rang Propagation (VRE) for some time
now. Mostly because of the fix to the troublesome signed-unsigned
comparisons issue. Enabling VRE for if-else and will fix many of
the
On 18/06/14 15:53, bearophile wrote:
I've also added a __traits(intrange, expression) which returns a
tuple with the min and max for the given expression.
I'd like a name like integral_range, and perhaps it's better for it to
return a T[2] (fixed size array) instead of a tuple.
Most other
On 18/06/14 20:46, Nordlöw wrote:
Very cool. With your new trait I can simplify and, in turn, reduce
compilation time for usages of
Actually, if I'm not mistaken, with this trait, we can inhibit range
value range checking in run-time when and get all the benefits Ada range
types currently
On 18/06/14 23:42, Etienne wrote:
I find myself often repeating this boilerplate:
if (obj.member !is null)
{
if (obj.member.nested !is null)
{
if (obj.member.nested.val !is null)
{
writeln(obj.member.nested.val);
}
}
}
I have to admit it's
On 18/06/14 16:28, bearophile wrote:
Lionello Lunesu:
ubyte foo(immutable int x)
in {
assert(x = 0 x = ubyte.max);
} body {
return x;
}
Yeah, I wanted to support assert as well, but it doesn't create a
scope so it'll be a bit trickier to implement.
If you have an assert in a
On 18/06/14 16:42, Sönke Ludwig wrote:
Or even better, valueRange, to be consistent with the general naming
convention.
That's what I ended up calling it.
On 19/06/14 00:17, Etienne wrote:
I want non-null in the type system! To put a nullable reference into a
non-null variable you need to check first, but from then on the compiler
can ensure it's never null!
That would be great but useless for my situation involving some complex
AST's
class
On 18/05/14 08:46, Dragos Carp wrote:
On Tuesday, 6 May 2014 at 02:20:46 UTC, Lionello Lunesu wrote:
Hi all,
After last year's incident with my tires getting slashed, I'm really
hoping I can do without a car during this year's DConf. How feasible
is this?
I'll be staying at Aloft. Would be
On 20/05/14 09:27, Iain Buclaw via Digitalmars-d wrote:
FYI I was stuck at border control for 2 hours - incase anyone else is an
alien.
I just passed customs in Chicago. Never entered the US so easily.
Interestingly, it was much easier this time (leisure) than when I used
to fly to US for
On 18/05/14 08:46, Dragos Carp wrote:
On Tuesday, 6 May 2014 at 02:20:46 UTC, Lionello Lunesu wrote:
Hi all,
After last year's incident with my tires getting slashed, I'm really
hoping I can do without a car during this year's DConf. How feasible
is this?
I'll be staying at Aloft. Would be
On 07/05/14 06:11, Mike wrote:
On Tuesday, 6 May 2014 at 02:20:46 UTC, Lionello Lunesu wrote:
Hi all,
After last year's incident with my tires getting slashed, I'm really
hoping I can do without a car during this year's DConf. How feasible
is this?
I'll be staying at Aloft. Would be great if
On 19/05/14 15:37, Lionello Lunesu wrote:
Have inquired further how to recognize the shuttles at SFO.
FYI: http://www.flysfo.com/to-from/ebs/shared-ride-vans
On 20/05/14 07:21, Iain Buclaw via Digitalmars-d wrote:
On 19 May 2014 23:07, Lionello Lunesu via Digitalmars-d
digitalmars-d@puremagic.com mailto:digitalmars-d@puremagic.com wrote:
On 19/05/14 15:37, Lionello Lunesu wrote:
Have inquired further how to recognize the shuttles
Hi all,
After last year's incident with my tires getting slashed, I'm really
hoping I can do without a car during this year's DConf. How feasible is
this?
I'll be staying at Aloft. Would be great if there's someone I can share
a ride with. I've also seen there's a public bus going more or
64 matches
Mail list logo