On Friday, 21 April 2017 at 17:40:03 UTC, Era Scarecrow wrote:
I think I'll just go with full memory compression and make a
quick simple filter to manage the large blocks of 0's to
something more manageable. That will reduce the memory
allocation issues.
Done and I'm happy with the results.
On Friday, 21 April 2017 at 18:54:38 UTC, David Sanders wrote:
Thank-you for your input. With your help, I was able to figure
out number whether a type is an instantiation of
std.variant.Algebraic.
Now, I need help on concatenating Template Sequence Parameters.
See the block comments below.
On Fri, Apr 21, 2017 at 07:17:32PM +, Adam D. Ruppe via Digitalmars-d-learn
wrote:
> On Friday, 21 April 2017 at 19:09:25 UTC, Johan Fjeldtvedt wrote:
> > void foo(string s) {
> > enum es = tuple("a", "b", "c");
> > switch (s) {
> > foreach (e; es) {
> > case e:
> >
On Friday, 21 April 2017 at 19:17:32 UTC, Adam D. Ruppe wrote:
On Friday, 21 April 2017 at 19:09:25 UTC, Johan Fjeldtvedt
wrote:
void foo(string s) {
enum es = tuple("a", "b", "c");
switch (s) {
foreach (e; es) {
case e:
writeln("matched ", e);
break
On Friday, 21 April 2017 at 19:09:25 UTC, Johan Fjeldtvedt wrote:
void foo(string s) {
enum es = tuple("a", "b", "c");
switch (s) {
foreach (e; es) {
case e:
writeln("matched ", e);
break;
}
Let me remove some surrounding stuff and ask you wha
On Fri, Apr 21, 2017 at 06:54:38PM +, David Sanders via Digitalmars-d-learn
wrote:
[...]
> Now, I need help on concatenating Template Sequence Parameters. See
> the block comments below.
[...]
> } else static if (is(T _ == VariantN!V, V...)) {
> static if(is(U _ == VariantN
I was a bit surprised to find out
(https://forum.dlang.org/post/csiwyetjkttlxxnwn...@forum.dlang.org) that compile time foreach-loops can be used inside switch-statements. I tried the following:
import std.stdio;
import std.typecons;
void foo(string s) {
enum es = tuple("a", "b", "c");
On Friday, 21 April 2017 at 17:33:22 UTC, Meta wrote:
On Friday, 21 April 2017 at 16:31:37 UTC, H. S. Teoh wrote:
On Fri, Apr 21, 2017 at 04:16:30PM +, David Sanders via
Digitalmars-d-learn wrote:
I'm trying to do algebra with types ala
http://chris-taylor.github.io/blog/2013/02/10/the-alge
On Friday, 21 April 2017 at 11:40:45 UTC, Mike Parker wrote:
On Friday, 21 April 2017 at 10:54:26 UTC, سليمان السهمي
(Soulaïman Sahmi) wrote:
Is there an htod for linux or an equivalent that works with
Cpp, there is dstep but it does not support Cpp.
From the very bottom of the htod doc page [
On Friday, 21 April 2017 at 12:57:25 UTC, Adam D. Ruppe wrote:
But I didn't realize your thing was a literal example from the
docs. Ugh, can't even trust that.
Which was a larger portion of why I was confused by it all than
otherwise.
Still, it's much easier to salvage if I knew how the memo
On Friday, 21 April 2017 at 16:31:37 UTC, H. S. Teoh wrote:
On Fri, Apr 21, 2017 at 04:16:30PM +, David Sanders via
Digitalmars-d-learn wrote:
I'm trying to do algebra with types ala
http://chris-taylor.github.io/blog/2013/02/10/the-algebra-of-algebraic-data-types/
Below you will find my a
You may also want to try dstep - I just recently used that tool
for the first time, and it worked really well (required a bit of
tweaking of the source and result files though, but nothing
major).
=> https://github.com/jacob-carlborg/dstep
On Fri, Apr 21, 2017 at 04:16:30PM +, David Sanders via Digitalmars-d-learn
wrote:
> I'm trying to do algebra with types ala
> http://chris-taylor.github.io/blog/2013/02/10/the-algebra-of-algebraic-data-types/
>
> Below you will find my attempts at "adding" types in D. I've outlined the
> pa
I'm trying to do algebra with types ala
http://chris-taylor.github.io/blog/2013/02/10/the-algebra-of-algebraic-data-types/
Below you will find my attempts at "adding" types in D. I've
outlined the parts I'm having trouble with using block comments.
1) How do I figure out whether a type is an
I think we need a dub package for the cpp standard library. If
somebody has managed to get that together, it would be a great
step towards better cpp interoperability.
On Friday, 21 April 2017 at 11:37:07 UTC, Mike Parker wrote:
sc.ini manually is the better option if you don't need or want
the 2015 build tools.
Thanks!
Nevertheless I think it would be good that the supported version
of VS is documented on the website of DMD, just like it is on
VisualD's.
On Friday, 21 April 2017 at 11:18:55 UTC, Era Scarecrow wrote:
So that's what's going on. But if I have to dup the blocks
then I have the same problem as before with limited memory
issues. I kinda wish more there was the gz_open that is in the
C interface and let it deal with the decompression
Martin Tschierschke wrote:
i doubt so.
So my "solution" on how to get a short cut for using:
writeln(mixin(interp!"${name} you are app. ${age*365} days old"));
..
NEVER. EVER. USE. THE. FOLOWING. IN. YOUR. CODE.
NEVER!!!
import std.stdio;
mixin template usesexpand() {
import std.f
On Friday, 21 April 2017 at 12:10:04 UTC, Mike Parker wrote:
The only thing I'm aware of is Binderoo [1]. According to the
currently skinny wiki, binderoo_util [2] can be used to
generate bindings if you're invested in using the whole set up.
Ethan's scheduled to give a talk about it on Day 2 o
On Friday, 21 April 2017 at 12:04:02 UTC, سليمان السهمي
(Soulaïman Sahmi) wrote:
On Friday, 21 April 2017 at 11:40:45 UTC, Mike Parker wrote:
"No Linux version."
That's a shame, any alternative with cpp support? It's quite
painful to "port" something ubiquitous like std::string by
hand. base
On Friday, 21 April 2017 at 11:58:13 UTC, Martin Tschierschke
wrote:
On Friday, 21 April 2017 at 10:31:46 UTC, ketmar wrote:
biozic wrote:
I thought way to complicated:
Just define the string at top:
enum exho="auto mixinter(string x)(){return mixin(interp!x);}
auto exho(string x)(){return
m
On Friday, 21 April 2017 at 11:40:45 UTC, Mike Parker wrote:
"No Linux version."
That's a shame, any alternative with cpp support? It's quite
painful to "port" something ubiquitous like std::string by hand.
base_string.h is ugly, is arcane, even a parser would have a hard
time with it. Hopef
On Friday, 21 April 2017 at 10:31:46 UTC, ketmar wrote:
biozic wrote:
On Friday, 21 April 2017 at 09:42:33 UTC, ketmar wrote:
Martin Tschierschke wrote:
Is it possible to define an alias for something like
mixin(import("local_function_file.d"));
to write only
use_local_function;
whic
On Friday, 21 April 2017 at 10:54:26 UTC, سليمان السهمي
(Soulaïman Sahmi) wrote:
Is there an htod for linux or an equivalent that works with
Cpp, there is dstep but it does not support Cpp.
From the very bottom of the htod doc page [1]:
"No Linux version."
https://dlang.org/htod.html
On Friday, 21 April 2017 at 11:23:16 UTC, XavierAP wrote:
Visual D has just added support for VS 2017 (kudos), whereas
before I had to stick with 2015 at the latest. But DMD has an
additional dependency on VS (for x64), and it is not
documented, as far as I've been able to find, which versions.
On Friday, 21 April 2017 at 08:36:12 UTC, Nick Treleaven wrote:
Converting from char types -> integers, whilst (arguably) bug
prone, at least is numerically sound. So perhaps we could
disallow uint -> dchar, which is unsound.
That is in the general case - when VRP can prove an integer fits
wi
Visual D has just added support for VS 2017 (kudos), whereas
before I had to stick with 2015 at the latest. But DMD has an
additional dependency on VS (for x64), and it is not documented,
as far as I've been able to find, which versions.
So I just tried, and now the DMD Windows installer compl
On Thursday, 20 April 2017 at 20:24:15 UTC, Adam D. Ruppe wrote:
In short, byChunk reuses its buffer, and std.zlib holds on to
the pointer. That combination leads to corrupted data.
Easiest fix is to .dup the chunk...
So that's what's going on. But if I have to dup the blocks then
I have th
Is there an htod for linux or an equivalent that works with Cpp,
there is dstep but it does not support Cpp.
biozic wrote:
On Friday, 21 April 2017 at 09:42:33 UTC, ketmar wrote:
Martin Tschierschke wrote:
Is it possible to define an alias for something like
mixin(import("local_function_file.d"));
to write only
use_local_function;
which will be translated to: mixin(import("local_function_fil
On Friday, 21 April 2017 at 09:42:33 UTC, ketmar wrote:
Martin Tschierschke wrote:
Is it possible to define an alias for something like
mixin(import("local_function_file.d"));
to write only
use_local_function;
which will be translated to:
mixin(import("local_function_file.d"));
(this
Martin Tschierschke wrote:
Is it possible to define an alias for something like
mixin(import("local_function_file.d"));
to write only
use_local_function;
which will be translated to: mixin(import("local_function_file.d"));
(this additionally needs the file local_function_file.d in sourc
On Friday, April 21, 2017 09:31:52 Martin Tschierschke via Digitalmars-d-
learn wrote:
> Is it possible to define an alias for something like
>
> mixin(import("local_function_file.d"));
>
> to write only
>
> use_local_function;
>
> which will be translated to:
> mixin(import("local_function_fil
Is it possible to define an alias for something like
mixin(import("local_function_file.d"));
to write only
use_local_function;
which will be translated to:
mixin(import("local_function_file.d"));
(this additionally needs the file local_function_file.d in
source/ +
-J./source as paramete
On Thursday, 20 April 2017 at 11:05:00 UTC, Nick Treleaven wrote:
On Wednesday, 19 April 2017 at 14:50:38 UTC, Stanislav Blinov
wrote:
Because integrals implicitly convert to characters of same
width (byte -> char, short -> wchar, int -> dchar).
Despite char.min > byte.min, char.max < byte.max
On Wednesday, 19 April 2017 at 14:50:38 UTC, Stanislav Blinov
wrote:
On Wednesday, 19 April 2017 at 14:36:13 UTC, Nick Treleaven
Why is it legal to append an integer?
Because integrals implicitly convert to characters of same
width (byte -> char, short -> wchar, int -> dchar).
Huh... I had
36 matches
Mail list logo