Re: [OT] Ddoc to PDF

2010-10-19 Thread David Gileadi

On 10/18/10 9:37 PM, Walter Bright wrote:

On the other hand, just for fun I wanted to see if I could read a
paperback I got from the thrift store on my ipod. I sliced the back off,
and ran it through a scanner to create an OCR'd pdf. Loading the pdf
into my ipod didn't work, as it was 25 megs and so far, the only way
I've figured out how to get pdf's to the ipod is via email.


Apple has been notorious for making it hard to load files onto their iOS 
devices.  Recently in iOS 4 they've provided for it through iTunes, but 
it's still very clunky.  For PDFs I use GoodReader which makes it 
somewhat easy to load files wirelessly and whose claim to fame is that 
it supports very large PDFs without crashing.


Re: Spec#, nullables and more

2010-11-05 Thread David Gileadi

On 11/5/10 10:36 AM, bearophile wrote:

What I have suggested in another post is not to put a online demo window in the 
D site, but to just add a *link* to ideone and codepad in the D home page, so 
people may try D online.


When I started the redesign of the D site, one of my first ideas was to 
add links for all code snippets to a copy of the code on codepad (I 
didn't know about ideone), so that people could see them in action. 
Later I decided that this might not have as much value as I thought, 
since many of the snippets depended on command-line arguments and I 
didn't see a way to provide them.


Nonetheless I still think that providing these kind of links would have 
value to newcomers wanting to learn and experiment with the language.


Re: CTAN, CPAN, RubyGem like

2010-12-13 Thread David Gileadi

On 12/13/10 12:23 PM, Jonathan M Davis wrote:

On Monday, December 13, 2010 11:02:36 Jacob Carlborg wrote:

On 2010-12-13 14:51, bioinfornatics wrote:

Hi D community,
i would like put an idea,
* it will be great add to dsource or a new website a tool like CPAN (and
other ..) for auto instaling a new project (local and distant
package/project)

 - we can use use some auto tools for build a project cmake dmake and
 other ..

* Add a new project to dsource by using a a form

thanks for reply and any enhancement


D desperately needs some kind of library/application/package manager.


LOL. That may be true, but coming from a primarily C++ and Java background where
that sort of thing doesn't really exist (as far as I know anyway), I confess
that I don't see much need for that sort of thing. I don't necessarily have any
problem with it existing, but it's fine with me if it doesn't, and I've never
quite understood the folks who belate its lack.

Honestly, package management of any kind is the kind of thing I expect my OS to
do.

- Jonathan M Davis


It certainly does exist in the Java world, and if you're working on a 
big enterprise project then chances are you'll run into it.  The Maven 
build system has repository and dependency management built in, and the 
Apache Ivy project does similar dependency management without being a 
build system.  Newer Java build systems like Gradle also have dependency 
management built in.  As Andrej says, building large existing projects 
without it is no fun whatsoever.


Re: Suggestion: New D front page

2011-01-29 Thread David Gileadi

On 1/29/11 5:56 AM, Christopher Bergqvist wrote:

Hi!

I have been putting some free time into creating a "design skeleton" for
a new http://d-programming-language.org
 front page:
http://digitalpoetry.se/D%20website/D%20overview%20design.png

My main concern is presenting newcomers with an inspiring and relevant
first impression of D. I think there is lots to gain by having a more
alive front page not based on Ddoc (the rest of the site could still be
based on it).

I have not attempted adding any visual style to the design myself since
its not one of my strengths. It should be made to fit better with the
overall theme of d-programming-language.org
 (although IMO it's currently a bit
too dark and foreboding).

I must confess to being heavily inspired by http://ooc-lang.org
 and http://cobra-language.com
.

As creating this would take a significant time investment, I suggest
that some more complex sections of the page could be released after the
initial version. I have some background in web development but have been
almost exclusively doing professional C++ games development during the
last 4 years. I would not mind putting some more work into this but am
also hopeful that some others in the D community desire to contribute.

Constructive feedback with a minimum of bikeshedding is welcome.
(Please avoid discussions about specific textual content for now, its
just placeholders).

Cheers,
Chris


I like it.  As the guy responsible for the rather "dark and foreboding" 
current look and feel of the current d-programming-language.org I'd be 
happy to work to make this fit the current look and feel as well as 
alter the look and feel to match this direction.  It is very much in 
line with ideas I've had for improving the welcome page.


I'm currently a web dev guy and wouldn't mind contributing time to help 
develop the necessary code.  Andrei or others, if you like this 
direction could you let us know what web technologies/languages your 
server supports?


Re: d-programming-language.org

2011-01-31 Thread David Gileadi

On 1/31/11 11:50 AM, Steven Schveighoffer wrote:

BTW, in perusing the site, I noticed the language reference does not
contain a navigation menu. I can only get to the lexical page, not any
other pages of the language reference.


Andrei e-mailed me about this.  It's due to some Ddoc macros that got 
lost on some pages, including the lexical page.  I'll take a look at 
fixing it soon; right now I'm a bit swamped.


Re: C# Interop

2011-01-31 Thread David Gileadi

On 1/31/11 2:25 PM, Eelco Hoogendoorn wrote:

Hi all,

At work I currently develop in C++ with a C# front-end, using CLI interop.

Ive been using D for quite a while for hobby projects, and needless to say, it
makes C++ feel like masochism. Id like to convince my coworkers that adding D
in the mix is more than just another complication.

But im not quite sure what would be the best way to do C# and D interop. CLI
will no longer do me any good I fear.

Do I just create a D DLL with a bunch of free extern(C) function for
communication? What about marshalling? Is using unsafe pointers back and forth
the best I can do? C# can read from a pointer allocated by D in unsafe mode,
and D can read from a pinned C# pointer, right?

(no, im not looking for D.NET; what I miss in C# is to-the-metal /
compilation.)


It's been a number of years and it was in D1, so take this for the 
little value it may have, but the last time I tried making a D DLL used 
by a C# client I got hangs.  I suspected it was the interaction of the 
garbage collectors but didn't have the time to debug it (it was for a 
school project).  I'd be interested to hear if someone else has gotten 
this working.


-Dave


Re: Vote for the new std.hash (oops, std.digest)

2012-08-27 Thread David Gileadi

On 8/26/12 7:14 AM, Andrei Alexandrescu wrote:

How about this - use auto for code samples, but not for documenting
function return types (except Voldemort)?


Pie-in-the-sky dream: DDOC would advance enough to show a hover hint 
over the "auto" keyword with the computed type.


Re: totally satisfied :D

2012-09-17 Thread David Gileadi

On 9/16/12 3:00 PM, "Jøn" wrote:


The best idea I had today: rename D into :D


You asked for it: a mockup.
<>

Re: totally satisfied :D

2012-09-18 Thread David Gileadi

On 9/18/12 11:10 AM, Dmitry Olshansky wrote:

On 18-Sep-12 02:39, Xinok wrote:

It's the second result on DuckDuckGo, which *doesn't* tailor it's search
results.

https://duckduckgo.com/?q=d


Nowhere to be found for me. Obviously they also do tailor the results.
(it's first time I see duckduckgo, and I followed your exact link)


It must have changed overnight--yesterday I saw it as the second result; 
today I don't see it either (except when I expand the Computing section).


Re: Tricky semantics of ranges & potentially numerous Phobos bugs

2012-10-16 Thread David Gileadi

On 10/16/12 10:28 AM, Jonathan M Davis wrote:

Any range is free to violate this, but because range-based functions are free
to rely on it, such ranges risk not working correctly with many range-based
functions and must be used with caution.


As a D dabbler, it seems wrong to me that a built-in range like byLine, 
which is often used in example code, should have weird side effects with 
the built-in methods in std.algorithm.  IMO this needs to be fixed one 
way or another, and a mere documentation change is likely not enough for 
casual D users.


Re: Javascript bytecode

2012-12-19 Thread David Gileadi

On 12/19/12 3:05 AM, eles wrote:

Consider the US space shuttle design. It's probably the most
wrong-headed engineering design ever, and it persisted because too
many billions of dollars and careers were invested into it. Nobody
could admit that it was an extremely inefficient and rather crazy design.


Hey, this is really OT, but I'm interested in. Why do you consider it is
such a bad design? Because the shuttle is intended to be reentrant and
this is costly? Some other issue?

Is about the design or about the entire idea?

Thanks for answering and I promise to not further hijack this thread.


I had the same question, and Google found me a 2003 article
http://www.spacedaily.com/news/oped-03l.html
which in the wake of Columbia is largely about safety but also about 
efficiency. Interestingly the article claims that the shuttle flaws were 
largely the result of a) the desire to carry large payloads along with 
astronauts (as Walter mentions) and b) the choice of fuel, which led to 
several other expensive and dangerous design choices.


Re: Counting passed/failed unit tests

2011-10-26 Thread David Gileadi

On 10/25/11 4:04 AM, Jacob Carlborg wrote:

On 2011-10-24 22:08, Jonathan M Davis wrote:

On Monday, October 24, 2011 11:23 Andrej Mitrovic wrote:

I'm not sure why it just stops after the first failing unittest
though. What is the point of that 'failed' counter?


