Re: https everywhere update - dlang.org gets an "A" now!

2015-12-07 Thread Chris Wright via Digitalmars-d-announce
On Mon, 07 Dec 2015 14:48:52 +, Kapps wrote:
> On Monday, 7 December 2015 at 14:38:39 UTC, Steven Schveighoffer wrote:
>> I'm surprised it wouldn't. I wouldn't think a redirect would need to be
>> encrypted.
>>
>> -Steve
> 
> It does. Otherwise you could bypass HTTPS entirely by replacing the
> redirect page with a non-encrypted copy of the dlang website with
> whatever modifications you like.

Well, only if you're trying to protect against MITM attacks. If you're 
only worried about people packet sniffing, you can redirect from an 
unencrypted page without a care.

In a situation like this, where approximately no sensitive information is 
going back and forth, MITM isn't much of a concern (and packet sniffing 
isn't, either, for the most part, except if you're logging in with a 
password you reuse elsewhere).


Re: Release D 2.069.0

2015-12-08 Thread Chris Wright via Digitalmars-d-announce
On Tue, 08 Dec 2015 22:07:15 +, deadalnix wrote:

> That's fucking ridiculous.
> 
> I'm sorry, but strong word are warranted on that one. Memory consumption
> have been an issue for a while now. Never freeing and assuming
> everything will be already to win few ms out of a build is the most
> ridiculous choice dmd has done.
> 
> Especially on a 32bits build.
> 
> Will this problem be taken seriously at some point ?

At the time of the C++ to D cutover, DMD did some GC-unsafe things. In 
the interests of expediency, since the compiler isn't a long-running 
process, they chose to disable the GC in the interim.

While at least some of these GC-unsafe behaviors have been excised, there 
is lingering concern that some might remain, so nobody has re-enabled the 
GC. This has been somewhat on the backburner; Windows has typically been 
of secondary concern to D devs, and Linux has 64-bit builds, so address 
space exhaustion hasn't been as problematic there.

Anyway, this is something that's intended to be fixed, and regular 64-bit 
Windows builds are something that should happen. It just requires the dev 
team to have better access to Windows.


Re: DlangIDE update

2015-12-08 Thread Chris Wright via Digitalmars-d-announce
Awesome!

Is there any chance of bundling DCD? It would be a lot more convenient if 
I didn't even have to think about getting another completion program and 
running it on my project.


Re: Moving forward with work on the D language and foundation

2015-12-08 Thread Chris Wright via Digitalmars-d-announce
On Wed, 09 Dec 2015 05:40:47 +, Tony wrote:

> On Friday, 28 August 2015 at 13:08:36 UTC, Chris wrote:
>> On Friday, 28 August 2015 at 12:28:43 UTC, Russel Winder wrote:
>>> On Thu, 2015-08-27 at 16:01 +, BBasile via Digitalmars-d-announce
>>> wrote:
 […]
 
 That's courageous, particularly past 50 yo. It's a different culture,
 past 50 yo in Europe people choose security, but in USA, past 50 yo
 some people still take the risk to try something new. Awesome.
