On Wednesday, 6 April 2022 at 08:55:43 UTC, BoQsc wrote:
I have a feeling that some parts of my code contains
unterminated strings and they do overflow into other string
that is to be combined. I'd like to take a look at strings,
analyse them manually and see if any of them end up terminated
o
On Wednesday, 27 April 2022 at 14:21:15 UTC, Claude wrote:
data.digits ~= parseDigit(str[0]);
Dynamic arrays are not supported using -betterC
Andrea
On Tuesday, 31 May 2022 at 08:51:45 UTC, realhet wrote:
Hi,
In my framework I just found a dozen of compile time error
handling like:
...else static assert("Invalid type");
This compiles without error. And it was useless for detecting
errors because I forgot the first "false" or "0" paramet
On Tuesday, 31 May 2022 at 09:52:10 UTC, realhet wrote:
On Tuesday, 31 May 2022 at 09:35:30 UTC, Andrea Fontana wrote:
On Tuesday, 31 May 2022 at 08:51:45 UTC, realhet wrote:
Check if that string is init.
assert("", "cool");
assert("ehh", "cool");
assert(string.init, "Not cool");
I feel some
On Wednesday, 22 February 2023 at 15:00:56 UTC, WebFreak001 wrote:
I just first time used importC in a prototype project I just
worked on. I used it to just import `libevdev.h` on linux to
register a custom input device / make a simple userspace input
driver.
A suggestion: try tcc as preproce
On Saturday, 7 October 2023 at 07:31:45 UTC, mw wrote:
https://stackoverflow.com/questions/47046850/is-there-any-way-to-assign-multiple-variable-at-once-with-dlang
How to do this Python code in D:
```
s = "1 2 3"
A,B,C = map(int, s.split(" "))
A,B,C
(1, 2, 3)
```
Is there a better way (sinc
On Sunday, 8 October 2023 at 07:44:04 UTC, Andrea Fontana wrote:
```
int a,b,c;
"1,2,3"
.splitter(',')
.zip(only(&a, &b, &c))
.each!(x => *x[1] = x[0].to!int);
writeln(a, b, c);
```
or:
```
int a,b,c;
only(&a, &b, &c)
.zip("1,2,3".splitte
On Tuesday, 26 March 2024 at 07:13:24 UTC, confuzzled wrote:
Hello all,
I have two scripts. I copied the first directly from the alpaca
website and massaged it with etc.c.curl until it compiled in D.
The result is that it creates the order and returns the result
to stdout. In the second scrip
On Tuesday, 30 July 2019 at 09:33:04 UTC, Ron Tarrant wrote:
Some things are almost impossible to research. For instance, in
the GtkD wrapper code—specifically the Widget.d file—the
following function definition appears:
gulong addOnDraw(bool delegate(Scoped!Context, Widget) dlg,
ConnectFla
On Thursday, 12 September 2019 at 09:54:35 UTC, Ron Tarrant wrote:
I found this presented as a solution in a 2016 post:
On Wednesday, 15 June 2016 at 22:05:37 UTC, captaindet wrote:
enum myCSS = q{
GtkNotebook {
background-color: #e9e9e9;
}
GtkNotebook tab {
backgro
On Tuesday, 17 September 2019 at 14:33:30 UTC, Brett wrote:
The idea is to basically use a dynamic array for most of the
items, then an array to get the rest.
T[] Base;
T[int] Rest;
Then if Base has a max size(usually it might be fixed due to
some algorithm) the Rest AA can pick up any outsid
On Wednesday, 18 September 2019 at 12:03:28 UTC, berni wrote:
The following code doesn't compile:
import std.stdio;
void main()
{
import std.complex: abs, complex;
import std.math: abs;
auto a = complex(1.0,1.0);
auto b = 1.0;
writeln(abs(a));
writeln(abs(b));
}
What abou
On Friday, 20 September 2019 at 08:58:09 UTC, oleobal wrote:
I'm kind of out of ideas at this point. Would anyone have an
elegant solution to this problem?
Thanks !
Is this ok for you: https://run.dlang.io/is/VllpJk ?
Andrea
On Friday, 20 September 2019 at 11:21:22 UTC, Ali Çehreli wrote:
tl;dr Instead of returning an object that uses local state,
return an object that uses member variables.
Really good to know tips!
On Thursday, 3 October 2019 at 05:33:04 UTC, mipri wrote:
void main() {
import std.range : iota;
foreach (x; iota(1, 10).withHistory)
writeln(x);
}
This doesn't work as expected, I think.
auto r = iota(1,10).withHistory;
writeln(r.front);
writeln(r.front);
On Thursday, 3 October 2019 at 14:13:55 UTC, IGotD- wrote:
According to the GC documentation this code snippet
char* p = new char[10];
char* q = p + 6; // ok
q = p + 11; // error: undefined behavior
q = p - 1; // error: undefined behavior
suggests that char *p is really a "fat pointe
On Thursday, 17 October 2019 at 12:19:03 UTC, Vinay Sajip wrote:
Are arrays and objects part of a unified type system?
Specifically, if I do
void foo(Object x) {
if (typeid(x) == typeid(Object[])) {
auto a = cast(Object[]) x;
}
}
I get a compilation error:
onlineapp.d(3): Erro
On Friday, 18 October 2019 at 10:55:59 UTC, Martin Tschierschke
wrote:
Yes, it works as it is, but it is not the best solution to
share know how.
I agree. I think D.learn should be moved to stackoverflow and
D.general should stay here.
On Monday, 25 November 2019 at 09:24:43 UTC, Jonathan M Davis
wrote:
On Monday, November 25, 2019 1:22:17 AM MST Andrej Mitrovic via
Digitalmars- d-learn wrote:
From:
https://github.com/dlang/phobos/blob/10b9174ddcadac52f6a1ea532deab3310d3a8 c03/std/concurrency.d#L1913-L1916:
-
///
final @
On Monday, 25 November 2019 at 16:35:21 UTC, ParticlePeter wrote:
I would like to auto convert c++ header to d module. Is there
some project aiming for this?
I know of VisualD c++ to d conversion wizzard [1] and LLVM
tooling based CPP2D [2], both of them aiming for whole cpp
conversion. But I
On Tuesday, 26 November 2019 at 10:24:00 UTC, Robert M. Münch
wrote:
How can I write something like this to check if any of a set of
specific versions is used?
static assert(!(version(a) | version(b) | version(c)):
The problem is that I can use version(a) like a test, and the
symbol a is not
On Tuesday, 3 December 2019 at 07:24:31 UTC, Basile B. wrote:
A testA()
{
return alwaysReturnNull(); // Tnull can be implictly
converted to A
}
still nice tho.
Why not [1]?
[1] typeof(null) alwaysReturnNull() { ... }
Andrea
On Tuesday, 3 December 2019 at 09:48:39 UTC, Basile B. wrote:
You see what surprises me here is that we cannot express the
special type that is `TypeNull` and that can only have one
value (`null`) so instead we have to use `auto` or
`typeof(null)`.
You can still create an alias anyway :)
ali
On Thursday, 5 December 2019 at 11:28:51 UTC, Marcone wrote:
Simple example:
writeln("Hi\nHow are
you?\nGood".splitLines()[0][0..?lastIndexOf(r"\")]);
How to refer to this string in lastIndexOf() without create a
variable?
Thank you.
One solution:
writeln(
"Hello\nHow are yo
On Friday, 6 December 2019 at 12:34:17 UTC, realhet wrote:
Hi,
I'm trying to use a popular function name "max", and extend it
for my special types:
For example:
module utils;
MyType max(in MyType a, in MyType a){...} //static function
struct V3f{
V3f max(in V2f b){...} //member function
On Friday, 31 January 2020 at 08:45:55 UTC, bauss wrote:
On Friday, 31 January 2020 at 07:20:17 UTC, cc wrote:
char[4096] buf;
writeln(GC.stats.usedSize);
foreach (i; 0 .. 10) {
sformat(buf, "%f", 1.234f);
writeln(GC.stats.usedSize);
On Monday, 3 February 2020 at 07:11:34 UTC, Dharmil Patel wrote:
On Monday, 3 February 2020 at 07:03:03 UTC, Dharmil Patel wrote:
In my code I am using regex like this:
auto rgxComma = regex(r",");
On compiling with dmd v2.076.1, it compiles successfully, but
on compiling with dmd v2.0
On Thursday, 27 February 2020 at 14:15:26 UTC, p.shkadzko wrote:
void main() {
int[][] m1 = rndMatrix(10, 2, 3);
int[][] m2 = rndMatrix(10, 2, 3);
auto c = m1[] + m2[];
}
I think you're trying to do this:
int[][] m1 = rndMatrix(10, 2, 3);
int[][] m2 = rndMatrix(10, 2, 3);
int[][]
On Saturday, 29 February 2020 at 20:11:24 UTC, Steven
Schveighoffer wrote:
1. in is supposed to be O(lg(n)) or better. Generic code may
depend on this property. Searching an array is O(n).
Probably it should work if we're using a "SortedRange".
int[] a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
auto p
On Friday, 31 July 2020 at 13:55:18 UTC, Martin Tschierschke
wrote:
What would be the idiomatic way to write a floating point
division
occuring inside a loop and handle the case of division by zero.
c = a/b; // b might be zero sometimes, than set c to an other
value (d).
(In the moment I che
On Tuesday, 8 June 2021 at 02:47:18 UTC, someone wrote:
https://dlang.org/articles/safed.html
https://dlang.org/dmd-linux.html#switches
http://ddili.org/ders/d.en/functions_more.html
Neither man dmd nor man dmd.conf appear to have a
related/switch setting.
Does it means safeD is achieved by p
Is this a bug or am I missing something?
https://run.dlang.io/is/OGHJYX
Andrea
On Thursday, 24 May 2018 at 07:59:08 UTC, Simen Kjærås wrote:
On Thursday, 24 May 2018 at 07:47:54 UTC, Andrea Fontana wrote:
Is this a bug or am I missing something?
https://run.dlang.io/is/OGHJYX
Andrea
This line:
mixin("alias tmp = " ~ s ~ ";");
There's no mention of Symbol in th
On Thursday, 24 May 2018 at 09:17:10 UTC, Alex wrote:
On Thursday, 24 May 2018 at 08:48:30 UTC, Andrea Fontana wrote:
This line:
mixin("alias tmp = " ~ s ~ ";");
There's no mention of Symbol in there. If you change it to
this:
mixin("alias tmp = Symbol" ~ s ~ ";");
then sudden
On Thursday, 24 May 2018 at 10:23:41 UTC, Andrea Fontana wrote:
On Thursday, 24 May 2018 at 09:17:10 UTC, Alex wrote:
On Thursday, 24 May 2018 at 08:48:30 UTC, Andrea Fontana wrote:
This line:
mixin("alias tmp = " ~ s ~ ";");
There's no mention of Symbol in there. If you change it to
On Saturday, 2 June 2018 at 23:17:48 UTC, Simen Kjærås wrote:
unittest
{
import std.algorithm.comparison;
alias min = Operator!(std.algorithm.comparison.min);
assert(1 /min/ 3 == 1);
}
Why not:
alias Δ = Operator!(std.algorithm.comparison.min);
assert(1 /Δ/ 3 == 1);
To improve
On Friday, 8 June 2018 at 05:00:57 UTC, TheGag96 wrote:
I'm sorry about bringing this into here instead of DWT's
subforum, but it's somewhat dead and hasn't been getting a lot
of attention. I decided to finally play around with DWT today
and tried to build the example.
It's a known bug. I ope
Check this code:
https://run.dlang.io/is/PoluHI
It won't work, because array appender requires a pure postblit.
Why? Can we remove this limitation?
Andrea
On Friday, 15 June 2018 at 11:25:49 UTC, Basile B. wrote:
Hello, i've tested locally and it can works by making
`Appender.reserve()` and `Appender.ensureAddable()` function
templates.
That was my idea too. But I wonder if pureness of reserve and
ensureAddable have a particular reason.
On Friday, 15 June 2018 at 11:48:59 UTC, Andrea Fontana wrote:
On Friday, 15 June 2018 at 11:25:49 UTC, Basile B. wrote:
Hello, i've tested locally and it can works by making
`Appender.reserve()` and `Appender.ensureAddable()` function
templates.
That was my idea too. But I wonder if puren
On Monday, 3 September 2018 at 09:09:44 UTC, Andrey wrote:
Hello,
Here is a code with comments: https://run.dlang.io/is/BNl2Up.
I don't understand how to pass lambda into template.
I get an error:
onlineapp.d(18): Error: template instance `qwerty!((i) => "arg"
~ i.to!string ~ "[0] == '?'", "||
On Monday, 3 September 2018 at 10:50:17 UTC, Russel Winder wrote:
Interesting alternative to DStep. I came to D to avoid
#include, but… I'll give it a whirl once I can get it compiled
on Debian Sid. It seems the libclang-dev package does not
install a libclang.so symbolic link, you have to be e
On Friday, 31 August 2018 at 09:59:20 UTC, Dukc wrote:
For me, it seems that for generality you should always add ref
into foreach loop variable. The reason is this:
One good reason:
https://forum.dlang.org/thread/dlhrrgvzmhladnphi...@forum.dlang.org
On Tuesday, 4 September 2018 at 07:06:43 UTC, Dukc wrote:
On Monday, 3 September 2018 at 13:34:36 UTC, Andrea Fontana
wrote:
On Friday, 31 August 2018 at 09:59:20 UTC, Dukc wrote:
For me, it seems that for generality you should always add
ref into foreach loop variable. The reason is this:
On
On Friday, 7 September 2018 at 14:36:42 UTC, Russel Winder wrote:
From what I can see, processes created with std.process:
spawnProcess are not terminated when the creating process
terminates, i.e. it seems Config.detached is the default for
these process.
Is there a way of all spawned proces
On Wednesday, 26 September 2018 at 19:08:45 UTC, Márcio Martins
wrote:
Hi!
I am getting this error when compiling my code as a static
library.
It works fine as an executable. I have no idea what's happening.
Has someone seen something like this before? What could be
different?
This is the e
On Tuesday, 2 October 2018 at 18:27:04 UTC, Aurélien Plazzotta
wrote:
Thank you both for all the links! I guess DiamondMVC is very
powerful but I would rather avoid using such heavy artillery.
I'm expecting the learning curve to be very long.
I currently use two libraries I wrote to keep thing
On Wednesday, 3 October 2018 at 09:37:29 UTC, JN wrote:
int i = returnDefault!int(); obviously works, but the point is
I would like to skip the explicit type.
See:
https://forum.dlang.org/post/ufhibwmouxpivjylq...@forum.dlang.org
On Thursday, 4 October 2018 at 07:31:21 UTC, Ritchie wrote:
Any reason why this works?
https://run.dlang.io/is/TALlyw
Why not?
On Thursday, 4 October 2018 at 08:32:13 UTC, Chris Katko wrote:
I've been Google'ing and there's like... nothing out there.
One of the top results for "std.socket dlang examples"... is
for TANGO. That's how old it is.
Socket paradigm is quite standard across languages.
Anyway you can find a
On Thursday, 15 November 2018 at 13:05:59 UTC, Ranjan wrote:
This is my first time on the Dlang forum. I like the language
but my usecase is a bit different.
I want to write Postgresql extension in D. Currently extension
can be written in C or C linked languages. Has anyone done this
or can p
On Thursday, 22 November 2018 at 02:46:03 UTC, Adnan wrote:
Does anyone have experience with using meson to wrap around a
dub project?
I have a typical dub project, meaning I have a dub dependency
but I want to use meson for two reasons:
1. I want to distribute the application in form of a s
On Tuesday, 11 December 2018 at 15:17:10 UTC, Narxa wrote:
Yes, it worked:
---
int var = cast(int) floor(sqrt( cast(float) n ));
I thought floor already returned an 'int' but I was mistaken.
Thank you very much.
I think you don't need floor.
int var = cast(int)(sqrt(cast(float)n
On Tuesday, 18 December 2018 at 12:47:59 UTC, Andrey wrote:
On Tuesday, 18 December 2018 at 12:32:35 UTC, angel wrote:
On Tuesday, 18 December 2018 at 12:07:37 UTC, Andrey wrote:
Thank you everybody.
Here was another problem that local variable 'array' shadows
function 'array()' from std.arra
On Thursday, 20 December 2018 at 14:49:10 UTC, Marko wrote:
But is this right? I mean if they are equal shouldn't they have
the same behavior?
I don't think so:
float a = 1.0;
long b = 1;
writeln(a == b);
writeln(a/2 == b/2);
On Monday, 25 February 2019 at 12:37:31 UTC, Vladimirs Nordholm
wrote:
Hello.
I wish to sort an array by calling a template function on a
struct. In essence I want to do
foos.sort!("a.get!Dummy < b.get!Dummy");
but I get the error message
/dlang/dmd/linux/bin64/../../src/phobos/std
On Wednesday, 13 March 2019 at 13:03:27 UTC, tchaloupka wrote:
Is this expected?:
```
import std.stdio;
import std.algorithm;
import std.array;
void main()
{
auto d = Appender!string();
//auto d = appender!string(); // works
string[] arr = ["foo", "bar", "baz"];
arr.joiner("\n"
On Thursday, 14 March 2019 at 11:05:22 UTC, spir wrote:
The most confusing error is:
Error: variable `_base.c0` is a thread-local class and cannot
have a static initializer. Use `static this()` to initialize
instead.
Error is reffering to:
https://dlang.org/spec/module.html#staticorder
Yo
On Thursday, 14 March 2019 at 14:22:52 UTC, spir wrote:
https://dlang.org/spec/hash-map.html#static_initialization:
immutable long[string] aa = [
"foo": 5,
"bar": 10,
"baz": 2000
];
If I'm right, you can't use this syntax with global array. Insted
this works:
void main()
{
immutable
On Thursday, 14 March 2019 at 15:29:28 UTC, Ozan wrote:
Hi
In vibe.d / data / mongo / collection I found the function
* ensureIndex(Tuple!(string, int))[] field_orders)
What could be the right way to use "Tuple!(string, int))[]
field_orders"?
I tried different ways like [Tuple!("a", 1), Tuple!
On Monday, 1 April 2019 at 10:12:50 UTC, Simen Kjærås wrote:
On Monday, 1 April 2019 at 09:46:34 UTC, Jacob Carlborg wrote:
On 2019-03-28 01:29, Jamie wrote:
Is it possible to assign to all values in a tuple at once if
they are the same type?
I.e.
Tuple!(double, "x", double, "y") t;
t[] = 1.0
On Friday, 21 June 2019 at 09:24:54 UTC, lili wrote:
in dictionary iota means:
a tiny or scarcely detectable amount
the 9th letter of the Greek alphabet
but this function is not that mean.
Full answer:
https://stackoverflow.com/questions/9244879/what-does-iota-of-stdiota-stand-for
On Wednesday, 5 July 2017 at 15:30:08 UTC, Jolly James wrote:
WhatEver[] q = [];
[...]
auto i = new WhatEver();
q[] = i;
How does one remove that instance 'i'?
Maybe: http://dlang.org/phobos/std_algorithm_mutation.html#.remove
?
On Wednesday, 5 July 2017 at 16:17:29 UTC, Jolly James wrote:
On Wednesday, 5 July 2017 at 16:04:16 UTC, Jolly James wrote:
On Wednesday, 5 July 2017 at 15:56:45 UTC, Igor Shirkalin
wrote:
[...]
Thank you! :)
But why a containers so complicated in D?
[...]
Part of CoreCLR's 'List':
On Thursday, 6 July 2017 at 08:22:44 UTC, Hamborg wrote:
But how would I check _arguments[i]?
When I do (isNumeric!_arguments[i]) I get an error saying:
"Error: template instance isNumeric!(_arguments) does not match
template declaration isNumeric(T)"
or when I do (isNumeric!(_arguments[i]))
On Thursday, 6 July 2017 at 12:15:56 UTC, Hamborg wrote:
That compiles, but it returns false when I pass in a numeric
value... :(
I think you should provide a code snippet then. I think I missed
something about your question.
Andrea
On Sunday, 16 July 2017 at 10:37:39 UTC, kerdemdemir wrote:
My goal is to find connected components in a 2D array for
example finding connected '*'
chars below.
You can also use a queue to avoid recursion that should improve
performances and readibility.
Probably using ndslice library could
On Monday, 24 July 2017 at 15:21:54 UTC, Houdini wrote:
Hello,
I am a C++ coder, and I am learning D (just reading a book, for
now).
D is very similar to C++ (and also grabs godd ideas from
Python), but I have a naive question : why does Walter Bright
chose to instanciate classes like in Ja
On Tuesday, 25 July 2017 at 10:06:47 UTC, unDEFER wrote:
Any ideas?
I think you should use/contribute to DCD project
https://github.com/dlang-community/DCC
Andrea
On Tuesday, 25 July 2017 at 10:23:33 UTC, Andrea Fontana wrote:
On Tuesday, 25 July 2017 at 10:06:47 UTC, unDEFER wrote:
Any ideas?
I think you should use/contribute to DCD project
https://github.com/dlang-community/DCC
Andrea
Sorry, this is the right link:
https://github.com/dlang-communit
On Tuesday, 25 July 2017 at 10:32:11 UTC, unDEFER wrote:
Yes this project where "Not working: UFCS suggestions and That
one feature that you REALLY needed".. I want to have all
features that I really need :-)
But If I will not find how do UFCS suggestions fast, I probably
will use DCD for all o
On Tuesday, 25 July 2017 at 10:45:38 UTC, unDEFER wrote:
On Tuesday, 25 July 2017 at 10:35:14 UTC, Andrea Fontana wrote:
If you want to add UFCS suggestions to DCD it would be useful
for your project and all other IDEs too!
Andrea
Thank you, I will think. But if it was easy, authors self wo
On Thursday, 31 August 2017 at 23:17:52 UTC, EntangledQuanta
wrote:
Generally one has to use a switch to map dynamic components.
Given a set X and Y one can form a switch to map X to Y:
[...]
Does this work for you?
https://dpaste.dzfl.pl/e2669b595539
Andrea
On Monday, 4 September 2017 at 20:54:27 UTC, EntangledQuanta
wrote:
On Monday, 4 September 2017 at 09:23:24 UTC, Andrea Fontana
wrote:
On Thursday, 31 August 2017 at 23:17:52 UTC, EntangledQuanta
wrote:
Generally one has to use a switch to map dynamic components.
Given a set X and Y one can for
On Tuesday, 5 September 2017 at 13:40:18 UTC, Ky-Anh Huynh wrote:
On Tuesday, 5 September 2017 at 13:17:34 UTC, Azi Hassan wrote:
Maybe it has something to do with how you read from STDIN. Can
you show that part of the code to see if I can reproduce the
issue ?
I used `lines(stdin)` as in
On Wednesday, 6 September 2017 at 14:30:24 UTC, MGW wrote:
I need library for generation of QR codes. Who knows, give the
link.
You can try to bind a c library like [1] using dstep. It should
be easy.
Andrea
[1] https://github.com/fukuchi/libqrencode
On Friday, 15 September 2017 at 05:58:47 UTC, David Bennett wrote:
Is this an error in dmd, and should I open a bug report?
Internal error is always a bug, so it should be reported!
Andrea
Why this code doesn't write two identical lines?
https://dpaste.dzfl.pl/e99aad315a2a
Andrea
On Monday, 2 October 2017 at 09:08:59 UTC, Biotronic wrote:
Not knowing what you're attempting to do, I'm not sure how to
fix your problem. But if what I've described above does indeed
cover it, initializing b in the constructor is the way to get
it to work.
--
Biotronic
Obviusly real exa
On Wednesday, 4 October 2017 at 14:18:52 UTC, Tristan B. Kildaire
wrote:
Does this work?
No, I don't read you. Try again :)
On Tuesday, 10 October 2017 at 13:36:56 UTC, Simon Bürger wrote:
Is there a good way to set them all to zero? The only way I can
think of is using string-mixins to generate a string such as
"[0,0,0,0]" with exactly n zeroes. But that seems quite an
overkill for such a basic task. I suspect I mi
On Tuesday, 10 October 2017 at 13:53:37 UTC, jmh530 wrote:
double[n] bar;
bar[] = 0;
This works at runtime only for mutable arrays, anyway.
On Tuesday, 17 October 2017 at 13:09:18 UTC, Nordlöw wrote:
I can't find any algorithm/range in Phobos that can be used to
split (eagerly or lazily) a sequence using a binary predicate
on adjacent elements as follows
[1,2,3,5,10,11,12,13,20,21,100].splitBy!"a + 1 != b"()
should evaluate to
[
More phobos-ized version:
https://run.dlang.io/is/iwgeAl
Andrea
On Wednesday, 18 October 2017 at 06:45:37 UTC, Nordlöw wrote:
On Tuesday, 17 October 2017 at 14:15:02 UTC, Andrea Fontana
wrote:
auto splitBy(alias F, R)(R range)
Because of lazyness shouldn't it be named something with
splitter, say splitterBy, instead?
Yes but I think it is something more
On Wednesday, 18 October 2017 at 07:26:20 UTC, Nordlöw wrote:
On Wednesday, 18 October 2017 at 07:01:19 UTC, Andrea Fontana
wrote:
If you try to use your data with chunkBy!"a != b+1", it does
not work, as expected.
What's the motivation behind this limitation?
Without it
chunkBy!"a + 1 =
On Wednesday, 18 October 2017 at 03:48:01 UTC, Ky-Anh Huynh wrote:
Hi,
I'm using Bash heavily in my systems. Things become slow and
slow when I have tons of scripts :) And sometimes it's not easy
to manipulate data.
You may have heard of recutils [1] which has a C extension to
be loaded by
On Tuesday, 14 November 2017 at 07:56:06 UTC, rikki cattermole
wrote:
On 14/11/2017 7:54 AM, Tony wrote:
Is there an easy way to get the string representation of an
array, as would be printed by writeln(), but captured in a
string?
struct Foo {
int x;
}
void main() {
Foo[]
On Wednesday, 15 November 2017 at 08:43:01 UTC, Tony wrote:
This code:
class MyClass {
public:
int SomeMethod ()
{
}
}
void main()
{
}
gets a compile error:
Error: function test_warnings.MyClass.SomeMethod has no return
statement, but is expected to return a value of type int
b
On Thursday, 16 November 2017 at 08:03:48 UTC, Tony wrote:
I made a stack data type and created an opIndex() so it could
be turned into a dynamic array, and created empty()
(unfortunate name), front() and popFront() methods, which I
read allow it to be used with foreach.
However, when I use t
On Thursday, 23 November 2017 at 05:19:27 UTC, Andrey wrote:
Hello, is there way to reduce this condition:
if (c1) {
foo();
} else {
if (c2) {
bar();
} else {
if (c3) {
...
}
}
}
for instance in kotlin it can be replace with this:
when {
c1
On Thursday, 23 November 2017 at 13:47:37 UTC, Adam D. Ruppe
wrote:
On Thursday, 23 November 2017 at 05:19:27 UTC, Andrey wrote:
for instance in kotlin it can be replace with this:
when {
c1 -> foo(),
c2 -> bar(),
c3 -> ...
else -> someDefault()
}
The `switch` statement covers
On Thursday, 23 November 2017 at 14:47:21 UTC, aberba wrote:
Some suggest working with the lowest currency denomination to
avoid decimal precision handling and only convert to the
highest denominations (decimal) when displaying. I've also seen
some use decimal value handling libraries.
I'm th
On Monday, 4 December 2017 at 08:27:10 UTC, rikki cattermole
wrote:
On 04/12/2017 8:22 AM, Vino wrote:
Hi All,
Request your help on the below code, I want to send the
name of the function ( First and Second) from main as an
argument to another function(Mid) and the function "Mid" has
to e
On Tuesday, 5 December 2017 at 07:47:32 UTC, Dirk wrote:
What would be a good way to implement this?
Did you tried to use introspection?
On Tuesday, 5 December 2017 at 17:21:29 UTC, Vino wrote:
Hi All,
Is there any better ways to get the size of folders , The
below code perfectly works , but i need return type as
Array!(Tuple!(string, string)) rather then using the
"Result.insertBack(d);
Result.insertBack(to!string(SdFiles[]
On Wednesday, 6 December 2017 at 14:49:48 UTC, Vino wrote:
Hi Andrea,
Thank you very much, as your code is pretty good for our
scenario, just one request, the above is a part of our main
code where we have many such sub code and all of our sub code
use the container array(std.container.arr
On Thursday, 7 December 2017 at 16:39:14 UTC, kdevel wrote:
Then (*) works as expected. But why do I have to use the prefix
"mymod.:" in the
library case?
Because module names are not relative to file path, but to import
path / compile path afaik.
On Tuesday, 13 February 2018 at 22:21:18 UTC, Martin Tschierschke
wrote:
I will downgrade to 16.04., the dist-upgrade to 17.10 was a
mistake, resulting in problems with startx and newer kernels so
I have to use 4.10.
In my experience dist-upgrade are long and messy :)
Usually I create a partit
On Wednesday, 14 February 2018 at 11:16:25 UTC, Martin
Tschierschke wrote:
Ok, good to know!
I started with 16.04 and made the initial mistake to take the
32 Bit version,
do you use 32 or 64 Bit?
64bit of course!
Andrea
1 - 100 of 233 matches
Mail list logo