News for hackers. Stuff that matters.

Paddy3118

I originally used Guttenburgh to get Hamlet and coded the Quanta method in Python and it did not work. I then moved to Algorithm 1 in the paper and got Copilot to (mis) convert it to Python and then spent time getting Copilot to admit its mistakes. The resultant code seemed to work but I found the Quanta suggested data of the words of hamlet to be uninspiring as for the calculated theta (max set size before halving), was often from ~50% of the total number of words in hamlet to often more than the words in hamlet. I've yet to investigate theta in more depth...

Searching OEIS for anti-diagonalised tables

It seems that if you have a table of valuesthat is acceptedby OEIS by submitting the anti-diagonalised form of your original table, THEN, you can only search for sequences within successive terms of the anti-diagonalisation. You cannot search for, for example, a sequence of values from one row of the original table. Is it as it seems to me?Thanks.

( Read More... | no comments | on HN )
Yep. Fun, weather protection, and small - just too pricey at the moment.
I don't want an electric Suv - I need an electric Carver for £5,000 and a car share of something larger and more luxurious for less frequent long trips.
Python is a scripting language. It allows me to develop a right answer in record devopment time and with a high degree of confidence that the result does what it needs to do. If, then, there are speed problems then I can optimise my existing code or rewrite sections in other languages, but crucially use my initial code to aid in testing the more obscure rewrites. Most of the time, some thought upfront will tell you if you will need a compiled solution early on, but even then - getting it correct in Python before getting it fast in something like C++ can be faster - the spec is often revised as implementation can change specsand Python is more agile.

Execution speed is more than execution speed - you need to be correct, and being fast enough is quality; faster may be wasteful.

Re:JavaScript Containers on Saturday May 07, 2022 @02:16AM (#31292543)
"People don't use...". They did and they will and you will have to read and understand and maintain that cruft for years to come.
Re:JavaScript Containers on Saturday May 07, 2022 @02:09AM (#31292515)
Lingua franca "language used as a means of communication between populations speaking vernaculars that are not mutually intelligible." Javascript is too Web focused. Python and C are better candidates as they are more than Web.
Re:JavaScript Containers on Saturday May 07, 2022 @02:02AM (#31292489)
Stick to a detailed comparison with... Shell !? So that's the context for universality he's touting.
The articles structure makes it difficult to comprehend.
Re:The Value in Go’s Simplicity on Sunday November 17, 2019 @04:53AM (#21557245)
Code is helped by being readable.

Saying your code is going to "look like sh£t anyway" seems rather defeatist, and an _excuse_ to write unreadable code.

Re:Solving the Monkey and coconuts problem on Saturday May 02, 2015 @01:11AM (#9475942)
Oh my blog isn't giving an analytical solution, if that is what you want to do, it is simulating the problem to find a solution.

(The video does do an analytical solution though).

Re:The Five Monkeys Experiment on Saturday May 02, 2015 @01:09AM (#9475941)
The solution of "working out loud" needs to be expounded.
Even so, Go seems less succinct in comparison on several tasks. Such differences will most likely be magnified in larger programs.
Go does seem more verbose than Python. Rosetta code tries for idiomatic solutions to common tasks, here's one such completed in both Python and Go: http://rosettacode.org/wiki/Bitcoin/address_validation

You would need to know the nature of the tasks to pick out those that need longer answers but all the Go tasks are here: http://rosettacode.org/wiki/Category:Go - most of which should have Python solutions.

You can say that, but it doesn't make it so. Go here: http://rosettacode.org/wiki/Category:Go for many examples of more succinct Python with better commenting than the Go code, for example: http://rosettacode.org/wiki/Align_columns
Re:Ask HN: Where are all the Rails jobs? on Saturday November 22, 2014 @03:09AM (#8645115)
Not a recipe for learning to write idiomatic code in any new language. (I mostly hear of C++ programmers that really only write C).
Re:Matz at RubyConf 2014: Will Ruby 3.0 Be Statically Typed? on Tuesday November 18, 2014 @01:11AM (#8622622)
There seems to me to be an overlap between Matz's typng ideas and some of the "static" typing generated by Julia: https://www.youtube.com/watch?v=jhlVHoeB05A https://www.youtube.com/watch?v=VCp1jUgVRgE
Re:Analyzing Programming Languages Using Rosetta Code on Wednesday September 24, 2014 @01:01PM (#8362595)
I've asked for more info on that so I can see what needs fixing and if these non-zero-exit values appear for me.
Re:Don't Ask Users to Bring the Beer on Monday July 08, 2013 @02:37AM (#6005470)
My apologies. I didn't know it was a technical term.
Re:Don't Ask Users to Bring the Beer on Sunday July 07, 2013 @10:49PM (#6004850)
Ouch. Onboarding? You can't communicate if you make up words as you go along.
Re:Tests Are Overhyped on Saturday April 20, 2013 @09:42AM (#5581370)
Without due scientific process to back up TDD we are left with such arguments having equal validity as TDD. Without a scientific proof of TDD being superior then we are left with mere opinions on both sides.

NAARP! http://paddy3118.blogspot.co.uk/2013/02/no-attempt-at-rigoro...

Re:Functional Programming Is Hard, That's Why It's Good on Saturday August 20, 2011 @04:17PM (#2907613)
The "One True Language Paradigm"....

... Is functional programming!

(while it lasts that is).

Keeps the money circulating.

Re:Putting the Science back in Computer Science on Saturday February 26, 2011 @04:10AM (#2265186)
By abstraction, the author mentions interfaces earlier on. I take the point of the other commenter who states that Java practitioners use too much abstraction, and would also point out that the later versions of Python add abstract base classes: http://docs.python.org/library/abc.html

After comparing Java and Python solutions on Rosetta Code: http://rosettacode.org/ I think new programmers would find it easier to learn when using Python.

- Paddy.

Re:How (not) to write Factorial in Java on Wednesday January 26, 2011 @03:00PM (#2144845)
Um, not really. Dynamic languages have duck typing (look it up on wikipedia); they get used to writing for the now and letting the what-ifs wait, as in some cases, changes can be accomodated with little tear-down of existing code.
Re:Feynman's Cargo Cult Science on Tuesday August 24, 2010 @02:26PM (#1630644)
Integrity in conducting scientific experiments? Now there's an idea!
Just a reminder after some of the comments directly after the Beijing Olympics: Bolt is tested to death and is clean. As where those 100m female runners who swept away all the medals: Shelly-Ann Fraser, Sherone Simpson, and Kerron Stewart.

There is one thing that was shoddy though, with a bit more effort the ladies could have got equal times and picked up three golds in the race instead of one gold and two silvers :-)

- Paddy.

Older »