On Wednesday, 12 September 2018 at 23:41:16 UTC, James Blachly
wrote:
When I add the "shared" attribute to an array, I am no longer
able to call reserve because the template won't instantiate:
Error: template object.reserve cannot deduce function from
argument types !()(shared(int[]), int),
On Tuesday, 11 September 2018 at 07:23:53 UTC, Joakim wrote:
I agree with a lot of what you say here, but I'm not sure what
you mean by "first class support for mobile." What exactly do
you believe D needs to reach that level?
Natural-feeling bindings to platform libraries that are not
On Tuesday, 11 September 2018 at 15:22:55 UTC, rikki cattermole
wrote:
Here is a question (that I don't think has been asked) why not
@copy?
It's not wrong to call this an implicit constructor since it's
called implicitly. It also means that, if we get implicit
constructors in general, we
On Tuesday, 11 September 2018 at 13:48:36 UTC, 0xEAB wrote:
By the way, thanks for all your explanations :)
No problem! If it's inscrutable, it's not very useful.
On Monday, 10 September 2018 at 11:20:55 UTC, bauss wrote:
I'm sorry, but it's not even close to accurate, because some
libraries has documents on additional websites that has
examples and no examples directly in the source code using
"standard unittests" - This is true for most big libraries
On Monday, 10 September 2018 at 19:44:22 UTC, H. S. Teoh wrote:
It's high time we distinguished between the various flavors of
assert, preferably with new words to avoid the baggage that has
accumulated around 'assert'.
Perhaps we can take some cues from Vigil, the eternally morally
vigilant
On Monday, 10 September 2018 at 19:19:56 UTC, 0xEAB wrote:
On Monday, 10 September 2018 at 15:46:28 UTC, Neia Neutuladh
wrote:
It blindly takes the results of dub build and dub test.
Another question:
How does it deal with targetType set to "sourceLibrary"?
As of five minutes ago, for
On Monday, 10 September 2018 at 13:58:37 UTC, 0xEAB wrote:
May I ask why some packages are missing (e.g. `midi-gamepad`)?
midi-gamepad has no releases. It has 0.1.1-alpha, which is a
prelease version, and ~master, which is a branch, and I can't
rely on ~master being consistent in successive
On Monday, 10 September 2018 at 10:50:16 UTC, Joakim wrote:
Nice work. I wonder about some of your results, as it says that
dub itself doesn't build with all of the dmd versions, but
somehow the tests pass sometimes (shouldn't be possible if you
can't build dub itself). I just tested with `dub
On Wednesday, 5 September 2018 at 05:44:38 UTC, H. S. Teoh wrote:
To me, this strongly suggests the following idea:
- add *all* dlang.org packages to our current autotester / CI
infrastructure.
- if a particular (version of a) package builds successfully,
log the
compiler version / git hash
On Sunday, 9 September 2018 at 06:32:39 UTC, Jonathan M Davis
wrote:
What would you expect that to tell you? ddoc doesn't require
any kind of doc folder (though some projects would have one for
custom ddoc files that then affect how the documentation
looks), and usually, the best way to handle
On Sunday, 9 September 2018 at 04:37:48 UTC, Josphe Brigmo wrote:
If git would automatically do the dates
It does.
To get changes for a whole file:
git log filename
To get changes for part of a file:
git log -L startLine,endLine filename
There are formatting options for git log to
On Sunday, 9 September 2018 at 09:34:31 UTC, Nick Sabalausky
(Abscissa) wrote:
1. As most United States citizens are implicitly aware (though
the government assumes NO responsibility to ensure citizens are
aware of this), to vote in a United States of America election
and have the vote legally
On Sunday, 9 September 2018 at 03:02:41 UTC, tide wrote:
Oh another one from 2008, 10 years ago.
https://issues.dlang.org/show_bug.cgi?id=1870
Oh hey, a wild me appears.
So, yeah, the tricky bit with this is where to emit the source
code.
If you just want a best-effort aid, you could
On Sunday, 9 September 2018 at 01:27:06 UTC, Josphe Brigmo wrote:
How hard would it be to automate dating for dmd source so that
everything is consistent in a way that makes sense?
Perhaps you could find out by trying to implement such a system?
That's what I usually do.
You haven't
On Sunday, 9 September 2018 at 01:09:24 UTC, Andrei Alexandrescu
wrote:
it does stand to reason to print the last exception in a chain,
instead of the head, as the most relevant cause. Guess we'd do
good to have such functionality in the stdlib.
So given code like:
scope (exit) throw new
On Sunday, 9 September 2018 at 00:20:04 UTC, void wrote:
How do I get a list of all packages (Github URL) available at
code.dlang.org?
I could download individual pages with wget --recursive
code.dlang.org but I wonder if there is a better solution.
On Saturday, 8 September 2018 at 18:10:50 UTC, Jonathan M Davis
wrote:
A related issue is projects that have dependencies outside of D
itself
- for instance, a project that wraps GTK or Qt or something C
or C++ library
that is on many systems but which isn't guaranteed to be
present. It would
On Saturday, 8 September 2018 at 06:59:28 UTC, Josphe Brigmo
wrote:
Having source code that doesn't show changes with dates is
pretty useless for diagnostics. I realize that git has the
changes but the source code should.
What problem did you encounter where you had trouble getting the
On Saturday, 8 September 2018 at 17:01:33 UTC, Jacob Shtokolov
wrote:
So, modification of pointer values is prohibited (if I
understand this sentence correctly).
@safe code can't manipulate the pointer itself, in order to avoid
memory corruption.
So this is forbidden:
void main() @safe
{
On Saturday, 8 September 2018 at 01:32:19 UTC, Everlast wrote:
There are ways around this:
Take a step back and consider what you're asking for.
You are asking for dub to become github. A very cruddy version of
github. One in which everyone can submit changes to every
repository. With a
On Saturday, 8 September 2018 at 00:04:08 UTC, Everlast wrote:
Seems there are a few good suggestions.
Here is another:
Have dub have the ability to submit patches when a previously
broken package compiles.
So I identify a package that doesn't compile anymore and submit a
patch that adds a
On Friday, 7 September 2018 at 23:37:05 UTC, Josphe Brigmo wrote:
On Friday, 7 September 2018 at 18:18:50 UTC, Neia Neutuladh
Algebraic!SomeInterface should allow anything that inherits
from that interface (possibly with an explicit cast).
It doesn't.
I *did* say "possibly with an explicit
On Friday, 7 September 2018 at 03:04:19 UTC, Josphe Brigmo wrote:
We are talking about two different things that are related:
A variant holds a set of objects. Using VariantClass limits the
types to a subset and allows for inherited types to be added.
Algebraic!SomeInterface should allow
On Thursday, 6 September 2018 at 23:34:20 UTC, Andrei
Alexandrescu wrote:
On 9/6/18 1:13 PM, Neia Neutuladh wrote:
The actual structure of the exceptions: `primary` has children
`scope 2` and `scope 1`; `scope 2` has child `cause 2`; `scope
1` has child `cause 1`. A tree.
No, it's a list.
On Thursday, 6 September 2018 at 10:18:43 UTC, Josphe Brigmo
wrote:
Variants can hold an arbitrary set of types.
I imagine that it is effectively just a type id and an object
pointer!?
It's a typeid and a static array large enough to hold any basic
builtin type: the now-deprecated creal, a
On Thursday, 6 September 2018 at 14:39:12 UTC, Andrei
Alexandrescu wrote:
First off, there's no tree of exceptions simply because... well
it's not there. There is on field "next", not two fields "left"
and "right". It's a linear list, not a tree. During
construction there might be the
On Wednesday, 5 September 2018 at 05:44:38 UTC, H. S. Teoh wrote:
To me, this strongly suggests the following idea:
- add *all* dlang.org packages to our current autotester / CI
infrastructure.
- if a particular (version of a) package builds successfully,
log the
compiler version / git hash
On Wednesday, 5 September 2018 at 04:32:18 UTC, SrMordred wrote:
Wouldn´t be interesting to specify the compiler version on
dub.json?
(I think ruby uses this idea)
Ruby 1.8 stuck around for four years before Ruby 1.9 came out.
Then it was six years until Ruby 2.0 came out. These days,
On Tuesday, 4 September 2018 at 22:33:34 UTC, Manu wrote:
Error: project\ecs\include\d2\bliz\ecs\component_access.d(7):
Error: namespace `bliz.ecs.component_access.bliz` conflicts
with import `bliz.ecs.component_access.bliz` at
project\ecs\include\d2\bliz\ecs\component_access.d(3)
The
On Tuesday, 4 September 2018 at 14:23:33 UTC, Joakim wrote:
The first search engines were created in 1993, google came
along in 1998 after at least two dozen others in that list, and
didn't make a profit till 2001. Some of those early competitors
were giant "billion dollar global companies,"
On Tuesday, 4 September 2018 at 11:21:24 UTC, Kagamin wrote:
On Sunday, 2 September 2018 at 21:07:20 UTC, Nick Sabalausky
(Abscissa) wrote:
B. Physical interface:
--
By this I mean both actual input devices (keyboards,
controllers, pointing devices) and also the mappings
On Tuesday, 4 September 2018 at 03:39:04 UTC, Nick Sabalausky
(Abscissa) wrote:
Discussion questions:
- What would be the feasibility of the various parts of this?
You'd need to interrupt the process. You'd need a parent process
that detects the interrupt. Then you'd need to use the debugger
On Monday, 3 September 2018 at 04:43:30 UTC, bauss wrote:
On Sunday, 2 September 2018 at 20:01:08 UTC, Neia Neutuladh
wrote:
On Sunday, 2 September 2018 at 19:42:20 UTC, bauss wrote:
Woud be so much more maintainable if I could have each
statement into a variable that could be maintained
On Monday, 3 September 2018 at 03:04:57 UTC, Chris Katko wrote:
This should be simple? All I want to do is load an entire file,
and access individual bytes. The entire thing. I don't want to
have know the file size before hand, or "guess" and have a
"maximum size" buffer.
So far, all google
On Sunday, 2 September 2018 at 19:42:20 UTC, bauss wrote:
Woud be so much more maintainable if I could have each
statement into a variable that could be maintained properly.
You could extract the body of the static foreach into a
[template] function.
On Friday, 31 August 2018 at 07:38:54 UTC, Marcin wrote:
https://github.com/dlang/dmd/blob/master/samples/listener.d
Can some one add more comment to that example?
I need to make code that connects to local application, very
similar to this.
Assumptions:
1. Create an application that
On Friday, 31 August 2018 at 06:20:09 UTC, James Blachly wrote:
Hi all,
I am linking to a C library which defines a symbol,
const char seq_nt16_str[] = "=ACMGRSVTWYHKDBN";
In the C sources, this is an array of 16 bytes (17 I guess,
because it is written as a string).
In the C headers, it
On Monday, 27 August 2018 at 13:21:18 UTC, JN wrote:
On Monday, 27 August 2018 at 10:54:22 UTC, Eugene Wissner wrote:
On Monday, 27 August 2018 at 10:25:42 UTC, Brian wrote:
My team want change packages name:
hunt -> hunt-framework
entity -> hunt-entity
database -> hunt-database
cache ->
On Wednesday, 29 August 2018 at 07:03:13 UTC, JN wrote:
https://go.googlesource.com/proposal/+/master/design/go2draft-generics-overview.md
I had a glance at the proposals.
The handler proposal seems not to account for errors during error
handling. Can you have nested `handler` blocks? What
On Sunday, 26 August 2018 at 23:12:10 UTC, FeepingCreature wrote:
On Sunday, 26 August 2018 at 22:44:05 UTC, Walter Bright wrote:
On 8/26/2018 8:43 AM, Chris wrote:
I wanted to get rid of autodecode and I even offered to test
it on my string heavy code to see what breaks (and maybe
write
On Wednesday, 22 August 2018 at 15:17:36 UTC, Jesse Phillips
wrote:
It is weird that you make loosing current and historical pull
requests is minor
It would be disruptive. However, work could resume rather quickly.
The disruption would be reduced if we had a periodic job set up
to mirror
On Tuesday, 21 August 2018 at 22:00:31 UTC, Jesse Phillips wrote:
On Tuesday, 21 August 2018 at 19:25:14 UTC, Walter Bright wrote:
With the NNTP, git, and bugzilla, we all have backups under
our control.
I just don't see why it is a concern[1]:
"So we set out to look for a new home for our
On Sunday, 19 August 2018 at 18:32:17 UTC, QueenSvetlana wrote:
In the D Style Guide, it says:
Properties
https://dlang.org/dstyle.html#properties
Functions should be property functions whenever appropriate. In
particular, getters and setters should generally be avoided in
favor of property
On Friday, 3 August 2018 at 19:41:32 UTC, Bastiaan Veelo wrote:
But if you commit it, and a compiler deprecation causes a
dependency in that pinned version to fail to compile, then your
app won't compile either, even though your code itself does not
suffer from the deprecation and even though
On Monday, 23 July 2018 at 16:26:42 UTC, Seb wrote:
I personally prefer option 2, but this might be in conflict to
named arguments which we hopefully see in the near future too.
Hence, I'm leaning forward to proposing Option 1 as the
recommended Option for the DIP (that's also what the PoC DMD
On Tuesday, 10 July 2018 at 22:53:25 UTC, kdevel wrote:
extern (C) __gshared bool rt_trapExceptions;
static this ()
{
rt_trapExceptions = false;
}
This will catch exceptions raised in main and in static
constructors that run after this one. However, if you put that
code in
On Monday, 18 June 2018 at 20:54:22 UTC, aberba wrote:
async/await make asynchronous code in C# and JavaScript look
clean and easy to wrap ones head around it. Solution to aka.
callback hell. If popularity is what you're looking at, it
JavaScript not Go. And async/await is all over the
On Saturday, 16 June 2018 at 06:43:25 UTC, Meta wrote:
On Saturday, 16 June 2018 at 00:24:42 UTC, DigitalDesigns wrote:
space is ignored! Seems like a bug std . traits . std . string
is valid?
Like most C-family languages, D is a freeform language[1].
Funnily enough, I don't think this is
On Sunday, 17 June 2018 at 10:58:29 UTC, Cauterite wrote:
Is there a reason scope(success) needs to set up for exception
handling?
Or is this a bug / potential enhancement ?
If you had no exception handling in place, you'd need to
duplicate code in the output. For instance:
void foo()
{
On Friday, 15 June 2018 at 23:04:40 UTC, Sjoerd Nijboer wrote:
For someone coming from a C# background there is some seemingly
simple syntactic sugar missing from D.
* The null conditional operator `?.`
Null-safe dereference operator, I think it's called?
Hrm, my first impulse was in favor.
On Wednesday, 13 June 2018 at 00:38:55 UTC, Jonathan M Davis
wrote:
It's possible to write programs that check and handle running
out of memory, but most programs don't, and usually, if a
program runs out of memory, it can't do anything about it and
can't function properly at that point.
On Monday, 11 June 2018 at 00:47:27 UTC, Jonathan M Davis wrote:
Why do you care about detecting code that can throw an Error?
Errors are supposed to kill the program, not get caught. As
such, why does it matter if it can throw an Error?
Error is currently used for three different things:
*
On Saturday, 2 June 2018 at 21:44:39 UTC, greatsam4sure wrote:
Sorry for the typo
is it possible to define infix function in D
3.min(5)// 3: where min is a function, works in D
3 min 5 // does not work.
thanks in advance
This is a horrible abuse of D's operator overloading discovered
by
On Saturday, 2 June 2018 at 18:10:38 UTC, eastanon wrote:
Does D array implementation support an array of null values?
int a[4] = null;
But I ran into a type error while checking if a[i] is null
foreach(i; 0..3){
if(i == null){
writeln("it is null");
}
}
}
How do you set fixed size
On Friday, 1 June 2018 at 17:59:21 UTC, Steven Schveighoffer
wrote:
The .di file is just an interface, it doesn't know what's
actually compiled in the binary.
To put it another way, the compiler only generates a ModuleInfo
(or dependency modules) for .d files. .di files are simply a
public
On Friday, 1 June 2018 at 12:50:31 UTC, Steven Schveighoffer
wrote:
A fly in the ointment is .di files. This works today and does
the right thing:
This actually is not a problem, because the dependency tree
doesn't depend on whether the imported module has static ctors.
It's how this works
On Thursday, 31 May 2018 at 23:17:20 UTC, Steven Schveighoffer
wrote:
Hm... I just had a crazy idea: what if D had a switch that
allowed it to store a dependency graph of constructors into a
json file, and then when you link, there is a wrapper which
consumes all these files, runs the cycle
On Thursday, 31 May 2018 at 01:49:42 UTC, DigitalDesigns wrote:
Using setters, we might want to trigger an event when the value
changes. But since the getter is used and can modify the event
won't be triggered.
This is a bad design.
Here's similar bad design:
---
class Int
{
public int
On Monday, 28 May 2018 at 21:04:21 UTC, Dr.No wrote:
import std.parallelism : parallel;
foreach(t; parallel(arr))
{
if(!doSomething(t)) {
return false;
}
On Sunday, 27 May 2018 at 20:50:14 UTC, IntegratedDimensions
wrote:
The only problem where it can leak is when we treat an cat as
an animal then put in dog food in to the animal, which is valid
when cat as treated as an animal, then cast back to cat. Now
cat has dog food, which is invalid.
On Sunday, 27 May 2018 at 10:27:45 UTC, Adam Wilson wrote:
Now that SecureD v1 is in the books
This would have been a great place to insert a brief description
of what SecureD is or a link to the project.
On Saturday, 26 May 2018 at 15:00:40 UTC, Malte wrote:
This compiles with DMD, however it returns random numbers
instead of the value I passed in. Looks like a bug to me.
Should that work or is there any other pattern I could use for
that?
Filed as
On Saturday, 26 May 2018 at 17:12:38 UTC, Dr.No wrote:
What's D's way to do that? I need it to be mutable array of
wchar because a Windows function requires that.
Alternative to go down to using pointers, which would be
something like:
wchar[] w = new wchar[s.length];
memcpy(w.ptr, s.ptr,
On Friday, 25 May 2018 at 07:39:03 UTC, Cym13 wrote:
Please note that Mike Parker stepped in for you too. I don't
think there's much merit in stirring mud any further.
Yes, between when I started writing a reply and when I posted
that reply. Editing posts isn't allowed here.
On Friday, 25 May 2018 at 03:24:32 UTC, IntegratedDimensions
wrote:
Show me where I asked you to do any work for me.
The subject of your post is in the imperative. It's a command.
People who just have an idea that they want to discuss but aren't
actively proposing as a change tend to
On Thursday, 24 May 2018 at 23:22:56 UTC, IntegratedDimensions
wrote:
If you can't find validity in the suggestion based on it's own
inherent usefulness than the only way I can convince you is to
provide examples that you actually find useful... that makes it
difficult on my part and is not
On Thursday, 24 May 2018 at 22:43:00 UTC, IntegratedDimensions
wrote:
Doesn't make any sense?
foreach(a; x)
if x is not an array then a = x and the loop reduces simply and
function to the case it is not so their can be no harm.
It unifies the concepts so that one does not have to worry if x
On Monday, 21 May 2018 at 00:13:26 UTC, Ethan wrote:
Code for context:
https://github.com/GooberMan/binderoo/blob/master/binderoo_client/d/src/binderoo/util/enumoptions.d
This looks good. One small caveat:
alias DocumentType = SomeDocument!(ObjectVersion._1_0,
ObjectEncoding.UTF8);
alias
On Sunday, 20 May 2018 at 14:35:21 UTC, I love Ice Cream wrote:
On Sunday, 20 May 2018 at 02:34:38 UTC, Neia Neutuladh wrote:
D is very hard to make an IDE for that would actually tell you
what type the return value is.
This might sound a little hard, but that's probably a
fundamental
On Sunday, 20 May 2018 at 02:53:10 UTC, KingJoffrey wrote:
On Sunday, 20 May 2018 at 00:05:39 UTC, Jonathan M Davis wrote:
As I understand it, in general, Walter is against doing ...
All I ever hear, is walter walter walter
While it's mildly refreshing that you found something new to
On Sunday, 20 May 2018 at 00:44:13 UTC, I love Ice Cream wrote:
Which brings me to where it probably is not a good place for
it...in the return fadeclaration of a function/method. I'm very
close to saying, even after having read some of the comments
that try justifying it, that 100% of the
On Saturday, 19 May 2018 at 09:49:39 UTC, KingJoffrey wrote:
On Saturday, 19 May 2018 at 09:37:56 UTC, Uknown wrote:
The point was encapsulation as you defined it was broken.
private members were directly modified outside their class. In
your words, everyone was a friend.
This is why we
On Saturday, 19 May 2018 at 04:30:24 UTC, Jonathan M Davis wrote:
On Saturday, May 19, 2018 03:32:53 Neia Neutuladh via
Digitalmars-d-learn wrote:
> Of course, the most notable case where using == with null is
> a terrible idea is dynamic arrays, and that's the case where
> the
On Saturday, 19 May 2018 at 04:01:18 UTC, KingJoffrey wrote:
Mmm.. that brings me back to the idea of sealed at the class
level again.
class A
{
private int x;
private(this) int y; // imagine if you have lots of private
variables.
// this could become pretty
On Saturday, 19 May 2018 at 01:48:38 UTC, Jonathan M Davis wrote:
Actually, that runtime function has existed since before TDPL
came out in 2010. It even shows the implementation of the free
function opEquals (which at the time was in object_.d rather
than object.d). I'm not even sure that the
On Friday, 18 May 2018 at 23:53:12 UTC, IntegratedDimensions
wrote:
Why does D complain when using == to compare with null? Is
there really any technical reason? if one just defines == null
to is null then there should be no problem. It seems like a
pedantic move by who ever implemented it and
On Thursday, 17 May 2018 at 23:16:03 UTC, H. S. Teoh wrote:
On Thu, May 17, 2018 at 07:13:23PM +, Patrick Schluter via
Digitalmars-d wrote: [...]
- the auto-synchronization and the statelessness are big deals.
Yes. Imagine if we standardized on a header-based string
encoding, and we
On Friday, 18 May 2018 at 10:09:20 UTC, Chris wrote:
In a way Java has slowly been moving in that direction anyway,
cf. this answer [2] that reminded me of D's `auto` return type.
[2]
https://stackoverflow.com/questions/1348199/what-is-the-difference-between-the-hashmap-and-map-objects-in-java
On Tuesday, 15 May 2018 at 20:36:21 UTC, Dennis wrote:
I have a file with two problems:
- It's too big to fit in memory (apparently, I thought 1.5 Gb
would fit but I get an out of memory error when using
std.file.read)
Memory mapping should work. That's in core.sys.posix.sys.mman for
Posix
On Thursday, 17 May 2018 at 07:58:55 UTC, KingJoffrey wrote:
Remember, the idea for discussion is about adding one single
attribute 'sealed' to the class - the discussion is a lot less
about 'how can we prevent having to add a this new attribute'.
It is normal, whenever someone suggests
Can you provide even one anecdote where this would have been
useful and the workaround that has been suggested to you multiple
times (putting the type in its own module) wouldn't have worked
or would have caused other problems?
I mean, usually we need to do a cost/benefit analysis, and the
On Wednesday, 16 May 2018 at 10:52:42 UTC, KingJoffrey wrote:
On Monday, 30 April 2018 at 21:11:07 UTC, Gerald wrote:
So I'm curious, what's the consensus on auto?
In the example below, what would I use, besides auto?
auto is required for Voldemort types, so you would change it to
not be a
On Tuesday, 15 May 2018 at 21:05:10 UTC, Jonathan M Davis wrote:
Though if someone expects to be able to just jump into any
language and use it without reading up on how it works, they're
just shooting themselves in the foot. And surprisingly often,
that seems to be how many folks operate.
On Friday, 11 May 2018 at 19:01:05 UTC, H. S. Teoh wrote:
This sounds scary. So my (strongly!) pure function that
returns floating-point can return different results when passed
the same parameters, if somebody in between changes
floating-point flags? That doesn't sound good at all.
This
On Sunday, 13 May 2018 at 05:11:16 UTC, Neia Neutuladh wrote:
It should be as easy as changing the "Subject" field on the
reply screen.
Apparently not. My apologies.
On Sunday, 13 May 2018 at 02:36:28 UTC, KingJoffrey wrote:
On Sunday, 13 May 2018 at 02:10:31 UTC, Uknown wrote:
And please, if this bothers you so much, start a new thread.
You're spamming someone else's feature request by going off
topic.
yeah, I know how much *you* (and many others) would
On Saturday, 12 May 2018 at 06:42:24 UTC, rumbu wrote:
Testing private functionality means that you *lock* the
internal implementation of your class. If you decide later to
change the implementation, your previous tests will have
zero-value.
I did TDD at a company for three years. Tests
On Friday, 11 May 2018 at 14:05:25 UTC, KingJoffrey wrote:
private is not private at all in D, and because of this,
classes are fundamentally broken in D (by design apparently).
I find this amusing because D does things exactly like Java. In
Java, two sibling nested classes can call private
On Saturday, 5 May 2018 at 16:42:12 UTC, Sisor wrote:
Error: template std.string.stripRight cannot deduce function
from argument types
You used
http://dpldocs.info/experimental-docs/std.string.stripRight.html
This function only takes one argument and strips whitespace.
You want
On Friday, 4 May 2018 at 19:12:16 UTC, ag0aep6g wrote:
If toDelegate isn't (always) @safe, how can you be sure that
your wrapper is?
If it were @safe, the compiler would accept it.
Looking at the code, I believe there are several casts that the
compiler can't verify but are used safely.
On Friday, 4 May 2018 at 15:36:29 UTC, wjoe wrote:
I have a class that I want to be able to register callbacks and
I'd like to be able to register any callable - functions,
delegates, lambdas, anything.
Is there another way to do it besides converting those
toDelegate, which states a bug
On Wednesday, 2 May 2018 at 14:05:49 UTC, H. S. Teoh wrote:
How else would you do DoI, though? With Concepts? The
advantage of using structural typing over concepts for DoI is
that you would need an exponential number of concepts to catch
up with a linear number of optional fields in a
On Monday, 30 April 2018 at 21:11:07 UTC, Gerald wrote:
So I'm curious, what's the consensus on auto?
For local variables, it's not an unalloyed good, but it is good.
When I use Java, everything is explicit, and sometimes that's
nice. In D, I think I overuse `auto` for local variables.
On Monday, 30 April 2018 at 02:21:37 UTC, solidstate1991 wrote:
Some components of my game engine would benefit from lookup
trees. I tried to port one from Go, but either I messed up
something bit that certain parts of the codes just won't
execute for some reason, or the algorithm was poorly
On Sunday, 22 April 2018 at 06:00:15 UTC, WhatMeForget wrote:
foreach(i, elem; a)
{
int[] temp = new int[](5);
..
a[i] =
}
You're taking the address of a local variable and persisting it
beyond the variable's scope. This is not safe in general;
compilers
On Friday, 29 December 2017 at 07:53:51 UTC, IM wrote:
-- Better compiler errors, better compiler errors, better
compiler errors.
Very much so.
I actually made a list a day or two ago. Some of it is more
speculative than concrete, though:
* unicode categories to determine what can be an
On Monday, 25 December 2017 at 08:57:09 UTC, Jacob Carlborg wrote:
If I knew exactly what would need to be done I would most
likely have done it already :). Perhaps Martin that implemented
the support on Linux or David that, I think, implemented it for
LDC on macOS would be better suited for
On Wednesday, 27 December 2017 at 16:36:59 UTC, H. S. Teoh wrote:
The best we can do currently, which unfortunately won't show up
in the docs, is to use a static assert to force compilation
failure when the return type doesn't match expectations, e.g.:
[...]
static
On Tuesday, 26 December 2017 at 15:37:12 UTC, Marc wrote:
I do build a string by coping large parts of diffrent buffers,
all those buffers live after the functional call, so rather
than duplicate those string I'd like to copy only references to
those parts rather duplicate every string. I
201 - 300 of 338 matches
Mail list logo