Allegro.cc - Online Community
Post Reply

Allegro.cc Forums » Allegro.cc Comments » Thread locks too soon

rss feed Print
Thread locks too soon
Edgar Reynaldo
Member #8,592
May 2007
avatar

Yes, too slow. Development time in C is at least twice as long as the equivalent C++ program, or even more.

TurboJudas
Member #7,039
March 2006
avatar

@Edgar Reynaldo Thanks for all the info and help! This will get me started.

Quite enjoying the language vs language vs language discussion here ^^ Things many times get measured by what you can make money of, but from a personal point of view I think people really enjoy other things in life than the work-like money-making stuff.

I like C because you can many times even use it when coding for the old 80s classic home/micro-computers and consoles. Those are often more exciting than modern hardware too. :)

Chris Katko
Member #1,881
January 2002
avatar

Development time in C is at least twice as long as the equivalent C++ program, or even more.

I feel like I'm a broken record, but that's one of my favorite things about D. It's designed around making you productive but with the C/C++ oldschool mentality of "you only pay for what you use." (*It's not a perfect language.) I genuinely enjoy writing code for my games in D, whereas C++ is boilerplate hell. The most basic templates in C++ are confusing enough to make tons of C++ programmers never use them at all.

I like C# for "getting work done" as well, but it's not necessarily tuned for games. Though, Unity uses it for scripts, IIRC.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Chris Katko
Member #1,881
January 2002
avatar

[.]

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

bamccaig
Member #7,536
July 2006
avatar

I think that C++ and D should support both templates and "generics" (i.e., dynamic/vtable lookups). You should get to decide whether or not you want the code to execute fast, at the expense of ballooning the executable size, or if you would rather share a single instance of the code that operates on vtables or similar more like generics in modern languages. In general, I don't think people really want hundreds of instances of the code to be expanded in the executable. They want to write the code one, and reuse it, and it's not necessary for it to be so bleeding fast that it can't spare a few extra indirections. Sure, when it's worth paying for that then it should be an attribute or something to unlock it, but I think the default behavior should just be shared code.

Derezo
Member #1,666
April 2001
avatar

bamccaig said:

So that was my first experience getting high on marijuana. It was fucking horrible.

I'm late to reply but it sounds like you did it by yourself. Bad idea.

Cannabis is not for everyone, but it's always better to be around people that you trust doing something enjoyable instead of sinking into your own head like that while using hallucinogenic-type recreational/medicinal drugs of any sort, including cannabis, and especially anything stronger.

Playing music with friends, for example, can make the experience more enjoyable. The effect of cannabis can change the activity in different regions of your brain it commonly makes people more paranoid or less able to maintain working memory in sophisticated ways, among other things.

Having said that, I'm not a fan of the government strains. I've done pot with too much THC before and it's not enjoyable for me either. Once someone trolled me with a "bad joke" after I had tried a very strong strain, and had implied he was going to kill me. My thinking about this particular person became very paranoid and abstract, and the experience is difficult to describe succinctly but: I was terrified and the night became very bad. It was an over reaction caused by paranoia and overall bad experience for sure.

"He who controls the stuffing controls the Universe"

bamccaig
Member #7,536
July 2006
avatar

Derezo said:

Having said that, I'm not a fan of the government strains. I've done pot with too much THC before and it's not enjoyable for me either. Once someone trolled me with a "bad joke" after I had tried a very strong strain, and had implied he was going to kill me. My thinking about this particular person became very paranoid and abstract, and the experience is difficult to describe succinctly but: I was terrified and the night became very bad. It was an over reaction caused by paranoia and overall bad experience for sure.

It seems cannabis use is sort of vulnerable to how you feel. If you're anxious or worried about something it can send you on a bad trip. It seems wise to always "set the mood" so you can sort of control the kind of trip you're on. I haven't quite hit it as hard as the first time since the first time, but I think I've come close, and I haven't had any more bad trips so far. Instead I've been trying to practice just keeping a comfortable high. I think my first time I was just afraid of what it would do to me. I was sort of in a safe place. My wife used to smoke a bit before she met me, and I was home with her. I figured I'd have her support. Instead, she pretty much left me to my own devices, and had no pity at all when I was tripping balls. She said I was pretty funny at times (while tripping balls). In hindsight, I kind of enjoy the memory of the terror. Which is weird. But since I haven't lost control like that since I might also be forgetting just how terrifying it was.

