Re: The Language I Wish Go Was

2010-10-21 Thread Juanjo Alvarez
On Thu, 21 Oct 2010 10:51:14 -0700, Walter Bright 
 wrote:

http://news.ycombinator.com/item?id=1814887




Some commentary on D there.


I always enjoy a good rant about some language.  When I'm intrigued 
by some  language rants are the first things I google. 

I wish Go, sorry, D had named arguments too. Its a simple feature 
that nuke a trunkload of function overloading.


Re: The Language I Wish Go Was

2010-10-21 Thread Juanjo Alvarez
On Thu, 21 Oct 2010 15:45:55 -0400, bearophile 
 wrote:
On the other hand, currently there are many D2 features that are 
unfinished and buggy, so adding even more stuff is not a good idea. 
And I think named arguments are a purely additive change. So Walter 
may add them later when the current features are implemented well 
enough. Currently it's much more important to focus on eventually 
needed non-additive changes instead.


Very true. I also use named arguments constantly in Python. 

Since I'm not the only one that would like to have it in D 2.1 I'll 
go into gredy mode and add that expanding a dictionary as named 
arguments to a function is pretty useful too, but since in D's hashes 
the values must be of the same type for a declared hash it would be 
less useful, except for Variant[string] hashes maybe, which is a 
little convoluted.


Re: A summary of D's design principles

2010-10-21 Thread Juanjo Alvarez
On Thu, 21 Oct 2010 15:26:14 +0100, Bruno Medeiros 
 wrote:
* And as for what D programmers think of other languages, well, it 

seems

I guess D view of C++ could be rendered as an  alcoholic father while 
D view of C++ would be a fashion victim son.


Re: Simple @tagged attribute for unions

2010-10-22 Thread Juanjo Alvarez
On Fri, 22 Oct 2010 06:33:33 -0400, bearophile 
 wrote:
The @tagged attribute for unions is an additive change. Even if you 
don't implement it now, people have the freedom to design and think 
about it.



I hope this forum still can be used to discuss aditive changues. We 
don't expect Walter et all to rest after the first stable version of 
D2 :P


Re: What can the community do to help D?

2010-10-23 Thread Juanjo Alvarez
On Sat, 23 Oct 2010 16:09:37 +0100, Peter Alexander 
 wrote:
thread about what the best things are that the community can do to 

help D.

And easy target would be to improve the documentation with better 
explanations for D outsiders and more examples. This way Walter et 
all could devote more time to coding.


Re: More Clang diagnostic

2010-10-28 Thread Juanjo Alvarez
Walter Bright Wrote:

> bearophile wrote:
> > Another diagnostic feature is to not just use the caret (we have discussed 
> > about it time ago) but it also underlines the wrong part:
> > 
> >   t.c:7:39: error: invalid operands to binary expression ('int' and 'struct 
> > A')
> > return y + func(y ? ((SomeA.X + 40) + SomeA) / 42 + SomeA.X : SomeA.X);
> >  ~~ ^ ~
> 
> 
> Yes, we discussed it before. The Digital Mars C/C++ compiler does this, and 
> NOBODY CARES.
> Not one person in 25 years has ever even commented on it. Nobody commented on 
> its lack in dmd.
> It's a waste of time to implement things nobody cares about.

I think that is a nice feature to have in a compiler. No life-chaging, no 
critical, but still nice.


Re: Marketing D [ was Re: GCC 4.6 ]

2010-11-01 Thread Juanjo Alvarez
On Sun, 31 Oct 2010 14:12:04 -0700, Walter Bright 
 wrote:
Sometimes I feel people are just waiting around, wanting to use D, 
but waiting 
for someone else to make the first move. It's like a dance club, 

where everyone

With Python what happened for some years was that some companies were 
using it for lots of internal project, but not disclosing its use, 
for fear that the upper management could scream, "whats that python 
crap! That is not java! " I know because I worked on one of them (a 
fortune 100 bank). 

