1 Jul 2011 01:18
1 Jul 2011 01:31
Re: thread.d "Unable to load thread context"
Eric Poggel (JoeCoder <dnewsgroup2 <at> yage3d.net>
2011-06-30 23:31:58 GMT
2011-06-30 23:31:58 GMT
On 6/30/2011 3:05 PM, Sean Kelly wrote:
> On Jun 30, 2011, at 2:40 AM, Benjamin Thaut wrote:
>
>> Am 30.06.2011 06:45, schrieb Sean Kelly:
>>> On Jun 29, 2011, at 10:00 AM, Benjamin Thaut wrote:
>>>> If I manually merge your fix into the thread.d of the 2.053 runtime (change m to __gshared in slock) the
issue still exsits. After a while the game will stop with "unable to load thread context".
>>>
>>> Just for kicks, rewrite the GetThreadContext call as this and see if it works in 2.053:
>>>
>>> for( int i = 0; !GetThreadContext( t.m_hndl,&context ); i++ )
>>> {
>>> if( i> 99 )
>>> throw new ThreadException( "Unable to load thread context" );
>>> Thread.yield();
>>> }
>>>
>>
>> The for loop seems to have fixed the issue, at least I'm not able to reproduce it easily any more. I'm going
to be able to tell you tomorrow if the issue is fixed completely or not.
>
> Cool. I've applied the change to druntime.
>
>> Does any access to the GC cause a Exception to be thrown? I mean even a removeRange call?
>
> malloc, realloc, extend, reserve, addRoot, and addRange. I think that's it.
This makes me wonder how many other such hacks like this are in
DRuntime. If this problem happens once every 30 minutes, then I suppose
this decreases it to once every 30^100 minutes (which is older than the
(Continue reading)
1 Jul 2011 02:19
Re: Why I'm hesitating to switch to D
Jonathan M Davis <jmdavisProg <at> gmx.com>
2011-07-01 00:19:24 GMT
2011-07-01 00:19:24 GMT
On 2011-06-30 15:59, simendsjo wrote: > On 01.07.2011 00:49, Simen Kjaeraas wrote: > > On Thu, 30 Jun 2011 23:52:38 +0200, Daniel Gibson > > > > <metalcaedes <at> gmail.com> wrote: > >> Am 30.06.2011 23:50, schrieb KennyTM~: > >>> On Jul 1, 11 05:39, bearophile wrote: > >>>> Jonathan M Davis: > >>>>> Actually, I find the backticks to be by far the most pleasant way to > >>>>> get raw > >>>>> strings in D. > >>>> > >>>> I don't have backticks on my keyboard, so I use them only when they > >>>> are needed. They have even removed the backticks in the Python2 -> > >>>> Python3 transition partially because of this (and partially because > >>>> there is a more obvious way to do it in Python, and Python tries to > >>>> keep only one obvious way to do things). > >>>> > >>>> Bye, > >>>> bearophile > >>> > >>> Python's `xyz` is equivalent to repr(xyz). I think it is removed in > >>> Python 3 more because `...` is not worth the specialness as repr(). But > >>> D's `...` is much more worthy as a convenient literal syntax when > >>> involving '"' or '\'. > >>> > >>> (I know some keyboard doesn't have '[' and ']'. So having no '`' > >>> shouldn't be the reason it is removed from the language.) > >> > >> Keyboards without []? This makes programming nearly impossible O_O(Continue reading)
1 Jul 2011 02:18
Re: Why I'm hesitating to switch to D
Nick Sabalausky <a <at> a.a>
2011-07-01 00:18:57 GMT
2011-07-01 00:18:57 GMT
"KennyTM~" <kennytm <at> gmail.com> wrote in message news:iuik51$2t5s$2 <at> digitalmars.com... > On Jul 1, 11 03:27, Nick Sabalausky wrote: >> "Walter Bright"<newshound2 <at> digitalmars.com> wrote in message >> news:iuig3e$2m1k$1 <at> digitalmars.com... >> > >>> Back ticks are used for D raw string literals, and I now think that was >>> a >>> mistake. >>> >> >> What would you have used instead? >> > > There is r"..." which is equivalent to `...`. I've only used `...`. That's not equivalent. The r"..." can't have a double-quote inside it, so it's only a half-way solution, and is probably why no one really uses it (At least that's why I never use it).
1 Jul 2011 02:29
Re: Why I'm hesitating to switch to D
simendsjo <simendsjo <at> gmail.com>
2011-07-01 00:29:22 GMT
2011-07-01 00:29:22 GMT
On 01.07.2011 02:19, Jonathan M Davis wrote: > On 2011-06-30 15:59, simendsjo wrote: >> On 01.07.2011 00:49, Simen Kjaeraas wrote: >>> On Thu, 30 Jun 2011 23:52:38 +0200, Daniel Gibson >>> >>> <metalcaedes <at> gmail.com> wrote: >>>> Am 30.06.2011 23:50, schrieb KennyTM~: >>>>> On Jul 1, 11 05:39, bearophile wrote: >>>>>> Jonathan M Davis: >>>>>>> Actually, I find the backticks to be by far the most pleasant way to >>>>>>> get raw >>>>>>> strings in D. >>>>>> >>>>>> I don't have backticks on my keyboard, so I use them only when they >>>>>> are needed. They have even removed the backticks in the Python2 -> >>>>>> Python3 transition partially because of this (and partially because >>>>>> there is a more obvious way to do it in Python, and Python tries to >>>>>> keep only one obvious way to do things). >>>>>> >>>>>> Bye, >>>>>> bearophile >>>>> >>>>> Python's `xyz` is equivalent to repr(xyz). I think it is removed in >>>>> Python 3 more because `...` is not worth the specialness as repr(). But >>>>> D's `...` is much more worthy as a convenient literal syntax when >>>>> involving '"' or '\'. >>>>> >>>>> (I know some keyboard doesn't have '[' and ']'. So having no '`' >>>>> shouldn't be the reason it is removed from the language.) >>>>(Continue reading)
1 Jul 2011 02:33
Re: Why I'm hesitating to switch to D
Andrej Mitrovic <andrej.mitrovich <at> gmail.com>
2011-07-01 00:33:40 GMT
2011-07-01 00:33:40 GMT
For ultimate escaping use:
auto str = q"EOS
Weeee I'm a string ""``'q{\
EOS";
Of course then you have to make sure 'EOS' is a unique name too. You
could use some funky unicode character sequence for that, just to be
sure. :p
1 Jul 2011 02:31
Re: Why I'm hesitating to switch to D
Nick Sabalausky <a <at> a.a>
2011-07-01 00:31:24 GMT
2011-07-01 00:31:24 GMT
"Walter Bright" <newshound2 <at> digitalmars.com> wrote in message news:iuim2t$31ba$1 <at> digitalmars.com... > On 6/30/2011 12:22 PM, Adam Ruppe wrote: >> Being easy and simple is more important to me than being fancy. > > Exactly. Having every "would be nice if" feature can just sink a project > with it's dead weight. > > Back in the 80's, the company I worked for bought a profiling tool for C. > Nobody ever used it. I figured part of the problem was the manual was an > inch thick. That simply discouraged anyone from bothering to invest the > effort to learn it. > > That's why the profiler for dmd is: > > dmd foo.d -profile > > Sadly, still nobody uses the profiler. > > I use it. The output is initially hard to understand, though, until you 1. See an explanation of it, and 2. Actually notice that there's a timing chart way down at the bottom after all the fan-in/fan-out. Some demangling would be really nice in it though.
1 Jul 2011 02:34
Re: Why I'm hesitating to switch to D
Nick Sabalausky <a <at> a.a>
2011-07-01 00:34:01 GMT
2011-07-01 00:34:01 GMT
"KennyTM~" <kennytm <at> gmail.com> wrote in message news:iuirsg$b72$1 <at> digitalmars.com... > On Jul 1, 11 05:54, David Nadlinger wrote: >> On 6/30/11 11:52 PM, Walter Bright wrote: >>> On 6/30/2011 2:35 PM, bearophile wrote: >>>> I use it often, but it's buggy, you can't use it for "larger" programs. >>> >>> Bug reports? >>> >> >> This obviously depends on the keyboard layout one is using. >> >> David > > That would be a really interesting bug if the coverage analysis depends on > the keyboard layout... I agree with David, it's just totally, totally obvious how it's dependent on keyboard layout. Can't you see it? :)
1 Jul 2011 02:36
Re: Why I'm hesitating to switch to D
Andrej Mitrovic <andrej.mitrovich <at> gmail.com>
2011-07-01 00:36:44 GMT
2011-07-01 00:36:44 GMT
I've heard Colemak is more programmer-oriented than Dvorak. But these are all "what works for you is the best" layouts. Personally my problems are never writing code, but localizing and browsing it. E.g. what's in this or that structure, field names, where it's defined, etc. IDE features basically.
1 Jul 2011 02:51
Re: Why I'm hesitating to switch to D
Nick Sabalausky <a <at> a.a>
2011-07-01 00:51:14 GMT
2011-07-01 00:51:14 GMT
"simendsjo" <simendsjo <at> gmail.com> wrote in message news:iuivd2$2sat$3 <at> digitalmars.com... > On 01.07.2011 00:49, Simen Kjaeraas wrote: >> >> And standard Norwegian layout has them on AltGr+8/9. The pain. >> But using US int'l has the added advantage of confusing the hell out >> of my cow-orkers when they try to use my confuser (which has thus earned >> that title :p). >> > > Switch to programmer dvorak and they'll never touch your computer again. Years ago I started getting some minor wrist pain, so I switched to a trackball instead of a mouse (this one: http://www.amazon.com/Logitech-Trackman-Wheel-Optical-Silver/dp/B00005NIMJ I don't know why it's so expensive on Amazon, they're only about $35 in stores.) Took a couple days to get used to it, and a couple weeks for it to feel 100% natural and be 100% proficient, but it's been well worth it: I love it and haven't had any wrist pain since. (And spinning the wheel's just damn fun :) ) At an old job I had, I bought another of those trackballs to use at work. Anytime anyone tried to lean over and do anything on my computer they compained about "How can you use this thing?" :) The real interesting thing though, is that they *always* reached straight for the trackball *despite* the fact that I also had a mouse plugged in, sitting right out in plain view.
RSS Feed