Chủ Nhật, 28 tháng 1, 2018

Youtube daily report Jan 29 2018

BREAKING NEWS About Hillary Clinton…

SHE ACTUALLY DID IT AND HERE'S THE PROOF!!!

Liberal feminist icon and failed presidential candidate Hillary Clinton protected one of

her senior advisers during her 2008 presidential campaign after he was accused of repeatedly

sexually harassing a young staffer, according to a bombshell new report in The New York

Times.

The report, supposedly sourced by four different people familiar with the matter, details the

allegations against Clinton faith adviser Burns Strider and the shocking fact that after

his young subordinate came forward, Clinton herself apparently stepped in to keep him

on her campaign while moving his alleged victim elsewhere.

The Times wrote:

Mrs. Clinton's campaign manager at the time recommended that she fire the adviser, Burns

Strider.

But Mrs. Clinton did not.

Instead, Mr. Strider was docked several weeks of pay and ordered to undergo counseling,

and the young woman was moved to a new job.

Mr. Strider, who was Mrs. Clinton's faith adviser, a co-founder of the American Values

Network, and sent the candidate scripture readings every morning for months during the

campaign, was hired five years later to lead an independent group that supported Mrs. Clinton's

2016 candidacy, Correct the Record, which was created by a close Clinton ally, David

Brock.

He was fired after several months for workplace issues, including allegations that he harassed

a young female aide, according to three people close to Correct the Record's management.

Mr. Strider did not respond to multiple requests for comment.

Those familiar with the accounts said that, over the years, a number of advisers urged

Mrs. Clinton to sever ties with Mr. Strider, and people familiar with what took place did

not want to see Mrs. Clinton blamed for the misconduct of men she was close to.

The allegations that Clinton specifically helped cover up sexual harassment while remaining

close friends with the alleged attacker come at a time when women across industries throughout

the country are coming forward with their stories of abuse and, in many cases, coverup

afterwards.

The woman's experience and the reaction to it have not been previously reported.

Until now, former Clinton associates were unwilling to discuss the events for publication.

But that changed in the wake of the #MeToo movement, in which dozens of men across the

country and across different industries, have been fired or suspended for sexual misconduct.

The complaint against Mr. Strider was made by a 30-year-old woman who shared an office

with him.

She told a campaign official that Mr. Strider had rubbed her shoulders inappropriately,

kissed her on the forehead and sent her a string of suggestive emails, including at

least one during the night, according to three former campaign officials familiar with what

took place.

The complaint was taken to Ms. Doyle, the campaign manager, who approached Mrs. Clinton

and urged that Mr. Strider, who was married at the time, be fired, according to the officials

familiar with what took place.

Mrs. Clinton said she did not want to, and instead he remained on her staff.

So not only did Clinton herself protect Strider, her own staff, who were completely aware of

his conduct, refused to even speak about it for almost 10 years in order to protect Hillary

and her political ambitions.

This is the Clinton machine at its finest folks and once again destroys the false media

narrative surrounding who Hillary Clinton the person actually is.

One can imagine that Clinton operatives within the media will soon begin to downplay this

shocking report while somehow blaming Donald Trump.

Mark it down.

This will happen.

For more infomation >> BREAKING NEWS About Hillary Clinton… SHE ACTUALLY DID IT AND HERE'S THE PROOF!!!- BreakingNews24 - Duration: 22:06.

-------------------------------------------

Dolat Mand Banne Ka Wazifa Islamic Wazifa For Rizq,Powerful Wazifa For Wealth And Prosperity - Duration: 2:31.

Dolat Mand Banne Ka Wazifa Islamic Wazifa For Rizq,Powerful Wazifa For Wealth And Prosperity

For more infomation >> Dolat Mand Banne Ka Wazifa Islamic Wazifa For Rizq,Powerful Wazifa For Wealth And Prosperity - Duration: 2:31.

-------------------------------------------

M-Eject - Deergod (techno house mix) - Duration: 52:07.

Please donate for channel development: PayPal - http://www.paypal.com/ dubinside@gmail.com PRIVATBANK - http://sendmoney.privatbank.ua/ua/?hash=2350574064

For more infomation >> M-Eject - Deergod (techno house mix) - Duration: 52:07.

-------------------------------------------

HIIMMARYMARY (HIMM) #2 DISLIKENESS (A DARKER TRUTH) - Duration: 8:40.

himm hey walk me back and then today's video we're going to be doing episode 2 of hi

I'm Mary Mary or him I figured out what him was so I know that this is an Arg

and I know that this is fake but we enjoy puzzles I remember when I did the

first episode we didn't know if it was real or not

we were Boober bamboozled we needed to figure out was the girl in trouble did

she need help and we successfully figured it out man I would say it was

the quickest case that we have ever solved as a team but you guys wanted me

to go on with the series and I decided that I would complete it because I don't

like starting stuff and not finishing it so what we're gonna do is we're going to

explain episode 2 we're gonna go on the journey together and we're gonna figure

out the puzzles so this time I have it in the program and that's going to be

enable us to slow it down and make sure we don't miss things this time in the

first episode Mary woke up in a house she was locked in there she could not

get out she was trying to open the doors that she just couldn't get out it was

very eerie very creepy had a very strange vibe so in this one I'm assuming

she's just checking her surroundings out and we're gonna see where it goes from

there

Oh Oh okay so it looks like she put in she has the peanut butter she takes it

out shuts it opens the door back up and it's there again so it looks like things

regenerate kind of like a spawn tom from a video game I kind of like that it's

kind of cool she's got the ability to shower this is wonderful and that not

the lots only works sometimes so you can see that the lots don't work all the

time so she's going throughout different places and placing flashlights that way

she's never caught in the dark now we know Mary never shows her her full face

we got her tapping on the door here I'm trying to pay attention to any details

okay we have a tack here this I don't know but it makes me think it couldn't

be Morris code so we're gonna check out the taps and then we'll go and consult

the internet gods aka Google we'll see if this is Morse code probably not but I

imagine it's AG it gets very lonely in a situation like this now I'm assuming

this is the Morse code translation for help now I don't know if that's correct

but it does sound just like it and it seems to me like this is probably the

closest thing to it I'm probably wrong but it just seems like the tapping would

not be for no reason so she's going through the house looking through books

trying to figure out who she is we find pictures of her

whoa but make no mistake we never see her face so this time we had a little

flicker but I'm a hundred percent sure we can slow it down now ooh so let's see

I don't look good in it so this little flicker said I do not look good in it so

is she hiding her face because she doesn't look good in it or can we just

art do we not have the ability to see her face now this is a really intriguing

part and if you get scared easily or disturbed warning it's extremely creepy

we only ever see half of her face oh my god

the reaction is normal hot tea would be freaked out the lady in

the mirror the lady in the mirror is there any significance of the lady in

the mirror so interesting symbolism here spiritually light has symbolic

attachment to illumination awareness and wisdom therefore in terms of spiritual

symbolism mirrors reflect the truth they reflect what is that's interesting

so whatever is going on in this mirror represents some sort of truth and it's

creepy yes it is she does not know who she is

so whatever this truth that we are seeing has something to do with her true

identity okay we seen some words here bottom left tried to fix it tried to fix

it what does this mean she ended up tearing the head off of the picture that

she was cutting out so the laughing continues through the night I imagine

it's very disturbing she's probably not getting any sleep

so this says she's so much prettier than me I want to break the mirrors very

cryptic so interesting that it ends in this way

the girls laughing it looks like she's not gonna be able to go to sleep started

off she's trying to figure out her surroundings learn how she how can she

survive in this situation she doesn't know who she is she's finding bits and

pieces here and there the reflection the mayor symbolizing the truth what that

truth is it seems very very dark so go ahead and bring him out it looks to me

like she has a very dark past for her to be ending up in a situation like this it

could be a Dante's Inferno top deal she could have died in gone to hell

now bear with me this is a quick quad of a jump but she could be trapped in a

symbolic hail if you will to repeat the happenings over and over but like I said

we are only in episode 2 of this Arg things are still to develop I'm sure

there's gonna be some crazier things and as interesting as this is I'm always

interested in what you think so why don't you go ahead and leave your

creative and/or interesting responses the comment box B looks like this always

brothers and sisters I will see you in the next video yeah it's it's getting

strange I like you know going into this video I wasn't sure if the rest of the

series was gonna be enjoyable for me to do seeing as it was we we didn't know

what was going on we solved the case pretty quick cuz I mean the rip squad

we just hands-down get stuff done but it is fun the puzzles are always fun I

really do want to know what your opinion is on us so don't forget to tell me in

the comment section below you can head over it where I'll be there too

but if you're new here don't forget to subscribe but notifications turned on

and B in the comment section after every single video cuz I'm gonna be there Greg

the cat's gonna be there and the rest of rip squads gonna beat there and that's

just the reason why this channel loves you

For more infomation >> HIIMMARYMARY (HIMM) #2 DISLIKENESS (A DARKER TRUTH) - Duration: 8:40.

-------------------------------------------

