Re: draft proposal for ref counting in D

2013-10-15 Thread Rainer Schuetze
On 14.10.2013 21:42, Michel Fortin wrote: Indeed. The current garbage collector makes it easy to have shared pointers to shared objects. But the GC can also interrupt real-time threads for an unpredictable duration, how do you cope with that in a real-time thread? The work I was talking about

Re: Early review of std.logger

2013-10-15 Thread Jacob Carlborg
On 2013-10-14 23:22, Dicebot wrote: If we need to care about that, D module system is a failure. But I don't think it is a valid concern. People already complain about conflict function names in Phobos. -- /Jacob Carlborg

Re: draft proposal for ref counting in D

2013-10-15 Thread Jacob Carlborg
On 2013-10-15 05:11, Michel Fortin wrote: mprotect isn't available at all with the iOS SDK. So making this collector work on iOS (and the iOS Simulator) would require a different codegen. I haven't tried compiling anything and I don't know if I'm looking in the correct file but this file: /

Re: Early review of std.logger

2013-10-15 Thread Sönke Ludwig
Am 15.10.2013 09:08, schrieb Jacob Carlborg: On 2013-10-14 23:22, Dicebot wrote: If we need to care about that, D module system is a failure. But I don't think it is a valid concern. People already complain about conflict function names in Phobos. And I'd agree with them. At least inside o

Re: Early review of std.logger

2013-10-15 Thread Sönke Ludwig
Am 14.10.2013 20:24, schrieb Robert Schadek: On 10/14/2013 04:44 PM, Sönke Ludwig wrote: Am 14.10.2013 15:12, schrieb Robert Schadek: On 10/14/2013 02:39 PM, Sönke Ludwig wrote: - The static methods in LogManager should be made global and the class be removed. It's not for objects so it

Re: Early review of std.logger

2013-10-15 Thread ilya-stromberg
On Monday, 14 October 2013 at 12:48:14 UTC, Martin Drasar wrote: 1) MultiLogger class that takes references to other loggers and just forwards the call to the log function. +1 Also, we should support a few loggers whith same type. For example, I can use 2 file loggers: the 1-st only for debug

Re: Early review of std.logger

2013-10-15 Thread Robert Schadek
On 10/15/2013 04:06 AM, Eric Anderton wrote: > On Monday, 14 October 2013 at 11:39:52 UTC, Dicebot wrote: >> Lets unleash the forces of constructive destruction. > > So, not to be too heavy-handed with criticism on this library, but I > think this should come up to par with solutions like log4j, lo

Re: GDC vs dmd speed

2013-10-15 Thread Paul Jurczak
On Monday, 14 October 2013 at 19:24:27 UTC, Spacen Jasset wrote: Hello, Whilst porting some C++ code I have discovered that the compiled output from the gdc compiler seems to be 47% quicker than the dmd compiler. Here is a few more data points for microbenchmarks of simple functions (P

Re: GDC vs dmd speed

2013-10-15 Thread John Colvin
On Monday, 14 October 2013 at 19:24:27 UTC, Spacen Jasset wrote: gdc 4.6 (0.29.1-4.6.4-1ubuntu4) Which I assume might be v2.020? with flags: ["-O2"] That's a really old gdc. If you can, upgrade to ubuntu 13.10 and you'll get a more up-to-date version. Alternatively, build from source: http://

Re: Early review of std.logger

2013-10-15 Thread Robert Schadek
On 10/15/2013 02:44 AM, Kapps wrote: > A few concerns: > > There doesn't seem to be a debug or trace log level. This is quite a > useful thing to have once your program is deployed. there is a LogLevel.debug and a LogLevel.info > > I don't like the returning by ref for log methods. For example, it

Re: dmd 2.063 generated code a lot slower then dmd 2.062

2013-10-15 Thread PauloPinto
On Tuesday, 15 October 2013 at 06:38:22 UTC, Nick Sabalausky wrote: On Mon, 14 Oct 2013 16:19:23 +0200 Andrej Mitrovic wrote: On 10/14/13, Nick Sabalausky wrote: > And any sane editor There's your problem right there. I'd say a sane diff view would make it obvious that CRLF or tabs were in

Re: Early review of std.logger

2013-10-15 Thread Robert Schadek
On 10/15/2013 09:32 AM, Sönke Ludwig wrote: > Am 15.10.2013 09:08, schrieb Jacob Carlborg: >> On 2013-10-14 23:22, Dicebot wrote: >> >>> If we need to care about that, D module system is a failure. >>> But I don't think it is a valid concern. >> >> People already complain about conflict function na

Re: Early review of std.logger

2013-10-15 Thread ponce
What are the philosophy behind errors vs fatal errors vs critical errors? When should we use each of these?

Re: Early review of std.logger

2013-10-15 Thread ponce
On Monday, 14 October 2013 at 18:29:09 UTC, ilya-stromberg wrote: On Monday, 14 October 2013 at 18:00:12 UTC, Robert Schadek wrote: If you disagree, please tell why. If you want a logger with a particular feature, this module will allow to create a custom logger. It would be a mistake to in

Re: Early review of std.logger

2013-10-15 Thread Robert Schadek
On 10/15/2013 09:40 AM, Sönke Ludwig wrote: > Am 14.10.2013 20:24, schrieb Robert Schadek: >> On 10/14/2013 04:44 PM, Sönke Ludwig wrote: >>> The same could be said about the global "log" functions, which are >>> tightly coupled to that state. I think this is already nicely grouped >>> together by

Re: Early review of std.logger

2013-10-15 Thread Robert Schadek
On 10/15/2013 09:44 AM, ilya-stromberg wrote: > On Monday, 14 October 2013 at 12:48:14 UTC, Martin Drasar wrote: >> 1) MultiLogger class that takes references to other loggers and just >> forwards the call to the log function. > > +1 > Also, we should support a few loggers whith same type. For exam