The same happens with lots of other technologies inside Big Corps 
(MySQL comes too my mind too), they are first used by programmers and 
people that know their job in a semi stealth way and later they are 
accepted by the people whose main job is internal company politics 
and can't tell the difference of a ref from a pointer. 

I'm not saying this is the case with D2, I would not use it my 
daywork production code yet (but my play project at home is already 
over 5000 lines of code and the last version of dmd fixed all the 
bugs I stumbled on while developing it), but this is surely going to 
happen a lot once D2 stabilizes.


Re: DMD source overview?

2010-09-24 Thread Juanjo Alvarez

On Wed, 15 Sep 2010 15:34:47 -0400, "Nick Sabalausky"  wrote:

> So does everyone else; you will be a *




I've always wanted to be a pointer!


Ok,  but Try{ ! to be a void* }   :)


Re: A summary of D's design principles

2010-09-26 Thread Juanjo Alvarez
On Fri, 17 Sep 2010 14:33:30 -0700, Walter Bright 
 wrote:
Exactly. Much of that can be summed up as D being intended for 
professional 

production use, rather than:


Anyway you can't ignore D's productivity. As a newcomer after one 
week learning and toying with D my productivity is about 70% of the 
one I have with Python after 8 years doing Python, and higher than 
the one I've with Java or C++. 

I've found that the compiler error messages are usually very 
informative,  which helps, but being able to link with C libs is a 
boost too, compared to Python or Java where you need to write lot 
more than declarations. 

