וְהָיָ֗ה בַּיּוֹם֮ אֲשֶׁ֣ר תַּעַבְר֣וּ אֶת־הַיַּרְדֵּן֒ אֶל־הָאָ֕רֶץ אֲשֶׁר־יְהוָ֥ה אֱלֹהֶ֖יךָ נֹתֵ֣ן לָ֑ךְ וַהֲקֵמֹתָ֤ לְךָ֙ אֲבָנִ֣ים גְּדֹל֔וֹת וְשַׂדְתָּ֥ אֹתָ֖ם בַּשִּֽׂיד׃
און עס װעט זײַן, אין דעם טאָג װאָס איר װעט אַריבערגײן דעם יַרדן צו דעם לאַנד װאָס ה׳ דײַן גאָט גיט דיר, זאָלסטו דיר אױפֿשטעלן גרויסע שטײנער, און זײ באַקאַלכן מיט קאַלך.
Chizkuni
ועמק השדים בארות, according to an aggadic commentary quoted by Rash,i the miracle that the king of Sodom escaped from this valley filled with bitumen wells which burns people, convinced the people now that Avram had indeed escaped from Nimrod’s furnace. According to a different interpretation, the word שדים is to be read with the dot on the left side of the letter ש, so that the meaning would be the same as the word שיד in Deuteronomy 27,2 the whitewash with which the stones taken out of the Jordan river were to be smeared as a base for writing on.
Tur HaArokh
ועמק השדים, “and the valley of Siddim, etc.” Some commentators derive the word שדים from סיד, lime, quoting ושדת אותם בשיד, as their proof, where it means to smear the stones with white lime. (Deut. 27,2) Accordingly, the region was full of depressions in which people dug for lime. The lime would be burned afterwards. Rashi quotes a Midrash, according to which, most people had refused to believe that Avraham had miraculously survived having been thrown into Nimrod’s furnace. When they witnessed the King of Sodom miraculously surviving falling into a lime pit, they changed their mind and retroactively gave credence to the miracle which had saved Avraham. Nachmanides is amazed at the very Midrash, as he cannot understand why people who failed to believe that a miracle had happened to Avraham should believe that a miracle had happened for the King of Sodom. Why would the G’d of heaven perform a miracle for an idolater such as the King of Sodom? On the contrary, if the King of Sodom could survive his fall into the lime pit, Avraham’s surviving the furnace was now far more plausible, but not in the framework of a miracle. The people who doubted the miracle of the furnace, ascribing it to magic, would most certainly also describe the King of Sodom’s escape as due to magic. It is more likely that seeing the King of Sodom’s escape made even the people who had believed that Avraham escaped by means of a miracle have second thoughts, and they now believed that Avraham had also benefited by magic. Another possibility could be that these commentators understand he words ויצא מלך סדום לקראתו in verse 17 to mean that the King of Sodom emerged from that lime pit at the time when Avraham passed by, i.e. that a miracle was performed for him at that time which resulted in his being saved so that he was able to honour Avraham and bless him, or that Avraham on his return from the successful battle wanted to restore their property to the five Kings, and when passing that neighbourhood, [seeing that his battle had been fought far to the north of there, Ed.] the miracle of the King of Sodom’s rescue then occurred by means of his intervention. When people observed that Avraham could perform such a miracle, they became convinced that a man such a Avraham had been saved miraculously from Nimrod’s furnace. It is quite possible that the King of Gomorrha had already died, so that we hear no more about him, or that he had fallen into a different pit, one that Avraham did not pass.
Rashi
And there he wrote on the stones.9There are different opinions as to what Yehoshua wrote on the stones. Some say that he wrote only Seifer Devorim which is itself the repetition of the Torah, as Moshe taught the Bnei Yisroel in the last year of the forty years in the wilderness—Seifer Devorim is referred to as מִשְׁנֵה תּוֹרָה, which means the repetition or copy of the Torah, which are the exact words used in this verse. Others say that he only wrote the Ten Commandments as they are recorded in Seifer Devorim (5:6-18). Most commentators maintain that Yehoshua wrote the entire Torah from beginning to end, and that it was a literal copy of the Torah. There are the same stones mentioned above.(4:20) After the altar was built, they scraped off the whitewash10There are different opinions concerning how it was written. According to Rabbi Yehudah it written directly on the stones, and later whitewashed as the verse states, “you are to write on them—and coat them with whitewash.” (Devorim 27:3,4.) Rabbi Shimon said that if they were whitewashed on top of the writing no one would be able to read it, which would defeat the purpose of the commandment. According to him the whitewash was put on first, to make the stones easier to write on and easier to read. (See Maseches Sotah 35). and brought them to Gilgal.11See Devorim 27:2 and Rashi’s comments there.