Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Blue Pelican Java Project 11... please help

Name: Anonymous 2007-09-26 1:47 ID:AkvBcXjS

Write a program that will allow a user to input his name. The prompt and input data would look something like this:
Please enter your name. Peter Ustinov

Using a for-loop and the String method, substring(...), produce a printout of the reversal of the name.

For example, the name Peter Ustinov would be:
vonitsu retep

Notice that the printout is in all lower-case. Use the String method, toLowerCase() to accomplish this.

and btw this book can be downloaded here: http://www.bluepelicanjava.com/downloadBook_bpj.htm

Name: Anonymous 2007-09-27 13:22 ID:uhhj8YqU

>>40
lispfag

Name: Anonymous 2007-09-27 13:28 ID:i6p2HyC7

>>41
You're the C reddit fag aren't you? get the fuck out

>>40
brat
I'm probably older than you!
C++'s std::string is good
no it is not, i never said that did i?
long parade of ignorance
englighten me.
They're perfect yet str* let buffer overflows happen. Right on, fucker..
It's the code you wrote that allows it.
Get a few more years of C under your belt and we'll talk again, okay?
...

Name: Anonymous 2007-09-27 13:45 ID:nT+xKl1i

no it is not, i never said that did i?

So why compare a C character array to to std::string, and then say that's the way it is?

It's the code you wrote that allows it.

Right, because you are perfect. You never make mistakes. You should not use tools that make those mistakes less likely. In fact, you are an awesome hard-core assembly nerd; only weaklings let a language construct a stack frame.

The moment anybody makes an argument related to programmer discipline, their argument falls flat. Why? Because if a novice can make that mistake, so can an expert. It's a question of probability, and it will happen.

I prefer to use tools that make certain bugs impossible. The only reason for null-termination is because they were faster on PDP-11s; pascal-style are superior in every way except for some rare niche cases.

englighten me.
Okay:
The answer is yes but the function that changes the `size' of the string when it resizes is O(n).
Explain to me how a Pascal-style str.len is O(n)?

Concatenation has nothing to do with using len. They're orthogonal. How you conflate the two is beyond me.

If you want fast concatenation with Pascal strings, use exponential allocation. As a C programmer I'm sure you're aware of the whole "trade memory for speed" thing. And on a separate note there are also ropes?

And lastly, for your other example, take a gander at string slices. Of course, to get that you need a GC, which will never happen in C. Most C programmers are too busy being studly to use one of those.

Name: Anonymous 2007-09-27 13:49 ID:uhhj8YqU

>>42
C reddit fag
LOL who. Your imaginary adversary?

Name: Anonymous 2007-09-27 14:12 ID:NU5AkYZ4

Lol @ Cfag. This thread confirmed he's a 15 years old kid who uses inline assembly to write OMG OPTIMIZED shitty algorithms, and doesn't even understand the difference between length and concatenation, both of which by the way can be O(1) in better string systems.

Name: Anonymous 2007-09-27 15:21 ID:Heaven

>>45
Inline assembly > LISP.

He's 15 and can do things you can't even though you're probably 35. Shame on you.

Name: Anonymous 2007-09-27 15:57 ID:nT+xKl1i

>>46
Or, the more likely alternative, is that we've done assembly and moved on.

It's not the 80s and 90s, anymore. The main reason to write assembly nowadays is for SIMD or other instructions that are inaccessible to many languages.

Name: Anonymous 2007-09-27 16:14 ID:Heaven

>>47
lispfag

Name: Anonymous 2007-09-27 16:18 ID:Heaven

Contrary to assembly language, high level languages require pretty much zero skills, which is why they're discussed in beginner literature like SICP.

Name: Anonymous 2007-09-27 16:18 ID:C6puiDW2

>>46
No reason you can't put inline assembly in Lisp.

Name: Anonymous 2007-09-27 16:21 ID:NU5AkYZ4

>>47,49
I admit your trolling skills are meritorious

Name: Anonymous 2010-12-22 17:01

Name: Anonymous 2011-02-04 16:32

Name: Anonymous 2011-02-04 19:54

Name: Anonymous 2011-02-17 20:29

check my doubles

Name: Anonymous 2012-06-25 23:39

爄ࡉ‑‒桤ᖓԔ敉ᘠ坐䠅桩霥剢≉ࡤ挰针䠩儗钆œ焖唂蕳䅓失鐗ѳ䉳ԙՠ㢕࠶✅堀頔舠癵颖蜔煵霴␐䈥餗䐔㖕桰堙卧゘偐堂ক腃⦃杰吲厉墅䆘饧㌅䥁✑搨⠴ᥲ挂爄厃偑鉓䜦ᖇし䈘㤵栥劔桁⒔慁猈⌆敔Ɛᐲ⑐昃礤坣㉙䙒Ĕ䁒楄Ѩ饩㤥ኃ傃❈㔤堙錅茡餣⡂ԃ船衩聲䉅ʼnᐧ䔨ᐂ∳荩⑹㜩芓煶ᕇгᠳ鈕␤焨㜀ገ葈艐怤馕䤀㝘椳頱Ԕገ䝖皃Ɔ㈶㝓由䕙我葐牒䙧劘墅䤇㜡蜴䝘ၒ㈣̱攦攱慇䁤㙥劆薆ʖ霢ធ遡卡吲㑥ѵ儔剡ҁॗ奖獅⑗爷钃࠙蚅逡咆ងも㜄㡂锧堤葠螙剐⥔⌢ゕ餩阅䑦䡣蒇挗ၶᡉ褧餶Հဴ蠓鐈慈聸঒焣╦镓陡≩莐倆晄耲牰ɘ㌡㤇琖晔鞂➀袈ᅅ䊗㢇▂昢䚓蚙枉钖扵刈茰ᄤ䎁硉攥䅶㝵Ԕ㥗爃⚑ė͓撑撂露䕀爖隀舤扉㦉⍤⊉霑礤͇塷ၶᄥ舱萇䜀喆衔Ŕ㊈∈⤔ጁ搀̩怃ࡱ敨冇⚀聁┰䉰⤈

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List