H2S113: A +1 o.o-m granular testing paradigm for protocol-dev |=full research:


<WP.MIC-H2S39,Troubleshooting.lvl-1> Working outside of the explicit | specifications of a product’s features requires rigorous | protocol.dev-tier,testing, at least 1 order of magnitude<Turing>greater than developing features on the MVP. The lack of explicit | instructions indicates that even the og-devs are unfamiliar with the behavior of the logic-strs in these bounds<damn-son!>If the platform.built-upon is intricate<Turing>such that the execution of code involves interactions among multiple steps of compilation, then our testing must extend to each of these, in order to isolate the source of error. PHP’s code execution, if served to the web, involves the actions of 1) the PHP-interpreter 2) built.in-parsing,funcs, running latently 3) func-defs 4) Apache 2x web-server 4a) WAMP, if running locally, 5) MySQL, if db-involved 6) HTTP.req-response 7) browser loading 8) TCP 9) electrons running along ground wires 10) routers 11) modems 12) the electrical grid 13) browser rendering 14) HTML-logic, with a few fringe muscles pulling weight in specialized movements<Turing-dirty!>

Be slow and pedantic“; the academic’s counter-point to the robber baron’s “move fast and break things“.

Hu ’22.

For the most part, only 1, 2, 3, 4, a bit of 4a, 6, and a bit of 7/13 can be controlled directly by our script-code, while doing protocol-dev, but we can’t be barred from being too creative. Of these, even, probably 1), 4), and bits of 6, 7, and 13, and of these, probably mostly 1, and a bit of 4, are of the most importance<logs!>. The others of the 2nd set can be sorted with English, and ranting to a picture of Rasmus Lerdorf, framed on your desk.

H3S1: Socket.prog-C x protocol-testing:

H4S1: Testing built.in-persistence:

The code displayed in<WP.MIC-H2S112,H3S6.H4S1>displays a number of abnormal behaviors, that indicates interference with 4) Apache HTTP web-server, 4a) WAMP, in addition to the usual suspects 1-3), and potentially 6) and 8) as well, addressable, even, with any quantum-vects<Turing>.

H5S1: When does a socket_create and socket_accept socket instance # close?

H6S1: Hu: In certain tests, we ran the code displayed in<WP.MIC-H2S112,H3S6.H4S1> alternatingly, and even after server.php execution was completed, client.php, when refreshed, displayed “socket_connect req-sent” and “3”, indicating that the socket was written-to; note that the socket that is written to, is the instance declared in client.php. In other cases, running client.php will return:

Warning: socket_connect(): unable to connect [10061]: No connection could be made because the target machine actively refused it in 

H6S2: Test design: We can use a require to test the open and closed status of socket_create and socket_accept instances, separately, after the script run has terminated, ie, the interpreter has reached beneath the last | line of code #:

H7S1: Level 1:

H8S1: In the initial run of lvl-1, we were able to return an identical output, it seems, from running _create_accept.persistence-test.php, which requires server.php, as server.php, although both returned a slew of errors, applying to everything except socket_create.

Hu: When an error occurs such that socket_accept and socket_read<80% 11/12/22>are not able to run, as opposed to an error in which they receive no input, the page will return the errors, immediately. All of the functions that give errors here, except socket_read, take $origin_socket, generated by socket_create as an argument, but socket_create did not return an error. It is known that socket_listen and socket_accept must be run successfully, following the success of socket_bind, so it’s possible, that that is the source of the error, which reads that “only one usage of each socket address” is normally permitted. Q: Does this mean that we’ve already run socket_bind, in a previous run of the script, and the binding, of $origin_socket, to $address, is still in E? This observation contradicts the inability of socket_listen and socket_accept to run, as they still should, if the $origin_socket were still open, and bound. Fin.v-1.

H5S2: Is our while loop, looping? According to johnny86<phpfreaks.com, a-r>: “PHP is server side language and therefore as long as your script is running, the browser won’t get a response.” Not sure exactly how to interpret this, but it could be the case that any php.encapped-code has this property; however, Edwin from Coding Faculty<a-r> did manage to get a live notifier to appear, on a .php page; however, he used JS on that page; it’s not clear which lang was responsible for displaying that live notifier, but it looked like JS<first-imp, 11/14><fbno>. Although johnny86 claims that the browser will not get a response, PHP may still be able to act, during script education, and this is consistent with how sleep() reads in the manual<a-r>. Therefore, a circumvention could be to use a JS element to read and display the output, which can still be echoed from PHP.

H6S1: Is our while loop, non-blocking<80%>, while it is looping?