It's a long standing issue that when one unit test fails within a
module, no
more within that module are run (though fortunately, a while back it
was fixed
so that other modules' unit tests will still run). As I recall, there
had to
be a change to the compiler to fix it, but I don't known/remember the
details.
Certainly, the issue still stands.

- Jonathan M Davis


A workaround is to catch AssertErrors, hook it up with some library code
and you get a minimal unit test framework:
https://github.com/jacob-carlborg/orange/blob/master/orange/test/UnitTester.d


Example of usage:

https://github.com/jacob-carlborg/orange/blob/master/tests/Object.d


As an argument for continuing to run tests after one fails, I'm taking a 
TDD class and the instructor asserted that for unit tests you should 
generally only have one or two assertions per test method.  His 
reasoning is that when something breaks you immediately know the extent 
of your breakage by counting the number of failed methods.  This 
argument is pretty convincing to me.


Re: Counting passed/failed unit tests

2011-10-26 Thread David Gileadi

On 10/26/11 3:45 PM, Jonathan M Davis wrote:

On Wednesday, October 26, 2011 21:28:10 Jacob Carlborg wrote:

On 2011-10-26 17:40, David Gileadi wrote:

On 10/25/11 4:04 AM, Jacob Carlborg wrote:

On 2011-10-24 22:08, Jonathan M Davis wrote:

On Monday, October 24, 2011 11:23 Andrej Mitrovic wrote:

I'm not sure why it just stops after the first failing unittest
though. What is the point of that 'failed' counter?


It's a long standing issue that when one unit test fails within a
module, no
more within that module are run (though fortunately, a while back it
was fixed
so that other modules' unit tests will still run). As I recall,
there
had to
be a change to the compiler to fix it, but I don't known/remember
the
details.
Certainly, the issue still stands.

- Jonathan M Davis


A workaround is to catch AssertErrors, hook it up with some library
code
and you get a minimal unit test framework:
https://github.com/jacob-carlborg/orange/blob/master/orange/test/UnitT
ester.d



Example of usage:

https://github.com/jacob-carlborg/orange/blob/master/tests/Object.d


As an argument for continuing to run tests after one fails, I'm taking a
TDD class and the instructor asserted that for unit tests you should
generally only have one or two assertions per test method. His reasoning
is that when something breaks you immediately know the extent of your
breakage by counting the number of failed methods. This argument is
pretty convincing to me.


Well, in my library, if an assert error is thrown in a block (passed to
the "it" method), the whole block is canceled and it will continue with
the next block. So it's up to the user how the asserts should be laid out.


It would be disastrous IMHO to continue to run a unittest block after an
assert failed - at least in the general case. Too often further assertions
relied on the state assured by the one that failed, so further failures just
confuse things and give you too much data to have to sift through. As it
stands with the built-in unit testing faciliities, you can put each assertion
in its own unittest block if you really want each assertion to run on its own
(though until it's fixed so that further unittest blocks within the module run
after the first failure in that module, it wouldn't do you any good).

- Jonathan M Davis


Agreed--the (rather obscure, sorry) point of my message was that having 
further unittest blocks run within the module even after one fails is a 
good idea.  Jacob's test frameworks sounds like a good effort in that 
direction, but built-in would be even better.


Re: Website message overhaul, pass 2

2011-11-22 Thread David Gileadi

On 11/20/11 11:00 PM, Brad Roberts wrote:

Second, if the 'comment on this page' link is going to continue to receive 
similar placement, there really needs to be
continuous effort to actually incorporate the comments.  Many, if not all, of 
the sites pages have comments over in the
wiki, many of which are bug reports.  It's essentially a black hole through 
which feedback disappears forever.  Should
that link be turned into a bugzilla link instead, maybe?


I had planned this when I first worked on the site redesign.  I did some 
work on implementing it via Javascript and this could work if there were 
a service on the dpl.org site that scrapes the HTML from the wiki.


Of course the larger question is whether we want user comments to appear 
on every page.  I tend to think that a bugzilla link may be more 
appropriate, with an appropriate link text change.


Re: Java > Scala -> new thread: GUI for D

2011-12-02 Thread David Gileadi

On 12/2/11 12:54 PM, Nick Sabalausky wrote:

Unfortunately, I've been using WinAmp as my primary player despite my hatred
for it because the iTunes lack of Ogg Vorbis support is a deal-breaker for
me...


Did you ever try http://xiph.org/quicktime/?  It solved the iTunes ogg 
problem for me.


Re: Proposal for custom time string formatting in std.datetime

2011-12-22 Thread David Gileadi

On 12/22/11 4:20 AM, Stewart Gordon wrote:

Looks complicated compared to mine at first sight.


++

I strongly prefer the look of Stewart's formatting strings; at a glance 
it is much easier for me to understand "mmdd`THHiisszzz" than 
"%4yplus%04+Y%02M%02D{T}%02H%02m%02s%f%tz".


Re: Proposal for custom time string formatting in std.datetime

2011-12-22 Thread David Gileadi

On 12/22/11 2:32 PM, Jacob Carlborg wrote:

Really? I have not seen that. I have Eclipse 3.7.0 installed and it
doesn't indicate and error with "import package.*;". Latest Eclipse is
3.7.1.


Mine doesn't either, but if you use Eclipe's awesome (and weakly named) 
Organize Imports feature (Ctrl+Shift+O) by default it replaces the .* 
with the specific imports.  So I think Eclipse tends to discourage .* in 
general.


It makes sense to me that it's discouraged in Java; when reading 
third-party code (on the web for instance) it can be very difficult to 
tell where a type came from if it was part of a .* import.


Re: [OT] dfeed for mobile

2011-12-22 Thread David Gileadi

On 12/22/11 3:16 PM, Jacob Carlborg wrote:

On 2011-12-22 21:24, Vladimir Panteleev wrote:

On Thursday, 22 December 2011 at 14:09:42 UTC, foobar wrote:

I was reading the NG on my phone and I just thought that it would be
very useful to have a mobile version. What do you think?


What phone do you use?

Is a browser simulator easily available?


In general the actual type of phone the simulator simulates is not
important. The most important is that it is a mobile phone simulator.
The simulator in the iOS SDK (only available on Mac OS X) is really
good. The simulator available in the Andriod SDK really sucks but it's
better than nothing.


Google found me http://www.electricplum.com/dlsim.html which (if you 
scroll down the page) has a free version available for Windows.  I 
installed it; it seems good enough to develop with.


It's based on the Adobe Air open-source project iBBDemo2, which you can 
find an Air installer for at 
http://www.softpedia.com/get/Programming/Other-Programming-Files/iBBDemo2.shtml


Re: [OT] "The Condescending UI"

2012-01-25 Thread David Gileadi

On 1/25/12 2:31 PM, Nick Sabalausky wrote:

"Steven Schveighoffer"  wrote in message
news:op.v8nbixzyeav7ka@localhost.localdomain...


I must rave about the trackpad on the macbook pro.  The interface is so
damned good, I hate going back to my linux laptop (which I must do for
work).



A good trackpad?!? That seems difficult to believe. Whenever I use a laptop,
I just grab/carry-around a trackball (or at least a mouse). I can barely use
those touchpad things, and IBM's "clitmouse" is only a little bit better.


It's the first one I've ever used that I liked.  I like it so well, I 
even got an external "Magic Trackpad" for desktop use.


Re: Review of Jose Armando Garcia Sancio's std.log

2012-03-07 Thread David Gileadi

On 3/6/12 5:39 PM, H. S. Teoh wrote:

I don't like the current state of dlang.org docs either. There is little
or no intro paragraph to explain what on earth the module is used for or
why you should bother reading the rest of the page for the next hour or
so. It also doesn't give any motivating examples (I'm thinking of
std.range here) why this module is useful.

I think a good intro is a must to good documentation. Include some code
snippets to show typical usage of the module. How to change common
settings. Some explanation of why the user might find the module
helpful. It's OK to duplicate some docs here, within reason. It should
also be concise without being uninformative.

For example (from std.range):

This module defines the notion of range (by the membership tests
isInputRange, isForwardRange, isBidirectionalRange,
isRandomAccessRange), range capability tests (such as hasLength
or hasSlicing), and a few useful range incarnations.

is concise, but not very informative. Why should the user care what a
range is anyway? No explanation is given. Something like this may be a
beginning to better documentation:

This module defines the notion of a range. Ranges generalize the
concept of arrays, lists, or anything that involves sequential
access. This abstraction enables the same set of algorithms (see
std.algorithm) to be used with a vast variety of different
concrete types. For example, a linear search algorithm such as
std.find works not just for arrays, but for linked-lists, input
files, incoming network data, etc..

This module defines several templates ()for testing whether a given object is a range, and what
kind of range it is.

It also lets you construct new ranges out of existing ranges.
For example, retro lets you access a bidirectional range in
reverse, cycle creates a range that is an endless repetition of
the original range. ...

...

Basically, you're writing an overview to the module, so highlight its
main components, give some insight into why it's useful, etc., so that
the user can make sense of the long list of declarations that follow.

As it stands, std.range's page consists of a giant list of range-related
declarations that gives no hint to the user as to how they all fit
together. You basically have to wade through it until it somehow all
"clicks" together. That is poor documentation. The overview should give
some general categories of stuff that's found in the module (e.g. range
tests, constructing new ranges, etc., as I've tried to do above in my
one-shot attempt to improve std.range's docs). Include some examples of
really clever stuff that you can do with the help of the module. Such
examples are usually a very good way to get the user up-to-speed with
what the module has to offer.


I strongly agree, particularly in the case of ranges which are not a 
familiar concept to many, but also with the general principle.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread David Gileadi

On 3/13/12 12:28 PM, Nick Sabalausky wrote:

Another thing is Flash. Almost *everyone* uses JS to embed flash. But *it's
not needed*! I embed Flash with pure HTML and it works perfectly fine. Don't
even need any server-side code!


I thought that using JS to load Flash was to avoid Eolas lawsuits. 
http://en.wikipedia.org/wiki/Eolas, Workarounds section.


Re: Cross-references in generated ddoc

2012-04-04 Thread David Gileadi

On 4/3/12 10:38 PM, Ary Manzana wrote:

Hi all,

I just submitted a pull request that makes ddoc generate
cross-references... even for templates!

https://github.com/D-Programming-Language/dmd/pull/865

It would be awesome if you can try it with your projects, see if it's
working properly and doesn't choke. I tried it with phobos and it worked
fine.

Also, if someone has ideas about how to solve the issues I describe,
they are more than welcome.


This looks good.

One bug: for http://pancake.io/1e79d0/array.html#insert it appears to 
have dropped the name/link for which function to use instead.


Re: Mascot for D

2012-04-05 Thread David Gileadi

On 4/5/12 1:24 PM, Zbigniew Radosz wrote:

How about a (digital) martian? :)


You mean this guy?
http://www.disney.co.uk/john-carter/characters/tars-tarkas.html


Re: DIP16: Transparently substitute module with package

2012-04-06 Thread David Gileadi

On 4/6/12 10:52 AM, deadalnix wrote:

Good point. That is an argument for package.d, all.d or _.d .


Or [packagename].d, where [packagename] is the name of its sibling 
folder (std/algorithm.d in the case of std/algorithm/sort.d).


Re: custom attribute proposal (yeah, another one)

2012-04-06 Thread David Gileadi

On 4/6/12 6:23 AM, Steven Schveighoffer wrote:

6. The metadata is stored in a key-value pair, with the key being the
symbol of the @attribute function, and the value being the result of the
CTFE function.


There may be a good reason why it's not supported, but in Java I've 
often wished I could repeat an annotation with different values. 'Twould 
be fantastic if D allowed this.


Re: Documentation improvements

2012-04-09 Thread David Gileadi

On 4/8/12 7:41 AM, Jonas H. wrote:

Hi everyone,

I decided to give D a try yesterday and had quite some trouble with the
documentation. I want to help improve the docs on dlang.org.


I'm generally in favor of simplifying the sidebar navigation, since I 
already did a bunch of that under the guise of creating a new look for 
the D website :)  Compare with the sidebar at 
http://digitalmars.com/d/1.0/index.html


