On Thursday, 6 August 2015 at 00:05:34 UTC, Tofu Ninja wrote:
One thing I would really like for D would be an opengl binding
in phobos, there was some momentum a while ago to try to get
graphics into phobos with Aurora, but literally nothing came of
that.
As I recall it wasn't for lack of try
On Monday, 3 August 2015 at 23:57:36 UTC, Steven Schveighoffer
wrote:
OK, this brings up another debate. The thing that triggered all
this is an issue with core.time, see issue
https://issues.dlang.org/show_bug.cgi?id=14863
[...]
Why not just " stderr.writeln(errMsg); assert(0);"?
On Wednesday, 29 July 2015 at 18:34:34 UTC, David Nadlinger wrote:
Unless I misread the source, it does not mean that at all.
Instead, it leads to the same behavior as if no pragma(inline)
was specified at all, i.e. use the normal heuristics if -inline
is specified, and do not do any inlining o
On Monday, 20 July 2015 at 13:58:02 UTC, sigod wrote:
2.69.0 for DDMD release, then? Or does 3rd digit means PATCH
version in current versioning system?
I don't really know how the current versioning system works. I
think it just increments by 1 every release, and patches get .1,
etc. added o
On Monday, 20 July 2015 at 13:16:46 UTC, sigod wrote:
On Monday, 20 July 2015 at 11:45:31 UTC, Gary Willoughby wrote:
On Monday, 20 July 2015 at 04:02:04 UTC, Walter Bright wrote:
Perhaps we should name this 2.100, to signify such a
milestone.
2.1 Sounds good!
2.1.0 sounds even better. 2.10
On Friday, 17 July 2015 at 18:11:46 UTC, Martin Nowak wrote:
On Friday, 17 July 2015 at 17:54:52 UTC, Marc Schütz wrote:
In general, I'm not sure why you choose to go the way of
abolishing the attributes. Didn't you have a concept for
inference that would mostly solve the problems?
Because I
On Tuesday, 14 July 2015 at 11:14:58 UTC, Jacob Carlborg wrote:
On 2015-07-14 00:11, Jonathan M Davis wrote:
Um. Seriously? I don't see how that would result in anything
but
ridicule. What's D do? It goes splat.
Variadic arguments are sometimes called "splat" in some
languages, like Ruby. O
On Friday, 10 July 2015 at 23:23:32 UTC, ketmar wrote:
On Fri, 10 Jul 2015 03:59:29 +, Tofu Ninja wrote:
On Friday, 10 July 2015 at 03:00:57 UTC, Rikki Cattermole
wrote:
getPixel/putPixel or a variation of such? This is the most
common name for such functions.
Fine by me.
This is hones
On Wednesday, 8 July 2015 at 23:33:09 UTC, rsw0x wrote:
On Wednesday, 8 July 2015 at 08:31:42 UTC, Martin Nowak wrote:
Many would like it to support pattern matching though.
http://wiki.dlang.org/DIP32#Various_places_that_you_can_use_unpacking_and_pattern_matching
all of kenji's proposals are
On Wednesday, 8 July 2015 at 16:29:25 UTC, John Colvin wrote:
I reckon Collect would be a good name. It describes what you're
doing: collecting some things together. Is also fits nicely
with the currently private but hugely useful std.typetuple.Pack.
Collect: collect things together to one sy
On Tuesday, 7 July 2015 at 23:40:55 UTC, Tofu Ninja wrote:
On Tuesday, 7 July 2015 at 20:08:10 UTC, Daniel N wrote:
Error: this is not in a class or struct scope
mixin template NodeT1(T = typeof(this))
{
}
mixin template NodeT2()
{
alias T = typeof(this);
}
struct Node
{
mixin NodeT1; // f
On Monday, 6 July 2015 at 13:48:53 UTC, Rikki Cattermole wrote:
I believe it is ready for initial feedback because I feel it is
moving towards "controversial" territory in its design. With
the file format support.
I just need to know that I am going in the right direction as
of now. There is no
On Tuesday, 30 June 2015 at 08:06:37 UTC, Atila Neves wrote:
2a) Compile-time strings for operators: `should!"=="`,
`should!"in"`
2b) Dicebot's `test!"=="`. `assert` is so much better, I wish
we could use that.
I think these are both bad, for the reason that ! also means
logical not. I read `
On Tuesday, 23 June 2015 at 23:49:45 UTC, Vladimir Panteleev
wrote:
On Tuesday, 23 June 2015 at 23:17:54 UTC, Meta wrote:
I really hate this naming scheme for functions that take lazy
parameters. I still don't see why we don't do the (IMO)
simplest and most intuitive thing and
On Tuesday, 23 June 2015 at 22:58:32 UTC, Vladimir Panteleev
wrote:
On Tuesday, 23 June 2015 at 22:45:10 UTC, Vladimir Panteleev
wrote:
A rename can be proposed by creating a subthread: [...]
Rationale:
As with setExt, std.uni already contains functions called
toLower/toUpper, thus the only
On Tuesday, 23 June 2015 at 17:53:43 UTC, John Colvin wrote:
Isn't this what selective imports are for? Admittedly it's not
quite as convenient, but it does let you choose exactly what
you want. You can even make a module that wraps a manually
selected set of imports, e.g. you do your own basic
On Wednesday, 17 June 2015 at 13:26:57 UTC, Etienne wrote:
Was he even serious? Sounded ironic to me, people who think
like that around here in Canada are laughed at because we all
immigrated 200-300 years ago :)
I don' think that's particularly true unless you've never been
outside Toronto.
On Wednesday, 17 June 2015 at 06:08:57 UTC, Andrei Alexandrescu
wrote:
Even if we implement the change to be memory-safe, there's
still changes in semantics (e.g. the behavior of orphan ranges
changes). And even if we change behavior that wasn't specified
explicitly in the docs, it's still a ch
On Monday, 15 June 2015 at 11:03:42 UTC, Rikki Cattermole wrote:
On 15/06/2015 10:54 p.m., ketmar wrote:
that is, this approach to reduce compilation times is wrong.
storing
partially analyzed ASTs on disk as easily parsable binary
representations
(preferably ones that can be mmaped and used as
On Thursday, 11 June 2015 at 19:31:52 UTC, Walter Bright wrote:
On 6/11/2015 8:03 AM, Dicebot wrote:
On the other hand they have one important advantage: all type
arguments must
comply to one or more trairs and thus bodies of generics are
checked before
institation. You are only allowed to call
On Wednesday, 10 June 2015 at 15:39:51 UTC, Andrei Alexandrescu
wrote:
On 6/9/15 11:59 PM, Mike wrote:
Seems to return the correct result, although it
"TheUnnameable" cannot
be cut and pasted outside of the createVoldemortType scope.
Perhaps
that's the limitation you are referring to.
Yah,
On Monday, 8 June 2015 at 15:07:11 UTC, Atila Neves wrote:
What's _not_ painful?
Atila
It's painful to get set up, but once you do it's smooth sailing.
It took one small edit to the makefile to allow me to build the
website and the docs on Windows.
On Monday, 8 June 2015 at 13:34:14 UTC, Steven Schveighoffer
wrote:
If you just want to check that a file's content is going to
show up, I use:
dmd -D -o- -c std/somemod.d
The output is not styled properly. But the output should have
working links.
FWIW, I avoid building phobos docs. It's t
On Saturday, 6 June 2015 at 18:32:14 UTC, Meta wrote:
On Saturday, 6 June 2015 at 06:59:26 UTC, Jonathan M Davis
wrote:
That being said, we really should find a way to make it so
that lambda's don't turn into delegates unless they really
need to. In many, many cases, they should
On Saturday, 6 June 2015 at 06:59:26 UTC, Jonathan M Davis wrote:
That being said, we really should find a way to make it so that
lambda's don't turn into delegates unless they really need to.
In many, many cases, they should be plenty efficient without
having to force the issue with functors,
On Friday, 5 June 2015 at 19:17:14 UTC, Steven Schveighoffer
wrote:
This sounds like a job for CAPTAIN RANGE!!!
Seriously though, the thought of using ranges to allow
specifying files fits perfectly. Imagine the power!
"std/c/windows/".allSubFiles.filter!(a => a.name.extension ==
".d");
Ne
On Friday, 5 June 2015 at 19:38:06 UTC, Steven Schveighoffer
wrote:
On 6/5/15 12:19 PM, Meta wrote:
On Friday, 5 June 2015 at 12:32:03 UTC, ketmar wrote:
but it does! both with 2.067.1 downloaded from dlang.org and
with git
HEAD. it may not do what you expect it to do (i don't know
wh
On Friday, 5 June 2015 at 12:32:03 UTC, ketmar wrote:
but it does! both with 2.067.1 downloaded from dlang.org and
with git
HEAD. it may not do what you expect it to do (i don't know what
it should
do anyway), but dmd happily accepts that code.
Hmm, maybe I'm only on 2.070 then. I'll upgrade
On Friday, 5 June 2015 at 03:15:46 UTC, anonymous wrote:
On Friday, 5 June 2015 at 02:38:39 UTC, ketmar wrote:
here's dustmited source:
Further reduced:
void unaryFun()(auto int a) pure nothrow @safe @nogc {}
alias Identity(F) = F;
void main()
{
unaryFun!()(41);
static void fun(int n) pur
This is so completely bizarre that I thought I was going crazy at
first, but the same behaviour is exhibited whether I'm using my
own copy of std.functional or a copy cloned straight from phobos
master. The following code snippet exhibits different behaviour
when it is put in a standalone file
On Thursday, 4 June 2015 at 18:08:09 UTC, Ali Çehreli wrote:
http://www.digitalmars.com/d/archives/digitalmars/D/learn/std.conv.to_purity_68957.html
> and if it try it's not a bug...
Floating point operations share global state ("flags" or
"attributes") for rounding mode, exception and trap ha
On Thursday, 4 June 2015 at 08:31:32 UTC, Jonathan M Davis wrote:
Yes, we're okay with that. That's precisely why we want it. And
yes, it could be abused, but when dealing with generic code,
but without it, things get a _lot_ uglier when you need to be
doing introspection to determine what they
On Tuesday, 2 June 2015 at 18:58:48 UTC, weaselcat wrote:
On Tuesday, 2 June 2015 at 18:41:47 UTC, Tim Keating wrote:
For immutability support, of all things:
http://blogs.unity3d.com/2015/06/02/how-we-do-fast-and-efficient-yaml-merging/
Seems someone over there is a D fan.
D's immutable, pu
On Tuesday, 2 June 2015 at 19:03:39 UTC, Meta wrote:
I would say he *heavily* references D, but he does mention it
in a blog post he wrote:
Wouldn't say*
On Monday, 1 June 2015 at 23:06:28 UTC, deadalnix wrote:
On Monday, 1 June 2015 at 19:51:44 UTC, Meta wrote:
On Monday, 1 June 2015 at 19:48:01 UTC, weaselcat wrote:
at the risk of sounding like a broken record, if ldc/gdc not
being 2.067 stops a DDMD release due to dmd's generated code
On Monday, 1 June 2015 at 19:48:01 UTC, weaselcat wrote:
at the risk of sounding like a broken record, if ldc/gdc not
being 2.067 stops a DDMD release due to dmd's generated code
being too slow, maybe it's time to phase dmd out ;)
Once SDC is at a point where it can compile most of or all D co
On Saturday, 30 May 2015 at 15:24:49 UTC, Adam D. Ruppe wrote:
On Saturday, 30 May 2015 at 14:10:35 UTC, IgorStepanov wrote:
static Foo opImplicitConstructFrom(T)(T val) if(is(T : int))
I briefly mentioned this at the dconf and thinking about it a
bit more, I think there's only two cases w
On Thursday, 28 May 2015 at 14:38:51 UTC, Manu wrote:
I've been using D in all my personal projects for years now,
but I
lament coding C at work every day, and I pine for salvation.
I seem to have reasonable influence in my workplaces, and I
suspect I
could have my workplace adopt D, but when c
On Thursday, 28 May 2015 at 01:09:42 UTC, Meta wrote:
Does anyone have the links to Kenji's tuple pull and the fixes
for the module system?
https://github.com/D-Programming-Language/dmd/pull/3407
Can't find the tuple PR
On Thursday, 28 May 2015 at 01:00:26 UTC, Ali Çehreli wrote:
On 05/27/2015 05:54 PM, Andrei Alexandrescu wrote:
John Colvin's experiment is great and we want to make it a
full success.
Please post here feedback and suggestions for tomorrow's DConf
streaming. Thanks! -- Andrei
Thank you for do
On Wednesday, 27 May 2015 at 12:55:05 UTC, Dennis Ritchie wrote:
On Wednesday, 27 May 2015 at 12:37:51 UTC, Kagamin wrote:
On Wednesday, 27 May 2015 at 12:34:49 UTC, Daniel Kozák wrote:
What if use the symbol '#' ?
Yep, I like this symbol for macro too.
https://issues.dlang.org/show_bug.cgi
On Thursday, 21 May 2015 at 16:11:30 UTC, Timon Gehr wrote:
On 05/21/2015 05:37 PM, Dicebot wrote:
On Thursday, 21 May 2015 at 15:30:59 UTC, Alex Parrill wrote:
They aren't types themselves, so `TypeTuple!(int, char) var`
doesn't
make sense.
Sadly, you are wrong on this one - this is actuall
On Monday, 18 May 2015 at 14:18:46 UTC, Steven Schveighoffer
wrote:
Alternatively, we could fix lazy parameters so they don't
disable inlining (though the weight carried by enforce is so
minor, I still don't think it's worth having).
-Steve
I disagree; I also heavily use enforce, and I find
.
There are a couple of ways in which this could and should be
improved, most notably overloads control. Even as is it's
pretty darn awesome, Meta could you please make it into a pull
request? I think it should go in std.functional.
Andrei
I have forgotten to mention that I will mak
On Monday, 4 May 2015 at 19:17:26 UTC, Jacob Carlborg wrote:
On 2015-05-04 07:28, Andrei Alexandrescu wrote:
But then the opDispatch solution is more structured and
restricted in a
good way. I think we need a bit more experience with both to
figure out
which is the best way to go.
I would g
On Monday, 4 May 2015 at 01:01:05 UTC, Andrei Alexandrescu wrote:
Hmm, I didn't try it assuming it won't work (thought
__traits(getMember, member, sym) would fail with opDispatch).
Tried it just now, it does work like a charm. Thanks!
Andrei
So is a function that generates a string mixin nec
On Sunday, 3 May 2015 at 23:54:49 UTC, Andrei Alexandrescu wrote:
On 5/3/15 4:20 PM, Meta wrote:
On Sunday, 3 May 2015 at 20:25:45 UTC, Andrei Alexandrescu
wrote:
OK, here's what I have now - two templates that are self
contained and
work well:
The first uses opDispatch to dispatch
On Sunday, 3 May 2015 at 20:25:45 UTC, Andrei Alexandrescu wrote:
OK, here's what I have now - two templates that are self
contained and work well:
The first uses opDispatch to dispatch to a member. The second
is a simple string function that generates the appropriate
code. As discussed the l
On Sunday, 3 May 2015 at 17:47:15 UTC, Joakim wrote:
On Sunday, 3 May 2015 at 17:39:48 UTC, Robert burner Schadek
wrote:
std.xml has been considered not up to specs nearly 3 years
now. Time to build a successor. I currently plan the following
featues for it:
- SAX and DOM parser
- in-situ / s
Wow, ParameterTypeTuple even works with ref arguments with no
problem. That's impressive.
On Sunday, 3 May 2015 at 05:49:52 UTC, Andrei Alexandrescu wrote:
On 5/2/15 10:00 PM, Meta wrote:
It seems like it'd be a lot cheaper and cleaner to just be
able to alias
the parent method.
Yeh, that's the first solution that comes to mind. alias
doesn't work here but of
On Sunday, 3 May 2015 at 04:20:46 UTC, Andrei Alexandrescu wrote:
On 5/2/15 5:42 PM, Meta wrote:
On Sunday, 3 May 2015 at 00:25:13 UTC, Dicebot wrote:
Here's what I have right now - simple as they come:
http://dpaste.dzfl.pl/7ec11459a125. Kudos to whoever defined
ParameterTypeTuple,
On Sunday, 3 May 2015 at 00:25:13 UTC, Dicebot wrote:
Sounds similar to
http://dlang.org/phobos/std_typecons.html#.Proxy
That's a good idea. Proxy could be improved to take a list of
names of members to forward. That'd be pretty cool actually.
On Friday, 1 May 2015 at 07:15:58 UTC, Timo Sintonen wrote:
I repeat here that there are several output devices in a board
at the same time like serial port and lcd display. Printf can
not be bound to one device at compile time.
It is not hard to take the formatter out of printf and make it
a s
On Monday, 27 April 2015 at 22:54:07 UTC, Andrei Alexandrescu
wrote:
I don't have a blog, and was thinking of starting one. E.g. the
article on tracing allocations needs a home!
I was wondering if you have any good ideas of what's a good
blog name. I'd avoid branding my blog with my longish na
On Monday, 27 April 2015 at 22:09:16 UTC, Vladimir Panteleev
wrote:
The post was on the front page for many hours, which is a lot
more than how long the average link lasts. With 128 upvotes, it
did very well, so your negativity is unwarranted.
Like probably everyone else here, I regularly read
On Monday, 27 April 2015 at 20:56:06 UTC, Andrei Alexandrescu
wrote:
On 4/27/15 2:13 AM, Idan Arye wrote:
On Monday, 27 April 2015 at 01:28:01 UTC, Walter Bright wrote:
Now on the front page of Hacker News!
https://news.ycombinator.com/
https://news.ycombinator.com/item?id=9443462
Because t
On Sunday, 26 April 2015 at 20:21:32 UTC, Ali Çehreli wrote:
Yes, a bug for floating types only. It seems that not the
common type but the first type is used among floating point
types. I wrote a short program to prove it to myself:
import std.traits;
import std.typetuple;
import std.format;
import std.random;
auto test(int n)
{
if (n >= 0 && n < 33)
{
return int(0);
}
else if (n >= 33 && n < 66)
{
return float(0);
}
else
{
return real(0);
}
}
void main()
{
auto n = uniform(0, 100);
auto res = test(n);
//Prints
On Sunday, 26 April 2015 at 04:59:48 UTC, Manu wrote:
I find myself using these a lot. I hacked them together because
I
couldn't find anything equally simple in the std library:
https://gist.github.com/TurkeyMan/1f551bc5a0d2cec8af2e
The question is, is there already a proper/better way to do
On Sunday, 26 April 2015 at 03:52:16 UTC, Vladimir Panteleev
wrote:
Theme song proposal:
http://www.openbsd.org/songs/songsh.mp3
http://www.openbsd.org/songs/songsh.ogg
I respectfully propose https://www.youtube.com/watch?v=Dn8gealMDsg
Something really easy to do even for a beginner is to sub
On Friday, 24 April 2015 at 17:44:32 UTC, Steven Schveighoffer
wrote:
You shouldn't need to explicitly link anything that comes out
of phobos IMO.
-Steve
+1, getting pages of linker errors is extremely confusing and
intimidating for newcomers to D.
On Tuesday, 21 April 2015 at 17:30:08 UTC, Steven Schveighoffer
wrote:
quoted lambdas are indeed shorter, but the issue with them is
that "awhereas the lambda does not.
In fact, that is why we added shorthand lambdas to the
language. Note that in this case, it's just wasted code space
and not
On Monday, 20 April 2015 at 08:24:08 UTC, weaselcat wrote:
http://www.reddit.com/r/programming/comments/335b1s/the_new_operator_in_c_6/
of interesting note was the nim sample on how to implement the
same thing in nim in 2 lines of code
template `?.`(a, b): expr =
if a != nil: a.b else: nil
On Saturday, 18 April 2015 at 02:03:40 UTC, Shammah Chancellor
wrote:
Hello DForum!
I wanted to attempt to write an nginx module in Dlang.
However, the first step of generating some bindings is proving
to be a pain on linux. Htod is windows only, and the other
projects either generate inco
On Friday, 17 April 2015 at 19:38:20 UTC, bachmeier wrote:
On Friday, 17 April 2015 at 13:20:19 UTC, albatroz wrote:
On Thursday, 16 April 2015 at 17:33:09 UTC, Andrei
Alexandrescu wrote:
On 4/16/15 8:47 AM, bachmeier wrote:
Please let me know if
https://github.com/D-Programming-Language/dlang
On Thursday, 16 April 2015 at 06:02:19 UTC, Andrei Alexandrescu
wrote:
1. Challenging Walter on anything and everything seems to have
become a rite of passage in our community. Some of the reviews
of his code are the most petty and meaningless I've seen in my
career, bar none. It doesn't help t
On Saturday, 11 April 2015 at 01:59:28 UTC, ketmar wrote:
let's take a code like this:
import std.stdio;
class A {
size_t len = 42;
final size_t length () const { return (this !is null ? len :
0); }
}
void main () {
A a;
writeln(a.length);
a = new A();
writeln(a.length);
}
in "-
On Monday, 6 April 2015 at 23:51:17 UTC, Adam Hawkins wrote:
Hello everyone, this is my first post on the forum. I've been
investigating the language for the past few weeks. I was able
to complete my first useful program thanks to very helpful
people in #d on IRC . The experience made me very i
On Monday, 6 April 2015 at 05:15:43 UTC, Walter Bright wrote:
I read the code to figure out what was happening.
At some point, -release was changed so that bounds checking was
turned off for all but @safe code. A new switch was added,
-boundscheck=[on|safeonly|off]. It took me a while to find
On Tuesday, 31 March 2015 at 18:20:05 UTC, cym13 wrote:
I found this repository (reddit!) that hosts common benchmarks
for many languages such as D, Nim, Go, python, C, etc... It
uses only standard structures not to influence the benchmark.
https://github.com/kostya/benchmarks
Can you provid
On Monday, 30 March 2015 at 21:58:13 UTC, Dicebot wrote:
I'd prefer putting alternative test runner into Phobos instead
which will support `@name("Something") unittest { }`
Aren't unittest blocks just special functions? If that's the
case, there should be no problem being able to give them nam
On Monday, 30 March 2015 at 13:18:44 UTC, Dicebot wrote:
On Sunday, 29 March 2015 at 12:29:13 UTC, Stefan Koch wrote:
On Friday, 27 March 2015 at 17:47:26 UTC, H. S. Teoh wrote:
What I'm more concerned about is whether the current compiler
implementation may accidentally allow leakage of the pu
On Saturday, 28 March 2015 at 00:01:48 UTC, Jesse Phillips wrote:
Probably should be Identifier for consistency [e.g. _arugments,
__vptr, _ctor]
Isn't __ctor just a DMD thing? I don't think we should be
highlighting symbols which aren't guaranteed to even exist for a
particular implementation
On Saturday, 14 March 2015 at 23:15:35 UTC, Brian Schott wrote:
First, a disclaimer: I am an idiot for starting this thread.
Moving on...
I'm working on a list of configuration options for dfmt - a
formatter for D source code.
So far I have the following:
* Insert spaces between if, while,
On Thursday, 12 March 2015 at 04:03:44 UTC, Rikki Cattermole
wrote:
Of course this would break wards compatibility a little bit, so
maybe a pragma to tell the compiler to include int in ==?
pragma(aliasIsThis)
struct Ref(T, Owner) {
...
That's not good enough. It'll still fail template co
On Wednesday, 11 March 2015 at 06:56:27 UTC, Andrei Alexandrescu
wrote:
On 3/10/15 11:52 PM, Vladimir Panteleev wrote:
I can only urge you to consult with someone deeply involved
with Vibe
(e.g. Sonke), as well as someone who uses Vibe and Dub heavily
in
production, before forcing a decision.
On Monday, 2 March 2015 at 15:46:28 UTC, Francesco Cattoglio
wrote:
Taken from
http://forum.dlang.org/thread/gjrbmskictrbcyedu...@forum.dlang.org
trying to instantiate an Array!MyClass fails with a rather
obscure error message if the MyClass has a member function
"void init()":
http://dpaste
On Sunday, 15 February 2015 at 18:45:45 UTC, bearophile wrote:
Meta:
Oh, whoops. I mixed up average-case complexity with
worst-case. Although, isn't lookup O(n) in the worst case for
hash tables?
D associative arrays used to be O(1) amortized and O(n ln n) in
worst case. Now they ar
On Sunday, 15 February 2015 at 18:20:10 UTC, Xinok wrote:
On Sunday, 15 February 2015 at 18:15:13 UTC, Meta wrote:
On Sunday, 15 February 2015 at 17:18:08 UTC, Steve D wrote:
Python (built-in)
dict1 = {"a":1,"b":2}
tup1 = (0,1,2,3)
arr1 = [0,1,2,3] # list type
str1 =
On Sunday, 15 February 2015 at 17:18:08 UTC, Steve D wrote:
Python (built-in)
dict1 = {"a":1,"b":2}
tup1 = (0,1,2,3)
arr1 = [0,1,2,3] # list type
str1 = "abcd"
print "b" in dict1# True
O(1) lookup
print 3 in tup1 # True
O(n) lookup
print 3 in arr1 # True
O(n) lookup
On Thursday, 12 February 2015 at 16:32:16 UTC, Baz wrote:
On Thursday, 12 February 2015 at 14:12:00 UTC, FrankLike wrote:
If you want to look for some old information,that was created
by yourself,now you must look for it in Page one by one,it's
slower than get it by a link 'Get my all threads'.
On Tuesday, 10 February 2015 at 21:00:11 UTC, H. S. Teoh wrote:
This PR:
https://github.com/D-Programming-Language/phobos/pull/2973
introduces a code example with 2-space indentation, whereas the
rest of
Phobos and dlang.org uses 4-space indentation.
I don't like this. It's inconsist
On Monday, 9 February 2015 at 20:24:02 UTC, Walter Bright wrote:
On 2/9/2015 4:14 AM, Meta wrote:
Yes, but is it disabled by default in @trusted code?
It is never disabled by default.
Okay, I thought it was similar to @system in that respect.
On Monday, 9 February 2015 at 12:02:12 UTC, John Colvin wrote:
On Monday, 9 February 2015 at 11:47:03 UTC, Meta wrote:
On Monday, 9 February 2015 at 11:43:00 UTC, Walter Bright
wrote:
On 2/9/2015 2:54 AM, John Colvin wrote:
It seems to me that rules 2 and 3 could be helped along by
tooling
On Monday, 9 February 2015 at 11:43:00 UTC, Walter Bright wrote:
On 2/9/2015 2:54 AM, John Colvin wrote:
It seems to me that rules 2 and 3 could be helped along by
tooling (compiler or
external).
Sounds good, but I'd like to see how this works in practice
before going further with it. The ni
On Sunday, 8 February 2015 at 13:13:18 UTC, Marc Schütz wrote:
On Sunday, 8 February 2015 at 01:57:55 UTC, Meta wrote:
On Sunday, 8 February 2015 at 00:31:42 UTC, Mike wrote:
Is `this` overloaded to mean "this class" in a static context
or is `this` only valid in a non-static contex
On Sunday, 8 February 2015 at 13:06:08 UTC, Marc Schütz wrote:
No, `alias this` convert from the type it is declared in to
another type. `opImplicitCast` would be declared in the
destination type.
So like this?
struct Type1
{
string str;
}
struct Type2
{
string str;
Type2 opImpl
On Sunday, 8 February 2015 at 00:31:42 UTC, Mike wrote:
I'm elevating this from D.Learn [1] because I think it needs
some input from the language designers.
This code compiles and executes:
---
import std.stdio;
struct StaticRegister {
static private uint _v
On Saturday, 7 February 2015 at 19:38:10 UTC, Marc Schütz wrote:
On Saturday, 7 February 2015 at 05:27:39 UTC, Andrei
Alexandrescu wrote:
On 2/6/15 8:28 PM, Jonathan Marler wrote:
Do you know if D might support that later or if there's a
reason for not
supporting it?
It's deliberate followin
On Friday, 6 February 2015 at 22:24:48 UTC, Walter Bright wrote:
Rust has "unsafe" blocks with specific instructions that it
cannot be verified mechanically and it is up to the programmer
to ensure a safe interface to it.
So no, Rust didn't get that working, either, and it is far
beyond curre
On Friday, 6 February 2015 at 20:13:18 UTC, Steven Schveighoffer
wrote:
In the proposal, @trusted code is actually considered the same
as @safe, but allows @system escapes.
That seems like a good idea and in the spirit of what the goal
is. However, won't it be a breaking change?
On Thursday, 5 February 2015 at 20:45:36 UTC, Meta wrote:
On Thursday, 5 February 2015 at 16:27:01 UTC, Alex Parrill
wrote:
DMD does not seem to consider `opDispatch` when looking up
variables in a `with` block, or . Is this intentional, or a
bug/oversight?
For example:
import
On Thursday, 5 February 2015 at 16:27:01 UTC, Alex Parrill wrote:
DMD does not seem to consider `opDispatch` when looking up
variables in a `with` block, or . Is this intentional, or a
bug/oversight?
For example:
import std.typecons;
import std.stdio;
struct MyStruct
On Thursday, 5 February 2015 at 06:41:59 UTC, Daniel Murphy wrote:
"Meta" wrote in message
news:ejqtxksoifmqzetll...@forum.dlang.org...
I don't know about others (besides Beatophile, who religiously
adheres to writing contacts), but putting contracts on
functions is a hassle
On Thursday, 5 February 2015 at 06:15:39 UTC, H. S. Teoh wrote:
On Thu, Feb 05, 2015 at 05:42:57AM +, Meta via
Digitalmars-d wrote:
[...]
I don't know about others (besides Beatophile, who religiously
adheres
to writing contacts), but putting contracts on functions is a
hassle.
I nev
On Tuesday, 3 February 2015 at 22:13:50 UTC, Chris wrote:
On Wednesday, 28 January 2015 at 15:54:31 UTC, anonymous wrote:
On Tuesday, 27 January 2015 at 20:02:12 UTC, anonymous wrote:
PR:
https://github.com/D-Programming-Language/dlang.org/pull/869
- For details see here.
Live version: http://
On Thursday, 5 February 2015 at 01:06:57 UTC, Matt Kline wrote:
I'm trying to build a small utility for a project at work that
stores some config on-disk as JSON. Imagine my dismay when I
find that opIndexAssign hasn't been added to JSONValue until
after 2.066 went out:
https://github.com/D-Pr
On Thursday, 5 February 2015 at 01:33:54 UTC, Andrei Alexandrescu
wrote:
On 2/4/15 5:32 PM, deadalnix wrote:
On Thursday, 5 February 2015 at 01:07:56 UTC, Andrei
Alexandrescu wrote:
Yah, I agree "in" is useful for overridable functions. In
fact I'd say
it's useful _only_ for overridable functi
On Wednesday, 4 February 2015 at 02:44:46 UTC, Mike wrote:
This is not what I want either. I find @always_inline and
@never_inline attributes with compile-time enforcement *far*
more useful.
pragma(inline, true) will not compile if you enabled warnings as
errors.
401 - 500 of 993 matches
Mail list logo