Re: Anybody know about SDL and particularly SDL_TTF initialization?

2024-05-22 Thread Danny Arends via Digitalmars-d-learn
On Sunday, 12 May 2024 at 20:13:04 UTC, WhatMeWorry` wrote: This should be trivial, right? I've been looking at existing D repo code for hours. Can't figure why TTF_Init doesn't work? It would help if I could figure out how to use SDL_GetError() INFO: SDL loaded v2.30.2 INFO: SDL initialized:

Re: Missing library dependencies compiling app with importC

2024-02-22 Thread Danny Arends via Digitalmars-d-learn
On Thursday, 22 February 2024 at 01:23:36 UTC, ptcute wrote: Greeings! My c to d header wrapper file curl_d.c (just 2 lines): ... So what's the real issue behind? Anyone help on this would be appreciated. According to the windows documentation, you'll need: Kernel32.lib See:

Re: How to use Dub and Digger to build Pull Requests?

2023-05-24 Thread Danny Arends via Digitalmars-d-learn
On Tuesday, 23 May 2023 at 13:51:29 UTC, Quirin Schroll wrote: On Tuesday, 23 May 2023 at 13:50:09 UTC, Quirin Schroll wrote: The dlang-bot writes a message to every PR: Testing this PR locally If you don't have a local development environment setup, you can use Digger to test this PR:

Re: request assistance resolving a std.net.curl segmentation fault

2023-05-19 Thread Danny Arends via Digitalmars-d-learn
On Friday, 19 May 2023 at 11:07:01 UTC, anonymouse wrote: What am I doing wrong here? ```D import std.net.curl: Curl, CurlOption, CurlException; import std.file: exists; import std.stdio: File, writefln; import core.thread: Thread; void downloadFile(string url, string filename) { while

DUB issues

2022-04-17 Thread Danny Arends via Digitalmars-d-learn
Hey All, For some reason I cannot reset my password to get into dub (https://code.dlang.org/), after trying I never receive the email to reset my password. I was unsure at first if I had signed up at all, but trying to make a new account tells me my email address is already in use. Any

Re: Sort bug / strangeness

2021-10-01 Thread Danny Arends via Digitalmars-d-learn
On Friday, 1 October 2021 at 17:53:24 UTC, Steven Schveighoffer wrote: I think your struct is different than this, because this only happens if aliasing is inside the struct being sorted (i.e. it has pointers). Your presented struct doesn't have pointers, and the code you linked to is

Sort bug / strangeness

2021-10-01 Thread Danny Arends via Digitalmars-d-learn
Hey all, Using a modified 3D A* tile searching algorithm, full code see: https://github.com/DannyArends/CalderaD/blob/master/src/math/search.d I get the following AssertError, 'sometimes' but not always on running the code: mutation.d(2816): Swap: rhs points to lhs. the first time I hit

Re: Trivial simple OpenGl working example

2021-07-10 Thread Danny Arends via Digitalmars-d-learn
On Saturday, 10 July 2021 at 12:41:19 UTC, Виталий Фадеев wrote: On Saturday, 10 July 2021 at 08:36:07 UTC, Danny Arends wrote: On Thursday, 8 July 2021 at 13:51:51 UTC, Виталий Фадеев wrote: [...] OpenGL is being replaced by vulcan, just to plug my little project: http://github.com

Re: Trivial simple OpenGl working example

2021-07-10 Thread Danny Arends via Digitalmars-d-learn
On Thursday, 8 July 2021 at 13:51:51 UTC, Виталий Фадеев wrote: Hi! I searching trivial simple D/OpenGL working in 2021 year example. It may be triangle. It may be based on any library: SDL, GLFW, Derelict, etc. Can you help me ? OpenGL is being replaced by vulcan, just to plug my little

Re: SDL2 Android vulkan question

2021-05-14 Thread Danny Arends via Digitalmars-d-learn
On Sunday, 2 May 2021 at 13:43:11 UTC, evilrat wrote: Anyway, I might try to look at this next weekend. Do you have this project available on github/google drive? Open-sourced the code see: https://github.com/DannyArends/CalderaD Danny

Re: SDL2 Android vulkan question

2021-05-02 Thread Danny Arends via Digitalmars-d-learn
On Sunday, 2 May 2021 at 16:42:07 UTC, evilrat wrote: On Sunday, 2 May 2021 at 16:06:10 UTC, Danny Arends wrote: On Sunday, 2 May 2021 at 12:35:51 UTC, evilrat wrote: As for SDL2, are you sure it was built with Vulkan support? That's the thing I worry about, since the SDL2 libraries

Re: SDL2 Android vulkan question

2021-05-02 Thread Danny Arends via Digitalmars-d-learn
On Sunday, 2 May 2021 at 13:43:11 UTC, evilrat wrote: On Sunday, 2 May 2021 at 12:35:51 UTC, evilrat wrote: On Sunday, 2 May 2021 at 08:58:30 UTC, Danny Arends wrote: Any thoughts on why loading the Vulkan library using SDL2 would not work ? thoughts in general about the process ? Just few

Re: SDL2 Android vulkan question

2021-05-02 Thread Danny Arends via Digitalmars-d-learn
On Sunday, 2 May 2021 at 12:35:51 UTC, evilrat wrote: On Sunday, 2 May 2021 at 08:58:30 UTC, Danny Arends wrote: Any thoughts on why loading the Vulkan library using SDL2 would not work ? thoughts in general about the process ? Just few tips. GC "crashes" since you have cust

SDL2 Android vulkan question

2021-05-02 Thread Danny Arends via Digitalmars-d-learn
Dear all, I've written a 2D/3D engine in D before which runs on windows, linux and android using SDL2 as the window manager and uses Modern OpenGL /OpenGLES for rendering. It compiles fine for android using ldc and works like a charm, although the garbage collection under android has

Re: How to get output of piped process?

2021-03-03 Thread Danny Arends via Digitalmars-d-learn
On Monday, 22 February 2021 at 14:52:22 UTC, frame wrote: On Monday, 22 February 2021 at 13:23:40 UTC, Danny Arends wrote: https://github.com/DannyArends/DaNode/blob/master/danode/process.d Danny This example shows how easy it is to implement a non-blocking stream. Phobos knows

Re: How to get output of piped process?

2021-03-03 Thread Danny Arends via Digitalmars-d-learn
On Tuesday, 23 February 2021 at 10:07:03 UTC, Imperatorn wrote: On Monday, 22 February 2021 at 13:23:40 UTC, Danny Arends wrote: On Friday, 19 February 2021 at 15:39:25 UTC, kdevel wrote: [...] Perhaps a bit late, but this is how I deal with pipes and spawnShell. Read one byte at a time

Re: How to get output of piped process?

2021-03-03 Thread Danny Arends via Digitalmars-d-learn
On Thursday, 25 February 2021 at 15:28:25 UTC, kdevel wrote: On Monday, 22 February 2021 at 13:23:40 UTC, Danny Arends wrote: On Friday, 19 February 2021 at 15:39:25 UTC, kdevel wrote: [...] Fortunately the D runtime /does/ take care and it throws---if the signal is ignored beforehand. I

Re: How to get output of piped process?

2021-02-22 Thread Danny Arends via Digitalmars-d-learn
On Friday, 19 February 2021 at 15:39:25 UTC, kdevel wrote: On Friday, 19 February 2021 at 13:42:46 UTC, Steven Schveighoffer wrote: [...] [...] Sure. [...] As application programmer I don't want to check any error codes. Thankfully I don't have to in D. There is a nice off-topic

Re: dub: Is it possible to have a library target and depend on it in the same dub config?

2020-09-18 Thread Danny Arends via Digitalmars-d-learn
On Friday, 18 September 2020 at 11:38:14 UTC, wjoe wrote: Something like this: configuration "lib" { targetType "dynamicLibrary" sourceDir "source/lib/" } configuration "app" { targetType "executable" sourceFiles "source/app.d" linkWith "lib" } I found subConfiguration in the docs

Re: bindbc OpenGL ES

2020-09-09 Thread Danny Arends via Digitalmars-d-learn
On Monday, 31 August 2020 at 22:25:48 UTC, Mike Parker wrote: On Monday, 31 August 2020 at 14:04:19 UTC, Danny Arends wrote: Don't know exactly where to post this, so I hope the bindbc team will see the post here in learn. I was wondering if it would be possible to have bindbc OpenGL ES

Re: GC.LDC2 on Android

2020-09-08 Thread Danny Arends via Digitalmars-d-learn
On Tuesday, 8 September 2020 at 13:20:24 UTC, kinke wrote: 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 You can add -v as dub 'linker' flag

Re: GC.LDC2 on Android

2020-09-08 Thread Danny Arends via Digitalmars-d-learn
On Tuesday, 8 September 2020 at 12:53:43 UTC, Adam D. Ruppe wrote: 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

Re: GC.LDC2 on Android

2020-09-08 Thread Danny Arends via Digitalmars-d-learn
On Tuesday, 8 September 2020 at 12:23:43 UTC, kinke wrote: On Tuesday, 8 September 2020 at 11:17:45 UTC, Danny Arends wrote: Does anyone have any experience with using D on android, and using the garbage collector ??? I've never run anything on Android myself, but I've gotten good feedback

GC.LDC2 on Android

2020-09-08 Thread Danny Arends via Digitalmars-d-learn
Hey all, I'm porting my 3D engine to Android (so far most of the work is going smoothly). However, I had random crashes which I first suspected was due to how I do multi-threading, but after debugging it turns out that the Garbage Collector is the issue. The crash always happens after

Re: bindbc OpenGL ES

2020-08-31 Thread Danny Arends via Digitalmars-d-learn
On Monday, 31 August 2020 at 22:25:48 UTC, Mike Parker wrote: On Monday, 31 August 2020 at 14:04:19 UTC, Danny Arends wrote: Don't know exactly where to post this, so I hope the bindbc team will see the post here in learn. I was wondering if it would be possible to have bindbc OpenGL ES

Re: bindbc OpenGL ES

2020-08-31 Thread Danny Arends via Digitalmars-d-learn
On Monday, 31 August 2020 at 15:16:40 UTC, Ferhat Kurtulmuş wrote: On Monday, 31 August 2020 at 14:04:19 UTC, Danny Arends wrote: Don't know exactly where to post this, so I hope the bindbc team will see the post here in learn. I was wondering if it would be possible to have bindbc OpenGL ES

bindbc OpenGL ES

2020-08-31 Thread Danny Arends via Digitalmars-d-learn
Don't know exactly where to post this, so I hope the bindbc team will see the post here in learn. I was wondering if it would be possible to have bindbc OpenGL ES bindings ? I'm working on porting my 3D Engine to Android, and well Android doesn't support anything else but OpenGL ES... I saw

Re: Dub - vibe.d - hunt framework ... problems

2020-02-01 Thread Danny Arends via Digitalmars-d-learn
On Saturday, 1 February 2020 at 20:06:42 UTC, seany wrote: On Saturday, 1 February 2020 at 14:42:58 UTC, Seb wrote: On Saturday, 1 February 2020 at 10:35:52 UTC, seany wrote: Hi I want to start a small server, that will be accessible form outside. Not a huge deal right? Not quite. [...]

Re: Dub - vibe.d - hunt framework ... problems

2020-02-01 Thread Danny Arends via Digitalmars-d-learn
On Saturday, 1 February 2020 at 10:35:52 UTC, seany wrote: Hi I want to start a small server, that will be accessible form outside. Not a huge deal right? Not quite. My machine: 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux DMD : DMD64 D

Re: Program exited with code -11

2019-09-18 Thread Danny Arends via Digitalmars-d-learn
On Wednesday, 18 September 2019 at 13:36:30 UTC, Arjan wrote: On Wednesday, 18 September 2019 at 13:22:03 UTC, Danny Arends wrote: Hey all, "Program exited with code -11" Not signal 11? On unix/linux I assume? It's on linux yes... No idea if it is a signal or an exitcode

Program exited with code -11

2019-09-18 Thread Danny Arends via Digitalmars-d-learn
Hey all, I have written some code to analyze massive gzipped files (using std.iopipe), tested it on small subsets of the gzip files, and everything works using small 20 to 50 Mb files. However when I try to run the code on 2.7 Gb file sizes the program always crashes with the following

Re: Performance of tables slower than built in?

2019-05-25 Thread Danny Arends via Digitalmars-d-learn
On Wednesday, 22 May 2019 at 00:22:09 UTC, JS wrote: I am trying to create some fast sin, sinc, and exponential routines to speed up some code by using tables... but it seems it's slower than the function itself?!? [...] I'll just leave this here:

Re: is there a way to embed python 3.7 code in D program?

2019-05-13 Thread Danny Arends via Digitalmars-d-learn
On Monday, 13 May 2019 at 09:03:02 UTC, evilrat wrote: On Monday, 13 May 2019 at 03:06:07 UTC, evilrat wrote: https://github.com/Superbelko/pyd-min Here. Super minimal example, ptvsd can be commented out as well, it is there entirely for debugging. Pardon me, somehow I was completely

Re: Full precision double to string conversion

2018-11-03 Thread Danny Arends via Digitalmars-d-learn
On Saturday, 3 November 2018 at 12:27:19 UTC, Ecstatic Coder wrote: import std.conv; import std.stdio; void main() { double value = -12.000123456; writeln( value.sizeof ); writeln( value ); writeln( value.to!string() ); writeln( value.to!dstring() ); } /* 8 -12.0001 -12.0001

Re: Process Pipes

2018-10-10 Thread Danny Arends via Digitalmars-d-learn
On Wednesday, 10 October 2018 at 09:16:43 UTC, Gorker wrote: On Wednesday, 10 October 2018 at 08:31:36 UTC, Kagamin wrote: Maybe read them with parallelism? http://dpldocs.info/experimental-docs/std.parallelism.parallel.2.html thanks, but I'd rather avoid having to use threads just for this

Re: getOpt with shared

2018-05-11 Thread Danny Arends via Digitalmars-d-learn
On Friday, 11 May 2018 at 17:49:17 UTC, Jonathan M Davis wrote: On Friday, May 11, 2018 17:25:44 Danny Arends via Digitalmars-d-learn wrote: [...] getopt is designed to be single-threaded. The keyword shared is not used a single type in that module. If you want to use shared with anything

Re: getOpt with shared

2018-05-11 Thread Danny Arends via Digitalmars-d-learn
On Friday, 11 May 2018 at 17:25:44 UTC, Danny Arends wrote: Hey all, I have been working on creating a multi-threaded application, so I have a shared configuration object which hold several command line parameters (which I fill using getopt). The problem is that I get deprecation warnings

getOpt with shared

2018-05-11 Thread Danny Arends via Digitalmars-d-learn
Hey all, I have been working on creating a multi-threaded application, so I have a shared configuration object which hold several command line parameters (which I fill using getopt). The problem is that I get deprecation warnings when trying to set numerical values:

Help debugging an core.exception.OutOfMemoryError

2018-03-22 Thread Danny Arends via Digitalmars-d-learn
Hey all, When running a D program that i wrote (32bit mode, windows10), an OutOfMemory exception being thrown when executing the program: core.exception.OutOfMemoryError@src\core\exception.d(702): Memory allocation failed However there is no stack trace being generated (due to the program

Strange behaviour with -profile

2014-02-23 Thread Danny Arends
this, any suggestions ? Danny Arends http://www.dannyarends.nl

Showing off and a minor thing

2013-12-15 Thread Danny Arends
like a charm for blocking sockets, however I found some minor bugs related to non-blocking BIO functions. How to report these ? Can I just submit a pull request ? or do I have to create bugs first in the bug tracker ? Gr, Danny Arends

Re: How to link to libdl under linux

2013-12-15 Thread Danny Arends
': (.text+0x1b): undefined reference to `__dlsym' /usr/lib32/libdl.a(dlerror.o): In function `dlerror': (.text+0x1): undefined reference to `__dlerror' collect2: error: ld returned 1 exit status --- errorlevel 1 Pass it depending if you use rdmd or dmd -L-ldl or -ldl Gr, Danny Arends http

Re: regarding spawnProcess and parameters in Windows

2013-12-15 Thread Danny Arends
the D way. Anyway, Where could the problem be? Regards, Hugo You need to pass the INI parameters separately see: http://dlang.org/phobos/std_process.html#.spawnProcess spawnProcess([appexe,format(/INI=%s)], [,], Config.suppressConsole); Gr, Danny Arends http://www.dannyarends.nl

Re: regarding spawnProcess and parameters in Windows

2013-12-15 Thread Danny Arends
On Monday, 16 December 2013 at 00:59:51 UTC, Danny Arends wrote: On Sunday, 15 December 2013 at 23:14:45 UTC, Hugo Florentino wrote: Hello, I am trying to do a small launcher for a Windows application which (in order to be portable) requires a specific parameter, and I am getting this error

A question about std.uri

2013-10-24 Thread Danny Arends
Is there a reason why the decode/encode functions and such throw Errors ? Seems like an error (Non-recoverable) is a bit harsh, why isn't the Exception class used ? Kind regards, Danny Arends http://www.dannyarends.nl

Re: A question about std.uri

2013-10-24 Thread Danny Arends
On Thursday, 24 October 2013 at 08:35:15 UTC, Danny Arends wrote: Is there a reason why the decode/encode functions and such throw Errors ? Seems like an error (Non-recoverable) is a bit harsh, why isn't the Exception class used ? Kind regards, Danny Arends http://www.dannyarends.nl Some

Re: A question about std.uri

2013-10-24 Thread Danny Arends
On Thursday, 24 October 2013 at 09:46:52 UTC, Danny Arends wrote: Some people on the IRC channel said it might be a bug: http://d.puremagic.com/issues/show_bug.cgi?id=11338 Gr, Danny Arends And a pull request: https://github.com/D-Programming-Language/phobos/pull/1659 Gr, Danny Arends

Need help with an linker error message with libphobos2.so

2013-08-19 Thread Danny Arends
and CPP compiler by using an obscure settings file.. Gr, Danny Arends http://www.dannyarends.nl

double[][] to double**

2013-02-10 Thread Danny Arends
I need to call some C code which takes a double** In D I have a dynamic array X, Whats a good way of doing this ? #SNIP extern(C){ void toCall(double** X, size_t d1, size_t d2); } void main(){ double[][] X; // How to be able to: toCall(X, X.length, X[0].length); } #/SNIP Danny

Re: double[][] to double**

2013-02-10 Thread Danny Arends
Thanks so much ! Why is this not easy 2 find :P

Strange observation when using rdmd

2012-11-19 Thread Danny Arends
When I do: rdmd --build-only -w dir/main.d It compiles fine under Debian 32b and Debian 64b however: in 32b the executable is created as: ./main in 64b the executable is created as: ./dir/main Is this expected, and if so why the difference based on architecture ? Danny Arends http

Reading stdout of an external process using pipes under windows

2012-09-13 Thread Danny Arends
I decided to put some code here that allowed me read (via a streamed pipe) the stdout from an external process. I didn't see something like this before and when searching I only found the new std.process in phobos development branch which doesn't have a Windows version. If anyone feels like

CTFE question

2012-08-28 Thread Danny Arends
doing something wrong ?? Danny Arends http://www.dannyarends.nl

Re: CTFE question

2012-08-28 Thread Danny Arends
. Gr, Danny Arends http://www.dannyarends.nl On Tuesday, 28 August 2012 at 11:29:32 UTC, Chris Cain wrote: On Tuesday, 28 August 2012 at 11:13:40 UTC, Danny Arends wrote: Is this a bug or am I doing something wrong ?? Danny Arends http://www.dannyarends.nl You're doing something wrong, but I can

Re: CTFE question

2012-08-28 Thread Danny Arends
On Tuesday, 28 August 2012 at 12:07:07 UTC, Chris Cain wrote: On Tuesday, 28 August 2012 at 11:39:20 UTC, Danny Arends wrote: I'm pretty sure there isn't. However, if you're just trying to develop/test your algorithm, you could write a program that runs it as a normal function (and just use

Linker errors after updating to DMD 2.060

2012-08-13 Thread Danny Arends
Hey all, After switching to 2.060, I'm getting the following linker errors on a project of mine: Error 42: Symbol Undefined _D4core6memory2GC6extendFPvkkZk build\unittest.obj(unittest) Error 42: Symbol Undefined _D4core6memory2GC6qallocFkkZS4core6memory8BlkInfo_

Re: filename.writeln() across network

2012-06-21 Thread Danny Arends
On Thursday, 21 June 2012 at 17:14:34 UTC, Regan Heath wrote: On Thu, 21 Jun 2012 14:56:37 +0100, Paul phshaf...@gmail.com wrote: I wrote a program that parses a text file and writes results as it is processing the file (i.e. many writeln()'s). On my local harddrive it works fine. When I

Re: D and windows console kbhit, getch etc

2012-06-04 Thread Danny Arends
Wow been looking for this for some time, just tested it and it works on windowsXP 32 bit as well On Sunday, 3 June 2012 at 02:55:53 UTC, Jason King wrote: I've seen a few messages asking how to get this to work and the replies that were functional involved snagging the console input handle and

Re: Shutting down thread with Socket blocking for connection

2012-03-15 Thread Danny Arends
You could have a look at my attempt: https://github.com/DannyArends/D-coding/tree/master/src/web

SegFaults when using Fibers

2011-08-10 Thread Danny Arends
(Also posted this in bugs, but I think it needs to be here) When I try to print floats and doubles from a fiber it fails with a segfault, while it is possible to do the same in the main thread. The expected output of the attached code file: 15 15 Done However I get: 15 segfault I am using the

Re: SegFaults when using Fibers

2011-08-10 Thread Danny Arends
OK Thanks very much, made myself an account there and re-posted the issue. Though it still feels like I'm doing something wrong

Problems with static linking of c libraries

2011-07-14 Thread Danny Arends
Hey all, I'm trying to build a D application which statically links in the the blas and lapack libraries (from http://icl.cs.utk.edu/lapack-for-windows/clapack/index.html ). When downloading the pre-build libraries from the website I link them in using: pragma(lib, blas); pragma(lib, lapack);

Re: Problems with static linking of c libraries

2011-07-14 Thread Danny Arends
Wow THANX, Using the COFF2OMF tool at least got me a step further, now it finds and accepts the lib files, however, it now fails with the following error: OPTLINK (R) for Win32 Release 8.00.12 Copyright (C) Digital Mars 1989-2010 All rights reserved. http://www.digitalmars.com/ctg/optlink.html

Problems with static linking of c libraries

2011-07-14 Thread Danny Arends
Hey all, I'm trying to build a D application which statically links in the the blas and lapack libraries (from http://icl.cs.utk.edu/lapack-for-windows/clapack/index.html ). When downloading the pre-build libraries from the website I link them in using: pragma(lib, blas); pragma(lib, lapack);