I think you may find some conflicts between the contents of the proposed 
Development and the existing Community sections; that probably needs 
some further thought.


As a technical note, in order to get the sidebar to expand correctly 
you'll need to change the CATEGORY_* macro on any pages that you move. 
For instance, if you were to hypothetically move a page from being under 
the Articles section to being under the FAQ section, you'd need to 
change its CATEGORY_ARTICLES=$0 macro to CATEGORY_FAQ=$0.


Re: The DUB package manager

2013-02-23 Thread David Gileadi

On 2/23/13 7:02 AM, deadalnix wrote:

On Saturday, 23 February 2013 at 11:21:06 UTC, Russel Winder wrote:

Gradle makes no pretence as being either declarative or iterative, but
embraces both. As much of a specification is as declarative as possible,
but where imperative is needed it is available as Gradle specifications
are Groovy scripts with the Gradle internal DSL.



Do you have some link I can read about this ? This sounds like a very
nice project !


I love Gradle!  Official site at http://www.gradle.org, with very good 
docs including getting started tutorials.


In practice I've found it to be concise and readable compared to 
Ant/Maven, and (almost ridiculously) easily extended when necessary. 
IMO if you're doing Java builds it's the hands-down winner.


Re: Where should I put a `condp` like function?

2013-04-16 Thread David Gileadi

On 4/15/13 11:05 AM, H. S. Teoh wrote:

Without geometry, life would be pointless. -- VS


It's this kind of joke where I draw the line :)


Re: Code example on www.d-programming-language.org?

2011-04-04 Thread David Gileadi

On 4/4/11 3:18 PM, Emil Madsen wrote:

On 5 April 2011 00:02, bearophile mailto:bearophileh...@lycos.com>> wrote:

Andrei:

 > Clearly finding a good example with such conflicting requirements
is not
 > easy and there's no need to restate that. If it were easy I would've
 > done it. What is needed is an example that successfully finds the
sweet
 > spot.

In my opinion what I have explained in my answer is not obvious
stuff, seeing how many solutions/programmers on Rosettacode fail.

My point was that in my opinion there is no such single example that
satisfies your requests, and that your requests are bad. If you put
too much stuff in a single example, the result is not what I will
call a good example for very public D code. So you have to put only
a limited amount of stuff in the example, or you have to show more
than one example.

If you want a single example, the second on Wikipedia is the one I like:
http://en.wikipedia.org/wiki/D_language#Example_2

Bye,
bearophile



Honestly I would rather meet a site that has several simple examples
illustrating the capabilities of a language, instead of a single one,
thats messy.

--
// Yours sincerely
// Emil 'Skeen' Madsen


It might be a good idea to offer a very simple code example near the top 
of the page to give the flavor of the language, together with a link to 
a page with further code examples.  That page might live somewhere under 
the Overview navigation section, and might merge with the "Example: wc" 
page.


Re: dmd2-2.052 is only for i386, while you are running amd64 (or dmd2 on FreeBSD)

2011-04-11 Thread David Gileadi

On 4/10/11 11:44 AM, Iain Buclaw wrote:

Swollen pointers are a bit of a mute point to make as an argument for 32bit.


Please forgive this post--it's my editor mother coming out it me--but 
the correct phrase is "moot point".  See 
http://en.wiktionary.org/wiki/mute_point


Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread David Gileadi

On 4/11/11 1:51 PM, "Jérôme M. Berger" wrote:

Nick Sabalausky wrote:

"Andrej Mitrovic"  wrote in message
news:mailman.3396.1302548836.4748.digitalmar...@puremagic.com...

Smart editors also allow you to unindent with a single backspace
regardless if you're using tabs or spaces.


In other words, *some* editors handle space-indentation intelligently (and
do so by reinventing *tabs*), while *all* editors handle tab-indentation
intelligently.


I have seen editors that would convert a tab to spaces and only
delete one space when hitting backspace ;)

Jerome


Eclipse, I'm looking at you!


Re: Temporarily disable all purity for debug prints

2011-04-12 Thread David Gileadi

On 4/12/11 1:12 AM, spir wrote:

On 04/12/2011 04:05 AM, Nick Sabalausky wrote:

As more and more D2 functions become pure in my code and in Phobos,
> something like a -disablepure compiler switch (and printf/writeln
inside
> debug{}) may allow more handy debugging with prints (if the purity
is well
> managed by the compiler then I think disabling the pure attributes
doesn't
> change the program output).
>

That's a very good idea. I'm a huge fan of printf-debugging (comes from
years of developing on platforms that didn't have a good
readily-available
debugger), so not being able to do that in pure functions would be a very
critical roadblock for me for using purity. In fact, it's already been a
royal PITA for CTFE.


Same for me. I'm a fan of printf debugging not because of lack of
debuggers, rather because of their "heaviness" & lack of flexibility.
Debug output is by me far more direct, quicker & lighter; and agile.

Denis


I'm not a day-to-day D programmer but it's seemed to me for a while that 
having a print/log function that would work in normal code, in pure code 
and in CTFE would be extremely useful.


Re: [Article Contest, first draft] D Slices

2011-05-18 Thread David Gileadi

On 5/18/11 11:03 AM, Steven Schveighoffer wrote:

Please, if you have any comments or recommendations, let me know.


First off, this is a fantastic article.  Thanks for clearly explaining a 
fairly subtle concept.  I'm especially happy to finally understand how 
appending to a slice can avoid reallocating and what assumeSafeAppend does.


I do have a couple of nits:

1. After the shrinkTo2 example, you say "This might look like you 
changed the passed arr's length to 2, but it actually did not affect 
anything," followed by the reason.  It took me a bit to realize why this 
was so.  I think it would be clearer if the example included the call to 
shrinkTo2, e.g.


void shrinkTo2(int[] arr)
{
if(arr.length > 2)
arr.length = 2;
}

int[] a = new int[5];
shrinkTo2(a);

And then you pointed out that a's length hasn't changed after the call. 
 Including the calling code might also be helpful for the Determinism 
example, for the same reason.


2. In the section "A Slice You Can Append On" the phrase "The slice does 
not own it's data" should remove the apostrophe from "its".  There is at 
least one other place in the document that also make this mistake, under 
the Caching section.


Again, fantastic article.

-Dave


Re: all website troubles are belong to me

2011-06-02 Thread David Gileadi

On 6/2/11 6:49 AM, Andrei Alexandrescu wrote:

On 6/2/11 8:03 AM, Andrej Mitrovic wrote:

dpl.org appears to be missing the tools section on the left, from
http://www.digitalmars.com/d/2.0/index.html . I'm not sure if it's
hidden under some section, otherwise I'll file a report. (it's not
under the downloads& tools section)


Yah, the template is missing them. I don't know whether that is
intentional.

Andrei


Being the fellow who caused that issue, it was my intention that 
clicking on Downloads & Tools would link to a page where there would be 
sub-options underneath the Downloads & Tools header, similar to the 
other "expanding" sections on the site.  However, at the time I was 
limited to changing look & feel, not content, so I didn't create such a 
page.  If I had a preference that page would contain browser-detecting 
code to offer a link to the relevant DMD download one-click installer at 
the top of the page, with other download links below.  However I don't 
know if we can offer downloads without a redirect to digitalmars.com...


-Dave


Re: Vote here for best article iPad2 contest

2011-06-03 Thread David Gileadi

[4] D Slices by Steve Schveighoffer


Re: luajit-ffi

2012-05-02 Thread David Gileadi

On 5/2/12 1:04 PM, so wrote:

Sorry everyone!
I can't restrain the urge to answer such posts.
I feel the presence of some higher powers, yes! they are trying to tell
me... something, perhaps warning me in a way? I keep hearing voices
along the lines "NNTP error: 400 loadav [innwatch:load] 2084 gt 1500".
yet i... must... click "Send"!


LOL that one made my day!  Glad you're still around :)


Re: CTFE and DI: The Crossroads of D

2012-05-10 Thread David Gileadi

On 5/10/12 11:01 AM, Adam Wilson wrote:

It does require some semantic information. And the solution I've seen
seen most talked about here is some kind of attribute similar to @pure
that tells the compiler to include the implementation in the DI file.


I may be off-base here, but this strikes me as a good case for a pragma. No?


Re: dlang.org live examples

2012-06-25 Thread David Gileadi

On 6/25/12 7:43 AM, nazriel wrote:

First, should standard input and command line arguments be constant
defined in hidden html fields, or should we allow user to pick their own?
It would allow for more freedom and experience but on other-hand it
would bloat too much website. Whats your opinion?


My opinion is that the fields should be hidden until the code is run for 
the first time, at which point at least standard input should become 
visible for altering in subsequent runs.


Re: phobos breakage... why?

2012-07-25 Thread David Gileadi

On 7/25/12 10:36 AM, dnewbie wrote:

One of my programs stopped working in 2.060. It is *really* annoying
when I see the message 'X is deprecated'.


It might be nicer if you could say:

deprecated("Use countUntil instead.") {...}


Re: DIP11: Automatic downloading of libraries

2011-06-15 Thread David Gileadi

On 6/14/11 6:53 AM, Andrei Alexandrescu wrote:

http://www.wikiservice.at/d/wiki.cgi?LanguageDevel/DIPs/DIP11

Destroy.


I keep thinking that if we build a separate dget, dmd could call it even 
if there weren't a URL embedded in the source.  If dget had a list of 
central repositories then it could simply look in them for the 
package/module and compilation would magically work with or without a 
pragma.


In any case I suspect that a more formal versioning system is needed. 
One way of supporting versions would be to make dget aware of source 
control systems like svn, mercurial and git which support tags.


The pragma could support source control URLs, and could also include an 
optional version.  dget could be aware of common source control clients, 
and could try calling them if installed, looking for the code tagged 
with the provided version.  If no version were specified then 
head/master would be used.


Re: Why I'm hesitating to switch to D

2011-06-28 Thread David Gileadi

On 6/28/11 1:37 PM, James Fisher wrote:

