On Wednesday, 4 July 2018 at 02:54:47 UTC, Joe wrote:
Now I fixed this by changing the import to core.stdc.stdio. I
guess the problem is if you import std.stdio (which brings in
the other one), there are two slightly incompatible stdout's
and the D takes precedence.
If you import both modules
On Wednesday, 4 July 2018 at 02:16:00 UTC, Seb wrote:
Hmm, calling e.g. fprintf with stdout should just work:
---
void main()
{
import core.stdc.stdio;
fprintf(stdout, "Hello %s", "world".ptr);
}
---
Could you maybe provide your whole code?
This short test program shows the error:
--
On Wednesday, 4 July 2018 at 02:08:11 UTC, Joe wrote:
On Wednesday, 4 July 2018 at 01:58:15 UTC, Seb wrote:
So just add the declaration to your D file:
---
extern(C) void myCfunction(FILE* stream);
---
I do have a similar declaration in D. It appears the problem
is that the C program I'm tr
On Wednesday, 4 July 2018 at 01:58:15 UTC, Seb wrote:
So just add the declaration to your D file:
---
extern(C) void myCfunction(FILE* stream);
---
I do have a similar declaration in D. It appears the problem is
that the C program I'm trying to convert passes stdout as the
argument and the
On Wednesday, 4 July 2018 at 01:06:36 UTC, Joe wrote:
The subject basically says it all. The C function uses the
argument to call fprintf and also passes it to other functions
where it's used to call fileno, fprintf or putc.
Like you would with C's fprintf
(https://dlang.org/phobos/core_stdc_
The subject basically says it all. The C function uses the
argument to call fprintf and also passes it to other functions
where it's used to call fileno, fprintf or putc.
On Wednesday, 4 July 2018 at 00:23:36 UTC, 9il wrote:
On Sunday, 25 February 2018 at 14:26:24 UTC, Arredondo wrote:
On Friday, 23 February 2018 at 18:29:09 UTC, Ilya Yaroshenko
wrote:
[...]
It is not working my friend. I've been at this for nearly two
full days now. All the .lib/.a files I h
On Sunday, 25 February 2018 at 14:26:24 UTC, Arredondo wrote:
On Friday, 23 February 2018 at 18:29:09 UTC, Ilya Yaroshenko
wrote:
openblas.net contains precompiled openblas library for
Windows. It may not be optimised well for exactly your CPU but
it is fast enought to start. Put the library fi
On Tuesday, 3 July 2018 at 17:54:08 UTC, Seb wrote:
BTW in case someone has a bit of time to look at the MinGW
headers. They are built as part of the `build-mingw-libs`
branch at the installer repo:
https://github.com/dlang/installer/blob/build-mingw-libs/windows/build_mingw.bat
This is autom
On 04/07/2018 6:24 AM, Chris M. wrote:
Looks like there's a user32.def file in the src package that does not
have these two functions defined. Not too sure how this vcvars64.bat
file builds the 64-bit libraries from this, but I think I'll have to
open a ticket with the mingw devs to have them b
On Tuesday, 3 July 2018 at 18:24:47 UTC, Chris M. wrote:
On Tuesday, 3 July 2018 at 17:54:08 UTC, Seb wrote:
[...]
https://sourceforge.net/projects/mingw/files/MinGW/Base/w32api/w32api-5.0.2/
Looks like there's a user32.def file in the src package that
does not have these two functions defin
On Tuesday, 3 July 2018 at 17:54:08 UTC, Seb wrote:
On Tuesday, 3 July 2018 at 15:10:34 UTC, Chris M. wrote:
On Tuesday, 3 July 2018 at 14:38:53 UTC, Mike Parker wrote:
On Tuesday, 3 July 2018 at 13:32:21 UTC, Chris M. wrote:
After hashing it out with some people on the Discord, I'm
fairly
On Tuesday, 3 July 2018 at 15:10:34 UTC, Chris M. wrote:
On Tuesday, 3 July 2018 at 14:38:53 UTC, Mike Parker wrote:
On Tuesday, 3 July 2018 at 13:32:21 UTC, Chris M. wrote:
After hashing it out with some people on the Discord, I'm
fairly certain we narrowed it down to the 64-bit user32.lib
On Tuesday, 3 July 2018 at 15:06:28 UTC, Mike Parker wrote:
..
That said, the GC in D runs when main exits anyway, so the
destructor in your example will be called. That's why I warned
earlier about it being nondeterministic. For example, if you
have a Texture instance that depends on the cont
On Tuesday, 3 July 2018 at 14:38:53 UTC, Mike Parker wrote:
On Tuesday, 3 July 2018 at 13:32:21 UTC, Chris M. wrote:
After hashing it out with some people on the Discord, I'm
fairly certain we narrowed it down to the 64-bit user32.lib
from mingw missing these functions.
https://issues.dlan
On Tuesday, 3 July 2018 at 14:42:58 UTC, Flaze07 wrote:
On Tuesday, 3 July 2018 at 14:32:01 UTC, Mike Parker wrote:
Resources allocated for the process will be released on exit.
I see...but it is dependant on the OS right ? because I have
seen other stuff relating to malloc as well, there ar
On 7/3/18 10:37 AM, ag0aep6g wrote:
On Tuesday, 3 July 2018 at 13:32:52 UTC, aliak wrote:
foreach (c; "👩👩👦👦🏳️🌈") {
writeln(c);
}
So basically the above just doesn't work. Prints gibberish.
Because you're printing one UTF-8 code unit (`char`) per line.
So I figured, std.uni.byGrapheme w
On Tuesday, 3 July 2018 at 14:32:01 UTC, Mike Parker wrote:
Resources allocated for the process will be released on exit.
I see...but it is dependant on the OS right ? because I have seen
other stuff relating to malloc as well, there are some out there
that said that there is no need to free
On Tuesday, 3 July 2018 at 13:32:52 UTC, aliak wrote:
So basically the above just doesn't work. Prints gibberish.
What system are you on? Successfully printing this stuff depends
on a lot of display details too, like writeln goes to a
terminal/console and they are rarely configured to support
On Tuesday, 3 July 2018 at 13:32:21 UTC, Chris M. wrote:
After hashing it out with some people on the Discord, I'm
fairly certain we narrowed it down to the 64-bit user32.lib
from mingw missing these functions.
https://issues.dlang.org/show_bug.cgi?id=19051
So are the mingw libs only ship
On Tuesday, 3 July 2018 at 13:36:56 UTC, aliak wrote:
Hehe I guess the forum really is using D :p
The two graphemes I'm talking about (which seem to not be
rendered correctly above) are:
family emoji: https://emojipedia.org/family-woman-woman-boy-boy/
rainbow flag: https://emojipedia.org/rain
On Tuesday, 3 July 2018 at 13:32:52 UTC, aliak wrote:
foreach (c; "👩👩👦👦🏳️🌈") {
writeln(c);
}
So basically the above just doesn't work. Prints gibberish.
Because you're printing one UTF-8 code unit (`char`) per line.
So I figured, std.uni.byGrapheme would help, since that's what
they ar
On 7/3/18 9:32 AM, aliak wrote:
Hi, trying to figure out how to loop through a string of characters and
then spit them back out.
Eg:
foreach (c; "👩👩👦👦🏳️🌈") {
writeln(c);
}
So basically the above just doesn't work. Prints gibberish.
So I figured, std.uni.byGrapheme would help, since th
On Tuesday, 3 July 2018 at 10:56:26 UTC, Flaze07 wrote:
hmm, I assume you know about DSFML, so... i.e
void main( string args[] ) {
auto win = new RenderWindow( VideoMode( 400, 400 ),
"resource leak ?" );
win.close();
}
//in this context, is there any memory leak ? because I saw
from
On Tuesday, 3 July 2018 at 13:32:52 UTC, aliak wrote:
Hi, trying to figure out how to loop through a string of
characters and then spit them back out.
Eg:
foreach (c; "👩👩👦👦🏳️🌈") {
writeln(c);
}
So basically the above just doesn't work. Prints gibberish.
So I figured, std.uni.byGrapheme
On Tuesday, 3 July 2018 at 05:36:12 UTC, Seb wrote:
On Monday, 2 July 2018 at 23:00:08 UTC, Chris M. wrote:
On Monday, 2 July 2018 at 21:20:26 UTC, Seb wrote:
On Monday, 2 July 2018 at 19:24:38 UTC, Chris M. wrote:
On Monday, 2 July 2018 at 18:48:16 UTC, Jonathan M Davis
wrote:
[...]
Downlo
Hi, trying to figure out how to loop through a string of
characters and then spit them back out.
Eg:
foreach (c; "👩👩👦👦🏳️🌈") {
writeln(c);
}
So basically the above just doesn't work. Prints gibberish.
So I figured, std.uni.byGrapheme would help, since that's what
they are, but I can't g
On Tuesday, 3 July 2018 at 10:00:00 UTC, Mike Parker wrote:
The only way you're going to be leaking resources is if the app
is long running and the resource objects are never collected.
I'd be more concerned about the nondeterministic nature of the
destructor calls, particularly what happens
On Tuesday, 3 July 2018 at 07:29:12 UTC, Flaze07 wrote:
class RenderWindow {
private sfRenderWindow* _window;
public {
this() {
_window = sfRenderWindow_create(/*parameters*/);
}
//couple of other functions
~this() {
sfRenderW
On Tuesday, 3 July 2018 at 07:03:43 UTC, vit wrote:
On Tuesday, 3 July 2018 at 02:13:21 UTC, Flaze07 wrote:
e.g A is a class that emits output during destruction
{
auto a = scoped!A();
}
how do I contain it in a container, in the Array struct ?
{
auto a = scoped!A();
Array!( typeof
On Tuesday, 3 July 2018 at 02:13:21 UTC, Flaze07 wrote:
e.g A is a class that emits output during destruction
{
auto a = scoped!A();
}
how do I contain it in a container, in the Array struct ?
{
auto a = scoped!A();
Array!( typeof( a ) ) arr;
foreach( i ; 0..3 ) {
arr.in
31 matches
Mail list logo