How it works
Logo@2xLogo mindzip color
Login

Tony Nemo

ft
02Follow
FollowingFollowers

Quotes
133

When the aristocracy catches a cold, as it is said, the working class dies of pneumonia.
13
12 Rules of Life: An Antidote to Chaos
A vanquished competitor loses confidence, sometimes for days. Sometimes the defeat can have even more severe consequences. If a dominant lobster is badly defeated, its brain basically dissolves. Then it grows a new, subordinate’s brain—one more appropriate to its new, lowly position.
8
12 Rules of Life: An Antidote to Chaos
Whether a lobster is confident or cringing depends on the ratio of two chemicals that modulate communication between lobster neurons: serotonin and octopamine. Winning increases the ratio of the former to the latter.
7
12 Rules of Life: An Antidote to Chaos
High serotonin/low octopamine characterizes the victor. The opposite neurochemical configuration, a high ratio of octopamine to serotonin, produces a defeated-looking, scrunched-up, inhibited, drooping, skulking sort of lobster, very likely to hang around street corners, and to vanish at the first hint of trouble.
8
12 Rules of Life: An Antidote to Chaos
Matthew Principle (Matthew 25:29), derived from what might be the harshest statement ever attributed to Christ: “to those who have everything, more will be given; from those who have nothing, everything will be taken.”
7
12 Rules of Life: An Antidote to Chaos
A weaker lobster will quit trying, accept his lowly status, and keep his legs attached to his body. The top lobster, by contrast—occupying the best shelter, getting some good rest, finishing a good meal—parades his dominance around his territory, rousting subordinate lobsters from their shelters at night.
5
12 Rules of Life: An Antidote to Chaos
What exactly is “the environment” to which animals adapt? We make many assumptions about nature—about the environment—and these have consequences. Mark Twain once said, “It’s not what we don’t know that gets us in trouble. It’s what we know for sure that just ain’t so.”
6
12 Rules of Life: An Antidote to Chaos
The black serpent, chaos, has a white dot in its head. The white serpent, order, has a black dot in its head. This is because chaos and order are interchangeable, as well as eternally juxtaposed.
4
12 Rules of Life: An Antidote to Chaos
Every revolution produces a new order. Every death is, simultaneously, a metamorphosis.
5
12 Rules of Life: An Antidote to Chaos
“In my kingdom,” as the Red Queen tells Alice in Wonderland, “you have to run as fast as you can just to stay in the same place.” No one standing still can triumph, no matter how well constituted.
6
12 Rules of Life: An Antidote to Chaos
Eco-activists, even more idealistic in their viewpoint, envision nature as harmoniously balanced and perfect, absent the disruptions and depredations of mankind. Unfortunately, “the environment” is also elephantiasis and guinea worms (don’t ask), anopheles mosquitoes and malaria, AIDS, Black Plague.
3
12 Rules of Life: An Antidote to Chaos
If Mother Nature wasn’t so hell-bent on our destruction, it would be easier for us to exist in simple harmony with her dictates.
4
12 Rules of Life: An Antidote to Chaos
Unfortunately, that physical hyper-response, that constant alertness, burns up a lot of precious energy and physical resources. This response is really what everyone calls stress, and it is by no means only or even primarily psychological. It’s a reflection of the genuine constraints of unfortunate circumstances.
5
12 Rules of Life: An Antidote to Chaos
There is an unspeakably primordial calculator, deep within you, at the very foundation of your brain, far below your thoughts and feelings. It monitors exactly where you are positioned in society—on a scale of one to ten, for the sake of argument.
4
12 Rules of Life: An Antidote to Chaos
If you have a high status, on the other hand, the counter’s cold, pre-reptilian mechanics assume that your niche is secure, productive and safe, and that you are well buttressed with social support. It thinks the chance that something will damage you is low and can be safely discounted.
5
12 Rules of Life: An Antidote to Chaos
Change might be opportunity, instead of disaster. Serotonin flows plentifully. This renders you confident and calm, standing tall and straight, and much less on constant alert. Because your position is secure, the future is likely to be good for you. It’s worthwhile to think in the long term.
6
12 Rules of Life: An Antidote to Chaos
Anxiety and depression cannot be easily treated if the sufferer has unpredictable daily routines. The systems that mediate negative emotion are tightly tied to the properly cyclical circadian rhythms.
5
12 Rules of Life: An Antidote to Chaos
I have had many clients whose anxiety was reduced to subclinical levels merely because they started to sleep on a predictable schedule and eat breakfast.
6
12 Rules of Life: An Antidote to Chaos
тобто страх - це показник низького рівня серотоніну. коли 'внутрішній калькулятор' оцінить людинку вище, то організм вважатиме себе в безпеці і те, що видавалось страхом ставатиме новими можливостями. для того, щоб почати: сон, сніданок, спорт.
3
12 Rules of Life: An Antidote to Chaos
Our anxiety systems are very practical. They assume that anything you run away from is dangerous. The proof of that is, of course, the fact you ran away. So now the mall is tagged “too dangerous to approach”
4
12 Rules of Life: An Antidote to Chaos
They shield themselves with a defensive crouch, and avoid the direct eye contact interpretable as a dominance challenge.
4
12 Rules of Life: An Antidote to Chaos
коли ти впевнений що можеш вкусити, що складніше себе стримати, ніж навпаки, то випадків, ле ця агресія стане в пригоді менше (я так розумію, бо цю здатність вкусити - видно і проявляється вона інакше)
2
12 Rules of Life: An Antidote to Chaos
eople who refuse to muster appropriately self-protective territorial responses are laid open to exploitation as much as those who genuinely can’t stand up for their own rights because of a more essential inability or a true imbalance in power.
4
12 Rules of Life: An Antidote to Chaos
those who start to have will probably get more.
5
12 Rules of Life: An Antidote to Chaos
But standing up straight with your shoulders back is not something that is only physical, because you’re not only a body. You’re a spirit, so to speak—a psyche—as well. Standing up physically also implies and invokes and demands standing up metaphysically.
6
12 Rules of Life: An Antidote to Chaos
Standing up means voluntarily accepting the burden of Being. Your nervous system responds in an entirely different manner when you face the demands of life voluntarily. You respond to a challenge, instead of bracing for a catastrophe. Y
6
12 Rules of Life: An Antidote to Chaos
You see the gold the dragon hoards, instead of shrinking in terror from the all-too-real fact of the dragon. You step forward to take your place in the dominance hierarchy, and occupy your territory, manifesting your willingness to defend, expand and transform it.
3
12 Rules of Life: An Antidote to Chaos
That can all occur practically or symbolically, as a physical or as a conceptual restructuring.
4
12 Rules of Life: An Antidote to Chaos
Email:thur antony@gmail com36617 1a5o65z.yaksm7vi
5
12 Rules of Life: An Antidote to Chaos
To stand up straight with your shoulders back means building the ark that protects the world from the flood, guiding your people through the desert after they have escaped tyranny, making your way away from comfortable home and country, and speaking the prophetic word to those who ignore the widows and children.
4
12 Rules of Life: An Antidote to Chaos
Put your desires forward, as if you had a right to them—at least the same right as others. Walk tall and gaze forthrightly ahead.
6
12 Rules of Life: An Antidote to Chaos
Dare to be dangerous. Encourage the serotonin to flow plentifully through the neural pathways desperate for its calming influence.
5
12 Rules of Life: An Antidote to Chaos
Emboldened by the positive responses you are now receiving, you will begin to be less anxious. You will then find it easier to pay attention to the subtle social clues that people exchange when they are communicating.
5
12 Rules of Life: An Antidote to Chaos
Thus strengthened, you may be able to stand, even during the illness of a loved one, even during the death of a parent, and allow others to find strength alongside you when they would otherwise be overwhelmed with despair.
5
12 Rules of Life: An Antidote to Chaos
Then you may be able to accept the terrible burden of the World, and find joy. Look for your inspiration to the victorious lobster, with its 350 million years of practical wisdom. Stand up straight, with your shoulders back.
5
12 Rules of Life: An Antidote to Chaos
No amount of genius can overcome obsession with detail
6
12 Rules of Life: An Antidote to Chaos
Shaders are also very isolated programs in that they're not allowed to communicate with each other; the only communication they have is via their inputs and outputs.
1
Shaders & GLSL
Shaders always begin with a version declaration, followed by a list of input and output variables, uniforms and its main function. Each shader's entry point is at its main function where we process any input variables and output the results in its output variables
1
Shaders & GLSL
Email:thur antony@gmail com128723 1pk4hyr.fwlc6av2t9
1
Shaders & GLSL
GLSL types
1
Shaders & GLSL
GLSL Vector Container A vector in GLSL is a 1,2,3 or 4 component container for any of the basic types just mentioned. They can take the following form (n represents the number of components)
1
Shaders & GLSL
Components of a vector can be accessed via vec.xwhere x is the first component of the vector. You can use .x, .y, .z and .w to access their first, second, third and fourth component respectively. GLSL also allows you to use rgba for colors or stpq for texture coordinates, accessing the same components.
1
Shaders & GLSL
Email:thur antony@gmail com128723 1efbv6w.aoh97ctyb9
The vector datatype allows for some interesting and flexible component selection called swizzling. Swizzling allows for the following syntax:
1
Shaders & GLSL
Email:thur antony@gmail com128723 ld2zcw.nfdme1m7vi
We can also pass vectors as arguments to different vector constructor calls, reducing the number of arguments required:
1
Shaders & GLSL
ins and outs Shaders are nice little programs on their own, but they are part of a whole and for that reason we want to have inputs and outputs on the individual shaders so that we can move stuff around. GLSL defined the in and out keywords specifically for that purpose.
1
Shaders & GLSL
ins and outs 2 Each shader can specify inputs and outputs using those keywords and wherever an output variable matches with an input variable of the next shader stage they're passed along. The vertex and fragment shader differ a bit though
1
Shaders & GLSL
If we want to send data from one shader to the other we'd have to declare an output in the sending shader and a similar input in the receiving shader. When the types and the names are equal on both sides OpenGL will link those variables together and then it is possible to send data between shaders
1
Shaders & GLSL
Uniforms Uniforms are another way to pass data from our application on the CPU to the shaders on the GPU
1
Shaders & GLSL
Email:thur antony@gmail com128723 1ozbhf5.02a1qbyb9
To declare a uniform in GLSL we simply add the uniform keyword to a shader with a type and a name. From that point on we can use the newly declared uniform in the shader. Let's see if this time we can set the color of the triangle via a uniform
1
Shaders & GLSL
If you declare a uniform that isn't used anywhere in your GLSL code the compiler will silently remove the variable from the compiled version which is the cause for several frustrating errors; keep this in mind!
attention
1
Shaders & GLSL
If you work by yourself, don’t expect to spend less time than that (maybe 15 hours a week for 14 weeks).
Cpp
That’s quite an ambitious goal because much modern software relies on techniques considered advanced just a few years ago.
Cpp
Consequently, I chose the topics for this book to cover what is needed to get started with real-world programming, not just what is easy to teach and learn.
Cpp
If you need a technique to get basic work done right, I describe it, demonstrate concepts and language facilities needed to support the technique, provide exercises for it, and expect you to work on those exercises.
Cpp
This book is aimed to serve those who do want to write or understand nontrivial programs.
Cpp
working with friends forces you to articulate your ideas, which is just about the most efficient way of testing your understanding and making sure you remember.
Cpp
Remember: programming is (among other things) a practical skill that you need to practice to master. If you don’t write code (do several exercises for each chapter), reading this book will be a pointless theoretical exercise
Cpp
And please don’t be too impatient. Learning any major new and valuable skill takes time and is worth it.
Cpp
Email:thur antony@gmail com128723 vrhoja.q6zme7b9
Cpp
for helping me hide away from distractions to get writing done during the summers.
Cpp
Each chapter is a reasonably self-contained unit, meant to be read in “one sitting” (logically, if not always feasible on a student’s tight schedule)
Cpp
Learning to ask the right (often hard) questions is an essential part of learning to think as a programmer.
Cpp
but please don’t underestimate a simple statement like “This is often useful.” If we quietly emphasize that something is important, we mean that you’ll sooner or later waste days if you don’t master it.
Cpp
If you haven’t done the drills, you have not “done” the book.
Cpp
characterize our approach as “depth-first.” It is also “concrete-first” and “concept-based.” First, we quickly (well, relatively quickly, Chapters 1–11) assemble a set of skills needed for writing small practical programs. In doing so, we present a lot of tools and techniques in minimal detail.
Cpp
We focus on simple concrete code examples because people grasp the concrete faster than the abstract.
Cpp
You must run before you can walk!
Cpp
Nobody should be satisfied with “because that’s the way it is” as an explanation.
Cpp
More importantly, an understanding of ideals and reasons allows you to generalize from what you know to new situations and to combine ideas and tools in novel ways to address new problems. Knowing “why” is an essential part of acquiring programming skills.
Cpp
Successful commercial programs with hundreds of thousands of lines of code are based on techniques that we illustrate in a dozen 50-line programs.
Cpp
The fastest way to understand real-world code is through a good understanding of the fundamentals.
Cpp
More generally, a textbook or a course must lead students through a series of subsets. We consider it our responsibility to select topics and to provide emphasis. We can’t just present everything, so we must choose; what we leave out is at least as important as what we leave in — at each stage of the journey
Cpp
only through complete understanding of a problem and its solution can you express a correct program for it, and only through constructing and testing a program can you be certain that your understanding is complete.
Cpp
Please don’t underestimate the importance of the notion of type safety. Types are at the center of most notions of correct programs, and some of the most effective techniques for constructing programs rely on the design and use of types
Cpp
o deal with input, a program usually contains some data, sometimes referred to as its data structures or its state. For example, a calendar program may contain lists of holidays in various countries and a list of your appointments.
Cpp
Email:thur antony@gmail com128613 10dhgr4.no4n6irudi
Most of the rest of this book could be seen as discussing that last category: how do we express a program as a set of cooperating parts and how can they share and exchange data? These are key questions in programming.
Cpp
Inputs to a part of a program are often called arguments and outputs from a part of a program are often called results.
Cpp
Our job as programmers is to express computations • Correctly • Simply • Efficiently
Cpp
Please note the order of those ideals: it doesn’t matter how fast a program is if it gives the wrong results. Similarly, a correct and efficient program can be so complicated that it must be thrown away or completely rewritten to produce a new version (release).
Cpp
Remember, useful programs will always be modified to accommodate new needs, new hardware, etc. Therefore a program — and any part of a program — should be as simple as possible to perform its task.
Cpp
we must concern ourselves with the structure of code. Paradoxically, concerns for structure and “quality of code” are often the fastest ways of getting something to work. When programming is done well, such concerns minimize the need for the most frustrating part of programming: debugging;
Cpp
Our main tool for organizing a program — and for organizing our thoughts as we program — is to break up a big computation into many little ones. This technique comes in two variations: - Abstraction - Divide and Conquer
Cpp
Without structure, you are (metaphorically speaking) building with mud bricks. It can be done, but you’ll never get to the fifth floor (mud bricks lack the structural strength for that).
Cpp
The most basic building block of programs is an expression. An expression computes a value from a number of operands. The simplest expression is simply a literal value, such as 10, 'a', 3.14, or "Norah". Names of variables are also expressions. A variable represents the object of which it is the name.
Cpp
Sometimes (as an lvalue) length refers to the box (object) and sometimes (as an rvalue) length refers to the value in that box.
Cpp
Email:thur antony@gmail com128613 1ynlbpm.49jp8sq0k9
C++ offers the notion of a symbolic constant, that is, a named object to which you can’t give a new value after it has been initialized. For example:
Cpp
Consequently, we prefer not to use literals (except very obvious ones, such as 0 and 1) in most places in our code. Instead, we use constants with descriptive names. Non-obvious literals in code (outside definitions of symbolic constants) are derisively referred to as magic constants.
Cpp
Email:thur antony@gmail com128613 1gbvkw7.vz02g9zfr
And by the way, 299792458 is one of the fundamental constants of the universe: the speed of light in vacuum measured in meters per second. If you didn’t instantly recognize that, why would you expect not to be confused and slowed down by other literals embedded in code? Avoid magic constants!
Cpp
Email:thur antony@gmail com128613 1dfsckf.wr0t0dlsor
To handle cases where the value of a “variable” that is initialized with a value that is not known at compile time but never changes after initialization, C++ offers a second form of constant (a const):
Cpp
Email:thur antony@gmail com128613 1nv1p34.bltzk3mcxr
Cpp
Note that a<b<c means (a<b)<c and that a<b evaluates to a Boolean value: true or false. So, a<b<c will be equivalent to either true<c or false<c. In particular, a<b<c does not mean “Is b between a and c?” as many have naively (and not unreasonably) assumed. Thus, a<b<c is basically a useless expression.
Cpp
Email:thur antony@gmail com128613 avs2oa.y9y0hpvi
The rule (for the types we have presented so far) is that if an operator has an operand of type double, we use floating-point arithmetic yielding a double result; otherwise, we use integer arithmetic yielding an int result. For example:
Cpp
Email:thur antony@gmail com128613 1yek148.t5la7tlnmi
Cpp
Email:thur antony@gmail com128613 g8yuhh.gbaov9rudi
C++11 introduced an initialization notation that outlaws narrowing conversions. For example, we could (and should) rewrite the troublesome examples above using a {}-list notation, rather than the = notation:
Cpp
The {}-list-based notation is known as universal and uniform initialization
Cpp
Email:thur antony@gmail com128613 s74cq2.bd866flxr
Cpp
cout<< "Please enter a length followed by a unit (c or i):\n"; cin >> length >> unit;
Cpp
However, please remember that one of the ideals for code is simplicity, rather than complexity. You don’t demonstrate your cleverness by writing the most complex program. Rather, you demonstrate competence by writing the simplest code that does the job.
Cpp
Email:thur antony@gmail com128613 e80zm5.a32fi7wrk9
a selection based on comparison of a value against several constants. Such selection is so common that C++ provides a special statement for it: the switch-statement.
Cpp
Email:thur antony@gmail com128613 v7m6o.apxujfko6r
// The most common error with switch-statements is to forget to terminate a case with a break. // you can just drop through into next case
Cpp

We use cookies to understand our websites traffic and offer our website visitors personalized experience. To find out more, click ‘More Information’. In addition, please, read our Privacy policy.