On Saturday, 6 August 2022 at 18:22:45 UTC, Jan Allersma wrote:
I figured out a strategy to solve te problem:
1) Create a C++ function which will be called in D.
2) Build a static C++ library with CMake and add dependencies
(In my case: SDL libraries)
3) Create a new project (`dub init`).
4)
In the following struct (as an example, not real code):
```
struct TestArray(ulong element_n) {
int[element_n] elements;
this(string type)(ulong number) {
pragma(msg, "The type is: " ~ typeof(type).stringof);
}
}
```
I want to create it and be able to successfully initialize the
On Sunday, 7 August 2022 at 16:01:08 UTC, pascal111 wrote:
It's clear by working with D that it has the same bad point
like Pascal language; the "verbosity". Is there any plans in
future to make some shorthanded techniques that clean verbosity
from D?
In most cases this is a false
On Monday, 8 August 2022 at 02:45:54 UTC, Steven Schveighoffer
wrote:
And now, you tried to read it again! Which means you are trying
to read more data from an empty stream.
You need to either a) reopen the file, or b) do both in the
same loop.
-Steve
Steve! You are Legend!
**Thank
On 8/7/22 9:36 PM, vc wrote:
Hello, i have the following code, the flora contains a boolean zeus
in the DerivedThread the boolean zeus was set to true; but when i'm
trying to access it
outside the thread in main it returns me false; any thoughts ?
is zeus declared just as:
```d
bool zeus;
On 8/7/22 10:11 PM, ikelaiah wrote:
Hi,
I'm writing a program that reads a text file and launch my work URLs in it.
It worked fine, and very happy.
Then I added another `foreach` loop to count total number of lines.
After this, the main `foreach` won't work.
Does anyone know as to why this
On Monday, 8 August 2022 at 01:36:45 UTC, vc wrote:
Hello, i have the following code, the flora contains a boolean
zeus
in the DerivedThread the boolean zeus was set to true; but when
i'm trying to access it
outside the thread in main it returns me false; any thoughts ?
import flora;
class
Hi,
I'm writing a program that reads a text file and launch my work
URLs in it.
It worked fine, and very happy.
Then I added another `foreach` loop to count total number of
lines.
After this, the main `foreach` won't work.
Does anyone know as to why this happens?
I might have missed
Hello, i have the following code, the flora contains a boolean
zeus
in the DerivedThread the boolean zeus was set to true; but when
i'm trying to access it
outside the thread in main it returns me false; any thoughts ?
import flora;
class DerivedThread : Thread
{
this()
{
On Monday, 8 August 2022 at 00:40:11 UTC, TTK Ciar wrote:
On the other hand, I've noticed that D's idiomatic brevity can
be diluted by the extremely verbose function names used in the
standard library.
For long function names you can define short aliases, for syntax
you can't. So having
On Sunday, 7 August 2022 at 03:55:50 UTC, Emanuele Torre wrote:
On Sunday, 7 August 2022 at 01:22:18 UTC, pascal111 wrote:
[...]
They are quite different:
* `chain` gives you "range" (iterator) that starts from the
first element of `x` and ends at the last element of `y` (like
e.g. `zip` in
On Monday, 8 August 2022 at 00:11:33 UTC, pascal111 wrote:
I don't have specific code but it was a general notice. Take
Python as in example, the same program in Python doesn't cost
much code as D code, and of course by putting in accounts that
that I assume that there are some special tasks D
On Monday, 8 August 2022 at 00:18:12 UTC, Emanuele Torre wrote:
On Monday, 8 August 2022 at 00:11:33 UTC, pascal111 wrote:
[...]
You are just sounding like a troll now...
"troll" :) I like it!
That makes no sense:
"I assume that there are some special tasks D can do, while
Python can't
On Monday, 8 August 2022 at 00:15:48 UTC, pascal111 wrote:
On Sunday, 7 August 2022 at 23:44:26 UTC, Emanuele Torre wrote:
On Sunday, 7 August 2022 at 23:31:45 UTC, pascal111 wrote:
On Sunday, 7 August 2022 at 22:16:55 UTC, Emanuele Torre
wrote:
[...]
It seems complex, I didn't get it yet,
On Monday, 8 August 2022 at 00:20:53 UTC, pascal111 wrote:
On Monday, 8 August 2022 at 00:12:07 UTC, Emanuele Torre wrote:
On Sunday, 7 August 2022 at 23:48:22 UTC, pascal111 wrote:
[...]
I am very confused by this question.
That has nothing to do with the programming language: it has
all
On Monday, 8 August 2022 at 00:12:07 UTC, Emanuele Torre wrote:
On Sunday, 7 August 2022 at 23:48:22 UTC, pascal111 wrote:
I have no idea about GUI or Rad programming in D; it's not its
time, but I'm curious to know if D is fine supporting for
Arabic language in the GUI applications or we will
On Monday, 8 August 2022 at 00:11:33 UTC, pascal111 wrote:
On Sunday, 7 August 2022 at 23:53:36 UTC, Emanuele Torre wrote:
On Sunday, 7 August 2022 at 16:01:08 UTC, pascal111 wrote:
It's clear by working with D that it has the same bad point
like Pascal language; the "verbosity". Is there any
On Sunday, 7 August 2022 at 23:44:26 UTC, Emanuele Torre wrote:
On Sunday, 7 August 2022 at 23:31:45 UTC, pascal111 wrote:
On Sunday, 7 August 2022 at 22:16:55 UTC, Emanuele Torre wrote:
[...]
It seems complex, I didn't get it yet, I wished I didn't ask
about it :)
It's really trivial.
On Sunday, 7 August 2022 at 23:48:22 UTC, pascal111 wrote:
I have no idea about GUI or Rad programming in D; it's not its
time, but I'm curious to know if D is fine supporting for
Arabic language in the GUI applications or we will have some
issues like I met - in my experience - in Free
On Sunday, 7 August 2022 at 23:53:36 UTC, Emanuele Torre wrote:
On Sunday, 7 August 2022 at 16:01:08 UTC, pascal111 wrote:
It's clear by working with D that it has the same bad point
like Pascal language; the "verbosity". Is there any plans in
future to make some shorthanded techniques that
On Sunday, 7 August 2022 at 16:01:08 UTC, pascal111 wrote:
It's clear by working with D that it has the same bad point
like Pascal language; the "verbosity". Is there any plans in
future to make some shorthanded techniques that clean verbosity
from D?
Quote: "In terms of functionality,
On Sunday, 7 August 2022 at 23:44:26 UTC, Emanuele Torre wrote:
int[] arr = { 10, 12, 14 };
Oops, this is C++, not D: `int arr[] = { 10, 12, 14 };` =)
I have no idea about GUI or Rad programming in D; it's not its
time, but I'm curious to know if D is fine supporting for Arabic
language in the GUI applications or we will have some issues like
I met - in my experience - in Free Pascal.
This is a topic where we trying to make a custom message
On Sunday, 7 August 2022 at 23:31:45 UTC, pascal111 wrote:
On Sunday, 7 August 2022 at 22:16:55 UTC, Emanuele Torre wrote:
On Sunday, 7 August 2022 at 20:15:05 UTC, pascal111 wrote:
What destructuring binds? I didn't hear about that before.
```C++
#include
struct Point {
int x, y;
};
On Sunday, 7 August 2022 at 22:16:55 UTC, Emanuele Torre wrote:
On Sunday, 7 August 2022 at 20:15:05 UTC, pascal111 wrote:
What destructuring binds? I didn't hear about that before.
```C++
#include
struct Point {
int x, y;
};
Point add_points(const Point& a, const Point& b)
{
On Sunday, 7 August 2022 at 21:57:50 UTC, Ali Çehreli wrote:
On 8/7/22 08:34, pascal111 wrote:
> but after that in advanced level in programming, we should
> use pointers to do same tasks we were doing with slices (the
easy way of
> beginners).
That is an old thought. Today, we see that no
On Sunday, 7 August 2022 at 20:15:05 UTC, pascal111 wrote:
What destructuring binds? I didn't hear about that before.
```C++
#include
struct Point {
int x, y;
};
Point add_points(const Point& a, const Point& b)
{
return { a.x + b.x, a.y + b.y };
}
int main()
{
const auto [x, y]
On 8/6/22 22:58, Salih Dincer wrote:
> Ranges are not like that, all they do is
> generate.
You may be right. I've never seen it that way.
I've been under the following impression:
- C++'s iterators are based on an existing concept: pointers. Pointers
are iterators.
- D's ranges are based
On 8/7/22 08:34, pascal111 wrote:
> Everyone knows that slices are not pointers
D's slices are "fat pointers": In D's case, that translates to a pointer
plus length.
> that pointers are real work,
Agreed. Pointers are fundamental features of CPUs.
> but slices are like a simple un-deep
On Sunday, 7 August 2022 at 19:53:06 UTC, ag0aep6g wrote:
On Sunday, 7 August 2022 at 15:34:19 UTC, pascal111 wrote:
Everyone knows that slices are not pointers that pointers are
real work, but slices are like a simple un-deep technique that
is appropriate for beginners, but after that in
On Sunday, 7 August 2022 at 16:45:15 UTC, jfondren wrote:
On Sunday, 7 August 2022 at 16:01:08 UTC, pascal111 wrote:
It's clear by working with D that it has the same bad point
like Pascal language; the "verbosity". Is there any plans in
future to make some shorthanded techniques that clean
On Saturday, 6 August 2022 at 15:37:32 UTC, pascal111 wrote:
On Friday, 5 August 2022 at 04:05:08 UTC, Salih Dincer wrote:
On Thursday, 4 August 2022 at 22:54:42 UTC, pascal111 wrote:
I didn't notice that all what we needs to pop a range forward
is just a slice, yes, we don't need variable
On Sunday, 7 August 2022 at 15:34:19 UTC, pascal111 wrote:
Everyone knows that slices are not pointers that pointers are
real work, but slices are like a simple un-deep technique that
is appropriate for beginners, but after that in advanced level
in programming, we should use pointers to do
On Sunday, 7 August 2022 at 15:34:19 UTC, pascal111 wrote:
Everyone knows that slices are not pointers that pointers are
real work, but slices are like a simple un-deep technique that
is appropriate for beginners, but after that in advanced level
in programming, we should use pointers to do
On Sunday, 7 August 2022 at 16:01:08 UTC, pascal111 wrote:
It's clear by working with D that it has the same bad point
like Pascal language; the "verbosity". Is there any plans in
future to make some shorthanded techniques that clean verbosity
from D?
That's not clear to me at all, and your
It's clear by working with D that it has the same bad point like
Pascal language; the "verbosity". Is there any plans in future to
make some shorthanded techniques that clean verbosity from D?
Quote: "In terms of functionality, Pascal is pretty much exactly
the same as C, except with some
On Sunday, 7 August 2022 at 05:12:38 UTC, Ali Çehreli wrote:
On 8/6/22 14:10, pascal111 wrote:
> a powerful point in the account of C.
I missed how you made that connection.
Everyone knows that slices are not pointers that pointers are
real work, but slices are like a simple un-deep
On Sunday, 7 August 2022 at 03:55:50 UTC, Emanuele Torre wrote:
On Sunday, 7 August 2022 at 01:22:18 UTC, pascal111 wrote:
[...]
They are quite different:
* `chain` gives you "range" (iterator) that starts from the
first element of `x` and ends at the last element of `y` (like
e.g. `zip` in
On Saturday, 6 August 2022 at 17:29:30 UTC, Ali Çehreli wrote:
On 8/6/22 09:33, Salih Dincer wrote:
> the slices feel like ranges, don't they?
Yes because they are ranges. :) (Maybe you meant they don't
have range member functions, which is true.)
Slices use pointers. Do I need to tell you
39 matches
Mail list logo