You can run a whole OSX sysem inside docker now, gui and all... I havent tried it out yet but looks legit.
So in my sparetime I have been writing this open-source game, a mmorpg called a MUD (no graphics in the typical sense, all ncurses based).
Anyway, I never would have thought the most complicated part of writing the game engine would have possibly been the handling of pronouns! The number of variations you have to consider is astounding when you really try to catalog all the different types.
I think I finally got them all covered though.
#Ruby #MMORPG #Game #Games #GameDev #Aethyr #Programming #MUD #MUDs #Development #GameDevelopment
So took me much longer to port my stock trading algorithm over to a proper automated system then I hoped...
I knew I had something impressive because I had backtested a rudementary version of my algorithm and the ROI was astronomical. Problem was the platform I was using was very basic, it couldnt autotrade for me and was almost impossible to code anything too advanced anyway. But it did provide back testing. For some time after that i used the algorithm to trade manually, checking when it told me to buy or sell and doing it. while that proved out the ROI was real it didnt really reach its full potential as I would often trade sometime after the algorithm alerted me.
Now I have everything **finally** automated took two solid months but its working. I have thrown every stock I could find at it and after backing for a year, random years every time, different stock, not **once** has the algorithm lost me a penny at the end of any year. Some stocks it never traded on because the volume was too low and apparently it knows well enough to not go in on those stocks (not entirely sure how honestly even though i wrote the damn thing), for those stocks the ROI is 0 of course. But for every other stock I am coming in multiple times over buy&hold, even when the stock goes negative overall and crashes (it knows when to short)!!!!
I am so excited how well this is working out.
#stockMarket #Quant #algotrading #algorithms #algo #programming #python
In case anyone wants to check it out, this is my dev computer. I work on massively parallel algorithms a lot of the time so I need some really heavy duty GPUs for GPGPU (those are 4 watercooled Radeon Vega Frontier Edition GPUs) and a 32 core Ryzen 3.7 Ghz threadRipper CPU, and 64 gigs of the fastest ram around. this baby is a **beast**
inb4 why the Radeon GPUs and not NVIDIA or an Intel chip... simple, they are better for many/most applications but not all. The CPU and motherboard supports the full number of channels to maximize throughput into and out of the GPUs. So while they have fewer cores compared to a Tesla the cores dont tend to be the bottleneck, the I/O is, so i sacrificed cores to max out the I/O channels where the bottleneck tends to be. AMD and Ryzen ThreadRipper CPU were the only ones doing that.
#GPGPU #Parallel #Parallelism #GPU #programming #AI #MachineLearning #Algo #algos #Algorithms @Science
## Math Tip for Coders:
Remember when averaging percentages, unlike plain values,no matter if its a simple mean, a moving average, or a exponential moving average, you always want to use the repeated operator on percentages compared to the one you would use on plain values. I know thats confusing and really only makes sense with an example.
So each of the following operators is the repeated form of the prior: +, *,^ (exponent)
Similarly the following: -, / , roots (like square root)
So for a simple mean with plain values you would average three values by doing:
(a + b + c)/3
However if your doing that for percentages that formula doesnt work instead you do:
(a * b * c) ^ (1/3)
Remember taking something to the power of 1/3 is the same as taking the third root.
Also keep in mind the variables here must be percentages such that they are anywhere from 0 to infinity. If you invested in something and you made no money and lost no money it would be 1, for 100%, if you lost all your money its 0, if you lost half its 0.5 (50%), if you doubled your money its 2.0 (200%) and so on
So if you inveted in three different things, and each time you doubled your money, and you wanted to know what your average percentage of return on investment was you would do: (2 * 2 * 2) ^ (1/3) and that would give you your mean, 2.. If you treated it like normal values and added then divided while it would work in this case it would give you **significantly** incorrect values in other cases.
As I stated this holds true for more complex types of averages too, take exponential moving average as an example. For plain values with EMA you apply each new value to just the previous EMA (and dont need to worry about combining all the values at once).. So if you flipped a coin 100 times and and took the EMA of the first 99 and now want to know know the EMA after the 100th flip (1 being heads and 0 being tails) you do:
(last_value * (1 - alpha) + current_value * alpha)
that gives you your current EMA where alpha is any number from 0 to 1... now to apply that to percentages again you take each operator and make it the next one up so for percentages it is actually:
(last_percentage^(1-alpha) * current_percentage^alpha)
The app is now officially 100% multithreaded with very little thread contention.. Man that wall of 100% CPUs (32 of them) is a beautiful sight.
#programming #Python #algorithms #multithreading #threads #threading #Python3
So my app is running only across 32 cores so only 32 threads in action (well its python so multiprocessing)... yet it has 3,201 lock objects total instantiated to accomplish that with minimal read/write contention....
I can honestly say this is the greatest number of thread locks instantiated at a single time that I have ever needed in an application before.
#programming #Python #algorithms #multithreading #threads #threading #Python3
Have I mentioned yet today how much I hate python multiprocessing, or writing cpu-limited algorithms on python in general... my god why could they not fix the GIL lock problem in python3, are the devs really this lazy!
#programming #Python #algorithms #multithreading #threads #threading #Python3
Ok so yesterdays algorithm took a little more extra work than I had hopped to finally get into its final form but I **think** its there. I just need to run it through some tests to know for sure.
Man I just cant get enough of watching my algorithm go balls-to-the-wall and max out my disk IO and all 32 of my CPU cores when it runs... parallelism makes me smile :)
Stress testing my algo across 600 simultaneous threads at once on a 32 core CPU at once. This thing is a beast when it comes to parallelization!
#python #algorithm #algorithms #algo #programming #multithreading
man I love this.. so when i did regular signale threaded optimization i got my algo from 16.7 minutes down to about 1 minute Now I moved to multithreading and it runs in about 5 seconds.
Never skip your optimizations people!
A new post I wrote explaining how to write an efficient Exponential Moving average with a finite length.
https://jeffreyfreeman.me/an-efficient-exponential-moving-average-of-finite-length/
#science #math #maths #mathematics #programming #DSP @Science
Early rough draft, haven't proof read it yet. But just wanted to share the math behind creating an efficient Exponential Moving Average with a finite length/cut off. I found this was needed for a project I am working on where the EMA much be determined by random access to various points in a time series and couldn't be calculated for the entire time series in one go.
I needed to modify the EMA for a finite back-length. The standard EMA is only really efficient when calculated sequentially for the entire time series. This implementation is an efficient design that allows for calculation at a point by using finite back-length.
This is an early draft, did not proof read it yet, just whipped it together, though pretty sure the math is close to the final form. I will publish it sometime tomorrow but want to share what I have and welcome and questions or feedback before I publish it.
https://beta.jeffreyfreeman.me/an-efficient-exponential-moving-average-of-finite-length/
#Programming #Math #Maths #Mathematics #algorithms #Science #QOTOJournal
Learn CSS by playing a browser game: http://www.flexboxdefense.com/
How is it even possible I stumbled across the bug.. The version is 4.4.1 right now and the bug has been in there for all of 4.*. Plus the bug seems to happen on every system I've tried it. What baffles me is that I'm not even doing anything weird, this is literally the very first step you do when setting up a mongo cluster... so how.. HOW am I the one catching this?
A spacemacs cheatsheet I've been working on for every single command/hotkey I care about. Feel free to download it.
A slightly delayed #FollowFriday / #FF I know, but I also don't want to skip this one as we have a lot of new cool people
===== New =====
@louiscouture - A new user from Quebec, his profile reads: I like coding, technology and taking long walks, photography, politics and science. 8values says I’m libertarian socialist but I am just confused and only want a better world for all of us. Do not talk to me about inches and feet unless it’s body parts because I do not understand what it is.
@compass_straight_edge - His interests (that I know of) seem to be #programming and #Math
@svmihar - A gamer and a coder, does some #python.
@EVoCeO From his profile: Hi, new to decentralized social media and social media in general. I chose Mastodon because if its uncensored nature and chose qoto because of its philosophy. Such a fresh take on social media I'm excited to try it out.
@Demosthenes - Also brand new, but has jumped right in and been pretty active since he signed up.
@ml - Seems like an Open-source / #Linux user. He is brand new but gonna keep an eye on him for future posts.
===== Old=====
@soundofsun - From her profile: 𝖐𝖊𝖊𝖓 𝖔𝖓 𝖆𝖓𝖆𝖑𝖞𝖟𝖎𝖓𝖌 𝖙𝖍𝖊 𝖘𝖍𝖚𝖉𝖉𝖊𝖗 // 𝖑𝖞𝖎𝖓𝖌 𝖉𝖔𝖜𝖓 𝖎𝖓 𝖙𝖍𝖊 𝖉𝖆𝖗𝖐 𝖙𝖔 𝖉𝖗𝖊𝖆𝖒 // 𝖆 𝖗𝖔𝖈𝖐𝖆𝖇𝖎𝖑𝖑𝖞 𝖗𝖎𝖉𝖊 𝖋𝖗𝖔𝖒 𝖙𝖍𝖊 𝖌𝖑𝖎𝖙𝖙𝖊𝖗 𝖙𝖔 𝖙𝖍𝖊 𝖌𝖑𝖔𝖔𝖒
@2ck - From his profile: A capable software engineer and aspirating (sic) cook
@JulianRott - Mostly posts interesting #STEM articles.
@zleap - Interested in #Technology, #Science, Fediverse, Linux and free software.
@lupyuen - One of our embedded / IoT guys, seems to focus a lot on digital hardware and software. Lots of cool projects on his feed, he brands himself as "Techie and Educator in #IoT "
Do you guys know the story about Eurisko, one of the earliest Evolutionary Algorithms attempted, done back in the 80's by Lenat. An interesting bug had arisen that is both insightful and amusing.
The purpose of the problem is that it evolved new heuristics for some problem it is given and then try them to solve the problem. Heuristics that work would get a higher score and ones that dont get a lower score. Eventually it would learn which a re best and would try the heuristics in order on new problems to find solutions.
One day after a night of solving problems Lenat came in and noticed there was heuristic that scored 999 out of 1000, the highest score ever seen. Excited he tried to figure out what the heuristic was doing.
As it turns out the heuristic basically said "whenever a problem is solved add this heuristic to the list of heuristics used to generate the solution"
You can read about this bug, and the project in general in this book. See page 90 for specific reference to the bug:
https://users.cs.northwestern.edu/~mek802/papers/not-mine/Lenat_EURISKO.pdf
#Science #MachineLearning #AI #AGI #EvolutionaryComputing #Evolution #Programming #CS #ComputerScience #QotoJournal
A 9$ computer that runs linux, hand held, full qwerty keyboard, and a touch screen... I think I need to get this!
Jeffrey Phillips Freeman
Innovator & Entrepreneur in Machine Learning, Evolutionary Computing & Big Data. Avid SCUBA diver, Open-source developer, HAM radio operator, astrophotographer, and anything nerdy.
Born and raised in Philadelphia, PA, USA, currently living in Utrecht, Netherlands, USA, and Thailand. Was also living in Israel, but left.
Pronouns: Sir / Mister
(Above pronouns are not intended to mock, i will respect any persons pronouns and only wish pronouns to show respect be used with me as well. These are called neopronouns, see an example of the word "frog" used as a neopronoun here: http://tinyurl.com/44hhej89 )
A proud member of the Penobscot Native American tribe, as well as a Mayflower passenger descendant. I sometimes post about my genealogical history.
My stance on various issues:
Education: Free to PhD, tax paid
Abortion: Protected, tax paid, limited time-frame
Welfare: Yes, no one should starve
UBI: No, use welfare
Racism: is real
Guns: Shall not be infringed
LGBT+/minorities: Support
Pronouns: Will respect
Trump: Moron, evil
Biden: Senile, racist
Police: ACAB
Drugs: Fully legal, no prescriptions needed
GPG/PGP Fingerprint: 8B23 64CD 2403 6DCB 7531 01D0 052D DA8E 0506 CBCE