On Monday, 17 September 2018 at 03:16:33 UTC, spikespaz wrote:
There is a project that I wish to use from D
(https://ultralig.ht).
It's Electron, but with forked WebKit and the samples are very,
very fast.
This is a great compromise between wanting to have a very
custom interface and not wa
On Friday, 14 September 2018 at 15:42:05 UTC, Jesse Phillips
wrote:
On Friday, 14 September 2018 at 05:41:41 UTC, rmc wrote:
I do wonder if `dmd` by itself on the command line works.
Could it be some sort of 32 bit bug in the latest release of
dmd? Relating to argc/argv.
"source/dub/compile
There is a project that I wish to use from D
(https://ultralig.ht).
It's Electron, but with forked WebKit and the samples are very,
very fast.
This is a great compromise between wanting to have a very custom
interface and not wanting to use the slow
Electron/Sciter/Awesomium/WebView.
I am
On Friday, 14 September 2018 at 17:34:59 UTC, Mike Wey wrote:
You will also have to pass `--build=plain` to dub because of a
optlink bug.
https://issues.dlang.org/show_bug.cgi?id=15418
thanks Mike,
I tried using `--build-plain`, optlink didn't report out of
memory, but it hangs !
```
Co
On Sunday, 16 September 2018 at 16:50:32 UTC, Neia Neutuladh
wrote:
On Sunday, 16 September 2018 at 16:28:20 UTC, Per Nordlöw wrote:
If I have
alias N = Nullable!(T, T nullValue)
fed as template parameter to another template how can I
at compile-time get the `nullValue` ?
import std.trai
On Sunday, 16 September 2018 at 16:28:20 UTC, Per Nordlöw wrote:
If I have
alias N = Nullable!(T, T nullValue)
fed as template parameter to another template how can I
at compile-time get the `nullValue` ?
import std.traits;
enum nullValue = TemplateArgsOf!(N)[1];
On Sunday, 16 September 2018 at 10:55:43 UTC, berni wrote:
The problem is more general: you can only use top-level
symbols in UFCS.
You can use an identity alias template to bypass this:
https://blog.thecybershadow.net/2015/04/28/the-amazing-template-that-does-nothing/
(search for UFCS in the p
If I have
alias N = Nullable!(T, T nullValue)
fed as template parameter to another template how can I
at compile-time get the `nullValue`
?
I need this to implement fast linear search over a slice of type
Nullable!(ulong, ulong.max)[]
searching for a non-null key without needing to
On Sunday, 16 September 2018 at 14:12:27 UTC, Guillaume Piolat
wrote:
Anyone has any information about the ABI of delegates?
In particular how to call them with a particular "this"/frame
pointer?
To solve a hairy problem I need a delegate with a synthesized
frame pointer.
https://dpaste.dzf
On Sunday, 16 September 2018 at 14:12:27 UTC, Guillaume Piolat
wrote:
In particular how to call them with a particular "this"/frame
pointer?
Related thread:
https://forum.dlang.org/post/wjbhpztovxratexao...@forum.dlang.org
Anyone has any information about the ABI of delegates?
In particular how to call them with a particular "this"/frame
pointer?
To solve a hairy problem I need a delegate with a synthesized
frame pointer.
https://dpaste.dzfl.pl/cf44417c98f9
The problem is that delegate forwarding seems to req
On Sunday, 16 September 2018 at 11:51:24 UTC, learnfirst1 wrote:
On Sunday, 16 September 2018 at 11:30:11 UTC, learnfirst1 wrote:
On Sunday, 16 September 2018 at 10:14:24 UTC, Vladimir
Panteleev wrote:
I will test pcre solution vs mpfc for benchmark. the pcre is
easy to deal with low/up cas
On Sunday, 16 September 2018 at 11:30:11 UTC, learnfirst1 wrote:
On Sunday, 16 September 2018 at 10:14:24 UTC, Vladimir
Panteleev wrote:
It has to be case Case Insensitive, so before I run mpfh for
each new request headers, I need to convert the keys into low or
up case. this value can be
On Sunday, 16 September 2018 at 10:14:24 UTC, Vladimir Panteleev
wrote:
On Sunday, 16 September 2018 at 10:04:09 UTC, learnfirst1 wrote:
how to make this more fast like with one loop and get the
results.
thanks for reply, minimal perfect hashing seems good for this
task, I will do more test
The problem is more general: you can only use top-level symbols
in UFCS.
You can use an identity alias template to bypass this:
https://blog.thecybershadow.net/2015/04/28/the-amazing-template-that-does-nothing/
(search for UFCS in the page).
Good to know. :-)
Homework ?
I think it would also be better to only walk/match the
Header.data and header_keys only once (using the generated switch
statement that Vladimir suggested). So your Headers struct should
have a parse() function, which will match all of the headers to
the keys and store them locally
On Sunday, 16 September 2018 at 10:04:09 UTC, learnfirst1 wrote:
how to make this more fast like with one loop and get the
results.
This is a more general problem than any specific programming
language; you may want to look into perfect hashing:
https://en.wikipedia.org/wiki/Perfect_hash_fun
The use case is translate http header key into enum.
this is the current code : https://run.dlang.io/is/lpw29w
In this fake code I only list a few headers, it should be more.
but less then 128 and only include the a few codes.
how to make this more fast like with one loop and get the result
On Sunday, 16 September 2018 at 09:46:15 UTC, berni wrote:
Where is my mistake?
Lambdas are not the issue here. The problem is more general: you
can only use top-level symbols in UFCS.
You can use an identity alias template to bypass this:
https://blog.thecybershadow.net/2015/04/28/the-amazi
The following program does not compile:
import std.stdio;
import std.algorithm;
struct A
{
struct S
{
int x;
}
const bool foo(in S s, in int k)
{
return s.xa.foo(3)).writeln;
}
}
void main()
{
A().bar();
}
I get (using rdmd):
test.d(18): Error: no proper
20 matches
Mail list logo