Webcam Library

2013-04-22 Thread Henry Robbins Gouk
Does anyone know of a library for capturing video from webcams (on Linux) that has been ported to D? If not, are there any that people think would be fairly easy to write D bindings for? So far the only things I've come accross are OpenCV and V4L2, neither of which look very simple at a

Re: Win32 + OpenGL bindings

2013-04-22 Thread evilrat
On Saturday, 20 April 2013 at 03:26:29 UTC, Diggory wrote: - win32.windows: Apparantly out of date and gives linker errors, although it does declare all the functions needed. you are doing it wrong. first you will need mingw32-make from mingw default setup, second fix win32 bindings makefile

Re: Win32 + OpenGL bindings

2013-04-22 Thread evilrat
On Sunday, 21 April 2013 at 15:20:28 UTC, Diggory wrote: OK, thanks I think I've got the hang of the way linking works now - I was confused about how some things didn't seem to require libs to work, but now I see it's because those things were compiled into druntime.lib which was compiled into

Re: Win32 + OpenGL bindings

2013-04-22 Thread Jacob Carlborg
On 2013-04-21 17:20, Diggory wrote: OK, thanks I think I've got the hang of the way linking works now - I was confused about how some things didn't seem to require libs to work, but now I see it's because those things were compiled into druntime.lib which was compiled into phobos.lib. So is

Re: Win32 + OpenGL bindings

2013-04-22 Thread Diggory
you are doing it wrong. first you will need mingw32-make from mingw default setup, second fix win32 bindings makefile around line 25 so it will looks like this(supported file don't have uuid.di outdated interface file included) Yeah I realise what I was doing wrong now. It only coincidentally

Re: Win32 + OpenGL bindings

2013-04-22 Thread evilrat
On Monday, 22 April 2013 at 12:54:32 UTC, Diggory wrote: ... I realise D is still fairly young so it's unreasonable to expect everything to already exist, but at least enough information should be given to be able to correctly add things that don't. it's not that young, but i agree the

Re: Direlect3 with Mono-D

2013-04-22 Thread Dementor561
On Monday, 22 April 2013 at 04:25:59 UTC, Roderick Gibson wrote: On Sunday, 21 April 2013 at 19:49:14 UTC, Dementor561 wrote: Well, sorta. When I add import derelict.glfw3.glfw3; it says the library could not be resolved... Do I need to add something to the library somewhere? Any library you

Re: Direlect3 with Mono-D

2013-04-22 Thread Dementor561
On a side note, I have found a tutorial for Opengl... but it is very confusing and is specifically for C++, does anyone know of better tutorials? Especially for D?

Re: Direlect3 with Mono-D

2013-04-22 Thread Minas Mina
If you aren't comfortable with either C++ or D I would suggest to do the tutorials with C++, as there are no OpenGL tutorials for D. Don't try to learn two things at the same time.

Re: Direlect3 with Mono-D

2013-04-22 Thread Dementor561
On Monday, 22 April 2013 at 20:47:32 UTC, Minas Mina wrote: If you aren't comfortable with either C++ or D I would suggest to do the tutorials with C++, as there are no OpenGL tutorials for D. Don't try to learn two things at the same time. No, I am comfortable with C++, I learned it in

Re: Quadratic time to sort in a simple case?

2013-04-22 Thread Andrei Alexandrescu
On 4/19/13 6:37 PM, Ivan Kazmenko wrote: That [SwapStrategystable] uses the TimSort that contains the optimization you look for. alias mySort = sort!(a b, SwapStrategy.stable); Thank you, these are good for now. A seemingly easy way to provide the choice globally would be to have an

Re: Quadratic time to sort in a simple case?

2013-04-22 Thread bearophile
Andrei Alexandrescu: c) add introspection to the algorithm, i.e. if an attempt to partition hits the worst case or near worst case, just try another pivot instead of moving forward with the sorting stage. Or switch to a sort that is guaranteed to have a pseudo-linear complexity. I am not

Re: Quadratic time to sort in a simple case?

2013-04-22 Thread bearophile
And by the way, I still suggest a dual-pivot quicksort: http://permalink.gmane.org/gmane.comp.java.openjdk.core-libs.devel/2628 Bye, bearophile

Re: Quadratic time to sort in a simple case?

2013-04-22 Thread Xinok
On Friday, 19 April 2013 at 21:03:23 UTC, Ivan Kazmenko wrote: Hi! Consider a sorted array. Append an element that is less than all the previous elements. Then sort the array again by the sort function from std.algorithm. With n = 30_000 as in the example, this takes time of the

Re: Quadratic time to sort in a simple case?

2013-04-22 Thread Xinok
On Saturday, 20 April 2013 at 16:35:25 UTC, Dmitry Olshansky wrote: And this all is good but TimSort allocates O(N) memory. The constant in front of N is smallish less then 1.0 but it could cause some grief. Worst case is O(n/2), but it starts small and doubles in size as needed. On a

Re: Quadratic time to sort in a simple case?

2013-04-22 Thread bearophile
Xinok: I've been meaning to fix this issue myself. Time allowing, I'll do it soon. Good. And if you are willing, please also take a look at the parallel sort problem I've raised: http://forum.dlang.org/thread/iyunhhsbmurqyouyr...@forum.dlang.org Bye, bearophile

Re: Quadratic time to sort in a simple case?

2013-04-22 Thread Xinok
On Tuesday, 23 April 2013 at 01:28:56 UTC, bearophile wrote: Xinok: I've been meaning to fix this issue myself. Time allowing, I'll do it soon. Good. And if you are willing, please also take a look at the parallel sort problem I've raised:

Re: Direlect3 with Mono-D

2013-04-22 Thread Roderick Gibson
On Monday, 22 April 2013 at 20:57:56 UTC, Dementor561 wrote: On Monday, 22 April 2013 at 20:47:32 UTC, Minas Mina wrote: If you aren't comfortable with either C++ or D I would suggest to do the tutorials with C++, as there are no OpenGL tutorials for D. Don't try to learn two things at the