5 Cool New Whatsapp Tricks - January 2018 - Duration: 3:13.

Hello, everyone, this is Mohit Devda here and Today I am going to show you 5 Cool New

Whatsapp Tricks.

But before moving on, make sure to get subscribed and press the bell icon to get notifications

for all my upcoming videos.

Now that you have done that, let's get started.

To send a recorded message to any contact in the WhatsApp requires you to hold the mic

button for recording.

But, now, it is possible to lock the recording and you can record for longer duration also

without continuously holding that mic button.

So, it is a very small change but is very useful for some people.

This may be an old trick but many people don't actually know about it.

So, you can easily manage your WhatsApp storage by going to the settings, Data and Storage

usage and after scrolling, you will see Storage Usage, tap on that and you will see all your

contacts and groups in the decreasing order of shared data.

Now, you can tap on any contact and you will see all the details of the data shared with

them.

From here, you can delete all the messages, images, or videos, etc. shared with that particular

contact only.

So, when your storage gets full, you can use this trick to easily manage your WhatsApp data.

This one is the latest feature by Whatsapp which lets you play Youtube videos directly

on the chat screen.

The video is played in a floating window which is freely movable and you can even go to another

chat while watching the video which is so much convenient.

This trick also works during the video calls.

So, when you call any contact you can minimize that video call by swiping down.

It will be there in a circular window at any corner of the screen and you can now use WhatsApp

with the video call still going on.

So, this is a useful feature and you must try it.

Message delete also known as Message Recall is a nice and useful feature for WhatsApp.

Using this feature, you can delete any WhatsApp message sent by you but under the time limit

of 7 minutes.

That message will be deleted for the person at the other end also.

After 7 minutes, you will be able to delete the message from your own smartphone only.

Keep in mind that it would be visible to the other person also that you have deleted the

message.

So, this feature is very useful in case of accidentally messaging someone as now it is

possible to quickly recall it.

The last feature of this video is very useful in some cases.

Now using WhatsApp, it is possible to share your Live location with your friends.

To do this, you just need to tap on Location and from here you will get the option of Sharing

Live Location.

So, Now you don't need to stay in one place, as using live location your friend would be

easily able to find your current location.

So, these were some cool tricks and features of Whatsapp and tell me in the comments which

feature you liked the most.

Also, if I missed something else or you know more WhatsApp tricks, then let me know in

the comments down below.

So, that was it for this video.

Thanks for Watching and I will see you guys in the next one.

For more infomation >> 5 Cool New Whatsapp Tricks - January 2018 - Duration: 3:13.

-------------------------------------------

CORAZON DE METAL - JOEY MONTANA / TUTORIAL - Duration: 13:38.

For more infomation >> CORAZON DE METAL - JOEY MONTANA / TUTORIAL - Duration: 13:38.

-------------------------------------------

Simple Optimization Techniques — How to Create a Compiler part 2/5 - Duration: 28:45.

Good evening! [In Arabic language]

In the last episode,

we created a parser for a B-like programming language.

It parses each function into a tree structure,

where expressions contain expressions.

Today we will focus on optimization.

As I have said before,

much in programming is actually work –

towards making the work itself easier.

The code I wrote so far –

does not single-mindedly just aim towards the end result.

Code like this, for instance, helps constructing expressions –

using much shorter code than would be otherwise necessary.

In that similar mindset, these functions I just added –

help identifying the type of the expression or identifier.

However today the video topic is optimization.

In the interest of getting this video out in reasonable time,

I am going to compromise a little bit on good programming practices.

I start by taking the list of functions out –

from inside the main program,

and moving it into a global variable.

This will simplify the rest of this episode quite a bit.

Much of the optimizations in today's episode –

concern with replacing code with simpler alternatives –

that accomplish the same outcome.

One of the most important factors,

that decide whether some code can be replaced with some other code –

is whether that code has side-effects or not.

A side-effect is when an expression produces any other outcome –

than its return value.

In this is_pure() function,

we already wrote some basic rules in episode 1,

but so far we assumed that –

any function call automatically taints the expression as inpure.

This is not necessarily the case.

Calling a pure function,

such as one that simply returns the sum of two variables,

is a pure expression.

For example, replacing two calls to the same function with one call,

or deleting the call entirely,

will not change how the program works –

assuming the same result is calculated.

We need a way to classify functions.

This is more complicated than it sounds;

the pure_fcall cannot just make the decision when it is called.

Instead, if will check a precalculated variable.

There is one variable that indicates whether the function is pure,

and another that tells –

whether we even know whether the function is pure or not.

Of course, we need a way to calculate these variables.

My language does not have any global variables,

but it has pointers.

If a function takes a pointer parameter,

and it dereferences a pointer on the left side of an assign operator,

we can assume the function has side-effects.

It causes changes outside strictly its return value.

Of course, the effect is commutative.

No, viral.

No, what's the term for that?

If the function calls another function that has side-effects,

this function, too, will have side-effects.

Because the dependency chain between functions may run in any order,

we must loop this resolving process –

until we no longer can label any function as certainly pure or impure.

To implement this function right now,

we needed a special kind of for-loop –

that iterates through all sub-expressions in an expression tree.

Here is how I defined the for_all_expr function.

It operates on the depth-first principle.

The first node to be processed will be the deepest possible child node.

After all child nodes have been processed,

only then does the parent node get processed too.

For convenience's sake,

I decided to support two kinds of functors.

Those which return a boolean value, false or true,

to indicate whether the caller found whatever it looked for,

and the processing should be stopped immediately,

and those that return nothing.

To support both conventions, a helper function is needed,

that unifies both types of functions.

If the provided functor returns nothing,

this function returns the default parameter given.

Otherwise it returns whatever the functor returns.

I am surprised that –

there is not such a function already in the standard library.

While we are at it,

let's add a function that compares two expressions –

and tells whether they are equal.

This will be very helpful later.

The first category of optimizations is called "constant folding".

We are going to walk through every single expression in the code,

and optimize them using this ConstantFolding function.

We begin by checking the type of the expression.

If the expression is, say, a negate operation,

and the parameter is an integer constant,

we can replace the negate operation with the negated integer constant.

If the expression is an equals-comparison,

and both operands are integer constants,

we can perform the comparison at compile-time –

and simply replace the expression with an integer constant,

zero or one.

The same can be done if the operands are identical pure expressions.

Actually, the name of this function is a bit of a misnomer.

This function does all sorts of simplifications.

For instance, pointer expressions can be simplified,

if an address-of operator is immediately followed by a dereference operator,

or vice versa.

If an assign-statement has the same expression on both sides,

the assign-operation is redundant –

and can be replaced with the source operand,

assuming the operand has no side effects.

If we know at compile time that a loop operation will never loop,

we can delete the entire loop statement.

Now the add-operation requires much more work.

Let's get back to that later,

because there is a certain general principle we must take care of first.

Let me show you what I mean.

This is the tree structures that the compiler generates –

when it parses an add-expression that contains four operands.

It generates three add-expressions, that each have two operands.

But the thing is, this exact same outcome –

can be accomplished with many different structures.

Some of these work only because the add-operator is commutative,

meaning the order of operations does not matter,

but the simplest possible structure is the one shown in the lower-right corner,

where we have exactly one add-operator, and four parameters.

Interestingly enough, this same optimization can be performed –

on some operators that are not commutative,

as long as you keep the order of execution unchanged.

For example the and-operator.

All of these trees perform the same sequence of operations,

but again the fourth one is the simplest one.

So for add, comma, logical or, and logical and operators,

check if any child expression is the same type as the parent expression.

For every such child that is found, adopt the grandchildren directly.

Now the add-expression may contain an assorted mixture –

of all kinds of expressions, including number literals.

Just in case there are multiple number literals in the add-group,

or maybe there is a zero there, we'll quickly sum them up.

If the sum is nonzero, we'll add it back.

While we are at it, we can also convert negations –

into a slightly more efficient format.

After all this work, there is a possibility –

that the expression has been reduced into just a single operand,

or possibly into nothing at all.

In such cases, the expression can be reduced further.

But we are only getting started!

Next let's tackle the && and || operators.

Consider this example expression.

Consider how this is evaluated.

First, "a" is checked.

If it is zero, the process stops and the && evaluates into 0.

Otherwise, "b" is checked.

If it is zero, the process stops and the && evaluates into 0.

Otherwise, one is checked.

Well, one is not zero.

So the next expression is checked.

"x" is stored into "c".

If the result is zero, the process stops and the && evaluates into 0.

Otherwise, "d" is checked.

If it is zero, the process stops and the && evaluates into 0.

Well, zero is zero.

So the process stops and && evaluates into 0.

There are two observations to be made here.

The value of "e" was never checked,

because the literal zero that preceded it –

meant that nothing that comes after it is evaluated!

Also, because of the presence of the zero,

we know the && expression always returns zero in this case.

Technically, all of these expressions that we evaluated were useless.

We can optimize the expression like this.

The literal 1 expression was deleted,

because that cannot contribute to the result in any manner.