Re: Early review of std.logger

2013-10-15 Thread Robert Schadek
On 10/15/2013 10:49 AM, ponce wrote: > What are the philosophy behind errors vs fatal errors vs critical errors? > When should we use each of these? fatal = the application is going down, I'm just letting you know critical = the application is maybe going down, I'm not sure yet, but this is a probl

Re: Qt bindings for D

2013-10-15 Thread Max Samukha
On Monday, 14 October 2013 at 09:45:18 UTC, Abdulhaq wrote: I recommend to dump it and start from scratch. A clang-based generator would be an interesting option to explore. Or, if you want to preserve your sanity, just write Qt applications in C++/QML. Hi Max, so why dump it? I can see a f

Re: Qt bindings for D

2013-10-15 Thread Max Samukha
On Monday, 14 October 2013 at 11:35:05 UTC, Jacob Carlborg wrote: On 2013-10-14 11:03, Max Samukha wrote: I recommend to dump it and start from scratch. A clang-based generator would be an interesting option to explore. Or, if you want to preserve your sanity, just write Qt applications in C+

Re: Early review of std.logger

2013-10-15 Thread Dicebot
On Tuesday, 15 October 2013 at 07:33:15 UTC, Sönke Ludwig wrote: Am 15.10.2013 09:08, schrieb Jacob Carlborg: On 2013-10-14 23:22, Dicebot wrote: If we need to care about that, D module system is a failure. But I don't think it is a valid concern. People already complain about conflict funct

Re: [Proposal] Weak reference implementation for D

2013-10-15 Thread Denis Shelomovskij
14.10.2013 17:42, robert пишет: Damn it, you are right I did not think this through, somehow thought the use in addrOf is enough, which is of course crap. Thank's a lot for your time, I'll fix this ASAP. So, here are your revised version: https://github.com/phobos-x/phobosx/blob/1f0016c84c2043d

Re: draft proposal for ref counting in D

2013-10-15 Thread Michel Fortin
On 2013-10-15 02:20:49 +, "deadalnix" said: It will indeed cause trouble for code that mutate a large amount of shared pointers. I'd say that such code is probably asking for trouble in the first place, but as always, no silver bullet. I still think solution is the one that fit D the best

Re: draft proposal for ref counting in D

2013-10-15 Thread Michel Fortin
On 2013-10-15 07:28:16 +, Jacob Carlborg said: On 2013-10-15 05:11, Michel Fortin wrote: mprotect isn't available at all with the iOS SDK. So making this collector work on iOS (and the iOS Simulator) would require a different codegen. I haven't tried compiling anything and I don't know

Re: Early review of std.logger

2013-10-15 Thread Sönke Ludwig
Am 15.10.2013 10:54, schrieb Robert Schadek: On 10/15/2013 09:40 AM, Sönke Ludwig wrote: Am 14.10.2013 20:24, schrieb Robert Schadek: On 10/14/2013 04:44 PM, Sönke Ludwig wrote: The same could be said about the global "log" functions, which are tightly coupled to that state. I think this is al

Re: Early review of std.logger

2013-10-15 Thread Robert Schadek
On 10/15/2013 02:54 PM, Sönke Ludwig wrote: > What I meant is just that in Druntime there is something like this: > > struct LogManager { > static void somefunc(); > } > > instead of > > class LogManager { > static void someFunc(); > } > > In any case, such a struct/class should also have a mem

Re: Early review of std.logger

2013-10-15 Thread Sönke Ludwig
Am 15.10.2013 10:41, schrieb Robert Schadek: On 10/15/2013 02:44 AM, Kapps wrote: The simple act of logging a message is very verbose right now: log(LogLevel.trace, "Creating new pool") is a lot of boiler plate. I'd prefer something like log.trace("Creating new pool") and log("Creating new pool"