Hu: We have one narrow data point here:

Hu: This output was generated from <WP.MIC-H2S112,H3S6.H4S1>, with a slight modification, to place a working while | loop around $incoming_msg = socket_read($origin_accept_conn, 1024); and the ensuing echo, only. Following the loop, which is set to max 6 iterations, we write, and echo the length of write. As can be seen from the output, which is generated from running client.php after having already run # server.php, only a single read was made, from the write in client.php, and the loop then continued another 5 times, with no successful reads, and moved to write, automatically.

This output indicates that only the first iteration of the loop<Turing>was blocking<WP.MIC-H2S119>, but the next 5 were not, as they executed, also, immediately upon the client.php engage; this is unexpected, because the code inside the loop, for socket_read, is exactly the same, so we would expect # the blocking behavior of socket_read in one iteration, to match that of the next.

H6S2: Mini.thought-dump<WP.MIC-H2S62>How am I going to loop both socket_accept and socket_read in the same doc, once I get loop going? Or, am I going to group them, and on the other side, also run an instance of socket create thru to # connect, and into read, every time I want to send a message? If that’s the case, then I might as well do this with post, and db read / write. It’ll be like 5-10 actions, including SQL-reads, for each character sent, but at least it’ll be real-time, and I’ve already proven that the scalability of 8-gb is int he 80-100k range, so this can handle like, 8k online users, on 8GB-ram, even. Sockets, done right, maybe millions, but it’s still just pennies on the dollar, because the value is $thousands per user. Don’t get sockets confused with instant load, which I already have, a lightweight page, even if refresh, which they all do anyway, and conditional management of client relationships, which I also have. Set.

H7S1: In reality, socket is actually high level, relative to my UPDATE-SELECT chain, that I’ve already built, with p-dash, which also means that in theory, it has to be just as fast, but just with a few more requests, and maybe a bit less quantum, but nobody’s better at finagling. Now: I don’t care what it is, and each of the things I’ve done, is like $1-bn more than the current paradigm, and I only need $50-mn to buy out PHP-group, and about a week, thereafter, to make the prog-lang changes I need, to have socket-full, so let’s calculus.merge-back to the present, and just get something off the ground<V.C-Turing><fbno><WP.MIC-H2S91>

H3S2: Testing.feedback-built,in.funcs-lit,rev:

Hu: Feedbackfuncs allow us to observe the behavior of test-objs, running in their expected fashion, with additional measurementvects. Think of these as sciinstrs that scientists can use, to measure a unit that is not immediately | observable, in order to make novel ascertations<#n-p><Turing>about the obj and its behavior in this case.

H4S1: $_SERVER super-global sides:

https://www.php.net/manual/en/reserved.variables.server.php

H4S2: file_get_contents:

https://www.php.net/manual/en/function.file-get-contents.php

H4S3: is_ series #:

https://www.php.net/manual/en/ref.var.php

H3S3: Testing.run-built,in.funcs-lit,rev:

Hu: Testing-runs allows us to operate a file or func in a different way that then default | state, which, combined with standard or testing-feedbacks, can generate novel | behaviors for obs-meas<sci x comp!><fbno>

H4S1: A doctrine of serendipity in research<Turing>:

Hu: Whereas in engineering, we seek to # produce a specific outcome, and our testing, purely in the frame of whether that outcome, or stages, were produced, in research, we may have room for our documentation, for experimental outcomes, that are outside the frame of a hypothesis<#n-p>

H3S4: Rational testing flow for dependencies<Turing>:

Hu: Such as in persistent-funcs, we would like to modularize these funcs and apply them to interact with other scripts. The application of a func is a separate | test-case from its original-env<Turing>. The following list is written in a step-wise manner, where each step should be 100% checked, before moving to the next:

H4S1: Functionalizing the code, originalcalled:

Only and only<o.a-o>the code that needs to be instantiallycalled by the callingfunc should be functionalized. H5S1:<MIC.Ch-32,H2S1>: In Depth 1: Gene | duplication: neofunctionalization, subfunctionalization: One of the main driving forces of genetic evolution is a process called gene | duplication, in which an entire gene is duplicated in a genome, such that there are now 2 copies. Following this duplication, the two genes or rather, the | | two | copies | of the same gene | will have a redundant functionality, permitting one to undergo mutations without causing a total loss of function in phenotype in most cases <ref: Wikipedia gene duplication, as an evolutionary event>Occasionally, the copy of the original functional gene will undergo a useful mutation in which it gains some functionality that may not be had by the original gene. The response of the original | gene to this gain of function | mutation # determines whether the resulting | relationship between the two genes are classified as neofunctionalization or subfunctionalization:

Left: A diagram of the functional outcome of gene duplication leading to neofunctionalization; ref: https://en.wikipedia.org/wiki/Neofunctionalization Right: A diagram of the functional outcome of gene duplication leading to subfunctionalization; ref: https://en.wikipedia.org/wiki/Subfunctionalization It is an extremely common, and accordingly hugely problematic, misconception that the driving force of evolution is mutations. Mutations are merely the event that follows gene duplication, when we are within the context of driving evolution, that causes single b-p changes to the gene, resulting in neo or subfunctionalization, but it’s the entire process of genetic duplication that is the driving force, because new genes need to be created in order for evolution to occur, and evolution results in an increase in total functions as well as functional diversity, and specialization. == Neofunctionalization and subfunctionalization are qualitatively different; in neofunctionalization, the ancestral gene maintains its function, while the new gene gains a new function that may or may not complement the original gene. In subfunctionalization, neither gene maintains the original function of the ancestral gene, and instead, each specialize to now comprise one part of the functionality of the original gene’s function such that together, they will cover the entire original function, or in some cases, that original function plus additional functionality as a result of their cooperation.

The evolution of language occurs in very much the same way #, and terminology in chess is no different from the vocabulary words of any other language, and therefore, we would expect to see evolution that is analogous to neofunctionalization and subfunctionalization in chess nomenclature, where the “function” is the meaning of the word. Let’s examine a word that is commonly used, and misused, in traditional chess | writing: “loose pieces”: Anatoly Karpov v. Garry Kasparov: “Karpov Diem” Karpov – Kasparov World Championship Match 1984/5, Moscow, Rd. 9 Oct-05 O: Tarrasch Defense: Classical, Carlsbad Var (D34)

The position after 16…Rxc5 In this position, the s.c5-R would traditionally be classified as a “loose piece”, or “hanging”, but #MIC contends that this classification is not sufficiently specific and therefore runs into problems in certain applications. 

An alternate position in which the f.c3-N is shifted to d2. In this alternate position, in which the f.c3-N is moved to d2, but it remains f-move #, traditional chess would continue to classify the s.c5-R as “loose”, or “hanging”, but we can see that a meaningful aspect of the b-p has changed: that ♜ is now under direct $ from the f.c2-Q, and yet the compound phrase “loose and attacked” is too wordy, especially due to the frequency with which the phrase must be used, and therefore it has little adoption in pop discourse, and the result is that # in both cases of the s.c5-R, whether under direct attack or not depending on whether the f.c3-N is in d2 or c3, respectively, it is referred to as “loose”, and this is inadequate for pedagogy. In #MIC, a differentiation is made between ren that is simply “undefended”, with no stipulation of whether it is attacked, which can be defined as synonymous to one usage of the former word “loose”, as in not defended, and pieces that are “undefended and attacked”, or “hangtacked”. In the first diagram of the pair, we would refer to the s.c5-R as “undefended”, and in the second, we would refer to that same R # as “hangtacked”.

== This evolution of the word “loose pieces” into now 2 words, each covering a different application in which the same word was used in both cases previously #, matches the previously referenced definition of subfunctionalization in gene duplication evolution #, where “loose pieces” corresponds to the now extinct “ancestral gene”, and “undefended” can correspond to the paralog with function A, whereas “hangtacked” the paralog with function B. Note that in this case, function B is not without function A, as the hangtacked ren is also undefended, but this is not elusive of the definition of subfunctionalization. Fin. Post: The advent of the word checkscovery in #MIC is an example of neofunctionalization in the evolution of chess nomenclature, in which the word from which it was duplicated, discovered check, fully retains its original function, and checkscovery refers to a new, neo functionalized meaning. This also means that what is a checkscovery # was previously erroneously referred to | as a discovered check at times, and in contrast, the word “loose” was arguably never erroneously applied, but rather that it was referring to two different things and benefited from a split in functionalization. 

H4S2: Require the func, empty doc:

Hu: Next, create an empty doc, simply to require the functionalized code, and check to see if all error and confirmation text is returned, exactly as it was, previously.

H4S3: Require the func, calling-doc:

Hu: A pseudo-empty test, the code should be run in parallel, but with no dependencies yet, to any code, in the calling doc.

H4S4: Build dependencies, including inclusion of the function call, into a function, in the calling-doc:

This step should be step-wise, with a test run, for every additional hook<Turing>

H4S5: Basic.HTML-only,dash:

<a href="rel-URL"><button>Button-name</button></a>

