Shared

2010-08-01 Thread dsimcha
I've reread the relevant TDPL chapter and I still don't quite understand the following: 1. What is shared? Is it simply a piece of syntactic salt to make it hard to share data across threads by accident, or is there more to it? 2. Is it fully or mostly implemented?

`shared`...

2018-09-30 Thread Manu via Digitalmars-d
struct Bob { void setThing() shared; } As I understand, `shared` attribution intends to guarantee that I dun synchronisation internally. This method is declared shared, so if I have shared instances, I can call it... because it must handle thread-safety internally. void f(ref shared Bob a, ref

Shared pain

2010-11-18 Thread Steve Teale
I had D code that provided a basis for creation of Windows services, which I have just tried to get working with the latest D2. No dice. The point of failure was in this method static void StartService() { if (!StartServiceCtrlDispatcherA(cast(SERVICE_TABLE_ENTRY *) &_sta[0])) { ...

Shared Delegates

2011-10-17 Thread Andrew Wiley
Okay, I realize there have been some discussions about this, but I have a few questions about shared delegates because right now they are definitely broken, but I'm not sure how. Take this code example: synchronized class Thing { void doSomeWork(void delegate()

shared gitconfig

2013-01-06 Thread Andrei Alexandrescu
Sent this to dmd-internals, opening for a broader discussion: Hello, I wonder how we can define a few aliases of project-wide usefulness to git. For example, I tried today to get the latest and greatest phobos into my repo, and got a bunch of conflicts. I searched a while on the net to figur

Shared objects?

2012-06-18 Thread Wouter Verhelst
Hi group, I've been reading up on D for the past few days--something I'd been planning to do for quite a while--and find much to like and little to dislike; as such, I am considering using it for my next project, which would run on Linux (and possibly some other POSIX systems) and would need to lo

Re: Shared

2010-08-01 Thread dsimcha
== Quote from dsimcha (dsim...@yahoo.com)'s article > I've reread the relevant TDPL chapter and I still don't quite understand the > following: > 1. What is shared? Is it simply a piece of syntactic salt to make it hard to > share data across threads by accident, or is

Re: Shared

2010-08-02 Thread Graham St Jack
On 02/08/10 02:16, dsimcha wrote: == Quote from dsimcha (dsim...@yahoo.com)'s article I've reread the relevant TDPL chapter and I still don't quite understand the following: 1. What is shared? Is it simply a piece of syntactic salt to make it hard to share data across thre

Re: Shared

2010-08-02 Thread Steven Schveighoffer
On Sun, 01 Aug 2010 12:46:58 -0400, dsimcha wrote: == Quote from dsimcha (dsim...@yahoo.com)'s article I've reread the relevant TDPL chapter and I still don't quite understand the following: 1. What is shared? Is it simply a piece of syntactic salt to make it hard to sh

Shared Classes

2013-11-09 Thread s...@s.com
It seems to me that the way things are currently implemented that a class itself has to be specifically made to handle being shared. That is to say, I cannot import some general library and do (new shared LibraryType()) if the class doesn't support all the proper shared methods. In

Re: `shared`...

2018-09-30 Thread Nicholas Wilson via Digitalmars-d
On Monday, 1 October 2018 at 02:29:40 UTC, Manu wrote: struct Bob { void setThing() shared; } As I understand, `shared` attribution intends to guarantee that I dun synchronisation internally. This method is declared shared, so if I have shared instances, I can call it... because it must

Re: `shared`...

2018-09-30 Thread Manu via Digitalmars-d
On Sun, Sep 30, 2018 at 8:20 PM Nicholas Wilson via Digitalmars-d wrote: > > On Monday, 1 October 2018 at 02:29:40 UTC, Manu wrote: > > struct Bob > > { > > void setThing() shared; > > } > > > > As I understand, `shared` attribution intends to gu

Re: `shared`...

2018-09-30 Thread Nicholas Wilson via Digitalmars-d
On Monday, 1 October 2018 at 03:33:16 UTC, Manu wrote: On Sun, Sep 30, 2018 at 8:20 PM Nicholas Wilson via Digitalmars-d wrote: On Monday, 1 October 2018 at 02:29:40 UTC, Manu wrote: > struct Bob > { > void setThing() shared; > } > > As I understand, `shared` attr

Re: `shared`...

2018-09-30 Thread Manu via Digitalmars-d
0 UTC, Manu wrote: > >> > struct Bob > >> > { > >> > void setThing() shared; > >> > } > >> > > >> > As I understand, `shared` attribution intends to guarantee > >> > that > >> > I dun > >> >

Re: `shared`...

2018-09-30 Thread Nicholas Wilson via Digitalmars-d
On Monday, 1 October 2018 at 04:22:24 UTC, Manu wrote: Ah, good point. So, it could only be allowed if scope... struct Bob { void setThing() shared scope; } That's going to require far-reaching proliferation of `scope`. Do we infer `scope` like the other attributes? For templates (e

Re: `shared`...

2018-09-30 Thread ag0aep6g via Digitalmars-d
On 10/01/2018 04:29 AM, Manu wrote: struct Bob { void setThing() shared; } [...] void f(ref shared Bob a, ref Bob b) { a.setThing(); // I have a shared object, can call shared method b.setThing(); // ERROR } This is the bit of the design that doesn't make sense to me... The m

Re: `shared`...

2018-09-30 Thread Nicholas Wilson via Digitalmars-d
On Monday, 1 October 2018 at 06:06:31 UTC, ag0aep6g wrote: `shared` isn't analogous to `const`. It's analogous to `immutable`. Functions dealing with `shared` data can assume that other threads also see the data as `shared`. If you allow calling `shared` methods on non-`shared` objec

Re: `shared`...

2018-10-01 Thread Kagamin via Digitalmars-d
On Monday, 1 October 2018 at 02:29:40 UTC, Manu wrote: So, I know that there's not a bunch of threads banging on this object... but the shared method should still work! A method that handles thread-safety doesn't suddenly not work when it's only accessed from a single thread.

Re: `shared`...

2018-10-01 Thread ag0aep6g via Digitalmars-d
On 10/01/2018 08:47 AM, Nicholas Wilson wrote: In order to be safe, a mutable parameter can be implicitly cast to shared iff the parameter is also scope (that includes the `this` reference`). With an implicit cast in place of the explicit cast under the new rules it would fail to compile

Re: `shared`...

2018-10-01 Thread Nicholas Wilson via Digitalmars-d
On Monday, 1 October 2018 at 08:04:38 UTC, Kagamin wrote: Shared data may need different algorithms. Yes, but those same algorithms will work on unshared (they might be slower but they will work). The reverse is not true, it can lead to race conditions. If unshared data is implicitly

Re: `shared`...

2018-10-01 Thread Nicholas Wilson via Digitalmars-d
On Monday, 1 October 2018 at 09:55:41 UTC, ag0aep6g wrote: On 10/01/2018 08:47 AM, Nicholas Wilson wrote: In order to be safe, a mutable parameter can be implicitly cast to shared iff the parameter is also scope (that includes the `this` reference`). With an implicit cast in place of the

Re: `shared`...

2018-10-01 Thread Jonathan M Davis via Digitalmars-d
On Monday, October 1, 2018 3:55:41 AM MDT ag0aep6g via Digitalmars-d wrote: > On 10/01/2018 08:47 AM, Nicholas Wilson wrote: > > In order to be safe, a mutable parameter can be implicitly cast to > > shared iff the parameter is also scope (that includes the `this` > > referenc

Re: `shared`...

2018-10-01 Thread RazvanN via Digitalmars-d
On Monday, 1 October 2018 at 02:29:40 UTC, Manu wrote: struct Bob { void setThing() shared; } As I understand, `shared` attribution intends to guarantee that I dun synchronisation internally. This method is declared shared, so if I have shared instances, I can call it... because it must

Re: `shared`...

2018-10-01 Thread Timon Gehr via Digitalmars-d
On 01.10.2018 04:29, Manu wrote: struct Bob { void setThing() shared; } As I understand, `shared` attribution intends to guarantee that I dun synchronisation internally. This method is declared shared, so if I have shared instances, I can call it... because it must handle thread-safety

Re: `shared`...

2018-10-01 Thread deadalnix via Digitalmars-d
On Monday, 1 October 2018 at 02:29:40 UTC, Manu wrote: I feel like I don't understand the design... mutable -> shared should work the same as mutable -> const... because surely that's safe? Nope. Consider. struct A { A* a; } void foo(shared A* a) { a.a = new shar

Re: `shared`...

2018-10-01 Thread Manu via Digitalmars-d
On Mon, Oct 1, 2018 at 3:51 AM Jonathan M Davis via Digitalmars-d wrote: > > pure is not sufficient regardless of what happens with threads, [..] #truefacts > Certainly, it's way, way simply just to use scope and force > the programmer to continue to cast in those cases that the compiler can't >

Re: `shared`...

2018-10-01 Thread Manu via Digitalmars-d
On Mon, Oct 1, 2018 at 8:55 AM Timon Gehr via Digitalmars-d wrote: > > On 01.10.2018 04:29, Manu wrote: > > struct Bob > > { > > void setThing() shared; > > } > > > > As I understand, `shared` attribution intends to guarantee that I dun > >

Re: `shared`...

2018-10-01 Thread Manu via Digitalmars-d
On Mon, Oct 1, 2018 at 11:45 AM deadalnix via Digitalmars-d wrote: > > On Monday, 1 October 2018 at 02:29:40 UTC, Manu wrote: > > I feel like I don't understand the design... > > mutable -> shared should work the same as mutable -> const... > > because &

Re: `shared`...

2018-10-01 Thread Steven Schveighoffer via Digitalmars-d
is because you can't mutate it. Shared is not the same. simple example: void foo(scope shared int *a, scope shared int *b) {    a = b; } Haha, of course, this has no effect! In order for it to show the problem, a has to be ref'd. -Steve

Re: `shared`...

2018-10-01 Thread Steven Schveighoffer via Digitalmars-d
On 10/1/18 7:09 PM, Manu wrote: On Mon, Oct 1, 2018 at 8:55 AM Timon Gehr via Digitalmars-d wrote: On 01.10.2018 04:29, Manu wrote: struct Bob { void setThing() shared; } As I understand, `shared` attribution intends to guarantee that I dun synchronisation internally. This method is

Re: `shared`...

2018-10-01 Thread Timon Gehr via Digitalmars-d
On 02.10.2018 01:09, Manu wrote: Your entire example depends on escaping references. I think you missed the point? There was no 'scope' in the OP, and no, that is not sufficient either, because scope is not transitive but shared is.

Re: `shared`...

2018-10-01 Thread Walter Bright via Digitalmars-d
On 10/1/2018 4:56 PM, Timon Gehr wrote: There was no 'scope' in the OP, and no, that is not sufficient either, because scope is not transitive but shared is. Oops, I missed that point. Glad you noticed it.

Re: `shared`...

2018-10-01 Thread Manu via Digitalmars-d
ent either, > because scope is not transitive but shared is. Surely `scope` must be transitive? How could it work otherwise?

Re: `shared`...

2018-10-02 Thread Walter Bright via Digitalmars-d
On 10/1/2018 7:31 PM, Manu wrote: Surely `scope` must be transitive? It isn't. How could it work otherwise? It's a storage class, not a type constructor. There is no "pointer to scope" type, for example. Having it transitive would make it unworkable, actually, for similar reasons that tra

Re: `shared`...

2018-10-02 Thread Manu via Digitalmars-d
On Tue, Oct 2, 2018 at 12:45 AM Walter Bright via Digitalmars-d wrote: > > On 10/1/2018 7:31 PM, Manu wrote: > > Surely `scope` must be transitive? > > It isn't. > > > How could it work otherwise? > > It's a storage class, not a type constructor. There is no "pointer to scope" > type, for example.

Re: `shared`...

2018-10-02 Thread Walter Bright via Digitalmars-d
On 10/2/2018 1:49 PM, Manu wrote: So... `scope` says "I won't escape this, but I may escape anything this points to"? That's right. http://dconf.org/2017/talks/bright.html

Re: `shared`...

2018-10-03 Thread Atila Neves via Digitalmars-d
On Tuesday, 2 October 2018 at 21:35:40 UTC, Walter Bright wrote: On 10/2/2018 1:49 PM, Manu wrote: So... `scope` says "I won't escape this, but I may escape anything this points to"? That's right. http://dconf.org/2017/talks/bright.html I'm confused. Given how the lifetimes of aggregates a

Re: `shared`...

2018-10-03 Thread Walter Bright via Digitalmars-d
On 10/3/2018 1:33 AM, Atila Neves wrote: I'm confused. Given how the lifetimes of aggregates are defined in DIP1000, and also given that I tried to escape members of a struct when I wrote fearless and the compiler didn't let me, I'm trying to understand in what situation scope doesn't apply tra

Re: `shared`...

2018-10-04 Thread Kagamin via Digitalmars-d
On Tuesday, 2 October 2018 at 07:42:13 UTC, Walter Bright wrote: Having it transitive would make it unworkable, actually What would be broken by transitive scope?

Shared Hell

2009-10-27 Thread Denis Koroskin
I've recently updated to DMD2.035 (from DMD2.031 because all the later versions had issues with imports) and for the first time faced problems with shared modifier. I don't need shared and all my globals are __gshared (they are globally unique instances that don't need pe

Shared Memory

2009-04-16 Thread sesteel
I just wanted to float an idea out there. I have been using technologies such as Terracotta and Memcache at work. Terracotta, has left me wondering about the applicability of integrating shared objects (memory) directly into a programming language. Is this anything anybody else here has

shared library

2010-03-05 Thread Igor Lesik
I was able to build D runtime shared library (.so). The test app dies with segmentation fault, I am debugging it; decided to share. To reproduce my results one can load makefile from here: http://www.curoles.com/j/dso/so.mak (drop it into the runtime directory and call make -f so.mak) The

Re: Shared pain

2010-11-18 Thread Jason House
I'm not familiar with the API, but are you able to declare your original _sta as immutable and call it a day? Immutable data should have the same protection as __gshared but with no implications of bypassing the type system. If that's not helpful, can you give more details like calling patterns?

Re: Shared pain

2010-11-18 Thread Steven Schveighoffer
On Thu, 18 Nov 2010 06:26:39 -0500, Steve Teale wrote: I had D code that provided a basis for creation of Windows services, which I have just tried to get working with the latest D2. No dice. The point of failure was in this method static void StartService() { if (!StartServiceCtrlDis

Re: Shared pain

2010-11-18 Thread Steve Teale
On Thu, 18 Nov 2010 08:33:12 -0500, Steven Schveighoffer wrote: > > I think using a class in D is a good idea. But what you may need is > global functions which forward to your class methods. This is how I > would probably do it. > > -Steve Steve, Thanks. I kind of went that way. Having done

Re: Shared pain

2010-11-18 Thread Steven Schveighoffer
On Thu, 18 Nov 2010 13:53:53 -0500, Steve Teale wrote: On Thu, 18 Nov 2010 08:33:12 -0500, Steven Schveighoffer wrote: I think using a class in D is a good idea. But what you may need is global functions which forward to your class methods. This is how I would probably do it. -Steve S

Re: Shared pain

2010-11-18 Thread Steve Teale
> As I said before, I don't know if the thread being created by the > windows service procedure is properly initializing the D modules of the > library/runtime. Try as the first line of ServiceMain to initialize the > current thread: > > auto mythread = thread_attachThis(); > > see http://www.d

Re: Shared pain

2010-11-18 Thread Steve Teale
On Thu, 18 Nov 2010 11:26:39 +, Steve Teale wrote: > I had D code that provided a basis for creation of Windows services, > which I have just tried to get working with the latest D2. > > No dice. > I have made some progress in understanding this. It appears that any D static data structures

Re: Shared pain

2010-11-19 Thread Steven Schveighoffer
On Fri, 19 Nov 2010 01:49:30 -0500, Steve Teale wrote: As I said before, I don't know if the thread being created by the windows service procedure is properly initializing the D modules of the library/runtime. Try as the first line of ServiceMain to initialize the current thread: auto myt

Re: Shared pain

2010-11-19 Thread Jason House
A cast to immutable is required when constructing immutable objects. The type system can't prove that's safe. It's a design limitation to keep complexity low. http://www.digitalmars.com/d/2.0/phobos/std_regexp.html Looking at the Regexp docs, find isn't marked const or pure. If that's an oversit

Re: Shared pain

2010-11-19 Thread Steve Teale
On Fri, 19 Nov 2010 08:25:17 -0500, Jason House wrote: > A cast to immutable is required when constructing immutable objects. The > type system can't prove that's safe. It's a design limitation to keep > complexity low. > Jason, But design limitations like that will force programmers who are on

Re: Shared pain

2010-11-19 Thread bearophile
Steve Teale: > Languages can't be designed just on theory - some recognition of > practicality is also required. In the case of creation of immutable data structures it looks the opposite to me: DMD is too much pragmatic and there isn't enough theory behind it :-) > But design limitations lik

Re: Shared pain

2010-11-19 Thread Steve Teale
On Fri, 19 Nov 2010 11:23:44 -0500, bearophile wrote: > Regarding the creation of immutable data structures, there is a proposal > that is probably able to remove some of the pain: the result of strongly > pure functions may become implicitly castable to immutable. > > Bye, > bearophile BP, I a

Re: Shared pain

2010-11-19 Thread Fawzi Mohamed
On 19-nov-10, at 17:42, Steve Teale wrote: On Fri, 19 Nov 2010 11:23:44 -0500, bearophile wrote: Regarding the creation of immutable data structures, there is a proposal that is probably able to remove some of the pain: the result of strongly pure functions may become implicitly castable

Re: Shared pain

2010-11-19 Thread bearophile
Steve Teale: > I admire your dedication to language theory and purity, but there are > many who'd translate that to impracticality and obscurity. I like that idea about immutables & strong pure functions, but it was not an idea of mine :-) That enhancement request in Bugzilla is not written by

Re: Shared pain

2010-11-19 Thread Jason House
Steve Teale Wrote: > On Fri, 19 Nov 2010 08:25:17 -0500, Jason House wrote: > > > A cast to immutable is required when constructing immutable objects. The > > type system can't prove that's safe. It's a design limitation to keep > > complexity low. > > > Jason, > > But design limitations like t

Re: Shared pain

2010-11-19 Thread Steve Teale
On Fri, 19 Nov 2010 16:21:41 -0500, Jason House wrote: > Steve Teale Wrote: > >> On Fri, 19 Nov 2010 08:25:17 -0500, Jason House wrote: >> >> > A cast to immutable is required when constructing immutable objects. >> > The type system can't prove that's safe. It's a design limitation to >> > keep

Re: Shared Delegates

2011-10-17 Thread Michel Fortin
On 2011-10-17 20:33:59 +, Andrew Wiley said: Okay, I realize there have been some discussions about this, but I have a few questions about shared delegates because right now they are definitely broken, but I'm not sure how. Take this code example: synchronized class Thing {

Re: Shared Delegates

2011-10-17 Thread Benjamin Thaut
Am 17.10.2011 22:43, schrieb Michel Fortin: On 2011-10-17 20:33:59 +, Andrew Wiley said: Okay, I realize there have been some discussions about this, but I have a few questions about shared delegates because right now they are definitely broken, but I'm not sure how. Take this

Re: Shared Delegates

2011-10-17 Thread Andrew Wiley
On Tue, Oct 18, 2011 at 12:53 AM, Benjamin Thaut wrote: > Am 17.10.2011 22:43, schrieb Michel Fortin: > > On 2011-10-17 20:33:59 +, Andrew Wiley >> said: >> >> >>> Okay, I realize there have been some discussions about this, but I have a >>>

Re: Shared Delegates

2011-10-17 Thread Benjamin Thaut
gt;> said: Okay, I realize there have been some discussions about this, but I have a few questions about shared delegates because right now they are definitely broken, but I'm not sure how. Take this code example: synchro

Re: Shared Delegates

2011-10-17 Thread Andrew Wiley
gt; >>On 2011-10-17 20:33:59 +, Andrew Wiley >>> <mailto:wiley.andrew.j@gmail.**com>> >> said: >> >> >>Okay, I realize there have been some discussions about this, >>but I have a >>few que

Re: Shared Delegates

2011-10-18 Thread Andrew Wiley
> wrote: >>> >>>Am 17.10.2011 22:43, schrieb Michel Fortin: >>> >>>On 2011-10-17 20:33:59 +, Andrew Wiley >>>>> <mailto:wiley.andrew.j@gmail.**com>> >>> said: >>> >>> >>>Ok

Re: Shared Delegates

2011-10-19 Thread Andrew Wiley
On Mon, Oct 17, 2011 at 3:43 PM, Michel Fortin wrote: > On 2011-10-17 20:33:59 +, Andrew Wiley > said: > > >> Okay, I realize there have been some discussions about this, but I have a >> few questions about shared delegates because right now they are definitely >

Re: Shared Delegates

2011-10-19 Thread Michel Fortin
On 2011-10-19 20:36:37 +, Andrew Wiley said: On Mon, Oct 17, 2011 at 3:43 PM, Michel Fortin wrote: On 2011-10-17 20:33:59 +, Andrew Wiley said: Okay, I realize there have been some discussions about this, but I have a few questions about shared delegates because right now they

Re: Shared Delegates

2011-10-19 Thread Andrew Wiley
;>> >>> Okay, I realize there have been some discussions about this, but I have >>>> a >>>> few questions about shared delegates because right now they are >>>> definitely >>>> broken, but I'm not sure how. >>>> Tak

Re: Shared Delegates

2011-10-19 Thread Michel Fortin
have been some discussions about this, but I have a few questions about shared delegates because right now they are definitely broken, but I'm not sure how. Take this code example: synchronized class Thing { void doSomeWork(void delegate() work) { work(); } void work() {} } void main() { au

Re: Shared Delegates

2011-10-19 Thread Robert Jacques
On Wed, 19 Oct 2011 20:51:25 -0400, Michel Fortin wrote: On 2011-10-19 21:53:12 +, Andrew Wiley said: [snip] Also, I how shared works is being misunderstood. Making a class synchronized should limit all member functions and field to being shared or immutable, but it doesn't plac

Re: Shared Delegates

2011-10-19 Thread Andrew Wiley
On Wed, Oct 19, 2011 at 9:38 PM, Robert Jacques wrote: > On Wed, 19 Oct 2011 20:51:25 -0400, Michel Fortin < > michel.for...@michelf.com> wrote: > >> On 2011-10-19 21:53:12 +, Andrew Wiley >> said: >> > > [snip] > > Also, I how shared

Another Shared Bug?

2011-10-24 Thread Andrew Wiley
; synchronized abstract class Bob { private: int _i = 2; public: @property int i() { return _i; } } synchronized class Bill : Bob { public: @property int thing() { return super.i(); //test2.d(18): Error: function test2.Bob.i () shared is not callable using argument types () } } But the

Re: shared gitconfig

2013-01-06 Thread Jonathan M Davis
On Sunday, January 06, 2013 14:50:49 Andrei Alexandrescu wrote: > Sent this to dmd-internals, opening for a broader discussion: > > Hello, > > > I wonder how we can define a few aliases of project-wide usefulness to > git. For example, I tried today to get the latest and greatest phobos > into m

Re: shared gitconfig

2013-01-06 Thread Jacob Carlborg
On 2013-01-06 21:47, Jonathan M Davis wrote: But with regards to this particular command, I'd argue that you're doing something wrong if you need to force a rebase with a pull. I agree. -- /Jacob Carlborg

Re: shared gitconfig

2013-01-06 Thread Vladimir Panteleev
On Sunday, 6 January 2013 at 19:50:47 UTC, Andrei Alexandrescu wrote: Sent this to dmd-internals, opening for a broader discussion: Hello, I wonder how we can define a few aliases of project-wide usefulness to git. For example, I tried today to get the latest and greatest phobos into my repo

Re: shared gitconfig

2013-01-06 Thread Andrei Alexandrescu
On 1/6/13 4:03 PM, Vladimir Panteleev wrote: On Sunday, 6 January 2013 at 19:50:47 UTC, Andrei Alexandrescu wrote: git pull --rebase -s recursive -X ours Question: Do you know what exactly does this command do? I do now after having read about it at the end of several google searches. Git

Re: shared gitconfig

2013-01-06 Thread Jonathan M Davis
On Sunday, January 06, 2013 17:45:29 Andrei Alexandrescu wrote: > I get these tidbits of commands - git idioms - all the time, and I > forget them because I don't use them frequently. I don't see why it's a > crime to want to define some macros for such idioms instead of > essentially putting that

Re: shared gitconfig

2013-01-06 Thread Andrei Alexandrescu
On 1/6/13 6:02 PM, Jonathan M Davis wrote: On Sunday, January 06, 2013 17:45:29 Andrei Alexandrescu wrote: I get these tidbits of commands - git idioms - all the time, and I forget them because I don't use them frequently. I don't see why it's a crime to want to define some macros for such idiom

Re: shared gitconfig

2013-01-06 Thread Jonathan M Davis
On Sunday, January 06, 2013 18:12:20 Andrei Alexandrescu wrote: > On 1/6/13 6:02 PM, Jonathan M Davis wrote: > > On Sunday, January 06, 2013 17:45:29 Andrei Alexandrescu wrote: > >> I get these tidbits of commands - git idioms - all the time, and I > >> forget them because I don't use them frequent

Re: shared gitconfig

2013-01-06 Thread Vladimir Panteleev
On Sunday, 6 January 2013 at 22:45:27 UTC, Andrei Alexandrescu wrote: I do now after having read about it at the end of several google searches. I found the git documentation to be an excellent resource once you're familiar with the basic concept of how git works. For that, I found this quite

Re: shared gitconfig

2013-01-07 Thread Andrei Alexandrescu
On 1/6/13 3:41 PM, Jonathan M Davis wrote: I'm arguing that people should actually learn how to use git properly rather than creating crutches for themselves. False choice. The more you try and do with git without learning it properly, the more problems you're likely to run into (e.g. by runn

Re: shared gitconfig

2013-01-07 Thread Andrej Mitrovic
On 1/6/13, Andrei Alexandrescu wrote: > What I'd want to do next is define the alias such that other > participants to the dlang project may use it. With time we'd collect a > good set of macros that help our process. This is what I use locally in my .bashrc: # win32 helpers alias cd..='cd ..' a

Re: shared gitconfig

2013-01-07 Thread Vladimir Panteleev
On Tuesday, 8 January 2013 at 01:54:43 UTC, Andrei Alexandrescu wrote: On 1/6/13 3:41 PM, Jonathan M Davis wrote: I'm arguing that people should actually learn how to use git properly rather than creating crutches for themselves. False choice. Yet one should come before the other. The mor

Re: shared gitconfig

2013-01-07 Thread Vladimir Panteleev
On Sunday, 6 January 2013 at 19:50:47 UTC, Andrei Alexandrescu wrote: For example, I tried today to get the latest and greatest phobos into my repo, and got a bunch of conflicts. I searched a while on the net to figure what the command for "just get the latest remote into my local copy", which

Re: shared gitconfig

2013-01-07 Thread Andrei Alexandrescu
On 1/7/13 10:56 PM, Vladimir Panteleev wrote: On Sunday, 6 January 2013 at 19:50:47 UTC, Andrei Alexandrescu wrote: For example, I tried today to get the latest and greatest phobos into my repo, and got a bunch of conflicts. I searched a while on the net to figure what the command for "just get

Re: shared gitconfig

2013-01-08 Thread Vladimir Panteleev
On Tuesday, 8 January 2013 at 07:07:18 UTC, Andrei Alexandrescu wrote: This script is bad because it does not do any meaningful error handling and offers no good explanation on how to proceed if either step fails. Indeed - I wanted to avoid using any syntax / commands that someone wouldn't us

Re: shared gitconfig

2013-01-08 Thread Jonathan M Davis
On Monday, January 07, 2013 17:54:40 Andrei Alexandrescu wrote: > I know how the shell works quite well but that doesn't stop me from > writing scripts and aliases. > > This boils down to advocating one needs to type by hand sequences of > commands instead of defining higher-level scripts that hav

Re: shared gitconfig

2013-01-09 Thread Ed McCardell
On 01/06/2013 02:50 PM, Andrei Alexandrescu wrote: Sent this to dmd-internals, opening for a broader discussion: Hello, I wonder how we can define a few aliases of project-wide usefulness to git. For example, I tried today to get the latest and greatest phobos into my repo, and got a bunch of

Re: shared gitconfig

2013-01-10 Thread mist
tl;dr: more local branches means less need for arcane git options. --Ed AFAIR you can resist the temptation to have a local master branch at all and just run "git pull --rebase upstream/master" where upstream is configured to be original D repo.

Re: shared gitconfig

2013-01-10 Thread Ed McCardell
On 01/10/2013 04:20 AM, mist wrote: tl;dr: more local branches means less need for arcane git options. --Ed AFAIR you can resist the temptation to have a local master branch at all and just run "git pull --rebase upstream/master" where upstream is configured to be original D repo. And then y

Re: shared gitconfig

2013-01-11 Thread mist
And then you're right back where we started; Andrei's original problem was how to just get a local copy of the latest and greatest upstream without having merge conflicts, which (if you don't have a separate local master) means using "git pull --rebase -s recursive -X ours". But: "rebase -X

Re: shared gitconfig

2013-01-14 Thread Ed McCardell
On 01/11/2013 12:35 PM, mist wrote: I do not propose to get rid of master at all, just made an observation that it is easy to make small fix directly on master when it is hanging around so close. Looks like we're in violent agreement :) Mainly, I was trying to argue against the inclusion of An

Phobos and shared

2011-03-15 Thread d coder
Greetings I am trying to create a multithreaded application. Right now I am finding it difficult to work with "shared" qualifier. One of the reasons is that Phobos library does not seem compatible with "shared" data-structures. For example: import std.bitmanip; shared Bit

Re: Shared objects?

2012-06-18 Thread Jacob Carlborg
On 2012-06-18 16:56, Wouter Verhelst wrote: Hi group, I've been reading up on D for the past few days--something I'd been planning to do for quite a while--and find much to like and little to dislike; as such, I am considering using it for my next project, which would run on Linux (and possibly

Re: Shared objects?

2012-06-18 Thread Wouter Verhelst
Jacob Carlborg writes: > On 2012-06-18 16:56, Wouter Verhelst wrote: >> However, what >> I don't find is the answer to the two following questions: >> >> - Does D support dlopen(), or some similar mechanism, to allow me to >>load plugins at runtime? > > Yes. You can compile D code to a standa

Re: Shared objects?

2012-06-18 Thread Jacob Carlborg
On Monday, 18 June 2012 at 15:22:19 UTC, Wouter Verhelst wrote: Ah, too bad. Do you have a pointer to some more detailed information on this? Just so I can get a feel for how fast things are moving, and/or whether it's worth for me to wait for that -- I can get started on the other parts; wh

Re: Shared objects?

2012-06-20 Thread R. Grocott
I'm not too experienced with Github - am I right in thinking that the SharedRuntime repository has been idle for six months? If so, does this indicate that Martin has likely abandoned the project? Like Wouter, I'm looking into developing a project with D that would eventually require plugins, and

Re: Shared objects?

2012-06-20 Thread Jacob Carlborg
On 2012-06-20 09:50, R. Grocott wrote: I'm not too experienced with Github - am I right in thinking that the SharedRuntime repository has been idle for six months? If so, does this indicate that Martin has likely abandoned the project? The last commit was three months ago, Mars 20, 2012: https

Shared Class Variables

2010-05-27 Thread sybrandy
Evening. I'm having a bit of a problem and I'm hoping someone can help. I'm trying to create a class that is shared across threads. The only purpose of this class is to write data to somewhere, though currently a file. A single-threaded version of this works fine, however I

Re: Shared Classes

2013-11-09 Thread evilrat
On Saturday, 9 November 2013 at 16:55:18 UTC, s...@s.com wrote: It seems to me that the way things are currently implemented that a class itself has to be specifically made to handle being shared. That is to say, I cannot import some general library and do (new shared LibraryType()) if the

Re: Shared Classes

2013-11-09 Thread Jonathan M Davis
On Saturday, November 09, 2013 11:55:19 s...@s.com wrote: > It seems to me that the way things are currently implemented that a > class itself has to be specifically made to handle being shared. That > is to say, I cannot import some general library and do (new shared > LibraryTy

Re: Shared Classes

2013-11-09 Thread Shammah Chancellor
On 2013-11-09 17:12:46 +, evilrat said: On Saturday, 9 November 2013 at 16:55:18 UTC, s...@s.com wrote: It seems to me that the way things are currently implemented that a class itself has to be specifically made to handle being shared. That is to say, I cannot import some general

  1   2   3   4   5   6   7   8   9   10   >