On Thursday, 19 July 2018 at 19:18:43 UTC, jmh530 wrote:
I wanted to create a struct with a member function whose
behavior was different depending on whether the struct instance
had a particular UDA.
However, it seems like hasUDA doesn't seem to produce the
result I would have expected here.
On Thursday, 19 July 2018 at 22:16:22 UTC, Ali Çehreli wrote:
On 07/19/2018 08:12 AM, Emma wrote:
> [...]
> If I try to compile it, dmd complains, which I guess makes
sense:
>
> ---
> Error: need this for bar of type void()
> Error: need this for baz of type void()
> ---
>
> [...]
I think it's a
On Friday, 20 July 2018 at 04:31:38 UTC, Jordan Wilson wrote:
I don't have MSVC, so I built it using mingw, which generated a
.a lib.
I shall google some more, as I understand it DMD -m64 uses
Mingw libs as a fall back when MSVC not found, I compiled Lua
using mingw, I can't be too much furthe
On Friday, 20 July 2018 at 01:34:39 UTC, Mike Parker wrote:
On Thursday, 19 July 2018 at 21:43:35 UTC, Jordan Wilson wrote:
Is there any way I can generate the appropriate lib?
Else I think I'll need to get hold of the proper import libs
that come with the Lua distribution.
Lua is extreme
On Thursday, 19 July 2018 at 21:43:35 UTC, Jordan Wilson wrote:
Is there any way I can generate the appropriate lib?
Else I think I'll need to get hold of the proper import libs
that come with the Lua distribution.
Lua is extremely easy to build. That will generate the import lib
for you.
On 07/19/2018 08:12 AM, Emma wrote:
> void test(alias fn1, alias fn2)()
> {
> fn1();
> fn2();
> }
>
> struct Foo
> {
> void foo()
> {
> test!(bar, baz);
> }
>
> void bar()
> {}
>
> void baz()
> {}
> }
> ---
>
> If I try to compile it, dmd comp
I'm trying to create an import library from a dll (in this case,
a Lua dll).
Using dumpbin, I end up with a .def file:
EXPORTS
luaL_addlstring
luaL_addstring
luaL_addvalue
luaL_argerror
luaL_buffinit
...
I then use MS lib tool to generate a lib file:
lib /def:lua53.def /out:lua53.lib /machine
I wanted to create a struct with a member function whose behavior
was different depending on whether the struct instance had a
particular UDA.
However, it seems like hasUDA doesn't seem to produce the result
I would have expected here. I tried using getAttributes, but that
didn't work either.
On Thursday, 19 July 2018 at 12:44:30 UTC, Radu wrote:
---
int foo()
{
import std.algorithm, std.range;
auto r = 100.iota.stride(2).take(5);
return r.sum();
}
---
ldc2 -mtriple=wasm32-unknown-unknown-wasm -betterC
-link-internally -L-allow-undefined -release -Os wasm.d
ldc\bin\..\imp
On Friday, 13 February 2015 at 19:03:10 UTC, Jonathan Marler
wrote:
This question comes from wanting to be able to throw an
exception in code that is @nogc.
https://dlang.org/changelog/2.079.0.html#dip1008
```d
void main() @nogc
{
throw new Exception("I'm @nogc now");
}
```
On Thursday, 19 July 2018 at 14:21:51 UTC, bachmeier wrote:
[...]
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF45479E7A30874E9/ut.o:
In function `_D5parse3raw17__unittest_L64_C9FZ12__dgliteral1MFNaNbNiNfZk':
/home/office/.dub/packages/libclang-0.0.6/libclang/tests/
Hello,
I’ve got this piece of code:
---
import std.stdio;
void test(alias fn1, alias fn2)()
{
fn1();
fn2();
}
struct Foo
{
void foo()
{
test!(bar, baz);
}
void bar()
{}
void baz()
{}
}
---
If I try to compile it, dmd complains, which I guess makes
On Thursday, 19 July 2018 at 12:44:30 UTC, Radu wrote:
Just tried something similar with new LDC Webassembly support
[1] and it fails to compile
...
This is a prime example of stuff that should just workTM on
targets like that. I would like to submit some fixes but I
think there needs to be
I haven't been able to get dpp to build. I've discovered that the
problem is with libclang. It installs, but when running the
tests, I get the lengthy message below. Obviously I need to
install something (running Ubuntu 16.04) but I've got numerous
libclang related packages installed already an
On Thursday, 19 July 2018 at 12:40:09 UTC, Zheng (Vic) Luo wrote:
On Thursday, 19 July 2018 at 11:35:00 UTC, Seb wrote:
Well, since 2.079 it's actually possible to use D without a
dependency any runtime (even libc):
https://dlang.org/changelog/2.079.0.html#minimal_runtime
Also with -betterC
On Thursday, 19 July 2018 at 09:41:34 UTC, Mike Parker wrote:
Are you doing all of that in the main thread, or a separate one?
It's all on a separate thread, but I checked every single
reference I could find after posting yesterday, and the OGL
context is never referenced outside of the thre
On Thursday, July 19, 2018 10:04:34 RazvanN via Digitalmars-d-learn wrote:
> I just don't understand why you would ever mark the destructor of
> a struct with @disable. When is that useful? If it's not, why not
> just forbit it?
There's nothing special about destructors here. You can @disable any
On Thursday, 19 July 2018 at 11:35:00 UTC, Seb wrote:
Well, since 2.079 it's actually possible to use D without a
dependency any runtime (even libc):
https://dlang.org/changelog/2.079.0.html#minimal_runtime
Also with -betterC you can actually use lots of things from
core that don't depend o
On Thursday, 19 July 2018 at 11:35:00 UTC, Seb wrote:
On Thursday, 19 July 2018 at 10:27:36 UTC, Zheng (Vic) Luo
wrote:
Current implementation of d-runtime relies on a lot of symbols
from libc, librt, libpthread, which makes it hard to create a
minimal runtime used for embedded devices. Althoug
On Wednesday, 11 July 2018 at 10:07:33 UTC, Timoses wrote:
On Wednesday, 11 July 2018 at 08:31:30 UTC, Dorian Haglund
wrote:
[...]
As the error message says taskPool.reduce is a non-global
template. It's embedded in a taskPool struct. I can't say what
the reason is that a delegate cannot be
On Thursday, 19 July 2018 at 10:04:34 UTC, RazvanN wrote:
I just don't understand why you would ever mark the destructor
of a struct with @disable. When is that useful? If it's not,
why not just forbit it?
struct S1 {
~this() { /* stuff */ }
}
struct S2 {
S1 s;
@disable ~this();
}
On Thursday, 19 July 2018 at 10:27:36 UTC, Zheng (Vic) Luo wrote:
Current implementation of d-runtime relies on a lot of symbols
from libc, librt, libpthread, which makes it hard to create a
minimal runtime used for embedded devices. Although there are
some unofficial minimal versions of d-runt
Current implementation of d-runtime relies on a lot of symbols
from libc, librt, libpthread, which makes it hard to create a
minimal runtime used for embedded devices. Although there are
some unofficial minimal versions of d-runtime, many of them lack
maintenance and outdates rapidly. I was won
On Thursday, 19 July 2018 at 09:50:32 UTC, Jim Balter wrote:
On Thursday, 19 July 2018 at 08:50:15 UTC, RazvanN wrote:
struct A
{
int a;
@disable ~this() {}
}
void main()
{
A a = A(2);
}
Currently, this code yields:
Error: destructor `A.~this` cannot be used because it is
annotat
On Thursday, 19 July 2018 at 08:50:15 UTC, RazvanN wrote:
struct A
{
int a;
@disable ~this() {}
}
void main()
{
A a = A(2);
}
Currently, this code yields:
Error: destructor `A.~this` cannot be used because it is
annotated with @disable
I was expecting that disabling the destruct
On Thursday, 19 July 2018 at 00:27:58 UTC, Entity325 wrote:
So I'm using the standard process:
DerelictGL3.load();
glContext = SDL_GL_CreateContext(sdlWindow);
GLVersion glVersion = DerelictGL3.reload();
About 1/3 of the time, the program hangs on the 3rd line and
never gets past it.
Curren
struct A
{
int a;
@disable ~this() {}
}
void main()
{
A a = A(2);
}
Currently, this code yields:
Error: destructor `A.~this` cannot be used because it is
annotated with @disable
I was expecting that disabling the destructor would make it as if
the struct does not have a destruct
On Thursday, 19 July 2018 at 06:35:36 UTC, Simen Kjærås wrote:
On Wednesday, 18 July 2018 at 11:28:54 UTC, Timoses wrote:
But why is a context pointer a problem? Is it problematic
because the context pointer to the main scope can not
guarantee `immutable`? E.g. if I happened to use data from
m
28 matches
Mail list logo