On Friday, 16 May 2014 at 04:59:46 UTC, Taylor Hillegeist wrote:
The subject says it all really. i have this example:
import core.memory;
class fruit{
int value=5;
public int getvalue(){
return value;
}
}
int main(string[] args) {
GC.disable;
static fruit myfruit;
return
On 15/05/14 23:27, Tom Browder via Digitalmars-d-learn wrote:
I am a volunteer developer with the well-known 3D CAD FOSS project BRL-CAD:
http://brlcad.org
I have wanted to use D for a long time but I hadn't taken the plunge.
Yesterday I advertised to the BRL-CAD community my new project to
On 05/15/2014 09:59 PM, Taylor Hillegeist wrote:
The subject says it all really. i have this example:
import core.memory;
class fruit{
int value=5;
public int getvalue(){
return value;
}
}
int main(string[] args) {
GC.disable;
static fruit myfruit;
return
On 16/05/14 06:59, Taylor Hillegeist wrote:
The subject says it all really. i have this example:
import core.memory;
class fruit{
int value=5;
public int getvalue(){
return value;
}
}
int main(string[] args) {
GC.disable;
static fruit myfruit;
return
On 16/05/2014 4:59 p.m., Taylor Hillegeist wrote:
The subject says it all really. i have this example:
import core.memory;
class fruit{
int value=5;
public int getvalue(){
return value;
}
}
int main(string[] args) {
GC.disable;
static fruit myfruit;
return
On Friday, 16 May 2014 at 04:58:47 UTC, Jack wrote:
A follow up from :
http://forum.dlang.org/thread/nsdomtdbqqlylrmgo...@forum.dlang.org
I discovered that it was not a C::B issue as I already compiled
it with Xamarin Studio and it was still spewing out the error:
Yuriy wrote in message news:klosrzuxwmvilupzz...@forum.dlang.org...
Ok, i can understand that, but what about this one:
http://dpaste.dzfl.pl/6a9961e32e6d
It doesn't use d arrays in function interfaces. Should it work?
Similar problem, D arrays cannot be mangled correctly with C++ mangling.
On Friday, 16 May 2014 at 06:17:47 UTC, Jacob Carlborg wrote:
On 15/05/14 23:27, Tom Browder via Digitalmars-d-learn wrote:
I am a volunteer developer with the well-known 3D CAD FOSS
project BRL-CAD:
http://brlcad.org
I have wanted to use D for a long time but I hadn't taken the
plunge.
John Colvin:
Any plans to get any preprocessor stuff working?
Do you mean in D?
Bye,
bearophile
There are of course ways to implement a really efficient ZLW
compressor in D, and such implementation could be added as
third D entry if it manages to be not too much long,
Third version added:
http://rosettacode.org/wiki/LZW_compression#More_Efficient_Version
I have tried to make it
On Thu, May 15, 2014 at 9:56 PM, FrankLike via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
...
And use VisualD.
Thanks for the suggestion, Frank, but I don't do windows.
Best,
-Tom
On Fri, May 16, 2014 at 1:17 AM, Jacob Carlborg via
Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
...
On 15/05/14 23:27, Tom Browder via Digitalmars-d-learn wrote:
...
I have been looking for specific information on creating D bindings
from C headers for which there seems to be
On Friday, 16 May 2014 at 07:37:33 UTC, Mengu wrote:
hi Jack
curl has an option called SSL_VERIFYPEER which is supported by
etc.c.curl: CurlOption.
you can simply do the following:
import std.stdio;
import etc.c.curl : CurlOption;
import std.net.curl;
void main()
{
auto conn = HTTP();
On Friday, 16 May 2014 at 09:44:11 UTC, bearophile wrote:
John Colvin:
Any plans to get any preprocessor stuff working?
Do you mean in D?
Bye,
bearophile
i think he means in dstep.
On 05/16/14 11:47, bearophile via Digitalmars-d-learn wrote:
There are of course ways to implement a really efficient ZLW compressor in
D, and such implementation could be added as third D entry if it manages to
be not too much long,
Third version added:
For example, windows headers do use C++ -references in function
signatures and msdn provides code examples using that convention,
the equivalent in D is ref.
Artur Skawina:
So how does it perform wrt the D version that I wrote for
you last time? [1]
[1]
http://forum.dlang.org/post/mailman.2132.1353592965.5162.digitalmar...@puremagic.com)
From your answer:
First, the code above is practically a textbook example on how
/not/ to
write readable and
On Fri, 16 May 2014 02:31:18 -0400, Jacob Carlborg d...@me.com wrote:
On 16/05/14 06:59, Taylor Hillegeist wrote:
The subject says it all really. i have this example:
import core.memory;
class fruit{
int value=5;
public int getvalue(){
return value;
}
}
int main(string[] args)
On 16/05/14 11:19, John Colvin wrote:
Any plans to get any preprocessor stuff working? Presumably libclang can
make this feasible.
Yes, eventually. Although, currently libclang doesn't really provide an
API for the preprocessor, so that needs to be added.
--
/Jacob Carlborg
On Friday, 16 May 2014 at 11:42:35 UTC, Kagamin wrote:
For example, windows headers do use C++ -references in
function signatures and msdn provides code examples using that
convention, the equivalent in D is ref.
But that's extern(C++), not extern(C)...
Artur Skawina:
Ugh. So how does it perform wrt the D version that I wrote for
you last time? [1]
I have done a benchmark with the various version (the first 3 are
the ones on the Rosettacode site, and the #4 is yours):
lzw1: 0.39
lzw2: 0.17
lzw3: 0.21
lzw4: 0.17
I think your comment was
On Friday, 16 May 2014 at 14:52:17 UTC, Marc Schütz wrote:
On Friday, 16 May 2014 at 11:42:35 UTC, Kagamin wrote:
For example, windows headers do use C++ -references in
function signatures and msdn provides code examples using that
convention, the equivalent in D is ref.
But that's
On 05/16/2014 08:15 AM, Andrew Brown wrote:
I guess my confusion came about because in the page about interfacing
with C, there's a static array example where parameters are given in
terms D understands:
extern (C)
{
void foo(ref int[3] a); // D prototype
}
I guess D has no problem
I guess my confusion came about because in the page about
interfacing with C, there's a static array example where
parameters are given in terms D understands:
extern (C)
{
void foo(ref int[3] a); // D prototype
}
I guess D has no problem translating that into a simple pointer
that C can
On 05/16/2014 08:24 AM, Ali Çehreli wrote:
On 05/16/2014 08:15 AM, Andrew Brown wrote:
void foo(ref int[3] a); // D prototype
Since we know that references are implemented as pointers, 'ref int[3]
a' is passed as a.ptr.
Sorry, that's confusing. Yes, it ends up being equal to a.ptr
On Friday, 16 May 2014 at 15:20:04 UTC, bearophile wrote:
Artur Skawina:
Ugh. So how does it perform wrt the D version that I wrote for
you last time? [1]
I have done a benchmark with the various version (the first 3
are the ones on the Rosettacode site, and the #4 is yours):
lzw1: 0.39
On Thu, 15 May 2014 08:04:59 -0300
Ary Borenszweig via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Isn't there a way in D to just expand:
enforce(cond, failure);
(or something with a similar syntax) to this, at compile-time:
if(!cond) throw new Exception(failure);
I
monarch_dodra:
Arguably, your code allocates a lot.
What version (1-2-3) do you mean?
I'll give it a shot (next week).
I think the LZW entries are OK :) So if you want to work on
Rosettacode it's better to write an entry that is missing in D.
Bye,
bearophile
On Fri, 16 May 2014 11:36:44 -0400, Jonathan M Davis via
Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
On Thu, 15 May 2014 08:04:59 -0300
Ary Borenszweig via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Isn't there a way in D to just expand:
enforce(cond,
On Friday, 16 May 2014 at 07:37:33 UTC, Mengu wrote:
On Friday, 16 May 2014 at 04:58:47 UTC, Jack wrote:
std.net.curl.CurlException@std\net\curl.d(3592): problem with
the SSL CA cert (path? access rights?) on handle 22D3D68
And since I am only using the program by myself for personal
On 05/16/14 17:20, bearophile via Digitalmars-d-learn wrote:
Artur Skawina:
Ugh. So how does it perform wrt the D version that I wrote for
you last time? [1]
I have done a benchmark with the various version (the first 3 are the ones on
the Rosettacode site, and the #4 is yours):
lzw1:
On Friday, 16 May 2014 at 15:49:10 UTC, bearophile wrote:
monarch_dodra:
Arguably, your code allocates a lot.
What version (1-2-3) do you mean?
Any of the versions where you can see [c] or [b] where c/b is
a char/byte
On Thursday, 15 May 2014 at 22:25:47 UTC, Tom Browder via
Digitalmars-d-learn wrote:
I am a volunteer developer with the well-known 3D CAD FOSS
project BRL-CAD:
http://brlcad.org
I have wanted to use D for a long time but I hadn't taken the
plunge.
Yesterday I advertised to the BRL-CAD
On Friday, 16 May 2014 at 10:10:17 UTC, Tom Browder via
Digitalmars-d-learn wrote:
Thanks for the suggestion, Frank, but I don't do windows.
Monodevelop (open source C# dev platform) has a plugin for D by
Alexander Bothe called Mono-D which is absolutely fantastic and
integrates okay with dub
On Fri, May 16, 2014 at 1:19 PM, Alex Herrmann via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
On Friday, 16 May 2014 at 10:10:17 UTC, Tom Browder via
...
Thanks for the suggestion, Frank, but I don't do windows.
...
Monodevelop (open source C# dev platform) has a plugin for D
On Fri, May 16, 2014 at 1:05 PM, Gary Willoughby via
Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
On Thursday, 15 May 2014 at 22:25:47 UTC, Tom Browder via
..
What I have not seen yet is the exact way to build a D program which
uses D bindings and its matching C library. I have
On Fri, May 16, 2014 at 1:05 PM, Gary Willoughby via
Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
...
Then take a look at one of my projects in which i've ported C headers to D.
https://github.com/nomad-software/tcltk
I notice your binding source files have a .d suffix. Is
On Friday, 16 May 2014 at 19:05:25 UTC, Tom Browder via
Digitalmars-d-learn wrote:
On Fri, May 16, 2014 at 1:05 PM, Gary Willoughby via
Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
...
Then take a look at one of my projects in which i've ported C
headers to D.
On Fri, May 16, 2014 at 2:31 PM, Gary Willoughby via
Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
On Friday, 16 May 2014 at 19:17:05 UTC, Dicebot wrote:
Using .di is more idiomatic as those are supposed to denote
declaration-only interface files (with no implementation). In
trying to follow:
http://ddili.org/ders/d.en/class.html
//--- OSX 10.9 DMD 2.065
module test;
class Foo {
int num;
this(int num) {
this.num = num;
}
Foo dup() const {
return new Foo(this.num);
}
immutable(Foo) idup() const {
return new
On Fri, 16 May 2014 16:28:41 -0400, Joshua Niehus jm.nie...@gmail.com
wrote:
trying to follow:
http://ddili.org/ders/d.en/class.html
//--- OSX 10.9 DMD 2.065
module test;
class Foo {
int num;
this(int num) {
this.num = num;
}
Foo dup() const {
On Fri, 16 May 2014 16:36:36 -0400, Ali Çehreli acehr...@yahoo.com wrote:
Beat you by 8 seconds :)
-Steve
On 05/16/2014 01:28 PM, Joshua Niehus wrote:
trying to follow:
http://ddili.org/ders/d.en/class.html
//--- OSX 10.9 DMD 2.065
module test;
class Foo {
int num;
this(int num) {
this.num = num;
}
Foo dup() const {
return new Foo(this.num);
On 05/16/2014 01:37 PM, Steven Schveighoffer wrote:
On Fri, 16 May 2014 16:36:36 -0400, Ali Çehreli acehr...@yahoo.com wrote:
Beat you by 8 seconds :)
-Steve
I am happy to be within one minute. :)
Ali
On Friday, 16 May 2014 at 20:36:37 UTC, Ali Çehreli wrote:
My apologies. The code was written for an older version of dmd.
The simplest fix is to define the constructor as pure:
pure this(int num) {
this.num = num;
}
Ali
Ahh great thanks guys.
No worries Ali, great
Hello D programmers,
I am toying with writing my own HTML parser as a pet project, and
I strive to have a range API for the tokenizer and the parser
output itself.
However it occurs to me that in real-life browsers the advantage
of this type of 'streaming' parsing would be given by also
On Fri, 16 May 2014 16:57:41 -0400, Vlad b100d...@gmail.com wrote:
Hello D programmers,
I am toying with writing my own HTML parser as a pet project, and I
strive to have a range API for the tokenizer and the parser output
itself.
However it occurs to me that in real-life browsers the
On Friday, 16 May 2014 at 21:35:04 UTC, Steven Schveighoffer
wrote:
On Fri, 16 May 2014 16:57:41 -0400, Vlad b100d...@gmail.com
wrote:
Q: Is anything like this already in use somewhere in the
standard library or a project you know?
There is an effort by myself and Dmitry Olshansky to
On Friday, 16 May 2014 at 14:13:28 UTC, Steven Schveighoffer
wrote:
On Fri, 16 May 2014 02:31:18 -0400, Jacob Carlborg
d...@me.com wrote:
On 16/05/14 06:59, Taylor Hillegeist wrote:
The subject says it all really. i have this example:
import core.memory;
class fruit{
int value=5;
On Friday, 16 May 2014 at 20:28:31 UTC, Tom Browder via
Digitalmars-d-learn wrote:
On Fri, May 16, 2014 at 2:31 PM, Gary Willoughby via
Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
On Friday, 16 May 2014 at 19:17:05 UTC, Dicebot wrote:
Using .di is more idiomatic as those are
Hello,
I was playing around with indexOf when I noticed that the
parameter CaseSensitive seems to have a weird behavior.
Let's say the following code:
string str = Les chemises sont sèches;
write(std.string.indexOf(str, Les)); // Returns 0, as expected
write(std.string.indexOf(str, les,
On 05/16/2014 04:52 PM, Alexandre L. wrote:
Hello,
I was playing around with indexOf when I noticed that the parameter
CaseSensitive seems to have a weird behavior.
Let's say the following code:
string str = Les chemises sont sèches;
write(std.string.indexOf(str, Les)); // Returns 0, as
On Saturday, 17 May 2014 at 00:31:14 UTC, Ali Çehreli wrote:
On 05/16/2014 04:52 PM, Alexandre L. wrote:
Hello,
I was playing around with indexOf when I noticed that the
parameter
CaseSensitive seems to have a weird behavior.
Let's say the following code:
string str = Les chemises sont
I'll try to fetch git head and get everything working.
Alexandre L.
Nevermind that.
For some reasons, the bug was happening when my main.d file
looked like this:
import std.stdio;
//import std.string; // will work when imported
int main()
{
string str = Les chemises;
// doesnt work
On 05/16/2014 05:55 PM, Alexandre L. wrote:
I'll try to fetch git head and get everything working.
Alexandre L.
Nevermind that.
For some reasons, the bug was happening when my main.d file looked like
this:
import std.stdio;
//import std.string; // will work when imported
int main()
On Saturday, 17 May 2014 at 01:08:47 UTC, Ali Çehreli wrote:
On 05/16/2014 05:55 PM, Alexandre L. wrote:
I'll try to fetch git head and get everything working.
Alexandre L.
Nevermind that.
For some reasons, the bug was happening when my main.d file
looked like
this:
import std.stdio;
On Fri, 16 May 2014 18:36:02 -0400, Vlad b100d...@gmail.com wrote:
On Friday, 16 May 2014 at 21:35:04 UTC, Steven Schveighoffer wrote:
On Fri, 16 May 2014 16:57:41 -0400, Vlad b100d...@gmail.com wrote:
Q: Is anything like this already in use somewhere in the standard
library or a project
57 matches
Mail list logo