Re: Getting a String Literal From an Aliased Template Mixin Parameter

2016-09-14 Thread jsako via Digitalmars-d-learn
On Thursday, 15 September 2016 at 01:40:50 UTC, Anonymouse wrote: You mean, the literal string name of the original symbol you passed as an alias? If so then you want the .stringof property. void main () { int first; bool second; string third; mixin Foo

Re: Using OpenGL

2016-09-14 Thread Mike Parker via Digitalmars-d-learn
On Wednesday, 14 September 2016 at 16:49:51 UTC, Darren wrote: While googling, the idea seemed to be to create and SDL_Surface* and pass that (or surface.pixels) as the last argument for glTexImage2D. Didn't work for me, however. Does anyone have any tips? I'm driving blind here without

Re: Getting a String Literal From an Aliased Template Mixin Parameter

2016-09-14 Thread Anonymouse via Digitalmars-d-learn
On Thursday, 15 September 2016 at 00:15:42 UTC, jsako wrote: I was making a quick mocking infrastructure for internal mocks so I wouldn't have to pass in objects to constructors all the time and came up with this: [...] This works great as long as there is only one mock object. I thought abo

Getting a String Literal From an Aliased Template Mixin Parameter

2016-09-14 Thread jsako via Digitalmars-d-learn
I was making a quick mocking infrastructure for internal mocks so I wouldn't have to pass in objects to constructors all the time and came up with this: [code] mixin template internalMockRig(alias _var, string _varName, alias _varStandard, alias _varMock) { version(unittest)

Re: Compiling vibe.d application for Amazon ec2 instance

2016-09-14 Thread David Nadlinger via Digitalmars-d-learn
On Wednesday, 14 September 2016 at 12:13:58 UTC, Seb wrote: You should try -static in ldc, it's works like a dream for me :) Yep, LDC supports fully static linking on Linux (and is currently the only compiler to do so). — David

Re: vibe.d maxRequestSize

2016-09-14 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/14/16 9:58 AM, Chris wrote: The vibe.d server rejects `XMLHttpRequest`s that are too long (in the eyes of the server). In the docs it says "maxRequestSize ulong Maximum number of transferred bytes per request after which the connection is closed with [sic!]" However, when you go to htt

Re: Can vibe d leverage existing web technologies?

2016-09-14 Thread Intersteller via Digitalmars-d-learn
On Wednesday, 14 September 2016 at 04:22:02 UTC, Brad Anderson wrote: On Tuesday, 13 September 2016 at 23:45:18 UTC, Intersteller wrote: vibe.d does not have much lateral support as the most commons web technologies do. Can vibe.d leverage pre-existing techs such as php, ruby/rails, etc? Start

Re: Using OpenGL

2016-09-14 Thread Darren via Digitalmars-d-learn
Kind of resurrecting this thread; hope that's okay. I'm working through this tutorial: http://www.learnopengl.com/#!Getting-started/Textures It uses SOIL to load images, but I haven't seen any SOIL bindings in dub. I tried using SDL and SDL_Image but when the program ran it just crashed. I

Re: vibe.d PaaS

2016-09-14 Thread wobbles via Digitalmars-d-learn
On Wednesday, 14 September 2016 at 16:03:50 UTC, Guillaume Piolat wrote: On Wednesday, 14 September 2016 at 10:56:57 UTC, llaine wrote: No PaaS service, but you can pretty simply use Heroku to deploy any vibe.d application. Check the tour.dlang.io http://tour.dlang.io/tour/en/vibed/deploy-on-

Re: vibe.d PaaS

2016-09-14 Thread Guillaume Piolat via Digitalmars-d-learn
On Wednesday, 14 September 2016 at 10:56:57 UTC, llaine wrote: No PaaS service, but you can pretty simply use Heroku to deploy any vibe.d application. Check the tour.dlang.io http://tour.dlang.io/tour/en/vibed/deploy-on-heroku where everything is explained :) Thanks!

vibe.d maxRequestSize

2016-09-14 Thread Chris via Digitalmars-d-learn
The vibe.d server rejects `XMLHttpRequest`s that are too long (in the eyes of the server). In the docs it says "maxRequestSize ulong Maximum number of transferred bytes per request after which the connection is closed with [sic!]" However, when you go to http://vibed.org/api/vibe.http.ser

Re: Binary heap: obtain a _reference_ to the front of the heap

2016-09-14 Thread Johan Engelen via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 08:55:15 UTC, Nicholas Wilson wrote: On Tuesday, 13 September 2016 at 08:19:04 UTC, Johan Engelen wrote: In the binary heap documentation, I read that `BinaryHeap.front()` "Returns a copy of the front of the heap". [1] Is there no function to access the front of

Re: Compiling vibe.d application for Amazon ec2 instance

2016-09-14 Thread Seb via Digitalmars-d-learn
On Monday, 12 September 2016 at 02:14:08 UTC, Jonathan M Davis wrote: On Sunday, September 11, 2016 23:12:15 crimaniak via Digitalmars-d-learn wrote: [...] I've never used EC2, so I don't know what it would take to be able to build in the same environment locally (though I would certainly th

Re: vibe.d PaaS

2016-09-14 Thread Guillaume Piolat via Digitalmars-d-learn
On Wednesday, 14 September 2016 at 09:40:47 UTC, wobbles wrote: On Wednesday, 14 September 2016 at 09:01:11 UTC, Guillaume Piolat wrote: Is there vibe.d hosting sold anywhere? Not that I know, but any VPS you rent would be capable of hosting it. I guess you don't want to deal with all of th

Re: vibe.d PaaS

2016-09-14 Thread llaine via Digitalmars-d-learn
On Wednesday, 14 September 2016 at 09:40:47 UTC, wobbles wrote: On Wednesday, 14 September 2016 at 09:01:11 UTC, Guillaume Piolat wrote: Is there vibe.d hosting sold anywhere? Not that I know, but any VPS you rent would be capable of hosting it. I guess you don't want to deal with all of th

Re: vibe.d PaaS

2016-09-14 Thread wobbles via Digitalmars-d-learn
On Wednesday, 14 September 2016 at 09:01:11 UTC, Guillaume Piolat wrote: Is there vibe.d hosting sold anywhere? Not that I know, but any VPS you rent would be capable of hosting it. I guess you don't want to deal with all of the other services you'd need? (nginx / security / dbs etc etc ?)

vibe.d PaaS

2016-09-14 Thread Guillaume Piolat via Digitalmars-d-learn
Is there vibe.d hosting sold anywhere?