Yesterday I translated some Python code (Quixote's scgi.py) to D in a 
couple hours and now it runs like five times faster (before any 
optimization or D-ization) using 10% of the.memory.  The translation 
was almost direct, line by line which speaks a lot about D's 
expresivity (I only missed something like list.remove(item)).


Re: Andrei's Google Talk

2010-09-26 Thread Juanjo Alvarez

On Thu, 23 Sep 2010 09:53:33 +0200, Don  wrote:
No, but you have to include the license WITH the executable (in the 
'documentation and other materials'). Which is fine if in fact 
there are 
'documentation and other materials'. But it would seem to prohibit 
distribution of a bare executable.


You can include it in the about box, in the --help switch, etc. Many 
programs do it that way and I never heard of any problem with that.


Re: Andrei's Google Talk

2010-09-26 Thread Juanjo Alvarez
On Mon, 20 Sep 2010 14:14:09 -0400, "Steven Schveighoffer" 
 wrote:
another company that is completely proprietary.  LLVM has some 
possible  
connection to interject and say "you have to give LLVM developers 
credit,"  
even if Walter didn't copy any code.  Yeah, it's ridiculous and 

absurd,

Well, Windows NT and 2000 (not sure about the latest versions) 
included the attribution in the about box. You can't get more 
commercial than Microsoft. I don't see the problem on including some 
lines of text on parts nobody looks anyway.


Re: Andrei's Google Talk

2010-09-26 Thread Juanjo Alvarez
On Sun, 26 Sep 2010 14:15:40 -0700, Walter Bright 
 wrote:

Our choices are for anyone distributing a D app, commercial or not:


Ok. I was not arguing for changing D's license to BSD but about not 
worrying so much about looking at BSD code or incorporating the 
occasional bit of code.  AFAIK the BSD license it's not virical or 
people using Microsoft network API should include the attribution, 
which doesn't happen. Same with GPL or LGPL code incorporating code 
from BSD or all the userspace apps on the Free/Open BSD OSes.


Re: Andrei's Google Talk

2010-09-26 Thread Juanjo Alvarez
On Sun, 26 Sep 2010 14:04:54 -0700, Walter Bright 
 wrote:
If nobody cares about it, why force it on people? I just don't get 
it. What's 

I said that nobody looks there, not that nobody cares. Obviously the 
authors of the BSD licensed code care. 

the benefit of the binary attribution clause? Why burden all D 

developers with this?

See my other comment on the thread.


Re: Andrei's Google Talk

2010-09-26 Thread Juanjo Alvarez
On Sun, 26 Sep 2010 17:00:23 -0700, Walter Bright wrote:


> The problem is, the BSD license *is* viral. If I look at BSD licensed
> code, and someone accuses me of incorporating bits of it into Phobos,
> then those bits must
>   be removed or Phobos becomes BSD licensed and so every user gets
>   infected with
> it, too.
> 
> If you say "that'll never happen", consider that twice that exact issue
> has come up.
> 
> Linking with a DLL is not viral, but statically linking a BSD licensed
> library *is* viral.

True. My "AFAIK" was wrong; I stand corrected:

http://www.groklaw.net/article.php?story=20070114093427179

Summary:

(a) the BSD appears to require that modifications be distributed only 
under the terms of the BSD, and that this requirement therefore cascades 
down to subsequent generations of code;

(b) the license does not appear to permit the relicensing of BSD code 
under the terms of any other license, at least in so far as any 
restrictions in other licenses would seem not to be binding;

(c) there may be some scope for arguing that the term “modification” to 
the code is restricted or limited in some fashion. However, as the 
license only permits redistribution of “modifications” the BSD does not 
permit the redistribution of any derivative work which is not a 
modification;

(d) the BSD does not have a requirement for the distribution of source 
code. It is not clear whether this means there is a deficiency in the 
Open Source Definition. 


Re: A summary of D's design principles

2010-09-28 Thread Juanjo Alvarez
On Mon, 27 Sep 2010 21:28:16 -0700, Walter Bright 
 wrote:
be found to tout it, it will be ineffective. This is because 
everyone touts 
their language as "more productive". People just see "more 
productive" and their 
brain just skips over it without it even entering their conscious 

thought.

Well, in this case I don't believe that D is more productive than 
Python in the short term (it could be in the long term for big 
codebases involving several developers). But it is almost as 
productive while smoking it in performance and resource usage. So it 
is more like you have the advantages of a natively compiled language 
without many of the drawbacks.


Re: A summary of D's design principles

2010-09-28 Thread Juanjo Alvarez
On Tue, 28 Sep 2010 13:22:09 -0400, bearophile 
 wrote:
The main and maybe only advantage of D over C# is that it's 
multi-platform. But today the Web is very important, and D can't be 
used in browers.


And performance, (most of the time) . And memory usage.


Re: A summary of D's design principles

2010-09-28 Thread Juanjo Alvarez
On Tue, 28 Sep 2010 19:36:32 + (UTC), retard 
 wrote:
That's pretty awesome. You have maybe 0.001% of the libraries 
directly 

I have a lot more libraries in D than in Python. In C. 


[bla bla bla, bad sarcasms, bla bla bla]
at least 100 times more productive than with Python. You can write 
10 

lines of code per day.


Productivity is not measured by lines of code written. Sometimes a 
better measure is lines of code removed.


Re: A summary of D's design principles

2010-09-28 Thread Juanjo Alvarez
On Tue, 28 Sep 2010 19:36:32 + (UTC), retard 
 wrote:
other languages. However, please consider that C# is *higher* level 
language than D and that means it by definition has better 
portability to 
multiple platforms. You already have a C# virtual machine for all 

major

LOL.  I've never been able to run any mildly complex application in 
Mono. And I've tried.


Re: Module-level accessibility

2010-10-04 Thread Juanjo Alvarez

On Mon, 04 Oct 2010 14:28:32 +0200, Don  wrote:
may lose interest in the language because of it alone. (The others 
are 

bug 3516 and 2451).


Eh, I was bitten but 2451 yesterday and actually had to change a lot 
of function signatures and rethink my code to avoid it. I hope is 
fixed soon. 

On the other hand, programming with the current state of the D2 
compiler is a good mental exercise because you never know when you'll 
have to redesign something. It's the closer most programmers can get 
of an extreme sport , I guess.


Re: phobos is failure

2010-10-05 Thread Juanjo Alvarez
On Tue, 05 Oct 2010 23:59:20 +1100, Darth Tango 
 wrote:

Exackaly.  Tango rulez.






May the meta-force be beside you.






:-) Darth


