Guilty as charged

General discussion for topics related to the FreeBASIC project or its community.
Trinity
Posts: 214
Joined: Sep 16, 2017 17:07

Re: Guilty as charged

Post by Trinity »

owen wrote:I'm not looking for sympathy. I'm facing reality.
Problem with that sentence (in this case let's say that the word "sentence" is ambiguous) is that everything is something defined by you and others by what you believe in. And "Science" is actually very often keeping you away from any other way of looking at things by the sheer belief in that science is always right. However , you are so much more than what meets the eye and so much more than what can be weighed and measured.
I can only point to that if you allow yourself to open your mind to it then it is possible that your life may take another path than what even you thought possible.
srvaldez
Posts: 3379
Joined: Sep 25, 2005 21:54

Re: Guilty as charged

Post by srvaldez »

hello owen
sometimes G~D uses drastic measures to get one's attention, hopefully this will lead you closer to him, but I would still like to read from you when the situation is resolved.
deltarho[1859]
Posts: 4308
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: Guilty as charged

Post by deltarho[1859] »

I only joined the forum at the begining of this year and am not a cad enthusiast so knew nothing of FBCadCam. I had to do a bit of digging but having found FBCadCam I now see what you mean by "more like the shed out back. i'll make sure the rent is paid up for as many years as possible."

At your forums I did not expect to learn about your faith or your concerns for the homeless. I should add that I am a life long atheist but am following Bernard Shaw's lead by preparing a speech just in case I ever meet Gabriel and it goes along the lines "OK, so I got it wrong - but are you going to let me in anyway?".

OK, putting living in hope to one side what is required is for the contents of the shed to be moved on or before your passing.
grindstone wrote:Yes, I see what you mean. I'm not an internet expert (not at all), but I'm sure there could be found a solution.
I am not an internet expert either but am equally sure that "there could be found a solution."

So, owen, describe what you reckon to be the best case scenario, without referring to sheds, and let us see what the forum comes up with. Someone may come up with a 'runner'.

I see that you have a beard, owen. I removed my beard recently but realised that I was far too pretty for a near 70 year old so grew it back. I was taken aback when absolutely no one agreed with me - been there before. <smile>
dafhi
Posts: 1641
Joined: Jun 04, 2005 9:51

Re: Guilty as charged

Post by dafhi »

stiff upper lip owen. you never know what can happen. I've found great advice from both Abraham Hicks and Markus Rothkranz
owen
Posts: 555
Joined: Apr 19, 2006 10:55
Location: Kissimmee, FL
Contact:

Re: Guilty as charged

Post by owen »

the keys are to fbcadcam dot com net and org
my host is bluehost but of course there are other servers less expensive that i could use.
paul doe
Moderator
Posts: 1733
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: Guilty as charged

Post by paul doe »

Hi owen,
owen wrote: I am getting old and tired and may not be able to do much more on my cad stuff.
I wanted to make sure I said thanks to the FB community and to leave words of encouragement.

I am guilty as charged because my code is incorrect.
OMG, I hope that this meltdown wasn't caused by me. In my response to you, I didn’t meant to be rude or disrespectful. If you interpreted it that way, then I’m terribly sorry. That wasn’t my intention, at all.
Your code is not ‘incorrect’. It works (I tested it, in FB 64-bit) and does what’s supposed to do. So no, you aren’t guilty nor wrong.
Well, if not incorrect then perhaps:
A perfect example of what not to do because there is a better way to do it. I am apologizing to the FB community in advance as my code may cause others to ask you questions which shouldn't be being asked.
But owen, there is always a better way to do things. If I was given a coin every time that I had to refactor my code, I would be a billonaire. As for the questions, the things that are common knowledge for some may be pure gold for others, so don't give it too much thinking.
A few thing about computer programming I would like to say:

Creativity is where it's at and programming affords an infinite canvas in which to express yourself.
Couldn’t agree more. Your coding style may be different than that of mine or other people, but it’s simply a reflection of the way you think; your thought process, if you will. Languages shape the way you think, and programming languages are no exception.
that was a great post. i'm only 51 and already complaining about being tired. it helps me to keep things in perspective sometimes. if i think i'm having a bad day, i'll always think of you to remind me that my day ain't going so bad after all. ps. out of pure consideration, i'm having a beer for u right now.
Speaking of putting things in perspective: parsing source code isn’t a walk in the park. Some languages may be easier than others (Forth and LISP, for example), but it’s pretty hairy stuff. And, on top of that, FreeBASIC isn’t exactly an easy language to parse (ask the developers). And you managed it, and implemented a simple interpreter. That is quite remarkable. Whenever you need perspective, think like I do: no matter how smart you think you are, somewhere in Asia, there's a 4 y/o kid that can eat you for breakfast XD
thanks for the words of encouragement. for me time is running out.
Which is a very sad thing to read, indeed.
also i wanted to say: don't forget about guys like relsoft. i can only imagine he still needs help.
I don’t stand alone when I say that he won’t be forgotten, ever. I used so much of its code, back in the days of QB, that it isn’t even funny. And he has inspired a lot of us to try and be helpful, so it's legacy endures. I wish I could be of more help to him and his family, but I can't (at least, not from this country )
I'm not looking for sympathy. I'm facing reality.
Yes I am in poor health, this has been the case for several years running. I'm just an old worn out truck driver (with a few years left in me). But there's more to it, the details of which I will spare you. Long story short, I may not be around (on-line or otherwise) in the near future (i figure in a year perhaps) so that's why i'm being blunt.

I care about my cad stuff and I care about the forum / community.
Without emotions, I'm saying these things to you in a practical sense.
If you’re not looking for sympathy, you will not get it from me then. But, how about respect?

Wishing you the best,
Paul
Kuron
Posts: 34
Joined: Jul 26, 2005 3:22
Location: Nashville

Re: Guilty as charged

Post by Kuron »

@Owen

My wife had to have four emergency surgeries in July. She is very lucky to be alive, almost died more than once and was septic. We have only been together for just less than two years. It made us realize just how precious life is and we never know when the breath we take may be our last. I am lucky that my wife was okay in the end and hopefully should stay that way for many years to come. Unfortunately, in August, her insurance she has had since the 80s decided they were not going to pay the $150,000 + medical bills, so we are financially devastated and have no way to pay the bills. Still, we have each other, my wife is fine (other than the financial stress weighing on her) and we are keeping our spirits up.

Life never works out as planned. Certainly doesn't for me, but I am an ornery SOB and refuse to give in to the bad and try and keep my spirits up, although it can be a struggle at times.

Your CAD program is extremely impressive. You are a gear jammer. Hard work and the longer you do it, the more every pothole or bump in the road is felt in your bones, from head to toe. Lots of solitude, endless miles for pondering. Easy to feel lonely in times like that.

I do not know what your are going through, but know you do have people here who genuinely care. If you ever need to talk, drop a PM and I can give you my email address.

I greatly admire your work with the homeless and if you ever feel like contacting me privately, I would love to hear the stories of those you have encountered. You are definitely a man who takes John 13:34-35 to heart.

Stay safe and God Bless you.
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Guilty as charged

Post by dodicat »

Owen
In your triangle game (programming is fun), your array (at the top) moves(30,2) should be moves(30,3).
Down at line 368 you are actually calling for moves(i,3).

If you run with -exx option, you will see the error.

I have some truck driver friends.
One of them still drives at age 71 (medical every year he tells me)
He likes his ale on his days off, but doesn't smoke.
Of course, here in the UK we don't have those long long highways.
But nevertheless those congested roads in an around London must be a pain.
relsoft
Posts: 1767
Joined: May 27, 2005 10:34
Location: Philippines
Contact:

Re: Guilty as charged

Post by relsoft »

Hey Owen,

I'm 42 and after not being able to code since March, I feel like 70.

Trust me on this, programming makes you young and livens up the kid in you.

My suggestion is to take a bit of a break and do some other stuff then code when you feel like it.

I won't even delve into this morbid stuff(you know I've had too much of that recently) but if there's one thing my wife's cancer taught me, it's to never lose hope. Families and friends(yes this community has lots of great people) will always have your back.