"e" was also removed, because it is never evaluated.

"d" was removed too,

because this expression has no side-effects,

so it does not influence the outcome in any manner.

However, neither "a" nor "b" can be removed,

because their values determine –

whether the assignment expression gets executed or not.

The assignment expressions is not a pure expression,

so it cannot be deleted either.

Finally, because we already know what the && operator will return:

always a zero,

we can simply ignore the return value –

and just return a literal zero using a comma operator.

This may benefit other optimizations that come later.

The || operator works exactly the same,

except that the consequences of zero and nonzero are reversed.

So, delete all operands that cannot possibly change the outcome.

If an operand is encountered –

that shortcuts the evaluation and forces the outcome,

delete all operands that came after that operand.

Next, we tackle the comma expressions.

This is where it gets complicated,

but let's start gentle.

Comma expressions are basically sequences of operations.

If we encounter an operation –

that prevents anything after it from being executed,

such as a return statement,

the remaining operations in the comma can be deleted.

This is one particular special case that I also deal with here.

Have a look at this comma expression.

No, wait.

This one.

That's actually an optimization I am yet to write.

Here.

This is a comma expression.

A sequence of assorted operations.

Only the result of the last expression is important;

In this case it is the assignment into z.

But expressions with side-effects have to be kept too.

While the dereference of "s" is not an expression with side-effects,

and of course neither is plus operation on the far left side,

the assignment operation has side-effects, so that one has to be kept.

So, we loop through all the parameters.

Any pure expressions, except the last, will be deleted.

However, even if the expression is not pure,

its impurity may be limited.

For certain types of expressions,

we can skip over the calculation and just rob the operands.

We can also apply the exact same logic into while-loops,

as long as we are careful –

to not accidentally delete the loop condition expression.

Consider this expression: x + 3 + (y = 4)

This expression accomplishes two things:

It assigns y := 4.

And it returns a value.

What does it return?

It returns x + 7.

However, currently the code cannot optimize this as x + 7,

because the 4 is hidden inside the parenthesis-expression.

A naïve attempt would be to sum these two numeric literals,

which would produce this expression.

But this would be a blunder.

While the expression does now correctly return x + 7,

it no longer assigns y := 4.

It now assigns y := 7.

So we cannot do that.

The correct way to optimize is shown on the right.

A comma expression is created between the = and + operations,

and the right-hand side of the assign expression is duplicated.

This way,

other optimizations will eventually convert this expression like this.

The result is exactly what we wanted in the first place:

y := 4, and then x + 7 is calculated and this value is the result.

However!

If the right-hand side of the assign expression has side-effects,

the optimization I proposed here would be a mistake,

because it causes the expression to be evaluated twice.

This is what must be done instead.

The result of the side-effect expression is assigned into a temporary variable,

and that temporary variable can be then copied –

as many times as necessary.

The next operation is fascinating.

Consider this example expression: z := the sum of x++ and y++.

The parser generates this complicated tree for this expression.

There are two comma expressions,

and the sum of these comma expressions is assigned into z.

This is what we can convert it into.

Two things have happened here.

First, the comma expressions from the inside of the outer sum expression –

have been extracted, so that only the last components –

of the comma expressions are retained in the sum.

Then, the assign into z is moved inside the comma expression.

This produces an overall much flatter tree structure than we started with.

Where there were six nested levels of expressions before,

there are now at most three,

yet it still behaves exactly the same as before.

We can also do the same operation –

for the first element in && and || expressions,

as long as we only operate on the first element.

We begin by scanning the parameter list –

backwards from the end anchor, until we find a comma expression.

This delimits the parameters into two sections.

The first section will be processed.

If there is a comma expression,

its parameters will be moved into the outer comma expression,

except for the last one.

If something was moved,

then this expression is replaced with a comma –

where the original expression is its last item.

However,

for anything except the last parameter in the first section,

the expression is moved into a temporary variable –

and that temporary variable s put in its place.

This ensures the unchanging of the evaluation order –

of different expressions.

Now if we take these rules for the "if" expression,

and try to apply it to the "while" expression verbatim,

we will produce incorrect behavior.

In the original expression, x gets incremented on each loop,

but in this modified form, x gets incremented only once,

before the loop.

Here is how it must be corrected.

The parts that were extracted –

from inside the loop to the outside of the loop –

must be replicated at the end of the loop.

Yes, this optimization may actually make the code longer.

But it has to be done,

if we wish to enable certain other optimizations to work.

Now you may have noticed that –

this optimization function does not necessarily bring out –

the best possible result immediately.

It may have to be run multiple times.

We will simply run this loop as long –

as running the optimization for one of the functions –

produces any changes to the structure.

I created a couple of testcases to make sure this works as intended.

In this layout, on the top you can see the original code.

On the left, what the parser produced for this code,

and on its right side, how it was optimized.

This first example shows how powerful the add-expression flattener is.

You can also see it calculated the sum of 4 + 7 at compile time,

despite them being in separate sub-expressions.

In the second example I modified the numbers so that their sum is zero.

You can see the integer literal is completely absent –

from the optimized output,

because adding zero to something would not accomplish anything.

The third example experiments with the negation operations.

The original expression contains five negations,

but the optimized expression contains only four.

You can verify this on pen and paper,

if you don't believe this optimization was correct.

The simple removal of two consecutive neg-operations seems to work alright.

An odd number of neg-operations still retains one, as it should.

Pairs of address-of and dereference operations get reduced, too.

This is one of the tests for the comma reducer.

Ignore the first two functions;

they are just artificial examples –

of pure and impure functions for the sake of the test.

The actual test function contains a sequence of five statements,

plus the implicit return statement.

As we can see, the optimizer detected all the pure expressions –

and deleted them.

The last expression in the list is kept, even though it is pure,

because it is returned as the function return value.

This testcase has three functions.

In the top example, x is stored into x.

Somehow it gets optimized into nothing.

How come?

Let's look at the middle function first.

x is stored into x, and then it is returned.

Storing a variable into itself –

gets optimized into just the variable itself.

Now, when we look back at the first function,

we can guess what happened.

First, the self-assignment got optimized as just the variable.

Then, the variable was removed,

because it was a pure expression in a comma statement.

The assignment was not a pure expression,

but the variable alone was pure.

So it got removed.

Only the return statement remains.

In the third function,

the left-hand side and the right-hand side –

of the assign expression are not identical,

so the assignment was not removed.

However, the source operand was duplicated for the return value.

And here it seems there is actually a bug in my design!

If you pass, say, number eight, as a parameter to this function,

you would expect that the function returns nine.

But the "optimized" version first increments the variable once,

and then increments it again when returning,

so it actually returns ten instead of nine!

This is a bug that must be fixed!

Let's make a note about that.

This is why we test.

Here is another example of the comma optimization.

Here, this function contains two return statements.

The second return statement can never be reached,

so the optimizer deleted it.

The function always returns 100.

In this example we have two while-loops.

The first while-loop will never run,

because the loop condition is known at compile-time to be false.

So it was deleted.

The second while-loop, on the other hand,

never terminates.

It is an infinite loop.

So any code that comes after that is dead code;

it can never be reached.

So the rest of the code was deleted by the optimizer.

Then we have the && sequence.

This is exactly the same example as earlier at 9:21 in this video.

The one was deleted, because it cannot change the result.

The zero was deleted, because it forces the result.

The "e" was deleted, because it would never be evaluated –

because of the zero.

This is the || version.

Here, because the compiler knows at compile-time –

that this || expression will always match because of the 1-literal,

it made that assignment into x explicit rather than conditional.

This function does two postincrements.

There is nothing too interesting about this test,

other than that the optimized tree is a great deal simpler than the original one.

The optimizer did not notice –

that the value of "x" is never used after it is incremented,

and technically it could delete the whole addition,

but that's all right:

I didn't write that kind of optimization yet.

We will get to that topic in the third or fourth episode.

This is almost the same as the previous one,

except now we have a function call instead of an addition.

There is something weird here.

Notice the function call?

It seems to have created a temporary variable,

stored a function pointer into that variable,

and then called the function indirectly at the end.

This is not incorrect behavior, but it is certainly odd,

and very likely a pessimization.

I will have to fix that.

This is the optimization –

that I explained in great detail at 14:11 in this video.

The assign expression is flattened out –

in order to make the add-expression optimizable…

But something is wrong here.

The compiler has created a temporary variable –

for the number three literal,

and this blocks the optimizer –

from performing the very purpose it was designed to do.

I will have to fix this too!

The problem with the last two tests –

was that the compiler created temporary variables –

for simple expressions that were effectively compile-time constants.

The is_pure() function is not enough to detect these situations.

We need a second classification method –

that determines whether an expression conveys a compile-time constant.

A compile-time constant is a number literal –

or a string literal, or a function identifier,

or any simple expression –

that consists of only compile-time constants.

We can immediately use this function to simplify some existing code.

So here!

This is the loop –

that hoists sub-expressions out from parents –

and replaces them with temporaries.

We will just simply check that –

if the expression is a compile-time constant,

