Hi,
I am looking for a method to log the current function name +
parameters.
Getting the name of the current function is simply possible with
__PRETTY_FUNCTION__
Is there some possibility to generically access the parameters of
a function such that they can be iterated and printed out?
14 months ago i tried to write my first webapp. initially i chose
vibe.d to be my framework. i got a simple app running quickly,
but due to my lack of knowledge about webapps in general i got
stuck at rather fundamental things. like doing authentication
over oauth, or even have a rough
cool! i really like poodinis. it powers one of my projects and is
very intuitive and simple to me :)
On Monday, 5 September 2016 at 17:38:10 UTC, Daniel Kozak wrote:
On Monday, 5 September 2016 at 15:53:39 UTC, dom wrote:
is this code safe? if not how do i do it correctly?
static AsyncHttpGet[] openRequests;
static void updateRequests()
{
foreach(idx,
On Monday, 5 September 2016 at 12:32:49 UTC, Lodovico Giaretta
wrote:
On Monday, 5 September 2016 at 12:15:35 UTC, dom wrote:
[...]
You misunderstood the error message and the lambda syntax (it
also happened to me the first time).
The grammar says that you can use one of these syntaxes:
On Monday, 5 September 2016 at 12:30:37 UTC, Daniel Kozak wrote:
Dne 5.9.2016 v 14:15 dom via Digitalmars-d-learn napsal(a):
...
but what is the difference between a lambda (=>) and a
functions/delegates?
i think this is a major pitfall for newcomers, and should be
adressed somehow.
is this code safe? if not how do i do it correctly?
static AsyncHttpGet[] openRequests;
static void updateRequests()
{
foreach(idx, req; openRequests)
{
if(req.state != Fiber.State.TERM)
I am about to write my own stupid and simple http client .. and i
have added a callback function that has the received content as a
parameter.
class AsyncHttpGet
{
this(string host, ushort port, string path, void
delegate(string) callback )
{ ... }
}
My first attempt was to write:
On Friday, 2 September 2016 at 08:59:38 UTC, Andrea Fontana wrote:
On Friday, 2 September 2016 at 08:54:33 UTC, dom wrote:
i haven't read it fully yet, but i think this DIP contains
some or all of my concerns
https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md
Check this:
i haven't read it fully yet, but i think this DIP contains some
or all of my concerns
https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md
from what i got Classes are always reference types and structs
are value types in D. i am wondering why that is. for me the main
difference between classes and structs is not how they are
allocated, but that one has inhertiance, and the other hasn't.
Supporting inheritance has some overhead,
https://blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0/
came across the new c# features today. I really liked the syntax
for Tuples (and deconstructors), would be great to have a similar
syntax in D :)
foreach(auto v; msg)
writeln(v);
gives an error that a basic type is expected
foreach(v; msg)
writeln(v);
works
.. but why?
i just had a scenario like the one below. when calling .array on
the filterresult dmd goes nuts because of the init() function in
Players. Renaming to initialize() solved the problem.
Solution: As .init is used for struct initialization and such
(https://dlang.org/spec/property.html#init) i
On Thursday, 14 July 2016 at 00:33:50 UTC, ethgeh wrote:
On Wednesday, 13 July 2016 at 19:41:53 UTC, dom wrote:
how can i run my unittests for a dynamic library? some weird
conflict is reported between main functions, my project doesnt
contain any main function.
[...]
try to put this
how can i run my unittests for a dynamic library? some weird
conflict is reported between main functions, my project doesnt
contain any main function.
i really love D, but problems like this make me wanna switch :/
using:
dub test --arch=x86
lucy ~master: building configuration
ok i actually did everything right x3 ... but my code threw some
warnings which are interpreted as errors by default.
/solved
i want to build a shared library (.so) with dub. currently i
compile with a shell script, but i'd like to use dub
[code]
dmd -c test.d -fPIC
dmd -ofcod4xalicebridge.so test.o -shared -g -w -debug
-version=Have_cod4xalicebridge
[/code]
could anyone tell me how my dub.json has to look like?
18 matches
Mail list logo