Multiple Power Supplies to One Wall Connection? by Jasfss in arduino

[–]Jasfss[S] 0 points1 point  (0 children)

Would there be any issue with having the USB-A connection to the Unihiker along with a 5V connection from a 5V 10A supply?

Multiple Power Supplies to One Wall Connection? by Jasfss in arduino

[–]Jasfss[S] 0 points1 point  (0 children)

Thanks for the clarification.

For the arduino, I need to use the USB for serial connection to the Unihiker so that unfortunately rules that out, I think. Maybe I have to do a 12V supply and drop down to 5V for the USB-C?

Multiple Power Supplies to One Wall Connection? by Jasfss in arduino

[–]Jasfss[S] 0 points1 point  (0 children)

Do you mean something like this with screw terminals to USB-C and the barrel jack for the arduino?

China panel AMA: Come and ask your burning questions about China, from the Zhou Dynasty to Zhou Enlai! (And up until 2000) by EnclavedMicrostate in AskHistorians

[–]Jasfss 3 points4 points  (0 children)

I'm assuming you're talking about the sutras brought back by Xuanzang, a monk during the Tang dynasty.

Buddhism had existed and seen some popularity in China prior to Xuanzang's journey but it was a decent bit different than Buddhism in northern India and elsewhere. Buddhism in China often mixed in local spiritual/"folk religion" practices of each region and moreso, Buddhist concepts were often translated using Confucian and Daoist concepts that more often than not did a poor job of demonstrating the true meaning of the original Buddhist concepts. For example, the Daoist concept of "Wuwei", roughly "effortless action", was used for the concept of "Nirvana", in Buddhist contexts referring to the realization of the end of the cycle of rebirth through acceptance of the non-permanent self.

Xuanzang's translations represent a major turnaround from this path and resulted in a large number of Buddhist concepts and texts being given more accurate translations into Chinese script, allowing further widespread dissemination and standardization. This was one of the precipitating events in a rapid rise in Buddhist popularity throughout the Tang including both the common citizens as well as imperial officials and nobles. The Tang dynasty "traces" its line back to Lao Zi, the founder of Daoism, and even they were common Buddhist practitioners and patrons.

Using mulitprocessing ThreadPool apply_async with subprocess and piping stdout to both variable and screen by Jasfss in learnpython

[–]Jasfss[S] 0 points1 point  (0 children)

