News for hackers. Stuff that matters.
Re:Which Programming Languages Use the Least Electricity? (2... by monkeyshelli on Saturday March 30, 2019 @02:55AM (#19528211)
That sounds pretty damn nice - would you happen to have a good link in mind for reading more on the subject?
Re:Which Programming Languages Use the Least Electricity? (2... by eastern on Saturday March 30, 2019 @11:14PM (#19533557)
This was a financial function which calculated an internal return of return for a long series of uneven cash flows, essentially a python implementation of the XIRR function that spreadsheets have.

To get to the required two decimal places of precision, each call would recurse 50-60 or more times so this was more or less all that the server was doing.

A VERY low hanging fruit.

Re:Which Programming Languages Use the Least Electricity? (2... by makapuf on Saturday March 30, 2019 @03:42AM (#19528332)
What's interesting is also how go and python interaction is since you seem to be able to call go from python and the reverse very efficiently.
Re:Which Programming Languages Use the Least Electricity? (2... by eastern on Saturday March 30, 2019 @11:22PM (#19533589)
Sorry but we actually cheated on that part. Redid the page so that the function that is now in Go is a separate little service that is called via ajax directly by the users' browsers.

So there's no actual Python-Go interaction in our code.

This was quicker, cleaner and has made the page more responsive for users.

Re:Which Programming Languages Use the Least Electricity? (2... by makapuf on Monday April 01, 2019 @02:31AM (#19541004)
Thanks this comment is useful, client side integration is integration after all, and I think if it was simple, you would have it done differently (if I understand your words correctly - "cheating").