« first day (1178 days earlier)      last day (3738 days later) » 

12:00 AM
¿Jamás?
:)
It means "each one" in Spanish, but in the feminine.
And jamás means either never or ever, depending.
 
I had the one down
 
It is not a terrorist organization.
Although it is spelled the same.
Well, or should be.
 
do you know any functional language?
 
Depends.
How pure?
 
I don't know any so can't tell
 
12:04 AM
Oh,
Do you know Lisp?
 
seen some code but never written any
 
I see.
 
been playing a little with F# lately
think it has potential for nice tings
 
Well, in languages with true closures, you can write in a functional programming style without any trouble.
 
do you know Lisp?
 
12:06 AM
I haven’t fully evaluated Java 8’s closures, but I wouldn’t count on it.
 
Si, nunca.
 
I have known Lisp.
 
(I (don't (know (Lisp)))
 
!!xkcd lisp
 
12:07 AM
 
I’m pretty comfortable programming in a functional style in Perl, rather than in the more popular objected-oriented dialect of imperative programming.
Et voilà.
 
 
A much more interesting question is whether one knows any declarative programming language.
 
I know some Xaml, not sure what declarative means though
 
A declarative programming language is also called, rather illogically, a logic-based or logical programming language.
 
12:10 AM
I don't know what imperative means either
 
there are some maybe, used for golfing, I think
 
and already failed defining functional :D
 
Some simple examples everybody knows and actually uses are Yacc and Makefiles. The prototypical example is probably Prolog. But regexes are also a declarative language.
Imperative languages use verbs in the imperative mood.
print this
delete that
read something
 
oh, did not connect it with ! for some reason
 
Object oriented languages are of course also imperative languages, except they use accusative, dative, or instrumental objects.
 
12:11 AM
functional examples are haskell and erlang, everything is made of functions, states must be passed in the arguments
 
Right.
Haskell is the one I’ve been brushed with once.
It made me yearn after call with continuation.
Well, or a better longjmp. :)
@cyril Someone must hold the state.
 
is tat when you write a monad tutorial?
 
State is one of the famous Big Three orthogonal, mandatory axes of an object: to be an object, something must exhibit all three of State, Behavior, and Identity.
 
!!wiki golfscript
 
@cyril The Wikipedia contains no knowledge of such a thing
 
12:15 AM
State means you can do something with lasting effect.
Behavior means you can do something.
Identity means you can tell one from another.
 
> GolfScript is a stack oriented esoteric programming language
 
The people who parrot that an object’s Sacred Three must needs be Inheritance, Polymorphism, and Encapsulation are well-meaning but a bit off-kilter. It’s actually State, Behavior, and Identity that are the critical axes.
For example, in Smalltalk, there are no "private" methods.
But no one denies that Smalltalk is object-oriented.
 
K is a proprietary array processing language developed by Arthur Whitney and commercialized by Kx Systems. Since then, an open-source implementation known as Kona has also been developed. The language serves as the foundation for kdb, an in-memory, column-based database, and other related financial products. The language, originally developed in 1993, is a variant of APL and contains elements of Scheme. Advocates of the language emphasize its speed, facility in handling arrays, and expressive syntax. History Before developing K, Arthur Whitney had worked extensively with APL, first at...
 
yesterday I learned that feeling oop feels like if someone is chewing on your leg
 
The need for State, Behavior, and Identity as fundamental features/axioms for a functioning OO system is explained at length by Grady Booch.
 
12:20 AM
@tchrist yes agreed, but objects are often there to avoid repetition, duplication of verbose languages
 
@JohanLarsson I do not understand.
 
in Functional Programming on Stack Overflow Chat, yesterday, by FredOverflow
@rightfold This is what it feels like trying to get anything done in Java.
 
@cyril That’s a very interesting statement in no fewer than three ways.
@JohanLarsson Well yes. Everybody knows that.
 
haha actual laugh
 
@cyril First, you reduplicated your "repetition, duplication".
Second, that it has anything to do with pruning verbosity.
Third, that there is some connection here to fundamental axioms of OO which I cannot see.
fprintf(stderr, "I have %.02f left in my bank account.\n", get_current_balance());
stderr->printf("I have %.02f left in my bank account.\n", get_current_balance());
Surely those are equivalent.
 
12:25 AM
do you snake_case?
 
@JohanLarsson I do not understand.
 
CamelCase
 
there were snake_cased method_names in the sample code
 
The point on the equivalency is that virtually nothing is saved by the second one, with the arrow.
Iprefermywordsseparatedbyspaces.
And the underscore serves as that space.
It is much more readable.
Plus if you have an "as shot" identifier to attach to your photographs, you don’t have to change your rules when it’s an all caps constant: as_shot and AS_SHOT are the same.
But ASSHOT is something altogether different.
 
12:29 AM
I use BSD style identifiers.
 
@tchrist could also be the same
do you scope like an egyptian?
 
ALL_CAPS for constants, Each_Word_Capitalized for globals/statics, and simple_words for locals.
 
_ is fine for me, O(1) access on my keyboard
 
I type so fast it doesn’t matter.
 
I type slow like a manager
 
12:31 AM
Haha.
 
slow and hard
 
Hawt.
 
think fast, type slow
 
Far be me it from me to consider it so onerous that I have had to put the first-person singular pronoun in the nominative in a capital letter, let alone the first word of this sentence the same, as to forego proper usage.
 
indeed you do type fast.
 
12:33 AM
I also tend to use identifiers whose length to type is directly proportional to the length of their scope in lines.
It helps cut down on globals. :)
It only takes a few times of typing Outstanding_Forked_Children_Status_Table before you think of some less global way of doing that. :)
 
