Re: New developments on topic of memset, memcpy and similar

2021-11-27 Thread MrSmith via Digitalmars-d-learn
On Saturday, 27 November 2021 at 11:15:45 UTC, Igor wrote: Additionally, here is the twitter thread from the author: https://twitter.com/nadavrot/status/1464364562409422852

Re: How to make the compile time red color warning ?

2020-06-03 Thread MrSmith via Digitalmars-d-learn
On Wednesday, 3 June 2020 at 11:48:27 UTC, Виталий Фадеев wrote: Use case: I have class for Windows OS. I not implement class for Linux. I want message about it. When code compiled under Linux. You could use `static assert(false, "Message");` to make it an error.

Re: Can't compile dlangui

2020-03-03 Thread MrSmith via Digitalmars-d-learn
On Friday, 7 February 2020 at 12:04:10 UTC, A.Perea wrote: Hi, I'm trying to compile dlangide, and it fails when compiling the dependency dlangui. Trying to compile dlangui independently gives the same error message (see below for full stack trace) [...] On Friday, 7 February 2020 at

Re: calloc for std.experimental.allocator

2018-01-11 Thread MrSmith via Digitalmars-d-learn
On Thursday, 11 January 2018 at 21:09:01 UTC, Nordlöw wrote: Is there no equivalent of `calloc()` for `std.experimental.allocator`, something like Allocator.zeroAllocate(size_t numberOfElements) ? http://dpldocs.info/experimental-docs/std.experimental.allocator.makeArray.4.html

Re: partial application for templates

2017-12-25 Thread MrSmith via Digitalmars-d-learn
On Monday, 25 December 2017 at 20:39:52 UTC, Mengu wrote: is partially applying templates possible? template A(X, Y, Z) {} alias B(X, Y) = A!(X, Y, int);

Re: GUI app brings up console

2017-12-06 Thread MrSmith via Digitalmars-d-learn
On Wednesday, 6 December 2017 at 21:25:27 UTC, Ivan Trombley wrote: I created a cross-platform app using gtk-d. Everything works fine but when I run it from Windows, a console window is opened. How can I tell Windows that it's a GUI application so that a console is not opened (keeping in mind

Linking error: unresolved external symbol internal

2017-10-10 Thread MrSmith via Digitalmars-d-learn
I have a static library and an application. When linking final executable I get: lib.lib(texteditor_1d_40c.obj) : error LNK2001: unresolved external symbol internal lib.lib(textbuffer_14_3ce.obj) : error LNK2001: unresolved external symbol internal Happens on Windows 32 and 64 bit.

Re: Playing with Entity System, performance and D.

2017-06-19 Thread MrSmith via Digitalmars-d-learn
You may find this interesting https://github.com/MrSmith33/datadriven

Re: trying to implement lock-free fixedsize queue

2016-03-31 Thread MrSmith via Digitalmars-d-learn
On Thursday, 31 March 2016 at 18:25:46 UTC, jacob wrote: I try to implement chunk (something like lock-free fixedsize queue) ... Check out this implementation https://github.com/MartinNowak/lock-free/blob/master/src/lock_free/rwqueue.d

Re: Yieldable function?

2015-08-13 Thread MrSmith via Digitalmars-d-learn
http://dlang.org/phobos/core_thread.html#.Fiber

Re: Opening browser and url.

2015-06-25 Thread MrSmith via Digitalmars-d-learn
On Thursday, 25 June 2015 at 14:02:41 UTC, Bauss wrote: In other programming languages you can open a website in the default browser by spawning a process using the url, but it does not seem to work with D using spawnProcess(). Do I have to do API calls to get the default browser and then

Re: Best practices for reading public interfaces

2015-02-22 Thread MrSmith via Digitalmars-d-learn
On Saturday, 21 February 2015 at 20:46:09 UTC, Kenny wrote: I like D modules and it's a major point in the list of major points why I like D (there is also the second not so nice wft-list but it's for another post). I'm annoyed with C++ includes and I'm tired to create 2 files every time when I

Re: Cannot use the same template arguments on function as the ones on struct

2015-02-12 Thread MrSmith via Digitalmars-d-learn
Thanks, everyone.