Re: Early review of std.logger

2013-10-15 Thread ilya-stromberg
On Tuesday, 15 October 2013 at 07:52:28 UTC, Robert Schadek wrote: On 10/15/2013 04:06 AM, Eric Anderton wrote: On Monday, 14 October 2013 at 11:39:52 UTC, Dicebot wrote: Here's what I think is missing: - System log support (as others have mentioned). This would be syslog or WEL, depending on

Re: Early review of std.logger

2013-10-15 Thread Robert Schadek
On 10/15/2013 03:21 PM, Sönke Ludwig wrote: > Am 15.10.2013 10:41, schrieb Robert Schadek: >> On 10/15/2013 02:44 AM, Kapps wrote: >>> The simple act of logging a message is very verbose right now: >>> log(LogLevel.trace, "Creating new pool") is a lot of boiler plate. I'd >>> prefer something like

Re: Early review of std.logger

2013-10-15 Thread Dicebot
On Tuesday, 15 October 2013 at 13:31:40 UTC, ilya-stromberg wrote: ... I think such stuff should go as an extra module in same package with various useful out-of-the box logger implementations at the very best. Probably even dub package built on top of std.logger; Phobos has very specific g

Re: Early review of std.logger

2013-10-15 Thread Robert Schadek
On 10/15/2013 03:31 PM, ilya-stromberg wrote: > On Tuesday, 15 October 2013 at 07:52:28 UTC, Robert Schadek wrote: >> On 10/15/2013 04:06 AM, Eric Anderton wrote: >>> On Monday, 14 October 2013 at 11:39:52 UTC, Dicebot wrote: >>> Here's what I think is missing: >>> - System log support (as others h

Re: Early review of std.logger

2013-10-15 Thread Dicebot
But actual batteries - no, this does belong to Phobos. * does not belong

Re: Early review of std.logger

2013-10-15 Thread Dicebot
On Tuesday, 15 October 2013 at 13:52:17 UTC, Robert Schadek wrote: I think this is good, as it gives you a way to quite libraries down. The idea behind the free standing "log" function is to provide an ultra easy way to log. It is not meant to be used for the 2<<31 line program. In that case yo

Re: Early review of std.logger

2013-10-15 Thread Robert Schadek
On 10/15/2013 03:54 PM, Dicebot wrote: > On Tuesday, 15 October 2013 at 13:31:40 UTC, ilya-stromberg wrote: >> ... > > I think such stuff should go as an extra module in same package with > various useful out-of-the box logger implementations at the very best. > Probably even dub package built on t

Re: Early review of std.logger

2013-10-15 Thread Robert Schadek
On 10/15/2013 03:57 PM, Dicebot wrote: > On Tuesday, 15 October 2013 at 13:52:17 UTC, Robert Schadek wrote: >> I think this is good, as it gives you a way to quite libraries down. The >> idea behind the free standing "log" function is to provide an ultra easy >> way to log. It is not meant to be us

Re: Early review of std.logger

2013-10-15 Thread ilya-stromberg
On Tuesday, 15 October 2013 at 13:54:12 UTC, Dicebot wrote: On Tuesday, 15 October 2013 at 13:31:40 UTC, ilya-stromberg wrote: ... I think such stuff should go as an extra module in same package with various useful out-of-the box logger implementations at the very best. Probably even dub pac

Re: Inconsitency

2013-10-15 Thread Kagamin
On Sunday, 13 October 2013 at 17:01:15 UTC, Dicebot wrote: If single element access is needed, str.front yields decoded `dchar`. Or simple `foreach (dchar d; str)` - it won't hide the fact it is O(n) operation at least. As `str.front` yields dchar, most `std.algorithm` and `std.range` utilities

Re: Early review of std.logger

2013-10-15 Thread Sönke Ludwig
Am 15.10.2013 15:52, schrieb Robert Schadek: On 10/15/2013 03:21 PM, Sönke Ludwig wrote: Am 15.10.2013 10:41, schrieb Robert Schadek: On 10/15/2013 02:44 AM, Kapps wrote: The simple act of logging a message is very verbose right now: log(LogLevel.trace, "Creating new pool") is a lot of boiler

Re: Inconsitency

2013-10-15 Thread Kagamin
On Sunday, 13 October 2013 at 14:14:14 UTC, nickles wrote: Also, I understand, that there is the std.utf.count() function which returns the length that I was searching for. However, why - if D is so UTF-8-centric - isn't this function implemented in the core like ".length"? Most code doesn't

Re: Early review of std.logger

