|
Dr. Honked posted:drat i never thought about it that way.. all those great programmers who have slipped through my fingers.... if i can typing at 105wpm then any one-liner i write is just letting my typist skills languish
|
# ? Apr 26, 2012 19:56 |
|
|
# ? May 13, 2024 07:58 |
|
the best programming language is all of them, because anyone who has mastered the magic of CORBA can freely write his individual services in whatever language sounds good right now
|
# ? Apr 26, 2012 19:59 |
|
objective c best c
|
# ? Apr 26, 2012 19:59 |
|
i liked objective c in school but i feel like i wouldn't have understood it as well if i didn't already know c
|
# ? Apr 26, 2012 20:02 |
|
Werthog posted:welp have fun working at best buy again
|
# ? Apr 26, 2012 20:12 |
|
horns.aiff
|
# ? Apr 26, 2012 20:14 |
|
Anal Tributary posted:_.each(string.split(""), function(char) { counts[char] = counts[char]+1 || 1 }); is a cool one-liner but it's not like there's anything with just using a for loop one liners are masturbation code:
|
# ? Apr 26, 2012 20:42 |
|
code:
|
# ? Apr 26, 2012 20:45 |
|
Anal Tributary posted:_.each(string.split(""), function(char) { counts[char] = counts[char]+1 || 1 }); is a cool one-liner but it's not like there's anything with just using a for loop stop trying to shoehorn imperative code into fp _.map( _.groupBy(s.split(''), _.identity), function(e){ return {letter:e[0], count:e.length}; } ) or u can chain it like what t-rex said yea
|
# ? Apr 26, 2012 20:47 |
|
Shaggar posted:oh yeah? whats the difference? a dictionary is implemented using hash tables both a map and a dictionary are associative containers. there is no such thing as an "associative array".
|
# ? Apr 26, 2012 20:47 |
|
Janin posted:there is no such thing as an "associative array". there is in php.
|
# ? Apr 26, 2012 20:48 |
|
I like C++.
|
# ? Apr 26, 2012 20:49 |
|
Janin posted:a map is implemented using trees (typically binary) i'm sure you are aware that java has treemap and hashmap for those distinctions
|
# ? Apr 26, 2012 20:49 |
|
Anal Tributary posted:i don't get java and c++ folks lol yeah, okay
|
# ? Apr 26, 2012 20:51 |
|
That Turkey Story posted:I like C++. check his post count guys i think hes trolling
|
# ? Apr 26, 2012 20:56 |
|
Janin posted:a map is implemented using trees (typically binary) Wikipedia says all of them are the same thing owned
|
# ? Apr 26, 2012 20:56 |
|
The thing that most boggled my mind when i learned basic C++ is what you do if you want to define special behaviour of the postincrement and preincrement operators for your custom datatype. you can define both, but because just writing "function ++ ()..." or whatever (i cant remember the syntax and dont care) would be ambiguous which one you meant, they are distinguished by the rule that for one of them you pass the method no parameters and for the other one you pass an unused integer parameter. i want to know who in the gently caress came up with that and was it a joke that got taken seriously.
|
# ? Apr 26, 2012 20:58 |
|
code:
|
# ? Apr 26, 2012 20:59 |
|
NSString *bah = @"figvdfivdafvdafv fd gvdair fgeifv sivfs fuwf FUAS "; NSMutableDictionary *counts = [NSMutableDictionary dictionary]; [bah enumerateSubstringsInRange:NSMakeRange(0, [bah length]) options:NSStringEnumerationByComposedCharacterSequences usingBlock:^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) { NSUInteger val = ([counts objectForKey:substring] != nil ? [[counts objectForKey:substring] intValue] : 0) + 1; [counts setObject:[NSNumber numberWithInt:val] forKey:substring]; }]; NSLog(@"counts: %@", counts);
|
# ? Apr 26, 2012 21:00 |
|
php:<? foreach (str_split($thestring) as $letter) $pieces[$letter]++; var_dump($pieces);?>
|
# ? Apr 26, 2012 21:03 |
|
It's amazing how many bad programmers get upset you break it to them that C++ is actually a great language.
|
# ? Apr 26, 2012 21:07 |
|
every criticism of c++ is literally "bloo bloo syntax"
|
# ? Apr 26, 2012 21:13 |
|
Carthag posted:NSString *bah = @"figvdfivdafvdafv fd gvdair fgeifv sivfs fuwf FUAS "; hahaha I was gonna try to do it in prolog for shits and giggles but then I decided I didn't really want to remember how to do prolog.
|
# ? Apr 26, 2012 21:15 |
|
Sweevo posted:every criticism of c++ is literally "bloo bloo syntax" its a legitimate complaint in cases where the syntax literally makes no goddamn sense at all
|
# ? Apr 26, 2012 21:17 |
|
yea I don't know C++ very well but if a language has lovely syntax thats a pretty good reason not to like it, just in general.
|
# ? Apr 26, 2012 21:18 |
|
like php, it has confusing and inconsistent syntax
|
# ? Apr 26, 2012 21:19 |
|
Sweevo posted:every criticism of c++ is literally "bloo bloo syntax" it turns out that some syntaxes are bad and c++ and perl have bad syntaxes
|
# ? Apr 26, 2012 21:27 |
|
perl has good syntax
|
# ? Apr 26, 2012 21:29 |
|
c++ is great it makes tts write effort posts apologising for the state of generic programming
|
# ? Apr 26, 2012 21:30 |
|
did u know: template metaprogramming is turing-completecode:
|
# ? Apr 26, 2012 21:31 |
|
Ronald Raiden posted:Wikipedia says
|
# ? Apr 26, 2012 21:34 |
|
html is the best programming language. whenever i get a resume with "Programming languages known: HTML" written on it i just get my cock out then and there and jizz all over the place and hire the person
|
# ? Apr 26, 2012 21:34 |
|
HTML5.....the future is now....
|
# ? Apr 26, 2012 21:35 |
|
nightwheat stalker posted:u got teh joek
|
# ? Apr 26, 2012 21:36 |
|
Ronald Raiden posted:u got teh joek
|
# ? Apr 26, 2012 21:37 |
|
i barely GNU her! posted:did u know: template metaprogramming is turing-complete so is the haskell type inference algorithm, but i don't have a cool proof program to show off
|
# ? Apr 26, 2012 21:42 |
|
Dr. Honked posted:html is the best programming language. whenever i get a resume with "Programming languages known: HTML" written on it i just get my cock out then and there and jizz all over the place and hire the person html is a programming language
|
# ? Apr 26, 2012 21:43 |
|
Tiny Bug Child posted:html is a programming language holy poo poo
|
# ? Apr 26, 2012 21:44 |
|
nice i figured out how to make synergy work on debian so i can log in "remotely"
|
# ? Apr 26, 2012 21:45 |
|
|
# ? May 13, 2024 07:58 |
|
i barely GNU her! posted:did u know: template metaprogramming is turing-complete man if only i could do that with other languages code:
|
# ? Apr 26, 2012 21:45 |