Re: Cannot use the same template arguments on function as the ones on struct

2015-02-12 Thread MrSmith via Digitalmars-d-learn
Thank you!

Cannot use the same template arguments on function as the ones on struct

2015-02-11 Thread MrSmith via Digitalmars-d-learn
Here I have templated struct that matches type with CborConfig tempate specialization CborConfig will have more parameters in future and all of them will be accessed via alias members, so I've used variadic (T...) parameter whule matching. --- template

Re: dub dustmite

2014-12-14 Thread MrSmith via Digitalmars-d-learn
On Friday, 12 December 2014 at 04:25:01 UTC, Vlad Levenfeld wrote: I'm trying to reduce a bug with dub dustmite feature and I must be doing it wrong somehow, my regular dub output looks like this: source/experimental.d(2403): Error: struct experimental.Product!(int[], int[]).Product no

Re: How to share modules when using -shared?

2014-12-14 Thread MrSmith via Digitalmars-d-learn
On Wednesday, 10 December 2014 at 00:44:41 UTC, Justin Whear wrote: I'm trying to build components that I can dynamically link and keep running into an issue with sharing modules between the host and the pluggable components. Assuming a layout like this: host.d -- loads components at

Re: regular expression engine and ranges

2014-12-02 Thread MrSmith via Digitalmars-d-learn
On Tuesday, 2 December 2014 at 19:17:43 UTC, ketmar via Digitalmars-d-learn wrote: Hello. is there any decent regular expression engine which works with input ranges? under decent i mean good D code, [t]nfa and no backtracking. support for captures and greedy/non-greedy modes are must. i

Re: help

2014-11-20 Thread MrSmith via Digitalmars-d-learn
On Thursday, 20 November 2014 at 16:48:29 UTC, MachineCode wrote: On Thursday, 20 November 2014 at 07:25:45 UTC, Suliman wrote: You need to check if remote file exist of server and only after it download шею is this software name written in russian language? шею means it. on russian

Re: print yyyy-mm-dd

2014-11-20 Thread MrSmith via Digitalmars-d-learn
On Thursday, 20 November 2014 at 13:50:49 UTC, Suliman wrote: I can't understand how to get date in format -MM-dd from Clock.currTime auto time = Clock.currTime; And what next? Could anybody give any examples? http://dpaste.dzfl.pl/73c0438f9d1e currTime returns SysTime; You can then

Re: Question about eponymous template trick

