On Wednesday, December 13, 2017 06:55:46 bauss via Digitalmars-d-learn
wrote:
> On Tuesday, 12 December 2017 at 18:34:26 UTC, Mike Wey wrote:
> > On 12-12-17 00:35, Seb wrote:
> >> D style would be to use sth. like this (instead of try/catch):
> >>
> >> ```
> >> scope(failure) {
> >>
> >>e.msg
On Wednesday, December 13, 2017 02:34:12 codephantom via Digitalmars-d-learn
wrote:
> On Tuesday, 12 December 2017 at 15:56:59 UTC, Vino wrote:
> > Hi All,
> >
> > Request out help on date formatting, I have code which output
> >
> > the date and time as below , i we need it without the last few
On Tuesday, 12 December 2017 at 18:34:26 UTC, Mike Wey wrote:
On 12-12-17 00:35, Seb wrote:
D style would be to use sth. like this (instead of try/catch):
```
scope(failure) {
e.msg.writeln;
1.exit;
}
```
I might have missed something, but where is `e` defined in this
case?
I was thi
On 12/12/2017 10:21 PM, bauss wrote:
> On Tuesday, 12 December 2017 at 22:11:37 UTC, Adam D. Ruppe wrote:
>> On Tuesday, 12 December 2017 at 21:52:57 UTC, Ali Çehreli wrote:
>>> The same buffer is used for all segments and socket.receive should be
>>> inside while.
>>
>> The buffer is copied by th
On Tuesday, 12 December 2017 at 22:11:37 UTC, Adam D. Ruppe wrote:
On Tuesday, 12 December 2017 at 21:52:57 UTC, Ali Çehreli wrote:
The same buffer is used for all segments and socket.receive
should be inside while.
The buffer is copied by the ~= operator, but indeed you're
right that I forgo
On Tuesday, 12 December 2017 at 22:20:41 UTC, datboi wrote:
Hi, I'm learning D (obliviously)
learning D in an oblivious manner can be difficult ;-)
On Tuesday, 12 December 2017 at 15:56:59 UTC, Vino wrote:
Hi All,
Request out help on date formatting, I have code which output
the date and time as below , i we need it without the last few
numbers.,ie "-MMM-DD HH:MM:SI"
Output : 2017-Sep-06 16:06:42.7223837
Required Output : 2017-Sep
On Tuesday, December 12, 2017 15:56:59 Vino via Digitalmars-d-learn wrote:
> Hi All,
>
>Request out help on date formatting, I have code which output
> the date and time as below , i we need it without the last few
> numbers.,ie "-MMM-DD HH:MM:SI"
>
> Output : 2017-Sep-06 16:06:42.7223837
>
On Wednesday, 13 December 2017 at 00:43:31 UTC, rikki cattermole
wrote:
You don't need to change this and if you think you do, you're
wrong :)
Except when you need to:
https://github.com/dlang/dub/issues/1305
dub build --compiler=ldmd2 overwrites files in ~/.dub written by
dub build #1305
On 12/12/2017 10:20 PM, datboi wrote:
Hi, I'm learning D (obliviously) and I can't understand how exactly
dependencies work. I haven't found answers to my questions in
documentation (or i did't understand it), so can someone answer to mine
questions?
1. Does dub compile dependencies as separa
On Tuesday, 12 December 2017 at 20:57:28 UTC, Jon Degenhardt
wrote:
On Monday, 11 December 2017 at 20:58:25 UTC, Jordi Gutiérrez
Hermoso wrote:
What's the proper style, then? Can someone show me a good
example of how to use getopt and the docstring it
automatically generates?
[snip]
See:
ht
Hi, I'm learning D (obliviously) and I can't understand how
exactly dependencies work. I haven't found answers to my
questions in documentation (or i did't understand it), so can
someone answer to mine questions?
1. Does dub compile dependencies as separate binaries? And if yes
how to specify
On Tuesday, 12 December 2017 at 21:52:57 UTC, Ali Çehreli wrote:
The same buffer is used for all segments and socket.receive
should be inside while.
The buffer is copied by the ~= operator, but indeed you're right
that I forgot to receive again inside the loop! That would just
spin until it r
On 12/12/2017 01:52 PM, Ali Çehreli wrote:
> > ubyte[] result;
> > ubyte[1024] buffer;
> > result ~= buffer[0 .. got];
> The same buffer is used for all segments
Not! Ok, I better go take a nap. :)
Ali
On 12/12/2017 01:14 PM, Adam D. Ruppe wrote:
> On Tuesday, 12 December 2017 at 21:03:54 UTC, Unazed Spectaculum wrote:
>> I've decided to go for the run-time approach to this, it works fine
>> with all of my tests so you have my greatest gratitude.
>
> the way I'd do it btw is simply:
I know you
On Tuesday, 12 December 2017 at 21:14:30 UTC, Adam D. Ruppe wrote:
On Tuesday, 12 December 2017 at 21:03:54 UTC, Unazed
Spectaculum wrote:
I've decided to go for the run-time approach to this, it works
fine with all of my tests so you have my greatest gratitude.
the way I'd do it btw is simply
On Tuesday, 12 December 2017 at 17:32:15 UTC, Frank Like wrote:
Hi,everyone,
who can help me,about the "AssocArray to string is ok,but how
to get the AssocArray from string? ".
For example:
SysTime[][string] AATimes;
AATimes["a1"] =[SysTime(DateTime(2017, 1, 1, 12, 33,
33)),SysTime(DateTime(
On Tuesday, 12 December 2017 at 21:03:54 UTC, Unazed Spectaculum
wrote:
I've decided to go for the run-time approach to this, it works
fine with all of my tests so you have my greatest gratitude.
the way I'd do it btw is simply:
ubyte[] result;
ubyte[1024] buffer;
auto got = socket.receive(buf
On Tuesday, 12 December 2017 at 20:27:04 UTC, Ali Çehreli wrote:
On 12/12/2017 12:10 PM, Unazed Spectaculum wrote:
> string receiveAll(T)(T socket, int segment_size = 1024)
> {
> char[segment_size][] data;
Unrelated, you most likely want to use ubyte. (char is for
UTF-8.)
The problem is,
On Monday, 11 December 2017 at 20:58:25 UTC, Jordi Gutiérrez
Hermoso wrote:
What's the proper style, then? Can someone show me a good
example of how to use getopt and the docstring it automatically
generates?
The command line tools I published use the approach described in
a number of the rep
On 12/11/17 6:33 PM, Seb wrote:
Though if you need superb performance, iopipe or similar will be faster.
Since iopipe was mentioned several times, I will say a couple things:
1. iopipe is not made for processing one element at a time, it focuses
on buffers. The reason for this is because certa
On 12/12/17 10:56 AM, Vino wrote:
Hi All,
Request out help on date formatting, I have code which output the
date and time as below , i we need it without the last few numbers.,ie
"-MMM-DD HH:MM:SI"
Output : 2017-Sep-06 16:06:42.7223837
Required Output : 2017-Sep-06 16:06:42
You nee
On 12/12/2017 12:10 PM, Unazed Spectaculum wrote:
> string receiveAll(T)(T socket, int segment_size = 1024)
> {
> char[segment_size][] data;
Unrelated, you most likely want to use ubyte. (char is for UTF-8.)
The problem is, char[segment_size] is a static array, where the length
must be kno
string receiveAll(T)(T socket, int segment_size = 1024)
{
char[segment_size][] data;
int cnt = 0;
while(true)
{
auto received = socket.receive(data[cnt]);
if (received < segment_size)
break; /* early exit */
On Tuesday, 12 December 2017 at 17:13:55 UTC, Biotronic wrote:
On Tuesday, 12 December 2017 at 16:54:17 UTC, Biotronic wrote:
There is no way in C++ to set the format the way you want it.
If you want binary output, you need to call a function like
your binario function.
Of course this is not
On Tue, Dec 12, 2017 at 06:06:48PM +, Ivan Trombley via Digitalmars-d-learn
wrote:
> On Tuesday, 12 December 2017 at 15:30:01 UTC, Nathan S. wrote:
> > While what you're saying is true, exponentiation not being runnable
> > at compile-time is a defect and I would assume a regression.
[...]
> F
On Tuesday, 12 December 2017 at 15:19:35 UTC, Vino wrote:
import std.algorithm: filter, map, sort;
import std.container.array;
import std.file: SpanMode, dirEntries, isDir ;
import std.stdio: writefln;
import std.typecons: Tuple, tuple;
import std.datetime.systime: SysTime;
void main () {
auto F
On Tuesday, 12 December 2017 at 17:13:55 UTC, Biotronic wrote:
On Tuesday, 12 December 2017 at 16:54:17 UTC, Biotronic wrote:
There is no way in C++ to set the format the way you want it.
If you want binary output, you need to call a function like
your binario function.
Of course this is not
On 12-12-17 00:35, Seb wrote:
D style would be to use sth. like this (instead of try/catch):
```
scope(failure) {
e.msg.writeln;
1.exit;
}
```
I might have missed something, but where is `e` defined in this case?
--
Mike Wey
On Tuesday, 12 December 2017 at 15:30:01 UTC, Nathan S. wrote:
While what you're saying is true, exponentiation not being
runnable at compile-time is a defect and I would assume a
regression. I'll file a bug report. FWIW when trying to run the
following with DMD v2.077.1 I get:
```
void main(
Hi,everyone,
who can help me,about the "AssocArray to string is ok,but how to
get the AssocArray from string? ".
For example:
SysTime[][string] AATimes;
AATimes["a1"] =[SysTime(DateTime(2017, 1, 1, 12, 33,
33)),SysTime(DateTime(2017, 1, 2, 12, 33, 33))];
AATimes["a2"] =[SysTime(DateTime(2017,
On Tuesday, 12 December 2017 at 16:54:17 UTC, Biotronic wrote:
There is no way in C++ to set the format the way you want it.
If you want binary output, you need to call a function like
your binario function.
Of course this is not entirely true - there is a way, but it's
ugly and probably not
On Tuesday, 12 December 2017 at 15:52:09 UTC, dark777 wrote:
I know that this community is not of c ++, but some time I have
been studying how to do overload of ostream operators in c ++
and I even managed to get to this result but the same is not
converting to binary only presents zeros as out
On Tuesday, 12 December 2017 at 16:01:49 UTC, Adam D. Ruppe wrote:
On Tuesday, 12 December 2017 at 15:56:59 UTC, Vino wrote:
Request out help on date formatting, I have code which
output the date and time as below , i we need it without the
last few numbers.,ie "-MMM-DD HH:MM:SI"
Just s
On Tuesday, 12 December 2017 at 15:56:59 UTC, Vino wrote:
Request out help on date formatting, I have code which output
the date and time as below , i we need it without the last few
numbers.,ie "-MMM-DD HH:MM:SI"
Just slice it off. x[0 .. x.lastIndexOf("."];
Hi All,
Request out help on date formatting, I have code which output
the date and time as below , i we need it without the last few
numbers.,ie "-MMM-DD HH:MM:SI"
Output : 2017-Sep-06 16:06:42.7223837
Required Output : 2017-Sep-06 16:06:42
From,
Vino.B
I know that this community is not of c ++, but some time I have
been studying how to do overload of ostream operators in c ++ and
I even managed to get to this result but the same is not
converting to binary only presents zeros as output to any number
already tried to pass parameter of variable
On Tuesday, 12 December 2017 at 14:25:22 UTC, Vino wrote:
Hi All,
Request your help on the below code, as i ma getting the below
error message
[...]
Hi All,
Was able to resolve this issue, it was my mistake, sorry.
From,
Vino.B
On Tuesday, 12 December 2017 at 11:37:40 UTC, Jonathan M Davis
wrote:
On Tuesday, December 12, 2017 10:35:15 Ivan Trombley via
Digitalmars-d-learn wrote:
On Tuesday, 12 December 2017 at 09:48:09 UTC, Jonathan M Davis
wrote:
> On Tuesday, December 12, 2017 07:33:47 Ivan Trombley via
>
> Digitalm
On Monday, 11 December 2017 at 20:58:31 UTC, Biotronic wrote:
On Monday, 11 December 2017 at 19:46:04 UTC, Vino wrote:
import std.algorithm;
import std.container.array;
import std.file: SpanMode, dirEntries, isDir ;
import std.stdio: writefln, writeln;
import std.typecons: Tuple, tuple;
import
Hi All,
Request your help on the below code, as i ma getting the below
error message
Error:
C:\D\dmd2\windows\bin\..\..\src\phobos\std\container\array.d(739): Error:
template std.container.array.Array!(Tuple!(string, real)).Array.insertBack
cannot dedu
ce function from argument types !()(Ra
On Tuesday, 5 December 2017 at 13:43:38 UTC, Nordlöw wrote:
If I get the following stack trace ___without line numbers___
(instead ??:?) what's missing?
and using DMD 2.077.1
https://issues.dlang.org/show_bug.cgi?id=18068
On Tuesday, December 12, 2017 10:35:15 Ivan Trombley via Digitalmars-d-learn
wrote:
> On Tuesday, 12 December 2017 at 09:48:09 UTC, Jonathan M Davis
>
> wrote:
> > On Tuesday, December 12, 2017 07:33:47 Ivan Trombley via
> >
> > Digitalmars-d-learn wrote:
> >> Is there some way that I can make thi
On Tuesday, 12 December 2017 at 09:48:09 UTC, Jonathan M Davis
wrote:
On Tuesday, December 12, 2017 07:33:47 Ivan Trombley via
Digitalmars-d-learn wrote:
Is there some way that I can make this array immutable?
static float[256] ga = void;
static foreach (i; 0 .. 256)
ga[i] = (i / 2
On Tuesday, December 12, 2017 07:33:47 Ivan Trombley via Digitalmars-d-learn
wrote:
> Is there some way that I can make this array immutable?
>
>static float[256] ga = void;
>static foreach (i; 0 .. 256)
>ga[i] = (i / 255.0f) ^^ (1 / 2.2f);
If you want anything to be immutable, yo
On 12/05/2017 08:43 AM, Nordlöw wrote:
If I get the following stack trace ___without line numbers___ (instead
??:?) what's missing?
Linux stack trace line numbers have disappeard for me, too. Used to
work. Very frustrating, and a royal PITA when dealing with unittests.
Help would be appreci
On Tuesday, 12 December 2017 at 07:44:55 UTC, Radu wrote:
On Tuesday, 12 December 2017 at 07:33:47 UTC, Ivan Trombley
wrote:
Is there some way that I can make this array immutable?
static float[256] ga = void;
static foreach (i; 0 .. 256)
ga[i] = (i / 255.0f) ^^ (1 / 2.2f);
Check
ht
I would go with some VM and install 32bit system on it.
Dne 12. 12. 2017 8:55 dop. napsal uživatel "Ali Çehreli via
Digitalmars-d-learn" :
> The automatic tests for a PR failed for a target that I could not test
> myself: 32-bit build on Darwin_64_32.
>
>
> https://auto-tester.puremagic.com/show-
48 matches
Mail list logo