2013-10-15 Thread Dicebot
On Tuesday, 15 October 2013 at 14:09:36 UTC, ilya-stromberg wrote: I did not talk about additional external libraries. As I know, Vibe.d use OpenSSL to provide SSL streams. Since we haven't got encryption support in Phobos, we can provide only TCP streams. For example, sending mail is clearly

Re: Early review of std.logger

2013-10-15 Thread Robert Schadek
On 10/15/2013 04:12 PM, Sönke Ludwig wrote: > > Believe it or not, for some reason I suspected as much. > > Yes, but the point is that when looking only at func1, you might > expect that all messages are logged as debug messages, but the last > one will be logged as a warning instead. func2 may be

Re: Early review of std.logger

2013-10-15 Thread ilya-stromberg
On Tuesday, 15 October 2013 at 14:12:38 UTC, Sönke Ludwig wrote: Am 15.10.2013 15:52, schrieb Robert Schadek: On 10/15/2013 03:21 PM, Sönke Ludwig wrote: Am 15.10.2013 10:41, schrieb Robert Schadek: On 10/15/2013 02:44 AM, Kapps wrote: The simple act of logging a message is very verbose right

Re: Early review of std.logger

2013-10-15 Thread ilya-stromberg
On Tuesday, 15 October 2013 at 14:20:15 UTC, Robert Schadek wrote: On 10/15/2013 04:12 PM, Sönke Ludwig wrote: Believe it or not, for some reason I suspected as much. Yes, but the point is that when looking only at func1, you might expect that all messages are logged as debug messages, but th

Re: Early review of std.logger

2013-10-15 Thread Sönke Ludwig
Am 15.10.2013 15:31, schrieb ilya-stromberg: On Tuesday, 15 October 2013 at 07:52:28 UTC, Robert Schadek wrote: On 10/15/2013 04:06 AM, Eric Anderton wrote: On Monday, 14 October 2013 at 11:39:52 UTC, Dicebot wrote: Here's what I think is missing: - System log support (as others have mentioned)

Re: Early review of std.logger

2013-10-15 Thread ilya-stromberg
On Tuesday, 15 October 2013 at 14:13:53 UTC, Dicebot wrote: On Tuesday, 15 October 2013 at 14:09:36 UTC, ilya-stromberg wrote: I did not talk about additional external libraries. As I know, Vibe.d use OpenSSL to provide SSL streams. Since we haven't got encryption support in Phobos, we can prov

Re: Early review of std.logger

2013-10-15 Thread Robert Schadek
On 10/15/2013 04:17 PM, ilya-stromberg wrote: > On Tuesday, 15 October 2013 at 14:12:38 UTC, Sönke Ludwig wrote: >> But if it's available people _will_ use it in complex contexts. Also >> if the writer of a 2<<8 loc library uses it and the library is used >> by a large piece of software, that will

Re: Early review of std.logger

2013-10-15 Thread Robert Schadek
On 10/15/2013 04:23 PM, ilya-stromberg wrote: > On Tuesday, 15 October 2013 at 14:20:15 UTC, Robert Schadek wrote: >> Logging is the most unpure functionality I can think of. It is side >> effect heaven. > > Yes, but we should minimise possible side effects. Of course, but having global state aka.

Re: Early review of std.logger

2013-10-15 Thread Sönke Ludwig
Am 15.10.2013 16:33, schrieb Robert Schadek: On 10/15/2013 04:23 PM, ilya-stromberg wrote: On Tuesday, 15 October 2013 at 14:20:15 UTC, Robert Schadek wrote: Logging is the most unpure functionality I can think of. It is side effect heaven. Yes, but we should minimise possible side effects.

Re: Early review of std.logger

2013-10-15 Thread ilya-stromberg
On Tuesday, 15 October 2013 at 14:25:55 UTC, Robert Schadek wrote: On 10/15/2013 04:17 PM, ilya-stromberg wrote: On Tuesday, 15 October 2013 at 14:12:38 UTC, Sönke Ludwig wrote: But if it's available people _will_ use it in complex contexts. Also if the writer of a 2<<8 loc library uses it and

Re: Early review of std.logger

2013-10-15 Thread Andrei Alexandrescu
On 10/15/13 12:52 AM, Robert Schadek wrote: On 10/15/2013 04:06 AM, Eric Anderton wrote: On Monday, 14 October 2013 at 11:39:52 UTC, Dicebot wrote: Lets unleash the forces of constructive destruction. So, not to be too heavy-handed with criticism on this library, but I think this should come

Structured logging (was Early review of std.logger)

2013-10-15 Thread Johannes Pfau
I think one increasingly important point for std.log is 'structured logging'. Structured logging is basically not simply logging textual messages, but also logging additional KEY/VALUE pairs of data. The idea is that logs should not only be readable by humans but also easy to parse and analyze. St

Re: Structured logging (was Early review of std.logger)

