On 21 April 2014 04:03, ketmar via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:
On Sunday, 20 April 2014 at 15:17:56 UTC, Manu via Digitalmars-d-announce
wrote:
https://github.com/TurkeyMan/superemu
wow, my google-fu is bad than. %-) doing 'git clone' right now.
btw,
btw, what is the license for your code?
I don't really care. Refer to it as much as you like.
so maybe you will add license to sources? WTFPL, for example,
which basically means public domain. the thing is that sources
without license are proprietary, and nobody except the author can
do
On Tue, Apr 22, 2014 at 11:17:32 +1000, Manu via Digitalmars-d-announce wrote:
Yeah I know, I just never expected anyone else to take interest.
I'm often torn between gpl and bsd/zlib.
FYI, if you're using the free services on GitHub, it *must* be FOSS. I
think the GitHub terms of service
Conventional windows 32-bit libraries are incompatible with dmd.
Either compile iup with dmc, link it as a dll or use gdc or ldc.
On Sunday, 20 April 2014 at 13:01:53 UTC, Gary Willoughby wrote:
On Sunday, 20 April 2014 at 11:12:42 UTC, Lars T. Kyllingstad
wrote:
However, in D, all functions defined in the same module as a
class will have access to the private state of that class, on
an equal footing with its member
On Sunday, 20 April 2014 at 20:36:58 UTC, Andrei Alexandrescu
wrote:
On 4/20/14, 12:11 AM, Lars T. Kyllingstad wrote:
The fact that private really means module private in D
means that
any number of functions can break when a class/struct
implementation
changes.
No, only those in that
On 20 Apr 2014 13:19, Artur Skawina via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On 04/20/14 03:00, Iain Buclaw via Digitalmars-d wrote:
On 19 April 2014 17:10, Artur Skawina via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On 04/19/14 16:21, Iain Buclaw via Digitalmars-d
On 21 Apr 2014 09:56, Iain Buclaw ibuc...@gdcproject.org wrote:
On 20 Apr 2014 13:19, Artur Skawina via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On 04/20/14 03:00, Iain Buclaw via Digitalmars-d wrote:
On 19 April 2014 17:10, Artur Skawina via Digitalmars-d
Timon Gehr:
In which case? In case some version of LDC2 is able to avoid
the heap allocation using full optimizations? :o)
Please take a look, I have just added one more note in the
optimizations section:
http://wiki.dlang.org/DIP60#Behaviour_in_presence_of_optimizations
Bye,
bearophile
On Friday, 18 April 2014 at 16:40:32 UTC, Aleksandar Ruzicic
wrote:
I have 27'' monitor with resolution of 2560x1440 and
Yeah, me too...
left-aligned websites are really hard to read!
...so I have no idea what you're even talking about with this
statement.
There is a reason why most
On Monday, 21 April 2014 at 08:33:21 UTC, Lars T. Kyllingstad
wrote:
This is the tricky part, an it is where I have a hard time
deciding which to use. For example:
struct File {
private int fileno;
void read(ubyte[] buf) {
core.sys.posix.unistd.read(fileno,
On Saturday, 19 April 2014 at 00:08:06 UTC, Kapps wrote:
I do agree that the design of the current site is rather dated.
I rather like your new proposed design as well. One thing that
could be nicer is the search bar being a button to click. It's
standard now to just make it an input of type
On Fri, 18 Apr 2014 20:17:59 -0400, Walter Bright
newshou...@digitalmars.com wrote:
On 4/18/2014 5:30 AM, Steven Schveighoffer wrote:
Absolutely not, the compiler knows whether the count needs to be
incremented, I
don't need to know.
But there are manual escapes from it, meaning you need
On Friday, 18 April 2014 at 20:28:07 UTC, Aleksandar Ruzicic
wrote:
I really like rust-lang.org, I was thinking of using it as a
base for design but decided against it because I don't want
dlang.org to be accused of ripping of rust-lang.org.
This navigation layout was used for centuries in
On Sat, 19 Apr 2014 17:06:21 -0400, Nick Sabalausky
seewebsitetocontac...@semitwist.com wrote:
On 4/18/2014 1:24 PM, Steven Schveighoffer wrote:
On Fri, 18 Apr 2014 12:40:31 -0400, Aleksandar Ruzicic
aleksan...@ruzicic.info wrote:
I must respectfully disagree about retaining left
On Sun, 20 Apr 2014 03:33:46 -0400, Ola Fosheim Grøstad
ola.fosheim.grostad+dl...@gmail.com wrote:
It does not peek my interest
Sorry, don't take this the wrong way, it's my OCD, not your fault ;)
But it's pique
-Steve
On Monday, 21 April 2014 at 12:21:20 UTC, Steven Schveighoffer
wrote:
Sorry, don't take this the wrong way, it's my OCD, not your
fault ;)
Of course it is my fault! I always thought it was peak, thanks
for extending my vocabulary. Now I have figure out not only when
to use peek or peak, but
On Sun, 20 Apr 2014 03:11:39 -0400, Lars T. Kyllingstad
pub...@kyllingen.net wrote:
So, can anyone think of some good guidelines for when to make a function
a member, when to write it as a free function in the same module, and
when to move it to a different module?
First, you rightly
On Monday, 21 April 2014 at 08:33:21 UTC, Lars T. Kyllingstad
wrote:
On Sunday, 20 April 2014 at 13:01:53 UTC, Gary Willoughby wrote:
Yeah it does. If the function can be used generically across
many different parts of the program then it would be much
better implemented as a non-member
On Monday, 21 April 2014 at 11:42:54 UTC, Kagamin wrote:
Autofocus breaks site navigation: instead of returning to where
you were previously, you end up focused on search box, which is
really annoying. It also breaks page navigation (similar
mistake: floating top panel on dart site). Whether
On Monday, 21 April 2014 at 12:45:12 UTC, Steven Schveighoffer
wrote:
[...]
Reasons off the top of my head not to make them module
functions:
1. You can import individual symbols from modules. i.e.:
import mymodule: MyType;
If a large portion of your API is module-level functions, this
On Monday, 21 April 2014 at 13:03:50 UTC, Ola Fosheim Grøstad
wrote:
On Monday, 21 April 2014 at 08:33:21 UTC, Lars T. Kyllingstad
wrote:
On Sunday, 20 April 2014 at 13:01:53 UTC, Gary Willoughby
wrote:
Yeah it does. If the function can be used generically across
many different parts of the
On 4/21/14, Steven Schveighoffer via Digitalmars-d
digitalmars-d@puremagic.com wrote:
Reasons off the top of my head not to make them module functions
Here's another one, the bug report is about enums but it showcases an
issue with module-scoped functions taking struct parameters (in short:
On Mon, 21 Apr 2014 09:46:18 -0400, Lars T. Kyllingstad
pub...@kyllingen.net wrote:
On Monday, 21 April 2014 at 12:45:12 UTC, Steven Schveighoffer wrote:
3. There is zero chance of a conflict with another type's similarly
named method.
How? If you have the following functions:
void
On Mon, 21 Apr 2014 09:46:18 -0400, Lars T. Kyllingstad
pub...@kyllingen.net wrote:
On Monday, 21 April 2014 at 12:45:12 UTC, Steven Schveighoffer wrote:
3. There is zero chance of a conflict with another type's similarly
named method.
How? If you have the following functions:
On Monday, 21 April 2014 at 14:10:08 UTC, Steven Schveighoffer
wrote:
[...]
module m1;
import std.stdio;
class C {}
void foo(C c)
{
writeln(C.foo);
}
void bar(C c)
{
writeln(C.bar);
}
module m2;
import m1;
import std.stdio;
void foo(T)(T t)
{
writeln(m2.foo);
}
void bar(T)(T t,
On Monday, 21 April 2014 at 14:38:53 UTC, Lars T. Kyllingstad
wrote:
What you've demonstrated feels wrong, somehow.
As in it shouldn't be that way, not as in I think you're wrong
about this. :)
On Monday, 21 April 2014 at 14:10:08 UTC, Steven Schveighoffer
wrote:
You may recall that I am a big proponent of explicit properties
because I think the ways of calling functions have strong
implications to the reader, regardless of the functions. This
is the same thing. I look at foo(x) much
On Sunday, 20 April 2014 at 17:11:22 UTC, Andrei Alexandrescu
wrote:
On 4/19/14, 1:02 AM, Aleksandar Ruzicic wrote:
I'm planning to start working on this as soon as I get approval
from Walter/Andrei, and as most of people who answered here
are agreed
that redesign would be a good thing I hope
On Monday, 21 April 2014 at 12:01:09 UTC, Kagamin wrote:
On Friday, 18 April 2014 at 20:28:07 UTC, Aleksandar Ruzicic
wrote:
I really like rust-lang.org, I was thinking of using it as a
base for design but decided against it because I don't want
dlang.org to be accused of ripping of
On Monday, 21 April 2014 at 13:14:12 UTC, Lars T. Kyllingstad
wrote:
On Monday, 21 April 2014 at 11:42:54 UTC, Kagamin wrote:
Autofocus breaks site navigation: instead of returning to
where you were previously, you end up focused on search box,
which is really annoying. It also breaks page
On 4/21/14, 1:49 AM, Lars T. Kyllingstad wrote:
On Sunday, 20 April 2014 at 20:36:58 UTC, Andrei Alexandrescu wrote:
On 4/20/14, 12:11 AM, Lars T. Kyllingstad wrote:
The fact that private really means module private in D means that
any number of functions can break when a class/struct
On 4/21/14, 5:01 AM, Kagamin wrote:
On Friday, 18 April 2014 at 20:28:07 UTC, Aleksandar Ruzicic wrote:
I really like rust-lang.org, I was thinking of using it as a base for
design but decided against it because I don't want dlang.org to be
accused of ripping of rust-lang.org.
This navigation
On Mon, 21 Apr 2014 11:02:14 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
On 4/21/14, 1:49 AM, Lars T. Kyllingstad wrote:
On Sunday, 20 April 2014 at 20:36:58 UTC, Andrei Alexandrescu wrote:
On 4/20/14, 12:11 AM, Lars T. Kyllingstad wrote:
The fact that private really
On 4/21/14, 8:08 AM, Steven Schveighoffer wrote:
Sure, but Lars' point that it completely precludes the encapsulation
mechanism that Scott is advocating, is true. You would have to put the
functions outside the core module to give them the same isolation as
non-friend C++ global functions.
On Monday, 21 April 2014 at 09:40:53 UTC, Wyatt wrote:
On Friday, 18 April 2014 at 16:40:32 UTC, Aleksandar Ruzicic
wrote:
I have 27'' monitor with resolution of 2560x1440 and
Yeah, me too...
left-aligned websites are really hard to read!
...so I have no idea what you're even talking
On Monday, 21 April 2014 at 15:05:57 UTC, Andrei Alexandrescu
wrote:
On 4/21/14, 5:01 AM, Kagamin wrote:
On Friday, 18 April 2014 at 20:28:07 UTC, Aleksandar Ruzicic
wrote:
I really like rust-lang.org, I was thinking of using it as a
base for
design but decided against it because I don't want
On 04/20/14 22:11, Iain Buclaw via Digitalmars-d wrote:
The failure of inlining is not a blocker IMO
It is one in practice. A language with a compiler that can not even inline
this trivial function:
test %rdi,%rdi
sete %al
retq
is not a viable alternative to C.
Not everything
On Sunday, 20 April 2014 at 17:11:22 UTC, Andrei Alexandrescu
wrote:
On 4/19/14, 1:02 AM, Aleksandar Ruzicic wrote:
I'm planning to start working on this as soon as I get approval
from Walter/Andrei, and as most of people who answered here
are agreed
that redesign would be a good thing I hope
On 04/21/14 14:45, Steven Schveighoffer via Digitalmars-d wrote:
Reasons off the top of my head not to make them module functions:
[...]
Functions, unlike methods, do not work with rvalues.
Ie
struct S {
long[99] data;
auto f() { return data[0]; }
}
auto g(ref S
On Monday, 21 April 2014 at 16:35:23 UTC, Artur Skawina via
Digitalmars-d wrote:
On 04/21/14 14:45, Steven Schveighoffer via Digitalmars-d wrote:
Reasons off the top of my head not to make them module
functions:
[...]
Functions, unlike methods, do not work with rvalues.
Ie
struct S {
On Sunday, 20 April 2014 at 14:38:47 UTC, Frustrated wrote:
How bout this!
Why not allow one to define their own attributes from a
generalized subset and then define a few standard ones like
@nogc.
Sounds like you want AST macros. Have a look at this
On 4/21/2014 5:00 AM, Steven Schveighoffer wrote:
Total replacement of GC with ARC in D will:
This is the wrong straw-man, I'm not advocating for this at all.
Many are when they advocate ARC for D.
4. Will not be memory safe (see (2))
5. Require the invention of optimization technology
On Monday, 21 April 2014 at 16:45:15 UTC, Jacob Carlborg wrote:
On Sunday, 20 April 2014 at 14:38:47 UTC, Frustrated wrote:
How bout this!
Why not allow one to define their own attributes from a
generalized subset and then define a few standard ones like
@nogc.
Sounds like you want AST
On Mon, 21 Apr 2014 13:28:24 -0400, Walter Bright
newshou...@digitalmars.com wrote:
On 4/21/2014 5:00 AM, Steven Schveighoffer wrote:
Total replacement of GC with ARC in D will:
This is the wrong straw-man, I'm not advocating for this at all.
Many are when they advocate ARC for D.
Does
On Friday, 18 April 2014 at 15:49:59 UTC, Andrei Alexandrescu
wrote:
On 4/18/14, 8:30 AM, David Gileadi wrote:
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).
We can (and
On 4/21/14, 8:48 AM, Aleksandar Ruzicic wrote:
On Sunday, 20 April 2014 at 17:11:22 UTC, Andrei Alexandrescu wrote:
On 4/19/14, 1:02 AM, Aleksandar Ruzicic wrote:
I'm planning to start working on this as soon as I get approval
from Walter/Andrei, and as most of people who answered here are
On 4/21/2014 10:57 AM, Steven Schveighoffer wrote:
On Mon, 21 Apr 2014 13:28:24 -0400, Walter Bright newshou...@digitalmars.com
wrote:
On 4/21/2014 5:00 AM, Steven Schveighoffer wrote:
Total replacement of GC with ARC in D will:
This is the wrong straw-man, I'm not advocating for this at
I downloaded the DMD Windows compiler, installed it in the
default directory, added its location to the system path,
restarted my computer and wrote a sample hello, world program,
and it won't compile; instead it says Error: cannot read file
hello.d. My computer is 64-bit, if that matters at
On Monday, 21 April 2014 at 18:35:04 UTC, Andrei Alexandrescu
wrote:
On 4/21/14, 8:48 AM, Aleksandar Ruzicic wrote:
On Sunday, 20 April 2014 at 17:11:22 UTC, Andrei Alexandrescu
wrote:
On 4/19/14, 1:02 AM, Aleksandar Ruzicic wrote:
I'm planning to start working on this as soon as I get
On Monday, 21 April 2014 at 19:40:01 UTC, Plorf wrote:
I downloaded the DMD Windows compiler, installed it in the
default directory, added its location to the system path,
restarted my computer and wrote a sample hello, world
program, and it won't compile; instead it says Error: cannot
read
Are you in the same directory as your hello.d? It seems like
you're not giving the compiler correct path to your file.
My file was located on my desktop, and my current directory was
the desktop, but dmd hello.d gave me an error. Is that what you
mean?
Am Sun, 20 Apr 2014 08:19:45 +
schrieb monarch_dodra monarchdo...@gmail.com:
D static initialization doesn't work the same way. Everything is
initialized as the program is loaded, […]
Ah ok, it's all good then :)
Also, just doing this is good enough:
//
void foo() @nogc
{
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
On Monday, 21 April 2014 at 20:12:31 UTC, David Gileadi wrote:
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
On Monday, 21 April 2014 at 20:12:31 UTC, David Gileadi wrote:
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
On Mon, 21 Apr 2014 15:03:18 -0400, Walter Bright
newshou...@digitalmars.com wrote:
On 4/21/2014 10:57 AM, Steven Schveighoffer wrote:
On Mon, 21 Apr 2014 13:28:24 -0400, Walter Bright
newshou...@digitalmars.com
wrote:
On 4/21/2014 5:00 AM, Steven Schveighoffer wrote:
Total replacement
On Thu, 17 Apr 2014 08:51:33 -0400, Steven Schveighoffer
schvei...@yahoo.com wrote:
This is very very annoying. Every time I open one of these messages I
get a huge pregnant 5-second pause, along with the Mac Beach Ball
(hourglass) while this message is opened in my news reader.
Whatever
On Monday, 21 April 2014 at 20:29:46 UTC, Steven Schveighoffer
wrote:
example he gives (and I agree with him) is iOS. Just look at
the success of iOS, where the entire OS API is based on ARC
(actually RC, with an option for both ARC and manual, but the
latter is going away). If ARC was so bad,
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.
Well you'd be
On Monday, 21 April 2014 at 20:29:46 UTC, Steven Schveighoffer
wrote:
It's pretty difficult to use manual RC and beat ARC. In fact in
some cases, ARC can beat manual, because the compiler has more
insight and knowledge of the rules being followed.
Are you sure? Have you tried to do it first
On Monday, 21 April 2014 at 15:48:45 UTC, Aleksandar Ruzicic
wrote:
On Sunday, 20 April 2014 at 17:11:22 UTC, Andrei Alexandrescu
wrote:
On 4/19/14, 1:02 AM, Aleksandar Ruzicic wrote:
I'm planning to start working on this as soon as I get
approval
from Walter/Andrei, and as most of people who
On Monday, 21 April 2014 at 19:40:01 UTC, Plorf wrote:
I downloaded the DMD Windows compiler, installed it in the
default directory, added its location to the system path,
restarted my computer and wrote a sample hello, world
program, and it won't compile; instead it says Error: cannot
read
Here are two very good reasons to avoid extensive ref-counting:
1. transactional memory ( you don't want a lock on two reads )
2. cache coherency ( you don't want barriers everywhere )
Betting everything on ref counting is the same as saying no to
upcoming CPUs.
IMO that means ARC is DOA.
On 4/21/2014 8:14 AM, Steven Schveighoffer wrote:
but I think having the font
grow when the window is expanded is somewhat useful.
I don't. Overly-large text is just as hard to read as overly-small text.
In any case, if I want the text bigger/smaller, that's what the
zoom/text-size
On Monday, 21 April 2014 at 22:35:32 UTC, Nick Sabalausky wrote:
setting/feature, not a per-page CSS feature. But then, the
browser developers these days will cram anything and everything
into CSS/HTML anymore (except, of course, anything that
actually gives the *user* any control over
On Sunday, 20 April 2014 at 18:48:49 UTC, John Colvin wrote:
The way I understood your idea, was that a template could be
marked @nogc, and yet still allow template arguments that
themselves may gc.
This can be accomplished by creating a unit test that passes
non-allocating template
On 4/21/2014 1:29 PM, Steven Schveighoffer wrote:
I think you are misunderstanding something. This is not for a pervasive
ARC-only, statically guaranteed system. The best example he gives (and I agree
with him) is iOS. Just look at the success of iOS, where the entire OS API is
based on ARC
On 4/17/2014 8:56 PM, Rikki Cattermole wrote:
Its not the client, its happening on the web interface as well.
Most notably for Manu's posts.
I noticed for a while now that Manu's posts are very large, even though there
aren't that many lines of text in them. Examining the posting source shows
I just added two new rules, a check for if/else blocks that are
identical and a check for assign expressions where the left and
right side of the '=' operator are the same.
It found two bugs in Phobos:
https://issues.dlang.org/show_bug.cgi?id=12609
On Monday, 21 April 2014 at 21:49:39 UTC, anonymous wrote:
On Monday, 21 April 2014 at 19:40:01 UTC, Plorf wrote:
I downloaded the DMD Windows compiler, installed it in the
default directory, added its location to the system path,
restarted my computer and wrote a sample hello, world
program,
Sorry about that last comment. Apparently I installed it
correctly and everything, it's just that Notepad++ saves files as
.txt unless you surround the file name and extension in quotes,
like so: hello.d Thanks a lot for the help.
On Monday, 21 April 2014 at 23:07:28 UTC, Walter Bright wrote:
On 4/17/2014 8:56 PM, Rikki Cattermole wrote:
Its not the client, its happening on the web interface as well.
Most notably for Manu's posts.
I noticed for a while now that Manu's posts are very large,
even though there aren't
On 4/21/2014 8:59 PM, Rikki Cattermole wrote:
I still haven't worked out how to even use a newsreader with the ntp server. I'm
still relying on the web interface. So I'm definitely not alone in seeing this
one.
Thunderbird is a very good newsreader. A lot of folks here use it.
I have a same problem too..
I think the problem came from Compress class.
I'm creating web server with gzip and deflate support. browser
(Chrome, Firefox and opera) able to deCompress it. The problem
begin if file size more than 64KB. The output size is equal to
the original file, but the
On 22 April 2014 14:54, Walter Bright via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On 4/21/2014 8:59 PM, Rikki Cattermole wrote:
I still haven't worked out how to even use a newsreader with the ntp
server. I'm
still relying on the web interface. So I'm definitely not alone in seeing
On Friday, 18 April 2014 at 17:20:06 UTC, Nordlöw wrote:
Could someone please give some references to thorough
explainings on these latest concurrency mechanisms
Coroutines is nothing more than explicit stack switching.
Goroutines/fiber etc are abstractions that may be implemented
using
On Monday, 21 April 2014 at 00:11:14 UTC, Jay Norwood wrote:
So this printDiamonde2b example had the fastest time of the
solutions, and had similar times on all three builds. The ldc2
compiler build is performing best in most examples on ubuntu.
void printDiamonde2b(in uint N)
{
uint N2 =
In this case I am not sure about bug reports, so I ask here.
In this program the first loop doesn't compile, giving a nice
error:
test.d(3,5): Error: index type 'ubyte' cannot cover index range
0..300
If you comment out the first loop, the second compiles and runs,
but it seems to go in
For the second loop one possible alternative behavour is to
refuse a ubyte index and accept only a size_t index if it loops
on a dynamic array.
Another alternative is: the i variable can go from 0 to 255,
then go up to the modulus of the remaining indexes, and then
stop.
In this program the
On Sat, 19 Apr 2014 20:45:50 -0400, Adam D. Ruppe
destructiona...@gmail.com wrote:
On Sunday, 20 April 2014 at 00:35:30 UTC, David Held wrote:
Since all implementations of an interface must derive from Object
That's not true. They can also come from IUnknown or a C++ interface.
This is
On Sat, 19 Apr 2014 20:51:49 -0400, David Held d...@wyntrmute.com wrote:
On 4/19/2014 5:35 PM, David Held wrote:
interface Foo { }
class Bar : Foo
{
override string toString() pure const { return Bar; }
}
void main()
{
Foo foo = new Bar;
foo.toString();
}
To make things more
On Mon, 21 Apr 2014 07:49:03 -0400, bearophile bearophileh...@lycos.com
wrote:
In this case I am not sure about bug reports, so I ask here.
In this program the first loop doesn't compile, giving a nice error:
test.d(3,5): Error: index type 'ubyte' cannot cover index range 0..300
If you
https://issues.dlang.org/show_bug.cgi?id=12611
Bye,
bearophile
does that work?
string escapeD(string a){
import std.array:replace;
return `r`~a.replace(``,` \ r`)~``;
}
On Sun, Apr 20, 2014 at 11:14 AM, monarch_dodra via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
On Sunday, 20 April 2014 at 17:55:25 UTC, Ellery Newcomer wrote:
is
So I find myself Doing this kind of thing very frequently. I have
a Array of Somethings and i want to see if something specific
is inside the array. I wrote a template for it. but is this the
best way to do this kind of thing. I feel like it doesn't help
with readability. Is there a better
you can use stuff.canFind(2)
but sometimes it'd be more convenient to have the other way around (UFCS
chains etc);
how about:
bool isIn(T,T2...)(T needle, T2 haystack)
if(__traits(compiles,T.init==T2[0].init)){
foreach(e;haystack){
if(needle==e) return true;
}
return false;
}
On Tuesday, 22 April 2014 at 03:57:33 UTC, Timothee Cour via
Digitalmars-d-learn wrote:
you can use stuff.canFind(2)
but sometimes it'd be more convenient to have the other way
around (UFCS
chains etc);
how about:
bool isIn(T,T2...)(T needle, T2 haystack)
On Monday, 21 April 2014 at 08:26:49 UTC, monarch_dodra wrote:
The two key points here, first, is to avoid using appender.
Second, instead of having two buffer: and **\n,
and two do two slice copies, to only have 1 buffer
*, and to do 1 slice copy, and a single '\n' write. At
On 04/21/2014 09:22 PM, Taylor Hillegeist wrote:
Question though? why doesn't canFind() work on statically
allocated arrays?
That's an issue all of face from time to time. (Happened to me again
last week. :) )
The reason is, algorithms like canFind work with input ranges and
fixed-length
https://issues.dlang.org/show_bug.cgi?id=12602
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Keywords||pull
--- Comment #1 from
https://issues.dlang.org/show_bug.cgi?id=11535
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Keywords||pull
--- Comment #3 from
https://issues.dlang.org/show_bug.cgi?id=12480
Per Nordlöw per.nord...@gmail.com changed:
What|Removed |Added
CC||per.nord...@gmail.com
https://issues.dlang.org/show_bug.cgi?id=9375
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=7887
--- Comment #3 from Kenji Hara k.hara...@gmail.com ---
*** Issue 9375 has been marked as a duplicate of this issue. ***
--
https://issues.dlang.org/show_bug.cgi?id=12480
--- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com ---
(In reply to Per Nordlöw from comment #2)
Is there pending work on a dynamic variant for this?
Can you elaborate?
--
https://issues.dlang.org/show_bug.cgi?id=12110
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Keywords||pull, rejects-valid
---
https://issues.dlang.org/show_bug.cgi?id=12480
--- Comment #4 from Per Nordlöw per.nord...@gmail.com ---
Elaboration from my previous post:
I'v been wanting to have a similar dynamic behaviour for
assert(EXPR)
where EXPR is of the form
x OP y
where OP typically is a logical comparison
https://issues.dlang.org/show_bug.cgi?id=12480
--- Comment #5 from Andrej Mitrovic andrej.mitrov...@gmail.com ---
(In reply to Per Nordlöw from comment #4)
I've been wanting to have a similar dynamic behaviour
Ah you mean runtime. There is some related work on improving assert itself,
although
https://issues.dlang.org/show_bug.cgi?id=12604
--- Comment #2 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/a833827fe1391a8a70fed84b6607e21c26c41da0
fix Issue 12604 - No
1 - 100 of 168 matches
Mail list logo