Hacker Newsnew | past | comments | ask | show | jobs | submit | mrami's commentslogin

If anyone finds it useful, I have a Maven plugin that does something similar for Java (Java -> TypeScript)

For anybody that still uses Java. :D

https://github.com/BlueCircleSoftware/bluecircle-json-interf...


very cool - reminds me we should build a vscode plugin :D


Quadratic behavior is O(n^2) like bubblesort - triple the number of items to sort, and it takes 9x the time.

Really, the comment was referring to "accidentally quadratic" bugs, as documented here, for example: https://accidentallyquadratic.tumblr.com/


A bit of a tangent, but boson vs. fermion is not a massless/massive split. There are massive bosons. Rather, it's a split on the qualities of the objects' spin, and thus whether they obey the Pauli exclusion principle.

https://en.wikipedia.org/wiki/Boson


Ah yes, you're correct. I see that I remembered that incorrectly.


A tool that will read your Java REST endpoints, and make TypeScript interfaces and invocation functions, so you can pretend your React front-end is using DCE again like it's 1999.

https://github.com/BlueCircleSoftware/bluecircle-json-interf...


This reminds me of playing with openMosix and ClusterKnoppix back in the day. The kernel would take care of migrating the processes and balancing the load automagically...


Ah man. OpenMosix. What a great piece of software that was. Many people might not know but the developer beyond OpenMosix founded a company around it called Qlusters and then that was the predecessor to Xen/Xensource which he also founded and then he went on to found KVM/Qumranet. To say he left a mark is an understatement.


It's pretty crazy that we don't have something similar now. And possibly with better security.


Maybe popcornlinux http://popcornlinux.org/ can give us that back.


The term for JS enabled pages used to be DHTML back in the day. You'd be talking about a static-server DHTML site. Or something like that. https://en.m.wikipedia.org/wiki/Dynamic_HTML


Hands, lips, tip of tongue. "Mouthfeel" is as important to taste as flavor. Lips aren't for tasting either, why so many nerves? https://www.quora.com/Which-is-most-sensitive-part-of-the-hu...


I imagine the solution is going to be some sort of parallel to open source, that I can't quite visualize atm.

Maybe the next generation beyond 3D printing will be able to do multi-component assembly tasks, and you can get/print your own high quality components, and assemble your own high quality toaster... Maybe


The open source angle is an interesting concept. The raspberry pi seems to be doing quite alright, despite its design being completely open sourced. Can that model be tweaked a little to apply to all sorts of manufactured goods...? I’m mean, a brand name can have value.


The Raspberry Pi isn't a great example: You can't make a clone of it, because Broadcom will not sell you the SoC for it.

The parent mentioned 3D printing: I think that's the space were right now this plays out the most. Many designs are open or at least have open components, and people build and sell variations, but brands and brand loyalty are very much a thing.


IIRC - it's from the yellow pages "let your fingers do the walking", although I could have made up that association.

https://m.youtube.com/watch?v=SYpJ1IgGoc0


Selection sort and insertion sort are not O(n) algorithms...


If swaps are the only thing you are counting, selection sort is O(n).

I can't come up with a reasonable way to consider insertion sort O(n) though.


> If swaps are the only thing you are counting, selection sort is O(n).

And if you ignore the bottom half of the centaur, it's just a dude playing a flute. :)

"In computer science, the time complexity is the computational complexity that describes the amount of time it takes to run an algorithm." [1] We shouldn't be confusing people that actually want to learn about this stuff.

[1] https://en.wikipedia.org/wiki/Time_complexity


> And if you ignore the bottom half of the centaur, it's just a dude playing a flute. :)

That is an excellent phrase.

> We shouldn't be confusing people that actually want to learn about this stuff.

I definitely agree that Selection sort should definitely not be described as O(n) to beginners. I was just pointing out a subtly. In the strange case where memory writes are much more expensive than reads or comparisons, it is correct to say the Selection sort takes O(n) time.


I'm not sure what conditions you have in mind, but in the selection sort, the comparisons are O(n^2), and the assignments are O(n).

If comparisons are a fixed, non-zero cost, and assignments are a fixed, non-zero cost, then the comparisons in your selection sort will always overwhelm the assignments, and I can tell you at exactly which input size.

https://gist.github.com/mrami4/56d6e234f34787b8c5daf543a299a...


> And if you ignore the bottom half of the centaur, it's just a dude playing a flute. :)

Good one, but you probably meant Satyr (or Faun as Romans called it)


Centaurs are multifaceted and live rich, complex inner lives.

https://commons.wikimedia.org/wiki/File:Achilleus_Lyra.jpg#/...


The article describes these algorithms "efficient" on the basis of being linear, and they're not. Insertion and selection require O(n^2) moves or compares respectively (or, n log(n) with use of data structures). As it stands, the page is pretty as heck but teaching a misconception.


> The article describes these algorithms "efficient" on the basis of being linear, and they're not.

If memory writes are expensive (relative to reads and comparisons), selection sort is much better than insertion and bubble sort. Which is not something I had considered before trying to defend the post from the original comment.

> Insertion and selection require O(n^2) moves or compares respectively (or, n log(n) with use of data structures). As it stands, the page is pretty as heck but teaching a misconception.

I am definitely aware of the runtime of the sorting algorithms discussed. I have written about all of them [0]. Originally, I was going to agree and write about how it was a concerning misconception, but at least in the case of selection sort there is some (albeit small) merit to considering selection sort as O(n).

Though given that I cannot come up with a defense for insertion sort it is likely the author doesn't understand the time complexity of the sorting algorithms presented.

[0]: http://thethirdone.github.io/blog/posts/random-sorting/


Great article. Thanks for posting.


Yes. What sort of reasoning is that? I can present the result in a square picture, thus it's O(n)... The point is that creating each row of the picture does not take constant time; a longer row will take more time to create.

Both selection sort and insertion sort are O(n^2).

Sorting by pairwise comparison is O(n log n) at best.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: