On Tuesday, August 09, 2016 05:13:44 cy via Digitalmars-d-learn wrote:
> I really like UFCS, which is to say, defining functions outside
> the class/struct to operate on it, but you can still say
> object.function(...) and it'll get rewritten into
> function(object,...).
>
> Only sticky point is
I really like UFCS, which is to say, defining functions outside
the class/struct to operate on it, but you can still say
object.function(...) and it'll get rewritten into
function(object,...).
Only sticky point is the convenience of "this". Like I can go
struct A {
bool a;
On Tuesday, August 09, 2016 01:07:53 Gerald via Digitalmars-d-learn wrote:
> I have a RegexMatch that I want to pass to a function that takes
> the match and replaces various tokens in a string with the match
> and/or individual groups of the match. I'm struggling to figure
> out how to pass a
I have a RegexMatch that I want to pass to a function that takes
the match and replaces various tokens in a string with the match
and/or individual groups of the match. I'm struggling to figure
out how to pass a RegexMatch to a function, right now I have code
like the follows:
RegexMatch
On 08/09/2016 12:05 AM, Alexsej wrote:
//header from server
server: nginx
date: Mon, 08 Aug 2016 22:02:15 GMT
content-type: text/xml; Charset=utf-8
content-length: 204
connection: keep-alive
vary: Accept-Encoding
cache-control: private
expires: Mon, 08 Aug 2016 22:02:15 GMT
set-cookie:
On Monday, 8 August 2016 at 21:11:26 UTC, ag0aep6g wrote:
On 08/08/2016 09:57 PM, Alexsej wrote:
// content in ISO-8859-1 to UTF-8 encoding but I lose
//the Cyrillic "отсутствует или неверно задан параметр"
// I get it "оÑÑÑÑÑÑвÑÐµÑ Ð¸Ð»Ð¸ невеÑно
задан
On 08/08/2016 11:11 PM, ag0aep6g wrote:
Why on earth does transcode only accept immutable characters for input?
https://github.com/dlang/phobos/pull/4722
On Monday, 8 August 2016 at 21:11:26 UTC, ag0aep6g wrote:
On 08/08/2016 09:57 PM, Alexsej wrote:
// content in ISO-8859-1 to UTF-8 encoding but I lose
//the Cyrillic "отсутствует или неверно задан параметр"
// I get it "оÑÑÑÑÑÑвÑÐµÑ Ð¸Ð»Ð¸ невеÑно
задан
I have a rather large array that I intend to build. but much of it will
only occasionally be used. Will the unused sections automatically be
paged out? If it matters my system is Debian Linux.
This array will be indexed by a ulong. Is there any reasonable maximum
size? I've considered
On 08/08/2016 09:57 PM, Alexsej wrote:
// content in ISO-8859-1 to UTF-8 encoding but I lose
//the Cyrillic "отсутствует или неверно задан параметр"
// I get it "оÑÑÑÑÑÑвÑÐµÑ Ð¸Ð»Ð¸ невеÑно
задан паÑамеÑÑ"
// How do I change the encoding to UTF-8
On 08.08.2016 21:48, Adil wrote:
On Monday, 8 August 2016 at 18:45:35 UTC, drug007 wrote:
On 08.08.2016 21:35, Adil wrote:
On Monday, 8 August 2016 at 18:29:54 UTC, Adil wrote:
[...]
One minor addition. I use the Makefile in our CI tool, that inserts
auto-increment numbers in place of git
import std.stdio;
import std.net.curl;
void main()
{
string url = "www.site.ru/xml/api.asp";
string data =
"
59538
...
";
auto http = HTTP();
On Monday, 8 August 2016 at 18:45:35 UTC, drug007 wrote:
On 08.08.2016 21:35, Adil wrote:
On Monday, 8 August 2016 at 18:29:54 UTC, Adil wrote:
[...]
One minor addition. I use the Makefile in our CI tool, that
inserts
auto-increment numbers in place of git hashes. Numbers are a
familiar.
On 08.08.2016 21:35, Adil wrote:
On Monday, 8 August 2016 at 18:29:54 UTC, Adil wrote:
I have a Makefile setup that I use to return the latest git tag/commit
from within my program. The setup is as below:
VERSIONED_LIB = myversion.d && rm -f myversion.d
VERSION_STRING ?= $(shell git
On Monday, 8 August 2016 at 18:29:54 UTC, Adil wrote:
I have a Makefile setup that I use to return the latest git
tag/commit from within my program. The setup is as below:
VERSIONED_LIB = myversion.d && rm -f myversion.d
VERSION_STRING ?= $(shell git rev-parse --short HEAD)
makeVersion:
I have a Makefile setup that I use to return the latest git
tag/commit from within my program. The setup is as below:
VERSIONED_LIB = myversion.d && rm -f myversion.d
VERSION_STRING ?= $(shell git rev-parse --short HEAD)
makeVersion:
echo "module compileConfig; public string
On Monday, 8 August 2016 at 07:09:55 UTC, torea wrote:
On Monday, 8 August 2016 at 05:17:24 UTC, Dave Akers wrote:
I do believe your problem is with the line...
On Monday, 8 August 2016 at 02:44:20 UTC, torea wrote:
string cleanLine = strip( cast(string)line );
It's casting a char[] to
On Monday, 8 August 2016 at 07:09:55 UTC, torea wrote:
On Monday, 8 August 2016 at 05:17:24 UTC, Dave Akers wrote:
I do believe your problem is with the line...
On Monday, 8 August 2016 at 02:44:20 UTC, torea wrote:
string cleanLine = strip( cast(string)line );
It's casting a char[] to
On Monday, 8 August 2016 at 10:21:47 UTC, ag0aep6g wrote:
Also thanks for submitting the bug for me.
On 08/08/2016 12:14 PM, Cauterite wrote:
On Monday, 8 August 2016 at 10:05:58 UTC, ag0aep6g wrote:
The first assert compares the return types of f1 and f2. They both
return `void`, so everything's fine there.
I think you're mistaken about this. typeof(S.f1) definitely gives the
type of the
Am 02.08.2016 um 00:47 schrieb Seb:
> On Monday, 1 August 2016 at 08:53:30 UTC, Kagamin wrote:
>> A bug.
>
> ... which should be filled at Bugzilla and/or fixed. Thanks! :)
I created a pullrequest: https://github.com/dlang/phobos/pull/4720
On 08/08/2016 04:36 AM, Engine Machine wrote:
This really makes no sense
Error: template Mem cannot deduce function from argument types
!(cast(eException)1280L, "main.d", 38u, "main.WinMain")(int), candidates
are:
Mem(T, B = eX, string file = __FILE__, uint line = __LINE__, string func
=
On Monday, 8 August 2016 at 10:05:58 UTC, ag0aep6g wrote:
The first assert compares the return types of f1 and f2. They
both return `void`, so everything's fine there.
I think you're mistaken about this. typeof(S.f1) definitely gives
the type of the function, not of the return. Try it out:
On 08/08/2016 10:30 AM, Cauterite wrote:
See: https://dpaste.dzfl.pl/2ec6780d4b25
That code is short enough to post it here directly. For easier
reference, this is it:
struct S {
void f1() {
auto x =
};
static void f2() {
On Sunday, 7 August 2016 at 00:28:40 UTC, Alfred Pincher wrote:
this is a very nice feature. I hope D has something similar?
If you want to implement that kind of allocation tracking you'll
probably want to use gc_getProxy()+gc_setProxy(). They're global
C functions you can access by
On 08/08/2016 02:42 AM, Engine Machine wrote:
So, what about passing in the lambda verses the temp variable?
Nothing. I didn't see a case where it worked one way but not the other.
If you have code where adding a variable makes things work, please post
a complete test case.
[...]
My code
See: https://dpaste.dzfl.pl/2ec6780d4b25
We have two methods defined, f1 and f2, where f2 is static but
they have otherwise identical signatures.
We can see from the disassembly that f1 receives a `this` pointer
while f2 does not.
Yet, typeof() == typeof(). This makes no sense, how can the
On Monday, 8 August 2016 at 02:36:24 UTC, Engine Machine wrote:
Error: template Mem cannot deduce function from argument types
!(cast(eException)1280L, "main.d", 38u, "main.WinMain")(int),
candidates are:
Mem(T, B = eX, string file = __FILE__, uint line = __LINE__,
string func =
On Monday, 8 August 2016 at 05:17:24 UTC, Dave Akers wrote:
I do believe your problem is with the line...
On Monday, 8 August 2016 at 02:44:20 UTC, torea wrote:
string cleanLine = strip( cast(string)line );
It's casting a char[] to and immutable(char)[], causing the
mutable buffer from
29 matches
Mail list logo