On Friday, June 01, 2018 21:26:18 rjframe via Digitalmars-d-learn wrote:
> Hi
>
> I'm making an API for a web service, and have a small collection of
> endpoints where I'd basically be creating copy+paste functions (a small
> enough number that this isn't really that important for this project). I
I started to work with Travis-CI, building packages using all
three main compilers, and noticed that I have problems with gdc
every time and need to tweak code because of many things missing.
For example:
https://travis-ci.org/crimaniak/json-patch/jobs/386963340
Why this situation with gdc
How can I modify the pre serialization and post serialization
values? I need to transform some variables that are stored but I
would like to do this easily "inline"(would be cool to be able to
provide a delegate to do the transformations at the site of
definition of the fields).
Also, how
Hi
I'm making an API for a web service, and have a small collection of
endpoints where I'd basically be creating copy+paste functions (a small
enough number that this isn't really that important for this project). I
thought I'd generate them via a mixin, but haven't seen that I can
generate
On Friday, 1 June 2018 at 18:40:45 UTC, ag0aep6g wrote:
On 06/01/2018 07:00 PM, Xiaoxi wrote:
This prints "3 4 5 6 7 8 9":
import std.range;
import std.algorithm;
import std.stdio;
void main()
{
auto s = "1 2 3 4 5 6 7 8 9";
auto iter = refRange().splitter!(c => c == ' ').drop(2);
What is the best optimizations that a compiler does to switches
in general and in the D compilers?
A switch can be seen as if statements, or safer, nested if elses.
but surely the cost per case does not grow with depth in the
switch? If one has a switch of N case then the last cost surely
On 6/1/18 1:41 PM, Russel Winder wrote:
struct Datum {
public const int a;
public const int b;
}
struct Message {
Datum datum;
}
I found the bug. Basically, the Variant static if is failing because the
assignment it is checking (assigning a Message to a Message) would
On Friday, 1 June 2018 at 19:16:46 UTC, Dr.No wrote:
exactly as a new process does?
Why not just create a real process?
Thread is "limited" to local storage, so static variables
(including the ones marked as __gshared in D) which are globals
are shared between the threads. So, calling not pure functions
which depend upon global variables prevent parallization for that
global-dependence.
(please tell me I got
On 6/1/2018 12:06 AM, vino.B wrote:
On Thursday, 24 May 2018 at 11:31:15 UTC, bauss wrote:
On Thursday, 24 May 2018 at 06:59:47 UTC, Vino wrote:
Hi All,
Request your help on how to delete a file which has the extension
.fifo (.javast.fifo) in Windows.
From,
Vino.B
What exactly is your
On 06/01/2018 07:00 PM, Xiaoxi wrote:
import std.range;
import std.algorithm;
import std.string;
import std.stdio;
void main()
{
auto s = "1 2 3 4 5 6 7 8 9";
auto iter = s.split(" ").drop(2);
// How to find the unconsumed/not-split part of s here?
// i.e. "3 4 5 6 7 8 9" NOT ["3",
On Friday, 1 June 2018 at 17:00:45 UTC, Xiaoxi wrote:
import std.range;
import std.algorithm;
import std.string;
import std.stdio;
void main()
{
auto s = "1 2 3 4 5 6 7 8 9";
auto iter = s.split(" ").drop(2);
// How to find the unconsumed/not-split part of s here?
// i.e. "3 4
On 6/1/18 1:00 PM, Xiaoxi wrote:
import std.range;
import std.algorithm;
import std.string;
import std.stdio;
void main()
{
auto s = "1 2 3 4 5 6 7 8 9";
auto iter = s.split(" ").drop(2);
// How to find the unconsumed/not-split part of s here?
// i.e. "3 4 5 6 7 8 9" NOT ["3", "4",
On 6/1/18 1:41 PM, Russel Winder wrote:
On Fri, 2018-06-01 at 18:30 +0100, Russel Winder wrote:
[…]
I'll trim this sample code down to the minimum so it can be used in
the
test suite of Phobos creating a red.
Here it is, a small bit of code that breaks Phobos'
std.concurrency.receive.
On Fri, 2018-06-01 at 18:30 +0100, Russel Winder wrote:
> […]
>
> I'll trim this sample code down to the minimum so it can be used in
> the
> test suite of Phobos creating a red.
>
Here it is, a small bit of code that breaks Phobos'
std.concurrency.receive.
import core.thread: Thread;
import
On Fri, 2018-06-01 at 09:56 -0700, Ali Çehreli via Digitalmars-d-learn
wrote:
> On 06/01/2018 09:40 AM, Russel Winder wrote:
>
> > The assert is in Phobos, so I am not sure I can.
>
> Not the cleanest solution but one can always "carefully" :) edit the
> installed Phobos files. Mine are under
import std.range;
import std.algorithm;
import std.string;
import std.stdio;
void main()
{
auto s = "1 2 3 4 5 6 7 8 9";
auto iter = s.split(" ").drop(2);
// How to find the unconsumed/not-split part of s here?
// i.e. "3 4 5 6 7 8 9" NOT ["3", "4", "5", "6", "7", "8", "9"]
On Friday, 1 June 2018 at 02:30:34 UTC, Paul Backus wrote:
On Thursday, 31 May 2018 at 19:26:12 UTC, Dr.No wrote:
My application create some HTML which is then converted to PDF
by wkhtmltopdf library. I'm trying to figure out how make the
PDF generation run parallel, currently, it's running
On 06/01/2018 09:40 AM, Russel Winder wrote:
> The assert is in Phobos, so I am not sure I can.
Not the cleanest solution but one can always "carefully" :) edit the
installed Phobos files. Mine are under /usr/include/dmd/phobos/std/ It
will most likely work as they are almost always
On Fri, 2018-06-01 at 11:20 -0400, Steven Schveighoffer via
Digitalmars-d-learn wrote:
>
[…]
> That assertion is something that should never happen. Something is
> wrong
> with the type checking here.
>
> If you look up earlier, clearly the type id matches. There is
> something
> weird about
On Fri, 2018-06-01 at 18:21 +0300, ketmar via Digitalmars-d-learn
wrote:
>
[…]
> it may be something with struct copying. variant wants to copy a
> struct
> into itself, and somehow failed. either there is no room, or
> something
> prevented it to do that. it is hard to say more without full
Steven Schveighoffer wrote:
Can you put in some more debug messages and see what the exact types of A
and T are? Just put it right before the assert.
you prolly asked Russel here, as i don't have his sources to experiment
with. ;-)
Russel Winder wrote:
On Fri, 2018-06-01 at 17:53 +0300, ketmar via Digitalmars-d-learn
wrote:
[…]
it looks like "// type T is not constructible from A" phobos
assertion triggered. that is, std.variant cannot wrap the struct, and
all hell
breaks loose.
An instance of FrontendAppeared is
On 6/1/18 10:53 AM, ketmar wrote:
Russel Winder wrote:
On Fri, 2018-06-01 at 16:37 +0300, ketmar via Digitalmars-d-learn
wrote:
[…]
yeah. if it receives something it doesn't expect (and there is no
`Variant` clause to catch it), it throws. and exceptions from threads
are
silently dropped
On Fri, 2018-06-01 at 17:53 +0300, ketmar via Digitalmars-d-learn
wrote:
>
[…]
> it looks like "// type T is not constructible from A" phobos
> assertion
> triggered. that is, std.variant cannot wrap the struct, and all hell
> breaks
> loose.
An instance of FrontendAppeared is created in
On Fri, 2018-06-01 at 07:59 -0700, Ali Çehreli via Digitalmars-d-learn
wrote:
> On 06/01/2018 04:12 AM, Russel Winder wrote:
>
> > Obviously std.concurrency.receive should never terminate a thread,
> > and
> > it should never terminate a thread silently, but given that it
> > clearly
> > does
On 06/01/2018 04:12 AM, Russel Winder wrote:
Obviously std.concurrency.receive should never terminate a thread, and
it should never terminate a thread silently, but given that it clearly
does (using dmd 2.080 from d-apt on Debian Sid) how is one to find out
useful information as to why it is
Russel Winder wrote:
On Fri, 2018-06-01 at 16:37 +0300, ketmar via Digitalmars-d-learn
wrote:
[…]
yeah. if it receives something it doesn't expect (and there is no
`Variant` clause to catch it), it throws. and exceptions from threads are
silently dropped on the floor -- along with the dead
On Fri, 2018-06-01 at 16:37 +0300, ketmar via Digitalmars-d-learn
wrote:
>
[…]
> yeah. if it receives something it doesn't expect (and there is no
> `Variant`
> clause to catch it), it throws. and exceptions from threads are
> silently
> dropped on the floor -- along with the dead threads. so
On Fri, 2018-06-01 at 09:31 -0400, Steven Schveighoffer via
Digitalmars-d-learn wrote:
> On 6/1/18 7:12 AM, Russel Winder wrote:
> > So I had a play and gdb seems to be useless for trying to find out
> > why
> > calls to std.concurrency.receive exit silently.
> >
> > Obviously
On 6/1/18 10:08 AM, Gopan wrote:
Hi,
I created a test application (test.d) to learn delegates.
import core.stdc.stdio;
void Multi (int delegate()[] args ...)
{
foreach (exp; args)
printf ("%d, ", exp() );
printf ("\n");
}
void Single (int delegate() exp)
{
printf ("%d\n",
On 6/1/18 9:40 AM, Carl Sturtivant wrote:
A computationally intensive process run from the command line works
fine, runs to completion after several minutes, writing a few hundred
lines of text to standard output and creating, writing to and closing
around 200 files of size around 20KB.
Now
Hi,
I created a test application (test.d) to learn delegates.
import core.stdc.stdio;
void Multi (int delegate()[] args ...)
{
foreach (exp; args)
printf ("%d, ", exp() );
printf ("\n");
}
void Single (int delegate() exp)
{
printf ("%d\n", exp());
}
void main()
{
On Friday, 1 June 2018 at 13:40:51 UTC, Carl Sturtivant wrote:
A computationally intensive process run from the command line
works fine, runs to completion after several minutes, writing a
few hundred lines of text to standard output and creating,
writing to and closing around 200 files of
A computationally intensive process run from the command line
works fine, runs to completion after several minutes, writing a
few hundred lines of text to standard output and creating,
writing to and closing around 200 files of size around 20KB.
Now run from std.process.pipeProcess and
Steven Schveighoffer wrote:
On 6/1/18 7:12 AM, Russel Winder wrote:
So I had a play and gdb seems to be useless for trying to find out why
calls to std.concurrency.receive exit silently.
Obviously std.concurrency.receive should never terminate a thread, and
it should never terminate a thread
On 6/1/18 7:12 AM, Russel Winder wrote:
So I had a play and gdb seems to be useless for trying to find out why
calls to std.concurrency.receive exit silently.
Obviously std.concurrency.receive should never terminate a thread, and
it should never terminate a thread silently, but given that it
So I had a play and gdb seems to be useless for trying to find out why
calls to std.concurrency.receive exit silently.
Obviously std.concurrency.receive should never terminate a thread, and
it should never terminate a thread silently, but given that it clearly
does (using dmd 2.080 from d-apt on
It seems that the receive function, immediately on processing a
message, is terminating it's thread silently. So the question now is
under what circumstances does std.concurrency.receive exit its thread
without notice?
On Thu, 2018-05-31 at 17:29 +0100, Russel Winder wrote:
> I am fiddling
On Friday, 1 June 2018 at 09:49:23 UTC, biocyberman wrote:
I need to convert a compressed 17GB SQL dump to CSV. A workable
solution is to create a temporary mysql database, import the
dump, query by python, and export. But i wonder if there is
something someway in D to parse the SQL file
I need to convert a compressed 17GB SQL dump to CSV. A workable
solution is to create a temporary mysql database, import the
dump, query by python, and export. But i wonder if there is
something someway in D to parse the SQL file directly and query
and export the data. I imagine this will
I don't think bitmaps are a good idea, keep your font in text
format with characters indexed by code unit:
immutable string[][] font=[
...
[ //'i'
"*",
"*",
"*",
"*",
"*"],
...
[ //'s'
"*",
"*",
"*",
"*",
"*"],
...
];
42 matches
Mail list logo