Hello. There was an issue 2 years ago:
https://github.com/D-Programming-Language/druntime/pull/92
It seems that this bug is still here (I can't handle D Exception
from dll builded with dmd and dmc link).
Will this bug get fixed? Do other D compilers have the same issue?
On Friday, 13 September 2013 at 19:54:41 UTC, Anton Alexeev wrote:
So, nobody can give an easy answer how to statically link the
libraries with the executable and I have yo use Bin2D?
Did you try to use -static option of compiler? It forces to link
application with static libraries instead of
As I remember there was module to work with environment variables
in standard library. But now I can't find it. Was it removed or
merged with some other module?
Another question: I see some of modules are considered out-dated
and not up to Phobos' current standards. Can I make attempt to
I just found weird D behavior about inference of array types.
Let's suppose we have these overloaded functions:
import std.stdio;
void bar(const(int[3]) arr)
{
writeln(static array);
}
void bar(const(int[]) arr)
{
writeln(array slice);
}
// In main we have something like that:
int
Hello, I wrote some performance test for different constructors
of simple struct, and got some unexpected results.
Code:
//dmd vector.d -unittest
module vector;
debug(SVector)
{
import std.stdio;
}
struct SVector(size_t dim, T = float)
{
private:
T[dim] _arr;
public:
alias dim
On Wednesday, 11 December 2013 at 05:30:49 UTC, CJS wrote:
I'd like to use cython to wrap a D library. It's possible to do
this with a statically compiled C library, but it fails when I
try with a statically compiled D library. Any suggestions on
how to do this successfully?
I'm not Cython
Code:
module vector;
import std.stdio;
import std.traits;
struct SVector(size_t dim, T = float)
{
private:
T[dim] _arr;
public:
alias dim dimension;
alias dim size;
this(this)
{
debug(SVector)
writeln(postblit constructor);
}
this(const T[dim]
On Thursday, 12 December 2013 at 11:11:55 UTC, bearophile wrote:
Gary Willoughby:
alias void function(ClientData clientData, Tcl_Interp* interp)
Tcl_InterpDeleteProc;
extern (C) void Tcl_CallWhenDeleted(Tcl_Interp* interp,
Tcl_InterpDeleteProc proc, ClientData clientData);
With recent D
On Thursday, 12 December 2013 at 14:55:28 UTC, Craig Dillabaugh
wrote:
I am not sure if this belongs in D.learn, but it might be of
interest. I was writing some C++ code for a project at work
and have a class that stores image data from a file. The image
data can be in just about any numeric
With some improvements you also can provide compile-time error
about instantiation of non-specialized function (i.e. which has T
as parameter), but I'm not sure what's good way to do it in C++.
Suppose some class contains slice (dynamic array) as data member.
Constructor takes integer value that defines the size of data
should be allocated. After object was constructed size of slice
never changes by design.
Dynamic arrays are allocated with extra space that we can know
from
Thanks for answers.
On Friday, 13 December 2013 at 19:35:01 UTC, Marco Leise wrote:
Have you tried this?:
import core.memory;
int[] data = (cast(int*)GC.malloc(size * int.sizeof,
GC.BlkAttr.NO_SCAN))[0 .. size];
Did you mean GC.BlkAttr.NONE maybe? If I get it right
GC.BlkAttr.NO_SCAN means
Make first read function templated too like this:
long read()( ubyte* bytes, long len )
On Saturday, 28 December 2013 at 09:18:00 UTC, David Held wrote:
On 12/27/2013 7:32 PM, Marco Leise wrote: [...]
Side effects and altering the input object itself makes me
want to pull out my crucifix. You shall not have impurity in
your functional style code!
Why not? There are many impure
There is also http://www.semitwist.com/goldie/ but I did not use
it.
On Sunday, 29 December 2013 at 19:25:46 UTC, Jonathan wrote:
Are there any good lexer and parser libraries (like flex/bison)
for D? If not, how much work would be involved in using flex
and bison and wrapping it to D? How straightforward is it to
pass a struct from C to D (the documentation
On Sunday, 5 January 2014 at 19:05:58 UTC, Erik van Velzen wrote:
@Palmic the DWinProgramming samples use the overload
Runtime.initialize(ExceptionHandler)
Which gives a warning that it is deprecated and you should use
this overload instead:
Runtime.initialize()
But this is not compiled in
On Sunday, 5 January 2014 at 18:22:54 UTC, Mineko wrote:
I keep getting mixed results searching for this. :\
Just as the title says, is it safe to extern (C) variables?
Something like this:
extern (C) auto foo = 800;
And then call that from another program?
Also, just because this has been
On Sunday, 5 January 2014 at 19:30:46 UTC, Erik van Velzen wrote:
Filed under installer
https://d.puremagic.com/issues/show_bug.cgi?id=11871
You could add the linux thing as a comment if you're sure it's
the same issue.
Well, I'm not sure this is same. I explored something new to me
and
import core.runtime;
int main()
{
Runtime.loadLibrary(does not care);
Runtime.unloadLibrary(null);
return 0;
}
When I try to compile this code with 'dmd main.d', I get errors
main.o: In function
`_D4core7runtime7Runtime17__T11loadLibraryZ11loadLibraryFxAaZPv':
You must not cast base class to derived class, when you don't
know actual type (and even if you know exact type it's still bad
practice to cast instance of more generic type to more specific
one). Use multiple catch statements instead:
catch(FileException o)
{
//handle FileException
}
On Thursday, 9 January 2014 at 21:51:46 UTC, Frustrated wrote:
Lets suppose I have setup some code to use a singleton object.
Now lets suppose I want to duplicate that code(say to run
multiple times simultaneously).
The singleton pattern itself prevents multiple copies. One
would need
iconv as library is under LGPL. iconv as utility is under GPL.
Note that iconv is not portable even on Linux, since different
distros may have different implementations.
Qt is not the case because it's unstable with D. It's also
redundant dependency. And as far as I know Qt uses
On Thursday, 23 January 2014 at 15:24:19 UTC, Chris wrote:
Here's what I'm trying to do.
struct Element(T) {
T x;
T y;
public void setX(T value) {
x = value;
}
// More fancy functions ...
}
I store Element(s) in an array and want to pass each one by
reference, which
On Thursday, 23 January 2014 at 15:24:19 UTC, Chris wrote:
Thanks, that was fast! Yes I was tinkering around with
pointers, but didn't get it right, you did. However, the output
is still the same, i.e. two different sets:
// After creating and changing
div id=1
Hello, world!
span
/span
/div
Anyway, why do you need pointers to elements?
On Friday, 21 February 2014 at 13:38:58 UTC, Gopan wrote:
Attempting to learn CTFE, I tried the following test.
size_t counter;
uint Test()
{
if (!__ctfe)
{
++counter;// This code is for execution at run time
}
return 2;
}
void main()
{
Another strange thing:
import std.stdio;
uint Test()
{
if (!__ctfe)
{
return 3;
}
return 2;
}
void main()
{
immutable n = Test();
int[n] arr;
writeln(arrary length = , arr.length, ; n = , n);
}
Output:
arrary length = 2 ; n = 3
When you think about it
It's not dmd problem, it's up to ld linker and the issue is same
for other compiled languages including C and C++. You should
specify LD_LIBRARY_PATH variable in your system before executing
any compiled D application. You can add export of this
environment variable to your $HOME/.profile or
Well, when you're starting to use many templates you may end up
with separate library.
Templates provide compile-time correctness, concepts (in Boost
sense), policy-base design (see Modern C++ Design: Generic
Programming and Design Patterns Applied by Andrei Alexandrescu)
and compile-time
You probably need Rebindable template from std.typecons.
Yes, in some cases C++ const does not provide const-guarantees,
it's more like convention.
For example, you can write this:
class Class
{
public:
Class() : ptr(new int()) {}
~Class() { delete ptr; }
void setData(int data) const {
*ptr = data;
}
private:
int *ptr;
};
long in D and long in C++ are different types. You should use
c_long from core.stdc.config to interface with C/C++ functions.
On Wednesday, 2 April 2014 at 20:14:31 UTC, dnspies wrote:
How can I get the default-hash of a struct I've defined (to be
used as part of the hash for some containing type)?
UserDefined userDefined;
writeln(typeid(UserDefined).getHash(userDefined));
Probably there is a better way. I don't
It's only server. Maybe problem is on client side.
Try this if you are on Linux:
//Linux C client
#include sys/socket.h
#include sys/types.h
#include netinet/in.h
#include arpa/inet.h
#include stddef.h
#include string.h
#include stdio.h
int main()
{
int sock, res;
struct sockaddr_in
Contents of struct are compared field by field using comparison
for the type of each field. Dynamic arrays are compared by
contents. If you want to compare them by pointer use .ptr
property.
opEquals and opCmp are not about hashing, I believe. They are
just operators to help when dealing
On Wednesday, 16 April 2014 at 17:47:05 UTC, Capture_A_Lag wrote:
Hi all!
I have this code:
--
ubyte N, M, K;
ubyte[][max][max] Matrix;
scanf(%d %d %d, N, M, K);
ubyte tmp;
for(ubyte n = 1; n = N; n++)
Note that readf is not equivalent to scanf since readf does not
skip spaces and newline character. Input must completely match
format.
It also throws if you input initial or trailing spaces and there
are no spaces at the start or end of format string (scanf skips
these spaces)
What are compiler and platform do you use? Probably you are
trying to link with 64-bit library while being on 32-bit OS (or
vice versa)
It works fine on my 32-bit Debian with ldc2 and dmd.
I use
ldc2 main.d -L-lcurses
or
dmd main.d -L-lcurses
and following source code:
import std.stdio;
extern(C) int tgetnum(const(char) *id);
int main()
{
writeln(tgetnum(li));
return 0;
}
Note that you don't need to apply toStringz to string literals
since they implicitly cast to
On Sunday, 11 May 2014 at 07:31:10 UTC, FreeSlave wrote:
On Friday, 9 May 2014 at 21:42:14 UTC, Vlad Levenfeld wrote:
Is this still the case if the method is const or pure?
Const methods still require synchronization, because other
threads may change some data, needed by const method while
On Friday, 9 May 2014 at 21:42:14 UTC, Vlad Levenfeld wrote:
Is this still the case if the method is const or pure?
Const methods still require synchronization, because other
threads may change some data, needed by const method while method
is executed, and then you may get wrong results.
On Sunday, 11 May 2014 at 05:34:38 UTC, Moses wrote:
On Sunday, 11 May 2014 at 04:33:24 UTC, Ali Çehreli wrote:
On 05/10/2014 07:12 PM, Moses wrote:
After using the 1-click Ubuntu installer, I'm having trouble
figuring
out how to import standard library functions for Phobos. I
get the
On Saturday, 10 May 2014 at 20:24:50 UTC, MarisaLovesUsAll wrote:
Hi!
I sometimes got a useless messages in stdout from SDL_Image
library, and I want to temporary silence it. How do I do?
You can temporary redirect output to file. Example (on C):
#include stdio.h
#include unistd.h
#include
On Sunday, 11 May 2014 at 07:43:07 UTC, Kagamin wrote:
Known bug https://issues.dlang.org/show_bug.cgi?id=2742
It's not bug. Write-functions are designed to output text to
stdout, and it's issue of programmer to make sure that expected
acceptor can interpret them properly. Note that stdout
On Friday, 6 June 2014 at 16:33:27 UTC, Adam D. Ruppe wrote:
When you compile the final program, the library .d file needs
to be available too, either in the folder based on its name or
passed straight to dmd explicitly.
Despite the presence of the .lib file, the .d file is still
needed so
dmd has -shared option. Try it instead of -L-shared.
It seems like you're trying to compile 64-bit code when you are
on 32-bit system and you have 32-bit libphobos.
I conclude that because I have similar errors when trying to
build 64-bit library on 32-bit system.
/usr/bin/ld:
/usr/lib/x86_64-linux-gnu/libphobos2.a(format_712_5b3.o):
relocation R_X86_64_32 against `.rodata' can not be used when
making a shared object; recompile with -fPIC
On Saturday, 14 June 2014 at 11:59:53 UTC, Paul wrote:
One stupid question: in Python subclassing of Exception looks
like:
class MyError(Exception): pass
but in D, if I'm right, we should write more code:
class MyError : Exception {
this(string msg) { super(msg); }
}
(without
I don't think you always need documentation for all exception
classes, since the most of them have the same interface. Usually
it's worth to describe where is some exception able to be thrown
from, not exception itself. And it's covered by function
documentation, not by documentation of
Dub has option called --annotate. It's described like this:
Do not perform any action, just print what would be done
I supposed it's something similar to -n option of Jam build
system (I really like this feature). But dub's annotate prints
nothing. So what is that? I have DUB version 0.9.21
On Monday, 23 June 2014 at 01:16:49 UTC, Evan Davis wrote:
As the subject says, I would like to pass around an array of
functions. The trick is, that the functions have different type
signatures. Is there a way to put the two functions
int foo(int a, int b);
bool bar(bool a, bool b);
into
On Thursday, 26 June 2014 at 09:05:23 UTC, pgtkda wrote:
How can i close my application by code?
Do you mean exit status? Just call exit function from C library.
import std.c.stdlib;
void main()
{
exit(0);
}
On Thursday, 26 June 2014 at 11:07:37 UTC, Rene Zwanenburg wrote:
On Thursday, 26 June 2014 at 10:40:00 UTC, John Colvin wrote:
On Thursday, 26 June 2014 at 09:58:50 UTC, FreeSlave wrote:
On Thursday, 26 June 2014 at 09:05:23 UTC, pgtkda wrote:
How can i close my application by code?
Do you
Derelict contains bindings to other libraries, not these
libraries themselves. dub downloads only these bindings, not
original libraries (since they are written in C, not D, and not
included in dub repositories). You should manually get necessary
libraries and put them in folder where .exe
On Tuesday, 22 July 2014 at 07:58:50 UTC, Puming wrote:
Is there a fork()/wait() API similar to std.concurrency spawn()?
The best thing I've got so far is module
core.sys.posix.unistd.fork(), but it seems to only work in
posix. Is there a unified API for process level concurrency?
ideally
Note that BOMs are optional and may be not presented in Unicode
file. Also presence of leading bytes which look BOM does not
necessarily mean that file is encoded in some kind of Unicode.
:43:58 UTC, FreeSlave wrote:
On Tuesday, 22 July 2014 at 07:58:50 UTC, Puming wrote:
Is there a fork()/wait() API similar to std.concurrency
spawn()?
The best thing I've got so far is module
core.sys.posix.unistd.fork(), but it seems to only work in
posix. Is there a unified API for process
have to redirect it from within the C++ code.
I've created simple example (for Linux) -
https://bitbucket.org/FreeSlave/redirect-example/src
It works as expected. Nothing writes to console, but to file.
On Wednesday, 30 July 2014 at 20:51:25 UTC, Daniel Kozak via
Digitalmars-d-learn wrote:
V Wed, 30 Jul 2014 14:33:51 +
seany via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com
napsáno:
In Ali's excllent book, somehow one thing has escaped my
attention, and that it the mentioning of
On Thursday, 31 July 2014 at 11:34:38 UTC, Kozzi11 wrote:
Is possible to somehow split class declaration and definition.
I mean something like this:
class C
{
void hello(); // just prototype
}
class C
{
void hello()
{
//actual code
}
}
or something like this
void
On Thursday, 31 July 2014 at 12:05:53 UTC, francesco cattoglio
wrote:
Really simple question:
how do I get the compiler-generated hash function for a given
type?
For example:
Struct S
{
int i;
}
can be used in an associative array. That means the compiler
generates a toHash function. Is
On Friday, 15 August 2014 at 03:10:43 UTC, Etienne Cimon wrote:
I'm looking into making a binding for the C++ API called Botan,
and the constructors in it take a std::function. I'm wondering
if there's a D equivalent for this binding to work out, or if I
have to make a C++ wrapper as well?
On Monday, 18 August 2014 at 10:07:30 UTC, Remi Thebault wrote:
Hi
Starting to use GtkD TreeModel, I write an instance of an
abstract class to TreeIter.userData.
When reading back the void pointer and casting to my abstract
class leads to crash when instance is used (Task is the
abstract
On Sunday, 24 August 2014 at 11:56:44 UTC, nikki wrote:
I come from languages that don't offer structs, I have this
json load function that has to keep some data and intuitively
I've written a struct, I've read about the differences, heap vs
stack, value vs reference, but know I think i am
core.demangle.mangle to get mangled names of D functions.
I also made some similar wrapper in my project
https://bitbucket.org/FreeSlave/dido But it was not updated for a
long time and now it's outdated (code uses dlopen and LoadLibrary
which is wrong and should be changed to Runtime.loadLibrary. Same
On Thursday, 16 April 2015 at 08:51:15 UTC, TheGag96 wrote:
Hi, I've got this project that requires me to link into a C++
backend. It works just fine when using GDC:
gdc *.d [client libraries]
However, this command using DMD does not work:
dmd -L-lstdc++ *.d [client libraries]
I still get
On Sunday, 12 April 2015 at 04:39:06 UTC, Philip Stuckey wrote:
why not:
import std.stdio;
stdout = File(args[4], w+);
stderr = File(args[4], w+);
It just replaces the object, not redirects output. E.g. if you
use printf somewhere it will use stdout, not file.
I think I found solution using opBinaryRight
import std.range;
struct S
{
int i;
string s;
int opCmp(int i) {
return this.i - i;
}
int opCmp(ref const S s) {
return this.i - s.i;
}
int opBinaryRight(string op)(int i) if (op == ) {
return i
I have array of structs sorted by specific field. How can I
perform binary search using this field as a key?
Currently I ended up with this, but it gives error:
struct S
{
int i;
string s;
}
import std.range;
void main(string [] args)
{
S[] structs = [{1,hello}, {2,world}, {3,
On Sunday, 5 April 2015 at 23:15:04 UTC, w0rp wrote:
On Sunday, 5 April 2015 at 23:06:27 UTC, FreeSlave wrote:
I have array of structs sorted by specific field. How can I
perform binary search using this field as a key?
Currently I ended up with this, but it gives error:
struct S
{
int i
On Tuesday, 16 June 2015 at 12:26:45 UTC, C2D wrote:
Hi,
I encountered the following error:
Error: function files.SHGetFolderPath (void* hwndOwner, int
nFolder, void* hToken, uint dwFlags, char* pszPath) is not
callable using argument types (typeof(null), int, typeof(null),
int,
On Tuesday, 16 June 2015 at 13:31:47 UTC, FreeSlave wrote:
Also you may want to take a look at my library [1] where I use
SHGetSpecialFolderPath (I know, it's deprecated, but it still
works, so why not. I don't really need to bother with access
tokens here).
Note that I load shell32
On Thursday, 2 July 2015 at 12:47:52 UTC, Nicholas Wilson wrote:
On Thursday, 2 July 2015 at 12:19:06 UTC, Steven Schveighoffer
wrote:
On 7/2/15 8:10 AM, Nicholas Wilson wrote:
[...]
Try dmd -v, it will tell you the link line. Then you can try
it yourself to see how to get it to work. I
On Friday, 22 May 2015 at 12:12:46 UTC, tcak wrote:
I know there is mutable variables, but what is a mutable method?
Error message says mutable method
project.mariadb.connector.ver2p1.resultset.ResultSetColumn.info
is not callable using a const object.
The method that can change the state
On Sunday, 16 August 2015 at 12:30:54 UTC, cym13 wrote:
On Sunday, 16 August 2015 at 11:53:42 UTC, FreeSlave wrote:
[...]
Ok, so as my lambda proposition obviously doesn't work, here is
one way that does using a templated function. There may be a
way to make it shorter, I don't know
Let's say I want to map some range using some context.
The obvious way is to do:
uint[3] arr = [1,2,3];
uint context = 2;
auto r = arr[].map!(delegate(value) { return value * context; });
The problem is that this allocates delegate, so it can't be used
in @nogc code.
What I want to do might
On Sunday, 16 August 2015 at 16:23:05 UTC, FreeSlave wrote:
On Sunday, 16 August 2015 at 15:29:10 UTC, Ali Çehreli wrote:
On 08/16/2015 04:53 AM, FreeSlave wrote:
The problem is that this allocates delegate, so it can't be
used in
@nogc code.
Would constructing the delegate by setting its
On Sunday, 16 August 2015 at 15:29:10 UTC, Ali Çehreli wrote:
On 08/16/2015 04:53 AM, FreeSlave wrote:
The problem is that this allocates delegate, so it can't be
used in
@nogc code.
Would constructing the delegate by setting its .funcptr and
.ptr properties work in this case? You can have
On Monday, 17 August 2015 at 15:05:56 UTC, Andre Polykanine wrote:
Hi everyone,
I'm new to D (I'm learning it by reading the great online book
by Ali
Çehreli - thank you very much for it, sir!), and, more
than that,
programming is my hobby, so please bear with me if I'm asking
stupid
On Thursday, 16 July 2015 at 21:12:05 UTC, anonymous wrote:
I have the following code, working under Win and Linux:
---
import std.process: environment;
immutable string p;
static this() {
version(Win32) p = environment.get(APPDATA);
version(linux) p = /home/ ~ environment.get(USER);
On Friday, 17 July 2015 at 07:33:43 UTC, Anonymous wrote:
On Friday, 17 July 2015 at 07:14:24 UTC, FreeSlave wrote:
On Thursday, 16 July 2015 at 21:12:05 UTC, anonymous wrote:
I have the following code, working under Win and Linux:
---
import std.process: environment;
immutable string p
On Wednesday, 26 August 2015 at 08:30:04 UTC, Yazan D wrote:
On Wed, 26 Aug 2015 08:27:05 +, FreeSlave wrote:
Are there ways to fix this? Should I consider writing my own
range type probably?
Check
http://dlang.org/phobos/std_algorithm_iteration.html#.cache
I tried it. It can help
Example:
import std.stdio;
import std.algorithm;
import std.path;
import std.file;
import std.exception;
import std.getopt;
import std.array;
import std.range;
auto algo(string fileName, string[] dirs, string[] extensions)
{
return dirs.filter!(delegate(dir) {
bool ok;
On Wednesday, 2 September 2015 at 05:00:42 UTC, drug wrote:
02.09.2015 00:08, Jonathan M Davis via Digitalmars-d-learn
пишет:
On Tuesday, September 01, 2015 20:05:18 drug via
Digitalmars-d-learn wrote:
My case is I don't know what type user will be using, because
I write a
library. What's the
Let's say I have two dub packages: A and B.
A is a library. B is library or application (does not matter) and
depends on A.
A has several configurations in dub.json.
How to build the B package that way it will use non-default
configuration of A?
On Sunday, 6 September 2015 at 23:05:29 UTC, Jonathan M Davis
wrote:
http://dlang.org/phobos/std_file.html#.getAttributes will get
you all of the file attributes for a file, though you'll have
to look at the Windows and POSIX documentation to know how to
interpret that.
- Jonathan M Davis
On Tuesday, 8 September 2015 at 04:04:16 UTC, Sebastiaan Koppe
wrote:
Fixed it by changing into:
```
import std.conv : text;
string json =
File("../languages.json","r").byLineCopy().joiner.text;
auto ls = json.parseJSON();
```
Why would you read file by line and then merge
Here's code:
private {
import std.algorithm;
import std.range;
import std.typecons;
alias Tuple!(int, string) Data;
}
private bool myCmp(Data a, Data b) {
return a[0] < b[0];
}
auto bar() {
return [Data(1, "one"), Data(2, "two")].assumeSorted!myCmp;
}
void main()
{
On Tuesday, 7 June 2016 at 15:33:57 UTC, chmike wrote:
Hello
I'm writing some code that I want to be portable across Posix
and Windows.
What is the recommended code convention for such type of code ?
80% of the class implementation is the same for both OS.
Should I write the following and
On Thursday, 28 January 2016 at 04:26:26 UTC, Taylor Hillegeist
wrote:
Just curious... I had a thought that perhaps since Objective C
was a replacement for Pascal on the mac. that they might have
the same interface. but I'm not savvy enough with fpc to figure
out how to try it.
Not directly.
On Thursday, 21 January 2016 at 13:26:15 UTC, W.J. wrote:
On Wednesday, 20 January 2016 at 16:01:11 UTC, Dibyendu
Majumdar wrote:
Hi,
I am trying to understand the options for distributing a D app
to users. My assumption is that only the shared libraries and
binaries need to be distributed,
std.windows.syserror and others have documentation comments, but
they are not listed in online documentation on dlang.org. Is it
ok to use functions and classes from this modules in D
applications?
On Friday, 22 April 2016 at 09:25:32 UTC, Jeff Thompson wrote:
Hello. The following code compiles OK where func creates a
mutable array and main assigns it to an immutable variable:
[...]
Probably this is what you look for
http://dlang.org/phobos/std_exception.html#.assumeUnique
On Friday, 22 April 2016 at 11:07:47 UTC, Jeff Thompson wrote:
On Friday, 22 April 2016 at 09:40:14 UTC, FreeSlave wrote:
On Friday, 22 April 2016 at 09:25:32 UTC, Jeff Thompson wrote:
Hello. The following code compiles OK where func creates a
mutable array and main assigns it to an immutable
I have two files. The one has Objective-C functions and
interfaces declarations written in D. Another file is main app
and it imports the first and uses its functions.
Imported file: http://codepad.org/jqdBb6sh
Main file: http://codepad.org/0gKBqKxi
When I compile them in one command it run
On Tuesday, 24 May 2016 at 20:03:14 UTC, pineapple wrote:
I would've expected this to work, but instead I get a compile
error. Is my syntax wrong? Is this just not a case that map can
handle, and I should be doing something else?
import std.algorithm : map;
import std.conv : to;
On Thursday, 30 June 2016 at 21:56:57 UTC, Special opOps wrote:
How can I get the program stats at run time such as minimum and
maximum amount of memory and cpu used, cpu architecture, os,
etc?
OS is compile-time constant.
http://dlang.org/phobos/std_system.html#.os
Or do you look for
1 - 100 of 140 matches
Mail list logo