toboolean function

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Azhukar
Party member
Posts: 478
Joined: Fri Oct 26, 2012 11:54 am

Re: a small (and robust) toboolean function

Post by Azhukar »

grump wrote: Wed Oct 18, 2017 12:46 amYou need to enhance your calm.
Telling someone he is wrong is neither offensive nor a sign of anger. You're right about the intent though, I was wrong and it seems he wanted to assign an arbitrary string a boolean value.
brogrammer
Prole
Posts: 15
Joined: Tue Oct 17, 2017 11:26 pm

Re: a small toboolean function

Post by brogrammer »

yo Schwender.exe, you famous now
hamberge
Prole
Posts: 25
Joined: Wed Aug 16, 2017 2:55 pm

Re: a small toboolean function

Post by hamberge »

Hah... aww, c'mon guys, that's mean-spirited.

I want to know which Love forums poster is Hans_Meiser_Koeln.

Also, this bad code forum looks interesting.
User avatar
Schwender.exe
Prole
Posts: 25
Joined: Mon Oct 16, 2017 6:07 pm
Location: the moon
Contact:

Re: a small toboolean function

Post by Schwender.exe »

brogrammer wrote: Thu Oct 19, 2017 2:33 pm yo Schwender.exe, you famous now
oh joy :death:
User avatar
Schwender.exe
Prole
Posts: 25
Joined: Mon Oct 16, 2017 6:07 pm
Location: the moon
Contact:

Re: a small toboolean function

Post by Schwender.exe »

hamberge wrote: Thu Oct 19, 2017 5:55 pm Hah... aww, c'mon guys, that's mean-spirited.

I want to know which Love forums poster is Hans_Meiser_Koeln.

Also, this bad code forum looks interesting.
not sure why there even is a 'bad code' forum. there's a such think as broken or non-working code, but 'bad code' isn't. everyone thinks and therefor tackles problems differently then others, my original code was terrible because I posted it without testing it out (was going to edit it after testing it) and didn't expect so many people to actually see the post before then. oh well :P
hamberge
Prole
Posts: 25
Joined: Wed Aug 16, 2017 2:55 pm

Re: a small toboolean function

Post by hamberge »

Well... I think there is such a thing as bad code.

For example, it is possible to overcomplicate things, especially for programmers who are naturally systematizers.

One example is "Fizz-Buzz Enterprise Edition." https://github.com/EnterpriseQualityCod ... iseEdition

Fizz-Buzz is a basic level programming task designed to weed out the truly inept. It's supposed to be implementable in one function, with one or a few lines of code.

The Enterprise Edition pokes fun at an overly complicated programming style by building a whole system based on the Fizz-buzz problem.

There are countless stories of people writing huge libraries to accomplish tasks that could easily be done with a few functions that are part of the core underlying programming language.
brogrammer
Prole
Posts: 15
Joined: Tue Oct 17, 2017 11:26 pm

Re: a small toboolean function

Post by brogrammer »

Schwender.exe wrote: Thu Oct 19, 2017 7:14 pm not sure why there even is a 'bad code' forum. there's a such think as broken or non-working code, but 'bad code' isn't. everyone thinks and therefor tackles problems differently then others, my original code was terrible because I posted it without testing it out (was going to edit it after testing it) and didn't expect so many people to actually see the post before then. oh well :P
dude of course there is such a thing as bad code
broken and nonworking is bad right
you posted bad code then you tried to fix it and posted even worse code that didnt work at all lol
dont be mad we all make mistakes we just dont proudly post them publicly and call them robust lol
User avatar
Schwender.exe
Prole
Posts: 25
Joined: Mon Oct 16, 2017 6:07 pm
Location: the moon
Contact:

Re: a small toboolean function

Post by Schwender.exe »

brogrammer wrote: Fri Oct 20, 2017 12:35 am
Schwender.exe wrote: Thu Oct 19, 2017 7:14 pm not sure why there even is a 'bad code' forum. there's a such think as broken or non-working code, but 'bad code' isn't. everyone thinks and therefor tackles problems differently then others, my original code was terrible because I posted it without testing it out (was going to edit it after testing it) and didn't expect so many people to actually see the post before then. oh well :P
dude of course there is such a thing as bad code
broken and nonworking is bad right
you posted bad code then you tried to fix it and posted even worse code that didnt work at all lol
dont be mad we all make mistakes we just dont proudly post them publicly and call them robust lol
yea, sorry for the bad and broken code, atleast it works now and actually does what it's supposed to
brogrammer
Prole
Posts: 15
Joined: Tue Oct 17, 2017 11:26 pm

Re: a small toboolean function

Post by brogrammer »

Schwender.exe wrote: Fri Oct 20, 2017 1:29 am yea, sorry for the bad and broken code, atleast it works now and actually does what it's supposed to
no its slow and unnecessarily complicated and does redefine what true means
you know that anything ~= nil and false is supposed to be true right
its still bad code
why not just take the function grump has posted and just add the words you want to be recognized as true
hamberge
Prole
Posts: 25
Joined: Wed Aug 16, 2017 2:55 pm

Re: toboolean function

Post by hamberge »

"Extremely" robust.
Post Reply

Who is online

Users browsing this forum: No registered users and 34 guests