the hoisting is not performed.

Done.

Then there was that problem with the x+1 assignment going wrong.

This is easiest to fix here, when checking for the self-assignment.

In short,

if the target expression is also used in the source expression,

a temporary variable will be created,

and that temporary variable will be referred to –

in each location in the source expression.

Then, it no longer matters if the temporary variable gets duplicated.

Now let's get back to test 7.

This is how it changed.

The +1 expression still gets duplicated, but the function does not change;

a bug is not introduced, which is the most important thing.

It would be nice,

if the whole source expression did not have to be duplicated —

it really does not need to be duplicated —

but no optimizer is perfect.

If I copied the target expression instead of the source expression,

that plus-seven optimization would be impossible.

Speaking of that.

This is what happens when the source expression is not duplicated properly,

but dubious temporary variables are created.

And we fixed that.

Now, it gets optimized properly as was originally intended,

thanks to the compile-time constant detection.

Technically that assignment into a temporary variable –

is unnecessary here, but it does not hurt.

In the next episode –

we will deal with a whole new category of optimizations –

that makes all these temporary variables not matter in the least.

We will create a register-based intermediate language –

that is one step closer to actual machine code.

Subscribe to my channel and click the bell icon –

to make sure you won't miss one episode!

As always, thank you for all your support.

In case you have questions,

make sure you first check the video description,

the links in the video description; and the top-fiveish comments —

to make sure your question has not been already answered twenty times.

I do appreciate and heartily welcome all of your comments,

thumbsups, shares, and so on,

but it will make things faster for you –

if you just spent ten seconds –

looking first whether your question has already been answered.

Have a most pleasant and fulfilling day!

See you again! [In Arabic language]

For more infomation >> Simple Optimization Techniques — How to Create a Compiler part 2/5 - Duration: 28:45.

-------------------------------------------

AN AMAZING RED ORB? OR WHAT IS IT? - Duration: 3:46.

so the red thing started out first with Niklas in the basement and this is when

I first captured it as you can see you can see how I wasn't yet so I wanted to

slow it down and this is what I saw it looked like a red orb or something red

jumping from the back of his fur after this something led me to go

outside for some reason so I went out back and this is what I saw so what I

did is I slowed it down and then I took a still photograph from the video and

this is what you see but I'm still not sure what this is it could just be like

a red bug or something but then I saw it back again on Nicolas inside the house

and I will show you that next so look in the area that I have highlighted in a

circle in yellow and then look at this next video and you will see something

leave from the area and then something returned okay I think he's gonna I think

you need me to help you okay I'll come get ya that happened to him in the

basement okay I'm coming I don't know if you can see it but something flies off

of him and I slowed it down for you and then here I slowed it down for you and

you can begin to see something come back in from the lower right of the picture

frame that looks like a red dot and it's it goes up near his chin and then above

to his chose as he looks up and here it is

returning again I want you to know the only thing that's been changed is the

scenes have been cut so they're not so long and the speed has been slowed down

in terms of saturation or anything like that nothing's been touched in this next

scene you will see from the right a of course an orb the same red thing flying

and then I slowed it down much slower so you can see it and once again you'll see

it from a closer angle and it should be coming up here the next scene is right

after I saw this I had my camera still up and then instead you'll see a

different angle of it flying around and it looks like a red orb there goes so

again this is all slow-motion nothing's been changed so let me know what you

think thank you so much for watching this is Johanna with moon water Tarot

all right take care bye

For more infomation >> AN AMAZING RED ORB? OR WHAT IS IT? - Duration: 3:46.

-------------------------------------------

Volvo Trucks - One minute about 'See and be seen´ - Duration: 1:20.

Each year 1.2 million people die

in traffic-related accidents around the world.

That is more than 500 children under the age of 19 every day.

Roads are getting busier and more complex all the time.

We're paying less attention

and forgetting that traffic systems are based

not only on safety features but on mutual trust.

Over the last few years Volvo Trucks has taught children in 24 countries

about traffic safety awareness through the Stop Look Wave campaign.

To broaden our scope, we are now targeting

another group of vulnerable road users: cyclists.

Most accidents involving trucks and cyclists occur in daytime,

at low speeds and on good roads.

In the global initiative See And Be Seen,

Volvo Trucks aims to teach cyclists how to stay safe,

because even though the traffic environment is changing,

humans remain as vulnerable as ever.

Learn how to stay safer around trucks.

Make sure to see and be seen.

For more infomation >> Volvo Trucks - One minute about 'See and be seen´ - Duration: 1:20.

-------------------------------------------

డబ్బు దారిలో దొరికితే ఏమి చేయాలి | Dabbu | Aishwaryam | Interesting Facts In Telugu | Mana Balaji - Duration: 4:56.

SUBSCRIBE

For more infomation >> డబ్బు దారిలో దొరికితే ఏమి చేయాలి | Dabbu | Aishwaryam | Interesting Facts In Telugu | Mana Balaji - Duration: 4:56.

-------------------------------------------

Coast Guard Crew Returns To Alameda After 23 Major Drug Busts - Duration: 2:20.

For more infomation >> Coast Guard Crew Returns To Alameda After 23 Major Drug Busts - Duration: 2:20.

-------------------------------------------

Burst Water Main Creates Sinkhole In Hayward Street - Duration: 1:56.

For more infomation >> Burst Water Main Creates Sinkhole In Hayward Street - Duration: 1:56.

-------------------------------------------

Spicy Crispy Herb Salad | Thai Food | Yum Samoon Prai Goong | ยำสมุนไพรกรอบกุ้ง - Duration: 1:57.

Spicy Crispy Herb Salad

Shrimp 150 g

Kaffir lime leave 3 tbsp

Lemongrass 3 tbs

Water 2 tbsp

Fish sauce 2 tbsp

Tamarind juice ¼ cup

Palm sugar 3 tbsp

Fried shallot 3 tbsp

Fried garlic 3 tbsp

Fried chili 2 tbsp

For more infomation >> Spicy Crispy Herb Salad | Thai Food | Yum Samoon Prai Goong | ยำสมุนไพรกรอบกุ้ง - Duration: 1:57.

-------------------------------------------

Rocket Science Applied #1 - Dribbling - Duration: 6:54.

Hey guys, it's HalfwayDead here with a slightly different format than usual.

Ever since after the first Episode my videos have been mostly theoretical.

And while theory is an important foundation, often times many things may come across as

fun facts that are pointless to know.

This is what I wish to address with the "Applied" videos by showing how some of the theory applies

to real situations and what advantages you can gain from that.

If you haven't done so already, episodes 4, 6 and 8 are suggested watching either now

or afterwards to fully understand everything.

Alright, so how can we use our knowledge of hitboxes and hit physics to figure out which

car is the best at dribbling and even by how much it is the best.

For this I'd like to divide dribbling up into different aspects.

Cars can be evaluated objectively for each of these.

Which car is the best overall, will then depend on how important you consider each of the

categories.

For the exact stats, please look at my car stats spreadsheet which is linked in the description.

First up, tightest possible turn.

Now I'm not talking about the turning radius of the car here but the tightest possible

circle that you can make the ball go in.

Well, how do we make the ball go in a circle?

As you may have learned in a physics class, to make the ball go in a circle, we need to

apply centripetal force.

That means we constantly need a force pushing the ball perpendicular to it's current velocity.

To do this, we have to place the ball either exactly left or exactly right of the center

of mass, depending on which way we want to turn.

The size of the turning circle depends on the forward speed of the ball and the amount

of centripetal force we're applying.

The higher the forward speed, the bigger the turning circle.

But the more centripetal force we apply, the tighter the circle gets.

So our goal is to get the most centripetal force possible.

And this is where we have to take into account the weird Rocket League physics.

The basic hit vector goes from the center of mass of the car to the center of the ball.

In a best case scenario we would place them both at the same height but since the ball

would have to go below the ground it's not really possible.

Instead, we place the ball as low as we can and as far away from the cars center of mass

as we can.

That means the horizontal force gets maximized.

Depending on the geometry of the car the placement of the ball differs and the presets also have

their center of mass at different heights.

So even though all cars will act the same amount of force, they will act at a different

angle and we want that angle to be as low as possible.

I've done the math and well the difference between the best and worst preset is only

1%.

Details are in my car stats spreadsheet.

However, whenever we need a lot centripetal force, the hit physics will make us apply

more vertical force too.

There comes a point where it becomes stronger than gravity and the ball wanders up on your

roof.

And here's the culprit.

On the roof at even the furthest point to the side the force is less than 40% of the

maximum possible force.

The roof also has another problem.

If the ball starts to bounce then the car won't interact with it all, ergo no force.

Therefore, if you're trying to turn tight, you always need to have the lowest point of

the ball below the roof because then it will be guaranteed to get hit when you turn into

it.

If your car is taller then you will have more vertical room to play with.

This is real reason for why cars with tall hitboxes are great for dribbling.

To sum it up, in theory you could do essentially just as tight of a turn with every single

preset but in practice you'll probably do it better with a tall car.