I *am* saying
that it needs something consistent and clean, and currently it,
seemingly willfully, has neither.  (BTW, I've done some web design work
before, e.g. http://hsk.org.uk/ -- I'd be willing to help out.)


I've done a little web design too, although it's definitely not my 
strong suit.  I quite like the look of the site you posted; you seem to 
be pretty good at it.


I felt largely the same as you about how the D language presents itself, 
which prompted me to offer to help with the site design.  The design 
that ended up at d-programming-language.org grew out of that.


I'm sure that any help and improvements you'd like to contribute would 
be welcomed.


Re: Why I'm hesitating to switch to D

2011-06-29 Thread David Gileadi

On 6/29/11 2:02 AM, James Fisher wrote:

On Tue, Jun 28, 2011 at 10:39 PM, Nick Sabalausky  wrote:

The main problem with D is that there's too many people with their lists
about what's wrong with D, and not enough willing to actually jump
in and
help out. I'm sorry if I come across a bit harsh, but we seriously get
another one of these "What's wrong with D" lists every few weeks
(and each
one seems more out-of-date than the last) and hardly any of the people
writing them have ever actually made any real contributions besides just
complaints. If you're going to help out, then fantastic, and welcome
aboard!
But if not, then please understand that we already have more volunteer
supervisors than we need, so that sort of thing gets very
frustrating for
those of us dedicating our own time and effort for free to actually
accomplish all the goals.


Well, sure I'm willing to help.  The reason I started out like this was
to gauge whether these problems were actually seen to be problems by the
community -- you get a lot of projects that are so inward-facing that
suggestions that it should be otherwise are taken as insults.

While my coding abilities aren't bad, I figure that's not what I'm best
helping with here.  Key things I'd suggest I could help with are:

* A simple D brand identity.  Nothing complex, just an official
  pronouncement that "this is our logo/logotype, this is our color
  palette, these are the one or two fonts we use, here's how we
  describe ourselves, here are some simple guidelines on how to
  build a D-branded site/document".  This could be hashed out and
  maintained in a small GH repo.
* Applying that to d-programming-language.org
  .
* Coming up with a long list of D community
  sites/wikis/tutorials/howtos/documentation/link lists.
Identifying projects that overlap domains and drumming up
  support for these to be merged into the most popular of them or
  into d-programming-language.org
  .  **I do think this is possible!**


While I'm just a volunteer, based on my experience I believe that 
contributions in these areas would be welcomed and very useful.


Re: D brand identity repository

2011-07-04 Thread David Gileadi

On 7/4/11 4:50 AM, James Fisher wrote:

A second draft: http://eegg.github.com/d-brand/mockup2.png

Changes:

Swapped out logo for more conservative change.
Reduction in size of the tabs.
Search bar.
Quick-download thing.  Would have to use OS/arch detection to be effective.
Moved code down into page.  Could expand.

And important point that's not evident is that I'm designing for
variable-width.  That image is for 1600px width, but that could shrink.

On Mon, Jul 4, 2011 at 8:42 AM, James Fisher mailto:jameshfis...@gmail.com>> wrote:

On Sun, Jul 3, 2011 at 11:13 PM, Jonathan M Davis
mailto:jmdavisp...@gmx.com>> wrote:

Overall, I'd say that I have to agree. I like the current look
and feel of d-
programming-language.org , and
I don't see anything wrong with its logo either
(and it looks _way_ better than any of the logos suggested here
IMHO). I'm
sure that the site could be improved, but the kind of stuff
being discussed in
this thread is incredibly subjective and it doesn't generally
seem like much
of an improvement. d-programming-language.org
 is generally a step up from how
www.digitalmars.com  looks, and the
website situation has been improving. So
truth be told, I don't understand this discussion at all. It
seems to me like
it's a bikeshedding argument on website and logo design. I'm
sure that help on
d-programming-language.org 
would be appreciated, but working on redesigning
the website _again_ seems to me like a waste of time which would
be better
spent elsewhere.


I'm not sure what gave the impression that the people in this thread
want to start again from scratch, but that impression seems to be
the source of some hostility.  At least in my case, that's *not*
what I'm proposing.  Pretty much everything here can be categorized
as formalizing, cleaning up, or improving work that's already been done.


I think the fact that the mockups look quite different from the current 
site is generating the heat--something that looks radically different is 
different in peoples' minds, even if it's just a new skin.


I like your mockups, the 2nd one better than the first.  As with some 
other folks, I'm in favor of keeping the existing logo, which I think 
would look good with your design--better than it does on the existing 
site, in my opinion.  I also like that you're designing for variable widths.


One concern I have is that the D site has a lot of pages, and the 
navigation can be a bit hairy.  I'd like to see a mockup of a sub-page, 
a Phobos or Language Spec page for instance, that shows what 
sub-navigation would look like with your design.


Re: Using the d-p-l.org ddoc style for 3rd party libraries?

2011-07-12 Thread David Gileadi

On 7/12/11 2:02 AM, James Fisher wrote:

On Mon, Jul 11, 2011 at 7:03 PM, Johannes Pfau mailto:s...@example.com>> wrote:

is it ok to adapt the d-p-l.org <http://d-p-l.org> library reference
style for own
projects?


Not strictly relevant, but I'm working on the d-p-l.org
<http://d-p-l.org> design, including neatening the documentation.
  There's a thread on this.

The current design is the work of David Gileadi, I am told, so
presumably he owns the copyright on the front-end design?


We never discussed this that I recall, but I hereby assign any copyright 
I might hold to Walter Bright and anyone else he designates.  Since I'm 
not a lawyer, if anything else is needed I'd be happy to provide it.  I 
may not need to do anything at all; the pages all state that the 
copyright belongs to Digital Mars.


Re: std.stdio overhaul by Steve Schveighoffer

2011-09-07 Thread David Gileadi

On 9/7/11 12:09 AM, Jacob Carlborg wrote:

Yeah, I hate that with Java interfaces, appending a number. Just because
the good proper name is already taken and they can't break existing code.


I've been happy to see less of this recently.  Maybe it's just my 
imagination, but with build systems that have package management like 
Maven and Gradle becoming more widely adopted developers seem to be more 
content to let the package manager handle the versioning.  I hope this 
becomes the case with D too.


Re: Static arrays, typeof and IFTI?

2011-10-11 Thread David Gileadi

On 10/11/11 1:46 PM, simendsjo wrote:


// It's important that a has a length of 3, so I specify it
int[3] a = [1, 2]
Error: Not enough values for a. Expected 3, got 2

// I don't care what length a has as long as it has a static length
int[$] a = [1, 2];


It would be nice if this were coupled with an earlier suggestion:

// large buffer starting with 1, 2 and the remainder zeros
int[1000] a = [1, 2, 0..];


Re: Improving std.regex(p)

2010-06-22 Thread David Gileadi
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s 
article
> scregexp includes the following requirement within the license:
> "Redistributions in binary form must reproduce the above copyright
> notice, this list of conditions and the following disclaimer in the
> documentation and/or other materials provided with the distribution."
> That would need to be changed before inclusion in Phobos. It looks like
> there are three people in the copyright notice: Walter Bright, Marton
> Papp, and yidabu. Does anyone know Marton's email address?
> Andrei

Since I didn't see someone else reply, back when he announced the code he used
ante...@freemail.hu.

Google also turned up http://www.equinoxbase.com/. I'm not sure it's the same
fellow, but the page has his name, mentions D and has a contact form.  You could
also try PMing him at dsource: http://www.dsource.org/forums/profile.php?
mode=viewprofile&u=1513


Re: DMD Backend Long-term

2010-07-06 Thread David Gileadi

On 7/6/10 11:35 AM, Nick Sabalausky wrote:

"BCS"  wrote in message
news:a6268ff167c88cce5058a18c...@news.digitalmars.com...

Hello dsimcha,



If we're really lucky, Bilski Vs. Kappos
(http://en.wikipedia.org/wiki/In_re_Bilski) will send all the software
patent attorneys to the poorhouse next week and we can just start
trampling freely.


FWIW:

http://www.supremecourt.gov/opinions/09pdf/08-964.pdf




Can someone decode that?




In case that wasn't simply a commentary on unreadable legalese, here's 
what Ars Technica said about it: 
http://arstechnica.com/tech-policy/news/2010/06/supreme-court-allows-but-limits-business-method-patents.ars


Re: Andrei's Google Talk

2010-08-06 Thread David Gileadi

On 8/6/10 11:24 AM, Graham Fawcett wrote:

On Fri, 06 Aug 2010 19:56:55 +0200, Johannes Pfau wrote:


A simple html to pdf conversion might not produce good results.


Converting *anything* to PDF might not produce good results. :)

There's at least one excellent, open-source HTML-to-PDF converter:

http://code.google.com/p/wkhtmltopdf/


For what it's worth I've been using wkhtmltopdf to generate PDF versions 
of the D site and documentation.  My hope is that generating them can 
become part of the build and that the latest versions can be always 
available for download instead of the somewhat-outdated version that the 
site currently links to.  I've filed a couple of bugs with wkhtmltopdf 
and they're being fixed--the developer is great.


The output isn't as nice as what Sphinx might generate, but it's not bad 
either.


Re: [Slight OT] TDPL in Russia

2010-08-30 Thread David Gileadi

On 8/30/10 5:28 AM, Steven Schveighoffer wrote:

DMCA will eventually be repealed. It goes against existing laws and
fair-use. There are efforts currently being made to alter or repeal it
(see http://en.wikipedia.org/wiki/Digital_Millennium_Copyright_Act).

FWIW, the lack of funds for someone with a real chance of getting the
DMCA to be tested by the supreme court is not an issue, EFF will pick up
the bill in a heartbeat :)

-Steve


The trend seems to be in the other direction: the ACTA treaty is 
considered by many to be the DMCA for the rest of the world.  Ars 
Technica's thoughts on it are at 
http://arstechnica.com/tech-policy/news/2010/02/world-get-ready-for-the-dmca-actas-internet-chapter-leaks.ars


Re: Please comment on http://d-programming-language.org/

2010-09-03 Thread David Gileadi

On 9/3/10 10:43 AM, Andrei Alexandrescu wrote:

On 9/2/10 21:58 CDT, Boris Wang wrote:

I think AA just laid emphasis on the proprietor of d language


I didn't participate to the creation of the content or layout.

Andrei


Yup, I'm the guy responsible for the new design (like it or hate it), 
and I tried to avoid changing any content.


I kept the DM logo because the original site has it.  I'm fine with 
trying designs that emphasize D and de-emphasize Digital Mars, but I 
would want Walter's go-ahead first.


Re: Please comment on http://d-programming-language.org/

2010-09-03 Thread David Gileadi

On 9/3/10 1:31 PM, Adam B wrote:

How is the website programmed?  If done properly the page content is
independent of the style.  Use page templates and CSS stylesheets so
that you have a single point of change for the entire website.  Stay
away from static HTML files.  Use PHP, JSP, Freemarker or something similar.


Sorry, I think it's going to stay static HTML: the website is generated 
using DDoc macros and I believe Walter is unlikely to want to go in any 
other direction.



Using stylesheets can allow your users to view the site however is most
pleasing to them.  For example.  Go to this page:
http://www.thesitewizard.com/css/switch-alternate-css-styles.shtml
  and then in FireFox select: View-> Page Style and switch between the
two provided styles.  Neato!

If you want my opinion on the visual style I'd say it's a huge
improvement over the digital mars site.  The flare gives it a
sophisticated feel.  However, please don't let trivial matters like the
"look" of the site slow us down from getting accurate and useful
information out to the world.  If you have a single point of change the
look can be tweaked as time goes on.


I haven't been changing the content--indeed I have purposely stayed away 
from doing so.  I believe that the desired direction is to get a good 
look and feel working independently of the content, and the content can 
be modified independently of my changes.  I do have some thoughts on 
what kind of content changes I'd like to see, though.



In terms of layout I agree with filgood that a site like
http://fantom.org/ is a better model.  It has the most important links
in BIG colorful text on the home page:
   1) What is D?
   2) What does it look like?
   3) How do I download it?

