On Wednesday, 28 February 2018 at 05:09:03 UTC, psychoticRabbit
wrote:
On Wednesday, 28 February 2018 at 01:06:30 UTC, dark777 wrote:
Regex validates years bisexto and not bisextos in format:
const std::regex
pattern(R"(^(?:(?:(0?[1-9]|1\d|2[0-8])([-/.])(0?[1-9]|1[0-2]|[Jj](?:an|u[nl])|[Mm]a[ry
On Wednesday, 28 February 2018 at 01:06:30 UTC, dark777 wrote:
Regex validates years bisexto and not bisextos in format:
const std::regex
pattern(R"(^(?:(?:(0?[1-9]|1\d|2[0-8])([-/.])(0?[1-9]|1[0-2]|[Jj](?:an|u[nl])|[Mm]a[ry]|[Aa](?:pr|ug)|[Ss]ep|[Oo]ct|[Nn]ov|[Dd]ec|[Ff]eb)|(29|30)([-/.])(0?[13
On Wednesday, 28 February 2018 at 02:40:59 UTC, Nicholas Wilson
wrote:
On Wednesday, 28 February 2018 at 01:19:25 UTC, Enjoys Math
wrote:
[...]
For some reason, idk why, PyD is a dub source dependency (as
opposed to a library). If you add \path\to\pyd to the include
directory(?) dub variable
On Wednesday, 28 February 2018 at 01:19:25 UTC, Enjoys Math wrote:
Can't build now:
-- Build started: Project: categorytheorybackend,
Configuration: debug Win32 --
Building
C:\MyProjects\___ENJOYS_MATH\CategoryTheoryFrontend\CategoryTheoryBackend\categorytheorybackend.exe...
Error: Er
On Wednesday, 28 February 2018 at 00:18:17 UTC, Nicholas Wilson
wrote:
On Tuesday, 27 February 2018 at 23:59:10 UTC, Enjoys Math wrote:
I am making a library that will run very speedily in D (or,
failing that, C++) and do the backend work of a PyQt5 gui.
Was wondering the simplest route to acc
Can't build now:
-- Build started: Project: categorytheorybackend,
Configuration: debug Win32 --
Building
C:\MyProjects\___ENJOYS_MATH\CategoryTheoryFrontend\CategoryTheoryBackend\categorytheorybackend.exe...
Error: Error writing file
'obj\debug\dummy\dummy\dummy\dummy\dummy\categoryt
On Wednesday, 28 February 2018 at 01:10:36 UTC, Enjoys Math wrote:
Got it.
dub init myproject
from within my python frontend source dir will create a
subdirectory.
Then you do
dub generate visuald
from within the subdir myproject.
Got it.
dub init myproject
from within my python frontend source dir will create a
subdirectory.
Regex validates years bisexto and not bisextos in format:
const std::regex
pattern(R"(^(?:(?:(0?[1-9]|1\d|2[0-8])([-/.])(0?[1-9]|1[0-2]|[Jj](?:an|u[nl])|[Mm]a[ry]|[Aa](?:pr|ug)|[Ss]ep|[Oo]ct|[Nn]ov|[Dd]ec|[Ff]eb)|(29|30)([-/.])(0?[13-9]|1[0-2]|[Jj](?:an|u[nl])|[Mm]a[ry]|[Aa](?:pr|ug)|[Ss]ep|[Oo]c
On Wednesday, 28 February 2018 at 00:18:17 UTC, Nicholas Wilson
wrote:
On Tuesday, 27 February 2018 at 23:59:10 UTC, Enjoys Math wrote:
I am making a library that will run very speedily in D (or,
failing that, C++) and do the backend work of a PyQt5 gui.
Was wondering the simplest route to acc
On Tuesday, 27 February 2018 at 23:59:10 UTC, Enjoys Math wrote:
I am making a library that will run very speedily in D (or,
failing that, C++) and do the backend work of a PyQt5 gui. Was
wondering the simplest route to accomplish this, preferably in
ctypes calls.
Thanks.
http://code.dlang
On Tuesday, 27 February 2018 at 16:18:43 UTC, Stefan Koch wrote:
On Tuesday, 27 February 2018 at 16:17:20 UTC, Jonathan wrote:
I know Python's `with` statement can be used to have an
automatic close action:
```
with open("x.txt") as file:
#do something with file
#`file.close()`
I am making a library that will run very speedily in D (or,
failing that, C++) and do the backend work of a PyQt5 gui. Was
wondering the simplest route to accomplish this, preferably in
ctypes calls.
Thanks.
On Tuesday, 27 February 2018 at 21:54:34 UTC, Nathan S. wrote:
Cross-posting from the github issue
(https://github.com/libmir/mir-random/issues/77) with a
workaround (execute it at https://run.dlang.io/is/Swr1xU):
[snip]
Step in the right direction at least.
On Tuesday, 27 February 2018 at 22:17:25 UTC, Jonathan wrote:
On Tuesday, 27 February 2018 at 22:13:05 UTC, Jonathan wrote:
Is it possible to cast a 2d static length array to a 1d static
length array?
E.g.
int[2][2] a = [[1,2],[3,4]];
int[4]b = cast(int[4])a;
Is not the byte data in memor
On Tuesday, 27 February 2018 at 22:13:05 UTC, Jonathan wrote:
Is it possible to cast a 2d static length array to a 1d static
length array?
E.g.
int[2][2] a = [[1,2],[3,4]];
int[4]b = cast(int[4])a;
Is not the byte data in memory exactly the same?
*( [pos,size].ptr .cst!(void*) .cst!(int[
Is it possible to cast a 2d static length array to a 1d static
length array?
E.g.
int[2][2] a = [[1,2],[3,4]];
int[4]b = cast(int[4])a;
Is not the byte data in memory exactly the same?
Cross-posting from the github issue
(https://github.com/libmir/mir-random/issues/77) with a
workaround (execute it at https://run.dlang.io/is/Swr1xU):
I am not sure what the correct interface should be for this in
the long run, but for now you can use a wrapper function to
convert an ndv
On Tuesday, 27 February 2018 at 21:04:59 UTC, ag0aep6g wrote:
On 02/27/2018 09:59 PM, Radu wrote:
On Tuesday, 27 February 2018 at 20:51:25 UTC, ag0aep6g wrote:
On 02/27/2018 09:30 PM, Radu wrote:
[...]
[...]
[...]
So the bug is that somehow the templated version makes it so
there is an impl
On 2/27/18 3:59 PM, Radu wrote:
On Tuesday, 27 February 2018 at 20:51:25 UTC, ag0aep6g wrote:
On 02/27/2018 09:30 PM, Radu wrote:
enum Type { a };
struct S(Type t = Type.a)
{
this(Type)(Type t)
{
import std.stdio;
writeln("ctor called.");
}
}
void main()
{
On 02/27/2018 09:59 PM, Radu wrote:
On Tuesday, 27 February 2018 at 20:51:25 UTC, ag0aep6g wrote:
On 02/27/2018 09:30 PM, Radu wrote:
[...]
enum Type { a };
struct S(Type t = Type.a)
{
this(Type)(Type t)
{
import std.stdio;
writeln("ctor called.");
}
}
[...]
S
On Tuesday, 27 February 2018 at 20:51:25 UTC, ag0aep6g wrote:
On 02/27/2018 09:30 PM, Radu wrote:
enum Type { a };
struct S(Type t = Type.a)
{
this(Type)(Type t)
{
import std.stdio;
writeln("ctor called.");
}
}
void main()
{
auto x = S!(Type.a)(Type.a);
On 02/27/2018 09:30 PM, Radu wrote:
enum Type { a };
struct S(Type t = Type.a)
{
this(Type)(Type t)
{
import std.stdio;
writeln("ctor called.");
}
}
void main()
{
auto x = S!(Type.a)(Type.a);
void* y = &x;
auto z = (cast(S!(Type.a)) y);
}
Surpris
On Tuesday, 27 February 2018 at 16:55:27 UTC, Marc wrote:
[...]
So deep down the error is in that method which I call from
deserializeLine() function:
void setValue(T, V)(auto ref T aggregate, string field, V
value) {
writeln("setting {", field, "} to {", value,
I have this:
enum Type { a };
struct S(Type t = Type.a)
{
this(Type)(Type t)
{
import std.stdio;
writeln("ctor called.");
}
}
void main()
{
auto x = S!(Type.a)(Type.a);
void* y = &x;
auto z = (cast(S!(Type.a)) y);
}
Surprisingly the cast will actually c
yes, for classes you can use scoped:
import std.stdio;
import std.typecons : scoped;
class A
{
void saySomething()
{
writeln("Hi from A");
}
~this()
{
writeln("Destruct A");
}
}
void main()
{
with(scoped!A())
{
saySomething();
writeln("s
On 02/27/2018 11:56 AM, Steven Schveighoffer wrote:
On 2/27/18 11:37 AM, Nordlöw wrote:
On Tuesday, 27 February 2018 at 16:31:51 UTC, Steven Schveighoffer wrote:
Why not use null?
It's already used to indicate that a slot is free. :)
cast(void*)1 is likely to be unused.
-Steve
And to be
On 2/27/18 11:37 AM, Nordlöw wrote:
On Tuesday, 27 February 2018 at 16:31:51 UTC, Steven Schveighoffer wrote:
Why not use null?
It's already used to indicate that a slot is free. :)
cast(void*)1 is likely to be unused.
-Steve
On Tuesday, 27 February 2018 at 17:24:22 UTC, Nathan S. wrote:
On Tuesday, 27 February 2018 at 16:42:00 UTC, Nathan S. wrote:
On Tuesday, 27 February 2018 at 15:08:42 UTC, jmh530 wrote:
Nevertheless, it probably can't hurt to file an issue if you
can't get something like the first one to work.
On Tuesday, 27 February 2018 at 16:42:00 UTC, Nathan S. wrote:
On Tuesday, 27 February 2018 at 15:08:42 UTC, jmh530 wrote:
Nevertheless, it probably can't hurt to file an issue if you
can't get something like the first one to work. I would think
it should just work.
The problem is that `mir.r
On Tuesday, 27 February 2018 at 15:08:23 UTC, Stefan Koch wrote:
On Monday, 26 February 2018 at 18:01:07 UTC, Marc wrote:
I've tried both gdb and windbg debugger both it either get a
"received signal ?" from gdb or crash the GUI application
(windbg).
The error is:
core.exception.OutOfMemoryEr
On Tuesday, 27 February 2018 at 15:08:23 UTC, Stefan Koch wrote:
On Monday, 26 February 2018 at 18:01:07 UTC, Marc wrote:
I've tried both gdb and windbg debugger both it either get a
"received signal ?" from gdb or crash the GUI application
(windbg).
The error is:
core.exception.OutOfMemoryEr
On Tuesday, 27 February 2018 at 15:08:42 UTC, jmh530 wrote:
Nevertheless, it probably can't hurt to file an issue if you
can't get something like the first one to work. I would think
it should just work.
The problem is that `mir.random.ndvariable` doesn't satisfy
`mir.random.variable.isRandom
On Tuesday, 27 February 2018 at 16:31:51 UTC, Steven
Schveighoffer wrote:
Why not use null?
-Steve
It's already used to indicate that a slot is free. :)
On 2/27/18 9:13 AM, Nordlöw wrote:
Is `cast(void*)size_t.max` always an invalid address?
You mean, can it point at valid data? Possibly, but likely not. In my
past as an embedded developer, a lot of times the interrupt vectors are
stored at the end of address space.
Is so, could it be used
On Tuesday, 27 February 2018 at 16:18:43 UTC, Stefan Koch wrote:
On Tuesday, 27 February 2018 at 16:17:20 UTC, Jonathan wrote:
I know Python's `with` statement can be used to have an
automatic close action:
```
with open("x.txt") as file:
#do something with file
#`file.close()`
I know Python's `with` statement can be used to have an automatic
close action:
```
with open("x.txt") as file:
#do something with file
#`file.close()` called automatically
```
I know D's `with` statement does something different but is there
some sort of equivalent?
On Tuesday, 27 February 2018 at 16:17:20 UTC, Jonathan wrote:
I know Python's `with` statement can be used to have an
automatic close action:
```
with open("x.txt") as file:
#do something with file
#`file.close()` called automatically
```
I know D's `with` statement does somethi
On Tuesday, 27 February 2018 at 09:23:49 UTC, kerdemdemir wrote:
I need a classifier in my project.
Since it is I believe most easy to implement I am trying to
implement logistic regression.
I am trying to do the same as the python example:
https://beckernick.github.io/logistic-regression-fr
On Monday, 26 February 2018 at 18:01:07 UTC, Marc wrote:
I've tried both gdb and windbg debugger both it either get a
"received signal ?" from gdb or crash the GUI application
(windbg).
The error is:
core.exception.OutOfMemoryError@src\core\exception.d(696):
Memory allocation failed
How do
On Tuesday, 27 February 2018 at 14:06:19 UTC, Nicholas Wilson
wrote:
On Monday, 26 February 2018 at 18:01:07 UTC, Marc wrote:
I've tried both gdb and windbg debugger both it either get a
"received signal ?" from gdb or crash the GUI application
(windbg).
The error is:
core.exception.OutOfMemo
On Tuesday, 27 February 2018 at 09:20:21 UTC, Russel Winder wrote:
On Mon, 2018-02-26 at 20:28 +, King_DuckZ via
Digitalmars-d-learn wrote:
[…]
One [more] year ahead, and I found this old thread I had
forgotten about. In the meantime, trentforkert has stopped
(apparently) working on cmake
Is `cast(void*)size_t.max` always an invalid address?
Is so, could it be used to indicate removed/delete elements in
hash tables with open addressing and a key type being either a
pointer or class?
And will it work correctly with the GC?
On Monday, 26 February 2018 at 18:01:07 UTC, Marc wrote:
I've tried both gdb and windbg debugger both it either get a
"received signal ?" from gdb or crash the GUI application
(windbg).
The error is:
core.exception.OutOfMemoryError@src\core\exception.d(696):
Memory allocation failed
How do
On 2/26/18 6:34 PM, psychoticRabbit wrote:
On Sunday, 25 February 2018 at 14:52:19 UTC, Steven Schveighoffer wrote:
1 == 1.0, no?
no. at least, not when a language forces you to think in terms of types.
But you aren't. You are thinking in terms of text representation of
values (which is wh
On Tuesday, 27 February 2018 at 13:14:38 UTC, Mike Parker wrote:
On Tuesday, 27 February 2018 at 12:00:20 UTC, Kayomn wrote:
[...]
It *is* a version problem. The exception is a
SymbolLoadException, which means the loader found the library
just fine (you can see it in the file name, libglfw.
On Tuesday, 27 February 2018 at 12:00:20 UTC, Kayomn wrote:
derelict.util.exception.SymbolLoadException@../../.dub/packages/derelict-util-2.0.6/source/derelict/util/exception.d(35):
Failed to load symbol glfwSetWindowIcon from shared library /u
sr/lib/x86_64-linux-gnu/libglfw.so.3.1
I was read
Hi, I've been working on something using Windows and now I'm
attempting to build it on Linux with Dub, however I appear to be
having an issue.
import base.application;
import derelict.opengl3.gl3;
import derelict.glfw3.glfw3;
int main(string[] args) {
DerelictGL3.load();
vers
I need a classifier in my project.
Since it is I believe most easy to implement I am trying to
implement logistic regression.
I am trying to do the same as the python example:
https://beckernick.github.io/logistic-regression-from-scratch/
I need to data sets with which I will test.
This wo
On Mon, 2018-02-26 at 20:28 +, King_DuckZ via Digitalmars-d-learn
wrote:
> […]
>
> One [more] year ahead, and I found this old thread I had
> forgotten about. In the meantime, trentforkert has stopped
> (apparently) working on cmake, and dcarp's has failed me for
> projects larger than a co
50 matches
Mail list logo