When you used cannabis from other markets did you know what it was called or what its concentrations were? I'm curious because you say you don't really like the government strains so I wonder if you have recommendations from the government website for products that you would steer towards. So far I've tried 2, and I have a third to try, but it's a powerful Sativa so I'm not quite sure when the appropriate time to try it is.. I'm still a pretty big drinker and my instinct is still to drink instead of smoke. I try to avoid combining the two. I did finally "cross-fade" last week. After a weeknight of drinking I stepped outside into the cold after 3 AM to smoke before going to sleep. Fortunately, I didn't "green out" or have a bad experience. It felt pretty organic: drunk and high. Unfortunately, I got a bad chest infection for my trouble. I'm not sure if it was because I was smoking the other half of a pre-burned joint, or if it was the cold air, or if my system was just weak from the alcohol, or what. In any case, the infection sucked, but I think I'm nearly over it now. I'm just afraid to smoke in the cold again though.

I rather enjoy being high, but even though in the moment I find it usually is "enough" and I don't feel the urge to be drunk, I often make the decision before I start smoking to drink instead. That makes it kind of hard to find a time to smoke instead..

Chris Katko
Member #1,881
January 2002
avatar

Derezo said:

Once someone trolled me with a "bad joke" after I had tried a very strong strain, and had implied he was going to kill me.

I'd press charges.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Eric Johnson
Member #14,841
January 2013
avatar

Pleasurable day of gluttony to you all. :)

Aaron Bolyard
Member #7,537
July 2006
avatar

I had Thanksgiving at a friend's since my brother works today.

Black Friday started today at 6:00 pm at his workplace (Wally World), so the parking lot was packed when I brought him dinner. Capitalism. :-/

Derezo
Member #1,666
April 2001
avatar

Happy Turkey Day my American friends!

bamccaig said:

I got a bad chest infection for my trouble

Smoking anything increases your risk of lung infections. I wouldn't be surprised if there's data that shows burning incense does. Your lungs become more vulnerable with any particulate. Eventually it just becomes a way of life for most smokers ;D

Quote:

When you used cannabis from other markets did you know what it was called or what its concentrations were?

I definitely didn't know what the concentrations were to any exact science They have all kinds of names... but I don't know how the names actually get from seed or sapling to the mouth of the seller and sometimes he would just make them up on the spot, heh. The big difference is that I like stuff grown in the sun from the ground.

Quote:

I wonder if you have recommendations from the government website for products that you would steer towards.

I personally prefer lower potency outdoor grown over the high potency hydroponic stuff. When I went over the OCS options when they first launched I noticed almost all of them were high THC with no CBD, but it looks like I either missed some or they've added new ones. This "Kiwi Cannabis Mango Haze" is something I would rather do myself. It still has some THC which creates those thought bending effects, but the higher CBD will make the experience more relaxing. This is something you could take after work that would be more akin to a couple beers rather as opposed to half a square of acid.

"He who controls the stuffing controls the Universe"

Edgar Reynaldo
Member #8,592
May 2007
avatar

Let me get this straight - the relaxing euphoria comes from the CBD? Or the THC?

I don't really get high (feel the effects) much anymore. More like recharging a battery at this point. If I don't smoke for a few days, I will notice it when I do.

I love it when it's giggle weed, but that's rare these days.

Aaron Bolyard
Member #7,537
July 2006
avatar

I thought this was pretty cool:

{"name":"1lalNBD.gif","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/1\/b1d2cff0f58bcd4d9b68e5c51e790ac2.gif","w":378,"h":421,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/1\/b1d2cff0f58bcd4d9b68e5c51e790ac2"}1lalNBD.gif

He's a follower of Yendor. You can make 15 bone shards from... bones. Eldritch myrrh is unreasonably expensive because the incense you make from it provides a flat additive 50% accuracy bonus for you (...and opponents). The idea is you come back to the island and buy it when you have a better source of bone shards.

It works nicely, I think.

Still on track to have a demo done by January assuming no major problems. Assuming optimizations don't take up a lot of time. (There's performance problems in high-pop areas and when clicking on the game world).