Just give me a holler on facebook anytime.

Take care buddy.
owen
Posts: 555
Joined: Apr 19, 2006 10:55
Location: Kissimmee, FL
Contact:

Re: Guilty as charged

Post by owen »

in a few days i will be going back out on the road for awhile, perhaps for a month or two.
driving a truck for a living is quite relaxing (for me) but i won't have much time to code.
maybe it'll be that break i must need.
dafhi
Posts: 1641
Joined: Jun 04, 2005 9:51

Re: Guilty as charged

Post by dafhi »

[comment deleted]
Last edited by dafhi on Oct 10, 2017 13:35, edited 2 times in total.
owen
Posts: 555
Joined: Apr 19, 2006 10:55
Location: Kissimmee, FL
Contact:

Re: Guilty as charged

Post by owen »

@ dodicat
LOL, i can't even find my triangle game and i want to correct the array's dimension issue.
there's two problems with that:
1. not being able to find it is a sign that i'm getting old.
2. wanting to fix it is sign of addiction.

@ Kuron
how on earth are you going to be able to pay that bill off?

@ paul doe
yes, i suppose this meltdown was caused by you but only in part.

but i'm not having a meltdown. i'm just tired and wanting to preserve my work.

here's what i mean by being tired:

let's say you wanted to write a routine to draw a polygon.
me, i tackle the idea head on without researching the math involved and i am guilty as charged. i take what i know and wing it.
so you see this isn't just about oop. it's about realizing my way of thinking is not correct. it's not incorrect either cuz it works.

