On Sunday, 8 November 2020 at 05:07:54 UTC, frame wrote:
Something wrong with this library.
Well, we need an edit function here.
The library has no TCP_NODELAY flag enabled.
This fix speeds it up to 10x and solves the 44ms problem to 400us
On Saturday, 7 November 2020 at 12:29:46 UTC, Andre Pany wrote:
Maybe mysql native is slower, but maybe this isn't the case,
just the way performance measurements was done was incorrectly.
I have tried mysql-native and it tooks way to long for simple
things.
My test setup is a remote linux
On Saturday, 7 November 2020 at 22:12:12 UTC, Arjan wrote:
What is the usage of `static` in this? :
```
static enum Status
{
NONE,
BUSY,
...
}
```
It's redundant
What is the usage of `static` in this? :
```
static enum Status
{
NONE,
BUSY,
...
}
```
On Saturday, 7 November 2020 at 21:04:19 UTC, starcanopy wrote:
void main() {
f!(int, float, char)("Hello, world!");
}
https://run.dlang.io/is/e8FGrF
Ah, I had discovered a different error when I tried that. Thanks!
On Friday, 6 November 2020 at 10:51:20 UTC, Andrey Zherikov wrote:
struct Result(T)
{
struct Success
{
static if(!is(T == void))
{
T value;
}
}
struct Failure
{
string error;
}
Algebraic!(Success, Failure) result;
On Saturday, 7 November 2020 at 20:43:04 UTC, Ben Jones wrote:
I'm trying to write a function template with 1 parameter whose
type is inferred, but with the other parameters variadic.
Basically, I want to do this:
auto f(Ts..., Inferred)(Inferred inf){}
and call it with f!(X,Y,Z)(w)
I'm trying to write a function template with 1 parameter whose
type is inferred, but with the other parameters variadic.
Basically, I want to do this:
auto f(Ts..., Inferred)(Inferred inf){}
and call it with f!(X,Y,Z)(w) //inferred will be typeof(w), Ts...
== (X, Y, Z)
which I can't do
On Saturday, 7 November 2020 at 18:02:26 UTC, Jan Hönig wrote:
I have a simple question.
How exactly does Tuple work?
In detail, I am interested in expand and opSlice.
A Tuple is a struct whose members are generated by type sequence
instantiation:
On Saturday, 7 November 2020 at 16:37:22 UTC, Vino wrote:
,
Trying to improve the above code hence request your help on
how to use array container instead of array, tried as per the
example below but not working.
I think you can just use a static array as ubyte[1024] if you
want a fixed
I have a simple question.
How exactly does Tuple work?
In detail, I am interested in expand and opSlice.
For expand, I have found the line:
https://github.com/dlang/phobos/blob/master/std/typecons.d#L618
How does that work, where is the rest? What does it do?
Similary I can access tuples
On Saturday, 7 November 2020 at 15:49:13 UTC, James Blachly wrote:
```
return i > 0 ? cast(Result) Success!int(i) : cast(Result)
Failure("Sorry");
```
I don't know about the SumType but I would expect you could use a
construction instead of cast.
import std;
alias Result =
On Saturday, 7 November 2020 at 16:12:06 UTC, Per Nordlöw wrote:
CtoLexer_parser.d 665 57 error invalid UTF
character \Ud800
CtoLexer_parser.d 665 67 error invalid UTF
character \Udbff
CtoLexer_parser.d 666 28 error invalid UTF
character
On Saturday, 7 November 2020 at 15:26:48 UTC, frame wrote:
On Saturday, 7 November 2020 at 14:57:39 UTC, Vino wrote:
After further analysis we suspect that the issue is at the
package std.net.curl the flow of the program is as below
Establishing a new connection may vary in duration of
I'm writing a parser generator for ANTLR-grammars and have come
across the rule
fragment Letter
: [a-zA-Z$_] // these are below 0x7F
| ~[\u-\u007F\uD800-\uDBFF] // covers all characters
above 0x7F which are not a surrogate
| [\uD800-\uDBFF] [\uDC00-\uDFFF] // covers UTF-16
On Saturday, 7 November 2020 at 15:49:13 UTC, James Blachly wrote:
```
retval = i > 0 ? Success!int(i) : Failure("Sorry");
```
casting each to `Result` compiles, but is verbose:
```
return i > 0 ? cast(Result) Success!int(i) : cast(Result)
Failure("Sorry");
```
** Could someone more
On 11/6/20 5:51 AM, Andrey Zherikov wrote:
I have auto function 'f' that might return either an error (with some
text) or a result (with some value). The problem is that the type of the
error is not the same as the type of result so compilation fails.
...
How can I make the original code
On Friday, 6 November 2020 at 19:35:47 UTC, H. S. Teoh wrote:
You can use the typeof() operator to capture the type of a
long, unwieldy type in an alias. This is useful if you ever
need to store such a return type somewhere, e.g.:
alias T = typeof(csvReader(...));
struct
On Saturday, 7 November 2020 at 14:57:39 UTC, Vino wrote:
After further analysis we suspect that the issue is at the
package std.net.curl the flow of the program is as below
Establishing a new connection may vary in duration of +200ms or
more.
On 11/7/20 7:58 AM, Arjan wrote:
Is there a cmdline switch to DUB to override certain dub.sdl settings
for a dependency? Like the addition or override to lib dirs or link-libs?
For example once and a while I run into linking issues with symbols not
found due to the `soname` being different on
On Saturday, 7 November 2020 at 14:38:35 UTC, Vino wrote:
On Saturday, 7 November 2020 at 14:16:46 UTC, Vino wrote:
On Saturday, 7 November 2020 at 12:29:46 UTC, Andre Pany wrote:
On Friday, 6 November 2020 at 04:58:05 UTC, Vino wrote:
[...]
While doing performance measurements you should
On Saturday, 7 November 2020 at 14:16:46 UTC, Vino wrote:
On Saturday, 7 November 2020 at 12:29:46 UTC, Andre Pany wrote:
On Friday, 6 November 2020 at 04:58:05 UTC, Vino wrote:
[...]
While doing performance measurements you should do each test
multiple time (at least 5 times). There could
On Saturday, 7 November 2020 at 12:29:46 UTC, Andre Pany wrote:
On Friday, 6 November 2020 at 04:58:05 UTC, Vino wrote:
[...]
While doing performance measurements you should do each test
multiple time (at least 5 times). There could be for example an
effect that executing a db query the
Is there a cmdline switch to DUB to override certain dub.sdl
settings for a dependency? Like the addition or override to lib
dirs or link-libs?
For example once and a while I run into linking issues with
symbols not found due to the `soname` being different on my
system than specified in
On Thursday, 5 November 2020 at 16:22:11 UTC, Alaindevos wrote:
This is from the bootstrap documentation. I think you must
adapt this to .dt files.
dt files are basically pugjs https://pugjs.org/ files.
When you use vscode with this extension:
On Thursday, 5 November 2020 at 16:22:11 UTC, Alaindevos wrote:
This is from the bootstrap documentation. I think you must
adapt this to .dt files.
```
...
...
html( lang='nl' )
head
title #{pageTitle}
meta( charset="utf-8")
meta( name="viewport"
On Friday, 6 November 2020 at 04:58:05 UTC, Vino wrote:
Hi All,
We recently tested the below components and the test results
are as below, even though hunt-database is faster than
mysql-native it is hard to use this package as it lacks on
documentation, non of the example provided in the
On Saturday, 7 November 2020 at 01:50:15 UTC, Jesse Phillips
wrote:
On Friday, 6 November 2020 at 15:06:18 UTC, Andrey Zherikov
wrote:
On Friday, 6 November 2020 at 14:58:40 UTC, Jesse Phillips
wrote:
On Friday, 6 November 2020 at 14:20:40 UTC, Andrey Zherikov
wrote:
This issue seems hit the
28 matches
Mail list logo