On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote:
Hi, I'm new to language and games.
Many people say that GC is bad and can slow down your project
in some moments.
What can happen if I create a game using D without worrying
with memory management?
(using full GC)
Have a look at ht
On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote:
Hi, I'm new to language and games.
Many people say that GC is bad and can slow down your project
in some moments.
What can happen if I create a game using D without worrying
with memory management?
(using full GC)
Don't let the GC
On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote:
What can happen if I create a game using D without worrying
with memory management?
(using full GC)
It depends what kind of game it is and how sloppy your code is in
general.
Every game I have written in D i don't think about it,
On Friday, 23 February 2018 at 02:16:38 UTC, Jonathan M Davis
wrote:
The GC won't slow down your code in general (in fact, it will
probably speed it up in comparison to reference counting), but
whenever the GC does a collection, that means that it stops all
threads that it manages. So, you coul
On Friday, 23 February 2018 at 02:02:12 UTC, StickYourLeftFootIn
wrote:
On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote:
Hi, I'm new to language and games.
Many people say that GC is bad and can slow down your project
in some moments.
What can happen if I create a game using D witho
On Friday, February 23, 2018 01:54:07 Leonardo via Digitalmars-d-learn
wrote:
> Hi, I'm new to language and games.
> Many people say that GC is bad and can slow down your project in
> some moments.
> What can happen if I create a game using D without worrying with
> memory management?
> (using ful
On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote:
Hi, I'm new to language and games.
Many people say that GC is bad and can slow down your project
in some moments.
What can happen if I create a game using D without worrying
with memory management?
(using full GC)
What do you think
Hi, I'm new to language and games.
Many people say that GC is bad and can slow down your project in
some moments.
What can happen if I create a game using D without worrying with
memory management?
(using full GC)
On Thursday, 22 February 2018 at 18:02:11 UTC, Adam D. Ruppe
wrote:
You don't strip that at all, the function writes a
zero-terminated string to the buffer.
Thank you very much ! I forgot it.
JN wrote:
same idea?
absolutely the same. non-qualified imports (be it template, or function)
won't take part in overload resoultion.
On Thursday, 22 February 2018 at 21:19:12 UTC, ketmar wrote:
yes. this is done so unqualified won't silently "steal" your
functions. this can cause some unexpected (and hard to find)
bugs.
if you want it to work, you can either do qualified import
import bar : foo;
or manuall bring
JN wrote:
Is this expected behaviour?
bar.d
---
void foo(string s)
{
}
app.d
---
import std.stdio;
import bar;
void foo(int x)
{
}
void main()
{
foo("hi");
};
===
Error: function app.foo (int x) is not callable using argument types
(string)
yes. this is done so unqualified won't si
Is this expected behaviour?
bar.d
---
void foo(string s)
{
}
app.d
---
import std.stdio;
import bar;
void foo(int x)
{
}
void main()
{
foo("hi");
};
===
Error: function app.foo (int x) is not callable using argument
types (string)
On Thursday, 22 February 2018 at 12:50:43 UTC, ag0aep6g wrote:
On 02/22/2018 10:39 AM, bauss wrote:
On Thursday, 22 February 2018 at 05:22:19 UTC, TheFlyingFiddle
wrote:
Eg:
uint a = 3;
int b = -1;
assert(a > b); //No idea what should happen here.
This is what happens:
assert(cast(int)a >
On Thursday, 22 February 2018 at 17:44:53 UTC, FrankLike wrote:
SHGetSpecialFolderPath(NULL,cast(char*)Path.ptr,CSIDL_DESKTOP,0);
You don't strip that at all, the function writes a
zero-terminated string to the buffer. So either: use the pointer
as-is to other C functions, or call the `fromS
On Thu, Feb 22, 2018 at 10:43:24AM +0200, ketmar via Digitalmars-d-learn wrote:
> Nick Sabalausky (Abscissa) wrote:
>
> > Are there any tutorials or articles out there for "getting started
> > with converting a C++ codebase to D one module at a time?" Or at the
> > very least: tips, tricks, lessio
On Thursday, 22 February 2018 at 16:59:40 UTC, Adam D. Ruppe
wrote:
On Thursday, 22 February 2018 at 16:55:14 UTC, FrankLike wrote:
char[100] abc ="aabc";
auto abcaa = ((abc).dup).stripRight;
try:
auto abcaa = stripRight(abc[])
Now,I want to get the result:
char[100] Path;
writeln(
On Thursday, 22 February 2018 at 17:08:14 UTC, FrankLike wrote:
On Thursday, 22 February 2018 at 16:59:40 UTC, Adam D. Ruppe
wrote:
On Thursday, 22 February 2018 at 16:55:14 UTC, FrankLike wrote:
It is simply that these functions require a slice so it can
resize it and you can't resize a stat
On Thursday, 22 February 2018 at 16:59:40 UTC, Adam D. Ruppe
wrote:
On Thursday, 22 February 2018 at 16:55:14 UTC, FrankLike wrote:
It is simply that these functions require a slice so it can
resize it and you can't resize a static array.
char[100] abc ="aabc";
string aa = to!strin
On Thursday, 22 February 2018 at 16:55:14 UTC, FrankLike wrote:
char[100] abc ="aabc";
auto abcaa = ((abc).dup).stripRight;
try:
auto abcaa = stripRight(abc[])
just make sure you do NOT return that abcaa from the function or
store it in an object. It still refers to the static array th
Hi,everyone,
How to use strip or stripRight on char[len]?
For example:
string abcs ="aabc";
auto abcsaa = abcs.stripRight;
writeln(abcsaa);
writeln("---abcsaa--stripRight ok ");
char[100] abc ="aabc";
auto abcaa = ((abc).dup).stripRight;
writeln(abcaa);
writeln("stripRight e
On Thursday, 22 February 2018 at 02:41:30 UTC, Steven
Schveighoffer wrote:
Hah! I never thought of doing a slice with negative indexes ;)
Maybe is my past of python:
arr[-3:] to get the last 3 elements for eg.
:)
On 22.02.2018 01:26, Adam D. Ruppe wrote:
On Thursday, 22 February 2018 at 00:13:43 UTC, SrMordred wrote:
string x = "123";
auto c = x.ptr;
c++;
writeln(c[-1]); // 1
That's only happening because pointers bypass range checks.
writeln(c[-1..0]); //BOOM Range violation
But with a slice negat
On Thursday, 22 February 2018 at 14:53:11 UTC, Seb wrote:
On Tuesday, 6 February 2018 at 12:03:06 UTC, joe wrote:
Hello everybody!
Last week end I found this post (
https://dlang.org/blog/2017/08/01/a-dub-case-study-compiling-dmd-as-a-library/ ) on the Blog and thought to myself awesome.
[..
On Tuesday, 6 February 2018 at 12:03:06 UTC, joe wrote:
Hello everybody!
Last week end I found this post (
https://dlang.org/blog/2017/08/01/a-dub-case-study-compiling-dmd-as-a-library/ ) on the Blog and thought to myself awesome.
[...]
BTW I know it's not as powerful as DMD (and not the r
On Thursday, 22 February 2018 at 13:44:51 UTC, RazvanN wrote:
On Thursday, 22 February 2018 at 13:21:04 UTC, joe wrote:
[...]
Indeed, @Stefan is right. The ParseTimeVisitor only contains
information available at parse time. If you are interested in
the parent you have 2 options: either (1) u
On Thursday, 22 February 2018 at 13:15:11 UTC, rikki cattermole
wrote:
On 23/02/2018 2:12 AM, FrankLike wrote:
IShellLink* pLink;
IPersistFile* ppf;
Reminder classes in D are already references, no need for
pointers to them.
Ok,I delete the pointers ,It's ok!
Thank you very muc
On Thursday, 22 February 2018 at 02:41:30 UTC, Steven
Schveighoffer wrote:
On 2/21/18 7:30 PM, SrMordred wrote:
But with a slice negative indexes are never allowed, even on
a pointer.
youd have to do
(c-1)[0 .. 1];
Nice!
Thank you both!
In D Slice article it says "You can even use negative
On Thursday, 22 February 2018 at 13:21:04 UTC, joe wrote:
On Monday, 12 February 2018 at 08:47:58 UTC, RazvanN wrote:
Hi Joe,
/SNIP
On Tuesday, 6 February 2018 at 12:03:06 UTC, joe wrote:
[...]
The FuncDeclaration node contains all the information for that.
For example, you can access fd.pa
On Thursday, 22 February 2018 at 13:15:11 UTC, rikki cattermole
wrote:
Reminder classes in D are already references, no need for
pointers to them.
Thank you,but get the same error.
[D CODE]
if(lpszLnkFileDir is null) return;
HRESULT hr;
IShellLink pLink;
IPer
On Thursday, 22 February 2018 at 13:21:04 UTC, joe wrote:
On Monday, 12 February 2018 at 08:47:58 UTC, RazvanN wrote:
[...]
Follow up question...
Why is *.parent always null?
e.g.:
extern(C++) class MyVisitor(AST): ParseTimeTransitiveVisitor!AST
{
override void visit(AST.Import i)
{
On Monday, 12 February 2018 at 08:47:58 UTC, RazvanN wrote:
Hi Joe,
/SNIP
On Tuesday, 6 February 2018 at 12:03:06 UTC, joe wrote:
[...]
The FuncDeclaration node contains all the information for that.
For example, you can access fd.parent to see if the function is
declared at top-level (in wh
On 23/02/2018 2:12 AM, FrankLike wrote:
Hi,everyone,
I want use the Com object (it comes from other dll) in D,but the
core.sys.windows.objidl:QueryInterface Fuction not work.
For example:
import core.sys.windows.windef;
import core.sys.windows.basetyps;
import core.sys.windows.uuid;
import
Hi,everyone,
I want use the Com object (it comes from other dll) in D,but the
core.sys.windows.objidl:QueryInterface Fuction not work.
For example:
import core.sys.windows.windef;
import core.sys.windows.basetyps;
import core.sys.windows.uuid;
import core.sys.windows.com;
import
core.sys.win
On 02/22/2018 10:39 AM, bauss wrote:
On Thursday, 22 February 2018 at 05:22:19 UTC, TheFlyingFiddle wrote:
Eg:
uint a = 3;
int b = -1;
assert(a > b); //No idea what should happen here.
This is what happens:
assert(cast(int)a > b);
Nope. It's `assert(a > cast(uint)b);`.
On Monday, 12 February 2018 at 08:47:58 UTC, RazvanN wrote:
Hi Joe,
I suggest you watch this video which explains how the parse
time visitors work: https://www.youtube.com/watch?v=tK072jcoWv4
.
On Tuesday, 6 February 2018 at 12:03:06 UTC, joe wrote:
[...]
The FuncDeclaration node contains
On Thursday, 22 February 2018 at 05:22:19 UTC, TheFlyingFiddle
wrote:
Eg:
uint a = 3;
int b = -1;
assert(a > b); //No idea what should happen here.
This is what happens:
assert(cast(int)a > b);
also related: https://github.com/Syniurge/Calypso/issues/85
(feasibility of extending calypso to do source to source translation
(eg C++ => D or C=>D) )
On Thu, Feb 22, 2018 at 12:43 AM, ketmar via Digitalmars-d-learn
wrote:
> Nick Sabalausky (Abscissa) wrote:
>
>> Are there any tutorials or art
Nick Sabalausky (Abscissa) wrote:
Are there any tutorials or articles out there for "getting started with
converting a C++ codebase to D one module at a time?" Or at the very
least: tips, tricks, lessions learned, from those who have come before.
from my experience (various codebases up to mi
39 matches
Mail list logo