IMHO it should be IDE's job. When coding Java or C#, you select
Fix imports and IDE automatically removes unused imports and
adds new imports for undefined symbols.
By the way, what about syntax like this:
import std.*;
would it make sense?
On Monday, 15 October 2012 at 16:46:38 UTC, F i L wrote:
ps. I'm surprised I don't see a bunch of 'final ...' throughout
your code. I thought a big issue of yours in the past was D's
auto-virtual functions. Has something been changed in that area
that I missed, or have you just not gotten
On 2012-10-15, 19:13, Jacob Carlborg wrote:
Shouldn't it be possible to create a mixin that does this?
mixin require(std, xml, string);
Something like that. But you would still need to import the require
function.
Put it in object.d, then.
Still, I feel the language already has the
On 2012-10-15, 20:52, JN wrote:
IMHO it should be IDE's job. When coding Java or C#, you select Fix
imports and IDE automatically removes unused imports and adds new
imports for undefined symbols.
By the way, what about syntax like this:
import std.*;
would it make sense?
It sorta
On 15 October 2012 21:52, JN 666to...@wp.pl wrote:
IMHO it should be IDE's job. When coding Java or C#, you select Fix
imports and IDE automatically removes unused imports and adds new imports
for undefined symbols.
Can you name an (industry standard) IDE that works well with D?
By the
On Monday, 15 October 2012 at 17:19:43 UTC, so wrote:
On Monday, 15 October 2012 at 16:37:08 UTC, Peter Alexander
wrote:
...
- Simple(r) templates
I keep seeing things like this and probably i am failing to
understand it.
This is a vast understatement for D templates. Yes, easier to
use, i
On 10/15/2012 10:05 AM, Andrei Alexandrescu wrote:
I've been talking to Iain Buclaw, gdc's leader, and was surprised to learn he
has a quite workable ARM port available. To make it production-ready, we should
have some continuous test integration, which entails ssh access to an ARM/Debian
On Mon, Oct 15, 2012 at 08:46:21PM +0200, Gerry Weaver wrote:
[...]
It just occurred to me that I've seen this type of file issue
before. If memory serves, it was related to the attempt to load a
64bit lib on a 32bit system. It was an odd problem, because it
didn't fail in the way one would
On Monday, 15 October 2012 at 18:46:22 UTC, Gerry Weaver wrote:
On Monday, 15 October 2012 at 18:03:10 UTC, H. S. Teoh wrote:
On Mon, Oct 15, 2012 at 07:51:59PM +0200, Gerry Weaver wrote:
On Monday, 15 October 2012 at 17:36:10 UTC, Ali Çehreli
wrote:
[...]
That is the most plausible reason so
On 15 October 2012 19:46, F i L witte2...@gmail.com wrote:
On Monday, 15 October 2012 at 11:52:49 UTC, Manu wrote:
We did a 48hr game jam at work this past weekend.
We decided to do our entry in D, to further prove that D was a viable and
productive solution for real-world game dev.
Here's
On Monday, 15 October 2012 at 19:15:44 UTC, Manu wrote:
[...]
In my case, I don't want to import everything.
how about something along the lines of Pythons
from X import Y, Z
where X would specifically be a package, and Y and Z would be the
modules imported. This should keep things
On Mon, Oct 15, 2012 at 09:18:33PM +0200, Peter Alexander wrote:
[...]
I'm going to start a bit of a rant now.
D templates are certainly powerful, and are inarguably an
improvement over C++ templates, but they are still based on C++
templates, and inherit a lot of their fundamental problems.
On 2012-10-15 21:13, Simen Kjaeraas wrote:
By the way, what about syntax like this:
import std.*;
would it make sense?
It sorta would, but creating an all.d file and importing std.all
instead works just as fine.
I would really like to have this feature instead of having to manually
On 15 October 2012 20:31, Walter Bright newshou...@digitalmars.com wrote:
On 10/15/2012 10:05 AM, Andrei Alexandrescu wrote:
I've been talking to Iain Buclaw, gdc's leader, and was surprised to learn
he
has a quite workable ARM port available. To make it production-ready, we
should
have
Andrei Alexandrescu:
Well there's a tension here: good language design generally
aims at providing few general features applicable to many use
cases. Encoding particular use cases in the language is
warranted by either disproportionate frequency in use or
disproportionate difficulty in
On Monday, 15 October 2012 at 19:38:24 UTC, H. S. Teoh wrote:
On Mon, Oct 15, 2012 at 08:46:21PM +0200, Gerry Weaver wrote:
[...]
It just occurred to me that I've seen this type of file issue
before. If memory serves, it was related to the attempt to
load a
64bit lib on a 32bit system. It was
On Monday, 15 October 2012 at 17:58:13 UTC, H. S. Teoh wrote:
Now try doing this in C++. It is in all likelihood plain
impossible, or
so extremely painful that it's not worth the suffering to
implement.
T
Having read some Lisp recently, i was so lucky it was not my
first language.
It
On Monday, 15 October 2012 at 19:52:44 UTC, H. S. Teoh wrote:
On Mon, Oct 15, 2012 at 09:18:33PM +0200, Peter Alexander wrote:
std/algorithm.d(2020): Error: undefined identifier 'length'
... similar errors from inside std.algorithm ...
This looks like a bug. There should be signature
How do I go about setting Exception Handlers? I haven't really
seen anything about doing this on the dlang.org site, so do I
need to head over to MSDN and use their functions, or is there a
D-specific method of doing this? I'd assume the latter, as the
exceptions are apparently SEH on Windows
On Monday, 15 October 2012 at 19:18:34 UTC, Peter Alexander wrote:
I'm going to start a bit of a rant now.
...
On this one, i agree everything you say. D templates inherit
quite a bit of errors.
I have problem with the attitude of some people (not necessarily
you). As they say D templates
On Monday, 15 October 2012 at 20:33:36 UTC, so wrote:
On Monday, 15 October 2012 at 19:18:34 UTC, Peter Alexander
wrote:
I'm going to start a bit of a rant now.
...
On this one, i agree everything you say. D templates inherit
quite a bit of errors.
I have problem with the attitude of
On Monday, 15 October 2012 at 20:20:28 UTC, so wrote:
On Monday, 15 October 2012 at 17:58:13 UTC, H. S. Teoh wrote:
Now try doing this in C++. It is in all likelihood plain
impossible, or
so extremely painful that it's not worth the suffering to
implement.
T
Having read some Lisp
On Monday, 15 October 2012 at 20:19:22 UTC, Gerry Weaver wrote:
On Monday, 15 October 2012 at 19:38:24 UTC, H. S. Teoh wrote:
On Mon, Oct 15, 2012 at 08:46:21PM +0200, Gerry Weaver wrote:
[...]
It just occurred to me that I've seen this type of file issue
before. If memory serves, it was
On 10/15/12 4:12 PM, bearophile wrote:
Andrei Alexandrescu:
Well there's a tension here: good language design generally aims at
providing few general features applicable to many use cases. Encoding
particular use cases in the language is warranted by either
disproportionate frequency in use or
On Mon, Oct 15, 2012 at 10:40:12PM +0200, Paulo Pinto wrote:
On Monday, 15 October 2012 at 20:33:36 UTC, so wrote:
[...]
I have problem with the attitude of some people (not necessarily
you). As they say D templates are just better because of things
like syntax, other than that you could
I think we need something like these in Phobos -- I was quite
surprised that I didn't find these in Phobos. They're really
handy in Python.
auto groupby(alias Key = k = k, alias Value = v = v, alias
Equal = (a, b) = a == b, R)(R range)
if (isInputRange!(R))
{
struct GroupBy
On Oct 11, 2012, at 12:23 AM, Jacob Carlborg d...@me.com wrote:
What is actually supposed to work on Mac OS X in regards to debugging and
exception?
When an exception is thrown I do get a backtrace but without line
information. Does this work on any other platform? Is it supposed to be
On Monday, 15 October 2012 at 21:29:11 UTC, H. S. Teoh wrote:
If you think forbidding templates/STL is crazy, wait till you
hear about
the people who insist that const is evil and ban it from their
codebase.
(That was from before C++11, though, I don't know what their
reaction
would be now
On Mon, Oct 15, 2012 at 11:52:19PM +0200, so wrote:
On Monday, 15 October 2012 at 21:29:11 UTC, H. S. Teoh wrote:
If you think forbidding templates/STL is crazy, wait till you hear
about the people who insist that const is evil and ban it from their
codebase. (That was from before C++11,
On Monday, 15 October 2012 at 20:45:39 UTC, Gerry Weaver wrote:
On Monday, 15 October 2012 at 20:19:22 UTC, Gerry Weaver wrote:
On Monday, 15 October 2012 at 19:38:24 UTC, H. S. Teoh wrote:
On Mon, Oct 15, 2012 at 08:46:21PM +0200, Gerry Weaver wrote:
[...]
It just occurred to me that I've
On Monday, 15 October 2012 at 22:14:48 UTC, H. S. Teoh wrote:
On Mon, Oct 15, 2012 at 11:52:19PM +0200, so wrote:
On Monday, 15 October 2012 at 21:29:11 UTC, H. S. Teoh wrote:
If you think forbidding templates/STL is crazy, wait till you
hear
about the people who insist that const is evil and
Mehrdad:
auto groupby(alias Key = k = k, alias Value = v = v, alias
Equal = (a, b) = a == b, R)(R range)
if (isInputRange!(R))
I have not studied the semantics of this groupby, but Phobos
contains a std.algorithm.group that is not too much different
from the Python itertools
On 15 October 2012 23:21, Gerry Weaver ger...@compvia.com wrote:
On Monday, 15 October 2012 at 20:45:39 UTC, Gerry Weaver wrote:
On Monday, 15 October 2012 at 20:19:22 UTC, Gerry Weaver wrote:
On Monday, 15 October 2012 at 19:38:24 UTC, H. S. Teoh wrote:
On Mon, Oct 15, 2012 at 08:46:21PM
On 10/15/12 5:35 PM, Mehrdad wrote:
I think we need something like these in Phobos -- I was quite surprised
that I didn't find these in Phobos. They're really handy in Python.
[snip]
Ideas?
Yes, I wanted to add some relational operators forever! There's a
group() function in std.algorithm
On Tue, Oct 16, 2012 at 12:34:44AM +0200, Paulo Pinto wrote:
On Monday, 15 October 2012 at 22:14:48 UTC, H. S. Teoh wrote:
[...]
It *is* a pretty crazy idea to prohibit STL, seeing as STL is what
makes writing container-related C++ code bearable. I have horrible
memories of the Bad Old Days
Andrei Alexandrescu:
I don't think that compares apples to apples, as the entire
feature combination present into either language must be taken
into account.
I agree that features must take in account the specific ecology
of the other features of a language. And I agree the problem I am
On Mon, 15 Oct 2012 06:46:40 -0500, Oleg gaol...@i.ua wrote:
There is code
http://pastebin.com/KyhFdx36
Looks pretty good, haven't tried it or anything yet.
One suggestion that I would make is that you have code like:
enum _gpgme_attr_t {
...
}
alias _gpgme_attr_t gpgme_attr_t;
It would
They have released the many slides packs of the Strange Loop
2012 conference:
https://github.com/strangeloop/strangeloop2012/tree/master/slides/sessions
(Some of those files are too much large for the normal GitHub
interface, so to download them you need to download the zip of
the whole
On Monday, 15 October 2012 at 22:35:41 UTC, Andrei Alexandrescu
wrote:
On 10/15/12 5:35 PM, Mehrdad wrote:
I think we need something like these in Phobos -- I was quite
surprised
that I didn't find these in Phobos. They're really handy in
Python.
[snip]
Ideas?
Yes, I wanted to add some
On Mon, 15 Oct 2012 13:38:31 -0500, Chris Nicholson-Sauls
ibisbase...@gmail.com wrote:
On Monday, 15 October 2012 at 15:37:06 UTC, Andrei Alexandrescu wrote:
I don't think imports from a specific package have been considered.
In my personal opinion, imports are a necessary evil and it's
On Mon, 15 Oct 2012 06:24:57 -0500, Paulo Pinto pj...@progtools.org
wrote:
On Monday, 15 October 2012 at 11:20:26 UTC, bearophile wrote:
Jacob Carlborg:
How should DMD detect if you're building a (dynamic) library? Sure it
can see that you're not using -lib or -shared but what about
On Sun, 14 Oct 2012 23:39:42 -0500, H. S. Teoh hst...@quickfur.ath.cx
wrote:
On Mon, Oct 15, 2012 at 06:20:03AM +0200, Alex Rønne Petersen wrote:
On 15-10-2012 05:10, Gerry Weaver wrote:
[...]
dmd hello.d
Here is the output:
/usr/lib/i386-linux-gnu/libphobos2.a(dmain2_459_1a5.o): In
On Mon, 15 Oct 2012 04:58:14 -0500, Don Clugston d...@nospam.com wrote:
On 15/10/12 11:14, Jacob Carlborg wrote:
Just use DVM, it's also cross-platform:
https://bitbucket.org/doob/dvm
I tried that on both Windows and Ubuntu, and couldn't get it to work on
either of them. I posted a couple
On Monday, 15 October 2012 at 23:43:53 UTC, 1100110 wrote:
I like what vibe.d did by having an import all file named d.d
Therefore you can:
import vibe.d;
It's nice, it's clean, and I've blatantly stolen it for a few
of my own projects.
It's cute, but I think it is terribly misleading. I
On Mon, 15 Oct 2012 14:31:58 -0500, Walter Bright
newshou...@digitalmars.com wrote:
On 10/15/2012 10:05 AM, Andrei Alexandrescu wrote:
I've been talking to Iain Buclaw, gdc's leader, and was surprised to
learn he
has a quite workable ARM port available. To make it production-ready,
we
On Mon, 15 Oct 2012 19:10:02 -0500, Peter Alexander
peter.alexander...@gmail.com wrote:
On Monday, 15 October 2012 at 23:43:53 UTC, 1100110 wrote:
I like what vibe.d did by having an import all file named d.d
Therefore you can:
import vibe.d;
It's nice, it's clean, and I've blatantly
On 16 October 2012 01:16, 1100110 0b1100...@gmail.com wrote:
On Mon, 15 Oct 2012 14:31:58 -0500, Walter Bright
newshou...@digitalmars.com wrote:
On 10/15/2012 10:05 AM, Andrei Alexandrescu wrote:
I've been talking to Iain Buclaw, gdc's leader, and was surprised to
learn he
has a quite
On Mon, 15 Oct 2012, 1100110 wrote:
On Mon, 15 Oct 2012 14:31:58 -0500, Walter Bright newshou...@digitalmars.com
wrote:
On 10/15/2012 10:05 AM, Andrei Alexandrescu wrote:
I've been talking to Iain Buclaw, gdc's leader, and was surprised to learn
he
has a quite workable ARM port
On Monday, October 15, 2012 23:35:59 Mehrdad wrote:
auto sorted(alias F = q{a b}, SwapStrategy S =
SwapStrategy.unstable, R)(R range)
{
auto arr = range.array();
arr.sort!(F, S)();
return arr;
}
What does this gain over sort? If you use sort
auto result = sort(range);
you get a
Thanks to an idea by Andrei, I now have an implementation of the
Cartesian product of two infinite ranges that requires only forward
ranges.
However, I'm running into an array-out-of-bounds problem with
std.algorithm.joiner, and I don't know how to reduce the code to track
down the problem.
On Monday, October 15, 2012 11:56:33 Steven Schveighoffer wrote:
Yeah, It's extra work. But essentially, isn't this what you want? The
thing about disabling invariant checks on some specific function in some
specific case is that someone else has a valid case for requiring it.
I've considered
On Mon, 15 Oct 2012 19:39:21 -0500, Brad Roberts
bra...@slice-2.puremagic.com wrote:
On Mon, 15 Oct 2012, 1100110 wrote:
On Mon, 15 Oct 2012 14:31:58 -0500, Walter Bright
newshou...@digitalmars.com
wrote:
On 10/15/2012 10:05 AM, Andrei Alexandrescu wrote:
I've been talking to Iain
On Mon, 15 Oct 2012 19:33:06 -0500, Iain Buclaw ibuc...@ubuntu.com wrote:
On 16 October 2012 01:16, 1100110 0b1100...@gmail.com wrote:
On Mon, 15 Oct 2012 14:31:58 -0500, Walter Bright
newshou...@digitalmars.com wrote:
On 10/15/2012 10:05 AM, Andrei Alexandrescu wrote:
I've been talking to
On 10/15/2012 5:39 PM, Brad Roberts wrote:
I wouldn't go out and buy one just for this. The raspberry's are pretty
underpowered anyway.
They're so cheap, it's no big deal even if they're a total loss.
On 16 October 2012 01:47, H. S. Teoh hst...@quickfur.ath.cx wrote:
On Tue, Oct 16, 2012 at 12:34:44AM +0200, Paulo Pinto wrote:
On Monday, 15 October 2012 at 22:14:48 UTC, H. S. Teoh wrote:
[...]
It *is* a pretty crazy idea to prohibit STL, seeing as STL is what
makes writing
On 16 October 2012 02:39, 1100110 0b1100...@gmail.com wrote:
On Mon, 15 Oct 2012 13:38:31 -0500, Chris Nicholson-Sauls
ibisbase...@gmail.com wrote:
On Monday, 15 October 2012 at 15:37:06 UTC, Andrei Alexandrescu wrote:
I don't think imports from a specific package have been considered.
On Tuesday, 16 October 2012 at 00:42:55 UTC, Jonathan M Davis
wrote:
On Monday, October 15, 2012 23:35:59 Mehrdad wrote:
auto sorted(alias F = q{a b}, SwapStrategy S =
SwapStrategy.unstable, R)(R range)
{
auto arr = range.array();
arr.sort!(F, S)();
return arr;
}
What does this gain over
I like what vibe.d did by having an import all file named d.d
Therefore you can:
import vibe.d;
It's nice, it's clean, and I've blatantly stolen it for a few of my own
projects.
O_O .. That might be one of the worst things I've ever seen!
It doesn't even make sense. Is there actually a
On Tuesday, October 16, 2012 03:29:17 Mehrdad wrote:
On Tuesday, 16 October 2012 at 00:42:55 UTC, Jonathan M Davis
wrote:
On Monday, October 15, 2012 23:35:59 Mehrdad wrote:
auto sorted(alias F = q{a b}, SwapStrategy S =
SwapStrategy.unstable, R)(R range)
{
auto arr = range.array();
I like the idea of being able to either import a module, or
package, with being able to choose what you want to import from
it.
Something like
import std.stdio : writeln; (already exists)
import std : stdio, algorithm;
or just 'import std', though for something like std that would of
course
On Tuesday, 16 October 2012 at 01:47:58 UTC, Jonathan M Davis
wrote:
It should probably explain the rationale behind returning
SortedRange so that it's much clearer as to why you'd want to
use the return value rather than the original (now sorted)
range.
+1
As it stands it's not at all
Why is it an error to have a singly-linked list of Tuple!(int)?
phobos\std\container.d(938):
Error: function
std.typecons.Tuple!(int).Tuple
.opEquals!(const(Tuple!(int)))
.opEquals (const(Tuple!(int)) rhs)
is not callable using argument types
(const(Tuple!(int))) const
Error: template instance
On Tuesday, October 16, 2012 04:36:37 Mehrdad wrote:
Why is it an error to have a singly-linked list of Tuple!(int)?
phobos\std\container.d(938):
Error: function
std.typecons.Tuple!(int).Tuple
.opEquals!(const(Tuple!(int)))
.opEquals (const(Tuple!(int)) rhs)
is not callable using argument
On Monday, 15 October 2012 at 20:41:55 UTC, Paulo Pinto wrote:
Now imagine those that have experimented how powerful Lisp and
Smalltalk based OS were.
It is so sad to see IDE makers still trying to replicate the
experience from those environments.
--
Paulo
Thanks for mentioning that,
It seems D comes up often in Rust threads :-)
http://www.reddit.com/r/programming/comments/11j38z/mozilla_and_the_rust_team_announce_version_04_of/
I still think D and Rust should join forces to design a single GC
usable for both languages :-) Their GC needs are not _that_
different.
A
For me syntax alias int Int; seems unnatural.
I'd love to write
alias Int = int;
alias fptr = void(int)*;
This looks much more readable for me and harmonized with
int x = 0;
template T(alias A = Object) {...}
Does anybody share this opinion?
Any chance this syntax goes into D someday?
stas:
Does anybody share this opinion?
Any chance this syntax goes into D someday?
You are not the first one to suggest similar ideas :-)
I think the general answer is: Not big enough improvement to
justify a language change. But I agree your syntax is better.
Maybe it's too much late to
On Tue, 16 Oct 2012 05:00:56 +0200
stas stas...@yahoo.com wrote:
For me syntax alias int Int; seems unnatural.
I'd love to write
alias Int = int;
alias fptr = void(int)*;
This looks much more readable for me and harmonized with
int x = 0;
template T(alias A = Object) {...}
Does
On 10/16/12, Nick Sabalausky seewebsitetocontac...@semitwist.com wrote:
I'm pretty sure it was already decided that this would be added, but
just hasn't made it in yet. I've been fairly eager for it. I find the
current syntax too inconsistent and confusing.
Yep.
Paging Dr. Kenji!
Am Mon, 15 Oct 2012 23:18:33 -0400
schrieb Nick Sabalausky seewebsitetocontac...@semitwist.com:
On Tue, 16 Oct 2012 05:00:56 +0200
stas stas...@yahoo.com wrote:
Does anybody share this opinion?
Any chance this syntax goes into D someday?
I'm pretty sure it was already decided that this
Am Tue, 16 Oct 2012 04:48:07 +0200
schrieb bearophile bearophileh...@lycos.com:
It seems D comes up often in Rust threads :-)
And you are here to remedy that situation?
No offense, I started to keep an eye on Rust myself. I'm
pretty sure it will eventually have to cater to the people who
use it
On Monday, October 15, 2012 23:18:33 Nick Sabalausky wrote:
I'm pretty sure it was already decided that this would be added, but
just hasn't made it in yet.
We'd have to dig through the newsgroup archives to be sure on that one. I'm
pretty sure that it _wasn't_ decided that we'd add it, but I
On Tuesday, October 16, 2012 06:08:27 Marco Leise wrote:
Just recently I wondered how the current syntax could possibly
have come into existence. )
It's the same as C's typedef syntax.
- Jonathn M Davis
In an effort to locate the suspected Phobos bug that I ran into in my
new Cartesian product implementation, I looked over the code for
std.algorithm joiner more carefully, and noticed the following:
Given a range of ranges ror, it assigns ror.front to a struct member and
then calls ror.popFront()
On 10/16/12, Jonathan M Davis jmdavisp...@gmx.com wrote:
We'd have to dig through the newsgroup archives
Nah just ask Andrei he already confirmed this once.
On Tuesday, 16 October 2012 at 04:32:29 UTC, Jonathan M Davis
wrote:
On Tuesday, October 16, 2012 06:08:27 Marco Leise wrote:
Just recently I wondered how the current syntax could possibly
have come into existence. )
It's the same as C's typedef syntax.
- Jonathn M Davis
Alias is not the
On Tuesday, October 16, 2012 07:17:54 Rob T wrote:
On Tuesday, 16 October 2012 at 04:32:29 UTC, Jonathan M Davis
wrote:
On Tuesday, October 16, 2012 06:08:27 Marco Leise wrote:
Just recently I wondered how the current syntax could possibly
have come into existence. )
It's the same
On Sunday, 7 October 2012 at 19:25:06 UTC, Andrei Alexandrescu
wrote:
On 10/7/12 1:06 PM, Paulo Pinto wrote:
The important thing are interfaces, as such you're not
bringing external
dependencies. Unless the D community decides to have the
drivers as part
of the language (comes with batteries
On Monday, October 15, 2012 22:09:05 H. S. Teoh wrote:
The scary thing is, I see similar code like this all over Phobos. Does
this mean that most of std.algorithm may need to be revised to address
this issue? At the very least, it would seem that a code audit is in
order to weed out this
Hi,
Is there a GC-free hash map implementation for D somewhere on the
intertubes? (Preferably in a Git repository and under a
liberal/non-viral license.)
--
Alex Rønne Petersen
a...@lycus.org
http://lycus.org
On 15-10-2012 08:49, Alex Rønne Petersen wrote:
Hi,
Is there a GC-free hash map implementation for D somewhere on the
intertubes? (Preferably in a Git repository and under a
liberal/non-viral license.)
... s/have/have a/ ...
--
Alex Rønne Petersen
a...@lycus.org
http://lycus.org
On 2012-10-15 01:56, Jonathan M Davis wrote:
However, I believe that another option is to explicitly tell the GC not
collect a chunk of memory (glancing at core.memory, I suspect that removeRoot
is the function to use for that, but I've never done it before, so I'm not
well acquainted with the
On 2012-10-15 08:49, Alex Rønne Petersen wrote:
Hi,
Is there a GC-free hash map implementation for D somewhere on the
intertubes? (Preferably in a Git repository and under a
liberal/non-viral license.)
It looks like Martin Nowak has that in his SharedRuntime branch of druntime:
On Sunday, 14 October 2012 at 19:50:54 UTC, Artur Skawina wrote:
On 10/14/12 08:13, Maxim Fomin wrote:
The only mentioned reason is to allow writing operator
overloading methods outside type scope - just because somebody
(currently two people) consider it logical to broaden UFCS
usage.
It's
Been watching online lectures that's going into sorting and
searching, and from what I'm seeing most sorting algorithms (by
using comparison; merge sort, quicksort, etc) and even tree
algorithms peak at O(n log n). So an example area to be sorted
with 16 elements would take on average about
On Sunday, 14 October 2012 at 20:15:15 UTC, Tommi wrote:
On Sunday, 14 October 2012 at 07:14:25 UTC, Maxim Fomin wrote:
If this request is approved and compiler has opUnary
definition outside type (which suits better then alias
this) such function would hijack alias this.
Free functions
Hi,
I wanted to write very simple Markup lexer, that would recognize
HTML/XML tags, not structurally, only lexically.
DMD generates some error which I don't understand, either there is a
problem in my grammar, or possibly a bug in Pegged:
import pegged.grammar;
import pegged.peg;
enum mp=`
On 10/15/12 10:17, Maxim Fomin wrote:
On Sunday, 14 October 2012 at 19:50:54 UTC, Artur Skawina wrote:
On 10/14/12 08:13, Maxim Fomin wrote:
The only mentioned reason is to allow writing operator overloading methods
outside type scope - just because somebody (currently two people) consider
On Mon, Oct 15, 2012 at 1:04 PM, Era Scarecrow rtcv...@yahoo.com wrote:
On Monday, 15 October 2012 at 09:18:12 UTC, Era Scarecrow wrote:
So an example area to be sorted with 16 elements would take on average
about 100 compares while theoretically you can do it in half that number.
On 2012-10-15 13:51, CapitalLetterC wrote:
This will be my first posting here, but I've been obsessed with D since
before there was a D2 standard. Despite that rather long period of
obsession, it's only just now that I've started seriously using D as I
attempt to code-up some POC projects to
How can I do this?
I have this code: http://dpaste.dzfl.pl/d9165502
And as you can see, the templated function 'receive2' take
automatically dynamic arrays. But how can I tell the compiler,
that this function takes (preferably) static arrays?
My little hack function 'receive' take the type
On 2012-05-15 16:10, Namespace rswhi...@googlemail.com wrote:
How can I do this?
I have this code: http://dpaste.dzfl.pl/d9165502
And as you can see, the templated function 'receive2' take automatically
dynamic arrays. But how can I tell the compiler, that this function
takes (preferably)
So there is no way that the compiler knows by himself how many
elements are in the array? something like this:
void receive(T, size_t n = vals.length)(T[n] vals) {
writeln(typeof(vals).stringof);
}
or:
void receive(T)(T[vals.length] vals) {
writeln(typeof(vals).stringof);
}
On Monday, 15 October 2012 at 15:10:43 UTC, bearophile wrote:
Namespace:
So there is no way that the compiler knows by himself how many
elements are in the array?
The syntax I have suggested doesn't have the problem you fear.
Why don't you compile and run a little test program?
Bye,
Namespace:
So there is no way that the compiler knows by himself how many
elements are in the array?
The syntax I have suggested doesn't have the problem you fear.
Why don't you compile and run a little test program?
Bye,
bearophile
void main()
{
struct S { int payload; }
S* s = new shared (S); // Why this is a illegal?
}
Error: cannot implicitly convert expression (new shared(S)) of
type shared(S)* to S*
On 2012-23-15 16:10, Simen Kjaeraas simen.kja...@gmail.com wrote:
On 2012-05-15 16:10, Namespace rswhi...@googlemail.com wrote:
How can I do this?
I have this code: http://dpaste.dzfl.pl/d9165502
And as you can see, the templated function 'receive2' take
automatically dynamic arrays. But
Hi,
Of course I can. But I evaluated this as my failure coming from fact
that D is new to me. So I was not sure if this is a bug in Pegged. So I
wrote here.
Dňa 15. 10. 2012 14:01 Philippe Sigaud wrote / napísal(a):
On Mon, Oct 15, 2012 at 12:24 PM, Lubos Pintes lubos.pin...@gmail.com
On Monday, 15 October 2012 at 15:15:57 UTC, denizzzka wrote:
S* s = new shared (S); // Why this is a illegal?
Error: cannot implicitly convert expression (new shared(S)) of
type shared(S)* to S*
Because shared(S) and S are different types. Either declare s as
shared too or use a cast.
On Monday, 15 October 2012 at 15:27:03 UTC, thedeemon wrote:
On Monday, 15 October 2012 at 15:15:57 UTC, denizzzka wrote:
S* s = new shared (S); // Why this is a illegal?
Error: cannot implicitly convert expression (new shared(S)) of
type shared(S)* to S*
Because shared(S) and S are
101 - 200 of 239 matches
Mail list logo