On Wednesday, 28 October 2020 at 05:51:14 UTC, Nicholas Wilson
wrote:
class A(T,int,args...) {}
alias C = A!(int, 0, float);
I need `ScopeClass!C` to be
template ScopeClass(C)
{
class Anon(T,int,args...) // name doesn't matter
{
// implement members with compile time
On Monday, 26 October 2020 at 21:38:39 UTC, Jack wrote:
I did consider do something like this but the class would only
live in the function's lifetime, right? that wouldn't work if I
need to pass the class around
Right, you'd have to manage the memory somehow. One possibility
is to malloc it
On Monday, 26 October 2020 at 21:57:18 UTC, Not A Rectangle wrote:
Is this possible to do?
Only if you know the type ahead of time, then you can cast it.
Normally you'd probably just know an interface or base class it
implements then you can cast to that, with the exact derived type
being
On Wednesday, 21 October 2020 at 22:30:11 UTC, IGotD- wrote:
When an assert fails in a unittest, I only get which line that
failed. However, it would be very useful to see what the values
are on either side of the unary boolean expression. Is this
possible?
try compiling with dmd
On Monday, 19 October 2020 at 14:20:02 UTC, Paul Backus wrote:
Are we looking at the same instructions?
ah i mixed it up with
https://dlang.org/dmd-linux.html#installation in my brain without
clicking the link :(
sorry my bad those are ok.
On Monday, 19 October 2020 at 13:43:14 UTC, Bastiaan Veelo wrote:
I'm not suggesting that this fills the need of newbies, but
there is this: https://dlang.org/install.html.
Nobody should ever follow those terrible instructions, they leave
you so fragile in the event of future updates, takes
On Sunday, 18 October 2020 at 22:40:53 UTC, aberba wrote:
Not sure what to do with the .7z file without manual tinkering.
You can simply unzip it and use it directly.
That's the best way to use most D compilers actually, then any
versions can live side by side without affecting each other.
On Saturday, 17 October 2020 at 14:50:47 UTC, NonNull wrote:
I have inherited an open source C project that assumes that the
size of a long and the size of a pointer are the same
static assert(long.sizeof == void*.sizeof);
On Saturday, 17 October 2020 at 13:00:59 UTC, Per Nordlöw wrote:
I understand that. I don't want the alignment of `S` to change.
I want the padding after `s`
That padding is part of S. It is at the end, after its fields,
but still part of it.
S's layout doesn't depend on what else is around
On Saturday, 17 October 2020 at 12:44:44 UTC, Per Nordlöw wrote:
Can `align`s be inserted in S or/and T so that T is packed to 8
bytes but still aligned to 8 bytes?
Yes. Put an align on the OUTSIDE of the struct you are nesting,
then put one INSIDE the struct you want the contents packed.
On Friday, 16 October 2020 at 19:55:53 UTC, wilcro wrote:
Evidently, I am misunderstanding something very elemental here;
thanks for any enlightenment regarding this.
Inside a function things happen in order, top to bottom,
including declarations (you can only access local variables after
On Friday, 16 October 2020 at 03:04:25 UTC, Jack wrote:
How can I allocate memory for this class?
It is possible but not easy without druntime.
If you are using -betterC, you can use extern(C++) classes with
extern(D) members. The compiler will let you declare that. But
then you need to
On Wednesday, 14 October 2020 at 01:46:11 UTC, Jack wrote:
extern(C):
int mul(int a, int b) { return a * b;}
mark it `export` as well
and then be sure you are compiling in this module as well, it
must be included on the ldc command line along with wasm.d
On Monday, 12 October 2020 at 00:46:37 UTC, Imperatorn wrote:
To people trying to learn, why is that % before ( needed in the
format string?
The %( ... %) stuff is expanded and repeated for each element
inside the given array.
On Saturday, 10 October 2020 at 10:15:03 UTC, Marcone wrote:
wchar[100] buffer; // I don't want fixed size :(
wchar[] buffer; // no fixed size
buffer.length = GetWindowTextLength(hwn); // set it to the text
length of the window
// now get the text
GetDlgItemText(hwn, widget, buffer.ptr,
On Sunday, 4 October 2020 at 15:30:48 UTC, IGotD- wrote:
I don't agree with this, especially if the struct is 432 bytes.
It takes time and memory to copy such structure.
If the compiler chooses to inline the function (which happens
quite frequently with optimizations turned on), no copy takes
On Saturday, 3 October 2020 at 13:10:31 UTC, realhet wrote:
I only managed to get the string[] by making a static foreach,
but I don't know how to put that in an enum xxx = ...;
statement.
There's always other ways but general rule: if you can get it one
way, just wrap that up in a function
On Friday, 2 October 2020 at 23:28:04 UTC, claptrap wrote:
I cant see anything in the struct docs explaining why that
array on the right hand side is automatically converted to a
constructor call.
I'm not sure exactly where it is in the docs but that's perfectly
normal.
Any declaration
On Wednesday, 30 September 2020 at 11:23:59 UTC, seany wrote:
auto router = new URLRouter;
router.post("/archive", );
router.get("/archive", );
auto settings = new HTTPServerSettings;
settings.port = port;
settings.bindAddresses = ["::1",
On Sunday, 27 September 2020 at 05:22:36 UTC, 60rntogo wrote:
How would I check if it is actually a free function?
but this doesn't even compile since I defined add inside my
main function
ah that's not a free function!!
That's a nested function and thus actually has a hidden argument.
On Sunday, 27 September 2020 at 21:38:43 UTC, ddcovery wrote:
i.e. checking this Regex expression
`^[a-zA-Z_]*[a-zA-Z0-9_]*[a-zA-Z][a-zA-Z0-9_]*$`
Is there any way to check a regular expression at compile time?
Not really and I'd actually suggest not trying because even if it
did work,
On Sunday, 27 September 2020 at 10:08:24 UTC, tchaloupka wrote:
* new RAW tests in C to utilize epoll and io_uring (using
liburing) event loops - so we have some ground base we can
compare against
I fixed some buffering issues in cgi.d and, if you have the right
concurrency level that
I fixed my event loop last night so I'll prolly release that at
some point after a lil more testing, it fixes my keep-alive
numbers... but harms the others so I wanna see if I can maintain
those too.
On Saturday, 26 September 2020 at 22:58:44 UTC, 60rntogo wrote:
I get the error "undefined identifier isValid". How can I make
this work?
This part is easy, you need to give the name like
assert(invoke!(Foo.isValid)(foo, 3));
Now, the other part is tricky, and a new feature just released
On Saturday, 26 September 2020 at 18:44:06 UTC, Andrei
Alexandrescu wrote:
What time is it and what's the chat link?
A bunch of us coming and going at all hours, decent group on now.
https://meet.jit.si/Dlang2020SeptemberBeerConf
password: -preview=in
On Saturday, 26 September 2020 at 03:08:56 UTC, Marcone wrote:
#include
import core.sys.windows.windows
WINAPI
extern(Windows)
int main(int argc, char *argv[]) {
int main(string[] args)
CreateThread(NULL, 0, threadFunc, NULL, 0, NULL);
CreateThread(null, 0, , null, 0, null);
On Wednesday, 23 September 2020 at 02:07:04 UTC, Steven
Schveighoffer wrote:
I just said pragma(msg, __traits(getAttributes, z))
Ah, ok, this is weird, `pragma(msg, __traits(getAttributes,
z)[0])` works just fine!
But that might be adequate for you - just loop over the
attributes and use
On Wednesday, 23 September 2020 at 01:45:46 UTC, Steven
Schveighoffer wrote:
@foo int z; // Error: cannot interpret foo(T)(T val) at compile
time
Where do you get that error? Is it from phobos' thing? cuz I
copy/pasted your code and it compiled.
You can also just use a struct as the uda if
On Monday, 21 September 2020 at 23:30:30 UTC, H. S. Teoh wrote:
It looks like a bug to me.
No, it is by design:
https://dlang.org/spec/function.html#virtual-functions
see point 2.
With my lib, the -version=embedded_httpd_threads build should
give more consistent results in tests like this.
The process pool it uses by default in a dub build is more crash
resilient, but does have a habit of dropping excessive concurrent
connections. This forces them to retry which
On Sunday, 20 September 2020 at 01:51:22 UTC, wjoe wrote:
Would even be more awesome if it provided a function which
could be called from a custom main on top of the FancyMain.
I find e.g. custom parsing of command line arguments incredibly
useful.
Yea, the version 2.0 stuff inside cgi.d does
On Saturday, 19 September 2020 at 20:17:06 UTC, aberba wrote:
Arsd cgi.d might be what you want if you want to it your way as
its more low-level interface-wise.
Eh, it depends. My lib lets you do as much or as little as you
want.
About ten years ago, I wrote a framework on top that
On Saturday, 19 September 2020 at 13:56:53 UTC, Anonymouse wrote:
Is there a way to detect programmatically if I'm in an
environment where I need to manually set line buffering?
Part of the problem is the IDE console and cygwin too I believe
both *look* like a pipe to the program instead of
On Thursday, 17 September 2020 at 09:53:57 UTC, Remi wrote:
My problem here is mostly understanding the __initZ symbol and
where it comes from.
The compiler generates that when it spits out something that uses
TypeInfo, which is a lot of things: ~= and ~ operators on built
in arrays, the new
On Friday, 18 September 2020 at 22:02:07 UTC, aberba wrote:
In this case you want to get the file(s) in memory...in the
form of bytes (or buffer) and probably set a file size limit.
Its all doable through a library but such a library doesn't
exist in D yet. At least not that I know of.
I
fyi my baby was just born i'll come back to this but it might be
a day or two
On Thursday, 17 September 2020 at 03:06:45 UTC, realhet wrote:
Anyone can help me telling how to decode these please?
so here's a cool trick to get hte other demanglers to help.
Just prepend
_D4name
to the string. so like:
$ ./ddemangle
_D4nameFAyaZE3het8keywords10KeywordCat
On Thursday, 17 September 2020 at 03:06:45 UTC, realhet wrote:
I'm trying to get information from the JsonFile produced by
LDC2, but having no clue how to decode this:
For example:
header: KeywordCat kwCatOf(int k)
"deco" : "FAyaZE3het8keywords10KeywordCat",
That's a D mangle but just of
On Wednesday, 16 September 2020 at 17:59:41 UTC, Remi wrote:
I tried to modify the hello.d example from your blog post. It
works without changes but when I tried to do a string
concatenation
Yeah, concatenation is one of the features that uses druntime,
and specifically, it is done through
On Wednesday, 16 September 2020 at 17:12:47 UTC, Cecil Ward wrote:
then is there any downside to just using enum all the time?
For a non-string array, enum may give runtime allocations that
static immutable won't.
Generally think of enum as being replaced with the literal
representation
On Wednesday, 16 September 2020 at 13:36:22 UTC, 60rntogo wrote:
except that I tried doing this in foo.d and then the compiler
yelled at me.
Yeah, this is the one case where the compiler is picky about the
directory structure and filename. It *must* be package.d.
(blargh.)
On Wednesday, 16 September 2020 at 13:30:57 UTC, 60rntogo wrote:
I'm curious, how is this behavior achieved in the standard
library?
They define an additional file
std/package.d
(and std/algorithm/package.d btw)
that lists off
module std;
public import std.algorithm;
public import
On Monday, 14 September 2020 at 16:29:11 UTC, Fitz wrote:
I expect the following code below to create 10 items with 10
different addresses, instead they all have the same address?
You are taking the address of the local variable holding
reference, not the reference itself.
class Bob {
}
On Sunday, 13 September 2020 at 12:34:06 UTC, 60rntogo wrote:
However, if I directly insert the contents of X into Bar
instead of mixing it in, it compiles just fine. What's going on
here?
You can override members from mixin templates by giving a member
with the same *name* (not the same
On Thursday, 10 September 2020 at 14:31:41 UTC, Andre Pany wrote:
Why does it crash?
You messed up the pointers.
A string is one star.
An array of strings is two stars.
A pointer to an array of strings is /three/ stars.
---
import std;
void main()
{
size_t* i; // this need not be
On Thursday, 10 September 2020 at 13:06:41 UTC, Joseph Rushton
Wakeling wrote:
`hasUDA!(T, AnotherUDA)`
...do you have to use hasUDA?
The language works with class UDAs, but hasUDA doesn't support it.
If you write your own test function though you can:
``import std.traits;
class BaseUDA {
On Tuesday, 8 September 2020 at 08:33:35 UTC, aberba wrote:
Now I really want to sew your D web workflow and stack in use
at DConf Online. Don't say no!!
Yeah, I did tell the dconf people I'd do a livestream thing if
they need me, but I was thinking about making an Asteroids clone
or
On Tuesday, 8 September 2020 at 12:47:11 UTC, Danny Arends wrote:
How can I figure out which linker is used ? When performing a
dub build, it just mentions that ldc2 is used for linking
If you are using the d_android setup thing, it actually edits
ldc2.conf so it uses the linker from the NDK.
On Monday, 7 September 2020 at 20:33:26 UTC, 0xEAB wrote:
Are unittests that are marked @safe actually checked for safety?
https://github.com/dlang/phobos/blob/v2.093.1/std/file.d#L4937
How comes this unittest is @safe when `dirEntries` appears to
be @system?
I see what happened now: those
On Monday, 7 September 2020 at 20:55:54 UTC, IGotD- wrote:
I guess this was written before betterC existed.
Well, -betterC existed even then, but it was *completely*
useless. It didn't become useful until 2016 or 2017.
But around that same time, going minimal runtime got even easier,
so I
On Wednesday, 2 September 2020 at 13:31:25 UTC, Adam D. Ruppe
wrote:
I could write that in a few hours.
I went ahead and did it:
https://dwidder.arsdnet.net/
might move later but eh the basics work i think.
On Monday, 31 August 2020 at 08:36:09 UTC, Mike Parker wrote:
So send me your <= 5-minute videos describing your talks, folks!
There's basically zero chance of me doing this part specifically.
But on the other hand, between my self-loathing and
procrastination, I probably won't record a talk
On Wednesday, 2 September 2020 at 18:42:25 UTC, starcanopy wrote:
But if you do create an ad-hoc service, I'd very much use it if
you didn't necessitate registration with an email.
So I think some kind of user account is useful and I figure I'll
require them... but it will be just a random
On Friday, 4 September 2020 at 17:47:39 UTC, James Lu wrote:
And there's a Facebook? Seriously?
A random user set it up and tries to push it but there's not much
activity.
And Slack?
That's more used by like dconf coordinators.
The places new people come on for chat is just the irc and
On Wednesday, 2 September 2020 at 18:40:55 UTC, Andrey Zherikov
wrote:
If I provide -Jfoo to dmd, doesn't it mean my consent to use
the contents of directory foo?
Yeah, but dmd has been inconsistent on platforms about if it
allows subdirectories. Right now I think it just strips all
slashes
On Wednesday, 2 September 2020 at 17:39:04 UTC, Andrey Zherikov
wrote:
Is this a bug in dmd?
I think it is an old bug filed (I can't find it though) about
inconsistent platform behavior but it is allowed by spec for the
compiler to reject any path components.
import("") is supposed to just
On Wednesday, 2 September 2020 at 07:38:01 UTC, JN wrote:
One thing I always feel this forum is missing is a section for
work in progress projects, even if they never end up anywhere.
Yeah, I often want a place to just gab. I kinda do in my blog,
but that's more often something that is more
On Tuesday, 1 September 2020 at 18:55:20 UTC, Steven
Schveighoffer wrote:
This is the big sticking point -- code that is nothrow would no
longer be able to use AAs. It makes the idea, unfortunately, a
non-starter.
You could always catch it though.
But I kinda like things the way they are
On Monday, 31 August 2020 at 20:39:10 UTC, Andrey Zherikov wrote:
How can I do that?
You can use a normal string[] BUT it is only allowed to be
modified inside its own function.
Then you assign that function to an enum or whatever.
string[] ctGenerate() {
string[] list;
list ~=
On Tuesday, 25 August 2020 at 01:08:49 UTC, mw wrote:
Is it safe to just delete all the:
yup. I have to do this every other week on my work box to keep
its hard drive from filling up lol
On Tuesday, 25 August 2020 at 00:41:27 UTC, mw wrote:
How to fix this Coff object issues?
there's two library formats: coff and omf. omf is the old one
that dmd assumes without arguments. coff is the new one with `dmd
-m32mscoff` or `dmd -m64`.
I would guess one of those libs was built
On Monday, 24 August 2020 at 22:32:52 UTC, Anonymouse wrote:
How do I do this? (Is there some other way?)
Not really a way. A package doesn't quite exist in D; there is no
formal construct that is a package and has a defined list if
stuff.
It is just whatever modules are compiled in that
On Monday, 24 August 2020 at 14:19:14 UTC, data pulverizer wrote:
I am trying to implement `opIndex` (e.g. T[i]) for types in a
struct. So for I have `length`:
Can't really do that, the operator overloads work on instances
instead of static types.
AliasSeq is magical because it just gives a
On Sunday, 23 August 2020 at 12:50:36 UTC, Andrey Zherikov wrote:
Even this approach can lead to unclear result if you move
'q{...}' outside of mixin:
Yes, that's why I write it very specifically the way I do, with
q{ and mixin on the same line.
On Friday, 21 August 2020 at 22:12:48 UTC, Steven Schveighoffer
wrote:
Who does that though?
An incompetent coder:
http://dpldocs.info/experimental-docs/source/arsd.cgi.d.html#L5713
http://dpldocs.info/experimental-docs/source/arsd.cgi.d.html#L5943
On Friday, 21 August 2020 at 21:42:21 UTC, Steven Schveighoffer
wrote:
While not necessarily a "bug", it's not very useful.
Maybe not in this case, but it is perfectly accurate for cases
like:
mixin(q{
some code here
});
Where it will actually line back up to the original file's line
On Friday, 21 August 2020 at 21:06:11 UTC, Steven Schveighoffer
wrote:
The hybrid line number (original source line number + mixin
line number) seems like a bug to me.
I'm not so sure without seeing all the code. Remember to the
compiler, the mixin thing is just a big string literal at the
On Friday, 21 August 2020 at 14:01:24 UTC, Andrey Zherikov wrote:
mixin(import("foo.d")); // line #17(2)
Why are you doing this? This kind of thing is almost never an
ideal solution in D.
See, the compiler just sees a big string literal there. It isn't
a separate file at that
On Wednesday, 19 August 2020 at 21:24:23 UTC, Mike Brown wrote:
I can see that LDC supports WASM output, and I believe this
requires BetterC to be enabled?
Not really but anything beyond -betterC is still kinda diy right
now.
So I happened to do port my little tetris game in D to wasm just
On Wednesday, 19 August 2020 at 13:03:54 UTC, data pulverizer
wrote:
How do you create an array of pointers in D? I tried something
like
```
double* []y;
```
I'd write it
double*[] y;
but yeah that's it.
Error: only one index allowed to index double[]
That must be at the usage point
On Monday, 17 August 2020 at 00:20:24 UTC, Cecil Ward wrote:
In a lambda, how do we know what types the arguments are? In
something like
(x) => x * x
In that the compiler figures it out from usage context. So if you
pass it to a int delegate(int), it will figure x must be int.
- there
On Thursday, 13 August 2020 at 20:04:59 UTC, Andre Pany wrote:
Hi,
in the specification
https://dlang.org/spec/interfaceToC.html#storage_allocation
there is this paragraph:
"Leaving a pointer to it on the stack (as a parameter or
automatic variable), as the garbage collector will scan the
On Tuesday, 11 August 2020 at 04:10:10 UTC, starcanopy wrote:
This is really cool. This idea, especially, titillates me:
That's actually easy enough to do I just went ahead and made it.
so behold:
http://webassembly.arsdnet.net/
and the source is pushed up to github, with just a little bit
On Tuesday, 11 August 2020 at 13:22:02 UTC, jmh530 wrote:
The blog post says it is space bar. Tripped me up too.
Yeah, I learned yesterday that there's a whole other PC tetris
world I had no clue about.
I only ever played the Nintendo/ELORG version on the NES. On
that, dpad is left, down,
On Monday, 10 August 2020 at 21:30:53 UTC, matheus wrote:
By the way you should post on reddit (/r/programming) if you
haven't already.
I don't really do reddit. I sometimes troll in the comments but
it isn't a site I care for.
That said if you or someone else wanted to and post the link,
On Monday, 10 August 2020 at 16:24:02 UTC, Steven Schveighoffer
wrote:
Bug report: the score doesn't increase for me when I complete a
line ;)
The reason for that is actually explained in the article; has to
do with webassembly not blocking on eventLoop and the program was
written with the
http://webassembly.arsdnet.net/
tetris.d source here:
http://dpldocs.info/this-week-in-d/Blog.Posted_2020_08_03.html#tetris-in-d
web assembly source and explanation here:
http://dpldocs.info/this-week-in-d/Blog.Posted_2020_08_10.html
Short version: BARE MINIMUM druntime port to webassembly
On Friday, 7 August 2020 at 21:58:10 UTC, Per Nordlöw wrote:
https://phobos-next.dpldocs.info/index.html
aren't updated. For instance the file
dpldocs never auto-updates. You must either link to a specific
tagged version like this:
https://phobos-next.dpldocs.info/v0.3.9/index.html
Or go
On Friday, 7 August 2020 at 21:03:47 UTC, aberba wrote:
Syntactically they look the same (although D's can do more
things) so I'm trying to understand how why in D it's called
template but in languages like C#/Java they're generics.
In D, a copy of the function is created for each new
On Thursday, 6 August 2020 at 13:18:40 UTC, Per Nordlöw wrote:
mixin(T.stringof ~ " _store" ~ T.mangleof ~
Never ever use mixin(T.stringof). Always just use mixin("T")
instead.
mixin("T _store", T.mangleof /* or just idx is gonna be better
*/,";");
Though I doubt this is
On Thursday, 6 August 2020 at 01:23:33 UTC, Per Nordlöw wrote:
How does the memory usage and speed of this code compare to the
variant that uses template instantiations?
I haven't tested this specifically, but similar tests have come
in at like 1/10th the memory and compile time cost.
There
On Thursday, 6 August 2020 at 01:17:51 UTC, lithium iodate wrote:
more love for phobos pls
That would add a lot to the cost and bring no real benefit
On Thursday, 6 August 2020 at 00:58:39 UTC, Per Nordlöw wrote:
Is it possible to implement
in a non-recursive way?
It is very easy too... just write an ordinary function:
size_t maxSizeOf(T...)() {
size_t max = 0;
foreach(t; T)
if(t.sizeof > max)
On Tuesday, 4 August 2020 at 13:36:15 UTC, Zans wrote:
Is there any way to declare template functions inside interface
and then override them in a class?
No, the templates in the interface are automatically considered
`final`. So the body must be in the interface too to avoid that
undefined
On Monday, 3 August 2020 at 14:23:56 UTC, Victor L Porton wrote:
Are function literals considered deprecated in regard of using
delegates instead?
No, they both work well for different purposes.
On Monday, 3 August 2020 at 03:00:08 UTC, Cecil Ward wrote:
When practically speaking would you use UDAs? A real-world
use-case?
They are useful when you want to attach some kind of metadata to
the declarations for a library to read. For example, my script.d
looks for `@scriptable` for
On Sunday, 2 August 2020 at 16:05:07 UTC, Ronoroa wrote:
That doesn't seem to stringize the args part like in
#__VA_ARGS__
oh yeah i missed that part.
D basically can't do that exactly, but if you pass the args as
template things directly you can do this:
---
void main(string[] args) {
On Sunday, 2 August 2020 at 15:30:27 UTC, Ronoroa wrote:
How do I achieve equivalent semantics of following C++ code?
```
#define dbg(...) std::cout << __LINE__ << #__VA_ARGS__ << " = "
<< print_func(__VA_ARGS__) << std::endl;
```
You probably just want
void dbg(Args...)(Args args, size_t
On Thursday, 30 July 2020 at 12:22:46 UTC, aberba wrote:
I'm able to decode it to a buffer but the trouble is getting it
from buffer to an actual image file. Any library function
combination I can use?
I don't think I wrote it as a library yet, but the idea is pretty
simple: they all start
On Saturday, 25 July 2020 at 11:12:16 UTC, aberba wrote:
Oop! Chaining the writeln too could have increased the wow
factor. I didn't see that.
oh I hate it when people do that though, it just looks off to me
at that point.
On Tuesday, 21 July 2020 at 19:20:28 UTC, Simen Kjærås wrote:
Walter gives some justification in the post immediately
following:
whelp proves my memory wrong!
On Tuesday, 21 July 2020 at 13:16:44 UTC, IGotD- wrote:
Either the array will hit that page during initialization or
something else during the execution.
But the array isn't initialized in the justification scenario. It
is accessed through a null pointer and the type system thinks it
is fine
On Tuesday, 21 July 2020 at 12:44:23 UTC, Drone1h wrote:
Would it be possible to explain this, please ?
nothrow only applies to Exception and its children. Error is a
different branch.
Error means you have a programming error and cannot be caught and
recovered (though the compiler allows
On Monday, 20 July 2020 at 22:05:35 UTC, WhatMeWorry wrote:
How does that pertain to an array?
C arrays work as pointers to the first element and D can use that
style too.
2) "The total size of a static array cannot exceed 16Mb" What
limits this?
The others aren't wrong about stack size
On Monday, 20 July 2020 at 16:01:53 UTC, blizzard wrote:
I am trying to learn D and knowing when code is run at compile
time would be good for learning what functions can be used
without thinking much about performance.
No function is ever run at compile time unless you specifically
request
On Saturday, 18 July 2020 at 16:00:09 UTC, Dukc wrote:
I have a project where I need to take and send UDP packets over
the Internet. Only raw UDP
I wrote an example using phobos on my blog a while ago that might
help you get started:
On Monday, 13 July 2020 at 09:34:35 UTC, zoujiaqing wrote:
# dmd source/main.d Canvas.o -L-lstdc++ && ./main
[1]49078 segmentation fault ./main
On my computer I got this warning out of the compiler:
libstdc++ std::__cxx11::basic_string is not yet supported; the
struct contains an
On Saturday, 11 July 2020 at 04:28:32 UTC, cy wrote:
125 | static foreach (string member;
FieldNameTuple!T) {
The word "static" there can probably be removed and have it work
exactly the same way. Worth a try.
Does gdc not support static foreach at all?
only the newest gdc
On Tuesday, 7 July 2020 at 13:00:04 UTC, Steven Schveighoffer
wrote:
Doing that these days would be silly. You can depend on a
specific version of a repository without problems.
I always have problems when trying to do that. git submodules
bring pretty consistent pain in my experience.
But
On Tuesday, 7 July 2020 at 13:01:10 UTC, 9il wrote:
This would be good advertising for DFL, haha.
I don't know what you mean...
601 - 700 of 6596 matches
Mail list logo