With a site like fantom.org  you can tell that
somebody sat down and though out: What's really important to my users?
What are the primary use-cases of my visitors?

My 2cents.  I'd be glad to help if you need it.
- Adam


If you or anyone else is interested in hacking at my look and feel 
please let me know and I can send you a .zip of the DDoc source code 
with my changes.  If you want to hack at the original DDoc files without 
my changes they're in the Phobos repository at 
http://www.dsource.org/projects/phobos/browser/trunk/docsrc


Re: One more update on d-programming-language.org

2010-09-10 Thread David Gileadi

On 9/10/10 10:20 AM, "Jérôme M. Berger" wrote:

Great, now the only issue that remains is that the text is still
too small...

Jerome


Text sizes are likely not changing.  Some folks say the text is too big, 
some say it's too small.  The text size is based on your browser 
settings, so check your browser and its default text sizes.  If that 
doesn't help, please adjust your preferences to match the text :)


Re: One more update on d-programming-language.org

2010-09-10 Thread David Gileadi

On 9/10/10 10:20 AM, Stewart Gordon wrote:

I see the spacing around code blocks seems to have been reduced.  Either
that or it just doesn't seem too big now. But are you going to do
anything about the other issues I raised on 3 Sep?


Reposting those suggestions, responses inline:


Nice design on the whole.  A few issues:

1. Too much space above and below code and BNF blocks.

2. In a few places, the bullet points look a little too spaced out.
I decreased the list spacing a bit, but don't want to decrease it 
further.  Some lists like those on 
http://d-programming-language.org/overview.html have wrapped text, and I 
prefer the spacing between the bulleted paragraphs.  If there is a 
strong consensus against my preference I'll change it :)



3. No consistency in whether indentation in BNF is with a tab character, four 
spaces or eight spaces.

4. Tab characters in pre blocks ought to be avoided, as they aren't guaranteed 
to display the same for everybody, and it also encourages bad practice if you 
use half-tabs like that.
I have mostly been avoiding changing the content, and I consider 
tabs/spaces in BNF blocks to be content, not styling.



5. It would be nice if you ran it through a validator.

http://validator.w3.org/

or if you want to check the whole site

http://www.htmlhelp.com/tools/validator/
I made a couple of changes based on validation but there are obviously 
lots to do.  It's honestly not very high on my priority list.


Re: One more update on d-programming-language.org

2010-09-16 Thread David Gileadi

On 9/16/10 12:59 AM, Nick Sabalausky wrote:

"Robert Jacques"  wrote in message
news:op.vi31l1jl26s...@sandford.myhome.westell.com...

On Thu, 09 Sep 2010 20:07:20 -0400, Andrei Alexandrescu
  wrote:


http://d-programming-language.org

  From David Gileadi: the annoying Google Translate bar behavior on
browsers with other languages has been fixed, the behavior when
shrinking and growing the window size has been improved, the Reddit
button is gone, and a few styles were changed.

Could have sworn I sent this already, it just disappeared.


Andrei