Next aspect, precision adjustments.

This is the polar opposite of the tightest possible turn.

If you want to have a slight effect on the ball you want to place it on the roof and

close to the center of mass.

But how do the presets differ.

For that, I calculated the direction of the force when you place it exactly 40uu off to

the side.

Because of their height, Hybrid and Octane will act less force to the sides.

The same is true for accelerating and decelerating the ball.

It might seem bad to have less force, but as a human it's likely better to have small

movements affect the ball in small amounts because it makes it easier to be precise.

We're only looking at 9% increase in sensitivity for the Plank/Batmobile presets but it's definitely

something that could be noticed.

The rest of the numbers are in the spreadsheet.

Aspect number 3.

Catching the ball out of the air.

Usually, when we do this, we don't want the ball to bounce.

We want to just catch and keep going, minimize the force upwards.

Meaning, let it bounce far away from the center of mass.

Of course, there is a limit to how far because otherwise you won't be able to catch up with

the ball and it will just drop to the ground.

The car doesn't really matter as long as you're used to it.

Only if the ball is travelling towards you, will you want the maximum amount of force.

In that case, long presets like the Breakout perform the best.

Aspect 4, bounce dribbles.

To keep a bounce dribble going you need to drive into the ball at just the right time

after it's landed.

Naturally, the timing window to hit the ball without a jump is bigger with taller presets.

The Octane at the front is about 25% higher than the Breakout, giving you over 25% more

time to hit the ball.

Last aspect, flicks.

Unfortunately, these will require lots more research by me and their very own video.

So take the following with a grain of salt as it's not very scientific.

I've noticed, like many others, that long cars can flick the ball faster and higher.

Whether that is because they end up getting more touches or something else, I don't know

yet, so this is not a final statement.

But it is something to keep in mind for the whole picture.

Alright, I hope that this showed why the Octane is objectively great at dribbling but not

necessarily superior in every way.

If you get used to a different preset, you can still do tight cuts and turns.

Big thanks to all my patrons for the financial support.

If you want to back me too, you can do so at the link on screen.

In return you get to vote on topic priority.

Now go follow me on twitter @HalfwayDeadRL and I'll see you soon for the next video.

For more infomation >> Rocket Science Applied #1 - Dribbling - Duration: 6:54.

-------------------------------------------

"Мухтар. Новый след". 67 серия. "Холодный блеск сапфира" - Duration: 43:43.

For more infomation >> "Мухтар. Новый след". 67 серия. "Холодный блеск сапфира" - Duration: 43:43.

-------------------------------------------

జనవరి 31 గ్రహణ సమయం ఎంతో తెలుసా..? | 31 January 2018 Grahan Time Telugu | Chandra Grahanam Timings - Duration: 0:53.

POOJA TV PRESENTS

For more infomation >> జనవరి 31 గ్రహణ సమయం ఎంతో తెలుసా..? | 31 January 2018 Grahan Time Telugu | Chandra Grahanam Timings - Duration: 0:53.

-------------------------------------------

Le stagiaire et le neveu - LA BLAGUE DU JOUR - Duration: 0:45.

But uncle, I'm only a trainee.

Ah! Exactely my son.

It is because you "is" a trainee.

I have "sending" you my nephew, your little brotha.

As soon as you start working...

I am sending you all the people from the village

I swear, I will be sending them all.

The entire village

For more infomation >> Le stagiaire et le neveu - LA BLAGUE DU JOUR - Duration: 0:45.

-------------------------------------------

Renowned CTE NorCal doctor hopes spark immigration change - Duration: 2:00.

For more infomation >> Renowned CTE NorCal doctor hopes spark immigration change - Duration: 2:00.

-------------------------------------------

Funny Clown Bibi | Learn Construction vehicles RC Loader Jamara Details in Funny Video for kids - Duration: 3:28.

Hi Kids,

Today Funny Clown Bibi will present you a video with Construction vehicles.

In this video for kids you will learn construction vehicles rc Loader details in funny construction video for kids.

Do not forget to subscribe under the video and like it

Click on the picture to see other funny videos

For more infomation >> Funny Clown Bibi | Learn Construction vehicles RC Loader Jamara Details in Funny Video for kids - Duration: 3:28.

-------------------------------------------

மகளை நிர்வாணப்படுத்தி வீதியில் விட்ட தாய் ஆட்டோ டிரைவரால் கற்பழிக்கப்பட்ட கொடூரம்| Tamil Cinema News - Duration: 2:53.

For more infomation >> மகளை நிர்வாணப்படுத்தி வீதியில் விட்ட தாய் ஆட்டோ டிரைவரால் கற்பழிக்கப்பட்ட கொடூரம்| Tamil Cinema News - Duration: 2:53.

-------------------------------------------

Gazab Ka Hai Din Video | DIL JUUNGLEE | Tanishk B Jubin Entertainment World - Duration: 5:01.

Gazab Ka Hai Din Video | DIL JUUNGLEE | Tanishk B Jubin N Prakriti K | Taapsee Pannu | Saqib

For more infomation >> Gazab Ka Hai Din Video | DIL JUUNGLEE | Tanishk B Jubin Entertainment World - Duration: 5:01.

-------------------------------------------

Simple Optimization Techniques — How to Create a Compiler part 2/5 - Duration: 28:45.

Good evening! [In Arabic language]

In the last episode,

we created a parser for a B-like programming language.

It parses each function into a tree structure,

where expressions contain expressions.

Today we will focus on optimization.

As I have said before,

much in programming is actually work –

towards making the work itself easier.

The code I wrote so far –

does not single-mindedly just aim towards the end result.

Code like this, for instance, helps constructing expressions –

using much shorter code than would be otherwise necessary.

In that similar mindset, these functions I just added –

help identifying the type of the expression or identifier.

However today the video topic is optimization.

In the interest of getting this video out in reasonable time,

I am going to compromise a little bit on good programming practices.

I start by taking the list of functions out –

from inside the main program,

and moving it into a global variable.

This will simplify the rest of this episode quite a bit.

Much of the optimizations in today's episode –

concern with replacing code with simpler alternatives –

that accomplish the same outcome.

One of the most important factors,

that decide whether some code can be replaced with some other code –

is whether that code has side-effects or not.

A side-effect is when an expression produces any other outcome –

than its return value.

In this is_pure() function,

we already wrote some basic rules in episode 1,

but so far we assumed that –

any function call automatically taints the expression as inpure.

This is not necessarily the case.

Calling a pure function,

such as one that simply returns the sum of two variables,

is a pure expression.

For example, replacing two calls to the same function with one call,

or deleting the call entirely,

will not change how the program works –

assuming the same result is calculated.

We need a way to classify functions.

This is more complicated than it sounds;

the pure_fcall cannot just make the decision when it is called.

Instead, if will check a precalculated variable.

There is one variable that indicates whether the function is pure,

and another that tells –

whether we even know whether the function is pure or not.

Of course, we need a way to calculate these variables.

My language does not have any global variables,

but it has pointers.

If a function takes a pointer parameter,

and it dereferences a pointer on the left side of an assign operator,

we can assume the function has side-effects.

It causes changes outside strictly its return value.

Of course, the effect is commutative.

No, viral.

No, what's the term for that?

If the function calls another function that has side-effects,

this function, too, will have side-effects.

Because the dependency chain between functions may run in any order,

we must loop this resolving process –

until we no longer can label any function as certainly pure or impure.

To implement this function right now,

we needed a special kind of for-loop –

that iterates through all sub-expressions in an expression tree.

Here is how I defined the for_all_expr function.

It operates on the depth-first principle.

The first node to be processed will be the deepest possible child node.

After all child nodes have been processed,

only then does the parent node get processed too.

For convenience's sake,

I decided to support two kinds of functors.

Those which return a boolean value, false or true,

to indicate whether the caller found whatever it looked for,

and the processing should be stopped immediately,

and those that return nothing.

To support both conventions, a helper function is needed,

that unifies both types of functions.

If the provided functor returns nothing,

this function returns the default parameter given.

Otherwise it returns whatever the functor returns.

I am surprised that –

there is not such a function already in the standard library.

While we are at it,

let's add a function that compares two expressions –

and tells whether they are equal.

This will be very helpful later.

The first category of optimizations is called "constant folding".

We are going to walk through every single expression in the code,

and optimize them using this ConstantFolding function.

We begin by checking the type of the expression.

If the expression is, say, a negate operation,

and the parameter is an integer constant,

we can replace the negate operation with the negated integer constant.

If the expression is an equals-comparison,

and both operands are integer constants,

we can perform the comparison at compile-time –

and simply replace the expression with an integer constant,

zero or one.

The same can be done if the operands are identical pure expressions.

Actually, the name of this function is a bit of a misnomer.

This function does all sorts of simplifications.

For instance, pointer expressions can be simplified,

if an address-of operator is immediately followed by a dereference operator,

or vice versa.

If an assign-statement has the same expression on both sides,

the assign-operation is redundant –

and can be replaced with the source operand,

assuming the operand has no side effects.

