On Thursday, 10 December 2015 at 14:57:33 UTC, Jack Stouffer
wrote:
To add to this, as long as you're on anything but OS X, you're
fine. Debugging D on OS X is, to put it plainly, fucked.
I have some good thing coming out of lldb. Far from perfect, but
usable.
On 12/10/2015 09:24 AM, jmh530 wrote:
> On Thursday, 10 December 2015 at 17:16:43 UTC, Gary Willoughby wrote:
>>
>> Some reading:
>>
>> https://dlang.org/spec/interfaceToC.html
>> http://wiki.dlang.org/D_binding_for_C
>
> I can't recall if Ali's book has a section on this, but I'm not a fan of
>
On Thursday, 10 December 2015 at 16:37:16 UTC, Chris Wright wrote:
From what you're saying about Go, it sounds like someone
implemented the C calling convention at runtime.
Go has a more advanced, memory efficient and secure runtime than
D fibers. So when calling C Go has to do extra work.
On Thursday, 10 December 2015 at 13:33:07 UTC, Pradeep Gowda
wrote:
I read this post about the difficulties of using go/cgo to
interface with C code:
http://www.cockroachlabs.com/blog/the-cost-and-complexity-of-cgo/
How does D do in comparison? specifically in regards to:
1. Call overhead
On Thursday, 10 December 2015 at 12:12:28 UTC, Jacob Carlborg
wrote:
On 2015-12-10 11:52, Russel Winder via Digitalmars-d wrote:
But D is a fully compiled language with an AOT compiler. How
does a JIT
fit into the workflow?
REPL, data/config format, perhaps vibe.d diet templates.
Like how
On Thursday, 10 December 2015 at 05:20:26 UTC, Joakim wrote:
I don't see why others are so concerned about it. A better use
of their time would be to chip in themselves, on documentation
or whatever else they're capable of contributing.
I think the primary concern is "what is the plan?".
Yes, exactly. Some people even use static if it is not needed because it is
harmless. And remove it only when enclosing context is demand.
Dne 9. 12. 2015 22:40 napsal uživatel "Jon D via Digitalmars-d-learn" <
digitalmars-d-learn@puremagic.com>:
> On Wednesday, 9 December 2015 at 21:23:03 UTC,
Usually the DMD compiler errors are very helpful, but I guess
nothing can be perfect. In this case, I have a class I'm trying
to declare. The class is intended to be a transport and storage
medium, to allow information to be passed and updated
asynchronously between two threads. One of the
https://issues.dlang.org/show_bug.cgi?id=15420
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=15420
--- Comment #2 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos
https://github.com/D-Programming-Language/phobos/commit/66e01c324cd93b7775c1dc912e1618f8b957c894
Merge pull request
On Thursday, 10 December 2015 at 13:33:07 UTC, Pradeep Gowda
wrote:
I read this post about the difficulties of using go/cgo to
interface with C code:
http://www.cockroachlabs.com/blog/the-cost-and-complexity-of-cgo/
How does D do in comparison? specifically in regards to:
1. Call overhead
On Monday, 7 December 2015 at 16:15:46 UTC, Andrei Alexandrescu
wrote:
On 12/07/2015 09:43 AM, Timon Gehr wrote:
1-2) BigO("1")
3) BigO("count")
4) BigO("distance(first,last)")
5) BigO("ilist.size()")
There's also this:
On 12/06/2015 12:55 AM, Andrei Alexandrescu wrote:
Well you'd need
Here is an implementation of MurmurHash [1] for D.
http://dpaste.dzfl.pl/1b94ed0aa96e
I'll do a proper pull request later on for addition to std.digest
if the community feels like it's a valuable addition.
Guillaume
--
1 - https://en.wikipedia.org/wiki/MurmurHash
On Thursday, 10 December 2015 at 19:46:44 UTC, Ali Çehreli wrote:
However, Mike Parker's book "Learning D" has more than 50 pages
on "Connecting D with C":
Well now I need to buy that!
Hello all! I happened by this thread (from Hacker News) and the
idea of this data structure got stuck in my head. I did some
scribbling on paper and decided that it could be interesting to
code...
On Thursday, 3 December 2015 at 22:44:26 UTC, Andrei Alexandrescu
wrote:
At this point I need
On Thu, 10 Dec 2015 20:17:57 +, Ola Fosheim Grøstad wrote:
> But the D fiber stacks aren't managed/safe, so in D the programmer is
> responsible for allocating a stack that is large enough. And that is
> neither safe or scalable.
Try it out!
---
import core.thread;
import std.stdio;
void
On Thursday, 10 December 2015 at 22:25:21 UTC, Guillaume Chatelet
wrote:
Here is an implementation of MurmurHash [1] for D.
http://dpaste.dzfl.pl/1b94ed0aa96e
I'll do a proper pull request later on for addition to
std.digest if the community feels like it's a valuable addition.
Guillaume
--
On 12/10/2015 02:07 PM, Entity325 wrote:
> Both threads need to be able to run asynchronously themselves, so message
> passing using std.concurrency isn't an option.
I can still imagine a case where the receiver checks the message queue
with a timeout of 0, which is non-blocking.
> My
On Thu, 2015-12-10 at 11:16 +, Ola Fosheim Grøstad via Digitalmars-
d wrote:
> On Thursday, 10 December 2015 at 10:51:00 UTC, Russel Winder
> wrote:
> > Julia doesn'have that great a penetration in the market
> > compared to Python, R, C++ and Fortran.
>
> Sure, in day-to-day work people
On Thursday, 10 December 2015 at 10:51:00 UTC, Russel Winder
wrote:
Julia doesn'have that great a penetration in the market
compared to Python, R, C++ and Fortran.
Sure, in day-to-day work people use what they have until they
need to start over. How is the landscape going to unfold? What
On Thursday, 10 December 2015 at 11:36:20 UTC, Suliman wrote:
Vibed have method get for user session
http://vibed.org/api/vibe.http.session/SessionStore
I set user name for session like this:
req.session.set("username", "admin");
But I can't understand how to get user name from it:
abstract
https://issues.dlang.org/show_bug.cgi?id=6907
yebblies changed:
What|Removed |Added
Keywords||ice
CC|
Vibed have method get for user session
http://vibed.org/api/vibe.http.session/SessionStore
I set user name for session like this:
req.session.set("username", "admin");
But I can't understand how to get user name from it:
abstract std.variant.VariantN!(20) get(
string id,
string name,
On Thu, 2015-12-10 at 03:02 +, Jonny via Digitalmars-d wrote:
>
[…]
> It would be nice to have a D JIT that is fast as others and can
> be easily used in a D app and interface with it's host without
> too much work.
[…]
But D is a fully compiled language with an AOT compiler. How does a
On Thu, 2015-12-10 at 02:22 +, Ola Fosheim Grøstad via Digitalmars-
d wrote:
>
[…]
> The science people seem to rally behind Julia JIT, and a JIT and
> mindshare is important in that field.
>
[…]
Julia doesn'have that great a penetration in the market compared to
Python, R, C++ and
On 2015-12-10 11:52, Russel Winder via Digitalmars-d wrote:
But D is a fully compiled language with an AOT compiler. How does a JIT
fit into the workflow?
REPL, data/config format, perhaps vibe.d diet templates.
--
/Jacob Carlborg
On Thu, 2015-12-10 at 13:12 +0100, Jacob Carlborg via Digitalmars-d
wrote:
> On 2015-12-10 11:52, Russel Winder via Digitalmars-d wrote:
>
> > But D is a fully compiled language with an AOT compiler. How does a
> > JIT
> > fit into the workflow?
>
> REPL, data/config format, perhaps vibe.d diet
On Thursday, 10 December 2015 at 17:16:43 UTC, Gary Willoughby
wrote:
Some reading:
https://dlang.org/spec/interfaceToC.html
http://wiki.dlang.org/D_binding_for_C
I can't recall if Ali's book has a section on this, but I'm not a
fan of those links.
On Thursday, 10 December 2015 at 14:46:26 UTC, Basile B. wrote:
On Thursday, 10 December 2015 at 14:24:43 UTC, Shriramana
Sharma wrote:
Hello. I'm using DMD 2.069.2. As per
http://ddili.org/ders/d.en/enum.html the following code is
supposed to output the *names* of the suits:
import
On Thursday, 10 December 2015 at 23:25:42 UTC, Chris Wright wrote:
This doesn't work well for 32-bit processes because, while it
doesn't demand memory up front, it does demand address space.
But lazily demanding pages from the OS doesn't help. You still
have to divide the address space among
On Thursday, 10 December 2015 at 22:25:21 UTC, Guillaume Chatelet
wrote:
Here is an implementation of MurmurHash [1] for D.
http://dpaste.dzfl.pl/1b94ed0aa96e
I'll do a proper pull request later on for addition to
std.digest if the community feels like it's a valuable addition.
Guillaume
--
On Friday, 11 December 2015 at 01:43:12 UTC, deadalnix wrote:
I mean, yes, if you run tens of thousand of fibers maybe you'll
experience that, but that doesn't sound like a very smart plan
to boot.
If you cannot spin up fibers in the thousands, then it is very
limited. If you cannot have
Say I have a project with the files structured like this.
package-name/
src/
package-name/
lib.d
test/
testlib.d
How do I make it so that I can import and use the contents of
lib.d inside of testlib.d.
As you can tell I'm very new to D, and kind of new to
On Thursday, 10 December 2015 at 22:25:21 UTC, Guillaume Chatelet
wrote:
Here is an implementation of MurmurHash [1] for D.
http://dpaste.dzfl.pl/1b94ed0aa96e
I'll do a proper pull request later on for addition to
std.digest if the community feels like it's a valuable addition.
Guillaume
--
On Friday, 11 December 2015 at 04:09:19 UTC, Chris Wright wrote:
On Fri, 11 Dec 2015 03:20:29 +, J Smith wrote:
How do I make it so that I can import and use the contents of
lib.d inside of testlib.d.
If you are not compiling everything in one step, the -I flag
allows you to specify
On Friday, 11 December 2015 at 01:25:24 UTC, Ola Fosheim Gr wrote:
On Thursday, 10 December 2015 at 23:25:42 UTC, Chris Wright
wrote:
This doesn't work well for 32-bit processes because, while it
doesn't demand memory up front, it does demand address space.
But lazily demanding pages from the
On Friday, 11 December 2015 at 03:20:29 UTC, J Smith wrote:
Say I have a project with the files structured like this.
package-name/
src/
package-name/
lib.d
test/
testlib.d
How do I make it so that I can import and use the contents of
lib.d inside of
Many thanks to Jason Causey and Jakob Ovrum for their work on heaps and
Randomized Slide to Front.
Here's a quick thought on growth schedule for arrays. The classic
approach is to grow by a geometric schedule. For example: 1, 2, 4, 8,
16, etc. That way, n memory moves are necessary for
On Fri, 11 Dec 2015 03:20:29 +, J Smith wrote:
> How do I make it so that I can import and use the contents of lib.d
> inside of testlib.d.
If you are not compiling everything in one step, the -I flag allows you
to specify paths to look for imports. For instance:
$ dmd -lib
On Thursday, 10 December 2015 at 12:30:51 UTC, Suliman wrote:
On Thursday, 10 December 2015 at 12:21:40 UTC, Adrian Matoga
wrote:
On Thursday, 10 December 2015 at 11:36:20 UTC, Suliman wrote:
Vibed have method get for user session
http://vibed.org/api/vibe.http.session/SessionStore
I set
On Thursday, 10 December 2015 at 12:28:16 UTC, Russel Winder
wrote:
Julia clearly has a strong and (relatively slowly) growing
community. It will require the "killer app" effect to change it
from being a fairly niche language given the state of the R,
Python, C++, Fortran establishment.
Yes,
I read this post about the difficulties of using go/cgo to
interface with C code:
http://www.cockroachlabs.com/blog/the-cost-and-complexity-of-cgo/
How does D do in comparison? specifically in regards to:
1. Call overhead (CGo is 100 times slower than native Go fn call)
2. Memory management.
On Thursday, 10 December 2015 at 13:23:29 UTC, Suliman wrote:
But question about why I need to get session info like:
writeln("USER Session: ", req.session.get!string("username"));
is still actual.
When you have a template that looks like this:
V get(V, K)(K key) {...}
The compiler is
C++17 and C++20 are very likely to undermine any move by C++
folk to Rust or D I suspect.
So I hope Walter and Andrew will do steps like including vibed in
DMD distributive and will focus on Web-assembly. I am not sure
that strategy of better integration with C++ is help to get more
people
On Thursday, 10 December 2015 at 13:33:07 UTC, Pradeep Gowda
wrote:
I read this post about the difficulties of using go/cgo to
interface with C code:
http://www.cockroachlabs.com/blog/the-cost-and-complexity-of-cgo/
How does D do in comparison? specifically in regards to:
1. Call overhead
On Thursday, 10 December 2015 at 13:34:02 UTC, Mike Parker wrote:
On Thursday, 10 December 2015 at 13:23:29 UTC, Suliman wrote:
But question about why I need to get session info like:
writeln("USER Session: ", req.session.get!string("username"));
is still actual.
When you have a template
On Thursday, 10 December 2015 at 12:21:40 UTC, Adrian Matoga
wrote:
On Thursday, 10 December 2015 at 11:36:20 UTC, Suliman wrote:
Vibed have method get for user session
http://vibed.org/api/vibe.http.session/SessionStore
I set user name for session like this:
req.session.set("username",
On Thursday, 10 December 2015 at 13:31:00 UTC, Suliman wrote:
So I hope Walter and Andrew will do steps like including vibed
in DMD distributive and will focus on Web-assembly. I am not
sure that strategy of better integration with C++ is help to
get more people interesting in D.
I think it
On Thursday, 10 December 2015 at 13:43:58 UTC, Suliman wrote:
On Thursday, 10 December 2015 at 13:34:02 UTC, Mike Parker
wrote:
On Thursday, 10 December 2015 at 13:23:29 UTC, Suliman wrote:
But question about why I need to get session info like:
writeln("USER Session: ",
Oh, my issue. Right variant of setting session is:
if(dbuser == "admin") // admin name hardcoded
{
_auth.isAuthorizated = true;
req.session.set("username", "admin");
}
else
{
req.session.set("username", dbuser); //set current
username in parameter of
On Thursday, 10 December 2015 at 13:52:57 UTC, John Colvin wrote:
On Thursday, 10 December 2015 at 13:33:07 UTC, Pradeep Gowda
wrote:
2. Memory management. (I guess D is not immune from having to
manage memory for the C functions it calls.. but is there a
difference in approach? is it safer
Okay, so what has been shared is that the first step is to get C
to call D, because if I can do that, then I can get Obj C to call
C since there's no direct bridge to D. Obj C has a way to call C.
So, I found this article:
http://www.prowiki.org/wiki4d/wiki.cgi?DcalledFromC
I also found it's
On 2015-12-11 07:01, Mike McKee wrote:
Is there a way to call D code from Objective C on OSX?
You can call Objective-C from D [1]. For the other way around, you
currently need to use the API for the Objective-C runtime [2].
Here's something cool I was thinking about doing:
* I've learned
On Friday, 11 December 2015 at 06:28:09 UTC, Shriramana Sharma
wrote:
Hello. I'm trying to figure out how to use
FloatingPointControl.enableExceptions. Upon enabling
severeExceptions I would expect the division by zero to be
signaled, but neither do I get a SIGFPE nor does ieeeFlags show
the
On 2015-12-10 18:36, jmh530 wrote:
REPL, data/config format, perhaps vibe.d diet templates.
Like how rdmd simplifies using dmd, you would want something that
simplifies things further? Like so that when you run something from
rdmd, it doesn't just compile things and then run, it starts
On 2015-12-11 08:29, Mike McKee wrote:
$ gcc cmain.c dfunc.o -o ctest -L/usr/local/lib -lphobos2 -lpthread -lm
I recommend using the D compiler to compile the final application. Then
you don't need to worry about all these extra flags and paths.
--
/Jacob Carlborg
https://issues.dlang.org/show_bug.cgi?id=15432
Issue ID: 15432
Summary: Win64: bad code offset in debug line number info
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: major
On Thursday, 10 December 2015 at 15:29:46 UTC, Jack Stouffer
wrote:
On Thursday, 10 December 2015 at 15:18:18 UTC, John Colvin
wrote:
On Thursday, 10 December 2015 at 14:57:33 UTC, Jack Stouffer
wrote:
On Thursday, 10 December 2015 at 13:52:57 UTC, John Colvin
wrote:
On Thursday, 10 December
On Thursday, 10 December 2015 at 15:25:16 UTC, Jack Stouffer
wrote:
On Thursday, 10 December 2015 at 13:31:00 UTC, Suliman wrote:
So I hope Walter and Andrew will do steps like including vibed
in DMD distributive
Please no.
Not everything has to be in Phobos; this just puts unnecessary
On Fri, 11 Dec 2015 01:25:24 +, Ola Fosheim Gr wrote:
> it does not work for 64 bit either. You will:
>
> 1. Kill caches and TLB
Which only affects efficiency, not correctness. And that's only for
people who want to use as much as a gigabyte of stack space for every
fiber.
Since the TLB
On 11/12/15 7:01 PM, Mike McKee wrote:
Is there a way to call D code from Objective C on OSX?
Here's something cool I was thinking about doing:
* I've learned how to make Cocoa UI Objective C apps on OSX.
* I've learned how to load the native OSX webkit widget in a Cocoa app.
It provides a
Hello. I'm trying to figure out how to use
FloatingPointControl.enableExceptions. Upon enabling severeExceptions I
would expect the division by zero to be signaled, but neither do I get a
SIGFPE nor does ieeeFlags show the exception having been signaled. What am I
doing wrong?
import
On 12/10/15 10:55 PM, Andrei Alexandrescu wrote:
So the growth schedule is exponential of the LogIntegral(n). Let's write
it as:
f(n) = 2^^li(n)
I was wrong here, that's the number of total moves. The growth schedule
is proportional to the derivative of that:
f(n) = 2^^li(n)/log(n)
https://en.wikipedia.org/wiki/IEEE_floating_point#Roundings_to_nearest says
that IEEE 754 provides two options for rounding to nearest: ties to even and
ties away from zero.
However, under
https://github.com/D-Programming-Language/phobos/blob/master/std/math.d#L4539
we have only one
On Fri, 11 Dec 2015 01:43:12 +, deadalnix wrote:
> Benchmark needed. It not like the stack is randomly accessed, so I don't
> think the TLB argument makes a lot of sense.
The TLB issue is about the pattern of memory access, and that's got a lot
more to do with the user's code than with the
On Tuesday, 8 December 2015 at 15:58:43 UTC, Vadim Lopatin wrote:
Hello,
DlangIDE is getting close to usable.
DlangIDE is and IDE for D programming language written in D
using DlangUI library.
Project page: https://github.com/buggins/dlangide
Recent changes:
Settings for DUB, GDB, DMD,
The enum members of FloatingPointControl are not documented individually at
http://dlang.org/phobos/std_math.html and I would like to submit a PR for
that. In connection with this, a few queries:
I note that there are already a few sparse ddoc comments such as at:
Basile B. wrote:
> You should rather use std.traits.EnumMembers to iterate the
> members of an enum:
Wow this is great! I was thinking that enum.max + 1 is not really befitting
D's elegant approach to programming. Ali should really update that section
of his book to use EnumMembers. This will
Is there a way to call D code from Objective C on OSX?
Here's something cool I was thinking about doing:
* I've learned how to make Cocoa UI Objective C apps on OSX.
* I've learned how to load the native OSX webkit widget in a
Cocoa app. It provides a rich user interface using ordinary HTML,
On Friday, 11 December 2015 at 02:08:27 UTC, Ola Fosheim Gr wrote:
On Friday, 11 December 2015 at 01:43:12 UTC, deadalnix wrote:
I mean, yes, if you run tens of thousand of fibers maybe
you'll experience that, but that doesn't sound like a very
smart plan to boot.
If you cannot spin up
V Thu, 10 Dec 2015 19:54:43 +0530
Shriramana Sharma via Digitalmars-d-learn
napsáno:
> Hello. I'm using DMD 2.069.2. As per
> http://ddili.org/ders/d.en/enum.html the following code is supposed
> to output the *names* of the suits:
>
> import std.stdio;
> void
On Thursday, 10 December 2015 at 14:24:43 UTC, Shriramana Sharma
wrote:
Hello. I'm using DMD 2.069.2. As per
http://ddili.org/ders/d.en/enum.html the following code is
supposed to output the *names* of the suits:
import std.stdio;
void main()
{
enum Suit { spades, hearts, diamonds, clubs
On Thursday, 10 December 2015 at 13:52:57 UTC, John Colvin wrote:
On Thursday, 10 December 2015 at 13:33:07 UTC, Pradeep Gowda
wrote:
5. Debugging (ease of accessing C parts when debugging)
5) Trivial. From the debuggers perspective it's all just
functions, you might not even notice the
Hello. I'm using DMD 2.069.2. As per http://ddili.org/ders/d.en/enum.html
the following code is supposed to output the *names* of the suits:
import std.stdio;
void main()
{
enum Suit { spades, hearts, diamonds, clubs }
foreach (suit; Suit.min .. Suit.max + 1) { writefln("%s", suit); }
}
On Thursday, 10 December 2015 at 13:46:19 UTC, Suliman wrote:
because set return void, and get return T?
No, it has nothing to do with the return type declarations. It's
about whether or not the compiler has enough information to
deduce the types.
V get(V, K)(K key, V defaultVal);
auto
V Thu, 10 Dec 2015 19:54:43 +0530
Shriramana Sharma via Digitalmars-d-learn
napsáno:
> Hello. I'm using DMD 2.069.2. As per
> http://ddili.org/ders/d.en/enum.html the following code is supposed
> to output the *names* of the suits:
>
> import std.stdio;
> void
https://issues.dlang.org/show_bug.cgi?id=6187
Steven Schveighoffer changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=6188
Steven Schveighoffer changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
On Thursday, 10 December 2015 at 14:57:33 UTC, Jack Stouffer
wrote:
On Thursday, 10 December 2015 at 13:52:57 UTC, John Colvin
wrote:
On Thursday, 10 December 2015 at 13:33:07 UTC, Pradeep Gowda
wrote:
5. Debugging (ease of accessing C parts when debugging)
5) Trivial. From the debuggers
On Thursday, 10 December 2015 at 12:24:23 UTC, Russel Winder
wrote:
On Thu, 2015-12-10 at 13:12 +0100, Jacob Carlborg via
Digitalmars-d wrote:
On 2015-12-10 11:52, Russel Winder via Digitalmars-d wrote:
> But D is a fully compiled language with an AOT compiler. How
> does a
> JIT
> fit into
On Thursday, 10 December 2015 at 13:31:00 UTC, Suliman wrote:
C++17 and C++20 are very likely to undermine any move by C++
folk to Rust or D I suspect.
So I hope Walter and Andrew will do steps like including vibed
in DMD distributive and will focus on Web-assembly. I am not
sure that
On Thursday, 10 December 2015 at 13:31:00 UTC, Suliman wrote:
So I hope Walter and Andrew will do steps like including vibed
in DMD distributive
Please no.
Not everything has to be in Phobos; this just puts unnecessary
pressure on Phobos maintainers to work on vibe.d as well, and it
will
On Thursday, 10 December 2015 at 15:18:18 UTC, John Colvin wrote:
On Thursday, 10 December 2015 at 14:57:33 UTC, Jack Stouffer
wrote:
On Thursday, 10 December 2015 at 13:52:57 UTC, John Colvin
wrote:
On Thursday, 10 December 2015 at 13:33:07 UTC, Pradeep Gowda
wrote:
5. Debugging (ease of
On Thu, 10 Dec 2015 13:33:07 +, Pradeep Gowda wrote:
> I read this post about the difficulties of using go/cgo to interface
> with C code:
> http://www.cockroachlabs.com/blog/the-cost-and-complexity-of-cgo/
>
> How does D do in comparison? specifically in regards to:
>
> 1. Call overhead
84 matches
Mail list logo