2014-11-03 Thread MrSmith via Digitalmars-d-learn
On Monday, 3 November 2014 at 14:07:55 UTC, Uranuz wrote: I have an example of code like this: template Node(String) { struct Node {} struct Name {} struct Attr {} } void main() { alias MyNode = Node!(string).Node; alias MyName =

Re: accessing numeric template parameters

2014-11-03 Thread MrSmith via Digitalmars-d-learn
On Monday, 3 November 2014 at 14:27:47 UTC, Dominikus Dittes Scherkl wrote: If I have a struct with numeric template parameter, how can I access it within member functions? Like normal member variables? And how about the constructor? struct polynomial(uint base) { private: uint[] N;

Re: HTML Parsing lib

2014-10-25 Thread MrSmith via Digitalmars-d-learn
On Saturday, 25 October 2014 at 19:46:01 UTC, MrSmith wrote: On Saturday, 25 October 2014 at 19:44:25 UTC, Suliman wrote: I found only https://github.com/Bystroushaak/DHTMLParser But I can't get it work: C:\Users\Dima\Downloads\DHTMLParser-master\DHTMLParser-masterdmd find_links.d OPTLINK

Re: HTML Parsing lib

2014-10-25 Thread MrSmith via Digitalmars-d-learn
On Saturday, 25 October 2014 at 19:44:25 UTC, Suliman wrote: I found only https://github.com/Bystroushaak/DHTMLParser But I can't get it work: C:\Users\Dima\Downloads\DHTMLParser-master\DHTMLParser-masterdmd find_links.d OPTLINK (R) for Win32 Release 8.00.15 Copyright (C) Digital Mars

Re: HTML Parsing lib

2014-10-25 Thread MrSmith via Digitalmars-d-learn
On Saturday, 25 October 2014 at 19:55:10 UTC, Suliman wrote: How I can build such App with DUB? Unfortunately that library has no dub package. But you can include it in your project. See info here http://code.dlang.org/package-format

Re: Making plugin system with shared libraries. Upcast in shared lib

2014-10-21 Thread MrSmith via Digitalmars-d-learn
On Tuesday, 21 October 2014 at 13:57:23 UTC, Kagamin wrote: On Monday, 20 October 2014 at 15:07:43 UTC, MrSmith wrote: On Monday, 20 October 2014 at 14:05:29 UTC, Kagamin wrote: Do it the COM way: publish IModule2 interface and declare GetInterface method, which will return a prepared pointer,

Re: Making plugin system with shared libraries. Upcast in shared lib

2014-10-20 Thread MrSmith via Digitalmars-d-learn
On Monday, 20 October 2014 at 14:05:29 UTC, Kagamin wrote: Do it the COM way: publish IModule2 interface and declare GetInterface method, which will return a prepared pointer, which you would reinterpret cast to IModule2. Will it work on linux with simple .so libs? I want it to be as simple

Re: Making plugin system with shared libraries. Upcast in shared lib

2014-10-20 Thread MrSmith via Digitalmars-d-learn
On Monday, 20 October 2014 at 15:30:28 UTC, Martin Nowak wrote: On 10/20/2014 12:32 AM, MrSmith wrote: Than any module can search for registered modules and try to cast them to concrete type (upcast). That can't work because the notion of types only exists during compilation. Therefor it's

Making plugin system with shared libraries. Upcast in shared lib

2014-10-19 Thread MrSmith via Digitalmars-d-learn
I'm using Windows. I was making some sort of modular system where you can define modules that are loaded by host application. Here is a simple example https://gist.github.com/MrSmith33/7692328455a19e820a7c Now i want to separate these modules in separate shared libs and link them on the fly.

Re: Trying to get Derelict.opengl3.gl3 and derelict.glfw3.glfw3 to work together

2014-09-25 Thread MrSmith via Digitalmars-d-learn
On Wednesday, 24 September 2014 at 13:59:41 UTC, csmith wrote: On Wednesday, 24 September 2014 at 11:07:56 UTC, Mike Parker wrote: You're using deprecated OpenGL calls. The gl3 module only declares and loads modern OpenGL. If you really want to use the deprecated stuff, change the gl3 import

Re: Ropes (concatenation trees) for strings in D ?

2014-08-16 Thread MrSmith via Digitalmars-d-learn
On Saturday, 16 August 2014 at 02:26:29 UTC, ketmar via Digitalmars-d-learn wrote: On Fri, 15 Aug 2014 19:04:10 -0700 Timothee Cour via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: sounds like my C library based on this article:

Re: Using input ranges with std.regex?

2014-08-11 Thread MrSmith via Digitalmars-d-learn
On Wednesday, 25 April 2012 at 21:43:11 UTC, Dmitry Olshansky wrote: On 25.04.2012 23:08, H. S. Teoh wrote: Does std.regex support input ranges to match()? Or do I need to convert to string first? For now, yes you have to convert them. Any random access range of code units should do the

Re: delegate issue

2014-06-02 Thread MrSmith via Digitalmars-d-learn
On Monday, 2 June 2014 at 06:56:54 UTC, captaindet wrote: hi, i stumbled upon something weird - it looks like a bug to me but maybe it is a feature that is unclear to me. so i know i can declare function and delegate pointers at module level. for function pointers, i can initialize with a

Re: Programming a Game in D? :D

2014-05-25 Thread MrSmith via Digitalmars-d-learn
Also opengl tutorials for D https://github.com/d-gamedev-team/opengl-tutorials

Re: Inherit of attributes

2014-04-25 Thread MrSmith via Digitalmars-d-learn
On Friday, 25 April 2014 at 07:59:29 UTC, Temtaime wrote: Hi ! http://dpaste.dzfl.pl/2fa3dd2ea834 Why S.init not pure ? Is it expected behavior or bug ? Thanks! Fix http://dpaste.dzfl.pl/03f73cd958f4