If we know at compile time that a loop operation will never loop,

we can delete the entire loop statement.

Now the add-operation requires much more work.

Let's get back to that later,

because there is a certain general principle we must take care of first.

Let me show you what I mean.

This is the tree structures that the compiler generates –

when it parses an add-expression that contains four operands.

It generates three add-expressions, that each have two operands.

But the thing is, this exact same outcome –

can be accomplished with many different structures.

Some of these work only because the add-operator is commutative,

meaning the order of operations does not matter,

but the simplest possible structure is the one shown in the lower-right corner,

where we have exactly one add-operator, and four parameters.

Interestingly enough, this same optimization can be performed –

on some operators that are not commutative,

as long as you keep the order of execution unchanged.

For example the and-operator.

All of these trees perform the same sequence of operations,

but again the fourth one is the simplest one.

So for add, comma, logical or, and logical and operators,

check if any child expression is the same type as the parent expression.

For every such child that is found, adopt the grandchildren directly.

Now the add-expression may contain an assorted mixture –

of all kinds of expressions, including number literals.

Just in case there are multiple number literals in the add-group,

or maybe there is a zero there, we'll quickly sum them up.

If the sum is nonzero, we'll add it back.

While we are at it, we can also convert negations –

into a slightly more efficient format.

After all this work, there is a possibility –

that the expression has been reduced into just a single operand,

or possibly into nothing at all.

In such cases, the expression can be reduced further.

But we are only getting started!

Next let's tackle the && and || operators.

Consider this example expression.

Consider how this is evaluated.

First, "a" is checked.

If it is zero, the process stops and the && evaluates into 0.

Otherwise, "b" is checked.

If it is zero, the process stops and the && evaluates into 0.

Otherwise, one is checked.

Well, one is not zero.

So the next expression is checked.

"x" is stored into "c".

If the result is zero, the process stops and the && evaluates into 0.

Otherwise, "d" is checked.

If it is zero, the process stops and the && evaluates into 0.

Well, zero is zero.

So the process stops and && evaluates into 0.

There are two observations to be made here.

The value of "e" was never checked,

because the literal zero that preceded it –

meant that nothing that comes after it is evaluated!

Also, because of the presence of the zero,

we know the && expression always returns zero in this case.

Technically, all of these expressions that we evaluated were useless.

We can optimize the expression like this.

The literal 1 expression was deleted,

because that cannot contribute to the result in any manner.

"e" was also removed, because it is never evaluated.

"d" was removed too,

because this expression has no side-effects,

so it does not influence the outcome in any manner.

However, neither "a" nor "b" can be removed,

because their values determine –

whether the assignment expression gets executed or not.

The assignment expressions is not a pure expression,

so it cannot be deleted either.

Finally, because we already know what the && operator will return:

always a zero,

we can simply ignore the return value –

and just return a literal zero using a comma operator.

This may benefit other optimizations that come later.

The || operator works exactly the same,

except that the consequences of zero and nonzero are reversed.

So, delete all operands that cannot possibly change the outcome.

If an operand is encountered –

that shortcuts the evaluation and forces the outcome,

delete all operands that came after that operand.

Next, we tackle the comma expressions.

This is where it gets complicated,

but let's start gentle.

Comma expressions are basically sequences of operations.

If we encounter an operation –

that prevents anything after it from being executed,

such as a return statement,

the remaining operations in the comma can be deleted.

This is one particular special case that I also deal with here.

Have a look at this comma expression.

No, wait.

This one.

That's actually an optimization I am yet to write.

Here.

This is a comma expression.

A sequence of assorted operations.

Only the result of the last expression is important;

In this case it is the assignment into z.

But expressions with side-effects have to be kept too.

While the dereference of "s" is not an expression with side-effects,

and of course neither is plus operation on the far left side,

the assignment operation has side-effects, so that one has to be kept.

So, we loop through all the parameters.

Any pure expressions, except the last, will be deleted.

However, even if the expression is not pure,

its impurity may be limited.

For certain types of expressions,

we can skip over the calculation and just rob the operands.

We can also apply the exact same logic into while-loops,

as long as we are careful –

to not accidentally delete the loop condition expression.

Consider this expression: x + 3 + (y = 4)

This expression accomplishes two things:

It assigns y := 4.

And it returns a value.

What does it return?

It returns x + 7.

However, currently the code cannot optimize this as x + 7,

because the 4 is hidden inside the parenthesis-expression.

A naïve attempt would be to sum these two numeric literals,

which would produce this expression.

But this would be a blunder.

While the expression does now correctly return x + 7,

it no longer assigns y := 4.

It now assigns y := 7.

So we cannot do that.

The correct way to optimize is shown on the right.

A comma expression is created between the = and + operations,

and the right-hand side of the assign expression is duplicated.

This way,

other optimizations will eventually convert this expression like this.

The result is exactly what we wanted in the first place:

y := 4, and then x + 7 is calculated and this value is the result.

However!

If the right-hand side of the assign expression has side-effects,

the optimization I proposed here would be a mistake,

because it causes the expression to be evaluated twice.

This is what must be done instead.

The result of the side-effect expression is assigned into a temporary variable,

and that temporary variable can be then copied –

as many times as necessary.

The next operation is fascinating.

Consider this example expression: z := the sum of x++ and y++.

The parser generates this complicated tree for this expression.

There are two comma expressions,

and the sum of these comma expressions is assigned into z.

This is what we can convert it into.

Two things have happened here.

First, the comma expressions from the inside of the outer sum expression –

have been extracted, so that only the last components –

of the comma expressions are retained in the sum.

Then, the assign into z is moved inside the comma expression.

This produces an overall much flatter tree structure than we started with.

Where there were six nested levels of expressions before,

there are now at most three,

yet it still behaves exactly the same as before.

We can also do the same operation –

for the first element in && and || expressions,

as long as we only operate on the first element.

We begin by scanning the parameter list –

backwards from the end anchor, until we find a comma expression.

This delimits the parameters into two sections.

The first section will be processed.

If there is a comma expression,

its parameters will be moved into the outer comma expression,

except for the last one.

If something was moved,

then this expression is replaced with a comma –

where the original expression is its last item.

However,

for anything except the last parameter in the first section,

the expression is moved into a temporary variable –

and that temporary variable s put in its place.

This ensures the unchanging of the evaluation order –

of different expressions.

Now if we take these rules for the "if" expression,

and try to apply it to the "while" expression verbatim,

we will produce incorrect behavior.

In the original expression, x gets incremented on each loop,

but in this modified form, x gets incremented only once,

before the loop.

Here is how it must be corrected.

The parts that were extracted –

from inside the loop to the outside of the loop –

must be replicated at the end of the loop.

Yes, this optimization may actually make the code longer.

But it has to be done,

if we wish to enable certain other optimizations to work.

Now you may have noticed that –

this optimization function does not necessarily bring out –

the best possible result immediately.

It may have to be run multiple times.

We will simply run this loop as long –

as running the optimization for one of the functions –

produces any changes to the structure.

I created a couple of testcases to make sure this works as intended.

In this layout, on the top you can see the original code.

On the left, what the parser produced for this code,

and on its right side, how it was optimized.

This first example shows how powerful the add-expression flattener is.

You can also see it calculated the sum of 4 + 7 at compile time,

despite them being in separate sub-expressions.

In the second example I modified the numbers so that their sum is zero.

You can see the integer literal is completely absent –

from the optimized output,

because adding zero to something would not accomplish anything.

The third example experiments with the negation operations.

The original expression contains five negations,

but the optimized expression contains only four.

You can verify this on pen and paper,

if you don't believe this optimization was correct.

The simple removal of two consecutive neg-operations seems to work alright.

An odd number of neg-operations still retains one, as it should.

Pairs of address-of and dereference operations get reduced, too.

This is one of the tests for the comma reducer.

Ignore the first two functions;

they are just artificial examples –

of pure and impure functions for the sake of the test.

The actual test function contains a sequence of five statements,

plus the implicit return statement.

As we can see, the optimizer detected all the pure expressions –

and deleted them.

The last expression in the list is kept, even though it is pure,

because it is returned as the function return value.

This testcase has three functions.

In the top example, x is stored into x.

Somehow it gets optimized into nothing.

How come?

Let's look at the middle function first.

x is stored into x, and then it is returned.

Storing a variable into itself –

gets optimized into just the variable itself.

Now, when we look back at the first function,

we can guess what happened.

First, the self-assignment got optimized as just the variable.

Then, the variable was removed,

because it was a pure expression in a comma statement.

The assignment was not a pure expression,

but the variable alone was pure.

So it got removed.

Only the return statement remains.

In the third function,

the left-hand side and the right-hand side –

of the assign expression are not identical,

so the assignment was not removed.

However, the source operand was duplicated for the return value.

And here it seems there is actually a bug in my design!

If you pass, say, number eight, as a parameter to this function,

you would expect that the function returns nine.

But the "optimized" version first increments the variable once,

and then increments it again when returning,

so it actually returns ten instead of nine!

