It's largely aesthetic reasons; types for functional interfaces are not explicitly functional, the types are less readable, and the call sites do not look the same (func.call(arg1, arg2) vs...
Type: Posts; User: schauerlich; Keyword(s):
It's largely aesthetic reasons; types for functional interfaces are not explicitly functional, the types are less readable, and the call sites do not look the same (func.call(arg1, arg2) vs...
You can also use the Callable interface for unary methods, which gives you the benefit of being able to pass it to standard library methods.
This is almost correct. Closed over primitives are...
So... it's C with some C++-isms on your own VM?
Well, if you really want to do much with your init file, you will need to learn a bit of emacs lisp. It's kind of unavoidable.
Now, as far as the meaning of that line, it's uncertain without...
GNUStep can't even run OS X apps properly. I don't imagine an iOS port (if it exists) is anywhere near usable.
The simple fact is, if you want to develop for OS X or iOS, you need to own a Mac....
There was a security breach on the VPS hosting for forums. Some Adobe Reader exploit. ViperChief shut down the site until things could be sorted, and it was decided to wipe the site and restore from...
x86 calling conventions are for parameters to be passed on the stack (although in some cases they may be passed in registers). printf takes a variable amount of arguments, and it assumes that the...
That isn't generating all permutations of the list, but the Cartesian product of the list on itself except for pairs (x, y) where x == y.
There are almost certainly better ways of doing this, but:
$ cat ~/foo.txt
abcdef
abcdefghijklmnopqrstuvwx
abcde
abcdefghijklmn
abcdefghijklmnopqrs
abcdefghijklm
There are a lot of good java tutorials and documentation on the web to answer these sorts of questions. For instance, googling "java array sort" got me this, which explains that you can sort an array...
He is saying that the Collections class tries to do a lot of different things that aren't necessarily related to each other. "Catch-all" is not a technical term, it is just an English term to...
Does syntax highlighting still work for other languages? What about in the shell itself, or other programs run from the same terminal? Might you have disabled ANSI colors on your terminal emulator?...
Feel free to steal it shamelessly. Or link to this thread. Whatever works for you.
It should work on anything 2.6+. I believe the with statement was added then.
Lucky for you I was sufficiently bored.
$ cat blah.csv
bar.bin,0F,313233
$ cat bar.bin
abcdefghijklmnopqrstuvwxyz
$ python foo.py blah.csv
$ cat bar.bin
abcdefghijklmno123stuvwxyz
Generally we don't take program requests here, but help people who are trying to write their own. So, today you're going to learn some python.
Reading in CSVs:...
The while loop condition only requires and expression that returns a boolean. There are many ways to have that happen, and not all of them involve an equals/not equals sign. This is a simple case,...
Right, I know that anonymous functions are not synonymous with closures. But Haskell creates a closure (at least theoretically), even if there is nothing to bind. In my mind a closure that captures...
This is a red herring. No one claimed that computers understand programs in a strong-AI sense. Semantics in a Turing machine (and thus programming language) are governed by the state transitions and...
Calling anonymous functions an unimportant implementation detail of a purely functional programming language is missing the point. It is a very important concept from a language design perspective.
...
Pervasive currying is not an unimportant implementation detail. It is a fundamental piece of design philosophy for the language. You may not use lambdas explicitly (eg, \x -> x + x), but that is only...
Haskell is constantly using closures. Every time you make a function call you are using closures. Using Haskell and not understanding that you're using closures everywhere is really missing the point...
4chan is that way ------>
Does your problem reduce to finding a hamiltonian path? If so, be careful. Hamiltonian-path is an NP-complete problem, so any solution you come up with is bound to be really (infeasibly) slow for...
For simple expressions, and with guidance from Wikipedia, I think it's certainly doable by someone with a bit of programming experience. Of course, a more complete calculator with complex expressions...
You might find this helpful. A common way of evaluating infix expressions (like a calculator would use) is to convert it to what's called Reverse Polish Notation (aka postfix) with Dijkstra's...