a=b+c-b (fbcad is full of this kind of stuff)
is really the same thing as:
a=c


20 LOC in example 1 bellow
is really the same thing as:
2 LOC in example 2 below
pradius=side_length/(2*Sin(pi/pnos))
papothem=Sqr(pradius^2-(side_length/2)^2)

example 1

Code: Select all

Sub set_polygon_down(pnos As Integer)
	Dim As Integer i,j,k
	Dim As Double pptx(pnos),ppty(pnos),psa,psai,papothem,pradius,psl,psangle,psl_to_papothem_ratio,psmpx,psmpy,pcenterx,pcentery,psxlength,psylength
	psa=360/pnos
	xlength=(x1-x2)*-1
	ylength=(y1-y2)*-1
	fixangle
	If alt_key=1 Or alt_key=2 Then
		If shift_key=1 Or shift_key=2 Then
			For i= 1 To pnos
				psai=psa*(i-1)+angle
				pptx(i)=(x1+(x2-x1)/2)+cos(psai*pi/180)*length/2
				ppty(i)=(y1+(y2-y1)/2)+Sin(psai*pi/180)*length/2
			Next
		Else
			For i= 1 To pnos
				psai=psa*(i-1)+angle
				pptx(i)=x1+cos(psai*pi/180)*length
				ppty(i)=y1+Sin(psai*pi/180)*length
			Next
		EndIf
	Else
		For i= 1 To pnos
			psai=psa*(i-1)+angle
			pptx(i)=x1+cos(psai*pi/180)*length
			ppty(i)=y1+Sin(psai*pi/180)*length
		Next
		psl=sqr((pptx(1)-pptx(2))^2 + (ppty(1)-ppty(2))^2)
		papothem=Sqr(Abs(length^2-(psl/2)^2))
		psl_to_papothem_ratio=papothem/psl
		papothem=length*psl_to_papothem_ratio
		psmpx=x1+(x2-x1)/2
		psmpy=y1+(y2-y1)/2
		pcenterx=psmpx+cos((angle+90)*pi/180)*papothem
		pcentery=psmpy+Sin((angle+90)*pi/180)*papothem
		pradius=sqr((x1-pcenterx)^2 + (y1-pcentery)^2)
		psxlength=(pcenterx-x1)*-1
		psylength=(pcentery-y1)*-1
		psangle=atan2(psylength,psxlength)/pi*180
		If psangle<0 then psangle=360+psangle
		For i= 1 To pnos
			psai=psa*(i-1)+psangle
			pptx(i)=pcenterx+cos(psai*pi/180)*pradius
			ppty(i)=pcentery+Sin(psai*pi/180)*pradius
		Next
	EndIf
	For i = 1 To pnos-1
		memmanageline
		lines(linec,1)=pptx(i)
		lines(linec,2)=ppty(i)
		lines(linec,4)=pptx(i+1)
		lines(linec,5)=ppty(i+1)
		lines(linec,7)=lc
	Next
	memmanageline
	lines(linec,1)=pptx(pnos)
	lines(linec,2)=ppty(pnos)
	lines(linec,4)=pptx(1)
	lines(linec,5)=ppty(1)
	lines(linec,7)=lc
	'memmanagecircle
	'circles(circlec,1)=pcenterx
	'circles(circlec,2)=pcentery
	'circles(circlec,4)=pradius
	'circles(circlec,5)=lc
	'circles(circlec,9)=1
	drawing=false
	initlinedraw
	escapeme