This is a bug that must be fixed!

Let's make a note about that.

This is why we test.

Here is another example of the comma optimization.

Here, this function contains two return statements.

The second return statement can never be reached,

so the optimizer deleted it.

The function always returns 100.

In this example we have two while-loops.

The first while-loop will never run,

because the loop condition is known at compile-time to be false.

So it was deleted.

The second while-loop, on the other hand,

never terminates.

It is an infinite loop.

So any code that comes after that is dead code;

it can never be reached.

So the rest of the code was deleted by the optimizer.

Then we have the && sequence.

This is exactly the same example as earlier at 9:21 in this video.

The one was deleted, because it cannot change the result.

The zero was deleted, because it forces the result.

The "e" was deleted, because it would never be evaluated –

because of the zero.

This is the || version.

Here, because the compiler knows at compile-time –

that this || expression will always match because of the 1-literal,

it made that assignment into x explicit rather than conditional.

This function does two postincrements.

There is nothing too interesting about this test,

other than that the optimized tree is a great deal simpler than the original one.

The optimizer did not notice –

that the value of "x" is never used after it is incremented,

and technically it could delete the whole addition,

but that's all right:

I didn't write that kind of optimization yet.

We will get to that topic in the third or fourth episode.

This is almost the same as the previous one,

except now we have a function call instead of an addition.

There is something weird here.

Notice the function call?

It seems to have created a temporary variable,

stored a function pointer into that variable,

and then called the function indirectly at the end.

This is not incorrect behavior, but it is certainly odd,

and very likely a pessimization.

I will have to fix that.

This is the optimization –

that I explained in great detail at 14:11 in this video.

The assign expression is flattened out –

in order to make the add-expression optimizable…

But something is wrong here.

The compiler has created a temporary variable –

for the number three literal,

and this blocks the optimizer –

from performing the very purpose it was designed to do.

I will have to fix this too!

The problem with the last two tests –

was that the compiler created temporary variables –

for simple expressions that were effectively compile-time constants.

The is_pure() function is not enough to detect these situations.

We need a second classification method –

that determines whether an expression conveys a compile-time constant.

A compile-time constant is a number literal –

or a string literal, or a function identifier,

or any simple expression –

that consists of only compile-time constants.

We can immediately use this function to simplify some existing code.

So here!

This is the loop –

that hoists sub-expressions out from parents –

and replaces them with temporaries.

We will just simply check that –

if the expression is a compile-time constant,

the hoisting is not performed.

Done.

Then there was that problem with the x+1 assignment going wrong.

This is easiest to fix here, when checking for the self-assignment.

In short,

if the target expression is also used in the source expression,

a temporary variable will be created,

and that temporary variable will be referred to –

in each location in the source expression.

Then, it no longer matters if the temporary variable gets duplicated.

Now let's get back to test 7.

This is how it changed.

The +1 expression still gets duplicated, but the function does not change;

a bug is not introduced, which is the most important thing.

It would be nice,

if the whole source expression did not have to be duplicated —

it really does not need to be duplicated —

but no optimizer is perfect.

If I copied the target expression instead of the source expression,

that plus-seven optimization would be impossible.

Speaking of that.

This is what happens when the source expression is not duplicated properly,

but dubious temporary variables are created.

And we fixed that.

Now, it gets optimized properly as was originally intended,

thanks to the compile-time constant detection.

Technically that assignment into a temporary variable –

is unnecessary here, but it does not hurt.

In the next episode –

we will deal with a whole new category of optimizations –

that makes all these temporary variables not matter in the least.

We will create a register-based intermediate language –

that is one step closer to actual machine code.

Subscribe to my channel and click the bell icon –

to make sure you won't miss one episode!

As always, thank you for all your support.

In case you have questions,

make sure you first check the video description,

the links in the video description; and the top-fiveish comments —

to make sure your question has not been already answered twenty times.

I do appreciate and heartily welcome all of your comments,

thumbsups, shares, and so on,

but it will make things faster for you –

if you just spent ten seconds –

looking first whether your question has already been answered.

Have a most pleasant and fulfilling day!

See you again! [In Arabic language]

For more infomation >> Simple Optimization Techniques — How to Create a Compiler part 2/5 - Duration: 28:45.

-------------------------------------------

The Road to Becoming a Japanese Rapper #2 - m-flo - Duration: 4:07.

this life is short

It's gonna get crazy

It's gonna get crazy yo

It's gonna get super crazy

It's gonna get crazy

for real though

It's gonna get crazy yo

m-flo ya know

It's gonna get crazy

It's gonna get crazy

It's gonna get crazy yo

get a taste of that m-flo vibe

how's your heart? what flavor are you feeling?

what flavor?

what kind of style do you like?

a party like the 70's

yeah

'kokoro no tero soul'

flow like m-flo

this flow, it's smooth like water

smile and laugh

but that's already a story from the past

let's get along

hey

let's get along

huh

It's gonna get crazy

It's gonna get crazy yo

It's gonna get super crazy

It's gonna get crazy

It's gonna get crazy

yabaku naru

It's gonna get super crazy

m-flo ya know

yeah

For more infomation >> The Road to Becoming a Japanese Rapper #2 - m-flo - Duration: 4:07.

-------------------------------------------

Spine Tutorial - Sword Effect Part 1 - Duration: 31:15.

Hello everyone, this time we will introduce Sword effect in spine

First, build a skeleton structure to control sword

Then create a skeleton structure for effect

Effect skeleton structure is special

The first control position and ratio

The second control rotation

(Ctrl + Shift + L)

For more infomation >> Spine Tutorial - Sword Effect Part 1 - Duration: 31:15.

-------------------------------------------

EJ Carter is Up Next

For more infomation >> EJ Carter is Up Next

-------------------------------------------

For more infomation >> EJ Carter is Up Next

-------------------------------------------

Cuchina Safe Cover 'n Cook Microwave Plate Cover - Duration: 13:19.

For more infomation >> Cuchina Safe Cover 'n Cook Microwave Plate Cover - Duration: 13:19.

-------------------------------------------

For more infomation >> Cuchina Safe Cover 'n Cook Microwave Plate Cover - Duration: 13:19.

-------------------------------------------

MasterChef Latino | Cocinan platos llenos de recuerdos de su niñez | Entretenimiento - Duration: 18:15.

For more infomation >> MasterChef Latino | Cocinan platos llenos de recuerdos de su niñez | Entretenimiento - Duration: 18:15.

-------------------------------------------

For more infomation >> MasterChef Latino | Cocinan platos llenos de recuerdos de su niñez | Entretenimiento - Duration: 18:15.

-------------------------------------------

সরাসরি আজকের খবর ২৯ জানুয়ারি ২০১৮ বাংলাদেশ নিউজ আপডেট বিডি নিউজ বাংলা টিভি নিউজ Bangla news live - Duration: 14:42.

bangla news live

For more infomation >> সরাসরি আজকের খবর ২৯ জানুয়ারি ২০১৮ বাংলাদেশ নিউজ আপডেট বিডি নিউজ বাংলা টিভি নিউজ Bangla news live - Duration: 14:42.

-------------------------------------------

For more infomation >> সরাসরি আজকের খবর ২৯ জানুয়ারি ২০১৮ বাংলাদেশ নিউজ আপডেট বিডি নিউজ বাংলা টিভি নিউজ Bangla news live - Duration: 14:42.

-------------------------------------------

Solar Panel कैसे काम करता है?|How Does Solar Panel Works? जानिए हिंदी में और डिटेल में! - Duration: 7:07.

For more infomation >> Solar Panel कैसे काम करता है?|How Does Solar Panel Works? जानिए हिंदी में और डिटेल में! - Duration: 7:07.

-------------------------------------------

For more infomation >> Solar Panel कैसे काम करता है?|How Does Solar Panel Works? जानिए हिंदी में और डिटेल में! - Duration: 7:07.

-------------------------------------------

Gazab Ka Hai Din Video | DIL JUUNGLEE | Tanishk B Jubin Entertainment World - Duration: 5:01.

Gazab Ka Hai Din Video | DIL JUUNGLEE | Tanishk B Jubin N Prakriti K | Taapsee Pannu | Saqib

For more infomation >> Gazab Ka Hai Din Video | DIL JUUNGLEE | Tanishk B Jubin Entertainment World - Duration: 5:01.

-------------------------------------------

For more infomation >> Gazab Ka Hai Din Video | DIL JUUNGLEE | Tanishk B Jubin Entertainment World - Duration: 5:01.

-------------------------------------------

EJ Carter is Up Next

For more infomation >> EJ Carter is Up Next

-------------------------------------------

I'm The Best Vũ đoàn Múa ấn độ liếc mắt qua đã thích - Duration: 5:47.

I'm The Best Vũ đoàn Múa ấn độ liếc mắt qua đã thích

For more infomation >> I'm The Best Vũ đoàn Múa ấn độ liếc mắt qua đã thích - Duration: 5:47.

-------------------------------------------