2013-10-15 Thread Robert Schadek
On 10/15/2013 05:20 PM, Johannes Pfau wrote: > I think one increasingly important point for std.log is 'structured > logging'. > > Structured logging is basically not simply logging textual messages, but > also logging additional KEY/VALUE pairs of data. The idea is that logs > should not only be r

Re: Structured logging (was Early review of std.logger)

2013-10-15 Thread Dicebot
On Tuesday, 15 October 2013 at 15:53:34 UTC, Robert Schadek wrote: That been said, you can add it. The method Logger.logf is a variadic template. You can simple create your own Logger Class and overwrite that method and implemented your structured logging approach there. The only pitfall is tha

Re: Qt bindings for D

2013-10-15 Thread w0rp
On Tuesday, 15 October 2013 at 09:38:15 UTC, Max Samukha wrote: Long story short, D allows for two approaches to bindings like QtD: 1. The traditional one is to allocate "shells" on GC heap and have a set of manually specified rules for ownership transfers and reference count adjustments. 2.

Re: Qt bindings for D

2013-10-15 Thread Andrej Mitrovic
On 10/15/13, w0rp wrote: > I couldn't think of a way to do it myself which was elegant. Perhaps you can pin the object and hook into the C++ destructor somehow?

Fastest way to learn D?

2013-10-15 Thread ProgrammingGhost
What is the fastest way for me to learn D? I think what I want is a syntax reference manual and a good tutorial to learn how to find and use libs.

Re: Fastest way to learn D?

2013-10-15 Thread Craig Dillabaugh
On Tuesday, 15 October 2013 at 18:13:46 UTC, ProgrammingGhost wrote: What is the fastest way for me to learn D? I think what I want is a syntax reference manual and a good tutorial to learn how to find and use libs. The best way to learn D is to start by reading the API and code examples in

Re: Fastest way to learn D?

2013-10-15 Thread Dejan Lekic
On Tue, 15 Oct 2013 20:13:45 +0200, ProgrammingGhost wrote: > What is the fastest way for me to learn D? I think what I want is a > syntax reference manual and a good tutorial to learn how to find and use > libs. I learned D by doing two things. 1) Downloading the bundled DMD in a ZIP file. 2)

Re: draft proposal for ref counting in D

2013-10-15 Thread deadalnix
On Tuesday, 15 October 2013 at 11:03:01 UTC, Michel Fortin wrote: On 2013-10-15 02:20:49 +, "deadalnix" said: It will indeed cause trouble for code that mutate a large amount of shared pointers. I'd say that such code is probably asking for trouble in the first place, but as always, no

Re: Fastest way to learn D?

2013-10-15 Thread Craig Dillabaugh
On Tuesday, 15 October 2013 at 18:25:48 UTC, Dejan Lekic wrote: On Tue, 15 Oct 2013 20:13:45 +0200, ProgrammingGhost wrote: What is the fastest way for me to learn D? I think what I want is a syntax reference manual and a good tutorial to learn how to find and use libs. I learned D by doing

Re: Fastest way to learn D?

2013-10-15 Thread Brian Schott
On Tuesday, 15 October 2013 at 18:25:48 UTC, Dejan Lekic wrote: 2) Reading the language reference at http://www.dlang.org (back then it was on DigitalMars website...) If you want a more accurate version of the language grammar, take a look at this: https://github.com/Hackerpilot/DGrammar/bl

Re: Fastest way to learn D?

2013-10-15 Thread Dejan Lekic
> > You really learned D from the online language reference? Thats hard > core! You must be much smarter than me. > > I suggested reading the Phobos docs online, but I was just joking. Well, that was ~10 years ago... Language reference is still pretty much okay, with more examples, plus we al

Re: Fastest way to learn D?

2013-10-15 Thread John Colvin
On Tuesday, 15 October 2013 at 18:32:59 UTC, Craig Dillabaugh wrote: On Tuesday, 15 October 2013 at 18:25:48 UTC, Dejan Lekic wrote: On Tue, 15 Oct 2013 20:13:45 +0200, ProgrammingGhost wrote: What is the fastest way for me to learn D? I think what I want is a syntax reference manual and a goo

Re: Fastest way to learn D?

2013-10-15 Thread Dicebot
On Tuesday, 15 October 2013 at 18:32:59 UTC, Craig Dillabaugh wrote: You really learned D from the online language reference? Thats hard core! You must be much smarter than me. You know, good old times when it was the only information available about D2, before even TDPL came out.. We litera

Re: [Proposal] Weak reference implementation for D

2013-10-15 Thread Sean Kelly
Perhaps I missed it from skimming, but why are we using atomic operations here anyway? Has testing revealed that it's necessary?

Re: Fastest way to learn D?

