On Wednesday, 30 March 2016 at 22:49:24 UTC, ag0aep6g wrote:
When byCodeUnit takes no time at all, isn't 1µs infinite times
slower, instead of 100 times? And I think byCodeUnits's 1µs is
so low that noise is going to mess with any ratios you make.
It's not that it's taking no time at all,
OK solved;)
Shared libraries doesn't need to be mentioned in libs section in
dub.
Therefore copying after the linking is correct and is working
fine.
Kind regards
André
Oh, cool.
On Thursday, 31 March 2016 at 03:29:19 UTC, H. S. Teoh wrote:
Or implement manual substitution with a pipeline:
string myString = ...;
string escapedStr = myString
.chunks(1)
.map!(c => (c == "\n") ? "\\n" :
(c
On Thursday, 31 March 2016 at 04:57:01 UTC, Andre wrote:
I can't see why it is working with vibe-d projects (openssl
libraries copied to application folder) but not for my project.
There is no console output "copying files for..." while using
dub for my application project.
What is wrong?
Hi,
I created a library which uses some shared objects. The dub.json
looks like this:
{
"name": "sec",
"configurations": [
{
"name": "debug",
"targetType": "library",
On Thursday, 31 March 2016 at 03:23:52 UTC, Seb wrote:
http://dlang.org/spec/lex.html#WysiwygString
r"ab\n" or `ab\n`
Yes I know. But I mean like,
string a = r"ab\n";
writeln(escape(a)); // => ab\n
On Wednesday, 30 March 2016 at 20:23:13 UTC, Kagamin wrote:
You can also look here
https://github.com/cruisercoder/dstddb/blob/master/src/std/database/odbc/database.d for an example of accessing ODBC from D (only strings are supported so far).
Does ita mean that I would not able to select
On Thu, Mar 31, 2016 at 03:23:52AM +, Seb via Digitalmars-d-learn wrote:
> On Thursday, 31 March 2016 at 03:15:49 UTC, cy wrote:
> >This might be a dumb question. How do I format a string so that all
> >the newlines print as \n and all the tabs as \t and such?
>
>
On Thursday, 31 March 2016 at 03:15:49 UTC, cy wrote:
This might be a dumb question. How do I format a string so that
all the newlines print as \n and all the tabs as \t and such?
http://dlang.org/spec/lex.html#WysiwygString
r"ab\n" or `ab\n`
This might be a dumb question. How do I format a string so that
all the newlines print as \n and all the tabs as \t and such?
On Thursday, 31 March 2016 at 01:12:50 UTC, Adam D. Ruppe wrote:
On Thursday, 31 March 2016 at 00:50:16 UTC, Basile B. wrote:
There should be a way to know how many bytes are available ?
You are already using poll()... I'd just use read() directly on
the file number too. It will read as much
On Thursday, 31 March 2016 at 00:06:19 UTC, maik klein wrote:
On Wednesday, 30 March 2016 at 17:38:15 UTC, maik klein wrote:
On Wednesday, 30 March 2016 at 12:46:08 UTC, Vadim Lopatin
wrote:
On Wednesday, 30 March 2016 at 12:19:34 UTC, maik klein wrote:
I want to finally convert my project to
On Thursday, 31 March 2016 at 00:50:16 UTC, Basile B. wrote:
There should be a way to know how many bytes are available ?
You are already using poll()... I'd just use read() directly on
the file number too. It will read as much as is available up to
the max size of the buffer, but if it
Hey, I have a class that wraps a process and implements two
events. One of them is called after poll() for example if new
data are available.
The event is called correctly but I don't know how exactly how to
read the data:
- per buffer of fixed size ?
- using the stream information ?
If i
On Wed, Mar 30, 2016 at 08:43:03PM +, jmh530 via Digitalmars-d-learn wrote:
> On Wednesday, 30 March 2016 at 18:56:29 UTC, H. S. Teoh wrote:
> >
> >Does this do what you want?
> >
>
> Okay, I've looked at this a bit more thoroughly and it works perfectly
> (perhaps with a better name put in
On Wednesday, 30 March 2016 at 17:38:15 UTC, maik klein wrote:
On Wednesday, 30 March 2016 at 12:46:08 UTC, Vadim Lopatin
wrote:
On Wednesday, 30 March 2016 at 12:19:34 UTC, maik klein wrote:
I want to finally convert my project to windows. That means
that I want to build it on windows and
As expected, the following trivial case works:
void main() {
auto func = delegate(int i) {}; // expects int
func(const(int)(42));// passes const(int)
}
The following concurrency program fails at runtime:
import core.thread;
import std.concurrency;
void foo() {
On 30.03.2016 19:30, Jack Stouffer wrote:
Just to drive this point home, I made a very simple benchmark. Iterating
over code points when you don't need to is 100x slower than iterating
over code units.
[...]
enum testCount = 1_000_000;
enum var = "Lorem ipsum dolor sit amet, consectetur
On Wednesday, 30 March 2016 at 18:56:29 UTC, H. S. Teoh wrote:
Does this do what you want?
Okay, I've looked at this a bit more thoroughly and it works
perfectly (perhaps with a better name put in phobos?).
If I'm understanding this correctly, the ImplType creates the
correct type
You can also look here
https://github.com/cruisercoder/dstddb/blob/master/src/std/database/odbc/database.d for an example of accessing ODBC from D (only strings are supported so far).
Latest version of what? ODBC bindings are in phobos:
http://dlang.org/phobos/etc_c_odbc_sql.html
On Tuesday, 29 March 2016 at 18:29:27 UTC, Ali Çehreli wrote:
So, dict is a template value parameter of type T[string]. I
don't think you can use an associative array as a template
value parameter. (Can we?)
Found this in D language reference:
On Wednesday, 30 March 2016 at 18:56:29 UTC, H. S. Teoh wrote:
Does this do what you want?
I think it does. That's an approach I would not have thought of.
I do not really know much about AliasSeq.
On Wednesday, 30 March 2016 at 18:31:35 UTC, Kagamin wrote:
Also there's ODBC driver
http://www.firebirdsql.org/en/devel-odbc-driver/ - you can use
it, phobos has ODBC bindings.
Where I can get the latest version? There is not any package on
http://code.dlang.org/ and searching on github
On Wed, Mar 30, 2016 at 06:12:40PM +, jmh530 via Digitalmars-d-learn wrote:
> I wrote a version of cartesianProduct that will return the cartesian
> product when the some of the types are not ranges. The original code
> is below.
>
> My issue is that I can't figure out how to turn it into a
Also there's ODBC driver
http://www.firebirdsql.org/en/devel-odbc-driver/ - you can use
it, phobos has ODBC bindings.
Mingw or windows platform SDK.
I have found next driver
http://www.ibpp.org/#what_is_ibpp
Here http://sourceforge.net/projects/ibpp is link to zip package
that include two exe files and ibpp.lib ibpp.h
it's look like it's ass that need for binding. I tried to run
htod.exe but got error:
D:\Project\2016>htod.exe ibpp.h
I wrote a version of cartesianProduct that will return the
cartesian product when the some of the types are not ranges. The
original code is below.
My issue is that I can't figure out how to turn it into a
variadic template. The latest thing I tried is:
auto mixedCartesianProduct(T...)(T x)
On Wednesday, 30 March 2016 at 12:46:08 UTC, Vadim Lopatin wrote:
On Wednesday, 30 March 2016 at 12:19:34 UTC, maik klein wrote:
I want to finally convert my project to windows. That means
that I want to build it on windows and linux.
The problem is that I have one external c library 'glfw'.
On Wednesday, 30 March 2016 at 05:16:04 UTC, H. S. Teoh wrote:
If we didn't have autodecoding, would be a simple matter of
searching for sentinel substrings. This also indicates that
most of the work done by autodecoding is unnecessary -- it's
wasted work since most of the string data is
On 30.03.2016 15:44, Nordlöw wrote:
On Wednesday, 30 March 2016 at 13:24:20 UTC, ag0aep6g wrote:
[...]
This is off topic, but don't mark templates like that @trusted. By
doing so you also trust R, but you don't know if it's memory safe.
Should I post in group "General" instead?
No, no, I
On Wednesday, 30 March 2016 at 13:38:40 UTC, Adam D. Ruppe wrote:
Don't use your ptr method. Instead, make it a slice method:
`return _store[0 .. _length];`
Now you can just index it internally and let the compiler
automatically insert range checks. When you need the pointer,
you still have
On Wednesday, 30 March 2016 at 13:24:20 UTC, ag0aep6g wrote:
On 30.03.2016 15:12, Nordlöw wrote:
https://github.com/nordlow/justd/blob/master/packedarray.d
From there:
this(R)(R values, bool assumeSortedParameter = false)
@trusted nothrow @("complexity", "O(n*log(n))")
if
On Wednesday, 30 March 2016 at 13:12:49 UTC, Nordlöw wrote:
I'm however uncertain about how to implement error handling of
bounds checking and how these interact with `@nogc`. My main
goal is to match semantics of builtin D arrays and slices.
I would actually cheat on this somehow and
On Wednesday, 30 March 2016 at 07:38:07 UTC, Benjamin Thaut wrote:
On Tuesday, 29 March 2016 at 23:41:28 UTC, Thalamus wrote:
dmd dllmain.d dll.def -w -wi
-g -map -ofLogic.dll
-m64 -debug -shared
Anyone know what I should try next? Am I missing something
simple? :)
thanks!
Thalamus
On 30.03.2016 15:12, Nordlöw wrote:
https://github.com/nordlow/justd/blob/master/packedarray.d
From there:
this(R)(R values, bool assumeSortedParameter = false) @trusted nothrow
@("complexity", "O(n*log(n))")
if (isInputRange!R)
This is off topic, but don't mark templates like
I'm working on a support-it-all Array implementation (with
optional sortedness) at
https://github.com/nordlow/justd/blob/master/packedarray.d
that has a very flexible memory allocation model via either
GC.malloc or via privately imported malloc, realloc and free.
This in order to provide
On Wednesday, 30 March 2016 at 12:19:34 UTC, maik klein wrote:
I want to finally convert my project to windows. That means
that I want to build it on windows and linux.
The problem is that I have one external c library 'glfw'. I
thought that I would just link with it explicitly but actually
I want to finally convert my project to windows. That means that
I want to build it on windows and linux.
The problem is that I have one external c library 'glfw'. I
thought that I would just link with it explicitly but actually I
am not completely sure how.
So I just added a submodule,
On Tuesday, 29 March 2016 at 10:06:43 UTC, Adrian Matoga wrote:
(...)
Another version that doesn't misbehave if first and second are of
different lengths:
import std.meta : AliasSeq;
template RR(A...) {
template With(B...) {
static if (A.length == 0 || B.length ==
On Wednesday, 30 March 2016 at 09:06:20 UTC, Nicholas Wilson
wrote:
object.Exception@dustmite.d(244): Initial test fails
Works for me:
$ cat src/test.d
import std.stdio;
void main()
{
writeln("foo");
writeln("bar");
}
$ dustmite src "cat test.d 2>&1 | grep -qF foo && dmd -c
On Wednesday, 30 March 2016 at 09:06:20 UTC, Nicholas Wilson
wrote:
so
Oops. should be $ dfmt out.d
core.exception.AssertError@/Users/nicholaswilson/d/phobos/std/conv.d(4061):
emplace: Chunk is not aligned.
so
$core.exception.AssertError@/Users/nicholaswilson/d/phobos/std/conv.d(4061):
emplace: Chunk is not aligned.
4 dfmt0x000109536ace
_d_assert_msg + 142
5 dfmt0x0001094d600f
On Tuesday, 29 March 2016 at 23:41:28 UTC, Thalamus wrote:
dmd dllmain.d dll.def -w -wi -g
-map -ofLogic.dll -m64
-debug -shared
Anyone know what I should try next? Am I missing something
simple? :)
thanks!
Thalamus
You should be using "-gc" instead of "-g" when building 64-bit D
On 30.03.2016 01:41, Thalamus wrote:
Apologies if this has been discussed before, but I wasn't able to find
anything similar on the forums or web. I can't seem to figure out how to
debug a D DLL from a C# EXE. (My actual purpose here is to use D to
build native plugins for Unity 5, but Unity
46 matches
Mail list logo