On Monday, 8 November 2021 at 01:16:25 UTC, rikki cattermole
wrote:
On 08/11/2021 11:34 AM, Imperatorn wrote:
On Sunday, 7 November 2021 at 22:19:08 UTC, russhy wrote:
If i remember correctly, all you have to do is:
dub build --arch=x86_64-pc-windows-msvc --compiler=ldc2
Is this
On Friday, 5 November 2021 at 18:13:03 UTC, Imperatorn wrote:
On Friday, 5 November 2021 at 18:11:35 UTC, Luis wrote:
There is a obvious way to crosscompile a dub project to
Windows from a Linux dev machine ?
Wine
Ideally should be something like `dub build -target=x64-windows
There is a obvious way to crosscompile a dub project to Windows
from a Linux dev machine ?
On Sunday, 4 July 2021 at 10:07:08 UTC, jfondren wrote:
On Sunday, 4 July 2021 at 08:24:36 UTC, Luis wrote:
Dennis's explanation makes the most sense:
writeln can throw an Exception, so its presence prevents
nothrow inference, which otherwise permits the (not intended to
be catchable
On Saturday, 3 July 2021 at 22:52:39 UTC, frame wrote:
On Saturday, 3 July 2021 at 22:04:04 UTC, Luis wrote:
scope(exit) it's syntactic sugar for a classic `try {} finally
{}` . The documentation says that must be executed.
It works if you replace printf() with writeln() or use
writeln
On Saturday, 3 July 2021 at 20:46:00 UTC, Steven Schveighoffer
wrote:
On 7/3/21 4:08 PM, frame wrote:
On Saturday, 3 July 2021 at 17:39:18 UTC, Steven Schveighoffer
wrote:
But in practice, the compiler does not have to clean up
anything when an `Error` is thrown. Whether it does or not is
On Saturday, 3 July 2021 at 17:47:47 UTC, Dennis wrote:
On Saturday, 3 July 2021 at 17:20:47 UTC, Luis wrote:
scope(exit) inside of a anonymous functions, it's never called.
I think the compiler infers the function `nothrow` since you
don't throw any `Exception`, only an `Error`. Errors
This is intentional ?
```
should(function void() {
auto emptyStack = SimpleStack!int();
scope(exit) emptyStack.free; // <= This is never
called
emptyStack.reserve(16);
emptyStack.top;
}).Throw!RangeError;
```
scope(exit) inside
On Tuesday, 16 June 2020 at 06:19:51 UTC, Joel wrote:
I've tired different unit test libraries, but they jump out on
errors instead of just adding to failed numbers.
I'm thinking like this:
```
@("dummy");
unittset {
0.shouldEqual(0);
1.shouldEqual(2);
2.shouldEqual(3);
}
```
Test:
On Friday, 12 June 2020 at 18:18:25 UTC, Per Nordlöw wrote:
When I build my project as
dub run --compiler=dmd --build=unittest
it crashes as
Performing "unittest" build using dmd for x86_64.
phobos-next ~master: building configuration "library"...
Segmentation fault (core dumped)
dmd
On Saturday, 6 June 2020 at 08:42:22 UTC, WebFreak001 wrote:
On Saturday, 6 June 2020 at 08:06:02 UTC, Luis wrote:
On Friday, 5 June 2020 at 18:13:52 UTC, WebFreak001 wrote:
[...]
It isn't working correctly on my case :
I get this error :
Performing "unittest" build using dmd
On Friday, 5 June 2020 at 18:13:52 UTC, WebFreak001 wrote:
To build before running the debugger, add the following task to
your task definitions file (Ctrl-Shift-B):
{
"label": "dub build", // <-- add a good name here
"type": "dub",
"run": false,
"buildType":
So I actually managed to "debug" my unittests but It requires
that I run previsuly "dub test" on console, so the executable is
update. As I understand, I need to setup a task to be prelaunched
by debug to generate the unittest executable, but I don't know
how setup it correctly. I only manage
On Wednesday, 27 May 2020 at 10:30:36 UTC, wjoe wrote:
Could you please elaborate why checked exceptions are more
annoying?
Have like 3 functions : A calls B, B calls C .
Imagine that now you need to throw a checked exception on C, that
before wasn't necessary.
You need to add the
On Tuesday, 2 June 2020 at 07:32:56 UTC, BoQsc wrote:
I want to read a file, put it into an array, make some search
and replace on the content and output the modified text.
However Associative Arrays seem to be unsorted by default.
Should I drop the Associative Arrays and use something else?
On Sunday, 31 May 2020 at 20:04:11 UTC, mw wrote:
Thanks.
For the colored console logger, I'm using this one:
https://code.dlang.org/packages/colored-logger
so far so good. (I prefer to use library, instead of reinvent
my own wheels :-).
I dind't know that exists.
On Saturday, 30 May 2020 at 18:17:21 UTC, mw wrote:
A related question: how to log to multiple destinations? e.g.
both console & log file? any examples?
Thanks.
```D
auto multiLogger = new MultiLogger();
multiLogger.insertLogger("console", new FileLogger(stdout,
LogLevel.all));
Lets take this example code (https://run.dlang.io/is/Vkpx9j) :
´´´D
import std;
void main()
{
}
class ExampleC
{
int x;
this (int x) @safe
{
this.x = x;
}
override bool opEquals(Object o) const @trusted
{
if (ExampleC rhs = cast(ExampleC)o) {
return this.x == rhs.x;
On Saturday, 23 May 2020 at 09:27:46 UTC, Tim wrote:
Hi all, I'm a little new to D and I'm wondering how I can store
a reference to the calling object. I want to create a reference
to an object's parent so that each time I go to update the
sprite, it is able to grab its position from the
So, I'm writing my own implementation of sparse sets, and I take
as reference emsi_containers for allocator usage. I saw that they
have disabled postblit operator... But i don't understand exactly
why. In special, when they implement InputRange over the
containers, but having disabled
On Sunday, 17 May 2020 at 10:19:38 UTC, Russel Winder wrote:
I am experimenting with using manual control of the Glib event
loop using the pending and iteration methods on the default
MainContext within each unit- threaded test. The alternative of
running a GTK application and then putting the
There is a way to make to ignore some branchs and tags?
Actually it's pretty annoying when someone publish a fork, and
spams with "does not match the original package name" on older
tags.
On Tuesday, 12 May 2020 at 20:40:35 UTC, Adam D. Ruppe wrote:
A default argument of void is a common way to do it
template foo(T = void) {
static if(is(T == void)) { not given } else { use T }
}
Perfect! Works as I desired.
I'm trying to make a SparseSet that on function of a optional
type parameter, could alongside the index set, store other data.
So I need a way to declare a optional type template parameter.
I prototyped this stuff on run.dlang, but I like know if there is
a better way :
Sorry ... wrong link. This is the correct :
https://run.dlang.io/is/D2iCP0
On Wednesday, 22 April 2020 at 10:32:48 UTC, Russel Winder wrote:
I ended up creating the following project structure:
.
├── dub.sdl
├── dub.selections.json
├── source
│ ├── arcam_protocol.d
│ └── main.d
├── tests
│ └── integration_tests.d
└── test_support
└── mock_avr850
└──
On Thursday, 29 June 2017 at 12:00:53 UTC, Simon Bürger wrote:
Thanks a lot for your comments.
On Wednesday, 28 June 2017 at 23:56:42 UTC, Stefan Koch wrote:
[...]
This is only happening on CTFE ? Enforcing to use the old 8086
FPU for any float/double operation would give a lot performance
On Tuesday, 8 March 2016 at 15:43:28 UTC, rcorre wrote:
On Monday, 7 March 2016 at 22:47:13 UTC, Luis wrote:
I try to grab dstep with dub fetch step (dub version 0.9.24,
built on Aug 19 2015, on Ubuntu), and try to run dub build
step. I can confirm that on my machine takes around 5 seconds
On Monday, 7 March 2016 at 18:58:55 UTC, ciechowoj wrote:
dub --version
DUB version 0.9.24+161-gb9ce700, built on Feb 23 2016
`dub.json` is `dub.json` of dstep
`dub test --skip-registry=all`
Do not helps.
I try to grab dstep with dub fetch step (dub version 0.9.24,
built on Aug 19 2015, on
On Monday, 7 March 2016 at 09:18:37 UTC, ciechowoj wrote:
I'm using `dub` to build project. And every time I run `dub` it
seems to check if dependencies are up to date, which takes some
time. Is there a way to switch of that checking? Or any other
way to speed up building process? It really
On Wednesday, 2 March 2016 at 04:12:13 UTC, Mike Parker wrote:
On Wednesday, 2 March 2016 at 01:39:13 UTC, David G. Maziero
wrote:
Consider the following function:
void RenderText( FontBMP font, int x, int y, const char* text )
{
for( int r=0; text[r]!='\0'; ++r )
{
On Thursday, 25 February 2016 at 20:55:33 UTC, Suliman wrote:
On Thursday, 25 February 2016 at 19:09:59 UTC, Suliman wrote:
Where to store shared classes?
{
"name": "123",
"authors": [
"Suliman"
],
"description": "A minimal D application.",
On Wednesday, 24 February 2016 at 11:17:27 UTC, Tanel Tagaväli
wrote:
Sorry for the confusing state of the codebase.
Only the saw wave generator is currently functional, the `saw`
and `sine` functions are not used and should be left out of
analysis.
Also, audio output is only to ALSA.
Be
On Friday, 5 February 2016 at 09:36:37 UTC, Andrea Fontana wrote:
On Wednesday, 3 February 2016 at 22:45:47 UTC, Timon Gehr wrote:
I would use enum forceCTFE(alias expr)=expr; though. With
alias it won't force compile-time evaluation of expressions
that can be interpreted as symbols.
I've a
On Monday, 30 November 2015 at 20:27:51 UTC, Zardoz wrote:
On Monday, 30 November 2015 at 16:54:43 UTC, Sönke Ludwig wrote:
Am 24.11.2015 um 19:51 schrieb Zardoz:
Platform specifications are currently not supported for
dependencies due to the way the dependency resolver works.
However, it is
On Friday, 22 January 2016 at 06:53:29 UTC, mzf wrote:
D code:
auto arr = ["b1=1", "b=2","a1=1", "a=2"];
writeln(arr.sort());
output:["a1=1", "a=2", "b1=1", "b=2"]
C# code:
var arr = new string[]{ "b1=1", "b=2", "a1=1", "a=2" };
Array.Sort(arr);
output:["a=2","a1=1","b=2","b1=1"]
I
On Monday, 11 January 2016 at 06:53:51 UTC, Benjamin Thaut wrote:
Out of curiosity, why do you pass "-m64" 6 times to dmd? Once
would be enough.
I saw VisualD (dub generated project file) doing that with the
latest version of Visual Studio comunnity, when I change to 64
bit building.
On Sunday, 10 January 2016 at 06:35:34 UTC, rsw0x wrote:
On Sunday, 10 January 2016 at 02:51:57 UTC, WhatMeWorry wrote:
Just translating some simple C++/glm/opengl tutorial code to
D/gl3n/opengl and I'm coming across more friction than I
expected. I've got a square centered at my window
On Monday, 11 January 2016 at 10:04:29 UTC, Luis wrote:
On Sunday, 10 January 2016 at 06:35:34 UTC, rsw0x wrote:
On Sunday, 10 January 2016 at 02:51:57 UTC, WhatMeWorry wrote:
Just translating some simple C++/glm/opengl tutorial code to
D/gl3n/opengl and I'm coming across more friction than
On Sunday, 3 January 2016 at 17:30:15 UTC, Dibyendu Majumdar
wrote:
Does CMake recognise D in the enable_language command?
If not is there a workaround?
Thanks and Regards
Dibyendu
I suggest use dub instead of cmake. I did a try to use cmake some
time ago (a few years ago, before dub), and
On Monday, 4 January 2016 at 14:31:04 UTC, TheDGuy wrote:
Hello,
i use GTKD to draw some stuff on a DrawingArea. Because it
needs some time to calculate i want to outsource those
calculation so that the GUI doesn't freeze.
I tried it with "std.concurrency" like this:
bool
On Sunday, 20 December 2015 at 01:17:50 UTC, Basile B. wrote:
On Saturday, 19 December 2015 at 14:16:23 UTC, TheDGuy wrote:
is it possible to set the color of a single pixel with Cairo?
Not like you would do with a classic canvas (2d grid), because
colors are applied with `cairo_fill()` and
On Thursday, 26 November 2015 at 11:00:28 UTC, SpacenJasset wrote:
Hello,
I am trying to build against the version 3.2.1 of gtk bindings
in the dub repository. The build system has built the
gtkd-3.lib library file, but doesn't not appear to want to link
it to anything else. It gets stuck
ref2401 wrote:
i have an array of ubytes. how can i convert two adjacent ubytes
from the array to an integer?
pseudocode example:
ubyte[5] array = createArray();
int value = array[2..3];
is there any 'memcpy' method or something else to do this?
Try to use littleEndianToNative or
Thanks! It's very useful.
Ali Çehreli wrote:
synchronized (job) {
*job.slice ~= appendValue;
}
So shared, at least share data across threads. And using synchronized( )
I could do lock-based access to shared data.
I'm trying to implement a clock thread that sends messages and get
blocked when the message queue it's full.
So I try this:
void func() {
int n;
while (1) {
receive( (int i) { writeln(n, : Received the number , i); n++;}
);
}
}
void clock() {
receive((Tid tid) {
while (1) {
Auto response :
the main thread ends, and It signal func to end, so It never receive
any message from clock. I fix it, doing that main sleep 1000 seconds
after sending func Tid to clock
Luis Panadero Guardeño wrote:
I'm trying to implement a clock thread that sends messages and get
blocked
What is the status of shared types ?
I try it with gdmd v4.6.3
And I not get any warring/error when I do anything over a shared variable
without using atomicOp. It's normal ?
shared ushort ram[ram_size];
ram[i] = cast(ushort) (bytes[0] | bytes[1] 8);
--
I'm afraid that I have a
PM, luis wrote:
There are any RPC module for D ??
I implemented support for Apache Thrift during last summer's GSoC, it's
currently under review for inclusion into Thrift trunk:
http://klickverbot.at/code/gsoc/thrift/
David
El Tue, 31 Jan 2012 00:33:36 +0100, David Nadlinger escribió:
On 1/31/12 12:29 AM, Zardoz wrote:
At least I can say that the Tutorial client server works
(async_client not compile) :) . For me it's enough .
Because you don't have libevent installed (the tutorial makefile doesn't
have
There are any RPC module for D ??
Thu, 22 Oct 2009 13:04:55 -0400, bearophile escreveu:
Luis P. Mendes:
I'm about to begin a project on artificial intelligence, decision trees
and some other algorithmic stuff that needs runtime and development
speed.
Very good, D sounds fit for such kind of code. If you need development
52 matches
Mail list logo