Hi Andrei,
The site still has major issues rendering with Opera (10.62). I've linked
to a screen-shot (http://i56.tinypic.com/wakrw5.png) This is simply not
usable. Given that I don't have any html experience, is there still
something I can do to help fix this? (because otherwise the new site looks
good.)


I've very little experience with Opera, but that looks like some sort of
internal redraw problem. And the HTML is very basic-looking to me.

Some things that might help narrow it down:

- Try turning off JS and reloading. (Maybe the translate widget is screwing
things up?)

- See if Opera has a way to choose the stylesheet to use and/or a way to
disable style-sheets. If so, try switching to the embedded "print"
stylesheet, and try disabling it. If opera doesn't have that ability, do
this:

1. Save the HTML page source.

2. Save http://www.d-programming-language.org/css/print.css to the same
directory.

3. Edit the HTML page, and on this line near the top:
   
   ...change "css/style.css" to just "print.css", and open the HTML page
in Opera. See how that looks.

4. Edit the HTML page again and remove these two lines:
   
   
...and open it again and see how that looks.




Good suggestions.  May I also suggest sending that screenshot to the 
Opera developers? http://www.opera.com/support/bugs/


Re: duck!

2010-10-16 Thread David Gileadi

On 10/16/10 12:30 AM, Christof Schardt wrote:

auto d = duck!Drawable(c); // awes


What about "as" ?

auto d = as!Drawable(c);

Christof


Forgive my ignorance, but with uniform function syntax, could this be 
rewritten as:


auto d = c.as!Drawable;

or will uniform function syntax not work with templates?


Re: Ddoc to PDF

2010-10-18 Thread David Gileadi

On 10/18/10 11:13 AM, Walter Bright wrote:

Alix Pexton wrote:

After a lot of thought, I have come to the conclusion that giving DDoc
the power required to calculate layout in a way that is general enough
to be used not only by PDF but by any other layout technology, and the
ability to work with a flattened tree, is a non starter.


Perhaps you're right. But it strikes me as possible that a Ddoc template
that emits the text in some custom format, which is then read by a
custom pdf generator program, could work. In other words, a two step
process.


Presuming that custom format is HTML then this is close to actuality. 
During the look 'n' feel changes for d-programming-language.org I 
experimented with using wkhtmltopdf 
(http://code.google.com/p/wkhtmltopdf/) to generate PDF versions of the 
documentation using the print CSS styles.  Besides a couple of defects 
to do with page numbering the results looked very good.


Re: Top Github Languages for 2013 (so far)

2013-09-04 Thread David Gileadi

On 9/3/13 11:13 PM, Iain Buclaw wrote:

On 4 September 2013 06:02, Peter Alexander  wrote:

I imagine D does well in discussion largely due to the amount Walter and
Andrei bombard reddit with links.



a.k.a.  Walterbot and Andralexbot.


Andralexdroid, surely?


Re: new DIP41: dmd/rdmd command line overhaul.

2013-05-22 Thread David Gileadi

On 5/21/13 9:05 AM, Walter Bright wrote:

Also,

 dmd -man

suffices for "long help".


Ah, man!!


OT: weary vs wary

2013-05-31 Thread David Gileadi

On 5/31/13 10:26 AM, Andrei Alexandrescu wrote:

... I'm a bit weary of ...


I keep seeing people use this phrase; shouldn't it be "wary"?

Not meaning to pick on you, Andrei; it's just that this time was the 
tipping point for the editor in me to kick in :)


Re: Opinions on DConf talks

2013-06-25 Thread David Gileadi
This may be OT since I'm not offering opinions on individual talks, but 
I really enjoyed the talks and want to say thanks for posting them 
online for us non-attendees to enjoy.  I know Andrei was using them as 
an analogy, but his comments about the professionalism of the AV crew 
were spot on--they did a fantastic job.


Great conference!


Re: DIP43 - D/Objective-C

2013-06-29 Thread David Gileadi

On 6/29/13 5:58 AM, Jacob Carlborg wrote:

I have created a DIP for making D ABI compatible with Objective-C. This
idea has already been announced, what I've done now is created a proper
DIP. The DIP is basically Michel Fortin's original designed document
properly formatted and put next to the other DIP's.

DIP link: http://wiki.dlang.org/DIP43
Original announcement:
http://forum.dlang.org/thread/kq7li9$2j9v$1...@digitalmars.com


It's probably an obvious observation, but why not use an annotation like:

@selector("insertItemWithObjectValue:atIndex:")
void insertItem(ObjcObject object, NSInteger value);

instead of the DIP's proposal of:

void insertItem(ObjcObject object, NSInteger value) 
[insertItemWithObjectValue:atIndex:];


Re: Graphics Library for D

2014-01-08 Thread David Gileadi

On 1/8/14, 11:28 AM, Adam Wilson wrote:

I've been looking at AGG, and to me the biggest problem is the license.
It would it difficult to use in commercial scenarios that D itself is
perfectly safe in. As useful as the GPL is, I don't think it belongs in
a library project.


I think if you're willing to use version 2.4 then you get a much more 
permissive license, no? That's how I read 
http://www.antigrain.com/license/index.html anyway...


Re: Graphics Library for D

2014-01-08 Thread David Gileadi

On 1/8/14, 11:48 AM, Adam Wilson wrote:

On Wed, 08 Jan 2014 10:39:08 -0800, David Gileadi
 wrote:


On 1/8/14, 11:28 AM, Adam Wilson wrote:

I've been looking at AGG, and to me the biggest problem is the license.
It would it difficult to use in commercial scenarios that D itself is
perfectly safe in. As useful as the GPL is, I don't think it belongs in
a library project.


I think if you're willing to use version 2.4 then you get a much more
permissive license, no? That's how I read
http://www.antigrain.com/license/index.html anyway...


Right, it will just force us to become responsible for maintaining our
own fork of AGG. I'm not sure we should get into that business.


Or we could use http://sourceforge.net/projects/agg/, which wikipedia 
says is a maintained fork of 2.4 (and how could wikipedia be wrong?).


Re: inlining...

2014-03-14 Thread David Gileadi

On 3/13/14, 11:21 PM, Manu wrote:

My feeling is that an ideal solution would be something like an
enhancement which would allow the 'mixin' keyword to be used with
regular function calls.
What this would do is 'mix in' the function call at this location, ie,
effectively inline that particular call, and it leverages a keyword and
concept that we already have. It would obviously produce a compile error
of the code is not available.

I quite like this idea, but there is a potential syntactical problem;
how to assign the return value?

int func(int y) { return y*y+10; }

int output = mixin func(10); // the 'mixin' keyword seems to kinda 'get
in the way' if the output
int output = mixin(func(10)); // now i feel paren spammy...
mixin(int output = func(10)); // this doesn't feel right...

My feeling is the first is the best, but I'm not sure about that
grammatically.


Is there already some trait for getting the string value of a function 
including its code? If so then a mixin plus a small helper function 
might do the job. If not then is such a trait feasible?


Re: inlining...

2014-03-14 Thread David Gileadi

On 3/14/14, 1:42 PM, Paulo Pinto wrote:

Am 14.03.2014 19:09, schrieb David Gileadi:

On 3/13/14, 11:21 PM, Manu wrote:

My feeling is that an ideal solution would be something like an
enhancement which would allow the 'mixin' keyword to be used with
regular function calls.
What this would do is 'mix in' the function call at this location, ie,
effectively inline that particular call, and it leverages a keyword and
concept that we already have. It would obviously produce a compile error
of the code is not available.

I quite like this idea, but there is a potential syntactical problem;
how to assign the return value?

int func(int y) { return y*y+10; }

int output = mixin func(10); // the 'mixin' keyword seems to kinda 'get
in the way' if the output
int output = mixin(func(10)); // now i feel paren spammy...
mixin(int output = func(10)); // this doesn't feel right...

My feeling is the first is the best, but I'm not sure about that
grammatically.


Is there already some trait for getting the string value of a function
including its code? If so then a mixin plus a small helper function
might do the job. If not then is such a trait feasible?


Might be problematic with modules delivered only in .di + binary form.

--
Paulo


Quite, but as Manu says about his proposed solution,


It would obviously produce a compile error
of (sic) the code is not available.


This would need to behave similarly.


Re: Specifying C++ symbols in C++ namespaces

2014-04-04 Thread David Gileadi

On 4/3/14, 11:59 PM, Mason McGill wrote:

"Walter Bright"  wrote in message news:lhi1lt$269h$1...@digitalmars.com...

Here's Andrei's proposal:

extern (C++) template nspace() {
int foo();
}

This seems misleading to readers of future code.
- An "extern (C++)" function lets you use a C++ function.
- An "extern (C++)" interface lets you use a C++ interface (declared as
a class, as is always the case in C++).
- An "extern (C++)" template lets you use a C++... namespace?

On Thursday, 3 April 2014 at 11:19:53 UTC, Daniel Murphy wrote:

Why not just

pragma(cpp_namespace, "outer")
{
   pragma(cpp_namespace, "inner")
   {
   extern(C++) void func();
   }
}

This really has only one obvious interpretation (the correct one), and
seems to be a rather harmless addition to the language.

It also fulfills the goal of allowing access to C++ libraries without
cluttering D with C++ language features.  I don't want to have to
explain to my students the difference between "modules" "D templates"
and "C++ namespace templates" (it reminds me of old- and new-style
classes in Python 2).


The above well describes my first reaction to the syntax (except the 
part about having students). And my second reaction too, in fact.


Re: Compile time code paths

2009-08-10 Thread David Gileadi

Daniel Keep wrote:

Jeremie Pelletier wrote:

If a function has both an asm and D implementations inside its body, and the D 
version can be executed at compile time, but the asm one is much faster at 
runtime. Is it possible to have the compiler use the D code path at compile 
time (ie to fill in enums and whatnot), and have the asm version available at 
runtime.


Not that I know of.  There's no way to switch based on run time/compile
time.  This was going to be solved, at least in part, using static
arguments, but that got dropped.

As it stands, you just have to use a suffix or prefix or something to
distinguish CTFE methods from runtime methods.


Is this a case for version(CompileTime){}?


Re: What does Coverity/clang static analysis actually do?

2009-10-01 Thread David Gileadi

Walter Bright wrote:
There's a lot of hoopla about these static checkers, but I'm not 
impressed by them based on what I can find out about them. What do you 
know about what these checkers do that is not on this list? Any other 
kinds of checking that would be great to implement?


I'm not familiar with C/C++ static checkers.

Eclipse's Java compiler has decent support for code checks.  I'm copying 
the list of items it can check here (except for those that seem 
Java-specific), in case it's of interest.  For each of the below, you 
can choose whether it's an error, a warning, or ignored.  I've included 
their defaults.


Code Style:

Non-static access to static member: Warning
Indirect access to static member: Ignored
Unqualified access to instance field: Ignored
Undocumented empty block: Ignored
Method with a constructor name: Warning
Parameter assignment: Ignored

Potential programming problems:

Assignment has no effect (e.g. 'x = x'): Warning
Possible accidental boolean assignment (e.g. 'if (a = b)'): Ignored
'finally' does not complete normally: Warning
Empty statement: Ignored
Hidden catch block: Warning
Inexact type match for vararg argments: Warning
Enum type constant not covered on 'switch': Ignored
'switch' case fall-through: Ignored
Null pointer access: Warning
Potential null pointer access: Ignored
Comparing identical values ('x == x'): Warning
Missing synchronized modifier on inherited method: Ignored
Class overrides 'equals()' but not 'hashCode()': Ignored
Dead code (e.g. 'if (false)'): Warning

Name shadowing and conflicts:

Field declaration hides another field or variable: Ignored
Local variable declaration hides another field or variable: Ignored
(If not ignored) Include constructor or setter method parameters
Type parameter hides another type: Warning
Method does not override package visible method: Warning
Interface method conflicts with protected 'Object' method: Warning

Unnecessary code:

Local variable is never read: Warning
Parameter is never read: Ignored
(If not ignored) Ignore in overriding and implementing methods
Unused import: Warning
Unused local or private member: Warning
Redundant null check: Ignored
Unnecessary 'else' statement: Ignored
Unnecessary cast or 'instanceof' operation: Ignored
Unused 'break' or 'continue' label: Warning
Redundant super interface: Ignored

I understand DMD's policy on warnings, but some of the above checks are 
reasons why I've grown to like some warnings.  Of course it helps that 
Eclipse's compiler is most often used with its IDE.


-Dave


Re: dmd support for IDEs + network GUI (OT)

2009-10-13 Thread David Gileadi

Nick Sabalausky wrote:
Video game developers don't make multiplayer games by sending a compressed 
video stream of the fully-rendered frame - they know that would be unusable. 
Instead, they just send the minimum higher-level information that's actually 
needed, like "PlayerA changed direction 72 degrees" (over-simplification, of 
course). And they send it to a client that'll never insist on crap like 
interpreted JS or open-for-interpretation standards. And when there's a 
technology that's inadequate for their needs, like TCP, they make a proper 
replacement instead of hacking in a half-assed "solution" on top of the 
offender, TCP. And it works great even though those programs have visuals 
that are *far* more complex than a typical GUI app. So why can't a windowing 
toolkit be extended to do the same? And do so *without* building it on top 
such warped, crumbling, mis-engineered foundations as (X)HTML, Ajax, etc.?


This is generally true, although see OnLive (http://www.onlive.com/).  I 
hear it works better than you'd expect, but don't have much interest in 
actually trying it.


Re: An interesting consequence of safety requirements

2009-11-04 Thread David Gileadi

Andrei Alexandrescu wrote:

grauzone wrote:


Maybe I don't get it, but how to you call prepend() from safe code?


module(safe) wyda;

void main() {
auto lst1 = new List;
auto lst2 = new List;
List.prepend(lst1, lst2)
}


This seems to be another case where automatic function rewriting would 
be nice, a la D's "Functions as Array Properties":


void main() {
auto lst1 = new List;
auto lst2 = new List;
// rewritten by compiler to List.prepend(lst1, lst2):
lst1.prepend(lst2);
}


Re: Random points from a D n00b CTO

2014-07-14 Thread David Gileadi via Digitalmars-d

On 7/14/14, 4:56 AM, Joakim wrote:

One line of thought that's been evolving for me lately is that D needs a
blog, where we can highlight good stuff about the language.  Go has one:

http://blog.golang.org/

This post should go on D's:

http://forum.dlang.org/post/mailman.3738.1405098936.2907.digitalmar...@puremagic.com


I could see H.S. Teoh writing a series of such posts, expanding on each
of the bullet points.  Right now, he'll throw something off on the forum
and it'll get buried by all the posts on here, missed by most users.  A
blog is where such material could be highlighted.

We even have a D blog engine built on vibe.d that we could put to use:

https://github.com/rejectedsoftware/vibelog

I'd be happy to administer such a blog, if it's a matter of someone
volunteering.


I think some of Walter's Dr. Dobb's posts would also fit very well in a 
D blog format. It would be cool if he could get permission to post a 
copy on this hypothetical blog.


The current Articles section on the website may have some overlap with 
the purposes of a blog, too. Perhaps they could be merged somehow, or 
perhaps provide a "promotion" process from one to the other.


This blog idea (and offer to volunteer) probably deserves its own thread.


Re: This week's pull stats

2014-07-14 Thread David Gileadi via Digitalmars-d

On 7/13/14, 10:32 PM, Brad Roberts via Digitalmars-d wrote:

I'm playing with the idea of a once a week sort of status email.
There's a lot of people to thank and recognize their valuable work.


With the recent calls for more folks to review pull requests, I think a 
message like this may help with motivation and with keeping the topic 
fresh in folks' minds.


It might be worth also including a link to the pull request page(s).

In any case I like the idea of a weekly update like this.


Re: Cool Stuff for D that we keep Secret

2014-07-14 Thread David Gileadi via Digitalmars-d

On 7/14/14, 5:03 AM, w0rp wrote:

Then I wondered if the "Documentation" section should be
renamed "Language Specifications" and the links renamed to
"DMD 1" and "DMD 2" or if they should be merged into the
sections for DMD 1 and DMD 2 respectively, because 7 year old
DMD 1 specs are now pretty much obsolete? Someone new to the
web site looking for (current) compiler documentation will
only get confused.


That's a good shout. I like the "Language Specifications"
suggestion. I'll make a note to change that later.


When I first reorganized the current site I ended up using "Language 
Reference" and "Library Reference" for the D-spec and Phobos docs, 
respectively. There was also a collection of articles which fell under 
documentation, for lack of a better place to put them, and the 
Documentation section has grown since.


I don't know where the documentation link should take you, but there are 
a number of sections under the current Documentation (including not one, 
not two but three "tutorial" links, each named slightly differently and 
all of which leave dlang.org). I personally think that "Language 
Specification" is a bit narrow to cover all those topics.


Re: Weird…

2014-07-15 Thread David Gileadi via Digitalmars-d

On 7/15/14, 9:56 AM, Russel Winder via Digitalmars-d wrote:

Funny how when people send big smiles, they always mention D?

:-D

:D


I seem to recall that at some point someone proposed a larger version of 
:D as a logo for dlang. It even preserves the two moons :D


Re: [OT] Uploading DConf videos

2014-07-18 Thread David Gileadi via Digitalmars-d

On 7/18/14, 9:32 AM, ponce wrote:

On Friday, 18 July 2014 at 15:44:21 UTC, Andrei Alexandrescu wrote:

On 7/17/14, 11:53 PM, Jacob Carlborg wrote:

On 18/07/14 03:55, Israel Rodriguez wrote:


This man has it right. I dont think quality is a huge issue though
unless youre watching something that needs to be sensitive to the
eye in
which case youtube will work just fine for these videos.


Youtube supports resolutions of 4k, I don't see the problem with
quality.


Somehow the same DConf videos are of better quality on archive.org
than on youtube.com. Could you explain that? -- Andrei


archive.org serves the same file you uploaded to Youtube, without change.

Youtube always re-encodes the video, for various reasons:
- sources are very heterogeneous
- multiple formats needed for various devices, various resolutions, and
bandwidth adaptation
- insanely low bitrates (3000kbps for 1080p H.264 is scarce, yet it's
not so bad with the encode Youtube does)

So while Youtube quality might be worse, the used bitrates are probably
not the same. My opinion is that it's best to let Youtube serve the
content for maximum reach.


And you can always download a high-quality version from YouTube in 
various formats (including the original format) using something like 
ClipGrab.


Re: WAT: opCmp and opEquals woes

2014-07-23 Thread David Gileadi via Digitalmars-d

On 7/23/14, 11:09 AM, Dicebot wrote:

On Wednesday, 23 July 2014 at 17:15:12 UTC, Ary Borenszweig wrote:

Imagine you have a list of integers and strings denoting integers: [1,
"2", 100, "38"]. Now you want to sort them according to their numeric
value. Of course, 1 and "1" would have the same order. However, 1 and
"1" are different, so "==" would give false, while 1.opCmp("1") would
give 0.

Equality and comparison are different. opCmp is used for sorting
objects, which has nothing to do with equality. Inferring equality
from opCmp is wrong in my opinion.


Well this is why you can actually override those :) I think automatic
opCmd -> opEqual generation covers vast majority of use cases and as
such will have a vary good effort / decreased annoyance ratio.


I agree. In fact I think if you've implemented opCmp to sort 1 and "1" 
as equal that in most cases you'd expect "1" and 1 to compare as 
logically equal. Automatic opCmp -> opEquals seems like a very sane 
default to me.


Re: What Programming Book Should I Read Next?

2014-07-28 Thread David Gileadi via Digitalmars-d

On 7/26/14, 4:26 PM, H. S. Teoh via Digitalmars-d wrote:

On Sat, Jul 26, 2014 at 04:23:23PM -0700, Walter Bright via Digitalmars-d wrote:

http://www.reddit.com/r/programming/comments/2bt8a5/what_programming_book_should_i_read_next/

Ali's book is the latest, so I posted that one!


What about TDPL? Even though it's somewhat dated, it *was* what finally
drove me to non-trivial programming in D.


I am, alas, still a D dabbler, but I'm a huge fan of Andrei's book. It's 
not just the fantastic content, it's also the engaging style. I like it 
so well that I read it once in a while just for enjoyment.


Re: checkedint call removal

2014-07-29 Thread David Gileadi via Digitalmars-d

On 7/29/14, 1:52 PM, Walter Bright wrote:

I find this splitting of hares ... to be entirely meaningless.


Hunters claim that rabbit tastes less gamey, if we're going to be 
splitting anything.


(Please forgive the silliness.)


Re: assert semantic change proposal

2014-08-07 Thread David Gileadi via Digitalmars-d

On 8/7/14, 9:51 AM, Sean Kelly wrote:

On Thursday, 7 August 2014 at 07:57:14 UTC, Johannes Pfau wrote:


Attempting to continue operating is irresponsible if the program is
doing or can do anything important.


Again: unittests?


unittests shouldn't use assert.  Or alternately, we can have
onAssertError (the assertion failure callback) do something different if
unit testing is taking place than when the program is actually running.


Considering that TDPL, Ali's Book[1] and dlang.org[2] all use assert 
when introducing unittest, I think the latter solution is probably the 
right one.


[1] http://ddili.org/ders/d.en/unit_testing.html
[2] http://dlang.org/unittest.html


Re: What have I missed?

2014-08-09 Thread David Gileadi via Digitalmars-d

On 8/9/14, 2:16 AM, Era Scarecrow wrote:

On Saturday, 9 August 2014 at 09:15:10 UTC, Era Scarecrow wrote:

and run as a LiceCD on a VM that contains all the tools and


   LiveCD LIVE!!! Wish i had an edit button for quick edits...


Yeah, NNTP is lousy for editing.


Re: Automated source translation of C++ to D

2014-08-22 Thread David Gileadi via Digitalmars-d

On 8/22/14 1:29 AM, David Nadlinger wrote:

On Friday, 22 August 2014 at 07:48:30 UTC, Daniel Murphy wrote:

So no, you can't magically upgrade a project from C++ to D.


Hence the name "magicport"?

Sorry, could not resist.
David


It's pronounced "sufficiently advanced technology port" :)


Re: D mention on developer.apple.com

2014-09-26 Thread David Gileadi via Digitalmars-d

On 9/26/14, 11:25 AM, Walter Bright wrote:

I see the Apple blog did mention D. A glorious exception!


Which is odd because Swift doesn't support exception handling :)


Re: OT: Minecraft death by GC

2014-10-21 Thread David Gileadi via Digitalmars-d

On 10/21/14, 2:47 AM, monarch_dodra wrote:

Hurp, I wonder why GC issues only appear with application that use a GC.
Hurp-a-durp.

Also, the issue of memory leak and core dumps seem to only appear when
you use a systems language. How crazy is that?


Happily with a little work D allows you to have both! :)