Hu: A simple buttondesign that allows horizontalstacking:

<!-- C_Lim[MIC]: check this out -->
<a href="session.start-pure.php"><button>Session-start*</button></a>
<a href="session.username-return,only.php"><button>Username-return</button></a>
<a href="session-terminate.php"><button>Terminate</button></a>
<button>P-holder</button>
<p>*Declares session and sets username to 'bohuahu'[late-22]</p>
<?php echo 'Status=' . $_GET["status"]; ?>
<!-- test-url: http://hu-lab/testing-progress/Utilities-passed/session-tests/session.test-manage,dash.php?status=logged_out -->

Hu: The <?php echo permits a Status return without AJAX<n-p>; button-destination:

<!-- C_Lim: return username -->
<?php session_start();
echo $_SESSION['username'];
$username = $_SESSION['username'];
echo '<br>' . $username;
header("Location: http://hu-lab/testing-progress/Utilities-passed/session-tests/session.test-manage,dash.php?status=$username");
?>
<!-- test-url: http://hu-lab/testing-progress/Utilities-passed/session-tests/session.username-return,only.php -->

H3S5: Neg-entropy x protocol-research:

// add MIC, ch-45

H4S1: HTML->AJAX->PHP, building a custom c.Panel-Console<Turing-3>:

Hu: I would like to program an HTML 1) interface, with potentially a thought.red-table,layout<Turing>, to help me remember the code-str<WP.MIC-H2S112,H3S6.H4S2>

49…Kxh4 whereas Kg4 50. Re4# https://lichess.org/Ut3RKTVd/black#97

H5S1: Basic echo-test w/ onclick event, to generate a max.red-interactive,HTML.button:

<button type="button" onclick="myScript()">On.click-11!</button>
<p id="display"></p>
<script>function myScript() {
document.getElementById("display").innerHTML = 6+5;
}</script>

Hu: This code will display the number 11 beneath the button, without replacing the button, when it is clicked. 6+5 can be swapped with<?php echo 6+5;?> to provide a basic | template for php-encap<WP.MIC-H2S47>

H5S2: Swapping out the function code to make an AJAX.enabled-HTTP,req<W3, a-r> to “get-echo.php”, which responds with an echo output<Turing>

<script>function myScript() {
  const xhttp = new XMLHttpRequest();
  xhttp.onload = function() {
    document.getElementById("display").innerHTML =
    this.responseText;
  }
  xhttp.open("GET", "get-echo.php?q=" + 'test');
  xhttp.send();   
} </script>
<!--code in get.echo.php-->
<?php 
echo $_GET['q'];
echo '<br>' . 'test-2';
?>

Button is displayed. Upon click, 2 lines are displayed ‘test<br>test-2’ Text can be changed from either side, and the output will be different. If text on PHP side is changed, then the output will change, without
this page refreshing #

H5S3: Generating output from a socket_ func and outputting from calling w/ AJAX<Turing>

Hu: Getting closer to realizing our vision for a c-Panel setup. Next, we will up-complex, via socket_create, the included php-doc, which is now named echo.socket-create.php, and attempt to display “socket_create() == You dun it” on ajax.trigger-echo,test.sockets.php.

<?php $origin_socket = socket_create(AF_INET, SOCK_STREAM, 0); 
	echo socket_strerror(socket_last_error($origin_socket)); 
	if($origin_socket == false) {
		echo 'no connect';
	} else {
		echo '<br>socket_create() == You dun it<br>';
	} ?>

References:

https://www.php.net/manual/en/reserved.variables.server.php
https://www.php.net/manual/en/function.file-get-contents.php

https://en.wikipedia.org/wiki/Neofunctionalization

https://en.wikipedia.org/wiki/Subfunctionalization

https://www.w3schools.com/js/js_ajax_php.asp

https://www.w3schools.com/js/js_this.asp

https://www.w3schools.com/jsref/met_document_getelementbyid.asp

https://www.w3schools.com/tags/tag_button.asp

https://www.w3schools.com/jsref/event_onclick.asp

https://enduringword.com/bible-commentary/colossians-4/

https://www.britannica.com/topic/The-Letter-of-Paul-to-the-Colossians

https://www.britannica.com/list/st-pauls-contributions-to-the-new-testament

[D]: https://en.wikipedia.org/wiki/Pauline_epistles

https://forums.phpfreaks.com/topic/222998-problem-using-while-loop-and-delaying-with-sleep/


Coding Faculty 3/19

https://www.php.net/manual/en/function.sleep.php


Leave a Reply

Your email address will not be published. Required fields are marked *