you seem happy tonight, makes me happy
 
It’s ok to use short identifier names for supershort self-contained scopes, like for (i = 0; i < something; i++) array[i] *= 2; perhaps.
So one-letter identifiers work best with one-line scopes. :)
 
yes it makes sense
and reads better
 
Because if it is a short name, it does not tell you much, so you need to be able to eyeball the entire scope that it is active in to understand what it is doing.
 
descriptive names kind of obfuscates code
 
12:37 AM
And the opposite for those heftily named globals are great length and descriptivity like Outstanding_Forked_Children_Status_Table.
Not that I really used that one.
I did, however, use child_info_t *Children_Table = calloc(MAX_CHILD_PROCESSES, sizeof(child_info_t)), or words to that effect.
Where that is some lame pseudo-global plucked from the environment.
I did a line check and I’ve written nearly 9,000 lines of new C in the past month.
 
any news about the outsourcing?
 
Well.
This current project I got to work almost completely with onshore team for security reasons.
Which was very refreshing.
Because they are all fifty-ish and good, seasoned C programmers who know their butt from a hole in the ground.
Unlike certain others.
The only frustration was a megabyte memory leak caused by a library I had to call that was not written by the onshore team.
They can’t have ever run their lib code through valgrind, because it is so obvious.
Fortunately, I have a master/slave setup where the children are forked off anew for each request, so any resources they squander die when they do.
The master’s job is to keep a pool of the N kids running at their task.
And to clean up after them if they blow chunks.
And do logging, etc.
I refused the idea of persistent children.
Persistent children are a nag.
If I had used persistent children, the 1 meg leak per table re-load would have killed me.
But because each child would only pay the penalty of their buggy leaky code once in its lifetime, I don’t have to go fix other people’s stuff to keep my program running.
@JohanLarsson Do you ever have to worry about leaks?
C# being a managed language and all.
Then again, so is Java, and people are always leaking file descriptors there.
 
not often, events is one thing I'm trying to be careful with
 
It really feels primitive to go back to an unmanaged language.
But I will do it myself before I take on something like Boost’s "smart" pointers and all that complexity of implicit ref counting.
 
C# has using and IDisposable, so leaking files should not be an issue
 
12:48 AM
I imagine if I were used to it I wouldn’t mind.
But I’m not. I’m used to either doing everything or nothing.
The problem I refer to has to do with Java’s non-deterministic notion of resource management.
 
I don't know c++ but I know that they call new the memory leak operator
 
And all that crazy hacks they’ve added just feel like teaching a pig to sing.
 
I don't knwo much Java but I know that many hates it with a passion
 
The problem is that object destruction — finalization — is done by the garbage collector, not by deterministic code like ref-count based stuff.
So if you have an object that has a file descriptor in it, just because it’s no longer used does not mean that a destructor that closes its file descriptor is going to run in a timely manner, or at all.
So they invent all these kludges to deal with this sort of thing.
Their innovation/kludge was Java 7’s try-with-resources statement. A bit too rich for my blood.
 
using (FileStream stream = File.OpenRead(@"C:\Temp\test.txt"))
{
    // use the file
}
 
12:56 AM
So you list a bunch of stuff between try and the brace/block it governs, and these can get cleaned up for you if they have some sort of closable interface.
 
that is what it would look like in C#
 
What does that do?
I mean, the using in particular.
 
it is a try/finally block
 
how does that solve the clean up issue?
 
it disposes the disposable when it exits
should be deterministic
 
12:57 AM
Because it has a closeable interface, or because it is declared there in the parens, or both?
 
Ok.
Hm.
 
using can only be used on stuff that is IDisposable
 
So any exception will be caught and the resource disposed of from within that block?
So it has to have a certain interface. Right.
 
IDisposable has only one method Dispose()
 
12:59 AM
So where do you put the catch part?
Or doesn’t it matter what the exception is?
 
there is no catch part, the using is language support that hides all that
 

« first day (1178 days earlier)      last day (3738 days later) »