End Sub
example 2

Code: Select all

Declare Sub create_polygon(pnos As Integer, side_length As Double)
Dim Shared As Double pi
Dim As Integer number_of_polygon_sides
Dim As Double polygon_side_length
pi = 4 * Atn(1)

number_of_polygon_sides=13
polygon_side_length=100

create_polygon(number_of_polygon_sides, polygon_side_length)


Sub create_polygon(pnos As Integer, side_length As Double)
	Dim As Double psa,pradius,papothem,pcenterx,pcentery,psai0,psai1,pptx1,ppty1,pptx2,ppty2
	Dim As Integer i
	psa=360/pnos
	pradius=side_length/(2*Sin(pi/pnos))
	papothem=Sqr(pradius^2-(side_length/2)^2)
	pcenterx=side_length/2
	pcentery=papothem
	For i=0 To pnos-1
		psai0=psa*i
		psai1=psa*(i+1)
		pptx1=pcenterx+cos(psai0*pi/180)*pradius
		ppty1=pcentery+Sin(psai0*pi/180)*pradius
		pptx2=pcenterx+cos(psai1*pi/180)*pradius
		ppty2=pcentery+Sin(psai1*pi/180)*pradius
		Line(pptx1,ppty1)-(pptx2,ppty2)
	Next
End Sub
owen
Posts: 555
Joined: Apr 19, 2006 10:55
Location: Kissimmee, FL
Contact:

Re: Guilty as charged

Post by owen »

my code is not correct continued... i'm guilty as charged.
tell me what's wrong with these 3 functions. see what im saying. my way of think'n aint right.
i can't walk and talk and chew bubble gum at the same time. i'm get'n old.

Code: Select all

Function mymod(n As Double,m As Integer) As Double
	Select Case n
		Case 0
			mymod = 0
		Case CDbl(m)
			mymod = CDbl(m)
		Case Else
			If InStr(Str(n),"e")<>0 Then
				mymod=0
			Else
				If InStr(Str(n),".")<>0 Then
					mymod=Val(Str(val(Mid(Str(n),1,InStr(Str(n),".")-1)) Mod m)+"."+Mid(Str(n),InStr(Str(n),".")+1))
				Else
					mymod = (n Mod m)
				EndIf
			End If
	End Select
End Function

Function abtp(abtpx1 as Double,abtpy1 as Double,abtpz1 as Double,abtpx2 as Double,abtpy2 as Double,abtpz2 as Double) as Double
	xlength=(abtpx1-abtpx2)*-1
	ylength=(abtpy1-abtpy2)*-1
	fixangle
	abtp=angle
End Function

Sub fixangle()
	angle=atan2(ylength,xlength)/pi*180
	angle+=360
	angle=mymod(angle,360)
End Sub

owen
Posts: 555
Joined: Apr 19, 2006 10:55
Location: Kissimmee, FL
Contact:

Re: Guilty as charged

Post by owen »

@ dodicat
i found my triangle game (programming is fun) and corrected the array
thanks

i think dodicat should take the keys.
grindstone
Posts: 862
Joined: May 05, 2015 5:35
Location: Germany

Re: Guilty as charged

Post by grindstone »

What are abtpz1 and abtpz2 for? They are not used by the function.
Post Reply