2013-10-15 Thread Craig Dillabaugh
On Tuesday, 15 October 2013 at 18:36:19 UTC, John Colvin wrote: On Tuesday, 15 October 2013 at 18:32:59 UTC, Craig Dillabaugh wrote: On Tuesday, 15 October 2013 at 18:25:48 UTC, Dejan Lekic wrote: On Tue, 15 Oct 2013 20:13:45 +0200, ProgrammingGhost wrote: What is the fastest way for me to lea

Re: Fastest way to learn D?

2013-10-15 Thread Wyatt
On Tuesday, 15 October 2013 at 18:29:21 UTC, Craig Dillabaugh wrote: The is also an under construction tutorial: http://beza1e1.tuxen.de/d-tut-0.1/index.html which looks promising, but is far from complete. As an addendum, this one is a neat example of how things can come together in real co

D bindings for OpenCV

2013-10-15 Thread TJSomething
I know this has been asked a few times before, but that was a few years ago. Are there any reasonably complete and up to date OpenCV bindings for D? If not, are there any reasonably easy ways to generate them? I tried SWIG and it choked on some of the macros they used, though that may have be

Re: D bindings for OpenCV

2013-10-15 Thread John Colvin
On Tuesday, 15 October 2013 at 19:20:10 UTC, TJSomething wrote: I know this has been asked a few times before, but that was a few years ago. Are there any reasonably complete and up to date OpenCV bindings for D? If not, are there any reasonably easy ways to generate them? I tried SWIG and it

Re: [Proposal] Weak reference implementation for D

2013-10-15 Thread John Colvin
On Tuesday, 15 October 2013 at 18:57:16 UTC, Sean Kelly wrote: Perhaps I missed it from skimming, but why are we using atomic operations here anyway? Has testing revealed that it's necessary? I presume you don't mean running some code and then seeing if it breaks as a test to see if atomic o

Re: Fastest way to learn D?

2013-10-15 Thread Robert BuRnEr Schadek
On 10/15/2013 08:13 PM, ProgrammingGhost wrote: > What is the fastest way for me to learn D? I think what I want is a > syntax reference manual and a good tutorial to learn how to find and > use libs. I would suggest to write a compiler for D in D. Helped me alot, but I still learning new stuff. M

Re: dub repository for a C binding

2013-10-15 Thread Sebastian Graf
On Friday, 11 October 2013 at 10:57:38 UTC, Sönke Ludwig wrote: Am 11.10.2013 11:25, schrieb Sebastian Graf: On Thursday, 10 October 2013 at 01:51:09 UTC, Rikki Cattermole wrote: Take a look at copyFiles option. It copies files e.g. dll's into the bin directory when compiled. Although keep an

Re: Fastest way to learn D?

2013-10-15 Thread deadalnix
On Tuesday, 15 October 2013 at 18:13:46 UTC, ProgrammingGhost wrote: What is the fastest way for me to learn D? I think what I want is a syntax reference manual and a good tutorial to learn how to find and use libs. Ali's book is especially targeted at beginners : http://ddili.org/ders/d.en/i

Re: dub repository for a C binding

2013-10-15 Thread Sebastian Graf
On Friday, 11 October 2013 at 10:57:56 UTC, Sebastian Graf wrote: On Friday, 11 October 2013 at 09:25:58 UTC, Sebastian Graf wrote: On Thursday, 10 October 2013 at 01:51:09 UTC, Rikki Cattermole wrote: Take a look at copyFiles option. It copies files e.g. dll's into the bin directory when com

Re: [Proposal] Weak reference implementation for D

2013-10-15 Thread Sean Kelly
On Tuesday, 15 October 2013 at 19:51:00 UTC, John Colvin wrote: On Tuesday, 15 October 2013 at 18:57:16 UTC, Sean Kelly wrote: Perhaps I missed it from skimming, but why are we using atomic operations here anyway? Has testing revealed that it's necessary? I presume you don't mean running som

Re: dub repository for a C binding

2013-10-15 Thread Sönke Ludwig
Am 15.10.2013 22:11, schrieb Sebastian Graf: On Friday, 11 October 2013 at 10:57:56 UTC, Sebastian Graf wrote: On Friday, 11 October 2013 at 09:25:58 UTC, Sebastian Graf wrote: On Thursday, 10 October 2013 at 01:51:09 UTC, Rikki Cattermole wrote: Take a look at copyFiles option. It copies fil

Re: [Proposal] Weak reference implementation for D

2013-10-15 Thread Dejan Lekic
On Tue, 15 Oct 2013 20:57:14 +0200, Sean Kelly wrote: > Perhaps I missed it from skimming, but why are we using atomic > operations here anyway? Has testing revealed that it's necessary? I believe it is the "why make it easy when we can make it complicated?" approach...

Re: Fastest way to learn D?