>>>
>>> I say "bollocks" to your accusation that Europeans post 50 are a bunch
>>> of useless idiots.
>>>
>>> I call double "bollocks" on the claim that only in the USA do people
>>> do anything.
>>
>> I agree (I think it's the first time I agree with you!). Age is a state
>> of mind. I've seen people in their 20ies who only think about a pension
>> plan and watch TV every evening until they fall asleep.
> 
> But in general, people slow down mentally as they age. Most US companies
> - and Mark Zuckerberg of Facebook is leading the charge with his FWD.us
> lobby group  - would prefer the government give them the capability to
> hire an unlimited amount of 25 year old foreign programmers instead of
> them having to hire 50 year old American programmers.

25-year-old people are more likely to work unpaid overtime. They 
generally get lower salaries. They're less likely to have families, which 
means lower health insurance costs. They're less likely to think about 
retirement, which means companies can advertise 401k matching as a 
competitive benefit without having to pay as much.

The assertion that people slow down mentally as they age is pretty vague. 
While senescence does have mental effects, that wouldn't be hitting 
significantly at the age of 50 unless you have early onset Alzheimer's or 
the like. If there are some other effects impacting productivity, there 
are benefits to an extra 25 years of experience.


Re: Moving forward with work on the D language and foundation

2015-12-09 Thread Chris Wright via Digitalmars-d-announce
On Wed, 09 Dec 2015 07:12:06 +, Tony wrote:

> If we were to list the mathematical and scientific discoveries of the
> past - like calculus and theory of relativity, etc. - how many would
> have been done by someone at the age of 50 or older? How many milestones
> in computing history were achieved by someone 50 or older? How many were
> done by someone over 40? And I think most of the aging process isn't
> even quality (what would most impact notable discovery) - it's quantity
> (that is, slower clock cycle). And companies probably have more concerns
> about quantity of thought than quality.

Cole 1976 showed that there was scant difference in productivity for 
natural scientists at the age of 30 and at the age of 50 (measured in 
terms of the rate of citations of published papers). It looks like the 
younger ones produced more work and the older ones produced better work.

Specifically for mathematics, Stern 1978 observes that the number of 
papers produced peaks before the age of 40, but citations per paper grow 
significantly, so that a mathematician at the age of 55 is likely to be 
cited as much as one at the age of 40 and significantly more than one 
below 35.

So unless aging suddenly got much scarier in the past four decades -- but 
no, you're talking about people in history, which goes back a lot more 
than four decades.

The availability heuristic is unreliable, but JPass is available for just 
$20 per month. http://www.jstor.org/stable/284859?seq=1

Of course, this does reinforce the decision to hire younger software 
engineers. The metrics are about lines of code per day or time to 
implement something with not a care about software defects, which favors 
younger developers over older ones.


Re: Logo for D

2016-01-18 Thread Chris Wright via Digitalmars-d-announce
On Mon, 18 Jan 2016 11:01:08 +, Marc Schütz wrote:

> On Saturday, 16 January 2016 at 17:55:13 UTC, karabuta wrote:
>> How do you see it?
>>
>> http://amazingws.0fees.us/wp-content/uploads/2016/01/dlang2.png
>>
>> Many variants are on the way.
> 
> This URL redirects me to that Google page:
> https://support.google.com/accounts/answer/61416
> 
> No, I'm not going to enable cookies.

I didn't see a logo either; I just saw a white background and large text 
telling me to enable javascript. Now I'm getting the impression it would 
take a solid ten minutes futzing about with RequestPolicy and NoScript to 
see the logo.

This is why I just self-host images.


Re: Vision for the first semester of 2016

2016-01-27 Thread Chris Wright via Digitalmars-d-announce
On Wed, 27 Jan 2016 21:01:47 +, Martin Nowak wrote:

> On Monday, 25 January 2016 at 16:26:36 UTC, Russel Winder wrote:
>> PyPI has is an highly opinionated metric that helps you decide what is
>> good and what is dross.
> 
> Could you help us on designing one for code.dlang.org as well?

I'd want to use the number of releases, how recent the most recent 
release was, the longevity of the project, and the number of other 
projects that depend on it. If people are willing to let dub submit 
anonymous usage information, the number of builds depending on a project 
is also an indicator of its value.

Longevity is an awkward one. If I create a project, do nothing with it 
for four years, then make a release, will that count as well as making a 
release once a month for four years? But the other metrics should account 
for that.

If possible, I'd include when the project last compiled and whether it 
passes its unittests. This requires setting up a continuous integration 
service for untrusted code. I've seen other people's designs for that, 
and I think I could replicate it without too much trouble.


Re: Better docs for D (WIP)

2016-02-01 Thread Chris Wright via Digitalmars-d-announce
On Mon, 01 Feb 2016 10:03:25 +0200, Rory McGuire via
Digitalmars-d-announce wrote:

> The problem is the D logo etc at the top of his docs mixed with Adam's
> resentment. Your email validates what I was suggesting he should avoid.

My newsreader's history doesn't support your memory of events.

The problem you cited was "insulting our official docs" and (nonexistent) 
community splits resulting from the insults. Your predicted / recommended 
response to that problem was "a cease and desist letter from the D 
Foundation".

There's no evidence that you considered trademark issues at all until I 
brought them up. If I'd cited copyright infringement instead, I'm betting 
you would have jumped on that, even though the docs are Boost-licensed.

What I would actually expect, instead of a C letter, is a set of 
guidelines for using the D logo and other trademarked material. That's 
pretty standard for open source projects. And if those guidelines forbad 
using the D logo for a documentation mirror, that would be a problem.

An airtight set of guidelines probably requires a trademark lawyer, which 
probably costs more than the D Foundation has in its coffers. We might 
see a preliminary set of guidelines coming out in the next year or so.

I don't see how a criticism of the official documentation (even one you 
believe is insulting) fragments the community. Most people around here 
think D's documentation is a problem. Adam Ruppe provided both specific 
feedback and an implemented alternative, which is much more constructive 
than average. He's got a pull request for content changes that he's made, 
too, which is the opposite of fragmentation.


Re: Vision for the first semester of 2016

2016-02-02 Thread Chris Wright via Digitalmars-d-announce
On Fri, 29 Jan 2016 16:07:48 +, Adam D. Ruppe wrote:

> I'd love it if you could do `import thirdparty.independent;` and it
> magically works too - without even need for a configuration file or an
> install command. And the docs are right there and tutorials are written
> however the author feels like writing them.

That's how Go does it. It's not the case that Go doing things one way 
means that you should do the opposite, but it is an indication that you 
should look for other examples before following suit.