Re: D in my trashbin

2014-10-27 Thread David Gileadi via Digitalmars-d

On 10/24/14, 5:05 PM, ketmar via Digitalmars-d wrote:

On Fri, 24 Oct 2014 23:59:08 +
Kyoji Klyden via Digitalmars-d  wrote:


I'm not sure what else we could call it though.. D.ask?
.questions is good.


Others have suggested D.users.



Re: 'int' is enough for 'length' to migrate code from x86 to x64

2014-11-19 Thread David Gileadi via Digitalmars-d

On 11/19/14, 6:57 AM, ketmar via Digitalmars-d wrote:

On Wed, 19 Nov 2014 13:47:50 +
Don via Digitalmars-d  wrote:

If I have two pencils of length 10 cm and 15 cm, then the first
one is -5 cm longer than the other.

and again "length" is not a relation. show me pencil of length -10 cm.
when you substractin lengthes, you got completely different type as a
result, not "length" anymore. ah, that untyped real-life math! ;-)


To me the salient point is that this is not just a mess with real-life 
math but also with math in D: lengths are unsigned but people subtract 
them all the time. If they're (un)lucky this will return correct values 
for a while, but then someday the lengths may be reversed and the values 
will be hugely wrong:


int[] a = [1, 2, 3];
int[] b = [5, 4, 3, 2, 1];

writefln("%s", b.length - a.length);  // Yup, 2
writefln("%s", a.length - b.length);  // WAT? 18446744073709551614

This is why I agree with Don that:

> Having arr.length return an unsigned type, is a dreadful language
> mistake.


Re: 'int' is enough for 'length' to migrate code from x86 to x64

2014-11-19 Thread David Gileadi via Digitalmars-d

On 11/19/14, 9:12 AM, bearophile wrote:

David Gileadi:


writefln("%s", b.length - a.length);  // Yup, 2
writefln("%s", a.length - b.length);  // WAT? 18446744073709551614


Nowadays a better way to write such kind of code is using the Phobos
"signed" function:

writefln("%s", b.length.signed - a.length.signed);
writefln("%s", a.length.signed - b.length.signed);


But this requires the following knowledge:
1. That the signed function exists, and its location. As a casual D 
programmer I didn't know about it.
2. That there's a need for it at all, which requires knowing that length 
is unsigned. I did know this, but I bet in the heat of programming I'd 
easily forget it. In a semi-complex algorithm the bug could easily hide 
for a long time before biting.



This is why I agree with Don that:

> Having arr.length return an unsigned type, is a dreadful
language mistake.


This mistake is by design. Walter has resisted several times turning
them into signed values, and even making size_t a type strongly
different from uint/ulong. I don't agree with this design decision, but
it's unlikely that Walter has changed his mind on it. So better to go on
and discuss other things more likely to happen.


Yes, I bet you're right about the likelihood of change.


Re: Thanks to p0nce for a nicer DConf logo!

2015-01-19 Thread David Gileadi via Digitalmars-d

On 1/19/15, 3:02 PM, Steven Schveighoffer wrote:

The thing is, there are several state abbreviations that always confuse
people. For instance AL is Alabama, but could be Alaska (AK) and AK
might be confused as Arkansas (AR), which may be confused as Arizona (AZ).*


I can confirm this: as a teen from UT I took a job at a gas station near 
the north rim of the Grand Canyon in AZ and spent most of the summer 
entering AR as the state code on their paper credit card entry form. 
Finally someone kindly set me straight.


In any case I think the potential confusion from "UT" in the dconf.org 
headline may be mitigated by the fact that it's preceded by "Utah" in 
the university name.


Re: dlang.org redesign -- the state of documentation and learning resources [part 2]

2015-01-26 Thread David Gileadi via Digitalmars-d

On 1/25/15 4:42 AM, Andrej Mitrovic via Digitalmars-d wrote:

Here's another one:

The search box allows selecting between:
- Entire D Site
- Library reference
- Newsgroup archives

But where's the Language spec option?


It's missing due to how dlang.org is set up, and the limitations of 
Google's site search feature. If you click on a link in the language 
spec, like on Types, you'll notice that its URL has the page directly 
under dlang.org, e.g. http://dlang.org/type.html.


