On Monday, 6 May 2024 at 16:41:38 UTC, Steven Schveighoffer wrote:
This is a very old issue:
https://issues.dlang.org/show_bug.cgi?id=2043 since "moved" to
https://issues.dlang.org/show_bug.cgi?id=23136
I would love to see a solution, but the workaround at least
exists!
-Steve
Interesting
On Thursday, 1 February 2024 at 03:20:31 UTC, dunkelheit wrote:
this is my code, I'm a begginer on vibe, and I want to use html
and not diet files
Take a look at the static file example, I think that's close to
what you're looking for.
https://github.com/vibe-d/vibe.d/blob/master/examples/ht
On Wednesday, 4 October 2023 at 08:11:12 UTC, Joel wrote:
What am I missing?
Splitter returns a forward range so you can't slice the result.
You can use take() and drop() instead. Also, converting a string
range to int[] doesn't seem to work, but I don't know if it
should. Here is a version
On Monday, 3 July 2023 at 09:50:20 UTC, Arafel wrote:
Is this a conscious design decision (if so, why?), or just a
leak of some implementation detail, but that could eventually
be made to work?
Besides the pointer adjustment problem mentioned by
FeepingCreature, it's an unsound conversion eve
On Wednesday, 14 June 2023 at 00:59:30 UTC, Paul wrote:
I would like to have labeled bits in a union with a ubyte.
Something like this:
```d
struct MyStruct {
union {
ubyte status;
bit A, B, C…etc
}
}
```
Is something like this possible?
Thanks
You can do something li
On Wednesday, 24 May 2023 at 16:39:36 UTC, Ben Jones wrote:
Is there a range like iota in phobos where step is a function?
I want to specify begin/end and have the "step" be next =
fun(prev). Should be easy to write, but don't want to reinvent
the wheel.
I think you’re looking for either re
On Wednesday, 12 October 2022 at 02:15:55 UTC, Steven
Schveighoffer wrote:
Am I missing something?
Perhaps I am, but why not turn it into a numeric comparison, like:
```
while((i = 5) == 0)
```
On Monday, 3 October 2022 at 08:10:43 UTC, Bienlein wrote:
My question is whether someone has an idea for a better
solution.
You can pass a lambda to the fiber constructor. For example:
```
void fiberFunc(int i)
{
writeln(i);
}
void main()
{
auto fiber = new Fiber(() => fiberFunc(5))
On Tuesday, 27 October 2020 at 11:36:42 UTC, Marcone wrote:
I want to use isDaemon to automatic stop worker thread if
ownner thread is finished
Terminating threads without properly unwinding the stack is
generally a very bad idea. Most importantly the destructors of
stucts on the stack won't
On Tuesday, 27 October 2020 at 02:05:37 UTC, Ruby The Roobster
wrote:
void construct(string type,atom base,atom bonded)
{
base = new
atom(base.name.idup,base.mass,base.electro_negativity,base.valence_electrons,base.electrons,base.protons,base.neutrons,base.pos);
(
On Thursday, 9 May 2019 at 12:33:37 UTC, Cym13 wrote:
On Thursday, 9 May 2019 at 11:31:20 UTC, Cym13 wrote:
...
To dismiss any doubt about AV or other processes coming into
play I took the binary and ran it with wine on linux with the
exact same end result.
For reference my windows system i
On Friday, 8 February 2019 at 15:42:13 UTC, Jonathan Levi wrote:
I should be able to use `core.memory.GC.removeRange` right?
That would leave dangling references in the array. You may be
interested in this, but I have not used it myself:
https://repo.or.cz/w/iv.d.git/blob/HEAD:/weakref.d
On Tuesday, 25 December 2018 at 22:07:07 UTC, Johannes Loher
wrote:
Thanks a lot for the info, that clarifies things a bit. But it
still leaves the question, why it works correctly when
inheriting from an abstract class instead of implementing an
interface... Any idea about why that?
Unlike i
On Monday, 12 November 2018 at 16:29:24 UTC, helxi wrote:
On Monday, 12 November 2018 at 16:25:13 UTC, Rene Zwanenburg
wrote:
Idk where you got that syntax from, but there's no syntactic
difference between calling normal functions and function
pointers:
import std.stdio;
import std.concurrenc
On Monday, 12 November 2018 at 16:08:28 UTC, helxi wrote:
As far as I understand, calling a function pointer with an
argument in D looks like:
call(&fnptr, argTofn0, argTofn1, argTofn3);
Idk where you got that syntax from, but there's no syntactic
difference between calling normal functi
On Wednesday, 22 August 2018 at 13:50:07 UTC, Andrey wrote:
Hello,
How to test if variable has void value?
string text = void;
if(text == void)
{
writeln("Is void");
}
Tried this:
if(is(text == void))
but doesn't work.
You can't. When using a void initializer the actual value is
garba
On Tuesday, 21 August 2018 at 21:29:38 UTC, Andrey wrote:
Hello,
This is a code:
(...)
test.handler = &test.one;
That's an internal pointer, and internal pointers are not allowed
in structs precisely because of the issues you're running into:
the pointer will be invalid after a
I've been staring at this problem the past few hours without
making any progress. But I feel like I'm overlooking something
obvious..
Using Adam's comhelpers, I've made a JSON plugin for LogParser.
However after running for a bit it'll crash with signs of memory
corruption.
My guess was the
On Wednesday, 6 June 2018 at 23:26:23 UTC, Entity325 wrote:
I can't imagine things like "glEnable/DisableClientState" are
deprecated.
They are. All the missing symbols are indeed deprecated.
attempting to load the deprecated functions according to the
documentation page did a whole lot of not
On Sunday, 25 March 2018 at 22:09:43 UTC, Nordlöw wrote:
eventhough I compile with -release -inline -nobounds flags.
Just to make sure: are you passing -O as well?
On Monday, 19 February 2018 at 14:57:47 UTC, Clinton wrote:
On Monday, 19 February 2018 at 14:55:01 UTC, Clinton wrote:
Hi all, I need advice from better developers on this concern.
I'm using an AA to reference another array for quicker access:
[...]
Sorry, on second look my explanation isn'
On Thursday, 8 February 2018 at 21:09:33 UTC, JN wrote:
Hi,
is there any way to debug binaries on Windows? I'd at least
like to know which line of code made it crash. If it's D code,
I get a call trace usually, but if it's a call to a C library,
I get a crash and that's it. I am using VSCode
On Friday, 12 January 2018 at 07:33:37 UTC, Mike Parker wrote:
On Friday, 12 January 2018 at 05:24:52 UTC, Venkat wrote:
I get a SegFault with the main method below which uses
HibernateD . The second main method which uses ddbc just works
fine. What is wrong with the first main method ? I have
On Friday, 15 December 2017 at 01:49:56 UTC, Steven Schveighoffer
wrote:
So... you plan on rendering more than 1000 frames per second?
I think in any case, even if the API allows it, you are
probably not getting much better resolution on your non-windows
systems.
Have you tried it anyway an
On Thursday, 14 December 2017 at 23:45:18 UTC, Ivan Trombley
wrote:
Something along the lines of this:
while (render)
{
immutable auto startTime = MonoTime.currTime;
// Render the frame...
immutable auto remain = m_frameDuration - (startTime -
MonoTime.currTime);
if (remain > Duratio
On Thursday, 14 December 2017 at 21:11:34 UTC, Ivan Trombley
wrote:
I need to be able to put a thread to sleep for some amount of
time. I was looking at using Thread.sleep but it appears that
on Windows, it's limited to millisecond resolution. Is there a
way to do this in a cross-platform way t
On Tuesday, 28 November 2017 at 18:47:06 UTC, Vino wrote:
Hi All,
You can do this easily using the std.net.isemail module:
https://dlang.org/phobos/std_net_isemail.html
On Thursday, 23 November 2017 at 15:26:03 UTC, Timoses wrote:
A aaa = a;
That's initialization, not assignment, which is subtly different.
It will call the postblit on aaa instead of opAssign. A postblit
can be defined this way:
this(this)
{
}
There is no way to access the original a
On Thursday, 26 October 2017 at 17:55:05 UTC, Mr. Jonse wrote:
when calling Clock.currTime() in a this() in a class. I have no
idea why it is trying to do it at compile time and failing. I
thought if ctfe couldn't compile it would do it at run time
anyways? Seems like a bug.
I suspect you're
On Tuesday, 17 October 2017 at 05:57:50 UTC, Ky-Anh Huynh wrote:
On Tuesday, 17 October 2017 at 04:56:23 UTC, ketmar wrote:
you can use libc's `putenv()` in D too, it is ok. just import
`core.sys.posix.stdlib`, it is there. D is not antagonistic
to C, and doesn't try to replace the whole lib
On Tuesday, 5 September 2017 at 06:23:26 UTC, Dukc wrote:
On Monday, 4 September 2017 at 20:31:35 UTC, Igor wrote:
Search for word "local" here:
https://code.dlang.org/docs/commandline. Maybe some of those
can help you. If not you could make a pull request for dub
that would support such a thi
On Thursday, 31 August 2017 at 14:44:07 UTC, vino wrote:
Hi All,
Can some provide me a example of how to remove all blank
lines from a file.
From,
Vino.B
This one doesn't read the entire file into memory:
import std.stdio;
import std.array;
import std.algorithm;
import std.uni;
void mai
On Saturday, 5 August 2017 at 15:33:57 UTC, Matthew Remmel wrote:
Any ideas?
You can use to! in std.conv:
import std.stdio;
import std.conv;
enum Foo
{
A = "A",
B = "B"
}
void main()
{
writeln("A".to!Foo);
}
On Wednesday, 12 July 2017 at 12:57:19 UTC, Rene Zwanenburg wrote:
On Wednesday, 12 July 2017 at 12:20:11 UTC, Miguel L wrote:
What is the best way in D to create a function that receives a
static array of any length?
Templatize the array length:
void foo(size_t length)(int[length] arr)
{
}
On Wednesday, 12 July 2017 at 12:20:11 UTC, Miguel L wrote:
What is the best way in D to create a function that receives a
static array of any length?
Templatize the array length:
void foo(size_t length)(int[length] arr)
{
}
On Wednesday, 14 June 2017 at 08:10:57 UTC, Russel Winder wrote:
but the bitfields mixin template appears to do more than add
all the bit twiddling functions to emulate the bitfields. This
would appear a priori to not allow for actual memory mapped
devices using it, or am I missing something?
On Tuesday, 30 May 2017 at 11:34:52 UTC, ketmar wrote:
If malloc were marked as pure, wouldn't that mean it must
return the same pointer every time you call it with the same
size?
of course. but D "pure" is not what other world knows as
"pure". we love to mess with words.
Well, there's the
On Monday, 29 May 2017 at 01:36:24 UTC, Jonathan M Davis wrote:
A simple example: anything that has a malloc/free pair.
Yeah, if you do it right, you should be fine, but you have to
do it right, and it's very easy to miss some detail that makes
it wrong to insist to the compiler that what you
On Friday, 14 April 2017 at 15:49:00 UTC, Suliman wrote:
I found problem! ResultRange should be converted to array
before it can be `map`ed
That shouldn't be necessary. Can you post your complete code?
On Friday, 14 April 2017 at 15:42:33 UTC, Suliman wrote:
On Friday, 14 April 2017 at 15:40:18 UTC, Rene Zwanenburg wrote:
On Friday, 14 April 2017 at 15:31:21 UTC, Suliman wrote:
On Friday, 14 April 2017 at 15:22:49 UTC, Rene Zwanenburg
wrote:
On Friday, 14 April 2017 at 09:49:09 UTC, Suliman
On Friday, 14 April 2017 at 15:31:21 UTC, Suliman wrote:
On Friday, 14 April 2017 at 15:22:49 UTC, Rene Zwanenburg wrote:
On Friday, 14 April 2017 at 09:49:09 UTC, Suliman wrote:
on: dub build --compiler=ldc2
link
OPTLINK (R) for Win32 Release 8.00.17
Optlink isn't able to link object fil
On Friday, 14 April 2017 at 09:49:09 UTC, Suliman wrote:
on: dub build --compiler=ldc2
link
OPTLINK (R) for Win32 Release 8.00.17
Optlink isn't able to link object files produced by ldc. Could
you try an x64_86 build? You'll need the Microsoft linker.
On Monday, 10 April 2017 at 12:56:49 UTC, Nordlöw wrote:
src/knet/traversal.d(20,8): Error: module factixs from file
src/knet/factixs.d must be imported with 'import factixs;'
What am I doing wrong?
My first guess would be that the module declaration in that file
is incorrect. Are you sure i
On Monday, 3 April 2017 at 05:00:15 UTC, Inquie wrote:
Yes, but they are really not any different. They only look
different. A field can be a function just like a method because
they look exactly the same except on is in a vtable and the
other is in the fields memory. But both point functions.
On Tuesday, 24 January 2017 at 11:38:16 UTC, Jonathan M Davis
wrote:
Likely because it does bounds checking, so you at least know
that it's not null. But I don't see why that would really
improve much considering that the odds are that you're really
going to be accessing far more than just the
On Friday, 20 January 2017 at 08:19:57 UTC, Chris M. wrote:
I have no idea if this is an issue with D, or OpenSSL, or if
I'm just doing something completely wrong. I'm writing a
program that will either encrypt or decrypt a string using AES
in ECB mode (for a school assignment) and it's giving
On Friday, 20 January 2017 at 03:48:14 UTC, rikki cattermole
wrote:
As per the documentation this is wrong for anything beyond a
few weeks.
Although I have no idea if that's the case implementation wise.
I think the documentation is talking about the units used, not
length of the duration. Th
On Thursday, 19 January 2017 at 14:04:36 UTC, aberba wrote:
Using the standard library, how do a get number of hours or
seconds or minutes or days or months or years till current time
from a past timestamp (like "2 mins ago")? Not with manual
calculations but from Phobos functions.
You can ge
On Tuesday, 17 January 2017 at 08:58:33 UTC, Arun Chandrasekaran
wrote:
Interesting. Why doesn't the thread get GC'd in this case even
without any reference still active?
There will be a reference to it in druntime itself:
http://dlang.org/phobos/core_thread.html#.Thread.getThis
On Monday, 16 January 2017 at 15:56:16 UTC, Jack Stouffer wrote:
Same way you use any template parameters,
auto i = uniform!("(]")(0, 1000);
Also, if the template parameter consists of a single token you
can omit the parens:
auto i = uniform!"(]"(0, 1000);
On Tuesday, 13 December 2016 at 19:13:24 UTC, Begah wrote:
Any ideas?
Closest you can get is wrapping it in a property. If you need to
do this often you may be able to generate them, check the recent
"Getters/Setters generator" thread in Announce for some
inspiration.
On Thursday, 24 November 2016 at 16:17:19 UTC, Jot wrote:
Any more ideas? Obviously something isn't getting linked in in
the VS project.
This is definitely a stale object file problem. From that error
message it appears to use the .dub directory to store object
files of your dependencies. Try
On Thursday, 24 November 2016 at 09:52:32 UTC, Jot wrote:
Seems like someone decided to screw up a lot of people by
removing a lot of stuff ;/ I guess I should learn my lesson
about assuming a "stable" dmd release won't completely kill my
project.
There are still some old object files or libs
On Monday, 21 November 2016 at 16:24:38 UTC, Q. Schroll wrote:
Why don't lambdas cast to a delegate if they are of type R
function(Args)? I don't see any reason to that; a lambda should
be a delegate type by default, and a function only as a special
guarantee/optimization. It just makes them cu
On Wednesday, 26 October 2016 at 12:42:09 UTC, Nicholas Wilson
wrote:
doctype html
html
body
-foreach(s; images)
// it doesn't seem to like #{s} or !{s}
img(src=s)
--
shared static this()
{
auto router = new URLRouter;
router.registerWebInterfa
On Thursday, 6 October 2016 at 15:00:00 UTC, Pham wrote:
string s is multi-lines (CRLF as line break)
The write function will write extra CR character for each CRLF
pair -> why (bug?)
import std.file;
import std.stdio;
string s = ...;
auto fHandle = File("f:\\text.txt", "w"); // open for wri
On Friday, 23 September 2016 at 07:54:15 UTC, John C wrote:
How is it possible that "onTextChanged" isn't accessible but
the private method "changeSize" *is*?
Smells like an oversight. I guess the compiler doesn't see the
delegate as a member of a Control subclass, so it can't access
protecte
On Friday, 23 September 2016 at 08:39:44 UTC, llaine wrote:
Okay I tried yesterday, after 4hours of process, I never went
through the end of minification.
At the beginning I enter YES should I enter NO instead?
Hmm that's strange. I don't get any yes or no questions. What is
the exact messag
On Wednesday, 21 September 2016 at 20:22:42 UTC, llaine wrote:
The project is pretty big, DustMite would handle this?
Yes, but it may take some time. For large projects, running it on
a server is advisable. 3K LOC should be doable on a desktop
machine.
Dub has built-in support for running D
On Sunday, 11 September 2016 at 05:44:13 UTC, Yuxuan Shui wrote:
I recently noticed nested struct capture its context by
reference (which, BTW, is not mentioned at all here:
https://dlang.org/spec/struct.html#nested). And bliting a
struct obviously doesn't do a deep copy of its context.
So my
On Thursday, 1 September 2016 at 20:38:13 UTC, Yuxuan Shui wrote:
I think my approach is probably better, because I believe
(correct me if I'm wrong): 1) it will never refer to a null
object.
That's true, but you can ensure the same thing for the wrapper:
struct Ref()
{
@disable this();
t
On Thursday, 1 September 2016 at 19:37:25 UTC, Yuxuan Shui wrote:
I just figured out how to store a reference:
@safe:
auto x(ref int a) {
struct A {
ref int xa() { return a; }
}
return A();
}
void main() {
import std.stdio;
int b = 10;
On Wednesday, 31 August 2016 at 08:38:11 UTC, Andrea Fontana
wrote:
Something like this: https://dpaste.dzfl.pl/9fa55b2a7927 ?
Andrea
Or use findAdjacent:
auto idsAreUnique = ids.array.sort.findAdjacent.empty;
http://dlang.org/phobos/std_algorithm_searching.html#.findAdjacent
On Wednesday, 17 August 2016 at 22:59:31 UTC, WhatMeWorry wrote:
I want to store all my shared/dynamic libraries within a
special directory relative to where the application directory
is. All of the derelictXX.loads(path) compiles except
DerelictGL3.reload(lib); which doesn't seem to be implem
On Wednesday, 27 July 2016 at 02:20:57 UTC, Charles Hixson wrote:
O, dear. It was sounding like such an excellent approach until
this
last paragraph, but growing the file is going to be one of the
common
operations. (Certainly at first.) (...)
So I'm probably better off sticking to using a se
On Tuesday, 5 July 2016 at 13:48:46 UTC, Claude wrote:
Ah ok. I tried using void[size] static array and it seems to
work without having to use GC.addRange().
Correct. void[] means the type of the data is unknown, so the GC
has to assume it can contain pointers.
This also means that _everythi
On Tuesday, 5 July 2016 at 12:34:20 UTC, Johannes Loher wrote:
I tried this, but it does not work correctly with slices.
The length of a slice is a runtime value, which is why it can't
be used to set static array size. What were you trying to
achieve? Avoid copying the input arrays, or accept
On Monday, 4 July 2016 at 19:22:52 UTC, Johannes Loher wrote:
This looks really nice, but I have several occurences of this,
with different arrays (and lengths), so i would need to create
several of those structs. But it looks really clean :)
You can use a template to remove the boilerplate. H
On Monday, 4 July 2016 at 11:42:40 UTC, Rene Zwanenburg wrote:
...
I forgot to mention:
If you're on Windows compilation defaults to 32 bit, false
pointers can be a problem with D's current GC in 32 bit
applications. This isn't an issue for the sample application
though, since you're not pu
On Monday, 4 July 2016 at 01:57:19 UTC, Hiemlick Hiemlicker wrote:
version(Windows)
void main()
{
import std.random;
while(getchar() != EOF)
{
auto x = new int[std.random.uniform(100, 1000)];
writeln("");
b
On Friday, 1 July 2016 at 10:35:04 UTC, Nordlöw wrote:
I think this is a important issue since asserts are not
optimized away in release mode and D is very much about
performance.
Asserts are removed in release mode, enforce isn't. Here's an
example:
=
void main(string[] args)
{
On Thursday, 23 June 2016 at 05:59:10 UTC, Andrew Chapman wrote:
Perfect, thank you! :-) Works like a charm.
On Wednesday, 22 June 2016 at 22:41:24 UTC, H. S. Teoh wrote:
On Wed, Jun 22, 2016 at 09:57:04PM +, Andrew Chapman via
Digitalmars-d-learn wrote:
Maybe try:
if (buffer[]
On Saturday, 18 June 2016 at 17:48:47 UTC, Joerg Joergonson wrote:
class foo(T) if (is(T : subfoo)) X;
FYI this can also be done in the template parameter list:
class foo(T : subfoo){}
On Thursday, 16 June 2016 at 01:57:19 UTC, Joerg Joergonson wrote:
Is there an efficient lazy way to make this happen?
No, I don't see how that would work.
Suppose I can't run the loop twice for performance
reasons(there is other stuff in it) and I don't want to store
the state and call info
On Wednesday, 15 June 2016 at 10:31:18 UTC, TheDGuy wrote:
Thanks a lot for your answer, getcwd() returns the path where
coedit is located on my harddrive:
C:\Program Files (x86)\Coedit_32\coedit.2update6.win32
How can i change that?
I'm not familiar with Coedit, but the run options seem to c
On Wednesday, 15 June 2016 at 09:48:19 UTC, TheDGuy wrote:
But if i execute the app my hand (in the windows command window
or my double click) it works as expected (so no error)? Why is
that?
My first guess would be that Coedit does not use the directory
where the executable is located as wor
On Monday, 13 June 2016 at 20:21:28 UTC, Joerg Joergonson wrote:
Are you running some other program that might be sending a lot
of broadcast messages?
Not that I know of. I haven't tried running it outside VS
though so it might be doing something weird. I'll investigate
further when I get a
On Monday, 6 June 2016 at 10:26:11 UTC, moechofe wrote:
The functions passed to map or amap take the type of the
element of the range as argument, but not a range itself.
Right. I don't think I understand what the semantics of your
example would be though.. Could you elaborate a bit?
On Monday, 6 June 2016 at 09:32:30 UTC, moechofe wrote:
I wonder if it is possible to write something like this:
---
// taskPool.distribute -- take a range and distribute entries
to different threads.
dirEntries().distribute(function(R1,R2)(R1 from,R2 to){
from
.filter!xxx
On Wednesday, 1 June 2016 at 19:59:51 UTC, Mark Isaacson wrote:
FWIW, the fixed range int part of this question is just an
example, I'm mostly just interested in whether this idea is
possible without a lot of bloat/duplication.
I suspect not.. Here's how std.typecons.Proxy is doing it:
https:
On Wednesday, 1 June 2016 at 18:14:33 UTC, Begah wrote:
I started using reference counters for my assets in my
application :
- Images
- Models
-
For my resource manager I started out with something similar to
what you're describing, but I eventually changed the design which
turned ou
On Wednesday, 1 June 2016 at 09:31:51 UTC, tcak wrote:
I understand that Base64 uses Ranges, and since String is seen
and used as unicode by Ranges (please tell me if I am wrong).
I am guessing, for this reason, auto btoa =
std.base64.Base64.encode("Blah"); doesn't work. You need to be
castin
I was wondering: what's the preferred method for deterministic
memory management?
You may be interested in RefCounted. It only works for structs,
not classes, but it's still useful.
- Classes/Structs have constructors and destructors. I am
unconfident with my knowledge as to how this works
On Friday, 27 May 2016 at 15:18:38 UTC, llaine wrote:
- And how can I minimize allocations?
My previous post still allocates though, through that call to
array at the end. I'm not sure how to completely remove all
allocations (I'm not that familiar with vibe.d), but I strongly
suspect it's p
On Friday, 27 May 2016 at 15:04:31 UTC, llaine wrote:
My level of D is really slow, so can you help me to improve
this? :)
Here's an alternative getCompanies. Untested so it may contain
some mistakes.
Company[] getCompanies() {
auto conn = client.lockConnection();
immutable result = conn
On Friday, 27 May 2016 at 13:45:23 UTC, llaine wrote:
Hi guys,
In my journey of learning about D I tried to benchmark D with
Vibe.d vs node with express and Ruby with Sinatra.
And the results are pretty surprising.
I have to admit that I though D was more faster than that. How
is this even p
On Monday, 23 May 2016 at 10:45:49 UTC, ParticlePeter wrote:
Is there a way to get the alias uint32_t instead ?
Nope. For the compiler uint32_t and uint are the same thing, this
is by design. Typedef can be used to create a separate type with
the same semantics as the type it's based upon:
On Thursday, 19 May 2016 at 10:58:42 UTC, Rene Zwanenburg wrote:
Calling task() only creates a Task, you also have to start it
somehow. The documentation contains an example:
https://dlang.org/phobos/std_parallelism.html#.task
I should add that a single shared array will cause contention if
On Thursday, 19 May 2016 at 10:41:14 UTC, Thorsten Sommer wrote:
On Thursday, 19 May 2016 at 10:13:21 UTC, rikki cattermole
wrote:
At this point I'd recommend you to just ignore Appender.
Write your own.
Dear rikki,
Thanks for the proposal :) Here is the new attempt #4 as simple
test case:
On Tuesday, 17 May 2016 at 05:30:33 UTC, WhatMeWorry wrote:
Am I supposed to get ALURE32.DLL from somewhere outside of DUB,
or did I miss a step or command when I built
derelict-alure-master?
thanks.
You'll need to get the dll somewhere else and set up DUB to copy
it to your output director
On Tuesday, 17 May 2016 at 06:55:35 UTC, Alex wrote:
with dmd test44.d -release
the results are:
You may want to pass '-O -inline' as well. -O enables general
optimizations, -inline enables function inlining.
-release is for disabling bounds checks, invariants, asserts..
The -debug and -rel
On Friday, 13 May 2016 at 10:19:04 UTC, Nordlöw wrote:
-gsalways emit stack frame
IIRC, not emitting a stack frame is an optimization which
confuses debuggers. So I think this can be used to make optimized
builds a bit easier to debug.
-gxadd stack stomp code
On Wednesday, 4 May 2016 at 14:54:39 UTC, chmike wrote:
Two constructors, one accepting a function and the other one
accepting a delegate would do the job for the API. Is there a
simple method to convert a function pointer into a delegate
pointer that is also efficient ?
http://dlang.org/phob
I'm in the process of making my code compile with DMD 2.071.
There's a construction I've been using which now results in a
deprecation message, and I'm not sure how to properly fix it.
It's a bit like design by introspection within a class hierarchy.
For example:
abstract class Base
{
priv
On Thursday, 21 April 2016 at 16:29:14 UTC, rcorre wrote:
- What happens when you compile a binary without phobos and
druntime, and with a custom entry point? I've never done that
myself and don't remember how to do that off the top of my
head, but the info should be somewhere on dlang.org.
I
On Thursday, 21 April 2016 at 11:54:27 UTC, rcorre wrote:
Thanks for the tip. Here's the linking code it shows:
cc d.o -o d -m64 -L/usr/lib -L/usr/lib32 -Xlinker
--export-dynamic -Xlinker -Bstatic -lphobos2 -Xlinker -Bdynamic
-lpthread -lm -lrt -ldl
/usr/bin/ld: d.o: relocation R_X86_64_32 a
On Thursday, 21 April 2016 at 01:20:27 UTC, rcorre wrote:
s/compile/link
I _can_ compile a D library, but as soon as I try to link
anything compiled with DMD it falls over.
What is dmd's verbose output? (add -v switch)
Some of the things it outputs are the location of the config file
it uses
On Wednesday, 20 April 2016 at 19:58:15 UTC, Tofu Ninja wrote:
To implement a copy/paste/duplicate functionality in a game
editor. I have an entity-component system, to duplicate an
entity, all it's components need to be duplicated. I have many
many components, I don't want to rely on manually
On Friday, 8 April 2016 at 09:56:41 UTC, Nick Treleaven wrote:
If the comparison with b shouldn't be allowed, I suggest we add
opEquals to std.range.only. This removes a need to import
std.algorithm.equal and reduces bracket nesting:
assert(b == only(1, 2));
equal[1] can compare ranges of di
On Friday, 8 April 2016 at 08:26:11 UTC, Daniel Kozak wrote:
On Friday, 8 April 2016 at 06:08:38 UTC, 9il wrote:
On Thursday, 7 April 2016 at 15:55:16 UTC, Steven
Schveighoffer wrote:
Wow, totally agree with you. Compiler shouldn't make you jump
through this hoop:
void foo(Cat cat)
{
Anima
1 - 100 of 193 matches
Mail list logo