On Wednesday, 23 March 2016 at 12:21:33 UTC, Ozan wrote:
Hi
Enterprise applications in productive environments requires
smooth updating mechanisms without recompiling or reinstalling.
It's not possible to stop an enterprise application, then run
"dub --reforce" and wait until finish. Mostly
On 2016-03-23 18:15, Jesse Phillips wrote:
Do you have an example of this being done in any other language?
In Erlang it's possible to hot swap code. I'm not sure how it works
though. But if we're talking servers, the easiest is to have multiple
instances and restart one at the time with
On 22.03.2016 16:56, ag0aep6g wrote:
I've filed an issue: https://issues.dlang.org/show_bug.cgi?id=15821
And it's been fixed:
https://github.com/D-Programming-Language/druntime/pull/1519
Since the issue was a regression, the fix was made against the stable
branch. It's going to be in the
Consider the `coerce` method:
http://dpldocs.info/experimental-docs/std.variant.VariantN.coerce.html
Example:
import std.variant;
class A {}
class B : A {}
void main()
{
A b = new B;
auto bb = Variant(b).coerce!B;
assert (bb !is null);
}
On Wed, 23 Mar 2016 12:21:33 +, Ozan wrote:
> Enterprise applications in productive environments requires smooth
> updating mechanisms without recompiling or reinstalling.
The industry standard is to build on a build server and stop the
application to update, but to have enough redundancy
On Wednesday, 23 March 2016 at 03:17:05 UTC, Hanh wrote:
Thanks for your help everyone.
I agree that the issue is due to the misusage of an InputRange
but what is the semantics of 'take' when applied to an
InputRange? It seems that calling it invalidates the range; in
which case what is the
Say:
module one;
void func(int a){}
/
module two;
import one;
void func(float a){}
Is there a way to get both func() in module two?
a = a + 1
a is const, a + 1 is const, yet a can't be assigned to a + 1. And
I think the reason is like...
const(int) a = 23;
while(something()) {
a = a + 1;
}
in the first iteration, a is set to 23, and the value of "a + 1"
is 24, but where is the computer gonna store that 24? It can't
On 23.03.2016 21:52, cy wrote:
const(int)[2] a = [23,24];
const(int)* b = a;
Should be: const(int)* b = a.ptr;
writeln(," always constant");
writeln(a, " always constant");
There's some subtlety here. `a` itself is not const, but its elements
are. `a` being a fixed-sized array, you can't
On Tuesday, 22 March 2016 at 07:35:49 UTC, ZombineDev wrote:
If the object is larger than the size of a register on the
target machine, it is implicitly passed by ref
That's incorrect. As Johan pointed out, this is somewhat true for
the Win64 ABI (but it firstly copies the argument before
halp
There's a module that tries to define complex operations on both
const and non-const structs, since it's the same operation for
both. So every function that invokes those operations is
copy-pasted twice, just with "const" added. Switching to inout to
eliminate that huge amount of code
On 23.03.2016 22:26, ag0aep6g wrote:
On 23.03.2016 22:18, cy wrote:
On Wednesday, 23 March 2016 at 21:10:49 UTC, ag0aep6g wrote:
[...]
b = new int(*b + 1);
Here "b" is pointing to mutable heap allocated data, which got cast to
constant.
with b = b + 1, it's still constant memory.
It's
On Wednesday, 23 March 2016 at 19:18:50 UTC, Chris Wright wrote:
Consider the `coerce` method:
http://dpldocs.info/experimental-docs/std.variant.VariantN.coerce.html
Example:
import std.variant;
class A {}
class B : A {}
void main()
{
A b = new B;
auto bb = Variant(b).coerce!B;
Is there any way in dub to specify that a module should only be
linked and compiled for DMD and not for LDC?
I am using the Economic Modeling containers library, and because
it uses std.experimental.allocator, it can't be used with LDC
through dub. I have coded in such a way with static if's
On Wednesday, 23 March 2016 at 21:10:49 UTC, ag0aep6g wrote:
Just to be 100% clear: you're adding to the pointer here,
No, that's what I meant to do.
b = new int(*b + 1);
Here "b" is pointing to mutable heap allocated data, which got
cast to constant.
with b = b + 1, it's still constant
On 23.03.2016 22:18, cy wrote:
On Wednesday, 23 March 2016 at 21:10:49 UTC, ag0aep6g wrote:
[...]
b = new int(*b + 1);
Here "b" is pointing to mutable heap allocated data, which got cast to
constant.
with b = b + 1, it's still constant memory.
It's stack memory. Its constness isn't any
On Wednesday, 23 March 2016 at 11:57:49 UTC, ParticlePeter wrote:
I need to parse an ascii with multiple tokens. The tokens can
be seen as keys. After every token there is a bunch of lines
belonging to that token, the values.
The order of tokens is unknown.
I would like to read the file in as
On Wednesday, 23 March 2016 at 09:06:37 UTC, Rene Zwanenburg
wrote:
Adam's dom.d will get you pretty far. I believe it can also
handle documents that aren't completely well-formed.
https://github.com/adamdruppe/arsd/blob/master/dom.d
HTML-docs here:
I need to parse an ascii with multiple tokens. The tokens can be
seen as keys. After every token there is a bunch of lines
belonging to that token, the values.
The order of tokens is unknown.
I would like to read the file in as a whole string, and split the
string with:
splitter(fileString,
On Wednesday, 23 March 2016 at 11:57:49 UTC, ParticlePeter wrote:
Stupid typos:
I need to parse an ascii
file
with multiple tokens. ...
...
to do this with a lazy result range and
without
new allocations.
On Wednesday, 23 March 2016 at 12:21:33 UTC, Ozan wrote:
Has someone experience with handling upgrading/updating D-Apps
on the fly?
The way I always did it was to simply have old and new running
side-by-side in the transition.
So, without stopping the old version, compile the new one and
Hi
Enterprise applications in productive environments requires
smooth updating mechanisms without recompiling or reinstalling.
It's not possible to stop an enterprise application, then run
"dub --reforce" and wait until finish. Mostly only few functions
need to be replaced.
Has someone
On Saturday, 19 March 2016 at 18:24:38 UTC, Marc Schütz wrote:
On Saturday, 19 March 2016 at 09:55:13 UTC, Lucien wrote:
const int MAX = 64;
Socket[] sockets = new Socket[MAX];
string ipb = "192.168.0.";
for (int i = 1; i < MAX; i++) {
Here's the reason for your SEGV: You
On 03/23/2016 02:31 PM, cy wrote:
> struct Someop(Type) {
>Type thing;
>void foo() {
> thing.bar();
>}
> }
>
> struct Foo {
>void bar() {
> import std.stdio: writeln;
> writeln("bar");
>}
> }
>
> struct Bar {
>void thingy(inout(Foo) foo) inout {
> auto
struct Thing {
@disable this(this);
}
...
items ~= move(item); // Error: struct Thing is not copyable
because it is annotated with @disable
++items.length
move(items[$-1],item); // Error: struct Thing is not copyable
because it is annotated with @disable
appender(items).put(move(item));
On 24.03.2016 00:26, cy wrote:
++items.length
move(items[$-1],item); // Error: struct Thing is not copyable because it
is annotated with @disable
You got the order of arguments wrong here. Source goes first, target
second. Works for me with `move(item, items[$-1]);`.
On Wednesday, 23 March 2016 at 20:30:04 UTC, Jack Stouffer wrote:
Is there any way in dub to specify that a module should only be
linked and compiled for DMD and not for LDC?
I am using the Economic Modeling containers library, and
because it uses std.experimental.allocator, it can't be used
On 24.03.2016 00:44, ag0aep6g wrote:
On 24.03.2016 00:26, cy wrote:
++items.length
move(items[$-1],item); // Error: struct Thing is not copyable because it
is annotated with @disable
You got the order of arguments wrong here. Source goes first, target
second. Works for me with `move(item,
On Wednesday, 23 March 2016 at 18:10:05 UTC, ParticlePeter wrote:
Thanks Simen,
your tokenCounter is inspirational, for the rest I'll take some
time for testing.
My pleasure. :) Testing it on your example data shows it to work
there. However, as stated above, the documentation says it's
On Wednesday, 23 March 2016 at 08:01:36 UTC, Voitech wrote:
Hi Variant stores variant.type as not the "highest" in
hierarchy.
Yeah, it stores the static type. You can use it to get that then
do a normal dynamic cast to test for a more derived type.
On Wednesday, 23 March 2016 at 09:06:37 UTC, Rene Zwanenburg
wrote:
[...]
Adam's dom.d will get you pretty far. I believe it can also
handle documents that aren't completely well-formed.
https://github.com/adamdruppe/arsd/blob/master/dom.d
Thank you! This forum has an incredible fast auto
On Tuesday, 22 March 2016 at 13:46:41 UTC, stunaep wrote:
So what am I do to?
Just learn more about available containers and their semantics.
Maybe you don't need Array!T when there is a simple T[].
If you think you do need Array, then think about memory
management: where are you going to
On Wednesday, 23 March 2016 at 11:57:49 UTC, ParticlePeter wrote:
I need to parse an ascii with multiple tokens. The tokens can
be seen as keys. After every token there is a bunch of lines
belonging to that token, the values.
The order of tokens is unknown.
I would like to read the file in as
On Wednesday, 23 March 2016 at 15:17:18 UTC, Ozan wrote:
If I want to use a class or a function in a shared library, it
is necessary to use funny names like
"D7myclass10getMyClassFZC7myclass7MyClass".
Is it possible to get a list of all the names in shared
library? What is the schema behind
On Wednesday, 23 March 2016 at 14:20:12 UTC, Andrea Fontana wrote:
Any input => output example?
Sure, it is ensight gold case file format:
FORMAT
type: ensight gold
GEOMETRY
model: 1exgold2.geo**
VARIABLE
scalar per node: 1 Stress
Hi
If I want to use a class or a function in a shared library, it is
necessary to use funny names like
"D7myclass10getMyClassFZC7myclass7MyClass".
Is it possible to get a list of all the names in shared library?
What is the schema behind these names? Is there a listing for
"D7", "10",
On Wednesday, 23 March 2016 at 12:00:15 UTC, ParticlePeter wrote:
On Wednesday, 23 March 2016 at 11:57:49 UTC, ParticlePeter
wrote:
Stupid typos:
I need to parse an ascii
file
with multiple tokens. ...
...
to do this with a lazy result range and
without
new allocations.
Any input =>
On Wednesday, 23 March 2016 at 09:02:37 UTC, Martin Tschierschke
wrote:
Hello!
I want to set up a web robot to detect changes on certain web
pages or sites.
Any hint to similar projects or libraries at dub or git to look
at,
before starting to develop my own RegExp for parsing?
Best regards
On Wednesday, 23 March 2016 at 12:52:24 UTC, Adam D. Ruppe wrote:
On Wednesday, 23 March 2016 at 08:01:36 UTC, Voitech wrote:
Hi Variant stores variant.type as not the "highest" in
hierarchy.
Yeah, it stores the static type. You can use it to get that
then do a normal dynamic cast to test
On Wednesday, 23 March 2016 at 10:49:03 UTC, Nordlöw wrote:
HTML-docs here:
http://dpldocs.info/experimental-docs/arsd.dom.html
Indeed, though the docs are still a work in progress (the lib is
now about 6 years old, but until recently, ddoc blocked me from
using examples in the comments so
Fastq is a format for storing DNA sequences together with the
associated quality information often encoded in ascii characters.
It is typically made of 4 lines for example 2 fastq entries
would look like this.
@seq1
TTAAAT
+
?+BBB/DHH@
@seq2
GACCCTTTGCA
+
?+BHB/DIH@
I do not have a lot
On Wednesday, 23 March 2016 at 23:44:55 UTC, ag0aep6g wrote:
You got the order of arguments wrong here. Source goes first,
Oh, derp. Thanks. Right then... it works as expected.
On 2016-03-23 16:17, Ozan wrote:
Hi
If I want to use a class or a function in a shared library, it is
necessary to use funny names like
"D7myclass10getMyClassFZC7myclass7MyClass".
Is it possible to get a list of all the names in shared library? What is
the schema behind these names? Is there
On Wednesday, 23 March 2016 at 15:23:38 UTC, Simen Kjaeraas wrote:
Without a bit more detail, it's a bit hard to help.
std.algorithm.splitter has an overload that takes a function
instead of a separator:
import std.algorithm;
auto a = "a,b;c";
auto b = a.splitter!(e => e == ';'
On Wed, 23 Mar 2016 03:17:05 +, Hanh wrote:
> In Scala, 'take' consumes bytes from the iterator. So the same code
> would be buffer = range.take(N).toArray
import std.range, std.array;
auto bytes = byteRange.takeExactly(N).array;
There's also take(N), but if the range contains fewer than N
Hi Variant stores variant.type as not the "highest" in hierarchy.
Like this
A a= new A;
A b = new B; //B:A
Variant bVar=Variant(b);
bVar.type will be typeid(A) not typeid(B). Is this intentional ?
If so is there a way to get "concrete" type of "b" variable like
when passing to template
Hello!
I want to set up a web robot to detect changes on certain web
pages or sites.
Any hint to similar projects or libraries at dub or git to look
at,
before starting to develop my own RegExp for parsing?
Best regards
mt.
On Wednesday, 23 March 2016 at 09:02:37 UTC, Martin Tschierschke
wrote:
Hello!
I want to set up a web robot to detect changes on certain web
pages or sites.
Any hint to similar projects or libraries at dub or git to look
at,
before starting to develop my own RegExp for parsing?
Best regards
48 matches
Mail list logo