BMW5シリーズGT後継モデルのMスポーツ パッケージ、豪雪を駆け抜けた! - Duration: 1:46.

For more infomation >> BMW5シリーズGT後継モデルのMスポーツ パッケージ、豪雪を駆け抜けた! - Duration: 1:46.

-------------------------------------------

The Road to Becoming a Japanese Rapper #2 - m-flo - Duration: 4:07.

this life is short

It's gonna get crazy

It's gonna get crazy yo

It's gonna get super crazy

It's gonna get crazy

for real though

It's gonna get crazy yo

m-flo ya know

It's gonna get crazy

It's gonna get crazy

It's gonna get crazy yo

get a taste of that m-flo vibe

how's your heart? what flavor are you feeling?

what flavor?

what kind of style do you like?

a party like the 70's

yeah

'kokoro no tero soul'

flow like m-flo

this flow, it's smooth like water

smile and laugh

but that's already a story from the past

let's get along

hey

let's get along

huh

It's gonna get crazy

It's gonna get crazy yo

It's gonna get super crazy

It's gonna get crazy

It's gonna get crazy

yabaku naru

It's gonna get super crazy

m-flo ya know

yeah

For more infomation >> The Road to Becoming a Japanese Rapper #2 - m-flo - Duration: 4:07.

-------------------------------------------

M-Eject - Deergod (techno house mix) - Duration: 52:07.

Please donate for channel development: PayPal - http://www.paypal.com/ dubinside@gmail.com PRIVATBANK - http://sendmoney.privatbank.ua/ua/?hash=2350574064

For more infomation >> M-Eject - Deergod (techno house mix) - Duration: 52:07.

-------------------------------------------

HIIMMARYMARY (HIMM) #2 DISLIKENESS (A DARKER TRUTH) - Duration: 8:40.

himm hey walk me back and then today's video we're going to be doing episode 2 of hi

I'm Mary Mary or him I figured out what him was so I know that this is an Arg

and I know that this is fake but we enjoy puzzles I remember when I did the

first episode we didn't know if it was real or not

we were Boober bamboozled we needed to figure out was the girl in trouble did

she need help and we successfully figured it out man I would say it was

the quickest case that we have ever solved as a team but you guys wanted me

to go on with the series and I decided that I would complete it because I don't

like starting stuff and not finishing it so what we're gonna do is we're going to

explain episode 2 we're gonna go on the journey together and we're gonna figure

out the puzzles so this time I have it in the program and that's going to be

enable us to slow it down and make sure we don't miss things this time in the

first episode Mary woke up in a house she was locked in there she could not

get out she was trying to open the doors that she just couldn't get out it was

very eerie very creepy had a very strange vibe so in this one I'm assuming

she's just checking her surroundings out and we're gonna see where it goes from

there

Oh Oh okay so it looks like she put in she has the peanut butter she takes it

out shuts it opens the door back up and it's there again so it looks like things

regenerate kind of like a spawn tom from a video game I kind of like that it's

kind of cool she's got the ability to shower this is wonderful and that not

the lots only works sometimes so you can see that the lots don't work all the

time so she's going throughout different places and placing flashlights that way

she's never caught in the dark now we know Mary never shows her her full face

we got her tapping on the door here I'm trying to pay attention to any details

okay we have a tack here this I don't know but it makes me think it couldn't

be Morris code so we're gonna check out the taps and then we'll go and consult

the internet gods aka Google we'll see if this is Morse code probably not but I

imagine it's AG it gets very lonely in a situation like this now I'm assuming

this is the Morse code translation for help now I don't know if that's correct

but it does sound just like it and it seems to me like this is probably the

closest thing to it I'm probably wrong but it just seems like the tapping would

not be for no reason so she's going through the house looking through books

trying to figure out who she is we find pictures of her

whoa but make no mistake we never see her face so this time we had a little

flicker but I'm a hundred percent sure we can slow it down now ooh so let's see

I don't look good in it so this little flicker said I do not look good in it so

is she hiding her face because she doesn't look good in it or can we just

art do we not have the ability to see her face now this is a really intriguing

part and if you get scared easily or disturbed warning it's extremely creepy

we only ever see half of her face oh my god

the reaction is normal hot tea would be freaked out the lady in

the mirror the lady in the mirror is there any significance of the lady in

the mirror so interesting symbolism here spiritually light has symbolic

attachment to illumination awareness and wisdom therefore in terms of spiritual

symbolism mirrors reflect the truth they reflect what is that's interesting

so whatever is going on in this mirror represents some sort of truth and it's

creepy yes it is she does not know who she is

so whatever this truth that we are seeing has something to do with her true

identity okay we seen some words here bottom left tried to fix it tried to fix

it what does this mean she ended up tearing the head off of the picture that

she was cutting out so the laughing continues through the night I imagine

it's very disturbing she's probably not getting any sleep

so this says she's so much prettier than me I want to break the mirrors very

cryptic so interesting that it ends in this way

the girls laughing it looks like she's not gonna be able to go to sleep started

off she's trying to figure out her surroundings learn how she how can she

survive in this situation she doesn't know who she is she's finding bits and

pieces here and there the reflection the mayor symbolizing the truth what that

truth is it seems very very dark so go ahead and bring him out it looks to me

like she has a very dark past for her to be ending up in a situation like this it

could be a Dante's Inferno top deal she could have died in gone to hell

now bear with me this is a quick quad of a jump but she could be trapped in a

symbolic hail if you will to repeat the happenings over and over but like I said

we are only in episode 2 of this Arg things are still to develop I'm sure

there's gonna be some crazier things and as interesting as this is I'm always

interested in what you think so why don't you go ahead and leave your

creative and/or interesting responses the comment box B looks like this always

brothers and sisters I will see you in the next video yeah it's it's getting

strange I like you know going into this video I wasn't sure if the rest of the

series was gonna be enjoyable for me to do seeing as it was we we didn't know

what was going on we solved the case pretty quick cuz I mean the rip squad

we just hands-down get stuff done but it is fun the puzzles are always fun I

really do want to know what your opinion is on us so don't forget to tell me in

the comment section below you can head over it where I'll be there too

but if you're new here don't forget to subscribe but notifications turned on

and B in the comment section after every single video cuz I'm gonna be there Greg

the cat's gonna be there and the rest of rip squads gonna beat there and that's

just the reason why this channel loves you

For more infomation >> HIIMMARYMARY (HIMM) #2 DISLIKENESS (A DARKER TRUTH) - Duration: 8:40.

-------------------------------------------

2018 Masters Darts FINAL Comment & Reaction - Duration: 8:04.

For more infomation >> 2018 Masters Darts FINAL Comment & Reaction - Duration: 8:04.

-------------------------------------------

Huawei mate lite 10 unboxing | Full Review | Four Cameras in Phone - Duration: 5:09.

Huawei mate lite 10 unboxing | Full Review | Four Cameras in Phone!

thank for watching Huawei mate lite 10 unboxing video's

For more infomation >> Huawei mate lite 10 unboxing | Full Review | Four Cameras in Phone - Duration: 5:09.

-------------------------------------------

레이싱카 뺨치는 ′미니 JCW 패밀리′ 3종 출시[24/7 카] - Duration: 4:32.

For more infomation >> 레이싱카 뺨치는 ′미니 JCW 패밀리′ 3종 출시[24/7 카] - Duration: 4:32.

-------------------------------------------

가격 내린 미쓰비시, 전시장 방문고객 급증[24/7 카] - Duration: 2:35.

For more infomation >> 가격 내린 미쓰비시, 전시장 방문고객 급증[24/7 카] - Duration: 2:35.

-------------------------------------------

사라포바, 살색톤 의상에 드러난 근육질 몸매 '아찔!'[ 자동차 세계 24_7] - Duration: 1:13.

For more infomation >> 사라포바, 살색톤 의상에 드러난 근육질 몸매 '아찔!'[ 자동차 세계 24_7] - Duration: 1:13.

-------------------------------------------

How to install and setup RaspiCheck on Android? - Duration: 2:35.

Welcome to another video from Yenkna PCs. This time we're going to

cellphone app for the Raspberry Pi called RaspiCheck. We're gonna switch to online

,now. Okay, on the Google Play Store, click on RaspiCheck.

Click on install. Which on my phone it's installed. We'll skip this part for now.

Ok. Click on the menu button at the bottom of your phone.

Click on RaspiCheck.

Okay, this is what RaspiCheck looks like before it's set up. Click on the pencil

icon to add your Raspberry Pi to your phone. Okay, usersname is PI.

Password's Raspberry. Okay, now, this is what's up. When I get my Raspberry Pi set

up and ssh enabled. Make sure you get that enabled

and has telling me the temperature and everything in my raspberry pie set 116

point nine six degrees Fahrenheit. That's not Celsius ladies and gentlemen it's

Fahrenheit. Okay ladies and gentlemen this is just a tutorial on how to set up

RaspiCheck and install it. I hope you found this video educational. Please, hit

that like button. If you haven't subscribed please subscribe and see you

later.

Không có nhận xét nào:

Đăng nhận xét