On Thursday, 22 September 2016 at 23:19:27 UTC, Joseph Rushton
Wakeling wrote:
The segfault would suggest to me that either the loading of the
library fails or that there's some resource phobos expects to
find which it can't access. Can anyone advise what could be
going on here?
-- Joe
Hello all,
As some have you may have followed, I've been working on
snap-packaging LDC. However, I've run into an issue when it
comes to programs that use std.net.curl.
Here's a simple example:
void main ()
{
import std.net.curl : get;
auto website = "http:/
On Thursday, September 22, 2016 21:41:38 Lodovico Giaretta via Digitalmars-d-
learn wrote:
> On Thursday, 22 September 2016 at 20:35:13 UTC, e-y-e wrote:
> > 2. Why is openRight not a Flag type?
>
> It may be that until is quite old, predating the extensive usage
> of Flag, and maybe also the exten
On Thursday, 22 September 2016 at 21:41:38 UTC, Lodovico Giaretta
wrote:
2. Why is openRight not a Flag type?
It may be that until is quite old, predating the extensive
usage of Flag, and maybe also the extensive use of compile-time
flags.
Ok, I suspected this might be the case. I might wor
On Thursday, 22 September 2016 at 20:35:13 UTC, e-y-e wrote:
[...]
Disclaimer: my answers are just early guesses.
1. Why is openRight a runtime flag? Is there really a use case
for this?
Runtime evaluation is more flexible. The reason to have
compile-time evaluation is to allowed aggressiv
The function in question is std.algorithm.searching's until [1].
Here are the definitions:
Until!(pred, Range, Sentinel)
until(alias pred = "a == b", Range, Sentinel)
(Range range, Sentinel sentinel, OpenRight openRight =
OpenRight.yes)
if (!is(Sentinel == OpenRight));
and:
Until!(pred, R
On Thursday, 22 September 2016 at 13:30:28 UTC, ZombineDev wrote:
ndslice (i.e. Slice(size_t N, Range) ) is a generalization of
D's built-in slices (i.e. T[]) to N dimensions. Just like them,
...
Please note that the support for creating ndslices via custom
memory allocators (i.e. makeSlice) wa
On Thursday, 22 September 2016 at 19:51:31 UTC, Nordlöw wrote:
A known bug?
Yeah, it shows the line before instead of the line of. But it
still shows basically where you are.
On Thursday, 22 September 2016 at 20:09:41 UTC, Steven
Schveighoffer wrote:
Before package.d support, you could not do any importing of
packages. You could only import modules. package.d was how the
compiler allowed importing packages.
I don't know that there is a fundamental difference betw
On 9/22/16 10:29 AM, Jonathan Marler wrote:
If the package.d file didn't exist, then I don't think there would be
any problem with hierarchical modules. Is this the right conclusion?
Was package.d a mistake? Maybe the reasoning is that D doesn't really
like hierarchical modules, so creating th
Hi,
Interesting question, so I took your examples and made them do
the same thing with regards to allocation (using malloc instead
of new in both languages).
I removed the stopwatch to use "time" instead.
Now the programs should do the very same thing. Will they be as
fast too?
D code:
--
p.s. that is the reason it is not turned on by default, btw.
On Thursday, 22 September 2016 at 19:51:31 UTC, Nordlöw wrote:
A known bug?
prolly. segfault handler is highly non-standard hack, it may miss
exact position or something. as is "it is not guaranteed to work,
and if it will work, it is not guaranteed to work correctly".
On Thursday, 22 September 2016 at 00:46:19 UTC, ketmar wrote:
{ import etc.linux.memoryerror; registerMemoryErrorHandler(); }
Thx! That at least triggered an exception. However the line
number for the innermost function is wrong. For instance
1 void boom()
2 {
3 int* y = null;
4
On Thursday, 22 September 2016 at 16:09:49 UTC, Sandu wrote:
It is often being claimed that D is at least as fast as C++.
Now, I am fairly new to D. But, here is an example where I want
to see how can this be made possible.
So far my C++ code compiles in ~850 ms.
While my D code runs in about
On Thursday, 22 September 2016 at 16:09:49 UTC, Sandu wrote:
const int n = 252;
double[] call = new double[n+1];
...
//delete call; // since D is has a garbage collector,
explicit deallocation of arrays is not necessary.
If you care about speed, better unco
On Thu, Sep 22, 2016 at 04:09:49PM +, Sandu via Digitalmars-d-learn wrote:
> It is often being claimed that D is at least as fast as C++.
> Now, I am fairly new to D. But, here is an example where I want to see
> how can this be made possible.
>
> So far my C++ code compiles in ~850 ms.
> Whil
On Thursday, 22 September 2016 at 16:09:49 UTC, Sandu wrote:
It is often being claimed that D is at least as fast as C++.
Now, I am fairly new to D. But, here is an example where I want
to see how can this be made possible.
So far my C++ code compiles in ~850 ms.
While my D code runs in about
On Thursday, 22 September 2016 at 16:09:49 UTC, Sandu wrote:
It is often being claimed that D is at least as fast as C++.
Now, I am fairly new to D. But, here is an example where I want
to see how can this be made possible.
So far my C++ code compiles in ~850 ms.
I assume you meant that it r
On Thursday, 22 September 2016 at 16:09:23 UTC, Antonio Corbi
wrote:
On Thursday, 22 September 2016 at 07:50:07 UTC, Antonio Corbi
wrote:
Ok, took the time to translate it to D and created a github
repo to clone. You can download and try it from:
https://github.com/antoniocorbibellot/dsshot
H
It is often being claimed that D is at least as fast as C++.
Now, I am fairly new to D. But, here is an example where I want
to see how can this be made possible.
So far my C++ code compiles in ~850 ms.
While my D code runs in about 2.1 seconds.
The code translated in D looks as follows (can't
On Thursday, 22 September 2016 at 07:50:07 UTC, Antonio Corbi
wrote:
On Thursday, 22 September 2016 at 02:21:16 UTC, Konstantin
Kutsevalov wrote:
On Wednesday, 21 September 2016 at 16:36:32 UTC, Adam D. Ruppe
wrote:
[...]
Hmm, that's good idea as fast solution. Thank you Adam.
Hi Konstantin
Just to point 3. I hope I can give a hint, the problem is, that
the match is not the * but /images/*, so
router.get("/images/*", serveStaticFiles("images/"))
will look in PROJECTHOME/images/images/ for the file.
For my .css files located in
PROJECTHOME/public/styles/
I used:
router.get("/style
On Thursday, 22 September 2016 at 15:02:01 UTC, Lodovico Giaretta
wrote:
I think that having package.d provides a better layout. Look at
the difference between this:
ls std/experimental
drw-rw-rw- allocator
drw-rw-rw- logger
drw-rw-rw- ndslice
-rw-rw-rw- typecons.d
and this:
ls std/exper
On Thursday, 22 September 2016 at 14:29:20 UTC, Jonathan Marler
wrote:
Actually, the more I think about it, I'm not sure there's a
good reason for the "package.d" semantics to exist. I guess it
establishes a pattern when people would like to combine smaller
modules into one public module, but
On Thursday, 22 September 2016 at 10:44:29 UTC, llaine wrote:
On Wednesday, 21 September 2016 at 21:32:02 UTC, Rene
Zwanenburg wrote:
On Wednesday, 21 September 2016 at 20:22:42 UTC, llaine wrote:
Yes, but it may take some time. For large projects, running it
on a server is advisable. 3K LOC s
On Thursday, 22 September 2016 at 11:40:17 UTC, Steven
Schveighoffer wrote:
This should be fine. x/package.d is equivalent to module x.
Ok, it looks like no-one thought what I was doing was off-base. I
guess this brings up another question. Why doesn't the compiler
support modules in a hiera
On Thursday, 22 September 2016 at 13:30:28 UTC, ZombineDev wrote:
On Thursday, 22 September 2016 at 12:38:57 UTC, Nordlöw wrote:
[...]
ndslice (i.e. Slice(size_t N, Range) ) is a generalization of
D's built-in slices (i.e. T[]) to N dimensions. Just like them,
it doesn't handle memory owners
On Thursday, 22 September 2016 at 12:38:57 UTC, Nordlöw wrote:
Is ndslice' Slice() prepared for integration with containers
with reference counting semantics?
I wonder because according to the docs they internally store a
pointer and an offset. What is that pointer supposed to point
to except
On 9/21/16 8:49 AM, Nordlöw wrote:
Is there any way to make a default constructor of a struct container
allocate/initialize an internal pointer?
I need this in a container with RC behaviour similar to
struct Container
{
this()// this is currently forbidden:
{
_rcStore = empl
On Monday, 19 September 2016 at 18:13:12 UTC, Chris wrote:
On Monday, 19 September 2016 at 17:54:05 UTC, Steven
Schveighoffer wrote:
On 9/19/16 1:34 PM, Chris wrote:
[...]
Here is the culprit:
https://github.com/rejectedsoftware/vibe.d/blob/0.7.29/source/vibe/http/server.d#L1861
And the def
Is ndslice' Slice() prepared for integration with containers with
reference counting semantics?
I wonder because according to the docs they internally store a
pointer and an offset. What is that pointer supposed to point to
except from obviously currently a GC-allocated array?
See:
https://
On 9/21/16 10:17 AM, Jonathan Marler wrote:
I'm working on a code generation tool and wanted to make sure my module
approach was correct. The generated code has a module hierarchy, where
modules can appear at any level of the hierarchy.
module foo;
module foo.bar;
In this case, module foo and
On Wednesday, 21 September 2016 at 21:32:02 UTC, Rene Zwanenburg
wrote:
On Wednesday, 21 September 2016 at 20:22:42 UTC, llaine wrote:
Yes, but it may take some time. For large projects, running it
on a server is advisable. 3K LOC should be doable on a desktop
machine.
Dub has built-in suppo
On Thursday, 22 September 2016 at 01:38:12 UTC, Gestalt Theory
wrote:
1. I get this error when trying to run a project in VS. dub
doesn't give the error.
First-chance exception: core.exception.AssertError free()
called with null array. at
vibe-d-0.7.26\source\vibe\utils\memory.d(110)
It con
On Thursday, 22 September 2016 at 02:21:16 UTC, Konstantin
Kutsevalov wrote:
On Wednesday, 21 September 2016 at 16:36:32 UTC, Adam D. Ruppe
wrote:
On Wednesday, 21 September 2016 at 16:33:58 UTC, Konstantin
Kutsevalov wrote:
do anybody know how to get screenshot (for now in Linux
only)? May be
36 matches
Mail list logo