2013-10-15 Thread Chris
On Tuesday, 15 October 2013 at 18:36:19 UTC, John Colvin wrote: On Tuesday, 15 October 2013 at 18:32:59 UTC, Craig Dillabaugh wrote: On Tuesday, 15 October 2013 at 18:25:48 UTC, Dejan Lekic wrote: On Tue, 15 Oct 2013 20:13:45 +0200, ProgrammingGhost wrote: What is the fastest way for me to lea

Re: Fastest way to learn D?

2013-10-15 Thread John Colvin
On Tuesday, 15 October 2013 at 20:25:06 UTC, Chris wrote: On Tuesday, 15 October 2013 at 18:36:19 UTC, John Colvin wrote: On Tuesday, 15 October 2013 at 18:32:59 UTC, Craig Dillabaugh wrote: On Tuesday, 15 October 2013 at 18:25:48 UTC, Dejan Lekic wrote: On Tue, 15 Oct 2013 20:13:45 +0200, Pro

Re: D bindings for OpenCV

2013-10-15 Thread Craig Dillabaugh
On Tuesday, 15 October 2013 at 19:20:10 UTC, TJSomething wrote: I know this has been asked a few times before, but that was a few years ago. Are there any reasonably complete and up to date OpenCV bindings for D? If not, are there any reasonably easy ways to generate them? I tried SWIG and it

Re: D bindings for OpenCV

2013-10-15 Thread TJSomething
On Tuesday, 15 October 2013 at 20:33:59 UTC, Craig Dillabaugh wrote: I am a bit foggy on the diffence between openCL and openCV, but is this helpful: http://code.dlang.org/packages/derelict_extras-opencl OpenCL is more or less completely unrelated. OpenCV is about computer vision and OpenCL

Re: D bindings for OpenCV

2013-10-15 Thread Craig Dillabaugh
On Tuesday, 15 October 2013 at 20:41:58 UTC, TJSomething wrote: On Tuesday, 15 October 2013 at 20:33:59 UTC, Craig Dillabaugh wrote: I am a bit foggy on the diffence between openCL and openCV, but is this helpful: http://code.dlang.org/packages/derelict_extras-opencl OpenCL is more or less c

Re: Fastest way to learn D?

2013-10-15 Thread Chris
On Tuesday, 15 October 2013 at 20:31:54 UTC, John Colvin wrote: On Tuesday, 15 October 2013 at 20:25:06 UTC, Chris wrote: On Tuesday, 15 October 2013 at 18:36:19 UTC, John Colvin wrote: On Tuesday, 15 October 2013 at 18:32:59 UTC, Craig Dillabaugh wrote: On Tuesday, 15 October 2013 at 18:25:48

Re: D bindings for OpenCV

2013-10-15 Thread Dejan Lekic
On Tue, 15 Oct 2013 21:20:09 +0200, TJSomething wrote: > I know this has been asked a few times before, but that was a few years > ago. Are there any reasonably complete and up to date OpenCV bindings > for D? > > If not, are there any reasonably easy ways to generate them? I tried > SWIG and it

Re: D bindings for OpenCV

2013-10-15 Thread Timothee Cour
I've done it using swig, and using C++ api (not C api), as well as for other libs (sfml etc). it requires a bit of tweaking the '.i' file but is doable. Much better than hand maintaining c wrappers. On Tue, Oct 15, 2013 at 2:08 PM, Dejan Lekic wrote: > On Tue, 15 Oct 2013 21:20:09 +0200, TJSom

Re: [Proposal] Weak reference implementation for D

2013-10-15 Thread Robert
So, here are your revised version: https://github.com/phobos-x/phobosx/blob/1f0016c84c2043da0b9d2dafe65f54fcf6b6b8fa/source/phobosx/signal.d Sorry, but you are making the same mistake again. Yeah, I made a mistake again. In my mind it was ok because "o" is read from a shared variable, but thi

Re: D bindings for OpenCV

2013-10-15 Thread TJSomething
Could you post those? On Tuesday, 15 October 2013 at 21:51:06 UTC, Timothee Cour wrote: I've done it using swig, and using C++ api (not C api), as well as for other libs (sfml etc). it requires a bit of tweaking the '.i' file but is doable. Much better than hand maintaining c wrappers. On T

Re: [Proposal] Weak reference implementation for D

2013-10-15 Thread Robert
Well sure, but why not use a Mutex? What does trying to sort out a correct lock-free algorithm gain us here? It is not about concurrency for general purpose (phobosx.signal is no more thread safe than std.signals), but for the GC. A reference is hidden from the GC, when making it visible agai

Re: [Proposal] Weak reference implementation for D

2013-10-15 Thread Robert
See also: http://d.puremagic.com/issues/show_bug.cgi?id=4150 Best regards, Robert

Eloquently sums up my feelings about the disadvantages of dynamic typing

