On Wednesday, 13 December 2017 at 21:39:40 UTC, Satoshi wrote:
On Wednesday, 13 December 2017 at 21:38:49 UTC, Satoshi wrote:
What means this error and how to solve it?
object.d-mixin-1072(1112): Error: Global variable type does
not match previous declaration with same mangled name:
On Thursday, 14 December 2017 at 19:47:53 UTC, Jack Stouffer
wrote:
Clang has __int128. Is there anyway to use this with D with LDC?
Not really as a plain type, although there is effort to get
[u]cent working. I could have sworn that mir was using InlineIR
with it for multiplication. But
On Friday, 15 December 2017 at 01:17:17 UTC, Jack Stouffer wrote:
On Thursday, 14 December 2017 at 23:33:34 UTC, Nicholas Wilson
wrote:
On Thursday, 14 December 2017 at 19:47:53 UTC, Jack Stouffer
wrote:
Clang has __int128. Is there anyway to use this with D with
LDC?
Not really as a plain
On Sunday, 12 November 2017 at 11:01:39 UTC, Dibyendu Majumdar
wrote:
Hi,
I have recently started work on building a VM for Lua (actually
a derivative of Lua) in X86-64 assembly. I am using the dynasm
tool that is part of LuaJIT. I was wondering whether I could
also write this in D's inline
On Monday, 20 November 2017 at 08:37:32 UTC, kerdemdemir wrote:
I need to init and push some values into a array something like:
//DMD64 D Compiler 2.072.2
import std.stdio;
import std.array;
void main()
{
bool a = true;
bool b = false;
bool c = false;
bool[] boolList;
On Sunday, 5 November 2017 at 22:47:10 UTC, Nicholas Wilson wrote:
f.multiwayMerge.chunks(128).joiner.chunkBy!(pred).writeln;
since it seems to be the iteration that stuff things up and
this changes it.
If that doesn't work you could try rolling your own version of
chunk with `take` and a
On Sunday, 5 November 2017 at 13:32:57 UTC, Matthew Gamble wrote:
On Sunday, 5 November 2017 at 03:21:06 UTC, Nicholas Wilson
wrote:
On Saturday, 4 November 2017 at 18:57:17 UTC, Matthew Gamble
wrote:
[...]
It should, this looks like a bug somewhere, please file one at
issues.dlang.org/ .
On Saturday, 4 November 2017 at 18:57:17 UTC, Matthew Gamble
wrote:
Dear most helpful and appreciated D community,
I'm a non-pro academic biologist trying to code a modeler of
transcription in D. I've run into a small roadblock. Any help
would be greatly appreciated. I'm hoping someone can
On Wednesday, 8 November 2017 at 06:34:27 UTC, Andrew Edwards
wrote:
I'm having a little bit of problem calling D code from C++ and
would appreciate some assistance. First, given the following
C++ program wich compiles, links, and runs without any problem:
Try using `nm` on the C++ object to
On Thursday, 9 November 2017 at 12:40:49 UTC, Vino wrote:
Hi All,
Request your help, when i execute the below line of code i am
getting an error message as "Cannot reduce an empty iterable
w/o an explicit seed value" , The below lie of code will
iterate several file system and will report
On Thursday, 9 November 2017 at 12:40:49 UTC, Vino wrote:
Hi All,
Request your help, when i execute the below line of code i am
getting an error message as "Cannot reduce an empty iterable
w/o an explicit seed value" , The below lie of code will
iterate several file system and will report
On Monday, 11 December 2017 at 10:50:17 UTC, biocyberman wrote:
For someone using NFS or some other remote filesystems, one may
have experienced many times the nasty silent hang. For example,
if I run `ls /mnt/remote/nfsmount`, and the remote NFS server
is down while /mnt/remote/nfsmount was
On Saturday, 28 October 2017 at 13:51:42 UTC, kerdemdemir wrote:
I am trying to make non blocking web requests to a web service.
vibe.core.concurrency.Future!(UserData)[] futurelist;
// I will make http requests in for loop and push them to
futureList
foreach( elem; elemList )
{
//
On Sunday, 29 October 2017 at 01:44:37 UTC, Nicholas Wilson wrote:
Alternatively you could use a singly linked list and splice out
elements that pass the filter predicate. I think you'd have to
roll your own though.
Something like https://github.com/dlang/phobos/pull/5821
-
module a;
struct foo {}
deprecated alias bar = foo;
--
module b;
struct bar {};
---
module c;
import a;
import b;
void baz(bar b) {}
Error: `a.bar` at source/a.d(5,1) conflicts with `b.bar` at
.b.d(2,1)
I would have thought the undeprecated alias would have
On Wednesday, 23 May 2018 at 02:24:08 UTC, IntegratedDimensions
wrote:
Many times in expensive loops one must make decisions.
Decisions must be determined and the determination costs.
for(int i = 0; i < N; i++)
{
if(decision(i)) A; else B;
}
the if statement costs N times the cycle
On Wednesday, 23 May 2018 at 03:12:52 UTC, IntegratedDimensions
wrote:
I knew someone was going to say that and I forgot to say DON'T!
Saying to profile when I clearly said these ARE cases where
they are slow is just moronic. Please don't use default answers
to arguments.
This was a general
On Thursday, 24 May 2018 at 08:16:30 UTC, biocyberman wrote:
Some C and C++ projects I am working on use pointers and
references extensively: to pass as function arguments, and to
return from a function. For function argument I would use
`ref`, but for return types, I can't use `ref` and can't
On Sunday, 17 June 2018 at 10:58:29 UTC, Cauterite wrote:
Hello,
I'm not sure whether I'm missing something obvious here, but is
there a reason for scope(success) being lowered to a try-catch
statement?
I would have expected only scope(exit) and scope(failure) to
actually interact with
On Tuesday, 29 May 2018 at 01:43:17 UTC, Mike Parker wrote:
In pdf.h, that CAPI macro is used in every function
declaration. That means that on Windows, all of the functions
have the __stdcall calling convention (which, in D, would be
extern(Windows)) and the standard cdecl calling convetion
On Tuesday, 29 May 2018 at 04:49:34 UTC, Nicholas Wilson wrote:
On Tuesday, 29 May 2018 at 01:43:17 UTC, Mike Parker wrote:
In pdf.h, that CAPI macro is used in every function
declaration. That means that on Windows, all of the functions
have the __stdcall calling convention (which, in D,
On Monday, 28 May 2018 at 01:28:10 UTC, Dr.No wrote:
I'm trying to use wkhtmltopdf[1] with D. I converted this
header[2] with little modification using htod tool which
resulted in this[3].
The libray is passed to link using:
pragma(lib, "wkhtmltox.lib");
(that file is in wkhtmltopdf\lib
On Thursday, 24 May 2018 at 18:51:31 UTC, Mike Franklin wrote:
I'm trying to find a way to declare a block of code `nothrow:`
when compiling with -betterC, but not `nothrow` when not
compiling with -betterC.
[...]
Not one now but, DIP 1012 will allow this as nothrow will become
a regular
On Sunday, 24 June 2018 at 14:16:26 UTC, Kamil Koczurek wrote:
I recently wrote a brainfuck compiler in D, which loads the BF
source at compile time, performs some (simple) optimizations,
translates everything to D and puts it into the source code
with a mixin.
I did manage to get some
On Sunday, 24 June 2018 at 01:43:41 UTC, ANtlord wrote:
On Sunday, 24 June 2018 at 01:26:48 UTC, ANtlord wrote:
Actually I get it worked replacing `string filepath2` by
`char[] filepath2` but filepath is string still and it works
correctly.
It doesn't work
Vorbis is a C library, so you
On Thursday, 26 October 2017 at 15:09:48 UTC, bauss wrote:
Why is it not allowed to have empty UDAs for classes?
Let's say we have an UDA like this:
struct Exclude { }
Then we want to put it on a class like:
@Exclude class Foo
{
...
}
This will fail with the following error:
Error: type
On Saturday, 28 October 2017 at 13:24:49 UTC, Mike Wey wrote:
The following code runs correctly when compiled with ldc
(1.4.0) but fails with an assert error when compiled with dmd
(2.076 and ldc 1.2.0)
```
class A
{
}
class B
{
T opCast(T)()
{
return this;
On Saturday, 28 October 2017 at 14:19:01 UTC, Nicholas Wilson
wrote:
As Basile mentioned, this is compiler sticking checks in behind
your back.
The reason it works on new LDC is because #6982 was cherry
picked to LDC (1.3?) before it was merged into dmd (not sure
what version, I though it was
On Friday, 29 December 2017 at 12:03:59 UTC, Mike Franklin wrote:
In C#, structs can inherit from and implement interfaces.
using System;
interface IPrint
{
void Print();
}
struct MyStruct : IPrint
{
public void Print()
{
Console.WriteLine(ToString());
}
}
public
On Saturday, 6 January 2018 at 05:44:28 UTC, Venkat wrote:
Why does gcc say "unknown demangling style `dlang'" ? Do I need
GDC for demangling to work ?
85198AB7DE24894B5F742FBD5/libvibe-d_data.a
On Wednesday, 24 January 2018 at 21:48:21 UTC, Nordlöw wrote:
Why is the memory overhead for a class instance as high as 3
words (24 bytes on 64-bit systems? I find that annoyingly much
for my knowledge database application. I'm aware of
extern(C++), having one word overhead, but such
On Wednesday, 24 January 2018 at 22:27:40 UTC, Nordlöw wrote:
On Wednesday, 24 January 2018 at 21:47:26 UTC, H. S. Teoh wrote:
On Wed, Jan 24, 2018 at 09:48:21PM +, Nordlöw via
Digitalmars-d-learn wrote:
Why is the memory overhead for a class instance as high as 3
words (24 bytes on 64-bit
On Wednesday, 17 January 2018 at 07:53:24 UTC, Jonathan M Davis
wrote:
I don't know what you're doing, and maybe __gshared is the
appropriate solution for what you're trying to do, but in
general, if you're not trying to bind to a C global variable,
you should be using shared, and using
On Wednesday, 17 January 2018 at 02:37:07 UTC, Steven
Schveighoffer wrote:
On 1/11/18 11:25 PM, Nicholas Wilson wrote:
Is there a way to make __gshared part of an alias?
No, __gshared is a storage class, not a type constructor, so it
has no meaning as part of a type:
__gshared int x;
int
On Thursday, 18 January 2018 at 04:16:18 UTC, Laeeth Isharc wrote:
Am I missing something, or should extern(C++) just work for
binding to gcc C++ on Linux. It works fine for primitives but
fails for pointer type arguments. Extern "C" works fine.
Does D know how to mangle function names
On Monday, 15 January 2018 at 02:05:32 UTC, Chris P wrote:
Hello,
I'm extremely new to D and have a quick question regarding
common practice when using strings. Is usage of one type over
the others encouraged? When using 'string' it appears there is
a length mismatch between the string
Is there a way to make __gshared part of an alias?
as in
enum AddrSpace : uint
{
Private = 0,
Global = 1,
Shared = 2,
Constant = 3,
Generic = 4,
}
struct Variable(AddrSpace as, T)
{
T val;
alias val this;
}
alias Global(T) = __gshared
On Friday, 12 January 2018 at 00:54:03 UTC, kdevel wrote:
crash.d
```
import std.stdio;
union U {
float f;
int i;
string toString ()
{
string s;
return s;
}
}
void main ()
{
U u;
writeln (u);
}
```
$ dmd crash.d
$ ./crash
because you don't initialise `s` in
On Saturday, 27 January 2018 at 10:28:10 UTC, Arun Chandrasekaran
wrote:
```
import std.parallelism;
auto pool = new TaskPool(options.threadCount);
foreach (_; 0 .. options.iterationCount) {
switch (options.operation) {
static foreach(e; EnumMembers!Operation) {
On Wednesday, 7 February 2018 at 18:38:15 UTC, Seb wrote:
How about using the normal Vibe.d Web Service?
Stupid question: whats the difference?
An example from my WIP project vibe-by-example project:
https://github.com/wilzbach/vibe-d-by-example/blob/master/web/service.d
I also have a
On Wednesday, 7 February 2018 at 17:57:09 UTC, Jesse Phillips
wrote:
On Wednesday, 7 February 2018 at 17:04:13 UTC, Nicholas Wilson
wrote:
Is it possible to have some urls routed to serve content and
some to receive JSON in the same class?
This seems unlikely to me, the function signature
I have set up a vibe.d rest interface (on a server) and have a
client on my machine.
struct Observation
{
string desc;
DateTime time;
}
interface Obsever
{
@property void observe(Observation ra);
}
void main()
{
auto test = Observation("a duck",
On Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson
wrote:
I have set up a vibe.d rest interface (on a server) and have a
client on my machine.
struct Observation
{
string desc;
DateTime time;
}
interface Obsever
{
@property void observe(Observation ra);
}
void main()
{
On Wednesday, 7 February 2018 at 18:47:05 UTC, Steven
Schveighoffer wrote:
Yes you can, but it's not pretty.
interface MyInterface
{
void postGiveMeData(SomeData d);
}
class MyInterfaceImpl : MyInterface
{
void postGiveMeData(SomeData d) { ... }
void getPage() { ... }
void index()
On Wednesday, 7 February 2018 at 19:50:31 UTC, Jacob Carlborg
wrote:
Have you tried this?
No. But apart from the fact that I forgot to make the class
inherit from an interface to that the rest interface would
actually compile, the web interface is routed before the rest
interface and so the
On Friday, 9 February 2018 at 08:06:53 UTC, Seb wrote:
On Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson
wrote:
Is there a way I can see/log what requests are being made? I
can change both the client and server.
-v and -vv
So it turns out that structs do not work as parameters
On Friday, 9 February 2018 at 15:50:24 UTC, Ralph Doncaster wrote:
On Friday, 9 February 2018 at 15:24:27 UTC, Mike Parker wrote:
On Friday, 9 February 2018 at 15:05:33 UTC, Ralph Doncaster
wrote:
This seems odd to me. Is there a way I can make a function
that takes an array of any type but
On Tuesday, 13 February 2018 at 17:08:24 UTC, Nicholas Wilson
wrote:
Is this a problem with the library or me? Can I work around it?
How?
Thanks
Nic
So digging around in the library code, commenting it out seems to
work for now as I don't use UUIDs. Error didn't originate from my
code
import vibe.vibe;
import vibe.db.postgresql;
QueryParams p;
p.sqlCommand = "select
title,url,url_title,messagebody,generationtime from items order
by generationtime;";
auto _items = conn.execParams(p);
struct Range
{
immutable Answer a;
size_t i;
immutable(Row) front() {
On Tuesday, 13 February 2018 at 17:17:41 UTC, Nicholas Wilson
wrote:
On Tuesday, 13 February 2018 at 17:08:24 UTC, Nicholas Wilson
wrote:
Is this a problem with the library or me? Can I work around
it? How?
Thanks
Nic
So digging around in the library code, commenting it out seems
to work
I have an endpoint that is a post:
void postStuff(HTTPServerRequest req, HTTPServerResponse res)
{
// do some stuff with req
res.statusCode = 200;
}
I do not write anything to res (deliberately) but want to set the
status code.
However it returns 404, because no content is written.
On Wednesday, 14 February 2018 at 14:58:14 UTC, Seb wrote:
On Wednesday, 14 February 2018 at 14:30:19 UTC, Nicholas Wilson
wrote:
I have an endpoint that is a post:
void postStuff(HTTPServerRequest req, HTTPServerResponse res)
{
// do some stuff with req
res.statusCode = 200;
}
I do
On Saturday, 10 February 2018 at 06:32:43 UTC, German Diago wrote:
Hello everyone,
I am trying to forward some member functions from a struct as a
Catch-all function, so I did something like this:
struct A {
struct HeaderData {
align(1):
char [21] id;
On Friday, 9 February 2018 at 08:06:53 UTC, Seb wrote:
On Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson
wrote:
Is there a way I can see/log what requests are being made? I
can change both the client and server.
-v and -vv
All that gives me is a bunch of
[FAC3BFF6:FAC451F6 dia]
On Thursday, 8 February 2018 at 20:24:19 UTC, Nicholas Wilson
wrote:
On Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson
wrote:
I have set up a vibe.d rest interface (on a server) and have a
client on my machine.
struct Observation
{
string desc;
DateTime time;
}
interface
On Thursday, 8 February 2018 at 10:51:39 UTC, Arjan wrote:
On Wednesday, 7 February 2018 at 20:23:10 UTC, Nicholas Wilson
wrote:
On Wednesday, 7 February 2018 at 19:50:31 UTC, Jacob Carlborg
wrote:
Have you tried this?
No. But apart from the fact that I forgot to make the class
inherit from
Is it possible to have some urls routed to serve content and some
to receive JSON in the same class? Basically I want:
shared static this()
{
auto router = new URLRouter;
auto a = new MyInterface;
router.registerWebInterface(new MyInterface); //?? selective
combination
On Thursday, 15 February 2018 at 16:51:05 UTC, Kyle wrote:
Hi. Is there a convenient way to convert a ubyte[4] into a
signed int? I'm having trouble handling the static arrays
returned by std.bitmanip.nativeToLittleEndian. Is there some
magic sauce to make the static arrays into input ranges
On Tuesday, 20 February 2018 at 15:32:45 UTC, Chris M. wrote:
Thanks for the info, that clears things up. Like I said, it was
more experimentation rather than me planning to actually use
it. Works now with the following modifications.
import std.stdio;
import core.stdc.stdlib;
import
On Thursday, 22 February 2018 at 00:13:43 UTC, SrMordred wrote:
string x = "123";
auto c = x.ptr;
c++;
writeln(c[-1]); // 1
writeln(c[-1..0]); //BOOM Range violation
Can I do this / Bug / some mistake ?
youd have to do
(c-1)[0 .. 1];
On Sunday, 18 February 2018 at 17:54:58 UTC, SrMordred wrote:
I´m experimenting with threads and related recently.
(i´m just started so may be some terrrible mistakes here)
With this base work:
foreach(i ; 0 .. SIZE)
{
results[i] = values1[i] * values2[i];
}
and then with this 3 others
On Monday, 19 February 2018 at 07:08:49 UTC, Fra Mecca wrote:
Is there a way to avoid using to! conversion here?
immutable string[] dst = to!(immutable
string[])(array(pipe.readEnd.byLineCopy));
assumeUnique.
immutable string[] dst =
pipe.readEnd.byLineCopy.array.assumeUnique;
On Thursday, 28 December 2017 at 01:34:10 UTC, Enjoys Math wrote:
Code:
module matrix;
import std.array;
struct Matrix(E)
{
private:
E[][];
this() {
}
void deleteRow(int i)
{
E = E[0..i] ~ E[i..$];
}
void deleteColumn(int j)
{
for (int i=0; i <
On Thursday, 21 December 2017 at 00:23:08 UTC, Steven
Schveighoffer wrote:
On 12/20/17 6:01 PM, aliak wrote:
Hi, is there a way to remove a number of elements from an
array by a range of indices in the standard library somewhere?
I wrote one (code below), but I'm wondering if there's a
On Thursday, 21 June 2018 at 21:00:46 UTC, Michael Brown wrote:
Hi D Community,
Is it possible to get a slice of a function, rather than just
its start pointer?
No.
I'm interested in currying a function at runtime - So I would
need to copy a function block (Either the original function,
My application needs to load shared libraries: on Posix this is
only supported with a shared druntime. How does one link to the
dynamic druntime with dub?
On Tuesday, 31 July 2018 at 13:52:21 UTC, rikki cattermole wrote:
On 01/08/2018 1:43 AM, Nicholas Wilson wrote:
My application needs to load shared libraries: on Posix this
is only supported with a shared druntime. How does one link to
the dynamic druntime with dub?
The same way you do it
On Tuesday, 31 July 2018 at 14:27:18 UTC, rikki cattermole wrote:
On 01/08/2018 2:18 AM, Nicholas Wilson wrote:
On Tuesday, 31 July 2018 at 13:52:21 UTC, rikki cattermole
wrote:
On 01/08/2018 1:43 AM, Nicholas Wilson wrote:
My application needs to load shared libraries: on Posix this
is only
On Saturday, 4 August 2018 at 18:12:05 UTC, Alex wrote:
On Saturday, 4 August 2018 at 13:26:01 UTC, Nicholas Wilson
wrote:
0 ldc2 0x000106fcc4e7
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1 ldc2 0x000106fcb9ea
On Saturday, 4 August 2018 at 12:21:36 UTC, Alex wrote:
I'm a little bit confused by following situation:
I have code, say around 8000 lines. Now, I'm facing a build
error which just says
dmd failed with exit code -11,
(same for ldc2, with some lines of stack information, which do
not
On Sunday, 5 August 2018 at 10:12:39 UTC, Alex wrote:
On Sunday, 5 August 2018 at 01:15:07 UTC, Nicholas Wilson wrote:
On Saturday, 4 August 2018 at 18:12:05 UTC, Alex wrote:
On Saturday, 4 August 2018 at 13:26:01 UTC, Nicholas Wilson
That is a very long stacks trace and combined with the very
On Wednesday, 1 August 2018 at 20:10:44 UTC, Hakan Aras wrote:
On Wednesday, 1 August 2018 at 16:25:28 UTC, Hakan Aras wrote:
https://run.dlang.io/is/dSVruv
Whoops, that was the wrong one. It's fixed now.
https://issues.dlang.org/show_bug.cgi?id=19134
As a workaround remove static, as
On Thursday, 2 August 2018 at 02:13:41 UTC, Hakan Aras wrote:
On Thursday, 2 August 2018 at 01:39:58 UTC, Nicholas Wilson
wrote:
https://issues.dlang.org/show_bug.cgi?id=19134
I wasn't quite sure whether it's a bug since it happens in both
compilers. Thanks for opening the issue.
For
On Wednesday, 8 August 2018 at 01:33:26 UTC, Steven Schveighoffer
wrote:
On 8/7/18 9:20 PM, Nicholas Wilson wrote:
the first overload is
ptrdiff_t countUntil(alias pred = "a == b", R, Rs...)(R
haystack, Rs needles)
if (isForwardRange!R
&& Rs.length > 0
&& isForwardRange!(Rs[0]) ==
the first overload is
ptrdiff_t countUntil(alias pred = "a == b", R, Rs...)(R haystack,
Rs needles)
if (isForwardRange!R
&& Rs.length > 0
&& isForwardRange!(Rs[0]) == isInputRange!(Rs[0])
&& is(typeof(startsWith!pred(haystack, needles[0])))
&& (Rs.length == 1
||
On Wednesday, 8 August 2018 at 01:33:26 UTC, Steven Schveighoffer
wrote:
On 8/7/18 9:20 PM, Nicholas Wilson wrote:
the first overload is
ptrdiff_t countUntil(alias pred = "a == b", R, Rs...)(R
haystack, Rs needles)
if (isForwardRange!R
&& Rs.length > 0
&& isForwardRange!(Rs[0]) ==
On Tuesday, 14 August 2018 at 13:01:57 UTC, learnfirst1 wrote:
enum string[] a = ["a"];
extern(C) void main() {
int i = 0;
auto s = a[i];
}
---
Error: TypeInfo cannot be used with -betterC
Yes. https://issues.dlang.org/show_bug.cgi?id=19169
On Tuesday, 14 August 2018 at 13:16:50 UTC, Nicholas Wilson wrote:
On Tuesday, 14 August 2018 at 13:01:57 UTC, learnfirst1 wrote:
enum string[] a = ["a"];
extern(C) void main() {
int i = 0;
auto s = a[i];
}
---
Error: TypeInfo cannot be used with -betterC
Yes.
On Saturday, 11 August 2018 at 23:12:43 UTC, ag0aep6g wrote:
On 08/11/2018 11:20 PM, rikki cattermole wrote:
On 12/08/2018 8:55 AM, Eric wrote:
Code below compiles while I would not expect it to compile.
Is there a reason that this compiles?
[...]
No bug. You forgot to throw -unittest when
On Monday, 20 August 2018 at 00:27:04 UTC, Nick Sabalausky
(Abscissa) wrote:
Suppose I've wrapped a Variant in a struct/class which ensures
the Variant *only* ever contains types which satisfy a
particular constraint (for example: isInputRange, or hasLength,
etc...).
Is there a way to call a
On Sunday, 26 August 2018 at 20:17:30 UTC, aliak wrote:
So if we had this:
struct A(T) {
auto proxy() @trusted {
return B!T();
}
}
struct B(T) {
private A!T* source;
private this(A!T* s) { source = s; }
@disable this();
@disable this(this) {}
@disable void opAssign(B!T);
}
On Monday, 27 August 2018 at 09:57:18 UTC, Sobaya wrote:
On Monday, 27 August 2018 at 09:41:34 UTC, 9il wrote:
On Monday, 27 August 2018 at 08:25:14 UTC, Sobaya wrote:
I'm using dcompute(https://github.com/libmir/dcompute).
In the development, I have got to use math functions such as
sqrt in
...
string key = "blahblahblah";
auto mac = hmac!SHA256(key.representation);
string s = ...,t=...u=...,v=...;
foreach(w;AliasSeq!(s,t,u,v))
mac.put(w.representation);
ubyte[32] s = mac.finish;
string sig = toHexString!(LetterCase.lower)(s);
writeln(sig);
// From what I understand
On Wednesday, 18 July 2018 at 05:54:48 UTC, Nicholas Wilson wrote:
...
string key = "blahblahblah";
auto mac = hmac!SHA256(key.representation);
string s = ...,t=...u=...,v=...;
foreach(w;AliasSeq!(s,t,u,v))
mac.put(w.representation);
ubyte[32] s = mac.finish;
string sig =
On Wednesday, 18 July 2018 at 11:29:42 UTC, baz@dlang-community
wrote:
On Wednesday, 18 July 2018 at 11:22:36 UTC, Nicholas Wilson
wrote:
On Wednesday, 18 July 2018 at 05:54:48 UTC, Nicholas Wilson
wrote:
[...]
Ahh, the joys of memory corruption.
You've reached
On Thursday, 30 August 2018 at 10:34:33 UTC, Sobaya wrote:
On Monday, 27 August 2018 at 12:47:45 UTC, Nicholas Wilson
wrote:
On Monday, 27 August 2018 at 09:57:18 UTC, Sobaya wrote:
On Monday, 27 August 2018 at 09:41:34 UTC, 9il wrote:
On Monday, 27 August 2018 at 08:25:14 UTC, Sobaya wrote:
On Sunday, 9 September 2018 at 04:01:30 UTC, Nicholas Wilson
wrote:
On windows with dub it seems to be creating libfoo.a instead of
foo.lib, I don't think I changed any settings. Old build based
on 2.078 DMDFE seem to have built .lib but LDC based on 2.082
seems to be building .a
This
On Sunday, 9 September 2018 at 04:53:05 UTC, Nicholas Wilson
wrote:
On Sunday, 9 September 2018 at 04:01:30 UTC, Nicholas Wilson
wrote:
On windows with dub it seems to be creating libfoo.a instead
of foo.lib, I don't think I changed any settings. Old build
based on 2.078 DMDFE seem to have
On windows with dub it seems to be creating libfoo.a instead of
foo.lib, I don't think I changed any settings. Old build based on
2.078 DMDFE seem to have built .lib but LDC based on 2.082 seems
to be building .a
On Friday, 7 September 2018 at 06:45:32 UTC, Sobaya wrote:
Sorry for being late for reply.
I'm using CUDA for back-end.
So you mean if required function is "cos",
pragma(LDC_intrinsic, "llvm.nvv.cos")
T cos(T a);
Is it right?
You're missing an "m" in "nvvm", dunno if that will fix it.
I
On Wednesday, 4 July 2018 at 14:07:35 UTC, Timoses wrote:
How can I return inferred storage class from interface
functions?
I can't use auto as return value in interface. Neither can I
use "inout" as I don't pass a parameter.
// Ref Type
interface IRef
{
On Sunday, 14 January 2018 at 00:09:42 UTC, kdevel wrote:
fusp.d
```
import std.stdio;
import std.typecons;
void foo (T) ()
{
writeln ("(1) foo T = ", T.stringof);
}
void foo (T : float) ()
{
writeln ("(2) foo T = ", T.stringof);
}
// void foo (T : double) ()
// {
//writeln ("(2)
On Thursday, 8 March 2018 at 04:48:08 UTC, Nick Sabalausky
(Abscissa) wrote:
-
import vibe.core.net;
TCPConnection mySocket;
void main() {
auto b = mySocket is null;
}
-
That's giving me:
-
Error: incompatible types for
On Monday, 12 March 2018 at 22:24:15 UTC, Xavier Bigand wrote:
mixin(implementFunctionsOf("derelict.opengl3.functions"));
As string I get the following error:
..\src\api_entry.d(16): Error: variable `mod` cannot be read at
compile time
..\src\api_entry.d(48):called from here:
On Friday, 9 March 2018 at 12:34:40 UTC, J-S Caux wrote:
Please bear with me, this is a long question!
To explain, I'm a scientist considering switching from C++ to
D, but before I do, I need to ensure that I can:
- achieve execution speeds comparable to C++ (for the same
accuracy; I can
On Friday, 9 March 2018 at 14:41:47 UTC, J-S Caux wrote:
Is this a case for a bug report? Seems pretty bizarre to do
that, like an oversight/neglect.
Yes if there's not one there for it already.
OK thanks. I looked at libmir, and saw many good things there.
I was wondering: is it still
On Thursday, 12 April 2018 at 07:48:28 UTC, Jamie wrote:
On Thursday, 12 April 2018 at 06:30:25 UTC, Tony wrote:
On Thursday, 12 April 2018 at 05:39:21 UTC, Jamie wrote:
Am I using the -I compiler option incorrectly?
I believe so. I think it is for finding import files, not the
files you
On Wednesday, 11 April 2018 at 22:13:33 UTC, Sjoerd Nijboer wrote:
On Wednesday, 11 April 2018 at 21:29:27 UTC, Alex wrote:
I would say, alias template parameter is your friend.
https://dlang.org/spec/template.html#TemplateAliasParameter
class SortedList(T, alias comparer)
It works, thank
On Thursday, 12 April 2018 at 06:22:30 UTC, Nicholas Wilson wrote:
On Thursday, 12 April 2018 at 05:39:21 UTC, Jamie wrote:
Am I using the -I compiler option incorrectly?
is it thinking /../A is an absolute path?
try -I=./../A
Er, scratch that. I see you already tried it.
On Thursday, 12 April 2018 at 05:39:21 UTC, Jamie wrote:
With a directory structure as follows:
run/
A/
a.d
Where a.d is:
===
module A.d;
I'm attempting to compile from the run/ directory. If I run with
dmd ../A/a.d
it compiles successfully, however if I
401 - 500 of 606 matches
Mail list logo