In the case of dependencies, they should always be versioned. The 
language and standard library should be stable enough that you don't have 
to specify a version you  depend on -- though that isn't always true. So 
are you going to include a version specifier in import statements now? 
That would be awkward.


Re: Vision for the first semester of 2016

2016-02-03 Thread Chris Wright via Digitalmars-d-announce
On Thu, 04 Feb 2016 01:23:14 +, Tofu Ninja wrote:

> Actually, nvm, wouldn't actually work because as soon as you add an
> import derelict.opengl3.gl3; it would error out because it cant find the
> file and it wouldn't print the dependencies.

You could do it with libdparse, since it doesn't do semantic analysis.


Re: Better docs for D (WIP)

2016-01-30 Thread Chris Wright via Digitalmars-d-announce
On Sat, 30 Jan 2016 20:58:44 +, Adam D. Ruppe wrote:

> Just want to update y'all that my better docs continue to improve with
> each passing week.
> 
> I just did a style facelift on the members section:
> 
> http://dpldocs.info/experimental-docs/std.algorithm.setops.html

Oh god, that's lovely. It works even with outrageously strict security 
policies in the browser.

You probably know about this, but some of the source code formatting is a 
little off (and allowing javascript / cross-site requests doesn't help). 
Example:
http://ikeran.org/images/std.range.enumerate.png

The initial part is more readable than the original source code, but the 
in contract is  a bit messy.

Even with that, this is a lot easier and more approachable than the 
dlang.org docs. Thanks!


Re: Ddb needs a maintainer

2016-02-14 Thread Chris Wright via Digitalmars-d-announce
On Sun, 14 Feb 2016 12:48:49 +0100, Jacob Carlborg wrote:

> On 2016-02-14 00:32, Dicebot wrote:
> 
>> Ideally ddb should be built on top of ddbc wrapping it into
>> fiber-friendly async API but I don't know if this is possible with ddbc
>> design.
> 
> It looks like libpg has support for asynchronous calls [1] but ddbc does
> not use them. Also, although libpg provides asynchronous calls I'm not
> sure if that automatically means it will be compatible with the IO model
> used by vibe.

If you have asynchronous calls that you can poll, you can make it work 
with vibe.d, albeit awkwardly. (Start request, poll+yield, return when 
there's a result.) If you only have synchronous calls, you'd have to 
introduce IO threads and synchronization.

It's awkward to make things compatible with vibe.d and Phobos IO. The APIs 
are rather dissimilar, so you can't just, for instance, have different 
imports under a version() block.


Re: Vision for the first semester of 2016

2016-01-24 Thread Chris Wright via Digitalmars-d-announce
On Sun, 24 Jan 2016 21:37:40 -0500, Andrei Alexandrescu wrote:

> Hot off the press! http://wiki.dlang.org/Vision/2016H1 -- Andrei

I'm not fond of the militaristic terminology for participants. Novice, 
adept, master, maybe?

The section on safety is pretty short. I'd like to see in it:
* Guidelines for what should be made @trusted in Phobos (should we trust 
Win/Posix API functions? should we only trust wrappers that take D arrays 
rather than pointers? can we, for instance, create a @trusted wrapper 
around curl?)
* Efficiency / safety tradeoff guidelines (should Phobos provide a 
slightly faster implementations of things that aren't @safe? In those 
cases, should it provide both @safe and fast alternatives?)
* @safe / @trusted IO as a goal

As is, there are a smattering of things in Phobos that aren't @safe but 
seem like they could or should be, with no explanation and no safe 
alternatives. I think almost all IO is @system. This makes it hard and 
sometimes confusing to try to write @safe code.


Re: Qt's MOC getting replicated in D for Calypso

2016-02-21 Thread Chris Wright via Digitalmars-d-announce
On Sun, 21 Feb 2016 09:21:51 -0800, Brad Roberts via
Digitalmars-d-announce wrote:

> Making it an application that is part of the build
> rather than a plug in to ldc would make it available to both dmd and gdc
> users, no?

And it would sidestep issues where I run dstep on one platform and try to 
use the results on another, but some #defines are incorrect for the 
second platform.

Of course, that's true for any build-time conversion scheme. Running dstep 
as part of a build would be equivalent.

In terms of practicality, I'd sooner turn to CastXML. It's easier to 
inspect than clang AST.


Re: New Article: My Experience Porting Python Dateutil's Date Parser to D

2016-03-10 Thread Chris Wright via Digitalmars-d-announce
On Thu, 10 Mar 2016 08:22:58 +, Ola Fosheim Grøstad wrote:

> On Thursday, 10 March 2016 at 00:29:46 UTC, Jack Stouffer wrote:
>>> It's a pretty straight forward standard iterator design and quite
>>> different from the table pointers C++ uses.
>>
>> I explain my grievances in the article.
> 
> They didn't make all that much sense to me, so I wondered what Theo's
> issues were. As in: real issues that have empirical significance.

It's a little easier to write iterators in the Python style: you don't 
have to cache the current value, and you don't have to have a separate 
check for end-of-iteration. It's a little easier to use them in the D 
style: you get more flexibility, can check for emptiness without popping 
an item, and can grab the first item several times.

You can convert one to the other, so there's no theoretical difference in 
what you can accomplish with them. It's mainly annoying. A small 
efficiency concern, because throwing exceptions is a little slow.

The largest practical difference comes when multiple functions are 
interested in viewing the first item in the same range. LL(1) parsers 
need to do this.

Of course, that's just looking at input ranges versus iterators. If you 
look at other types of ranges, there's a lot there that Python is missing.


Re: Argon: an alternative parser for command-line arguments

2016-03-02 Thread Chris Wright via Digitalmars-d-announce
On Wed, 02 Mar 2016 19:50:30 +, Markus Laker wrote:

> https://github.com/markuslaker/Argon
> 
> Let me know if you do something interesting with it.
> 
> Markus

You might want to take a minute to shill it here. What's great about it? 
How do I use it? Why should I use it instead of std.getopt?

This is redundant, but it means I can get an idea of your project without 
having to click the link.


Re: DIP1001: Exception Handling Extensions

2016-07-11 Thread Chris Wright via Digitalmars-d-announce
On Sun, 10 Jul 2016 21:55:04 +, Superstar64 wrote:
> You could use both c style and d stack unwinding:

I misread that. The tagged union part applies even if the function can 
throw some types that don't participate in the compile-time error system.


Re: Vision document for H2 2016

2016-07-09 Thread Chris Wright via Digitalmars-d-announce
On Sat, 09 Jul 2016 19:17:31 +, Eugene wrote:

> On Thursday, 7 July 2016 at 19:55:51 UTC, Andrei Alexandrescu wrote:
>> https://wiki.dlang.org/Vision/2016H2 -- Andrei
> 
> is it possible to make a modular D language(and a compiler), so one just
> could release new features of the language without releasing a new
> version of a compiler(ldc, etc.), and these features would be just
> extensions of the compilers?

That would be kind of terrible by default.

What ensures that two different modules are compatible? Nothing, by 
default. What happens if you try including two incompatible compiler 
modules in one project? Presumably an error. What if I try to depend on 
two libraries that have incompatible compiler modules? I can't.

So it's a lot of work and would just fragment the language.


Re: DIP1001: Exception Handling Extensions

2016-07-10 Thread Chris Wright via Digitalmars-d-announce
On Sun, 10 Jul 2016 19:55:37 +, Superstar64 wrote:

> link: https://github.com/dlang/DIPs/pull/9 file:
> https://github.com/Superstar64/DIPs/blob/exception_extensions/DIPs/
DIP1001.md

So if my function calls any runtime functions -- it allocates memory, 
slices an array, etc -- I can't use C-style exception handling. Unless I 
manually do something like:

struct ThrowableWrapper {
  Throwable error;
}
int[] foo(int i) {
  try {
return [i];
  } catch (Throwable t) {
throw ThrowableWrapper(t);
  }
}


Re: From the D Blog: Martin Nowak on the DMD release process

2016-08-15 Thread Chris Wright via Digitalmars-d-announce
On Mon, 15 Aug 2016 06:55:18 +, Suliman wrote:

> On Friday, 29 July 2016 at 12:09:46 UTC, Mike Parker wrote:
>> It was time for another Core Team Update on the D Blog. This time
>> around, Martin Nowak shares how he got involved with the DMD release
>> process and where you can learn more about it. The post is at [1] and
>> the reddit thread at [2].
>>
>> Now that Vladimir and Martin have gotten their updates out of the way,
>> I foresee some prodding, cajoling and arm twisting in my future for the
>> next couple :)
>>
>> [1]
>> https://dlang.org/blog/2016/07/29/core-team-update-martin-nowak/
>> [2]
>> https://www.reddit.com/r/programming/comments/4v68ty/
from_the_d_blog_martin_nowak_on_the_dmd_release/
> 
> I do not know with whom I should contact, but this release
> https://github.com/ljubobratovicrelja/dcv should be mention in D blog.

Again, it would be very helpful if you included *anything* describing 
what this is.

DCV is a computer vision library. It appears to currently support object 
tracking in video, feature detection, and using multiple views of an 
object to reconstruct an object's geometry.


Re: DIP1000: Scoped Pointers

2016-08-16 Thread Chris Wright via Digitalmars-d-announce
On Tue, 16 Aug 2016 18:55:40 +, Dicebot wrote:
> You need to add one more level of indirection for things to start going
> complicated.

Presumably scope is transitive, so things shouldn't get horribly complex.


Re: DIP1000: Scoped Pointers

2016-08-17 Thread Chris Wright via Digitalmars-d-announce
On Wed, 17 Aug 2016 13:53:37 +0300, Dicebot wrote:

> On 08/17/2016 04:01 AM, Chris Wright wrote:
>> On Tue, 16 Aug 2016 18:55:40 +, Dicebot wrote:
>>> You need to add one more level of indirection for things to start
>>> going complicated.
>> 
>> Presumably scope is transitive, so things shouldn't get horribly
>> complex.
> 
> It is not transitive and it is not a type qualifier.

Non-scope is transitive, rather -- you can't have a non-scope pointer to 
a scope item (at least in @safe code).


Re: unDE 0.2.0 - unusual command line and keybar

2017-02-03 Thread Chris Wright via Digitalmars-d-announce
On Fri, 03 Feb 2017 14:18:05 +, Basile B. wrote:
> Also before that there's two FileException thrown because you use
> mkdir() systematically with a silent try catch. You should rather test
> if the the directories exist (when you create ~/.unde/  and
> ~/.unde/bdb/, global_state.d) because it tends to be annoying when
> trying to get that stack trace for the real exception !

I think `mkdirRecurse` doesn't complain about directories that already 
exist.


Re: mysql-native: preview2

2017-02-02 Thread Chris Wright via Digitalmars-d-announce
On Thu, 02 Feb 2017 06:50:34 +, Suliman wrote:

> On Thursday, 2 February 2017 at 05:28:10 UTC, Nick Sabalausky wrote:
>> Made a couple more long-needed changes while I'm at it:
>>
>> https://github.com/Abscissa/mysql-native-experimental Tag:
>> v0.2.0-preview2
>>
>> - For better clarity, renamed `mysql.db.MysqlDB` to
>> `mysql.pool.MySqlPool`.
>>
>> - Package mysql.connection no longer acts as a package.d,
>> publicly importing other modules. To import all of mysql-native, use
>> `import mysql;`
> 
> Thanks! Could you explain about pool. I googled about it, and still
> can't understand when it up new connections?

A database connection is just a socket.

Problem 1: database connections are expensive to set up. (Network 
connections in general are expensive -- in my testing, an AWS EC2 t2.micro 
instance can handle ~80 connections per second. I was primarily testing 
RPC / REST API systems, which is a fair bit more than 'open a socket, send 
a byte, receive a byte, close the socket'.)

Problem 2: database connections only offer one stream of data each 
direction.

Problem 3: my application needs to handle a bunch of requests that might 
occur at the same time, each of which talks to the database.

Solution: we'll have an object that manages a set of connections. It can 
reuse a connection, and it guarantees a connection is not reused when a 
previous user is still using it. It might automatically close a connection 
after enough time without that connection being used. It will 
automatically open a new connection when it has no free connections to 
hand out.


Re: Testing in the D Standard Library

2017-01-22 Thread Chris Wright via Digitalmars-d-announce
On Sun, 22 Jan 2017 20:18:11 +, Mark wrote:
> Have you considered adding randomized tests to Phobos?

Randomized testing is an interesting strategy to use alongside 
deterministic testing. It produces more coverage over time. However, any 
given test run only has a fraction of the coverage that you see over a 
large number of runs.

In other words, if the randomized tests catch something, you don't know 
who dun it. This is generally considered a bad thing.

Phobos does have some tests that use a PRNG. They all use a fixed seed. 
This is a shortcut to coming up with arbitrary test data; it's not a way 
to increase overall coverage.

I think the right way to do it is to have a nightly randomized test build, 
but since I'm not willing to do the work, I don't have much say.


Re: Iup4D 1.0 alpha

2017-01-22 Thread Chris Wright via Digitalmars-d-announce
On Sun, 22 Jan 2017 13:17:16 +0100, Robert M. Münch wrote:
> Christ, thanks for your consequent "pushing" to get short descriptions
> as the first part in.

It is my honor as your Lord and Savior.


Re: Pixel Perfect Engine (formerly known as VDP-Engine) version 0.9.1-rc1 released

2017-01-20 Thread Chris Wright via Digitalmars-d-announce
This would have been the perfect place for you to describe what this 
project is about.

Pixel Perfect Engine is a 2d graphics system based on SDL and FreeImage. 
It appears to be tile-based and incorporate a map editor.


Re: Iup4D 1.0 alpha

2017-01-20 Thread Chris Wright via Digitalmars-d-announce
This would have been a great place to say exactly what Iup4D is.

IUP is a cross-platform UI layer, which, much like wxWidgets, wraps 
native UI libraries. It supports drawing with Motif, GTK+, and Windows 
native widgets.


Re: Questionnaire

2017-02-08 Thread Chris Wright via Digitalmars-d-announce
On Wed, 08 Feb 2017 18:27:57 +, Ilya Yaroshenko wrote:
> 1. Why your company uses D?

You might have specified that this questionnaire is only for people who 
use D at work.

I use D for small utilities to help in development. For instance, I used 
vibe.d to compare performance with other frameworks when I had performance 
concerns.

> 2. Does your company uses C/C++, Java, Scala, Go, Rust?

We use Java, Kotlin, and some C/C++.

> 3. If yes, what the reasons to do not use D instead?

On the client side, we're building for Android. Some of it is native, and 
it would not be a natural fit to use D (minor modifications in Android 
platform code that's written in C/C++).

We use Swagger and Thrift for service definitions. Thrift supports D; 
Swagger does not.

We use AWS. There is no AWS client library for D and it would not be cost-
effective to implement one.

If we want people to learn a new programming language for the JVM, they 
probably know Java already, and the rest of the ecosystem is identical. 
With D, the ecosystem is entirely difficult.

Java has NullPointerException, while D has a segmentation fault. It's easy 
to catch NPE and harder to handle a segmentation fault, even if you are 
just trying to log and exit.

The "die on error" trend has me worried that it will be difficult to run 
services with reasonable uptime, and the people saying that we shouldn't 
even try to log anything in the face of an error worry me even more. I 
can't run systems in production if I'm not allowed to log errors. The 
runtime doesn't even promise to make an effort to let me catch an Error.

> 2. Have you use one of the following Mir projects in production:

No.

> 4. Have you use one of the following Tamedia projects in your
> production:

I've never even heard of them before. Have they ever thought of going into 
advertising?

> 5. What D misses to be commercially successful languages?

The backing of a large organization. The example of Go shows me that a 
language can become successful despite its technical attributes with the 
backing of a large organization.


Re: Silvermirror to mirror websites

2017-01-15 Thread Chris Wright via Digitalmars-d-announce
On Sun, 15 Jan 2017 21:30:47 +, Nick B wrote:

> On Sunday, 15 January 2017 at 02:28:34 UTC, Chris Wright wrote:
>> Github: https://github.com/dhasenan/silvermirror
>>
>> Silvermirror is a tool to mirror websites -- download them locally and
>> serve copies of them.
> 
> 
> What is the version of D that Silvermirror is compiled under ?
> 
> Nick

I'm still on 2.071.1. Are you experiencing issues on another version?


Re: Silvermirror to mirror websites

2017-01-15 Thread Chris Wright via Digitalmars-d-announce
On Sun, 15 Jan 2017 09:53:16 +, Dukc wrote:

> You forgot to add a license/unlicense...

Thanks, fixed! MIT licensed, unless someone needs it under another.


Re: Beta D 2.071.2-b3

2016-09-02 Thread Chris Wright via Digitalmars-d-announce
On Fri, 02 Sep 2016 09:40:56 +, ketmar wrote:

> On Friday, 2 September 2016 at 08:57:14 UTC, Basile B. wrote:
>> On Friday, 2 September 2016 at 08:15:53 UTC, ketmar wrote:
>>> std.traits wrappers should use __traits to build *safe* things
>>> (declaring that @trusted in the end).
>>
>> This has nothing to do with memory safety.
> 
> i wonder who told you that @safe code is *only* about "memory safety".

Walter Bright, when @safe was being discussed, before it was implemented.


Re: Beta D 2.071.2-b3

2016-08-31 Thread Chris Wright via Digitalmars-d-announce
On Wed, 31 Aug 2016 08:22:31 +0200, Jacob Carlborg wrote:

> On 2016-08-31 02:04, Ali Çehreli wrote:
> 
>> P.S. While I'm on my soapbox, I've started to think private is
>> overrated anyway. A system language should allow to bypass that
>> protection. private should be a recommendation only.
> 
> I agree. Let private stop you from access symbols though the regular
> ways, but let reflection bypass.

Just like the JVM and .NET. And Python's double underscore name mangling, 
which is more to highlight that you're doing something funky. And Dart's 
mirrors. And `instance_variable_get` in Ruby.


Re: Eclipse Paho D Library (finally) started

2016-08-31 Thread Chris Wright via Digitalmars-d-announce
On Wed, 31 Aug 2016 14:14:36 +, Frank Pagliughi wrote:
> Over a year ago I had promised to put up a D
> library for MQTT, but a number of factors conspired against me in the
> intervening time.

This would be a perfect time to mention what MQTT is.


Re: code-d 0.12.0 - The user friendly release (code-d for noobs)

2016-10-05 Thread Chris Wright via Digitalmars-d-announce
On Wed, 05 Oct 2016 13:22:37 +, WebFreak001 wrote:
> Especially the fact that you can buy it makes me wanna not get it
> becuase that means the free version has some disadvantages to the paid
> version.

The disadvantage is that it puts "UNLICENSED" in the titlebar and pops up 
a request that you purchase it every now and then -- I don't recall how 
frequently, but I don't think it was more than twice a week.


Re: LDC: Speed up incremental builds with object file caching

2016-09-18 Thread Chris Wright via Digitalmars-d-announce
On Sun, 18 Sep 2016 11:25:51 -0400, Andrei Alexandrescu wrote:
> Best timed announcement: Monday at 9 AM EST (noon Pacific Time).

You mean 6am Pacific? Or has the sun reversed directions without me 
realizing it?


Re: Ocean v2.1.1 released

2016-09-22 Thread Chris Wright via Digitalmars-d-announce
What does Ocean do?


Re: Minor updates: gen-package-version v1.0.4 and sdlang-d v0.9.6

2016-08-25 Thread Chris Wright via Digitalmars-d-announce
On Tue, 23 Aug 2016 12:19:12 -0400, Nick Sabalausky wrote:
> Couple very minor updates:

Please, for the love of potatoes, tell people what the project is for!

gen-package-version creates a package version string for D projects. Add 
a hook to your dub.json and then you can show off what version your 
binary was built from and when, eg:

module awesomeness.main;
void main(string[] args) {
  import awesomeness.packageVersion, std.stdio;
  if (args[1] == "--version") {
writefln("awesomeness version %s built %s",
packageVersion, packageTimestamp);
  }
}


Re: [GSoC] std.experimental.xml is now a PR!

2016-08-24 Thread Chris Wright via Digitalmars-d-announce
On Wed, 24 Aug 2016 12:00:43 +, Suliman wrote:

> On Wednesday, 24 August 2016 at 10:26:53 UTC, Lodovico Giaretta wrote:
>> On Wednesday, 24 August 2016 at 10:22:04 UTC, Suliman wrote:
>>> Add more examples of usage please.
>>
>> Thank you very much for having a look. Did you see the examples at [1]?
>> I don't want to add other examples to that page, it would become too
>> long, but maybe I could add specific examples in the pages of the
>> various modules. What do you think?
>>
>> [1]
>> https://lodo1995.github.io/experimental.xml/std/experimental/xml.html
> 
> IMHO is much better to attend every function with short example of it's
> usage. For example:
> https://lodo1995.github.io/experimental.xml/std/experimental/xml/
parser.html
> it's hard to understand what it's doing.
> 
> Not every D-people are good programmers.

I'd rather say, not everyone using D learns best from specifications plus 
lengthy examples. Short, pithy examples work better for some. It's also 
easier to ensure that you have good coverage that way.

For my part, I best learn the essentials from *short* examples and the 
details from prose. I can learn general usage from prose, but it takes me 
a fair bit longer for non-trivial things (especially when it makes heavy 
use of templates). I can learn details from examples, but it's much 
slower.

This isn't a lack of programming skill on my part. It's just, I'm a 
human, so I'm good at pattern matching.


Re: DIP 1003: remove `body` as a keyword

2016-11-20 Thread Chris Wright via Digitalmars-d-announce
On Sun, 20 Nov 2016 14:35:16 +1300, rikki cattermole wrote:
> I was thinking maybe option 3 but not have the body first.
> 
> int func(int arg) {
>   return 8 * arg;
> } in {
>   assert(arg > 0);
> } out(int value) {
>   assert(1);
> }
> 
> Would break code but its a simple rearrangement.

Right now, the normal flow when reading a function is:

* Doc comment: What did the author think important for me to know?
* Signature: How do I call it so the compiler will accept it?
* In contract: What sort of parameters are acceptable?
* Out contract: What invariants apply to the result?
* Body: I only need to read this if the rest didn't help.

This is ordered by importance.

By hanging the contracts off the end, you're making them harder to 
notice. That's not ideal.


Re: SmartRef: The Smart Pointer In D

2017-01-14 Thread Chris Wright via Digitalmars-d-announce
On Sat, 14 Jan 2017 11:52:34 +, nbro wrote:
> Garbage collection in D is more expensive just because of the poor
> implementation, from what I've heard. If that's the case, people who
> work on it should be able to improve it over time.

I posted about this in general.

A GC for Java, Python, Ruby, etc can locate type information and GC 
metadata for an allocation in O(1) time. D's can locate type information 
and GC metadata in O(log N) time in the worst case, even with the best 
possible implementation, and its design decisions make the worst case 
incredibly common. That is one of the common operations that a GC does, 
so it has a big performance impact.

D's GC must be slower because it allows pointers to arbitrary places 
inside an allocation, and it strongly encourages this with array slicing.


Re: SmartRef: The Smart Pointer In D

2017-01-13 Thread Chris Wright via Digitalmars-d-announce
On Sat, 14 Jan 2017 02:05:11 +, nbro wrote:

> On Friday, 13 January 2017 at 16:50:37 UTC, Dsby wrote:
>> I write the ref count pointer and the scoped point in D. it just Like
>> cpp's shared_ptr , waek_ptr and unique_ptr .
>> Now, it is  Developing.
>> I will write more test before the frist release.
>> And the docs is null.
>> It on github: https://github.com/huntlabs/SmartRef
> 
> What's would be the advantages of smart pointers in D?

It's reference counting.

Reference counting is like garbage collection, but deamortized. This is 
better for real-time applications. However, it adds overhead on every 
assignment and every variable going out of scope.

In D, garbage collection is more expensive than it is in other languages, 
so the tradeoff is more attractive than it would be in other languages.


Re: Vision document for H1 2017

2017-01-12 Thread Chris Wright via Digitalmars-d-announce
On Thu, 12 Jan 2017 20:02:38 -0800, Jonathan M Davis via
Digitalmars-d-announce wrote:
> I don't see how it possibly could given how dynamic arrays work in D. It
> would have to have some sort of reference counting mechanism, which
> would likely be a nightmare with slicing

On that topic, D's arrays would play nicer with both refcounting *and* 
modern garbage collectors if they were structured as base, offset, length 
instead of start, length. You could put metadata just before the start of 
the array, including the reference count.


Re: Aedi 0.1.0 release

2017-01-03 Thread Chris Wright via Digitalmars-d-announce
On Tue, 03 Jan 2017 11:47:44 +, Alexandru Ermicioi wrote:
> Aedi release 0.1.0 is available now.

This would be the perfect place to describe what Aedi is and why people 
might be interested in it.


Re: Vision document for H1 2017

2017-01-04 Thread Chris Wright via Digitalmars-d-announce
> Templatize dmd <-> druntime API

I'm curious as to why. I'm guessing this is for things like creating 
runtime type information?


Re: Terminix Year In Review

2017-01-02 Thread Chris Wright via Digitalmars-d-announce
On Mon, 02 Jan 2017 18:23:53 +, Gerald wrote:

> On Monday, 2 January 2017 at 14:55:26 UTC, Adam D. Ruppe wrote:
>> On Monday, 2 January 2017 at 00:53:04 UTC, Gerald wrote:
>>> Terminix is a GTK 3 tiling terminal emulator that has been designed
>>> following the GNOME Human Interface Guidelines.
>>
>> So, how hard would it be for you to swap out parts of the backend? I
>> wrote a terminal emulator in scratch in D for myself and have some
>> nifty features hacked in already.
> 
> Since Terminix is a GTK 3 application, the minimum baseline is that your
> emulator would have to be a GTK 3 Widget, I have no idea what would be
> involved in creating a GTK widget in D as I've never tried it myself.

You could also rip out the logic and the system calls and so forth and 
hook them up (laboriously) to a TextView with appropriate styling. Which 
is probably nontrivial on both sides.

> looking at the VTE source code as well as the source code for other
> emulators it's a surprisingly complicated area with a lot of edge cases.

I glanced over a python-based terminal emulator the other day. It was 
intended as a simple and straightforward example, I think. It was over 
four thousand lines of code. I'm not about to try implementing my own.


Re: PostgreSQL native impl

2017-01-02 Thread Chris Wright via Digitalmars-d-announce
On Mon, 02 Jan 2017 20:29:55 +, Anton wrote:

> Today i spent about hour to write pure-D simple PostgreSQL driver for
> demonstration purposes.
> I was looking for developers interested in complete PostgreSQL driver
> (pure D)
> 
> That demo not implements auth, therefore requires trusted user
> 
> [1] https://github.com/anton-dutov/postgresql-native-d [2]
> https://www.postgresql.org/docs/9.6/static/protocol.html

Nice!

Looks like it wouldn't be much work to add prepared queries.

I notice you rolled your own uri library. Might I point you toward urld? 
It supports ipv6 hosts (probably handy) and unicode domain names (nice to 
have, probably not useful here).

http://code.dlang.org/packages/urld


Re: Reminder - DConf 2017 is May 4-6 !!

2017-01-06 Thread Chris Wright via Digitalmars-d-announce
On Fri, 06 Jan 2017 16:46:31 -0800, Walter Bright wrote:

> It's 2017 already - sharpen your pencils and start on a proposal for a
> presentation! Time is moving fast!

In Berlin, for those who forgot.


Silvermirror to mirror websites

2017-01-14 Thread Chris Wright via Digitalmars-d-announce
Github: https://github.com/dhasenan/silvermirror

Silvermirror is a tool to mirror websites -- download them locally and 
serve copies of them.

Compared to wget, which is the standard tool, its advantages are:

* Resumability
* Reduced memory usage (at least 20x in my tests)
* Consistent URL mapping
* Correctness (fewer assumptions about URL/file mapping)
* Human-readable output
* A simple builtin template engine
* An index of pages available

Future directions:

* Integrated fulltext search
* Better templates
* Better excludes