393 karma · joined June 16, 2019
Can I access Nim functions in Min?
Ada is a really nice language that is fast, has lots of support for making sure programs are reliable, can run on desktops or microcontrollers, has a really good concurrency story and parallelism is coming next. I like the syntax a lot and was recently making some small programs and having a blast. That all changed when I found out I could only distribute my programs with the full source unless I paid adacore what is likely a lot of money (I can't be certain as it is not listed on their site). Technically, there is a GCC clause that allows you to distribute as closed source, but then you can't use any adacore libraries and it all seems tricky.
No thanks, I'm not even remotely interested in that kind of relationship. D will have to do for my use cases.
Commercial tools aren't a problem to me, but they need a tooling option for solo devs that don't work for a 5,000 person company on a military project.
Adacore seems like a neat company with a great product, but the current situation seems to be hindering language adoption outside of larger military contracts and university research
I've thought OCaml might be a good F# replacement as it has its own compiler and interpreter that doesn't need the CLR/JVM and F# was mostly based off of OCaml, but it's a little awkward to me on Windows and OCaml itself seems to be a little painful (more boilerplate than expected) for doing things like IO (which I do a lot of).
The first is that once a user reads over the various functional things like let statements, record types, union types...etc, you still don't really know how to code in F# unless you already have a .NET and in particular C# background. Nearly all the documentation and books (I have 3 of them) assume you're a C# dev making the switch. This is similar to learning Clojure/Kotlin/Scala on the JVM without knowing any Java. Everytime I post this someone tells me that is untrue, so I give it another shot and an dissapointed. With Python, there are dozens of books written for beginners that show you the building blocks (lists, control flow, dictionaries, tuples, functions, classes, file IO...etc) and how to use the blocks to build useful programs. With F# you get three sentences in and then hear how this is just like this thing in C# that I also know nothing about.
Microsoft also seems to not be very dedicated to providing F# tooling support.
On the plus side, I've found the community to be super smart and helpful and the language itself is very beautiful from an aesthetics point of view to me somehow (just looking at a bunch of code ). In comparison to C#, there is sooo much less noise (); everywhere.
Go is a pretty simple language that compiles to static binaries. F# ain't that as there is all the bloat and baggage of .NET. Even with .NET core, that is more confusion for me.
One of the problems I've always had with niche languages is that they're so alien compared to my background with scripting languages (Ex: Lisp, APL, Prolog, Forth, Smalltalk, Haskell...etc) and thus harder to figure out how to idiomatically do something.
Btw, there is a neat book for Prolog (black cover) on programming text adventures in Prolog. I found it was the only thing that made it start making sense to me as in how I can start to think in Prolog like I do Python. You might enjoy it as well, but you may be past it by now.
I'll have to check out your Klong code at some point. It might be a nice start for me. I think I know how to pass things around, but I'm sure there are pitfalls to get passed.
Forth might be a good subject for you to cover at some point further in the future too.
Thanks!!
I also sometimes wish I had all the time in the world to read through each one of them. Sadly as someone working full time with a kid, I have very little time for exploring these fascinating tidbits. I think one of the things I should really work on even better is time management of my free time. A little less Reddit and a little more studying would be good for me :).
I was curious if the Klong book just covered an intro to array programming in Klong, or if it also covered how you implemented it in C or your high level C like language?
I'd like to write my own array language someday and would likely use something like "D" that is low level enough to be fast and release as a binary while being high level enough not to blow my mind.
Best of luck on all your endeavors!
If you go to the author's root page, you can see they've written many fascinating books on niche subjects that aren't so niche on HN. For example, implementation of a lisp system and array programming, scheme books, logic programming stuff... etc. I haven't bought any yet (sadly), but plan to in the future as they seem to be optimized for the self learner who wants to learn via discussion and numerous simple examples rather than chapters full of dense mathematical theory. The array programming one looks a lot better than the Dyalog book and some of the J books I own or have flipped through.
Due to certain tax credits, utilities can break even and even make a little money off of these devices, but it is certainly no slam dunk.
One of the most recent FERC orders deals with directing all the ISO/RTOs to add energy storage participation to markets as long as the battery is 0.1 MW or greater if I recall correctly.
A lot of folks are interested, but there isn't much money in ancillary services or energy for the reasons you described above.
The large-scale storage is pretty sweet though.
The other parts of the US participate in either ERCOT, CAISO, MISO, SPP, ISO-NE, PJM, or NYISO which all do commitment and dispatch. ERCOT is a little unusual as they don't co-optimize reserves in their real-time 5-minute market. Each of these markets has an independent market monitor that looks for participant gaming and other market anomalies. FERC mandated this after some heavy abuse in the north east from a utility where the fine was divided up and went to funding the market monitoring groups. Either this group or sometimes the market software itself looks for instances of market power being demonstrated. For example, if you're unit is sitting right on top of a congested area and your offer jumps up a certain percent, the software pushes you back to the approved offer that the market monitor verified is your true marginal cost. So the market is deregulated, but there is still plenty of regulation of a sort.
In a perfect market, yes you would have uneconomical units shut down quickly, but this isn't the stock market and there are many reasons why this doesn't happen all the time. Maybe you need it for capacity reasons (markets have rules on how much you need to reliably serve load or they even have capacity markets) as wind and solar aren't as reliable as thermal generation.
Granted, many understand that and are perfectly fine with it as you're helping to effect change. However, a lot of folks have been really confused by that marketing line, so it deserves clarification. HN users are probably more educated than the general public of course, but I work in this industry and strive for clarity.
The power going to your house will still be a mix of coal, natural gas, wind, solar, and others.
With that being said, we're starting to see coal being retired at a very fast pace Nationwide and no new ones are really expected to be built. Change is happening every day in this industry which has traditionally moved at a glacial pace. Please do keep up the interest and spirit.
One of the key industry drivers here are the production tax credits (wind and now solar + storage) that come from government and make wind so crazy economical right now to where they can have extremely negative offers (think corn and ethanol). This is why it is painful to me to hear about politicians being bought out (ok, I'm sure some have fallen to for lobbyists) as the production tax credits have done so much for clean energy. Public opinion is also important in this space as many utilities are making green investments because it is good for PR.
There is always pushback from locals (understandable), but there has been billions in transmission built in the Oklahoma, Kansas, Nebraska, and West Texas regions to name a few areas. A lot of this is to help with the existing (ageing) infrastructure as well as helping make sure the ~22GW of currently built wind capacity can actually serve load and not be curtailed 24/7. In fact, a lot of that wind wouldn't have been built without the necessary transmission. Keep in mind that there is greater than a ~2:1 return on investment from these projects (difference in production cost in a year with the projects there and then not there) if I recall correctly.
The Western Interconnect of the US seems to favor using RAS and phase-shifting transformers in order to avoid as many transmission projects. A Remedial Action Scheme is basically an automated system that keeps certain catastrophic events from happening when a certain triggering event happens. Phase shifting transformers can help push back on certain interregional flows. I think this makes more sense in the Western Interconnect as it isn't as much of a dense network as the Eastern Interconnect. You have dense load centers in Denver, California, and Oregon/Washington with a dessert and mountain range in the middle (forms a donut). It is very rural over the vast majority of the distance, so I imagine transmission is pretty expensive and harder to justify. They do have interregional planning groups in the West though.
Baton Rouge does have some refineries and chemical plants (Dow) on the river. The only good smelling plant is the Community Coffee facility.
I'm always sad that the power systems industry has mostly moved from Fortran to C++ as the Fortran is much easier to read and doesn't make overzealous use of OO principles.
I use a lot of Python for process automation and data analysis. If I had to put numerical code in production it would probably be in either Fortran or Julia. My problems with Fortran usually boil down to libraries for certain things like database access. I did a little googling and there is some ODBC support, but it doesn't seem to be very good.
Our software vendor uses VCS, but has a long history of signing and dating code sections with paragraph explanations. They've been developing the same codebase since the 70's and release the uncompiled source along with the precompiled binaries. Their documentation is horrendous, but the source and comments help out quite a bit.
Some of the prolific coders have written lots of research papers and textbooks as well, so it is really cool to read one of their textbooks and see the code firsthand.