On Tuesday, 26 December 2023 at 11:19:29 UTC, Sergey wrote:
Use typeid, instead of typeof
Thanks!
Got quite a type but I will worry about that later:
std.range.SortedRange!(Result, "a < b").SortedRange
In section 6.2 of The D Programming Language it talks about how
the compiler will try and tell if you are going to use a null
reference. It gives this code snippet below to demonstrate that.
But with DMD v2.096.1-dirty I am getting that the compiler thinks
the code is OK. With a "!" the assert
On Friday, 9 July 2021 at 03:32:31 UTC, Adam D Ruppe wrote:
On Friday, 9 July 2021 at 03:09:52 UTC, Tony wrote:
The editor I am using (Code::Blocks) displays the characters
just fine. So it seems that the error message should be
"Error: Outside the ASCII code space".
D supports stuff outside
I copied some text from a web page into a comment and I get the
error
"Error: Outside Unicode code space".
This appears to be an incorrect error message. It is upset about
double quotes that lean forward or backwards, and apostrophes
that lean backwards. And dashes that aren't the keyboard das
On Thursday, 27 May 2021 at 19:39:15 UTC, Ozan Sueel wrote:
Hi
I think about writing apps vor ChromeOS, but before running in
a death end, I ask by myself, is D a good choice for this
approach?
Any experience with this new upcoming operating system?
New and upcoming? ChromeOS was first relea
On Saturday, 15 May 2021 at 21:15:01 UTC, Ola Fosheim Grostad
wrote:
On Saturday, 15 May 2021 at 14:31:08 UTC, Alain De Vos wrote:
In general it is better to have fewer features and instead
improve metaprogramming so that missing features can be done in
a library.
Why is metaprogramming
On Tuesday, 5 January 2021 at 18:42:42 UTC, Marvin wrote:
On Monday, 4 January 2021 at 15:39:50 UTC, ludo456 wrote:
Listening to the first visioconf of the Dconf 2020, titled
Destroy All Memory Corruption,
(https://www.youtube.com/watch?v=XQHAIglE9CU) Walter talks
about not using exceptions an
On Sunday, 25 August 2019 at 21:30:10 UTC, GreatSam4sure wrote:
I am wondering as to what is the starting point of being a pro
programmer. If I want to be a pro programmer what language must
I start with?
Most pro programmer I have heard of are all C and C++ Guru.
Most of the best guys on thi
On Wednesday, 31 July 2019 at 22:30:52 UTC, Alexandre wrote:
My goals:
1) Improve as a programmer
2) Have fun doing programs
That's it basically. I am planning to study all "free" time I
have. I am doing basically this since last year.
Are you only considering D and C or just mentioning the
On Saturday, 2 February 2019 at 16:56:45 UTC, Ron Tarrant wrote:
So, my big question is, do I instantiate like this:
DSingleton singleton = new DSingleton;
Or like this:
DSingleton singleton = singleton.get();
And subsequent calls would be...? The same? Using get() only?
This seems to be a
On Saturday, 1 December 2018 at 19:02:54 UTC, H. S. Teoh wrote:
But that's precisely the problem. It's not always possible to
tell whether a variable has been initialized. E.g.:
To me, the possibility of a "false positive" doesn't preclude the
use of a warning unless that possibility is lar
On Saturday, 1 December 2018 at 11:16:49 UTC, Dukc wrote:
This is great when it works, but the problem is that it would
be gargantuan effort -and compile time sink- to make it work
perfectly. When it's just about if-else if chains, switches or
boolean logic as in the example, the analysis won't
isocpp.org just had a link to a blog post where someone makes a
case for uninitialized variables in C++ being an advantage in
that you can potentially get a warning regarding use of an
uninitialized variable that points out an error in your code.
https://akrzemi1.wordpress.com/2018/11/22/treat
On Sunday, 25 November 2018 at 22:00:21 UTC, Chris Katko wrote:
On Saturday, 24 November 2018 at 20:44:57 UTC, welkam wrote:
On Friday, 23 November 2018 at 08:57:57 UTC, Chris Katko wrote:
D is supposed to compile fast.
You didnt read the fine print. It compiles simple code fast.
Also compil
From std.compiler.D_major and std.compiler.D_minor I see that my
D language version is at 2.0 . But the version of gdc front-end I
am using (via Debian default gdc package as of a few months ago)
from std.compiler.version_major and std.compiler.version_minor is
at 2.68 . That is a lot of bug fi
In std.compiler there is this code:
/// Which vendor produced this compiler.
version(StdDdoc) Vendor vendor;
else version(DigitalMars) Vendor vendor = Vendor.digitalMars;
else version(GNU) Vendor vendor = Vendor.gnu;
else version(LDC) Vendor vendor = V
On Wednesday, 17 October 2018 at 14:06:49 UTC, FrankLike wrote:
Where can get the new dmd or ldc2 that's no 'Trojan horse
virus' ?
https://dlang.org/download.html
On Thursday, 5 July 2018 at 12:52:49 UTC, Steven Schveighoffer
wrote:
On 7/5/18 4:42 AM, drug wrote:
There were several attempts to make Qt binding for dlang, but
either they has failed or has been stalled. It would be nice
to collect that experience. Considering 2.081 supports C++
special mem
On Friday, 13 April 2018 at 12:46:32 UTC, Cym13 wrote:
On Friday, 13 April 2018 at 01:27:06 UTC, Tony wrote:
I think that the typical model (at least in other languages)
is to only compile one D source file at a time. Compile the
b.d file with the -c option to create an object file. Then put
t
On Thursday, 12 April 2018 at 07:48:28 UTC, Jamie wrote:
Really, it's more like:
A/
a.d
module A.a;
import std.stdio;
import B.b;
void main()
{
writeln(f(4));
}
B/
b.d
module B.b;
size_t f(size_t input)
{
return input * 2;
}
And in A/ I
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 are compiling.
-
-I=directory
Look for imports also in
On Monday, 19 March 2018 at 17:29:10 UTC, Russel Winder wrote:
I had assumed that a directory of modules was a package. So for
example:
[...]
On Monday, 19 March 2018 at 17:29:10 UTC, Russel Winder wrote:
To my amateur eyes, first command-line build looks like a linking
of object files into
On Sunday, 18 March 2018 at 18:04:13 UTC, Tony wrote:
On Tuesday, 13 March 2018 at 06:03:11 UTC, Mike Parker wrote:
D is not C++, C#, or Java. C++ uses friend to get around the
issue. Java has no solution. I don't know about C#.
Java has four protection levels. If you don't explicitly
sp
On Sunday, 18 March 2018 at 18:32:42 UTC, Jonathan M Davis wrote:
They're similar, but there are differences. For instance, you
can do package(a) in D in order to do something like put the
stuff in a.b.c in package a rather than a.b.
Is there a known situation where it makes sense to put mo
On Tuesday, 13 March 2018 at 06:03:11 UTC, Mike Parker wrote:
D is not C++, C#, or Java. C++ uses friend to get around the
issue. Java has no solution. I don't know about C#.
Java has four protection levels. If you don't explicitly specify
[private, protected, public] the protection level
On Tuesday, 13 March 2018 at 12:23:06 UTC, Ozan Süel wrote:
if (source?pool?repository?directory?users) // do something
That type of chain is sometimes referred to as a "train wreck"
(see Law of Demeter).
If this is a common lookup it could be:
if (source && source.GotSomeUsers() )
On Saturday, 10 March 2018 at 18:02:48 UTC, Bogdan wrote:
I'd like to distinguish between regular text and code, maybe
have quotes, etc.
A poster has come up with a standard way to delineate code and
also show if multiple files are involved (along with an
"extraction to files" program):
htt
On Monday, 19 February 2018 at 17:22:04 UTC, Nathan S. wrote:
On Monday, 19 February 2018 at 15:12:15 UTC, Tony wrote:
But, assuming there is a use case for it, what if you want to
restrict to a type that is either boolean, or a struct/class
that can substitute for boolean - how do you do that
On Monday, 19 February 2018 at 13:47:15 UTC, Basile B. wrote:
Indeed but Phobos maintainers don't want the ...TypeOf family
to be documented.
(https://github.com/dlang/phobos/pull/5747)
Ok, thanks.
But, assuming there is a use case for it, what if you want to
restrict to a type that is ei
On Sunday, 18 February 2018 at 15:12:50 UTC, Mike Parker wrote:
Generally, no. But with alias this, it can be:
=
import std.traits : BooleanTypeOf;
import std.stdio : writeln;
struct NoBool {
int x;
}
struct AliasThisBool {
bool b;
alias b this;
}
void main()
{
static if(
At
https://dlang.org/library/std/traits/is_boolean.html
it has:
enum isBoolean(T) = is(BooleanTypeOf!T) && !isAggregateType!T;
per:
https://dlang.org/library/std/traits/is_aggregate_type.html
isAggregateType is true for [struct, union, class, interface].
So BooleanTypeOf!T is true for struct
On Thursday, 15 February 2018 at 18:49:55 UTC, Steven
Schveighoffer wrote:
I think it's inherent in the zlib API. I haven't used all of
the library, but the portion I did use (using zstream) uses
uint for buffer sizes.
Wouldn't using a uint for buffer size give a size limit of
greater t
Don't know if there is a better place to report this, but the
wiki attracted a spammer:
https://wiki.dlang.org/The_Search_Of_Charter_Yacht_Designer
https://wiki.dlang.org/User:MichelMeudell
On Monday, 15 January 2018 at 02:09:25 UTC, rikki cattermole
wrote:
Unicode has three main variants, UTF-8, UTF-16 and UTF-32.
The size of a code point is 1, 2 or 4 bytes.
I think to be technically correct, 1 (UTF-8), 2 (UTF-16) or 4
(UTF-32) bytes are referred to as "code units" and the si
On Sunday, 14 January 2018 at 00:55:27 UTC, Jonathan M Davis
wrote:
[...]
It the simplest case, it means that the compiler does a bitwise
copy rather than a deep copy, but in other cases, it means that
the compiler is able to use the object in-place rather than
creating a deep copy that it
On Monday, 8 January 2018 at 23:31:27 UTC, Jonathan M Davis wrote:
auto foo(T)(auto ref T t)
{
return t;
}
foo(42);
will result in foo being instantiated as
int foo(int t)
{
return t;
}
whereas
int i;
foo(i);
will result in foo being instantiated as
int foo(ref int t)
{
retur
I am on Ubuntu 16.04. I was looking at Getting Started with DUB:
http://code.dlang.org/getting_started
I did the "dub init myproject" and it worked fine. Then I added
dependency:
' dependency "dub" version="~>1.3.0" '
as shown in the next step. This got an error:
-
On Thursday, 4 January 2018 at 02:20:32 UTC, Seb wrote:
On Thursday, 4 January 2018 at 01:50:47 UTC, Tony wrote:
Following the instructions here on Ubuntu 16.04:
https://github.com/dlang/dlang.org/blob/master/CONTRIBUTING.md
I did the command
make -f posix.mak html
but it failed to successfu
Following the instructions here on Ubuntu 16.04:
https://github.com/dlang/dlang.org/blob/master/CONTRIBUTING.md
I did the command
make -f posix.mak html
but it failed to successfully complete:
---
make[1]: Leaving directory '/home/user/dlang/dmd/src'
On Wednesday, 3 January 2018 at 12:21:28 UTC, tipdbmp wrote:
// C:\libs\my_module.d
module my_module;
void foo() {}
// main.d
module main;
import my_module;
void main() {
foo();
}
Running dmd with:
dmd -IC:\libs main.d my_module.d
I get:
Error: module my_module is in file 'my_modu
On Wednesday, 3 January 2018 at 18:35:21 UTC, Ali Çehreli wrote:
On 01/03/2018 09:10 AM, tipdbmp wrote:
dmd main.d C:\libs\my_module.d
That does not use the -I switch.
It compiles if I specify the full path to my_module.d:
dmd -IC:\libs main.d C:\libs\my_module.d
I don't understand the e
On Monday, 1 January 2018 at 02:10:14 UTC, Jonathan M Davis wrote:
The DLang Tour should probably be fixed to use the term dynamic
array though.
Or embrace both terms but take care that it is clear that they
are synonyms and one may be preferred depending on context. As a
beginner, I had s
On Sunday, 31 December 2017 at 13:14:10 UTC, aliak wrote:
On Sunday, 31 December 2017 at 01:03:17 UTC, Tony wrote:
For me, front() should throw a pre-defined exception when
called on an empty range in order to eliminate undefined
behavior. It does take some time to make a check, but D does
arr
On Sunday, 31 December 2017 at 14:24:40 UTC, Jonathan M Davis
wrote:
The D Slices article does an excellent job of explaining all of
this. It's just that it calls the GC-allocated memory buffer
the dynamic array instead of calling T[] the dynamic array like
the language and spec do. Regardl
On Sunday, 31 December 2017 at 04:20:28 UTC, codephantom wrote:
On Sunday, 31 December 2017 at 03:57:17 UTC, Tony wrote:
On Sunday, 31 December 2017 at 03:08:05 UTC, Ivan Trombley
wrote:
double[] D = [3.14159];
Can you guess what D is? :D
It took me a while but I finally came up with "a sli
On Sunday, 31 December 2017 at 03:08:05 UTC, Ivan Trombley wrote:
double[] D = [3.14159];
Can you guess what D is? :D
It took me a while but I finally came up with "a slice of pi"
On Friday, 29 December 2017 at 23:13:20 UTC, Jonathan M Davis
wrote:
The term "slice" is a bit overused in D, meaning a variety of
things. It doesn't help that some folks dislike the official
terminology. In general, a slice is a contiguous group of
elements. A slice of memory would be a contig
For me, front() should throw a pre-defined exception when called
on an empty range in order to eliminate undefined behavior. It
does take some time to make a check, but D does array bounds
checking by default. Ideally the front() check could be turned
off somehow ("-boundschecks=off") by the us
In DLang Tour:Arrays
https://tour.dlang.org/tour/en/basics/arrays
there is:
---
int size = 8; // run-time variable
int[] arr = new int[size];
The type of arr is int[], which is a slice.
---
In "D Slices"
htt
On this page:
https://tour.dlang.org/tour/en/basics/delegates
there is:
void doSomething(int function(int, int) doer) {
// call passed function
doer(5,5);
}
doSomething(add); // use global function `add` here
// a
Wondering what the rationale is for this:
https://dlang.org/spec/ddoc.html#no_documentation
No Documentation
No documentation is generated for the following constructs, even
if they have a documentation comment:
Invariants
Postblits
Destructors
Static constructors and static destructors
Clas
On Thursday, 30 November 2017 at 09:50:37 UTC, Tony wrote:
On Thursday, 30 November 2017 at 09:47:14 UTC, Tony wrote:
Thanks for the reply. Probably just missing it, but in poking
around dlang.org (Language Reference and Library Reference) I
am having trouble finding out about the move(), fron
On Thursday, 30 November 2017 at 09:47:14 UTC, Tony wrote:
Thanks for the reply. Probably just missing it, but in poking
around dlang.org (Language Reference and Library Reference) I
am having trouble finding out about the move(), front() and
moveFront() functions, as is used here on a dynamic
On Thursday, 30 November 2017 at 06:36:12 UTC, Ali Çehreli wrote:
move is an operation that transfers the state of the source to
the destination. The front element becomes its .init value and
its previous values is returned by moveFront().
The important bit is that, the element is *not* cop
What does the moveFront() method do in the InputRange interface?
std.range.interfaces : InputRange.moveFront()
On Saturday, 18 November 2017 at 05:24:30 UTC, Tony wrote:
Forgot to handle pre-mature foreach exit:
import std.stdio : writeln;
class RefRange {
int foreach_index;
int[] items;
this(int[] src)
{
items = src;
}
bool empty()
{
if (foreach_index == items
On Friday, 17 November 2017 at 17:55:30 UTC, Jonathan M Davis
wrote:
When you have
foreach(e; range)
it gets lowered to something like
for(auto r = range; !r.empty; r.popFront())
{
auto e = r.front;
}
So, the range is copied when you use it in a foreach. In the
case of a class, it's jus
On Friday, 17 November 2017 at 07:40:35 UTC, Mike Parker wrote:
You might also find use in this article (poorly adapted from
Chapter 6 of Learning D by the publisher, but still readable):
https://www.packtpub.com/books/content/understanding-ranges
makes a distinction about "range consumptio
On Friday, 17 November 2017 at 01:16:38 UTC, H. S. Teoh wrote:
It should be .empty, .popFront, and .front, not .pop.
Also, these methods are *range* primitives, and over time, we
have come to a consensus that generally speaking, it's a bad
idea to conflate containers with ranges over contain
On Thursday, 16 November 2017 at 18:34:54 UTC, Steven
Schveighoffer wrote:
On 11/16/17 8:10 AM, ag0aep6g wrote:
On 11/16/2017 09:03 AM, Tony wrote:
However, when I use the class with foreach, the opindex gets
called to create a dynamic array, rather than use the
empty(),front(),popFront() rout
On Thursday, 16 November 2017 at 13:35:13 UTC, Tony wrote:
On Thursday, 16 November 2017 at 13:10:11 UTC, ag0aep6g wrote:
On 11/16/2017 09:03 AM, Tony wrote:
However, when I use the class with foreach, the opindex gets
called to create a dynamic array, rather than use the
empty(),front(),popFr
On Thursday, 16 November 2017 at 13:10:11 UTC, ag0aep6g wrote:
On 11/16/2017 09:03 AM, Tony wrote:
However, when I use the class with foreach, the opindex gets
called to create a dynamic array, rather than use the
empty(),front(),popFront() routines. I would prefer it use the
three methods, ra
On Thursday, 16 November 2017 at 12:56:18 UTC, Steven
Schveighoffer wrote:
On 11/16/17 3:03 AM, Tony wrote:
I made a stack data type and created an opIndex() so it could
be turned into a dynamic array, and created empty()
(unfortunate name), front() and popFront() methods, which I
read allow i
On Thursday, 16 November 2017 at 08:26:25 UTC, Andrea Fontana
wrote:
On Thursday, 16 November 2017 at 08:03:48 UTC, Tony wrote:
I made a stack data type and created an opIndex() so it could
be turned into a dynamic array, and created empty()
(unfortunate name), front() and popFront() methods, w
I made a stack data type and created an opIndex() so it could be
turned into a dynamic array, and created empty() (unfortunate
name), front() and popFront() methods, which I read allow it to
be used with foreach.
However, when I use the class with foreach, the opindex gets
called to create a
On Wednesday, 15 November 2017 at 11:20:24 UTC, Biotronic wrote:
Thanks Biotronic! I found this on the html documentation for
templates: "The body of the TemplateDeclaration must be
syntactically correct even if never instantiated. Semantic
analysis is not done until instantiated", and that is
This code:
class MyClass {
public:
int SomeMethod ()
{
}
}
void main()
{
}
gets a compile error:
Error: function test_warnings.MyClass.SomeMethod has no return
statement, but is expected to return a value of type int
but if I make it a template class:
class MyClass(T) {
there
On Tuesday, 14 November 2017 at 07:56:06 UTC, rikki cattermole
wrote:
On 14/11/2017 7:54 AM, Tony wrote:
Is there an easy way to get the string representation of an
array, as would be printed by writeln(), but captured in a
string?
struct Foo {
int x;
}
void main() {
Foo[]
Is there an easy way to get the string representation of an
array, as would be printed by writeln(), but captured in a string?
On Monday, 13 November 2017 at 07:38:14 UTC, Ali Çehreli wrote:
It is. If you search for "where is core file ubuntu" you will
hit the output of 'man core', as well as answers like the
following, which explains that the file may be under
/var/cache/abrt:
https://stackoverflow.com/questions
On Monday, 13 November 2017 at 07:38:14 UTC, Ali Çehreli wrote:
On 11/12/2017 10:25 PM, Tony wrote:
>>> "Segmentation fault (core dumped)"
I've been assuming that if it says "dumped", the core is dumped.
> I am on Ubuntu 16.04. Thanks, I didn't know that "producing a
core file"
> was configura
On Monday, 13 November 2017 at 05:37:12 UTC, codephantom wrote:
On Monday, 13 November 2017 at 05:01:18 UTC, Tony wrote:
I am getting the message from my program execution:
"Segmentation fault (core dumped)"
But I don't see a core file in the current directory or in my
home directory. Is ther
I am getting the message from my program execution:
"Segmentation fault (core dumped)"
But I don't see a core file in the current directory or in my
home directory. Is there one somewhere? Would I be able to do
anything meaningful with it if it exists?
Thanks Mike!
Doing a port of some C code that has an #ifdef in the middle of
an initialization for an array of structs. I am getting a compile
error trying to get equivalent behavior with "static if" or
"version". Is there a way to achieve this other than making two
separate array initialization sections?
Author Allen Holub has made his out-of-print book, Compiler
Design in C, available as a free pdf download:
http://holub.com/compiler/
And Torben Mogensen is doing the same with his more recent Basics
of Compiler Design:
http://www.diku.dk/~torbenm/Basics/
My program compiled, but when I ran it I got this error message:
object.Error@src/rt/minfo.d(371): Cyclic dependency between
module variable and main
variable* ->
misc ->
main* ->
variable*
I take it that the -> represents a dependency from the module on
that line, to the module on the line
There is a fputs/stdout in core.stdc.stdio. std.stdio "public
imports" that:
"public import core.stdc.stdio;"
Wondering why:
import core.stdc.stdio : fputs;
import core.stdc.stdio : stdout;
void main()
{
fputs( cast(const char *)"hello world\n",stdout);
}
compiles and runs, but if I chan
I prefer the built-in associative array over using some template
library. It has the clean look and ease-of-use that you get with
a similar data structure in dynamic languages like Python. I
consider it a top feature of D.
On Tuesday, 17 October 2017 at 13:27:24 UTC, Steven Schveighoffer
wrote:
I don't know what "allocations" represents, but reserve
actually calls gc_malloc, and the others do not (the space is
available to expand into the block). There should be only one
allocation IMO.
-Steve
So there sh
Found this unanswered question on StackOverflow.
This program:
import std.stdio;
void add(ref int[] data)
{
data ~= 1;
data ~= 2;
}
void main()
{
int[] a;
writeln("capacity:",a.capacity);
auto cap = a.reserve(1000); // allocated may be more than
requested
assert(cap >
On Sunday, 1 October 2017 at 07:11:14 UTC, bitwise wrote:
On Sunday, 1 October 2017 at 05:57:53 UTC, Tony wrote:
"@property functions can only have zero, one or two parameters"
I am looking for an example of an @property function defined
with two parameters and the syntax for how it is accesse
On Sunday, 1 October 2017 at 06:34:56 UTC, Jonathan M Davis wrote:
On Sunday, October 01, 2017 05:57:53 Tony via
Digitalmars-d-learn wrote:
"@property functions can only have zero, one or two parameters"
I am looking for an example of an @property function defined
with two paramete
"@property functions can only have zero, one or two parameters"
I am looking for an example of an @property function defined with
two parameters and the syntax for how it is accessed without ().
On Saturday, 30 September 2017 at 10:09:43 UTC, Mike Wey wrote:
On 30-09-17 03:27, Tony wrote:
One thing I picked up from SCons is creating dynamic object
files with a .os extension and static object files with the
standard .o extension. That way they can be compiled in the
same directory in t
On Saturday, 30 September 2017 at 07:45:27 UTC, Jacob Carlborg
wrote:
On 2017-09-30 08:56, Tony wrote:
The documentation says:
--
This module contains bindings to selected types and functions
from the
standard C header . Note that this is not
The documentation says:
--
This module contains bindings to selected types and functions
from the standard C header . Note that this is not
automatically generated, and may omit some types/functions from
the original C header.
---
On Saturday, 30 September 2017 at 01:02:08 UTC, Elronnd wrote:
dmd bla.d bla2.d -shared -fPIC -oflibbla.so
Thanks. I don't normally compile right into a .so, but I think
this is OK:
dmd my_file.o my_other_file.o -shared -of=libutest.so
One thing I picked up from SCons is creating dynami
I would like to know that command line (I am on Linux) I would
use to compile a D file and create an object file that is
suitable for a Linux dynamic library (.so).
I believe it is probably
dmd -c -fPIC my_file.d
Also, what is the command line to create a dynamic library from
one or more obj
On Sunday, 24 September 2017 at 05:48:32 UTC, Tony wrote:
I am compiling a module (utils) with one function in it with
the -cov compiler option on Ubuntu 14.04 with DMD v2.073.2. I
then compile a "main module" with -cov that imports the "utils
module" and calls the one function. The *.lst outpu
I am compiling a module (utils) with one function in it with the
-cov compiler option on Ubuntu 14.04 with DMD v2.073.2. I then
compile a "main module" with -cov that imports the "utils module"
and calls the one function. The *.lst output file shows lines
that executed in the "main module". I w
Help me! How to set connect timeout on a blocking socket?
I happened to notice that among my libcurl*s
libcurl-gnutls.so.3
libcurl-gnutls.so.4
libcurl-gnutls.so.4.3.0
libcurl.so.3
libcurl.so.4
libcurl.so.4.3.0
none were just libcurl.so. So I made a link for libcurl.so to the
latest version and now I am getting the same link errors I got
after downloa
On Monday, 24 August 2015 at 06:28:34 UTC, Yazan D wrote:
On Sun, 23 Aug 2015 16:00:16 +, Tony wrote:
Thanks for the replies. It compiles OK with just. However, it
isn't linking:
/usr/bin/ld: cannot find -lcurl
I do have some versions of libcurl on my system:
/usr/lib/x86_64-linux-gnu/
On Sunday, 23 August 2015 at 16:20:04 UTC, Gerald Jansen wrote:
On Sunday, 23 August 2015 at 16:00:19 UTC, Tony wrote:
/usr/bin/ld: cannot find -lcurl
Just the other day I had a similar problem (compiling vibenews,
ld complained of missing -levent and -lssl), which I managed to
solve simply
On Sunday, 23 August 2015 at 16:00:19 UTC, Tony wrote:
Thanks for the replies. It compiles OK with just. However, it
isn't linking:
/usr/bin/ld: cannot find -lcurl
I do have some versions of libcurl on my system:
/usr/lib/x86_64-linux-gnu/libcurl.so.3
/usr/lib/x86_64-linux-gnu/libcurl.so.4.3
Thanks for the replies. It compiles OK with just. However, it
isn't linking:
/usr/bin/ld: cannot find -lcurl
I do have some versions of libcurl on my system:
/usr/lib/x86_64-linux-gnu/libcurl.so.3
/usr/lib/x86_64-linux-gnu/libcurl.so.4.3.0
/usr/lib/x86_64-linux-gnu/libcurl.so.4
I see there i
I found this weather program on the main page (it seems to rotate
what it here):
// Get your local weather report
pragma(lib, "curl");
import std.functional, std.json, std.net.curl,
std.stdio, std.string;
alias getJSON = pipe!(get, parseJSON);
auto K2C = (float f) => f - 273.15;
auto K2F =
Why is it acceptable to specify main as returning void (in
addition to returning int)?
It looks like this page:
http://dlang.org/hash-map.html
Should have the override keyword added the the member functions
in Foo:
class Foo
{
int a, b;
size_t toHash() { return a + b; }
bool opEquals(Object o)
{
Foo foo = cast(Foo) o;
return foo && a == foo.a &
100 matches
Mail list logo