2013-10-15 Thread Walter Bright
http://www.reddit.com/r/programming/comments/1oi8wd/ruby_is_a_dying_language/ccs8yr8

Re: Eloquently sums up my feelings about the disadvantages of dynamic typing

2013-10-15 Thread Paulo Pinto
Am 16.10.2013 00:15, schrieb Walter Bright: http://www.reddit.com/r/programming/comments/1oi8wd/ruby_is_a_dying_language/ccs8yr8 Agree. While I do like dynamic languages for prototyping and small applications, I came to the conclusion they don't scale in the enterprise. Plus with type in

Re: GDC vs dmd speed

2013-10-15 Thread Spacen Jasset
On 14/10/2013 22:06, bearophile wrote: Spacen Jasset: const float pi = 3.14159265f; float dx = cast(float)(Clock.currSystemTick.length % (TickDuration.ticksPerSec * 10)) / (TickDuration.ticksPerSec * 10); float xRot = sin(dx * pi * 2) * 0.4f + pi / 2; float yRot = cos(dx * pi *

Re: GDC vs dmd speed

2013-10-15 Thread Spacen Jasset
On 14/10/2013 22:22, Walter Bright wrote: On 10/14/2013 12:24 PM, Spacen Jasset wrote: dmd32 v2.063.2 with flags: ["-O", "-release", "-noboundscheck", "-inline"] gdc 4.6 (0.29.1-4.6.4-1ubuntu4) Which I assume might be v2.020? with flags: ["-O2"] dmd uses the x87 for 32 bit code for floating p

Re: D bindings for OpenCV

2013-10-15 Thread ponce
On Tuesday, 15 October 2013 at 19:20:10 UTC, TJSomething wrote: I know this has been asked a few times before, but that was a few years ago. Are there any reasonably complete and up to date OpenCV bindings for D? If not, are there any reasonably easy ways to generate them? I tried SWIG and it

Re: [Proposal] Weak reference implementation for D

2013-10-15 Thread Walter Bright
On 10/13/2013 11:24 PM, Denis Shelomovskij wrote: 13.10.2013 22:19, Walter Bright пишет: On 10/13/2013 12:47 AM, Denis Shelomovskij wrote: --- Proposal --- Please post as a DIP: http://wiki.dlang.org/DIPs The trouble with it as a n.g. posting is they tend to scroll off and be forgotten. W

Re: [Proposal] Weak reference implementation for D

2013-10-15 Thread Sean Kelly
On Tuesday, 15 October 2013 at 22:09:17 UTC, Robert wrote: The problem is that destructors and thus the registered hooks for the dispose events are called when threads are already resumed. If this wasn't the case there would actually be no problems. Gotcha. Looking at the code... I think y

Re: [Proposal] Weak reference implementation for D

2013-10-15 Thread inout
On Tuesday, 15 October 2013 at 23:20:39 UTC, Sean Kelly wrote: On Tuesday, 15 October 2013 at 22:09:17 UTC, Robert wrote: The problem is that destructors and thus the registered hooks for the dispose events are called when threads are already resumed. If this wasn't the case there would actua

Re: Early review of std.logger

2013-10-15 Thread Jeremy Powers
On Tue, Oct 15, 2013 at 8:17 AM, Andrei Alexandrescu < seewebsiteforem...@erdani.org> wrote: > One note - log4j, log4cxx, and log4cpp are not part of the respective > languages' standards. That doesn't mean much (in fact it may be a > competitive advantage to integrating log4d in std) but it is on

Re: Eloquently sums up my feelings about the disadvantages of dynamic typing

2013-10-15 Thread H. S. Teoh
On Tue, Oct 15, 2013 at 03:15:45PM -0700, Walter Bright wrote: > > http://www.reddit.com/r/programming/comments/1oi8wd/ruby_is_a_dying_language/ccs8yr8 It's interesting how compile times seem to always crop up in discussions about static vs. dynamic typing, even though it's really an orthogonal i

Re: Eloquently sums up my feelings about the disadvantages of dynamic typing

2013-10-15 Thread brad clawsie
an excellent post, thanks for linking it Walter the relative weakness of dynamic-typed tools is compounded by the fact that they tend to be used to build monolithic applications, typical of what might emerge from rails, php etc. you take the whole ball of mud or nothing. with no types to defin

Re: Eloquently sums up my feelings about the disadvantages of dynamic typing

2013-10-15 Thread Nick Sabalausky
On Tue, 15 Oct 2013 15:15:45 -0700 Walter Bright wrote: > > http://www.reddit.com/r/programming/comments/1oi8wd/ruby_is_a_dying_language/ccs8yr8 > Totally agree. 90+% of the argument for dynamic languages is "getting shit done", and yet they ultimately *create* work: More unittests, more roadb

  1   2   >