On Thursday, 26 March 2015 at 02:39:56 UTC, Steven Schveighoffer
wrote:
An array as an output range writes to the front. You can use
std.array.Appender to get appending behavior. I know, it's
weird.
Alternatively, you can add more bytes to the array, and append
to the slice, but that may
On Thu, 26 Mar 2015 09:02:53 +, Nicolas Sicard wrote:
On Thursday, 26 March 2015 at 04:57:55 UTC, ketmar wrote:
by the way. do you know that you still CAN overload postincrement
operation? yes, the code is still here, and it works...
somethimes. ;-)
Thnaks. Indeed, this works:
---
On Thu, 26 Mar 2015 09:17:21 +, ketmar wrote:
worth nothing
heh. my pet misspelling.
signature.asc
Description: PGP signature
On Thursday, 26 March 2015 at 04:57:55 UTC, ketmar wrote:
by the way. do you know that you still CAN overload
postincrement
operation? yes, the code is still here, and it works...
somethimes. ;-)
Thnaks. Indeed, this works:
---
struct S
{
int i;
immutable(Object) o;
void
On Tuesday, 24 March 2015 at 16:41:28 UTC, Rene Zwanenburg wrote:
Should not be necessary. privately import Flag and make a
public alias:
module a;
import std.typecons : Flag;
alias SomeFlag = Flag!SomeFlag;
SomeFlag.Yes and SomeFlag.No should be usable in other modules
without additional
On Thursday, 26 March 2015 at 10:07:07 UTC, Hugo wrote:
If only the documentation and/or test units were more clear...
OK, I made a simpler test, using an example from the
documentation:
void main() {
import std.stdio, std.array, std.bitmanip;
auto buffer = appender!(const
On 3/26/15 6:07 AM, Hugo wrote:
On Thursday, 26 March 2015 at 02:39:56 UTC, Steven Schveighoffer wrote:
An array as an output range writes to the front. You can use
std.array.Appender to get appending behavior. I know, it's weird.
Alternatively, you can add more bytes to the array, and append
On Thursday, 26 March 2015 at 12:21:23 UTC, Hugo wrote:
On Thursday, 26 March 2015 at 10:07:07 UTC, Hugo wrote:
If only the documentation and/or test units were more clear...
OK, I made a simpler test, using an example from the
documentation:
void main() {
import std.stdio, std.array,
On Friday, 27 March 2015 at 01:27:25 UTC, Belly wrote:
If anyone reading this can save me some time and help me with
this: How to declare a byte pattern, for example to pass to
WriteProcessMemory?
I guess it's uint[] bytes;
How do I set it to 0x12345678 ?
Since WriteProcessMemory
On Thursday, 26 March 2015 at 16:46:06 UTC, Belly wrote:
No, wait, the first code is even better because it uses the
headers so I don't need to declare the API myself and it uses
the MAX_COMPUTERNAME_LENGTH define, too, nice!
Using this will return only the first 15 characters of the
No, wait, the first code is even better because it uses the
headers so I don't need to declare the API myself and it uses the
MAX_COMPUTERNAME_LENGTH define, too, nice!
On Thursday, 26 March 2015 at 16:19:17 UTC, Dmitri Makarov wrote:
When I compile version DOES_NOT_WORK, I get the following error:
c/tool.d(13): Error: variable name cannot be read at compile
time
c/tool.d(13):while looking for match for
hasMember!(Tool, name)
However, the other
I'm compiling the following application (2 d modules)
// file c/tool.d
module c.tool;
struct Tool
{
string name;
auto generate()
{
version (DOES_NOT_WORK)
{
import std.traits : hasMember;
if (hasMember!(Tool, name))
return `writeln(this is a ` ~ mixin (this. ~
Thank you guys, I tried the second reply and it works great!
On Thursday, 26 March 2015 at 17:30:40 UTC, anonymous wrote:
value parameter. You cannot do that, because `name` is a
dynamic value but you can only pass a static value there.
(There may be better terms than dynamic/static value.)
Thank you, anonymous. It makes sense. I guess rather than
So I just noticed, when I click on source code button for a function
in dlang.org library preview, it brings me to the source code as of that
release, but to the file itself (on github).
I'd like it to go to the specific line where that function is defined
instead. I'm not sure if we need
On Thursday, 26 March 2015 at 12:29:03 UTC, John Colvin wrote:
On Thursday, 26 March 2015 at 12:21:23 UTC, Hugo wrote:
Also, can anyone provide a similar example but using little
endian order? If only to contrast differences between modes of
invocation...
void main() {
import
Hello!
I am using HTTP structure to perform calls to a simple REST API.
Like this:
class API
{
HTTP http;
this() { http = HTTP(); }
void call() {
http.url = some url;
http.method = POST;
http.setPostData(data, type);
http.perform();
}
On Thursday, 26 March 2015 at 17:41:37 UTC, rumbu wrote:
On Thursday, 26 March 2015 at 16:46:06 UTC, Belly wrote:
No, wait, the first code is even better because it uses the
headers so I don't need to declare the API myself and it uses
the MAX_COMPUTERNAME_LENGTH define, too, nice!
Using
On Thu, 26 Mar 2015 05:44:13 +, Jean pierre wrote:
auto i = s++; // OUCH, but we expect S.i...
but why one expecting `i` here? there IS `opUnary` overload, and `++`
corretly transformed to prefix form. there is simply NO postfix form in
semantically analyzed code, *all* postfix
20 matches
Mail list logo