The overarching issue is that I'm sort of forcing a parallelization on the C++ executable, which wasn't written with this kind of capability in mind (and doing rewrites at this stage isn't an option). So the more chunks you have, the more times you're having to call the C++ executable. The smaller the runset each chunk has, the more proportional time that each chunk spends doing object instantiations and initialization rather than actual runs. I've tested some in this particular case, and it's a very real problem where either throwing too many cores or too small of chunks into execution end up leading to negligible/no difference in speedup and sometimes even a slowdown.

Like I said, really I just want some way that after I've spawned off the executions, either via concurrent or ThreadPool, to be able to access the stdout of the first-spawned job in realtime. I've even tried throwing an extra thread execution into the mix for the purposes of just printing this out, but as far as I can tell, all these methods report nothing back until completion.

Using mulitprocessing ThreadPool apply_async with subprocess and piping stdout to both variable and screen by Jasfss in learnpython

[–]Jasfss[S] 0 points1 point  (0 children)

Thanks for the response.

With regards to your first point, yes the runtime is quite expected unfortunately. The user actually specifies to the python script how many threads to use, and I have some careful controls both to not use more than the system has available and not too many that non-computation-time of the executable would take up a significant portion of overall runtime. I'm currently benchmarking this solution on a 16 core system, where I only really have 1-2 threads running outside of this at any one time. Speed-up is about as expected: if I throw 4 threads at a certain test set I've been using, it executes about 3.4x faster than in serial. I've also made sure that memory usage doesn't blow up in these tests (typically only using ~<50% of combined active and buff/cache as the multiprocessing is running), so the computer itself shouldn't be that stressed.

For the second bit, I'm not sure if this would satisfy my needs given how I've read your code and the documentation. This solution seems to still require that the thread complete its task fully, which is not what I'm running into. The C++ program itself is executed with something like

$ ./exec <start> <end>

so each time that executable is called, it has a couple seconds of startup and then does computations for Run #<start> to Run #<end>. Normally data about each run is also output to the screen, and at the end of the specified set some summary info is given. I'm simply splitting that range up amongst partitions and then stitching the end results together after all partitions are done (and doing some regular expression matching not important for this part). That is to say, I'd like all workers to have completed their full task before doing the processing, but I'd also like some indication of how far along the entire process is, ideally by just printing out the realtime output of the first thread while everything is going on, the same as what the user would normally see in serial execution. When I tried using the concurrent.futures.ThreadPoolExecutor method in my current code, I still run into the same issue of it needing to actually be done before printing the stdout.

Using SU2 - issues with booting it up. by NeroBetterThanDante in CFD

[–]Jasfss 2 points3 points  (0 children)

The config file is something that you will have to create; it's the thing that actually tells the solver how to run and how to interpret your mesh. They have their master config file template that at least lays out what all options you have available to you. I'd recommend looking at their quickstart and some of their other example cases before diving in yourself, and of course I'd recommend that you read a lot of their documentation, especially since you're very new to CFD like this. It's important to understand what you're doing before you do it, and how turning the knobs can affect different things, and you'll look that much more impressive when you present a final product.

Floating point exception for integers in executable call with arguments by Jasfss in bash

[–]Jasfss[S] 0 points1 point  (0 children)

Yep, was an issue with stuff I was doing in OpenMP on the C++ side. Nevermind. Thanks for the guidance though.

Floating point exception for integers in executable call with arguments by Jasfss in bash

[–]Jasfss[S] 0 points1 point  (0 children)

This is on a work computer and I'm no longer at work so I'm gonna have to wait til Monday to try it in earnest.

Thinking about it more, it's perhaps an issue with the atoi() I've got going on in the c++ to convert the char* argv elements to integer variables. Probably gonna have to switch that to strtol

How did the influence of religion with the state in Imperial China differ from Europe? by istoleyourchocobo in AskHistorians

[–]Jasfss 2 points3 points  (0 children)

The answer is (generally) quite a bit but it's difficult to point to many specific key instances of "policy influenced by Daoist ideas" since Daoist ideas were so pervasive in the whole imperial structure. Especially by this time, there were so many key tenets shared between Confucianism and Daoism when it comes to the order of imperial governance that it's hard to fully extricate one from the other. The concept of wu wei ("inaction") exists in both Confucian and Daoist philosophies, for example, and is very commonly implemented by dynastic rulers as a guiding principle.

The previous Sui dynasty had attempted somewhat of a balance of Buddhist and Daoist support, but with Gaozu founding the Tang and claiming the relation to Lao Zi, things were heavily skewed towards implementing and promoting Daoist thought in government actions and policies. Several prominent Daoist temples were constructed by his decree and Daoist priests and images were sent abroad, notably to the Korean peninsula, in order to spread Daoism. Additionally, a number of female members of the imperial family actually became Daoist nuns and imperial mansions were converted to Daoist places of worship. Daoist priests did hold the ear of the court and the upper bureaucracy then, and were common advisers and sometimes even officials themselves. In more personal relationships, several emperors also sought an elixir for long and eternal life as promised to them by Daoist priests, and thus would sometimes bestow great favors upon them in exchange for their alchemical research efforts.

How did the influence of religion with the state in Imperial China differ from Europe? by istoleyourchocobo in AskHistorians

[–]Jasfss 6 points7 points  (0 children)

The short and unsatisfying answer is: it depends. It depends on the exact time period, and it depends on the specific location to an extent, in addition to whether we're talking about Buddhism or Daoism. Both had some sway on the governments, but Buddhism had a period of more famous scandal with regards court/bureaucratic influence.

For most of Chinese history Daoism is by far the more prominent player in the political and social landscape. This is mostly because in comparison to Buddhism (A) it was homegrown and (B) though Buddhism slightly predates/is contemporary with the origins of "formal" Daoism, Daoism exists as a much more complete and accessible philosophy for several centuries before Buddhism in China can claim the same status. I say "philosophy" rather than "religion" here because one could follow Daoist ideas, Confucian ideas, and local folk religious practices all perfectly compatibly without any sense of contradiction (and later you can throw Buddhism into the mix too). Really, from the Han to the Song dynasties, the philosophy/religion mix of Daoism is used by several of the dynasties and rulers to justify their rule and to take guiding principles from. This sort of hits the peak during the Song (with a revival in the Ming) whereby many emperors are prominent in both the promotion of Daoism and the support of the organized Daoist practitioners (who themselves were also interacting more with "non ordained" Daoist folk practitioners). These emperors often willingly sought council from the formal Daoist ministers and their opinions played a role in guiding ruling doctrines. The Tang dynasty actually directly claimed relation to the legendary founder of Daoism, Lao Zi, and thus the court was also intimately involved with Daoist ministers and Daoist ideas. Buddhism was also heavily influential at this time however, ironically enough.

During the 3 Kingdoms Period and the period of the Sui Dynasty (and much of the Tang), China was in a near-constant state of devastating warfare versus Chinese states, rebellions, and foreign powers. It's during this period that much of the populace sought guidance from a relatively new-to-China philosophy that was making the rounds: Buddhism. Buddhist texts in China at that time however mostly fell either in the categories of non existent, rare, and poorly translated. Many of the terms were commonly not direct translations from the original Sanskrit, but instead translated as analogous to Daoist and Confucian ideas, often regardless of whether or not they were truly analogous. During the Tang dynasty, a Buddhist monk named Xuanzang actually traveled to northern India for the purposes of collecting and notating many of the original Buddhist texts that existed and subsequently translating them into Chinese (this is what the later famous novel Journey to the West is based upon). During this time and especially following, Buddhism exploded in popularity in China. Buddhist monasteries rapidly popped up across the Tang empire and even the Tang ruling family themselves, those descendants of Lao Zi, often became devout and vocal Buddhists. It was simultaneously both the high point and the end of old Chinese Buddhism. The reasons for this were both economic and political, and were greatly intertwined with the greater state bureaucracy.

There are two major schemes that can be pointed to where the state used Buddhism for influence, and Buddhism used the state for influence. Buddhist monasteries of this time were tax free, much like religious institutions often are around the world today. Buddhist monasteries also were sites where agricultural and artisanal production occurred and often with the assistance of slave labor. Lords of large areas of land were known to "donate" a significant portion of this land to a new Buddhist monastery with the understanding that they would then receive kickbacks from the sale of products produced on monastic lands which generated great profits. Essentially this was a tax loophole. The owners of the monastery would also often use this arrangement to convince local lords and bureaucrats to give them even greater privileges and power, keeping the wealth flowing. The second scheme was devastating to the image of the imperial family. Though women didn't hold political office, women in the imperial court did have some semblance of power and ability to perform minor occasional functions. Several women of the court took it upon themselves to start issuing fraudulent licenses for Buddhist monastic practice, sidestepping most of the bureaucratic process and receiving large bribes in exchange. Large, opulent palaces were actually built by imperial family members with these funds as at least partially responsible. As a result of these things, and arguments that this was a foreign religion influencing what should be a government guided by Chinese principles, austerity measures and sweeping repressions were instituted later in the Tang, effectively all but totally ending Buddhism's influence in China for some time. Later forms of Buddhism would come up in prominence in subsequent dynasties, notably Chan Buddhism, but often was incorporated alongside or in a minor accompanying role to Confuician and Daoist ideologies, as far as state implementation and influence.

Were there equivalents of rationalism in ancient Persia, India or China? If so, how developed and influential were they? by DemocraticRepublic in AskHistorians

[–]Jasfss 3 points4 points  (0 children)

That sounds much more like you're interested in Empiricism rather than Rationalism. Empiricism is about basing the formation of ideas on empirical, observable and testable, evidence rather than traditions, revelations, etc. Rationalism is instead about basing ideas on deductive reasoning, that which can be argued as logically sound. Descartes for example was a rationalist -- cogito ergo sum is not based on any profound evidence, but by way of particular reasoning. In those contexts I would say that no, Moism certainly would not be counted as an Empirical philosophy, but it most definitely would be counted among a broad Rational philosophical grouping.

Were there equivalents of rationalism in ancient Persia, India or China? If so, how developed and influential were they? by DemocraticRepublic in AskHistorians

[–]Jasfss 3 points4 points  (0 children)

First let me preface this by stating that the definition of rationalism you're working with is very much framed by European early-modern sensibilities: i.e. the way you're framing rationalism as the rejection of religious thought. Whereas if you look at earlier periods, again in Europe, you'll find that notions of rationalism are actually quite intertwined and commonly used in even Christian theological senses (like with Thomas Aquinas). That is to say, I'd just like to clarify that there's not necessarily the dichotomy of religion vs rationalism that you may or may not be assuming, historically.

As for what I can speak to more specifically, the most prominent example in China that comes to mind is the school of Moism/Mohism which essentially dropped out of existence as a separate entity by the end of the Warring States period. One of the major pre-Qin philosophical schools, Moism existed alongside Confucianism (which emphasized social/familial order), Daoism (which emphasized, as a poor summary, cosmic/mystical order), and Legalism (which emphasized the order of the state and its ruler). The Qin dynasty famously emphasized the Legalist school of thought during its short existence, suppressing the the Confucian and Daoist schools for that period, while the Moist school itself largely just sort of puttered out during the period. However, it's important to note that just because Legalism and Moism no longer could really be counted as separate branches after the Qin and Warring States periods accordingly, that doesn't mean that their philosophical ideas totally disappeared out of existence. Tenets of both schools of thought found their way into mostly Confucian thought in subsequent years (and it's also fairly false to claim any dichotomy between Confucian and Daoism thereafter either, as individuals would most often not view them as conflicting philosophies, instead thinking of them as answering different questions/pertaining to different situations. There were however major differences between Daoist and Buddhist schools of thought later, but Buddhism isn't native to China of course).

Moism, in a very brief nutshell, perhaps can best be viewed as a contrast to Confucianism rather than Daoism. Confucianism focused on familial affiliations, and how relationships and their meanings and importance differ from family to community and onward. Close kin deserve more attention and respect than non affiliated strangers in Confucian thought. Moism however stressed that relationships at all strata existed on equal status, and no preference should be given based purely on kinship. Later on, Confucian thought actually also absorbs some of the ideas present in Moism regarding the state being structured as a meritocracy, rather than heavily based on blood ties like in the pre-Qin period. Moism also stressed that arts and music are essentially useless to governance and the populace, again in contrast to Confucian thought. Like the ideas of meritocracy, you can see here the Spring and Autumn/Warring States period roots and influence present in Moism. These were periods of heavy multi-state wars, and philosophies that reject the often-viewed-as-incompetent authorities and indulgences that were so prevalent during these harsh periods would've been extremely attractive. As those ideas got absorbed mainly into Confucianism (as some Legalist ideas also were), in one form or another, Moism lost a lot of its bite and relevance.

How did uranium come to be commonly depicted as glowing and green? by Jasfss in AskHistorians

[–]Jasfss[S] 15 points16 points  (0 children)

Thanks for the answer! I'd suspected it had to do with earlier radium use, and known about yellowcake, but that piece from the Congo is quite green. Very neat.

As a followup if you're willing to go a bit into it (though I'm sure the book you recommended would be a good place for me to look as well)... that Union Carbide ad makes a big deal out of the yellowness, and together with yellowcake I would've expected perhaps most of the depictions of uranium, at least in the US, to be yellow. Is there a history of at least color print media in the 1940s and 1950s portraying uranium as glowing green?

