switch to room list switch to menu My folders
Go to page: First ... 85 86 87 88 [89] 90 91 92 93 ... Last
[#] Thu Jan 12 2012 14:53:47 EST from Ford II @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

it also depends on the cost of the decision evaluated by the if; i.e.
strcmp's aren't that cheap if its a dozend of them in a row.

ahhh... see... but they are.
count the cycles of the worst case scenario, then divide that by the processor speed and see how many zeroes are to the right of the decimal point. You might be surprised.

[#] Mon Jan 09 2012 22:49:30 EST from IGnatius T Foobar @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Arbitrary format strings just invite abuse, of course. I think some of the compilers now throw a warning if you try to supply a variable as a format string.

[#] Wed Jan 18 2012 11:41:42 EST from IGnatius T Foobar @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Neat, but I think I'm going to get a Raspberry Pi instead. Of course I'll probably do something totally stupid like put it in a rack mount chassis.

I've always been looking for a cheap way to turn my television into a digital media terminal. Most new televisions have this kind of thing built in but I've got a 32" CRT that isn't getting replaced anytime soon. And besides, most of the new TV's only play your own content; I want to play YouTube.

[#] Wed Jan 11 2012 18:49:21 EST from dothebart @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

heh, just found in the RSS feed:

As mobile devices become a major development platform, scripting languages are beginning to fall out of favor.

though there still are c-carpet and java on phones. well. I wouldn't exactly call that "scripting languages are beginning to fall out of favour"

[#] Thu Jan 12 2012 14:59:48 EST from Ford II @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Dec 19 2011 11:56pm from ax25 @uncnsrd
Would love to do a day of pair programming with you fleeb!  (Hope
that does not sound to gay!)--- PPS - hope you are not gay,  I am
from a generation and don't think it is.


Sorry, that had me laughing a lot. :-)

[#] Thu Jan 12 2012 14:55:52 EST from Ford II @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Basically, you'd encapsulate the behavior for each different if-else

into a separate object, one for each "branch." Then you'd just pass
the appropriate object into your readloop() function. The problem I

this would end up about the same as the hash lookup, except it's broken into two parts. The lookup in the hash would be like the lookup in the virtual function table and making the right object, would be like building the hash.

[#] Thu Jan 12 2012 16:17:26 EST from fleeb @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Volkswagon's Ford Bug. Test drive one today.

[#] Thu Jan 12 2012 15:03:25 EST from Ford II @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

A last work about ifs versus switch, the downside of switch is that it has to be one unbroken code block.
A string of ifs can be broken out into separate functions grouped by category.
if (handlemathfunctions() == 0)
if (handlestringfunctions() == 0)
if (handlekitchensinkfunctions() == 0)
return "command not found.";

and each of those three functions can have strings of ifs in them.

[#] Sat Jan 14 2012 06:08:58 EST from dothebart @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

tiny little ARM computer, where you might be able to understand the hardware and do some coding..

[#] Thu Jan 12 2012 14:57:51 EST from Ford II @ Uncensored

Subject: Re: if statements == goto?

[Reply] [ReplyQuoted] [Headers] [Print]

Agreed.  A switch statement is less evil compiled.

A switch statement is brilliantly efficient, but I thought we were talking about a pile of string compare ifs.

[#] Fri Jan 13 2012 14:19:09 EST from fleeb @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

It was one of the better moments in this room.

[#] Thu Jan 12 2012 16:46:53 EST from LoanShark @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


[#] Wed Jan 18 2012 13:45:37 EST from skpacman @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

You can actually get a product from Sony called a "NetBox". It hooks up to any tv (old or new, RCA, hdmi, etc...) and your home network (wireless or CAT-5e) and it reads from any home DLNA server (tVersity for example), and from Netflix, YouTube, Slacker Radio, Pandora Radio, etc... tons of services on one machine connected to your tv.

It costs around $100. The bad part is, it's from Sony. Nothing but proprietary hardware and software, has the classic PSP type GUI and is buggy (rarely) on a wireless network. The biggest downside is it can't connect to a 5ghz wireless signal. I had to dumb-down my router to get it to work.

[#] Fri Jan 13 2012 13:52:08 EST from ax25 @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


Thu Jan 12 2012 02:59:48 PM EST from Ford II @ Uncensored
Dec 19 2011 11:56pm from ax25 @uncnsrd
Would love to do a day of pair programming with you fleeb!  (Hope
that does not sound to gay!)--- PPS - hope you are not gay,  I am
from a generation and don't think it is.


Sorry, that had me laughing a lot. :-)

I need to lay off the sauce when posting in future :-)

[#] Thu Jan 12 2012 15:39:57 EST from dothebart @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

hm, ford a little late to the party? or some bug?

[#] Thu Jan 12 2012 15:44:05 EST from LoanShark @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Ford is a bug.

[#] Thu Jan 19 2012 08:22:53 EST from dothebart @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

I'm thinking of something to re-fill my original cobalt qube with, since one won't get a more beautiful housing these days ;-)

...and the original mipsel with the 32mb ram is a little underpowered.

want to run squezeserver + some mpd & stuff on it.

[#] Wed Jan 25 2012 17:24:23 EST from IGnatius T Foobar @ Uncensored

Subject: A Brief, Incomplete, and Mostly Wrong History of Programming Languages

[Reply] [ReplyQuoted] [Headers] [Print]

1801 - Joseph Marie Jacquard uses punch cards to instruct a loom to weave "hello, world" into a tapestry. Redditers of the time are not impressed due to the lack of tail call recursion, concurrency, or proper capitalization.

1842 - Ada Lovelace writes the first program. She is hampered in her efforts by the minor inconvenience that she doesn't have any actual computers to run her code. Enterprise architects will later relearn her techniques in order to program in UML.

1936 - Alan Turing invents every programming language that will ever be but is shanghaied by British Intelligence to be 007 before he can patent them.

1936 - Alonzo Church also invents every language that will ever be but does it better. His lambda calculus is ignored because it is insufficiently C-like. This criticism occurs in spite of the fact that C has not yet been invented.

1940s - Various "computers" are "programmed" using direct wiring and switches. Engineers do this in order to avoid the tabs vs spaces debate.

1957 - John Backus and IBM create FORTRAN. There's nothing funny about IBM or FORTRAN. It is a syntax error to write FORTRAN while not wearing a blue tie.

1958 - John McCarthy and Paul Graham invent LISP. Due to high costs caused by a post-war depletion of the strategic parentheses reserve LISP never becomes popular[1]. In spite of its lack of popularity, LISP (now "Lisp" or sometimes "Arc") remains an influential language in "key algorithmic techniques such as recursion and condescension"[2].

1959 - After losing a bet with L. Ron Hubbard, Grace Hopper and several other sadists invent the Capitalization Of Boilerplate Oriented Language (COBOL) . Years later, in a misguided and sexist retaliation against Adm. Hopper's COBOL work, Ruby conferences frequently feature misogynistic material.

1964 - John Kemeny and Thomas Kurtz create BASIC, an unstructured programming language for non-computer scientists.

1965 - Kemeny and Kurtz go to 1964.

1970 - Guy Steele and Gerald Sussman create Scheme. Their work leads to a series of "Lambda the Ultimate" papers culminating in "Lambda the Ultimate Kitchen Utensil." This paper becomes the basis for a long running, but ultimately unsuccessful run of late night infomercials. Lambdas are relegated to relative obscurity until Java makes them popular by not having them.

1970 - Niklaus Wirth creates Pascal, a procedural language. Critics immediately denounce Pascal because it uses "x := x + y" syntax instead of the more familiar C-like "x = x + y". This criticism happens in spite of the fact that C has not yet been invented.

1972 - Dennis Ritchie invents a powerful gun that shoots both forward and backward simultaneously. Not satisfied with the number of deaths and permanent maimings from that invention he invents C and Unix.

1972 - Alain Colmerauer designs the logic language Prolog. His goal is to create a language with the intelligence of a two year old. He proves he has reached his goal by showing a Prolog session that says "No." to every query.

1973 - Robin Milner creates ML, a language based on the M&M type theory. ML begets SML which has a formally specified semantics. When asked for a formal semantics of the formal semantics Milner's head explodes. Other well known languages in the ML family include OCaml, F#, and Visual Basic.

1980 - Alan Kay creates Smalltalk and invents the term "object oriented." When asked what that means he replies, "Smalltalk programs are just objects." When asked what objects are made of he replies, "objects." When asked again he says "look, it's all objects all the way down. Until you reach turtles."

1983 - In honor of Ada Lovelace's ability to create programs that never ran, Jean Ichbiah and the US Department of Defense create the Ada programming language. In spite of the lack of evidence that any significant Ada program is ever completed historians believe Ada to be a successful public works project that keeps several thousand roving defense contractors out of gangs.

1983 - Bjarne Stroustrup bolts everything he's ever heard of onto C to create C++. The resulting language is so complex that programs must be sent to the future to be compiled by the Skynet artificial intelligence. Build times suffer. Skynet's motives for performing the service remain unclear but spokespeople from the future say "there is nothing to be concerned about, baby," in an Austrian accented monotones. There is some speculation that Skynet is nothing more than a pretentious buffer overrun.

1986 - Brad Cox and Tom Love create Objective-C, announcing "this language has all the memory safety of C combined with all the blazing speed of Smalltalk." Modern historians suspect the two were dyslexic.

1987 - Larry Wall falls asleep and hits Larry Wall's forehead on the keyboard. Upon waking Larry Wall decides that the string of characters on Larry Wall's monitor isn't random but an example program in a programming language that God wants His prophet, Larry Wall, to design. Perl is born.

1990 - A committee formed by Simon Peyton-Jones, Paul Hudak, Philip Wadler, Ashton Kutcher, and People for the Ethical Treatment of Animals creates Haskell, a pure, non-strict, functional language. Haskell gets some resistance due to the complexity of using monads to control side effects. Wadler tries to appease critics by explaining that "a monad is a monoid in the category of endofunctors, what's the problem?"

1991 - Dutch programmer Guido van Rossum travels to Argentina for a mysterious operation. He returns with a large cranial scar, invents Python, is declared Dictator for Life by legions of followers, and announces to the world that "There Is Only One Way to Do It." Poland becomes nervous.

1995 - At a neighborhood Italian restaurant Rasmus Lerdorf realizes that his plate of spaghetti is an excellent model for understanding the World Wide Web and that web applications should mimic their medium. On the back of his napkin he designs Programmable Hyperlinked Pasta (PHP). PHP documentation remains on that napkin to this day.

1995 - Yukihiro "Mad Matz" Matsumoto creates Ruby to avert some vaguely unspecified apocalypse that will leave Australia a desert run by mohawked warriors and Tina Turner. The language is later renamed Ruby on Rails by its real inventor, David Heinemeier Hansson. [The bit about Matsumoto inventing a language called Ruby never happened and better be removed in the next revision of this article - DHH].

1995 - Brendan Eich reads up on every mistake ever made in designing a programming language, invents a few more, and creates LiveScript. Later, in an effort to cash in on the popularity of Java the language is renamed JavaScript. Later still, in an effort to cash in on the popularity of skin diseases the language is renamed ECMAScript.

1996 - James Gosling invents Java. Java is a relatively verbose, garbage collected, class based, statically typed, single dispatch, object oriented language with single implementation inheritance and multiple interface inheritance. Sun loudly heralds Java's novelty.

2001 - Anders Hejlsberg invents C#. C# is a relatively verbose, garbage collected, class based, statically typed, single dispatch, object oriented language with single implementation inheritance and multiple interface inheritance. Microsoft loudly heralds C#'s novelty.

2003 - A drunken Martin Odersky sees a Reese's Peanut Butter Cup ad featuring somebody's peanut butter getting on somebody else's chocolate and has an idea. He creates Scala, a language that unifies constructs from both object oriented and functional languages. This pisses off both groups and each promptly declares jihad.

[#] Fri Jan 27 2012 17:24:45 EST from skpacman @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

I'm looking for a PHP/MySql based shopping cart software that can be easily integrated into another CMS (like PHP-Fusion or Pixie)

Anyone have any suggestions?


[#] Sun Jan 29 2012 15:21:02 EST from dothebart @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

os-comerce? is your friend...

Go to page: First ... 85 86 87 88 [89] 90 91 92 93 ... Last