In contrast, the standard library is in a subfolder (e.g. 
http://dlang.org/phobos/std_algorithm.html) and the newsgroup archives 
are in another subfolder. Being in a subfolder allows us to pass a 
prefix parameter to Google's site search that will limit its results to 
URLS with that prefix. Since the language reference isn't in a subfolder 
there's no prefix for the language reference that doesn't also include 
everything else in the site, and hence there's no option for Language Spec.


I don't know how hard it would be to put all the language spec pages 
into their own subfolder, but doing so would allow us to add the 
Language Spec option to the dropdown.


Re: [website redesign] PR for the one with the big red menu bar

2015-01-30 Thread David Gileadi via Digitalmars-d

On 1/30/15 9:30 AM, anonymous wrote:

Another variant somewhere between the all-red one and the all-grey one:

http://ag0aep6g-dlang.rhcloud.com/variants/grey-newlogo/


I think it might look better if the red blends into the gray:

http://i.imgur.com/ZCvmkVq.png


Re: Should we remove int[$] before 2.067?

2015-02-02 Thread David Gileadi via Digitalmars-d

On 2/1/15 9:26 AM, Andrei Alexandrescu wrote:

I agree indecision is bad. -- Andrei


Whereas I'm still on the fence...


Re: RFC: std.*.concept convention

2015-02-11 Thread David Gileadi via Digitalmars-d

On 2/11/15 12:47 PM, Brad Anderson wrote:

On Wednesday, 11 February 2015 at 08:00:54 UTC, Jakob Ovrum wrote:

[snip]

Putting the complexity of the container concept aside; I think we
should factor out the concept checkers from std.range.primitives and
put them in std.range.concept and establish a convention of using
modules named std.*.concept for concept checkers in the future. The
consistency gained by such a convention makes type concepts easier to
understand and commonly used module names easier to remember. If we do
it now, there is no breakage, as the splitting of std.range has not
yet been released: hence the otherwise clumsy timing of this suggestion.

[snip]


+1. Makes a lot of sense to do it this way.

I prefer "concept" over "trait". I think of traits as more primitive
building blocks. With a trait you are querying information about a type.
With a concept you are fitting a type to its requirements.


My uneducated feeling is that if there's a clear dividing line as to 
what is a trait and what is a concept—for instance if they have 
different syntax—then it makes sense to have two names. Otherwise I 
think it makes more sense to have just one. Fuzzy categorization tends 
to hurt.


Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread David Gileadi via Digitalmars-d
On 2/27/15 6:36 AM, "Marc =?UTF-8?B?U2Now7x0eiI=?= " 
wrote:

On Friday, 27 February 2015 at 08:26:14 UTC, Ola Fosheim Grøstad wrote:

On Thursday, 26 February 2015 at 22:04:09 UTC, Andrei Alexandrescu wrote:

On 2/26/15 2:03 PM, Brian Schott wrote:


One of the first things that stood out to me is that "add ref" is two
words and "release" is one. For the sake of symmetry, how about these:
*  opIncRef, opDecRef
*  opAcquire, opRelease


All - please PLEASE do not derail this into yet another debate about
which names are best. -- Andrei


Using protocols rather than enforcing a particular implementation is
nice, but D needs to stop reinventing terminology and syntax matters.

-- snip --


AddRef/Release is established COM terminology.


One reason for keeping COM terminology might be if 
std.c.windows.com.IUnknown can automatically take advantage of DIP74. Of 
course this could also be a downside—would DIP74 break existing COM code 
in D?


Re: Redesign of dlang.org

2014-04-18 Thread David Gileadi via Digitalmars-d

On 4/18/14, 7:22 AM, Steven Schveighoffer wrote:

On Fri, 18 Apr 2014 10:04:03 -0400, Aleksandar Ruzicic
 wrote:


Hello,

I've been D enthusiast for couple of years now (but I do not
participate much in discussions here, although I read forums almost
daily), and I keep telling people about D and how awesome it is.


Great!


But, all this time D's official website somehow archaic look kept
troubling me. It reminds me of early 2000's design and I really cannot
associate this design with "modern" or "elegant", what D really is.
I think that we must invest time and energy improving the website's
look and feel as that is what people first coming to D will see. We
need to strive for "wow" and not "meh" as a first impression.

So I have started this thread to see if there is a chance for complete
redesign of dlang.org.

I have also tried to design something myself (although I'm not a
designer) and this is what I came up with:

http://krcko.net/dlang.org/dlang-home-draft1.png

I'm not entirely satisfied with it but I believe that it looks better
(or at least more modern) than the current design.


So, what do you guys think?


To be honest, it looks no "better" than the current website. Basically
it's more windows-8-ish. But I don't think it's a significant
improvement. BTW, I don't think you properly remember early 2000's web
sites...

I don't share your opinion that the web site need to be "modern" to
avoid warding off potential adopters. If they are turned off of using a
system programming language by a bland (debatable) site look and feel,
then I think there was really something else bothering them.

That being said, changing look and feel has a "this site is being
maintained" air to it. I just don't think it's critical enough at this
point to diverge talent away from working on the language.

-Steve


As the guy who was mostly responsible for the current look and feel of 
the website I can provide some insight into the effort required. The 
website is built using DDoc[1], and anyone who wants to change the look 
and feel will need to learn it. It's not difficult. It does mean that 
the site is static HTML, so any dynamism needs to be JS-only (and I 
think any efforts to make the pages largely JS-driven would meet 
resistance).


What was a little weird was trying to use DDoc to expand" the navigation 
tree when you're on a subpage of a main category. The original website 
listed every single page in the sidebar, which made the sidebar 
extremely unwieldy. Due to DDoc limitations I ended up having to put a 
CATEGORY_FOO macro in each page in the site, where the FOO is one of the 
categories in the sidebar. You may be able to figure out a better way. 
Just fork the site on github[2] and experiment!


Also note that there's a movement to make at least part of the website 
(the Phobos docs) use a different documentation generator, so the new 
look would need to be ported to that too. I suspect that wouldn't be hard.


Be aware that the current Tweets sidebar on the main page may be hard to 
get rid of; I noticed it wasn't in your mockup :)


Based on the last go-around there would be some work required from 
Walter and Andrei, but assuming you're implementing the new look and 
feel then their work would be mostly related to pushing changes to a 
beta site and then to the main site. They can probably speak better to 
the amount of effort they'd need to put in. If you're not doing the work 
of implementing the new look and feel then I suspect this proposal is 
dead on arrival unless someone else steps up to help.


Finally I like your look; I think it would be worth refining and 
pursuing. I make no claim to be a graphic designer and I'm certainly not 
offended by any criticism of the current look; at the time I had two 
goals; 1) look better than the previous site at digitalmars.com and 2) 
tame the massive sidebar into something more reasonable. I think they 
both succeeded but I'm very aware that things can look better.


[1] http://dlang.org/ddoc.html
[2] https://github.com/D-Programming-Language/dlang.org


Re: Redesign of dlang.org

2014-04-18 Thread David Gileadi via Digitalmars-d

On 4/18/14, 9:25 AM, Aleksandar Ruzicic wrote:

On Friday, 18 April 2014 at 15:30:52 UTC, David Gileadi wrote:


[snip]


Also note that there's a movement to make at least part of the website
(the Phobos docs) use a different documentation generator, so the new
look would need to be ported to that too. I suspect that wouldn't be
hard.


I wasn't aware of that, do you by any chance have links to those threads?


I'm having trouble finding the thread, but I think the idea was to use 
vibe.d's ddox[1]. There's a preview of it live at the "Preview new 
Layout" link at dlang.org. Folks, please correct me if I got this wrong 
and that preview is not powered by ddox.


[snip]


Finally I like your look; I think it would be worth refining and
pursuing. I make no claim to be a graphic designer and I'm certainly
not offended by any criticism of the current look; at the time I had
two goals; 1) look better than the previous site at digitalmars.com
and 2) tame the massive sidebar into something more reasonable. I
think they both succeeded but I'm very aware that things can look better.


Thanks! It is just a mockup I made in an hour or so, I would like
to have some real designer(s) involved in this to make it really better.


If you have access to real designers (as you mentioned in another 
message) that would be fantastic. I think the mockup you created is 
already a good direction but folks with experience in UX, typography, 
responsive design etc. could probably make dlang.org properly great.



The current design is waaay better than what we had before and I thank you
on that! That change was really refreshing.
I just think that we should keep pushing forward. And I would also like if
you could be able to join me in a new redesign (if it gets approval), at
least
in a consulting role. :)


I'd be happy to help. My time is more divided nowadays but I'm sure I 
can put some time into this. While we're at it some good mobile support 
would be awesome too.



[1] http://devdocs.io/


[1] https://github.com/rejectedsoftware/ddox



Re: Redesign of dlang.org

2014-04-21 Thread David Gileadi via Digitalmars-d

On 4/21/14, 12:38 PM, Aleksandar Ruzicic wrote:

I'm not sure if it is smart to use simple text macro processing system
as a replacement for full-featured DSL such is Sass. And I don't think
that some features available (and really useful!) in Sass are even
possible with Ddoc. For example branching with @if, composing of various
style sets to optimal CSS (Sass has @extend directive for this).
Also, Ddoc can't minify resulting CSS which is something that is
considered good practice (serve gzipped minified JS/CSS), so some
external tool must be used for that. With node-sass we can get all that
and more (i.e. source maps)..


A little searching turned up libsass.org which apparently is the native 
library that node.js uses for its implementation. So if there's an 
objection to full node.js (or if vibe.d is used) then perhaps the native 
library would do.


Re: std.allocator: false pointers

2014-05-02 Thread David Gileadi via Digitalmars-d

On 5/2/14, 11:56 AM, Andrei Alexandrescu wrote:

If speed is no issue, sure :o). My intuition is that the TwoBitVector
would need certain primitives from BitVector to work well.


Heh, however it's implemented, TwoBitVector's very name implies that 
it's cheap to use ;)


Re: Redesign of dlang.org

2014-05-06 Thread David Gileadi via Digitalmars-d
Is this still happening? Is there a repo or a place I can go to 
help?


Re: New opportunities for D => ASM.js

2014-05-16 Thread David Gileadi via Digitalmars-d

On 5/16/14, 11:52 AM, Nick Sabalausky wrote:

But then using it as a GUI engine and software platform is like abusing
Latex or PDF to make software run inside Acrobat Viewer. All the effort,
bloat and compromises...and for what point?


I assume that question is mostly rhetorical, because of course the point 
for many companies is that while some subset of users may have Acrobat 
Viewer installed, everyone has a browser. Compare the process of 
installing a native app (even on simple devices like phones) to the 
single click for loading a web app. Add to that making sure the user 
gets timely bug fixes and new features and it's easy to see why web apps 
make sense for many companies.


It's just tragic that the format for them evolved through HTML; it's 
become monstrous and deformed in all the ways you've discussed.


Re: Optional monitors suggestion

2014-05-19 Thread David Gileadi via Digitalmars-d

On 5/18/14, 7:10 AM, David Nadlinger wrote:

... Java classes could just be
translated to "@synchronizable class" or whatever.


Whether we preserve backwards compatibility or not, @synchronizable has 
my vote for the bikeshed's color.


  1   2   >