On 06/28/2016 08:39 PM, MMJones wrote:
> Yeah, I saw that. I'm looking the general answer though. Not just for
> GC. Does D basically combine the d files in to phobos when they are
> modified?
No. Somebody must explicitly build the library.
However, any code that's templated cannot be
On Wednesday, 29 June 2016 at 04:34:26 UTC, Chang Long wrote:
On Wednesday, 29 June 2016 at 03:11:52 UTC, Hiemlick Hiemlicker
wrote:
test(myEnum.A | myEnum.B & myEnum.C).
I like this:
myEnum.( A | B & C) == myEnum.A | myEnum.B & myEnum.C
Does that even work? Regardless, You still have
On Wednesday, 29 June 2016 at 03:50:35 UTC, Carl Vogel wrote:
On Wednesday, 29 June 2016 at 03:11:52 UTC, Hiemlick Hiemlicker
wrote:
Suppose one has void test(myEnum e)
enum myEnum
{
A,B,C
}
[...]
Doesn't the with statement solve your problem here?
with (myEnum) {
test(A);
test(B);
On Wednesday, 29 June 2016 at 03:11:52 UTC, Hiemlick Hiemlicker
wrote:
test(myEnum.A | myEnum.B & myEnum.C).
I like this:
myEnum.( A | B & C) == myEnum.A | myEnum.B & myEnum.C
On Wednesday, 29 June 2016 at 03:11:52 UTC, Hiemlick Hiemlicker
wrote:
Suppose one has void test(myEnum e)
enum myEnum
{
A,B,C
}
[...]
Doesn't the with statement solve your problem here?
with (myEnum) {
test(A);
test(B);
test(C);
}
On Wednesday, 29 June 2016 at 03:10:10 UTC, thedeemon wrote:
On Wednesday, 29 June 2016 at 02:18:27 UTC, MMJones wrote:
I read somewhere that one can modify the D files from phobos
and runtime to supply a stub for the GC. I would like to add
some logging features to the GC.
You don't need
On Wednesday, 29 June 2016 at 02:18:27 UTC, MMJones wrote:
I read somewhere that one can modify the D files from phobos
and runtime to supply a stub for the GC. I would like to add
some logging features to the GC.
You don't need to recompile anything, a stub can be installed
from your
Suppose one has void test(myEnum e)
enum myEnum
{
A,B,C
}
It would be very cool if we could do
test(A) instead of test(myEnum.A).
by context, the compiler can look first in the scope for
something named A then look in the enum itself and prepend myEnum
internally.
For flags, it would
On 2016-06-29 14:39, Hiemlick Hiemlicker wrote:
Yes, the C standard requires malloc to be aligned to the platform size(4
for 32bit, 8 for 64-bit).
just what i was hopping for. thanks!
On Wednesday, 29 June 2016 at 02:24:55 UTC, captaindet wrote:
is there an alignment guarantee for core.stdc.stdlib.malloc?
more specifically, using DMD and compiling for 32bit on
windows, can i assume proper alignment for int or uint
variables?
background: i like to re-use a (ubyte) buffer,
is there an alignment guarantee for core.stdc.stdlib.malloc?
more specifically, using DMD and compiling for 32bit on windows, can i
assume proper alignment for int or uint variables?
background: i like to re-use a (ubyte) buffer, sometimes it will store
only bytes, sometimes it shall store
I read somewhere that one can modify the D files from phobos and
runtime to supply a stub for the GC. I would like to add some
logging features to the GC.
Does this not require one to recompile phobos? I figured the
source code was just for debugging?
I'm curious if I can really get away
https://issues.dlang.org/show_bug.cgi?id=16215
--- Comment #1 from Puneet Goel ---
Another reduced case:
class Foo {
class FooInner {}
}
class Bar: Foo {
byte foo;
class BarInner(T): Foo.FooInner {
byte zoo() {
return foo;
}
}
alias BarInnerThis =
Many memory management routines allocate 2x the required capacity
on overflow and and de-allocate when the array is 1/2 used.
This method is inefficient and wastes up to 100% of the actually
memory required, although some on average is is probably much
lower than this.
I am thinking it
On Tuesday, June 28, 2016 13:34:48 QAston via Digitalmars-d wrote:
> On Monday, 27 June 2016 at 22:56:41 UTC, Jonathan M Davis wrote:
> > Agreed. The code outside of the static if should be compiled
> > regardless, because it's not part of the static if/else at all
> > and therefore has not been
On Tuesday, 28 June 2016 at 21:06:18 UTC, QAston wrote:
On Tuesday, 28 June 2016 at 17:41:58 UTC, deadalnix wrote:
"The solution doesn't solve all problems, therefore the
solution do not make things any better"
Nonsense.
More like "this solution doesn't solve all problems solved by
other
On 06/28/2016 05:34 PM, Robert burner Schadek wrote:
On Monday, 27 June 2016 at 19:33:45 UTC, Walter Bright wrote:
Sorry to have offended you, I worded things badly. Thank you for
making the list. It's just that I'm feeling a bit overwhelmed at the
moment with trying to get things done and
On Monday, 27 June 2016 at 19:33:45 UTC, Walter Bright wrote:
Sorry to have offended you, I worded things badly. Thank you
for making the list. It's just that I'm feeling a bit
overwhelmed at the moment with trying to get things done and
being asked to do more every day, and I'd like to
On Tuesday, 28 June 2016 at 21:19:18 UTC, Steven Schveighoffer
wrote:
It appears so:
https://github.com/dlang/phobos/blob/master/std/concurrency.d#L2164
m_maxMsgs is default 0.
I guess it makes sense, as you could get deadlocks for specific
restrictions, although I personally would side with
On Tuesday, 28 June 2016 at 21:01:20 UTC, John Colvin wrote:
On Tuesday, 28 June 2016 at 20:12:29 UTC, luminousone wrote:
Is puts high enough latency that, that main thread can fill
the message queue faster then start can exhaust it? If you put
a call to sleep for 1ms in the main loop does it
On 6/28/16 4:35 PM, Ola Fosheim Grøstad wrote:
On Tuesday, 28 June 2016 at 20:24:33 UTC, Steven Schveighoffer wrote:
On 6/28/16 4:12 PM, luminousone wrote:
Is puts high enough latency that, that main thread can fill the message
queue faster then start can exhaust it? If you put a call to
On Tuesday, 28 June 2016 at 17:41:58 UTC, deadalnix wrote:
"The solution doesn't solve all problems, therefore the
solution do not make things any better"
Nonsense.
More like "this solution doesn't solve all problems solved by
other solution and that's worth keeping in mind".
We already
On Tuesday, 28 June 2016 at 20:12:29 UTC, luminousone wrote:
Is puts high enough latency that, that main thread can fill the
message queue faster then start can exhaust it? If you put a
call to sleep for 1ms in the main loop does it have the same
result?
It appears that adding a 1ms sleep
On 06/28/2016 10:47 PM, deadalnix wrote:
On Monday, 27 June 2016 at 23:26:25 UTC, Jack Stouffer wrote:
[...]
I wouldn't call 1.0 * -1.0 == 1.0 boring!
What is this about ?
https://issues.dlang.org/show_bug.cgi?id=16027
On Monday, 27 June 2016 at 23:26:25 UTC, Jack Stouffer wrote:
On Monday, 27 June 2016 at 23:15:06 UTC, Robert burner Schadek
wrote:
Awesome, releases are becoming more and more boring. I like it!
I wouldn't call 1.0 * -1.0 == 1.0 boring!
What is this about ?
On Tuesday, 28 June 2016 at 20:24:33 UTC, Steven Schveighoffer
wrote:
On 6/28/16 4:12 PM, luminousone wrote:
Is puts high enough latency that, that main thread can fill
the message
queue faster then start can exhaust it? If you put a call to
sleep for
1ms in the main loop does it have the
On 6/28/16 4:12 PM, luminousone wrote:
Is puts high enough latency that, that main thread can fill the message
queue faster then start can exhaust it? If you put a call to sleep for
1ms in the main loop does it have the same result?
I think this is it. Your main loop is doing very little,
On 6/28/16 3:53 PM, Ola Fosheim Grøstad wrote:
On Tuesday, 28 June 2016 at 19:03:14 UTC, John Colvin wrote:
char[2] s = '\0';
s[0] = cast(char)msg;
puts(s.ptr);// remove this => no memory leak
But wait, is the string zero terminated?
I
On Tuesday, 28 June 2016 at 19:03:14 UTC, John Colvin wrote:
On my machine (OS X), this program eats up memory with no end
in sight
import std.concurrency;
import core.stdc.stdio;
void start()
{
while(true)
{
receive(
(int msg)
{
char[2]
On Tuesday, 28 June 2016 at 19:53:27 UTC, Ola Fosheim Grøstad
wrote:
On Tuesday, 28 June 2016 at 19:03:14 UTC, John Colvin wrote:
char[2] s = '\0';
s[0] = cast(char)msg;
puts(s.ptr);// remove this => no memory
leak
But wait, is the string
On Tuesday, 28 June 2016 at 19:03:14 UTC, John Colvin wrote:
char[2] s = '\0';
s[0] = cast(char)msg;
puts(s.ptr);// remove this => no memory leak
But wait, is the string zero terminated?
On Tuesday, 28 June 2016 at 19:03:14 UTC, John Colvin wrote:
This is very odd, no? I'm not sure if it's a bug, but it sure
is surprising. Why should "puts" cause a GC leak (writeln is
the same)? What's so special about small allocations that
allows all my memory to get filled up?
Try to put
On Tuesday, 28 June 2016 at 18:50:25 UTC, Enamex wrote:
On Monday, 27 June 2016 at 19:47:14 UTC, Ola Fosheim Grøstad
wrote:
Are you trolling me?
Please, no need to.
Huh? What exactly are you trying to convey?
Also, C++17 is 'getting' Modules and Concepts Lite later in
tech specs... that
On Tuesday, 28 June 2016 at 19:03:14 UTC, John Colvin wrote:
On my machine (OS X), this program eats up memory with no end
in sight
import std.concurrency;
import core.stdc.stdio;
void start()
{
while(true)
{
receive(
(int msg)
{
char[2]
On Tuesday, 28 June 2016 at 06:54:43 UTC, rikki cattermole wrote:
On 28/06/2016 6:49 PM, Timothee Cour via Digitalmars-d wrote:
Is there any reason not to use git submodules to organize the
various
common dlang repos?
see relevant discussion:
*
On my machine (OS X), this program eats up memory with no end in
sight
import std.concurrency;
import core.stdc.stdio;
void start()
{
while(true)
{
receive(
(int msg)
{
char[2] s = '\0';
s[0] = cast(char)msg;
On Monday, 27 June 2016 at 19:47:14 UTC, Ola Fosheim Grøstad
wrote:
On Monday, 27 June 2016 at 19:39:20 UTC, luminousone wrote:
OpenCL is for micro threading, not simd.
What is your point? Clang++ vector extensions use OpenCL
semantics, so you need to look up the OpenCL spec to figure out
https://issues.dlang.org/show_bug.cgi?id=13637
Jack Stouffer changed:
What|Removed |Added
Hardware|x86_64 |All
https://issues.dlang.org/show_bug.cgi?id=13637
Jack Stouffer changed:
What|Removed |Added
CC||j...@jackstouffer.com
On Tuesday, 28 June 2016 at 13:34:48 UTC, QAston wrote:
On Monday, 27 June 2016 at 22:56:41 UTC, Jonathan M Davis wrote:
Agreed. The code outside of the static if should be compiled
regardless, because it's not part of the static if/else at all
and therefore has not been marked as
On Tuesday, 28 June 2016 at 17:17:47 UTC, Dejan Lekic wrote:
Thanks for reminding me why I stopped doing C++ programming...
When I saw that...
using LeNet = loss_multiclass_log<
fc<10,
relu
https://issues.dlang.org/show_bug.cgi?id=9646
q...@web.de changed:
What|Removed |Added
CC||q...@web.de
--- Comment #3 from q...@web.de ---
On Monday, 27 June 2016 at 14:10:15 UTC, Guillaume Piolat wrote:
With the latest popularity of Machine Learning, and all the
achievement we see, where is the D alternative in this area?
C++'s offering makes lot of use of meta-programming already:
On Tuesday, 28 June 2016 at 15:03:01 UTC, Steven Schveighoffer
wrote:
On 6/28/16 10:07 AM, Ola Fosheim Grøstad wrote:
On Tuesday, 28 June 2016 at 13:50:42 UTC, Steven Schveighoffer
wrote:
On 6/28/16 7:35 AM, Ola Fosheim Grøstad wrote:
alias func = (int i) => i*i;
?
Is that valid in the
On Tuesday, 28 June 2016 at 09:18:34 UTC, qznc wrote:
Did you also compare to strlen from libc? I'd guess GNU libc
uses a lot more tricks like vector instructions.
I did test with the libc strlen, although the D libraries did not
have a strlen for dchar or wchar. I'm currently using this for
Is the DMD RPM file supposed to be signed?
There is a .sig file beside the .rpm but dnf insists the .rpm file
itself is not signed.
--
Russel.
=
Dr Russel Winder t: +44 20 7585 2200 voip:
On 6/28/16 10:07 AM, Ola Fosheim Grøstad wrote:
On Tuesday, 28 June 2016 at 13:50:42 UTC, Steven Schveighoffer wrote:
On 6/28/16 7:35 AM, Ola Fosheim Grøstad wrote:
alias func = (int i) => i*i;
?
Is that valid in the compiler, or are you proposing it? I haven't used
or seen such a thing.
On Tuesday, 28 June 2016 at 13:50:42 UTC, Steven Schveighoffer
wrote:
On 6/28/16 7:35 AM, Ola Fosheim Grøstad wrote:
alias func = (int i) => i*i;
?
Is that valid in the compiler, or are you proposing it? I
haven't used or seen such a thing.
It does work:
import std.stdio;
alias
On 6/28/16 7:35 AM, Ola Fosheim Grøstad wrote:
On Tuesday, 28 June 2016 at 11:22:38 UTC, Steven Schveighoffer wrote:
We pretty much have this with lambda syntax:
(int arg) => arg
alias func = (int i) => i*i;
?
Is that valid in the compiler, or are you proposing it? I haven't used
or
https://issues.dlang.org/show_bug.cgi?id=16216
Issue ID: 16216
Summary: struct equality compares padding
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Keywords: wrong-code
On Monday, 27 June 2016 at 22:56:41 UTC, Jonathan M Davis wrote:
Agreed. The code outside of the static if should be compiled
regardless, because it's not part of the static if/else at all
and therefore has not been marked as conditionally compilable.
But if we don't warn about unreachable
On 6/26/16 8:01 PM, deadalnix wrote:
Several people during DConf asked abut tips and tricks on code review.
So I wrote an article about it:
http://www.deadalnix.me/2016/06/27/on-code-review/
Nice work. Let's see:
https://www.reddit.com/r/programming/comments/4q9fl5/on_code_review/ --
Andrei
On Tuesday, 28 June 2016 at 08:14:07 UTC, Nicholas Wilson wrote:
I am planning to provide OpenCL and CUDA targets to ldc in the
next few weeks, probably starting in earnest next week,
allowing direct compilation and calling code on the gpu
automagically with reflection.
Cool.
https://issues.dlang.org/show_bug.cgi?id=14162
--- Comment #4 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/366378a5b606ee2093eb6625101e88573a7b2960
fix Issue 14162 - Erratic inference of @safe for lambdas
On Tuesday, 28 June 2016 at 09:31:46 UTC, Sebastiaan Koppe wrote:
If we were in interview, I'd ask you "what does this returns
if you pass it an empty string ?"
Since no one is answering:
It depends on the memory right before c. But if there is at
least one 0 right before it - which is quite
On Thursday, 23 June 2016 at 20:04:26 UTC, Lodovico Giaretta
wrote:
-- Brace yourself: a very long post is coming --
What is planned for the near future?
- When the DOM classes will be usable (even if not 100%
complete) I will start working on a DOM parser to build them
from the source;
- DTD
On Tuesday, 28 June 2016 at 11:22:38 UTC, Steven Schveighoffer
wrote:
We pretty much have this with lambda syntax:
(int arg) => arg
alias func = (int i) => i*i;
?
On 6/28/16 2:13 AM, Superstar64 wrote:
Right now, D functions expect a Block Statement
(https://dlang.org/spec/function.html#FunctionBody) as their function
body. Changing that to allow any statement
(https://dlang.org/spec/statement.html#Statement) would provide a few
new syntactic sugars like:
On 6/28/16 5:17 AM, qznc wrote:
On Tuesday, 28 June 2016 at 09:13:40 UTC, qznc wrote:
I don't believe a root repo makes sense.
Submodules should be used to model actual dependencies.
For example, phobos does not depend on dmd, since it could be ldc or
gdc as well.
Some dependencies are: dmd
On 6/28/16 4:04 AM, Lodovico Giaretta wrote:
On Monday, 27 June 2016 at 22:36:36 UTC, Martin Nowak wrote:
On 06/25/2016 10:33 PM, Lodovico Giaretta wrote:
But your idea about a stack keeping all the context informations is
quite valuable, given that some validations need them (e.g. checking
https://issues.dlang.org/show_bug.cgi?id=16195
Walter Bright changed:
What|Removed |Added
Keywords||pull
On Monday, 27 June 2016 at 23:26:25 UTC, Jack Stouffer wrote:
On Monday, 27 June 2016 at 23:15:06 UTC, Robert burner Schadek
wrote:
Awesome, releases are becoming more and more boring. I like it!
I wouldn't call 1.0 * -1.0 == 1.0 boring!
Yeah I was thinking this haha.
Now IUP library collections' interfaces accomplished.
IUP(3.18): http://code.dlang.org/packages/iupd
IM(3.10): http://code.dlang.org/packages/imd
CD(5.9):http://code.dlang.org/packages/cdd
lua(5.3.3): http://code.dlang.org/packages/nluad
As I'm not good enough, all bindings may have many
https://issues.dlang.org/show_bug.cgi?id=16208
Ketmar Dark changed:
What|Removed |Added
CC|
https://issues.dlang.org/show_bug.cgi?id=16212
--- Comment #2 from Ketmar Dark ---
so i suppose that this bug can be closes as "fixed", but i'll wait for someone
else to check it too before closing.
--
https://issues.dlang.org/show_bug.cgi?id=16212
Ketmar Dark changed:
What|Removed |Added
CC|
On Tuesday, 28 June 2016 at 04:37:34 UTC, Adam Sansier wrote:
Hi,
I have designed a class based system that involves
self-delegation instead of override.
It is similar to event based programming.
I have defined an event as a container type that holds
functions(or possibly delegates, but
On Tuesday, 28 June 2016 at 01:53:22 UTC, deadalnix wrote:
On Sunday, 26 June 2016 at 16:40:08 UTC, Jay Norwood wrote:
After watching Andre's sentinel thing, I'm playing with strlen
on char strings with 4 terminating 0s instead of a single one.
Seems to work and is 4x faster compared to the
On Sunday, 26 June 2016 at 16:40:08 UTC, Jay Norwood wrote:
After watching Andre's sentinel thing, I'm playing with strlen
on char strings with 4 terminating 0s instead of a single one.
Seems to work and is 4x faster compared to the runtime version.
nothrow pure size_t strlen2(const(char)*
On Tuesday, 28 June 2016 at 06:49:03 UTC, Timothee Cour wrote:
Is there any reason not to use git submodules to organize the
various common dlang repos?
see relevant discussion:
*
http://www.digitalmars.com/d/archives/digitalmars/D/The_annoying_D_build_system_181472.html [from 2012]
*
Many functions in std.socket, such as getAddress or parseAddress
return the UnknownAddressReference Address subtype instead of
InternetAddress or InternetAddress6.
While in many cases this is sufficient (e.g., when you just need
to do Socket.sendTo), in some cases it is not, especially when
On Tuesday, 28 June 2016 at 03:29:46 UTC, jmh530 wrote:
On Monday, 27 June 2016 at 22:17:55 UTC, Martin Nowak wrote:
[...]
I could probably write a simple backpropogation one, but I
would probably screw something up if I wrote my own
convolutional neural network.
[...]
I am planning to
On Tuesday, 28 June 2016 at 06:13:44 UTC, Superstar64 wrote:
Right now, D functions expect a Block Statement
(https://dlang.org/spec/function.html#FunctionBody) as their
function body. Changing that to allow any statement
(https://dlang.org/spec/statement.html#Statement) would provide
a few
On Monday, 27 June 2016 at 21:17:52 UTC, Thalamus wrote:
Hi everyone,
I've succeeded in using D as a client for regular (registered)
COM servers in the past, but in this case, I'm building the
server as well. I would like to avoid registering it if
possible so XCOPY-like deployment remains
On Monday, 27 June 2016 at 22:36:36 UTC, Martin Nowak wrote:
On 06/25/2016 10:33 PM, Lodovico Giaretta wrote:
But your idea about a stack keeping all the context
informations is quite valuable, given that some validations
need them (e.g. checking that all prefixes have been declared,
and
On Tuesday, 28 June 2016 at 06:13:44 UTC, Superstar64 wrote:
---
auto func(MyObj obj) with(obj)
{
//...
}
auto func(int arg) return arg;
auto func() try
{
//...
}
finally
{
return //...
}
---
Please no! All of these are awful.
On 6/27/2016 3:11 PM, Martin Nowak wrote:
Glad to announce D 2.071.1.
http://dlang.org/download.html
This point release fixes a few issues over 2.071.0, see the changelog
for more details.
http://dlang.org/changelog/2.071.1.html
-Martin
Thank you, Martin!
On Tuesday, 28 June 2016 at 03:11:26 UTC, Jay Norwood wrote:
On Tuesday, 28 June 2016 at 01:53:22 UTC, deadalnix wrote:
If we were in interview, I'd ask you "what does this returns
if you pass it an empty string ?"
I'd say use this one instead, to avoid negative size_t. It is
also a little
On 28/06/2016 6:49 PM, Timothee Cour via Digitalmars-d wrote:
Is there any reason not to use git submodules to organize the various
common dlang repos?
see relevant discussion:
*
http://www.digitalmars.com/d/archives/digitalmars/D/The_annoying_D_build_system_181472.html
[from 2012]
*
Is there any reason not to use git submodules to organize the various
common dlang repos?
see relevant discussion:
*
http://www.digitalmars.com/d/archives/digitalmars/D/The_annoying_D_build_system_181472.html
[from 2012]
* http://comments.gmane.org/gmane.comp.lang.d.general/172893
* [llvm-dev]
On Monday, 27 June 2016 at 22:51:05 UTC, Martin Nowak wrote:
Simple as don't allocate on a per-request basis if you want a
fast program. It also trivial to attach an std.allocator to
your custom Fiber. Also Fibers should be pooled and reused to
avoid the setup cost (just measured 1.5µs on top
On 28/06/2016 4:37 PM, Adam Sansier wrote:
Hi,
I have designed a class based system that involves self-delegation
instead of override.
It is similar to event based programming.
I have defined an event as a container type that holds functions(or
possibly delegates, but the desire is to avoid
On 28/06/2016 6:13 PM, Superstar64 wrote:
Right now, D functions expect a Block Statement
(https://dlang.org/spec/function.html#FunctionBody) as their function
body. Changing that to allow any statement
(https://dlang.org/spec/statement.html#Statement) would provide a few
new syntactic sugars
Right now, D functions expect a Block Statement
(https://dlang.org/spec/function.html#FunctionBody) as their
function body. Changing that to allow any statement
(https://dlang.org/spec/statement.html#Statement) would provide a
few new syntactic sugars like:
---
auto func(MyObj obj) with(obj)
84 matches
Mail list logo