On Thursday, 1 December 2016 at 07:13:45 UTC, Bauss wrote:
On Thursday, 1 December 2016 at 00:36:30 UTC, Jake Pittis wrote:
[...]
You could do something like below which will allow you to
serialize any number.
import std.stdio : writeln;
import std.traits : isNumeric;
ubyte[] bytes(T)
Hello!
Simple using of delegates:
===
#!/usr/bin/rdmd
import std.stdio;
void main()
{
void delegate() functions[];
foreach (i; 0..10)
{
void print()
{
writefln("%s", i);
}
functions ~= &print;
}
foreach (i; 0..10)
{
On Thursday, 1 December 2016 at 01:58:13 UTC, Timothee Cour wrote:
eg:
```
dlib.d:
extern(C) void dfun(){assert(0, "some_msg");}
clib.cpp:
extern "C" void dfun();
void fun(){
try{
dfun();
}
catch(...){
// works but how do i get "some_msg" thrown from D?
}
}
```
I had the a sim
Yes, I have found:
=
#!/usr/bin/rdmd
import std.stdio;
void main()
{
void delegate() functions[];
foreach (i; 0..10)
{
auto get_print(int i)
{
void print()
{
writefln("%s", i);
}
On 12/01/2016 11:28 AM, unDEFER wrote:
> Hello!
> Simple using of delegates:
>
> ===
> #!/usr/bin/rdmd
> import std.stdio;
>
> void main()
> {
> void delegate() functions[];
>
> foreach (i; 0..10)
> {
> void print()
> {
> writefln("%s", i);
>
I want to update a library with new symbols (ie partial recompilation):
libmylib.so : compiled from bar.d and foo.d
now update the file foo.d
dmd -c -fPIC foo.d -offoo.o
clang++ -o libmylib_update.so foo.o -shared -Wl,-lmylib
When trying to dlopen libmylib_update.so from C++ it fails with:
The
On Thursday, 1 December 2016 at 22:05:06 UTC, Timothee Cour wrote:
I want to update a library with new symbols (ie partial
recompilation):
libmylib.so : compiled from bar.d and foo.d
now update the file foo.d
dmd -c -fPIC foo.d -offoo.o
clang++ -o libmylib_update.so foo.o -shared -Wl,-lmylib
So, to give context, I am trying to make an event manager for a
game I'm making.
I was writing the "register()" method so I ran into a problem.
The register method will take in delegates as an argument, but
those delegates have varied arguments themselves, so I can't
really put anything there.
On Thu, Dec 01, 2016 at 11:51:19PM +, Payotz via Digitalmars-d-learn wrote:
> So, to give context, I am trying to make an event manager for a game
> I'm making.
> I was writing the "register()" method so I ran into a problem.
>
> The register method will take in delegates as an argument, but t
On 12/01/2016 03:51 PM, Payotz wrote:
> So, to give context, I am trying to make an event manager for a game I'm
> making.
> I was writing the "register()" method so I ran into a problem.
>
> The register method will take in delegates as an argument, but those
> delegates have varied arguments the
On Thursday, 1 December 2016 at 23:51:19 UTC, Payotz wrote:
So, to give context, I am trying to make an event manager for a
game I'm making.
I was writing the "register()" method so I ran into a problem.
The register method will take in delegates as an argument, but
those delegates have varied
On Thursday, 1 December 2016 at 23:51:19 UTC, Payotz wrote:
So, to give context, I am trying to make an event manager for a
game I'm making.
I was writing the "register()" method so I ran into a problem.
The register method will take in delegates as an argument, but
those delegates have varied
On Thursday, 1 December 2016 at 23:51:19 UTC, Payotz wrote:
The register method will take in delegates as an argument, but
those delegates have varied arguments themselves, so I can't
really put anything there. I know that it's got something to do
with templates so I tried my hand in it and ca
Thank you all for the replies. I'm extremely grateful. I'll look
into each and every answer.
On Thursday, 1 December 2016 at 20:12:15 UTC, Ali Çehreli wrote:
First, the scary syntax that produces a lambda from an int:
...
Better:
...
All methods.. Thank you!
15 matches
Mail list logo