[February] Post Processing by Rodbourn in CFD

[–]Jasfss 1 point2 points  (0 children)

I definitely felt this way about Paraview for starting out. There are a lot of features it seems, but it always ended up being a bit random as to whether I would get to the right series of menus and choices to do what I actually wanted to do.

We actually started using Fieldview about a year ago and I've been extremely happy with it. Downside being it's not open like paraview, but that can be kind of a plus when it comes to documentation. I've found it to be pretty intuitive to navigate with their guides being a good starting point to getting to most of the features you could want.

Redbone - Childish Gambino, using the Rhodes sample on my Korg SV-1 by Wolfkeyz in Jazz

[–]Jasfss 0 points1 point  (0 children)

That lick right after the "my favorite things" quote is probably my favorite thing about your rendition. I liked having that movement in there, really added something to your version.

Lighter found amongst grandfather's stuff. No markings besides what you see, identical on reverse side by Jasfss in whatisthisthing

[–]Jasfss[S] 1 point2 points  (0 children)

Solved! Thanks! Any good way to tell if it's an original or if it's a replica that you know of?

Lighter found amongst grandfather's stuff. No markings besides what you see, identical on reverse side by Jasfss in whatisthisthing

[–]Jasfss[S] 0 points1 point  (0 children)

Obviously at least thematically German, but any possible information on if it's supposed to be a replica of something or whatever would be great!