My Lord, how is the migration of Tango to D2 going? The last commit I 
saw on the experimental branch was pretty old.


Re: On C/C++ undefined behaviours (there is no "Eclipse")

2010-10-05 Thread Juanjo Alvarez
On Tue, 5 Oct 2010 17:59:26 + (UTC), retard  
wrote:
I assume all of them (the latest versions, of course) start in less 
than 
3.5 seconds. I pondered this a bit and am now willing to buy Don's 
magic 
computer. I really do have need for a laptop that can launch those 
applications in less than 3.5 seconds.


Yes, my 2.40ghz i5 with 6gbs RAM takes about ten seconds to open 
Eclipse 64bits; I need to get one of those SSDs.


Re: About Andrei's interview, part 3 (on bearophile)

2010-10-05 Thread Juanjo Alvarez
On Tue, 05 Oct 2010 16:30:59 +0100, Bruno Medeiros 
 wrote:
I don't know about the rest of people here in the NG, but actually 
I 
would hope bearophile would post much less often, especially when 

its

I like to read his posts. If you used a NNTP reader on a smartphone 
(like, SPAM, the one I wrote for Android) you could reserve these 
posts for some moments like waiting in a queue or the tea to start 
boiling ;)


Re: About Andrei's interview, part 3 (on bearophile)

2010-10-06 Thread Juanjo Alvarez
On Wed, 06 Oct 2010 16:55:40 +0100, Bruno Medeiros 
 wrote:
Reading newsgroups on phone would suck. I already get a bit 
uncomfortable reading them on my laptop (without a peripheral 
monitor or 

mouse).


Not worse than reading email on a phone,trough the experience is 
course worse than on a computer.


Re: Type wrapping blockers

2010-10-06 Thread Juanjo Alvarez
On Wed, 06 Oct 2010 10:21:58 -0500, Andrei Alexandrescu 
 wrote:

also positive (see http://tinyurl.com/2ewh8eq).


404 Not Found. 


Should I open a bug report? ;)


Re: Tuple literal syntax

2010-10-07 Thread Juanjo Alvarez
On Wed, 06 Oct 2010 23:04:35 -0700, Walter Bright 
 wrote:

(a,0)[0]





as how a user could generate a tuple of 1. Awkward, sure, but like 
I said, I 

think this would be rare.


Python uses:

(5,) 


Which is a lot better IMHO


Re: About Andrei's interview, part 3 (on bearophile)

2010-10-07 Thread Juanjo Alvarez
Bruno Medeiros Wrote:

> On 06/10/2010 22:47, Juanjo Alvarez wrote:
> > On Wed, 06 Oct 2010 16:55:40 +0100, Bruno Medeiros
> >  wrote:
> >> Reading newsgroups on phone would suck. I already get a bit
> >> uncomfortable reading them on my laptop (without a peripheral
> > monitor or
> >> mouse).
> >
> > Not worse than reading email on a phone,trough the experience is course
> > worse than on a computer.
> 
> Oh, it is indeed worse that reading email on a phone, unless you also 
> use your email to have huge threaded discussions. Doesn't matter for me 
> in any case, as I also don't read email on a phone.

On my app you see the threaded messages in a screen and then when you tap or 
select a message its opened in another view, fullscreen. Go back and you are 
again in the threaded listing (which the read messages greyed), or tap Next and 
you go to the next message in the tree without existing the message view.

As I said, not the same level of conveniente than on a computer (you can't see 
the thread and the message at the same time), but still not so bad.



Re: Tuple assignment

2010-10-07 Thread Juanjo Alvarez
Denis Koroskin Wrote:


> That's because Python is not a strictly typed language. With proper type  
> propagation compiler helps you writing code the way in meant to be. E.g.  
> the following:
> 
> (a, b, c, d) = ('tuple', 'of', 'three')
> 
> could be statically disabled, but there is nothing wrong with allowing it  
> either: d would be just a no-op, you will know it for sure the moment you  
> try using it.