edit: why does it squish my gif :(

bamccaig
Member #7,536
July 2006
avatar

I think that A.cc always shrinks images down so they don't expand off of the page. Though I thought it used to allow you to click to expand them...

MiquelFire
Member #3,110
January 2003
avatar

I think the squish issue here is something like taking a 16:9 image and displaying it as a 1:1 image. The image is not displayed as wide as it should be.

The gif is 640x480, but the forums are displaying it as 378x421 for whatever insane reason.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red | +Me
Windows 8 is a toned, stylish, polished professional athlete. But it’s wearing clown makeup, and that creates a serious image problem. ~PCWorld Article

Eric Johnson
Member #14,841
January 2013
avatar

If you right-click the image and view it in its own tab/window, it can be viewed without being squished.

bamccaig
Member #7,536
July 2006
avatar

Derezo said:

Smoking anything increases your risk of lung infections. I wouldn't be surprised if there's data that shows burning incense does. Your lungs become more vulnerable with any particulate. Eventually it just becomes a way of life for most smokers ;D

Does that mean that most smokers are constantly struggling with respiratory issues? :-/ I can't imagine suffering all of the time, and the effects of marijuana being worth it. I kind of like it when I get the right amount of high, but it wouldn't be worth it if every time I did it I got sick.

Derezo said:

I definitely didn't know what the concentrations were to any exact science They have all kinds of names... but I don't know how the names actually get from seed or sapling to the mouth of the seller and sometimes he would just make them up on the spot, heh. The big difference is that I like stuff grown in the sun from the ground.

I find this kind of curious. Being that I have experienced pleasant highs and unpleasant highs I cannot at this time conclude that marijuana is awesome. Whereas I can drink alcohol every day, always in control of how drunk I am, it seems with marijuana it's more difficult to do that. Unless maybe the black market weed is normally the balanced type with high levels of CBD. For a non-smoker to look at OCS it looks like the high THC zero CBD strains are the "normal" ones. Does that seem like some kind of conspiracy or something? As if to steer people towards bad experiences so they won't take to it? I don't know.

Last night I tried a strain for the first time. It was my first Sativa strain. And it was high in THC content sort of like the first strain that I tried. I figured Friday night, bring it on. I tried to go easy. I just did it with a tiny glass one-hitter. Just one load. Maybe got about 4 or 5 good hits from it. And it got me fucked up. Uncomfortably so. In a hurry. I was operating on little sleep (maybe 5 hours or so the night before) so that probably didn't help, but I passed out in my computer chair around like 8 PM. It was worse than alcohol. :) Apparently my wife got a picture of it and posted it on social media. I had no idea. This wasn't as bad as my first time getting too high because I was more calm, listened to music to help control the mood, etc. It just wasn't what I expected. So far I'd say being drunk is way better than being high. So either I'm doing something wrong or it's just not for me.

Maybe I need to steer more towards the balanced strains though. I kind of look at the options in the store like I would look at alcohol: more bang for your buck means higher potency! Though I normally drink beer instead of whiskey precisely because if I drink whiskey I'll overdue it (but also whiskey is more expensive). The balanced herb that I've tried was kind of nice. I only got the slightest high from it though so I think I need to try to hit that one hard and see if I reach a pleasant high/calm/relaxation like everybody talks about. I couldn't even really feel it when I smoked that one.

Derezo said:

I personally prefer lower potency outdoor grown over the high potency hydroponic stuff. When I went over the OCS options when they first launched I noticed almost all of them were high THC with no CBD, but it looks like I either missed some or they've added new ones. This "Kiwi Cannabis Mango Haze" is something I would rather do myself. It still has some THC which creates those thought bending effects, but the higher CBD will make the experience more relaxing. This is something you could take after work that would be more akin to a couple beers rather as opposed to half a square of acid.

I find it really interesting that the high THC options don't seem to appeal to existing cannabis users. I guess I just assumed those were the ones that people built up to. Interestingly, they're so cheap by comparison. But it's definitely difficult to manage the effects...

I should note that I've never really been a "couple beers after work" kind of guy. I started out around 5 or 6, and worked my way up to 8 or 9. But being drunk is nothing like being high. High is much worse. I can function very effectively when I'm drunk. I need to be very shitfaced before I start to be unable to function. Whereas with marijuana I can become non-functional in a few tokes...

Aaron Bolyard
Member #7,537
July 2006
avatar

I had GIFs working one time, I think it's the size.

Maybe this works?

jqlPnX2.gif

Or maybe it has to be hosted on Allegro.cc?

611771

*edit:* seems there's a size limit, too

1:1?

611772

idk I give up

Edgar Reynaldo
Member #8,592
May 2007
avatar

If we're posting progress on our projects, here's mine :

{"name":"611773","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/7\/772dab37c96f36f80a4362f3fcf47c52.png","w":1028,"h":800,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/7\/772dab37c96f36f80a4362f3fcf47c52"}611773

I now have a fully functional ball intercept routine that handles finding intercept times of moving, accelerating circles. All thanks to the quartic solver written by Iowa Hills which you can find here :

http://iowahills.com/P51RootFinder.html

This means you can model gravity with no cost whatsoever! You only have to recalculate intercept times when you have a collision or the acceleration or momentum changes. This leads to very efficient collision detection.

I'm writing a series of articles on the wiki which you can find here :

https://github.com/liballeg/allegro_wiki/wiki/Collision-Detection

They are still preliminary, but I'm filling them in as I go. I plan to cover overlap checks and intercept calculations for lines, circles, triangles, and convex polygons. I want this to be a comprehensive guide to poor man's collision detection.

Chris Katko
Member #1,881
January 2002
avatar

I freakin' love graphs. I'm such a nerd. ;D

My brain is like "ooOOOhhh what does THAT represent?!"

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Edgar Reynaldo
Member #8,592
May 2007
avatar

Green arrow is velocity vector. Purple arrows are acceleration vectors. Cyan path is the trajectory of the ball. Yellow circles are collisions, except for the one on the left.

It's really simple.

Px0 = c2->x - c1->x;
Py0 = c2->y - c1->y;
Vx0 = c2->vx - c1->vx;
Vy0 = c2->vy - c1->vy;
Ax0 = c2->ax - c1->ax;
Ay0 = c2->ay - c1->ay;

Px(t) = Px0 + Vx0*t + (Ax0/2)*t^2
Py(t) = Py0 + Vy0*t + (Ay0/2)*t^2

P(t) = P0 + V0*t + (A0/2)*t^2

|P(t)| = Px(t)^2 + Py(t)^2 = (r1 + r2)^2

I'll spare you the quartic here, but suffice it to say when you multiply out Px and Py times themselves, you get terms that add together and are really intuitive.

Oh, bother, I'll share anyway :

The full quartic equation for two intercepting circles is as follows :

t^4(Ax^2 + Ay^2) + 
t^3(VxAx + VyAy) + 
t^2(Vx^2 + Vy^2 + PxAx + PyAy) + 
t^1(2(PxVx + PyVy)) + 
t^0(Px^2 + Py^2 - (r1 + r2)^2
---------------------------------
= 0

Which as you can see, are the squared magnitudes and the dot products of the various components. Pretty cool, huh?

Just plug those values into a quartic solver, and off you go. The first non-negative real root is the time of collision.

bamccaig
Member #7,536
July 2006
avatar

bamccaig said:

Maybe I need to steer more towards the balanced strains though. I kind of look at the options in the store like I would look at alcohol: more bang for your buck means higher potency! Though I normally drink beer instead of whiskey precisely because if I drink whiskey I'll overdue it (but also whiskey is more expensive). The balanced herb that I've tried was kind of nice. I only got the slightest high from it though so I think I need to try to hit that one hard and see if I reach a pleasant high/calm/relaxation like everybody talks about. I couldn't even really feel it when I smoked that one.

So last night I smoked two loads of my balanced strain. And I still got fucked right up. The proof was on IRC, and you missed it. But that just goes to show that there's no need for any 15% or 20% THC. A 5% THC with 10% CBD still will get you fucked up, but in a more pleasant way.

I pretty much don't even want this left over Sativa that I have. I think it's too strong. If I do smoke it I'll have to do it in tiny pieces. So it'll probably go stale before I can smoke it all. :P

The craziest thing is that I'm starting to feel high again, and I think it has nearly been 12 hours since I smoked... It almost feels like this isn't drug induced and instead my brain is just repeating the transformations sober... Which I'm not sure makes sense. Damn this stuff is wild. You be the judge if that's good or bad because I don't know.

To be fair, last night I was drinking, and then smoked, so the alcohol would have intensified the absorption of THC. That might have made it a bit more potent then it would have been sober. But I digress... Next time I shop I think I'll only buy the strains with high CBD content.

Edgar Reynaldo
Member #8,592
May 2007
avatar

bamccaig said:

So last night I smoked two loads of my balanced strain. And I still got ed right up. The proof was on IRC, and you missed it.

I want IRC logs. >:(

bamccaig
Member #7,536
July 2006
avatar

Never. >:(

Maybe we should organize an online group smoking session. I wonder if that would be incriminating for anybody smoking illegally...

MiquelFire
Member #3,110
January 2003
avatar

Built a new system, and here are some 3D Mark results to compare where I'm coming from, and where I'm going to.

{"name":"611780","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/b\/8b9bf81ed028c0b37eb21b45de4efa9f.png","w":1400,"h":880,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/b\/8b9bf81ed028c0b37eb21b45de4efa9f"}611780
{"name":"611781","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/d\/ddab01407c48faeffc90c862069722e4.png","w":1386,"h":873,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/d\/ddab01407c48faeffc90c862069722e4"}611781

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red | +Me
Windows 8 is a toned, stylish, polished professional athlete. But it’s wearing clown makeup, and that creates a serious image problem. ~PCWorld Article

Post Reply


Go to: