On 9/18/21 4:02 AM, Dylan Graham wrote:
On Friday, 17 September 2021 at 14:37:29 UTC, Meta wrote:
On Friday, 17 September 2021 at 10:31:34 UTC, bauss wrote:
On Thursday, 16 September 2021 at 20:53:34 UTC, Elmar wrote:
[...]
It's just another "useless" attribute that the language has added
b
On 9/17/21 2:27 AM, frame wrote:
On Thursday, 16 September 2021 at 18:02:44 UTC, Steven Schveighoffer wrote:
Are you sure? Be very pedantic about what C functions do with the data
you send it. Sometimes they store it somewhere to use later. Sometimes
they expect it to be allocated by the C
On 9/16/21 1:08 PM, frame wrote:
On Thursday, 16 September 2021 at 15:34:25 UTC, Steven Schveighoffer wrote:
`dup` is a GC allocation. Are you using that in your C code? the GC
might be collecting that string.
The compiler doesn't show that lines with -vgc. Maybe it knows that it
is
On 9/16/21 6:28 AM, frame wrote:
I have C-code translated in D that acts sometimes incorrect if the GC
has made some collect. I would like to know why.
- Code runs correct if the GC collections are off
- There are no allocations within the C-translated-code except `throw
new` (but they are not
On Wednesday, 15 September 2021 at 10:08:13 UTC, DLearner wrote:
Please confirm that if the addition of two uint variables
produces a result larger than can be held in a uint:
1. This is a D-legal operation (however inadvisable!), with
the D-defined result of wraparound;
Definition under poin
On 9/14/21 2:05 PM, eugene wrote:
On Tuesday, 14 September 2021 at 17:02:32 UTC, jfondren wrote:
It doesn't seem like communication between us is possible
and you are wrong, as usual ,)
in the "a five-pound phone won't sell" way.
I am not a 'selling boy'
My suggestion remains: try troubl
On 9/14/21 10:56 AM, jfondren wrote:
On Tuesday, 14 September 2021 at 14:40:55 UTC, eugene wrote:
On Tuesday, 14 September 2021 at 12:09:03 UTC, Steven Schveighoffer
wrote:
This project is too big and complex
Really, "too big and complex"?
It's as simple as a tabouret :)
On 9/14/21 8:42 AM, eugene wrote:
On Tuesday, 14 September 2021 at 12:09:03 UTC, Steven Schveighoffer wrote:
I still recommend pinning the object when adding the epoll event and
seeing if that helps.
I understand your idea, but even if this will help, the question
remains - why that
On 9/13/21 10:43 PM, Chris Piker wrote:
Hi D
I just finished a ~1K line project using `dxml` as the XML reader for my
data streams. It works well in my test examples using memory mapped
files, but like an impulse shopper I didn't notice that dxml requires
`ForwardRange` objects. That's unfo
On 9/14/21 7:31 AM, eugene wrote:
On Monday, 13 September 2021 at 17:18:30 UTC, eugene wrote:
Then after pressing ^C (SIGINT) the program gets SIGSEGV, since
references to sg0 and sg1 are no longer valid (they are "sitting" in
epoll_event structure).
... forget to mention, crashes here:
```d
On 9/14/21 1:49 AM, Tejas wrote:
On Monday, 13 September 2021 at 18:42:47 UTC, Steven Schveighoffer wrote:
On 9/13/21 1:54 PM, eugene wrote:
[...]
The GC only scans things that it knows about.
Inside your EventQueue you have this code:
[...]
Umm is it okay that he declared variables
On 9/13/21 1:54 PM, eugene wrote:
On Monday, 13 September 2021 at 17:40:41 UTC, user1234 wrote:
The problems seems to lies in `newSignal()` which "would" not allocate
using the GC.
final Signal newSignal(int signum) {
Signal sg = new Signal(signum);
sg.owner = this;
On 9/13/21 10:47 AM, user1234 wrote:
On Monday, 13 September 2021 at 14:33:03 UTC, user1234 wrote:
what else ?
when you have
```d
alias AA1 = int[int];
alias AA2 = AA1[int];
```
then you can write
```d
AA2 aa;
aa[0] = [0 : 0];
aa[0][0] = 0;
```
The `[0][0]` cannot be expressed using operat
On 9/10/21 10:21 AM, Ali Çehreli wrote:
I want to thank Steven Schveighoffer here once more for his help with
the book. I later realized that his name should have much more
prominence. I can't understand how my older self did not realize this
fact when the book was being finalized.
On 9/10/21 7:47 AM, eugene wrote:
On Friday, 10 September 2021 at 11:09:10 UTC, bauss wrote:
--DRT-gcopt=parallel:2 on the command line. A value of 0 disables
parallel marking completely.
but it does not:
make -f Makefile-dmd
dmd --DRT-gcopt=parallel:0 engine/*.d common-sm/*.d server-sm/*.d p
On 9/10/21 6:46 AM, Ron Tarrant wrote:
I guess this is mainly a question for Ali, but if anyone else knows the
answer, please jump in...
If I were to buy a paperback copy of "Programming in D: Tutorial &
Reference" from Amazon (this link:
https://www.amazon.ca/Programming-Tutorial-Reference-A
On 9/8/21 5:55 AM, Chris Piker wrote:
On Wednesday, 8 September 2021 at 08:39:53 UTC, jfondren wrote:
so I'd look at a std.sumtype of them first:
Wow, this forum is like a CS department with infinite office hours!
Interesting. I presume that the big win for using std.sumtype over a
class se
On 9/6/21 10:13 AM, Mike Parker wrote:
On Monday, 6 September 2021 at 13:23:21 UTC, Steven Schveighoffer wrote:
I will note though, that some people use the mechanism for links that
puts the link at the bottom of the post, and this can be annoying when
you reply, if you don't includ
On 9/5/21 9:18 PM, Ali Çehreli wrote:
On 9/5/21 4:24 PM, someone wrote:
>
> For example; IIRC Ali's posts are always no-markdown.
>
That's because I've been using Thunderbird for mail and news for a long
time now and unfortunately it is impossible to convince Thunderbird to
add the necessar
On 9/5/21 2:07 PM, james.p.leblanc wrote:
But, my eyes had been looking for the beautiful green and blue
text as an example ... So, I completely missed the fact
that the "highlight syntax" in the box was exactly what
I was looking for.
Actually, it may not be a bad idea to make that example m
On 9/5/21 1:48 PM, james.p.leblanc wrote:
Dear All,
I have noticed that quite a few posts and responses on this
forum include d snippets made with **nicely colored syntax highlighting.**
(I do not mean just the bold markdown text.)
This increases post clarity significantly.
How is this being d
On 9/4/21 4:05 PM, Per Nordlöw wrote:
On Saturday, 4 September 2021 at 13:12:49 UTC, Steven Schveighoffer wrote:
Note that lexing and parsing is extremely quick, and I wouldn't focus
on trying to trim this out, you won't get much performance out of that.
-Steve
For the record
,
even when you're compiling user code that has no interest in Phobos
unittests.
Well, no; it compiles all unittests of all *compiled* modules, not all
*imported* modules. So it does not actually include Phobos unittests.
[...]
As Steven Schveighoffer [pointed out][1], Phobos unittests are
On 9/4/21 5:42 AM, Per Nordlöw wrote:
On Saturday, 4 September 2021 at 03:18:01 UTC, Paul Backus wrote:
As Steven Schveighoffer [pointed out][1], Phobos unittests are never
included in user code, regardless of whether `StdUnittest` is used.
Yes, but they are lexed and parsed, right?
Yes
On 9/2/21 1:17 PM, DLearner wrote:
I am looking for a mutable Arr but would like an immutable ArrPtr.
Then you want const not immutable.
Here is the reason:
```d
void main()
{
int x = 5;
immutable int *ptr = cast(immutable int *)&x;
assert(*ptr == 5); // ok
x = 6;
assert(
On 9/2/21 12:01 PM, DLearner wrote:
Suppose there is a variable that is set once per run, and is (supposed)
never to be altered again. However, the value to which it is set is not
known at compile time.
Example below, variable is 'ArrPtr';
```
ubyte[10] Arr;
// immutable void* ArrPtr;
void* A
On 8/31/21 8:40 PM, someone wrote:
On Tuesday, 31 August 2021 at 14:06:32 UTC, Steven Schveighoffer wrote:
The generation of code to output the page depends on the diet file
format (i.e. code islands are designated by the leading `-`).
However, vibe-d does not require using the diet
On 8/31/21 11:17 AM, Paul Backus wrote:
On Tuesday, 31 August 2021 at 14:09:01 UTC, Steven Schveighoffer wrote:
Are you sure this is the problem? `PdfSurface` is not a valid
identifier here except for the class. In order to access the package,
you need to use `cairo.PdfSurface`.
Must
On 8/30/21 8:09 PM, someone wrote:
Regarding vibe.d I think I'll give it a try (maybe placing it behind
nginx at first) since I do really got a good first-impression ... kudos
to the developers/maintainers :)
I like the idea of having D at my disposal within a web page, actually,
it is a terr
On 8/31/21 8:57 AM, frame wrote:
On Tuesday, 31 August 2021 at 12:37:51 UTC, bauss wrote:
On Tuesday, 31 August 2021 at 12:26:28 UTC, frame wrote:
I'm sure it was asked before but can't find the thread:
How to deal best with an older library that uses the same class name
as module name?
I ge
On 8/29/21 10:39 PM, someone wrote:
https://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/
I've been reading vibe.d tour and some documentation today to get some
first impressions. https://vibed.org/community pointed to the link above
... but it seems it is full of crap.
It used t
On 8/29/21 5:02 AM, Mike Parker wrote:
On Sunday, 29 August 2021 at 08:55:44 UTC, realhet wrote:
Is it safe, or do I have to take a snapsot of the keys range like
this? ->
You shouldn't remove anything when iterating over `.keys` or `.values`.
Use `.byKey` and `.byValue` instead to get ra
On 8/27/21 11:43 AM, Ki Rill wrote:
On Friday, 27 August 2021 at 15:24:14 UTC, Steven Schveighoffer wrote:
I suspect your MSVC installation is bad, or there are some other
switches causing problems.
Hmm... well, I will use the default setup and think about it later.
I mostly use Linux
On 8/27/21 11:19 AM, Ki Rill wrote:
On Friday, 27 August 2021 at 14:52:15 UTC, Mike Parker wrote:
On Friday, 27 August 2021 at 14:46:56 UTC, Ki Rill wrote:
On Friday, 27 August 2021 at 13:54:18 UTC, Steven Schveighoffer wrote:
[...]
How do I tell DUB where to look for `raylibdll.lib` and
On 8/27/21 10:35 AM, Ki Rill wrote:
On Friday, 27 August 2021 at 13:54:18 UTC, Steven Schveighoffer wrote:
In the end, I got it to build and run, but I'd highly recommend just
linking against the `raylibdll.lib` and using the dll.
Steve, thank you! I got it working with `raylibdl
On 8/27/21 9:21 AM, Ki Rill wrote:
I have a Raylib project on Windows using DUB. I've added raylib-d via
`dub add`. But what I can't figure out is how to tell DUB to link
against raylib library.
I have the following project structure:
```
-> source
---> app.d
-> libraylib.a
-> raylib.dll
-> et
On 8/27/21 6:34 AM, Kirill wrote:
On Friday, 27 August 2021 at 09:51:46 UTC, Mathias LANG wrote:
On Friday, 27 August 2021 at 06:52:10 UTC, Kirill wrote:
Is there a way to do mixin or similar during runtime?
I'm trying to read a csv file and extract data types. Any ideas on
how this should be
On 8/27/21 12:41 AM, Merlin Diavova wrote:
On Friday, 27 August 2021 at 04:01:19 UTC, Ali Çehreli wrote:
On 8/26/21 7:17 PM, Merlin Diavova wrote:
[...]
Then the operations downstream will not produce any results. For
example, the array will be empty below:
import std.stdio;
import std.ra
On 8/25/21 12:46 PM, Joseph Rushton Wakeling wrote:
On Wednesday, 25 August 2021 at 10:59:44 UTC, Steven Schveighoffer wrote:
structs still provide a mechanism (postblit/copy ctor) to properly
save a forward range when copying, even if the guts need copying
(unlike classes). In general, I
On 8/25/21 10:58 AM, WebFreak001 wrote:
Hm I'm not quite seeing how the error handler is related to an "Expected
type interface" that the compiler could expect.
This would be without compiler changes.
Currently with exceptions the scope things are implemented using
try-catch-finally, this
On 8/25/21 10:42 AM, Steven Schveighoffer wrote:
I think it's possible to work with some mechanics that aren't
necessarily desirable. Something like:
One has to weigh how much this is preferred to actual exception handling...
If something like DIP1008 could become usable
On 8/25/21 10:22 AM, Paul Backus wrote:
On Wednesday, 25 August 2021 at 14:04:54 UTC, WebFreak001 wrote:
Would it be possible to extend `scope(exit)` and `scope(success)` to
trigger properly for functions returning `Expected!T` as defined in
the [expectations](https://code.dlang.org/packages/ex
On 8/25/21 7:26 AM, Alexandru Ermicioi wrote:
On Wednesday, 25 August 2021 at 11:04:35 UTC, Steven Schveighoffer wrote:
It never has called `save`. It makes a copy, which is almost always
the equivalent `save` implementation.
Really?
Then what is the use for .save method then?
The only
On 8/25/21 6:06 AM, Alexandru Ermicioi wrote:
On Wednesday, 25 August 2021 at 08:15:18 UTC, frame wrote:
I know, but foreach() doesn't call save().
Hmm, this is a regression probably, or I missed the time frame when
foreach moved to use of copy constructor for forward ranges.
Do we have a w
On 8/25/21 4:31 AM, frame wrote:
On Tuesday, 24 August 2021 at 21:15:02 UTC, Steven Schveighoffer wrote:
I'm surprised you bring PHP as an example, as it appears their foreach
interface works EXACTLY as D does:
Yeah, but the point is, there is a rewind() method. That is called every
ti
On 8/25/21 6:06 AM, Joseph Rushton Wakeling wrote:
On Tuesday, 24 August 2021 at 09:15:23 UTC, bauss wrote:
A range should be a struct always and thus its state is copied when
the foreach loop is created.
That's quite a strong assumption, because its state might be a reference
type, or it mig
On 8/24/21 2:12 PM, frame wrote:
You can call `popFront` if you need to after the loop, or just before
the break. I have to say, the term "useless" does not even come close
to describing ranges using foreach in my experience.
I disagree, because foreach() is a language construct and therefore
On 8/24/21 4:36 AM, frame wrote:
Consider a simple input range that can be iterated with empty(), front()
and popFront(). That is comfortable to use with foreach() but what if
the foreach loop will be cancelled? If a range isn't depleted yet and
continued it will supply the same data twice on f
On 8/17/21 2:36 PM, JG wrote:
Thanks for the suggestions and explanations. I am not sure what to do in
my case though. The situation is as follows. I have a struct that is
populated via user input not necessarily at single instance (so that
seems to rule out immutable). On the other
hand while
On 8/17/21 2:11 PM, james.p.leblanc wrote:
Evening All,
Eponymous templates allow a nice calling syntax. For example, "foo"
here can
be called without needing the exclamation mark (!) at calling sites. We
see that
foo is restricting a, and b to be of the same type ... so far, so good.
auto
On 8/17/21 2:07 PM, Rekel wrote:
On Tuesday, 17 August 2021 at 16:24:38 UTC, Steven Schveighoffer wrote:
All these are calling with array literals, which default to dynamic
arrays, not static arrays.
I realise that is their default, though in this scenario they should (I
believe) be used
On 8/17/21 10:20 AM, Rekel wrote:
As my post was not the actual cause of my issue (my apology for the
mistake), I think I have found the actual reason I'm currently having
problems.
This seems to be related to a (seeming, I might be wrong) inability to
specialize over both 1d and 2d arrays sepa
On 8/17/21 8:21 AM, Ferhat Kurtulmuş wrote:
Hello folks,
Hope everyone is doing fine. Considering the following code, in the
first condition, I am extracting the type Point from the slice Point[].
I searched in the std.traits, and could not find a neater solution
something like ElementTypeOf!
On 8/17/21 7:05 AM, JG wrote:
Hi
I have a program with two threads. One thread produces data that is put
in a queue
and then consumed by the other thread. I initially built a custom queue
to do this, but thought this should have some standard solution in D? I
looked at std.concurrency and tho
On 8/15/21 2:10 AM, rempas wrote:
So when I'm doing something like the following: `string name = "John";`
Then what's the actual type of the literal `"John"`?
In the chapter [Calling C
functions](https://dlang.org/spec/interfaceToC.html#calling_c_functions)
in the "Interfacing with C" page, the
On 8/13/21 7:23 PM, Marcone wrote:
On Friday, 13 August 2021 at 23:08:07 UTC, jfondren wrote:
On Friday, 13 August 2021 at 22:09:59 UTC, Marcone wrote:
Isn't there some unario operator template that I can use with lambda
to handle a string literal?
So, something other than an exact "lit"[0.
On 8/13/21 5:05 PM, Marcone wrote:
How to extend the string class to return this inside the square bracket
the same way opDollar $ returns the length of the string? Thank you.
import std;
void main(){
writeln("Hello World!"[0..this.indexOf("o")]);
}
There is no string
On 8/13/21 4:58 PM, Paul Backus wrote:
On Friday, 13 August 2021 at 15:26:15 UTC, Steven Schveighoffer wrote:
The issue is that you can't convert const (or immutable or mutable) to
inout implicitly, and the member variable is inout inside an inout
constructor. Therefore, there's no v
On 8/13/21 3:59 PM, Mike Parker wrote:
On Friday, 13 August 2021 at 16:18:06 UTC, Ruby The Roobster wrote:
Context for this: I am creating a module of my own, and this is a
class contained in the module. You will notice that after calling
this class' constructor anywhere in a Win32 API progr
On 8/12/21 12:12 PM, Paul Backus wrote:
The reason for this is a bit subtle. Normally, `inout` can convert to
`const`, so you might expect that the `const` copy constructor could be
used to construct a copy of an `inout` object. However, copy
constructors take their arguments by `ref`, and impl
On 8/13/21 11:04 AM, james.p.leblanc wrote:
Dear All,
How does one use 'alias' to incorporate function arguments as well?
(I believe this is possible, from some of the examples of aliasSeq, and
the traits.Parameters documentation. However, I was unable to come up
with anything that works.)
Wh
On 8/12/21 10:08 AM, Learner wrote:
On Thursday, 12 August 2021 at 13:56:17 UTC, Paul Backus wrote:
On Thursday, 12 August 2021 at 12:10:49 UTC, Learner wrote:
That worked fine, but the codebase is @safe:
```d
cast from `int[]` to `inout(int[])` not allowed in safe code
```
So copy construct
On Wednesday, 11 August 2021 at 14:08:59 UTC, Paul Backus wrote:
On Wednesday, 11 August 2021 at 14:03:50 UTC, Paul Backus wrote:
On Wednesday, 11 August 2021 at 14:00:33 UTC, Steven
Schveighoffer wrote:
I have a template function like this:
```d
auto foo(T, Args...)(Args args) {...}
```
If
I have a template function like this:
```d
auto foo(T, Args...)(Args args) {...}
```
If I try to bind the T only, and produce a partial template
function which can accept any number of parameters, but has T
already specified, I get an error, because instantiating `foo!T`
means Args is length
On 8/11/21 5:31 AM, tastyminerals wrote:
I would like to trigger tests in a simple dub project.
```
source/my_script.d
dub.json
```
Here is a dub config:
```json
{
"targetPath": "build",
"targetType": "executable",
"sourcePaths": ["source"],
"name": "my_script",
"buildT
On 8/9/21 12:32 PM, Marcone wrote:
My main program need import a local module called mymodule.d.
How can I add this module using DUB? Thank you.
You mean how to add a local project (that isn't on code.dlang.org)?
`dub add-local .` inside the project directory.
I don't think you can add a file
On 8/5/21 11:09 AM, someone wrote:
On Thursday, 5 August 2021 at 10:28:00 UTC, Steven Schveighoffer wrote:
H.S. Teoh, I know you know better than this ;) None of this is
necessary, you just need `rtValue` for both runtime and CTFE (and
compile time parameters)!
Now, the original question is
On 8/4/21 11:20 PM, H. S. Teoh wrote:
On Thu, Aug 05, 2021 at 01:39:42AM +, someone via Digitalmars-d-learn wrote:
[...]
What happens in the following case ?
public immutable enum gudtLocations = [
r"BUE"d : structureLocation(r"arg"d, r"Buenos Aires"d, r"ART"d),
r"GRU"d : structureL
On 8/4/21 10:27 PM, Ali Çehreli wrote:
I wonder whether this feature is thanks to 'lazy' parameters, which are
actually delegates.
No, the default parameters are used directly as if they were typed in at
the call site (more or less, obviously the `__FILE__` example is weird).
So:
```d
write
On 8/4/21 10:27 PM, someone wrote:
On Thursday, 5 August 2021 at 02:06:13 UTC, Steven Schveighoffer wrote:
On 8/4/21 9:14 PM, H. S. Teoh wrote:
Unless you have a specific reason to, avoid using `enum` with string and
array literals, because they will trigger a memory allocation *at every
On 7/26/21 1:05 PM, Stefan Koch wrote:
On Monday, 26 July 2021 at 12:01:23 UTC, Adam D Ruppe wrote:
On Monday, 26 July 2021 at 11:43:56 UTC, workman wrote:
__FILE__[0..$]
Why do you have that [0..$] there? It is probably breaking the
__FILE__ magic.
Correct.
The compiler has to evaluate th
On 8/4/21 9:14 PM, H. S. Teoh wrote:
Unless you have a specific reason to, avoid using `enum` with string and
array literals, because they will trigger a memory allocation *at every
single reference to them*, which is probably not what you want.
Just want to chime in and say this is NOT true fo
On 8/4/21 11:08 AM, someone wrote:
However, __traits(hasMember, ...) checks for the existence of anything
labeled lstrCurrencyID within the class (eg: unrelated variables with
same name; not gonna happen, but, I like to code it the right way); so,
question is: is there any way to search the pa
On 8/4/21 4:18 AM, evilrat wrote:
On Wednesday, 4 August 2021 at 07:21:56 UTC, Denis Feklushkin wrote:
On Sunday, 1 August 2021 at 17:37:01 UTC, evilrat wrote:
vibe-d - probably because it handles DB connection and/or keep things
async way, sure you probably can do it with Phobos but it will b
On 8/1/21 11:38 AM, Alain De Vos wrote:
Dub has two big problems.
1. Unmaintained dub stuff.
2. Let's say you need bindings to postgresql library and you will see
dub pulling in numerous of libraries, which have nothing at all to do
with postgresql.
More like a framework stuff. This creates unn
On 7/23/21 3:30 PM, apz28 wrote:
On Friday, 23 July 2021 at 18:44:47 UTC, Steven Schveighoffer wrote:
On 7/22/21 7:43 PM, apz28 wrote:
In any case, it's possible that fbConnection being null does not mean
a null dereference, but I'd have to see the class itself. I'm
surpris
On 7/22/21 7:43 PM, apz28 wrote:
FbConnection is a class, FbXdrReader is a struct and for this call,
response.data is not null & its' length will be greater than zero and
FbConnection is not being used. So why DMD try to evaluate at compiled
time hence error
1. Should not evaluate at compile
On 7/22/21 2:38 PM, apz28 wrote:
On Wednesday, 21 July 2021 at 20:39:54 UTC, Dukc wrote:
On Wednesday, 21 July 2021 at 14:15:51 UTC, Steven Schveighoffer wrote:
2. It's hard for me to see where the null dereference would be in
that function (the `bool` implementation is pretty simple).
On 7/22/21 1:46 AM, seany wrote:
Consider :
int [] ii;
foreach(i,dummy; parallel(somearray)) {
ii ~= somefunc(dummy);
}
This is not safe, because all threads are accessing the same array and
trying to add values and leading to collision.
Correct. You must synchronize o
On 7/21/21 7:56 AM, apz28 wrote:
On Wednesday, 21 July 2021 at 11:52:39 UTC, apz28 wrote:
On Wednesday, 21 July 2021 at 04:52:44 UTC, Mathias LANG wrote:
It seems the compiler is doing extra analysis and seeing that a null
pointer is being dereferenced. Can you provide the code for
"pham\db
On 7/21/21 5:07 AM, vit wrote:
Thanks, it works, but now I have different problem.
I need call static method for all instantions of template struct from
`crt_constructor`.
Is there way to iterate over all instantions of template?
Not unless you register them somehow upon instantiation.
Or (
On 7/20/21 11:00 PM, Mathias LANG wrote:
But if you take a step back, I think you might find this solution is far
from ideal.
Having worked on a JSON library myself, I can tell you they are all
implemented with a tagged union. And converting a tagged union to a
tagged union is no improvement.
On 7/19/21 10:58 PM, H. S. Teoh wrote:
I didn't check the implementation to verify this, but I'm pretty sure
`break`, `continue`, etc., in the parallel foreach body does not change
which iteration gets run or not.
`break` should be undefined behavior (it is impossible to know which
loops have
On 7/15/21 1:43 PM, Tejas wrote:
How do you write the equivalent of that in D? Is the answer still the
same? Manually keep it in the same module, or is there a programmatic
way of converting this to D?
Functions in the same module can access `private` members. Functions in
the same package (
On 7/14/21 9:00 AM, Alain De Vos wrote:
When I read a record out of the database I receive a jsonb datatatype as
a string.
How do I convert this string into a json object and parse and manipulate
it?
Isn't jsonb just a storage assumption for the database (so it can do
efficient indexing/searc
On 7/9/21 5:13 PM, rempas wrote:
On Friday, 9 July 2021 at 20:54:21 UTC, Paul Backus wrote:
On Friday, 9 July 2021 at 20:43:48 UTC, rempas wrote:
I'm reading the library reference for
[core.time](https://dlang.org/phobos/core_time.html#Duration) and It
says that the duration is taken in "hnsec
On 7/11/21 8:49 AM, Adam D Ruppe wrote:
On Sunday, 11 July 2021 at 05:20:49 UTC, someone wrote:
```d
mixin template templateUGC (
typeStringUTF,
alias lstrStructureID
) {
public struct lstrStructureID {
typeStringUTF whatever;
}
This creates a struct with teh literal n
On 7/10/21 12:32 PM, Mathias LANG wrote:
On Saturday, 10 July 2021 at 01:38:06 UTC, russhy wrote:
On Saturday, 10 July 2021 at 01:23:26 UTC, Steven Schveighoffer wrote:
I think it's the throwing/catching of the `Throwable` that is
allocating. But I don't know from where the
On 7/9/21 8:44 PM, russhy wrote:
On Friday, 9 July 2021 at 23:34:25 UTC, Ali Çehreli wrote:
On 7/9/21 4:12 PM, russhy wrote:
>> One way of forcing compile-time evaluation in D is to define
an enum
>> (which means "manifest constant" in that use).
That's all I meant. It was a general comment.
On 7/9/21 5:04 PM, Ali Çehreli wrote:
On 7/9/21 1:54 PM, Paul Backus wrote:
On Friday, 9 July 2021 at 20:43:48 UTC, rempas wrote:
I'm reading the library reference for
[core.time](https://dlang.org/phobos/core_time.html#Duration) and It
says that the duration is taken in "hnsecs" and I cannot
On 7/9/21 11:31 AM, Dennis wrote:
On Friday, 9 July 2021 at 15:11:38 UTC, Steven Schveighoffer wrote:
But reading/writing, closing these file descriptors is always the same.
For sockets you'd typically use `recv` and `send` instead or `read` and
`write` because the former give extra op
On 7/9/21 10:51 AM, rempas wrote:
The file can be found quickly
[here](https://github.com/dlang/druntime/blob/master/src/core/sys/posix/unistd.d)
or in your system if you want. Now the question is, why isn't there an
"open" function for the equivalent system call? "close", "write", "read"
etc.
On 7/7/21 3:52 PM, Sebastiaan Koppe wrote:
On Wednesday, 7 July 2021 at 13:30:28 UTC, Steven Schveighoffer wrote:
On 7/7/21 5:54 AM, rassoc wrote:
On Wednesday, 7 July 2021 at 01:44:20 UTC, Steven Schveighoffer wrote:
So I have this situation where I need to split a string, then where
the
On 7/7/21 5:54 AM, rassoc wrote:
On Wednesday, 7 July 2021 at 01:44:20 UTC, Steven Schveighoffer wrote:
So I have this situation where I need to split a string, then where
the splits are, insert a string to go between the elements making a
new range, all without allocating (hopefully
On 7/6/21 11:42 PM, Jon Degenhardt wrote:
On Wednesday, 7 July 2021 at 01:44:20 UTC, Steven Schveighoffer wrote:
This is pretty minimal, but does what I want it to do. Is it ready for
inclusion in Phobos? Not by a longshot! A truly generic interleave
would properly forward everything else that
So I have this situation where I need to split a string, then where the
splits are, insert a string to go between the elements making a new
range, all without allocating (hopefully).
Looking around phobos I found inside the documentation of
[roundRobin](https://dlang.org/phobos/std_range.html#
On 7/6/21 9:27 AM, Jack Applegame wrote:
On Tuesday, 6 July 2021 at 12:33:20 UTC, Adam D Ruppe wrote:
The language always allows `a = b;` to be rewritten as `a(b);`.
And that's sad. It should happen for properties only.
Yes, I lament that there is no way to control how people call your
fun
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 defined by the
implementation.
This should be really mentionend in the
On 7/3/21 1:20 PM, Luis wrote:
This is intentional ?
```
should(function void() {
auto emptyStack = SimpleStack!int();
scope(exit) emptyStack.free; // <= This is never called
emptyStack.reserve(16);
emptyStack.top;
}).Throw!R
On 7/1/21 8:26 PM, someone wrote:
... just wondering:
I am writing pretty trivial code, nothing out of the ordinary, and
attempted to check how much of it could be marked safe ...
It should be quite a bit.
- Lots of tiny common library functions are pretty easy
- Getter/Setter properties
601 - 700 of 4395 matches
Mail list logo