₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,330,559 members, 8,446,035 topics. Date: Thursday, 16 July 2026 at 12:06 AM

Toggle theme

DonSegmond's Posts

Nairaland ForumDonSegmond's ProfileDonSegmond's Posts

1 2 3 4 5 6 7 8 9 (of 9 pages)

ProgrammingRe: I Need Help Pls On My Php Script by DonSegmond(m): 6:20am On Jun 08, 2010
$query = mysql_query('SELECT * FROM firsttablewink
$query2 = mysql_query('SELECT * FROM othertable');


something like that.
BTW, you need to learn about MVC, how to separate code and data/html.
then you need to learn security, your web app will be so easy to hack.

good luck.
ProgrammingRe: Computer Science Project Topic Needed by DonSegmond(m): 6:11am On Jun 08, 2010
you are not serious. part of computer science is being creative, so if you can't come up with a project. i doubt you can come up with the code yourself.
ComputersRe: Ubuntu Linux by DonSegmond(m): 4:56am On May 31, 2010
i'm also running ubuntu. i'm in the states tho. i'm impressed how yall in naija manage and to download packages. i know the net connection there is slow, what about stability? do you stay connected or have to deal with disconnects?
ProgrammingRe: Any Lisp/scheme Programmers In Here? by DonSegmond(op): 6:25pm On May 29, 2010
@tomx
I've have been doing things like that even with rudimentary Javascript and PHP does it elegantly too. Programs like C++ takes it to a whole new level! To say C++ cannot do this simply saying you are not familiar with the platform. What do you think Your Visual Studio Compiler is built with? Visual C++. Most microsoft products are also built with Visual C++ and they all have macro tools and inbuilt programing interfaces. Many code generators are built with C++ and Java. This is no news.
I seriously believe you are missing this point. btw, javascript is lispy. smiley when you are using code generator, it's not your own program! you are still in the development phase. I'm talking about a finished product, doing it's thing, generating code that the same finished program can use.

for example, imagine you have a php/c++ program with 10 functions. can you have that program generate new functions that can be called by those same 10 functions? so the program can grow from say 10 functions from it's initial deployment state to 200 functions? and these functions can be called by other programs? and all this happens just by running the program? so, we can ask the user for a function name and defintion and it becomes part of the program.

in lisp i can easily do something like.

(defmaco make-new-func (func-name, &body body)
`(compile ,func-name '(,@body)))

we can now call it with
(make-new-func 'times3 '(lambda (x) (* x 3)))

and the running program will have a new function called times3 which will be compiled, run at native code and can be called by any lisp program. a simple example of this, is imagine developing a basic calculator program, but we want it to be extensible, so you can define your own math functions. with c/c++/java, you will have to embed another scripting language inside!

this is one of the hardest things to understand about lisp, the moment you can grasp this concept, it will blow your mind wide open. smiley

In any programing effort that goes beyond rudimentary level, debuging, portability and continuity are issues of big consideration. If your codes are not readable then you will find that it is of little use even to you the developer when you have to debug and / or update it much latter.
I'm not worried about readability because lisp programs are very readable to me. It's like any other language, you can write very clean, functional and structured code.
the system provides you with ability to document code
(defun foo ()
"documentation string, blah, blah"
(+ 1 2))

we can use the describe, documentation, apropos functions to find our way around unfamiliar systems. With the usage of packages, one can have clean structured codes. java stole all these ideas from lisp, people love javadocs, but lisp had it first, checkout lisp hyperspec. smiley

Not realy true! In the early years access to compilers for almost all kinds of program (FORTRAN, FORMIAN, C, BASIC, COBOL, PASCAL, etc) even the ones you have not heard about where "through workstations in the academia environment" to qoute you. The advent of Personal computing changed the trend and as expected most programmers concentrated their efforts on the platforms that where more robust (stable), more powerful, more elegantly deployable etc. This became the age of C++, VB, Java, PHP Pearl, etal.

True Some people still work on lisp but hell even FORTRAN and COBOL and such likes have newer versions too but their age is past.
Well, I'm talking about the early 90's. I got into the computer in early 90's. In the early 90's, I had access to basic, pascal, C and assembler on the PC. to get FORTRAN or LISP access, one needed access to workstations. now, we could argue that FORTRAN and COBOL are past their age, and you may be right, because we could easily replace them. FORTRAN could be replaced with C, and COBOL could be replaced with Java. But Lisp is not past it's age but has come of age, because there is nothing to replace it! NOTHING! Any new language that will be worthy of replacing lisp will be simply a newer version of lisp because it must provide everything lisp provides and some more.

I trust in the fact that most AI programmers are not silly. If LISP was a better platform then most of these very smart people would 've been using it. It's lack of popularity is because it is not the best tool for the job. It can do the job but it's not the best , not by a mile.
Most AI programmers are silly. smiley They don't know what the hell they are doing, that's why there has been very little progress in the field. smiley
ProgrammingRe: What's The Prospect For Self Taught Programmers In Naija by DonSegmond(m): 7:01am On May 29, 2010
the sky is the limit.
any programmer anywhere in the world can spend N5000 naira buy a domain name and get hosting, then write his own code by himself and deploy and make ridiculous amount of money beyond his wildest dreams. american or european based programmers have no edge over say one in naija, the same information is on the net.
ProgrammingRe: Any Lisp/scheme Programmers In Here? by DonSegmond(op): 3:48am On May 29, 2010
@tomx
see, i'm not worried about readability, i want programs that can write programs.
i find it amusing when people want to compare lisp's postfix notation with infix notation. you are missing the point.

the point is that (defun foo (x y) (+ x y)) is one a list.
so that code is also data. the interesting thing is that our program can then write programs using macro at runtime, which can get eval and compiled to native code. so our program can write programs and these programs are not interpretted but compiled.

this is something that no other language has. no other language truly has code as data so cleanly. a C++ or java code is "data" to thel compiler and data generated by human for the machine.

the issue of generating code i believe is very important in AI, as an AI system will need to generate new code as it learns to achieve it's goal.

BTW, I will tell you my own opinion of why lisp didn't take off, see lisp is very solid and complicated. before 1990, lisp already was very well established and could even do OOP. but what kind of computer did we have in 1990? most people had 8bit 8086 machines and 16bit 286machines with a few kb of memory It was hard as hell to implement lisp on those machines then, so people implemented basic and pascal and then then C. so in the early 90's, a lot of us who got into personal computing then, had access only to basic, pascal, C, and asm. the only way to get access to lisp was through workstations in the academia environment. with the growth of computing, a lot of early programmers cut their teeth on imperative style of C, so the transition to C++, then Java/C# was much easier. This I believe is the honest reason lisp didn't take over the world. The hardware available to the mass was not easily accessible. However, a lot of languages are now moving towards lisp and getting features that the language has had for over 20+ yrs. python, ruby, scalar, clojure? lispy

In my own humble opinion, lisp is the only language for AI. This will only become clear with complete mastery of the language. Ig talking about true AI, not just some clever brute force algorithm. Talking about games, how man renowned games are written in java and C#? I have done game programming on PC, nintendo gameboy and sony PSX. It was all assembly or C, because every shoots for speed. Plus most dev tools that come are in C. However, naughty dog entertainment the guys that did crash bandicoot on PSX, did it with lisp and their other games.

I won't suggest lisp for everything, however, for AI? one has to be crazy not to. smiley Btw, it's easy to implement a prolog on top of lisp, now try implementing lisp on top of prolog. :-)
PhonesRe: Is Anyone Here Using Their Phone Strictly As Their Computer by DonSegmond(op): 6:12pm On May 28, 2010
@smasher1, thanks!

@slight, how do you use a CD? you use a freaking CD player. ugh, computing is going mobile, why do you think the iphone and ipad is hot in US?
ProgrammingRe: Any Lisp/scheme Programmers In Here? by DonSegmond(op): 6:09pm On May 28, 2010
@tundebabzy,

the syntax is not funny. don't forget, code is data is code is data.
code is data, data is code.

alot of people love to argue that code can be data, in other languages, but this is not true, once you get the hang of this, you can do amazing things.

for example in C, we might have

int foo (int x, int y) {
return (x + y);
}

which get's called as foo(6, 7);

however note in scheme/lisp we have
(defun foo (x, y) (+ x y))
which get's called as (foo 6 7)
they are both lists, the defun/define also looks like a call to a function

that's where the power of that syntax/parathesis comes into play.

as for which part of AI. lol, no part, but every part.

I'm going after a complete general AI system with common sense reasoning and human level intelligence.
FamilyRe: I Love Her But Should I Break Up With Her? by DonSegmond(m): 6:04pm On May 28, 2010
@poster,
i'm not even going to bother reading the replies so pardon me if someone has said what I'm about to say.

But if you haven't ended it with that girl by now, then you are a big fool! Muthafuk3r where is your senses? You are going to have one freaking miserable marriage! I give a fuq if she gets on her knees and apologizes and begs, end it right now! WOW!
ProgrammingRe: Any Lisp/scheme Programmers In Here? by DonSegmond(op): 1:54am On May 28, 2010
tundebabzy.
scheme is a very smaller subset of lisp. It's a good start, if you really want to learn it really good, checkout this book. http://mitpress.mit.edu/sicp/ "Structure and Interpretations of Computer Programs. Argueable the best computer programming book ever written for learning to program if one can make such a bold statement. They use scheme, used for main years to teach at MIT.
ProgrammingRe: Any Lisp/scheme Programmers In Here? by DonSegmond(op): 1:52am On May 28, 2010
@tomX. Common Lisp for anything, I really got bored with computers 7 yrs ago and hated everything about them. Picking up lisp is what makes it exciting again. If not for lisp, I wouldn't even bother writing code. So for full programming, there's tons of libraries. People are developing full fledge applications with it, DB, network, web apps, etc. Anywayz, I'm just toying around with it for now, interested in using it for AI work tho.

@sean, I did checkout clojure, and it's cute. But I hate java so much that I distrust anything that even runs on JVM. smiley Clojure page says clojure is lisp-1, not even 1.5 common lisp is more like lisp-2. If I absolutely must make use of jvm, then perhaps I will look into common lisp, but I write code for myself, and I don't believe in client side apps anymore, so I can stick em to the server, and tons of common lisp compilers generate native code that can be as fast as C code CMUCL and SBCL for instance. (my main picking point with clojure for now. symbols not storage location, no tail call optimization, All (global) Vars can be dynamically rebound without interfering with lexical local bindings.)
AutosRe: With A Salary Of 7o K, How Can I Buy A Car? by DonSegmond(m): 6:26pm On May 23, 2010
Saving for a very long time

OR

Increasing the amount you earn.

Which one do you think will be easier?
Tech JobsRe: Urgent, I Need A Software Engineer by DonSegmond(m): 6:23pm On May 23, 2010
well, kick rocks. you have no new idea, security through obscurity means jack sh1t. it's all about executions, when will you naija people learn. carry on!
RomanceRe: Is It Me Or Her? by DonSegmond(m): 6:21pm On May 23, 2010
blah blah blah.

focus on your studies young man. you don't have time for girls or their wahala right now. especially one that is so fucking far away.
RomanceRe: How Can I Date A Beautiful Girl? by DonSegmond(m): 6:17pm On May 23, 2010
confidence.
nothing else!
but a dice of humor and fun personality helps too.
money is extra but not required

looks and intelligence means shit.
PhonesIs Anyone Here Using Their Phone Strictly As Their Computer by DonSegmond(op): 6:16pm On May 23, 2010
meaning, that's what you use to browse the web, do email and damn near everything. either you have no computer or you don't even bother to use the computer that you have.
ComputersRe: I Want To Learn System And Software Programming by DonSegmond(m): 6:14pm On May 23, 2010
yeah, you can learn alot from online, but you must also learn offline.
you can find a lot of books, free tutorials, and information online.
but the offline part involves reading code, and writing code, and taking time to think through and comprehend what you read. the growth in programming happens when you stop the reading.
ComputersWhy Are Most People Upgrading Their Computer To The Latest Specs? by DonSegmond(op): 6:13pm On May 23, 2010
I'm in USA, and my desktop has 1.5ghz, 768ram and 20gb drive. My laptop is 2ghz 512mb and 30gb drive.
I reckon that I get more accomplished with my systems than most people. Outside of gaming, if you are not a hardcore gamer, why waste money trying to have the latest system? :-) Most people just browse the web, email, view pictures/movies, play music, word process and a few other things. Just curious. I was going to send my cousin back home my old laptop 500mhz and he told me to nevermind. Ah well, I will bring it for myself when I get back home.
ComputersRe: Yahoo Massager Problem by DonSegmond(m): 6:09pm On May 23, 2010
it's quite upset at you angry, it want's some massage.
ComputersRe: What Hapind To My Laptop by DonSegmond(m): 6:09pm On May 23, 2010
every information looks fine to me.

what do you see standing out?
carefully read them all over again. you got 4gb ram and 2gb video memory. it's consistent.
Tech JobsRe: Urgent, I Need A Software Engineer by DonSegmond(m): 6:02pm On May 23, 2010
you will get more response if you just flat out put what you wanted.
you don't need to be all specific.
Tech JobsRe: I Need A Script For Classified Ad Site Like Craiglist Site by DonSegmond(m): 6:01pm On May 23, 2010
how much are you going to pay for it?
Tech JobsRe: Eia Technologies Needs A An Expert In Networking Urgently by DonSegmond(m): 6:01pm On May 23, 2010
how much are you paying?
ProgrammingRe: Nigerian Ethical Hackers In Here ---> by DonSegmond(m): 6:00pm On May 23, 2010
I'm a retired hacker. It was fun 15yrs ago, but it's old and boring now.

my new interest is brain hacking, cognitive science meets computerz, aka artificial intelligence.
Tech JobsRe: Urgent, I Need A Software Engineer by DonSegmond(m): 6:00pm On May 22, 2010
There is no software engineer who can create any type of software that you just want given the constraints of time and them having to pick up the required knowledge if they don't have it.
ProgrammingAny Lisp/scheme Programmers In Here? by DonSegmond(op): 5:59pm On May 22, 2010
Anyone here program in Lisp / Scheme?

Any interests in Artificial Intelligence?
PropertiesRe: Five B/r Duplex Wit Swimming Pool + Pictures @ Aso Drive Fct Abuja by DonSegmond(m): 4:42pm On May 22, 2010
anyone who has N550million can do better to their own taste too!
AutosRe: Accidented Car Section by DonSegmond(m): 3:22am On Feb 10, 2009
yall need to be really carefully with these accident cars, there are reasons why they are salvaged and junked in US, it's not because they can't be fixed, but because they are not safe. A car with a frame damage is a dangerous thing. Another accident and the car could split in half and what you could have walked away would be the end of you. Just cuz it looks good doesn't mean nothing. An accident car even if fixed is worth at most half of the value.
ProgrammingRe: Game Development,the Next Level: by DonSegmond(m): 4:13pm On Jan 31, 2009
Okay, so you want to right a game eh?

READ ON. First of all, MASTER whatever language you are going to be using. Personally, when it really comes to game development, I prefer C+assembly, however, you can use C++, VB or whatever you feel comfortable with.

Learn your algorithms. Pick up a book and learn about algorithms and data structures. Master them.

Now, learn about the graphics routine of the platform you are going to work with. Now, I know plenty of you will like to hack for other consoles, but start with the PC. I have hacked for gameboy and the orignal PSX. But I started on PC, and everyone who has ever worked on other consoles always start with PC. Instead of starting from scratch, find a good game library that has most of the common routines done.

Write your game using an existing game library. Make it simple, 2 levels at most. WHY? The biggest thing you will face is discipline in FINISHING a project, so start small, so you can finish. Don't have your project too complex, start simple, and always learn to finish.

Learn how to use a game library, all inclusive (graphics, sound, joystick/mouse, network).
Design a whole bunch of 2d games first, before you embark on 3d games.

After that, you may decide to start buidling your own library from scratch.

Know your maths, algebra is needed for 2d games as you are working on the 2d plane and need to understand your x/y corordinate. To do 3D you need to learn linear algebra. For action games, you need to understand some physics, how are you going to code the projectile of a missile or bullet?

Game programming is the most demanding area of programming since you will work with graphics, all sorts of custom data structure and algorithms, sounds, joystick, mouse, network(if doing a network game), data base, etc. The biggest fall you could take is trying to build everything from scratch, learn to use existing libraries. You may feel some of them are being the bottleneck in terms of performance, but if you decide to write from scratch, you could find yourself spending months replicationg what already exists only to not do any better.

what you need
starting out
- mastery of whatever langauge you are going to work with.
- game libraries (all inclusive library, graphics library, sound library, networking lib, database)
- patience/persistance to finish your games
getting better
- learn C if you haven't, most excellent libs will be in C
- learn assembly language for whatever platform you are working on (learn how C code gets converted to assembly, this will allow you to write very optimized C code)
- start building your own library
CultureRe: Why Is It That Most Guyz Dont Appreciate Virginity ? by DonSegmond(m): 6:30pm On Jan 28, 2009
ow11:
The state of your or partner's 'pussy' will not determine how successful your marriage will be!
true that! plz tell them!

1 2 3 4 5 6 7 8 9 (of 9 pages)