Python has the special symbol "_" which is used exactly as a no-op (you could 
call it "foo" it you wanted, but "_" 
doesn't create new memory assignments) so you can expand arbitrary tuples 
without creating new symbols:

a, b, c, _ = ('tuple', 'of', 'three')

I like the proposal for D, but I fear it could be a source of bugs (you expect 
the tuple to expand to 4 values
 but silently is expanding to only 3, leaving the fourth unchangued).





Re: Tuple literal syntax

2010-10-07 Thread Juanjo Alvarez
retard Wrote:


> Why do tuple fields need a name? Isn't this a new ad-hoc way to introduce 
> structural typing in D? I often start with tuples, but if it turns out 
> that the value is used in many places, it will be eventually replaced 
> with a struct (e.g. coordinates in a gui / gamedev) for better type 
> safety. Even with structs the need for field names is very rare. The real 
> need for tuples is in very special cases where the syntax needs to be 
> light.

I found they are useful for callbacks, when you can put, in a tuple, the 
delegate or function to the callback
 and in another nested tuple the delegate/function parameters.

This way you can define the callbacks to be used along with their parameters, 
even if their signature is different.

You could do the same with the callbacks having variable number and types of 
args, using a template, but I like 
this way more.



Re: Big executable?

2010-10-07 Thread Juanjo Alvarez
Justin Johansson Wrote:


> Naturally YMMV depending on the language translator that you use,
> and, as you have appropriately noted, your mileage experience is
> not climate-change friendly.

46 bytes on Linux, using serious hackery; interesting & funny read:

http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html





Re: Tuple assignment

2010-10-07 Thread Juanjo Alvarez
On Thu, 07 Oct 2010 15:14:12 -0400, bearophile 
 wrote:

This is false both in Python2 and Python3.



What is exactly false on what I said? 


a, *bc = ('tuple', 'of', 'three')


Yes, that's the syntax for assignment of the remainder, I was 
speaking about *ignoring* the remainder without having it assigned to 
the last element which was one of the proposed effects in the message 
before mine's.


Re: "in" everywhere

2010-10-07 Thread Juanjo Alvarez
On Thu, 7 Oct 2010 15:53:13 -0700, Jonathan M Davis 
 wrote:
Except that when you're dealing with generic code which has to deal 
with 
multiple container types (like std.algorithm), you _need_ certain 
complexity 
guarantees about an operation since it could happen on any 

container that it's

Then, don't use it in std.algorithm or any other code that needs 
guaranteed complexity, just like now. I don't see the problem with a 
generic "in" operator, nobody would be forced to use it.


Re: "in" everywhere

2010-10-08 Thread Juanjo Alvarez
Pelle Wrote:

> On 10/08/2010 03:18 AM, Juanjo Alvarez wrote:
> > On Thu, 7 Oct 2010 15:53:13 -0700, Jonathan M Davis
> >  wrote:
> >> Except that when you're dealing with generic code which has to deal
> > with
> >> multiple container types (like std.algorithm), you _need_ certain
> > complexity
> >> guarantees about an operation since it could happen on any
> > container that it's
> >
> > Then, don't use it in std.algorithm or any other code that needs
> > guaranteed complexity, just like now. I don't see the problem with a
> > generic "in" operator, nobody would be forced to use it.
> 
> What do you suggest for fast lookup in a container?

What is being used now? How can having "in" and not using it (just like now) in 
functions requiring guaranteed complexity can be worse than not having it?

The only drawback I can see to having an "in" operator with all containers is 
that some programmers would not read the documentation and use it expecting it 
to be fast. But then that also happens with many other language constructs and 
some programmers will write crappy algoritms anyway.


Re: "in" everywhere

2010-10-08 Thread Juanjo Alvarez
Steven Schveighoffer Wrote:

> On Thu, 07 Oct 2010 21:18:56 -0400, Juanjo Alvarez   
> wrote:
> 
> > On Thu, 7 Oct 2010 15:53:13 -0700, Jonathan M Davis  
> >  wrote:
> >> Except that when you're dealing with generic code which has to deal
> > with
> >> multiple container types (like std.algorithm), you _need_ certain
> > complexity
> >> guarantees about an operation since it could happen on any
> > container that it's
> >
> > Then, don't use it in std.algorithm or any other code that needs  
> > guaranteed complexity, just like now. I don't see the problem with a  
> > generic "in" operator, nobody would be forced to use it.
> 
> That kind of "documentation" is useless, it doesn't prevent use, and it  
> doesn't feel right to the person who accidentally uses it.  When I call
> 
> sort(x);
> 
> and it performs horribly, am I going to blame x or sort?  Certainly, I'll  
> never think it's my own fault :)
> 
> -Steve

True! And that's the only drawback I see on generalizing "in", but there are 
many things in programming languages that doesn't feel right when you don't
know the language well. That doesn't mean that D should be the "programming for 
dummies on rails with a constant automated tutor included" language; if I 
read well the site, it is mean to be a practical language with the ability to 
shot yourself in the foot.

Still, I don't understand how generalizing "in" could affect std.algorithm et 
al if they only use "in" for AAs, just like now.



Re: Tuple assignment

2010-10-08 Thread Juanjo Alvarez
On Fri, 08 Oct 2010 16:11:53 -0400, bearophile 
 wrote:

This syntax you have explained doesn't do what you think it does:
a, b, c, _ = ('tuple', 'of', 'three')


That was a typo, I meant to write:

a, b, _ = ('tuple', 'of', 'three')


Re: Why all the D hate?

2010-10-09 Thread Juanjo Alvarez

On Sun, 10 Oct 2010 13:04:57 +0900, Jordi  wrote:
Sorry, shameful mistake with my shell script skills. It is 50K 

lines :|

Mine is 4000 lines, having started to learn D from Andrei's book 
three weeks ago. D is not perfect but for me is perfect enough and 
will no doubt be my favorite general purpose language once we have 
and stable version.


Re: Is D right for me?

2010-10-11 Thread Juanjo Alvarez
On Sun, 10 Oct 2010 00:46:47 -0700, Jonathan M Davis 
 wrote:
working on the project without getting too frustrated over it. QtD 
is a huge 

service to the D community.


It is. Qt bindings were the first thing I looked for when I started 
with the language, even with my current project not using any GUI.


Re: Current status of DB libraries in D

2010-10-12 Thread Juanjo Alvarez
On Tue, 12 Oct 2010 17:31:50 -0400, Jesse Phillips 
 wrote:
I did actually do a big cleanup and removed a hug amount of 
obsolete content. 


It would also be nice to have the libraries sorted by D's version.


Re: What do people here use as an IDE?

2010-10-13 Thread Juanjo Alvarez
Michael Stover Wrote:

> Elephant appears dead.  Poseidon's activity is extremely low and is still 
> alpha after 5 years. LEDS is even less active, and DDT doesn't have a release 
> yet.  What do actual D programmers use?-Mike

I don't want to sound like one of those Unix condescending users 
(http://www.perturb.org/images/1/dilbert-unix.png) but with Vim loaded with the 
plugins "project", "nerd_tree", "nerd_commenter", "yankring", "taglist", "ack", 
"mru" and "bufferexplorer" I don't feel the need for any (graphical) IDE.




Re: improving the join function

2010-10-13 Thread Juanjo Alvarez
On Wed, 13 Oct 2010 16:42:35 -0400, "Steven Schveighoffer" 
 wrote:
Even though I consider myself a reasonable parser of function 
templates,  
sometimes in std.algorithm, I'll stare at a function signature for 
about  
10 minutes trying to figure out whether I can do what I want, give 
up and  

finally just try to compile it.





I think what might help is spelling out the constraints somehow and 


especially explaining how the alias parameters work.  They are some 
sort  

of black magic I don't always understand :)


Glad to see I'm not the only one :) The asserts help a lot there; I 
understood that module better looking at them than with the 
signatures. Adding more (or just adding some where they're missing). 

The template constraints is something that could definitely kill more 
trees in future editions of TDPL.


Re: improving the join function

2010-10-13 Thread Juanjo Alvarez
On Thu, 14 Oct 2010 01:30:42 +0200, Juanjo Alvarez 
 wrote:

signatures. Adding more (or just adding some where they're missing).


Truncated sentence, I wanted to say that adding more asserts would 
not hurt.


Re: [nomenclature] systems language

2010-10-14 Thread Juanjo Alvarez
On Thu, 14 Oct 2010 23:30:02 +1100, Justin Johansson  
wrote:

Touted often around here is the term "systems language".
May we please discuss a definition to be agreed upon
for the usage this term (at least in this community) and
also have some agreed upon examples of PLs that might also
be members of the "set of systems languages".


A system language allows you to:.

+ Use pointers
+ Do manual memory management 
+ Embed assembler

+ Call the operating system syscalls


Re: [nomenclature] systems language

2010-10-16 Thread Juanjo Alvarez
On Sat, 16 Oct 2010 10:36:48 +0200, "Paulo Pinto" 
 wrote:

No one in his perfect mind would say that C is not a systems
programming language, but it fails the Juanjo's checkpoint list,
hence my reply.


In my defense I must say that I never used a C compiler without an 
inline assembler.


Re: rationale for function and delegate

2010-10-16 Thread Juanjo Alvarez
On Sat, 16 Oct 2010 14:42:13 + (UTC), dsimcha  
wrote:
delegate with minimal overhead.  This mitigates the situation a 

lot, since if an
API requires a delegate and you have a function pointer, you just 

do a

toDelegate(someFunctionPointer).


Sorry for asking here something that should go to D.learn, but how do 
you do the reverse, that is, getting a function from a delegate? I 
need that in my project so I can pass it to signal so some Unix 
signal will trigger a method of an already instantiated object.


Re: duck!

2010-10-16 Thread Juanjo Alvarez
On Sat, 16 Oct 2010 09:30:27 +0200, "Christof Schardt" 
 wrote:

auto d = as!Drawable(c);


My turn:

auto d = implements!Drawable(c);


Re: rationale for function and delegate

2010-10-16 Thread Juanjo Alvarez
On Sat, 16 Oct 2010 11:57:36 -0400, "Steven Schveighoffer" 
 wrote:

auto dg = &obj.method;






auto fptr = dg.funcptr;
auto context = dg.ptr;






Note, you cannot call fptr, you will get a runtime error.


Thanks, I'll play with it to see if I can make this work in my code.


Re: rationale for function and delegate

2010-10-17 Thread Juanjo Alvarez
On Sun, 17 Oct 2010 19:15:48 +1000, "Daniel Murphy" 
 wrote:
I wrote some code a while back that lets you forward a windows 
callback to 

any delegate.  It might be a good starting point for what you want.






http://yebblies.com/thunk.d


Thanks genious ;)


Re: D is really cool

2017-05-15 Thread Juanjo Alvarez via Digitalmars-d

On Sunday, 14 May 2017 at 16:08:59 UTC, Ola Fosheim Grøstad wrote:

On Saturday, 13 May 2017 at 13:55:17 UTC, Russel Winder wrote:
anecdotal, there is no statistically significant data. But 
then Reddit is mostly opinion and advocacy research.


In my experience /r/programming has rather poor quality, but 
/r/cpp and other more specific groups tend to be much better.


The only reason to read /r/programming is to get a feeling for 
trends... I guess.


/r/programming is full of Rust fanboys that think that their 
language is the End of all problems. It's not only D related 
articles - Swift, Kotlin or any article about any other emerging 
language will almost have more ocurrentes of the word "Rust" in 
the comments that the language the article is about.


Really toxic community.