Howdy folks.
Has anyone gotten an example of using D as mechanism to read in
video files, specifically from a webcam?
I don't see any OpenCV libraries, and the example in the DCV
library that uses FFMPEG, I can't get to work (I've raised an
issue in Github here
https://issues.dlang.org/show_bug.cgi?id=17747
--- Comment #3 from Илья Ярошенко ---
(In reply to ZombineDev from comment #2)
> AFAIK, C doesn't have static constructors, only C++ has, so your example
> should be:
>
> extern(C++) shared static this()
> {
> // ...
>
On Monday, 14 August 2017 at 03:52:40 UTC, HypperParrow wrote:
On Monday, 14 August 2017 at 01:52:16 UTC, Johnson Jones wrote:
Error: uncaught CTFE exception
std.format.FormatException("Cannot format floating point types
at compile-time")
called from here: to(0.75)
pretty simply, trying to
On Monday, 14 August 2017 at 03:44:27 UTC, Adam D. Ruppe wrote:
On Monday, 14 August 2017 at 01:52:16 UTC, Johnson Jones wrote:
pretty simply, trying to convert a floating point to a string
in a ctfe function and it thinks that it is too complex to do
in a ctfe, really?
It uses a C function
On Sunday, August 13, 2017 16:40:03 crimaniak via Digitalmars-d-learn wrote:
> More of this, I think, you can't avoid __gshared for any complex
> work. Even mutexes from Phobos doesn't support shared, so I had
> to 'cowboy with __gshared' when implementing my site engine.
The way to handle shared
On Monday, 14 August 2017 at 01:52:16 UTC, Johnson Jones wrote:
Error: uncaught CTFE exception
std.format.FormatException("Cannot format floating point types
at compile-time")
called from here: to(0.75)
pretty simply, trying to convert a floating point to a string
in a ctfe function and it
On Monday, 14 August 2017 at 01:52:16 UTC, Johnson Jones wrote:
pretty simply, trying to convert a floating point to a string
in a ctfe function and it thinks that it is too complex to do
in a ctfe, really?
It uses a C function to do the conversion, which is not available
at compile time
On Saturday, August 12, 2017 18:57:44 Arek via Digitalmars-d-learn wrote:
> I have the folowing problem:
> I like to envelope the class object in struct to control the
> destruction moment and then send this object to another
> thread/fiber (or task, cause I use vibe-d).
>
> I can't find any
Error: uncaught CTFE exception std.format.FormatException("Cannot
format floating point types at compile-time")
called from here: to(0.75)
pretty simply, trying to convert a floating point to a string in
a ctfe function and it thinks that it is too complex to do in a
ctfe, really?
On Monday, 14 August 2017 at 00:44:05 UTC, WhatMeForget wrote:
module block_template;
void main()
{
template BluePrint(T, U)
{
T integer;
U floatingPoint;
}
BluePrint!(int, float);
}
// DMD returns
// template.d(13): Error: BluePrint!(int, float) has no effect
On Wednesday, 9 August 2017 at 20:50:36 UTC, Stefan Koch wrote:
On Wednesday, 9 August 2017 at 20:42:48 UTC, Wild wrote:
I hope I can maintain ArchLinux as a great environment to use
D.
You are not only the new package mainainer but also my new Hero
:)
+10
module block_template;
void main()
{
template BluePrint(T, U)
{
T integer;
U floatingPoint;
}
BluePrint!(int, float);
}
// DMD returns
// template.d(13): Error: BluePrint!(int, float) has no effect
// I was expecting something like the following to be created
On Tuesday, 8 August 2017 at 08:49:33 UTC, Andre Pany wrote:
On Monday, 7 August 2017 at 22:46:57 UTC, aberba wrote:
vibe-s3 (https://code.dlang.org/packages/vibe-s3) is an Amazon
s3 object storage API for D.
Has anyone here used or tested it? What was your experiences?
It has the tagline
One can prevent building the other projects using the
configuration manager. Seems to work fine.
One problem is that I cannot seem to get breakpoints to work.
Same issues as I mentioned before with visual D saying the
symbols haven't been loaded for the document. I do not know if
it's the
So, just to let you know, I seemed to be able to setup Visual
Studio so that I can debug Visual D(with visual D).
To do this:
Load the experimental hive:
https://blog.agchapman.com/updating-registry-settings-for-visual-studio-2017/
Load the privateregistry.bin file from
On Sunday, 13 August 2017 at 19:50:57 UTC, Roman Hargrave wrote:
But instead I get:
_D8Sequence5Torch12SequenceList6__initZ
_D8Sequence5Torch12SequenceList7__ClassZ
_D8Sequence5Torch12SequenceList6__vtblZ
How are you getting that list? Those particular things are hidden
D specific symbols so
Update:
Manually defining the class yields the same results (a class with
D linkage).
What's going on here?
On Sunday, 13 August 2017 at 19:47:37 UTC, Jerry wrote:
Seems like it'd be a good idea to pre compute all of phobos for
compile time computations, as they should be changing. That
would drastically reduce using any of phobos for compile time
computation.
You cannot do that.
The point of
I have a mixin & generator I defined in order to mimic a
corresponding CPP macro, DefineList(string name, string typename):
// See Torch - List.h, macro DEFINE_NEW_LIST(NAME, TYPE)
string DefineList(string name, string typename)
{
return
"class " ~ name ~ " : TorchObject {"
~
Seems like it'd be a good idea to pre compute all of phobos for
compile time computations, as they should be changing. That would
drastically reduce using any of phobos for compile time
computation.
Am 13.08.2017 um 20:25 schrieb Stefan Koch:
On Sunday, 13 August 2017 at 18:20:15 UTC, Sönke Ludwig wrote:
I was a bit shocked by this number and performed a little test with
multiple calls to format. Fortunately only the first one takes that
long to compile. For 500 different calls I got
https://issues.dlang.org/show_bug.cgi?id=14488
--- Comment #2 from Iain Buclaw ---
Two years gone, now its deprecation time.
https://github.com/dlang/dmd/pull/7081
--
On Sunday, 13 August 2017 at 16:29:14 UTC, Igor wrote:
I am building a 64 bit windows app with latest DMD and I keep
getting this linker error:
error LNK2019: unresolved external symbol InterlockedIncrement
referenced in function ThreadProc
This function should be a part of kernel32.lib
On Sunday, 13 August 2017 at 18:20:15 UTC, Sönke Ludwig wrote:
Am 12.08.2017 um 13:47 schrieb Stefan Koch:
Hi Guys,
I've just implemented a subset of the std.format functionality.
In the same style that Johnathan Blow uses for JAI.
It's about 10x faster then using std.format and uses much
Am 12.08.2017 um 13:47 schrieb Stefan Koch:
Hi Guys,
I've just implemented a subset of the std.format functionality.
In the same style that Johnathan Blow uses for JAI.
It's about 10x faster then using std.format and uses much less memory :)
the follwing code takes over 250 ms to compile :
{
On Sunday, 13 August 2017 at 15:54:45 UTC, Faux Amis wrote:
Just curious, but is there a spec of sorts which defines which
errors should be fixed and such?
The HTML5 spec describes how you are supposed to parse various
things, including the recovery paths for broken markup.
My module,
https://issues.dlang.org/show_bug.cgi?id=17088
--- Comment #2 from m.bier...@lostmoment.com ---
In DMD 2.075.0 (DMD32 D Compiler v2.075.0) this issue also seems to happen in
debug mode, with the following stack trace:
object.Error@(0): Access Violation
0x004028CA in
https://issues.dlang.org/show_bug.cgi?id=17752
Issue ID: 17752
Summary: Switch skips over declaration issued for explicitly
uninitialized variables
Product: D
Version: D2
Hardware: All
OS: All
https://issues.dlang.org/show_bug.cgi?id=17751
Issue ID: 17751
Summary: Internal error: ddmd/backend/el.c 2927
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: blocker
Priority:
On Sunday, 13 August 2017 at 11:35:05 UTC, Arek wrote:
Yeah, I've read this. But conurrency.send cannot pass immutable
object. The same story with Unique.
Sorry, read this as 'efficient immutable'.
More over, "shared" looks rather like unfinished concept.
Yes, exactly.
Anyway, _gshared
I am building a 64 bit windows app with latest DMD and I keep
getting this linker error:
error LNK2019: unresolved external symbol InterlockedIncrement
referenced in function ThreadProc
This function should be a part of kernel32.lib which I verified
is found by using /VERBOSE:LIB linker
On 2017-08-13 01:49, Soulsbane wrote:
On Saturday, 12 August 2017 at 19:53:22 UTC, Faux Amis wrote:
I would like to get into D again by making a small program which
fetches a website every X-time and keeps track of all changes within
specified dom elements.
fetching: should I go for std
On Tuesday, 1 August 2017 at 21:27:32 UTC, Stefan Koch wrote:
[ ... ]
Hi there,
I've just adjusted the memory allocation behavior.
newCTFE will now start-out allocating 32M of memory at startup.
and increase the allocated space in 8x steps if it hits the limit
while executing concat code.
On 2017-08-12 22:22, Adam D. Ruppe wrote:
On Saturday, 12 August 2017 at 19:53:22 UTC, Faux Amis wrote:
[...]
[...]
---
// compile: $ dmd thisfile.d ~/arsd/{dom,http2,characterencodings}
import std.stdio;
import arsd.dom;
void main() {
auto document =
On Saturday, 12 August 2017 at 12:43:14 UTC, Sönke Ludwig wrote:
v0.8.1-rc.2 now supports setting a version "VibeUseOpenSSL11"
in the package recipe to compile against the OpenSSL 1.1.0 API
on systems that don't have 1.0.1 anymore.
This is great, Thank you!
https://issues.dlang.org/show_bug.cgi?id=17193
johanenge...@weka.io changed:
What|Removed |Added
Keywords||industry
CC|
On 13.08.2017 09:18, Roman Hargrave wrote:
I'm writing some bindings and have run in to a dilemma due to the lack
of explicit information on how the D compiler "decides" to use virtual
dispatch for a member function or not.
Specifically, I have a C++ library that _explicitly_ marks some
On 12 August 2017 at 20:44, Patrick Schluter via Digitalmars-d <
digitalmars-d@puremagic.com> wrote:
> On Friday, 11 August 2017 at 17:57:30 UTC, Dominikus Dittes Scherkl wrote:
>
>> On Friday, 11 August 2017 at 10:45:03 UTC, Mike Parker wrote:
>>
>>> The first stage of the formal review for DIP
https://issues.dlang.org/show_bug.cgi?id=17747
ZombineDev changed:
What|Removed |Added
Keywords||betterC, C++
https://issues.dlang.org/show_bug.cgi?id=17748
ZombineDev changed:
What|Removed |Added
Keywords||diagnostic
On 13 August 2017 at 12:07, Stefan Koch via Digitalmars-d <
digitalmars-d@puremagic.com> wrote:
> On Sunday, 13 August 2017 at 00:42:08 UTC, Manu wrote:
>
>> On 13 August 2017 at 00:15, Stefan Koch via Digitalmars-d <
>>
>>> [ ... ]
>>>
>>
>> If you're keen to introduce a new function, I'd
On Sunday, 13 August 2017 at 09:56:44 UTC, Johan Engelen wrote:
On Sunday, 13 August 2017 at 09:15:48 UTC, amfvcg wrote:
Change the parameter for this array size to be taken from
stdin and I assume that these optimizations will go away.
This is paramount for all of the testing, examining,
On Sunday, 13 August 2017 at 11:58:56 UTC, Daniel Kozak wrote:
or maybe use core.atomic.atomicLoad and store with right
https://dlang.org/phobos/core_atomic.html#.MemoryOrder
On Sun, Aug 13, 2017 at 1:51 PM, Daniel Kozak
wrote:
maybe something like
On Tuesday, 1 August 2017 at 21:27:32 UTC, Stefan Koch wrote:
[ ... ]
Hi Guys,
I've fixed a few ABI bugs and as a result my alternative to
std.bitmanip.bitfields complies now.
I've also made an intrinsic for the concat operation.
Which causes ~= to be 6-10x faster when it's heavily used.
or maybe use core.atomic.atomicLoad and store with right
https://dlang.org/phobos/core_atomic.html#.MemoryOrder
On Sun, Aug 13, 2017 at 1:51 PM, Daniel Kozak wrote:
> maybe something like https://dlang.org/phobos/
> core_bitop.html#.volatileLoad and https://dlang.org/phobos/
maybe something like https://dlang.org/phobos/core_bitop.html#.volatileLoad
and https://dlang.org/phobos/core_bitop.html#.volatileStore
On Sun, Aug 13, 2017 at 1:37 PM, Igor via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:
> I am converting a C code that uses this macro:
>
>
I am converting a C code that uses this macro:
#define CompletePastWritesBeforeFutureWrites _WriteBarrier();
_mm_sfence()
As far as I see core.atomic:atomicFence() is the equivalent of
_mm_sfence() but I can't find what would be the equivalent of
_WriteBarrier(). As far as I understand it
On Sunday, 13 August 2017 at 02:50:13 UTC, crimaniak wrote:
On Saturday, 12 August 2017 at 18:57:44 UTC, Arek wrote:
I have the folowing problem:
I like to envelope the class object in struct to control the
destruction moment and then send this object to another
thread/fiber (or task, cause I
On Sunday, 13 August 2017 at 09:41:39 UTC, Johan Engelen wrote:
On Sunday, 13 August 2017 at 09:08:14 UTC, Petar Kirov
[ZombineDev] wrote:
[...]
[...]
Execution of sum_subranges is already O(1), because the
calculation of the sum is delayed: the return type of the
function is not
On Sunday, 13 August 2017 at 09:15:48 UTC, amfvcg wrote:
Change the parameter for this array size to be taken from stdin
and I assume that these optimizations will go away.
This is paramount for all of the testing, examining, and
comparisons that are discussed in this thread.
Full
On Sunday, 13 August 2017 at 09:08:14 UTC, Petar Kirov
[ZombineDev] wrote:
This instantiation:
sum_subranges(std.range.iota!(int, int).iota(int, int).Result,
uint)
of the following function:
auto sum_subranges(T)(T input, uint range)
{
import std.range : chunks, ElementType, array;
On Sunday, 13 August 2017 at 08:09:28 UTC, Petar Kirov
[ZombineDev] wrote:
On Sunday, 13 August 2017 at 07:37:15 UTC, data pulverizer
wrote:
Hi all,
Is it possible to launch/spawn a thread/fibre or some other
appropriate item and obtain an immutable/enum or some
appropriate output at
On Sunday, 13 August 2017 at 09:08:14 UTC, Petar Kirov
[ZombineDev] wrote:
There's one especially interesting result:
This instantiation:
sum_subranges(std.range.iota!(int, int).iota(int, int).Result,
uint)
of the following function:
auto sum_subranges(T)(T input, uint range)
{
import
On Sunday, 13 August 2017 at 08:43:29 UTC, amfvcg wrote:
On Sunday, 13 August 2017 at 08:33:53 UTC, Petar Kirov
[ZombineDev] wrote:
With Daniel's latest version (
http://forum.dlang.org/post/mailman.5963.1502612885.31550.digitalmars-d-le...@puremagic.com
)
$ ldc2 -O3 --release
On Sunday, 13 August 2017 at 08:33:53 UTC, Petar Kirov
[ZombineDev] wrote:
With Daniel's latest version (
http://forum.dlang.org/post/mailman.5963.1502612885.31550.digitalmars-d-le...@puremagic.com
)
$ ldc2 -O3 --release sum_subranges2.d
$ ./sum_subranges2
210 ms, 838 μs, and 8 hnsecs
On Sunday, 13 August 2017 at 08:32:50 UTC, amfvcg wrote:
Gives me
5 μs and 2 hnsecs
5000
3 secs, 228 ms, 837 μs, and 4 hnsecs
5000
And you've compiled it with?
Btw. clang for c++ version works worse than gcc (for this case
[112ms vs 180ms]).
DMD64 D Compiler v2.074.1
And this one is awesome :P
http://ideone.com/muehUw
On Sun, Aug 13, 2017 at 10:27 AM, Daniel Kozak wrote:
> this one is even faster than c++:
> http://ideone.com/TRDsOo
>
> On Sun, Aug 13, 2017 at 10:00 AM, Daniel Kozak wrote:
>
>> my second version on ldc
On Sunday, 13 August 2017 at 08:29:30 UTC, Petar Kirov
[ZombineDev] wrote:
On Sunday, 13 August 2017 at 08:13:56 UTC, amfvcg wrote:
On Sunday, 13 August 2017 at 08:00:53 UTC, Daniel Kozak wrote:
my second version on ldc takes 380ms and c++ version on same
compiler (clang), takes 350ms, so it
Gives me
5 μs and 2 hnsecs
5000
3 secs, 228 ms, 837 μs, and 4 hnsecs
5000
And you've compiled it with?
Btw. clang for c++ version works worse than gcc (for this case
[112ms vs 180ms]).
On Sunday, 13 August 2017 at 08:13:56 UTC, amfvcg wrote:
On Sunday, 13 August 2017 at 08:00:53 UTC, Daniel Kozak wrote:
my second version on ldc takes 380ms and c++ version on same
compiler (clang), takes 350ms, so it seems to be almost same
Ok, on ideone (ldc 1.1.0) it timeouts, on dpaste
On Sunday, 13 August 2017 at 08:13:56 UTC, amfvcg wrote:
On Sunday, 13 August 2017 at 08:00:53 UTC, Daniel Kozak wrote:
my second version on ldc takes 380ms and c++ version on same
compiler (clang), takes 350ms, so it seems to be almost same
Ok, on ideone (ldc 1.1.0) it timeouts, on dpaste
this one is even faster than c++:
http://ideone.com/TRDsOo
On Sun, Aug 13, 2017 at 10:00 AM, Daniel Kozak wrote:
> my second version on ldc takes 380ms and c++ version on same compiler
> (clang), takes 350ms, so it seems to be almost same
>
> On Sun, Aug 13, 2017 at 9:51 AM,
On Sunday, 13 August 2017 at 08:00:53 UTC, Daniel Kozak wrote:
my second version on ldc takes 380ms and c++ version on same
compiler (clang), takes 350ms, so it seems to be almost same
Ok, on ideone (ldc 1.1.0) it timeouts, on dpaste (ldc 0.12.0) it
gets killed.
What version are you using?
On Sunday, 13 August 2017 at 07:37:15 UTC, data pulverizer wrote:
Hi all,
Is it possible to launch/spawn a thread/fibre or some other
appropriate item and obtain an immutable/enum or some
appropriate output at compile-time? For instance return an
immutable(string) from the external thread to
my second version on ldc takes 380ms and c++ version on same compiler
(clang), takes 350ms, so it seems to be almost same
On Sun, Aug 13, 2017 at 9:51 AM, amfvcg via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:
> On Sunday, 13 August 2017 at 07:30:32 UTC, Daniel Kozak wrote:
>
On Sunday, 13 August 2017 at 07:30:32 UTC, Daniel Kozak wrote:
Here is more D idiomatic way:
import std.stdio : writeln;
import std.algorithm.comparison: min;
import std.algorithm.iteration: sum;
import core.time: MonoTime, Duration;
auto sum_subranges(T)(T input, uint range)
{
import
On Sunday, 13 August 2017 at 07:18:31 UTC, Roman Hargrave wrote:
I'm writing some bindings and have run in to a dilemma due to
the lack of explicit information on how the D compiler
"decides" to use virtual dispatch for a member function or not.
Specifically, I have a C++ library that
Hi all,
Is it possible to launch/spawn a thread/fibre or some other
appropriate item and obtain an immutable/enum or some appropriate
output at compile-time? For instance return an immutable(string)
from the external thread to be used as the input to a template
parameter or a CTFE function.
Here is more D idiomatic way:
import std.stdio : writeln;
import std.algorithm.comparison: min;
import std.algorithm.iteration: sum;
import core.time: MonoTime, Duration;
auto sum_subranges(T)(T input, uint range)
{
import std.array : array;
import std.range : chunks, ElementType;
I'm writing some bindings and have run in to a dilemma due to the
lack of explicit information on how the D compiler "decides" to
use virtual dispatch for a member function or not.
Specifically, I have a C++ library that _explicitly_ marks some
member functions as virtual, in addition to a
this works ok for me with ldc compiler, gdc does not work on my arch
machine so I can not do comparsion to your c++ versin (clang does not work
with your c++ code)
import std.stdio : writeln;
import std.algorithm.comparison: min;
import std.algorithm.iteration: sum;
import core.time: MonoTime,
On Sunday, 13 August 2017 at 06:09:39 UTC, amfvcg wrote:
Hi all,
I'm solving below task:
Well, for one thing, you are preallocating in C++ code but not in
D.
On my machine, your version of the code completes in 3.175
seconds. Changing it a little reduces it to 0.420s:
T[] result =
On Sunday, 13 August 2017 at 06:09:39 UTC, amfvcg wrote:
Hi all,
I'm solving below task:
given container T and value R return sum of R-ranges over T. An
example:
input : T=[1,1,1] R=2
output : [2, 1]
input : T=[1,2,3] R=1
output : [1,2,3]
(see dlang unittests for more examples)
Below c++
On 13/08/2017 7:09 AM, amfvcg wrote:
Hi all,
I'm solving below task:
given container T and value R return sum of R-ranges over T. An example:
input : T=[1,1,1] R=2
output : [2, 1]
input : T=[1,2,3] R=1
output : [1,2,3]
(see dlang unittests for more examples)
Below c++ code compiled with
Hi all,
I'm solving below task:
given container T and value R return sum of R-ranges over T. An
example:
input : T=[1,1,1] R=2
output : [2, 1]
input : T=[1,2,3] R=1
output : [1,2,3]
(see dlang unittests for more examples)
Below c++ code compiled with g++-5.4.0 -O2 -std=c++14 runs on my
75 matches
Mail list logo